1 #### This script is meant to be sourced by ltconfig.
3 # ltcf-f77.sh - Create a fortran compiler specific configuration
5 # Copyright (C) 1996-1999, 2000, 2001 Free Software Foundation, Inc.
6 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
8 # NB: This is somewhat of a hack to support fortran for the stuff
9 # we need, don't trust it as a complete implementation!
11 # Original C++ support by:Gary V. Vaughan <gvv@techie.com>
12 # Alexandre Oliva <oliva@lsd.ic.unicamp.br>
13 # Ossama Othman <ossama@debian.org>
14 # Thomas Thanner <tanner@gmx.de>
16 # This file is free software; you can redistribute it and/or modify it
17 # under the terms of the GNU General Public License as published by
18 # the Free Software Foundation; either version 2 of the License, or
19 # (at your option) any later version.
21 # This program is distributed in the hope that it will be useful, but
22 # WITHOUT ANY WARRANTY; without even the implied warranty of
23 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
24 # General Public License for more details.
26 # You should have received a copy of the GNU General Public License
27 # along with this program; if not, write to the Free Software
28 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
30 # As a special exception to the GNU General Public License, if you
31 # distribute this file as part of a program that contains a
32 # configuration script generated by Autoconf, you may include it under
33 # the same distribution terms that you use for the rest of that program.
36 # Source file extension for fortran test sources.
38 # Source extension for f77 files to be preprocessed
41 # Object file extension for compiled C++ test sources.
44 # Code to be used in simple compile tests
45 lt_simple_compile_test_code=" subroutine t\n return\n end\n"
47 # Code to be used in simple link tests
48 lt_simple_link_test_code=" program t\n end\n"
53 # ltmain only uses $CC for tagged configurations so we simply trust CC is set....
55 ## Linker Characteristics
58 # FIXME: the MSVC++ port hasn't been tested in a loooong time
59 # When not using gcc, we currently assume that we are using
60 # Microsoft Visual C++.
61 if test "$with_gcc" != yes; then
68 if test "$with_gnu_ld" = yes; then
69 # If archive_cmds runs LD, not CC, wlarc should be empty
72 # See if GNU ld supports shared libraries.
74 aix3* | aix4* | aix5*)
75 # On AIX, the GNU linker is very broken
79 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
80 *** to be unable to reliably create shared libraries on AIX.
81 *** Therefore, libtool is disabling shared libraries support. If you
82 *** really care for shared libraries, you may want to modify your PATH
83 *** so that a non-GNU linker is found, and then restart.
89 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)'
90 hardcode_libdir_flag_spec='-L$libdir'
93 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
94 # that the semantics of dynamic libraries on AmigaOS, at least up
95 # to version 4, is to share data among multiple programs linked
96 # with the same dynamic library. Since this doesn't match the
97 # behavior of shared libraries on other platforms, we can use
103 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
104 allow_undefined_flag=unsupported
105 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
106 # support --undefined. This deserves some investigation. FIXME
107 archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
114 # hardcode_libdir_flag_spec is actually meaningless, as there is
115 # no search path for DLLs.
116 hardcode_libdir_flag_spec='-L$libdir'
117 allow_undefined_flag=unsupported
118 always_export_symbols=yes
120 extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
121 sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //; p; }" -e d < $0 > $output_objdir/impgen.c~
122 test -f $output_objdir/impgen.exe || (cd $output_objdir && \
123 if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
124 else $CC -o impgen impgen.c ; fi)~
125 $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
127 old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
129 # cygwin and mingw dlls have different entry points and sets of symbols
131 # FIXME: what about values for MSVC?
132 dll_entry=__cygwin_dll_entry@12
133 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
137 dll_entry=_DllMainCRTStartup@12
138 dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
142 # mingw and cygwin differ, and it's simplest to just exclude the union
143 # of the two symbol sets.
144 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
146 # recent cygwin and mingw systems supply a stub DllMain which the user
147 # can override, but on older systems we have to supply one (in ltdll.c)
148 if test "x$lt_cv_need_dllmain" = "xyes"; then
149 ltdll_obj='$output_objdir/$soname-ltdll.'"$objext "
150 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~
151 test -f $output_objdir/$soname-ltdll.$objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
157 # Extract the symbol export list from an `--export-all' def file,
158 # then regenerate the def file from the symbol export list, so that
159 # the compiled dll only exports the symbol export list.
160 # Be careful not to strip the DATA tag left be newer dlltools.
161 export_symbols_cmds="$ltdll_cmds"'
162 $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
163 sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
165 # If the export-symbols file already is a .def file (1st line
166 # is EXPORTS), use it as is.
167 # If DATA tags from a recent dlltool are present, honour them!
168 archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
169 cp $export_symbols $output_objdir/$soname-def;
171 echo EXPORTS > $output_objdir/$soname-def;
173 cat $export_symbols | while read symbol; do
176 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
177 *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
179 _lt_hint=`expr 1 + \$_lt_hint`;
183 $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~
184 $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~
185 $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~
186 $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~
187 $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
191 allow_undefined_flag='-undefined suppress'
192 archive_cmds='$CC `test .$module = .yes && echo -bundle || echo -dynamiclib` $allow_undefined_flag -o $lib $libobjs $deplibs $linkopts -install_name $rpath/$soname `test -n "$verstring" -a x$verstring != x0.0 && echo $verstring`'
193 # We need to add '_' to the symbols in $export_symbols first
194 #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
196 hardcode_shlibpath_var=no
197 whole_archive_flag_spec='-all_load $convenience'
201 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
202 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
205 archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
206 archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
211 if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
215 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
216 *** create shared libraries on Solaris systems. Therefore, libtool
217 *** is disabling shared libraries support. We urge you to upgrade GNU
218 *** binutils to release 2.9.1 or newer. Another option is to modify
219 *** your PATH or compiler configuration so that the native linker is
220 *** used, and then restart.
223 elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
224 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
225 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
232 archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
235 hardcode_shlibpath_var=no
239 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
240 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
241 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
248 if test "$ld_shlibs" = yes; then
249 runpath_var=LD_RUN_PATH
250 hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
251 export_dynamic_flag_spec='${wl}--export-dynamic'
254 # dlltool doesn't understand --whole-archive et. al.
255 whole_archive_flag_spec=
258 # ancient GNU ld didn't support --whole-archive et. al.
259 if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
260 whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
262 whole_archive_flag_spec=
268 # PORTME fill in a description of your system's linker (not GNU ld)
271 allow_undefined_flag=unsupported
272 always_export_symbols=yes
273 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'
274 # Note: this linker hardcodes the directories in LIBPATH if there
275 # are no directories specified by -L.
277 if test "$with_gcc" = yes && test -z "$link_static_flag"; then
278 # Neither direct hardcoding nor static linking is supported with a
280 hardcode_direct=unsupported
286 hardcode_libdir_separator=':'
288 # When large executables or shared objects are built, AIX ld can
289 # have problems creating the table of contents. If linking a library
290 # or program results in "error TOC overflow" add -mminimal-toc to
291 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
292 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
293 if test "$with_gcc" = yes; then
294 case $host_os in aix4.[012]|aix4.[012].*)
295 # We only want to do this on AIX 4.2 and lower, the check
296 # below for broken collect2 doesn't work under 4.3+
297 collect2name=`${CC} -print-prog-name=collect2`
298 if test -f "$collect2name" && \
299 strings "$collect2name" | grep resolve_lib_name >/dev/null
301 # We have reworked collect2
304 # We have old collect2
305 hardcode_direct=unsupported
306 # It fails to find uninstalled libraries when the uninstalled
307 # path is not listed in the libpath. Setting hardcode_minus_L
308 # to unsupported forces relinking
310 hardcode_libdir_flag_spec='-L$libdir'
311 hardcode_libdir_separator=
314 shared_flag='-shared'
317 if test "$host_cpu" = ia64; then
318 shared_flag='${wl}-G'
320 shared_flag='${wl}-bM:SRE'
324 if test "$host_cpu" = ia64; then
325 # On IA64, the linker does run time linking by default, so we don't
326 # have to do anything special.
327 aix_use_runtimelinking=no
328 exp_sym_flag='-Bexport'
331 # Test if we are trying to use run time linking, or normal AIX style linking.
332 # If -brtl is somewhere in LDFLAGS, we need to do run time linking.
333 aix_use_runtimelinking=no
334 for ld_flag in $LDFLAGS; do
335 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl" ); then
336 aix_use_runtimelinking=yes
340 exp_sym_flag='-bexport'
341 no_entry_flag='-bnoentry'
343 # -bexpall does not export symbols beginning with underscore (_)
344 always_export_symbols=yes
345 if test "$aix_use_runtimelinking" = yes; then
346 # Warning - without using the other run time loading flags (-brtl), -berok will
347 # link without error, but may produce a broken library.
348 allow_undefined_flag=' ${wl}-berok'
349 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
350 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"
352 if test "$host_cpu" = ia64; then
353 hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
354 allow_undefined_flag="-z nodefs"
355 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"
357 allow_undefined_flag=' ${wl}-berok'
358 # -bexpall does not export symbols beginning with underscore (_)
359 always_export_symbols=yes
360 # Exported symbols can be pulled into shared objects from archives
361 whole_archive_flag_spec=' '
362 build_libtool_need_lc=yes
363 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
364 # This is similar to how AIX traditionally builds it's shared libraries.
365 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'
371 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)'
372 hardcode_libdir_flag_spec='-L$libdir'
374 # see comment about different semantics on the GNU ld section
379 # When not using gcc, we currently assume that we are using
380 # Microsoft Visual C++.
381 # hardcode_libdir_flag_spec is actually meaningless, as there is
382 # no search path for DLLs.
383 hardcode_libdir_flag_spec=' '
384 allow_undefined_flag=unsupported
385 # Tell ltmain to make .lib files, not .a files.
387 # FIXME: Setting linknames here is a bad hack.
388 archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
389 # The linker will automatically build a .lib file if we build a DLL.
390 old_archive_from_new_cmds='true'
391 # FIXME: Should let the user specify the lib program.
392 old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
393 fix_srcfile_path='`cygpath -w "$srcfile"`'
400 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
401 # support. Future versions do this automatically, but an explicit c++rt0.o
402 # does not break anything, and helps significantly (at the cost of a little
405 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
406 hardcode_libdir_flag_spec='-R$libdir'
408 hardcode_shlibpath_var=no
411 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
413 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
416 hardcode_shlibpath_var=no
419 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
421 archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
422 hardcode_libdir_flag_spec='-R$libdir'
424 hardcode_shlibpath_var=no
427 hpux9* | hpux10* | hpux11*)
429 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' ;;
430 *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
432 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
433 hardcode_libdir_separator=:
435 hardcode_minus_L=yes # Not in the search PATH, but as the default
436 # location of the library.
437 export_dynamic_flag_spec='${wl}-E'
441 if test "$with_gcc" = yes; then
442 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'
444 archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
446 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
447 hardcode_libdir_separator=:
452 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
453 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
455 archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
457 hardcode_libdir_flag_spec='-R$libdir'
459 hardcode_shlibpath_var=no
463 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
465 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
466 hardcode_libdir_separator=:
467 hardcode_shlibpath_var=no
471 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
472 hardcode_libdir_flag_spec='-R$libdir'
474 hardcode_shlibpath_var=no
478 hardcode_libdir_flag_spec='-L$libdir'
480 allow_undefined_flag=unsupported
481 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'
482 old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
486 if test "$with_gcc" = yes; then
487 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
488 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'
490 allow_undefined_flag=' -expect_unresolved \*'
491 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'
493 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
494 hardcode_libdir_separator=:
497 osf4* | osf5*) # as osf3* with the addition of -msym flag
498 if test "$with_gcc" = yes; then
499 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
500 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'
501 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
503 allow_undefined_flag=' -expect_unresolved \*'
504 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'
505 archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
506 $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
508 # cc supports -rpath directly
509 hardcode_libdir_flag_spec='-rpath $libdir'
511 hardcode_libdir_separator=:
515 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
516 hardcode_shlibpath_var=no
517 runpath_var=LD_RUN_PATH
518 hardcode_runpath_var=yes
522 no_undefined_flag=' -z defs'
523 # $CC -shared without GNU ld will not create a library from C++
524 # object files and a static libstdc++, better avoid it by now
525 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
526 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
527 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
528 hardcode_libdir_flag_spec='-R$libdir'
529 hardcode_shlibpath_var=no
531 solaris2.[0-5] | solaris2.[0-5].*) ;;
532 *) # Supported since Solaris 2.6 (maybe 2.5.1?)
533 whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
539 archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
540 hardcode_libdir_flag_spec='-L$libdir'
543 hardcode_shlibpath_var=no
547 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
548 runpath_var='LD_RUN_PATH'
549 hardcode_shlibpath_var=no
550 hardcode_direct=no #Motorola manual says yes, but my tests say they lie
554 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
555 hardcode_shlibpath_var=no
556 export_dynamic_flag_spec='-Bexport'
560 no_undefined_flag=' -z text'
561 # $CC -shared without GNU ld will not create a library from C++
562 # object files and a static libstdc++, better avoid it by now
563 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
564 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
565 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
566 hardcode_libdir_flag_spec=
567 hardcode_shlibpath_var=no
568 runpath_var='LD_RUN_PATH'
572 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
573 hardcode_libdir_flag_spec='-L$libdir'
574 hardcode_shlibpath_var=no
578 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
579 hardcode_libdir_flag_spec='-L$libdir'
580 hardcode_shlibpath_var=no
584 if test -d /usr/nec; then
585 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
586 hardcode_shlibpath_var=no
587 runpath_var=LD_RUN_PATH
588 hardcode_runpath_var=yes
594 archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
597 hardcode_shlibpath_var=no
598 hardcode_runpath_var=yes
599 runpath_var=LD_RUN_PATH
602 sysv5uw7* | unixware7*)
603 no_undefined_flag='${wl}-z ${wl}text'
604 if test "$GCC" = yes; then
605 archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
607 archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
609 runpath_var='LD_RUN_PATH'
610 hardcode_shlibpath_var=no
622 #################################
623 ## Compiler Characteristics: PIC flags, static flags, etc
624 if test "X${ac_cv_prog_cc_pic+set}" = Xset; then
630 ac_cv_prog_cc_static=
631 ac_cv_prog_cc_no_builtin=
632 ac_cv_prog_cc_can_build_shared=$can_build_shared
634 if test "$with_gcc" = yes; then
635 ac_cv_prog_cc_wl='-Wl,'
636 ac_cv_prog_cc_static='-static'
640 # All AIX code is PIC.
641 if test "$host_cpu" = ia64; then
642 # AIX 5 now supports IA64 processor
643 lt_cv_prog_cc_static='-Bstatic'
645 lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
649 # FIXME: we need at least 68020 code to build shared libraries, but
650 # adding the `-m68020' flag to GCC prevents building anything better,
652 ac_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
654 beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
655 # PIC is the default for these OSes.
657 cygwin* | mingw* | os2*)
658 # This hack is so that the source file can tell whether it is being
659 # built for inclusion in a dll (and should export symbols for example).
660 ac_cv_prog_cc_pic='-DDLL_EXPORT'
663 # PIC is the default on this platform
664 # Common symbols not allowed in MH_DYLIB files
665 lt_cv_prog_cc_pic='-fno-common'
668 # DJGPP does not support shared libraries at all
672 if test -d /usr/nec; then
673 ac_cv_prog_cc_pic=-Kconform_pic
677 ac_cv_prog_cc_pic='-fPIC'
681 # PORTME Check for PIC flags for the system compiler.
684 # All AIX code is PIC.
685 ac_cv_prog_cc_static="$ac_cv_prog_cc_static ${ac_cv_prog_cc_wl}-lC"
688 hpux9* | hpux10* | hpux11*)
689 # Is there a better ac_cv_prog_cc_static that works with the bundled CC?
690 ac_cv_prog_cc_wl='-Wl,'
691 ac_cv_prog_cc_static="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
692 ac_cv_prog_cc_pic='+Z'
696 ac_cv_prog_cc_wl='-Wl,'
697 ac_cv_prog_cc_static='-non_shared'
698 # PIC (with -KPIC) is the default.
701 cygwin* | mingw* | os2*)
702 # This hack is so that the source file can tell whether it is being
703 # built for inclusion in a dll (and should export symbols for example).
704 ac_cv_prog_cc_pic='-DDLL_EXPORT'
708 ac_cv_prog_cc_pic='-KPIC'
709 ac_cv_prog_cc_static='-Bstatic'
712 osf3* | osf4* | osf5*)
713 # All OSF/1 code is PIC.
714 ac_cv_prog_cc_wl='-Wl,'
715 ac_cv_prog_cc_static='-non_shared'
719 ac_cv_prog_cc_pic='-Kpic'
720 ac_cv_prog_cc_static='-dn'
721 ac_cv_prog_cc_shlib='-belf'
725 ac_cv_prog_cc_pic='-KPIC'
726 ac_cv_prog_cc_static='-Bstatic'
727 ac_cv_prog_cc_wl='-Wl,'
731 ac_cv_prog_cc_pic='-PIC'
732 ac_cv_prog_cc_static='-Bstatic'
733 ac_cv_prog_cc_wl='-Qoption ld '
736 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
737 ac_cv_prog_cc_pic='-KPIC'
738 ac_cv_prog_cc_static='-Bstatic'
739 ac_cv_prog_cc_wl='-Wl,'
743 ac_cv_prog_cc_pic='-pic'
744 ac_cv_prog_cc_static='-Bstatic'
748 if test -d /usr/nec ;then
749 ac_cv_prog_cc_pic='-Kconform_pic'
750 ac_cv_prog_cc_static='-Bstatic'
755 ac_cv_prog_cc_can_build_shared=no
760 # Platforms which do not suport PIC
766 ac_cv_prog_cc_pic="$ac_cv_prog_cc_pic"
771 # This shouldn't matter, since we don't support linking with f77...
773 ac_cv_archive_cmds_needs_lc=$need_lc