From 123ace95d32271900674b83872abbaad5024a885 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Mon, 7 Jan 2008 16:27:31 +0100 Subject: [PATCH] Fix configure on Solaris. Without this patch, configure fails on Solaris because it doesn't find inet_ntoa() and socket(). These are in libnsl and libsocket respectively, but AC_CHECK_FUNCS() doesn't know this. --- configure.ac | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 32dfd90c..8e9ca7d0 100644 --- a/configure.ac +++ b/configure.ac @@ -77,8 +77,7 @@ AC_FUNC_LSTAT AC_CHECK_FUNCS([atexit dup2 memchr memmove memset \ regcomp select strchr strdup strerror strstr strtol uname \ fchdir gettimeofday localtime_r munmap strcasecmp strcspn \ - strncasecmp strrchr strspn alarm inet_ntoa mkdir \ - rmdir socket], [], + strncasecmp strrchr strspn alarm mkdir rmdir], [], [AC_MSG_ERROR([function not found, cannot live without it])]) all_errlist_objs="server mp3_afh afh_common vss command net string signal time @@ -194,7 +193,11 @@ AC_CHECK_LIB([c], [socket], server_ldflags="$server_ldflags $socket_lib" client_ldflags="$client_ldflags $socket_lib" audioc_ldflags="$audioc_ldflags $socket_lib" +audiod_ldflags="$audiod_ldflags $socket_lib" recv_ldflags="$recv_ldflags $socket_lib" +AC_SEARCH_LIBS([connect],[socket],[],[ + AC_MSG_ERROR([Fatal: Did not find connect().]) +],[]) ########################################################################### libnsl AC_CHECK_LIB([c], [gethostbyname], [nsl_lib=], @@ -204,6 +207,9 @@ server_ldflags="$server_ldflags $nsl_lib" client_ldflags="$client_ldflags $nsl_lib" audioc_ldflags="$audioc_ldflags $nsl_lib" recv_ldflags="$recv_ldflags $nsl_lib" +AC_SEARCH_LIBS([inet_ntoa],[nsl],[],[ + AC_MSG_ERROR([Fatal: Did not find inet_ntoa().]) +],[]) ########################################################################### ucred AC_MSG_CHECKING(for struct ucred) AC_TRY_LINK([ -- 2.39.5