From: Gary V. Vaughan Date: Mon, 28 Jan 2008 05:39:26 +0000 (+0000) Subject: * libtoolize.m4sh: Set opt_ltdl whenever seen_ltdl is set X-Git-Tag: release-2-1b~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ac41623041b6e5e7ac9571564dd7b379b0cb88ac;p=thirdparty%2Flibtool.git * libtoolize.m4sh: Set opt_ltdl whenever seen_ltdl is set so that libtoolize behaves as though --ltdl was passed even if it wasn't as long as LTDL_INIT (or equivalent) was seen in configure.ac. Adjust redundant '$opt_ltdl || $seen_ltdl' to simply '$opt_ltdl'. Reported by Eric Blake --- diff --git a/ChangeLog b/ChangeLog index 7d0579bc4..1f4ed5a11 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2008-01-28 Gary V. Vaughan + * libtoolize.m4sh: Set opt_ltdl whenever seen_ltdl is set + so that libtoolize behaves as though --ltdl was passed even + if it wasn't as long as LTDL_INIT (or equivalent) was seen + in configure.ac. Adjust redundant '$opt_ltdl || $seen_ltdl' + to simply '$opt_ltdl'. + Reported by Eric Blake + * libtoolize.m4sh (func_check_macros): Check opt_quiet in the function itself to simplify calling it. Also move the definition of the function. diff --git a/libtoolize.m4sh b/libtoolize.m4sh index 255578291..31c3d047c 100644 --- a/libtoolize.m4sh +++ b/libtoolize.m4sh @@ -1047,7 +1047,7 @@ func_install_pkgmacro_files () if test -n "$macrodir"; then $opt_quiet || func_echo "putting macros in AC_CONFIG_MACRO_DIR, \`$macrodir'." - if $opt_ltdl || $seen_ltdl; then + if $opt_ltdl; then func_serial_update argz.m4 "$aclocaldir" "$macrodir" argz.m4 else func_verbose "Not copying \`$macrodir/argz.m4', libltdl not used." @@ -1056,7 +1056,7 @@ func_install_pkgmacro_files () func_serial_update libtool.m4 "$aclocaldir" "$macrodir" \ LT_INIT 'A[CM]_PROG_LIBTOOL' - if $opt_ltdl || $seen_ltdl; then + if $opt_ltdl; then func_serial_update ltdl.m4 "$aclocaldir" "$macrodir" 'LTDL_INIT' else func_verbose "Not copying \`$macrodir/ltdl.m4', libltdl not used." @@ -1093,7 +1093,7 @@ func_install_pkgltdl_files () # Copy all the files from installed libltdl to this project, if the # user specified `--ltdl'. - if $seen_ltdl || $opt_ltdl; then + if $opt_ltdl; then # Unless we share CONFIG_MACRO_DIR with our parent project, # copy macros here. @@ -1156,7 +1156,7 @@ func_check_macros () elif test -z "$macrodir"; then my_ac_config_macro_srcdir="$aclocaldir" - if test "${ltdlprefix}m4" != "$macrodir" && $seen_ltdl || $opt_ltdl; then + if $opt_ltdl && test "$macrodir" != "$subproject_macrodir"; then my_ac_config_macro_srcdir="$subproject_macrodir" fi @@ -1164,7 +1164,7 @@ func_check_macros () for need in libtool.m4 ltoptions.m4 ltversion.m4 ltsugar.m4 lt~obsolete.m4; do func_echo " \`$my_ac_config_macro_srcdir/$need'" done - if $seen_ltdl || $opt_ltdl; then + if $opt_ltdl; then for need in argz.m4 ltdl.m4; do func_echo " \`$my_ac_config_macro_srcdir/$need'" done @@ -1187,7 +1187,7 @@ func_check_macros () func_echo "Remember to add \`LTDL_INIT$ltdl_init_args' to $configure_ac." fi - if $seen_ltdl || $opt_ltdl; then + if $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'." @@ -1235,6 +1235,14 @@ func_check_macros () subproject_auxdir=${ltdlprefix}config subproject_macrodir=${ltdlprefix}m4 + # :::BE CAREFUL HERE::: + # func_check_macros needs to check whether --ltdl was specified when + # LTDL_INIT was not seen, so we can't just use one variable for both + # conditions, or that check will be impossible. No need to clutter the + # rest of the code with '$opt_ltdl || $seen_ltdl' though, because we CAN + # safely set opt_ltdl to true if LTDL_INIT was seen: + $seen_ltdl && opt_ltdl=: + func_install_pkgconfig_files func_install_pkgmacro_files func_install_pkgltdl_files