2002-02-19 16:46:56 +01:00
|
|
|
dnl $Id: broken-glob.m4,v 1.4 2001/06/19 09:59:46 assar Exp $
|
2000-01-09 21:58:00 +01:00
|
|
|
dnl
|
|
|
|
dnl check for glob(3)
|
|
|
|
dnl
|
|
|
|
AC_DEFUN(AC_BROKEN_GLOB,[
|
|
|
|
AC_CACHE_CHECK(for working glob, ac_cv_func_glob_working,
|
|
|
|
ac_cv_func_glob_working=yes
|
|
|
|
AC_TRY_LINK([
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <glob.h>],[
|
2002-02-19 16:46:56 +01:00
|
|
|
glob(NULL, GLOB_BRACE|GLOB_NOCHECK|GLOB_QUOTE|GLOB_TILDE|
|
|
|
|
#ifdef GLOB_MAXPATH
|
|
|
|
GLOB_MAXPATH
|
|
|
|
#else
|
|
|
|
GLOB_LIMIT
|
|
|
|
#endif
|
|
|
|
,
|
2001-06-21 04:12:07 +02:00
|
|
|
NULL, NULL);
|
2000-01-09 21:58:00 +01:00
|
|
|
],:,ac_cv_func_glob_working=no,:))
|
|
|
|
|
|
|
|
if test "$ac_cv_func_glob_working" = yes; then
|
|
|
|
AC_DEFINE(HAVE_GLOB, 1, [define if you have a glob() that groks
|
2001-06-21 04:12:07 +02:00
|
|
|
GLOB_BRACE, GLOB_NOCHECK, GLOB_QUOTE, GLOB_TILDE, and GLOB_LIMIT])
|
2000-01-09 21:58:00 +01:00
|
|
|
fi
|
|
|
|
if test "$ac_cv_func_glob_working" = yes; then
|
|
|
|
AC_NEED_PROTO([#include <stdio.h>
|
|
|
|
#include <glob.h>],glob)
|
|
|
|
fi
|
|
|
|
])
|