forked from osmocom/wireshark
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. svn path=/trunk/; revision=3390
This commit is contained in:
parent
025578a1bd
commit
3331642eb6
|
@ -1,4 +1,4 @@
|
|||
/* $Id: config.h.win32,v 1.27 2001/04/05 05:58:03 gram Exp $ */
|
||||
/* $Id: config.h.win32,v 1.28 2001/05/01 02:44:51 guy Exp $ */
|
||||
/* config.h.win32 Generated manually. :-) */
|
||||
/* config.h. Generated automatically by configure. */
|
||||
/* config.h.in. Generated automatically from configure.in by autoheader. */
|
||||
|
@ -55,9 +55,6 @@
|
|||
/* Define if you have the <arpa/inet.h> header file. */
|
||||
/* #undef HAVE_ARPA_INET_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
|
||||
|
||||
|
|
47
configure.in
47
configure.in
|
@ -1,4 +1,4 @@
|
|||
# $Id: configure.in,v 1.122 2001/04/25 07:51:36 guy Exp $
|
||||
# $Id: configure.in,v 1.123 2001/05/01 02:44:51 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
|
||||
|
@ -199,6 +199,41 @@ else
|
|||
AM_PATH_GLIB(1.2.0, CFLAGS="$CFLAGS $GLIB_CFLAGS", AC_MSG_ERROR(GLib distribution not found.), gmodule)
|
||||
fi
|
||||
|
||||
#
|
||||
# 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_SUBST(ethereal_bin)
|
||||
AC_SUBST(ethereal_man)
|
||||
|
||||
|
@ -330,18 +365,8 @@ AC_CHECK_HEADERS(sys/stat.h sys/sockio.h sys/types.h sys/socket.h)
|
|||
AC_CHECK_HEADERS(sys/wait.h)
|
||||
AC_CHECK_HEADERS(netinet/in.h)
|
||||
AC_CHECK_HEADERS(stddef.h)
|
||||
AC_CHECK_HEADERS(dlfcn.h)
|
||||
AC_CHECK_HEADERS(arpa/inet.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
|
||||
|
||||
dnl SSL Check
|
||||
SSL_LIBS=''
|
||||
AC_MSG_CHECKING(whether to use SSL library if available)
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue