Really define the need for getopt_long() and regex.h.
authorLubomir Sedlacik <salo@silcnet.org>
Wed, 9 Jun 2004 08:16:23 +0000 (08:16 +0000)
committerLubomir Sedlacik <salo@silcnet.org>
Wed, 9 Jun 2004 08:16:23 +0000 (08:16 +0000)
Should fix builds on (at least) Darwin/Mac OS X.

acconfig.h.pre
configure.in.pre

index ca82e2c58afa21b282d4e1cb8b54cfcff18916c1..711975f50ddba1f852d698a9b14e2071829d0a27 100644 (file)
 #undef SILC_MP_GMP
 #undef SILC_MP_NSS_MPI
 
-/* Redefs for SOCKS5 library */
+/* contrib library functions */
+#undef HAVE_REGEX
+#undef HAVE_GETOPT_LONG
+
 /* macros/curses checks */
 #undef HAS_CURSES
 #undef USE_SUNOS_CURSES
@@ -51,6 +54,7 @@
 #undef NO_COLOR_CURSES
 #undef SCO_FLAVOR
 
+/* Redefs for SOCKS5 library */
 #undef SOCKS
 #undef SOCKS5
 #undef Rconnect
index b23194a80353a3f95d7734a1c729d05f92597211..b463546dbdb7a7da658cf7fc170c79a6564ff365 100644 (file)
@@ -196,9 +196,20 @@ fi
 
 # lib/contrib conditionals
 #
-AC_CHECK_HEADER(regex.h, have_regex=1, have_regex=0)
+AC_CHECK_HEADER(regex.h,
+  [
+    AC_DEFINE(HAVE_REGEX)
+    have_regex=1
+  ], have_regex=0
+)
 AM_CONDITIONAL(HAVE_REGEX, test x$have_regex = x1)
-AC_CHECK_FUNC(getopt_long, have_getopt_long=1, have_getopt_long=0)
+
+AC_CHECK_FUNC(getopt_long,
+  [
+    AC_DEFINE(HAVE_GETOPT_LONG)
+    have_getopt_long=1
+  ], have_getopt_long=0
+)
 AM_CONDITIONAL(HAVE_GETOPT_LONG, test x$have_getopt_long = x1)
 
 ##