From e732e12279c99d0c8ec60b3ab7bfbcc552e3bee6 Mon Sep 17 00:00:00 2001 From: Ben Collins Date: Mon, 15 Mar 1999 00:18:49 +0000 Subject: [PATCH] configure.in now includes OL_DECL_STRDUP, configure and portable.h.in rebuilt to reflect it. --- configure | 37 +++++++++++++++++++++++++++++++++++++ configure.in | 4 ++++ include/portable.h.in | 5 ++++- 3 files changed, 45 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 9bbe140a4f..5613970ab6 100755 --- a/configure +++ b/configure @@ -10089,6 +10089,43 @@ fi +echo $ac_n "checking strdup decleration""... $ac_c" 1>&6 +echo "configure:10094: checking strdup decleration" >&5 +if eval "test \"`echo '$''{'ol_cv_dcl_strdup'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cat > conftest.$ac_ext < +int main() { +extern char *strdup() +; return 0; } +EOF +if { (eval echo configure:10108: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ol_cv_dcl_strdup=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ol_cv_dcl_strdup=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ol_cv_dcl_strdup" 1>&6 +if test $ol_cv_dcl_strdup = yes ; then + cat >> confdefs.h <<\EOF +#define DECL_STRDUP 1 +EOF + +fi + + + if test "$ol_enable_debug" != no ; then cat >> confdefs.h <<\EOF #define LDAP_DEBUG 1 diff --git a/configure.in b/configure.in index 219d7c8327..38ad26b0d7 100644 --- a/configure.in +++ b/configure.in @@ -1671,6 +1671,10 @@ dnl ---------------------------------------------------------------- # Check Configuration OL_SYS_ERRLIST +dnl ---------------------------------------------------------------- +dnl Check our declaration of strdup() +OL_DECL_STRDUP + dnl ---------------------------------------------------------------- dnl Sort out defines diff --git a/include/portable.h.in b/include/portable.h.in index 43a0c5ae7d..90a92f1e16 100644 --- a/include/portable.h.in +++ b/include/portable.h.in @@ -663,12 +663,15 @@ /* define if cross compiling */ #undef CROSS_COMPILING -/* define if sys_errlist is declared in stdio.h or errno.h */ +/* define if sys_errlist is not declared in stdio.h or errno.h */ #undef DECL_SYS_ERRLIST /* define if you actually have sys_errlist in your libs */ #undef HAVE_SYS_ERRLIST +/* define if you have strdup() but it's not declared */ +#undef DECL_STRDUP + /* begin of postamble */ #ifdef HAVE_STDDEF_H -- 2.39.5