Skip to content

Commit

Permalink
Use AC_SEARCH_LIBS
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenk authored and pieterlexis committed Jan 19, 2016
1 parent cb38288 commit edfa60a
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions configure.ac
Expand Up @@ -41,17 +41,9 @@ AS_IF([test "x$enable_hardening" != "xno"], [
AC_LD_RELRO AC_LD_RELRO
]) ])


AC_CHECK_FUNC([socket], [], [ AC_SEARCH_LIBS([socket], [socket])
AC_CHECK_LIB([socket], [socket], [LIBS="-lsocket $LIBS"]) AC_SEARCH_LIBS([gethostent], [nsl])
]) AC_SEARCH_LIBS([inet_aton], [resolv])

AC_CHECK_FUNC([gethostent], [], [
AC_CHECK_LIB([nsl], [gethostent], [LIBS="-lnsl $LIBS"])
])

AC_CHECK_FUNC([inet_aton], [], [
AC_CHECK_LIB([resolv], [inet_aton], [LIBS="-lresolv $LIBS"])
])


m4_ifndef([LT_INIT],[ m4_ifndef([LT_INIT],[
AC_PROG_LIBTOOL([disable-static]) AC_PROG_LIBTOOL([disable-static])
Expand Down

0 comments on commit edfa60a

Please sign in to comment.