1dnl Id
2dnl
3dnl check for glob(3)
4dnl
5AC_DEFUN([AC_BROKEN_GLOB],[
6AC_CACHE_CHECK(for working glob, ac_cv_func_glob_working,
7ac_cv_func_glob_working=yes
8AC_LINK_IFELSE([AC_LANG_PROGRAM([[
9#include <stdio.h>
10#include <glob.h>]],[[
11glob(NULL, GLOB_BRACE|GLOB_NOCHECK|GLOB_QUOTE|GLOB_TILDE|
12#ifdef GLOB_MAXPATH
13GLOB_MAXPATH
14#else
15GLOB_LIMIT
16#endif
17,
18NULL, NULL);
19]])],[:],[ac_cv_func_glob_working=no]))
20
21if test "$ac_cv_func_glob_working" = yes; then
22	AC_DEFINE(HAVE_GLOB, 1, [define if you have a glob() that groks
23	GLOB_BRACE, GLOB_NOCHECK, GLOB_QUOTE, GLOB_TILDE, and GLOB_LIMIT])
24fi
25if test "$ac_cv_func_glob_working" = yes; then
26AC_NEED_PROTO([#include <stdio.h>
27#include <glob.h>],glob)
28fi
29])
30