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