Skip to content

Commit b978a64

Browse files
author
Sascha Schumann
committed
Check for htonl in libsocket (sol251), and move inet_aton check in libbind to configure.in, so that our later AC_CHECK_FUNCS(inet_aton) will find inet_aton in libbind (if it is there).
1 parent 6fb3b8c commit b978a64

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

configure.in

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,10 @@ AC_CHECK_LIB(nsl, gethostname, [
168168

169169
AC_CHECK_LIB(socket, socket, [
170170
AC_ADD_LIBRARY(socket)
171-
AC_DEFINE(HAVE_LIBSOCKET) ], [])
171+
AC_DEFINE(HAVE_LIBSOCKET) ], [
172+
AC_CHECK_LIB(socket, htonl, [
173+
AC_ADD_LIBRARY(socket)
174+
])])
172175

173176
AC_CHECK_LIB(nsl, gethostbyaddr, [
174177
AC_ADD_LIBRARY(nsl)
@@ -182,6 +185,10 @@ dnl The sin may be in a library which need not be specifed
182185
dnl as well as res_search resides in libsocket
183186
AC_CHECK_LIB(m, sin)
184187

188+
AC_CHECK_LIB(bind, inet_aton, [
189+
EXTRA_LIBS="$EXTRA_LIBS -lbind"
190+
AC_DEFINE(HAVE_LIBBIND) ], [])
191+
185192
AC_CHECK_LIB(resolv, inet_aton)
186193

187194
dnl The res_search may be in libsocket as well, and if it is

ext/standard/config.m4

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,6 @@ AC_CHECK_LIB(pam, pam_start, [
110110
EXTRA_LIBS="$EXTRA_LIBS -lpam"
111111
AC_DEFINE(HAVE_LIBPAM) ], [])
112112

113-
AC_CHECK_LIB(bind, inet_aton, [
114-
EXTRA_LIBS="$EXTRA_LIBS -lbind"
115-
AC_DEFINE(HAVE_LIBBIND) ], [])
116-
117113
AC_CHECK_LIB(crypt, crypt, [
118114
AC_ADD_LIBRARY(crypt)
119115
AC_DEFINE(HAVE_LIBCRYPT) ], [])

0 commit comments

Comments
 (0)