Skip to content

Commit

Permalink
Add PCRE support to the Windows build.
Browse files Browse the repository at this point in the history
svn path=/trunk/; revision=9185
  • Loading branch information
geraldcombs committed Dec 7, 2003
1 parent d9dec10 commit 409948e
Show file tree
Hide file tree
Showing 8 changed files with 64 additions and 17 deletions.
7 changes: 5 additions & 2 deletions Makefile.nmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Makefile for building ethereal.exe with Microsoft C and nmake
## Use: $(MAKE) /$(MAKEFLAGS) -f makefile.nmake
#
# $Id: Makefile.nmake,v 1.370 2003/12/05 16:00:34 gerald Exp $
# $Id: Makefile.nmake,v 1.371 2003/12/07 00:04:30 gerald Exp $

include config.nmake
include <win32.mak>
Expand All @@ -16,7 +16,7 @@ LDFLAGS = /NOLOGO /INCREMENTAL:no /MACHINE:I386 $(LOCAL_LDFLAGS)
CFLAGS=-DHAVE_CONFIG_H $(LOCAL_CFLAGS) $(GTK_CFLAGS) /I. /Iwiretap \
$(ZLIB_CFLAGS) /I$(PCAP_DIR)\include \
/I$(NET_SNMP_DIR)\include /I$(NET_SNMP_DIR)\win32 \
$(ADNS_CFLAGS) -D_U_=""
$(ADNS_CFLAGS) $(PCRE_CFLAGS) -D_U_=""

CVARSDLL=-DWIN32 -DNULL=0 -D_MT -D_DLL

Expand Down Expand Up @@ -512,6 +512,7 @@ ethereal_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
wsock32.lib user32.lib \
$(GTK_LIBS) \
$(ADNS_LIBS) \
$(PCRE_LIBS) \
$(NET_SNMP_DIR)\win32\lib\netsnmp.lib
# $(PCAP_DIR)\lib\wpcap.lib

Expand All @@ -521,6 +522,7 @@ tethereal_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
wsock32.lib user32.lib \
$(GLIB_LIBS) \
$(ADNS_LIBS) \
$(PCRE_LIBS) \
$(NET_SNMP_DIR)\win32\lib\netsnmp.lib

editcap_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
Expand Down Expand Up @@ -595,6 +597,7 @@ randpkt.exe : $(randpkt_OBJECTS) $(EXTRA_OBJECTS)
config.h : config.h.win32 config.nmake
sed -e s/@VERSION@/$(VERSION)/ \
-e "s/@HAVE_GNU_ADNS@/$(ADNS_CONFIG)/" \
-e "s/@HAVE_PCRE@/$(PCRE_CONFIG)/" \
-e "s/@HAVE_LIBZ@/$(ZLIB_CONFIG)/" \
-e "s/@HAVE_LIBPCAP@/$(WINPCAP_CONFIG)/" \
-e "s/@HAVE_PCAP_FINDALLDEVS@/$(PCAP_FINDALLDEVS_CONFIG)/" \
Expand Down
13 changes: 7 additions & 6 deletions README.win32
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$Id: README.win32,v 1.51 2003/12/05 16:00:34 gerald Exp $
$Id: README.win32,v 1.52 2003/12/07 00:04:31 gerald Exp $

Installing Ethereal, Tethereal, and Editcap on Win32
====================================================
Expand Down Expand Up @@ -148,11 +148,11 @@ Compiling the Ethereal distribution from source
===============================================

You'll need the development packages for GLIB, GTK+, iconv, intl,
WinPcap, zlib, Net-SNMP, and ADNS. The GLIB, GTK+, and WinPcap packages
are available from the respctive home pages for each project (the same
URLs as listed above). The development packages contain header files and
stub libaries to link against. Precompiled versions of these packages
are available at
WinPcap, zlib, Net-SNMP, ADNS, and PCRE. The GLIB, GTK+, and WinPcap
packages are available from the respctive home pages for each project
(the same URLs as listed above). The development packages contain header
files and stub libaries to link against. Precompiled versions of these
packages are available at

