annotate kdiff3/admin/ltcf-cxx.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-cxx.sh - Create a C++ compiler specific configuration
joachim99@2 4 #
joachim99@2 5 # Copyright (C) 1996-1999, 2000, 2001 Free Software Foundation, Inc.
joachim99@2 6 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
joachim99@2 7 #
joachim99@2 8 # Original C++ support by:Gary V. Vaughan <gvv@techie.com>
joachim99@2 9 # Alexandre Oliva <oliva@lsd.ic.unicamp.br>
joachim99@2 10 # Ossama Othman <ossama@debian.org>
joachim99@2 11 # Thomas Thanner <tanner@gmx.de>
joachim99@2 12 #
joachim99@2 13 # This file is free software; you can redistribute it and/or modify it
joachim99@2 14 # under the terms of the GNU General Public License as published by
joachim99@2 15 # the Free Software Foundation; either version 2 of the License, or
joachim99@2 16 # (at your option) any later version.
joachim99@2 17 #
joachim99@2 18 # This program is distributed in the hope that it will be useful, but
joachim99@2 19 # WITHOUT ANY WARRANTY; without even the implied warranty of
joachim99@2 20 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
joachim99@2 21 # General Public License for more details.
joachim99@2 22 #
joachim99@2 23 # You should have received a copy of the GNU General Public License
joachim99@2 24 # along with this program; if not, write to the Free Software
joachim99@2 25 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
joachim99@2 26 #
joachim99@2 27 # As a special exception to the GNU General Public License, if you
joachim99@2 28 # distribute this file as part of a program that contains a
joachim99@2 29 # configuration script generated by Autoconf, you may include it under
joachim99@2 30 # the same distribution terms that you use for the rest of that program.
joachim99@2 31
joachim99@2 32
joachim99@2 33 # Source file extension for C++ test sources.
joachim99@2 34 ac_ext=cc
joachim99@2 35
joachim99@2 36 # Object file extension for compiled C++ test sources.
joachim99@2 37 objext=o
joachim99@2 38
joachim99@2 39 # Code to be used in simple compile tests
joachim99@2 40 lt_simple_compile_test_code="int some_variable = 0;"
joachim99@2 41
joachim99@2 42 # Code to be used in simple link tests
joachim99@2 43 lt_simple_link_test_code='int main(int, char *[]) { return (0); }'
joachim99@2 44
joachim99@2 45 # C++ compiler
joachim99@2 46 CXX=${CXX-c++}
joachim99@2 47
joachim99@2 48 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
joachim99@2 49 CC=${CC-"$CXX"}
joachim99@2 50 CFLAGS=${CFLAGS-"$CXXFLAGS"}
joachim99@2 51
joachim99@2 52 # Allow CC (or CXX) to be a program name with arguments.
joachim99@2 53 set dummy $CC
joachim99@2 54 compiler=$2
joachim99@2 55 cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
joachim99@2 56
joachim99@2 57 # we are optimistic. (Too optimistic if you ask me, down there we switch it
joachim99@2 58 # off again for most platforms ;) (MM)
joachim99@2 59 ld_shlibs=yes
joachim99@2 60
joachim99@2 61 # Check if we are using GNU gcc (taken/adapted from configure script)
joachim99@2 62 # We need to check here since "--with-gcc" is set at configure time,
joachim99@2 63 # not ltconfig time!
joachim99@2 64 cat > conftest.$ac_ext <<EOF
joachim99@2 65 #ifdef __GNUC__
joachim99@2 66 yes;
joachim99@2 67 #endif
joachim99@2 68 EOF
joachim99@2 69 if { ac_try='${CC-c++} -E conftest.$ac_ext'; { (eval echo \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
joachim99@2 70 with_gcc=yes
joachim99@2 71
joachim99@2 72 # Set up default GNU C++ configuration
joachim99@2 73
joachim99@2 74 # Check if GNU C++ uses GNU ld as the underlying linker, since the
joachim99@2 75 # archiving commands below assume that GNU ld is being used.
joachim99@2 76 if eval "`$CC -print-prog-name=ld` --version 2>&1" | \
joachim99@2 77 egrep 'GNU ld' > /dev/null; then
joachim99@2 78 with_gnu_ld=yes
joachim99@2 79
joachim99@2 80 archive_cmds='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
joachim99@2 81 archive_expsym_cmds='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
joachim99@2 82
joachim99@2 83 runpath_var=LD_RUN_PATH
joachim99@2 84 hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
joachim99@2 85 export_dynamic_flag_spec='${wl}--export-dynamic'
joachim99@2 86
joachim99@2 87 # If archive_cmds runs LD, not CC, wlarc should be empty
joachim99@2 88 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
joachim99@2 89 # investigate it a little bit more. (MM)
joachim99@2 90 wlarc='${wl}'
joachim99@2 91
joachim99@2 92 # ancient GNU ld didn't support --whole-archive et. al.
joachim99@2 93 if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
joachim99@2 94 egrep 'no-whole-archive' > /dev/null; then
joachim99@2 95 whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
joachim99@2 96 else
joachim99@2 97 whole_archive_flag_spec=
joachim99@2 98 fi
joachim99@2 99 else
joachim99@2 100 with_gnu_ld=no
joachim99@2 101 wlarc=
joachim99@2 102
joachim99@2 103 # A generic and very simple default shared library creation
joachim99@2 104 # command for GNU C++ for the case where it uses the native
joachim99@2 105 # linker, instead of GNU ld. If possible, this setting should
joachim99@2 106 # overridden to take advantage of the native linker features on
joachim99@2 107 # the platform it is being used on.
joachim99@2 108 archive_cmds='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
joachim99@2 109 fi
joachim99@2 110
joachim99@2 111 # Commands to make compiler produce verbose output that lists
joachim99@2 112 # what "hidden" libraries, object files and flags are used when
joachim99@2 113 # linking a shared library.
joachim99@2 114 output_verbose_link_cmds='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
joachim99@2 115
joachim99@2 116 else
joachim99@2 117 with_gcc=no
joachim99@2 118 with_gnu_ld=no
joachim99@2 119 wlarc=
joachim99@2 120 fi
joachim99@2 121
joachim99@2 122 echo "ltcf-cxx: with_gcc=$with_gcc ; with_gnu_ld=$with_gnu_ld"
joachim99@2 123
joachim99@2 124 # PORTME: fill in a description of your system's C++ link characteristics
joachim99@2 125 case $host_os in
joachim99@2 126 aix3*)
joachim99@2 127 # FIXME: insert proper C++ library support
joachim99@2 128 ld_shlibs=no
joachim99@2 129 ;;
joachim99@2 130 aix4* | aix5*)
joachim99@2 131 archive_cmds=''
joachim99@2 132 hardcode_direct=yes
joachim99@2 133 hardcode_libdir_separator=':'
joachim99@2 134 link_all_deplibs=yes
joachim99@2 135 # When large executables or shared objects are built, AIX ld can
joachim99@2 136 # have problems creating the table of contents. If linking a library
joachim99@2 137 # or program results in "error TOC overflow" add -mminimal-toc to
joachim99@2 138 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
joachim99@2 139 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
joachim99@2 140 if test "$with_gcc" = yes; then
joachim99@2 141 case $host_os in aix4.[012]|aix4.[012].*)
joachim99@2 142 # We only want to do this on AIX 4.2 and lower, the check
joachim99@2 143 # below for broken collect2 doesn't work under 4.3+
joachim99@2 144 collect2name=`${CC} -print-prog-name=collect2`
joachim99@2 145 if test -f "$collect2name" && \
joachim99@2 146 strings "$collect2name" | grep resolve_lib_name >/dev/null
joachim99@2 147 then
joachim99@2 148 # We have reworked collect2
joachim99@2 149 hardcode_direct=yes
joachim99@2 150 else
joachim99@2 151 # We have old collect2
joachim99@2 152 hardcode_direct=unsupported
joachim99@2 153 # It fails to find uninstalled libraries when the uninstalled
joachim99@2 154 # path is not listed in the libpath. Setting hardcode_minus_L
joachim99@2 155 # to unsupported forces relinking
joachim99@2 156 hardcode_minus_L=yes
joachim99@2 157 hardcode_libdir_flag_spec='-L$libdir'
joachim99@2 158 hardcode_libdir_separator=
joachim99@2 159 fi
joachim99@2 160 esac
joachim99@2 161 shared_flag='-shared'
joachim99@2 162 else
joachim99@2 163 # not using gcc
joachim99@2 164 if test "$host_cpu" = ia64; then
joachim99@2 165 shared_flag='${wl}-G'
joachim99@2 166 else
joachim99@2 167 shared_flag='${wl}-bM:SRE'
joachim99@2 168 fi
joachim99@2 169 fi
joachim99@2 170
joachim99@2 171 if test "$host_cpu" = ia64; then
joachim99@2 172 # On IA64, the linker does run time linking by default, so we don't
joachim99@2 173 # have to do anything special.
joachim99@2 174 aix_use_runtimelinking=no
joachim99@2 175 exp_sym_flag='-Bexport'
joachim99@2 176 no_entry_flag=""
joachim99@2 177 else
joachim99@2 178 # KDE requires run time linking. Make it the default.
joachim99@2 179 aix_use_runtimelinking=yes
joachim99@2 180 exp_sym_flag='-bexport'
joachim99@2 181 no_entry_flag='-bnoentry'
joachim99@2 182 fi
joachim99@2 183 # Let the compiler handle the export list.
joachim99@2 184 always_export_symbols=no
joachim99@2 185 if test "$aix_use_runtimelinking" = yes; then
joachim99@2 186 allow_undefined_flag=' ${wl}-berok'
joachim99@2 187 # The following three lines along with hardcode_into_libs=yes put the correct path into libraries.
joachim99@2 188 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir${libdir:+:}/usr/lib:/lib'
joachim99@2 189 archive_cmds='$CC '"$shared_flag"' $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-G '"$hardcode_libdir_flag_spec"' -o $lib'
joachim99@2 190 archive_expsym_cmds='$CC '"$shared_flag"' $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-G '"$hardcode_libdir_flag_spec"' ${wl}'"$exp_sym_flag"':$export_symbols -o $lib'
joachim99@2 191 else
joachim99@2 192 if test "$host_cpu" = ia64; then
joachim99@2 193 hardcode_libdir_flag_spec='${wl}-R $libdir${libdir:+:}/usr/lib:/lib'
joachim99@2 194 allow_undefined_flag="-z nodefs"
joachim99@2 195 archive_cmds='$CC '"$shared_flag"' $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags '"$hardcode_libdir_flag_spec"' -o $lib'
joachim99@2 196 archive_expsym_cmds='$CC '"$shared_flag"' $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags '"$hardcode_libdir_flag_spec"' ${wl}'"$exp_sym_flag"':$export_symbols -o $lib'
joachim99@2 197 else
joachim99@2 198 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
joachim99@2 199 # Warning - without using the other run time loading flags, -berok will
joachim99@2 200 # link without error, but may produce a broken library.
joachim99@2 201 no_undefined_flag='${wl}-bnoerok'
joachim99@2 202 allow_undefined_flag='${wl}-berok"
joachim99@2 203 # -bexpall does not export symbols beginning with underscore (_)
joachim99@2 204 always_export_symbols=yes
joachim99@2 205 # Exported symbols can be pulled into shared objects from archives
joachim99@2 206 whole_archive_flag_spec=' '
joachim99@2 207 build_libtool_need_lc=yes
joachim99@2 208 # This is similar to how AIX traditionally builds it's shared libraries.
joachim99@2 209 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 210 fi
joachim99@2 211 fi
joachim99@2 212 ;;
joachim99@2 213 chorus*)
joachim99@2 214 case $cc_basename in
joachim99@2 215 *)
joachim99@2 216 # FIXME: insert proper C++ library support
joachim99@2 217 ld_shlibs=no
joachim99@2 218 ;;
joachim99@2 219 esac
joachim99@2 220 ;;
joachim99@2 221 dgux*)
joachim99@2 222 case $cc_basename in
joachim99@2 223 ec++)
joachim99@2 224 # FIXME: insert proper C++ library support
joachim99@2 225 ld_shlibs=no
joachim99@2 226 ;;
joachim99@2 227 ghcx)
joachim99@2 228 # Green Hills C++ Compiler
joachim99@2 229 # FIXME: insert proper C++ library support
joachim99@2 230 ld_shlibs=no
joachim99@2 231 ;;
joachim99@2 232 *)
joachim99@2 233 # FIXME: insert proper C++ library support
joachim99@2 234 ld_shlibs=no
joachim99@2 235 ;;
joachim99@2 236 esac
joachim99@2 237 ;;
joachim99@2 238 freebsd*)
joachim99@2 239 # FreeBSD uses GNU C++ and GNU ld
joachim99@2 240 skip_need_lc_check=yes
joachim99@2 241 remove_lgcc=yes
joachim99@2 242 ;;
joachim99@2 243 hpux*)
joachim99@2 244 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
joachim99@2 245 hardcode_libdir_separator=:
joachim99@2 246 hardcode_direct=yes
joachim99@2 247 hardcode_minus_L=yes # Not in the search PATH, but as the default
joachim99@2 248 # location of the library.
joachim99@2 249 export_dynamic_flag_spec='${wl}-E'
joachim99@2 250
joachim99@2 251 case $cc_basename in
joachim99@2 252 CC)
joachim99@2 253 # FIXME: insert proper C++ library support
joachim99@2 254 ld_shlibs=no
joachim99@2 255 ;;
joachim99@2 256 aCC)
joachim99@2 257 case $host_os in
joachim99@2 258 hpux9*) archive_cmds='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;;
joachim99@2 259 *) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;;
joachim99@2 260 esac
joachim99@2 261 # Commands to make compiler produce verbose output that lists
joachim99@2 262 # what "hidden" libraries, object files and flags are used when
joachim99@2 263 # linking a shared library.
joachim99@2 264 #
joachim99@2 265 # There doesn't appear to be a way to prevent this compiler from
joachim99@2 266 # explicitly linking system object files so we need to strip them
joachim99@2 267 # from the output so that they don't get included in the library
joachim99@2 268 # dependencies.
joachim99@2 269 output_verbose_link_cmds='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | egrep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
joachim99@2 270 ;;
joachim99@2 271 *)
joachim99@2 272 if test "$with_gcc" = yes && test "$with_gnu_ld" = no ; then
joachim99@2 273 # MM: for HP-UX and g++ -fPIC is needed to link pic objects together
joachim99@2 274 case $host_os in
joachim99@2 275 hpux9*) archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;;
joachim99@2 276 *) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;;
joachim99@2 277 esac
joachim99@2 278 output_verbose_link_cmds='$CC -shared -fPIC $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
joachim99@2 279 remove_lgcc=yes
joachim99@2 280 fi
joachim99@2 281 if test "$with_gcc" = no ; then
joachim99@2 282 # FIXME: insert proper C++ library support
joachim99@2 283 ld_shlibs=no
joachim99@2 284 fi
joachim99@2 285 ;;
joachim99@2 286 esac
joachim99@2 287 ;;
joachim99@2 288 irix5* | irix6*)
joachim99@2 289 case $cc_basename in
joachim99@2 290 CC)
joachim99@2 291 # SGI C++
joachim99@2 292 archive_cmds='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
joachim99@2 293
joachim99@2 294 # Archives containing C++ object files must be created using
joachim99@2 295 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
joachim99@2 296 # necessary to make sure instantiated templates are included
joachim99@2 297 # in the archive.
joachim99@2 298 old_archive_cmds='$CC -ar -WR,-u -o $oldlib $oldobjs'
joachim99@2 299 ;;
joachim99@2 300 *)
joachim99@2 301 if test "$with_gcc" = yes; then
joachim99@2 302 if test "$with_gnu_ld" = no; then
joachim99@2 303 archive_cmds='$CC -D_LANGUAGE_C_CPLUS_PLUS -shared $predep_objects $libobjs $deplibs $postdep_objects $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 304 else
joachim99@2 305 archive_cmds='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -o $lib'
joachim99@2 306 fi
joachim99@2 307 fi
joachim99@2 308 ;;
joachim99@2 309 esac
joachim99@2 310 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
joachim99@2 311 hardcode_libdir_separator=:
joachim99@2 312 link_all_deplibs=yes
joachim99@2 313 ;;
joachim99@2 314 linux*)
joachim99@2 315 case $cc_basename in
joachim99@2 316 KCC)
joachim99@2 317 # Kuck and Associates, Inc. (KAI) C++ Compiler
joachim99@2 318
joachim99@2 319 # KCC will only create a shared library if the output file
joachim99@2 320 # ends with ".so" (or ".sl" for HP-UX), so rename the library
joachim99@2 321 # to its proper name (with version) after linking.
joachim99@2 322 archive_cmds='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $libobjs $deplibs $compiler_flags --soname $soname -o \$templib; test \$templib = $lib || mv \$templib $lib'
joachim99@2 323 archive_expsym_cmds='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $libobjs $deplibs $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; test \$templib = $lib || mv \$templib $lib'
joachim99@2 324
joachim99@2 325 # Commands to make compiler produce verbose output that lists
joachim99@2 326 # what "hidden" libraries, object files and flags are used when
joachim99@2 327 # linking a shared library.
joachim99@2 328 #
joachim99@2 329 # There doesn't appear to be a way to prevent this compiler from
joachim99@2 330 # explicitly linking system object files so we need to strip them
joachim99@2 331 # from the output so that they don't get included in the library
joachim99@2 332 # dependencies.
joachim99@2 333 output_verbose_link_cmds='echo "go to hell"'
joachim99@2 334 skip_need_lc_check=yes
joachim99@2 335
joachim99@2 336 hardcode_libdir_flag_spec='${wl}--rpath,$libdir'
joachim99@2 337 export_dynamic_flag_spec='${wl}--export-dynamic'
joachim99@2 338
joachim99@2 339 # Archives containing C++ object files must be created using
joachim99@2 340 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
joachim99@2 341 # We add also $compiler_flags, to evetually add any --thread_safe or
joachim99@2 342 # --exceptions flags (which is also tested when building an .a
joachim99@2 343 # archive.
joachim99@2 344 old_archive_cmds='$CC -Bstatic $compiler_flags -o $oldlib $oldobjs'
joachim99@2 345 ;;
joachim99@2 346 cxx)
joachim99@2 347 # Compaq C++
joachim99@2 348 archive_cmds='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
joachim99@2 349 archive_expsym_cmds='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
joachim99@2 350
joachim99@2 351 runpath_var=LD_RUN_PATH
joachim99@2 352 hardcode_libdir_flag_spec='-rpath $libdir'
joachim99@2 353 hardcode_libdir_separator=:
joachim99@2 354
joachim99@2 355 # Commands to make compiler produce verbose output that lists
joachim99@2 356 # what "hidden" libraries, object files and flags are used when
joachim99@2 357 # linking a shared library.
joachim99@2 358 #
joachim99@2 359 # There doesn't appear to be a way to prevent this compiler from
joachim99@2 360 # explicitly linking system object files so we need to strip them
joachim99@2 361 # from the output so that they don't get included in the library
joachim99@2 362 # dependencies.
joachim99@2 363 output_verbose_link_cmds='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
joachim99@2 364 ;;
joachim99@2 365 insure)
joachim99@2 366 if test "$with_gcc" = yes; then
joachim99@2 367 # Insure++ together with gcc probably means also GNU ld
joachim99@2 368 # only -whole-archive isn't supported
joachim99@2 369 whole_archive_flag_spec=""
joachim99@2 370 # and we can't use -nostdlib, because bloody insure has no way to
joachim99@2 371 # output the linkline (-Zvm isn't working as documented), so we don't
joachim99@2 372 # know the depending libs. So we hope, insure gets it right anyway.
joachim99@2 373 archive_cmds='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
joachim99@2 374 runpath_var=LD_RUN_PATH
joachim99@2 375 hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
joachim99@2 376 export_dynamic_flag_spec='${wl}--export-dynamic'
joachim99@2 377 output_verbose_link_cmds=""
joachim99@2 378 fi
joachim99@2 379 esac
joachim99@2 380 ;;
joachim99@2 381 lynxos*)
joachim99@2 382 # FIXME: insert proper C++ library support
joachim99@2 383 ld_shlibs=no
joachim99@2 384 ;;
joachim99@2 385 m88k*)
joachim99@2 386 # FIXME: insert proper C++ library support
joachim99@2 387 ld_shlibs=no
joachim99@2 388 ;;
joachim99@2 389 mvs*)
joachim99@2 390 case $cc_basename in
joachim99@2 391 cxx)
joachim99@2 392 # FIXME: insert proper C++ library support
joachim99@2 393 ld_shlibs=no
joachim99@2 394 ;;
joachim99@2 395 *)
joachim99@2 396 # FIXME: insert proper C++ library support
joachim99@2 397 ld_shlibs=no
joachim99@2 398 ;;
joachim99@2 399 esac
joachim99@2 400 ;;
joachim99@2 401 netbsd*)
joachim99@2 402 if test "$with_gcc" = no || test "$with_gnu_ld" = no; then
joachim99@2 403 # This should only be triggered for NetBSD/a.out
joachim99@2 404 # Add in C++ constructor/destructor support
joachim99@2 405 if test -f /usr/pkg/lib/c++rt0/c++rt0.o.PIC; then
joachim99@2 406 cppopts="/usr/pkg/lib/c++rt0/c++rt0.o.PIC"
joachim99@2 407 elif test -f /usr/lib/c++rt0.o; then
joachim99@2 408 cppopts="/usr/lib/c++rt0.o"
joachim99@2 409 fi
joachim99@2 410 archive_cmds='ld -Bshareable -o $lib '"$cppopts"' $libobjs $deplibs $linkopts'
joachim99@2 411 fi
joachim99@2 412 ;;
joachim99@2 413 openbsd*)
joachim99@2 414 if test "$with_gcc" = yes && test "$with_gnu_ld" = no; then
joachim99@2 415 # MM: OpenBSD 2.7 uses G++, but not GNU ld
joachim99@2 416 archive_cmds='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
joachim99@2 417 archive_expsym_cmds='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
joachim99@2 418 old_archive_cmds="$old_archive_cmds~"'$RANLIB $oldlib'
joachim99@2 419 hardcode_libdir_flag_spec='${wl}-R$libdir'
joachim99@2 420 hardcode_direct=yes
joachim99@2 421 hardcode_shlibpath_var=no
joachim99@2 422 whole_archive_flag_spec='${wl}-Bforcearchive'
joachim99@2 423 remove_lgcc=yes
joachim99@2 424 fi
joachim99@2 425 ;;
joachim99@2 426 osf3*)
joachim99@2 427 if test "$with_gcc" = yes && test "$with_gnu_ld" = no; then
joachim99@2 428 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
joachim99@2 429 archive_cmds='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $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 430
joachim99@2 431 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
joachim99@2 432 hardcode_libdir_separator=:
joachim99@2 433
joachim99@2 434 # Commands to make compiler produce verbose output that lists
joachim99@2 435 # what "hidden" libraries, object files and flags are used when
joachim99@2 436 # linking a shared library.
joachim99@2 437 output_verbose_link_cmds='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
joachim99@2 438 else
joachim99@2 439 case $cc_basename in
joachim99@2 440 KCC)
joachim99@2 441 # Kuck and Associates, Inc. (KAI) C++ Compiler
joachim99@2 442
joachim99@2 443 # KCC will only create a shared library if the output file
joachim99@2 444 # ends with ".so" (or ".sl" for HP-UX), so rename the library
joachim99@2 445 # to its proper name (with version) after linking.
joachim99@2 446 archive_cmds='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
joachim99@2 447
joachim99@2 448 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
joachim99@2 449 hardcode_libdir_separator=:
joachim99@2 450
joachim99@2 451 # Archives containing C++ object files must be created using
joachim99@2 452 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
joachim99@2 453 old_archive_cmds='$CC -Bstatic -o $oldlib $oldobjs'
joachim99@2 454
joachim99@2 455 ;;
joachim99@2 456 RCC)
joachim99@2 457 # Rational C++ 2.4.1
joachim99@2 458 # FIXME: insert proper C++ library support
joachim99@2 459 ld_shlibs=no
joachim99@2 460 ;;
joachim99@2 461 cxx)
joachim99@2 462 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
joachim99@2 463 archive_cmds='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
joachim99@2 464
joachim99@2 465 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
joachim99@2 466 hardcode_libdir_separator=:
joachim99@2 467
joachim99@2 468 # Commands to make compiler produce verbose output that lists
joachim99@2 469 # what "hidden" libraries, object files and flags are used when
joachim99@2 470 # linking a shared library.
joachim99@2 471 #
joachim99@2 472 # There doesn't appear to be a way to prevent this compiler from
joachim99@2 473 # explicitly linking system object files so we need to strip them
joachim99@2 474 # from the output so that they don't get included in the library
joachim99@2 475 # dependencies.
joachim99@2 476 output_verbose_link_cmds='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
joachim99@2 477 ;;
joachim99@2 478 *)
joachim99@2 479 # FIXME: insert proper C++ library support
joachim99@2 480 ld_shlibs=no
joachim99@2 481 ;;
joachim99@2 482 esac
joachim99@2 483 fi
joachim99@2 484 ;;
joachim99@2 485 osf4* | osf5*)
joachim99@2 486 if test "$with_gcc" = yes && test "$with_gnu_ld" = no; then
joachim99@2 487 allow_undefined_flag=' -Wl,-expect_unresolved -Wl,\*'
joachim99@2 488 no_undefined_flag=' -Wl,-expect_unresolved -Wl,\*'
joachim99@2 489 archive_cmds='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $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
joachim99@2 491 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
joachim99@2 492 hardcode_libdir_separator=:
joachim99@2 493
joachim99@2 494 # Commands to make compiler produce verbose output that lists
joachim99@2 495 # what "hidden" libraries, object files and flags are used when
joachim99@2 496 # linking a shared library.
joachim99@2 497 output_verbose_link_cmds='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
joachim99@2 498 else
joachim99@2 499 case $cc_basename in
joachim99@2 500 KCC)
joachim99@2 501 # Kuck and Associates, Inc. (KAI) C++ Compiler
joachim99@2 502
joachim99@2 503 # KCC will only create a shared library if the output file
joachim99@2 504 # ends with ".so" (or ".sl" for HP-UX), so rename the library
joachim99@2 505 # to its proper name (with version) after linking.
joachim99@2 506 archive_cmds='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
joachim99@2 507
joachim99@2 508 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
joachim99@2 509 hardcode_libdir_separator=:
joachim99@2 510
joachim99@2 511 # Archives containing C++ object files must be created using
joachim99@2 512 # the KAI C++ compiler.
joachim99@2 513 old_archive_cmds='$CC -o $oldlib $oldobjs'
joachim99@2 514 ;;
joachim99@2 515 RCC)
joachim99@2 516 # Rational C++ 2.4.1
joachim99@2 517 # FIXME: insert proper C++ library support
joachim99@2 518 ld_shlibs=no
joachim99@2 519 ;;
joachim99@2 520 cxx)
joachim99@2 521 allow_undefined_flag=' -Wl,-expect_unresolved -Wl,\*'
joachim99@2 522 no_undefined_flag=' -Wl,-expect_unresolved -Wl,\*'
joachim99@2 523 archive_cmds='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -update_registry ${objdir}/so_locations -o $lib'
joachim99@2 524
joachim99@2 525 hardcode_libdir_flag_spec='-rpath $libdir'
joachim99@2 526 hardcode_libdir_separator=:
joachim99@2 527
joachim99@2 528 # Commands to make compiler produce verbose output that lists
joachim99@2 529 # what "hidden" libraries, object files and flags are used when
joachim99@2 530 # linking a shared library.
joachim99@2 531 #
joachim99@2 532 # There doesn't appear to be a way to prevent this compiler from
joachim99@2 533 # explicitly linking system object files so we need to strip them
joachim99@2 534 # from the output so that they don't get included in the library
joachim99@2 535 # dependencies.
joachim99@2 536 output_verbose_link_cmds='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
joachim99@2 537 ;;
joachim99@2 538 *)
joachim99@2 539 # FIXME: insert proper C++ library support
joachim99@2 540 ld_shlibs=no
joachim99@2 541 ;;
joachim99@2 542 esac
joachim99@2 543 fi
joachim99@2 544 ;;
joachim99@2 545 psos*)
joachim99@2 546 # FIXME: insert proper C++ library support
joachim99@2 547 ld_shlibs=no
joachim99@2 548 ;;
joachim99@2 549 sco*)
joachim99@2 550 case $cc_basename in
joachim99@2 551 CC)
joachim99@2 552 # FIXME: insert proper C++ library support
joachim99@2 553 ld_shlibs=no
joachim99@2 554 ;;
joachim99@2 555 *)
joachim99@2 556 # FIXME: insert proper C++ library support
joachim99@2 557 ld_shlibs=no
joachim99@2 558 ;;
joachim99@2 559 esac
joachim99@2 560 ;;
joachim99@2 561 sunos4*)
joachim99@2 562 case $cc_basename in
joachim99@2 563 CC)
joachim99@2 564 # Sun C++ 4.x
joachim99@2 565 # FIXME: insert proper C++ library support
joachim99@2 566 ld_shlibs=no
joachim99@2 567 ;;
joachim99@2 568 lcc)
joachim99@2 569 # Lucid
joachim99@2 570 # FIXME: insert proper C++ library support
joachim99@2 571 ld_shlibs=no
joachim99@2 572 ;;
joachim99@2 573 *)
joachim99@2 574 # FIXME: insert proper C++ library support
joachim99@2 575 ld_shlibs=no
joachim99@2 576 ;;
joachim99@2 577 esac
joachim99@2 578 ;;
joachim99@2 579 solaris*)
joachim99@2 580 case $cc_basename in
joachim99@2 581 CC)
joachim99@2 582 # Sun C++ 4.2, 5.x and Centerline C++
joachim99@2 583 no_undefined_flag=' -ztext'
joachim99@2 584 archive_cmds='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
joachim99@2 585 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
joachim99@2 586 $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
joachim99@2 587
joachim99@2 588 hardcode_libdir_flag_spec='-R$libdir'
joachim99@2 589 hardcode_shlibpath_var=no
joachim99@2 590 case $host_os in
joachim99@2 591 solaris2.[0-5] | solaris2.[0-5].*) ;;
joachim99@2 592 *)
joachim99@2 593 # The C++ compiler is used as linker so we must use $wl
joachim99@2 594 # flag to pass the commands to the underlying system
joachim99@2 595 # linker.
joachim99@2 596 # Supported since Solaris 2.6 (maybe 2.5.1?)
joachim99@2 597 whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
joachim99@2 598 ;;
joachim99@2 599 esac
joachim99@2 600 link_all_deplibs=yes
joachim99@2 601
joachim99@2 602 # Commands to make compiler produce verbose output that lists
joachim99@2 603 # what "hidden" libraries, object files and flags are used when
joachim99@2 604 # linking a shared library.
joachim99@2 605 #
joachim99@2 606 # There doesn't appear to be a way to prevent this compiler from
joachim99@2 607 # explicitly linking system object files so we need to strip them
joachim99@2 608 # from the output so that they don't get included in the library
joachim99@2 609 # dependencies.
joachim99@2 610 output_verbose_link_cmds='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep "\-R|\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
joachim99@2 611
joachim99@2 612 # Archives containing C++ object files must be created using
joachim99@2 613 # "CC -xar", where "CC" is the Sun C++ compiler. This is
joachim99@2 614 # necessary to make sure instantiated templates are included
joachim99@2 615 # in the archive.
joachim99@2 616 old_archive_cmds='$CC -xar -o $oldlib $oldobjs'
joachim99@2 617 ;;
joachim99@2 618 gcx)
joachim99@2 619 # Green Hills C++ Compiler
joachim99@2 620 archive_cmds='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
joachim99@2 621
joachim99@2 622 # The C++ compiler must be used to create the archive.
joachim99@2 623 old_archive_cmds='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
joachim99@2 624 ;;
joachim99@2 625 *)
joachim99@2 626 # GNU C++ compiler with Solaris linker
joachim99@2 627 if test "$with_gcc" = yes && test "$with_gnu_ld" = no; then
joachim99@2 628 if $CC --version | egrep -v '^2\.7' > /dev/null; then
joachim99@2 629 archive_cmds='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
joachim99@2 630 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
joachim99@2 631 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
joachim99@2 632
joachim99@2 633 # Commands to make compiler produce verbose output that lists
joachim99@2 634 # what "hidden" libraries, object files and flags are used when
joachim99@2 635 # linking a shared library.
joachim99@2 636 output_verbose_link_cmds="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
joachim99@2 637 else
joachim99@2 638 # g++ 2.7 appears to require `-G' NOT `-shared' on this
joachim99@2 639 # platform.
joachim99@2 640 archive_cmds='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
joachim99@2 641 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
joachim99@2 642 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
joachim99@2 643
joachim99@2 644 # Commands to make compiler produce verbose output that lists
joachim99@2 645 # what "hidden" libraries, object files and flags are used when
joachim99@2 646 # linking a shared library.
joachim99@2 647 output_verbose_link_cmds="$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
joachim99@2 648 fi
joachim99@2 649
joachim99@2 650 hardcode_libdir_flag_spec='${wl}-R $wl$libdir'
joachim99@2 651 fi
joachim99@2 652 ;;
joachim99@2 653 esac
joachim99@2 654 ;;
joachim99@2 655 tandem*)
joachim99@2 656 case $cc_basename in
joachim99@2 657 NCC)
joachim99@2 658 # NonStop-UX NCC 3.20
joachim99@2 659 # FIXME: insert proper C++ library support
joachim99@2 660 ld_shlibs=no
joachim99@2 661 ;;
joachim99@2 662 *)
joachim99@2 663 # FIXME: insert proper C++ library support
joachim99@2 664 ld_shlibs=no
joachim99@2 665 ;;
joachim99@2 666 esac
joachim99@2 667 ;;
joachim99@2 668 unixware*)
joachim99@2 669 # FIXME: insert proper C++ library support
joachim99@2 670 ld_shlibs=no
joachim99@2 671 ;;
joachim99@2 672 vxworks*)
joachim99@2 673 # FIXME: insert proper C++ library support
joachim99@2 674 ld_shlibs=no
joachim99@2 675 ;;
joachim99@2 676 *)
joachim99@2 677 # FIXME: insert proper C++ library support
joachim99@2 678 ld_shlibs=no
joachim99@2 679 ;;
joachim99@2 680 esac
joachim99@2 681
joachim99@2 682
joachim99@2 683 ## Compiler Characteristics: PIC flags, static flags, etc
joachim99@2 684
joachim99@2 685 # We don't use cached values here since only the C compiler
joachim99@2 686 # characteristics should be cached.
joachim99@2 687 ac_cv_prog_cc_pic=
joachim99@2 688 ac_cv_prog_cc_shlib=
joachim99@2 689 ac_cv_prog_cc_wl=
joachim99@2 690 ac_cv_prog_cc_static=
joachim99@2 691 ac_cv_prog_cc_no_builtin=
joachim99@2 692 ac_cv_prog_cc_can_build_shared=$can_build_shared
joachim99@2 693
joachim99@2 694 ac_cv_prog_cc_pic_works=
joachim99@2 695 ac_cv_prog_cc_static_works=
joachim99@2 696
joachim99@2 697 if test "$with_gcc" = yes; then
joachim99@2 698 ac_cv_prog_cc_wl='-Wl,'
joachim99@2 699 ac_cv_prog_cc_static='-static'
joachim99@2 700
joachim99@2 701 case $host_os in
joachim99@2 702 aix*)
joachim99@2 703 # All AIX code is PIC.
joachim99@2 704 if test "$host_cpu" = ia64; then
joachim99@2 705 # AIX 5 now supports IA64 processor
joachim99@2 706 lt_cv_prog_cc_static='-Bstatic'
joachim99@2 707 else
joachim99@2 708 lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
joachim99@2 709 fi
joachim99@2 710 ;;
joachim99@2 711 amigaos*)
joachim99@2 712 # FIXME: we need at least 68020 code to build shared libraries, but
joachim99@2 713 # adding the `-m68020' flag to GCC prevents building anything better,
joachim99@2 714 # like `-m68040'.
joachim99@2 715 ac_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
joachim99@2 716 ;;
joachim99@2 717 beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
joachim99@2 718 # PIC is the default for these OSes.
joachim99@2 719 ;;
joachim99@2 720 cygwin* | mingw* | os2*)
joachim99@2 721 # This hack is so that the source file can tell whether it is being
joachim99@2 722 # built for inclusion in a dll (and should export symbols for example).
joachim99@2 723 ac_cv_prog_cc_pic='-DDLL_EXPORT'
joachim99@2 724 ;;
joachim99@2 725 darwin* | rhapsody*)
joachim99@2 726 # PIC is the default on this platform
joachim99@2 727 # Common symbols not allowed in MH_DYLIB files
joachim99@2 728 lt_cv_prog_cc_pic='-fno-common'
joachim99@2 729 ;;
joachim99@2 730 *djgpp*)
joachim99@2 731 # DJGPP does not support shared libraries at all
joachim99@2 732 ac_cv_prog_cc_pic=
joachim99@2 733 ;;
joachim99@2 734 sysv4*MP*)
joachim99@2 735 if test -d /usr/nec; then
joachim99@2 736 ac_cv_prog_cc_pic=-Kconform_pic
joachim99@2 737 fi
joachim99@2 738 ;;
joachim99@2 739 *)
joachim99@2 740 ac_cv_prog_cc_pic='-fPIC'
joachim99@2 741 ;;
joachim99@2 742 esac
joachim99@2 743 else
joachim99@2 744 case $host_os in
joachim99@2 745 aix4* | aix5*)
joachim99@2 746 # All AIX code is PIC.
joachim99@2 747 if test "$host_cpu" = ia64; then
joachim99@2 748 # AIX 5 now supports IA64 processor
joachim99@2 749 lt_cv_prog_cc_static='-Bstatic'
joachim99@2 750 else
joachim99@2 751 lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
joachim99@2 752 fi
joachim99@2 753 ;;
joachim99@2 754 chorus*)
joachim99@2 755 case $cc_basename in
joachim99@2 756 cxch68)
joachim99@2 757 # Green Hills C++ Compiler
joachim99@2 758 # ac_cv_prog_cc_static="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
joachim99@2 759 ;;
joachim99@2 760 esac
joachim99@2 761 ;;
joachim99@2 762 dgux*)
joachim99@2 763 case $cc_basename in
joachim99@2 764 ec++)
joachim99@2 765 ac_cv_prog_cc_pic='-KPIC'
joachim99@2 766 ;;
joachim99@2 767 ghcx)
joachim99@2 768 # Green Hills C++ Compiler
joachim99@2 769 ac_cv_prog_cc_pic='-pic'
joachim99@2 770 ;;
joachim99@2 771 *)
joachim99@2 772 ;;
joachim99@2 773 esac
joachim99@2 774 ;;
joachim99@2 775 freebsd*)
joachim99@2 776 # FreeBSD uses GNU C++
joachim99@2 777 ;;
joachim99@2 778 hpux9* | hpux10* | hpux11*)
joachim99@2 779 case $cc_basename in
joachim99@2 780 CC)
joachim99@2 781 ac_cv_prog_cc_wl='-Wl,'
joachim99@2 782 ac_cv_prog_cc_static="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
joachim99@2 783 ac_cv_prog_cc_pic='+Z'
joachim99@2 784 ;;
joachim99@2 785 aCC)
joachim99@2 786 ac_cv_prog_cc_wl='-Wl,'
joachim99@2 787 ac_cv_prog_cc_static="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
joachim99@2 788 ac_cv_prog_cc_pic='+Z'
joachim99@2 789 ;;
joachim99@2 790 *)
joachim99@2 791 ;;
joachim99@2 792 esac
joachim99@2 793 ;;
joachim99@2 794 irix5* | irix6*)
joachim99@2 795 case $cc_basename in
joachim99@2 796 CC)
joachim99@2 797 ac_cv_prog_cc_wl='-Wl,'
joachim99@2 798 ac_cv_prog_cc_static='-non_shared'
joachim99@2 799 ac_cv_prog_cc_pic='-KPIC'
joachim99@2 800 ;;
joachim99@2 801 *)
joachim99@2 802 ;;
joachim99@2 803 esac
joachim99@2 804 ;;
joachim99@2 805 linux*)
joachim99@2 806 case $cc_basename in
joachim99@2 807 KCC)
joachim99@2 808 # KAI C++ Compiler
joachim99@2 809 ac_cv_prog_cc_wl='--backend -Wl,'
joachim99@2 810 ac_cv_prog_cc_pic='-fPIC'
joachim99@2 811 ac_cv_prog_cc_static='-Bstatic'
joachim99@2 812 ;;
joachim99@2 813 cxx)
joachim99@2 814 # Compaq C++
joachim99@2 815 # Make sure the PIC flag is empty. It appears that all Alpha
joachim99@2 816 # Linux and Compaq Tru64 Unix objects are PIC.
joachim99@2 817 ac_cv_prog_cc_pic=
joachim99@2 818 ac_cv_prog_cc_static='-non_shared'
joachim99@2 819 ;;
joachim99@2 820 *)
joachim99@2 821 ;;
joachim99@2 822 esac
joachim99@2 823 ;;
joachim99@2 824 lynxos*)
joachim99@2 825 ;;
joachim99@2 826 m88k*)
joachim99@2 827 ;;
joachim99@2 828 mvs*)
joachim99@2 829 case $cc_basename in
joachim99@2 830 cxx)
joachim99@2 831 ac_cv_prog_cc_pic='-W c,exportall'
joachim99@2 832 ;;
joachim99@2 833 *)
joachim99@2 834 ;;
joachim99@2 835 esac
joachim99@2 836 ;;
joachim99@2 837 netbsd*)
joachim99@2 838 ;;
joachim99@2 839 osf3* | osf4* | osf5*)
joachim99@2 840 case $cc_basename in
joachim99@2 841 KCC)
joachim99@2 842 ac_cv_prog_cc_wl='--backend -Wl,'
joachim99@2 843 ;;
joachim99@2 844 RCC)
joachim99@2 845 # Rational C++ 2.4.1
joachim99@2 846 ac_cv_prog_cc_pic='-pic'
joachim99@2 847 ;;
joachim99@2 848 cxx)
joachim99@2 849 # Digital/Compaq C++
joachim99@2 850 ac_cv_prog_cc_wl='-Wl,'
joachim99@2 851 # Make sure the PIC flag is empty. It appears that all Alpha
joachim99@2 852 # Linux and Compaq Tru64 Unix objects are PIC.
joachim99@2 853 ac_cv_prog_cc_pic=
joachim99@2 854 ac_cv_prog_cc_static='-non_shared'
joachim99@2 855 ;;
joachim99@2 856 *)
joachim99@2 857 ;;
joachim99@2 858 esac
joachim99@2 859 ;;
joachim99@2 860 psos*)
joachim99@2 861 ;;
joachim99@2 862 sco*)
joachim99@2 863 case $cc_basename in
joachim99@2 864 CC)
joachim99@2 865 ac_cv_prog_cc_pic='-fPIC'
joachim99@2 866 ;;
joachim99@2 867 *)
joachim99@2 868 ;;
joachim99@2 869 esac
joachim99@2 870 ;;
joachim99@2 871 solaris*)
joachim99@2 872 case $cc_basename in
joachim99@2 873 CC)
joachim99@2 874 # Sun C++ 4.2, 5.x and Centerline C++
joachim99@2 875 ac_cv_prog_cc_pic='-KPIC'
joachim99@2 876 ac_cv_prog_cc_static='-Bstatic'
joachim99@2 877 ac_cv_prog_cc_wl='-Qoption ld '
joachim99@2 878 ;;
joachim99@2 879 gcx)
joachim99@2 880 # Green Hills C++ Compiler
joachim99@2 881 ac_cv_prog_cc_pic='-PIC'
joachim99@2 882 ;;
joachim99@2 883 *)
joachim99@2 884 ;;
joachim99@2 885 esac
joachim99@2 886 ;;
joachim99@2 887 sunos4*)
joachim99@2 888 case $cc_basename in
joachim99@2 889 CC)
joachim99@2 890 # Sun C++ 4.x
joachim99@2 891 ac_cv_prog_cc_pic='-pic'
joachim99@2 892 ac_cv_prog_cc_static='-Bstatic'
joachim99@2 893 ;;
joachim99@2 894 lcc)
joachim99@2 895 # Lucid
joachim99@2 896 ac_cv_prog_cc_pic='-pic'
joachim99@2 897 ;;
joachim99@2 898 *)
joachim99@2 899 ;;
joachim99@2 900 esac
joachim99@2 901 ;;
joachim99@2 902 tandem*)
joachim99@2 903 case $cc_basename in
joachim99@2 904 NCC)
joachim99@2 905 # NonStop-UX NCC 3.20
joachim99@2 906 ac_cv_prog_cc_pic='-KPIC'
joachim99@2 907 ;;
joachim99@2 908 *)
joachim99@2 909 ;;
joachim99@2 910 esac
joachim99@2 911 ;;
joachim99@2 912 unixware*)
joachim99@2 913 ;;
joachim99@2 914 vxworks*)
joachim99@2 915 ;;
joachim99@2 916 *)
joachim99@2 917 ac_cv_prog_cc_can_build_shared=no
joachim99@2 918 ;;
joachim99@2 919 esac
joachim99@2 920 fi
joachim99@2 921
joachim99@2 922 case "$host_os" in
joachim99@2 923 # Platforms which do not suport PIC and -DPIC is meaningless
joachim99@2 924 # on them:
joachim99@2 925 *djgpp*)
joachim99@2 926 ac_cv_prog_cc_pic=
joachim99@2 927 ;;
joachim99@2 928 *)
joachim99@2 929 ac_cv_prog_cc_pic="$ac_cv_prog_cc_pic -DPIC"
joachim99@2 930 ;;
joachim99@2 931 esac
joachim99@2 932
joachim99@2 933
joachim99@2 934 # Figure out "hidden" C++ library dependencies from verbose
joachim99@2 935 # compiler output whening linking a shared library.
joachim99@2 936 cat > conftest.$ac_ext <<EOF
joachim99@2 937 class Foo
joachim99@2 938 {
joachim99@2 939 public:
joachim99@2 940 Foo (void) { a = 0; }
joachim99@2 941 private:
joachim99@2 942 int a;
joachim99@2 943 };
joachim99@2 944 EOF
joachim99@2 945
joachim99@2 946
joachim99@2 947 if (eval $ac_compile) 2>&5; then
joachim99@2 948 # Parse the compiler output and extract the necessary
joachim99@2 949 # objects, libraries and library flags.
joachim99@2 950
joachim99@2 951 # Sentinel used to keep track of whether or not we are before
joachim99@2 952 # the conftest object file.
joachim99@2 953 pre_test_object_deps_done=no
joachim99@2 954
joachim99@2 955 for p in `eval $output_verbose_link_cmds`; do
joachim99@2 956
joachim99@2 957 case $p in
joachim99@2 958
joachim99@2 959 -L* | -R* | -l*)
joachim99@2 960 # Some compilers place space between "-{L,R}" and the path.
joachim99@2 961 # Remove the space.
joachim99@2 962 if test $p = "-L" \
joachim99@2 963 || test $p = "-R"; then
joachim99@2 964 prev=$p
joachim99@2 965 continue
joachim99@2 966 else
joachim99@2 967 prev=
joachim99@2 968 fi
joachim99@2 969
joachim99@2 970 if test "$pre_test_object_deps_done" = no; then
joachim99@2 971 case $p in
joachim99@2 972 -L* | -R*)
joachim99@2 973 # Internal compiler library paths should come after those
joachim99@2 974 # provided the user. The postdeps already come after the
joachim99@2 975 # user supplied libs so there is no need to process them.
joachim99@2 976 if test -z "$compiler_lib_search_path"; then
joachim99@2 977 compiler_lib_search_path="${prev}${p}"
joachim99@2 978 else
joachim99@2 979 compiler_lib_search_path="${compiler_lib_search_path} ${prev}${p}"
joachim99@2 980 fi
joachim99@2 981 ;;
joachim99@2 982 # The "-l" case would never come before the object being
joachim99@2 983 # linked, so don't bother handling this case.
joachim99@2 984 esac
joachim99@2 985 else
joachim99@2 986 add="${prev}${p}"
joachim99@2 987 if test "x$remove_lgcc" = "xyes" ; then
joachim99@2 988 case "$add" in
joachim99@2 989 -lgcc ) add="" ;;
joachim99@2 990 esac
joachim99@2 991 fi
joachim99@2 992 if test -n "$add" ; then
joachim99@2 993 if test -z "$postdeps"; then
joachim99@2 994 postdeps="$add"
joachim99@2 995 else
joachim99@2 996 postdeps="${postdeps} ${add}"
joachim99@2 997 fi
joachim99@2 998 fi
joachim99@2 999 fi
joachim99@2 1000 ;;
joachim99@2 1001
joachim99@2 1002 *.$objext)
joachim99@2 1003 # This assumes that the test object file only shows up
joachim99@2 1004 # once in the compiler output.
joachim99@2 1005 if test "$p" = "conftest.$objext"; then
joachim99@2 1006 pre_test_object_deps_done=yes
joachim99@2 1007 continue
joachim99@2 1008 fi
joachim99@2 1009
joachim99@2 1010 if test "$pre_test_object_deps_done" = no; then
joachim99@2 1011 if test -z "$predep_objects"; then
joachim99@2 1012 predep_objects="$p"
joachim99@2 1013 else
joachim99@2 1014 predep_objects="$predep_objects $p"
joachim99@2 1015 fi
joachim99@2 1016 else
joachim99@2 1017 if test -z "$postdep_objects"; then
joachim99@2 1018 postdep_objects="$p"
joachim99@2 1019 else
joachim99@2 1020 postdep_objects="$postdep_objects $p"
joachim99@2 1021 fi
joachim99@2 1022 fi
joachim99@2 1023 ;;
joachim99@2 1024
joachim99@2 1025 *) ;; # Ignore the rest.
joachim99@2 1026
joachim99@2 1027 esac
joachim99@2 1028 done
joachim99@2 1029
joachim99@2 1030 # Clean up.
joachim99@2 1031 rm -f a.out
joachim99@2 1032 else
joachim99@2 1033 echo "ltcf-cxx.sh: error: problem compiling test program"
joachim99@2 1034 fi
joachim99@2 1035
joachim99@2 1036 $rm -f confest.$objext
joachim99@2 1037
joachim99@2 1038 if test "x$skip_need_lc_check" = "xyes" ; then
joachim99@2 1039 need_lc=no
joachim99@2 1040 else
joachim99@2 1041 case " $postdeps " in
joachim99@2 1042 *" -lc "*) need_lc=no ;;
joachim99@2 1043 *) need_lc=yes ;;
joachim99@2 1044 esac
joachim99@2 1045 fi