* Fix network configure check thanks to scottmc suggestion.

I don't need to put the check into a case since AC_SEARCH_LIBS would do a search for socket and network and ignore the ones it doesn't find.
This commit is contained in:
Pier Luigi Fiorini
2009-09-13 09:00:10 +00:00
parent ce451711f6
commit 3b2977fdc9

View File

@@ -114,8 +114,8 @@ diff --exclude configure -ur cups-1.4.1.orig/config-scripts/cups-common.m4 cups-
AC_ARG_ENABLE(mallinfo, [ --enable-mallinfo build with malloc debug logging])
diff --exclude configure -ur cups-1.4.1.orig/config-scripts/cups-network.m4 cups-1.4.1/config-scripts/cups-network.m4
--- cups-1.4.1.orig/config-scripts/cups-network.m4 2008-09-08 22:03:01.000000000 +0000
+++ cups-1.4.1/config-scripts/cups-network.m4 2009-09-13 10:21:57.000000000 +0000
@@ -14,10 +14,17 @@
+++ cups-1.4.1/config-scripts/cups-network.m4 2009-09-13 10:58:52.000000000 +0000
@@ -14,10 +14,10 @@
dnl
AC_CHECK_HEADER(resolv.h,AC_DEFINE(HAVE_RESOLV_H))
@@ -123,21 +123,14 @@ diff --exclude configure -ur cups-1.4.1.orig/config-scripts/cups-network.m4 cups
-AC_SEARCH_LIBS(gethostbyaddr, nsl)
-AC_SEARCH_LIBS(getifaddrs, nsl, AC_DEFINE(HAVE_GETIFADDRS))
-AC_SEARCH_LIBS(hstrerror, nsl socket resolv, AC_DEFINE(HAVE_HSTRERROR))
+if test "$uname" = "Haiku"; then
+ AC_SEARCH_LIBS(socket, network socket)
+ AC_SEARCH_LIBS(gethostbyaddr, network nsl)
+ AC_SEARCH_LIBS(getifaddrs, nsl network, AC_DEFINE(HAVE_GETIFADDRS))
+ AC_SEARCH_LIBS(hstrerror, nsl socket resolv network, AC_DEFINE(HAVE_HSTRERROR))
+else
+ AC_SEARCH_LIBS(socket, socket)
+ AC_SEARCH_LIBS(gethostbyaddr, nsl)
+ AC_SEARCH_LIBS(getifaddrs, nsl, AC_DEFINE(HAVE_GETIFADDRS))
+ AC_SEARCH_LIBS(hstrerror, nsl socket resolv, AC_DEFINE(HAVE_HSTRERROR))
+fi
+AC_SEARCH_LIBS(socket, network socket)
+AC_SEARCH_LIBS(gethostbyaddr, network nsl)
+AC_SEARCH_LIBS(getifaddrs, nsl network, AC_DEFINE(HAVE_GETIFADDRS))
+AC_SEARCH_LIBS(hstrerror, nsl socket resolv network, AC_DEFINE(HAVE_HSTRERROR))
AC_SEARCH_LIBS(rresvport_af, nsl, AC_DEFINE(HAVE_RRESVPORT_AF))
AC_SEARCH_LIBS(__res_init, resolv bind, AC_DEFINE(HAVE_RES_INIT),
AC_SEARCH_LIBS(res_9_init, resolv bind, AC_DEFINE(HAVE_RES_INIT),
@@ -25,7 +32,7 @@
@@ -25,7 +25,7 @@
# Tru64 5.1b leaks file descriptors with these functions; disable until
# we can come up with a test for this...