Skip to content

Commit

Permalink
configure: restrict nsl lib to where it's actually needed
Browse files Browse the repository at this point in the history
  • Loading branch information
wferi committed Dec 12, 2016
1 parent 1a9b412 commit 8fad8ac
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,10 @@ AX_SAVE_FLAGS
AC_SEARCH_LIBS([socket], [socket],,[AC_MSG_ERROR([cannot find socket() function])])
AC_SUBST([socket_LIBS],[$LIBS])
AX_RESTORE_FLAGS
AC_SEARCH_LIBS([gethostbyname], [nsl])
AX_SAVE_FLAGS
AC_SEARCH_LIBS([gethostbyname], [nsl],,[AC_MSG_ERROR([cannot find gethostbyname() function])])
AC_SUBST([nsl_LIBS],[$LIBS])
AX_RESTORE_FLAGS

# look for testing harness "check"
PKG_CHECK_MODULES([CHECK], [check >= 0.9.4],[with_check=yes],[with_check=no])
Expand Down
2 changes: 1 addition & 1 deletion examples/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ simplelog_LDADD = $(top_builddir)/lib/libqb.la

tcpclient_SOURCES = tcpclient.c $(top_builddir)/include/qb/qbloop.h
tcpclient_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include
tcpclient_LDADD = $(top_builddir)/lib/libqb.la $(socket_LIBS)
tcpclient_LDADD = $(top_builddir)/lib/libqb.la $(socket_LIBS) $(nsl_LIBS)

tcpserver_SOURCES = tcpserver.c $(top_builddir)/include/qb/qbloop.h
tcpserver_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include
Expand Down

0 comments on commit 8fad8ac

Please sign in to comment.