summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Baulig <martin@home-of-linux.org>1998-08-06 22:53:45 +0000
committerMartin Baulig <martin@src.gnome.org>1998-08-06 22:53:45 +0000
commit20016762a6baf10897840669e7ca3d4233e5ea8b (patch)
tree2fdc64477b21838c1113820466ce837a1e3dd8e0
parent0a7bd78704a521b2ce575723b05ee379f75ba9ee (diff)
downloadlibgtop-20016762a6baf10897840669e7ca3d4233e5ea8b.tar.gz
New checks.
1998-08-06 Martin Baulig <martin@home-of-linux.org> * configure.in (HAVE_SOCKETS, HAVE_SOCKADDR_SUN_LEN): New checks.
-rw-r--r--ChangeLog2
-rw-r--r--acconfig.h3
-rw-r--r--configure.in15
3 files changed, 20 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 8b59385a..ee790463 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
1998-08-06 Martin Baulig <martin@home-of-linux.org>
+ * 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 <sys/types.h>
+#include <sys/socket.h>
+#include <sys/un.h>
+ ],
+ [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