From e1e27edd475ec48b3452495a644290a32f510c3b Mon Sep 17 00:00:00 2001 From: Lubomir Sedlacik Date: Wed, 9 Jun 2004 08:16:23 +0000 Subject: [PATCH] Really define the need for getopt_long() and regex.h. Should fix builds on (at least) Darwin/Mac OS X. --- acconfig.h.pre | 6 +++++- configure.in.pre | 15 +++++++++++++-- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/acconfig.h.pre b/acconfig.h.pre index ca82e2c5..711975f5 100644 --- a/acconfig.h.pre +++ b/acconfig.h.pre @@ -41,7 +41,10 @@ #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 diff --git a/configure.in.pre b/configure.in.pre index b23194a8..b463546d 100644 --- a/configure.in.pre +++ b/configure.in.pre @@ -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) ## -- 2.24.0