summary refs log tree commit diff
path: root/configure.ac
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2007-10-20 18:26:23 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2007-10-20 18:26:23 +0800
commita20ba85f697867e6f1d6f73bba80107af82902a8 (patch)
treed0164853008ad555636eb1ed4633d5be839cd8ff /configure.ac
parent[SHELL] Replace shared illnum message by badnum function. (diff)
downloaddash-a20ba85f697867e6f1d6f73bba80107af82902a8.tar.gz
dash-a20ba85f697867e6f1d6f73bba80107af82902a8.zip
[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.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac13
1 files changed, 13 insertions, 0 deletions
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
>June McEnroe 2018-02-04Tweak colorscheme moreJune McEnroe 2018-02-04Color MatchParen DarkYellowJune McEnroe 2018-02-04Add palette sampling to gfxxJune McEnroe 2018-02-04Add 4-bit RGB to gfxxJune McEnroe 2018-02-04Add Quit menu item to gfcocoaJune McEnroe 2018-02-04Switch back to sane Objective-C styleJune McEnroe 2018-02-04Quit gfcocoa when window closesJune McEnroe 2018-02-03Apparently this is how people write Objective-CJune McEnroe