xref: /openbsd-src/gnu/usr.bin/binutils/ltcf-gcj.sh (revision d2201f2f89f0be1a0be6f7568000ed297414a06d)
15f210c2aSfgsch#### This script is meant to be sourced by ltconfig.
25f210c2aSfgsch
35f210c2aSfgsch# ltcf-gcj.sh - Create a GCJ compiler specific configuration
45f210c2aSfgsch#
5*d2201f2fSdrahn# Copyright (C) 1996-1999, 2000, 2001, 2003 Free Software Foundation, Inc.
65f210c2aSfgsch# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
75f210c2aSfgsch#
85f210c2aSfgsch# Original GCJ support by:
95f210c2aSfgsch#    Alexandre Oliva <oliva@lsd.ic.unicamp.br>
105f210c2aSfgsch#
115f210c2aSfgsch# This file is free software; you can redistribute it and/or modify it
125f210c2aSfgsch# under the terms of the GNU General Public License as published by
135f210c2aSfgsch# the Free Software Foundation; either version 2 of the License, or
145f210c2aSfgsch# (at your option) any later version.
155f210c2aSfgsch#
165f210c2aSfgsch# This program is distributed in the hope that it will be useful, but
175f210c2aSfgsch# WITHOUT ANY WARRANTY; without even the implied warranty of
185f210c2aSfgsch# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
195f210c2aSfgsch# General Public License for more details.
205f210c2aSfgsch#
215f210c2aSfgsch# You should have received a copy of the GNU General Public License
225f210c2aSfgsch# along with this program; if not, write to the Free Software
235f210c2aSfgsch# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
245f210c2aSfgsch#
255f210c2aSfgsch# As a special exception to the GNU General Public License, if you
265f210c2aSfgsch# distribute this file as part of a program that contains a
275f210c2aSfgsch# configuration script generated by Autoconf, you may include it under
285f210c2aSfgsch# the same distribution terms that you use for the rest of that program.
295f210c2aSfgsch
305f210c2aSfgsch
315f210c2aSfgsch# Source file extension for Java test sources.
325f210c2aSfgschac_ext=java
335f210c2aSfgsch
345f210c2aSfgsch# Object file extension for compiled Java test sources.
355f210c2aSfgschobjext=o
365f210c2aSfgsch
375f210c2aSfgsch# Code to be used in simple compile tests
385f210c2aSfgschlt_simple_compile_test_code="class foo {}"
395f210c2aSfgsch
405f210c2aSfgsch# Code to be used in simple link tests
415f210c2aSfgschlt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }'
425f210c2aSfgsch
435f210c2aSfgsch## Linker Characteristics
44*d2201f2fSdrahncase $host_os in
455f210c2aSfgschcygwin* | mingw*)
465f210c2aSfgsch  # FIXME: the MSVC++ port hasn't been tested in a loooong time
475f210c2aSfgsch  # When not using gcc, we currently assume that we are using
485f210c2aSfgsch  # Microsoft Visual C++.
495f210c2aSfgsch  if test "$with_gcc" != yes; then
505f210c2aSfgsch    with_gnu_ld=no
515f210c2aSfgsch  fi
525f210c2aSfgsch  ;;
535f210c2aSfgsch
545f210c2aSfgschesac
555f210c2aSfgsch
565f210c2aSfgschld_shlibs=yes
575f210c2aSfgschif test "$with_gnu_ld" = yes; then
585f210c2aSfgsch  # If archive_cmds runs LD, not CC, wlarc should be empty
595f210c2aSfgsch  wlarc='${wl}'
605f210c2aSfgsch
615f210c2aSfgsch  # See if GNU ld supports shared libraries.
62*d2201f2fSdrahn  case $host_os in
63*d2201f2fSdrahn  aix3* | aix4* | aix5*)
64*d2201f2fSdrahn    # On AIX/PPC, the GNU linker is very broken
65*d2201f2fSdrahn    if test "$host_cpu" != ia64; then
665f210c2aSfgsch      ld_shlibs=no
675f210c2aSfgsch      cat <<EOF 1>&2
685f210c2aSfgsch
695f210c2aSfgsch*** Warning: the GNU linker, at least up to release 2.9.1, is reported
705f210c2aSfgsch*** to be unable to reliably create shared libraries on AIX.
715f210c2aSfgsch*** Therefore, libtool is disabling shared libraries support.  If you
725f210c2aSfgsch*** really care for shared libraries, you may want to modify your PATH
735f210c2aSfgsch*** so that a non-GNU linker is found, and then restart.
745f210c2aSfgsch
755f210c2aSfgschEOF
76*d2201f2fSdrahn    fi
775f210c2aSfgsch    ;;
785f210c2aSfgsch
795f210c2aSfgsch  amigaos*)
805f210c2aSfgsch    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)'
815f210c2aSfgsch    hardcode_libdir_flag_spec='-L$libdir'
825f210c2aSfgsch    hardcode_minus_L=yes
835f210c2aSfgsch
845f210c2aSfgsch    # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
855f210c2aSfgsch    # that the semantics of dynamic libraries on AmigaOS, at least up
865f210c2aSfgsch    # to version 4, is to share data among multiple programs linked
875f210c2aSfgsch    # with the same dynamic library.  Since this doesn't match the
885f210c2aSfgsch    # behavior of shared libraries on other platforms, we can use
895f210c2aSfgsch    # them.
905f210c2aSfgsch    ld_shlibs=no
915f210c2aSfgsch    ;;
925f210c2aSfgsch
935f210c2aSfgsch  beos*)
945f210c2aSfgsch    if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
955f210c2aSfgsch      allow_undefined_flag=unsupported
965f210c2aSfgsch      # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
975f210c2aSfgsch      # support --undefined.  This deserves some investigation.  FIXME
985f210c2aSfgsch      archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
995f210c2aSfgsch    else
1005f210c2aSfgsch      ld_shlibs=no
1015f210c2aSfgsch    fi
1025f210c2aSfgsch    ;;
1035f210c2aSfgsch
1045f210c2aSfgsch  cygwin* | mingw*)
1055f210c2aSfgsch    # hardcode_libdir_flag_spec is actually meaningless, as there is
1065f210c2aSfgsch    # no search path for DLLs.
1075f210c2aSfgsch    hardcode_libdir_flag_spec='-L$libdir'
1085f210c2aSfgsch    allow_undefined_flag=unsupported
1095f210c2aSfgsch    always_export_symbols=yes
1105f210c2aSfgsch
1115f210c2aSfgsch    extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
1125f210c2aSfgsch      sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //; p; }" -e d < $0 > $output_objdir/impgen.c~
1135f210c2aSfgsch      test -f $output_objdir/impgen.exe || (cd $output_objdir && \
114*d2201f2fSdrahn      if test "x$BUILD_CC" != "x" ; then $BUILD_CC -o impgen impgen.c ; \
1155f210c2aSfgsch      else $CC -o impgen impgen.c ; fi)~
116*d2201f2fSdrahn      $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
1175f210c2aSfgsch
1185f210c2aSfgsch    old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
1195f210c2aSfgsch
1205f210c2aSfgsch    # cygwin and mingw dlls have different entry points and sets of symbols
1215f210c2aSfgsch    # to exclude.
1225f210c2aSfgsch    # FIXME: what about values for MSVC?
1235f210c2aSfgsch    dll_entry=__cygwin_dll_entry@12
1245f210c2aSfgsch    dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
125*d2201f2fSdrahn    case $host_os in
1265f210c2aSfgsch    mingw*)
1275f210c2aSfgsch      # mingw values
1285f210c2aSfgsch      dll_entry=_DllMainCRTStartup@12
1295f210c2aSfgsch      dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
1305f210c2aSfgsch      ;;
1315f210c2aSfgsch    esac
1325f210c2aSfgsch
1335f210c2aSfgsch    # mingw and cygwin differ, and it's simplest to just exclude the union
1345f210c2aSfgsch    # of the two symbol sets.
1355f210c2aSfgsch    dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
1365f210c2aSfgsch
1375f210c2aSfgsch    # recent cygwin and mingw systems supply a stub DllMain which the user
1385f210c2aSfgsch    # can override, but on older systems we have to supply one (in ltdll.c)
1395f210c2aSfgsch    if test "x$lt_cv_need_dllmain" = "xyes"; then
1405f210c2aSfgsch      ltdll_obj='$output_objdir/$soname-ltdll.'"$objext "
1415f210c2aSfgsch      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~
1425f210c2aSfgsch	test -f $output_objdir/$soname-ltdll.$objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
1435f210c2aSfgsch    else
1445f210c2aSfgsch      ltdll_obj=
1455f210c2aSfgsch      ltdll_cmds=
1465f210c2aSfgsch    fi
1475f210c2aSfgsch
1485f210c2aSfgsch    # Extract the symbol export list from an `--export-all' def file,
1495f210c2aSfgsch    # then regenerate the def file from the symbol export list, so that
1505f210c2aSfgsch    # the compiled dll only exports the symbol export list.
1515f210c2aSfgsch    # Be careful not to strip the DATA tag left be newer dlltools.
1525f210c2aSfgsch    export_symbols_cmds="$ltdll_cmds"'
1535f210c2aSfgsch      $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
1545f210c2aSfgsch      sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
1555f210c2aSfgsch
156*d2201f2fSdrahn    # If the export-symbols file already is a .def file (1st line
157*d2201f2fSdrahn    # is EXPORTS), use it as is.
1585f210c2aSfgsch    # If DATA tags from a recent dlltool are present, honour them!
159*d2201f2fSdrahn    archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
160*d2201f2fSdrahn        cp $export_symbols $output_objdir/$soname-def;
161*d2201f2fSdrahn      else
162*d2201f2fSdrahn        echo EXPORTS > $output_objdir/$soname-def;
1635f210c2aSfgsch        _lt_hint=1;
1645f210c2aSfgsch        cat $export_symbols | while read symbol; do
1655f210c2aSfgsch         set dummy \$symbol;
166*d2201f2fSdrahn         case \[$]# in
167*d2201f2fSdrahn           2) echo "   \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
168*d2201f2fSdrahn           *) echo "     \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
1695f210c2aSfgsch         esac;
1705f210c2aSfgsch         _lt_hint=`expr 1 + \$_lt_hint`;
171*d2201f2fSdrahn        done;
172*d2201f2fSdrahn      fi~
1735f210c2aSfgsch      '"$ltdll_cmds"'
174*d2201f2fSdrahn      $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~
1755f210c2aSfgsch      $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~
176*d2201f2fSdrahn      $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~
177*d2201f2fSdrahn      $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~
178*d2201f2fSdrahn      $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
1795f210c2aSfgsch    ;;
1805f210c2aSfgsch
1815f210c2aSfgsch  netbsd*)
1825f210c2aSfgsch    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1835f210c2aSfgsch      archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
1845f210c2aSfgsch      wlarc=
1855f210c2aSfgsch    else
186*d2201f2fSdrahn      archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
187*d2201f2fSdrahn      archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1885f210c2aSfgsch    fi
1895f210c2aSfgsch    ;;
1905f210c2aSfgsch
1915f210c2aSfgsch  solaris* | sysv5*)
1925f210c2aSfgsch    if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
1935f210c2aSfgsch      ld_shlibs=no
1945f210c2aSfgsch      cat <<EOF 1>&2
1955f210c2aSfgsch
1965f210c2aSfgsch*** Warning: The releases 2.8.* of the GNU linker cannot reliably
1975f210c2aSfgsch*** create shared libraries on Solaris systems.  Therefore, libtool
1985f210c2aSfgsch*** is disabling shared libraries support.  We urge you to upgrade GNU
1995f210c2aSfgsch*** binutils to release 2.9.1 or newer.  Another option is to modify
2005f210c2aSfgsch*** your PATH or compiler configuration so that the native linker is
2015f210c2aSfgsch*** used, and then restart.
2025f210c2aSfgsch
2035f210c2aSfgschEOF
2045f210c2aSfgsch    elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
2055f210c2aSfgsch      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2065f210c2aSfgsch      archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2075f210c2aSfgsch    else
2085f210c2aSfgsch      ld_shlibs=no
2095f210c2aSfgsch    fi
2105f210c2aSfgsch    ;;
2115f210c2aSfgsch
2125f210c2aSfgsch  sunos4*)
2135f210c2aSfgsch    archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2145f210c2aSfgsch    wlarc=
2155f210c2aSfgsch    hardcode_direct=yes
2165f210c2aSfgsch    hardcode_shlibpath_var=no
2175f210c2aSfgsch    ;;
2185f210c2aSfgsch
2195f210c2aSfgsch  *)
2205f210c2aSfgsch    if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
2215f210c2aSfgsch      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2225f210c2aSfgsch      archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2235f210c2aSfgsch    else
2245f210c2aSfgsch      ld_shlibs=no
2255f210c2aSfgsch    fi
2265f210c2aSfgsch    ;;
2275f210c2aSfgsch  esac
2285f210c2aSfgsch
2295f210c2aSfgsch  if test "$ld_shlibs" = yes; then
2305f210c2aSfgsch    runpath_var=LD_RUN_PATH
2315f210c2aSfgsch    hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
2325f210c2aSfgsch    export_dynamic_flag_spec='${wl}--export-dynamic'
2335f210c2aSfgsch    case $host_os in
2345f210c2aSfgsch    cygwin* | mingw*)
2355f210c2aSfgsch      # dlltool doesn't understand --whole-archive et. al.
2365f210c2aSfgsch      whole_archive_flag_spec=
2375f210c2aSfgsch      ;;
2385f210c2aSfgsch    *)
2395f210c2aSfgsch      # ancient GNU ld didn't support --whole-archive et. al.
2405f210c2aSfgsch      if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
2415f210c2aSfgsch	whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
2425f210c2aSfgsch      else
2435f210c2aSfgsch	whole_archive_flag_spec=
2445f210c2aSfgsch      fi
2455f210c2aSfgsch      ;;
2465f210c2aSfgsch    esac
2475f210c2aSfgsch  fi
2485f210c2aSfgschelse
2495f210c2aSfgsch  # PORTME fill in a description of your system's linker (not GNU ld)
250*d2201f2fSdrahn  case $host_os in
2515f210c2aSfgsch  aix3*)
2525f210c2aSfgsch    allow_undefined_flag=unsupported
2535f210c2aSfgsch    always_export_symbols=yes
2545f210c2aSfgsch    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'
2555f210c2aSfgsch    # Note: this linker hardcodes the directories in LIBPATH if there
2565f210c2aSfgsch    # are no directories specified by -L.
2575f210c2aSfgsch    hardcode_minus_L=yes
2585f210c2aSfgsch    if test "$with_gcc" = yes && test -z "$link_static_flag"; then
2595f210c2aSfgsch      # Neither direct hardcoding nor static linking is supported with a
2605f210c2aSfgsch      # broken collect2.
2615f210c2aSfgsch      hardcode_direct=unsupported
2625f210c2aSfgsch    fi
2635f210c2aSfgsch    ;;
2645f210c2aSfgsch
265*d2201f2fSdrahn  aix4* | aix5*)
266*d2201f2fSdrahn    hardcode_direct=yes
2675f210c2aSfgsch    hardcode_libdir_separator=':'
268*d2201f2fSdrahn    link_all_deplibs=yes
269*d2201f2fSdrahn    # When large executables or shared objects are built, AIX ld can
270*d2201f2fSdrahn    # have problems creating the table of contents.  If linking a library
271*d2201f2fSdrahn    # or program results in "error TOC overflow" add -mminimal-toc to
272*d2201f2fSdrahn    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
273*d2201f2fSdrahn    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
2745f210c2aSfgsch    if test "$with_gcc" = yes; then
275*d2201f2fSdrahn      case $host_os in aix4.[012]|aix4.[012].*)
276*d2201f2fSdrahn      # We only want to do this on AIX 4.2 and lower, the check
277*d2201f2fSdrahn      # below for broken collect2 doesn't work under 4.3+
2785f210c2aSfgsch        collect2name=`${CC} -print-prog-name=collect2`
2795f210c2aSfgsch        if test -f "$collect2name" && \
2805f210c2aSfgsch	   strings "$collect2name" | grep resolve_lib_name >/dev/null
2815f210c2aSfgsch        then
2825f210c2aSfgsch	  # We have reworked collect2
2835f210c2aSfgsch	  hardcode_direct=yes
2845f210c2aSfgsch        else
2855f210c2aSfgsch	  # We have old collect2
2865f210c2aSfgsch	  hardcode_direct=unsupported
2875f210c2aSfgsch	  # It fails to find uninstalled libraries when the uninstalled
2885f210c2aSfgsch	  # path is not listed in the libpath.  Setting hardcode_minus_L
2895f210c2aSfgsch	  # to unsupported forces relinking
2905f210c2aSfgsch	  hardcode_minus_L=yes
2915f210c2aSfgsch	  hardcode_libdir_flag_spec='-L$libdir'
2925f210c2aSfgsch	  hardcode_libdir_separator=
2935f210c2aSfgsch        fi
294*d2201f2fSdrahn      esac
2955f210c2aSfgsch      shared_flag='-shared'
2965f210c2aSfgsch    else
297*d2201f2fSdrahn      # not using gcc
298*d2201f2fSdrahn      if test "$host_cpu" = ia64; then
299*d2201f2fSdrahn        shared_flag='${wl}-G'
300*d2201f2fSdrahn      else
3015f210c2aSfgsch        shared_flag='${wl}-bM:SRE'
3025f210c2aSfgsch      fi
303*d2201f2fSdrahn    fi
304*d2201f2fSdrahn
305*d2201f2fSdrahn    if test "$host_cpu" = ia64; then
306*d2201f2fSdrahn      # On IA64, the linker does run time linking by default, so we don't
307*d2201f2fSdrahn      # have to do anything special.
308*d2201f2fSdrahn      aix_use_runtimelinking=no
309*d2201f2fSdrahn      if test $with_gnu_ld = no; then
310*d2201f2fSdrahn        exp_sym_flag='-Bexport'
311*d2201f2fSdrahn        no_entry_flag=""
312*d2201f2fSdrahn      fi
313*d2201f2fSdrahn    else
314*d2201f2fSdrahn      # Test if we are trying to use run time linking, or normal AIX style linking.
315*d2201f2fSdrahn      # If -brtl is somewhere in LDFLAGS, we need to do run time linking.
316*d2201f2fSdrahn      aix_use_runtimelinking=no
317*d2201f2fSdrahn      for ld_flag in $LDFLAGS; do
318*d2201f2fSdrahn        if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl" ); then
319*d2201f2fSdrahn          aix_use_runtimelinking=yes
320*d2201f2fSdrahn          break
321*d2201f2fSdrahn        fi
322*d2201f2fSdrahn      done
323*d2201f2fSdrahn      exp_sym_flag='-bexport'
324*d2201f2fSdrahn      no_entry_flag='-bnoentry'
325*d2201f2fSdrahn    fi
326*d2201f2fSdrahn    # -bexpall does not export symbols beginning with underscore (_)
327*d2201f2fSdrahn    always_export_symbols=yes
328*d2201f2fSdrahn    if test "$aix_use_runtimelinking" = yes; then
329*d2201f2fSdrahn      # Warning - without using the other run time loading flags (-brtl), -berok will
330*d2201f2fSdrahn      #           link without error, but may produce a broken library.
3315f210c2aSfgsch      allow_undefined_flag=' ${wl}-berok'
332*d2201f2fSdrahn      hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
333*d2201f2fSdrahn      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"
334*d2201f2fSdrahn    else
335*d2201f2fSdrahn      if test "$host_cpu" = ia64; then
336*d2201f2fSdrahn        if test $with_gnu_ld = no; then
337*d2201f2fSdrahn          hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
338*d2201f2fSdrahn          allow_undefined_flag="-z nodefs"
339*d2201f2fSdrahn          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"
340*d2201f2fSdrahn        fi
341*d2201f2fSdrahn      else
342*d2201f2fSdrahn        allow_undefined_flag=' ${wl}-berok'
343*d2201f2fSdrahn        # -bexpall does not export symbols beginning with underscore (_)
344*d2201f2fSdrahn        always_export_symbols=yes
345*d2201f2fSdrahn        # Exported symbols can be pulled into shared objects from archives
346*d2201f2fSdrahn        whole_archive_flag_spec=' '
347*d2201f2fSdrahn        build_libtool_need_lc=yes
348*d2201f2fSdrahn        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
349*d2201f2fSdrahn        # This is similar to how AIX traditionally builds it's shared libraries.
350*d2201f2fSdrahn        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'
351*d2201f2fSdrahn      fi
352*d2201f2fSdrahn    fi
3535f210c2aSfgsch  ;;
3545f210c2aSfgsch
3555f210c2aSfgsch  amigaos*)
3565f210c2aSfgsch    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)'
3575f210c2aSfgsch    hardcode_libdir_flag_spec='-L$libdir'
3585f210c2aSfgsch    hardcode_minus_L=yes
3595f210c2aSfgsch    # see comment about different semantics on the GNU ld section
3605f210c2aSfgsch    ld_shlibs=no
3615f210c2aSfgsch    ;;
3625f210c2aSfgsch
3635f210c2aSfgsch  cygwin* | mingw*)
3645f210c2aSfgsch    # When not using gcc, we currently assume that we are using
3655f210c2aSfgsch    # Microsoft Visual C++.
3665f210c2aSfgsch    # hardcode_libdir_flag_spec is actually meaningless, as there is
3675f210c2aSfgsch    # no search path for DLLs.
3685f210c2aSfgsch    hardcode_libdir_flag_spec=' '
3695f210c2aSfgsch    allow_undefined_flag=unsupported
3705f210c2aSfgsch    # Tell ltmain to make .lib files, not .a files.
3715f210c2aSfgsch    libext=lib
3725f210c2aSfgsch    # FIXME: Setting linknames here is a bad hack.
3735f210c2aSfgsch    archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
3745f210c2aSfgsch    # The linker will automatically build a .lib file if we build a DLL.
3755f210c2aSfgsch    old_archive_from_new_cmds='true'
3765f210c2aSfgsch    # FIXME: Should let the user specify the lib program.
3775f210c2aSfgsch    old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
378*d2201f2fSdrahn    fix_srcfile_path='`cygpath -w "$srcfile"`'
3795f210c2aSfgsch    ;;
3805f210c2aSfgsch
3815f210c2aSfgsch  freebsd1*)
3825f210c2aSfgsch    ld_shlibs=no
3835f210c2aSfgsch    ;;
3845f210c2aSfgsch
3855f210c2aSfgsch  # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
3865f210c2aSfgsch  # support.  Future versions do this automatically, but an explicit c++rt0.o
3875f210c2aSfgsch  # does not break anything, and helps significantly (at the cost of a little
3885f210c2aSfgsch  # extra space).
3895f210c2aSfgsch  freebsd2.2*)
3905f210c2aSfgsch    archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
3915f210c2aSfgsch    hardcode_libdir_flag_spec='-R$libdir'
3925f210c2aSfgsch    hardcode_direct=yes
3935f210c2aSfgsch    hardcode_shlibpath_var=no
3945f210c2aSfgsch    ;;
3955f210c2aSfgsch
3965f210c2aSfgsch  # Unfortunately, older versions of FreeBSD 2 do not have this feature.
3975f210c2aSfgsch  freebsd2*)
3985f210c2aSfgsch    archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
3995f210c2aSfgsch    hardcode_direct=yes
4005f210c2aSfgsch    hardcode_minus_L=yes
4015f210c2aSfgsch    hardcode_shlibpath_var=no
4025f210c2aSfgsch    ;;
4035f210c2aSfgsch
4045f210c2aSfgsch  # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
4055f210c2aSfgsch  freebsd*)
4065f210c2aSfgsch    archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
4075f210c2aSfgsch    hardcode_libdir_flag_spec='-R$libdir'
4085f210c2aSfgsch    hardcode_direct=yes
4095f210c2aSfgsch    hardcode_shlibpath_var=no
4105f210c2aSfgsch    ;;
4115f210c2aSfgsch
4125f210c2aSfgsch  hpux9* | hpux10* | hpux11*)
413*d2201f2fSdrahn    case $host_os in
4145f210c2aSfgsch    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' ;;
4155f210c2aSfgsch    *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
4165f210c2aSfgsch    esac
4175f210c2aSfgsch    hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
4185f210c2aSfgsch    hardcode_libdir_separator=:
4195f210c2aSfgsch    hardcode_direct=yes
4205f210c2aSfgsch    hardcode_minus_L=yes # Not in the search PATH, but as the default
4215f210c2aSfgsch			 # location of the library.
4225f210c2aSfgsch    export_dynamic_flag_spec='${wl}-E'
4235f210c2aSfgsch    ;;
4245f210c2aSfgsch
4255f210c2aSfgsch  irix5* | irix6*)
4265f210c2aSfgsch    if test "$with_gcc" = yes; then
4275f210c2aSfgsch      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'
4285f210c2aSfgsch    else
4295f210c2aSfgsch      archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
4305f210c2aSfgsch    fi
4315f210c2aSfgsch    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
4325f210c2aSfgsch    hardcode_libdir_separator=:
4335f210c2aSfgsch    link_all_deplibs=yes
4345f210c2aSfgsch    ;;
4355f210c2aSfgsch
4365f210c2aSfgsch  netbsd*)
4375f210c2aSfgsch    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
4385f210c2aSfgsch      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
4395f210c2aSfgsch    else
440*d2201f2fSdrahn      archive_cmds='$LD -shared -nodefaultlibs -o $lib $libobjs $deplibs $linker_flags'      # ELF
4415f210c2aSfgsch    fi
4425f210c2aSfgsch    hardcode_libdir_flag_spec='${wl}-R$libdir'
4435f210c2aSfgsch    hardcode_direct=yes
4445f210c2aSfgsch    hardcode_shlibpath_var=no
4455f210c2aSfgsch    ;;
4465f210c2aSfgsch
4475f210c2aSfgsch  openbsd*)
4485f210c2aSfgsch    archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4495f210c2aSfgsch    hardcode_libdir_flag_spec='-R$libdir'
4505f210c2aSfgsch    hardcode_direct=yes
4515f210c2aSfgsch    hardcode_shlibpath_var=no
4525f210c2aSfgsch    ;;
4535f210c2aSfgsch
4545f210c2aSfgsch  os2*)
4555f210c2aSfgsch    hardcode_libdir_flag_spec='-L$libdir'
4565f210c2aSfgsch    hardcode_minus_L=yes
4575f210c2aSfgsch    allow_undefined_flag=unsupported
4585f210c2aSfgsch    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'
4595f210c2aSfgsch    old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
4605f210c2aSfgsch    ;;
4615f210c2aSfgsch
4625f210c2aSfgsch  osf3*)
4635f210c2aSfgsch    if test "$with_gcc" = yes; then
4645f210c2aSfgsch      allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
4655f210c2aSfgsch      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'
4665f210c2aSfgsch    else
4675f210c2aSfgsch      allow_undefined_flag=' -expect_unresolved \*'
4685f210c2aSfgsch      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'
4695f210c2aSfgsch    fi
4705f210c2aSfgsch    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
4715f210c2aSfgsch    hardcode_libdir_separator=:
4725f210c2aSfgsch    ;;
4735f210c2aSfgsch
4745f210c2aSfgsch  osf4* | osf5*)	# as osf3* with the addition of -msym flag
4755f210c2aSfgsch    if test "$with_gcc" = yes; then
4765f210c2aSfgsch      allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
4775f210c2aSfgsch      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'
4785f210c2aSfgsch    else
4795f210c2aSfgsch      allow_undefined_flag=' -expect_unresolved \*'
4805f210c2aSfgsch      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'
4815f210c2aSfgsch    fi
4825f210c2aSfgsch    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
4835f210c2aSfgsch    hardcode_libdir_separator=:
4845f210c2aSfgsch    ;;
4855f210c2aSfgsch
4865f210c2aSfgsch  sco3.2v5*)
4875f210c2aSfgsch    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4885f210c2aSfgsch    hardcode_shlibpath_var=no
4895f210c2aSfgsch    runpath_var=LD_RUN_PATH
4905f210c2aSfgsch    hardcode_runpath_var=yes
4915f210c2aSfgsch    ;;
4925f210c2aSfgsch
4935f210c2aSfgsch  solaris*)
494*d2201f2fSdrahn    no_undefined_flag=' ${wl}-z ${wl}defs'
495*d2201f2fSdrahn    archive_cmds='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4965f210c2aSfgsch    archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
497*d2201f2fSdrahn      $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
498*d2201f2fSdrahn
499*d2201f2fSdrahn    # Commands to make compiler produce verbose output that lists
500*d2201f2fSdrahn    # what "hidden" libraries, object files and flags are used when
501*d2201f2fSdrahn    # linking a shared library.
502*d2201f2fSdrahn    output_verbose_link_cmds="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
503*d2201f2fSdrahn
504*d2201f2fSdrahn    hardcode_libdir_flag_spec='${wl}-R $wl$libdir'
5055f210c2aSfgsch    hardcode_shlibpath_var=no
506*d2201f2fSdrahn    case $host_os in
5075f210c2aSfgsch    solaris2.[0-5] | solaris2.[0-5].*) ;;
5085f210c2aSfgsch    *) # Supported since Solaris 2.6 (maybe 2.5.1?)
509*d2201f2fSdrahn      whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;;
5105f210c2aSfgsch    esac
5115f210c2aSfgsch    link_all_deplibs=yes
5125f210c2aSfgsch    ;;
5135f210c2aSfgsch
5145f210c2aSfgsch  sunos4*)
5155f210c2aSfgsch    archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5165f210c2aSfgsch    hardcode_libdir_flag_spec='-L$libdir'
5175f210c2aSfgsch    hardcode_direct=yes
5185f210c2aSfgsch    hardcode_minus_L=yes
5195f210c2aSfgsch    hardcode_shlibpath_var=no
5205f210c2aSfgsch    ;;
5215f210c2aSfgsch
5225f210c2aSfgsch  sysv4)
5235f210c2aSfgsch    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5245f210c2aSfgsch    runpath_var='LD_RUN_PATH'
5255f210c2aSfgsch    hardcode_shlibpath_var=no
5265f210c2aSfgsch    hardcode_direct=no #Motorola manual says yes, but my tests say they lie
5275f210c2aSfgsch    ;;
5285f210c2aSfgsch
5295f210c2aSfgsch  sysv4.3*)
5305f210c2aSfgsch    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5315f210c2aSfgsch    hardcode_shlibpath_var=no
5325f210c2aSfgsch    export_dynamic_flag_spec='-Bexport'
5335f210c2aSfgsch    ;;
5345f210c2aSfgsch
5355f210c2aSfgsch  sysv5*)
5365f210c2aSfgsch    no_undefined_flag=' -z text'
5375f210c2aSfgsch    # $CC -shared without GNU ld will not create a library from C++
5385f210c2aSfgsch    # object files and a static libstdc++, better avoid it by now
5395f210c2aSfgsch    archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5405f210c2aSfgsch    archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5415f210c2aSfgsch		$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5425f210c2aSfgsch    hardcode_libdir_flag_spec=
5435f210c2aSfgsch    hardcode_shlibpath_var=no
5445f210c2aSfgsch    runpath_var='LD_RUN_PATH'
5455f210c2aSfgsch    ;;
5465f210c2aSfgsch
5475f210c2aSfgsch  uts4*)
5485f210c2aSfgsch    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5495f210c2aSfgsch    hardcode_libdir_flag_spec='-L$libdir'
5505f210c2aSfgsch    hardcode_shlibpath_var=no
5515f210c2aSfgsch    ;;
5525f210c2aSfgsch
5535f210c2aSfgsch  dgux*)
5545f210c2aSfgsch    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5555f210c2aSfgsch    hardcode_libdir_flag_spec='-L$libdir'
5565f210c2aSfgsch    hardcode_shlibpath_var=no
5575f210c2aSfgsch    ;;
5585f210c2aSfgsch
5595f210c2aSfgsch  sysv4*MP*)
5605f210c2aSfgsch    if test -d /usr/nec; then
5615f210c2aSfgsch      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5625f210c2aSfgsch      hardcode_shlibpath_var=no
5635f210c2aSfgsch      runpath_var=LD_RUN_PATH
5645f210c2aSfgsch      hardcode_runpath_var=yes
5655f210c2aSfgsch      ld_shlibs=yes
5665f210c2aSfgsch    fi
5675f210c2aSfgsch    ;;
5685f210c2aSfgsch
5695f210c2aSfgsch  sysv4.2uw2*)
5705f210c2aSfgsch    archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5715f210c2aSfgsch    hardcode_direct=yes
5725f210c2aSfgsch    hardcode_minus_L=no
5735f210c2aSfgsch    hardcode_shlibpath_var=no
5745f210c2aSfgsch    hardcode_runpath_var=yes
5755f210c2aSfgsch    runpath_var=LD_RUN_PATH
5765f210c2aSfgsch    ;;
5775f210c2aSfgsch
578*d2201f2fSdrahn  sysv5uw7* | unixware7*)
579*d2201f2fSdrahn    no_undefined_flag='${wl}-z ${wl}text'
580*d2201f2fSdrahn    if test "$GCC" = yes; then
581*d2201f2fSdrahn      archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
582*d2201f2fSdrahn    else
583*d2201f2fSdrahn      archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
584*d2201f2fSdrahn    fi
5855f210c2aSfgsch    runpath_var='LD_RUN_PATH'
5865f210c2aSfgsch    hardcode_shlibpath_var=no
5875f210c2aSfgsch    ;;
5885f210c2aSfgsch
5895f210c2aSfgsch  *)
5905f210c2aSfgsch    ld_shlibs=no
5915f210c2aSfgsch    ;;
5925f210c2aSfgsch  esac
5935f210c2aSfgschfi
5945f210c2aSfgsch
5955f210c2aSfgsch## Compiler Characteristics: PIC flags, static flags, etc
5965f210c2aSfgsch
5975f210c2aSfgsch# We don't use cached values here since only the C compiler
5985f210c2aSfgsch# characteristics should be cached.
5995f210c2aSfgsch  ac_cv_prog_cc_pic=
6005f210c2aSfgsch  ac_cv_prog_cc_shlib=
6015f210c2aSfgsch  ac_cv_prog_cc_wl=
6025f210c2aSfgsch  ac_cv_prog_cc_static=
6035f210c2aSfgsch  ac_cv_prog_cc_no_builtin=
6045f210c2aSfgsch  ac_cv_prog_cc_can_build_shared=$can_build_shared
6055f210c2aSfgsch
6065f210c2aSfgsch    ac_cv_prog_cc_wl='-Wl,'
6075f210c2aSfgsch    ac_cv_prog_cc_static='-static'
6085f210c2aSfgsch
609*d2201f2fSdrahn    case $host_os in
6105f210c2aSfgsch    beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
6115f210c2aSfgsch      # PIC is the default for these OSes.
6125f210c2aSfgsch      ;;
6135f210c2aSfgsch    aix*)
6145f210c2aSfgsch      # Below there is a dirty hack to force normal static linking with -ldl
6155f210c2aSfgsch      # The problem is because libdl dynamically linked with both libc and
6165f210c2aSfgsch      # libC (AIX C++ library), which obviously doesn't included in libraries
6175f210c2aSfgsch      # list by gcc. This cause undefined symbols with -static flags.
6185f210c2aSfgsch      # This hack allows C programs to be linked with "-static -ldl", but
6195f210c2aSfgsch      # we not sure about C++ programs.
6205f210c2aSfgsch      ac_cv_prog_cc_static="$ac_cv_prog_cc_static ${ac_cv_prog_cc_wl}-lC"
6215f210c2aSfgsch      ;;
622*d2201f2fSdrahn    *djgpp*)
623*d2201f2fSdrahn      # DJGPP does not suppot shared libraries at all
624*d2201f2fSdrahn      ac_cv_prog_cc_pic=
625*d2201f2fSdrahn      ;;
6265f210c2aSfgsch    cygwin* | mingw* | os2*)
6275f210c2aSfgsch      # This hack is so that the source file can tell whether it is being
6285f210c2aSfgsch      # built for inclusion in a dll (and should export symbols for example).
6295f210c2aSfgsch      ac_cv_prog_cc_pic='-DDLL_EXPORT'
6305f210c2aSfgsch      ;;
6315f210c2aSfgsch    amigaos*)
6325f210c2aSfgsch      # FIXME: we need at least 68020 code to build shared libraries, but
6335f210c2aSfgsch      # adding the `-m68020' flag to GCC prevents building anything better,
6345f210c2aSfgsch      # like `-m68040'.
6355f210c2aSfgsch      ac_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
6365f210c2aSfgsch      ;;
6375f210c2aSfgsch    sysv4*MP*)
6385f210c2aSfgsch      if test -d /usr/nec; then
6395f210c2aSfgsch	 ac_cv_prog_cc_pic=-Kconform_pic
6405f210c2aSfgsch      fi
6415f210c2aSfgsch      ;;
6425f210c2aSfgsch    *)
6435f210c2aSfgsch      ac_cv_prog_cc_pic='-fPIC'
6445f210c2aSfgsch      ;;
6455f210c2aSfgsch    esac
6465f210c2aSfgsch
6475f210c2aSfgsch# GCJ did not exist at the time GCC didn't implicitly link libc in.
6485f210c2aSfgschneed_lc=no
649*d2201f2fSdrahn
650*d2201f2fSdrahn# All existing releases of GCJ support `-c -o'.
651*d2201f2fSdrahnlt_cv_compiler_c_o=yes
652