| [2] | 1 | #### This script is meant to be sourced by ltconfig.
|
|---|
| 2 |
|
|---|
| 3 | # ltcf-gcj.sh - Create a GCJ compiler specific configuration
|
|---|
| 4 | #
|
|---|
| 5 | # Copyright (C) 1996-1999, 2000, 2001 Free Software Foundation, Inc.
|
|---|
| 6 | # Originally by Gordon Matzigkeit <[email protected]>, 1996
|
|---|
| 7 | #
|
|---|
| 8 | # Original GCJ support by:
|
|---|
| 9 | # Alexandre Oliva <[email protected]>
|
|---|
| 10 | #
|
|---|
| 11 | # This file is free software; you can redistribute it and/or modify it
|
|---|
| 12 | # under the terms of the GNU General Public License as published by
|
|---|
| 13 | # the Free Software Foundation; either version 2 of the License, or
|
|---|
| 14 | # (at your option) any later version.
|
|---|
| 15 | #
|
|---|
| 16 | # This program is distributed in the hope that it will be useful, but
|
|---|
| 17 | # WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 18 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|---|
| 19 | # General Public License for more details.
|
|---|
| 20 | #
|
|---|
| 21 | # You should have received a copy of the GNU General Public License
|
|---|
| 22 | # along with this program; if not, write to the Free Software
|
|---|
| 23 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|---|
| 24 | #
|
|---|
| 25 | # As a special exception to the GNU General Public License, if you
|
|---|
| 26 | # distribute this file as part of a program that contains a
|
|---|
| 27 | # configuration script generated by Autoconf, you may include it under
|
|---|
| 28 | # the same distribution terms that you use for the rest of that program.
|
|---|
| 29 |
|
|---|
| 30 |
|
|---|
| 31 | # Source file extension for Java test sources.
|
|---|
| 32 | ac_ext=java
|
|---|
| 33 |
|
|---|
| 34 | # Object file extension for compiled Java test sources.
|
|---|
| 35 | objext=o
|
|---|
| 36 |
|
|---|
| 37 | # Code to be used in simple compile tests
|
|---|
| 38 | lt_simple_compile_test_code="class foo {}"
|
|---|
| 39 |
|
|---|
| 40 | # Code to be used in simple link tests
|
|---|
| 41 | lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }'
|
|---|
| 42 |
|
|---|
| 43 | ## Linker Characteristics
|
|---|
| 44 | case $host_os in
|
|---|
| 45 | cygwin* | mingw*)
|
|---|
| 46 | # FIXME: the MSVC++ port hasn't been tested in a loooong time
|
|---|
| 47 | # When not using gcc, we currently assume that we are using
|
|---|
| 48 | # Microsoft Visual C++.
|
|---|
| 49 | if test "$with_gcc" != yes; then
|
|---|
| 50 | with_gnu_ld=no
|
|---|
| 51 | fi
|
|---|
| 52 | ;;
|
|---|
| 53 |
|
|---|
| 54 | esac
|
|---|
| 55 |
|
|---|
| 56 | ld_shlibs=yes
|
|---|
| 57 | if test "$with_gnu_ld" = yes; then
|
|---|
| 58 | # If archive_cmds runs LD, not CC, wlarc should be empty
|
|---|
| 59 | wlarc='${wl}'
|
|---|
| 60 |
|
|---|
| 61 | # See if GNU ld supports shared libraries.
|
|---|
| 62 | case $host_os in
|
|---|
| 63 | aix3* | aix4* | aix5*)
|
|---|
| 64 | # On AIX/PPC, the GNU linker is very broken
|
|---|
| 65 | if test "$host_cpu" != ia64; then
|
|---|
| 66 | ld_shlibs=no
|
|---|
| 67 | cat <<EOF 1>&2
|
|---|
| 68 |
|
|---|
| 69 | *** Warning: the GNU linker, at least up to release 2.9.1, is reported
|
|---|
| 70 | *** to be unable to reliably create shared libraries on AIX.
|
|---|
| 71 | *** Therefore, libtool is disabling shared libraries support. If you
|
|---|
| 72 | *** really care for shared libraries, you may want to modify your PATH
|
|---|
| 73 | *** so that a non-GNU linker is found, and then restart.
|
|---|
| 74 |
|
|---|
| 75 | EOF
|
|---|
| 76 | fi
|
|---|
| 77 | ;;
|
|---|
| 78 |
|
|---|
| 79 | amigaos*)
|
|---|
| 80 | archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
|
|---|
| 81 | hardcode_libdir_flag_spec='-L$libdir'
|
|---|
| 82 | hardcode_minus_L=yes
|
|---|
| 83 |
|
|---|
| 84 | # Samuel A. Falvo II <[email protected]> reports
|
|---|
| 85 | # that the semantics of dynamic libraries on AmigaOS, at least up
|
|---|
| 86 | # to version 4, is to share data among multiple programs linked
|
|---|
| 87 | # with the same dynamic library. Since this doesn't match the
|
|---|
| 88 | # behavior of shared libraries on other platforms, we can use
|
|---|
| 89 | # them.
|
|---|
| 90 | ld_shlibs=no
|
|---|
| 91 | ;;
|
|---|
| 92 |
|
|---|
| 93 | beos*)
|
|---|
| 94 | if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
|
|---|
| 95 | allow_undefined_flag=unsupported
|
|---|
| 96 | # Joseph Beckenbach <[email protected]> says some releases of gcc
|
|---|
| 97 | # support --undefined. This deserves some investigation. FIXME
|
|---|
| 98 | archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
|
|---|
| 99 | else
|
|---|
| 100 | ld_shlibs=no
|
|---|
| 101 | fi
|
|---|
| 102 | ;;
|
|---|
| 103 |
|
|---|
| 104 | cygwin* | mingw*)
|
|---|
| 105 | # hardcode_libdir_flag_spec is actually meaningless, as there is
|
|---|
| 106 | # no search path for DLLs.
|
|---|
| 107 | hardcode_libdir_flag_spec='-L$libdir'
|
|---|
| 108 | allow_undefined_flag=unsupported
|
|---|
| 109 | always_export_symbols=yes
|
|---|
| 110 |
|
|---|
| 111 | extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
|
|---|
| 112 | sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //; p; }" -e d < $0 > $output_objdir/impgen.c~
|
|---|
| 113 | test -f $output_objdir/impgen.exe || (cd $output_objdir && \
|
|---|
| 114 | if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
|
|---|
| 115 | else $CC -o impgen impgen.c ; fi)~
|
|---|
| 116 | $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
|
|---|
| 117 |
|
|---|
| 118 | old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
|
|---|
| 119 |
|
|---|
| 120 | # cygwin and mingw dlls have different entry points and sets of symbols
|
|---|
| 121 | # to exclude.
|
|---|
| 122 | # FIXME: what about values for MSVC?
|
|---|
| 123 | dll_entry=__cygwin_dll_entry@12
|
|---|
| 124 | dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
|
|---|
| 125 | case $host_os in
|
|---|
| 126 | mingw*)
|
|---|
| 127 | # mingw values
|
|---|
| 128 | dll_entry=_DllMainCRTStartup@12
|
|---|
| 129 | dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
|
|---|
| 130 | ;;
|
|---|
| 131 | esac
|
|---|
| 132 |
|
|---|
| |
|---|