diff options
| author | Alexander Barton <alex@barton.de> | 2012-09-13 16:40:04 +0200 |
|---|---|---|
| committer | Alexander Barton <alex@barton.de> | 2012-09-13 16:40:04 +0200 |
| commit | ebf2f991b58372e01e018e0f769762b85360ed3e (patch) | |
| tree | ae3766fb32d40a73260d05a584ea592225741a35 /configure.in | |
| parent | a451cb22f1906de2c0ed354b1e79eaae654b3abd (diff) | |
| download | ngircd-ebf2f991b58372e01e018e0f769762b85360ed3e.tar.gz ngircd-ebf2f991b58372e01e018e0f769762b85360ed3e.zip | |
configure.in: use AC_SEARCH_LIBS (not AC_CHECK_LIB)
Use the AC_SEARCH_LIBS macro to test for "sometimes but not always" required libraries, not AC_CHECK_LIB.
Diffstat (limited to 'configure.in')
| -rw-r--r-- | configure.in | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/configure.in b/configure.in index 5be4a541..468e927b 100644 --- a/configure.in +++ b/configure.in @@ -147,11 +147,18 @@ AC_CHECK_MEMBER([struct sockaddr_in.sin_len], AC_DEFINE(HAVE_sockaddr_in_len),, # -- Libraries -- -# A/UX needs this. -AC_CHECK_LIB(UTIL,memmove) -# needed on solaris. GNU libc also has a libnsl, but we do not need it. -AC_SEARCH_LIBS(gethostbyname,nsl) -AC_CHECK_LIB(socket,bind) +# memmove: A/UX libUTIL +AC_SEARCH_LIBS([memmove], [UTIL], [], [ + AC_MSG_ERROR([unable to find the memmove() function]) +]) +# gethostbyname: Solaris libnsl +AC_SEARCH_LIBS([gethostbyname], [nsl], [], [ + AC_MSG_ERROR([unable to find the gethostbyname() function]) +]) +# bind: SVR4 libsocket +AC_SEARCH_LIBS([bind], [socket], [], [ + AC_MSG_ERROR([unable to find the bind() function]) +]) # -- Functions -- @@ -187,15 +194,12 @@ AC_ARG_WITH(syslog, CPPFLAGS="-I$withval/include $CPPFLAGS" LDFLAGS="-L$withval/lib $LDFLAGS" fi - AC_CHECK_LIB(be, syslog) - AC_CHECK_FUNCS(syslog, x_syslog_on=yes, + AC_SEARCH_LIBS([syslog], [be], [x_syslog_on=yes], [ AC_MSG_ERROR([Can't enable syslog!]) - ) + ]) fi ], - [ - AC_CHECK_LIB(be, syslog) - AC_CHECK_FUNCS(syslog, x_syslog_on=yes) + [ AC_SEARCH_LIBS([syslog], [be], [x_syslog_on=yes]) ] ) if test "$x_syslog_on" = "yes"; then |