This combination of Per's -DPIC change and Albert's -c -o change appears to work best. I've appended it below. The only problem left is the static library problem previously reported.
Thanks! AG 2001-03-01 Anthony Green <[EMAIL PROTECTED]> * libtool.m4 (AC_LIBTOOL_PROG_CC_C_O): Albert Chin's gcj fix. (AC_LIBTOOL_PROG_COMPILER_PIC): Per Bothner's change for not using -DPIC with gcj. Index: libtool.m4 =================================================================== RCS file: /cvsroot/libtool/libtool/libtool.m4,v retrieving revision 1.248 diff -u -p -c -r1.248 libtool.m4 *** libtool.m4 7 Feb 2002 19:54:36 -0000 1.248 --- libtool.m4 2 Mar 2002 01:13:23 -0000 *************** AC_CACHE_CHECK([if $compiler supports -c *** 832,839 **** CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"], [$1],[CXX],[save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS -o out/conftest2.$ac_objext"], ! [$1],[GCJ],[save_GCJFLAGS="$GCJFLAGS" ! GCJFLAGS="$GCJFLAGS -o out/conftest2.$ac_objext"]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext # According to Tom Tromey, Ian Lance Taylor reported there are C compilers --- 832,839 ---- CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"], [$1],[CXX],[save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS -o out/conftest2.$ac_objext"], ! [$1],[GCJ],[save_GCJFLAGS="$CFLAGS" ! CFLAGS="$GCJFLAGS -o out/conftest2.$ac_objext"]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext # According to Tom Tromey, Ian Lance Taylor reported there are C compilers *************** AC_CACHE_CHECK([if $compiler supports -c *** 856,862 **** fi ifelse([$1],[],[CFLAGS="$save_CFLAGS"], [$1],[CXX],[CXXFLAGS="$save_CXXFLAGS"], ! [$1],[GCJ],[GCJFLAGS="$save_GCJFLAGS"]) chmod u+w . $rm conftest* out/* rmdir out --- 856,862 ---- fi ifelse([$1],[],[CFLAGS="$save_CFLAGS"], [$1],[CXX],[CXXFLAGS="$save_CXXFLAGS"], ! [$1],[GCJ],[CFLAGS="$save_CFLAGS"]) chmod u+w . $rm conftest* out/* rmdir out *************** objext=o *** 3155,3161 **** _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests ! 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) {}; }' --- 3155,3161 ---- _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests ! 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) {}; }' *************** AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_co *** 4294,4300 **** if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), ! [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) -DPIC], [], [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; --- 4294,4300 ---- if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), ! [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[GCJ],[],[ -DPIC])], [], [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; *************** case "$host_os" in *** 4308,4314 **** _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) ! _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) -DPIC" ;; esac ]) --- 4308,4314 ---- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) ! _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[GCJ],[],[ -DPIC])" ;; esac ]) _______________________________________________ Libtool mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/libtool