joachim99@2: #### This script is meant to be sourced by ltconfig. joachim99@2: joachim99@2: # ltcf-gcj.sh - Create a GCJ compiler specific configuration joachim99@2: # joachim99@2: # Copyright (C) 1996-1999, 2000, 2001 Free Software Foundation, Inc. joachim99@2: # Originally by Gordon Matzigkeit , 1996 joachim99@2: # joachim99@2: # Original GCJ support by: joachim99@2: # Alexandre Oliva joachim99@2: # joachim99@2: # This file is free software; you can redistribute it and/or modify it joachim99@2: # under the terms of the GNU General Public License as published by joachim99@2: # the Free Software Foundation; either version 2 of the License, or joachim99@2: # (at your option) any later version. joachim99@2: # joachim99@2: # This program is distributed in the hope that it will be useful, but joachim99@2: # WITHOUT ANY WARRANTY; without even the implied warranty of joachim99@2: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU joachim99@2: # General Public License for more details. joachim99@2: # joachim99@2: # You should have received a copy of the GNU General Public License joachim99@2: # along with this program; if not, write to the Free Software joachim99@2: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. joachim99@2: # joachim99@2: # As a special exception to the GNU General Public License, if you joachim99@2: # distribute this file as part of a program that contains a joachim99@2: # configuration script generated by Autoconf, you may include it under joachim99@2: # the same distribution terms that you use for the rest of that program. joachim99@2: joachim99@2: joachim99@2: # Source file extension for Java test sources. joachim99@2: ac_ext=java joachim99@2: joachim99@2: # Object file extension for compiled Java test sources. joachim99@2: objext=o joachim99@2: joachim99@2: # Code to be used in simple compile tests joachim99@2: lt_simple_compile_test_code="class foo {}" joachim99@2: joachim99@2: # Code to be used in simple link tests joachim99@2: lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }' joachim99@2: joachim99@2: ## Linker Characteristics joachim99@2: case $host_os in joachim99@2: cygwin* | mingw*) joachim99@2: # FIXME: the MSVC++ port hasn't been tested in a loooong time joachim99@2: # When not using gcc, we currently assume that we are using joachim99@2: # Microsoft Visual C++. joachim99@2: if test "$with_gcc" != yes; then joachim99@2: with_gnu_ld=no joachim99@2: fi joachim99@2: ;; joachim99@2: joachim99@2: esac joachim99@2: joachim99@2: ld_shlibs=yes joachim99@2: if test "$with_gnu_ld" = yes; then joachim99@2: # If archive_cmds runs LD, not CC, wlarc should be empty joachim99@2: wlarc='${wl}' joachim99@2: joachim99@2: # See if GNU ld supports shared libraries. joachim99@2: case $host_os in joachim99@2: aix3* | aix4*) joachim99@2: # On AIX, the GNU linker is very broken joachim99@2: ld_shlibs=no joachim99@2: cat <&2 joachim99@2: joachim99@2: *** Warning: the GNU linker, at least up to release 2.9.1, is reported joachim99@2: *** to be unable to reliably create shared libraries on AIX. joachim99@2: *** Therefore, libtool is disabling shared libraries support. If you joachim99@2: *** really care for shared libraries, you may want to modify your PATH joachim99@2: *** so that a non-GNU linker is found, and then restart. joachim99@2: joachim99@2: EOF joachim99@2: ;; joachim99@2: joachim99@2: amigaos*) joachim99@2: 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)' joachim99@2: hardcode_libdir_flag_spec='-L$libdir' joachim99@2: hardcode_minus_L=yes joachim99@2: joachim99@2: # Samuel A. Falvo II reports joachim99@2: # that the semantics of dynamic libraries on AmigaOS, at least up joachim99@2: # to version 4, is to share data among multiple programs linked joachim99@2: # with the same dynamic library. Since this doesn't match the joachim99@2: # behavior of shared libraries on other platforms, we can use joachim99@2: # them. joachim99@2: ld_shlibs=no joachim99@2: ;; joachim99@2: joachim99@2: beos*) joachim99@2: if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then joachim99@2: allow_undefined_flag=unsupported joachim99@2: # Joseph Beckenbach says some releases of gcc joachim99@2: # support --undefined. This deserves some investigation. FIXME joachim99@2: archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' joachim99@2: else joachim99@2: ld_shlibs=no joachim99@2: fi joachim99@2: ;; joachim99@2: joachim99@2: cygwin* | mingw*) joachim99@2: # hardcode_libdir_flag_spec is actually meaningless, as there is joachim99@2: # no search path for DLLs. joachim99@2: hardcode_libdir_flag_spec='-L$libdir' joachim99@2: allow_undefined_flag=unsupported joachim99@2: always_export_symbols=yes joachim99@2: joachim99@2: extract_expsyms_cmds='test -f $output_objdir/impgen.c || \ joachim99@2: sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //; p; }" -e d < $0 > $output_objdir/impgen.c~ joachim99@2: test -f $output_objdir/impgen.exe || (cd $output_objdir && \ joachim99@2: if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \ joachim99@2: else $CC -o impgen impgen.c ; fi)~ joachim99@2: $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def' joachim99@2: joachim99@2: old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib' joachim99@2: joachim99@2: # cygwin and mingw dlls have different entry points and sets of symbols joachim99@2: # to exclude. joachim99@2: # FIXME: what about values for MSVC? joachim99@2: dll_entry=__cygwin_dll_entry@12 joachim99@2: dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~ joachim99@2: case $host_os in joachim99@2: mingw*) joachim99@2: # mingw values joachim99@2: dll_entry=_DllMainCRTStartup@12 joachim99@2: dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~ joachim99@2: ;; joachim99@2: esac joachim99@2: joachim99@2: # mingw and cygwin differ, and it's simplest to just exclude the union joachim99@2: # of the two symbol sets. joachim99@2: dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12 joachim99@2: joachim99@2: # recent cygwin and mingw systems supply a stub DllMain which the user joachim99@2: # can override, but on older systems we have to supply one (in ltdll.c) joachim99@2: if test "x$lt_cv_need_dllmain" = "xyes"; then joachim99@2: ltdll_obj='$output_objdir/$soname-ltdll.'"$objext " joachim99@2: ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $output_objdir/$soname-ltdll.c~ joachim99@2: test -f $output_objdir/$soname-ltdll.$objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~' joachim99@2: else joachim99@2: ltdll_obj= joachim99@2: ltdll_cmds= joachim99@2: fi joachim99@2: joachim99@2: # Extract the symbol export list from an `--export-all' def file, joachim99@2: # then regenerate the def file from the symbol export list, so that joachim99@2: # the compiled dll only exports the symbol export list. joachim99@2: # Be careful not to strip the DATA tag left be newer dlltools. joachim99@2: export_symbols_cmds="$ltdll_cmds"' joachim99@2: $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~ joachim99@2: sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols' joachim99@2: joachim99@2: # If the export-symbols file already is a .def file (1st line joachim99@2: # is EXPORTS), use it as is. joachim99@2: # If DATA tags from a recent dlltool are present, honour them! joachim99@2: archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then joachim99@2: cp $export_symbols $output_objdir/$soname-def; joachim99@2: else joachim99@2: echo EXPORTS > $output_objdir/$soname-def; joachim99@2: _lt_hint=1; joachim99@2: cat $export_symbols | while read symbol; do joachim99@2: set dummy \$symbol; joachim99@2: case \[$]# in joachim99@2: 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;; joachim99@2: *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;; joachim99@2: esac; joachim99@2: _lt_hint=`expr 1 + \$_lt_hint`; joachim99@2: done; joachim99@2: fi~ joachim99@2: '"$ltdll_cmds"' joachim99@2: $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~ joachim99@2: $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~ joachim99@2: $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~ joachim99@2: $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~ joachim99@2: $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags' joachim99@2: ;; joachim99@2: joachim99@2: netbsd*) joachim99@2: if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then joachim99@2: archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' joachim99@2: wlarc= joachim99@2: else joachim99@2: archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' joachim99@2: archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' joachim99@2: fi joachim99@2: ;; joachim99@2: joachim99@2: solaris* | sysv5*) joachim99@2: if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then joachim99@2: ld_shlibs=no joachim99@2: cat <&2 joachim99@2: joachim99@2: *** Warning: The releases 2.8.* of the GNU linker cannot reliably joachim99@2: *** create shared libraries on Solaris systems. Therefore, libtool joachim99@2: *** is disabling shared libraries support. We urge you to upgrade GNU joachim99@2: *** binutils to release 2.9.1 or newer. Another option is to modify joachim99@2: *** your PATH or compiler configuration so that the native linker is joachim99@2: *** used, and then restart. joachim99@2: joachim99@2: EOF joachim99@2: elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then joachim99@2: archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' joachim99@2: archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' joachim99@2: else joachim99@2: ld_shlibs=no joachim99@2: fi joachim99@2: ;; joachim99@2: joachim99@2: sunos4*) joachim99@2: archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' joachim99@2: wlarc= joachim99@2: hardcode_direct=yes joachim99@2: hardcode_shlibpath_var=no joachim99@2: ;; joachim99@2: joachim99@2: *) joachim99@2: if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then joachim99@2: archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' joachim99@2: archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' joachim99@2: else joachim99@2: ld_shlibs=no joachim99@2: fi joachim99@2: ;; joachim99@2: esac joachim99@2: joachim99@2: if test "$ld_shlibs" = yes; then joachim99@2: runpath_var=LD_RUN_PATH joachim99@2: hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' joachim99@2: export_dynamic_flag_spec='${wl}--export-dynamic' joachim99@2: case $host_os in joachim99@2: cygwin* | mingw*) joachim99@2: # dlltool doesn't understand --whole-archive et. al. joachim99@2: whole_archive_flag_spec= joachim99@2: ;; joachim99@2: *) joachim99@2: # ancient GNU ld didn't support --whole-archive et. al. joachim99@2: if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then joachim99@2: whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' joachim99@2: else joachim99@2: whole_archive_flag_spec= joachim99@2: fi joachim99@2: ;; joachim99@2: esac joachim99@2: fi joachim99@2: else joachim99@2: # PORTME fill in a description of your system's linker (not GNU ld) joachim99@2: case $host_os in joachim99@2: aix3*) joachim99@2: allow_undefined_flag=unsupported joachim99@2: always_export_symbols=yes joachim99@2: archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' joachim99@2: # Note: this linker hardcodes the directories in LIBPATH if there joachim99@2: # are no directories specified by -L. joachim99@2: hardcode_minus_L=yes joachim99@2: if test "$with_gcc" = yes && test -z "$link_static_flag"; then joachim99@2: # Neither direct hardcoding nor static linking is supported with a joachim99@2: # broken collect2. joachim99@2: hardcode_direct=unsupported joachim99@2: fi joachim99@2: ;; joachim99@2: joachim99@2: aix4* | aix5*) joachim99@2: hardcode_direct=yes joachim99@2: hardcode_libdir_separator=':' joachim99@2: link_all_deplibs=yes joachim99@2: # When large executables or shared objects are built, AIX ld can joachim99@2: # have problems creating the table of contents. If linking a library joachim99@2: # or program results in "error TOC overflow" add -mminimal-toc to joachim99@2: # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not joachim99@2: # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. joachim99@2: if test "$with_gcc" = yes; then joachim99@2: case $host_os in aix4.[012]|aix4.[012].*) joachim99@2: # We only want to do this on AIX 4.2 and lower, the check joachim99@2: # below for broken collect2 doesn't work under 4.3+ joachim99@2: collect2name=`${CC} -print-prog-name=collect2` joachim99@2: if test -f "$collect2name" && \ joachim99@2: strings "$collect2name" | grep resolve_lib_name >/dev/null joachim99@2: then joachim99@2: # We have reworked collect2 joachim99@2: hardcode_direct=yes joachim99@2: else joachim99@2: # We have old collect2 joachim99@2: hardcode_direct=unsupported joachim99@2: # It fails to find uninstalled libraries when the uninstalled joachim99@2: # path is not listed in the libpath. Setting hardcode_minus_L joachim99@2: # to unsupported forces relinking joachim99@2: hardcode_minus_L=yes joachim99@2: hardcode_libdir_flag_spec='-L$libdir' joachim99@2: hardcode_libdir_separator= joachim99@2: fi joachim99@2: esac joachim99@2: shared_flag='-shared' joachim99@2: else joachim99@2: # not using gcc joachim99@2: if test "$host_cpu" = ia64; then joachim99@2: shared_flag='${wl}-G' joachim99@2: else joachim99@2: shared_flag='${wl}-bM:SRE' joachim99@2: fi joachim99@2: fi joachim99@2: joachim99@2: if test "$host_cpu" = ia64; then joachim99@2: # On IA64, the linker does run time linking by default, so we don't joachim99@2: # have to do anything special. joachim99@2: aix_use_runtimelinking=no joachim99@2: exp_sym_flag='-Bexport' joachim99@2: no_entry_flag="" joachim99@2: else joachim99@2: # Test if we are trying to use run time linking, or normal AIX style linking. joachim99@2: # If -brtl is somewhere in LDFLAGS, we need to do run time linking. joachim99@2: aix_use_runtimelinking=no joachim99@2: for ld_flag in $LDFLAGS; do joachim99@2: if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl" ); then joachim99@2: aix_use_runtimelinking=yes joachim99@2: break joachim99@2: fi joachim99@2: done joachim99@2: exp_sym_flag='-bexport' joachim99@2: no_entry_flag='-bnoentry' joachim99@2: fi joachim99@2: # -bexpall does not export symbols beginning with underscore (_) joachim99@2: always_export_symbols=yes joachim99@2: if test "$aix_use_runtimelinking" = yes; then joachim99@2: # Warning - without using the other run time loading flags (-brtl), -berok will joachim99@2: # link without error, but may produce a broken library. joachim99@2: allow_undefined_flag=' ${wl}-berok' joachim99@2: hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib' joachim99@2: archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" joachim99@2: else joachim99@2: if test "$host_cpu" = ia64; then joachim99@2: hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' joachim99@2: allow_undefined_flag="-z nodefs" joachim99@2: archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" joachim99@2: else joachim99@2: allow_undefined_flag=' ${wl}-berok' joachim99@2: # -bexpall does not export symbols beginning with underscore (_) joachim99@2: always_export_symbols=yes joachim99@2: # Exported symbols can be pulled into shared objects from archives joachim99@2: whole_archive_flag_spec=' ' joachim99@2: build_libtool_need_lc=yes joachim99@2: hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib' joachim99@2: # This is similar to how AIX traditionally builds it's shared libraries. joachim99@2: archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' joachim99@2: fi joachim99@2: fi joachim99@2: ;; joachim99@2: joachim99@2: amigaos*) joachim99@2: 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)' joachim99@2: hardcode_libdir_flag_spec='-L$libdir' joachim99@2: hardcode_minus_L=yes joachim99@2: # see comment about different semantics on the GNU ld section joachim99@2: ld_shlibs=no joachim99@2: ;; joachim99@2: joachim99@2: cygwin* | mingw*) joachim99@2: # When not using gcc, we currently assume that we are using joachim99@2: # Microsoft Visual C++. joachim99@2: # hardcode_libdir_flag_spec is actually meaningless, as there is joachim99@2: # no search path for DLLs. joachim99@2: hardcode_libdir_flag_spec=' ' joachim99@2: allow_undefined_flag=unsupported joachim99@2: # Tell ltmain to make .lib files, not .a files. joachim99@2: libext=lib joachim99@2: # FIXME: Setting linknames here is a bad hack. joachim99@2: archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames=' joachim99@2: # The linker will automatically build a .lib file if we build a DLL. joachim99@2: old_archive_from_new_cmds='true' joachim99@2: # FIXME: Should let the user specify the lib program. joachim99@2: old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs' joachim99@2: fix_srcfile_path='`cygpath -w "$srcfile"`' joachim99@2: ;; joachim99@2: joachim99@2: freebsd1*) joachim99@2: ld_shlibs=no joachim99@2: ;; joachim99@2: joachim99@2: # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor joachim99@2: # support. Future versions do this automatically, but an explicit c++rt0.o joachim99@2: # does not break anything, and helps significantly (at the cost of a little joachim99@2: # extra space). joachim99@2: freebsd2.2*) joachim99@2: archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' joachim99@2: hardcode_libdir_flag_spec='-R$libdir' joachim99@2: hardcode_direct=yes joachim99@2: hardcode_shlibpath_var=no joachim99@2: ;; joachim99@2: joachim99@2: # Unfortunately, older versions of FreeBSD 2 do not have this feature. joachim99@2: freebsd2*) joachim99@2: archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' joachim99@2: hardcode_direct=yes joachim99@2: hardcode_minus_L=yes joachim99@2: hardcode_shlibpath_var=no joachim99@2: ;; joachim99@2: joachim99@2: # FreeBSD 3 and greater uses gcc -shared to do shared libraries. joachim99@2: freebsd*) joachim99@2: archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' joachim99@2: hardcode_libdir_flag_spec='-R$libdir' joachim99@2: hardcode_direct=yes joachim99@2: hardcode_shlibpath_var=no joachim99@2: ;; joachim99@2: joachim99@2: hpux9* | hpux10* | hpux11*) joachim99@2: case $host_os in joachim99@2: hpux9*) archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;; joachim99@2: *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;; joachim99@2: esac joachim99@2: hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' joachim99@2: hardcode_libdir_separator=: joachim99@2: hardcode_direct=yes joachim99@2: hardcode_minus_L=yes # Not in the search PATH, but as the default joachim99@2: # location of the library. joachim99@2: export_dynamic_flag_spec='${wl}-E' joachim99@2: ;; joachim99@2: joachim99@2: irix5* | irix6*) joachim99@2: if test "$with_gcc" = yes; then joachim99@2: archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' joachim99@2: else joachim99@2: archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' joachim99@2: fi joachim99@2: hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' joachim99@2: hardcode_libdir_separator=: joachim99@2: link_all_deplibs=yes joachim99@2: ;; joachim99@2: joachim99@2: netbsd*) joachim99@2: if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then joachim99@2: archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out joachim99@2: else joachim99@2: archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF joachim99@2: fi joachim99@2: hardcode_libdir_flag_spec='${wl}-R$libdir' joachim99@2: hardcode_direct=yes joachim99@2: hardcode_shlibpath_var=no joachim99@2: ;; joachim99@2: joachim99@2: openbsd*) joachim99@2: archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' joachim99@2: hardcode_libdir_flag_spec='-R$libdir' joachim99@2: hardcode_direct=yes joachim99@2: hardcode_shlibpath_var=no joachim99@2: ;; joachim99@2: joachim99@2: os2*) joachim99@2: hardcode_libdir_flag_spec='-L$libdir' joachim99@2: hardcode_minus_L=yes joachim99@2: allow_undefined_flag=unsupported joachim99@2: archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' joachim99@2: old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' joachim99@2: ;; joachim99@2: joachim99@2: osf3*) joachim99@2: if test "$with_gcc" = yes; then joachim99@2: allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' joachim99@2: archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' joachim99@2: else joachim99@2: allow_undefined_flag=' -expect_unresolved \*' joachim99@2: archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' joachim99@2: fi joachim99@2: hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' joachim99@2: hardcode_libdir_separator=: joachim99@2: ;; joachim99@2: joachim99@2: osf4* | osf5*) # as osf3* with the addition of -msym flag joachim99@2: if test "$with_gcc" = yes; then joachim99@2: allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' joachim99@2: archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' joachim99@2: else joachim99@2: allow_undefined_flag=' -expect_unresolved \*' joachim99@2: archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' joachim99@2: fi joachim99@2: hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' joachim99@2: hardcode_libdir_separator=: joachim99@2: ;; joachim99@2: joachim99@2: sco3.2v5*) joachim99@2: archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' joachim99@2: hardcode_shlibpath_var=no joachim99@2: runpath_var=LD_RUN_PATH joachim99@2: hardcode_runpath_var=yes joachim99@2: ;; joachim99@2: joachim99@2: solaris*) joachim99@2: no_undefined_flag=' -z text' joachim99@2: # $CC -shared without GNU ld will not create a library from C++ joachim99@2: # object files and a static libstdc++, better avoid it by now joachim99@2: archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' joachim99@2: archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ joachim99@2: $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' joachim99@2: hardcode_libdir_flag_spec='-R$libdir' joachim99@2: hardcode_shlibpath_var=no joachim99@2: case $host_os in joachim99@2: solaris2.[0-5] | solaris2.[0-5].*) ;; joachim99@2: *) # Supported since Solaris 2.6 (maybe 2.5.1?) joachim99@2: whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; joachim99@2: esac joachim99@2: link_all_deplibs=yes joachim99@2: ;; joachim99@2: joachim99@2: sunos4*) joachim99@2: archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' joachim99@2: hardcode_libdir_flag_spec='-L$libdir' joachim99@2: hardcode_direct=yes joachim99@2: hardcode_minus_L=yes joachim99@2: hardcode_shlibpath_var=no joachim99@2: ;; joachim99@2: joachim99@2: sysv4) joachim99@2: archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' joachim99@2: runpath_var='LD_RUN_PATH' joachim99@2: hardcode_shlibpath_var=no joachim99@2: hardcode_direct=no #Motorola manual says yes, but my tests say they lie joachim99@2: ;; joachim99@2: joachim99@2: sysv4.3*) joachim99@2: archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' joachim99@2: hardcode_shlibpath_var=no joachim99@2: export_dynamic_flag_spec='-Bexport' joachim99@2: ;; joachim99@2: joachim99@2: sysv5*) joachim99@2: no_undefined_flag=' -z text' joachim99@2: # $CC -shared without GNU ld will not create a library from C++ joachim99@2: # object files and a static libstdc++, better avoid it by now joachim99@2: archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' joachim99@2: archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ joachim99@2: $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' joachim99@2: hardcode_libdir_flag_spec= joachim99@2: hardcode_shlibpath_var=no joachim99@2: runpath_var='LD_RUN_PATH' joachim99@2: ;; joachim99@2: joachim99@2: uts4*) joachim99@2: archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' joachim99@2: hardcode_libdir_flag_spec='-L$libdir' joachim99@2: hardcode_shlibpath_var=no joachim99@2: ;; joachim99@2: joachim99@2: dgux*) joachim99@2: archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' joachim99@2: hardcode_libdir_flag_spec='-L$libdir' joachim99@2: hardcode_shlibpath_var=no joachim99@2: ;; joachim99@2: joachim99@2: sysv4*MP*) joachim99@2: if test -d /usr/nec; then joachim99@2: archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' joachim99@2: hardcode_shlibpath_var=no joachim99@2: runpath_var=LD_RUN_PATH joachim99@2: hardcode_runpath_var=yes joachim99@2: ld_shlibs=yes joachim99@2: fi joachim99@2: ;; joachim99@2: joachim99@2: sysv4.2uw2*) joachim99@2: archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' joachim99@2: hardcode_direct=yes joachim99@2: hardcode_minus_L=no joachim99@2: hardcode_shlibpath_var=no joachim99@2: hardcode_runpath_var=yes joachim99@2: runpath_var=LD_RUN_PATH joachim99@2: ;; joachim99@2: joachim99@2: unixware7*) joachim99@2: archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' joachim99@2: runpath_var='LD_RUN_PATH' joachim99@2: hardcode_shlibpath_var=no joachim99@2: ;; joachim99@2: joachim99@2: *) joachim99@2: ld_shlibs=no joachim99@2: ;; joachim99@2: esac joachim99@2: fi joachim99@2: joachim99@2: ## Compiler Characteristics: PIC flags, static flags, etc joachim99@2: joachim99@2: # We don't use cached values here since only the C compiler joachim99@2: # characteristics should be cached. joachim99@2: ac_cv_prog_cc_pic= joachim99@2: ac_cv_prog_cc_shlib= joachim99@2: ac_cv_prog_cc_wl= joachim99@2: ac_cv_prog_cc_static= joachim99@2: ac_cv_prog_cc_no_builtin= joachim99@2: ac_cv_prog_cc_can_build_shared=$can_build_shared joachim99@2: joachim99@2: ac_cv_prog_cc_wl='-Wl,' joachim99@2: ac_cv_prog_cc_static='-static' joachim99@2: joachim99@2: case $host_os in joachim99@2: beos* | irix5* | irix6* | osf3* | osf4* | osf5*) joachim99@2: # PIC is the default for these OSes. joachim99@2: ;; joachim99@2: aix*) joachim99@2: # Below there is a dirty hack to force normal static linking with -ldl joachim99@2: # The problem is because libdl dynamically linked with both libc and joachim99@2: # libC (AIX C++ library), which obviously doesn't included in libraries joachim99@2: # list by gcc. This cause undefined symbols with -static flags. joachim99@2: # This hack allows C programs to be linked with "-static -ldl", but joachim99@2: # we not sure about C++ programs. joachim99@2: ac_cv_prog_cc_static="$ac_cv_prog_cc_static ${ac_cv_prog_cc_wl}-lC" joachim99@2: ;; joachim99@2: *djgpp*) joachim99@2: # DJGPP does not suppot shared libraries at all joachim99@2: ac_cv_prog_cc_pic= joachim99@2: ;; joachim99@2: cygwin* | mingw* | os2*) joachim99@2: # This hack is so that the source file can tell whether it is being joachim99@2: # built for inclusion in a dll (and should export symbols for example). joachim99@2: ac_cv_prog_cc_pic='-DDLL_EXPORT' joachim99@2: ;; joachim99@2: amigaos*) joachim99@2: # FIXME: we need at least 68020 code to build shared libraries, but joachim99@2: # adding the `-m68020' flag to GCC prevents building anything better, joachim99@2: # like `-m68040'. joachim99@2: ac_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4' joachim99@2: ;; joachim99@2: sysv4*MP*) joachim99@2: if test -d /usr/nec; then joachim99@2: ac_cv_prog_cc_pic=-Kconform_pic joachim99@2: fi joachim99@2: ;; joachim99@2: *) joachim99@2: ac_cv_prog_cc_pic='-fPIC' joachim99@2: ;; joachim99@2: esac joachim99@2: joachim99@2: # GCJ did not exist at the time GCC didn't implicitly link libc in. joachim99@2: need_lc=no joachim99@2: joachim99@2: # All existing releases of GCJ support `-c -o'. joachim99@2: lt_cv_compiler_c_o=yes