Ethereal-dev: [Ethereal-dev] Please Test: shared libs for Unix

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

From: Joerg Mayer <jmayer@xxxxxxxxx>
Date: Sat, 6 Mar 2004 15:35:53 +0100
The attached patch turns wiretap, dfilter, ftypes and libethereal into shared
libs on Unix/Linux. Please test and report results. In case this requires
still newer auto... tools on your system, please report that too.

Thanks
         Jï¿œrg
-- 
Joerg Mayer                                           <jmayer@xxxxxxxxx>
We are stuck with technology when what we really want is just stuff that
works. Some say that should read Microsoft instead of technology.
Index: Makefile.am
===================================================================
RCS file: /usr/local/cvsroot/ethereal/Makefile.am,v
retrieving revision 1.718
diff -p -u -r1.718 Makefile.am
--- Makefile.am	4 Mar 2004 08:26:20 -0000	1.718
+++ Makefile.am	6 Mar 2004 14:30:05 -0000
@@ -189,11 +189,11 @@ ethereal_optional_objects = @SNPRINTF_O@
 # Additional libs that I know how to build. These will be
 # linked into the ethereal executable.
 ethereal_additional_libs = \
-	wiretap/libwiretap.a	\
+	wiretap/libwiretap.la	\
 	gtk/libui.a		\
-	epan/libethereal.a	\
-	epan/ftypes/libftypes.a \
-	epan/dfilter/libdfilter.a
+	epan/libethereal.la	\
+	epan/ftypes/libftypes.la \
+	epan/dfilter/libdfilter.la
 
 # This is the automake dependency variable for the executable
 ethereal_DEPENDENCIES = \
@@ -226,10 +226,10 @@ ethereal_LDADD = \
 # Additional libs that I know how to build. These will be
 # linked into the tethereal executable.
 tethereal_additional_libs =		\
-	wiretap/libwiretap.a		\
-	epan/libethereal.a		\
-	epan/ftypes/libftypes.a		\
-	epan/dfilter/libdfilter.a
+	wiretap/libwiretap.la		\
+	epan/libethereal.la		\
+	epan/ftypes/libftypes.la		\
+	epan/dfilter/libdfilter.la
 
 # This is the automake dependency variable for the executable
 tethereal_DEPENDENCIES = \
@@ -263,14 +263,14 @@ text2pcap_DEPENDENCIES = text2pcap.h
 text2pcap_LDADD = $(text2pcap_optional_objects) \
 	@GLIB_LIBS@ -lm
 
-mergecap_DEPENDENCIES = wiretap/libwiretap.a
+mergecap_DEPENDENCIES = wiretap/libwiretap.la
 
 # This is the automake dependency variable for the executable
-editcap_DEPENDENCIES = wiretap/libwiretap.a
+editcap_DEPENDENCIES = wiretap/libwiretap.la
 
 # This automake variable adds to the link-line for the executable
-editcap_LDADD = wiretap/libwiretap.a @GLIB_LIBS@
-mergecap_LDADD = wiretap/libwiretap.a @GLIB_LIBS@
+editcap_LDADD = wiretap/libwiretap.la @GLIB_LIBS@
+mergecap_LDADD = wiretap/libwiretap.la @GLIB_LIBS@
 
 # Common headers
 AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/wiretap
@@ -318,7 +318,7 @@ ps.c: print.ps rdps
 rdps: rdps.c
 	$(CC) $(CFLAGS) -o rdps $(srcdir)/rdps.c
 
-randpkt_additional_libs = wiretap/libwiretap.a
+randpkt_additional_libs = wiretap/libwiretap.la
 
 randpkt_DEPENDENCIES = \
 	$(randpkt_additional_libs)
@@ -329,10 +329,10 @@ randpkt_LDADD = \
 	@PCAP_LIBS@ @SOCKET_LIBS@ @NSL_LIBS@ @ADNS_LIBS@
 
 dftest_additional_libs =		\
-	wiretap/libwiretap.a		\
-	epan/libethereal.a		\
-	epan/ftypes/libftypes.a		\
-	epan/dfilter/libdfilter.a
+	wiretap/libwiretap.la		\
+	epan/libethereal.la		\
+	epan/ftypes/libftypes.la	\
+	epan/dfilter/libdfilter.la
 
 dftest_DEPENDENCIES = \
 	$(ethereal_optional_objects)	\
Index: epan/Makefile.am
===================================================================
RCS file: /usr/local/cvsroot/ethereal/epan/Makefile.am,v
retrieving revision 1.38
diff -p -u -r1.38 Makefile.am
--- epan/Makefile.am	6 Mar 2004 03:25:10 -0000	1.38
+++ epan/Makefile.am	6 Mar 2004 14:30:09 -0000
@@ -29,13 +29,15 @@ SUBDIRS = ftypes dfilter
 
 ACLOCAL_AMFLAGS = `../aclocal-flags`
 
-noinst_LIBRARIES = libethereal.a
+#noinst_LIBRARIES = libethereal.a
+lib_LTLIBRARIES = libethereal.la
+libethereal_la_LDFLAGS = -version-info 0:1:0
 
 include Makefile.common
 
 INCLUDES = -I$(srcdir)/..
 
