/* Define to 1 if you have the `gmp2' library (-lgmp2). */
#undef HAVE_LIBGMP2
-/* Define to 1 if you have the `nsl' library (-lnsl). */
-#undef HAVE_LIBNSL
-
/* Define to 1 if you have the `socket' library (-lsocket). */
#undef HAVE_LIBSOCKET
if test "$ac_cv_lib_fl_yywrap" != yes; then
as_fn_error $? "A compatible libfl is required" "$LINENO" 5
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_ntoa in -lnsl" >&5
+
+
+ ac_fn_c_check_func "$LINENO" "inet_ntoa" "ac_cv_func_inet_ntoa"
+if test "x$ac_cv_func_inet_ntoa" = xyes; then :
+
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_ntoa in -lnsl" >&5
$as_echo_n "checking for inet_ntoa in -lnsl... " >&6; }
if ${ac_cv_lib_nsl_inet_ntoa+:} false; then :
$as_echo_n "(cached) " >&6
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_inet_ntoa" >&5
$as_echo "$ac_cv_lib_nsl_inet_ntoa" >&6; }
if test "x$ac_cv_lib_nsl_inet_ntoa" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBNSL 1
-_ACEOF
- LIBS="-lnsl $LIBS"
+ LIBS="-lnsl $LIBS";
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: inet_ntoa is in libnsl, urgh. Must use -lnsl." >&5
+$as_echo "$as_me: WARNING: inet_ntoa is in libnsl, urgh. Must use -lnsl." >&2;}
+
+else
+
+ as_fn_error $? "cannot find library function inet_ntoa" "$LINENO" 5
fi
+
+fi
+
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
$as_echo_n "checking for socket in -lsocket... " >&6; }
if ${ac_cv_lib_socket_socket+:} false; then :
if test "$ac_cv_lib_fl_yywrap" != yes; then
AC_MSG_ERROR([A compatible libfl is required])
fi
-AC_CHECK_LIB(nsl,inet_ntoa)
+SECNET_C_GETFUNC(inet_ntoa,nsl)
AC_CHECK_LIB(socket,socket)
SECNET_C_GETFUNC(inet_aton,resolv)
AC_CHECK_LIB(adns,adns_init)
* Fix check for <linux/if_tun.h>.
* debian/rules: Support dpkg-buildflags.
* Build system: Use -lresolv only if inet_aton is not found otherwise.
+ * Build system: Use -lnsl only if inet_ntoa is not found otherwise.
Copyright updates:
* Update to GPLv3. Add missing copyright notices and credits.