summaryrefslogtreecommitdiffstats
path: root/contrib/libpcap/aclocal.m4
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/libpcap/aclocal.m4')
-rw-r--r--contrib/libpcap/aclocal.m437
1 files changed, 20 insertions, 17 deletions
diff --git a/contrib/libpcap/aclocal.m4 b/contrib/libpcap/aclocal.m4
index f366afd..3c26c71 100644
--- a/contrib/libpcap/aclocal.m4
+++ b/contrib/libpcap/aclocal.m4
@@ -1,4 +1,4 @@
-dnl @(#) $Header: /tcpdump/master/libpcap/aclocal.m4,v 1.81.2.2 2003/11/16 09:45:51 guy Exp $ (LBL)
+dnl @(#) $Header: /tcpdump/master/libpcap/aclocal.m4,v 1.85 2005/03/27 03:27:09 guy Exp $ (LBL)
dnl
dnl Copyright (c) 1995, 1996, 1997, 1998
dnl The Regents of the University of California. All rights reserved.
@@ -166,8 +166,13 @@ AC_DEFUN(AC_LBL_C_INIT,
# at least some versions of HP's C compiler can inline that, but can't
# inline a function that returns a struct pointer.
#
+# Make sure we use the V_CCOPT flags, because some of those might
+# disable inlining.
+#
AC_DEFUN(AC_LBL_C_INLINE,
[AC_MSG_CHECKING(for inline)
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$V_CCOPT"
AC_CACHE_VAL(ac_cv_lbl_inline, [
ac_cv_lbl_inline=""
ac_lbl_cc_inline=no
@@ -195,6 +200,7 @@ AC_DEFUN(AC_LBL_C_INLINE,
if test "$ac_lbl_cc_inline" = yes ; then
ac_cv_lbl_inline=$ac_lbl_inline
fi])
+ CFLAGS="$save_CFLAGS"
if test ! -z "$ac_cv_lbl_inline" ; then
AC_MSG_RESULT($ac_cv_lbl_inline)
else
@@ -822,23 +828,20 @@ dnl
AC_DEFUN(AC_LBL_LIBRARY_NET, [
# Most operating systems have gethostbyname() in the default searched
# libraries (i.e. libc):
- AC_CHECK_FUNC(gethostbyname, ,
- # Some OSes (eg. Solaris) place it in libnsl:
- AC_LBL_CHECK_LIB(nsl, gethostbyname, ,
- # Some strange OSes (SINIX) have it in libsocket:
- AC_LBL_CHECK_LIB(socket, gethostbyname, ,
- # Unfortunately libsocket sometimes depends on libnsl.
- # AC_CHECK_LIB's API is essentially broken so the
- # following ugliness is necessary:
- AC_LBL_CHECK_LIB(socket, gethostbyname,
- LIBS="-lsocket -lnsl $LIBS",
- AC_CHECK_LIB(resolv, gethostbyname),
- -lnsl))))
- AC_CHECK_FUNC(socket, , AC_CHECK_LIB(socket, socket, ,
- AC_LBL_CHECK_LIB(socket, socket, LIBS="-lsocket -lnsl $LIBS", ,
- -lnsl)))
+ # Some OSes (eg. Solaris) place it in libnsl
+ # Some strange OSes (SINIX) have it in libsocket:
+ AC_SEARCH_LIBS(gethostbyname, nsl socket resolv)
+ # Unfortunately libsocket sometimes depends on libnsl and
+ # AC_SEARCH_LIBS isn't up to the task of handling dependencies like this.
+ if test "$ac_cv_search_gethostbyname" = "no"
+ then
+ AC_CHECK_LIB(socket, gethostbyname,
+ LIBS="-lsocket -lnsl $LIBS", , -lnsl)
+ fi
+ AC_SEARCH_LIBS(socket, socket, ,
+ AC_CHECK_LIB(socket, socket, LIBS="-lsocket -lnsl $LIBS", , -lnsl))
# DLPI needs putmsg under HPUX so test for -lstr while we're at it
- AC_CHECK_LIB(str, putmsg)
+ AC_SEARCH_LIBS(putmsg, str)
])
dnl
OpenPOWER on IntegriCloud