From: Ralf Wildenhues Date: Sat, 24 Jun 2006 05:00:22 +0000 (+0000) Subject: * libtool.m4 (_LT_COMPILER_BOILERPLATE, _LT_LINKER_BOILERPLATE): X-Git-Tag: release-1-5-23b~33 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=260614178bef0442876e2c79737011dc582d93ae;p=thirdparty%2Flibtool.git * libtool.m4 (_LT_COMPILER_BOILERPLATE, _LT_LINKER_BOILERPLATE): Rewrite to not use unchecked `printf', for old systems like SunOS 4.1. (AC_LIBTOOL_COMPILER_OPTION, AC_LIBTOOL_LINKER_OPTION) (AC_LIBTOOL_PROG_CC_C_O, AC_LIBTOOL_PROG_LD_SHLIBS): Likewise. (AC_LIBTOOL_LANG_C_CONFIG): Adjust: use literal newlines in `lt_simple_compile_test_code' and `lt_simple_link_test_code'. (AC_LIBTOOL_LANG_CXX_CONFIG, AC_LIBTOOL_LANG_F77_CONFIG) (AC_LIBTOOL_LANG_GCJ_CONFIG, AC_LIBTOOL_LANG_RC_CONFIG): Likewise. Bug report by Bruce Becker and Mark Andrews. --- diff --git a/ChangeLog b/ChangeLog index 5ec755116..2c4549a1e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2006-06-24 Ralf Wildenhues + + * libtool.m4 (_LT_COMPILER_BOILERPLATE, _LT_LINKER_BOILERPLATE): + Rewrite to not use unchecked `printf', for old systems like + SunOS 4.1. + (AC_LIBTOOL_COMPILER_OPTION, AC_LIBTOOL_LINKER_OPTION) + (AC_LIBTOOL_PROG_CC_C_O, AC_LIBTOOL_PROG_LD_SHLIBS): Likewise. + (AC_LIBTOOL_LANG_C_CONFIG): Adjust: use literal newlines in + `lt_simple_compile_test_code' and `lt_simple_link_test_code'. + (AC_LIBTOOL_LANG_CXX_CONFIG, AC_LIBTOOL_LANG_F77_CONFIG) + (AC_LIBTOOL_LANG_GCJ_CONFIG, AC_LIBTOOL_LANG_RC_CONFIG): + Likewise. + Bug report by Bruce Becker and Mark Andrews. + 2006-06-12 Ralf Wildenhues * ltmain.in (link mode): Disregard diff --git a/libtool.m4 b/libtool.m4 index b7f864d40..4d6701474 100644 --- a/libtool.m4 +++ b/libtool.m4 @@ -258,7 +258,7 @@ cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # the simple compiler test code. AC_DEFUN([_LT_COMPILER_BOILERPLATE], [ac_outfile=conftest.$ac_objext -printf "$lt_simple_compile_test_code" >conftest.$ac_ext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* @@ -271,7 +271,7 @@ $rm conftest* # the simple link test code. AC_DEFUN([_LT_LINKER_BOILERPLATE], [ac_outfile=conftest.$ac_objext -printf "$lt_simple_link_test_code" >conftest.$ac_ext +echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* @@ -624,7 +624,7 @@ AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], AC_CACHE_CHECK([$1], [$2], [$2=no ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. @@ -669,7 +669,7 @@ AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" - printf "$lt_simple_link_test_code" > conftest.$ac_ext + echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings @@ -1035,7 +1035,7 @@ AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], mkdir conftest cd conftest mkdir out - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or @@ -2675,10 +2675,10 @@ objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;\n" +lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}\n' +lt_simple_link_test_code='int main(){return(0);}' _LT_AC_SYS_COMPILER @@ -2784,10 +2784,10 @@ objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;\n" +lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests -lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n' +lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER @@ -3973,10 +3973,17 @@ objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests -lt_simple_compile_test_code=" subroutine t\n return\n end\n" +lt_simple_compile_test_code="\ + subroutine t + return + end +" # Code to be used in simple link tests -lt_simple_link_test_code=" program t\n end\n" +lt_simple_link_test_code="\ + program t + end +" # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER @@ -4055,10 +4062,10 @@ objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests -lt_simple_compile_test_code="class foo {}\n" +lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests -lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n' +lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER @@ -4115,7 +4122,7 @@ objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests -lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n' +lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" @@ -6316,7 +6323,7 @@ x|xyes) # to ld, don't add -lc before -lgcc. AC_MSG_CHECKING([whether -lc should be explicitly linked in]) $rm conftest* - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest