]> git.ipfire.org Git - thirdparty/sarg.git/commitdiff
File globbing is mandatory but can be disabled
authorFrederic Marchal <fmarchal@users.sourceforge.net>
Sat, 13 Jun 2015 14:35:48 +0000 (16:35 +0200)
committerFrederic Marchal <fmarchal@users.sourceforge.net>
Sat, 13 Jun 2015 14:35:48 +0000 (16:35 +0200)
The configure script requires glob.h to be available by default but allow
the user to disable it.

configure.ac

index 5888f2bd652f1e4fcbc0d08da4107d73c0dee893..e1585f8d2b4eca77397cb17e887eb307ab92c331 100644 (file)
@@ -151,10 +151,16 @@ AS_IF([test "x$with_pcre" != "xno"],
 # Build with file globbing
 AC_ARG_WITH([glob],
 AS_HELP_STRING([--without-glob],[Ignore wildcards in file names]),
-[with_glob=no],[with_glob=yes])
+[],[with_glob=yes])
 AS_IF([test "x$with_glob" != "xno"],
 [
-       AC_CHECK_HEADERS(glob.h)
+       AC_CHECK_HEADERS([glob.h],[],
+       [
+               AS_IF([test "x$with_glob" != "xcheck"],
+               [
+                       AC_MSG_FAILURE([glob.h not found (use --without-glob to compile without file globbing)])
+               ])
+       ])
 ],[
        glob_status="disabled"
 ])