From: Ossama Othman Date: Sun, 28 May 2000 23:40:05 +0000 (+0000) Subject: * ltmain.in: Make sure $arg is set when linking `.lo' files into a X-Git-Tag: multi-language-merge-point~215 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=43cd1a73b92f198f4a727037e1f5a3aa7a37cbea;p=thirdparty%2Flibtool.git * ltmain.in: Make sure $arg is set when linking `.lo' files into a program. Moved tag decision code after check for recognized source file extension (fixes "suffix" test failure). Merged Rhapsody support from main trunk. (output_obj) Added missing '$' before "echo" command (fixes "sh" test failure). * tests/suffix.test: Corrected typo in error message, and improved the message. --- diff --git a/ChangeLog b/ChangeLog index d512dc64f..ba755af88 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2000-05-27 Ossama Othman + + * ltmain.in: Make sure $arg is set when linking `.lo' files into a + program. Moved tag decision code after check for recognized + source file extension (fixes "suffix" test failure). Merged + Rhapsody support from main trunk. + (output_obj) Added missing '$' before "echo" command (fixes "sh" + test failure). + * tests/suffix.test: Corrected typo in error message, and improved + the message. + 2000-05-27 Gary V. Vaughan * README-alpha: note new location of config.(guess|sub). diff --git a/configure.in b/configure.in index 85f53d75c..32f10f423 100644 --- a/configure.in +++ b/configure.in @@ -59,7 +59,7 @@ popdef([AC_MSG_ERROR]) AM_CONDITIONAL(HAVE_CXX, [test "x$CXX" != xno]) pushdef([AC_MSG_ERROR], [GCJ=no]) -AM_PROG_GCJ +#AM_PROG_GCJ popdef([AC_MSG_ERROR]) AM_CONDITIONAL(HAVE_GCJ, [test "x$GCJ" != xno]) diff --git a/ltmain.in b/ltmain.in index 33828a20c..509c338d6 100644 --- a/ltmain.in +++ b/ltmain.in @@ -433,36 +433,6 @@ if test -z "$show_help"; then fi done - # Infer tagged configuration to use if any are available and - # if one wasn't chosen via the "--tag" command line option. - # Only attempt this if the compiler in the base compile - # command doesn't match the default compiler. - if test -n "$available_tags" && test -z "$tagname" && echo $base_compile | grep -v "^[ ]*[^ ]*$CC" > /dev/null; then - for z in $available_tags; do - if grep "^### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; then - # Evaluate the configuration. - eval "`sed -n -e '/^### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`" - if echo $base_compile | grep "^[ ]*[^ ]*$CC" > /dev/null; then - # The compiler in the base compile command matches - # the one in the tagged configuration. - # Assume this is the tagged configuration we want. - tagname=$z - break - fi - fi - done - # If $tagname still isn't set, then no tagged configuration - # was found and let the user know that the "--tag" command - # line option must be used. - if test -z "$tagname"; then - echo "$modename: unable to infer tagged configuration" - echo "$modename: specify a tag with \`--tag'" 1>&2 - exit 1 -# else -# echo "$modename: using $tagname tagged configuration" - fi - fi - case "$user_target" in set) ;; @@ -504,7 +474,37 @@ if test -z "$show_help"; then ;; esac - objname=`echo "X$obj" | $Xsed -e 's%^.*/%%'` + # Infer tagged configuration to use if any are available and + # if one wasn't chosen via the "--tag" command line option. + # Only attempt this if the compiler in the base compile + # command doesn't match the default compiler. + if test -n "$available_tags" && test -z "$tagname" && echo $base_compile | grep -v "^[ ]*[^ ]*$CC" > /dev/null; then + for z in $available_tags; do + if grep "^### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; then + # Evaluate the configuration. + eval "`sed -n -e '/^### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`" + if echo $base_compile | grep "^[ ]*[^ ]*$CC" > /dev/null; then + # The compiler in the base compile command matches + # the one in the tagged configuration. + # Assume this is the tagged configuration we want. + tagname=$z + break + fi + fi + done + # If $tagname still isn't set, then no tagged configuration + # was found and let the user know that the "--tag" command + # line option must be used. + if test -z "$tagname"; then + echo "$modename: unable to infer tagged configuration" + echo "$modename: specify a tag with \`--tag'" 1>&2 + exit 1 +# else +# echo "$modename: using $tagname tagged configuration" + fi + fi + + objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$obj"; then xdir= @@ -1101,6 +1101,10 @@ EOF $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 fast_install=no ;; + *-*-rhapsody*) + # rhapsody is a little odd... + deplibs="$deplibs -framework System" + ;; *) no_install=yes ;; @@ -1285,6 +1289,7 @@ EOF # A PIC object. libobjs="$libobjs $pic_object" + arg="$pic_object" fi # Non-PIC object. @@ -1294,6 +1299,9 @@ EOF # A standard non-PIC object non_pic_objects="$non_pic_objects $non_pic_object" + if test -z "$pic_object" || test "$pic_object" = none ; then + arg="$non_pic_object" + fi fi else # Only an error if not doing a dry-run. diff --git a/tests/suffix.test b/tests/suffix.test index 169eccb12..11498e05b 100755 --- a/tests/suffix.test +++ b/tests/suffix.test @@ -29,7 +29,7 @@ done for name in $bad_names; do if ($libtool -n --mode=compile compiler -c $name 2>&1; exit 0) | grep 'cannot'; then : else - echo "recognized foo.$ext as a valid source file" + echo "incorrectly recognized $name as a valid source file" status=1 fi done