From 96a306c764597fcdec1bc3d5a174df4799443a85 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Wed, 17 Sep 2008 02:31:05 +0000 Subject: inet_aton(), like inet_pton(), is in -lsocket in Solaris and possibly other SVR4-flavored UN*Xes; search for it the same way we search for inet_pton(). Note that, while that fixes the Solaris build, this probably still wouldn't build on a platform without inet_aton() (if any such exist), and might have problems with platforms lacking other functions (as they handle this similarly). svn path=/trunk/; revision=26221 --- configure.in | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'configure.in') diff --git a/configure.in b/configure.in index d2838b4561..b1b577acd4 100644 --- a/configure.in +++ b/configure.in @@ -1343,17 +1343,23 @@ fi AC_SUBST(MKSTEMP_C) AC_SUBST(MKSTEMP_O) -AC_CHECK_FUNC(inet_aton, - [INET_ATON_O="" - INET_ATON_LO=""], - [INET_ATON_O="inet_aton.o" - INET_ATON_LO="inet_aton.lo" -]) -if test "$ac_cv_func_inet_aton" = no ; then +# +# XXX - if inet_aton isn't found, the build fails, with a complaint from +# libtool about inet_aton.lo not being a valid libtool object. We +# probably have to handle it - and all the other replacement functions that +# get built into libwireshark - differently. +# +AC_SEARCH_LIBS(inet_aton, [socket nsl], have_inet_aton=yes, + have_inet_aton=no) +if test "$have_inet_aton" = no; then INET_ATON_C="inet_aton.c" INET_ATON_O="inet_aton.o" INET_ATON_LO="inet_aton.lo" AC_DEFINE(NEED_INET_ATON_H, 1, [Define if inet/aton.h needs to be included]) +else + INET_ATON_C="" + INET_ATON_O="" + INET_ATON_LO="" fi AC_SUBST(INET_ATON_C) AC_SUBST(INET_ATON_O) -- cgit v1.2.3