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