Okay to commit? Index: ChangeLog from Gary V. Vaughan <[EMAIL PROTECTED]> * libtoolize.m4sh (Main): Copy (or link) libltdl sources into project tree when LTDL_INIT was seen, whether or not `--ltdl' is passed. (func_check_macros): Recommend LTDL_INIT instead o LT_WITH_LTDL when `--ltdl' is used before configure.ac is upgraded. * tests/libtoolize.at: Test that it works. (_LT_AT_LTDL_SETUP): Factor out some common test setup. Reported by Eric Blake <[EMAIL PROTECTED]> Index: libtoolize.m4sh =================================================================== RCS file: /sources/libtool/libtool/libtoolize.m4sh,v retrieving revision 1.65 diff -u -u -r1.65 libtoolize.m4sh --- libtoolize.m4sh 17 Jan 2008 05:36:21 -0000 1.65 +++ libtoolize.m4sh 25 Jan 2008 04:43:17 -0000 @@ -921,7 +921,7 @@ func_echo "and rerunning libtoolize." fi elif test -z "$m4dir"; then - if $opt_ltdl && test "${ltdlprefix}m4" != "$m4dir"; then + if test "${ltdlprefix}m4" != "$m4dir" && $seen_ltdl || $opt_ltdl; then acmacrodir="${ltdlprefix}m4" else acmacrodir="$aclocaldir" @@ -945,12 +945,16 @@ $seen_libtool || func_echo "Remember to add \`LT_INIT' to $configure_ac." - if $opt_ltdl; then - - # Suggest using LT_WITH_LTDL if appropriate: - $seen_ltdl || - func_echo "Consider adding \`LT_WITH_LTDL' to $configure_ac" + # Suggest using LTDL_INIT if appropriate: + $opt_ltdl && if test x$seen_ltdl != x:; then + case $ltdl_mode in + subproject) ltdl_init_args="" ;; + *) ltdl_init_args="([$ltdl_mode])" ;; + esac + func_echo "Remember to add \`LTDL_INIT$ltdl_init_args' to $configure_ac." + fi + if $seen_ltdl || $opt_ltdl; then # Remind the user to call LT_CONFIG_LTDL_DIR: test -n "$ac_ltdldir" || func_echo "Remember to add \`LT_CONFIG_LTDL_DIR([$ltdldir])' to \`$configure_ac'." @@ -961,13 +965,13 @@ func_echo "Consider using \`AC_CONFIG_AUX_DIR([${ltdlprefix}config])' in $configure_ac." $ac_config_macro_dir_advised || test "${ltdlprefix}m4" = "$m4dir" || func_echo "Consider using \`AC_CONFIG_MACRO_DIR([${ltdlprefix}m4])' in $configure_ac." - else - # Don't trace for this, we're just checking the user didn't invoke it - # directly from configure.ac. - $SED 's,dnl .*$,,; s,# .*$,,' "$configure_ac" | grep AC_PROG_RANLIB >/dev/null && - func_echo "\`AC_PROG_RANLIB' is rendered obsolete by \`LT_INIT'" fi + # Don't trace for this, we're just checking the user didn't invoke it + # directly from configure.ac. + $SED 's,dnl .*$,,; s,# .*$,,' "$configure_ac" | grep AC_PROG_RANLIB >/dev/null && + func_echo "\`AC_PROG_RANLIB' is rendered obsolete by \`LT_INIT'" + # FIXME: Ensure ltmain.sh, libtool.m4 and ltdl.m4 are from the same release } @@ -1136,7 +1140,7 @@ if test -n "$m4dir"; then $opt_quiet || func_echo "putting macros in AC_CONFIG_MACRO_DIR, \`$m4dir'." - if $seen_ltdl; then + if $opt_ltdl || $seen_ltdl; then func_serial_update argz.m4 "$aclocaldir" "$m4dir" argz.m4 else func_verbose "Not copying \`$m4dir/argz.m4', libltdl not used." @@ -1145,7 +1149,7 @@ func_serial_update libtool.m4 "$aclocaldir" "$m4dir" \ LT_INIT 'A[CM]_PROG_LIBTOOL' - if $seen_ltdl; then + if $opt_ltdl || $seen_ltdl; then func_serial_update ltdl.m4 "$aclocaldir" "$m4dir" 'LTDL_INIT' else func_verbose "Not copying \`$m4dir/ltdl.m4', libltdl not used." @@ -1175,7 +1179,7 @@ # Copy all the files from installed libltdl to this project, if the # user specified `--ltdl'. - if $opt_ltdl; then + if $seen_ltdl || $opt_ltdl; then # Unless we share CONFIG_MACRO_DIR with our parent project, # copy macros here. Index: tests/libtoolize.at =================================================================== RCS file: /sources/libtool/libtool/tests/libtoolize.at,v retrieving revision 1.13 diff -u -u -r1.13 libtoolize.at --- tests/libtoolize.at 1 Jul 2007 20:55:13 -0000 1.13 +++ tests/libtoolize.at 25 Jan 2008 04:43:17 -0000 @@ -292,19 +292,10 @@ ## Make sure ltdl.m4 is copied. ## ## ---------------------------- ## -AT_SETUP([copy ltdl.m4 with shared macro directory]) - -AT_DATA([configure.ac], -[[AC_INIT([libtoolize-demo], ]AT_PACKAGE_VERSION[, ]AT_PACKAGE_BUGREPORT[) -LT_CONFIG_LTDL_DIR([ltdl]) -AC_CONFIG_AUX_DIR([ltdl/config]) -AC_CONFIG_MACRO_DIR([ltdl/m4]) -LT_INIT -LT_WITH_LTDL -AC_OUTPUT -]]) - -AT_DATA(expout, +# _LT_AT_LTDL_SETUP +# ----------------- +m4_pushdef([_LT_AT_LTDL_SETUP], +[AT_DATA(expout, [[libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `ltdl/m4'. libtoolize: linking file `ltdl/m4/argz.m4' libtoolize: linking file `ltdl/m4/libtool.m4' @@ -356,10 +347,114 @@ libtoolize: linking file `ltdl/config/ltmain.sh' ]]) +AT_DATA([configure.ac], +[[AC_INIT([libtoolize-demo], ]AT_PACKAGE_VERSION[, ]AT_PACKAGE_BUGREPORT[) +LT_CONFIG_LTDL_DIR([ltdl]) +AC_CONFIG_AUX_DIR([ltdl/config]) +AC_CONFIG_MACRO_DIR([ltdl/m4]) +LT_INIT +LTDL_INIT +AC_OUTPUT +]]) +])# _LT_AT_LTDL_SETUP + +## ------------------------------------------------ ## +## First we make sure libtoolize --ltdl is working. ## +## ------------------------------------------------ ## + +AT_SETUP([copy ltdl.m4 with shared macro directory]) + +_LT_AT_LTDL_SETUP + LT_AT_CHECK_LIBTOOLIZE([--ltdl], 0, expout) AT_CLEANUP +## ----------------------------------------------------- ## +## And also that libtoolize is taking note of LTDL_INIT. ## +## ----------------------------------------------------- ## + +AT_SETUP([correctly parse LTDL_INIT from configure.ac]) + +_LT_AT_LTDL_SETUP + +LT_AT_CHECK_LIBTOOLIZE([], 0, expout) + +AT_CLEANUP + +## ----------------------------------------------------------- ## +## And finally, that libtoolize diagnoses a missing LTDL_INIT. ## +## ----------------------------------------------------------- ## + +AT_SETUP([diagnose missing LTDL_INIT invocation]) + +AT_DATA(expout, +[[libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `ltdl/m4'. +libtoolize: copying file `ltdl/m4/argz.m4' +libtoolize: copying file `ltdl/m4/libtool.m4' +libtoolize: copying file `ltdl/m4/ltdl.m4' +libtoolize: copying file `ltdl/m4/ltoptions.m4' +libtoolize: copying file `ltdl/m4/ltsugar.m4' +libtoolize: copying file `ltdl/m4/ltversion.m4' +libtoolize: copying file `ltdl/m4/lt~obsolete.m4' +libtoolize: copying file `ltdl/COPYING.LIB' +libtoolize: copying file `ltdl/README' +libtoolize: copying file `ltdl/Makefile.am' +libtoolize: copying file `ltdl/configure.ac' +libtoolize: copying file `ltdl/aclocal.m4' +libtoolize: copying file `ltdl/Makefile.in' +libtoolize: copying file `ltdl/config-h.in' +libtoolize: copying file `ltdl/configure' +libtoolize: copying file `ltdl/argz_.h' +libtoolize: copying file `ltdl/argz.c' +libtoolize: copying file `ltdl/loaders/dld_link.c' +libtoolize: copying file `ltdl/loaders/dlopen.c' +libtoolize: copying file `ltdl/loaders/dyld.c' +libtoolize: copying file `ltdl/loaders/load_add_on.c' +libtoolize: copying file `ltdl/loaders/loadlibrary.c' +libtoolize: copying file `ltdl/loaders/shl_load.c' +libtoolize: copying file `ltdl/lt__dirent.c' +libtoolize: copying file `ltdl/lt__strl.c' +libtoolize: copying file `ltdl/libltdl/lt__alloc.h' +libtoolize: copying file `ltdl/libltdl/lt__dirent.h' +libtoolize: copying file `ltdl/libltdl/lt__glibc.h' +libtoolize: copying file `ltdl/libltdl/lt__private.h' +libtoolize: copying file `ltdl/libltdl/lt__strl.h' +libtoolize: copying file `ltdl/libltdl/lt_dlloader.h' +libtoolize: copying file `ltdl/libltdl/lt_error.h' +libtoolize: copying file `ltdl/libltdl/lt_system.h' +libtoolize: copying file `ltdl/libltdl/slist.h' +libtoolize: copying file `ltdl/loaders/preopen.c' +libtoolize: copying file `ltdl/lt__alloc.c' +libtoolize: copying file `ltdl/lt_dlloader.c' +libtoolize: copying file `ltdl/lt_error.c' +libtoolize: copying file `ltdl/ltdl.c' +libtoolize: copying file `ltdl/ltdl.h' +libtoolize: copying file `ltdl/slist.c' +libtoolize: copying file `ltdl/config/compile' +libtoolize: copying file `ltdl/config/config.guess' +libtoolize: copying file `ltdl/config/config.sub' +libtoolize: copying file `ltdl/config/depcomp' +libtoolize: copying file `ltdl/config/install-sh' +libtoolize: copying file `ltdl/config/missing' +libtoolize: copying file `ltdl/config/ltmain.sh' +libtoolize: Remember to add `LTDL_INIT' to configure.ac. +]]) + +AT_DATA([configure.ac], +[[AC_INIT([libtoolize-demo], ]AT_PACKAGE_VERSION[, ]AT_PACKAGE_BUGREPORT[) +LT_CONFIG_LTDL_DIR([ltdl]) +AC_CONFIG_AUX_DIR([ltdl/config]) +AC_CONFIG_MACRO_DIR([ltdl/m4]) +LT_INIT +AC_OUTPUT +]]) + +LT_AT_CHECK_LIBTOOLIZE([--ltdl --copy], 0, expout) + +AT_CLEANUP + +m4_popdef([_LT_AT_LTDL_SETUP]) ## ------------------------------------------------------ ## ## Creating an aclocal.m4 without in-tree libtool macros. ## -- ())_. Email me: [EMAIL PROTECTED] ( '/ Read my blog: http://blog.azazil.net / )= ...and my book: http://sources.redhat.com/autobook `(_~)_ Join my AGLOCO Network: http://www.agloco.com/r/BBBS7912 _________________________________________________________ This patch notification generated by vcsapply version 1.0 http://savannah.gnu.org/projects/cvs-utils
pgpwhHtieWOzb.pgp
Description: PGP signature