From 171e0c27e477ff1e6cd9d50ce9751c3c0044b380 Mon Sep 17 00:00:00 2001 From: "Marc G. Fournier" Date: Sun, 9 Feb 1997 03:33:38 +0000 Subject: [PATCH] Changes to configure/config.h.in to check for: sigprocmask, setsid and waitpid Especially for nextstep systems Awaiting for a context diff from Gregor to complete changes for the nextstep port --- src/configure | 91 +++++++++++++++++++++++++++++++++-------- src/configure.in | 1 + src/include/config.h.in | 9 ++++ 3 files changed, 83 insertions(+), 18 deletions(-) diff --git a/src/configure b/src/configure index 639943dab2..e0b8f933e9 100755 --- a/src/configure +++ b/src/configure @@ -2950,13 +2950,68 @@ else fi done +for ac_func in sigprocmask waitpid setsid +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:2957: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:2985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + echo $ac_n "checking for inet_aton""... $ac_c" 1>&6 -echo "configure:2955: checking for inet_aton" >&5 +echo "configure:3010: checking for inet_aton" >&5 if eval "test \"`echo '$''{'ac_cv_func_inet_aton'+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:3038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_inet_aton=yes" else @@ -3003,12 +3058,12 @@ INET_ATON='inet_aton.o' fi echo $ac_n "checking for strdup""... $ac_c" 1>&6 -echo "configure:3007: checking for strdup" >&5 +echo "configure:3062: checking for strdup" >&5 if eval "test \"`echo '$''{'ac_cv_func_strdup'+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:3090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_strdup=yes" else @@ -3053,12 +3108,12 @@ fi echo $ac_n "checking for cbrt""... $ac_c" 1>&6 -echo "configure:3057: checking for cbrt" >&5 +echo "configure:3112: 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:3140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_cbrt=yes" else @@ -3102,7 +3157,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for cbrt in -lm""... $ac_c" 1>&6 -echo "configure:3106: checking for cbrt in -lm" >&5 +echo "configure:3161: 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 @@ -3110,7 +3165,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:3180: \"$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 @@ -3147,12 +3202,12 @@ fi fi echo $ac_n "checking for rint""... $ac_c" 1>&6 -echo "configure:3151: checking for rint" >&5 +echo "configure:3206: 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:3234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_rint=yes" else @@ -3196,7 +3251,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for rint in -lm""... $ac_c" 1>&6 -echo "configure:3200: checking for rint in -lm" >&5 +echo "configure:3255: 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 @@ -3204,7 +3259,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:3274: \"$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 8d69019a71..67fafdeb2a 100644 --- a/src/configure.in +++ b/src/configure.in @@ -155,6 +155,7 @@ AC_FUNC_MEMCMP AC_TYPE_SIGNAL 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_SUBST(INET_ATON) diff --git a/src/include/config.h.in b/src/include/config.h.in index add6142b97..0c4553a8a8 100644 --- a/src/include/config.h.in +++ b/src/include/config.h.in @@ -71,6 +71,15 @@ /* Set to 1 if you have getrusage() */ #undef HAVE_GETRUSAGE +/* Set to 1 if you have waitpid() */ +#undef HAVE_WAITPID + +/* Set to 1 if you have setsid() */ +#undef HAVE_SETSID + +/* Set to 1 if you have sigprocmask() */ +#undef HAVE_SIGPROCMASK + /* Set to 1 if you have libreadline.a */ #undef HAVE_LIBREADLINE