1 Detect glob_pattern_p()
3 The current popt build system tests the existence of <glob.h>, and
4 then assumes that if __GLIBC__ is defined, then glob_pattern_p() must
5 be available. Unfortunately, that's not true with uClibc: <glob.h> may
6 be installed, but not necessarily the GNU glob extensions... and
7 uClibc defines __GLIBC__. This is causing build issues with certain
8 uClibc toolchains that do not have GNU glob extensions enabled.
10 To fix this, this patch adds an AC_CHECK_FUNCS() test for
11 glob_pattern_p, and uses that to find out whether glob_pattern_p() is
14 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
17 ===================================================================
21 AC_CHECK_FUNC(setreuid, [], [
22 AC_CHECK_LIB(ucb, setreuid, [if echo $LIBS | grep -- -lucb >/dev/null ;then :; else LIBS="$LIBS -lc -lucb" USEUCB=y;fi])
24 -AC_CHECK_FUNCS(getuid geteuid iconv mtrace __secure_getenv setregid stpcpy strerror vasprintf srandom)
25 +AC_CHECK_FUNCS(getuid geteuid iconv mtrace __secure_getenv setregid stpcpy strerror vasprintf srandom glob_pattern_p)
27 AM_GNU_GETTEXT([external])
30 ===================================================================
34 /*@=declundef =exportheader =incondefs =protoparammatch =redecl =type @*/
35 #endif /* __LCLINT__ */
37 -#if !defined(__GLIBC__)
38 +#if !defined(HAVE_GLOB_PATTERN_P)
39 /* Return nonzero if PATTERN contains any metacharacters.
40 Metacharacters can be quoted with backslashes if QUOTE is nonzero. */