annotate kdiff3/admin/ltcf-c.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-c.sh - Create a C compiler specific configuration
joachim99@2 4 #
joachim99@2 5 # Copyright (C) 1996-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 # This file is free software; you can redistribute it and/or modify it
joachim99@2 9 # under the terms of the GNU General Public License as published by
joachim99@2 10 # the Free Software Foundation; either version 2 of the License, or
joachim99@2 11 # (at your option) any later version.
joachim99@2 12 #
joachim99@2 13 # This program is distributed in the hope that it will be useful, but
joachim99@2 14 # WITHOUT ANY WARRANTY; without even the implied warranty of
joachim99@2 15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
joachim99@2 16 # General Public License for more details.
joachim99@2 17 #
joachim99@2 18 # You should have received a copy of the GNU General Public License
joachim99@2 19 # along with this program; if not, write to the Free Software
joachim99@2 20 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
joachim99@2 21 #
joachim99@2 22 # As a special exception to the GNU General Public License, if you
joachim99@2 23 # distribute this file as part of a program that contains a
joachim99@2 24 # configuration script generated by Autoconf, you may include it under
joachim99@2 25 # the same distribution terms that you use for the rest of that program.
joachim99@2 26
joachim99@2 27
joachim99@2 28 # Source file extension for C test sources.
joachim99@2 29 ac_ext=c
joachim99@2 30
joachim99@2 31 # Object file extension for compiled C test sources.
joachim99@2 32 objext=o
joachim99@2 33
joachim99@2 34 # Code to be used in simple compile tests
joachim99@2 35 lt_simple_compile_test_code="int some_variable = 0;"
joachim99@2 36
joachim99@2 37 # Code to be used in simple link tests
joachim99@2 38 lt_simple_link_test_code='main(){return(0);}'
joachim99@2 39
joachim99@2 40 ## Linker Characteristics
joachim99@2 41 case $host_os in
joachim99@2 42 cygwin* | mingw*)
joachim99@2 43 # FIXME: the MSVC++ port hasn't been tested in a loooong time
joachim99@2 44 # When not using gcc, we currently assume that we are using
joachim99@2 45 # Microsoft Visual C++.
joachim99@2 46 if test "$with_gcc" != yes; then
joachim99@2 47 with_gnu_ld=no
joachim99@2 48 fi
joachim99@2 49 ;;
joachim99@2 50
joachim99@2 51 esac
joachim99@2 52
joachim99@2 53 ld_shlibs=yes
joachim99@2 54 if test "$with_gnu_ld" = yes; then
joachim99@2 55 # If archive_cmds runs LD, not CC, wlarc should be empty
joachim99@2 56 wlarc='${wl}'
joachim99@2 57
joachim99@2 58 # See if GNU ld supports shared libraries.
joachim99@2 59 case $host_os in
joachim99@2 60 aix3* | aix4* | aix5*)
joachim99@2 61 # On AIX, the GNU linker is very broken
joachim99@2 62 ld_shlibs=no
joachim99@2 63 cat <<EOF 1>&2
joachim99@2 64
joachim99@2 65 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
joachim99@2 66 *** to be unable to reliably create shared libraries on AIX.
joachim99@2 67 *** Therefore, libtool is disabling shared libraries support. If you
joachim99@2 68 *** really care for shared libraries, you may want to modify your PATH
joachim99@2 69 *** so that a non-GNU linker is found, and then restart.
joachim99@2 70
joachim99@2 71 EOF
joachim99@2 72 ;;
joachim99@2 73
joachim99@2 74 amigaos*)
joachim99@2 75 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 76 hardcode_libdir_flag_spec='-L$libdir'
joachim99@2 77 hardcode_minus_L=yes
joachim99@2 78
joachim99@2 79 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
joachim99@2 80 # that the semantics of dynamic libraries on AmigaOS, at least up
joachim99@2 81 # to version 4, is to share data among multiple programs linked
joachim99@2 82 # with the same dynamic library. Since this doesn't match the
joachim99@2 83 # behavior of shared libraries on other platforms, we can use
joachim99@2 84 # them.
joachim99@2 85 ld_shlibs=no
joachim99@2 86 ;;
joachim99@2 87
joachim99@2 88 beos*)
joachim99@2 89 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
joachim99@2 90 allow_undefined_flag=unsupported
joachim99@2 91 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
joachim99@2 92 # support --undefined. This deserves some investigation. FIXME
joachim99@2 93 archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
joachim99@2 94 else
joachim99@2 95 ld_shlibs=no
joachim99@2 96 fi
joachim99@2 97 ;;
joachim99@2 98
joachim99@2 99 cygwin* | mingw*)
joachim99@2 100 # hardcode_libdir_flag_spec is actually meaningless, as there is
joachim99@2 101 # no search path for DLLs.
joachim99@2 102 hardcode_libdir_flag_spec='-L$libdir'
joachim99@2 103 allow_undefined_flag=unsupported
joachim99@2 104 always_export_symbols=yes
joachim99@2 105
joachim99@2 106 extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
joachim99@2 107 sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //; p; }" -e d < $0 > $output_objdir/impgen.c~
joachim99@2 108 test -f $output_objdir/impgen.exe || (cd $output_objdir && \
joachim99@2 109 if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
joachim99@2 110 else $CC -o impgen impgen.c ; fi)~
joachim99@2 111 $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
joachim99@2 112
joachim99@2 113 old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
joachim99@2 114
joachim99@2 115 # cygwin and mingw dlls have different entry points and sets of symbols
joachim99@2 116 # to exclude.
joachim99@2 117 # FIXME: what about values for MSVC?
joachim99@2 118 dll_entry=__cygwin_dll_entry@12
joachim99@2 119 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
joachim99@2 120 case $host_os in
joachim99@2 121 mingw*)
joachim99@2 122 # mingw values
joachim99@2 123 dll_entry=_DllMainCRTStartup@12
joachim99@2 124 dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
joachim99@2 125 ;;
joachim99@2 126 esac
joachim99@2 127
joachim99@2 128 # mingw and cygwin differ, and it's simplest to just exclude the union
joachim99@2 129 # of the two symbol sets.
joachim99@2 130 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
joachim99@2 131
joachim99@2 132 # recent cygwin and mingw systems supply a stub DllMain which the user
joachim99@2 133 # can override, but on older systems we have to supply one (in ltdll.c)
joachim99@2 134 if test "x$lt_cv_need_dllmain" = "xyes"; then
joachim99@2 135 ltdll_obj='$output_objdir/$soname-ltdll.'"$objext "
joachim99@2 136 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 137 test -f $output_objdir/$soname-ltdll.$objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
joachim99@2 138 else
joachim99@2 139 ltdll_obj=
joachim99@2 140 ltdll_cmds=
joachim99@2 141 fi
joachim99@2 142
joachim99@2 143 # Extract the symbol export list from an `--export-all' def file,
joachim99@2 144 # then regenerate the def file from the symbol export list, so that
joachim99@2 145 # the compiled dll only exports the symbol export list.
joachim99@2 146 # Be careful not to strip the DATA tag left be newer dlltools.
joachim99@2 147 export_symbols_cmds="$ltdll_cmds"'
joachim99@2 148 $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
joachim99@2 149 sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
joachim99@2 150
joachim99@2 151 # If the export-symbols file already is a .def file (1st line
joachim99@2 152 # is EXPORTS), use it as is.
joachim99@2 153 # If DATA tags from a recent dlltool are present, honour them!
joachim99@2 154 archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
joachim99@2 155 cp $export_symbols $output_objdir/$soname-def;
joachim99@2 156 else
joachim99@2 157 echo EXPORTS > $output_objdir/$soname-def;
joachim99@2 158 _lt_hint=1;
joachim99@2 159 cat $export_symbols | while read symbol; do
joachim99@2 160 set dummy \$symbol;
joachim99@2 161 case \[$]# in
joachim99@2 162 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
joachim99@2 163 *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
joachim99@2 164 esac;
joachim99@2 165 _lt_hint=`expr 1 + \$_lt_hint`;
joachim99@2 166 done;
joachim99@2 167 fi~
joachim99@2 168 '"$ltdll_cmds"'
joachim99@2 169 $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 170 $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 171 $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 172 $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 173 $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 174 ;;
joachim99@2 175
joachim99@2 176 darwin* | rhapsody*)
joachim99@2 177 allow_undefined_flag='-undefined suppress'
joachim99@2 178 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`'
joachim99@2 179 # We need to add '_' to the symbols in $export_symbols first
joachim99@2 180 #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
joachim99@2 181 hardcode_direct=yes
joachim99@2 182 hardcode_shlibpath_var=no
joachim99@2 183 whole_archive_flag_spec='-all_load $convenience'
joachim99@2 184 ;;
joachim99@2 185
joachim99@2 186 netbsd*)
joachim99@2 187 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
joachim99@2 188 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
joachim99@2 189 wlarc=
joachim99@2 190 else
joachim99@2 191 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
joachim99@2 192 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
joachim99@2 193 fi
joachim99@2 194 ;;
joachim99@2 195
joachim99@2 196 solaris* | sysv5*)
joachim99@2 197 if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
joachim99@2 198 ld_shlibs=no
joachim99@2 199 cat <<EOF 1>&2
joachim99@2 200
joachim99@2 201 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
joachim99@2 202 *** create shared libraries on Solaris systems. Therefore, libtool
joachim99@2 203 *** is disabling shared libraries support. We urge you to upgrade GNU
joachim99@2 204 *** binutils to release 2.9.1 or newer. Another option is to modify
joachim99@2 205 *** your PATH or compiler configuration so that the native linker is
joachim99@2 206 *** used, and then restart.
joachim99@2 207
joachim99@2 208 EOF
joachim99@2 209 elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
joachim99@2 210 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
joachim99@2 211 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
joachim99@2 212 else
joachim99@2 213 ld_shlibs=no
joachim99@2 214 fi
joachim99@2 215 ;;
joachim99@2 216
joachim99@2 217 sunos4*)
joachim99@2 218 archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
joachim99@2 219 wlarc=
joachim99@2 220 hardcode_direct=yes
joachim99@2 221 hardcode_shlibpath_var=no
joachim99@2 222 ;;
joachim99@2 223
joachim99@2 224 *)
joachim99@2 225 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
joachim99@2 226 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
joachim99@2 227 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
joachim99@2 228 else
joachim99@2 229 ld_shlibs=no
joachim99@2 230 fi
joachim99@2 231 ;;
joachim99@2 232 esac
joachim99@2 233
joachim99@2 234 case "$host_os" in
joachim99@2 235 freebsd*)
joachim99@2 236 skip_need_lc_check=yes
joachim99@2 237 ;;
joachim99@2 238 esac
joachim99@2 239
joachim99@2 240 if test "$ld_shlibs" = yes; then
joachim99@2 241 runpath_var=LD_RUN_PATH
joachim99@2 242 hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
joachim99@2 243 export_dynamic_flag_spec='${wl}--export-dynamic'
joachim99@2 244 case $host_os in
joachim99@2 245 cygwin* | mingw*)
joachim99@2 246 # dlltool doesn't understand --whole-archive et. al.
joachim99@2 247 whole_archive_flag_spec=
joachim99@2 248 ;;
joachim99@2 249 *)
joachim99@2 250 # ancient GNU ld didn't support --whole-archive et. al.
joachim99@2 251 if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
joachim99@2 252 whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
joachim99@2 253 else
joachim99@2 254 whole_archive_flag_spec=
joachim99@2 255 fi
joachim99@2 256 ;;
joachim99@2 257 esac
joachim99@2 258 fi
joachim99@2 259 else
joachim99@2 260 # PORTME fill in a description of your system's linker (not GNU ld)
joachim99@2 261 case $host_os in
joachim99@2 262 aix3*)
joachim99@2 263 allow_undefined_flag=unsupported
joachim99@2 264 always_export_symbols=yes
joachim99@2 265 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 266 # Note: this linker hardcodes the directories in LIBPATH if there
joachim99@2 267 # are no directories specified by -L.
joachim99@2 268 hardcode_minus_L=yes
joachim99@2 269 if test "$with_gcc" = yes && test -z "$link_static_flag"; then
joachim99@2 270 # Neither direct hardcoding nor static linking is supported with a
joachim99@2 271 # broken collect2.
joachim99@2 272 hardcode_direct=unsupported
joachim99@2 273 fi
joachim99@2 274 ;;
joachim99@2 275
joachim99@2 276 aix4* | aix5*)
joachim99@2 277 hardcode_direct=yes
joachim99@2 278 hardcode_libdir_separator=':'
joachim99@2 279 link_all_deplibs=yes
joachim99@2 280 # When large executables or shared objects are built, AIX ld can
joachim99@2 281 # have problems creating the table of contents. If linking a library
joachim99@2 282 # or program results in "error TOC overflow" add -mminimal-toc to
joachim99@2 283 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
joachim99@2 284 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
joachim99@2 285 if test "$with_gcc" = yes; then
joachim99@2 286 case $host_os in aix4.[012]|aix4.[012].*)
joachim99@2 287 # We only want to do this on AIX 4.2 and lower, the check
joachim99@2 288 # below for broken collect2 doesn't work under 4.3+
joachim99@2 289 collect2name=`${CC} -print-prog-name=collect2`
joachim99@2 290 if test -f "$collect2name" && \
joachim99@2 291 strings "$collect2name" | grep resolve_lib_name >/dev/null
joachim99@2 292 then
joachim99@2 293 # We have reworked collect2
joachim99@2 294 hardcode_direct=yes
joachim99@2 295 else
joachim99@2 296 # We have old collect2
joachim99@2 297 hardcode_direct=unsupported
joachim99@2 298 # It fails to find uninstalled libraries when the uninstalled
joachim99@2 299 # path is not listed in the libpath. Setting hardcode_minus_L
joachim99@2 300 # to unsupported forces relinking
joachim99@2 301 hardcode_minus_L=yes
joachim99@2 302 hardcode_libdir_flag_spec='-L$libdir'
joachim99@2 303 hardcode_libdir_separator=
joachim99@2 304 fi
joachim99@2 305 esac
joachim99@2 306 shared_flag='-shared'
joachim99@2 307 else
joachim99@2 308 # not using gcc
joachim99@2 309 if test "$host_cpu" = ia64; then
joachim99@2 310 shared_flag='${wl}-G'
joachim99@2 311 else
joachim99@2 312 shared_flag='${wl}-bM:SRE'
joachim99@2 313 fi
joachim99@2 314 fi
joachim99@2 315
joachim99@2 316 if test "$host_cpu" = ia64; then
joachim99@2 317 # On IA64, the linker does run time linking by default, so we don't
joachim99@2 318 # have to do anything special.
joachim99@2 319 aix_use_runtimelinking=no
joachim99@2 320 exp_sym_flag='-Bexport'
joachim99@2 321 no_entry_flag=""
joachim99@2 322 else
joachim99@2 323 # KDE requires run time linking. Make it the default.
joachim99@2 324 aix_use_runtimelinking=yes
joachim99@2 325 exp_sym_flag='-bexport'
joachim99@2 326 no_entry_flag='-bnoentry'
joachim99@2 327 fi
joachim99@2 328 # Let the compiler handle the export list.
joachim99@2 329 always_export_symbols=no
joachim99@2 330 if test "$aix_use_runtimelinking" = yes; then
joachim99@2 331 # Warning - without using the other run time loading flags (-brtl), -berok will
joachim99@2 332 # link without error, but may produce a broken library.
joachim99@2 333 allow_undefined_flag=' ${wl}-berok'
joachim99@2 334 # The following three lines along with hardcode_into_libs=yes put the correct path into libraries.
joachim99@2 335 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir${libdir:+:}/usr/lib:/lib'
joachim99@2 336 archive_cmds='$CC '"$shared_flag"' $libobjs $deplibs $compiler_flags ${wl}-G '"$hardcode_libdir_flag_spec"' -o $lib'
joachim99@2 337 archive_expsym_cmds='$CC '"$shared_flag"' $libobjs $deplibs $compiler_flags ${wl}-G '"$hardcode_libdir_flag_spec"' ${wl}'"$exp_sym_flag"':$export_symbols -o $lib'
joachim99@2 338 else
joachim99@2 339 if test "$host_cpu" = ia64; then
joachim99@2 340 hardcode_libdir_flag_spec='${wl}-R $libdir${libdir:+:}/usr/lib:/lib'
joachim99@2 341 allow_undefined_flag="-z nodefs"
joachim99@2 342 archive_cmds='$CC '"$shared_flag"' $libobjs $deplibs $compiler_flags '"$hardcode_libdir_flag_spec"' -o $lib'
joachim99@2 343 archive_expsym_cmds='$CC '"$shared_flag"' $libobjs $deplibs $compiler_flags '"$hardcode_libdir_flag_spec"' ${wl}'"$exp_sym_flag"':$export_symbols -o $lib'
joachim99@2 344 else
joachim99@2 345 allow_undefined_flag=' ${wl}-berok'
joachim99@2 346 # -bexpall does not export symbols beginning with underscore (_)
joachim99@2 347 always_export_symbols=yes
joachim99@2 348 # Exported symbols can be pulled into shared objects from archives
joachim99@2 349 whole_archive_flag_spec=' '
joachim99@2 350 build_libtool_need_lc=yes
joachim99@2 351 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
joachim99@2 352 # This is similar to how AIX traditionally builds it's shared libraries.
joachim99@2 353 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 354 fi
joachim99@2 355 fi
joachim99@2 356 ;;
joachim99@2 357
joachim99@2 358 amigaos*)
joachim99@2 359 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 360 hardcode_libdir_flag_spec='-L$libdir'
joachim99@2 361 hardcode_minus_L=yes
joachim99@2 362 # see comment about different semantics on the GNU ld section
joachim99@2 363 ld_shlibs=no
joachim99@2 364 ;;
joachim99@2 365
joachim99@2 366 cygwin* | mingw*)
joachim99@2 367 # When not using gcc, we currently assume that we are using
joachim99@2 368 # Microsoft Visual C++.
joachim99@2 369 # hardcode_libdir_flag_spec is actually meaningless, as there is
joachim99@2 370 # no search path for DLLs.
joachim99@2 371 hardcode_libdir_flag_spec=' '
joachim99@2 372 allow_undefined_flag=unsupported
joachim99@2 373 # Tell ltmain to make .lib files, not .a files.
joachim99@2 374 libext=lib
joachim99@2 375 # FIXME: Setting linknames here is a bad hack.
joachim99@2 376 archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
joachim99@2 377 # The linker will automatically build a .lib file if we build a DLL.
joachim99@2 378 old_archive_from_new_cmds='true'
joachim99@2 379 # FIXME: Should let the user specify the lib program.
joachim99@2 380 old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
joachim99@2 381 fix_srcfile_path='`cygpath -w "$srcfile"`'
joachim99@2 382 ;;
joachim99@2 383
joachim99@2 384 freebsd1*)
joachim99@2 385 ld_shlibs=no
joachim99@2 386 ;;
joachim99@2 387
joachim99@2 388 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
joachim99@2 389 # support. Future versions do this automatically, but an explicit c++rt0.o
joachim99@2 390 # does not break anything, and helps significantly (at the cost of a little
joachim99@2 391 # extra space).
joachim99@2 392 freebsd2.2*)
joachim99@2 393 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
joachim99@2 394 hardcode_libdir_flag_spec='-R$libdir'
joachim99@2 395 hardcode_direct=yes
joachim99@2 396 hardcode_shlibpath_var=no
joachim99@2 397 ;;
joachim99@2 398
joachim99@2 399 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
joachim99@2 400 freebsd2*)
joachim99@2 401 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
joachim99@2 402 hardcode_direct=yes
joachim99@2 403 hardcode_minus_L=yes
joachim99@2 404 hardcode_shlibpath_var=no
joachim99@2 405 ;;
joachim99@2 406
joachim99@2 407 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
joachim99@2 408 freebsd*)
joachim99@2 409 archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
joachim99@2 410 hardcode_libdir_flag_spec='-R$libdir'
joachim99@2 411 hardcode_direct=yes
joachim99@2 412 hardcode_shlibpath_var=no
joachim99@2 413 skip_need_lc_check=yes
joachim99@2 414 ;;
joachim99@2 415
joachim99@2 416 hpux9* | hpux10* | hpux11*)
joachim99@2 417 case $host_os in
joachim99@2 418 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 419 *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
joachim99@2 420 esac
joachim99@2 421 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
joachim99@2 422 hardcode_libdir_separator=:
joachim99@2 423 hardcode_direct=yes
joachim99@2 424 hardcode_minus_L=yes # Not in the search PATH, but as the default
joachim99@2 425 # location of the library.
joachim99@2 426 export_dynamic_flag_spec='${wl}-E'
joachim99@2 427 ;;
joachim99@2 428
joachim99@2 429 irix5* | irix6*)
joachim99@2 430 if test "$with_gcc" = yes; then
joachim99@2 431 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 432 else
joachim99@2 433 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 434 fi
joachim99@2 435 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
joachim99@2 436 hardcode_libdir_separator=:
joachim99@2 437 link_all_deplibs=yes
joachim99@2 438 ;;
joachim99@2 439
joachim99@2 440 netbsd*)
joachim99@2 441 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
joachim99@2 442 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
joachim99@2 443 else
joachim99@2 444 archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
joachim99@2 445 fi
joachim99@2 446 hardcode_libdir_flag_spec='-R$libdir'
joachim99@2 447 hardcode_direct=yes
joachim99@2 448 hardcode_shlibpath_var=no
joachim99@2 449 ;;
joachim99@2 450
joachim99@2 451 newsos6)
joachim99@2 452 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
joachim99@2 453 hardcode_direct=yes
joachim99@2 454 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
joachim99@2 455 hardcode_libdir_separator=:
joachim99@2 456 hardcode_shlibpath_var=no
joachim99@2 457 ;;
joachim99@2 458
joachim99@2 459 openbsd*)
joachim99@2 460 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
joachim99@2 461 hardcode_libdir_flag_spec='-R$libdir'
joachim99@2 462 hardcode_direct=yes
joachim99@2 463 hardcode_shlibpath_var=no
joachim99@2 464 ;;
joachim99@2 465
joachim99@2 466 os2*)
joachim99@2 467 hardcode_libdir_flag_spec='-L$libdir'
joachim99@2 468 hardcode_minus_L=yes
joachim99@2 469 allow_undefined_flag=unsupported
joachim99@2 470 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 471 old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
joachim99@2 472 ;;
joachim99@2 473
joachim99@2 474 osf3*)
joachim99@2 475 if test "$with_gcc" = yes; then
joachim99@2 476 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
joachim99@2 477 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 478 else
joachim99@2 479 allow_undefined_flag=' -expect_unresolved \*'
joachim99@2 480 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 481 fi
joachim99@2 482 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
joachim99@2 483 hardcode_libdir_separator=:
joachim99@2 484 ;;
joachim99@2 485
joachim99@2 486 osf4* | osf5*) # as osf3* with the addition of -msym flag
joachim99@2 487 if test "$with_gcc" = yes; then
joachim99@2 488 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
joachim99@2 489 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 490 else
joachim99@2 491 allow_undefined_flag=' -expect_unresolved \*'
joachim99@2 492 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 493 archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
joachim99@2 494 $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'
joachim99@2 495 fi
joachim99@2 496 hardcode_libdir_flag_spec='-rpath $libdir'
joachim99@2 497 hardcode_libdir_separator=:
joachim99@2 498 ;;
joachim99@2 499
joachim99@2 500 sco3.2v5*)
joachim99@2 501 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
joachim99@2 502 hardcode_shlibpath_var=no
joachim99@2 503 runpath_var=LD_RUN_PATH
joachim99@2 504 hardcode_runpath_var=yes
joachim99@2 505 ;;
joachim99@2 506
joachim99@2 507 solaris*)
joachim99@2 508 no_undefined_flag=' -z text'
joachim99@2 509 # $CC -shared without GNU ld will not create a library from C++
joachim99@2 510 # object files and a static libstdc++, better avoid it by now
joachim99@2 511 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
joachim99@2 512 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
joachim99@2 513 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
joachim99@2 514 hardcode_libdir_flag_spec='-R$libdir'
joachim99@2 515 hardcode_shlibpath_var=no
joachim99@2 516 case $host_os in
joachim99@2 517 solaris2.[0-5] | solaris2.[0-5].*) ;;
joachim99@2 518 *) # Supported since Solaris 2.6 (maybe 2.5.1?)
joachim99@2 519 whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
joachim99@2 520 esac
joachim99@2 521 link_all_deplibs=yes
joachim99@2 522 ;;
joachim99@2 523
joachim99@2 524 sunos4*)
joachim99@2 525 archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
joachim99@2 526 hardcode_libdir_flag_spec='-L$libdir'
joachim99@2 527 hardcode_direct=yes
joachim99@2 528 hardcode_minus_L=yes
joachim99@2 529 hardcode_shlibpath_var=no
joachim99@2 530 ;;
joachim99@2 531
joachim99@2 532 sysv4)
joachim99@2 533 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
joachim99@2 534 runpath_var='LD_RUN_PATH'
joachim99@2 535 hardcode_shlibpath_var=no
joachim99@2 536 hardcode_direct=no #Motorola manual says yes, but my tests say they lie
joachim99@2 537 ;;
joachim99@2 538
joachim99@2 539 sysv4.3*)
joachim99@2 540 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
joachim99@2 541 hardcode_shlibpath_var=no
joachim99@2 542 export_dynamic_flag_spec='-Bexport'
joachim99@2 543 ;;
joachim99@2 544
joachim99@2 545 sysv5*)
joachim99@2 546 no_undefined_flag=' -z text'
joachim99@2 547 # $CC -shared without GNU ld will not create a library from C++
joachim99@2 548 # object files and a static libstdc++, better avoid it by now
joachim99@2 549 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
joachim99@2 550 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
joachim99@2 551 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
joachim99@2 552 hardcode_libdir_flag_spec=
joachim99@2 553 hardcode_shlibpath_var=no
joachim99@2 554 runpath_var='LD_RUN_PATH'
joachim99@2 555 ;;
joachim99@2 556
joachim99@2 557 uts4*)
joachim99@2 558 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
joachim99@2 559 hardcode_libdir_flag_spec='-L$libdir'
joachim99@2 560 hardcode_shlibpath_var=no
joachim99@2 561 ;;
joachim99@2 562
joachim99@2 563 dgux*)
joachim99@2 564 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
joachim99@2 565 hardcode_libdir_flag_spec='-L$libdir'
joachim99@2 566 hardcode_shlibpath_var=no
joachim99@2 567 ;;
joachim99@2 568
joachim99@2 569 sysv4*MP*)
joachim99@2 570 if test -d /usr/nec; then
joachim99@2 571 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
joachim99@2 572 hardcode_shlibpath_var=no
joachim99@2 573 runpath_var=LD_RUN_PATH
joachim99@2 574 hardcode_runpath_var=yes
joachim99@2 575 ld_shlibs=yes
joachim99@2 576 fi
joachim99@2 577 ;;
joachim99@2 578
joachim99@2 579 sysv4.2uw2*)
joachim99@2 580 archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
joachim99@2 581 hardcode_direct=yes
joachim99@2 582 hardcode_minus_L=no
joachim99@2 583 hardcode_shlibpath_var=no
joachim99@2 584 hardcode_runpath_var=yes
joachim99@2 585 runpath_var=LD_RUN_PATH
joachim99@2 586 ;;
joachim99@2 587
joachim99@2 588 unixware7*)
joachim99@2 589 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
joachim99@2 590 runpath_var='LD_RUN_PATH'
joachim99@2 591 hardcode_shlibpath_var=no
joachim99@2 592 ;;
joachim99@2 593
joachim99@2 594 *)
joachim99@2 595 ld_shlibs=no
joachim99@2 596 ;;
joachim99@2 597 esac
joachim99@2 598 fi
joachim99@2 599
joachim99@2 600 ## Compiler Characteristics: PIC flags, static flags, etc
joachim99@2 601 if test "X${ac_cv_prog_cc_pic+set}" = Xset; then
joachim99@2 602 :
joachim99@2 603 else
joachim99@2 604 ac_cv_prog_cc_pic=
joachim99@2 605 ac_cv_prog_cc_shlib=
joachim99@2 606 ac_cv_prog_cc_wl=
joachim99@2 607 ac_cv_prog_cc_static=
joachim99@2 608 ac_cv_prog_cc_no_builtin=
joachim99@2 609 ac_cv_prog_cc_can_build_shared=$can_build_shared
joachim99@2 610
joachim99@2 611 if test "$with_gcc" = yes; then
joachim99@2 612 ac_cv_prog_cc_wl='-Wl,'
joachim99@2 613 ac_cv_prog_cc_static='-static'
joachim99@2 614
joachim99@2 615 case $host_os in
joachim99@2 616 aix*)
joachim99@2 617 # All AIX code is PIC.
joachim99@2 618 if test "$host_cpu" = ia64; then
joachim99@2 619 # AIX 5 now supports IA64 processor
joachim99@2 620 lt_cv_prog_cc_static='-Bstatic'
joachim99@2 621 else
joachim99@2 622 lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
joachim99@2 623 fi
joachim99@2 624 ;;
joachim99@2 625 amigaos*)
joachim99@2 626 # FIXME: we need at least 68020 code to build shared libraries, but
joachim99@2 627 # adding the `-m68020' flag to GCC prevents building anything better,
joachim99@2 628 # like `-m68040'.
joachim99@2 629 ac_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
joachim99@2 630 ;;
joachim99@2 631 beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
joachim99@2 632 # PIC is the default for these OSes.
joachim99@2 633 ;;
joachim99@2 634 cygwin* | mingw* | os2*)
joachim99@2 635 # This hack is so that the source file can tell whether it is being
joachim99@2 636 # built for inclusion in a dll (and should export symbols for example).
joachim99@2 637 ac_cv_prog_cc_pic='-DDLL_EXPORT'
joachim99@2 638 ;;
joachim99@2 639 darwin* | rhapsody*)
joachim99@2 640 # PIC is the default on this platform
joachim99@2 641 # Common symbols not allowed in MH_DYLIB files
joachim99@2 642 lt_cv_prog_cc_pic='-fno-common'
joachim99@2 643 ;;
joachim99@2 644 *djgpp*)
joachim99@2 645 # DJGPP does not support shared libraries at all
joachim99@2 646 ac_cv_prog_cc_pic=
joachim99@2 647 ;;
joachim99@2 648 sysv4*MP*)
joachim99@2 649 if test -d /usr/nec; then
joachim99@2 650 ac_cv_prog_cc_pic=-Kconform_pic
joachim99@2 651 fi
joachim99@2 652 ;;
joachim99@2 653 *)
joachim99@2 654 ac_cv_prog_cc_pic='-fPIC'
joachim99@2 655 ;;
joachim99@2 656 esac
joachim99@2 657 else
joachim99@2 658 # PORTME Check for PIC flags for the system compiler.
joachim99@2 659 case $host_os in
joachim99@2 660 aix*)
joachim99@2 661 # All AIX code is PIC.
joachim99@2 662 ac_cv_prog_cc_static="$ac_cv_prog_cc_static ${ac_cv_prog_cc_wl}-lC"
joachim99@2 663 ;;
joachim99@2 664
joachim99@2 665 hpux9* | hpux10* | hpux11*)
joachim99@2 666 # Is there a better ac_cv_prog_cc_static that works with the bundled CC?
joachim99@2 667 ac_cv_prog_cc_wl='-Wl,'
joachim99@2 668 ac_cv_prog_cc_static="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
joachim99@2 669 ac_cv_prog_cc_pic='+Z'
joachim99@2 670 ;;
joachim99@2 671
joachim99@2 672 irix5* | irix6*)
joachim99@2 673 ac_cv_prog_cc_wl='-Wl,'
joachim99@2 674 ac_cv_prog_cc_static='-non_shared'
joachim99@2 675 # PIC (with -KPIC) is the default.
joachim99@2 676 ;;
joachim99@2 677
joachim99@2 678 cygwin* | mingw* | os2*)
joachim99@2 679 # This hack is so that the source file can tell whether it is being
joachim99@2 680 # built for inclusion in a dll (and should export symbols for example).
joachim99@2 681 ac_cv_prog_cc_pic='-DDLL_EXPORT'
joachim99@2 682 ;;
joachim99@2 683
joachim99@2 684 linux*)
joachim99@2 685 case "$CC" in
joachim99@2 686 ccc*)
joachim99@2 687 # Compaq C
joachim99@2 688 # It appears that all Alpha
joachim99@2 689 # Linux and Compaq Tru64 Unix objects are PIC.
joachim99@2 690 ac_cv_prog_cc_static='-non_shared'
joachim99@2 691 ;;
joachim99@2 692 KCC*)
joachim99@2 693 # KAI C++
joachim99@2 694 ac_cv_prog_cc_pic='-fPIC'
joachim99@2 695 ac_cv_prog_cc_wl='--backend -Wl,'
joachim99@2 696 ac_cv_prog_cc_static='-Bstatic'
joachim99@2 697 ;;
joachim99@2 698 *)
joachim99@2 699 ;;
joachim99@2 700 esac
joachim99@2 701 ;;
joachim99@2 702
joachim99@2 703 newsos6)
joachim99@2 704 ac_cv_prog_cc_pic='-KPIC'
joachim99@2 705 ac_cv_prog_cc_static='-Bstatic'
joachim99@2 706 ;;
joachim99@2 707
joachim99@2 708 osf3* | osf4* | osf5*)
joachim99@2 709 # All OSF/1 code is PIC.
joachim99@2 710 ac_cv_prog_cc_wl='-Wl,'
joachim99@2 711 ac_cv_prog_cc_static='-non_shared'
joachim99@2 712 ;;
joachim99@2 713
joachim99@2 714 sco3.2v5*)
joachim99@2 715 ac_cv_prog_cc_pic='-Kpic'
joachim99@2 716 ac_cv_prog_cc_static='-dn'
joachim99@2 717 ac_cv_prog_cc_shlib='-belf'
joachim99@2 718 ;;
joachim99@2 719
joachim99@2 720 solaris*)
joachim99@2 721 ac_cv_prog_cc_pic='-KPIC'
joachim99@2 722 ac_cv_prog_cc_static='-Bstatic'
joachim99@2 723 ac_cv_prog_cc_wl='-Wl,'
joachim99@2 724 ;;
joachim99@2 725
joachim99@2 726 sunos4*)
joachim99@2 727 ac_cv_prog_cc_pic='-PIC'
joachim99@2 728 ac_cv_prog_cc_static='-Bstatic'
joachim99@2 729 ac_cv_prog_cc_wl='-Qoption ld '
joachim99@2 730 ;;
joachim99@2 731
joachim99@2 732 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
joachim99@2 733 ac_cv_prog_cc_pic='-KPIC'
joachim99@2 734 ac_cv_prog_cc_static='-Bstatic'
joachim99@2 735 ac_cv_prog_cc_wl='-Wl,'
joachim99@2 736 ;;
joachim99@2 737
joachim99@2 738 uts4*)
joachim99@2 739 ac_cv_prog_cc_pic='-pic'
joachim99@2 740 ac_cv_prog_cc_static='-Bstatic'
joachim99@2 741 ;;
joachim99@2 742
joachim99@2 743 sysv4*MP*)
joachim99@2 744 if test -d /usr/nec ;then
joachim99@2 745 ac_cv_prog_cc_pic='-Kconform_pic'
joachim99@2 746 ac_cv_prog_cc_static='-Bstatic'
joachim99@2 747 fi
joachim99@2 748 ;;
joachim99@2 749
joachim99@2 750 *)
joachim99@2 751 ac_cv_prog_cc_can_build_shared=no
joachim99@2 752 ;;
joachim99@2 753 esac
joachim99@2 754 fi
joachim99@2 755 case "$host_os" in
joachim99@2 756 # Platforms which do not suport PIC and -DPIC is meaningless
joachim99@2 757 # on them:
joachim99@2 758 *djgpp*)
joachim99@2 759 ac_cv_prog_cc_pic=
joachim99@2 760 ;;
joachim99@2 761 *)
joachim99@2 762 ac_cv_prog_cc_pic="$ac_cv_prog_cc_pic -DPIC"
joachim99@2 763 ;;
joachim99@2 764 esac
joachim99@2 765 fi
joachim99@2 766
joachim99@2 767 need_lc=yes
joachim99@2 768 if test "$enable_shared" = yes && test "$with_gcc" = yes; then
joachim99@2 769 case $archive_cmds in
joachim99@2 770 *'~'*)
joachim99@2 771 # FIXME: we may have to deal with multi-command sequences.
joachim99@2 772 ;;
joachim99@2 773 '$CC '*)
joachim99@2 774 # Test whether the compiler implicitly links with -lc since on some
joachim99@2 775 # systems, -lgcc has to come before -lc. If gcc already passes -lc
joachim99@2 776 # to ld, don't add -lc before -lgcc.
joachim99@2 777 echo $ac_n "checking whether -lc should be explicitly linked in... $ac_c" 1>&6
joachim99@2 778 if eval "test \"`echo '$''{'ac_cv_archive_cmds_needs_lc'+set}'`\" = set"; then
joachim99@2 779 echo $ac_n "(cached) $ac_c" 1>&6
joachim99@2 780 need_lc=$ac_cv_archive_cmds_needs_lc
joachim99@2 781 elif test "x$skip_need_lc_check" = "xyes" ; then
joachim99@2 782 echo $ac_n "(skipping, using no) $ac_c" 1>&6
joachim99@2 783 need_lc=no
joachim99@2 784 else
joachim99@2 785 $rm conftest*
joachim99@2 786 echo "static int dummy;" > conftest.$ac_ext
joachim99@2 787 if { (eval echo ltcf-c.sh:need_lc: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; }; then
joachim99@2 788 # Append any warnings to the config.log.
joachim99@2 789 cat conftest.err 1>&5
joachim99@2 790 soname=conftest
joachim99@2 791 lib=conftest
joachim99@2 792 libobjs=conftest.$ac_objext
joachim99@2 793 deplibs=
joachim99@2 794 wl=$ac_cv_prog_cc_wl
joachim99@2 795 compiler_flags=-v
joachim99@2 796 linker_flags=-v
joachim99@2 797 verstring=
joachim99@2 798 output_objdir=.
joachim99@2 799 libname=conftest
joachim99@2 800 save_allow_undefined_flag=$allow_undefined_flag
joachim99@2 801 allow_undefined_flag=
joachim99@2 802 if { (eval echo ltcf-c.sh:need_lc: \"$archive_cmds\") 1>&5; (eval $archive_cmds) 2>&1 | grep " -lc " 1>&5 ; }; then
joachim99@2 803 need_lc=no
joachim99@2 804 fi
joachim99@2 805 allow_undefined_flag=$save_allow_undefined_flag
joachim99@2 806 else
joachim99@2 807 cat conftest.err 1>&5
joachim99@2 808 fi
joachim99@2 809 fi
joachim99@2 810 $rm conftest*
joachim99@2 811 echo "$ac_t$need_lc" 1>&6
joachim99@2 812 ;;
joachim99@2 813 esac
joachim99@2 814 fi
joachim99@2 815 ac_cv_archive_cmds_needs_lc=$need_lc