aboutsummaryrefslogtreecommitdiffstats
path: root/gtk
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2001-07-27 07:10:13 +0000
committerGuy Harris <guy@alum.mit.edu>2001-07-27 07:10:13 +0000
commit5bb08b09703b6a2f33f5b8d205052ed8c3d5def1 (patch)
tree6d5aa5edb5aaad7e07f1853e98ac346fe7877faf /gtk
parent8a9917a9a7528d4bdac5e9d3e4aa8a1080d06b4c (diff)
downloadwireshark-5bb08b09703b6a2f33f5b8d205052ed8c3d5def1.tar.gz
wireshark-5bb08b09703b6a2f33f5b8d205052ed8c3d5def1.tar.bz2
wireshark-5bb08b09703b6a2f33f5b8d205052ed8c3d5def1.zip
Fix AC_ETHEREAL_PCAP_CHECK so that, if a directory was specified with
"--with-pcap", it adds the "include" subdirectory of that directory to the list of directories to search for include files, rather than adding the directory itself. Check whether libpcap defines "pcap_version", and define HAVE_PCAP_VERSION if it does. Use "pcap_version" iff HAVE_PCAP_VERSION is defined, rather than special-casing MacOS X. Don't #define a string for the WinPcap version; just leave HAVE_PCAP_VERSION undefined on Windows, as WinPcap 2.2beta is out, so we can no longer assume that the Windows version of Ethereal is using WinPcap 2.1. svn path=/trunk/; revision=3792
Diffstat (limited to 'gtk')
-rw-r--r--gtk/main.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/gtk/main.c b/gtk/main.c
index 1550e2b842..64e856136e 100644
--- a/gtk/main.c
+++ b/gtk/main.c
@@ -1,6 +1,6 @@
/* main.c
*
- * $Id: main.c,v 1.204 2001/07/26 07:25:48 guy Exp $
+ * $Id: main.c,v 1.205 2001/07/27 07:10:11 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -834,18 +834,11 @@ main(int argc, char *argv[])
int opt;
extern char *optarg;
gboolean arg_error = FALSE;
-
#ifdef HAVE_LIBPCAP
-#ifdef WIN32
- char pcap_version[] = WPCAP_STRING;
-#else
-#ifdef __APPLE__
- char pcap_version[] = "Unknown";
-#else
+#ifdef HAVE_PCAP_VERSION
extern char pcap_version[];
-#endif
-#endif
-#endif
+#endif /* HAVE_PCAP_VERSION */
+#endif /* HAVE_LIBPCAP */
#ifdef WIN32
WSADATA wsaData;
@@ -1004,10 +997,14 @@ main(int argc, char *argv[])
#ifdef HAVE_LIBPCAP
g_string_append(comp_info_str, ", with libpcap ");
+#ifdef HAVE_PCAP_VERSION
g_string_append(comp_info_str, pcap_version);
-#else
+#else /* HAVE_PCAP_VERSION */
+ g_string_append(comp_info_str, "(version unknown)");
+#endif /* HAVE_PCAP_VERSION */
+#else /* HAVE_LIBPCAP */
g_string_append(comp_info_str, ", without libpcap");
-#endif
+#endif /* HAVE_LIBPCAP */
#ifdef HAVE_LIBZ
g_string_append(comp_info_str, ", with libz ");