http://www.ethereal.com/distribution/win32/development/

Expand All @@ -175,6 +175,7 @@ package is as follows:
libiconv-1.9.1.bin.woe32.zip C:\ethereal-win32-libs\gtk+
libintl-0.10.40-tml-20020904.zip C:\ethereal-win32-libs\gtk+
net-snmp-5.1.zip C:\ethereal-win32-libs
pcre-4.4.zip C:\ethereal-win32-libs
zlib121-dll.zip C:\ethereal-win32-libs\zlib121-dll


Expand Down
5 changes: 4 additions & 1 deletion config.h.win32
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $Id: config.h.win32,v 1.42 2003/11/07 23:27:07 guy Exp $ */
/* $Id: config.h.win32,v 1.43 2003/12/07 00:04:31 gerald Exp $ */
/* config.h.win32 Generated manually. :-) */
/* config.h. Generated automatically by configure. */
/* config.h.in. Generated automatically from configure.in by autoheader. */
Expand Down Expand Up @@ -115,6 +115,9 @@
@HAVE_GNU_ADNS@
#define ADNS_JGAA_WIN32 1

/* Define to use the PCRE library */
@HAVE_PCRE@

#ifndef WIN32
#define WIN32 1
#endif
Expand Down
33 changes: 32 additions & 1 deletion config.nmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $Id: config.nmake,v 1.66 2003/12/05 16:00:34 gerald Exp $
# $Id: config.nmake,v 1.67 2003/12/07 00:04:31 gerald Exp $

VERSION=0.9.16
#
Expand Down Expand Up @@ -56,7 +56,16 @@ GTK_DIR=C:\ethereal-win32-libs\gtk+
#
ZLIB_DIR=C:\ethereal-win32-libs\zlib121-dll

#
# Set PCAP_DIR to the pathname of the directory in which the WinPcap
# developer's pack resides
#
PCAP_DIR=C:\ethereal-win32-libs\WPdpack

#
# Set NET_SNMP_DIR to the pathname of the directory in which the
# Net-SNMP include files and library resides.
#
NET_SNMP_DIR=C:\ethereal-win32-libs\net-snmp-5.1

#
Expand All @@ -68,6 +77,16 @@ NET_SNMP_DIR=C:\ethereal-win32-libs\net-snmp-5.1
#
ADNS_DIR=C:\ethereal-win32-libs\adns-1.0-win32-01

#
# If you have the PCRE (Perl Compatible Regular Expressions) library,
# set this to the pathname of the directory in which the GNUWIN32
# pcre-lib package has been extracted.
#
# If you don't have PCRE, comment this line out, so that PCRE_DIR
# isn't defined.
#
PCRE_DIR=C:\ethereal-win32-libs\pcre-4.4

COMMON_FILES_GNU=c:\program files\common files\gnu

LOCAL_CFLAGS=-Zi
Expand Down Expand Up @@ -167,3 +186,15 @@ ADNS_CFLAGS=
ADNS_LIBS=
ADNS_CONFIG=
!ENDIF

!IFDEF PCRE_DIR
PCRE_CFLAGS=/I$(PCRE_DIR)\include
PCRE_LIBS=$(PCRE_DIR)\lib\pcre.lib
# Nmake uses carets to escape special characters
PCRE_CONFIG=^#define HAVE_LIBPCRE 1
!else
PCRE_CFLAGS=
PCRE_LIBS=
PCRE_CONFIG=
!ENDIF

10 changes: 7 additions & 3 deletions epan/Makefile.nmake
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
## Makefile for building ethereal.exe with Microsoft C and nmake
## Use: $(MAKE) /$(MAKEFLAGS) -f makefile.nmake
#
# $Id: Makefile.nmake,v 1.31 2003/10/13 19:04:55 guy Exp $
# $Id: Makefile.nmake,v 1.32 2003/12/07 00:04:31 gerald Exp $

include ..\config.nmake

############### no need to modify below this line #########

