summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in60
1 files changed, 7 insertions, 53 deletions
diff --git a/configure.in b/configure.in
index 23045a2..d8b4622 100644
--- a/configure.in
+++ b/configure.in
@@ -69,48 +69,8 @@ dnl <sys/socket.h> isn't among the list of standard headers that
dnl autoconf checks, but POSIX requires <sys/socket.h> for socklen_t
dnl to be defined.
dnl
-AC_CHECK_TYPES(socklen_t,,,
-[
-#include <stdio.h>
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-#if STDC_HEADERS
-# include <stdlib.h>
-# include <stddef.h>
-#else
-# if HAVE_STDLIB_H
-# include <stdlib.h>
-# endif
-#endif
-#if HAVE_STRING_H
-# if !STDC_HEADERS && HAVE_MEMORY_H
-# include <memory.h>
-# endif
-# include <string.h>
-#endif
-#if HAVE_STRINGS_H
-# include <strings.h>
-#endif
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-# include <stdint.h>
-# endif
-#endif
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-# include <sys/socket.h>
-#endif
-])
-
-AC_SEARCH_LIBS(socket, [socket ws2_32 wsock32], ,
+AC_CHECK_TYPES(socklen_t,,,[#include "xconfig.h"])
+PA_SEARCH_LIBS(socket, [(0,0,0)], [socket ws2_32 wsock32], ,
[AC_MSG_ERROR(socket library not found)])
AC_CHECK_FUNCS(fcntl)
@@ -127,19 +87,13 @@ dnl
SRCROOT=`cd $srcdir && pwd`
OBJROOT=`pwd`
-PA_SEARCH_LIBS_AND_ADD(getopt_long, [getopt cygwin iberty], getopt_long)
-PA_SEARCH_LIBS_AND_ADD(getaddrinfo, [nsl resolv])
+PA_SEARCH_LIBS_AND_ADD(getopt_long, [(0, NULL, NULL, NULL, NULL)],
+ [getopt cygwin iberty], getopt_long)
+PA_SEARCH_LIBS_AND_ADD(getaddrinfo, [(NULL, NULL, NULL, NULL)], [nsl resolv])
if $pa_add_getaddrinfo
then
- AC_SEARCH_LIBS(gethostbyname, [nsl resolv],
- [AC_SEARCH_LIBS(herror, [nsl resolv], ,
- [AC_MSG_ERROR(herror not found)])],
- [AC_MSG_ERROR(gethostbyname not found)])
-else
- AC_SEARCH_LIBS(freeaddrinfo, [nsl resolv], ,
- [AC_MSG_ERROR(getaddrinfo but not freeaddrinfo found)])
- AC_SEARCH_LIBS(gai_strerror, [nsl resolv], ,
- [AC_MSG_ERROR(getaddrinfo but not gai_strerror found)])
+ PA_SEARCH_LIBS(gethostbyname, [(NULL)], [nsl resolv], ,
+ [AC_MSG_ERROR(gethostbyname not found)])
fi
AC_CHECK_FUNCS(daemon)