annotate kdiff3/admin/ltcf-gcj.sh @ 6:a23681732506

Files have moved into the src directory.
author joachim99
date Mon, 06 Oct 2003 18:32:37 +0000
parents 53b8ecbce0cb
children
rev   line source
joachim99@2 1 #### This script is meant to be sourced by ltconfig.
joachim99@2 2
joachim99@2 3 # ltcf-gcj.sh - Create a GCJ compiler specific configuration
joachim99@2 4 #
joachim99@2 5 # Copyright (C) 1996-1999, 2000, 2001 Free Software Foundation, Inc.
joachim99@2 6 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
joachim99@2 7 #
joachim99@2 8 # Original GCJ support by:
joachim99@2 9 # Alexandre Oliva <oliva@lsd.ic.unicamp.br>
joachim99@2 10 #
joachim99@2 11 # This file is free software; you can redistribute it and/or modify it
joachim99@2 12 # under the terms of the GNU General Public License as published by
joachim99@2 13 # the Free Software Foundation; either version 2 of the License, or
joachim99@2 14 # (at your option) any later version.
joachim99@2 15 #
joachim99@2 16 # This program is distributed in the hope that it will be useful, but
joachim99@2 17 # WITHOUT ANY WARRANTY; without even the implied warranty of
joachim99@2 18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
joachim99@2 19 # General Public License for more details.
joachim99@2 20 #
joachim99@2 21 # You should have received a copy of the GNU General Public License
joachim99@2 22 # along with this program; if not, write to the Free Software
joachim99@2 23 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
joachim99@2 24 #
joachim99@2 25 # As a special exception to the GNU General Public License, if you
joachim99@2 26 # distribute this file as part of a program that contains a
joachim99@2 27 # configuration script generated by Autoconf, you may include it under
joachim99@2 28 # the same distribution terms that you use for the rest of that program.
joachim99@2 29
joachim99@2 30
joachim99@2 31 # Source file extension for Java test sources.
joachim99@2 32 ac_ext=java
joachim99@2 33
joachim99@2 34 # Object file extension for compiled Java test sources.
joachim99@2 35 objext=o
joachim99@2 36
joachim99@2 37 # Code to be used in simple compile tests
joachim99@2 38 lt_simple_compile_test_code="class foo {}"
joachim99@2 39
joachim99@2 40 # Code to be used in simple link tests
joachim99@2 41 lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }'
joachim99@2 42
joachim99@2 43 ## Linker Characteristics
joachim99@2 44 case $host_os in
joachim99@2 45 cygwin* | mingw*)
joachim99@2 46 # FIXME: the MSVC++ port hasn't been tested in a loooong time
joachim99@2 47 # When not using gcc, we currently assume that we are using
joachim99@2 48 # Microsoft Visual C++.
joachim99@2 49 if test "$with_gcc" != yes; then
joachim99@2 50 with_gnu_ld=no
joachim99@2 51 fi
joachim99@2 52 ;;
joachim99@2 53
joachim99@2 54 esac
joachim99@2 55
joachim99@2 56 ld_shlibs=yes
joachim99@2 57 if test "$with_gnu_ld" = yes; then
joachim99@2 58 # If archive_cmds runs LD, not CC, wlarc should be empty
joachim99@2 59 wlarc='${wl}'
joachim99@2 60
joachim99@2 61 # See if GNU ld supports shared libraries.
joachim99@2 62 case $host_os in
joachim99@2 63 aix3* | aix4*)
joachim99@2 64 # On AIX, the GNU linker is very broken
joachim99@2 65 ld_shlibs=no
joachim99@2 66 cat <<EOF 1>&2
joachim99@2 67
joachim99@2 68 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
joachim99@2 69 *** to be unable to reliably create shared libraries on AIX.
joachim99@2 70 *** Therefore, libtool is disabling shared libraries support. If you
joachim99@2 71 *** really care for shared libraries, you may want to modify your PATH
joachim99@2 72 *** so that a non-GNU linker is found, and then restart.
joachim99@2 73
joachim99@2 74 EOF
joachim99@2 75 ;;
joachim99@2 76
joachim99@2 77 amigaos*)
joachim99@2 78 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 79 hardcode_libdir_flag_spec='-L$libdir'
joachim99@2 80 hardcode_minus_L=yes
joachim99@2 81
joachim99@2 82 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
joachim99@2 83 # that the semantics of dynamic libraries on AmigaOS, at least up
joachim99@2 84 # to version 4, is to share data among multiple programs linked
joachim99@2 85 # with the same dynamic library. Since this doesn't match the
joachim99@2 86 # behavior of shared libraries on other platforms, we can use
joachim99@2 87 # them.
joachim99@2 88 ld_shlibs=no
joachim99@2 89 ;;
joachim99@2 90
joachim99@2 91 beos*)
joachim99@2 92 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
joachim99@2 93 allow_undefined_flag=unsupported
joachim99@2 94 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
joachim99@2 95 # support --undefined. This deserves some investigation. FIXME
joachim99@2 96 archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
joachim99@2 97 else
joachim99@2 98 ld_shlibs=no
joachim99@2 99 fi
joachim99@2 100 ;;
joachim99@2 101
joachim99@2 102 cygwin* | mingw*)
joachim99@2 103 # hardcode_libdir_flag_spec is actually meaningless, as there is
joachim99@2 104 # no search path for DLLs.
joachim99@2 105 hardcode_libdir_flag_spec='-L$libdir'
joachim99@2 106 allow_undefined_flag=unsupported
joachim99@2 107 always_export_symbols=yes
joachim99@2 108
joachim99@2 109 extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
joachim99@2 110 sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //; p; }" -e d < $0 > $output_objdir/impgen.c~
joachim99@2 111 test -f $output_objdir/impgen.exe || (cd $output_objdir && \
joachim99@2 112 if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
joachim99@2 113 else $CC -o impgen impgen.c ; fi)~
joachim99@2 114 $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
joachim99@2 115
joachim99@2 116 old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
joachim99@2 117
joachim99@2 118 # cygwin and mingw dlls have different entry points and sets of symbols
joachim99@2 119 # to exclude.
joachim99@2 120 # FIXME: what about values for MSVC?
joachim99@2 121 dll_entry=__cygwin_dll_entry@12
joachim99@2 122 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
joachim99@2 123 case $host_os in
joachim99@2 124 mingw*)
joachim99@2 125 # mingw values
joachim99@2 126 dll_entry=_DllMainCRTStartup@12
joachim99@2 127 dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
joachim99@2 128 ;;
joachim99@2 129 esac
joachim99@2 130
joachim99@2 131 # mingw and cygwin differ, and it's simplest to just exclude the union
joachim99@2 132 # of the two symbol sets.
joachim99@2 133 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
joachim99@2 134
joachim99@2 135 # recent cygwin and mingw systems supply a stub DllMain which the user
joachim99@2 136 # can override, but on older systems we have to supply one (in ltdll.c)
joachim99@2 137 if test "x$lt_cv_need_dllmain" = "xyes"; then
joachim99@2 138 ltdll_obj='$output_objdir/$soname-ltdll.'"$objext "
joachim99@2 139 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 140 test -f $output_objdir/$soname-ltdll.$objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
joachim99@2 141 else
joachim99@2 142 ltdll_obj=
joachim99@2 143 ltdll_cmds=
joachim99@2 144 fi
joachim99@2 145
joachim99@2 146 # Extract the symbol export list from an `--export-all' def file,
joachim99@2 147 # then regenerate the def file from the symbol export list, so that
joachim99@2 148 # the compiled dll only exports the symbol export list.
joachim99@2 149 # Be careful not to strip the DATA tag left be newer dlltools.
joachim99@2 150 export_symbols_cmds="$ltdll_cmds"'
joachim99@2 151 $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
joachim99@2 152 sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
joachim99@2 153
joachim99@2 154 # If the export-symbols file already is a .def file (1st line
joachim99@2 155 # is EXPORTS), use it as is.
joachim99@2 156 # If DATA tags from a recent dlltool are present, honour them!
joachim99@2 157 archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
joachim99@2 158 cp $export_symbols $output_objdir/$soname-def;
joachim99@2 159 else
joachim99@2 160 echo EXPORTS > $output_objdir/$soname-def;
joachim99@2 161 _lt_hint=1;
joachim99@2 162 cat $export_symbols | while read symbol; do
joachim99@2 163 set dummy \$symbol;
joachim99@2 164 case \[$]# in
joachim99@2 165 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
joachim99@2 166 *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
joachim99@2 167 esac;
joachim99@2 168 _lt_hint=`expr 1 + \$_lt_hint`;
joachim99@2 169 done;
joachim99@2 170 fi~
joachim99@2 171 '"$ltdll_cmds"'
joachim99@2 172 $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 173 $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 174 $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 175 $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 176 $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 177 ;;
joachim99@2 178
joachim99@2 179 netbsd*)
joachim99@2 180 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
joachim99@2 181 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
joachim99@2 182 wlarc=
joachim99@2 183 else
joachim99@2 184 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
joachim99@2 185 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
joachim99@2 186 fi
joachim99@2 187 ;;
joachim99@2 188
joachim99@2 189 solaris* | sysv5*)
joachim99@2 190 if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
joachim99@2 191 ld_shlibs=no
joachim99@2 192 cat <<EOF 1>&2
joachim99@2 193
joachim99@2 194 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
joachim99@2 195 *** create shared libraries on Solaris systems. Therefore, libtool
joachim99@2 196 *** is disabling shared libraries support. We urge you to upgrade GNU
joachim99@2 197 *** binutils to release 2.9.1 or newer. Another option is to modify
joachim99@2 198 *** your PATH or compiler configuration so that the native linker is
joachim99@2 199 *** used, and then restart.
joachim99@2 200
joachim99@2 201 EOF
joachim99@2 202 elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
joachim99@2 203 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
joachim99@2 204 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
joachim99@2 205 else
joachim99@2 206 ld_shlibs=no
joachim99@2 207 fi
joachim99@2 208 ;;
joachim99@2 209
joachim99@2 210 sunos4*)
joachim99@2 211 archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
joachim99@2 212 wlarc=
joachim99@2 213 hardcode_direct=yes
joachim99@2 214 hardcode_shlibpath_var=no
joachim99@2 215 ;;
joachim99@2 216
joachim99@2 217 *)
joachim99@2 218 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
joachim99@2 219 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
joachim99@2 220 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
joachim99@2 221 else
joachim99@2 222 ld_shlibs=no
joachim99@2 223 fi
joachim99@2 224 ;;
joachim99@2 225 esac
joachim99@2 226
joachim99@2 227 if test "$ld_shlibs" = yes; then
joachim99@2 228 runpath_var=LD_RUN_PATH
joachim99@2 229 hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
joachim99@2 230 export_dynamic_flag_spec='${wl}--export-dynamic'
joachim99@2 231 case $host_os in
joachim99@2 232 cygwin* | mingw*)
joachim99@2 233 # dlltool doesn't understand --whole-archive et. al.
joachim99@2 234 whole_archive_flag_spec=
joachim99@2 235 ;;
joachim99@2 236 *)
joachim99@2 237 # ancient GNU ld didn't support --whole-archive et. al.
joachim99@2 238 if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
joachim99@2 239 whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
joachim99@2 240 else
joachim99@2 241 whole_archive_flag_spec=
joachim99@2 242 fi
joachim99@2 243 ;;
joachim99@2 244 esac
joachim99@2 245 fi
joachim99@2 246 else
joachim99@2 247 # PORTME fill in a description of your system's linker (not GNU ld)
joachim99@2 248 case $host_os in
joachim99@2 249 aix3*)
joachim99@2 250 allow_undefined_flag=unsupported
joachim99@2 251 always_export_symbols=yes
joachim99@2 252 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 253 # Note: this linker hardcodes the directories in LIBPATH if there
joachim99@2 254 # are no directories specified by -L.
joachim99@2 255 hardcode_minus_L=yes
joachim99@2 256 if test "$with_gcc" = yes && test -z "$link_static_flag"; then
joachim99@2 257 # Neither direct hardcoding nor static linking is supported with a
joachim99@2 258 # broken collect2.
joachim99@2 259 hardcode_direct=unsupported
joachim99@2 260 fi
joachim99@2 261 ;;
joachim99@2 262
joachim99@2 263 aix4* | aix5*)
joachim99@2 264 hardcode_direct=yes
joachim99@2 265 hardcode_libdir_separator=':'
joachim99@2 266 link_all_deplibs=yes
joachim99@2 267 # When large executables or shared objects are built, AIX ld can
joachim99@2 268 # have problems creating the table of contents. If linking a library
joachim99@2 269 # or program results in "error TOC overflow" add -mminimal-toc to
joachim99@2 270 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
joachim99@2 271 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
joachim99@2 272 if test "$with_gcc" = yes; then
joachim99@2 273 case $host_os in aix4.[012]|aix4.[012].*)
joachim99@2 274 # We only want to do this on AIX 4.2 and lower, the check
joachim99@2 275 # below for broken collect2 doesn't work under 4.3+
joachim99@2 276 collect2name=`${CC} -print-prog-name=collect2`
joachim99@2 277 if test -f "$collect2name" && \
joachim99@2 278 strings "$collect2name" | grep resolve_lib_name >/dev/null
joachim99@2 279 then
joachim99@2 280 # We have reworked collect2
joachim99@2 281 hardcode_direct=yes
joachim99@2 282 else
joachim99@2 283 # We have old collect2
joachim99@2 284 hardcode_direct=unsupported
joachim99@2 285 # It fails to find uninstalled libraries when the uninstalled
joachim99@2 286 # path is not listed in the libpath. Setting hardcode_minus_L
joachim99@2 287 # to unsupported forces relinking
joachim99@2 288 hardcode_minus_L=yes
joachim99@2 289 hardcode_libdir_flag_spec='-L$libdir'
joachim99@2 290 hardcode_libdir_separator=
joachim99@2 291 fi
joachim99@2 292 esac
joachim99@2 293 shared_flag='-shared'
joachim99@2 294 else
joachim99@2 295 # not using gcc
joachim99@2 296 if test "$host_cpu" = ia64; then
joachim99@2 297 shared_flag='${wl}-G'
joachim99@2 298 else
joachim99@2 299 shared_flag='${wl}-bM:SRE'
joachim99@2 300 fi
joachim99@2 301 fi
joachim99@2 302
joachim99@2 303 if test "$host_cpu" = ia64; then
joachim99@2 304 # On IA64, the linker does run time linking by default, so we don't
joachim99@2 305 # have to do anything special.
joachim99@2 306 aix_use_runtimelinking=no
joachim99@2 307 exp_sym_flag='-Bexport'
joachim99@2 308 no_entry_flag=""
joachim99@2 309 else
joachim99@2 310 # Test if we are trying to use run time linking, or normal AIX style linking.
joachim99@2 311 # If -brtl is somewhere in LDFLAGS, we need to do run time linking.
joachim99@2 312 aix_use_runtimelinking=no
joachim99@2 313 for ld_flag in $LDFLAGS; do
joachim99@2 314 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl" ); then
joachim99@2 315 aix_use_runtimelinking=yes
joachim99@2 316 break
joachim99@2 317 fi
joachim99@2 318 done
joachim99@2 319 exp_sym_flag='-bexport'
joachim99@2 320 no_entry_flag='-bnoentry'
joachim99@2 321 fi
joachim99@2 322 # -bexpall does not export symbols beginning with underscore (_)
joachim99@2 323 always_export_symbols=yes
joachim99@2 324 if test "$aix_use_runtimelinking" = yes; then
joachim99@2 325 # Warning - without using the other run time loading flags (-brtl), -berok will
joachim99@2 326 # link without error, but may produce a broken library.
joachim99@2 327 allow_undefined_flag=' ${wl}-berok'
joachim99@2 328 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
joachim99@2 329 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 330 else
joachim99@2 331 if test "$host_cpu" = ia64; then
joachim99@2 332 hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
joachim99@2 333 allow_undefined_flag="-z nodefs"
joachim99@2 334 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 335 else
joachim99@2 336 allow_undefined_flag=' ${wl}-berok'
joachim99@2 337 # -bexpall does not export symbols beginning with underscore (_)
joachim99@2 338 always_export_symbols=yes
joachim99@2 339 # Exported symbols can be pulled into shared objects from archives
joachim99@2 340 whole_archive_flag_spec=' '
joachim99@2 341 build_libtool_need_lc=yes
joachim99@2 342 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
joachim99@2 343 # This is similar to how AIX traditionally builds it's shared libraries.
joachim99@2 344 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 345 fi
joachim99@2 346 fi
joachim99@2 347 ;;
joachim99@2 348
joachim99@2 349 amigaos*)
joachim99@2 350 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 351 hardcode_libdir_flag_spec='-L$libdir'
joachim99@2 352 hardcode_minus_L=yes
joachim99@2 353 # see comment about different semantics on the GNU ld section
joachim99@2 354 ld_shlibs=no
joachim99@2 355 ;;
joachim99@2 356
joachim99@2 357 cygwin* | mingw*)
joachim99@2 358 # When not using gcc, we currently assume that we are using
joachim99@2 359 # Microsoft Visual C++.
joachim99@2 360 # hardcode_libdir_flag_spec is actually meaningless, as there is
joachim99@2 361 # no search path for DLLs.
joachim99@2 362 hardcode_libdir_flag_spec=' '
joachim99@2 363 allow_undefined_flag=unsupported
joachim99@2 364 # Tell ltmain to make .lib files, not .a files.
joachim99@2 365 libext=lib
joachim99@2 366 # FIXME: Setting linknames here is a bad hack.
joachim99@2 367 archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
joachim99@2 368 # The linker will automatically build a .lib file if we build a DLL.
joachim99@2 369 old_archive_from_new_cmds='true'
joachim99@2 370 # FIXME: Should let the user specify the lib program.
joachim99@2 371 old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
joachim99@2 372 fix_srcfile_path='`cygpath -w "$srcfile"`'
joachim99@2 373 ;;
joachim99@2 374
joachim99@2 375 freebsd1*)
joachim99@2 376 ld_shlibs=no
joachim99@2 377 ;;
joachim99@2 378
joachim99@2 379 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
joachim99@2 380 # support. Future versions do this automatically, but an explicit c++rt0.o
joachim99@2 381 # does not break anything, and helps significantly (at the cost of a little
joachim99@2 382 # extra space).
joachim99@2 383 freebsd2.2*)
joachim99@2 384 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
joachim99@2 385 hardcode_libdir_flag_spec='-R$libdir'
joachim99@2 386 hardcode_direct=yes
joachim99@2 387 hardcode_shlibpath_var=no
joachim99@2 388 ;;
joachim99@2 389
joachim99@2 390 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
joachim99@2 391 freebsd2*)
joachim99@2 392 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
joachim99@2 393 hardcode_direct=yes
joachim99@2 394 hardcode_minus_L=yes
joachim99@2 395 hardcode_shlibpath_var=no
joachim99@2 396 ;;
joachim99@2 397
joachim99@2 398 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
joachim99@2 399 freebsd*)
joachim99@2 400 archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
joachim99@2 401 hardcode_libdir_flag_spec='-R$libdir'
joachim99@2 402 hardcode_direct=yes
joachim99@2 403 hardcode_shlibpath_var=no
joachim99@2 404 ;;
joachim99@2 405
joachim99@2 406 hpux9* | hpux10* | hpux11*)
joachim99@2 407 case $host_os in
joachim99@2 408 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 409 *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
joachim99@2 410 esac
joachim99@2 411 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
joachim99@2 412 hardcode_libdir_separator=:
joachim99@2 413 hardcode_direct=yes
joachim99@2 414 hardcode_minus_L=yes # Not in the search PATH, but as the default
joachim99@2 415 # location of the library.
joachim99@2 416 export_dynamic_flag_spec='${wl}-E'
joachim99@2 417 ;;
joachim99@2 418
joachim99@2 419 irix5* | irix6*)
joachim99@2 420 if test "$with_gcc" = yes; then
joachim99@2 421 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 422 else
joachim99@2 423 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 424 fi
joachim99@2 425 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
joachim99@2 426 hardcode_libdir_separator=:
joachim99@2 427 link_all_deplibs=yes
joachim99@2 428 ;;
joachim99@2 429
joachim99@2 430 netbsd*)
joachim99@2 431 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
joachim99@2 432 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
joachim99@2 433 else
joachim99@2 434 archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
joachim99@2 435 fi
joachim99@2 436 hardcode_libdir_flag_spec='${wl}-R$libdir'
joachim99@2 437 hardcode_direct=yes
joachim99@2 438 hardcode_shlibpath_var=no
joachim99@2 439 ;;
joachim99@2 440
joachim99@2 441 openbsd*)
joachim99@2 442 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
joachim99@2 443 hardcode_libdir_flag_spec='-R$libdir'
joachim99@2 444 hardcode_direct=yes
joachim99@2 445 hardcode_shlibpath_var=no
joachim99@2 446 ;;
joachim99@2 447
joachim99@2 448 os2*)
joachim99@2 449 hardcode_libdir_flag_spec='-L$libdir'
joachim99@2 450 hardcode_minus_L=yes
joachim99@2 451 allow_undefined_flag=unsupported
joachim99@2 452 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 453 old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
joachim99@2 454 ;;
joachim99@2 455
joachim99@2 456 osf3*)
joachim99@2 457 if test "$with_gcc" = yes; then
joachim99@2 458 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
joachim99@2 459 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 460 else
joachim99@2 461 allow_undefined_flag=' -expect_unresolved \*'
joachim99@2 462 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 463 fi
joachim99@2 464 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
joachim99@2 465 hardcode_libdir_separator=:
joachim99@2 466 ;;
joachim99@2 467
joachim99@2 468 osf4* | osf5*) # as osf3* with the addition of -msym flag
joachim99@2 469 if test "$with_gcc" = yes; then
joachim99@2 470 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
joachim99@2 471 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 472 else
joachim99@2 473 allow_undefined_flag=' -expect_unresolved \*'
joachim99@2 474 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 475 fi
joachim99@2 476 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
joachim99@2 477 hardcode_libdir_separator=:
joachim99@2 478 ;;
joachim99@2 479
joachim99@2 480 sco3.2v5*)
joachim99@2 481 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
joachim99@2 482 hardcode_shlibpath_var=no
joachim99@2 483 runpath_var=LD_RUN_PATH
joachim99@2 484 hardcode_runpath_var=yes
joachim99@2 485 ;;
joachim99@2 486
joachim99@2 487 solaris*)
joachim99@2 488 no_undefined_flag=' -z text'
joachim99@2 489 # $CC -shared without GNU ld will not create a library from C++
joachim99@2 490 # object files and a static libstdc++, better avoid it by now
joachim99@2 491 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
joachim99@2 492 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
joachim99@2 493 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
joachim99@2 494 hardcode_libdir_flag_spec='-R$libdir'
joachim99@2 495 hardcode_shlibpath_var=no
joachim99@2 496 case $host_os in
joachim99@2 497 solaris2.[0-5] | solaris2.[0-5].*) ;;
joachim99@2 498 *) # Supported since Solaris 2.6 (maybe 2.5.1?)
joachim99@2 499 whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
joachim99@2 500 esac
joachim99@2 501 link_all_deplibs=yes
joachim99@2 502 ;;
joachim99@2 503
joachim99@2 504 sunos4*)
joachim99@2 505 archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
joachim99@2 506 hardcode_libdir_flag_spec='-L$libdir'
joachim99@2 507 hardcode_direct=yes
joachim99@2 508 hardcode_minus_L=yes
joachim99@2 509 hardcode_shlibpath_var=no
joachim99@2 510 ;;
joachim99@2 511
joachim99@2 512 sysv4)
joachim99@2 513 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
joachim99@2 514 runpath_var='LD_RUN_PATH'
joachim99@2 515 hardcode_shlibpath_var=no
joachim99@2 516 hardcode_direct=no #Motorola manual says yes, but my tests say they lie
joachim99@2 517 ;;
joachim99@2 518
joachim99@2 519 sysv4.3*)
joachim99@2 520 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
joachim99@2 521 hardcode_shlibpath_var=no
joachim99@2 522 export_dynamic_flag_spec='-Bexport'
joachim99@2 523 ;;
joachim99@2 524
joachim99@2 525 sysv5*)
joachim99@2 526 no_undefined_flag=' -z text'
joachim99@2 527 # $CC -shared without GNU ld will not create a library from C++
joachim99@2 528 # object files and a static libstdc++, better avoid it by now
joachim99@2 529 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
joachim99@2 530 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
joachim99@2 531 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
joachim99@2 532 hardcode_libdir_flag_spec=
joachim99@2 533 hardcode_shlibpath_var=no
joachim99@2 534 runpath_var='LD_RUN_PATH'
joachim99@2 535 ;;
joachim99@2 536
joachim99@2 537 uts4*)
joachim99@2 538 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
joachim99@2 539 hardcode_libdir_flag_spec='-L$libdir'
joachim99@2 540 hardcode_shlibpath_var=no
joachim99@2 541 ;;
joachim99@2 542
joachim99@2 543 dgux*)
joachim99@2 544 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
joachim99@2 545 hardcode_libdir_flag_spec='-L$libdir'
joachim99@2 546 hardcode_shlibpath_var=no
joachim99@2 547 ;;
joachim99@2 548
joachim99@2 549 sysv4*MP*)
joachim99@2 550 if test -d /usr/nec; then
joachim99@2 551 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
joachim99@2 552 hardcode_shlibpath_var=no
joachim99@2 553 runpath_var=LD_RUN_PATH
joachim99@2 554 hardcode_runpath_var=yes
joachim99@2 555 ld_shlibs=yes
joachim99@2 556 fi
joachim99@2 557 ;;
joachim99@2 558
joachim99@2 559 sysv4.2uw2*)
joachim99@2 560 archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
joachim99@2 561 hardcode_direct=yes
joachim99@2 562 hardcode_minus_L=no
joachim99@2 563 hardcode_shlibpath_var=no
joachim99@2 564 hardcode_runpath_var=yes
joachim99@2 565 runpath_var=LD_RUN_PATH
joachim99@2 566 ;;
joachim99@2 567
joachim99@2 568 unixware7*)
joachim99@2 569 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
joachim99@2 570 runpath_var='LD_RUN_PATH'
joachim99@2 571 hardcode_shlibpath_var=no
joachim99@2 572 ;;
joachim99@2 573
joachim99@2 574 *)
joachim99@2 575 ld_shlibs=no
joachim99@2 576 ;;
joachim99@2 577 esac
joachim99@2 578 fi
joachim99@2 579
joachim99@2 580 ## Compiler Characteristics: PIC flags, static flags, etc
joachim99@2 581
joachim99@2 582 # We don't use cached values here since only the C compiler
joachim99@2 583 # characteristics should be cached.
joachim99@2 584 ac_cv_prog_cc_pic=
joachim99@2 585 ac_cv_prog_cc_shlib=
joachim99@2 586 ac_cv_prog_cc_wl=
joachim99@2 587 ac_cv_prog_cc_static=
joachim99@2 588 ac_cv_prog_cc_no_builtin=
joachim99@2 589 ac_cv_prog_cc_can_build_shared=$can_build_shared
joachim99@2 590
joachim99@2 591 ac_cv_prog_cc_wl='-Wl,'
joachim99@2 592 ac_cv_prog_cc_static='-static'
joachim99@2 593
joachim99@2 594 case $host_os in
joachim99@2 595 beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
joachim99@2 596 # PIC is the default for these OSes.
joachim99@2 597 ;;
joachim99@2 598 aix*)
joachim99@2 599 # Below there is a dirty hack to force normal static linking with -ldl
joachim99@2 600 # The problem is because libdl dynamically linked with both libc and
joachim99@2 601 # libC (AIX C++ library), which obviously doesn't included in libraries
joachim99@2 602 # list by gcc. This cause undefined symbols with -static flags.
joachim99@2 603 # This hack allows C programs to be linked with "-static -ldl", but
joachim99@2 604 # we not sure about C++ programs.
joachim99@2 605 ac_cv_prog_cc_static="$ac_cv_prog_cc_static ${ac_cv_prog_cc_wl}-lC"
joachim99@2 606 ;;
joachim99@2 607 *djgpp*)
joachim99@2 608 # DJGPP does not suppot shared libraries at all
joachim99@2 609 ac_cv_prog_cc_pic=
joachim99@2 610 ;;
joachim99@2 611 cygwin* | mingw* | os2*)
joachim99@2 612 # This hack is so that the source file can tell whether it is being
joachim99@2 613 # built for inclusion in a dll (and should export symbols for example).
joachim99@2 614 ac_cv_prog_cc_pic='-DDLL_EXPORT'
joachim99@2 615 ;;
joachim99@2 616 amigaos*)
joachim99@2 617 # FIXME: we need at least 68020 code to build shared libraries, but
joachim99@2 618 # adding the `-m68020' flag to GCC prevents building anything better,
joachim99@2 619 # like `-m68040'.
joachim99@2 620 ac_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
joachim99@2 621 ;;
joachim99@2 622 sysv4*MP*)
joachim99@2 623 if test -d /usr/nec; then
joachim99@2 624 ac_cv_prog_cc_pic=-Kconform_pic
joachim99@2 625 fi
joachim99@2 626 ;;
joachim99@2 627 *)
joachim99@2 628 ac_cv_prog_cc_pic='-fPIC'
joachim99@2 629 ;;
joachim99@2 630 esac
joachim99@2 631
joachim99@2 632 # GCJ did not exist at the time GCC didn't implicitly link libc in.
joachim99@2 633 need_lc=no
joachim99@2 634
joachim99@2 635 # All existing releases of GCJ support `-c -o'.
joachim99@2 636 lt_cv_compiler_c_o=yes