From aa7dbd0b95a167568a62ed3fc3cff00e4920a360 Mon Sep 17 00:00:00 2001 From: "Marc G. Fournier" Date: Thu, 13 Feb 1997 08:33:28 +0000 Subject: [PATCH] Had configure check for strdup, but didn't have it set HAVE_STRDUP Fixed --- src/configure | 29 ++++++++++++++++------------- src/configure.in | 2 +- src/include/config.h.in | 3 +++ 3 files changed, 20 insertions(+), 14 deletions(-) diff --git a/src/configure b/src/configure index 11de19cf68..b00d922090 100755 --- a/src/configure +++ b/src/configure @@ -3102,7 +3102,10 @@ fi if eval "test \"`echo '$ac_cv_func_'strdup`\" = yes"; then echo "$ac_t""yes" 1>&6 - STRDUP='../../utils/strdup.o' + STRDUP='../../utils/strdup.o' cat >> confdefs.h <<\EOF +#define HAVE_STRDUP 1 +EOF + else echo "$ac_t""no" 1>&6 fi @@ -3110,12 +3113,12 @@ fi echo $ac_n "checking for cbrt""... $ac_c" 1>&6 -echo "configure:3114: checking for cbrt" >&5 +echo "configure:3117: checking for cbrt" >&5 if eval "test \"`echo '$''{'ac_cv_func_cbrt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_cbrt=yes" else @@ -3159,7 +3162,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for cbrt in -lm""... $ac_c" 1>&6 -echo "configure:3163: checking for cbrt in -lm" >&5 +echo "configure:3166: checking for cbrt in -lm" >&5 ac_lib_var=`echo m'_'cbrt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3167,7 +3170,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3204,12 +3207,12 @@ fi fi echo $ac_n "checking for rint""... $ac_c" 1>&6 -echo "configure:3208: checking for rint" >&5 +echo "configure:3211: checking for rint" >&5 if eval "test \"`echo '$''{'ac_cv_func_rint'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_rint=yes" else @@ -3253,7 +3256,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for rint in -lm""... $ac_c" 1>&6 -echo "configure:3257: checking for rint in -lm" >&5 +echo "configure:3260: checking for rint in -lm" >&5 ac_lib_var=`echo m'_'rint | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3261,7 +3264,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else diff --git a/src/configure.in b/src/configure.in index 0b6fd14033..e813c96dd0 100644 --- a/src/configure.in +++ b/src/configure.in @@ -159,7 +159,7 @@ AC_FUNC_VPRINTF AC_CHECK_FUNCS(isinf tzset getrusage vfork memmove sigsetjmp kill sysconf) AC_CHECK_FUNCS(sigprocmask waitpid setsid) AC_CHECK_FUNC(inet_aton, AC_DEFINE(HAVE_INET_ATON), INET_ATON='inet_aton.o') -AC_CHECK_FUNC(strdup, STRDUP='../../utils/strdup.o') +AC_CHECK_FUNC(strdup, [STRDUP='../../utils/strdup.o' AC_DEFINE(HAVE_STRDUP)]) AC_SUBST(INET_ATON) AC_SUBST(STRDUP) AC_CHECK_FUNC(cbrt, AC_DEFINE(HAVE_CBRT), AC_CHECK_LIB(m, cbrt, AC_DEFINE(HAVE_CBRT))) diff --git a/src/include/config.h.in b/src/include/config.h.in index 525015b70d..2e1be342b1 100644 --- a/src/include/config.h.in +++ b/src/include/config.h.in @@ -80,6 +80,9 @@ /* Set to 1 if you have sigprocmask() */ #undef HAVE_SIGPROCMASK +/* Set to 1 if you have strdup() */ +#undef HAVE_STRDUP + /* Set to 1 if you have libreadline.a */ #undef HAVE_LIBREADLINE -- 2.40.0