Potential autoconf patch: PLEASE TEST!

Derek Atkins warlord@MIT.EDU
04 Oct 2002 23:28:15 -0400


--=-=-=

I'm trying to fix the autoconf-2.13 v. 2.53 issues.  My first
issue was to clear up the LTLIBOBJS issue.  I _think_ I've got
something that works, but:

a) I've only tested it with autoconf-2.13, and
b) it requires GnuMake (or a make that understands $(shell ...)

I was hoping that a few people (pogma) could test this patch (pogma)
and let me know if it works for you, or worse, if it does NOT work for
you!  If I hear negative comments, I will try something else.  If I
hear nothing (or positive comments), I plan to check this into the
repository.

So, please, test away...  (plaintext and gzipped versions included)

-derek


--=-=-=
Content-Type: application/DEFANGED-3577
Content-Disposition: attachment; filename="gnucash-autoconf_diff.DEFANGED-3577"

Index: configure.in
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/configure.in,v
retrieving revision 1.306
diff -u -r1.306 configure.in
--- configure.in	2 Oct 2002 19:43:58 -0000	1.306
+++ configure.in	5 Oct 2002 03:18:51 -0000
@@ -838,39 +838,13 @@
 ### --------------------------------------------------------------------------
 ### Makefile creation
 
-#
-# God, this is ugly....
-#
-# The libtool 2.52 and 2.53 info pages specify two different
-# *incompatible* ways to create the LTLIBOBJS variable.  2.53 makes it
-# an error to directly access the LIBOBJS variable, but then provides
-# a hack to get past this test by introducing the four character
-# sequence '@&t@' that expands to the empty string.  This expansion
-# occurs *after* the LIBOBJS usage test has taken place.
-# Unfortunately, the '@&t@' sequence doesn't exist in 2.52, so we're
-# stuck with this big ugly version check.  Sigh!  At some point in the
-# future, Autoconf 2.53 can be made a required version and this code
-# can be cleaned up.
-#
+# Export the list of extra functions that to be included
+AC_SUBST(LIBOBJS)
+
 # This is necessary so that .o files in LIBOBJS are also built via
 # the ANSI2KNR-filtering rules.
-
-AUTOCONF_VERSION=`autoconf --version`
-autoconf_major_version=`echo ${AUTOCONF_VERSION} | \
-	sed 's/^.*Autoconf.* \([[0-9]]*\)\.\([[0-9]]*\).*$/\1/'`
-autoconf_minor_version=`echo ${AUTOCONF_VERSION} | \
-	sed 's/^.*Autoconf.* \([[0-9]]*\)\.\([[0-9]]*\).*$/\2/'`
-if test "$autoconf_major_version" -gt 2   -o \
-    \( "$autoconf_major_version" -eq 2   -a \
-      "$autoconf_minor_version" -gt 52 \)  ; then
-    LIB@&t@OBJS=`echo "$LIB@&t@OBJS" |
-                  sed 's,\.[[^.]]* ,$U&,g;s,\.[[^.]]*$,$U&,'`
-    LTLIBOBJS=`echo "$LIB@&t@OBJS" |
-                  sed 's,\.[[^.]]* ,.lo ,g;s,\.[[^.]]*$,.lo,'`
-else
-    LTLIBOBJS=`echo "$LIBOBJS" | sed 's,\.[[^.]]* ,.lo ,g;s,\.[[^.]]*$,.lo,'`
-fi
-AC_SUBST(LTLIBOBJS)
+LIBOBJS_SEDSCRIPT="s,\.[[^.]]* ,$U&,g;s,\.[[^.]]*\$\$,$U&,"
+AC_SUBST(LIBOBJS_SEDSCRIPT)
 
 AC_OUTPUT( m4/Makefile  intl/Makefile 
           dnl # Makefiles
Index: lib/libc/Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/lib/libc/Makefile.am,v
retrieving revision 1.4
diff -u -r1.4 Makefile.am
--- lib/libc/Makefile.am	18 May 2002 20:32:06 -0000	1.4
+++ lib/libc/Makefile.am	5 Oct 2002 03:18:54 -0000
@@ -9,8 +9,16 @@
 
 # This will automatically be filled in with the necessary object file
 # names.  Configure does this based upon the AC_REPLACE_FUNCS macros.
-libc_missing_la_LIBADD = @LTLIBOBJS@
+LIBOBJS = @LIBOBJS@
+LTLIBOBJS = $(shell echo "$(LIBOBJS)" | sed '@LIBOBJS_SEDSCRIPT@' | \
+	sed 's,\.[^.]* ,.lo ,g;s,\.[^.]*$$,.lo,')
+
+libc_missing_la_LIBADD = $(LTLIBOBJS)
 
 # Not currently used.  If added to AC_REPLACE_FUNCS then this line
 # should be removed.
 EXTRA_DIST = scm_strptime.c
+
+print_libobjs:
+	@echo "LIBOBJS = $(LIBOBJS)"
+	@echo "LTLIBOBJS = $(LTLIBOBJS)"

--=-=-=
Content-Type: application/DEFANGED-3578
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="gnucash-autoconf_diff_gz.DEFANGED-3578"

H4sIAE5anj0AA71W/2/aRhT/Of4r3ghqEsDmW1IlVJEgJJ3YsiQKME0KLT3OZ3yt7aN3Z1K07n/f
u7MBk6SVpm6zjLDPd5/33ud9HSQ++9IBKpKAz1PJPJ445z9+Off9IQQ8Yh2ohyJmdbpU5ieF0PV5
klKiwnpRaG3pSKYlZ0uezEHin+IigabXbrx2fB4E4KbgSvu+q63rujsLey24pRpajUYLmmed43bn
5BTcBl57GVq1Wt09cLI90Gh3mqedk2Z2wOl2wT1tn9baZ1A1/802dLsO7O/vg/uvXRneb+QTM4QB
lYxotN0Bx93HG34Wfg10yBXgnc6jlYdX/m0UMoj4TAsRQcs7aQFJfPPQBp4EAhZkzhSoBaM8WIF+
FGCoZJIl2pyu8ISKeIHiZhGrwCNZKdAi04ChSAbXo+vBxe3FL0NYEskJbvMgw49RX9TI4pAEmJRC
msM+l4zqaAWEUqZUhvIEowazVJsvCSykWHKfKQsDIaGfDMicadRd6cxszfBptkKTtBR+Sk2EGNhA
pBJoSCShmkmDoNjnlCWUwUH3le4e4C6igX1ZICvWMnOKxQu9AoWxlszRmJGRYLeYgDMggtJUKqiQ
AFErOwakCgnN9AkJIiIHaEJEKDMOgTFyLnWaIHvRqmZP5opsFPMFU8mBUYojCE+s12qgBDyyA8ms
ETpFFh65DjPzZ3xu3Q5LJm1S0JDRT6j6kM/DnwB6Go/HDBYCCTKQKNfgBKnGAK9BL9XCxHvmN4rO
mjF0n8+QcIl6ocP8DbaJHyuVCt+i5PtpxEiC+9KFDb3qPlx9WaCx1sjI2CICNEpLgnITagJYZfQj
7XgeIy1KfeY71V5/OhxfDEeHOalHThUzIPMD3gkzYUPkynBiATxhK4kypq0dQSRqH+GOWcojDUtO
DIbRpXczHLR+vbl38Qz6z1aTFE+j2o7bG49u+7c3b6e/X90PB7c35x/ImhzXzSn44LjrxWlMPgo5
zT+cf2A0FFD+8ynKX/AVJo67p5CfA1V/71XWlHsVmBw+PDTcs3fvKpOjiVd88yrl+qRZP9gRyJP/
WGDLCuRBFsWl8su2lsCdY0kEAFcYUfiAwN/bzj5n28l6O+zsLtqVgWOxmhwBvLF1IDuC3jXpYjyc
214qF9ZK8HUNXbwyFmoT7+HhvYeGQq08flWbvyksle2SMdyKWRe1HxLiRQKeSsE1K4VFin1HVi7n
H4IGHAN4kzyjbfrkT9Ph1eWwfz+4G52Xvk/HpDzJGCk9T8ctyhF2IMDPt+PR3Xh0CPFxfdOkTC2O
tq9OgSk/iWDbzpQzyCYM7FJ1/NHNIY/E/9uk8ZLwb04cxzvzxjEUFTbDxktge81T3LfKhohWo9Nu
dXBOWU8dx3bmePHc89njuDB7nNVOoXpWa762Y8emTD7yKAKTWzG2bkoi7A1YYhEywoDCKpn3DlYo
pmL2EduyJcrAJCTGkgjQX89BtjHl/YYoW+hFkhXU/vT+6u6617+avh3fINkxoVKYemqMwcxWCgmc
RmSKEdS7vIRz6G6is7uJTru8XRxtl8uHKmRoUJ4fm76wyZDus9DEjmoqYHVvm0EY2E/yx6yU8/Qx
Tab6TX3LxXSyNN8IDTgFmEEJyU1RDJI1CID42MNMS3vGip1mLH8RTyzHKhRp5BvPSBaLJUI4cPXH
6L43vRwMRyhW0XiKc8hC85h51Gi4wH6lp6gnukt10L5uRkqRrA09hc87bG5tKTl/A3BlHbnfCwAA
--=-=-=


-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord@MIT.EDU                        PGP key available

--=-=-=
Content-Type: text/sanitizer-log; charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment; filename="sanitizer.log"

This message has been 'sanitized'.  This means that potentially
dangerous content has been rewritten or removed.  The following
log describes which actions were taken.

Sanitizer (start="1033788498"):
  Part (pos="1294"):
    SanitizeFile (filename="unnamed.txt", mimetype="text/plain"):
      Match (rule="2"):
        Enforced policy: accept

  Part (pos="1934"):
    SanitizeFile (filename="gnucash-autoconf.diff", mimetype="text/x-patch"):
      Match (rule="default"):
        Enforced policy: defang

      Replaced mime type with: application/DEFANGED-3577
      Replaced file name with: gnucash-autoconf_diff.DEFANGED-3577

  Part (pos="5120"):
    SanitizeFile (filename="gnucash-autoconf.diff.gz", mimetype="application/gzip"):
      Match (rule="default"):
        Enforced policy: defang

      Replaced mime type with: application/DEFANGED-3578
      Replaced file name with: gnucash-autoconf_diff_gz.DEFANGED-3578

  Part (pos="7076"):
    SanitizeFile (filename="unnamed.txt", mimetype="text/plain"):
      Match (rule="2"):
        Enforced policy: accept

  Total modifications so far: 2


Anomy 0.0.0 : Sanitizer.pm
$Id: Sanitizer.pm,v 1.54 2002/02/15 16:59:07 bre Exp $

--=-=-=--