Ethereal-dev: Re: [Ethereal-dev] The need to run autogen (almost) every day.

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: Thu, 12 Sep 2002 23:53:53 +0200
On Tue, Sep 10, 2002 at 04:36:59PM -0700, Guy Harris wrote:
> I suspect at least part of the problem is that, somehow, the Makefile's
> process of regenerating the configuration file, if you don't have GTK+
> 2.0 installed, doesn't correctly handle the
...
> stuff, as, instead of expanding the macro call to "AM_PATH_GTK_2_0()"
> using the fallback version, it just copies the line over *verbatim*,
> which upsets the shell as it's not expecting a parenthesized call.

Please test whether the attached patch fixes the problem. I'm too tired
to commit this right now without further review/testing.

 Ciao
       Jörg

--
Joerg Mayer                                          <jmayer@xxxxxxxxx>
I found out that "pro" means "instead of" (as in proconsul). Now I know
what proactive means.
Index: Makefile.am
===================================================================
RCS file: /usr/local/cvsroot/ethereal/Makefile.am,v
retrieving revision 1.493
diff -u -p -r1.493 Makefile.am
--- Makefile.am	12 Sep 2002 09:29:50 -0000	1.493
+++ Makefile.am	12 Sep 2002 21:48:58 -0000
@@ -21,7 +21,8 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
-ACLOCAL_AMFLAGS = `./aclocal-flags`
+topdir = .
+eval ACLOCAL_AMFLAGS = \"`./aclocal-flags`\"
 
 #
 # This is a hideous hack.
Index: aclocal-flags
===================================================================
RCS file: /usr/local/cvsroot/ethereal/aclocal-flags,v
retrieving revision 1.4
diff -u -p -r1.4 aclocal-flags
--- aclocal-flags	6 Mar 2002 06:36:22 -0000	1.4
+++ aclocal-flags	12 Sep 2002 21:48:58 -0000
@@ -1,4 +1,5 @@
 #!/bin/sh
+
 #
 # This script returns the flags to be fed to "aclocal" to ensure that
 # it finds GTK+'s aclocal macros.
@@ -51,6 +52,31 @@ fi
 if [ ! -z "$aclocal_dir" -a ! -z "$gtk_aclocal_dir" \
     -a "$aclocal_dir" != "$gtk_aclocal_dir" ]
 then
-	echo "-I $gtk_aclocal_dir"
+	echo " -I $gtk_aclocal_dir"
+fi
+
+#
+# 
+if glib-config --version >/dev/null 2>&1 ; then
+	rm -f aclocal-missing/glib.m4
+else
+	cp aclocal-fallback/glib.m4 aclocal-missing/
+fi
+if gtk-config --version >/dev/null 2>&1 ; then
+	rm -f aclocal-missing/gtk.m4
+else
+	cp aclocal-fallback/gtk.m4 aclocal-missing/
+fi
+if pkg-config glib-2.0 >/dev/null 2>&1 ; then
+	rm -f aclocal-missing/glib-2.0.m4
+else
+	cp aclocal-fallback/glib-2.0.m4 aclocal-missing/
 fi
+if pkg-config gtk+-2.0 >/dev/null 2>&1 ; then
+	rm -f aclocal-missing/gtk-2.0.m4
+else
+	cp aclocal-fallback/gtk-2.0.m4 aclocal-missing/
+fi
+echo " -I \$topdir/aclocal-missing"
+
 exit 0
Index: autogen.sh
===================================================================
RCS file: /usr/local/cvsroot/ethereal/autogen.sh,v
retrieving revision 1.19
diff -u -p -r1.19 autogen.sh
--- autogen.sh	28 Aug 2002 12:25:54 -0000	1.19
+++ autogen.sh	12 Sep 2002 21:48:58 -0000
@@ -89,27 +89,6 @@ fi
 
 aclocal_flags="`./aclocal-flags`"
 
-if glib-config --version >/dev/null 2>&1 ; then
-	rm -f aclocal-missing/glib.m4
-else
-	cp aclocal-fallback/glib.m4 aclocal-missing/
-fi
-if gtk-config --version >/dev/null 2>&1 ; then
-	rm -f aclocal-missing/gtk.m4
-else
-	cp aclocal-fallback/gtk.m4 aclocal-missing/
-fi
-if pkg-config glib-2.0 >/dev/null 2>&1 ; then
-	rm -f aclocal-missing/glib-2.0.m4
-else
-	cp aclocal-fallback/glib-2.0.m4 aclocal-missing/
-fi
-if pkg-config gtk+-2.0 >/dev/null 2>&1 ; then
-	rm -f aclocal-missing/gtk-2.0.m4
-else
-	cp aclocal-fallback/gtk-2.0.m4 aclocal-missing/
-fi
-
 for dir in . epan wiretap ;  do
   echo processing $dir
   (
@@ -119,8 +98,7 @@ for dir in . epan wiretap ;  do
     else
         topdir=..
     fi
-    aclocal_missing="-I $topdir/aclocal-missing"
-    aclocalinclude="$ACLOCAL_FLAGS $aclocal_flags $aclocal_missing";
+    eval aclocalinclude=\"$ACLOCAL_FLAGS $aclocal_flags\"
     echo aclocal $aclocalinclude
     aclocal $aclocalinclude || exit 1
     echo autoheader
Index: epan/Makefile.am
===================================================================
RCS file: /usr/local/cvsroot/ethereal/epan/Makefile.am,v
retrieving revision 1.30
diff -u -p -r1.30 Makefile.am
--- epan/Makefile.am	18 Dec 2001 19:09:03 -0000	1.30
+++ epan/Makefile.am	12 Sep 2002 21:48:59 -0000
@@ -28,7 +28,8 @@ SUBDIRS = ftypes dfilter
 # EPAN will eventually be a shared library. While I move source code around,
 # however, it is an archive library.
 
-ACLOCAL_AMFLAGS = `../aclocal-flags`
+topdir = ..
+eval ACLOCAL_AMFLAGS = \"`../aclocal-flags`\"
 
 noinst_LIBRARIES = libethereal.a
 
Index: wiretap/Makefile.am
===================================================================
RCS file: /usr/local/cvsroot/ethereal/wiretap/Makefile.am,v
retrieving revision 1.39
diff -u -p -r1.39 Makefile.am
--- wiretap/Makefile.am	31 Jul 2002 19:27:56 -0000	1.39
+++ wiretap/Makefile.am	12 Sep 2002 21:48:59 -0000
@@ -22,7 +22,8 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
-ACLOCAL_AMFLAGS = `../aclocal-flags`
+topdir = ..
+ACLOCAL_AMFLAGS = \"`../aclocal-flags`\"
 
 noinst_LIBRARIES = libwiretap.a