Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Ethereal-dev: [Ethereal-dev] 0.8.16 on HP-UX 10.20

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

Date: Thu, 8 Mar 2001 02:43:49 -0600
epan/configure.in checks for dlopen but not shl_load (dlopen
equivalent on HP-UX). Nowhere in epan/* is dlopen used though (you use
the Glib equivalent). And, Glib 1.2.x supports shl_load under HP-UX.
So, the patch below allows Ethereal to build on HP-UX 10.20 (it worked
fine as-is under 11.00).

Note we also check for shl_load in the top-level configure though it's
never used. Feel free to reject it. I note that dlopen is used only
under Linux in packet-snmp.c

Using internal autoconf variables is probably not a good idea:
  if test "$ac_cv_header_dlfcn_h" = yes ; then
    AC_DEFINE(HAVE_PLUGINS)
  fi

-- 
albert chin (china@xxxxxxxxxxxxxxxxxx)

-- snip snip
--- configure.in.orig	Wed Mar  7 20:20:32 2001
+++ configure.in	Thu Mar  8 01:40:00 2001
@@ -330,17 +303,18 @@
 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.
+# Glib does the module loading.
 #
-if test "$ac_cv_header_dlfcn_h" = yes ; then
-  AC_DEFINE(HAVE_PLUGINS)
-fi
+AC_CHECK_HEADER(dlfcn.h,[
+	AC_DEFINE(HAVE_DLFCN_H)
+	AC_DEFINE(HAVE_PLUGINS)])
+AC_CHECK_HEADER(dl.h,
+	AC_CHECK_LIB(dld, shl_load,[
+		AC_DEFINE(HAVE_DL_H)
+		AC_DEFINE(HAVE_PLUGINS)]))
 
 dnl SSL Check
 SSL_LIBS=''
--- epan/configure.in.orig	Thu Mar  8 02:18:55 2001
+++ epan/configure.in	Thu Mar  8 02:19:34 2001
@@ -81,16 +81,17 @@
 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.
+# Glib does the module loading.
 #
-if test "$ac_cv_header_dlfcn_h" = yes ; then
-  AC_DEFINE(HAVE_PLUGINS)
-fi
+AC_CHECK_HEADER(dlfcn.h,[
+	AC_DEFINE(HAVE_DLFCN_H)
+	AC_DEFINE(HAVE_PLUGINS)])
+AC_CHECK_HEADER(dl.h,
+	AC_CHECK_LIB(dld, shl_load,[
+		AC_DEFINE(HAVE_DL_H)
+		AC_DEFINE(HAVE_PLUGINS)]))
 
 AC_CHECK_FUNC(inet_aton, INET_ATON_O="",
   INET_ATON_O="inet_aton.o")