* Fix the autoconf-2.13/2.52/2.53 problems -- Gnucash should now

work on all versions of auto-tools, although it now requires GnuMake.

	* configure.in -- just pass LIBOBJS directly to the Makefile; pass
	  a sed script that uses '$U' (which is a 2.53ism, but works right
	  on 2.13) to the Makefile.
	* lib/libc/Makefile.am -- Use LIBOBJS and GnuMake's $(shell) syntax
	  to create the list of libobjects to be linked into "libc-missing"


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7266 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Derek Atkins 2002-10-05 14:24:10 +00:00
parent a78f77646c
commit 1b7c48a98c
3 changed files with 21 additions and 32 deletions

View File

@ -1,3 +1,13 @@
2002-10-05 Derek Atkins <derek@ihtfp.com>
* Fix the autoconf-2.13/2.52/2.53 problems -- Gnucash should now
work on all versions of auto-tools, although it now requires GnuMake.
* configure.in -- just pass LIBOBJS directly to the Makefile; pass
a sed script that uses '$U' (which is a 2.53ism, but works right
on 2.13) to the Makefile.
* lib/libc/Makefile.am -- Use LIBOBJS and GnuMake's $(shell) syntax
to create the list of libobjects to be linked into "libc-missing"
2002-10-03 Christian Stimming <stimming@tuhh.de>
* src/import-export/hbci/gnc-hbci-gettrans.[hc]: Separate the

View File

@ -838,39 +838,10 @@ chmod u+x src/bin/overrides/gnucash-make-guids
### --------------------------------------------------------------------------
### 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.
#
# 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

View File

@ -9,8 +9,16 @@ libc_missing_la_SOURCES = libc-missing-noop.c
# 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)"