aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2001-05-01 02:44:52 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2001-05-01 02:44:52 +0000
commit8c84d38b45792319319f58abda8e95a63dc11e5f (patch)
tree81bb06408d9e627e3ba578ac3565e2f213a8bbff /epan
parent5f2c7a519b26e4830cf1ab747ba6fc54278d012c (diff)
Base HAVE_PLUGINS on whether "g_module_supported()" returns TRUE, not on
whether there's a "dlfcn.h" header file; that lets us support plugins on HP-UX. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@3390 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan')
-rw-r--r--epan/config.h.win325
-rw-r--r--epan/configure.in48
2 files changed, 37 insertions, 16 deletions
diff --git a/epan/config.h.win32 b/epan/config.h.win32
index bd6d85f2d5..1a875eb82f 100644
--- a/epan/config.h.win32
+++ b/epan/config.h.win32
@@ -1,4 +1,4 @@
-/* $Id: config.h.win32,v 1.6 2001/04/05 04:39:24 gram Exp $ */
+/* $Id: config.h.win32,v 1.7 2001/05/01 02:44:52 guy Exp $ */
/* config.h.win32 Generated manually. :-) */
/* config.h. Generated automatically by configure. */
/* config.h.in. Generated automatically from configure.in by autoheader. */
@@ -43,9 +43,6 @@
/* Define if you have the <dirent.h> header file. */
/* #undef HAVE_DIRENT_H */
-/* Define if you have the <dlfcn.h> header file. */
-/* #undef HAVE_DLFCN_H */
-
/* Define if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1
diff --git a/epan/configure.in b/epan/configure.in
index 97464d9135..86e0cd4aaa 100644
--- a/epan/configure.in
+++ b/epan/configure.in
@@ -1,4 +1,4 @@
-# $Id: configure.in,v 1.6 2001/04/11 16:35:02 jfoster Exp $
+# $Id: configure.in,v 1.7 2001/05/01 02:44:52 guy Exp $
dnl
dnl Process this file with autoconf 2.13 or later to produce a
dnl configure script; 2.12 doesn't generate a "configure" script that
@@ -73,7 +73,7 @@ AC_DEFINE_UNQUOTED(DATAFILE_DIR,"$DATAFILE_DIR")
AC_SUBST(DATAFILE_DIR)
# Checks for glib first, or gtk+ if not present
-AM_PATH_GLIB(1.1.0, CFLAGS="$CFLAGS $GLIB_CFLAGS" LIBS="$LIBS $GLIB_LIBS")
+AM_PATH_GLIB(1.1.0, CFLAGS="$CFLAGS $GLIB_CFLAGS" LIBS="$LIBS $GLIB_LIBS", , gmodule)
dnl Checks for header files
AC_HEADER_STDC
@@ -81,16 +81,6 @@ AC_CHECK_HEADERS(stdarg.h direct.h dirent.h fcntl.h netdb.h unistd.h)
AC_CHECK_HEADERS(sys/param.h sys/socket.h sys/stat.h sys/time.h sys/types.h)
AC_CHECK_HEADERS(netinet/in.h)
AC_CHECK_HEADERS(arpa/inet.h arpa/nameser.h)
-AC_CHECK_HEADERS(dlfcn.h)
-
-#
-# XXX - we should also somehow arrange to support dynamic linking on
-# HP-UX, even though it hasn't yet, apparently, implemented the
-# UNIX standard "dlopen()" interface atop its own interface.
-#
-if test "$ac_cv_header_dlfcn_h" = yes ; then
- AC_DEFINE(HAVE_PLUGINS)
-fi
AC_CHECK_FUNC(inet_aton, INET_ATON_O="",
INET_ATON_O="inet_aton.o")
@@ -143,6 +133,40 @@ fi
AC_SUBST(INET_NTOP_C)
AC_SUBST(INET_NTOP_O)
+#
+# Check whether GLib modules are supported, to determine whether we
+# can support plugins.
+#
+AC_MSG_CHECKING(whether GLib supports loadable modules)
+#ac_save_CFLAGS="$CFLAGS"
+#ac_save_LIBS="$LIBS"
+#CFLAGS="$CFLAGS $GLIB_CFLAGS"
+#LIBS="$GLIB_LIBS $LIBS"
+AC_TRY_RUN([
+#include <glib.h>
+#include <gmodule.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+int
+main ()
+{
+ if (g_module_supported())
+ return 0; /* success */
+ else
+ return 1; /* failure */
+}
+], ac_cv_glib_supports_modules=yes, ac_cv_glib_supports_modules=no,
+ [echo $ac_n "cross compiling; assumed OK... $ac_c"])
+#CFLAGS="$ac_save_CFLAGS"
+#LIBS="$ac_save_LIBS"
+if test "$ac_cv_glib_supports_modules" = yes ; then
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_PLUGINS)
+else
+ AC_MSG_RESULT(no)
+fi
+
AC_OUTPUT(
Makefile
dfilter/Makefile