From a20ba85f697867e6f1d6f73bba80107af82902a8 Mon Sep 17 00:00:00 2001 From: Herbert Xu Date: Sat, 20 Oct 2007 18:26:23 +0800 Subject: [EXPAND] Added configure --enable-glob and --enable-fnmatch options Debian's libc6 as of 2.6.1-6 has working glob(3)/fnmatch(3) support. This patch adds the options --enable-glob and --enable-fnmatch to the configure script. By default glob(3) and fnmatch(3) are still unused. However, on distros where the glibc is known to work you may enable these options. --- configure.ac | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 5e8f17d..ccc4ac1 100644 --- a/configure.ac +++ b/configure.ac @@ -24,6 +24,10 @@ if test "$enable_static" = "yes"; then export LDFLAGS="-static -Wl,--fatal-warnings" fi +AC_ARG_ENABLE(fnmatch, AS_HELP_STRING(--enable-fnmatch, \ + [Use fnmatch(3) from libc])) +AC_ARG_ENABLE(glob, AS_HELP_STRING(--enable-glob, [Use glob(3) from libc])) + dnl Checks for libraries. dnl Checks for header files. @@ -32,6 +36,15 @@ dnl Checks for library functions. AC_CHECK_FUNCS(bsearch getpwnam getrlimit isalpha killpg mempcpy sigsetmask \ stpcpy strchrnul strsignal strtod strtoimax strtoumax sysconf) +if test "$enable_fnmatch" = yes; then + use_fnmatch= + AC_CHECK_FUNCS(fnmatch, use_fnmatch=yes) +fi + +if test "$use_fnmatch" = yes && test "$enable_glob" = yes; then + AC_CHECK_FUNCS(glob) +fi + dnl Check for klibc signal. AC_CHECK_FUNC(signal) if test "$ac_cv_func_signal" != yes; then -- cgit 1.4.1