From 7c0876aa42e6abaa8779bcb83962ccf20a9f4da3 Mon Sep 17 00:00:00 2001 From: Bob Halley Date: Tue, 2 Feb 1999 01:17:05 +0000 Subject: [PATCH] initial HP-UX support --- configure | 100 +++++++++++++++++++++++++++++++++++++++------------ configure.in | 9 ++++- 2 files changed, 86 insertions(+), 23 deletions(-) diff --git a/configure b/configure index 4750d6d820..feae23ee53 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh -# From configure.in Revision: 1.12 +# From configure.in Revision: 1.13 # Guess values for system-dependent variables and create Makefiles. # Generated automatically using autoconf version 2.12 @@ -1207,6 +1207,53 @@ fi rm -f conftest* LIBS="$ac_save_LIBS" +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo pthread | sed -e 's/^a-zA-Z0-9_/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 +fi + + echo $ac_n "checking for __pthread_create_system in -lpthread""... $ac_c" 1>&6 +echo "configure:1227: checking for __pthread_create_system in -lpthread" >&5 +ac_lib_var=`echo pthread'_'__pthread_create_system | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lpthread $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 @@ -1226,7 +1273,7 @@ fi fi echo $ac_n "checking for socket in -lxnet""... $ac_c" 1>&6 -echo "configure:1230: checking for socket in -lxnet" >&5 +echo "configure:1277: checking for socket in -lxnet" >&5 ac_lib_var=`echo xnet'_'socket | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1234,7 +1281,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lxnet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1296: \"$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 @@ -1271,7 +1318,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 -echo "configure:1275: checking for socket in -lsocket" >&5 +echo "configure:1322: checking for socket in -lsocket" >&5 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1279,7 +1326,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1341: \"$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 @@ -1318,7 +1365,7 @@ else fi echo $ac_n "checking for inet_ntoa in -lnsl""... $ac_c" 1>&6 -echo "configure:1322: checking for inet_ntoa in -lnsl" >&5 +echo "configure:1369: checking for inet_ntoa in -lnsl" >&5 ac_lib_var=`echo nsl'_'inet_ntoa | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1326,7 +1373,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1388: \"$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 @@ -1369,12 +1416,12 @@ fi echo $ac_n "checking for inet_ntop""... $ac_c" 1>&6 -echo "configure:1373: checking for inet_ntop" >&5 +echo "configure:1420: checking for inet_ntop" >&5 if eval "test \"`echo '$''{'ac_cv_func_inet_ntop'+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:1448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_inet_ntop=yes" else @@ -1424,12 +1471,12 @@ EOF fi echo $ac_n "checking for inet_pton""... $ac_c" 1>&6 -echo "configure:1428: checking for inet_pton" >&5 +echo "configure:1475: checking for inet_pton" >&5 if eval "test \"`echo '$''{'ac_cv_func_inet_pton'+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:1503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_inet_pton=yes" else @@ -1479,12 +1526,12 @@ EOF fi echo $ac_n "checking for inet_aton""... $ac_c" 1>&6 -echo "configure:1483: checking for inet_aton" >&5 +echo "configure:1530: 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:1558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_inet_aton=yes" else @@ -1535,7 +1582,7 @@ fi echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:1539: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:1586: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1564,7 +1611,7 @@ fi # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1568: checking for $ac_word" >&5 +echo "configure:1615: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1601,7 +1648,7 @@ fi # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:1605: checking for a BSD compatible install" >&5 +echo "configure:1652: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1674,12 +1721,21 @@ else *-sun-solaris*) CC="$CC -mt" ;; + *-hp-hpux*) + CC="$CC" + ;; esac fi case "$host" in *-sun-solaris*) cat >> confdefs.h <<\EOF #define NEED_AF_INET6 1 +EOF + + ;; + *-hp-hpux*) + cat >> confdefs.h <<\EOF +#define NEED_AF_INET6 1 EOF ;; diff --git a/configure.in b/configure.in index c22bd48df0..4797bcb8ce 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,5 @@ -AC_REVISION($Revision: 1.12 $) +AC_REVISION($Revision: 1.13 $) AC_INIT(lib/dns/name.c) AC_CONFIG_HEADER(config.h) @@ -18,6 +18,7 @@ AC_HEADER_TIME AC_CHECK_LIB(pthread, pthread_create,, AC_CHECK_LIB(pthread, __pthread_create) + AC_CHECK_LIB(pthread, __pthread_create_system) ) AC_CHECK_LIB(xnet, socket,, AC_CHECK_LIB(socket, socket) @@ -67,12 +68,18 @@ else *-sun-solaris*) CC="$CC -mt" ;; + *-hp-hpux*) + CC="$CC" + ;; esac fi case "$host" in *-sun-solaris*) AC_DEFINE(NEED_AF_INET6) ;; + *-hp-hpux*) + AC_DEFINE(NEED_AF_INET6) + ;; esac AC_SUBST_FILE(BIND9_MAKE_RULES)