From: Ossama Othman Date: Thu, 17 Feb 2000 18:01:32 +0000 (+0000) Subject: * libtoolize.in (files): Add C++ support if configure.in uses X-Git-Tag: multi-language-merge-point~240 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a1644daf2a6fc322292f7f89b3fc3e0b7c75d853;p=thirdparty%2Flibtool.git * libtoolize.in (files): Add C++ support if configure.in uses AC_LIBTOOL_CXX, i.e. add `ltcf-cxx.sh' to list of files to be copied during libtoolization. * ltdl.m4: Added this file to the multi-language branch. --- diff --git a/ChangeLog b/ChangeLog index 06ba690c3..5bea64240 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2000-02-17 Ossama Othman + + * libtoolize.in (files): Add C++ support if configure.in uses + AC_LIBTOOL_CXX, i.e. add `ltcf-cxx.sh' to list of files to be + copied during libtoolization. + * ltdl.m4: Added this file to the multi-language branch. + 2000-02-08 Ossama Othman * ltcf-cxx.sh (predeps, postdeps, predep_objects, diff --git a/libtoolize.in b/libtoolize.in index 9dff8b512..81b554572 100644 --- a/libtoolize.in +++ b/libtoolize.in @@ -1,7 +1,7 @@ #! /bin/sh # libtoolize - Prepare a package to use libtool. # @configure_input@ -# Copyright (C) 1996-1999 Free Software Foundation, Inc. +# Copyright (C) 1996-2000 Free Software Foundation, Inc. # Originally by Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify @@ -38,6 +38,7 @@ pkgdatadir=@pkgdatadir@ aclocaldir=@aclocaldir@ libtool_m4="$aclocaldir/libtool.m4" +ltdl_m4="$aclocaldir/ltdl.m4" dry_run=no help="Try \`$progname --help' for more information." @@ -147,6 +148,12 @@ if test -z "$files"; then fi files='config.guess config.sub ltconfig ltmain.sh ltcf-c.sh' +#Add C++ support if configure.in uses AC_LIBTOOL_CXX. +if egrep '^[ ]*AC_LIBTOOL_CXX' configure.in > /dev/null 2>&1; then + files="$files ltcf-cxx.sh" +fi + + auxdir=. auxdirline=`egrep '^AC_CONFIG_AUX_DIR' configure.in 2>/dev/null` if test -n "$auxdirline"; then @@ -224,6 +231,41 @@ if test -z "$automake"; then else echo "You should $updatemsg." fi + + if grep '^AC_LIB_LTDL' configure.in >/dev/null 2>&1; then + if grep 'generated automatically by aclocal' aclocal.m4 >/dev/null 2>&1; then + updatemsg="update your \`aclocal.m4' by running aclocal" + else + updatemsg="add the contents of \`$ltdl_m4' to \`aclocal.m4'" + fi + + if egrep '^AC_DEFUN\(AC_LIB_LTDL' aclocal.m4 >/dev/null 2>&1; then + # Check the version number on ltdl.m4 and the one used in aclocal.m4. + instserial=`grep '^# serial ' $ltdl_m4 | grep 'AC_LIB_LTDL' | sed -e 's/^# serial \([0-9][0-9]*\).*$/\1/; q'` + + if test -z "$instserial"; then + echo "$progname: warning: no serial number on \`$ltdl_m4'" 1>&2 + else + # If the local macro has no serial number, we assume it's ancient. + localserial=`grep '^# serial ' aclocal.m4 | grep 'AC_LIB_LTDL' | sed -e 's/^# serial \([0-9][0-9]*\).*$/\1/; q'` + + test -z "$localserial" && localserial=0 + + if test "$localserial" -lt "$instserial"; then + echo "You should $updatemsg." + elif test "$localserial" -gt "$instserial"; then + echo "$progname: \`$ltld_m4' is serial $instserial, less than $localserial in \`aclocal.m4'" 1>&2 + if test -z "$force"; then + echo "Use \`--force' to replace newer libtool files with this version." 1>&2 + exit 1 + fi + echo "To remain compatible, you should $updatemsg." + fi + fi + else + echo "You should $updatemsg." + fi + fi fi