From 20016762a6baf10897840669e7ca3d4233e5ea8b Mon Sep 17 00:00:00 2001 From: Martin Baulig Date: Thu, 6 Aug 1998 22:53:45 +0000 Subject: [PATCH] New checks. 1998-08-06 Martin Baulig * configure.in (HAVE_SOCKETS, HAVE_SOCKADDR_SUN_LEN): New checks. --- ChangeLog | 2 ++ acconfig.h | 3 +++ configure.in | 15 +++++++++++++++ 3 files changed, 20 insertions(+) diff --git a/ChangeLog b/ChangeLog index 8b59385a..ee790463 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 1998-08-06 Martin Baulig + * configure.in (HAVE_SOCKETS, HAVE_SOCKADDR_SUN_LEN): New checks. + * include/glibtop/*.h: Using `GLIBTOP_GUILE' instead of `HAVE_GUILE' so one should be able to use libgtop without guile in an application even if guile is installed. diff --git a/acconfig.h b/acconfig.h index 3a9774ba..eaf29190 100644 --- a/acconfig.h +++ b/acconfig.h @@ -95,6 +95,9 @@ /* to fix a bug in autoheader on DEC OSF1. */ #undef HAVE_PROGRAM_INVOCATION_NAME +#undef HAVE_SOCKETS +#undef HAVE_SOCKADDR_SUN_LEN + #undef HAVE_LIBJPEG #undef HAVE_LIBGIF #undef HAVE_LIBTIFF diff --git a/configure.in b/configure.in index 1d03841c..d267ddde 100644 --- a/configure.in +++ b/configure.in @@ -97,6 +97,21 @@ AC_CHECK_LIB(kvm, kvm_open) dnl For DEC OSF1 AC_CHECK_LIB(mach, vm_statistics) +dnl Check for Internet sockets. +AC_CHECK_FUNC(socket, + [AC_CHECK_HEADER(netinet/in.h, + [AC_CHECK_HEADER(arpa/inet.h, [ + AC_DEFINE(HAVE_SOCKETS) + AC_MSG_CHECKING("for sun_len member in struct sockaddr_un") + AC_TRY_LINK([ +#include +#include +#include + ], + [static struct sockaddr_un x; x.sun_len = 1;], + [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SOCKADDR_SUN_LEN)], + [AC_MSG_RESULT(no)])])])]) + dnl Checks for library functions. AC_FUNC_ALLOCA AC_FUNC_MMAP