CFLAGS=-DHAVE_CONFIG_H /I. /I.. /I../wiretap $(GTK_CFLAGS) \
$(ADNS_CFLAGS) /I$(PCAP_DIR)\include -D_U_="" $(LOCAL_CFLAGS)
$(ADNS_CFLAGS) $(PCRE_CFLAGS) /I$(PCAP_DIR)\include \
-D_U_="" $(LOCAL_CFLAGS)

CVARSDLL=-DWIN32 -DNULL=0 -D_MT -D_DLL

Expand Down Expand Up @@ -56,7 +57,10 @@ ethereal.lib : config.h $(OBJECTS)
lib /out:ethereal.lib $(OBJECTS)

config.h : config.h.win32 ..\config.nmake
sed -e s/@VERSION@/$(VERSION)/ -e "s;@HAVE_GNU_ADNS@;$(ADNS_CONFIG);" < config.h.win32 > $@
sed -e s/@VERSION@/$(VERSION)/ \
-e "s/@HAVE_GNU_ADNS@/$(ADNS_CONFIG)/" \
-e "s/@HAVE_PCRE@/$(PCRE_CONFIG)/" \
< config.h.win32 > $@

clean:
rm -f $(OBJECTS) ethereal.lib $(PDB_FILE)
Expand Down
5 changes: 4 additions & 1 deletion epan/config.h.win32
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $Id: config.h.win32,v 1.12 2003/06/12 09:45:42 guy Exp $ */
/* $Id: config.h.win32,v 1.13 2003/12/07 00:04:31 gerald Exp $ */
/* config.h.win32 Generated manually. :-) */
/* config.h. Generated automatically by configure. */
/* config.h.in. Generated automatically from configure.in by autoheader. */
Expand Down Expand Up @@ -75,6 +75,9 @@
@HAVE_GNU_ADNS@
#define ADNS_JGAA_WIN32 1

/* Define to use the PCRE library */
@HAVE_PCRE@

#define HAVE_PLUGINS 1
#define PLUGINS_NEED_ADDRESS_TABLE 1

Expand Down
4 changes: 2 additions & 2 deletions epan/ftypes/Makefile.nmake
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
## Makefile for building ethereal.exe with Microsoft C and nmake
## Use: $(MAKE) /$(MAKEFLAGS) -f makefile.nmake
#
# $Id: Makefile.nmake,v 1.6 2003/10/10 21:31:47 guy Exp $
# $Id: Makefile.nmake,v 1.7 2003/12/07 00:04:32 gerald Exp $

include ..\..\config.nmake

############### no need to modify below this line #########

CFLAGS=-DHAVE_CONFIG_H /I. /I.. /I../.. $(GTK_CFLAGS) \
/I$(PCAP_DIR)\include -D_U_="" $(LOCAL_CFLAGS)
$(PCRE_CFLAGS) /I$(PCAP_DIR)\include -D_U_="" $(LOCAL_CFLAGS)

CVARSDLL=-DWIN32 -DNULL=0 -D_MT -D_DLL

Expand Down
4 changes: 3 additions & 1 deletion packaging/nsis/ethereal.nsi
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
;
; ethereal.nsi
;
; $Id: ethereal.nsi,v 1.24 2003/12/01 17:19:09 gerald Exp $
; $Id: ethereal.nsi,v 1.25 2003/12/07 00:04:32 gerald Exp $

; ============================================================================
; Header configuration
Expand Down Expand Up @@ -85,10 +85,12 @@ File "${COMMON_FILES_GNU}\libintl-1.dll"
!endif
File "${COMMON_FILES_GNU}\zlib1.dll"
File "${COMMON_FILES_GNU}\adns_dll.dll"
File "${COMMON_FILES_GNU}\prce.dll"
File "..\..\FAQ"
File "..\..\README"
File "..\..\README.win32"
File "..\..\manuf"
File "${PCRE_DIR}\man\cat3\pcrepattern.3.txt"

;
; Install the Diameter DTD and XML files in the "diameter" subdirectory
Expand Down

0 comments on commit 409948e

Please sign in to comment.