-libethereal_a_SOURCES = \
+libethereal_la_SOURCES = \
 	addr_and_mask.c		\
 	addr_and_mask.h		\
 	atalk-utils.c		\
@@ -93,7 +95,7 @@ libethereal_a_SOURCES = \
 	$(DISSECTOR_SRC)        \
 	$(DISSECTOR_SUPPORT_SRC)
 
-EXTRA_libethereal_a_SOURCES =	\
+EXTRA_libethereal_la_SOURCES =	\
         inet_aton.c		\
 	inet_pton.c		\
 	inet_ntop.c		\
@@ -116,8 +118,8 @@ MAINTAINERCLEANFILES =	\
 #
 # Add the object files for missing routines, if any.
 #
-libethereal_a_LIBADD = @INET_ATON_O@ @INET_PTON_O@ @INET_NTOP_O@
-libethereal_a_DEPENDENCIES = @INET_ATON_O@ @INET_PTON_O@ @INET_NTOP_O@
+libethereal_la_LIBADD = @INET_ATON_O@ @INET_PTON_O@ @INET_NTOP_O@
+libethereal_la_DEPENDENCIES = @INET_ATON_O@ @INET_PTON_O@ @INET_NTOP_O@
 
 ../packet-ncp2222.c : $(srcdir)/../ncp2222.py
 	$(PYTHON) $(srcdir)/../ncp2222.py -o $@
Index: epan/dfilter/Makefile.am
===================================================================
RCS file: /usr/local/cvsroot/ethereal/epan/dfilter/Makefile.am,v
retrieving revision 1.9
diff -p -u -r1.9 Makefile.am
--- epan/dfilter/Makefile.am	5 Mar 2001 22:53:39 -0000	1.9
+++ epan/dfilter/Makefile.am	6 Mar 2004 14:30:09 -0000
@@ -25,7 +25,9 @@
 # shared library, this will be linked into libethereal. While libethereal
 # is an archive library, any executable linking against libethereal will
 # also need to link against libftypes.
-noinst_LIBRARIES = libdfilter.a
+#noinst_LIBRARIES = libdfilter.a
+lib_LTLIBRARIES = libdfilter.la
+libdfilter_la_LDFLAGS = -version-info 0:1:0
 
 CLEANFILES = \
 	libdfilter.a		\
@@ -33,7 +35,7 @@ CLEANFILES = \
 
 INCLUDES = -I$(srcdir)/../.. -I$(srcdir)/.. -I$(srcdir)/$(LEMON)
 
-libdfilter_a_SOURCES = \
+libdfilter_la_SOURCES = \
 	dfilter.c		\
 	dfilter.h		\
 	dfilter-int.h		\
Index: epan/ftypes/Makefile.am
===================================================================
RCS file: /usr/local/cvsroot/ethereal/epan/ftypes/Makefile.am,v
retrieving revision 1.5
diff -p -u -r1.5 Makefile.am
--- epan/ftypes/Makefile.am	9 Dec 2003 23:02:39 -0000	1.5
+++ epan/ftypes/Makefile.am	6 Mar 2004 14:30:09 -0000
@@ -25,7 +25,10 @@
 # shared library, this will be linked into libethereal. While libethereal
 # is an archive library, any executable linking against libethereal will
 # also need to link against libftypes.
-noinst_LIBRARIES = libftypes.a
+#noinst_LIBRARIES = libftypes.a
+lib_LTLIBRARIES = libftypes.la
+libftypes_la_LDFLAGS = -version-info 0:1:0
+
 
 CLEANFILES = \
 	libftypes.a	\
@@ -33,7 +36,7 @@ CLEANFILES = \
 
 INCLUDES = -I$(srcdir)/../.. -I$(srcdir)/..
 
-libftypes_a_SOURCES =	\
+libftypes_la_SOURCES =	\
 	ftypes.c	\
 	ftypes.h	\
 	ftypes-int.h	\
Index: wiretap/Makefile.am
===================================================================
RCS file: /usr/local/cvsroot/ethereal/wiretap/Makefile.am,v
retrieving revision 1.49
diff -p -u -r1.49 Makefile.am
--- wiretap/Makefile.am	11 Feb 2004 20:05:15 -0000	1.49
+++ wiretap/Makefile.am	6 Mar 2004 14:30:10 -0000
@@ -23,15 +23,17 @@
 
 ACLOCAL_AMFLAGS = `../aclocal-flags`
 
-noinst_LIBRARIES = libwiretap.a
-
+#noinst_LIBRARIES = libwiretap.a
 #EXTRA_LIBRARIES = libwiretap.a
 
+lib_LTLIBRARIES = libwiretap.la
+libwiretap_la_LDFLAGS = -version-info 0:1:0
+
 CLEANFILES = \
 	libwiretap.a		\
 	*~
 
-libwiretap_a_SOURCES = \
+libwiretap_la_SOURCES = \
 	airopeek9.c		\
 	airopeek9.h		\
 	ascend-grammar.y	\