annotate kdiff3/admin/libtool.m4.in @ 60:4732f709a8cb

*** empty log message ***
author joachim99
date Sun, 07 Mar 2004 10:08:07 +0000
parents 415083d043f3
children efe33e938730
rev   line source
joachim99@14 1 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
joachim99@2 2 ## Copyright 1996, 1997, 1998, 1999, 2000, 2001
joachim99@2 3 ## Free Software Foundation, Inc.
joachim99@2 4 ## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
joachim99@2 5 ##
joachim99@2 6 ## This program is free software; you can redistribute it and/or modify
joachim99@2 7 ## it under the terms of the GNU General Public License as published by
joachim99@2 8 ## the Free Software Foundation; either version 2 of the License, or
joachim99@2 9 ## (at your option) any later version.
joachim99@2 10 ##
joachim99@2 11 ## This program is distributed in the hope that it will be useful, but
joachim99@2 12 ## WITHOUT ANY WARRANTY; without even the implied warranty of
joachim99@2 13 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
joachim99@2 14 ## General Public License for more details.
joachim99@2 15 ##
joachim99@2 16 ## You should have received a copy of the GNU General Public License
joachim99@2 17 ## along with this program; if not, write to the Free Software
joachim99@2 18 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
joachim99@2 19 ##
joachim99@2 20 ## As a special exception to the GNU General Public License, if you
joachim99@2 21 ## distribute this file as part of a program that contains a
joachim99@2 22 ## configuration script generated by Autoconf, you may include it under
joachim99@2 23 ## the same distribution terms that you use for the rest of that program.
joachim99@2 24
joachim99@14 25 # serial 47 AC_PROG_LIBTOOL
joachim99@14 26
joachim99@14 27 # AC_PROG_LIBTOOL
joachim99@14 28 # ---------------
joachim99@2 29 AC_DEFUN([AC_PROG_LIBTOOL],
joachim99@2 30 [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
joachim99@2 31 dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
joachim99@2 32 dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
joachim99@2 33 AC_PROVIDE_IFELSE([AC_PROG_CXX],
joachim99@2 34 [AC_LIBTOOL_CXX],
joachim99@2 35 [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
joachim99@14 36 ])])
joachim99@2 37
joachim99@2 38 dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
joachim99@2 39 dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
joachim99@2 40 dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
joachim99@2 41 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
joachim99@2 42 [AC_LIBTOOL_GCJ],
joachim99@2 43 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
joachim99@14 44 [AC_LIBTOOL_GCJ],
joachim99@14 45 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
joachim99@14 46 [AC_LIBTOOL_GCJ],
joachim99@14 47 [ifdef([AC_PROG_GCJ],
joachim99@14 48 [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
joachim99@14 49 ifdef([A][M_PROG_GCJ],
joachim99@14 50 [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
joachim99@14 51 ifdef([LT_AC_PROG_GCJ],
joachim99@14 52 [define([LT_AC_PROG_GCJ],
joachim99@14 53 defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
joachim99@14 54 ])])# AC_PROG_LIBTOOL
joachim99@14 55
joachim99@14 56
joachim99@14 57 # _AC_PROG_LIBTOOL
joachim99@14 58 # ----------------
joachim99@2 59 AC_DEFUN([_AC_PROG_LIBTOOL],
joachim99@2 60 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
joachim99@2 61 AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
joachim99@2 62 AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
joachim99@2 63
joachim99@2 64 # This can be used to rebuild libtool when needed
joachim99@14 65 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
joachim99@2 66
joachim99@2 67 # Always use our own libtool.
joachim99@14 68 LIBTOOL='$(SHELL) $(top_builddir)/libtool --silent'
joachim99@2 69 AC_SUBST(LIBTOOL)dnl
joachim99@2 70
joachim99@14 71 # Prevent multiple expansion
joachim99@14 72 define([AC_PROG_LIBTOOL], [])
joachim99@14 73 ])# _AC_PROG_LIBTOOL
joachim99@14 74
joachim99@14 75
joachim99@14 76 # AC_LIBTOOL_SETUP
joachim99@14 77 # ----------------
joachim99@2 78 AC_DEFUN([AC_LIBTOOL_SETUP],
joachim99@14 79 [AC_PREREQ(2.50)dnl
joachim99@2 80 AC_REQUIRE([AC_ENABLE_SHARED])dnl
joachim99@2 81 AC_REQUIRE([AC_ENABLE_STATIC])dnl
joachim99@2 82 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
joachim99@2 83 AC_REQUIRE([AC_CANONICAL_HOST])dnl
joachim99@2 84 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
joachim99@2 85 AC_REQUIRE([AC_PROG_CC])dnl
joachim99@2 86 AC_REQUIRE([AC_PROG_LD])dnl
joachim99@2 87 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
joachim99@2 88 AC_REQUIRE([AC_PROG_NM])dnl
joachim99@14 89 AC_REQUIRE([LT_AC_PROG_SED])dnl
joachim99@14 90
joachim99@2 91 AC_REQUIRE([AC_PROG_LN_S])dnl
joachim99@2 92 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
joachim99@2 93 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
joachim99@2 94 AC_REQUIRE([AC_OBJEXT])dnl
joachim99@2 95 AC_REQUIRE([AC_EXEEXT])dnl
joachim99@2 96 dnl
joachim99@2 97
joachim99@14 98 AC_LIBTOOL_SYS_MAX_CMD_LEN
joachim99@14 99 AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
joachim99@14 100 AC_LIBTOOL_OBJDIR
joachim99@14 101
joachim99@14 102 AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
joachim99@14 103 _LT_AC_PROG_ECHO_BACKSLASH
joachim99@14 104
joachim99@14 105 case $host_os in
joachim99@14 106 aix3*)
joachim99@14 107 # AIX sometimes has problems with the GCC collect2 program. For some
joachim99@14 108 # reason, if we set the COLLECT_NAMES environment variable, the problems
joachim99@14 109 # vanish in a puff of smoke.
joachim99@14 110 if test "X${COLLECT_NAMES+set}" != Xset; then
joachim99@14 111 COLLECT_NAMES=
joachim99@14 112 export COLLECT_NAMES
joachim99@14 113 fi
joachim99@14 114 ;;
joachim99@14 115 esac
joachim99@14 116
joachim99@14 117 # Sed substitution that helps us do robust quoting. It backslashifies
joachim99@14 118 # metacharacters that are still active within double-quoted strings.
joachim99@14 119 Xsed='sed -e s/^X//'
joachim99@14 120 [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
joachim99@14 121
joachim99@14 122 # Same as above, but do not quote variable references.
joachim99@14 123 [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
joachim99@14 124
joachim99@14 125 # Sed substitution to delay expansion of an escaped shell variable in a
joachim99@14 126 # double_quote_subst'ed string.
joachim99@14 127 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
joachim99@14 128
joachim99@14 129 # Sed substitution to avoid accidental globbing in evaled expressions
joachim99@14 130 no_glob_subst='s/\*/\\\*/g'
joachim99@14 131
joachim99@14 132 # Constants:
joachim99@14 133 rm="rm -f"
joachim99@14 134
joachim99@14 135 # Global variables:
joachim99@14 136 default_ofile=libtool
joachim99@14 137 can_build_shared=yes
joachim99@14 138
joachim99@14 139 # All known linkers require a `.a' archive for static linking (except M$VC,
joachim99@14 140 # which needs '.lib').
joachim99@14 141 libext=a
joachim99@14 142 ltmain="$ac_aux_dir/ltmain.sh"
joachim99@14 143 ofile="$default_ofile"
joachim99@14 144 with_gnu_ld="$lt_cv_prog_gnu_ld"
joachim99@14 145
joachim99@14 146 AC_CHECK_TOOL(RANLIB, ranlib, :)
joachim99@14 147 AC_CHECK_TOOL(STRIP, strip, :)
joachim99@14 148
joachim99@14 149 old_CC="$CC"
joachim99@14 150 old_CFLAGS="$CFLAGS"
joachim99@14 151
joachim99@14 152 # Set sane defaults for various variables
joachim99@14 153 test -z "$AR" && AR=ar
joachim99@14 154 test -z "$AR_FLAGS" && AR_FLAGS=cru
joachim99@14 155 test -z "$AS" && AS=as
joachim99@14 156 test -z "$CC" && CC=cc
joachim99@14 157 test -z "$LTCC" && LTCC=$CC
joachim99@14 158 test -z "$DLLTOOL" && DLLTOOL=dlltool
joachim99@14 159 test -z "$LD" && LD=ld
joachim99@14 160 test -z "$LN_S" && LN_S="ln -s"
joachim99@14 161 test -z "$MAGIC_CMD" && MAGIC_CMD=file
joachim99@14 162 test -z "$NM" && NM=nm
joachim99@14 163 test -z "$SED" && SED=sed
joachim99@14 164 test -z "$OBJDUMP" && OBJDUMP=objdump
joachim99@14 165 test -z "$RANLIB" && RANLIB=:
joachim99@14 166 test -z "$STRIP" && STRIP=:
joachim99@14 167 test -z "$ac_objext" && ac_objext=o
joachim99@14 168
joachim99@14 169 # Determine commands to create old-style static archives.
joachim99@14 170 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
joachim99@14 171 old_postinstall_cmds='chmod 644 $oldlib'
joachim99@14 172 old_postuninstall_cmds=
joachim99@14 173
joachim99@14 174 if test -n "$RANLIB"; then
joachim99@14 175 case $host_os in
joachim99@14 176 openbsd*)
joachim99@14 177 old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
joachim99@14 178 ;;
joachim99@14 179 *)
joachim99@14 180 old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
joachim99@14 181 ;;
joachim99@14 182 esac
joachim99@14 183 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
joachim99@14 184 fi
joachim99@14 185
joachim99@2 186 # Only perform the check for file, if the check method requires it
joachim99@2 187 case $deplibs_check_method in
joachim99@2 188 file_magic*)
joachim99@2 189 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
joachim99@2 190 AC_PATH_MAGIC
joachim99@2 191 fi
joachim99@2 192 ;;
joachim99@2 193 esac
joachim99@2 194
joachim99@14 195 ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
joachim99@2 196 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
joachim99@14 197 enable_win32_dll=yes, enable_win32_dll=no)
joachim99@14 198
joachim99@14 199 AC_ARG_ENABLE([libtool-lock],
joachim99@14 200 [AC_HELP_STRING([--disable-libtool-lock],
joachim99@14 201 [avoid locking (might break parallel builds)])])
joachim99@14 202 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
joachim99@14 203
joachim99@14 204 AC_ARG_WITH([pic],
joachim99@14 205 [AC_HELP_STRING([--with-pic],
joachim99@14 206 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
joachim99@14 207 [pic_mode="$withval"],
joachim99@14 208 [pic_mode=default])
joachim99@14 209 test -z "$pic_mode" && pic_mode=default
joachim99@14 210
joachim99@14 211 # Use C for the default configuration in the libtool script
joachim99@14 212 tagname=
joachim99@14 213 AC_LIBTOOL_LANG_C_CONFIG
joachim99@14 214 _LT_AC_TAGCONFIG
joachim99@14 215 ])# AC_LIBTOOL_SETUP
joachim99@14 216
joachim99@14 217
joachim99@14 218 # _LT_AC_SYS_COMPILER
joachim99@14 219 # -------------------
joachim99@14 220 AC_DEFUN([_LT_AC_SYS_COMPILER],
joachim99@14 221 [AC_REQUIRE([AC_PROG_CC])dnl
joachim99@14 222
joachim99@14 223 # If no C compiler was specified, use CC.
joachim99@14 224 LTCC=${LTCC-"$CC"}
joachim99@14 225
joachim99@14 226 # Allow CC to be a program name with arguments.
joachim99@14 227 set dummy $CC
joachim99@14 228 compiler="[$]2"
joachim99@14 229 ])# _LT_AC_SYS_COMPILER
joachim99@14 230
joachim99@14 231
joachim99@14 232 # _LT_AC_SYS_LIBPATH_AIX
joachim99@14 233 # ----------------------
joachim99@14 234 # Links a minimal program and checks the executable
joachim99@14 235 # for the system default hardcoded library path. In most cases,
joachim99@14 236 # this is /usr/lib:/lib, but when the MPI compilers are used
joachim99@14 237 # the location of the communication and MPI libs are included too.
joachim99@14 238 # If we don't find anything, use the default library path according
joachim99@14 239 # to the aix ld manual.
joachim99@14 240 AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
joachim99@14 241 [AC_LINK_IFELSE(AC_LANG_PROGRAM,[
joachim99@14 242 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
joachim99@14 243 }'`
joachim99@14 244 # Check for a 64-bit object if we didn't find anything.
joachim99@14 245 if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
joachim99@14 246 }'`; fi],[])
joachim99@14 247 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
joachim99@14 248 ])# _LT_AC_SYS_LIBPATH_AIX
joachim99@14 249
joachim99@14 250
joachim99@14 251 # _LT_AC_PROG_ECHO_BACKSLASH
joachim99@14 252 # --------------------------
joachim99@14 253 # Add some code to the start of the generated configure script which
joachim99@14 254 # will find an echo command which doesn't interpret backslashes.
joachim99@14 255 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
joachim99@14 256 [ifdef([AC_DIVERSION_NOTICE],
joachim99@14 257 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
joachim99@14 258 [AC_DIVERT_PUSH(NOTICE)])
joachim99@14 259
joachim99@14 260 # Check that we are running under the correct shell.
joachim99@14 261 SHELL=${CONFIG_SHELL-/bin/sh}
joachim99@14 262
joachim99@14 263 case X$ECHO in
joachim99@14 264 X*--fallback-echo)
joachim99@14 265 # Remove one level of quotation (which was required for Make).
joachim99@14 266 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
joachim99@14 267 ;;
joachim99@14 268 esac
joachim99@14 269
joachim99@14 270 echo=${ECHO-echo}
joachim99@14 271 if test "X[$]1" = X--no-reexec; then
joachim99@14 272 # Discard the --no-reexec flag, and continue.
joachim99@14 273 shift
joachim99@14 274 elif test "X[$]1" = X--fallback-echo; then
joachim99@14 275 # Avoid inline document here, it may be left over
joachim99@14 276 :
joachim99@14 277 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
joachim99@14 278 # Yippee, $echo works!
joachim99@14 279 :
joachim99@14 280 else
joachim99@14 281 # Restart under the correct shell.
joachim99@14 282 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
joachim99@14 283 fi
joachim99@14 284
joachim99@14 285 if test "X[$]1" = X--fallback-echo; then
joachim99@14 286 # used as fallback echo
joachim99@14 287 shift
joachim99@14 288 cat <<EOF
joachim99@14 289 [$]*
joachim99@14 290 EOF
joachim99@14 291 exit 0
joachim99@14 292 fi
joachim99@14 293
joachim99@14 294 # The HP-UX ksh and POSIX shell print the target directory to stdout
joachim99@14 295 # if CDPATH is set.
joachim99@14 296 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
joachim99@14 297
joachim99@14 298 if test -z "$ECHO"; then
joachim99@14 299 if test "X${echo_test_string+set}" != Xset; then
joachim99@14 300 # find a string as large as possible, as long as the shell can cope with it
joachim99@14 301 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
joachim99@14 302 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
joachim99@14 303 if (echo_test_string="`eval $cmd`") 2>/dev/null &&
joachim99@14 304 echo_test_string="`eval $cmd`" &&
joachim99@14 305 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
joachim99@14 306 then
joachim99@14 307 break
joachim99@14 308 fi
joachim99@14 309 done
joachim99@14 310 fi
joachim99@14 311
joachim99@14 312 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
joachim99@14 313 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
joachim99@14 314 test "X$echo_testing_string" = "X$echo_test_string"; then
joachim99@14 315 :
joachim99@14 316 else
joachim99@14 317 # The Solaris, AIX, and Digital Unix default echo programs unquote
joachim99@14 318 # backslashes. This makes it impossible to quote backslashes using
joachim99@14 319 # echo "$something" | sed 's/\\/\\\\/g'
joachim99@14 320 #
joachim99@14 321 # So, first we look for a working echo in the user's PATH.
joachim99@14 322
joachim99@14 323 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
joachim99@14 324 for dir in $PATH /usr/ucb; do
joachim99@14 325 IFS="$lt_save_ifs"
joachim99@14 326 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
joachim99@14 327 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
joachim99@14 328 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
joachim99@14 329 test "X$echo_testing_string" = "X$echo_test_string"; then
joachim99@14 330 echo="$dir/echo"
joachim99@14 331 break
joachim99@14 332 fi
joachim99@14 333 done
joachim99@14 334 IFS="$lt_save_ifs"
joachim99@14 335
joachim99@14 336 if test "X$echo" = Xecho; then
joachim99@14 337 # We didn't find a better echo, so look for alternatives.
joachim99@14 338 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
joachim99@14 339 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
joachim99@14 340 test "X$echo_testing_string" = "X$echo_test_string"; then
joachim99@14 341 # This shell has a builtin print -r that does the trick.
joachim99@14 342 echo='print -r'
joachim99@14 343 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
joachim99@14 344 test "X$CONFIG_SHELL" != X/bin/ksh; then
joachim99@14 345 # If we have ksh, try running configure again with it.
joachim99@14 346 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
joachim99@14 347 export ORIGINAL_CONFIG_SHELL
joachim99@14 348 CONFIG_SHELL=/bin/ksh
joachim99@14 349 export CONFIG_SHELL
joachim99@14 350 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
joachim99@14 351 else
joachim99@14 352 # Try using printf.
joachim99@14 353 echo='printf %s\n'
joachim99@14 354 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
joachim99@14 355 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
joachim99@14 356 test "X$echo_testing_string" = "X$echo_test_string"; then
joachim99@14 357 # Cool, printf works
joachim99@14 358 :
joachim99@14 359 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
joachim99@14 360 test "X$echo_testing_string" = 'X\t' &&
joachim99@14 361 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
joachim99@14 362 test "X$echo_testing_string" = "X$echo_test_string"; then
joachim99@14 363 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
joachim99@14 364 export CONFIG_SHELL
joachim99@14 365 SHELL="$CONFIG_SHELL"
joachim99@14 366 export SHELL
joachim99@14 367 echo="$CONFIG_SHELL [$]0 --fallback-echo"
joachim99@14 368 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
joachim99@14 369 test "X$echo_testing_string" = 'X\t' &&
joachim99@14 370 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
joachim99@14 371 test "X$echo_testing_string" = "X$echo_test_string"; then
joachim99@14 372 echo="$CONFIG_SHELL [$]0 --fallback-echo"
joachim99@14 373 else
joachim99@14 374 # maybe with a smaller string...
joachim99@14 375 prev=:
joachim99@14 376
joachim99@14 377 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
joachim99@14 378 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
joachim99@14 379 then
joachim99@14 380 break
joachim99@14 381 fi
joachim99@14 382 prev="$cmd"
joachim99@14 383 done
joachim99@14 384
joachim99@14 385 if test "$prev" != 'sed 50q "[$]0"'; then
joachim99@14 386 echo_test_string=`eval $prev`
joachim99@14 387 export echo_test_string
joachim99@14 388 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
joachim99@14 389 else
joachim99@14 390 # Oops. We lost completely, so just stick with echo.
joachim99@14 391 echo=echo
joachim99@14 392 fi
joachim99@14 393 fi
joachim99@14 394 fi
joachim99@14 395 fi
joachim99@14 396 fi
joachim99@14 397 fi
joachim99@14 398
joachim99@14 399 # Copy echo and quote the copy suitably for passing to libtool from
joachim99@14 400 # the Makefile, instead of quoting the original, which is used later.
joachim99@14 401 ECHO=$echo
joachim99@14 402 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
joachim99@14 403 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
joachim99@14 404 fi
joachim99@14 405
joachim99@14 406 AC_SUBST(ECHO)
joachim99@14 407 AC_DIVERT_POP
joachim99@14 408 ])# _LT_AC_PROG_ECHO_BACKSLASH
joachim99@14 409
joachim99@14 410
joachim99@14 411 # _LT_AC_LOCK
joachim99@14 412 # -----------
joachim99@14 413 AC_DEFUN([_LT_AC_LOCK],
joachim99@14 414 [AC_ARG_ENABLE([libtool-lock],
joachim99@14 415 [AC_HELP_STRING([--disable-libtool-lock],
joachim99@14 416 [avoid locking (might break parallel builds)])])
joachim99@14 417 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
joachim99@2 418
joachim99@2 419 # Some flags need to be propagated to the compiler or linker for good
joachim99@2 420 # libtool support.
joachim99@2 421 case $host in
joachim99@14 422 ia64-*-hpux*)
joachim99@14 423 # Find out which ABI we are using.
joachim99@14 424 echo 'int i;' > conftest.$ac_ext
joachim99@14 425 if AC_TRY_EVAL(ac_compile); then
joachim99@14 426 case `/usr/bin/file conftest.$ac_objext` in
joachim99@14 427 *ELF-32*)
joachim99@14 428 HPUX_IA64_MODE="32"
joachim99@14 429 ;;
joachim99@14 430 *ELF-64*)
joachim99@14 431 HPUX_IA64_MODE="64"
joachim99@14 432 ;;
joachim99@14 433 esac
joachim99@14 434 fi
joachim99@14 435 rm -rf conftest*
joachim99@14 436 ;;
joachim99@2 437 *-*-irix6*)
joachim99@2 438 # Find out which ABI we are using.
joachim99@2 439 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
joachim99@2 440 if AC_TRY_EVAL(ac_compile); then
joachim99@2 441 case `/usr/bin/file conftest.$ac_objext` in
joachim99@2 442 *32-bit*)
joachim99@2 443 LD="${LD-ld} -32"
joachim99@2 444 ;;
joachim99@2 445 *N32*)
joachim99@2 446 LD="${LD-ld} -n32"
joachim99@2 447 ;;
joachim99@2 448 *64-bit*)
joachim99@2 449 LD="${LD-ld} -64"
joachim99@2 450 ;;
joachim99@2 451 esac
joachim99@2 452 fi
joachim99@2 453 rm -rf conftest*
joachim99@2 454 ;;
joachim99@2 455
joachim99@14 456 *-*-linux*)
joachim99@14 457 # Test if the compiler is 64bit
joachim99@14 458 echo 'int i;' > conftest.$ac_ext
joachim99@14 459 if AC_TRY_EVAL(ac_compile); then
joachim99@14 460 case `/usr/bin/file conftest.$ac_objext` in
joachim99@14 461 *"ELF 32"*)
joachim99@14 462 LINUX_64_MODE="32"
joachim99@14 463 ;;
joachim99@14 464 *"ELF 64"*)
joachim99@14 465 LINUX_64_MODE="64"
joachim99@14 466 ;;
joachim99@14 467 esac
joachim99@14 468 fi
joachim99@14 469 rm -rf conftest*
joachim99@14 470 ;;
joachim99@14 471
joachim99@2 472 *-*-sco3.2v5*)
joachim99@2 473 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
joachim99@2 474 SAVE_CFLAGS="$CFLAGS"
joachim99@2 475 CFLAGS="$CFLAGS -belf"
joachim99@2 476 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
joachim99@14 477 [AC_LANG_PUSH(C)
joachim99@2 478 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
joachim99@14 479 AC_LANG_POP])
joachim99@2 480 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
joachim99@2 481 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
joachim99@2 482 CFLAGS="$SAVE_CFLAGS"
joachim99@2 483 fi
joachim99@2 484 ;;
joachim99@2 485 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
joachim99@2 486 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
joachim99@2 487 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
joachim99@2 488 AC_CHECK_TOOL(AS, as, false)
joachim99@2 489 AC_CHECK_TOOL(OBJDUMP, objdump, false)
joachim99@2 490
joachim99@2 491 # recent cygwin and mingw systems supply a stub DllMain which the user
joachim99@2 492 # can override, but on older systems we have to supply one
joachim99@2 493 AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
joachim99@2 494 [AC_TRY_LINK([],
joachim99@2 495 [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
joachim99@2 496 DllMain (0, 0, 0);],
joachim99@2 497 [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
joachim99@2 498
joachim99@2 499 case $host/$CC in
joachim99@2 500 *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
joachim99@2 501 # old mingw systems require "-dll" to link a DLL, while more recent ones
joachim99@2 502 # require "-mdll"
joachim99@2 503 SAVE_CFLAGS="$CFLAGS"
joachim99@2 504 CFLAGS="$CFLAGS -mdll"
joachim99@2 505 AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
joachim99@2 506 [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
joachim99@2 507 CFLAGS="$SAVE_CFLAGS" ;;
joachim99@2 508 *-*-cygwin* | *-*-pw32*)
joachim99@2 509 # cygwin systems need to pass --dll to the linker, and not link
joachim99@2 510 # crt.o which will require a WinMain@16 definition.
joachim99@2 511 lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
joachim99@2 512 esac
joachim99@2 513 ;;
joachim99@2 514 ])
joachim99@2 515 esac
joachim99@14 516
joachim99@14 517 need_locks="$enable_libtool_lock"
joachim99@14 518
joachim99@14 519 ])# _LT_AC_LOCK
joachim99@14 520
joachim99@14 521
joachim99@14 522 # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
joachim99@14 523 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
joachim99@14 524 # ----------------------------------------------------------------
joachim99@14 525 # Check whether the given compiler option works
joachim99@14 526 AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
joachim99@14 527 [AC_CACHE_CHECK([$1], [$2],
joachim99@14 528 [$2=no
joachim99@14 529 ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
joachim99@14 530 save_CFLAGS="$CFLAGS"
joachim99@14 531 CFLAGS="$CFLAGS $3"
joachim99@14 532 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
joachim99@14 533 if (eval $ac_compile 2>conftest.err) && test -s $ac_outfile; then
joachim99@14 534 # The compiler can only warn and ignore the option if not recognized
joachim99@14 535 # So say no if there are warnings
joachim99@14 536 if test -s conftest.err; then
joachim99@14 537 # Append any errors to the config.log.
joachim99@14 538 cat conftest.err 1>&AS_MESSAGE_LOG_FD
joachim99@14 539 else
joachim99@14 540 $2=yes
joachim99@14 541 fi
joachim99@14 542 fi
joachim99@14 543 $rm conftest*
joachim99@14 544 CFLAGS="$save_CFLAGS"
joachim99@2 545 ])
joachim99@2 546
joachim99@14 547 if test x"[$]$2" = xyes; then
joachim99@14 548 ifelse([$5], , :, [$5])
joachim99@14 549 else
joachim99@14 550 ifelse([$6], , :, [$6])
joachim99@14 551 fi
joachim99@14 552 ])# AC_LIBTOOL_COMPILER_OPTION
joachim99@14 553
joachim99@14 554
joachim99@14 555 # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
joachim99@14 556 # [ACTION-SUCCESS], [ACTION-FAILURE])
joachim99@14 557 # ------------------------------------------------------------
joachim99@14 558 # Check whether the given compiler option works
joachim99@14 559 AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
joachim99@14 560 [AC_CACHE_CHECK([$1], [$2],
joachim99@14 561 [$2=no
joachim99@14 562 save_LDFLAGS="$LDFLAGS"
joachim99@14 563 LDFLAGS="$LDFLAGS $3"
joachim99@14 564 echo "$lt_simple_link_test_code" > conftest.$ac_ext
joachim99@14 565 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
joachim99@14 566 # The compiler can only warn and ignore the option if not recognized
joachim99@14 567 # So say no if there are warnings
joachim99@14 568 if test -s conftest.err; then
joachim99@14 569 # Append any errors to the config.log.
joachim99@14 570 cat conftest.err 1>&AS_MESSAGE_LOG_FD
joachim99@14 571 else
joachim99@14 572 $2=yes
joachim99@14 573 fi
joachim99@14 574 fi
joachim99@14 575 $rm conftest*
joachim99@14 576 LDFLAGS="$save_LDFLAGS"
joachim99@14 577 ])
joachim99@14 578
joachim99@14 579 if test x"[$]$2" = xyes; then
joachim99@14 580 ifelse([$4], , :, [$4])
joachim99@14 581 else
joachim99@14 582 ifelse([$5], , :, [$5])
joachim99@14 583 fi
joachim99@14 584 ])# AC_LIBTOOL_LINKER_OPTION
joachim99@14 585
joachim99@14 586
joachim99@14 587 # AC_LIBTOOL_SYS_MAX_CMD_LEN
joachim99@14 588 # --------------------------
joachim99@14 589 AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
joachim99@14 590 [# find the maximum length of command line arguments
joachim99@14 591 AC_MSG_CHECKING([the maximum length of command line arguments])
joachim99@14 592 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
joachim99@14 593 i=0
joachim99@14 594 testring="ABCD"
joachim99@14 595
joachim99@14 596 case $host_os in
joachim99@14 597 msdosdjgpp*)
joachim99@14 598 # On DJGPP, this test can blow up pretty badly due to problems in libc
joachim99@14 599 # (any single argument exceeding 2000 bytes causes a buffer overrun
joachim99@14 600 # during glob expansion). Even if it were fixed, the result of this
joachim99@14 601 # check would be larger than it should be.
joachim99@14 602 lt_cv_sys_max_cmd_len=12288; # 12K is about right
joachim99@14 603 ;;
joachim99@14 604
joachim99@14 605 gnu*)
joachim99@14 606 # Under GNU Hurd, this test is not required because there is
joachim99@14 607 # no limit to the length of command line arguments.
joachim99@14 608 # Libtool will interpret -1 as no limit whatsoever
joachim99@14 609 lt_cv_sys_max_cmd_len=-1;
joachim99@14 610 ;;
joachim99@14 611
joachim99@14 612 *)
joachim99@14 613 # If test is not a shell built-in, we'll probably end up computing a
joachim99@14 614 # maximum length that is only half of the actual maximum length, but
joachim99@14 615 # we can't tell.
joachim99@14 616 while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$testring" 2>/dev/null` \
joachim99@14 617 = "XX$testring") >/dev/null 2>&1 &&
joachim99@14 618 new_result=`expr "X$testring" : ".*" 2>&1` &&
joachim99@14 619 lt_cv_sys_max_cmd_len=$new_result &&
joachim99@14 620 test $i != 17 # 1/2 MB should be enough
joachim99@14 621 do
joachim99@14 622 i=`expr $i + 1`
joachim99@14 623 testring=$testring$testring
joachim99@14 624 done
joachim99@14 625 testring=
joachim99@14 626 # Add a significant safety factor because C++ compilers can tack on massive
joachim99@14 627 # amounts of additional arguments before passing them to the linker.
joachim99@14 628 # It appears as though 1/2 is a usable value.
joachim99@14 629 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
joachim99@14 630 ;;
joachim99@14 631 esac
joachim99@14 632 ])
joachim99@14 633 if test -n $lt_cv_sys_max_cmd_len ; then
joachim99@14 634 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
joachim99@14 635 else
joachim99@14 636 AC_MSG_RESULT(none)
joachim99@14 637 fi
joachim99@14 638 ])# AC_LIBTOOL_SYS_MAX_CMD_LEN
joachim99@14 639
joachim99@14 640
joachim99@14 641 # _LT_AC_CHECK_DLFCN
joachim99@14 642 # --------------------
joachim99@14 643 AC_DEFUN([_LT_AC_CHECK_DLFCN],
joachim99@14 644 [AC_CHECK_HEADERS(dlfcn.h)dnl
joachim99@14 645 ])# _LT_AC_CHECK_DLFCN
joachim99@14 646
joachim99@14 647
joachim99@14 648 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
joachim99@14 649 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
joachim99@14 650 # ------------------------------------------------------------------
joachim99@14 651 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
joachim99@14 652 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
joachim99@14 653 if test "$cross_compiling" = yes; then :
joachim99@14 654 [$4]
joachim99@14 655 else
joachim99@14 656 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
joachim99@14 657 lt_status=$lt_dlunknown
joachim99@14 658 cat > conftest.$ac_ext <<EOF
joachim99@14 659 [#line __oline__ "configure"
joachim99@14 660 #include "confdefs.h"
joachim99@14 661
joachim99@14 662 #if HAVE_DLFCN_H
joachim99@14 663 #include <dlfcn.h>
joachim99@14 664 #endif
joachim99@14 665
joachim99@14 666 #include <stdio.h>
joachim99@14 667
joachim99@14 668 #ifdef RTLD_GLOBAL
joachim99@14 669 # define LT_DLGLOBAL RTLD_GLOBAL
joachim99@14 670 #else
joachim99@14 671 # ifdef DL_GLOBAL
joachim99@14 672 # define LT_DLGLOBAL DL_GLOBAL
joachim99@14 673 # else
joachim99@14 674 # define LT_DLGLOBAL 0
joachim99@14 675 # endif
joachim99@14 676 #endif
joachim99@14 677
joachim99@14 678 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
joachim99@14 679 find out it does not work in some platform. */
joachim99@14 680 #ifndef LT_DLLAZY_OR_NOW
joachim99@14 681 # ifdef RTLD_LAZY
joachim99@14 682 # define LT_DLLAZY_OR_NOW RTLD_LAZY
joachim99@14 683 # else
joachim99@14 684 # ifdef DL_LAZY
joachim99@14 685 # define LT_DLLAZY_OR_NOW DL_LAZY
joachim99@14 686 # else
joachim99@14 687 # ifdef RTLD_NOW
joachim99@14 688 # define LT_DLLAZY_OR_NOW RTLD_NOW
joachim99@14 689 # else
joachim99@14 690 # ifdef DL_NOW
joachim99@14 691 # define LT_DLLAZY_OR_NOW DL_NOW
joachim99@14 692 # else
joachim99@14 693 # define LT_DLLAZY_OR_NOW 0
joachim99@14 694 # endif
joachim99@14 695 # endif
joachim99@14 696 # endif
joachim99@14 697 # endif
joachim99@14 698 #endif
joachim99@14 699
joachim99@14 700 #ifdef __cplusplus
joachim99@14 701 extern "C" void exit (int);
joachim99@14 702 #endif
joachim99@14 703
joachim99@14 704 void fnord() { int i=42;}
joachim99@14 705 int main ()
joachim99@14 706 {
joachim99@14 707 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
joachim99@14 708 int status = $lt_dlunknown;
joachim99@14 709
joachim99@14 710 if (self)
joachim99@14 711 {
joachim99@14 712 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
joachim99@14 713 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
joachim99@14 714 /* dlclose (self); */
joachim99@14 715 }
joachim99@14 716
joachim99@14 717 exit (status);
joachim99@14 718 }]
joachim99@14 719 EOF
joachim99@14 720 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
joachim99@14 721 (./conftest; exit; ) 2>/dev/null
joachim99@14 722 lt_status=$?
joachim99@14 723 case x$lt_status in
joachim99@14 724 x$lt_dlno_uscore) $1 ;;
joachim99@14 725 x$lt_dlneed_uscore) $2 ;;
joachim99@14 726 x$lt_unknown|x*) $3 ;;
joachim99@14 727 esac
joachim99@14 728 else :
joachim99@14 729 # compilation failed
joachim99@14 730 $3
joachim99@14 731 fi
joachim99@14 732 fi
joachim99@14 733 rm -fr conftest*
joachim99@14 734 ])# _LT_AC_TRY_DLOPEN_SELF
joachim99@14 735
joachim99@14 736
joachim99@14 737 # AC_LIBTOOL_DLOPEN_SELF
joachim99@14 738 # -------------------
joachim99@14 739 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
joachim99@14 740 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
joachim99@14 741 if test "x$enable_dlopen" != xyes; then
joachim99@14 742 enable_dlopen=unknown
joachim99@14 743 enable_dlopen_self=unknown
joachim99@14 744 enable_dlopen_self_static=unknown
joachim99@14 745 else
joachim99@14 746 lt_cv_dlopen=no
joachim99@14 747 lt_cv_dlopen_libs=
joachim99@14 748
joachim99@14 749 case $host_os in
joachim99@14 750 beos*)
joachim99@14 751 lt_cv_dlopen="load_add_on"
joachim99@14 752 lt_cv_dlopen_libs=
joachim99@14 753 lt_cv_dlopen_self=yes
joachim99@14 754 ;;
joachim99@14 755
joachim99@14 756 cygwin* | mingw* | pw32*)
joachim99@14 757 lt_cv_dlopen="LoadLibrary"
joachim99@14 758 lt_cv_dlopen_libs=
joachim99@14 759 ;;
joachim99@14 760
joachim99@14 761 *)
joachim99@14 762 AC_CHECK_FUNC([shl_load],
joachim99@14 763 [lt_cv_dlopen="shl_load"],
joachim99@14 764 [AC_CHECK_LIB([dld], [shl_load],
joachim99@14 765 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
joachim99@14 766 [AC_CHECK_FUNC([dlopen],
joachim99@14 767 [lt_cv_dlopen="dlopen"],
joachim99@14 768 [AC_CHECK_LIB([dl], [dlopen],
joachim99@14 769 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
joachim99@14 770 [AC_CHECK_LIB([svld], [dlopen],
joachim99@14 771 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
joachim99@14 772 [AC_CHECK_LIB([dld], [dld_link],
joachim99@14 773 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
joachim99@14 774 ])
joachim99@14 775 ])
joachim99@14 776 ])
joachim99@14 777 ])
joachim99@14 778 ])
joachim99@14 779 ;;
joachim99@14 780 esac
joachim99@14 781
joachim99@14 782 if test "x$lt_cv_dlopen" != xno; then
joachim99@14 783 enable_dlopen=yes
joachim99@14 784 else
joachim99@14 785 enable_dlopen=no
joachim99@14 786 fi
joachim99@14 787
joachim99@14 788 case $lt_cv_dlopen in
joachim99@14 789 dlopen)
joachim99@14 790 save_CPPFLAGS="$CPPFLAGS"
joachim99@14 791 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
joachim99@14 792
joachim99@14 793 save_LDFLAGS="$LDFLAGS"
joachim99@14 794 eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
joachim99@14 795
joachim99@14 796 save_LIBS="$LIBS"
joachim99@14 797 LIBS="$lt_cv_dlopen_libs $LIBS"
joachim99@14 798
joachim99@14 799 AC_CACHE_CHECK([whether a program can dlopen itself],
joachim99@14 800 lt_cv_dlopen_self, [dnl
joachim99@14 801 _LT_AC_TRY_DLOPEN_SELF(
joachim99@14 802 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
joachim99@14 803 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
joachim99@14 804 ])
joachim99@14 805
joachim99@14 806 if test "x$lt_cv_dlopen_self" = xyes; then
joachim99@14 807 LDFLAGS="$LDFLAGS $link_static_flag"
joachim99@14 808 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
joachim99@14 809 lt_cv_dlopen_self_static, [dnl
joachim99@14 810 _LT_AC_TRY_DLOPEN_SELF(
joachim99@14 811 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
joachim99@14 812 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
joachim99@14 813 ])
joachim99@14 814 fi
joachim99@14 815
joachim99@14 816 CPPFLAGS="$save_CPPFLAGS"
joachim99@14 817 LDFLAGS="$save_LDFLAGS"
joachim99@14 818 LIBS="$save_LIBS"
joachim99@14 819 ;;
joachim99@14 820 esac
joachim99@14 821
joachim99@14 822 case $lt_cv_dlopen_self in
joachim99@14 823 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
joachim99@14 824 *) enable_dlopen_self=unknown ;;
joachim99@14 825 esac
joachim99@14 826
joachim99@14 827 case $lt_cv_dlopen_self_static in
joachim99@14 828 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
joachim99@14 829 *) enable_dlopen_self_static=unknown ;;
joachim99@14 830 esac
joachim99@14 831 fi
joachim99@14 832 ])# AC_LIBTOOL_DLOPEN_SELF
joachim99@14 833
joachim99@14 834
joachim99@14 835 # AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
joachim99@14 836 # ---------------------------------
joachim99@14 837 # Check to see if options -c and -o are simultaneously supported by compiler
joachim99@14 838 AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
joachim99@14 839 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
joachim99@14 840 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
joachim99@14 841 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
joachim99@14 842 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
joachim99@14 843 $rm -r conftest 2>/dev/null
joachim99@14 844 mkdir conftest
joachim99@14 845 cd conftest
joachim99@14 846 mkdir out
joachim99@14 847 ifelse([$1],[],[save_CFLAGS="$CFLAGS"
joachim99@14 848 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"],
joachim99@14 849 [$1],[CXX],[save_CXXFLAGS="$CXXFLAGS"
joachim99@14 850 CXXFLAGS="$CXXFLAGS -o out/conftest2.$ac_objext"],
joachim99@14 851 [$1],[GCJ],[save_GCJFLAGS="$GCJFLAGS"
joachim99@14 852 GCJFLAGS="$GCJFLAGS -o out/conftest2.$ac_objext"])
joachim99@14 853 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
joachim99@14 854
joachim99@14 855 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
joachim99@14 856 # that will create temporary files in the current directory regardless of
joachim99@14 857 # the output directory. Thus, making CWD read-only will cause this test
joachim99@14 858 # to fail, enabling locking or at least warning the user not to do parallel
joachim99@14 859 # builds.
joachim99@14 860 chmod -w .
joachim99@14 861
joachim99@14 862 if (eval $ac_compile 2>out/conftest.err) && test -s out/conftest2.$ac_objext
joachim99@14 863 then
joachim99@14 864 # The compiler can only warn and ignore the option if not recognized
joachim99@14 865 # So say no if there are warnings
joachim99@14 866 if test -s out/conftest.err; then
joachim99@14 867 # Append any errors to the config.log.
joachim99@14 868 cat out/conftest.err 1>&AS_MESSAGE_LOG_FD
joachim99@14 869 else
joachim99@14 870 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
joachim99@14 871 fi
joachim99@14 872 fi
joachim99@14 873 ifelse([$1],[],[CFLAGS="$save_CFLAGS"],
joachim99@14 874 [$1],[CXX],[CXXFLAGS="$save_CXXFLAGS"],
joachim99@14 875 [$1],[GCJ],[GCJFLAGS="$save_GCJFLAGS"])
joachim99@14 876 chmod u+w .
joachim99@14 877 $rm conftest* out/*
joachim99@14 878 rmdir out
joachim99@14 879 cd ..
joachim99@14 880 rmdir conftest
joachim99@14 881 $rm conftest*
joachim99@14 882 ])
joachim99@14 883 ])# AC_LIBTOOL_PROG_CC_C_O
joachim99@14 884
joachim99@14 885
joachim99@14 886 # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
joachim99@14 887 # -----------------------------------------
joachim99@14 888 # Check to see if we can do hard links to lock some files if needed
joachim99@14 889 AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
joachim99@14 890 [AC_REQUIRE([_LT_AC_LOCK])dnl
joachim99@14 891
joachim99@14 892 hard_links="nottested"
joachim99@14 893 if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
joachim99@14 894 # do not overwrite the value of need_locks provided by the user
joachim99@14 895 AC_MSG_CHECKING([if we can lock with hard links])
joachim99@14 896 hard_links=yes
joachim99@14 897 $rm conftest*
joachim99@14 898 ln conftest.a conftest.b 2>/dev/null && hard_links=no
joachim99@14 899 touch conftest.a
joachim99@14 900 ln conftest.a conftest.b 2>&5 || hard_links=no
joachim99@14 901 ln conftest.a conftest.b 2>/dev/null && hard_links=no
joachim99@14 902 AC_MSG_RESULT([$hard_links])
joachim99@14 903 if test "$hard_links" = no; then
joachim99@14 904 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
joachim99@14 905 need_locks=warn
joachim99@14 906 fi
joachim99@14 907 else
joachim99@14 908 need_locks=no
joachim99@14 909 fi
joachim99@14 910 ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
joachim99@14 911
joachim99@14 912
joachim99@14 913 # AC_LIBTOOL_OBJDIR
joachim99@14 914 # -----------------
joachim99@14 915 AC_DEFUN([AC_LIBTOOL_OBJDIR],
joachim99@14 916 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
joachim99@14 917 [rm -f .libs 2>/dev/null
joachim99@14 918 mkdir .libs 2>/dev/null
joachim99@14 919 if test -d .libs; then
joachim99@14 920 lt_cv_objdir=.libs
joachim99@14 921 else
joachim99@14 922 # MS-DOS does not allow filenames that begin with a dot.
joachim99@14 923 lt_cv_objdir=_libs
joachim99@14 924 fi
joachim99@14 925 rmdir .libs 2>/dev/null])
joachim99@14 926 objdir=$lt_cv_objdir
joachim99@14 927 ])# AC_LIBTOOL_OBJDIR
joachim99@14 928
joachim99@14 929
joachim99@14 930 # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
joachim99@14 931 # ----------------------------------------------
joachim99@14 932 # Check hardcoding attributes.
joachim99@14 933 AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
joachim99@14 934 [AC_MSG_CHECKING([how to hardcode library paths into programs])
joachim99@14 935 _LT_AC_TAGVAR(hardcode_action, $1)=
joachim99@14 936 if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
joachim99@14 937 test -n "$_LT_AC_TAGVAR(runpath_var $1)"; then
joachim99@14 938
joachim99@14 939 # We can hardcode non-existant directories.
joachim99@14 940 if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
joachim99@14 941 # If the only mechanism to avoid hardcoding is shlibpath_var, we
joachim99@14 942 # have to relink, otherwise we might link with an installed library
joachim99@14 943 # when we should be linking with a yet-to-be-installed one
joachim99@14 944 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
joachim99@14 945 test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
joachim99@14 946 # Linking always hardcodes the temporary library directory.
joachim99@14 947 _LT_AC_TAGVAR(hardcode_action, $1)=relink
joachim99@14 948 else
joachim99@14 949 # We can link without hardcoding, and we can hardcode nonexisting dirs.
joachim99@14 950 _LT_AC_TAGVAR(hardcode_action, $1)=immediate
joachim99@14 951 fi
joachim99@14 952 else
joachim99@14 953 # We cannot hardcode anything, or else we can only hardcode existing
joachim99@14 954 # directories.
joachim99@14 955 _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
joachim99@14 956 fi
joachim99@14 957 AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
joachim99@14 958
joachim99@14 959 if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
joachim99@14 960 # Fast installation is not supported
joachim99@14 961 enable_fast_install=no
joachim99@14 962 elif test "$shlibpath_overrides_runpath" = yes ||
joachim99@14 963 test "$enable_shared" = no; then
joachim99@14 964 # Fast installation is not necessary
joachim99@14 965 enable_fast_install=needless
joachim99@14 966 fi
joachim99@14 967 ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
joachim99@14 968
joachim99@14 969
joachim99@14 970 # AC_LIBTOOL_SYS_LIB_STRIP
joachim99@14 971 # ------------------------
joachim99@14 972 AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
joachim99@14 973 [striplib=
joachim99@14 974 old_striplib=
joachim99@14 975 AC_MSG_CHECKING([whether stripping libraries is possible])
joachim99@14 976 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
joachim99@14 977 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
joachim99@14 978 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
joachim99@14 979 AC_MSG_RESULT([yes])
joachim99@14 980 else
joachim99@14 981 AC_MSG_RESULT([no])
joachim99@14 982 fi
joachim99@14 983 ])# AC_LIBTOOL_SYS_LIB_STRIP
joachim99@14 984
joachim99@14 985
joachim99@14 986 # AC_LIBTOOL_SYS_DYNAMIC_LINKER
joachim99@14 987 # -----------------------------
joachim99@14 988 # PORTME Fill in your ld.so characteristics
joachim99@14 989 AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
joachim99@14 990 [AC_MSG_CHECKING([dynamic linker characteristics])
joachim99@14 991 library_names_spec=
joachim99@14 992 libname_spec='lib$name'
joachim99@14 993 soname_spec=
joachim99@14 994 postinstall_cmds=
joachim99@14 995 postuninstall_cmds=
joachim99@14 996 finish_cmds=
joachim99@14 997 finish_eval=
joachim99@14 998 shlibpath_var=
joachim99@14 999 shlibpath_overrides_runpath=unknown
joachim99@14 1000 version_type=none
joachim99@14 1001 dynamic_linker="$host_os ld.so"
joachim99@14 1002 sys_lib_dlsearch_path_spec="/lib /usr/lib"
joachim99@14 1003 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
joachim99@14 1004 need_lib_prefix=unknown
joachim99@14 1005 hardcode_into_libs=no
joachim99@14 1006
joachim99@14 1007 # when you set need_version to no, make sure it does not cause -set_version
joachim99@14 1008 # flags to be left without arguments
joachim99@14 1009 need_version=unknown
joachim99@14 1010
joachim99@14 1011 case $host_os in
joachim99@14 1012 aix3*)
joachim99@14 1013 version_type=linux
joachim99@14 1014 library_names_spec='${libname}${release}.so$versuffix $libname.a'
joachim99@14 1015 shlibpath_var=LIBPATH
joachim99@14 1016
joachim99@14 1017 # AIX 3 has no versioning support, so we append a major version to the name.
joachim99@14 1018 soname_spec='${libname}${release}.so$major'
joachim99@14 1019 ;;
joachim99@14 1020
joachim99@14 1021 aix4* | aix5*)
joachim99@14 1022 version_type=linux
joachim99@14 1023 hardcode_into_libs=yes
joachim99@14 1024 if test "$host_cpu" = ia64; then
joachim99@14 1025 # AIX 5 supports IA64
joachim99@14 1026 library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
joachim99@14 1027 shlibpath_var=LD_LIBRARY_PATH
joachim99@14 1028 else
joachim99@14 1029 # With GCC up to 2.95.x, collect2 would create an import file
joachim99@14 1030 # for dependence libraries. The import file would start with
joachim99@14 1031 # the line `#! .'. This would cause the generated library to
joachim99@14 1032 # depend on `.', always an invalid library. This was fixed in
joachim99@14 1033 # development snapshots of GCC prior to 3.0.
joachim99@14 1034 case $host_os in
joachim99@14 1035 aix4 | aix4.[[01]] | aix4.[[01]].*)
joachim99@14 1036 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
joachim99@14 1037 echo ' yes '
joachim99@14 1038 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
joachim99@14 1039 :
joachim99@14 1040 else
joachim99@14 1041 can_build_shared=no
joachim99@14 1042 fi
joachim99@14 1043 ;;
joachim99@14 1044 esac
joachim99@14 1045 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
joachim99@14 1046 # soname into executable. Probably we can add versioning support to
joachim99@14 1047 # collect2, so additional links can be useful in future.
joachim99@14 1048 if test "$aix_use_runtimelinking" = yes; then
joachim99@14 1049 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
joachim99@14 1050 # instead of lib<name>.a to let people know that these are not
joachim99@14 1051 # typical AIX shared libraries.
joachim99@14 1052 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
joachim99@14 1053 else
joachim99@14 1054 # We preserve .a as extension for shared libraries through AIX4.2
joachim99@14 1055 # and later when we are not doing run time linking.
joachim99@14 1056 library_names_spec='${libname}${release}.a $libname.a'
joachim99@14 1057 soname_spec='${libname}${release}.so$major'
joachim99@14 1058 fi
joachim99@14 1059 shlibpath_var=LIBPATH
joachim99@14 1060 fi
joachim99@14 1061 ;;
joachim99@14 1062
joachim99@14 1063 amigaos*)
joachim99@14 1064 library_names_spec='$libname.ixlibrary $libname.a'
joachim99@14 1065 # Create ${libname}_ixlibrary.a entries in /sys/libs.
joachim99@14 1066 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done'
joachim99@14 1067 ;;
joachim99@14 1068
joachim99@14 1069 beos*)
joachim99@14 1070 library_names_spec='${libname}.so'
joachim99@14 1071 dynamic_linker="$host_os ld.so"
joachim99@14 1072 shlibpath_var=LIBRARY_PATH
joachim99@14 1073 ;;
joachim99@14 1074
joachim99@14 1075 bsdi4*)
joachim99@14 1076 version_type=linux
joachim99@14 1077 need_version=no
joachim99@14 1078 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
joachim99@14 1079 soname_spec='${libname}${release}.so$major'
joachim99@14 1080 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
joachim99@14 1081 shlibpath_var=LD_LIBRARY_PATH
joachim99@14 1082 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
joachim99@14 1083 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
joachim99@14 1084 # the default ld.so.conf also contains /usr/contrib/lib and
joachim99@14 1085 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
joachim99@14 1086 # libtool to hard-code these into programs
joachim99@14 1087 ;;
joachim99@14 1088
joachim99@14 1089 cygwin* | mingw* | pw32*)
joachim99@14 1090 version_type=windows
joachim99@14 1091 need_version=no
joachim99@14 1092 need_lib_prefix=no
joachim99@14 1093 case $GCC,$host_os in
joachim99@14 1094 yes,cygwin*)
joachim99@14 1095 library_names_spec='$libname.dll.a'
joachim99@14 1096 sys_lib_search_path_spec="/lib /lib/w32api /usr/lib /usr/local/lib"
joachim99@14 1097 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
joachim99@14 1098 postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
joachim99@14 1099 dldir=$destdir/`dirname \$dlpath`~
joachim99@14 1100 test -d \$dldir || mkdir -p \$dldir~
joachim99@14 1101 $install_prog .libs/$dlname \$dldir/$dlname'
joachim99@14 1102 postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
joachim99@14 1103 dlpath=$dir/\$dldll~
joachim99@14 1104 $rm \$dlpath'
joachim99@14 1105 ;;
joachim99@14 1106 yes,mingw*)
joachim99@14 1107 library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
joachim99@14 1108 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://"`
joachim99@14 1109 if echo "$sys_lib_search_path_spec" | [egrep ';[C-Z]:/' >/dev/null]; then
joachim99@14 1110 # It is most probably a Windows format PATH printed by
joachim99@14 1111 # mingw gcc, but we are running on Cygwin. Gcc prints its search
joachim99@14 1112 # path with ; separators, and with drive letters. We can handle the
joachim99@14 1113 # drive letters (cygwin fileutils understands them), so leave them,
joachim99@14 1114 # especially as we might pass files found there to a mingw objdump,
joachim99@14 1115 # which wouldn't understand a cygwinified path. Ahh.
joachim99@14 1116 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed -e 's/;/ /g'`
joachim99@14 1117 else
joachim99@14 1118 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed -e "s/$PATH_SEPARATOR/ /g"`
joachim99@14 1119 fi
joachim99@14 1120 ;;
joachim99@14 1121 yes,pw32*)
joachim99@14 1122 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
joachim99@14 1123 ;;
joachim99@14 1124 *)
joachim99@14 1125 library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib'
joachim99@14 1126 ;;
joachim99@14 1127 esac
joachim99@14 1128 dynamic_linker='Win32 ld.exe'
joachim99@14 1129 # FIXME: first we should search . and the directory the executable is in
joachim99@14 1130 shlibpath_var=PATH
joachim99@14 1131 ;;
joachim99@14 1132
joachim99@14 1133 darwin* | rhapsody*)
joachim99@14 1134 dynamic_linker="$host_os dyld"
joachim99@14 1135 version_type=darwin
joachim99@14 1136 need_lib_prefix=no
joachim99@14 1137 need_version=no
joachim99@14 1138 # FIXME: Relying on posixy $() will cause problems for
joachim99@14 1139 # cross-compilation, but unfortunately the echo tests do not
joachim99@14 1140 # yet detect zsh echo's removal of \ escapes.
joachim99@14 1141 library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)'
joachim99@14 1142 soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
joachim99@14 1143 shlibpath_overrides_runpath=yes
joachim99@14 1144 shlibpath_var=DYLD_LIBRARY_PATH
joachim99@14 1145 ;;
joachim99@14 1146
joachim99@14 1147 dgux*)
joachim99@14 1148 version_type=linux
joachim99@14 1149 need_lib_prefix=no
joachim99@14 1150 need_version=no
joachim99@14 1151 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
joachim99@14 1152 soname_spec='${libname}${release}.so$major'
joachim99@14 1153 shlibpath_var=LD_LIBRARY_PATH
joachim99@14 1154 ;;
joachim99@14 1155
joachim99@14 1156 freebsd1*)
joachim99@14 1157 dynamic_linker=no
joachim99@14 1158 ;;
joachim99@14 1159
joachim99@14 1160 freebsd*)
joachim99@14 1161 objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
joachim99@14 1162 version_type=freebsd-$objformat
joachim99@14 1163 case $version_type in
joachim99@14 1164 freebsd-elf*)
joachim99@14 1165 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
joachim99@14 1166 need_version=no
joachim99@14 1167 need_lib_prefix=no
joachim99@14 1168 ;;
joachim99@14 1169 freebsd-*)
joachim99@14 1170 library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
joachim99@14 1171 need_version=yes
joachim99@14 1172 ;;
joachim99@14 1173 esac
joachim99@14 1174 shlibpath_var=LD_LIBRARY_PATH
joachim99@14 1175 case $host_os in
joachim99@14 1176 freebsd2*)
joachim99@14 1177 shlibpath_overrides_runpath=yes
joachim99@14 1178 ;;
joachim99@14 1179 freebsd3.[01]* | freebsdelf3.[01]*)
joachim99@14 1180 shlibpath_overrides_runpath=yes
joachim99@14 1181 hardcode_into_libs=yes
joachim99@14 1182 ;;
joachim99@14 1183 *) # from 3.2 on
joachim99@14 1184 shlibpath_overrides_runpath=no
joachim99@14 1185 hardcode_into_libs=yes
joachim99@14 1186 ;;
joachim99@14 1187 esac
joachim99@14 1188 ;;
joachim99@14 1189
joachim99@14 1190 gnu*)
joachim99@14 1191 version_type=linux
joachim99@14 1192 need_lib_prefix=no
joachim99@14 1193 need_version=no
joachim99@14 1194 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
joachim99@14 1195 soname_spec='${libname}${release}.so$major'
joachim99@14 1196 shlibpath_var=LD_LIBRARY_PATH
joachim99@14 1197 hardcode_into_libs=yes
joachim99@14 1198 ;;
joachim99@14 1199
joachim99@14 1200 hpux9* | hpux10* | hpux11*)
joachim99@14 1201 # Give a soname corresponding to the major version so that dld.sl refuses to
joachim99@14 1202 # link against other versions.
joachim99@14 1203 version_type=sunos
joachim99@14 1204 need_lib_prefix=no
joachim99@14 1205 need_version=no
joachim99@14 1206 if test "$host_cpu" = ia64; then
joachim99@14 1207 hardcode_into_libs=yes
joachim99@14 1208 dynamic_linker="$host_os dld.so"
joachim99@14 1209 shlibpath_var=LD_LIBRARY_PATH
joachim99@14 1210 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
joachim99@14 1211 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
joachim99@14 1212 soname_spec='${libname}${release}.so$major'
joachim99@14 1213 if test "X$HPUX_IA64_MODE" = X32; then
joachim99@14 1214 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
joachim99@14 1215 else
joachim99@14 1216 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
joachim99@14 1217 fi
joachim99@14 1218 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
joachim99@14 1219 else
joachim99@14 1220 dynamic_linker="$host_os dld.sl"
joachim99@14 1221 shlibpath_var=SHLIB_PATH
joachim99@14 1222 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
joachim99@14 1223 library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
joachim99@14 1224 soname_spec='${libname}${release}.sl$major'
joachim99@14 1225 fi
joachim99@14 1226 # HP-UX runs *really* slowly unless shared libraries are mode 555.
joachim99@14 1227 postinstall_cmds='chmod 555 $lib'
joachim99@14 1228 ;;
joachim99@14 1229
joachim99@14 1230 irix5* | irix6* | nonstopux*)
joachim99@14 1231 case $host_os in
joachim99@14 1232 nonstopux*) version_type=nonstopux ;;
joachim99@14 1233 *) version_type=irix ;;
joachim99@14 1234 esac
joachim99@14 1235 need_lib_prefix=no
joachim99@14 1236 need_version=no
joachim99@14 1237 soname_spec='${libname}${release}.so$major'
joachim99@14 1238 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
joachim99@14 1239 case $host_os in
joachim99@14 1240 irix5* | nonstopux*)
joachim99@14 1241 libsuff= shlibsuff=
joachim99@14 1242 ;;
joachim99@14 1243 *)
joachim99@14 1244 case $LD in # libtool.m4 will add one of these switches to LD
joachim99@14 1245 *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
joachim99@14 1246 *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
joachim99@14 1247 *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
joachim99@14 1248 *) libsuff= shlibsuff= libmagic=never-match;;
joachim99@14 1249 esac
joachim99@14 1250 ;;
joachim99@14 1251 esac
joachim99@14 1252 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
joachim99@14 1253 shlibpath_overrides_runpath=no
joachim99@14 1254 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
joachim99@14 1255 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
joachim99@14 1256 ;;
joachim99@14 1257
joachim99@14 1258 # No shared lib support for Linux oldld, aout, or coff.
joachim99@14 1259 linux*oldld* | linux*aout* | linux*coff*)
joachim99@14 1260 dynamic_linker=no
joachim99@14 1261 ;;
joachim99@14 1262
joachim99@14 1263 # This must be Linux ELF.
joachim99@14 1264 linux*)
joachim99@14 1265 version_type=linux
joachim99@14 1266 need_lib_prefix=no
joachim99@14 1267 need_version=no
joachim99@14 1268 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
joachim99@14 1269 soname_spec='${libname}${release}.so$major'
joachim99@14 1270 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
joachim99@14 1271 libsuff=
joachim99@14 1272 if test "x$LINUX_64_MODE" = x64; then
joachim99@14 1273 # Some platforms are per default 64-bit, so there's no /lib64
joachim99@14 1274 if test -d /lib64; then
joachim99@14 1275 libsuff=64
joachim99@14 1276 fi
joachim99@14 1277 fi
joachim99@14 1278 shlibpath_var=LD_LIBRARY_PATH
joachim99@14 1279 shlibpath_overrides_runpath=no
joachim99@14 1280 sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
joachim99@14 1281 sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
joachim99@14 1282 # This implies no fast_install, which is unacceptable.
joachim99@14 1283 # Some rework will be needed to allow for fast_install
joachim99@14 1284 # before this can be enabled.
joachim99@14 1285 hardcode_into_libs=yes
joachim99@14 1286
joachim99@14 1287 # We used to test for /lib/ld.so.1 and disable shared libraries on
joachim99@14 1288 # powerpc, because MkLinux only supported shared libraries with the
joachim99@14 1289 # GNU dynamic linker. Since this was broken with cross compilers,
joachim99@14 1290 # most powerpc-linux boxes support dynamic linking these days and
joachim99@14 1291 # people can always --disable-shared, the test was removed, and we
joachim99@14 1292 # assume the GNU/Linux dynamic linker is in use.
joachim99@14 1293 dynamic_linker='GNU/Linux ld.so'
joachim99@14 1294 ;;
joachim99@14 1295
joachim99@14 1296 netbsd*)
joachim99@14 1297 version_type=sunos
joachim99@14 1298 need_lib_prefix=no
joachim99@14 1299 need_version=no
joachim99@14 1300 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
joachim99@14 1301 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
joachim99@14 1302 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
joachim99@14 1303 dynamic_linker='NetBSD (a.out) ld.so'
joachim99@14 1304 else
joachim99@14 1305 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
joachim99@14 1306 soname_spec='${libname}${release}.so$major'
joachim99@14 1307 dynamic_linker='NetBSD ld.elf_so'
joachim99@14 1308 fi
joachim99@14 1309 shlibpath_var=LD_LIBRARY_PATH
joachim99@14 1310 shlibpath_overrides_runpath=yes
joachim99@14 1311 hardcode_into_libs=yes
joachim99@14 1312 ;;
joachim99@14 1313
joachim99@14 1314 newsos6)
joachim99@14 1315 version_type=linux
joachim99@14 1316 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
joachim99@14 1317 shlibpath_var=LD_LIBRARY_PATH
joachim99@14 1318 shlibpath_overrides_runpath=yes
joachim99@14 1319 ;;
joachim99@14 1320
joachim99@14 1321 nto-qnx)
joachim99@14 1322 version_type=linux
joachim99@14 1323 need_lib_prefix=no
joachim99@14 1324 need_version=no
joachim99@14 1325 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
joachim99@14 1326 soname_spec='${libname}${release}.so$major'
joachim99@14 1327 shlibpath_var=LD_LIBRARY_PATH
joachim99@14 1328 shlibpath_overrides_runpath=yes
joachim99@14 1329 ;;
joachim99@14 1330
joachim99@14 1331 openbsd*)
joachim99@14 1332 version_type=sunos
joachim99@14 1333 need_lib_prefix=no
joachim99@14 1334 need_version=no
joachim99@14 1335 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
joachim99@14 1336 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
joachim99@14 1337 shlibpath_var=LD_LIBRARY_PATH
joachim99@14 1338 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
joachim99@14 1339 case $host_os in
joachim99@14 1340 openbsd2.[[89]] | openbsd2.[[89]].*)
joachim99@14 1341 shlibpath_overrides_runpath=no
joachim99@14 1342 ;;
joachim99@14 1343 *)
joachim99@14 1344 shlibpath_overrides_runpath=yes
joachim99@14 1345 ;;
joachim99@14 1346 esac
joachim99@14 1347 else
joachim99@14 1348 shlibpath_overrides_runpath=yes
joachim99@14 1349 fi
joachim99@14 1350 ;;
joachim99@14 1351
joachim99@14 1352 os2*)
joachim99@14 1353 libname_spec='$name'
joachim99@14 1354 need_lib_prefix=no
joachim99@14 1355 library_names_spec='$libname.dll $libname.a'
joachim99@14 1356 dynamic_linker='OS/2 ld.exe'
joachim99@14 1357 shlibpath_var=LIBPATH
joachim99@14 1358 ;;
joachim99@14 1359
joachim99@14 1360 osf3* | osf4* | osf5*)
joachim99@14 1361 version_type=osf
joachim99@14 1362 need_lib_prefix=no
joachim99@14 1363 need_version=no
joachim99@14 1364 soname_spec='${libname}${release}.so'
joachim99@14 1365 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
joachim99@14 1366 shlibpath_var=LD_LIBRARY_PATH
joachim99@14 1367 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
joachim99@14 1368 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
joachim99@14 1369 ;;
joachim99@14 1370
joachim99@14 1371 sco3.2v5*)
joachim99@14 1372 version_type=osf
joachim99@14 1373 soname_spec='${libname}${release}.so$major'
joachim99@14 1374 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
joachim99@14 1375 shlibpath_var=LD_LIBRARY_PATH
joachim99@14 1376 ;;
joachim99@14 1377
joachim99@14 1378 solaris*)
joachim99@14 1379 version_type=linux
joachim99@14 1380 need_lib_prefix=no
joachim99@14 1381 need_version=no
joachim99@14 1382 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
joachim99@14 1383 soname_spec='${libname}${release}.so$major'
joachim99@14 1384 shlibpath_var=LD_LIBRARY_PATH
joachim99@14 1385 shlibpath_overrides_runpath=yes
joachim99@14 1386 hardcode_into_libs=yes
joachim99@14 1387 # ldd complains unless libraries are executable
joachim99@14 1388 postinstall_cmds='chmod +x $lib'
joachim99@14 1389 ;;
joachim99@14 1390
joachim99@14 1391 sunos4*)
joachim99@14 1392 version_type=sunos
joachim99@14 1393 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
joachim99@14 1394 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
joachim99@14 1395 shlibpath_var=LD_LIBRARY_PATH
joachim99@14 1396 shlibpath_overrides_runpath=yes
joachim99@14 1397 if test "$with_gnu_ld" = yes; then
joachim99@14 1398 need_lib_prefix=no
joachim99@14 1399 fi
joachim99@14 1400 need_version=yes
joachim99@14 1401 ;;
joachim99@14 1402
joachim99@14 1403 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
joachim99@14 1404 version_type=linux
joachim99@14 1405 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
joachim99@14 1406 soname_spec='${libname}${release}.so$major'
joachim99@14 1407 shlibpath_var=LD_LIBRARY_PATH
joachim99@14 1408 case $host_vendor in
joachim99@14 1409 sni)
joachim99@14 1410 shlibpath_overrides_runpath=no
joachim99@14 1411 ;;
joachim99@14 1412 motorola)
joachim99@14 1413 need_lib_prefix=no
joachim99@14 1414 need_version=no
joachim99@14 1415 shlibpath_overrides_runpath=no
joachim99@14 1416 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
joachim99@14 1417 ;;
joachim99@14 1418 esac
joachim99@14 1419 ;;
joachim99@14 1420
joachim99@14 1421 sysv4*MP*)
joachim99@14 1422 if test -d /usr/nec ;then
joachim99@14 1423 version_type=linux
joachim99@14 1424 library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
joachim99@14 1425 soname_spec='$libname.so.$major'
joachim99@14 1426 shlibpath_var=LD_LIBRARY_PATH
joachim99@14 1427 fi
joachim99@14 1428 ;;
joachim99@14 1429
joachim99@14 1430 uts4*)
joachim99@14 1431 version_type=linux
joachim99@14 1432 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
joachim99@14 1433 soname_spec='${libname}${release}.so$major'
joachim99@14 1434 shlibpath_var=LD_LIBRARY_PATH
joachim99@14 1435 ;;
joachim99@14 1436
joachim99@14 1437 *)
joachim99@14 1438 dynamic_linker=no
joachim99@14 1439 ;;
joachim99@14 1440 esac
joachim99@14 1441 AC_MSG_RESULT([$dynamic_linker])
joachim99@14 1442 test "$dynamic_linker" = no && can_build_shared=no
joachim99@14 1443 ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
joachim99@14 1444
joachim99@14 1445
joachim99@14 1446 # _LT_AC_TAGCONFIG
joachim99@14 1447 # ----------------
joachim99@14 1448 AC_DEFUN([_LT_AC_TAGCONFIG],
joachim99@14 1449 [AC_ARG_WITH([tags],
joachim99@14 1450 [AC_HELP_STRING([--with-tags=TAGS],
joachim99@14 1451 [include additional configurations @<:@CXX,GCJ@:>@])],
joachim99@14 1452 [tagnames="$withval"],
joachim99@14 1453 [tagnames="CXX,GCJ"
joachim99@14 1454 case $host_os in
joachim99@14 1455 mingw*|cygwin*) tagnames="$tagnames,RC" ;;
joachim99@14 1456 esac])
joachim99@14 1457
joachim99@14 1458 if test -f "$ltmain" && test -n "$tagnames"; then
joachim99@14 1459 if test ! -f "${ofile}"; then
joachim99@14 1460 AC_MSG_WARN([output file `$ofile' does not exist])
joachim99@14 1461 fi
joachim99@14 1462
joachim99@14 1463 if test -z "$LTCC"; then
joachim99@14 1464 eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
joachim99@14 1465 if test -z "$LTCC"; then
joachim99@14 1466 AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
joachim99@14 1467 else
joachim99@14 1468 AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
joachim99@14 1469 fi
joachim99@14 1470 fi
joachim99@14 1471
joachim99@14 1472 # Extract list of available tagged configurations in $ofile.
joachim99@14 1473 # Note that this assumes the entire list is on one line.
joachim99@14 1474 available_tags=`grep "^available_tags=" "${ofile}" | sed -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
joachim99@14 1475
joachim99@14 1476 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
joachim99@14 1477 for tagname in $tagnames; do
joachim99@14 1478 IFS="$lt_save_ifs"
joachim99@14 1479 # Check whether tagname contains only valid characters
joachim99@14 1480 case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
joachim99@14 1481 "") ;;
joachim99@14 1482 *) AC_MSG_ERROR([invalid tag name: $tagname])
joachim99@14 1483 ;;
joachim99@14 1484 esac
joachim99@14 1485
joachim99@14 1486 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
joachim99@14 1487 then
joachim99@14 1488 AC_MSG_ERROR([tag name \"$tagname\" already exists])
joachim99@14 1489 fi
joachim99@14 1490
joachim99@14 1491 # Update the list of available tags.
joachim99@14 1492 if test -n "$tagname"; then
joachim99@14 1493 echo appending configuration tag \"$tagname\" to $ofile
joachim99@14 1494
joachim99@14 1495 case $tagname in
joachim99@14 1496 CXX)
joachim99@14 1497 AC_LIBTOOL_LANG_CXX_CONFIG
joachim99@14 1498 ;;
joachim99@14 1499
joachim99@14 1500 GCJ)
joachim99@14 1501 AC_LIBTOOL_LANG_GCJ_CONFIG
joachim99@14 1502 ;;
joachim99@14 1503
joachim99@14 1504 RC)
joachim99@14 1505 AC_LIBTOOL_LANG_RC_CONFIG
joachim99@14 1506 ;;
joachim99@14 1507
joachim99@14 1508 *)
joachim99@14 1509 AC_MSG_ERROR([Unsupported tag name: $tagname])
joachim99@14 1510 ;;
joachim99@14 1511 esac
joachim99@14 1512
joachim99@14 1513 # Append the new tag name to the list of available tags.
joachim99@14 1514 available_tags="$available_tags $tagname"
joachim99@14 1515 fi
joachim99@14 1516 done
joachim99@14 1517 IFS="$lt_save_ifs"
joachim99@14 1518
joachim99@14 1519 # Now substitute the updated list of available tags.
joachim99@14 1520 if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
joachim99@14 1521 mv "${ofile}T" "$ofile"
joachim99@14 1522 chmod +x "$ofile"
joachim99@14 1523 else
joachim99@14 1524 rm -f "${ofile}T"
joachim99@14 1525 AC_MSG_ERROR([unable to update list of available tagged configurations.])
joachim99@14 1526 fi
joachim99@14 1527 fi
joachim99@14 1528 ])# _LT_AC_TAGCONFIG
joachim99@14 1529
joachim99@14 1530
joachim99@14 1531 # AC_LIBTOOL_DLOPEN
joachim99@14 1532 # -----------------
joachim99@14 1533 # enable checks for dlopen support
joachim99@14 1534 AC_DEFUN([AC_LIBTOOL_DLOPEN],
joachim99@14 1535 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
joachim99@14 1536 ])# AC_LIBTOOL_DLOPEN
joachim99@14 1537
joachim99@14 1538
joachim99@14 1539 # AC_LIBTOOL_WIN32_DLL
joachim99@14 1540 # --------------------
joachim99@14 1541 # declare package support for building win32 dll's
joachim99@14 1542 AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
joachim99@14 1543 [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
joachim99@14 1544 ])# AC_LIBTOOL_WIN32_DLL
joachim99@14 1545
joachim99@14 1546
joachim99@14 1547 # AC_ENABLE_SHARED([DEFAULT])
joachim99@14 1548 # ---------------------------
joachim99@14 1549 # implement the --enable-shared flag
joachim99@14 1550 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
joachim99@2 1551 AC_DEFUN([AC_ENABLE_SHARED],
joachim99@2 1552 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
joachim99@14 1553 AC_ARG_ENABLE([shared],
joachim99@14 1554 [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
joachim99@14 1555 [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
joachim99@14 1556 [p=${PACKAGE-default}
joachim99@14 1557 case $enableval in
joachim99@14 1558 yes) enable_shared=yes ;;
joachim99@14 1559 no) enable_shared=no ;;
joachim99@14 1560 *)
joachim99@14 1561 enable_shared=no
joachim99@14 1562 # Look at the argument we got. We use all the common list separators.
joachim99@14 1563 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
joachim99@14 1564 for pkg in $enableval; do
joachim99@14 1565 IFS="$lt_save_ifs"
joachim99@14 1566 if test "X$pkg" = "X$p"; then
joachim99@14 1567 enable_shared=yes
joachim99@14 1568 fi
joachim99@14 1569 done
joachim99@14 1570 IFS="$lt_save_ifs"
joachim99@14 1571 ;;
joachim99@14 1572 esac],
joachim99@14 1573 [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
joachim99@14 1574 ])# AC_ENABLE_SHARED
joachim99@14 1575
joachim99@14 1576
joachim99@14 1577 # AC_DISABLE_SHARED
joachim99@14 1578 # -----------------
joachim99@14 1579 #- set the default shared flag to --disable-shared
joachim99@14 1580 AC_DEFUN([AC_DISABLE_SHARED],
joachim99@14 1581 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
joachim99@14 1582 AC_ENABLE_SHARED(no)
joachim99@14 1583 ])# AC_DISABLE_SHARED
joachim99@14 1584
joachim99@14 1585
joachim99@14 1586 # AC_ENABLE_STATIC([DEFAULT])
joachim99@14 1587 # ---------------------------
joachim99@14 1588 # implement the --enable-static flag
joachim99@14 1589 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
joachim99@2 1590 AC_DEFUN([AC_ENABLE_STATIC],
joachim99@2 1591 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
joachim99@14 1592 AC_ARG_ENABLE([static],
joachim99@14 1593 [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
joachim99@14 1594 [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
joachim99@14 1595 [p=${PACKAGE-default}
joachim99@14 1596 case $enableval in
joachim99@14 1597 yes) enable_static=yes ;;
joachim99@14 1598 no) enable_static=no ;;
joachim99@14 1599 *)
joachim99@14 1600 enable_static=no
joachim99@14 1601 # Look at the argument we got. We use all the common list separators.
joachim99@14 1602 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
joachim99@14 1603 for pkg in $enableval; do
joachim99@14 1604 IFS="$lt_save_ifs"
joachim99@14 1605 if test "X$pkg" = "X$p"; then
joachim99@14 1606 enable_static=yes
joachim99@14 1607 fi
joachim99@14 1608 done
joachim99@14 1609 IFS="$lt_save_ifs"
joachim99@14 1610 ;;
joachim99@14 1611 esac],
joachim99@14 1612 [enable_static=]AC_ENABLE_STATIC_DEFAULT)
joachim99@14 1613 ])# AC_ENABLE_STATIC
joachim99@14 1614
joachim99@14 1615
joachim99@14 1616 # AC_DISABLE_STATIC
joachim99@14 1617 # -----------------
joachim99@14 1618 # set the default static flag to --disable-static
joachim99@2 1619 AC_DEFUN([AC_DISABLE_STATIC],
joachim99@2 1620 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
joachim99@14 1621 AC_ENABLE_STATIC(no)
joachim99@14 1622 ])# AC_DISABLE_STATIC
joachim99@14 1623
joachim99@14 1624
joachim99@14 1625 # AC_ENABLE_FAST_INSTALL([DEFAULT])
joachim99@14 1626 # ---------------------------------
joachim99@14 1627 # implement the --enable-fast-install flag
joachim99@14 1628 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
joachim99@2 1629 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
joachim99@2 1630 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
joachim99@14 1631 AC_ARG_ENABLE([fast-install],
joachim99@14 1632 [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
joachim99@14 1633 [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
joachim99@14 1634 [p=${PACKAGE-default}
joachim99@14 1635 case $enableval in
joachim99@14 1636 yes) enable_fast_install=yes ;;
joachim99@14 1637 no) enable_fast_install=no ;;
joachim99@14 1638 *)
joachim99@14 1639 enable_fast_install=no
joachim99@14 1640 # Look at the argument we got. We use all the common list separators.
joachim99@14 1641 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
joachim99@14 1642 for pkg in $enableval; do
joachim99@14 1643 IFS="$lt_save_ifs"
joachim99@14 1644 if test "X$pkg" = "X$p"; then
joachim99@14 1645 enable_fast_install=yes
joachim99@14 1646 fi
joachim99@14 1647 done
joachim99@14 1648 IFS="$lt_save_ifs"
joachim99@14 1649 ;;
joachim99@14 1650 esac],
joachim99@14 1651 [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
joachim99@14 1652 ])# AC_ENABLE_FAST_INSTALL
joachim99@14 1653
joachim99@14 1654
joachim99@14 1655 # AC_DISABLE_FAST_INSTALL
joachim99@14 1656 # -----------------------
joachim99@14 1657 # set the default to --disable-fast-install
joachim99@2 1658 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
joachim99@2 1659 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
joachim99@14 1660 AC_ENABLE_FAST_INSTALL(no)
joachim99@14 1661 ])# AC_DISABLE_FAST_INSTALL
joachim99@14 1662
joachim99@14 1663
joachim99@14 1664 # AC_LIBTOOL_PICMODE([MODE])
joachim99@14 1665 # --------------------------
joachim99@14 1666 # implement the --with-pic flag
joachim99@14 1667 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
joachim99@2 1668 AC_DEFUN([AC_LIBTOOL_PICMODE],
joachim99@2 1669 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
joachim99@14 1670 pic_mode=ifelse($#,1,$1,default)
joachim99@14 1671 ])# AC_LIBTOOL_PICMODE
joachim99@14 1672
joachim99@14 1673
joachim99@14 1674 # AC_PATH_TOOL_PREFIX
joachim99@14 1675 # -------------------
joachim99@14 1676 # find a file program which can recognise shared library
joachim99@2 1677 AC_DEFUN([AC_PATH_TOOL_PREFIX],
joachim99@2 1678 [AC_MSG_CHECKING([for $1])
joachim99@2 1679 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
joachim99@2 1680 [case $MAGIC_CMD in
joachim99@14 1681 [[\\/*] | ?:[\\/]*])
joachim99@2 1682 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
joachim99@2 1683 ;;
joachim99@14 1684 *)
joachim99@14 1685 lt_save_MAGIC_CMD="$MAGIC_CMD"
joachim99@14 1686 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
joachim99@2 1687 dnl $ac_dummy forces splitting on constant user-supplied paths.
joachim99@2 1688 dnl POSIX.2 word splitting is done only on the output of word expansions,
joachim99@2 1689 dnl not every word. This closes a longstanding sh security hole.
joachim99@2 1690 ac_dummy="ifelse([$2], , $PATH, [$2])"
joachim99@2 1691 for ac_dir in $ac_dummy; do
joachim99@14 1692 IFS="$lt_save_ifs"
joachim99@2 1693 test -z "$ac_dir" && ac_dir=.
joachim99@2 1694 if test -f $ac_dir/$1; then
joachim99@2 1695 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
joachim99@2 1696 if test -n "$file_magic_test_file"; then
joachim99@2 1697 case $deplibs_check_method in
joachim99@2 1698 "file_magic "*)
joachim99@2 1699 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
joachim99@2 1700 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
joachim99@2 1701 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
joachim99@2 1702 egrep "$file_magic_regex" > /dev/null; then
joachim99@2 1703 :
joachim99@2 1704 else
joachim99@2 1705 cat <<EOF 1>&2
joachim99@2 1706
joachim99@2 1707 *** Warning: the command libtool uses to detect shared libraries,
joachim99@2 1708 *** $file_magic_cmd, produces output that libtool cannot recognize.
joachim99@2 1709 *** The result is that libtool may fail to recognize shared libraries
joachim99@2 1710 *** as such. This will affect the creation of libtool libraries that
joachim99@2 1711 *** depend on shared libraries, but programs linked with such libtool
joachim99@2 1712 *** libraries will work regardless of this problem. Nevertheless, you
joachim99@2 1713 *** may want to report the problem to your system manager and/or to
joachim99@2 1714 *** bug-libtool@gnu.org
joachim99@2 1715
joachim99@2 1716 EOF
joachim99@2 1717 fi ;;
joachim99@2 1718 esac
joachim99@2 1719 fi
joachim99@2 1720 break
joachim99@2 1721 fi
joachim99@2 1722 done
joachim99@14 1723 IFS="$lt_save_ifs"
joachim99@14 1724 MAGIC_CMD="$lt_save_MAGIC_CMD"
joachim99@2 1725 ;;
joachim99@2 1726 esac])
joachim99@2 1727 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
joachim99@2 1728 if test -n "$MAGIC_CMD"; then
joachim99@2 1729 AC_MSG_RESULT($MAGIC_CMD)
joachim99@2 1730 else
joachim99@2 1731 AC_MSG_RESULT(no)
joachim99@2 1732 fi
joachim99@14 1733 ])# AC_PATH_TOOL_PREFIX
joachim99@14 1734
joachim99@14 1735
joachim99@14 1736 # AC_PATH_MAGIC
joachim99@14 1737 # -------------
joachim99@14 1738 # find a file program which can recognise a shared library
joachim99@2 1739 AC_DEFUN([AC_PATH_MAGIC],
joachim99@14 1740 [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
joachim99@2 1741 if test -z "$lt_cv_path_MAGIC_CMD"; then
joachim99@2 1742 if test -n "$ac_tool_prefix"; then
joachim99@14 1743 AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
joachim99@2 1744 else
joachim99@2 1745 MAGIC_CMD=:
joachim99@2 1746 fi
joachim99@2 1747 fi
joachim99@14 1748 ])# AC_PATH_MAGIC
joachim99@14 1749
joachim99@14 1750
joachim99@14 1751 # AC_PROG_LD
joachim99@14 1752 # ----------
joachim99@14 1753 # find the path to the GNU or non-GNU linker
joachim99@2 1754 AC_DEFUN([AC_PROG_LD],
joachim99@14 1755 [AC_ARG_WITH([gnu-ld],
joachim99@14 1756 [AC_HELP_STRING([--with-gnu-ld],
joachim99@14 1757 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
joachim99@14 1758 [test "$withval" = no || with_gnu_ld=yes],
joachim99@14 1759 [with_gnu_ld=no])
joachim99@2 1760 AC_REQUIRE([AC_PROG_CC])dnl
joachim99@2 1761 AC_REQUIRE([AC_CANONICAL_HOST])dnl
joachim99@2 1762 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
joachim99@2 1763 ac_prog=ld
joachim99@2 1764 if test "$GCC" = yes; then
joachim99@2 1765 # Check if gcc -print-prog-name=ld gives a path.
joachim99@2 1766 AC_MSG_CHECKING([for ld used by GCC])
joachim99@2 1767 case $host in
joachim99@2 1768 *-*-mingw*)
joachim99@2 1769 # gcc leaves a trailing carriage return which upsets mingw
joachim99@2 1770 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
joachim99@2 1771 *)
joachim99@2 1772 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
joachim99@2 1773 esac
joachim99@2 1774 case $ac_prog in
joachim99@2 1775 # Accept absolute paths.
joachim99@14 1776 [[\\/]]* | ?:[[\\/]]*)
joachim99@14 1777 re_direlt='/[[^/]][[^/]]*/\.\./'
joachim99@2 1778 # Canonicalize the path of ld
joachim99@2 1779 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
joachim99@2 1780 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
joachim99@2 1781 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
joachim99@2 1782 done
joachim99@2 1783 test -z "$LD" && LD="$ac_prog"
joachim99@2 1784 ;;
joachim99@2 1785 "")
joachim99@2 1786 # If it fails, then pretend we aren't using GCC.
joachim99@2 1787 ac_prog=ld
joachim99@2 1788 ;;
joachim99@2 1789 *)
joachim99@2 1790 # If it is relative, then search for the first ld in PATH.
joachim99@2 1791 with_gnu_ld=unknown
joachim99@2 1792 ;;
joachim99@2 1793 esac
joachim99@2 1794 elif test "$with_gnu_ld" = yes; then
joachim99@2 1795 AC_MSG_CHECKING([for GNU ld])
joachim99@2 1796 else
joachim99@2 1797 AC_MSG_CHECKING([for non-GNU ld])
joachim99@2 1798 fi
joachim99@2 1799 AC_CACHE_VAL(lt_cv_path_LD,
joachim99@2 1800 [if test -z "$LD"; then
joachim99@14 1801 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
joachim99@2 1802 for ac_dir in $PATH; do
joachim99@14 1803 IFS="$lt_save_ifs"
joachim99@2 1804 test -z "$ac_dir" && ac_dir=.
joachim99@2 1805 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
joachim99@2 1806 lt_cv_path_LD="$ac_dir/$ac_prog"
joachim99@2 1807 # Check to see if the program is GNU ld. I'd rather use --version,
joachim99@2 1808 # but apparently some GNU ld's only accept -v.
joachim99@2 1809 # Break only if it was the GNU/non-GNU ld that we prefer.
joachim99@2 1810 if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
joachim99@2 1811 test "$with_gnu_ld" != no && break
joachim99@2 1812 else
joachim99@2 1813 test "$with_gnu_ld" != yes && break
joachim99@2 1814 fi
joachim99@2 1815 fi
joachim99@2 1816 done
joachim99@14 1817 IFS="$lt_save_ifs"
joachim99@2 1818 else
joachim99@2 1819 lt_cv_path_LD="$LD" # Let the user override the test with a path.
joachim99@2 1820 fi])
joachim99@2 1821 LD="$lt_cv_path_LD"
joachim99@2 1822 if test -n "$LD"; then
joachim99@2 1823 AC_MSG_RESULT($LD)
joachim99@2 1824 else
joachim99@2 1825 AC_MSG_RESULT(no)
joachim99@2 1826 fi
joachim99@2 1827 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
joachim99@2 1828 AC_PROG_LD_GNU
joachim99@14 1829 ])# AC_PROG_LD
joachim99@14 1830
joachim99@14 1831
joachim99@14 1832 # AC_PROG_LD_GNU
joachim99@14 1833 # --------------
joachim99@2 1834 AC_DEFUN([AC_PROG_LD_GNU],
joachim99@2 1835 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
joachim99@2 1836 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
joachim99@2 1837 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
joachim99@2 1838 lt_cv_prog_gnu_ld=yes
joachim99@2 1839 else
joachim99@2 1840 lt_cv_prog_gnu_ld=no
joachim99@2 1841 fi])
joachim99@2 1842 with_gnu_ld=$lt_cv_prog_gnu_ld
joachim99@14 1843 ])# AC_PROG_LD_GNU
joachim99@14 1844
joachim99@14 1845
joachim99@14 1846 # AC_PROG_LD_RELOAD_FLAG
joachim99@14 1847 # ----------------------
joachim99@14 1848 # find reload flag for linker
joachim99@2 1849 # -- PORTME Some linkers may need a different reload flag.
joachim99@2 1850 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
joachim99@14 1851 [AC_CACHE_CHECK([for $LD option to reload object files],
joachim99@14 1852 lt_cv_ld_reload_flag,
joachim99@14 1853 [lt_cv_ld_reload_flag='-r'])
joachim99@2 1854 reload_flag=$lt_cv_ld_reload_flag
joachim99@14 1855 case $reload_flag in
joachim99@14 1856 "" | " "*) ;;
joachim99@14 1857 *) reload_flag=" $reload_flag" ;;
joachim99@14 1858 esac
joachim99@14 1859 reload_cmds='$LD$reload_flag -o $output$reload_objs'
joachim99@14 1860 ])# AC_PROG_LD_RELOAD_FLAG
joachim99@14 1861
joachim99@14 1862
joachim99@14 1863 # AC_DEPLIBS_CHECK_METHOD
joachim99@14 1864 # -----------------------
joachim99@14 1865 # how to check for library dependencies
joachim99@2 1866 # -- PORTME fill in with the dynamic library characteristics
joachim99@2 1867 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
joachim99@2 1868 [AC_CACHE_CHECK([how to recognise dependant libraries],
joachim99@2 1869 lt_cv_deplibs_check_method,
joachim99@2 1870 [lt_cv_file_magic_cmd='$MAGIC_CMD'
joachim99@2 1871 lt_cv_file_magic_test_file=
joachim99@2 1872 lt_cv_deplibs_check_method='unknown'
joachim99@2 1873 # Need to set the preceding variable on all platforms that support
joachim99@2 1874 # interlibrary dependencies.
joachim99@2 1875 # 'none' -- dependencies not supported.
joachim99@2 1876 # `unknown' -- same as none, but documents that we really don't know.
joachim99@2 1877 # 'pass_all' -- all dependencies passed with no checks.
joachim99@2 1878 # 'test_compile' -- check by making test program.
joachim99@14 1879 # 'file_magic [[regex]]' -- check by looking for files in library path
joachim99@2 1880 # which responds to the $file_magic_cmd with a given egrep regex.
joachim99@2 1881 # If you have `file' or equivalent on your system and you're not sure
joachim99@2 1882 # whether `pass_all' will *always* work, you probably want this one.
joachim99@2 1883
joachim99@2 1884 case $host_os in
joachim99@14 1885 aix4* | aix5*)
joachim99@2 1886 lt_cv_deplibs_check_method=pass_all
joachim99@2 1887 ;;
joachim99@2 1888
joachim99@2 1889 beos*)
joachim99@2 1890 lt_cv_deplibs_check_method=pass_all
joachim99@2 1891 ;;
joachim99@2 1892
joachim99@2 1893 bsdi4*)
joachim99@14 1894 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
joachim99@2 1895 lt_cv_file_magic_cmd='/usr/bin/file -L'
joachim99@2 1896 lt_cv_file_magic_test_file=/shlib/libc.so
joachim99@2 1897 ;;
joachim99@2 1898
joachim99@14 1899 cygwin* | mingw* | pw32*)
joachim99@2 1900 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
joachim99@2 1901 lt_cv_file_magic_cmd='$OBJDUMP -f'
joachim99@2 1902 ;;
joachim99@2 1903
joachim99@2 1904 darwin* | rhapsody*)
joachim99@2 1905 lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
joachim99@2 1906 lt_cv_file_magic_cmd='/usr/bin/file -L'
joachim99@2 1907 case "$host_os" in
joachim99@14 1908 rhapsody* | darwin1.[[012]])
joachim99@14 1909 lt_cv_file_magic_test_file=`/System/Library/Frameworks/System.framework/System`
joachim99@2 1910 ;;
joachim99@2 1911 *) # Darwin 1.3 on
joachim99@2 1912 lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
joachim99@2 1913 ;;
joachim99@2 1914 esac
joachim99@2 1915 ;;
joachim99@2 1916
joachim99@14 1917 freebsd*)
joachim99@2 1918 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
joachim99@2 1919 case $host_cpu in
joachim99@2 1920 i*86 )
joachim99@2 1921 # Not sure whether the presence of OpenBSD here was a mistake.
joachim99@2 1922 # Let's accept both of them until this is cleared up.
joachim99@14 1923 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
joachim99@2 1924 lt_cv_file_magic_cmd=/usr/bin/file
joachim99@2 1925 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
joachim99@2 1926 ;;
joachim99@2 1927 esac
joachim99@2 1928 else
joachim99@2 1929 lt_cv_deplibs_check_method=pass_all
joachim99@2 1930 fi
joachim99@2 1931 ;;
joachim99@2 1932
joachim99@2 1933 gnu*)
joachim99@2 1934 lt_cv_deplibs_check_method=pass_all
joachim99@2 1935 ;;
joachim99@2 1936
joachim99@14 1937 hpux10.20* | hpux11*)
joachim99@2 1938 lt_cv_file_magic_cmd=/usr/bin/file
joachim99@14 1939 if test "$host_cpu" = ia64; then
joachim99@14 1940 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
joachim99@14 1941 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
joachim99@14 1942 else
joachim99@14 1943 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
joachim99@14 1944 lt_cv_file_magic_test_file=/usr/lib/libc.sl
joachim99@14 1945 fi
joachim99@2 1946 ;;
joachim99@2 1947
joachim99@14 1948 irix5* | irix6* | nonstopux*)
joachim99@2 1949 case $host_os in
joachim99@14 1950 irix5* | nonstopux*)
joachim99@2 1951 # this will be overridden with pass_all, but let us keep it just in case
joachim99@2 1952 lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
joachim99@2 1953 ;;
joachim99@2 1954 *)
joachim99@2 1955 case $LD in
joachim99@2 1956 *-32|*"-32 ") libmagic=32-bit;;
joachim99@2 1957 *-n32|*"-n32 ") libmagic=N32;;
joachim99@2 1958 *-64|*"-64 ") libmagic=64-bit;;
joachim99@2 1959 *) libmagic=never-match;;
joachim99@2 1960 esac
joachim99@2 1961 # this will be overridden with pass_all, but let us keep it just in case
joachim99@14 1962 lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
joachim99@2 1963 ;;
joachim99@2 1964 esac
joachim99@2 1965 lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
joachim99@2 1966 lt_cv_deplibs_check_method=pass_all
joachim99@2 1967 ;;
joachim99@2 1968
joachim99@2 1969 # This must be Linux ELF.
joachim99@14 1970 linux*)
joachim99@2 1971 case $host_cpu in
joachim99@14 1972 alpha* | hppa* | i*86 | ia64* | m68* | mips | mipsel | powerpc* | sparc* | s390* | sh* | x86_64* )
joachim99@14 1973 lt_cv_deplibs_check_method=pass_all ;;
joachim99@14 1974 # the debian people say, arm and glibc 2.3.1 works for them with pass_all
joachim99@14 1975 arm* )
joachim99@2 1976 lt_cv_deplibs_check_method=pass_all ;;
joachim99@2 1977 *)
joachim99@2 1978 # glibc up to 2.1.1 does not perform some relocations on ARM
joachim99@14 1979 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
joachim99@2 1980 esac
joachim99@2 1981 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
joachim99@2 1982 ;;
joachim99@2 1983
joachim99@2 1984 netbsd*)
joachim99@2 1985 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
joachim99@14 1986 lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$'
joachim99@2 1987 else
joachim99@14 1988 lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$'
joachim99@2 1989 fi
joachim99@2 1990 ;;
joachim99@2 1991
joachim99@14 1992 newos6*)
joachim99@14 1993 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
joachim99@2 1994 lt_cv_file_magic_cmd=/usr/bin/file
joachim99@2 1995 lt_cv_file_magic_test_file=/usr/lib/libnls.so
joachim99@2 1996 ;;
joachim99@2 1997
joachim99@14 1998 nto-qnx)
joachim99@14 1999 lt_cv_deplibs_check_method=unknown
joachim99@14 2000 ;;
joachim99@14 2001
joachim99@14 2002 openbsd*)
joachim99@14 2003 lt_cv_file_magic_cmd=/usr/bin/file
joachim99@14 2004 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
joachim99@14 2005 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
joachim99@14 2006 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
joachim99@14 2007 else
joachim99@14 2008 lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
joachim99@14 2009 fi
joachim99@14 2010 ;;
joachim99@14 2011
joachim99@2 2012 osf3* | osf4* | osf5*)
joachim99@2 2013 # this will be overridden with pass_all, but let us keep it just in case
joachim99@2 2014 lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
joachim99@2 2015 lt_cv_file_magic_test_file=/shlib/libc.so
joachim99@2 2016 lt_cv_deplibs_check_method=pass_all
joachim99@2 2017 ;;
joachim99@2 2018
joachim99@2 2019 sco3.2v5*)
joachim99@2 2020 lt_cv_deplibs_check_method=pass_all
joachim99@2 2021 ;;
joachim99@2 2022
joachim99@2 2023 solaris*)
joachim99@2 2024 lt_cv_deplibs_check_method=pass_all
joachim99@2 2025 lt_cv_file_magic_test_file=/lib/libc.so
joachim99@2 2026 ;;
joachim99@2 2027
joachim99@2 2028 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
joachim99@2 2029 case $host_vendor in
joachim99@14 2030 motorola)
joachim99@14 2031 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
joachim99@14 2032 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
joachim99@14 2033 ;;
joachim99@2 2034 ncr)
joachim99@2 2035 lt_cv_deplibs_check_method=pass_all
joachim99@2 2036 ;;
joachim99@14 2037 sequent)
joachim99@14 2038 lt_cv_file_magic_cmd='/bin/file'
joachim99@14 2039 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
joachim99@14 2040 ;;
joachim99@14 2041 sni)
joachim99@14 2042 lt_cv_file_magic_cmd='/bin/file'
joachim99@14 2043 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
joachim99@14 2044 lt_cv_file_magic_test_file=/lib/libc.so
joachim99@2 2045 ;;
joachim99@2 2046 esac
joachim99@2 2047 ;;
joachim99@14 2048
joachim99@14 2049 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
joachim99@14 2050 lt_cv_deplibs_check_method=pass_all
joachim99@14 2051 ;;
joachim99@2 2052 esac
joachim99@2 2053 ])
joachim99@2 2054 file_magic_cmd=$lt_cv_file_magic_cmd
joachim99@2 2055 deplibs_check_method=$lt_cv_deplibs_check_method
joachim99@14 2056 test -z "$deplibs_check_method" && deplibs_check_method=unknown
joachim99@14 2057 ])# AC_DEPLIBS_CHECK_METHOD
joachim99@14 2058
joachim99@14 2059
joachim99@14 2060 # AC_PROG_NM
joachim99@14 2061 # ----------
joachim99@14 2062 # find the path to a BSD-compatible name lister
joachim99@2 2063 AC_DEFUN([AC_PROG_NM],
joachim99@14 2064 [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
joachim99@2 2065 [if test -n "$NM"; then
joachim99@2 2066 # Let the user override the test.
joachim99@2 2067 lt_cv_path_NM="$NM"
joachim99@2 2068 else
joachim99@14 2069 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
joachim99@2 2070 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
joachim99@14 2071 IFS="$lt_save_ifs"
joachim99@2 2072 test -z "$ac_dir" && ac_dir=.
joachim99@14 2073 tmp_nm="$ac_dir/${ac_tool_prefix}nm"
joachim99@14 2074 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
joachim99@2 2075 # Check to see if the nm accepts a BSD-compat flag.
joachim99@2 2076 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
joachim99@2 2077 # nm: unknown option "B" ignored
joachim99@2 2078 # Tru64's nm complains that /dev/null is an invalid object file
joachim99@14 2079 if ("$tmp_nm" -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
joachim99@2 2080 lt_cv_path_NM="$tmp_nm -B"
joachim99@2 2081 break
joachim99@14 2082 elif ("$tmp_nm" -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
joachim99@2 2083 lt_cv_path_NM="$tmp_nm -p"
joachim99@2 2084 break
joachim99@2 2085 else
joachim99@2 2086 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
joachim99@2 2087 continue # so that we can try to find one that supports BSD flags
joachim99@2 2088 fi
joachim99@2 2089 fi
joachim99@2 2090 done
joachim99@14 2091 IFS="$lt_save_ifs"
joachim99@2 2092 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
joachim99@2 2093 fi])
joachim99@2 2094 NM="$lt_cv_path_NM"
joachim99@14 2095 ])# AC_PROG_NM
joachim99@14 2096
joachim99@14 2097
joachim99@14 2098 # AC_CHECK_LIBM
joachim99@14 2099 # -------------
joachim99@14 2100 # check for math library
joachim99@2 2101 AC_DEFUN([AC_CHECK_LIBM],
joachim99@2 2102 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
joachim99@2 2103 LIBM=
joachim99@2 2104 case $host in
joachim99@2 2105 *-*-beos* | *-*-cygwin* | *-*-pw32*)
joachim99@2 2106 # These system don't have libm
joachim99@2 2107 ;;
joachim99@2 2108 *-ncr-sysv4.3*)
joachim99@2 2109 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
joachim99@2 2110 AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
joachim99@2 2111 ;;
joachim99@2 2112 *)
joachim99@2 2113 AC_CHECK_LIB(m, main, LIBM="-lm")
joachim99@2 2114 ;;
joachim99@2 2115 esac
joachim99@14 2116 ])# AC_CHECK_LIBM
joachim99@14 2117
joachim99@14 2118
joachim99@14 2119 # AC_LIBLTDL_CONVENIENCE([DIRECTORY])
joachim99@14 2120 # -----------------------------------
joachim99@14 2121 # sets LIBLTDL to the link flags for the libltdl convenience library and
joachim99@14 2122 # LTDLINCL to the include flags for the libltdl header and adds
joachim99@14 2123 # --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL
joachim99@14 2124 # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
joachim99@14 2125 # DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will
joachim99@14 2126 # be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
joachim99@2 2127 # '${top_srcdir}/' (note the single quotes!). If your package is not
joachim99@2 2128 # flat and you're not using automake, define top_builddir and
joachim99@2 2129 # top_srcdir appropriately in the Makefiles.
joachim99@2 2130 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
joachim99@2 2131 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
joachim99@2 2132 case $enable_ltdl_convenience in
joachim99@2 2133 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
joachim99@2 2134 "") enable_ltdl_convenience=yes
joachim99@2 2135 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
joachim99@2 2136 esac
joachim99@2 2137 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
joachim99@14 2138 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
joachim99@14 2139 # For backwards non-gettext consistent compatibility...
joachim99@14 2140 INCLTDL="$LTDLINCL"
joachim99@14 2141 ])# AC_LIBLTDL_CONVENIENCE
joachim99@14 2142
joachim99@14 2143
joachim99@14 2144 # AC_LIBLTDL_INSTALLABLE([DIRECTORY])
joachim99@14 2145 # -----------------------------------
joachim99@14 2146 # sets LIBLTDL to the link flags for the libltdl installable library and
joachim99@14 2147 # LTDLINCL to the include flags for the libltdl header and adds
joachim99@14 2148 # --enable-ltdl-install to the configure arguments. Note that LIBLTDL
joachim99@14 2149 # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
joachim99@14 2150 # DIRECTORY is not provided and an installed libltdl is not found, it is
joachim99@14 2151 # assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/'
joachim99@14 2152 # and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
joachim99@14 2153 # quotes!). If your package is not flat and you're not using automake,
joachim99@14 2154 # define top_builddir and top_srcdir appropriately in the Makefiles.
joachim99@2 2155 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
joachim99@2 2156 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
joachim99@2 2157 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
joachim99@2 2158 AC_CHECK_LIB(ltdl, main,
joachim99@2 2159 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
joachim99@2 2160 [if test x"$enable_ltdl_install" = xno; then
joachim99@2 2161 AC_MSG_WARN([libltdl not installed, but installation disabled])
joachim99@2 2162 else
joachim99@2 2163 enable_ltdl_install=yes
joachim99@2 2164 fi
joachim99@2 2165 ])
joachim99@2 2166 if test x"$enable_ltdl_install" = x"yes"; then
joachim99@2 2167 ac_configure_args="$ac_configure_args --enable-ltdl-install"
joachim99@2 2168 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
joachim99@14 2169 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
joachim99@2 2170 else
joachim99@2 2171 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
joachim99@2 2172 LIBLTDL="-lltdl"
joachim99@14 2173 LTDLINCL=
joachim99@2 2174 fi
joachim99@14 2175 # For backwards non-gettext consistent compatibility...
joachim99@14 2176 INCLTDL="$LTDLINCL"
joachim99@14 2177 ])# AC_LIBLTDL_INSTALLABLE
joachim99@14 2178
joachim99@2 2179
joachim99@2 2180 # If this macro is not defined by Autoconf, define it here.
joachim99@2 2181 ifdef([AC_PROVIDE_IFELSE],
joachim99@2 2182 [],
joachim99@2 2183 [define([AC_PROVIDE_IFELSE],
joachim99@14 2184 [ifdef([AC_PROVIDE_$1],
joachim99@14 2185 [$2], [$3])])])
joachim99@14 2186
joachim99@14 2187
joachim99@14 2188 # AC_LIBTOOL_CXX
joachim99@14 2189 # --------------
joachim99@14 2190 # enable support for C++ libraries
joachim99@14 2191 AC_DEFUN([AC_LIBTOOL_CXX],
joachim99@14 2192 [AC_REQUIRE([_LT_AC_LANG_CXX])
joachim99@14 2193 ])# AC_LIBTOOL_CXX
joachim99@14 2194
joachim99@14 2195
joachim99@14 2196 # _LT_AC_LANG_CXX
joachim99@14 2197 # ---------------
joachim99@14 2198 AC_DEFUN([_LT_AC_LANG_CXX],
joachim99@2 2199 [AC_REQUIRE([AC_PROG_CXX])
joachim99@2 2200 AC_REQUIRE([AC_PROG_CXXCPP])
joachim99@14 2201 ])# _LT_AC_LANG_CXX
joachim99@14 2202
joachim99@14 2203
joachim99@14 2204 # AC_LIBTOOL_GCJ
joachim99@14 2205 # --------------
joachim99@14 2206 # enable support for GCJ libraries
joachim99@14 2207 AC_DEFUN([AC_LIBTOOL_GCJ],
joachim99@14 2208 [AC_REQUIRE([_LT_AC_LANG_GCJ])
joachim99@14 2209 ])# AC_LIBTOOL_GCJ
joachim99@14 2210
joachim99@14 2211
joachim99@14 2212 # _LT_AC_LANG_GCJ
joachim99@14 2213 # ---------------
joachim99@14 2214 AC_DEFUN([_LT_AC_LANG_GCJ],
joachim99@14 2215 [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
joachim99@2 2216 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
joachim99@2 2217 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
joachim99@2 2218 [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
joachim99@14 2219 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
joachim99@14 2220 [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
joachim99@14 2221 ])# _LT_AC_LANG_GCJ
joachim99@14 2222
joachim99@14 2223
joachim99@14 2224 # AC_LIBTOOL_RC
joachim99@14 2225 # --------------
joachim99@14 2226 # enable support for Windows resource files
joachim99@14 2227 AC_DEFUN([AC_LIBTOOL_RC],
joachim99@14 2228 [AC_REQUIRE([AC_PROG_RC])
joachim99@14 2229 ])# AC_LIBTOOL_RC
joachim99@14 2230
joachim99@14 2231
joachim99@14 2232 # AC_LIBTOOL_LANG_C_CONFIG
joachim99@14 2233 # ------------------------
joachim99@14 2234 # Ensure that the configuration vars for the C compiler are
joachim99@14 2235 # suitably defined. Those variables are subsequently used by
joachim99@14 2236 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
joachim99@14 2237 AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
joachim99@14 2238 AC_DEFUN([_LT_AC_LANG_C_CONFIG],
joachim99@14 2239 [lt_save_CC="$CC"
joachim99@14 2240 AC_LANG_PUSH(C)
joachim99@14 2241
joachim99@14 2242 # Source file extension for C test sources.
joachim99@14 2243 ac_ext=c
joachim99@14 2244
joachim99@14 2245 # Object file extension for compiled C test sources.
joachim99@14 2246 objext=o
joachim99@14 2247 _LT_AC_TAGVAR(objext, $1)=$objext
joachim99@14 2248
joachim99@14 2249 # Code to be used in simple compile tests
joachim99@14 2250 lt_simple_compile_test_code="int some_variable = 0;"
joachim99@14 2251
joachim99@14 2252 # Code to be used in simple link tests
joachim99@14 2253 lt_simple_link_test_code='main(){return(0);}'
joachim99@14 2254
joachim99@14 2255 _LT_AC_SYS_COMPILER
joachim99@14 2256
joachim99@14 2257 #
joachim99@14 2258 # Check for any special shared library compilation flags.
joachim99@14 2259 #
joachim99@14 2260 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
joachim99@14 2261 if test "$GCC" = no; then
joachim99@14 2262 case $host_os in
joachim99@14 2263 sco3.2v5*)
joachim99@14 2264 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
joachim99@14 2265 ;;
joachim99@14 2266 esac
joachim99@14 2267 fi
joachim99@14 2268 if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
joachim99@14 2269 AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
joachim99@14 2270 if echo "$old_CC $old_CFLAGS " | egrep -e "[[ ]]$]_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[[ ]]" >/dev/null; then :
joachim99@14 2271 else
joachim99@14 2272 AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
joachim99@14 2273 _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
joachim99@14 2274 fi
joachim99@14 2275 fi
joachim99@14 2276
joachim99@14 2277
joachim99@14 2278 #
joachim99@14 2279 # Check to make sure the static flag actually works.
joachim99@14 2280 #
joachim99@14 2281 AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
joachim99@14 2282 _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
joachim99@14 2283 $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
joachim99@14 2284 [],
joachim99@14 2285 [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
joachim99@14 2286
joachim99@14 2287
joachim99@14 2288 ## CAVEAT EMPTOR:
joachim99@14 2289 ## There is no encapsulation within the following macros, do not change
joachim99@14 2290 ## the running order or otherwise move them around unless you know exactly
joachim99@14 2291 ## what you are doing...
joachim99@14 2292 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
joachim99@14 2293 AC_LIBTOOL_PROG_COMPILER_PIC($1)
joachim99@14 2294 AC_LIBTOOL_PROG_CC_C_O($1)
joachim99@14 2295 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
joachim99@14 2296 AC_LIBTOOL_PROG_LD_SHLIBS($1)
joachim99@14 2297 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
joachim99@14 2298 AC_LIBTOOL_SYS_LIB_STRIP
joachim99@14 2299 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
joachim99@14 2300 AC_LIBTOOL_DLOPEN_SELF($1)
joachim99@14 2301
joachim99@14 2302 # Report which librarie types wil actually be built
joachim99@14 2303 AC_MSG_CHECKING([if libtool supports shared libraries])
joachim99@14 2304 AC_MSG_RESULT([$can_build_shared])
joachim99@14 2305
joachim99@14 2306 AC_MSG_CHECKING([whether to build shared libraries])
joachim99@14 2307 test "$can_build_shared" = "no" && enable_shared=no
joachim99@14 2308
joachim99@14 2309 # On AIX, shared libraries and static libraries use the same namespace, and
joachim99@14 2310 # are all built from PIC.
joachim99@14 2311 case "$host_os" in
joachim99@14 2312 aix3*)
joachim99@14 2313 test "$enable_shared" = yes && enable_static=no
joachim99@14 2314 if test -n "$RANLIB"; then
joachim99@14 2315 archive_cmds="$archive_cmds~\$RANLIB \$lib"
joachim99@14 2316 postinstall_cmds='$RANLIB $lib'
joachim99@14 2317 fi
joachim99@14 2318 ;;
joachim99@14 2319
joachim99@14 2320 aix4*)
joachim99@14 2321 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
joachim99@14 2322 test "$enable_shared" = yes && enable_static=no
joachim99@14 2323 fi
joachim99@14 2324 ;;
joachim99@14 2325 esac
joachim99@14 2326 AC_MSG_RESULT([$enable_shared])
joachim99@14 2327
joachim99@14 2328 AC_MSG_CHECKING([whether to build static libraries])
joachim99@14 2329 # Make sure either enable_shared or enable_static is yes.
joachim99@14 2330 test "$enable_shared" = yes || enable_static=yes
joachim99@14 2331 AC_MSG_RESULT([$enable_static])
joachim99@14 2332
joachim99@14 2333 AC_LIBTOOL_CONFIG($1)
joachim99@14 2334
joachim99@14 2335 AC_LANG_POP
joachim99@14 2336 CC="$lt_save_CC"
joachim99@14 2337 ])# AC_LIBTOOL_LANG_C_CONFIG
joachim99@14 2338
joachim99@14 2339
joachim99@14 2340 # AC_LIBTOOL_LANG_CXX_CONFIG
joachim99@14 2341 # --------------------------
joachim99@14 2342 # Ensure that the configuration vars for the C compiler are
joachim99@14 2343 # suitably defined. Those variables are subsequently used by
joachim99@14 2344 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
joachim99@14 2345 AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
joachim99@14 2346 AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
joachim99@14 2347 [AC_LANG_PUSH(C++)
joachim99@14 2348 AC_REQUIRE([AC_PROG_CXX])
joachim99@14 2349 AC_REQUIRE([AC_PROG_CXXCPP])
joachim99@14 2350
joachim99@14 2351 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
joachim99@14 2352 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
joachim99@14 2353 _LT_AC_TAGVAR(always_export_symbols, $1)=no
joachim99@14 2354 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
joachim99@14 2355 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
joachim99@14 2356 _LT_AC_TAGVAR(hardcode_direct, $1)=no
joachim99@14 2357 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
joachim99@14 2358 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
joachim99@14 2359 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
joachim99@14 2360 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
joachim99@14 2361 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
joachim99@14 2362 _LT_AC_TAGVAR(no_undefined_flag, $1)=
joachim99@14 2363 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
joachim99@14 2364
joachim99@14 2365 # Dependencies to place before and after the object being linked:
joachim99@14 2366 _LT_AC_TAGVAR(predep_objects, $1)=
joachim99@14 2367 _LT_AC_TAGVAR(postdep_objects, $1)=
joachim99@14 2368 _LT_AC_TAGVAR(predeps, $1)=
joachim99@14 2369 _LT_AC_TAGVAR(postdeps, $1)=
joachim99@14 2370 _LT_AC_TAGVAR(compiler_lib_search_path, $1)=
joachim99@14 2371
joachim99@14 2372 # Source file extension for C test sources.
joachim99@14 2373 ac_ext=cc
joachim99@14 2374
joachim99@14 2375 # Object file extension for compiled C test sources.
joachim99@14 2376 objext=o
joachim99@14 2377 _LT_AC_TAGVAR(objext, $1)=$objext
joachim99@14 2378
joachim99@14 2379 # Code to be used in simple compile tests
joachim99@14 2380 lt_simple_compile_test_code="int some_variable = 0;"
joachim99@14 2381
joachim99@14 2382 # Code to be used in simple link tests
joachim99@14 2383 lt_simple_link_test_code='int main(int char *[]) { return(0); }'
joachim99@14 2384
joachim99@14 2385 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
joachim99@14 2386 _LT_AC_SYS_COMPILER
joachim99@14 2387
joachim99@14 2388 # Allow CC to be a program name with arguments.
joachim99@2 2389 lt_save_CC="$CC"
joachim99@14 2390 CC=${CXX-"c++"}
joachim99@14 2391 set dummy $CC
joachim99@14 2392 compiler="[$]2"
joachim99@14 2393 _LT_AC_TAGVAR(compiler, $1)=$CC
joachim99@14 2394 cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
joachim99@14 2395
joachim99@14 2396 # We don't want -fno-exception wen compiling C++ code, so set the
joachim99@14 2397 # no_builtin_flag separately
joachim99@14 2398 if test "$GXX" = yes; then
joachim99@14 2399 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
joachim99@14 2400 else
joachim99@14 2401 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
joachim99@14 2402 fi
joachim99@14 2403
joachim99@14 2404 if test "$GXX" = yes; then
joachim99@14 2405 # Set up default GNU C++ configuration
joachim99@14 2406
joachim99@14 2407 # Check if GNU C++ uses GNU ld as the underlying linker, since the
joachim99@14 2408 # archiving commands below assume that GNU ld is being used.
joachim99@14 2409 if eval "`$CC -print-prog-name=ld` --version 2>&1" | \
joachim99@14 2410 egrep 'GNU ld' > /dev/null; then
joachim99@14 2411 with_gnu_ld=yes
joachim99@14 2412
joachim99@14 2413 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
joachim99@14 2414 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$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@14 2415
joachim99@14 2416 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
joachim99@14 2417 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
joachim99@14 2418
joachim99@14 2419 # If archive_cmds runs LD, not CC, wlarc should be empty
joachim99@14 2420 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
joachim99@14 2421 # investigate it a little bit more. (MM)
joachim99@14 2422 wlarc='${wl}'
joachim99@14 2423
joachim99@14 2424 # ancient GNU ld didn't support --whole-archive et. al.
joachim99@14 2425 if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
joachim99@14 2426 egrep 'no-whole-archive' > /dev/null; then
joachim99@14 2427 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
joachim99@14 2428 else
joachim99@14 2429 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
joachim99@14 2430 fi
joachim99@14 2431 else
joachim99@14 2432 with_gnu_ld=no
joachim99@14 2433 wlarc=
joachim99@14 2434
joachim99@14 2435 # A generic and very simple default shared library creation
joachim99@14 2436 # command for GNU C++ for the case where it uses the native
joachim99@14 2437 # linker, instead of GNU ld. If possible, this setting should
joachim99@14 2438 # overridden to take advantage of the native linker features on
joachim99@14 2439 # the platform it is being used on.
joachim99@14 2440 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
joachim99@14 2441 fi
joachim99@14 2442
joachim99@14 2443 # Commands to make compiler produce verbose output that lists
joachim99@14 2444 # what "hidden" libraries, object files and flags are used when
joachim99@14 2445 # linking a shared library.
joachim99@14 2446 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
joachim99@14 2447
joachim99@14 2448 else
joachim99@14 2449 GXX=no
joachim99@14 2450 with_gnu_ld=no
joachim99@14 2451 wlarc=
joachim99@14 2452 fi
joachim99@14 2453
joachim99@14 2454 # PORTME: fill in a description of your system's C++ link characteristics
joachim99@14 2455 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
joachim99@14 2456 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
joachim99@14 2457 case $host_os in
joachim99@14 2458 aix3*)
joachim99@14 2459 # FIXME: insert proper C++ library support
joachim99@14 2460 _LT_AC_TAGVAR(ld_shlibs, $1)=no
joachim99@14 2461 ;;
joachim99@14 2462 aix4* | aix5*)
joachim99@14 2463 if test "$host_cpu" = ia64; then
joachim99@14 2464 # On IA64, the linker does run time linking by default, so we don't
joachim99@14 2465 # have to do anything special.
joachim99@14 2466 aix_use_runtimelinking=no
joachim99@14 2467 exp_sym_flag='-Bexport'
joachim99@14 2468 no_entry_flag=""
joachim99@14 2469 else
joachim99@14 2470 # KDE requires run time linking. Make it the default.
joachim99@14 2471 aix_use_runtimelinking=yes
joachim99@14 2472 exp_sym_flag='-bexport'
joachim99@14 2473 no_entry_flag='-bnoentry'
joachim99@14 2474 fi
joachim99@14 2475
joachim99@14 2476 # When large executables or shared objects are built, AIX ld can
joachim99@14 2477 # have problems creating the table of contents. If linking a library
joachim99@14 2478 # or program results in "error TOC overflow" add -mminimal-toc to
joachim99@14 2479 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
joachim99@14 2480 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
joachim99@14 2481
joachim99@14 2482 _LT_AC_TAGVAR(archive_cmds, $1)=''
joachim99@14 2483 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
joachim99@14 2484 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
joachim99@14 2485 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
joachim99@14 2486
joachim99@14 2487 if test "$GXX" = yes; then
joachim99@14 2488 case $host_os in aix4.[012]|aix4.[012].*)
joachim99@14 2489 # We only want to do this on AIX 4.2 and lower, the check
joachim99@14 2490 # below for broken collect2 doesn't work under 4.3+
joachim99@14 2491 collect2name=`${CC} -print-prog-name=collect2`
joachim99@14 2492 if test -f "$collect2name" && \
joachim99@14 2493 strings "$collect2name" | grep resolve_lib_name >/dev/null
joachim99@14 2494 then
joachim99@14 2495 # We have reworked collect2
joachim99@14 2496 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
joachim99@14 2497 else
joachim99@14 2498 # We have old collect2
joachim99@14 2499 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
joachim99@14 2500 # It fails to find uninstalled libraries when the uninstalled
joachim99@14 2501 # path is not listed in the libpath. Setting hardcode_minus_L
joachim99@14 2502 # to unsupported forces relinking
joachim99@14 2503 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
joachim99@14 2504 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
joachim99@14 2505 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
joachim99@14 2506 fi
joachim99@14 2507 esac
joachim99@14 2508 shared_flag='-shared'
joachim99@14 2509 else
joachim99@14 2510 # not using gcc
joachim99@14 2511 if test "$host_cpu" = ia64; then
joachim99@14 2512 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
joachim99@14 2513 # chokes on -Wl,-G. The following line is correct:
joachim99@14 2514 shared_flag='-G'
joachim99@14 2515 else
joachim99@14 2516 if test "$aix_use_runtimelinking" = yes; then
joachim99@14 2517 shared_flag='-qmkshrobj ${wl}-G'
joachim99@14 2518 else
joachim99@14 2519 shared_flag='-qmkshrobj'
joachim99@14 2520 fi
joachim99@14 2521 fi
joachim99@14 2522 fi
joachim99@14 2523
joachim99@14 2524 # Let the compiler handle the export list.
joachim99@14 2525 _LT_AC_TAGVAR(always_export_symbols, $1)=no
joachim99@14 2526 if test "$aix_use_runtimelinking" = yes; then
joachim99@14 2527 # Warning - without using the other runtime loading flags (-brtl),
joachim99@14 2528 # -berok will link without error, but may produce a broken library.
joachim99@14 2529 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
joachim99@14 2530 # Determine the default libpath from the value encoded in an empty executable.
joachim99@14 2531 _LT_AC_SYS_LIBPATH_AIX
joachim99@14 2532 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
joachim99@14 2533
joachim99@14 2534 _LT_AC_TAGVAR(archive_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '" $shared_flag"
joachim99@14 2535 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
joachim99@14 2536 else
joachim99@14 2537 if test "$host_cpu" = ia64; then
joachim99@14 2538 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
joachim99@14 2539 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
joachim99@14 2540 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$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"
joachim99@14 2541 else
joachim99@14 2542 # Determine the default libpath from the value encoded in an empty executable.
joachim99@14 2543 _LT_AC_SYS_LIBPATH_AIX
joachim99@14 2544 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
joachim99@14 2545 # Warning - without using the other run time loading flags,
joachim99@14 2546 # -berok will link without error, but may produce a broken library.
joachim99@14 2547 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
joachim99@14 2548 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
joachim99@14 2549 # -bexpall does not export symbols beginning with underscore (_)
joachim99@14 2550 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
joachim99@14 2551 # Exported symbols can be pulled into shared objects from archives
joachim99@14 2552 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
joachim99@14 2553 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
joachim99@14 2554 # This is similar to how AIX traditionally builds it's shared libraries.
joachim99@14 2555 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$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@14 2556 fi
joachim99@14 2557 fi
joachim99@14 2558 ;;
joachim99@14 2559 chorus*)
joachim99@14 2560 case $cc_basename in
joachim99@14 2561 *)
joachim99@14 2562 # FIXME: insert proper C++ library support
joachim99@14 2563 _LT_AC_TAGVAR(ld_shlibs, $1)=no
joachim99@14 2564 ;;
joachim99@14 2565 esac
joachim99@14 2566 ;;
joachim99@14 2567 dgux*)
joachim99@14 2568 case $cc_basename in
joachim99@14 2569 ec++)
joachim99@14 2570 # FIXME: insert proper C++ library support
joachim99@14 2571 _LT_AC_TAGVAR(ld_shlibs, $1)=no
joachim99@14 2572 ;;
joachim99@14 2573 ghcx)
joachim99@14 2574 # Green Hills C++ Compiler
joachim99@14 2575 # FIXME: insert proper C++ library support
joachim99@14 2576 _LT_AC_TAGVAR(ld_shlibs, $1)=no
joachim99@14 2577 ;;
joachim99@14 2578 *)
joachim99@14 2579 # FIXME: insert proper C++ library support
joachim99@14 2580 _LT_AC_TAGVAR(ld_shlibs, $1)=no
joachim99@14 2581 ;;
joachim99@14 2582 esac
joachim99@14 2583 ;;
joachim99@14 2584 freebsd[12]*)
joachim99@14 2585 # C++ shared libraries reported to be fairly broken before switch to ELF
joachim99@14 2586 _LT_AC_TAGVAR(ld_shlibs, $1)=no
joachim99@14 2587 ;;
joachim99@14 2588 freebsd-elf*)
joachim99@14 2589 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
joachim99@14 2590 ;;
joachim99@14 2591 freebsd*)
joachim99@14 2592 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
joachim99@14 2593 # conventions
joachim99@14 2594 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
joachim99@14 2595 ;;
joachim99@14 2596 gnu*)
joachim99@14 2597 ;;
joachim99@14 2598 hpux*)
joachim99@14 2599 if test $with_gnu_ld = no; then
joachim99@14 2600 if test "$host_cpu" = ia64; then
joachim99@14 2601 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
joachim99@14 2602 else
joachim99@14 2603 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
joachim99@14 2604 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
joachim99@14 2605 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
joachim99@14 2606 fi
joachim99@14 2607 fi
joachim99@14 2608 if test "$host_cpu" = ia64; then
joachim99@14 2609 _LT_AC_TAGVAR(hardcode_direct, $1)=no
joachim99@14 2610 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
joachim99@14 2611 else
joachim99@14 2612 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
joachim99@14 2613 fi
joachim99@14 2614 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
joachim99@14 2615 # but as the default
joachim99@14 2616 # location of the library.
joachim99@14 2617
joachim99@14 2618 case $cc_basename in
joachim99@14 2619 CC)
joachim99@14 2620 # FIXME: insert proper C++ library support
joachim99@14 2621 _LT_AC_TAGVAR(ld_shlibs, $1)=no
joachim99@14 2622 ;;
joachim99@14 2623 aCC)
joachim99@14 2624 case $host_os in
joachim99@14 2625 hpux9*)
joachim99@14 2626 _LT_AC_TAGVAR(archive_cmds, $1)='$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@14 2627 ;;
joachim99@14 2628 *)
joachim99@14 2629 if test "$host_cpu" = ia64; then
joachim99@14 2630 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
joachim99@14 2631 else
joachim99@14 2632 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
joachim99@14 2633 fi
joachim99@14 2634 ;;
joachim99@14 2635 esac
joachim99@14 2636 # Commands to make compiler produce verbose output that lists
joachim99@14 2637 # what "hidden" libraries, object files and flags are used when
joachim99@14 2638 # linking a shared library.
joachim99@14 2639 #
joachim99@14 2640 # There doesn't appear to be a way to prevent this compiler from
joachim99@14 2641 # explicitly linking system object files so we need to strip them
joachim99@14 2642 # from the output so that they don't get included in the library
joachim99@14 2643 # dependencies.
joachim99@14 2644 output_verbose_link_cmd='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@14 2645 ;;
joachim99@14 2646 *)
joachim99@14 2647 if test "$GXX" = yes; then
joachim99@14 2648 if test $with_gnu_ld = no; then
joachim99@14 2649 case $host_os in
joachim99@14 2650 hpux9*)
joachim99@14 2651 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -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@14 2652 ;;
joachim99@14 2653 *)
joachim99@14 2654 if test "$host_cpu" = ia64; then
joachim99@14 2655 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
joachim99@14 2656 else
joachim99@14 2657 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
joachim99@14 2658 fi
joachim99@14 2659 ;;
joachim99@14 2660 esac
joachim99@14 2661 fi
joachim99@14 2662 else
joachim99@14 2663 # FIXME: insert proper C++ library support
joachim99@14 2664 _LT_AC_TAGVAR(ld_shlibs, $1)=no
joachim99@14 2665 fi
joachim99@14 2666 ;;
joachim99@14 2667 esac
joachim99@14 2668 ;;
joachim99@14 2669 irix5* | irix6*)
joachim99@14 2670 case $cc_basename in
joachim99@14 2671 CC)
joachim99@14 2672 # SGI C++
joachim99@14 2673 _LT_AC_TAGVAR(archive_cmds, $1)='$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@14 2674
joachim99@14 2675 # Archives containing C++ object files must be created using
joachim99@14 2676 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
joachim99@14 2677 # necessary to make sure instantiated templates are included
joachim99@14 2678 # in the archive.
joachim99@14 2679 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
joachim99@14 2680 ;;
joachim99@14 2681 *)
joachim99@14 2682 if test "$GXX" = yes; then
joachim99@14 2683 if test "$with_gnu_ld" = no; then
joachim99@14 2684 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $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@14 2685 else
joachim99@14 2686 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -o $lib'
joachim99@14 2687 fi
joachim99@14 2688 fi
joachim99@14 2689 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
joachim99@14 2690 ;;
joachim99@14 2691 esac
joachim99@14 2692 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
joachim99@14 2693 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
joachim99@14 2694 ;;
joachim99@14 2695 linux*)
joachim99@14 2696 case $cc_basename in
joachim99@14 2697 KCC)
joachim99@14 2698 # Kuck and Associates, Inc. (KAI) C++ Compiler
joachim99@14 2699
joachim99@14 2700 # KCC will only create a shared library if the output file
joachim99@14 2701 # ends with ".so" (or ".sl" for HP-UX), so rename the library
joachim99@14 2702 # to its proper name (with version) after linking.
joachim99@14 2703 _LT_AC_TAGVAR(archive_cmds, $1)='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@14 2704 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
joachim99@14 2705
joachim99@14 2706 # Commands to make compiler produce verbose output that lists
joachim99@14 2707 # what "hidden" libraries, object files and flags are used when
joachim99@14 2708 # linking a shared library.
joachim99@14 2709 #
joachim99@14 2710 # There doesn't appear to be a way to prevent this compiler from
joachim99@14 2711 # explicitly linking system object files so we need to strip them
joachim99@14 2712 # from the output so that they don't get included in the library
joachim99@14 2713 # dependencies.
joachim99@14 2714 output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest.so 2>&1 | egrep "ld"`; rm -f libconftest.so; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
joachim99@14 2715
joachim99@14 2716 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
joachim99@14 2717 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
joachim99@14 2718
joachim99@14 2719 # Archives containing C++ object files must be created using
joachim99@14 2720 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
joachim99@14 2721 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
joachim99@14 2722 ;;
joachim99@14 2723 icpc)
joachim99@14 2724 # Intel C++
joachim99@14 2725 with_gnu_ld=yes
joachim99@14 2726 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
joachim99@14 2727 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
joachim99@14 2728 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
joachim99@14 2729 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
joachim99@14 2730 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
joachim99@14 2731 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
joachim99@14 2732 ;;
joachim99@14 2733 cxx)
joachim99@14 2734 # Compaq C++
joachim99@14 2735 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
joachim99@14 2736 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
joachim99@14 2737
joachim99@14 2738 runpath_var=LD_RUN_PATH
joachim99@14 2739 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
joachim99@14 2740 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
joachim99@14 2741
joachim99@14 2742 # Commands to make compiler produce verbose output that lists
joachim99@14 2743 # what "hidden" libraries, object files and flags are used when
joachim99@14 2744 # linking a shared library.
joachim99@14 2745 #
joachim99@14 2746 # There doesn't appear to be a way to prevent this compiler from
joachim99@14 2747 # explicitly linking system object files so we need to strip them
joachim99@14 2748 # from the output so that they don't get included in the library
joachim99@14 2749 # dependencies.
joachim99@14 2750 output_verbose_link_cmd='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@14 2751 ;;
joachim99@14 2752 esac
joachim99@14 2753 ;;
joachim99@14 2754 lynxos*)
joachim99@14 2755 # FIXME: insert proper C++ library support
joachim99@14 2756 _LT_AC_TAGVAR(ld_shlibs, $1)=no
joachim99@14 2757 ;;
joachim99@14 2758 m88k*)
joachim99@14 2759 # FIXME: insert proper C++ library support
joachim99@14 2760 _LT_AC_TAGVAR(ld_shlibs, $1)=no
joachim99@14 2761 ;;
joachim99@14 2762 mvs*)
joachim99@14 2763 case $cc_basename in
joachim99@14 2764 cxx)
joachim99@14 2765 # FIXME: insert proper C++ library support
joachim99@14 2766 _LT_AC_TAGVAR(ld_shlibs, $1)=no
joachim99@14 2767 ;;
joachim99@14 2768 *)
joachim99@14 2769 # FIXME: insert proper C++ library support
joachim99@14 2770 _LT_AC_TAGVAR(ld_shlibs, $1)=no
joachim99@14 2771 ;;
joachim99@14 2772 esac
joachim99@14 2773 ;;
joachim99@14 2774 netbsd*)
joachim99@14 2775 # NetBSD uses g++ - do we need to do anything?
joachim99@14 2776 ;;
joachim99@14 2777 osf3*)
joachim99@14 2778 case $cc_basename in
joachim99@14 2779 KCC)
joachim99@14 2780 # Kuck and Associates, Inc. (KAI) C++ Compiler
joachim99@14 2781
joachim99@14 2782 # KCC will only create a shared library if the output file
joachim99@14 2783 # ends with ".so" (or ".sl" for HP-UX), so rename the library
joachim99@14 2784 # to its proper name (with version) after linking.
joachim99@14 2785 _LT_AC_TAGVAR(archive_cmds, $1)='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@14 2786
joachim99@14 2787 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
joachim99@14 2788 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
joachim99@14 2789
joachim99@14 2790 # Archives containing C++ object files must be created using
joachim99@14 2791 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
joachim99@14 2792 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
joachim99@14 2793
joachim99@14 2794 ;;
joachim99@14 2795 RCC)
joachim99@14 2796 # Rational C++ 2.4.1
joachim99@14 2797 # FIXME: insert proper C++ library support
joachim99@14 2798 _LT_AC_TAGVAR(ld_shlibs, $1)=no
joachim99@14 2799 ;;
joachim99@14 2800 cxx)
joachim99@14 2801 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
joachim99@14 2802 _LT_AC_TAGVAR(archive_cmds, $1)='$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@14 2803
joachim99@14 2804 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
joachim99@14 2805 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
joachim99@14 2806
joachim99@14 2807 # Commands to make compiler produce verbose output that lists
joachim99@14 2808 # what "hidden" libraries, object files and flags are used when
joachim99@14 2809 # linking a shared library.
joachim99@14 2810 #
joachim99@14 2811 # There doesn't appear to be a way to prevent this compiler from
joachim99@14 2812 # explicitly linking system object files so we need to strip them
joachim99@14 2813 # from the output so that they don't get included in the library
joachim99@14 2814 # dependencies.
joachim99@14 2815 output_verbose_link_cmd='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@14 2816 ;;
joachim99@14 2817 *)
joachim99@14 2818 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
joachim99@14 2819 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
joachim99@14 2820 _LT_AC_TAGVAR(archive_cmds, $1)='$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@14 2821
joachim99@14 2822 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
joachim99@14 2823 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
joachim99@14 2824
joachim99@14 2825 # Commands to make compiler produce verbose output that lists
joachim99@14 2826 # what "hidden" libraries, object files and flags are used when
joachim99@14 2827 # linking a shared library.
joachim99@14 2828 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
joachim99@14 2829
joachim99@14 2830 else
joachim99@14 2831 # FIXME: insert proper C++ library support
joachim99@14 2832 _LT_AC_TAGVAR(ld_shlibs, $1)=no
joachim99@14 2833 fi
joachim99@14 2834 ;;
joachim99@14 2835 esac
joachim99@14 2836 ;;
joachim99@14 2837 osf4* | osf5*)
joachim99@14 2838 case $cc_basename in
joachim99@14 2839 KCC)
joachim99@14 2840 # Kuck and Associates, Inc. (KAI) C++ Compiler
joachim99@14 2841
joachim99@14 2842 # KCC will only create a shared library if the output file
joachim99@14 2843 # ends with ".so" (or ".sl" for HP-UX), so rename the library
joachim99@14 2844 # to its proper name (with version) after linking.
joachim99@14 2845 _LT_AC_TAGVAR(archive_cmds, $1)='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@14 2846
joachim99@14 2847 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
joachim99@14 2848 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
joachim99@14 2849
joachim99@14 2850 # Archives containing C++ object files must be created using
joachim99@14 2851 # the KAI C++ compiler.
joachim99@14 2852 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
joachim99@14 2853 ;;
joachim99@14 2854 RCC)
joachim99@14 2855 # Rational C++ 2.4.1
joachim99@14 2856 # FIXME: insert proper C++ library support
joachim99@14 2857 _LT_AC_TAGVAR(ld_shlibs, $1)=no
joachim99@14 2858 ;;
joachim99@14 2859 cxx)
joachim99@14 2860 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
joachim99@14 2861 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
joachim99@14 2862 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done~
joachim99@14 2863 echo "-hidden">> $lib.exp~
joachim99@14 2864 $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~
joachim99@14 2865 $rm $lib.exp'
joachim99@14 2866
joachim99@14 2867 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
joachim99@14 2868 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
joachim99@14 2869
joachim99@14 2870 # Commands to make compiler produce verbose output that lists
joachim99@14 2871 # what "hidden" libraries, object files and flags are used when
joachim99@14 2872 # linking a shared library.
joachim99@14 2873 #
joachim99@14 2874 # There doesn't appear to be a way to prevent this compiler from
joachim99@14 2875 # explicitly linking system object files so we need to strip them
joachim99@14 2876 # from the output so that they don't get included in the library
joachim99@14 2877 # dependencies.
joachim99@14 2878 output_verbose_link_cmd='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@14 2879 ;;
joachim99@14 2880 *)
joachim99@14 2881 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
joachim99@14 2882 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
joachim99@14 2883 _LT_AC_TAGVAR(archive_cmds, $1)='$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@14 2884
joachim99@14 2885 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
joachim99@14 2886 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
joachim99@14 2887
joachim99@14 2888 # Commands to make compiler produce verbose output that lists
joachim99@14 2889 # what "hidden" libraries, object files and flags are used when
joachim99@14 2890 # linking a shared library.
joachim99@14 2891 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
joachim99@14 2892
joachim99@14 2893 else
joachim99@14 2894 # FIXME: insert proper C++ library support
joachim99@14 2895 _LT_AC_TAGVAR(ld_shlibs, $1)=no
joachim99@14 2896 fi
joachim99@14 2897 ;;
joachim99@14 2898 esac
joachim99@14 2899 ;;
joachim99@14 2900 psos*)
joachim99@14 2901 # FIXME: insert proper C++ library support
joachim99@14 2902 _LT_AC_TAGVAR(ld_shlibs, $1)=no
joachim99@14 2903 ;;
joachim99@14 2904 sco*)
joachim99@14 2905 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
joachim99@14 2906 case $cc_basename in
joachim99@14 2907 CC)
joachim99@14 2908 # FIXME: insert proper C++ library support
joachim99@14 2909 _LT_AC_TAGVAR(ld_shlibs, $1)=no
joachim99@14 2910 ;;
joachim99@14 2911 *)
joachim99@14 2912 # FIXME: insert proper C++ library support
joachim99@14 2913 _LT_AC_TAGVAR(ld_shlibs, $1)=no
joachim99@14 2914 ;;
joachim99@14 2915 esac
joachim99@14 2916 ;;
joachim99@14 2917 sunos4*)
joachim99@14 2918 case $cc_basename in
joachim99@14 2919 CC)
joachim99@14 2920 # Sun C++ 4.x
joachim99@14 2921 # FIXME: insert proper C++ library support
joachim99@14 2922 _LT_AC_TAGVAR(ld_shlibs, $1)=no
joachim99@14 2923 ;;
joachim99@14 2924 lcc)
joachim99@14 2925 # Lucid
joachim99@14 2926 # FIXME: insert proper C++ library support
joachim99@14 2927 _LT_AC_TAGVAR(ld_shlibs, $1)=no
joachim99@14 2928 ;;
joachim99@14 2929 *)
joachim99@14 2930 # FIXME: insert proper C++ library support
joachim99@14 2931 _LT_AC_TAGVAR(ld_shlibs, $1)=no
joachim99@14 2932 ;;
joachim99@14 2933 esac
joachim99@14 2934 ;;
joachim99@14 2935 solaris*)
joachim99@14 2936 case $cc_basename in
joachim99@14 2937 CC)
joachim99@14 2938 # Sun C++ 4.2, 5.x and Centerline C++
joachim99@14 2939 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
joachim99@14 2940 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
joachim99@14 2941 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
joachim99@14 2942 $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@14 2943
joachim99@14 2944 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
joachim99@14 2945 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
joachim99@14 2946 case $host_os in
joachim99@14 2947 solaris2.[0-5] | solaris2.[0-5].*) ;;
joachim99@14 2948 *)
joachim99@14 2949 # The C++ compiler is used as linker so we must use $wl
joachim99@14 2950 # flag to pass the commands to the underlying system
joachim99@14 2951 # linker.
joachim99@14 2952 # Supported since Solaris 2.6 (maybe 2.5.1?)
joachim99@14 2953 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
joachim99@14 2954 ;;
joachim99@14 2955 esac
joachim99@14 2956 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
joachim99@14 2957
joachim99@14 2958 # Commands to make compiler produce verbose output that lists
joachim99@14 2959 # what "hidden" libraries, object files and flags are used when
joachim99@14 2960 # linking a shared library.
joachim99@14 2961 #
joachim99@14 2962 # There doesn't appear to be a way to prevent this compiler from
joachim99@14 2963 # explicitly linking system object files so we need to strip them
joachim99@14 2964 # from the output so that they don't get included in the library
joachim99@14 2965 # dependencies.
joachim99@14 2966 output_verbose_link_cmd='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@14 2967
joachim99@14 2968 # Archives containing C++ object files must be created using
joachim99@14 2969 # "CC -xar", where "CC" is the Sun C++ compiler. This is
joachim99@14 2970 # necessary to make sure instantiated templates are included
joachim99@14 2971 # in the archive.
joachim99@14 2972 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
joachim99@14 2973 ;;
joachim99@14 2974 gcx)
joachim99@14 2975 # Green Hills C++ Compiler
joachim99@14 2976 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
joachim99@14 2977
joachim99@14 2978 # The C++ compiler must be used to create the archive.
joachim99@14 2979 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
joachim99@14 2980 ;;
joachim99@14 2981 *)
joachim99@14 2982 # GNU C++ compiler with Solaris linker
joachim99@14 2983 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
joachim99@14 2984 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
joachim99@14 2985 if $CC --version | egrep -v '^2\.7' > /dev/null; then
joachim99@14 2986 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib'
joachim99@14 2987 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
joachim99@14 2988 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp'
joachim99@14 2989
joachim99@14 2990 # Commands to make compiler produce verbose output that lists
joachim99@14 2991 # what "hidden" libraries, object files and flags are used when
joachim99@14 2992 # linking a shared library.
joachim99@14 2993 output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
joachim99@14 2994 else
joachim99@14 2995 # g++ 2.7 appears to require `-G' NOT `-shared' on this
joachim99@14 2996 # platform.
joachim99@14 2997 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib'
joachim99@14 2998 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
joachim99@14 2999 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp'
joachim99@14 3000
joachim99@14 3001 # Commands to make compiler produce verbose output that lists
joachim99@14 3002 # what "hidden" libraries, object files and flags are used when
joachim99@14 3003 # linking a shared library.
joachim99@14 3004 output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
joachim99@14 3005 fi
joachim99@14 3006
joachim99@14 3007 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
joachim99@14 3008 fi
joachim99@14 3009 ;;
joachim99@14 3010 esac
joachim99@14 3011 ;;
joachim99@14 3012 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
joachim99@14 3013 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
joachim99@14 3014 ;;
joachim99@14 3015 tandem*)
joachim99@14 3016 case $cc_basename in
joachim99@14 3017 NCC)
joachim99@14 3018 # NonStop-UX NCC 3.20
joachim99@14 3019 # FIXME: insert proper C++ library support
joachim99@14 3020 _LT_AC_TAGVAR(ld_shlibs, $1)=no
joachim99@14 3021 ;;
joachim99@14 3022 *)
joachim99@14 3023 # FIXME: insert proper C++ library support
joachim99@14 3024 _LT_AC_TAGVAR(ld_shlibs, $1)=no
joachim99@14 3025 ;;
joachim99@14 3026 esac
joachim99@14 3027 ;;
joachim99@14 3028 vxworks*)
joachim99@14 3029 # FIXME: insert proper C++ library support
joachim99@14 3030 _LT_AC_TAGVAR(ld_shlibs, $1)=no
joachim99@14 3031 ;;
joachim99@14 3032 *)
joachim99@14 3033 # FIXME: insert proper C++ library support
joachim99@14 3034 _LT_AC_TAGVAR(ld_shlibs, $1)=no
joachim99@14 3035 ;;
joachim99@14 3036 esac
joachim99@14 3037 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
joachim99@14 3038 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
joachim99@14 3039
joachim99@14 3040 # Figure out "hidden" C++ library dependencies from verbose
joachim99@14 3041 # compiler output whening linking a shared library.
joachim99@14 3042 cat > conftest.$ac_ext <<EOF
joachim99@14 3043 class Foo
joachim99@14 3044 {
joachim99@14 3045 public:
joachim99@14 3046 Foo (void) { a = 0; }
joachim99@14 3047 private:
joachim99@14 3048 int a;
joachim99@14 3049 };
joachim99@14 3050 EOF
joachim99@14 3051
joachim99@14 3052
joachim99@14 3053 if AC_TRY_EVAL(ac_compile); then
joachim99@14 3054 # Parse the compiler output and extract the necessary
joachim99@14 3055 # objects, libraries and library flags.
joachim99@14 3056
joachim99@14 3057 # Sentinel used to keep track of whether or not we are before
joachim99@14 3058 # the conftest object file.
joachim99@14 3059 pre_test_object_deps_done=no
joachim99@14 3060
joachim99@14 3061 # The `*' in the case matches for architectures that use `case' in
joachim99@14 3062 # $output_verbose_cmd can trigger glob expansion during the loop
joachim99@14 3063 # eval without this substitution.
joachim99@14 3064 output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
joachim99@14 3065
joachim99@14 3066 for p in `eval $output_verbose_link_cmd`; do
joachim99@14 3067 case $p in
joachim99@14 3068
joachim99@14 3069 -L* | -R* | -l*)
joachim99@14 3070 # Some compilers place space between "-{L,R}" and the path.
joachim99@14 3071 # Remove the space.
joachim99@14 3072 if test $p = "-L" \
joachim99@14 3073 || test $p = "-R"; then
joachim99@14 3074 prev=$p
joachim99@14 3075 continue
joachim99@14 3076 else
joachim99@14 3077 prev=
joachim99@14 3078 fi
joachim99@14 3079
joachim99@14 3080 if test "$pre_test_object_deps_done" = no; then
joachim99@14 3081 case $p in
joachim99@14 3082 -L* | -R*)
joachim99@14 3083 # Internal compiler library paths should come after those
joachim99@14 3084 # provided the user. The postdeps already come after the
joachim99@14 3085 # user supplied libs so there is no need to process them.
joachim99@14 3086 if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
joachim99@14 3087 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
joachim99@14 3088 else
joachim99@14 3089 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
joachim99@14 3090 fi
joachim99@14 3091 ;;
joachim99@14 3092 # The "-l" case would never come before the object being
joachim99@14 3093 # linked, so don't bother handling this case.
joachim99@14 3094 esac
joachim99@14 3095 else
joachim99@14 3096 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
joachim99@14 3097 _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
joachim99@14 3098 else
joachim99@14 3099 _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
joachim99@14 3100 fi
joachim99@14 3101 fi
joachim99@14 3102 ;;
joachim99@14 3103
joachim99@14 3104 *.$objext|*.$libext)
joachim99@14 3105 # This assumes that the test object file only shows up
joachim99@14 3106 # once in the compiler output.
joachim99@14 3107 if test "$p" = "conftest.$objext"; then
joachim99@14 3108 pre_test_object_deps_done=yes
joachim99@14 3109 continue
joachim99@14 3110 fi
joachim99@14 3111
joachim99@14 3112 if test "$pre_test_object_deps_done" = no; then
joachim99@14 3113 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
joachim99@14 3114 _LT_AC_TAGVAR(predep_objects, $1)="$p"
joachim99@14 3115 else
joachim99@14 3116 _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
joachim99@14 3117 fi
joachim99@14 3118 else
joachim99@14 3119 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
joachim99@14 3120 _LT_AC_TAGVAR(postdep_objects, $1)="$p"
joachim99@14 3121 else
joachim99@14 3122 _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
joachim99@14 3123 fi
joachim99@14 3124 fi
joachim99@14 3125 ;;
joachim99@14 3126
joachim99@14 3127 *) ;; # Ignore the rest.
joachim99@14 3128
joachim99@14 3129 esac
joachim99@14 3130 done
joachim99@14 3131
joachim99@14 3132 # Clean up.
joachim99@14 3133 rm -f a.out
joachim99@14 3134 else
joachim99@14 3135 echo "libtool.m4: error: problem compiling C++ test program"
joachim99@14 3136 fi
joachim99@14 3137
joachim99@14 3138 $rm -f confest.$objext
joachim99@14 3139
joachim99@14 3140 case " $_LT_AC_TAGVAR(postdeps, $1) " in
joachim99@14 3141 *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
joachim99@14 3142 *) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes ;;
joachim99@14 3143 esac
joachim99@14 3144
joachim99@14 3145 _LT_AC_TAGVAR(GCC, $1)="$GXX"
joachim99@14 3146 _LT_AC_TAGVAR(LD, $1)="$LD"
joachim99@14 3147
joachim99@14 3148 ## CAVEAT EMPTOR:
joachim99@14 3149 ## There is no encapsulation within the following macros, do not change
joachim99@14 3150 ## the running order or otherwise move them around unless you know exactly
joachim99@14 3151 ## what you are doing...
joachim99@14 3152 AC_LIBTOOL_PROG_COMPILER_PIC($1)
joachim99@14 3153 AC_LIBTOOL_PROG_CC_C_O($1)
joachim99@14 3154 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
joachim99@14 3155 AC_LIBTOOL_PROG_LD_SHLIBS($1)
joachim99@14 3156 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
joachim99@14 3157 AC_LIBTOOL_SYS_LIB_STRIP
joachim99@14 3158 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
joachim99@14 3159 AC_LIBTOOL_DLOPEN_SELF($1)
joachim99@14 3160
joachim99@14 3161 AC_LIBTOOL_CONFIG($1)
joachim99@14 3162
joachim99@14 3163 AC_LANG_POP
joachim99@2 3164 CC="$lt_save_CC"
joachim99@14 3165 ])# AC_LIBTOOL_LANG_CXX_CONFIG
joachim99@14 3166
joachim99@14 3167
joachim99@14 3168 # AC_LIBTOOL_LANG_GCJ_CONFIG
joachim99@14 3169 # --------------------------
joachim99@14 3170 # Ensure that the configuration vars for the C compiler are
joachim99@14 3171 # suitably defined. Those variables are subsequently used by
joachim99@14 3172 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
joachim99@14 3173 AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
joachim99@14 3174 AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
joachim99@14 3175 [AC_LANG_SAVE
joachim99@14 3176
joachim99@14 3177 # Source file extension for C test sources.
joachim99@14 3178 ac_ext=java
joachim99@14 3179
joachim99@14 3180 # Object file extension for compiled C test sources.
joachim99@14 3181 objext=o
joachim99@14 3182 _LT_AC_TAGVAR(objext, $1)=$objext
joachim99@14 3183
joachim99@14 3184 # Code to be used in simple compile tests
joachim99@14 3185 lt_simple_compile_test_code="class foo {}"
joachim99@14 3186
joachim99@14 3187 # Code to be used in simple link tests
joachim99@14 3188 lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }'
joachim99@14 3189
joachim99@14 3190 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
joachim99@14 3191 _LT_AC_SYS_COMPILER
joachim99@14 3192
joachim99@14 3193 # Allow CC to be a program name with arguments.
joachim99@14 3194 lt_save_CC="$CC"
joachim99@14 3195 CC=${GCJ-"gcj"}
joachim99@14 3196 set dummy $CC
joachim99@14 3197 compiler="[$]2"
joachim99@14 3198 _LT_AC_TAGVAR(compiler, $1)=$CC
joachim99@14 3199
joachim99@14 3200 # GCJ did not exist at the time GCC didn't implicitly link libc in.
joachim99@14 3201 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
joachim99@14 3202
joachim99@14 3203 ## CAVEAT EMPTOR:
joachim99@14 3204 ## There is no encapsulation within the following macros, do not change
joachim99@14 3205 ## the running order or otherwise move them around unless you know exactly
joachim99@14 3206 ## what you are doing...
joachim99@14 3207 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
joachim99@14 3208 AC_LIBTOOL_PROG_COMPILER_PIC($1)
joachim99@14 3209 AC_LIBTOOL_PROG_CC_C_O($1)
joachim99@14 3210 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
joachim99@14 3211 AC_LIBTOOL_PROG_LD_SHLIBS($1)
joachim99@14 3212 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
joachim99@14 3213 AC_LIBTOOL_SYS_LIB_STRIP
joachim99@14 3214 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
joachim99@14 3215 AC_LIBTOOL_DLOPEN_SELF($1)
joachim99@14 3216
joachim99@14 3217 AC_LIBTOOL_CONFIG($1)
joachim99@14 3218
joachim99@14 3219 AC_LANG_RESTORE
joachim99@14 3220 CC="$lt_save_CC"
joachim99@14 3221 ])# AC_LIBTOOL_LANG_GCJ_CONFIG
joachim99@14 3222
joachim99@14 3223
joachim99@14 3224 # AC_LIBTOOL_LANG_RC_CONFIG
joachim99@14 3225 # --------------------------
joachim99@14 3226 # Ensure that the configuration vars for the Windows resource compiler are
joachim99@14 3227 # suitably defined. Those variables are subsequently used by
joachim99@14 3228 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
joachim99@14 3229 AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
joachim99@14 3230 AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
joachim99@14 3231 [AC_LANG_SAVE
joachim99@14 3232
joachim99@14 3233 # Source file extension for RC test sources.
joachim99@14 3234 ac_ext=rc
joachim99@14 3235
joachim99@14 3236 # Object file extension for compiled RC test sources.
joachim99@14 3237 objext=o
joachim99@14 3238 _LT_AC_TAGVAR(objext, $1)=$objext
joachim99@14 3239
joachim99@14 3240 # Code to be used in simple compile tests
joachim99@14 3241 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
joachim99@14 3242
joachim99@14 3243 # Code to be used in simple link tests
joachim99@14 3244 lt_simple_link_test_code="$lt_simple_compile_test_code"
joachim99@14 3245
joachim99@14 3246 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
joachim99@14 3247 _LT_AC_SYS_COMPILER
joachim99@14 3248
joachim99@14 3249 # Allow CC to be a program name with arguments.
joachim99@14 3250 lt_save_CC="$CC"
joachim99@14 3251 CC=${RC-"windres"}
joachim99@14 3252 set dummy $CC
joachim99@14 3253 compiler="[$]2"
joachim99@14 3254 _LT_AC_TAGVAR(compiler, $1)=$CC
joachim99@14 3255 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
joachim99@14 3256
joachim99@14 3257 AC_LIBTOOL_CONFIG($1)
joachim99@14 3258
joachim99@14 3259 AC_LANG_RESTORE
joachim99@14 3260 CC="$lt_save_CC"
joachim99@14 3261 ])# AC_LIBTOOL_LANG_RC_CONFIG
joachim99@14 3262
joachim99@14 3263
joachim99@14 3264 # AC_LIBTOOL_CONFIG([TAGNAME])
joachim99@14 3265 # ----------------------------
joachim99@14 3266 # If TAGNAME is not passed, then create an initial libtool script
joachim99@14 3267 # with a default configuration from the untagged config vars. Otherwise
joachim99@14 3268 # add code to config.status for appending the configuration named by
joachim99@14 3269 # TAGNAME from the matching tagged config vars.
joachim99@14 3270 AC_DEFUN([AC_LIBTOOL_CONFIG],
joachim99@14 3271 [# The else clause should only fire when bootstrapping the
joachim99@14 3272 # libtool distribution, otherwise you forgot to ship ltmain.sh
joachim99@14 3273 # with your package, and you will get complaints that there are
joachim99@14 3274 # no rules to generate ltmain.sh.
joachim99@14 3275 if test -f "$ltmain"; then
joachim99@14 3276 # Now quote all the things that may contain metacharacters while being
joachim99@14 3277 # careful not to overquote the AC_SUBSTed values. We take copies of the
joachim99@14 3278 # variables and quote the copies for generation of the libtool script.
joachim99@14 3279 for var in echo old_CC old_CFLAGS AR AR_FLAGS RANLIB LN_S LTCC NM SED SHELL \
joachim99@14 3280 libname_spec library_names_spec soname_spec extract_expsyms_cmds \
joachim99@14 3281 old_striplib striplib file_magic_cmd finish_cmds finish_eval \
joachim99@14 3282 deplibs_check_method reload_flag reload_cmds need_locks \
joachim99@14 3283 lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
joachim99@14 3284 lt_cv_sys_global_symbol_to_c_name_address \
joachim99@14 3285 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
joachim99@14 3286 old_postinstall_cmds old_postuninstall_cmds \
joachim99@14 3287 _LT_AC_TAGVAR(compiler, $1) \
joachim99@14 3288 _LT_AC_TAGVAR(CC, $1) \
joachim99@14 3289 _LT_AC_TAGVAR(LD, $1) \
joachim99@14 3290 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
joachim99@14 3291 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
joachim99@14 3292 _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
joachim99@14 3293 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
joachim99@14 3294 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
joachim99@14 3295 _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
joachim99@14 3296 _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
joachim99@14 3297 _LT_AC_TAGVAR(old_archive_cmds, $1) \
joachim99@14 3298 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
joachim99@14 3299 _LT_AC_TAGVAR(predep_objects, $1) \
joachim99@14 3300 _LT_AC_TAGVAR(postdep_objects, $1) \
joachim99@14 3301 _LT_AC_TAGVAR(predeps, $1) \
joachim99@14 3302 _LT_AC_TAGVAR(postdeps, $1) \
joachim99@14 3303 _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
joachim99@14 3304 _LT_AC_TAGVAR(archive_cmds, $1) \
joachim99@14 3305 _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
joachim99@14 3306 _LT_AC_TAGVAR(postinstall_cmds, $1) \
joachim99@14 3307 _LT_AC_TAGVAR(postuninstall_cmds, $1) \
joachim99@14 3308 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
joachim99@14 3309 _LT_AC_TAGVAR(allow_undefined_flag, $1) \
joachim99@14 3310 _LT_AC_TAGVAR(no_undefined_flag, $1) \
joachim99@14 3311 _LT_AC_TAGVAR(export_symbols_cmds, $1) \
joachim99@14 3312 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
joachim99@14 3313 _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
joachim99@14 3314 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
joachim99@14 3315 _LT_AC_TAGVAR(exclude_expsyms, $1) \
joachim99@14 3316 _LT_AC_TAGVAR(include_expsyms, $1); do
joachim99@14 3317
joachim99@14 3318 case $var in
joachim99@14 3319 _LT_AC_TAGVAR(old_archive_cmds, $1) | \
joachim99@14 3320 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
joachim99@14 3321 _LT_AC_TAGVAR(archive_cmds, $1) | \
joachim99@14 3322 _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
joachim99@14 3323 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
joachim99@14 3324 _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
joachim99@14 3325 extract_expsyms_cmds | reload_cmds | finish_cmds | \
joachim99@14 3326 postinstall_cmds | postuninstall_cmds | \
joachim99@14 3327 old_postinstall_cmds | old_postuninstall_cmds | \
joachim99@14 3328 sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
joachim99@14 3329 # Double-quote double-evaled strings.
joachim99@14 3330 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
joachim99@14 3331 ;;
joachim99@14 3332 *)
joachim99@14 3333 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
joachim99@14 3334 ;;
joachim99@14 3335 esac
joachim99@14 3336 done
joachim99@14 3337
joachim99@14 3338 case $lt_echo in
joachim99@14 3339 *'\[$]0 --fallback-echo"')
joachim99@14 3340 lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
joachim99@14 3341 ;;
joachim99@14 3342 esac
joachim99@14 3343
joachim99@14 3344 ifelse([$1], [],
joachim99@14 3345 [cfgfile="${ofile}T"
joachim99@14 3346 trap "$rm \"$cfgfile\"; exit 1" 1 2 15
joachim99@14 3347 $rm -f "$cfgfile"
joachim99@14 3348 AC_MSG_NOTICE([creating $ofile])],
joachim99@14 3349 [cfgfile="$ofile"])
joachim99@14 3350
joachim99@14 3351 cat <<__EOF__ >> "$cfgfile"
joachim99@14 3352 ifelse([$1], [],
joachim99@14 3353 [#! $SHELL
joachim99@14 3354
joachim99@14 3355 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
joachim99@14 3356 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
joachim99@14 3357 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
joachim99@14 3358 #
joachim99@14 3359 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
joachim99@14 3360 # Free Software Foundation, Inc.
joachim99@14 3361 #
joachim99@14 3362 # This file is part of GNU Libtool:
joachim99@14 3363 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
joachim99@14 3364 #
joachim99@14 3365 # This program is free software; you can redistribute it and/or modify
joachim99@14 3366 # it under the terms of the GNU General Public License as published by
joachim99@14 3367 # the Free Software Foundation; either version 2 of the License, or
joachim99@14 3368 # (at your option) any later version.
joachim99@14 3369 #
joachim99@14 3370 # This program is distributed in the hope that it will be useful, but
joachim99@14 3371 # WITHOUT ANY WARRANTY; without even the implied warranty of
joachim99@14 3372 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
joachim99@14 3373 # General Public License for more details.
joachim99@14 3374 #
joachim99@14 3375 # You should have received a copy of the GNU General Public License
joachim99@14 3376 # along with this program; if not, write to the Free Software
joachim99@14 3377 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
joachim99@14 3378 #
joachim99@14 3379 # As a special exception to the GNU General Public License, if you
joachim99@14 3380 # distribute this file as part of a program that contains a
joachim99@14 3381 # configuration script generated by Autoconf, you may include it under
joachim99@14 3382 # the same distribution terms that you use for the rest of that program.
joachim99@14 3383
joachim99@14 3384 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
joachim99@14 3385 Xsed="sed -e s/^X//"
joachim99@14 3386
joachim99@14 3387 # The HP-UX ksh and POSIX shell print the target directory to stdout
joachim99@14 3388 # if CDPATH is set.
joachim99@14 3389 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
joachim99@14 3390
joachim99@14 3391 # The names of the tagged configurations supported by this script.
joachim99@14 3392 available_tags=
joachim99@14 3393
joachim99@14 3394 # ### BEGIN LIBTOOL CONFIG],
joachim99@14 3395 [# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
joachim99@14 3396
joachim99@14 3397 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
joachim99@14 3398
joachim99@14 3399 # Shell to use when invoking shell scripts.
joachim99@14 3400 SHELL=$lt_SHELL
joachim99@14 3401
joachim99@14 3402 # Whether or not to build shared libraries.
joachim99@14 3403 build_libtool_libs=$enable_shared
joachim99@14 3404
joachim99@14 3405 # Whether or not to build static libraries.
joachim99@14 3406 build_old_libs=$enable_static
joachim99@14 3407
joachim99@14 3408 # Whether or not to add -lc for building shared libraries.
joachim99@14 3409 build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
joachim99@14 3410
joachim99@14 3411 # Whether or not to optimize for fast installation.
joachim99@14 3412 fast_install=$enable_fast_install
joachim99@14 3413
joachim99@14 3414 # The host system.
joachim99@14 3415 host_alias=$host_alias
joachim99@14 3416 host=$host
joachim99@14 3417
joachim99@14 3418 # An echo program that does not interpret backslashes.
joachim99@14 3419 echo=$lt_echo
joachim99@14 3420
joachim99@14 3421 # The archiver.
joachim99@14 3422 AR=$lt_AR
joachim99@14 3423 AR_FLAGS=$lt_AR_FLAGS
joachim99@14 3424
joachim99@14 3425 # A C compiler.
joachim99@14 3426 LTCC=$lt_LTCC
joachim99@14 3427
joachim99@14 3428 # A language-specific compiler.
joachim99@14 3429 CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
joachim99@14 3430
joachim99@14 3431 # Is the compiler the GNU C compiler?
joachim99@14 3432 with_gcc=$_LT_AC_TAGVAR(GCC, $1)
joachim99@14 3433
joachim99@14 3434 # The linker used to build libraries.
joachim99@14 3435 LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
joachim99@14 3436
joachim99@14 3437 # Whether we need hard or soft links.
joachim99@14 3438 LN_S=$lt_LN_S
joachim99@14 3439
joachim99@14 3440 # A BSD-compatible nm program.
joachim99@14 3441 NM=$lt_NM
joachim99@14 3442
joachim99@14 3443 # A sed program that does not truncate output.
joachim99@14 3444 SED=$lt_SED
joachim99@14 3445
joachim99@14 3446 # A symbol stripping program
joachim99@14 3447 STRIP=$STRIP
joachim99@14 3448
joachim99@14 3449 # Used to examine libraries when file_magic_cmd begins "file"
joachim99@14 3450 MAGIC_CMD=$MAGIC_CMD
joachim99@14 3451
joachim99@14 3452 # Used on cygwin: DLL creation program.
joachim99@14 3453 DLLTOOL="$DLLTOOL"
joachim99@14 3454
joachim99@14 3455 # Used on cygwin: object dumper.
joachim99@14 3456 OBJDUMP="$OBJDUMP"
joachim99@14 3457
joachim99@14 3458 # Used on cygwin: assembler.
joachim99@14 3459 AS="$AS"
joachim99@14 3460
joachim99@14 3461 # The name of the directory that contains temporary libtool files.
joachim99@14 3462 objdir=$objdir
joachim99@14 3463
joachim99@14 3464 # How to create reloadable object files.
joachim99@14 3465 reload_flag=$lt_reload_flag
joachim99@14 3466 reload_cmds=$lt_reload_cmds
joachim99@14 3467
joachim99@14 3468 # How to pass a linker flag through the compiler.
joachim99@14 3469 wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
joachim99@14 3470
joachim99@14 3471 # Object file suffix (normally "o").
joachim99@14 3472 objext="$ac_objext"
joachim99@14 3473
joachim99@14 3474 # Old archive suffix (normally "a").
joachim99@14 3475 libext="$libext"
joachim99@14 3476
joachim99@14 3477 # Executable file suffix (normally "").
joachim99@14 3478 exeext="$exeext"
joachim99@14 3479
joachim99@14 3480 # Additional compiler flags for building library objects.
joachim99@14 3481 pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
joachim99@14 3482 pic_mode=$pic_mode
joachim99@14 3483
joachim99@14 3484 # What is the maximum length of a command?
joachim99@14 3485 max_cmd_len=$lt_cv_sys_max_cmd_len
joachim99@14 3486
joachim99@14 3487 # Does compiler simultaneously support -c and -o options?
joachim99@14 3488 compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
joachim99@14 3489
joachim99@14 3490 # Must we lock files when doing compilation ?
joachim99@14 3491 need_locks=$lt_need_locks
joachim99@14 3492
joachim99@14 3493 # Do we need the lib prefix for modules?
joachim99@14 3494 need_lib_prefix=$need_lib_prefix
joachim99@14 3495
joachim99@14 3496 # Do we need a version for libraries?
joachim99@14 3497 need_version=$need_version
joachim99@14 3498
joachim99@14 3499 # Whether dlopen is supported.
joachim99@14 3500 dlopen_support=$enable_dlopen
joachim99@14 3501
joachim99@14 3502 # Whether dlopen of programs is supported.
joachim99@14 3503 dlopen_self=$enable_dlopen_self
joachim99@14 3504
joachim99@14 3505 # Whether dlopen of statically linked programs is supported.
joachim99@14 3506 dlopen_self_static=$enable_dlopen_self_static
joachim99@14 3507
joachim99@14 3508 # Compiler flag to prevent dynamic linking.
joachim99@14 3509 link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
joachim99@14 3510
joachim99@14 3511 # Compiler flag to turn off builtin functions.
joachim99@14 3512 no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
joachim99@14 3513
joachim99@14 3514 # Compiler flag to allow reflexive dlopens.
joachim99@14 3515 export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
joachim99@14 3516
joachim99@14 3517 # Compiler flag to generate shared objects directly from archives.
joachim99@14 3518 whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
joachim99@14 3519
joachim99@14 3520 # Compiler flag to generate thread-safe objects.
joachim99@14 3521 thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
joachim99@14 3522
joachim99@14 3523 # Library versioning type.
joachim99@14 3524 version_type=$version_type
joachim99@14 3525
joachim99@14 3526 # Format of library name prefix.
joachim99@14 3527 libname_spec=$lt_libname_spec
joachim99@14 3528
joachim99@14 3529 # List of archive names. First name is the real one, the rest are links.
joachim99@14 3530 # The last name is the one that the linker finds with -lNAME.
joachim99@14 3531 library_names_spec=$lt_library_names_spec
joachim99@14 3532
joachim99@14 3533 # The coded name of the library, if different from the real name.
joachim99@14 3534 soname_spec=$lt_soname_spec
joachim99@14 3535
joachim99@14 3536 # Commands used to build and install an old-style archive.
joachim99@14 3537 RANLIB=$lt_RANLIB
joachim99@14 3538 old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
joachim99@14 3539 old_postinstall_cmds=$lt_old_postinstall_cmds
joachim99@14 3540 old_postuninstall_cmds=$lt_old_postuninstall_cmds
joachim99@14 3541
joachim99@14 3542 # Create an old-style archive from a shared archive.
joachim99@14 3543 old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
joachim99@14 3544
joachim99@14 3545 # Create a temporary old-style archive to link instead of a shared archive.
joachim99@14 3546 old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
joachim99@14 3547
joachim99@14 3548 # Commands used to build and install a shared archive.
joachim99@14 3549 archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
joachim99@14 3550 archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
joachim99@14 3551 postinstall_cmds=$lt_postinstall_cmds
joachim99@14 3552 postuninstall_cmds=$lt_postuninstall_cmds
joachim99@14 3553
joachim99@14 3554 # Commands to strip libraries.
joachim99@14 3555 old_striplib=$lt_old_striplib
joachim99@14 3556 striplib=$lt_striplib
joachim99@14 3557
joachim99@14 3558 # Dependencies to place before the objects being linked to create a
joachim99@14 3559 # shared library.
joachim99@14 3560 predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
joachim99@14 3561
joachim99@14 3562 # Dependencies to place after the objects being linked to create a
joachim99@14 3563 # shared library.
joachim99@14 3564 postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
joachim99@14 3565
joachim99@14 3566 # Dependencies to place before the objects being linked to create a
joachim99@14 3567 # shared library.
joachim99@14 3568 predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
joachim99@14 3569
joachim99@14 3570 # Dependencies to place after the objects being linked to create a
joachim99@14 3571 # shared library.
joachim99@14 3572 postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
joachim99@14 3573
joachim99@14 3574 # The library search path used internally by the compiler when linking
joachim99@14 3575 # a shared library.
joachim99@14 3576 compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
joachim99@14 3577
joachim99@14 3578 # Method to check whether dependent libraries are shared objects.
joachim99@14 3579 deplibs_check_method=$lt_deplibs_check_method
joachim99@14 3580
joachim99@14 3581 # Command to use when deplibs_check_method == file_magic.
joachim99@14 3582 file_magic_cmd=$lt_file_magic_cmd
joachim99@14 3583
joachim99@14 3584 # Flag that allows shared libraries with undefined symbols to be built.
joachim99@14 3585 allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
joachim99@14 3586
joachim99@14 3587 # Flag that forces no undefined symbols.
joachim99@14 3588 no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
joachim99@14 3589
joachim99@14 3590 # Commands used to finish a libtool library installation in a directory.
joachim99@14 3591 finish_cmds=$lt_finish_cmds
joachim99@14 3592
joachim99@14 3593 # Same as above, but a single script fragment to be evaled but not shown.
joachim99@14 3594 finish_eval=$lt_finish_eval
joachim99@14 3595
joachim99@14 3596 # Take the output of nm and produce a listing of raw symbols and C names.
joachim99@14 3597 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
joachim99@14 3598
joachim99@14 3599 # Transform the output of nm in a proper C declaration
joachim99@14 3600 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
joachim99@14 3601
joachim99@14 3602 # Transform the output of nm in a C name address pair
joachim99@14 3603 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
joachim99@14 3604
joachim99@14 3605 # This is the shared library runtime path variable.
joachim99@14 3606 runpath_var=$runpath_var
joachim99@14 3607
joachim99@14 3608 # This is the shared library path variable.
joachim99@14 3609 shlibpath_var=$shlibpath_var
joachim99@14 3610
joachim99@14 3611 # Is shlibpath searched before the hard-coded library search path?
joachim99@14 3612 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
joachim99@14 3613
joachim99@14 3614 # How to hardcode a shared library path into an executable.
joachim99@14 3615 hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
joachim99@14 3616
joachim99@14 3617 # Whether we should hardcode library paths into libraries.
joachim99@14 3618 hardcode_into_libs=$hardcode_into_libs
joachim99@14 3619
joachim99@14 3620 # Flag to hardcode \$libdir into a binary during linking.
joachim99@14 3621 # This must work even if \$libdir does not exist.
joachim99@14 3622 hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
joachim99@14 3623
joachim99@14 3624 # Whether we need a single -rpath flag with a separated argument.
joachim99@14 3625 hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
joachim99@14 3626
joachim99@14 3627 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
joachim99@14 3628 # resulting binary.
joachim99@14 3629 hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
joachim99@14 3630
joachim99@14 3631 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
joachim99@14 3632 # resulting binary.
joachim99@14 3633 hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
joachim99@14 3634
joachim99@14 3635 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
joachim99@14 3636 # the resulting binary.
joachim99@14 3637 hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
joachim99@14 3638
joachim99@14 3639 # Variables whose values should be saved in libtool wrapper scripts and
joachim99@14 3640 # restored at relink time.
joachim99@14 3641 variables_saved_for_relink="$variables_saved_for_relink"
joachim99@14 3642
joachim99@14 3643 # Whether libtool must link a program against all its dependency libraries.
joachim99@14 3644 link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
joachim99@14 3645
joachim99@14 3646 # Compile-time system search path for libraries
joachim99@14 3647 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
joachim99@14 3648
joachim99@14 3649 # Run-time system search path for libraries
joachim99@14 3650 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
joachim99@14 3651
joachim99@14 3652 # Fix the shell variable \$srcfile for the compiler.
joachim99@14 3653 fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
joachim99@14 3654
joachim99@14 3655 # Set to yes if exported symbols are required.
joachim99@14 3656 always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
joachim99@14 3657
joachim99@14 3658 # The commands to list exported symbols.
joachim99@14 3659 export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
joachim99@14 3660
joachim99@14 3661 # The commands to extract the exported symbol list from a shared archive.
joachim99@14 3662 extract_expsyms_cmds=$lt_extract_expsyms_cmds
joachim99@14 3663
joachim99@14 3664 # Symbols that should not be listed in the preloaded symbols.
joachim99@14 3665 exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
joachim99@14 3666
joachim99@14 3667 # Symbols that must always be exported.
joachim99@14 3668 include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
joachim99@14 3669
joachim99@14 3670 ifelse([$1],[],
joachim99@14 3671 [# ### END LIBTOOL CONFIG],
joachim99@14 3672 [# ### END LIBTOOL TAG CONFIG: $tagname])
joachim99@14 3673
joachim99@14 3674 __EOF__
joachim99@14 3675
joachim99@14 3676 ifelse([$1],[], [
joachim99@14 3677 case $host_os in
joachim99@14 3678 aix3*)
joachim99@14 3679 cat <<\EOF >> "$cfgfile"
joachim99@14 3680
joachim99@14 3681 # AIX sometimes has problems with the GCC collect2 program. For some
joachim99@14 3682 # reason, if we set the COLLECT_NAMES environment variable, the problems
joachim99@14 3683 # vanish in a puff of smoke.
joachim99@14 3684 if test "X${COLLECT_NAMES+set}" != Xset; then
joachim99@14 3685 COLLECT_NAMES=
joachim99@14 3686 export COLLECT_NAMES
joachim99@14 3687 fi
joachim99@14 3688 EOF
joachim99@14 3689 ;;
joachim99@14 3690
joachim99@14 3691 cygwin* | mingw* | pw32* | os2*)
joachim99@14 3692 cat <<'EOF' >> "$cfgfile"
joachim99@14 3693 # This is a source program that is used to create dlls on Windows
joachim99@14 3694 # Don't remove nor modify the starting and closing comments
joachim99@14 3695 _LT_AC_FILE_LTDLL_C
joachim99@14 3696 # This is a source program that is used to create import libraries
joachim99@14 3697 # on Windows for dlls which lack them. Don't remove nor modify the
joachim99@14 3698 # starting and closing comments
joachim99@14 3699 _LT_AC_FILE_IMPGEN_C
joachim99@14 3700 EOF
joachim99@14 3701 ;;
joachim99@14 3702 esac
joachim99@14 3703
joachim99@14 3704 # We use sed instead of cat because bash on DJGPP gets confused if
joachim99@14 3705 # if finds mixed CR/LF and LF-only lines. Since sed operates in
joachim99@14 3706 # text mode, it properly converts lines to CR/LF. This bash problem
joachim99@14 3707 # is reportedly fixed, but why not run on old versions too?
joachim99@14 3708 sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
joachim99@14 3709
joachim99@14 3710 mv -f "$cfgfile" "$ofile" || \
joachim99@14 3711 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
joachim99@14 3712 chmod +x "$ofile"
joachim99@2 3713 ])
joachim99@14 3714 else
joachim99@14 3715 # If there is no Makefile yet, we rely on a make rule to execute
joachim99@14 3716 # `config.status --recheck' to rerun these tests and create the
joachim99@14 3717 # libtool script then.
joachim99@14 3718 test -f Makefile && make "$ltmain"
joachim99@14 3719 fi
joachim99@14 3720 ])# AC_LIBTOOL_CONFIG
joachim99@14 3721
joachim99@14 3722
joachim99@14 3723 # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
joachim99@14 3724 # -------------------------------------------
joachim99@14 3725 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
joachim99@14 3726 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
joachim99@14 3727
joachim99@14 3728 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
joachim99@14 3729
joachim99@14 3730 if test "$GCC" = yes; then
joachim99@14 3731 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
joachim99@14 3732
joachim99@14 3733 AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
joachim99@14 3734 lt_cv_prog_compiler_rtti_exceptions,
joachim99@14 3735 [-fno-rtti -fno-exceptions -c conftest.$ac_ext], [],
joachim99@14 3736 [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
joachim99@14 3737 fi
joachim99@14 3738 ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
joachim99@14 3739
joachim99@14 3740
joachim99@14 3741 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
joachim99@14 3742 # ---------------------------------
joachim99@14 3743 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
joachim99@14 3744 [AC_REQUIRE([AC_CANONICAL_HOST])
joachim99@14 3745 AC_REQUIRE([AC_PROG_NM])
joachim99@14 3746 AC_REQUIRE([AC_OBJEXT])
joachim99@14 3747 # Check for command to grab the raw symbol name followed by C symbol from nm.
joachim99@14 3748 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
joachim99@14 3749 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
joachim99@14 3750 [
joachim99@14 3751 # These are sane defaults that work on at least a few old systems.
joachim99@14 3752 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
joachim99@14 3753
joachim99@14 3754 # Character class describing NM global symbol codes.
joachim99@14 3755 symcode='[[BCDEGRST]]'
joachim99@14 3756
joachim99@14 3757 # Regexp to match symbols that can be accessed directly from C.
joachim99@14 3758 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
joachim99@14 3759
joachim99@14 3760 # Transform the above into a raw symbol and a C symbol.
joachim99@14 3761 symxfrm='\1 \2\3 \3'
joachim99@14 3762
joachim99@14 3763 # Transform an extracted symbol line into a proper C declaration
joachim99@14 3764 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
joachim99@14 3765
joachim99@14 3766 # Transform an extracted symbol line into symbol name and symbol address
joachim99@14 3767 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
joachim99@14 3768
joachim99@14 3769 # Define system-specific variables.
joachim99@14 3770 case $host_os in
joachim99@14 3771 aix*)
joachim99@14 3772 symcode='[[BCDT]]'
joachim99@14 3773 ;;
joachim99@14 3774 cygwin* | mingw* | pw32*)
joachim99@14 3775 symcode='[[ABCDGISTW]]'
joachim99@14 3776 ;;
joachim99@14 3777 hpux*) # Its linker distinguishes data from code symbols
joachim99@14 3778 if test "$host_cpu" = ia64; then
joachim99@14 3779 symcode='[[ABCDEGRST]]'
joachim99@14 3780 fi
joachim99@14 3781 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
joachim99@14 3782 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
joachim99@14 3783 ;;
joachim99@14 3784 irix* | nonstopux*)
joachim99@14 3785 symcode='[[BCDEGRST]]'
joachim99@14 3786 ;;
joachim99@14 3787 solaris* | sysv5*)
joachim99@14 3788 symcode='[[BDT]]'
joachim99@14 3789 ;;
joachim99@14 3790 sysv4)
joachim99@14 3791 symcode='[[DFNSTU]]'
joachim99@14 3792 ;;
joachim99@14 3793 esac
joachim99@14 3794
joachim99@14 3795 # Handle CRLF in mingw tool chain
joachim99@14 3796 opt_cr=
joachim99@14 3797 case $host_os in
joachim99@14 3798 mingw*)
joachim99@14 3799 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
joachim99@14 3800 ;;
joachim99@14 3801 esac
joachim99@14 3802
joachim99@14 3803 # If we're using GNU nm, then use its standard symbol codes.
joachim99@14 3804 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
joachim99@14 3805 symcode='[[ABCDGISTW]]'
joachim99@14 3806 fi
joachim99@14 3807
joachim99@14 3808 # Try without a prefix undercore, then with it.
joachim99@14 3809 for ac_symprfx in "" "_"; do
joachim99@14 3810
joachim99@14 3811 # Write the raw and C identifiers.
joachim99@14 3812 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
joachim99@14 3813
joachim99@14 3814 # Check to see that the pipe works correctly.
joachim99@14 3815 pipe_works=no
joachim99@14 3816
joachim99@14 3817 rm -f conftest*
joachim99@14 3818 cat > conftest.$ac_ext <<EOF
joachim99@14 3819 #ifdef __cplusplus
joachim99@14 3820 extern "C" {
joachim99@14 3821 #endif
joachim99@14 3822 char nm_test_var;
joachim99@14 3823 void nm_test_func(){}
joachim99@14 3824 #ifdef __cplusplus
joachim99@14 3825 }
joachim99@14 3826 #endif
joachim99@14 3827 int main(){nm_test_var='a';nm_test_func();return(0);}
joachim99@14 3828 EOF
joachim99@14 3829
joachim99@14 3830 if AC_TRY_EVAL(ac_compile); then
joachim99@14 3831 # Now try to grab the symbols.
joachim99@14 3832 nlist=conftest.nm
joachim99@14 3833 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
joachim99@14 3834 # Try sorting and uniquifying the output.
joachim99@14 3835 if sort "$nlist" | uniq > "$nlist"T; then
joachim99@14 3836 mv -f "$nlist"T "$nlist"
joachim99@14 3837 else
joachim99@14 3838 rm -f "$nlist"T
joachim99@14 3839 fi
joachim99@14 3840
joachim99@14 3841 # Make sure that we snagged all the symbols we need.
joachim99@14 3842 if egrep ' nm_test_var$' "$nlist" >/dev/null; then
joachim99@14 3843 if egrep ' nm_test_func$' "$nlist" >/dev/null; then
joachim99@14 3844 cat <<EOF > conftest.$ac_ext
joachim99@14 3845 #ifdef __cplusplus
joachim99@14 3846 extern "C" {
joachim99@14 3847 #endif
joachim99@14 3848
joachim99@14 3849 EOF
joachim99@14 3850 # Now generate the symbol file.
joachim99@14 3851 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
joachim99@14 3852
joachim99@14 3853 cat <<EOF >> conftest.$ac_ext
joachim99@14 3854 #if defined (__STDC__) && __STDC__
joachim99@14 3855 # define lt_ptr_t void *
joachim99@14 3856 #else
joachim99@14 3857 # define lt_ptr_t char *
joachim99@14 3858 # define const
joachim99@14 3859 #endif
joachim99@14 3860
joachim99@14 3861 /* The mapping between symbol names and symbols. */
joachim99@14 3862 const struct {
joachim99@14 3863 const char *name;
joachim99@14 3864 lt_ptr_t address;
joachim99@14 3865 }
joachim99@14 3866 lt_preloaded_symbols[[]] =
joachim99@14 3867 {
joachim99@14 3868 EOF
joachim99@14 3869 sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
joachim99@14 3870 cat <<\EOF >> conftest.$ac_ext
joachim99@14 3871 {0, (lt_ptr_t) 0}
joachim99@14 3872 };
joachim99@14 3873
joachim99@14 3874 #ifdef __cplusplus
joachim99@14 3875 }
joachim99@14 3876 #endif
joachim99@14 3877 EOF
joachim99@14 3878 # Now try linking the two files.
joachim99@14 3879 mv conftest.$ac_objext conftstm.$ac_objext
joachim99@14 3880 lt_save_LIBS="$LIBS"
joachim99@14 3881 lt_save_CFLAGS="$CFLAGS"
joachim99@14 3882 LIBS="conftstm.$ac_objext"
joachim99@14 3883 CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
joachim99@14 3884 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
joachim99@14 3885 pipe_works=yes
joachim99@14 3886 fi
joachim99@14 3887 LIBS="$lt_save_LIBS"
joachim99@14 3888 CFLAGS="$lt_save_CFLAGS"
joachim99@14 3889 else
joachim99@14 3890 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
joachim99@14 3891 fi
joachim99@14 3892 else
joachim99@14 3893 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
joachim99@14 3894 fi
joachim99@14 3895 else
joachim99@14 3896 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
joachim99@14 3897 fi
joachim99@14 3898 else
joachim99@14 3899 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
joachim99@14 3900 cat conftest.$ac_ext >&5
joachim99@14 3901 fi
joachim99@14 3902 rm -f conftest* conftst*
joachim99@14 3903
joachim99@14 3904 # Do not use the global_symbol_pipe unless it works.
joachim99@14 3905 if test "$pipe_works" = yes; then
joachim99@14 3906 break
joachim99@14 3907 else
joachim99@14 3908 lt_cv_sys_global_symbol_pipe=
joachim99@14 3909 fi
joachim99@14 3910 done
joachim99@14 3911 ])
joachim99@14 3912 if test -z "$lt_cv_sys_global_symbol_pipe"; then
joachim99@14 3913 lt_cv_sys_global_symbol_to_cdecl=
joachim99@14 3914 fi
joachim99@14 3915 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
joachim99@14 3916 AC_MSG_RESULT(failed)
joachim99@14 3917 else
joachim99@14 3918 AC_MSG_RESULT(ok)
joachim99@14 3919 fi
joachim99@14 3920 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
joachim99@14 3921
joachim99@14 3922
joachim99@14 3923 # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
joachim99@14 3924 # ---------------------------------------
joachim99@14 3925 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
joachim99@14 3926 [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
joachim99@14 3927 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
joachim99@14 3928 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
joachim99@14 3929
joachim99@14 3930 AC_MSG_CHECKING([for $compiler option to produce PIC])
joachim99@14 3931 ifelse([$1],[CXX],[
joachim99@14 3932 # C++ specific cases for pic, static, wl, etc.
joachim99@14 3933 if test "$GXX" = yes; then
joachim99@14 3934 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
joachim99@14 3935 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
joachim99@14 3936
joachim99@14 3937 case $host_os in
joachim99@14 3938 aix*)
joachim99@14 3939 # All AIX code is PIC.
joachim99@14 3940 if test "$host_cpu" = ia64; then
joachim99@14 3941 # AIX 5 now supports IA64 processor
joachim99@14 3942 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
joachim99@14 3943 fi
joachim99@14 3944 ;;
joachim99@14 3945 amigaos*)
joachim99@14 3946 # FIXME: we need at least 68020 code to build shared libraries, but
joachim99@14 3947 # adding the `-m68020' flag to GCC prevents building anything better,
joachim99@14 3948 # like `-m68040'.
joachim99@14 3949 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
joachim99@14 3950 ;;
joachim99@14 3951 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
joachim99@14 3952 # PIC is the default for these OSes.
joachim99@14 3953 ;;
joachim99@14 3954 cygwin* | mingw* | os2*)
joachim99@14 3955 # This hack is so that the source file can tell whether it is being
joachim99@14 3956 # built for inclusion in a dll (and should export symbols for example).
joachim99@14 3957 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
joachim99@14 3958 ;;
joachim99@14 3959 darwin* | rhapsody*)
joachim99@14 3960 # PIC is the default on this platform
joachim99@14 3961 # Common symbols not allowed in MH_DYLIB files
joachim99@14 3962 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
joachim99@14 3963 ;;
joachim99@14 3964 *djgpp*)
joachim99@14 3965 # DJGPP does not support shared libraries at all
joachim99@14 3966 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
joachim99@14 3967 ;;
joachim99@14 3968 sysv4*MP*)
joachim99@14 3969 if test -d /usr/nec; then
joachim99@14 3970 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
joachim99@14 3971 fi
joachim99@14 3972 ;;
joachim99@14 3973 hpux*)
joachim99@14 3974 # PIC is the default for IA64 HP-UX, but not for PA HP-UX.
joachim99@14 3975 if test "$host_cpu" != ia64; then
joachim99@14 3976 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
joachim99@14 3977 fi
joachim99@14 3978 ;;
joachim99@14 3979 *)
joachim99@14 3980 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
joachim99@14 3981 ;;
joachim99@14 3982 esac
joachim99@14 3983 else
joachim99@14 3984 case $host_os in
joachim99@14 3985 aix4* | aix5*)
joachim99@14 3986 # All AIX code is PIC.
joachim99@14 3987 if test "$host_cpu" = ia64; then
joachim99@14 3988 # AIX 5 now supports IA64 processor
joachim99@14 3989 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
joachim99@14 3990 else
joachim99@14 3991 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
joachim99@14 3992 fi
joachim99@14 3993 ;;
joachim99@14 3994 chorus*)
joachim99@14 3995 case $cc_basename in
joachim99@14 3996 cxch68)
joachim99@14 3997 # Green Hills C++ Compiler
joachim99@14 3998 # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--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@14 3999 ;;
joachim99@14 4000 esac
joachim99@14 4001 ;;
joachim99@14 4002 dgux*)
joachim99@14 4003 case $cc_basename in
joachim99@14 4004 ec++)
joachim99@14 4005 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
joachim99@14 4006 ;;
joachim99@14 4007 ghcx)
joachim99@14 4008 # Green Hills C++ Compiler
joachim99@14 4009 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
joachim99@14 4010 ;;
joachim99@14 4011 *)
joachim99@14 4012 ;;
joachim99@14 4013 esac
joachim99@14 4014 ;;
joachim99@14 4015 freebsd*)
joachim99@14 4016 # FreeBSD uses GNU C++
joachim99@14 4017 ;;
joachim99@14 4018 hpux9* | hpux10* | hpux11*)
joachim99@14 4019 case $cc_basename in
joachim99@14 4020 CC)
joachim99@14 4021 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
joachim99@14 4022 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
joachim99@14 4023 if test "$host_cpu" != ia64; then
joachim99@14 4024 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
joachim99@14 4025 fi
joachim99@14 4026 ;;
joachim99@14 4027 aCC)
joachim99@14 4028 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
joachim99@14 4029 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
joachim99@14 4030 if test "$host_cpu" != ia64; then
joachim99@14 4031 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
joachim99@14 4032 fi
joachim99@14 4033 ;;
joachim99@14 4034 *)
joachim99@14 4035 ;;
joachim99@14 4036 esac
joachim99@14 4037 ;;
joachim99@14 4038 irix5* | irix6* | nonstopux*)
joachim99@14 4039 case $cc_basename in
joachim99@14 4040 CC)
joachim99@14 4041 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
joachim99@14 4042 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
joachim99@14 4043 # CC pic flag -KPIC is the default.
joachim99@14 4044 ;;
joachim99@14 4045 *)
joachim99@14 4046 ;;
joachim99@14 4047 esac
joachim99@14 4048 ;;
joachim99@14 4049 linux*)
joachim99@14 4050 case $cc_basename in
joachim99@14 4051 KCC)
joachim99@14 4052 # KAI C++ Compiler
joachim99@14 4053 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
joachim99@14 4054 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
joachim99@14 4055 ;;
joachim99@14 4056 icpc)
joachim99@14 4057 # Intel C++
joachim99@14 4058 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
joachim99@14 4059 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
joachim99@14 4060 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
joachim99@14 4061 ;;
joachim99@14 4062 cxx)
joachim99@14 4063 # Compaq C++
joachim99@14 4064 # Make sure the PIC flag is empty. It appears that all Alpha
joachim99@14 4065 # Linux and Compaq Tru64 Unix objects are PIC.
joachim99@14 4066 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
joachim99@14 4067 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
joachim99@14 4068 ;;
joachim99@14 4069 *)
joachim99@14 4070 ;;
joachim99@14 4071 esac
joachim99@14 4072 ;;
joachim99@14 4073 lynxos*)
joachim99@14 4074 ;;
joachim99@14 4075 m88k*)
joachim99@14 4076 ;;
joachim99@14 4077 mvs*)
joachim99@14 4078 case $cc_basename in
joachim99@14 4079 cxx)
joachim99@14 4080 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
joachim99@14 4081 ;;
joachim99@14 4082 *)
joachim99@14 4083 ;;
joachim99@14 4084 esac
joachim99@14 4085 ;;
joachim99@14 4086 netbsd*)
joachim99@14 4087 ;;
joachim99@14 4088 osf3* | osf4* | osf5*)
joachim99@14 4089 case $cc_basename in
joachim99@14 4090 KCC)
joachim99@14 4091 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
joachim99@14 4092 ;;
joachim99@14 4093 RCC)
joachim99@14 4094 # Rational C++ 2.4.1
joachim99@14 4095 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
joachim99@14 4096 ;;
joachim99@14 4097 cxx)
joachim99@14 4098 # Digital/Compaq C++
joachim99@14 4099 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
joachim99@14 4100 # Make sure the PIC flag is empty. It appears that all Alpha
joachim99@14 4101 # Linux and Compaq Tru64 Unix objects are PIC.
joachim99@14 4102 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
joachim99@14 4103 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
joachim99@14 4104 ;;
joachim99@14 4105 *)
joachim99@14 4106 ;;
joachim99@14 4107 esac
joachim99@14 4108 ;;
joachim99@14 4109 psos*)
joachim99@14 4110 ;;
joachim99@14 4111 sco*)
joachim99@14 4112 case $cc_basename in
joachim99@14 4113 CC)
joachim99@14 4114 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
joachim99@14 4115 ;;
joachim99@14 4116 *)
joachim99@14 4117 ;;
joachim99@14 4118 esac
joachim99@14 4119 ;;
joachim99@14 4120 solaris*)
joachim99@14 4121 case $cc_basename in
joachim99@14 4122 CC)
joachim99@14 4123 # Sun C++ 4.2, 5.x and Centerline C++
joachim99@14 4124 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
joachim99@14 4125 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
joachim99@14 4126 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
joachim99@14 4127 ;;
joachim99@14 4128 gcx)
joachim99@14 4129 # Green Hills C++ Compiler
joachim99@14 4130 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
joachim99@14 4131 ;;
joachim99@14 4132 *)
joachim99@14 4133 ;;
joachim99@14 4134 esac
joachim99@14 4135 ;;
joachim99@14 4136 sunos4*)
joachim99@14 4137 case $cc_basename in
joachim99@14 4138 CC)
joachim99@14 4139 # Sun C++ 4.x
joachim99@14 4140 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
joachim99@14 4141 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
joachim99@14 4142 ;;
joachim99@14 4143 lcc)
joachim99@14 4144 # Lucid
joachim99@14 4145 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
joachim99@14 4146 ;;
joachim99@14 4147 *)
joachim99@14 4148 ;;
joachim99@14 4149 esac
joachim99@14 4150 ;;
joachim99@14 4151 tandem*)
joachim99@14 4152 case $cc_basename in
joachim99@14 4153 NCC)
joachim99@14 4154 # NonStop-UX NCC 3.20
joachim99@14 4155 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
joachim99@14 4156 ;;
joachim99@14 4157 *)
joachim99@14 4158 ;;
joachim99@14 4159 esac
joachim99@14 4160 ;;
joachim99@14 4161 unixware*)
joachim99@14 4162 ;;
joachim99@14 4163 vxworks*)
joachim99@14 4164 ;;
joachim99@14 4165 *)
joachim99@14 4166 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
joachim99@14 4167 ;;
joachim99@14 4168 esac
joachim99@14 4169 fi
joachim99@14 4170 ],
joachim99@14 4171 [
joachim99@14 4172 if test "$GCC" = yes; then
joachim99@14 4173 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
joachim99@14 4174 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
joachim99@14 4175
joachim99@14 4176 case $host_os in
joachim99@14 4177 aix*)
joachim99@14 4178 # All AIX code is PIC.
joachim99@14 4179 if test "$host_cpu" = ia64; then
joachim99@14 4180 # AIX 5 now supports IA64 processor
joachim99@14 4181 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
joachim99@14 4182 fi
joachim99@14 4183 ;;
joachim99@14 4184
joachim99@14 4185 amigaos*)
joachim99@14 4186 # FIXME: we need at least 68020 code to build shared libraries, but
joachim99@14 4187 # adding the `-m68020' flag to GCC prevents building anything better,
joachim99@14 4188 # like `-m68040'.
joachim99@14 4189 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
joachim99@14 4190 ;;
joachim99@14 4191
joachim99@14 4192 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
joachim99@14 4193 # PIC is the default for these OSes.
joachim99@14 4194 ;;
joachim99@14 4195
joachim99@14 4196 cygwin* | mingw* | pw32* | os2*)
joachim99@14 4197 # This hack is so that the source file can tell whether it is being
joachim99@14 4198 # built for inclusion in a dll (and should export symbols for example).
joachim99@14 4199 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
joachim99@14 4200 ;;
joachim99@14 4201
joachim99@14 4202 darwin* | rhapsody*)
joachim99@14 4203 # PIC is the default on this platform
joachim99@14 4204 # Common symbols not allowed in MH_DYLIB files
joachim99@14 4205 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
joachim99@14 4206 ;;
joachim99@14 4207
joachim99@14 4208 msdosdjgpp*)
joachim99@14 4209 # Just because we use GCC doesn't mean we suddenly get shared libraries
joachim99@14 4210 # on systems that don't support them.
joachim99@14 4211 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
joachim99@14 4212 enable_shared=no
joachim99@14 4213 ;;
joachim99@14 4214
joachim99@14 4215 sysv4*MP*)
joachim99@14 4216 if test -d /usr/nec; then
joachim99@14 4217 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
joachim99@14 4218 fi
joachim99@14 4219 ;;
joachim99@14 4220
joachim99@14 4221 hpux*)
joachim99@14 4222 # PIC is the default for IA64 HP-UX, but not for PA HP-UX.
joachim99@14 4223 if test "$host_cpu" != ia64; then
joachim99@14 4224 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
joachim99@14 4225 fi
joachim99@14 4226 ;;
joachim99@14 4227
joachim99@14 4228 *)
joachim99@14 4229 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
joachim99@14 4230 ;;
joachim99@14 4231 esac
joachim99@14 4232 else
joachim99@14 4233 # PORTME Check for flag to pass linker flags through the system compiler.
joachim99@14 4234 case $host_os in
joachim99@14 4235 aix*)
joachim99@14 4236 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
joachim99@14 4237 if test "$host_cpu" = ia64; then
joachim99@14 4238 # AIX 5 now supports IA64 processor
joachim99@14 4239 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
joachim99@14 4240 else
joachim99@14 4241 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
joachim99@14 4242 fi
joachim99@14 4243 ;;
joachim99@14 4244
joachim99@14 4245 cygwin* | mingw* | pw32* | os2*)
joachim99@14 4246 # This hack is so that the source file can tell whether it is being
joachim99@14 4247 # built for inclusion in a dll (and should export symbols for example).
joachim99@14 4248 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
joachim99@14 4249 ;;
joachim99@14 4250
joachim99@14 4251 hpux9* | hpux10* | hpux11*)
joachim99@14 4252 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
joachim99@14 4253 if test "$host_cpu" != ia64; then
joachim99@14 4254 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
joachim99@14 4255 fi
joachim99@14 4256 # Is there a better lt_prog_compiler_static that works with the bundled CC?
joachim99@14 4257 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
joachim99@14 4258 ;;
joachim99@14 4259
joachim99@14 4260 irix5* | irix6* | nonstopux*)
joachim99@14 4261 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
joachim99@14 4262 # PIC (with -KPIC) is the default.
joachim99@14 4263 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
joachim99@14 4264 ;;
joachim99@14 4265
joachim99@14 4266 newsos6)
joachim99@14 4267 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
joachim99@14 4268 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
joachim99@14 4269 ;;
joachim99@14 4270
joachim99@14 4271 linux*)
joachim99@14 4272 if test "$CC" = "icc"; then
joachim99@14 4273 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
joachim99@14 4274 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
joachim99@14 4275 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
joachim99@14 4276 fi
joachim99@14 4277 ;;
joachim99@14 4278
joachim99@14 4279 osf3* | osf4* | osf5*)
joachim99@14 4280 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
joachim99@14 4281 # All OSF/1 code is PIC.
joachim99@14 4282 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
joachim99@14 4283 ;;
joachim99@14 4284
joachim99@14 4285 sco3.2v5*)
joachim99@14 4286 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
joachim99@14 4287 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
joachim99@14 4288 ;;
joachim99@14 4289
joachim99@14 4290 solaris*)
joachim99@14 4291 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
joachim99@14 4292 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
joachim99@14 4293 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
joachim99@14 4294 ;;
joachim99@14 4295
joachim99@14 4296 sunos4*)
joachim99@14 4297 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
joachim99@14 4298 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
joachim99@14 4299 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
joachim99@14 4300 ;;
joachim99@14 4301
joachim99@14 4302 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
joachim99@14 4303 if test "x$host_vendor" = xsni; then
joachim99@14 4304 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-LD'
joachim99@14 4305 else
joachim99@14 4306 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
joachim99@14 4307 fi
joachim99@14 4308 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
joachim99@14 4309 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
joachim99@14 4310 ;;
joachim99@14 4311
joachim99@14 4312 sysv4*MP*)
joachim99@14 4313 if test -d /usr/nec ;then
joachim99@14 4314 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
joachim99@14 4315 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
joachim99@14 4316 fi
joachim99@14 4317 ;;
joachim99@14 4318
joachim99@14 4319 uts4*)
joachim99@14 4320 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
joachim99@14 4321 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
joachim99@14 4322 ;;
joachim99@14 4323
joachim99@14 4324 *)
joachim99@14 4325 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
joachim99@14 4326 ;;
joachim99@14 4327 esac
joachim99@14 4328 fi
joachim99@14 4329 ])
joachim99@14 4330 AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
joachim99@14 4331
joachim99@14 4332 #
joachim99@14 4333 # Check to make sure the PIC flag actually works.
joachim99@14 4334 #
joachim99@14 4335 if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
joachim99@14 4336 AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
joachim99@14 4337 _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
joachim99@14 4338 [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) -DPIC], [],
joachim99@14 4339 [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
joachim99@14 4340 "" | " "*) ;;
joachim99@14 4341 *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
joachim99@14 4342 esac],
joachim99@14 4343 [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
joachim99@14 4344 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
joachim99@14 4345 fi
joachim99@14 4346 case "$host_os" in
joachim99@14 4347 # For platforms which do not support PIC, -DPIC is meaningless:
joachim99@14 4348 *djgpp*)
joachim99@14 4349 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
joachim99@14 4350 ;;
joachim99@14 4351 *)
joachim99@14 4352 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) -DPIC"
joachim99@14 4353 ;;
joachim99@14 4354 esac
joachim99@14 4355 ])
joachim99@14 4356
joachim99@14 4357
joachim99@14 4358 # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
joachim99@14 4359 # ------------------------------------
joachim99@14 4360 # See if the linker supports building shared libraries.
joachim99@14 4361 AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
joachim99@14 4362 [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
joachim99@14 4363 ifelse([$1],[CXX],[
joachim99@14 4364 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
joachim99@14 4365 case $host_os in
joachim99@14 4366 aix4* | aix5*)
joachim99@14 4367 # If we're using GNU nm, then we don't want the "-C" option.
joachim99@14 4368 # -C means demangle to AIX nm, but means don't demangle with GNU nm
joachim99@14 4369 if $NM -V 2>&1 | egrep '(GNU)' > /dev/null; then
joachim99@14 4370 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
joachim99@14 4371 else
joachim99@14 4372 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
joachim99@14 4373 fi
joachim99@14 4374 ;;
joachim99@14 4375 cygwin* | mingw* | pw32*)
joachim99@14 4376 _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
joachim99@14 4377 ;;
joachim99@14 4378 *)
joachim99@14 4379 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
joachim99@14 4380 ;;
joachim99@14 4381 esac
joachim99@14 4382 ],[
joachim99@14 4383 runpath_var=
joachim99@14 4384 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
joachim99@14 4385
joachim99@14 4386 _LT_AC_TAGVAR(archive_cmds, $1)=
joachim99@14 4387 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=
joachim99@14 4388 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
joachim99@14 4389 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
joachim99@14 4390 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
joachim99@14 4391 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
joachim99@14 4392 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
joachim99@14 4393 _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
joachim99@14 4394 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
joachim99@14 4395 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
joachim99@14 4396 _LT_AC_TAGVAR(hardcode_direct, $1)=no
joachim99@14 4397 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
joachim99@14 4398 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
joachim99@14 4399 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
joachim99@14 4400 _LT_AC_TAGVAR(always_export_symbols, $1)=no
joachim99@14 4401 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
joachim99@14 4402 # include_expsyms should be a list of space-separated symbols to be *always*
joachim99@14 4403 # included in the symbol list
joachim99@14 4404 _LT_AC_TAGVAR(include_expsyms, $1)=
joachim99@14 4405 # exclude_expsyms can be an egrep regular expression of symbols to exclude
joachim99@14 4406 # it will be wrapped by ` (' and `)$', so one must not match beginning or
joachim99@14 4407 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
joachim99@14 4408 # as well as any symbol that contains `d'.
joachim99@14 4409 _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
joachim99@14 4410 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
joachim99@14 4411 # platforms (ab)use it in PIC code, but their linkers get confused if
joachim99@14 4412 # the symbol is explicitly referenced. Since portable code cannot
joachim99@14 4413 # rely on this symbol name, it's probably fine to never include it in
joachim99@14 4414 # preloaded symbol tables.
joachim99@14 4415 extract_expsyms_cmds=
joachim99@14 4416
joachim99@14 4417 case $host_os in
joachim99@14 4418 cygwin* | mingw* | pw32*)
joachim99@14 4419 # FIXME: the MSVC++ port hasn't been tested in a loooong time
joachim99@14 4420 # When not using gcc, we currently assume that we are using
joachim99@14 4421 # Microsoft Visual C++.
joachim99@14 4422 if test "$GCC" != yes; then
joachim99@14 4423 with_gnu_ld=no
joachim99@14 4424 fi
joachim99@14 4425 ;;
joachim99@14 4426 openbsd*)
joachim99@14 4427 with_gnu_ld=no
joachim99@14 4428 ;;
joachim99@14 4429 esac
joachim99@14 4430
joachim99@14 4431 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
joachim99@14 4432 if test "$with_gnu_ld" = yes; then
joachim99@14 4433 # If archive_cmds runs LD, not CC, wlarc should be empty
joachim99@14 4434 wlarc='${wl}'
joachim99@14 4435
joachim99@14 4436 # See if GNU ld supports shared libraries.
joachim99@14 4437 case $host_os in
joachim99@14 4438 aix3* | aix4* | aix5*)
joachim99@14 4439 # On AIX/PPC, the GNU linker is very broken
joachim99@14 4440 if test "$host_cpu" != ia64; then
joachim99@14 4441 _LT_AC_TAGVAR(ld_shlibs, $1)=no
joachim99@14 4442 cat <<EOF 1>&2
joachim99@14 4443
joachim99@14 4444 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
joachim99@14 4445 *** to be unable to reliably create shared libraries on AIX.
joachim99@14 4446 *** Therefore, libtool is disabling shared libraries support. If you
joachim99@14 4447 *** really care for shared libraries, you may want to modify your PATH
joachim99@14 4448 *** so that a non-GNU linker is found, and then restart.
joachim99@14 4449
joachim99@14 4450 EOF
joachim99@14 4451 fi
joachim99@14 4452 ;;
joachim99@14 4453
joachim99@14 4454 amigaos*)
joachim99@14 4455 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
joachim99@14 4456 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
joachim99@14 4457 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
joachim99@14 4458
joachim99@14 4459 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
joachim99@14 4460 # that the semantics of dynamic libraries on AmigaOS, at least up
joachim99@14 4461 # to version 4, is to share data among multiple programs linked
joachim99@14 4462 # with the same dynamic library. Since this doesn't match the
joachim99@14 4463 # behavior of shared libraries on other platforms, we can't use
joachim99@14 4464 # them.
joachim99@14 4465 _LT_AC_TAGVAR(ld_shlibs, $1)=no
joachim99@14 4466 ;;
joachim99@14 4467
joachim99@14 4468 beos*)
joachim99@14 4469 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
joachim99@14 4470 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
joachim99@14 4471 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
joachim99@14 4472 # support --undefined. This deserves some investigation. FIXME
joachim99@14 4473 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
joachim99@14 4474 else
joachim99@14 4475 _LT_AC_TAGVAR(ld_shlibs, $1)=no
joachim99@14 4476 fi
joachim99@14 4477 ;;
joachim99@14 4478
joachim99@14 4479 cygwin* | mingw* | pw32*)
joachim99@14 4480 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, as there is
joachim99@14 4481 # no search path for DLLs.
joachim99@14 4482 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
joachim99@14 4483 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
joachim99@14 4484 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
joachim99@14 4485
joachim99@14 4486 extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
joachim99@14 4487 sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
joachim99@14 4488 test -f $output_objdir/impgen.exe || (cd $output_objdir && \
joachim99@14 4489 if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
joachim99@14 4490 else $CC -o impgen impgen.c ; fi)~
joachim99@14 4491 $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
joachim99@14 4492
joachim99@14 4493 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
joachim99@14 4494
joachim99@14 4495 # cygwin and mingw dlls have different entry points and sets of symbols
joachim99@14 4496 # to exclude.
joachim99@14 4497 # FIXME: what about values for MSVC?
joachim99@14 4498 dll_entry=__cygwin_dll_entry@12
joachim99@14 4499 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
joachim99@14 4500 case $host_os in
joachim99@14 4501 mingw*)
joachim99@14 4502 # mingw values
joachim99@14 4503 dll_entry=_DllMainCRTStartup@12
joachim99@14 4504 dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
joachim99@14 4505 ;;
joachim99@14 4506 esac
joachim99@14 4507
joachim99@14 4508 # mingw and cygwin differ, and it's simplest to just exclude the union
joachim99@14 4509 # of the two symbol sets.
joachim99@14 4510 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
joachim99@14 4511
joachim99@14 4512 # recent cygwin and mingw systems supply a stub DllMain which the user
joachim99@14 4513 # can override, but on older systems we have to supply one (in ltdll.c)
joachim99@14 4514 if test "x$lt_cv_need_dllmain" = "xyes"; then
joachim99@14 4515 ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
joachim99@14 4516 ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~
joachim99@14 4517 test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
joachim99@14 4518 else
joachim99@14 4519 ltdll_obj=
joachim99@14 4520 ltdll_cmds=
joachim99@14 4521 fi
joachim99@14 4522
joachim99@14 4523 # Extract the symbol export list from an `--export-all' def file,
joachim99@14 4524 # then regenerate the def file from the symbol export list, so that
joachim99@14 4525 # the compiled dll only exports the symbol export list.
joachim99@14 4526 # Be careful not to strip the DATA tag left by newer dlltools.
joachim99@14 4527 _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"'
joachim99@14 4528 $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
joachim99@14 4529 sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
joachim99@14 4530
joachim99@14 4531 # If the export-symbols file already is a .def file (1st line
joachim99@14 4532 # is EXPORTS), use it as is.
joachim99@14 4533 # If DATA tags from a recent dlltool are present, honour them!
joachim99@14 4534 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`head -n 1 $export_symbols`" = xEXPORTS; then
joachim99@14 4535 cp $export_symbols $output_objdir/$soname-def;
joachim99@14 4536 else
joachim99@14 4537 echo EXPORTS > $output_objdir/$soname-def;
joachim99@14 4538 _lt_hint=1;
joachim99@14 4539 cat $export_symbols | while read symbol; do
joachim99@14 4540 set dummy \$symbol;
joachim99@14 4541 case \[$]# in
joachim99@14 4542 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
joachim99@14 4543 *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
joachim99@14 4544 esac;
joachim99@14 4545 _lt_hint=`expr 1 + \$_lt_hint`;
joachim99@14 4546 done;
joachim99@14 4547 fi~
joachim99@14 4548 '"$ltdll_cmds"'
joachim99@14 4549 $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
joachim99@14 4550 $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
joachim99@14 4551 $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
joachim99@14 4552 $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~
joachim99@14 4553 $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
joachim99@14 4554 ;;
joachim99@14 4555
joachim99@14 4556 netbsd*)
joachim99@14 4557 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
joachim99@14 4558 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
joachim99@14 4559 wlarc=
joachim99@14 4560 else
joachim99@14 4561 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
joachim99@14 4562 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
joachim99@14 4563 fi
joachim99@14 4564 ;;
joachim99@14 4565
joachim99@14 4566 solaris* | sysv5*)
joachim99@14 4567 if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
joachim99@14 4568 _LT_AC_TAGVAR(ld_shlibs, $1)=no
joachim99@14 4569 cat <<EOF 1>&2
joachim99@14 4570
joachim99@14 4571 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
joachim99@14 4572 *** create shared libraries on Solaris systems. Therefore, libtool
joachim99@14 4573 *** is disabling shared libraries support. We urge you to upgrade GNU
joachim99@14 4574 *** binutils to release 2.9.1 or newer. Another option is to modify
joachim99@14 4575 *** your PATH or compiler configuration so that the native linker is
joachim99@14 4576 *** used, and then restart.
joachim99@14 4577
joachim99@14 4578 EOF
joachim99@14 4579 elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
joachim99@14 4580 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
joachim99@14 4581 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
joachim99@14 4582 else
joachim99@14 4583 _LT_AC_TAGVAR(ld_shlibs, $1)=no
joachim99@14 4584 fi
joachim99@14 4585 ;;
joachim99@14 4586
joachim99@14 4587 sunos4*)
joachim99@14 4588 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
joachim99@14 4589 wlarc=
joachim99@14 4590 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
joachim99@14 4591 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
joachim99@14 4592 ;;
joachim99@14 4593
joachim99@14 4594 *)
joachim99@14 4595 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
joachim99@14 4596 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
joachim99@14 4597 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
joachim99@14 4598 else
joachim99@14 4599 _LT_AC_TAGVAR(ld_shlibs, $1)=no
joachim99@14 4600 fi
joachim99@14 4601 ;;
joachim99@14 4602 esac
joachim99@14 4603
joachim99@14 4604 if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
joachim99@14 4605 runpath_var=LD_RUN_PATH
joachim99@14 4606 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
joachim99@14 4607 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
joachim99@14 4608 case $host_os in
joachim99@14 4609 cygwin* | mingw* | pw32*)
joachim99@14 4610 # dlltool doesn't understand --whole-archive et. al.
joachim99@14 4611 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
joachim99@14 4612 ;;
joachim99@14 4613 *)
joachim99@14 4614 # ancient GNU ld didn't support --whole-archive et. al.
joachim99@14 4615 if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
joachim99@14 4616 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
joachim99@14 4617 else
joachim99@14 4618 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
joachim99@14 4619 fi
joachim99@14 4620 ;;
joachim99@14 4621 esac
joachim99@14 4622 fi
joachim99@14 4623 else
joachim99@14 4624 # PORTME fill in a description of your system's linker (not GNU ld)
joachim99@14 4625 case $host_os in
joachim99@14 4626 aix3*)
joachim99@14 4627 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
joachim99@14 4628 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
joachim99@14 4629 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
joachim99@14 4630 # Note: this linker hardcodes the directories in LIBPATH if there
joachim99@14 4631 # are no directories specified by -L.
joachim99@14 4632 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
joachim99@14 4633 if test "$GCC" = yes && test -z "$link_static_flag"; then
joachim99@14 4634 # Neither direct hardcoding nor static linking is supported with a
joachim99@14 4635 # broken collect2.
joachim99@14 4636 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
joachim99@14 4637 fi
joachim99@14 4638 ;;
joachim99@14 4639
joachim99@14 4640 aix4* | aix5*)
joachim99@14 4641 if test "$host_cpu" = ia64; then
joachim99@14 4642 # On IA64, the linker does run time linking by default, so we don't
joachim99@14 4643 # have to do anything special.
joachim99@14 4644 aix_use_runtimelinking=no
joachim99@14 4645 exp_sym_flag='-Bexport'
joachim99@14 4646 no_entry_flag=""
joachim99@14 4647 else
joachim99@14 4648 # If we're using GNU nm, then we don't want the "-C" option.
joachim99@14 4649 # -C means demangle to AIX nm, but means don't demangle with GNU nm
joachim99@14 4650 if $NM -V 2>&1 | egrep '(GNU)' > /dev/null; then
joachim99@14 4651 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
joachim99@14 4652 else
joachim99@14 4653 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
joachim99@14 4654 fi
joachim99@14 4655
joachim99@14 4656 # KDE requires run time linking. Make it the default.
joachim99@14 4657 aix_use_runtimelinking=yes
joachim99@14 4658 exp_sym_flag='-bexport'
joachim99@14 4659 no_entry_flag='-bnoentry'
joachim99@14 4660 fi
joachim99@14 4661
joachim99@14 4662 # When large executables or shared objects are built, AIX ld can
joachim99@14 4663 # have problems creating the table of contents. If linking a library
joachim99@14 4664 # or program results in "error TOC overflow" add -mminimal-toc to
joachim99@14 4665 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
joachim99@14 4666 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
joachim99@14 4667
joachim99@14 4668 _LT_AC_TAGVAR(archive_cmds, $1)=''
joachim99@14 4669 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
joachim99@14 4670 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
joachim99@14 4671 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
joachim99@14 4672
joachim99@14 4673 if test "$GCC" = yes; then
joachim99@14 4674 case $host_os in aix4.[012]|aix4.[012].*)
joachim99@14 4675 # We only want to do this on AIX 4.2 and lower, the check
joachim99@14 4676 # below for broken collect2 doesn't work under 4.3+
joachim99@14 4677 collect2name=`${CC} -print-prog-name=collect2`
joachim99@14 4678 if test -f "$collect2name" && \
joachim99@14 4679 strings "$collect2name" | grep resolve_lib_name >/dev/null
joachim99@14 4680 then
joachim99@14 4681 # We have reworked collect2
joachim99@14 4682 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
joachim99@14 4683 else
joachim99@14 4684 # We have old collect2
joachim99@14 4685 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
joachim99@14 4686 # It fails to find uninstalled libraries when the uninstalled
joachim99@14 4687 # path is not listed in the libpath. Setting hardcode_minus_L
joachim99@14 4688 # to unsupported forces relinking
joachim99@14 4689 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
joachim99@14 4690 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
joachim99@14 4691 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
joachim99@14 4692 fi
joachim99@14 4693 esac
joachim99@14 4694 shared_flag='-shared'
joachim99@14 4695 else
joachim99@14 4696 # not using gcc
joachim99@14 4697 if test "$host_cpu" = ia64; then
joachim99@14 4698 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
joachim99@14 4699 # chokes on -Wl,-G. The following line is correct:
joachim99@14 4700 shared_flag='-G'
joachim99@14 4701 else
joachim99@14 4702 if test "$aix_use_runtimelinking" = yes; then
joachim99@14 4703 shared_flag='-qmkshrobj ${wl}-G'
joachim99@14 4704 else
joachim99@14 4705 shared_flag='-qmkshrobj'
joachim99@14 4706 fi
joachim99@14 4707 fi
joachim99@14 4708 fi
joachim99@14 4709
joachim99@14 4710 # Let the compiler handle the export list.
joachim99@14 4711 _LT_AC_TAGVAR(always_export_symbols, $1)=no
joachim99@14 4712 if test "$aix_use_runtimelinking" = yes; then
joachim99@14 4713 # Warning - without using the other runtime loading flags (-brtl),
joachim99@14 4714 # -berok will link without error, but may produce a broken library.
joachim99@14 4715 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
joachim99@14 4716 # Determine the default libpath from the value encoded in an empty executable.
joachim99@14 4717 _LT_AC_SYS_LIBPATH_AIX
joachim99@14 4718 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
joachim99@14 4719 _LT_AC_TAGVAR(archive_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '" $shared_flag"
joachim99@14 4720 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
joachim99@14 4721 else
joachim99@14 4722 if test "$host_cpu" = ia64; then
joachim99@14 4723 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
joachim99@14 4724 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
joachim99@14 4725 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$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"
joachim99@14 4726 else
joachim99@14 4727 # Determine the default libpath from the value encoded in an empty executable.
joachim99@14 4728 _LT_AC_SYS_LIBPATH_AIX
joachim99@14 4729 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
joachim99@14 4730 # Warning - without using the other run time loading flags,
joachim99@14 4731 # -berok will link without error, but may produce a broken library.
joachim99@14 4732 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
joachim99@14 4733 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
joachim99@14 4734 # -bexpall does not export symbols beginning with underscore (_)
joachim99@14 4735 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
joachim99@14 4736 # Exported symbols can be pulled into shared objects from archives
joachim99@14 4737 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
joachim99@14 4738 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
joachim99@14 4739 # This is similar to how AIX traditionally builds it's shared libraries.
joachim99@14 4740 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$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@14 4741 fi
joachim99@14 4742 fi
joachim99@14 4743 ;;
joachim99@14 4744
joachim99@14 4745 amigaos*)
joachim99@14 4746 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
joachim99@14 4747 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
joachim99@14 4748 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
joachim99@14 4749 # see comment about different semantics on the GNU ld section
joachim99@14 4750 _LT_AC_TAGVAR(ld_shlibs, $1)=no
joachim99@14 4751 ;;
joachim99@14 4752
joachim99@14 4753 bsdi4*)
joachim99@14 4754 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
joachim99@14 4755 ;;
joachim99@14 4756
joachim99@14 4757 cygwin* | mingw* | pw32*)
joachim99@14 4758 # When not using gcc, we currently assume that we are using
joachim99@14 4759 # Microsoft Visual C++.
joachim99@14 4760 # hardcode_libdir_flag_spec is actually meaningless, as there is
joachim99@14 4761 # no search path for DLLs.
joachim99@14 4762 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
joachim99@14 4763 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
joachim99@14 4764 # Tell ltmain to make .lib files, not .a files.
joachim99@14 4765 libext=lib
joachim99@14 4766 # FIXME: Setting linknames here is a bad hack.
joachim99@14 4767 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
joachim99@14 4768 # The linker will automatically build a .lib file if we build a DLL.
joachim99@14 4769 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
joachim99@14 4770 # FIXME: Should let the user specify the lib program.
joachim99@14 4771 _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
joachim99@14 4772 fix_srcfile_path='`cygpath -w "$srcfile"`'
joachim99@14 4773 ;;
joachim99@14 4774
joachim99@14 4775 darwin* | rhapsody*)
joachim99@14 4776 case "$host_os" in
joachim99@14 4777 rhapsody* | darwin1.[[012]])
joachim99@14 4778 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
joachim99@14 4779 ;;
joachim99@14 4780 *) # Darwin 1.3 on
joachim99@14 4781 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
joachim99@14 4782 ;;
joachim99@14 4783 esac
joachim99@14 4784
joachim99@14 4785 # FIXME: Relying on posixy $() will cause problems for
joachim99@14 4786 # cross-compilation, but unfortunately the echo tests do not
joachim99@14 4787 # yet detect zsh echo's removal of \ escapes. Also zsh mangles
joachim99@14 4788 # `"' quotes if we put them in here... so don't!
joachim99@14 4789 _LT_AC_TAGVAR(archive_cmds, $1)='$CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring'
joachim99@14 4790 # We need to add '_' to the symbols in $export_symbols first
joachim99@14 4791 #_LT_AC_TAGVAR(archive_expsym_cmds, $1)="$_LT_AC_TAGVAR(archive_cmds, $1)"' && strip -s $export_symbols'
joachim99@14 4792 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
joachim99@14 4793 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
joachim99@14 4794 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
joachim99@14 4795 ;;
joachim99@14 4796
joachim99@14 4797 dgux*)
joachim99@14 4798 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
joachim99@14 4799 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
joachim99@14 4800 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
joachim99@14 4801 ;;
joachim99@14 4802
joachim99@14 4803 freebsd1*)
joachim99@14 4804 _LT_AC_TAGVAR(ld_shlibs, $1)=no
joachim99@14 4805 ;;
joachim99@14 4806
joachim99@14 4807 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
joachim99@14 4808 # support. Future versions do this automatically, but an explicit c++rt0.o
joachim99@14 4809 # does not break anything, and helps significantly (at the cost of a little
joachim99@14 4810 # extra space).
joachim99@14 4811 freebsd2.2*)
joachim99@14 4812 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
joachim99@14 4813 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
joachim99@14 4814 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
joachim99@14 4815 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
joachim99@14 4816 ;;
joachim99@14 4817
joachim99@14 4818 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
joachim99@14 4819 freebsd2*)
joachim99@14 4820 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
joachim99@14 4821 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
joachim99@14 4822 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
joachim99@14 4823 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
joachim99@14 4824 ;;
joachim99@14 4825
joachim99@14 4826 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
joachim99@14 4827 freebsd*)
joachim99@14 4828 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
joachim99@14 4829 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
joachim99@14 4830 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
joachim99@14 4831 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
joachim99@14 4832 ;;
joachim99@14 4833
joachim99@14 4834 hpux9* | hpux10* | hpux11*)
joachim99@14 4835 if test "$GCC" = yes; then
joachim99@14 4836 case $host_os in
joachim99@14 4837 hpux9*)
joachim99@14 4838 _LT_AC_TAGVAR(archive_cmds, $1)='$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'
joachim99@14 4839 ;;
joachim99@14 4840 *)
joachim99@14 4841 if test "$host_cpu" = ia64; then
joachim99@14 4842 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
joachim99@14 4843 else
joachim99@14 4844 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
joachim99@14 4845 fi
joachim99@14 4846 ;;
joachim99@14 4847 esac
joachim99@14 4848 else
joachim99@14 4849 case $host_os in
joachim99@14 4850 hpux9*)
joachim99@14 4851 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
joachim99@14 4852 ;;
joachim99@14 4853 *)
joachim99@14 4854 if test "$host_cpu" = ia64; then
joachim99@14 4855 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
joachim99@14 4856 else
joachim99@14 4857 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
joachim99@14 4858 fi
joachim99@14 4859 ;;
joachim99@14 4860 esac
joachim99@14 4861 fi
joachim99@14 4862 if test "$host_cpu" = ia64; then
joachim99@14 4863 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
joachim99@14 4864 _LT_AC_TAGVAR(hardcode_direct, $1)=no
joachim99@14 4865 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
joachim99@14 4866 else
joachim99@14 4867 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
joachim99@14 4868 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
joachim99@14 4869 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
joachim99@14 4870 fi
joachim99@14 4871 # hardcode_minus_L: Not really in the search PATH,
joachim99@14 4872 # but as the default location of the library.
joachim99@14 4873 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
joachim99@14 4874 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
joachim99@14 4875 ;;
joachim99@14 4876
joachim99@14 4877 irix5* | irix6* | nonstopux*)
joachim99@14 4878 if test "$GCC" = yes; then
joachim99@14 4879 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
joachim99@14 4880 else
joachim99@14 4881 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
joachim99@14 4882 fi
joachim99@14 4883 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
joachim99@14 4884 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
joachim99@14 4885 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
joachim99@14 4886 ;;
joachim99@14 4887
joachim99@14 4888 netbsd*)
joachim99@14 4889 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
joachim99@14 4890 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
joachim99@14 4891 else
joachim99@14 4892 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
joachim99@14 4893 fi
joachim99@14 4894 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
joachim99@14 4895 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
joachim99@14 4896 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
joachim99@14 4897 ;;
joachim99@14 4898
joachim99@14 4899 newsos6)
joachim99@14 4900 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
joachim99@14 4901 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
joachim99@14 4902 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
joachim99@14 4903 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
joachim99@14 4904 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
joachim99@14 4905 ;;
joachim99@14 4906
joachim99@14 4907 openbsd*)
joachim99@14 4908 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
joachim99@14 4909 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
joachim99@14 4910
joachim99@14 4911 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
joachim99@14 4912 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
joachim99@14 4913 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
joachim99@14 4914 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
joachim99@14 4915 else
joachim99@14 4916 case $host_os in
joachim99@14 4917 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
joachim99@14 4918 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
joachim99@14 4919 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
joachim99@14 4920 ;;
joachim99@14 4921 *)
joachim99@14 4922 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
joachim99@14 4923 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
joachim99@14 4924 ;;
joachim99@14 4925 esac
joachim99@14 4926 fi
joachim99@14 4927 ;;
joachim99@14 4928
joachim99@14 4929 os2*)
joachim99@14 4930 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
joachim99@14 4931 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
joachim99@14 4932 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
joachim99@14 4933 _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
joachim99@14 4934 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
joachim99@14 4935 ;;
joachim99@14 4936
joachim99@14 4937 osf3*)
joachim99@14 4938 if test "$GCC" = yes; then
joachim99@14 4939 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
joachim99@14 4940 _LT_AC_TAGVAR(archive_cmds, $1)='$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}${output_objdir}/so_locations -o $lib'
joachim99@14 4941 else
joachim99@14 4942 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
joachim99@14 4943 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
joachim99@14 4944 fi
joachim99@14 4945 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
joachim99@14 4946 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
joachim99@14 4947 ;;
joachim99@14 4948
joachim99@14 4949 osf4* | osf5*) # as osf3* with the addition of -msym flag
joachim99@14 4950 if test "$GCC" = yes; then
joachim99@14 4951 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
joachim99@14 4952 _LT_AC_TAGVAR(archive_cmds, $1)='$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}${output_objdir}/so_locations -o $lib'
joachim99@14 4953 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
joachim99@14 4954 else
joachim99@14 4955 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
joachim99@14 4956 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
joachim99@14 4957 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
joachim99@14 4958 $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
joachim99@14 4959
joachim99@14 4960 # Both c and cxx compiler support -rpath directly
joachim99@14 4961 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
joachim99@14 4962 fi
joachim99@14 4963 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
joachim99@14 4964 ;;
joachim99@14 4965
joachim99@14 4966 sco3.2v5*)
joachim99@14 4967 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
joachim99@14 4968 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
joachim99@14 4969 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
joachim99@14 4970 runpath_var=LD_RUN_PATH
joachim99@14 4971 hardcode_runpath_var=yes
joachim99@14 4972 ;;
joachim99@14 4973
joachim99@14 4974 solaris*)
joachim99@14 4975 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
joachim99@14 4976 if test "$GCC" = yes; then
joachim99@14 4977 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
joachim99@14 4978 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
joachim99@14 4979 $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
joachim99@14 4980 else
joachim99@14 4981 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
joachim99@14 4982 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
joachim99@14 4983 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
joachim99@14 4984 fi
joachim99@14 4985 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
joachim99@14 4986 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
joachim99@14 4987 case $host_os in
joachim99@14 4988 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
joachim99@14 4989 *) # Supported since Solaris 2.6 (maybe 2.5.1?)
joachim99@14 4990 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
joachim99@14 4991 esac
joachim99@14 4992 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
joachim99@14 4993 ;;
joachim99@14 4994
joachim99@14 4995 sunos4*)
joachim99@14 4996 if test "x$host_vendor" = xsequent; then
joachim99@14 4997 # Use $CC to link under sequent, because it throws in some extra .o
joachim99@14 4998 # files that make .init and .fini sections work.
joachim99@14 4999 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
joachim99@14 5000 else
joachim99@14 5001 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
joachim99@14 5002 fi
joachim99@14 5003 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
joachim99@14 5004 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
joachim99@14 5005 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
joachim99@14 5006 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
joachim99@14 5007 ;;
joachim99@14 5008
joachim99@14 5009 sysv4)
joachim99@14 5010 if test "x$host_vendor" = xsni; then
joachim99@14 5011 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
joachim99@14 5012 _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
joachim99@14 5013 else
joachim99@14 5014 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
joachim99@14 5015 _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
joachim99@14 5016 fi
joachim99@14 5017 runpath_var='LD_RUN_PATH'
joachim99@14 5018 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
joachim99@14 5019 ;;
joachim99@14 5020
joachim99@14 5021 sysv4.3*)
joachim99@14 5022 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
joachim99@14 5023 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
joachim99@14 5024 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
joachim99@14 5025 ;;
joachim99@14 5026
joachim99@14 5027 sysv4*MP*)
joachim99@14 5028 if test -d /usr/nec; then
joachim99@14 5029 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
joachim99@14 5030 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
joachim99@14 5031 runpath_var=LD_RUN_PATH
joachim99@14 5032 hardcode_runpath_var=yes
joachim99@14 5033 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
joachim99@14 5034 fi
joachim99@14 5035 ;;
joachim99@14 5036
joachim99@14 5037 sysv4.2uw2*)
joachim99@14 5038 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
joachim99@14 5039 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
joachim99@14 5040 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
joachim99@14 5041 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
joachim99@14 5042 hardcode_runpath_var=yes
joachim99@14 5043 runpath_var=LD_RUN_PATH
joachim99@14 5044 ;;
joachim99@14 5045
joachim99@14 5046 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
joachim99@14 5047 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
joachim99@14 5048 if test "$GCC" = yes; then
joachim99@14 5049 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
joachim99@14 5050 else
joachim99@14 5051 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
joachim99@14 5052 fi
joachim99@14 5053 runpath_var='LD_RUN_PATH'
joachim99@14 5054 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
joachim99@14 5055 ;;
joachim99@14 5056
joachim99@14 5057 sysv5*)
joachim99@14 5058 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
joachim99@14 5059 # $CC -shared without GNU ld will not create a library from C++
joachim99@14 5060 # object files and a static libstdc++, better avoid it by now
joachim99@14 5061 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
joachim99@14 5062 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
joachim99@14 5063 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
joachim99@14 5064 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
joachim99@14 5065 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
joachim99@14 5066 runpath_var='LD_RUN_PATH'
joachim99@14 5067 ;;
joachim99@14 5068
joachim99@14 5069 uts4*)
joachim99@14 5070 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
joachim99@14 5071 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
joachim99@14 5072 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
joachim99@14 5073 ;;
joachim99@14 5074
joachim99@14 5075 *)
joachim99@14 5076 _LT_AC_TAGVAR(ld_shlibs, $1)=no
joachim99@14 5077 ;;
joachim99@14 5078 esac
joachim99@14 5079 fi
joachim99@14 5080 ])
joachim99@14 5081 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
joachim99@14 5082 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
joachim99@14 5083
joachim99@14 5084 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
joachim99@14 5085 if test "$GCC" = yes; then
joachim99@14 5086 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
joachim99@14 5087 fi
joachim99@14 5088
joachim99@14 5089 #
joachim99@14 5090 # Do we need to explicitly link libc?
joachim99@14 5091 #
joachim99@14 5092 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
joachim99@14 5093 if test "$enable_shared" = yes && test "$GCC" = yes; then
joachim99@14 5094 case $_LT_AC_TAGVAR(archive_cmds, $1) in
joachim99@14 5095 *'~'*)
joachim99@14 5096 # FIXME: we may have to deal with multi-command sequences.
joachim99@14 5097 ;;
joachim99@14 5098 '$CC '*)
joachim99@14 5099 # Test whether the compiler implicitly links with -lc since on some
joachim99@14 5100 # systems, -lgcc has to come before -lc. If gcc already passes -lc
joachim99@14 5101 # to ld, don't add -lc before -lgcc.
joachim99@14 5102 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
joachim99@14 5103 $rm conftest*
joachim99@14 5104 echo 'static int dummy;' > conftest.$ac_ext
joachim99@14 5105
joachim99@14 5106 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
joachim99@14 5107 soname=conftest
joachim99@14 5108 lib=conftest
joachim99@14 5109 libobjs=conftest.$ac_objext
joachim99@14 5110 deplibs=
joachim99@14 5111 wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
joachim99@14 5112 compiler_flags=-v
joachim99@14 5113 linker_flags=-v
joachim99@14 5114 verstring=
joachim99@14 5115 output_objdir=.
joachim99@14 5116 libname=conftest
joachim99@14 5117 lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
joachim99@14 5118 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
joachim99@14 5119 if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
joachim99@14 5120 then
joachim99@14 5121 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
joachim99@14 5122 else
joachim99@14 5123 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
joachim99@14 5124 fi
joachim99@14 5125 _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
joachim99@14 5126 else
joachim99@14 5127 cat conftest.err 1>&5
joachim99@14 5128 fi
joachim99@14 5129 $rm conftest*
joachim99@14 5130 AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
joachim99@14 5131 ;;
joachim99@14 5132 esac
joachim99@14 5133 fi
joachim99@14 5134 ])# AC_LIBTOOL_PROG_LD_SHLIBS
joachim99@14 5135
joachim99@14 5136
joachim99@14 5137 # _LT_AC_FILE_LTDLL_C
joachim99@14 5138 # -------------------
joachim99@14 5139 # Be careful that the start marker always follows a newline.
joachim99@14 5140 AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
joachim99@14 5141 # /* ltdll.c starts here */
joachim99@14 5142 # #define WIN32_LEAN_AND_MEAN
joachim99@14 5143 # #include <windows.h>
joachim99@14 5144 # #undef WIN32_LEAN_AND_MEAN
joachim99@14 5145 # #include <stdio.h>
joachim99@14 5146 #
joachim99@14 5147 # #ifndef __CYGWIN__
joachim99@14 5148 # # ifdef __CYGWIN32__
joachim99@14 5149 # # define __CYGWIN__ __CYGWIN32__
joachim99@14 5150 # # endif
joachim99@14 5151 # #endif
joachim99@14 5152 #
joachim99@14 5153 # #ifdef __cplusplus
joachim99@14 5154 # extern "C" {
joachim99@14 5155 # #endif
joachim99@14 5156 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
joachim99@14 5157 # #ifdef __cplusplus
joachim99@14 5158 # }
joachim99@14 5159 # #endif
joachim99@14 5160 #
joachim99@14 5161 # #ifdef __CYGWIN__
joachim99@14 5162 # #include <cygwin/cygwin_dll.h>
joachim99@14 5163 # DECLARE_CYGWIN_DLL( DllMain );
joachim99@14 5164 # #endif
joachim99@14 5165 # HINSTANCE __hDllInstance_base;
joachim99@14 5166 #
joachim99@14 5167 # BOOL APIENTRY
joachim99@14 5168 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
joachim99@14 5169 # {
joachim99@14 5170 # __hDllInstance_base = hInst;
joachim99@14 5171 # return TRUE;
joachim99@14 5172 # }
joachim99@14 5173 # /* ltdll.c ends here */
joachim99@14 5174 ])# _LT_AC_FILE_LTDLL_C
joachim99@14 5175
joachim99@14 5176
joachim99@14 5177 # _LT_AC_FILE_IMPGEN_C
joachim99@14 5178 # --------------------
joachim99@14 5179 # Be careful that the start marker always follows a newline.
joachim99@14 5180 AC_DEFUN([_LT_AC_FILE_IMPGEN_C], [
joachim99@14 5181 # /* impgen.c starts here */
joachim99@14 5182 # /* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
joachim99@14 5183 #
joachim99@14 5184 # This file is part of GNU libtool.
joachim99@14 5185 #
joachim99@14 5186 # This program is free software; you can redistribute it and/or modify
joachim99@14 5187 # it under the terms of the GNU General Public License as published by
joachim99@14 5188 # the Free Software Foundation; either version 2 of the License, or
joachim99@14 5189 # (at your option) any later version.
joachim99@14 5190 #
joachim99@14 5191 # This program is distributed in the hope that it will be useful,
joachim99@14 5192 # but WITHOUT ANY WARRANTY; without even the implied warranty of
joachim99@14 5193 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
joachim99@14 5194 # GNU General Public License for more details.
joachim99@14 5195 #
joachim99@14 5196 # You should have received a copy of the GNU General Public License
joachim99@14 5197 # along with this program; if not, write to the Free Software
joachim99@14 5198 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
joachim99@14 5199 # */
joachim99@14 5200 #
joachim99@14 5201 # #include <stdio.h> /* for printf() */
joachim99@14 5202 # #include <unistd.h> /* for open(), lseek(), read() */
joachim99@14 5203 # #include <fcntl.h> /* for O_RDONLY, O_BINARY */
joachim99@14 5204 # #include <string.h> /* for strdup() */
joachim99@14 5205 #
joachim99@14 5206 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
joachim99@14 5207 # #ifndef O_BINARY
joachim99@14 5208 # #define O_BINARY 0
joachim99@14 5209 # #endif
joachim99@14 5210 #
joachim99@14 5211 # static unsigned int
joachim99@14 5212 # pe_get16 (fd, offset)
joachim99@14 5213 # int fd;
joachim99@14 5214 # int offset;
joachim99@14 5215 # {
joachim99@14 5216 # unsigned char b[2];
joachim99@14 5217 # lseek (fd, offset, SEEK_SET);
joachim99@14 5218 # read (fd, b, 2);
joachim99@14 5219 # return b[0] + (b[1]<<8);
joachim99@14 5220 # }
joachim99@14 5221 #
joachim99@14 5222 # static unsigned int
joachim99@14 5223 # pe_get32 (fd, offset)
joachim99@14 5224 # int fd;
joachim99@14 5225 # int offset;
joachim99@14 5226 # {
joachim99@14 5227 # unsigned char b[4];
joachim99@14 5228 # lseek (fd, offset, SEEK_SET);
joachim99@14 5229 # read (fd, b, 4);
joachim99@14 5230 # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
joachim99@14 5231 # }
joachim99@14 5232 #
joachim99@14 5233 # static unsigned int
joachim99@14 5234 # pe_as32 (ptr)
joachim99@14 5235 # void *ptr;
joachim99@14 5236 # {
joachim99@14 5237 # unsigned char *b = ptr;
joachim99@14 5238 # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
joachim99@14 5239 # }
joachim99@14 5240 #
joachim99@14 5241 # int
joachim99@14 5242 # main (argc, argv)
joachim99@14 5243 # int argc;
joachim99@14 5244 # char *argv[];
joachim99@14 5245 # {
joachim99@14 5246 # int dll;
joachim99@14 5247 # unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
joachim99@14 5248 # unsigned long export_rva, export_size, nsections, secptr, expptr;
joachim99@14 5249 # unsigned long name_rvas, nexp;
joachim99@14 5250 # unsigned char *expdata, *erva;
joachim99@14 5251 # char *filename, *dll_name;
joachim99@14 5252 #
joachim99@14 5253 # filename = argv[1];
joachim99@14 5254 #
joachim99@14 5255 # dll = open(filename, O_RDONLY|O_BINARY);
joachim99@14 5256 # if (dll < 1)
joachim99@14 5257 # return 1;
joachim99@14 5258 #
joachim99@14 5259 # dll_name = filename;
joachim99@14 5260 #
joachim99@14 5261 # for (i=0; filename[i]; i++)
joachim99@14 5262 # if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
joachim99@14 5263 # dll_name = filename + i +1;
joachim99@14 5264 #
joachim99@14 5265 # pe_header_offset = pe_get32 (dll, 0x3c);
joachim99@14 5266 # opthdr_ofs = pe_header_offset + 4 + 20;
joachim99@14 5267 # num_entries = pe_get32 (dll, opthdr_ofs + 92);
joachim99@14 5268 #
joachim99@14 5269 # if (num_entries < 1) /* no exports */
joachim99@14 5270 # return 1;
joachim99@14 5271 #
joachim99@14 5272 # export_rva = pe_get32 (dll, opthdr_ofs + 96);
joachim99@14 5273 # export_size = pe_get32 (dll, opthdr_ofs + 100);
joachim99@14 5274 # nsections = pe_get16 (dll, pe_header_offset + 4 +2);
joachim99@14 5275 # secptr = (pe_header_offset + 4 + 20 +
joachim99@14 5276 # pe_get16 (dll, pe_header_offset + 4 + 16));
joachim99@14 5277 #
joachim99@14 5278 # expptr = 0;
joachim99@14 5279 # for (i = 0; i < nsections; i++)
joachim99@14 5280 # {
joachim99@14 5281 # char sname[8];
joachim99@14 5282 # unsigned long secptr1 = secptr + 40 * i;
joachim99@14 5283 # unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
joachim99@14 5284 # unsigned long vsize = pe_get32 (dll, secptr1 + 16);
joachim99@14 5285 # unsigned long fptr = pe_get32 (dll, secptr1 + 20);
joachim99@14 5286 # lseek(dll, secptr1, SEEK_SET);
joachim99@14 5287 # read(dll, sname, 8);
joachim99@14 5288 # if (vaddr <= export_rva && vaddr+vsize > export_rva)
joachim99@14 5289 # {
joachim99@14 5290 # expptr = fptr + (export_rva - vaddr);
joachim99@14 5291 # if (export_rva + export_size > vaddr + vsize)
joachim99@14 5292 # export_size = vsize - (export_rva - vaddr);
joachim99@14 5293 # break;
joachim99@14 5294 # }
joachim99@14 5295 # }
joachim99@14 5296 #
joachim99@14 5297 # expdata = (unsigned char*)malloc(export_size);
joachim99@14 5298 # lseek (dll, expptr, SEEK_SET);
joachim99@14 5299 # read (dll, expdata, export_size);
joachim99@14 5300 # erva = expdata - export_rva;
joachim99@14 5301 #
joachim99@14 5302 # nexp = pe_as32 (expdata+24);
joachim99@14 5303 # name_rvas = pe_as32 (expdata+32);
joachim99@14 5304 #
joachim99@14 5305 # printf ("EXPORTS\n");
joachim99@14 5306 # for (i = 0; i<nexp; i++)
joachim99@14 5307 # {
joachim99@14 5308 # unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
joachim99@14 5309 # printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
joachim99@14 5310 # }
joachim99@14 5311 #
joachim99@14 5312 # return 0;
joachim99@14 5313 # }
joachim99@14 5314 # /* impgen.c ends here */
joachim99@14 5315 ])# _LT_AC_FILE_IMPGEN_C
joachim99@14 5316
joachim99@14 5317 # _LT_AC_TAGVAR(VARNAME, [TAGNAME])
joachim99@14 5318 # ---------------------------------
joachim99@14 5319 AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
joachim99@14 5320
joachim99@14 5321
joachim99@14 5322 # old names
joachim99@2 5323 AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
joachim99@2 5324 AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
joachim99@2 5325 AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
joachim99@2 5326 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
joachim99@2 5327 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
joachim99@2 5328 AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
joachim99@2 5329 AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
joachim99@2 5330
joachim99@14 5331 # This is just to silence aclocal about the macro not being used
joachim99@14 5332 ifelse([AC_DISABLE_FAST_INSTALL])
joachim99@2 5333
joachim99@2 5334 AC_DEFUN([LT_AC_PROG_GCJ],
joachim99@2 5335 [AC_CHECK_TOOL(GCJ, gcj, no)
joachim99@2 5336 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
joachim99@2 5337 AC_SUBST(GCJFLAGS)
joachim99@2 5338 ])
joachim99@14 5339
joachim99@14 5340 AC_DEFUN([LT_AC_PROG_RC],
joachim99@14 5341 [AC_CHECK_TOOL(RC, windres, no)
joachim99@14 5342 ])
joachim99@14 5343
joachim99@14 5344 ############################################################
joachim99@14 5345 # NOTE: This macro has been submitted for inclusion into #
joachim99@14 5346 # GNU Autoconf as AC_PROG_SED. When it is available in #
joachim99@14 5347 # a released version of Autoconf we should remove this #
joachim99@14 5348 # macro and use it instead. #
joachim99@14 5349 ############################################################
joachim99@14 5350 # LT_AC_PROG_SED
joachim99@14 5351 # --------------
joachim99@14 5352 # Check for a fully-functional sed program, that truncates
joachim99@14 5353 # as few characters as possible. Prefer GNU sed if found.
joachim99@14 5354 AC_DEFUN([LT_AC_PROG_SED],
joachim99@14 5355 [AC_MSG_CHECKING([for a sed that does not truncate output])
joachim99@14 5356 AC_CACHE_VAL(lt_cv_path_SED,
joachim99@14 5357 [# Loop through the user's path and test for sed and gsed.
joachim99@14 5358 # Then use that list of sed's as ones to test for truncation.
joachim99@14 5359 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
joachim99@14 5360 for as_dir in $PATH
joachim99@14 5361 do
joachim99@14 5362 IFS=$as_save_IFS
joachim99@14 5363 test -z "$as_dir" && as_dir=.
joachim99@14 5364 for ac_prog in sed gsed; do
joachim99@14 5365 for ac_exec_ext in '' $ac_executable_extensions; do
joachim99@14 5366 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
joachim99@14 5367 _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
joachim99@14 5368 fi
joachim99@14 5369 done
joachim99@14 5370 done
joachim99@14 5371 done
joachim99@14 5372
joachim99@14 5373 # Create a temporary directory, and hook for its removal unless debugging.
joachim99@14 5374 $debug ||
joachim99@14 5375 {
joachim99@14 5376 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
joachim99@14 5377 trap '{ (exit 1); exit 1; }' 1 2 13 15
joachim99@14 5378 }
joachim99@14 5379
joachim99@14 5380 # Create a (secure) tmp directory for tmp files.
joachim99@14 5381 : ${TMPDIR=/tmp}
joachim99@14 5382 {
joachim99@14 5383 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
joachim99@14 5384 test -n "$tmp" && test -d "$tmp"
joachim99@14 5385 } ||
joachim99@14 5386 {
joachim99@14 5387 tmp=$TMPDIR/sed$$-$RANDOM
joachim99@14 5388 (umask 077 && mkdir $tmp)
joachim99@14 5389 } ||
joachim99@14 5390 {
joachim99@14 5391 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
joachim99@14 5392 { (exit 1); exit 1; }
joachim99@14 5393 }
joachim99@14 5394 _max=0
joachim99@14 5395 _count=0
joachim99@14 5396 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
joachim99@14 5397 # along with /bin/sed that truncates output.
joachim99@14 5398 for _sed in $_sed_list /usr/xpg4/bin/sed; do
joachim99@14 5399 test ! -f ${_sed} && break
joachim99@14 5400 cat /dev/null > "$tmp/sed.in"
joachim99@14 5401 _count=0
joachim99@14 5402 echo $ECHO_N "0123456789$ECHO_C" >"$tmp/sed.in"
joachim99@14 5403 # Check for GNU sed and select it if it is found.
joachim99@14 5404 if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
joachim99@14 5405 lt_cv_path_SED=${_sed}
joachim99@14 5406 break;
joachim99@14 5407 fi
joachim99@14 5408 while true; do
joachim99@14 5409 cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
joachim99@14 5410 mv "$tmp/sed.tmp" "$tmp/sed.in"
joachim99@14 5411 cp "$tmp/sed.in" "$tmp/sed.nl"
joachim99@14 5412 echo >>"$tmp/sed.nl"
joachim99@14 5413 ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
joachim99@14 5414 cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
joachim99@14 5415 # 10000 chars as input seems more than enough
joachim99@14 5416 test $_count -gt 10 && break
joachim99@14 5417 _count=`expr $_count + 1`
joachim99@14 5418 if test $_count -gt $_max; then
joachim99@14 5419 _max=$_count
joachim99@14 5420 lt_cv_path_SED=$_sed
joachim99@14 5421 fi
joachim99@14 5422 done
joachim99@14 5423 done
joachim99@14 5424 rm -rf "$tmp"
joachim99@14 5425 ])
joachim99@14 5426 AC_MSG_RESULT([$SED])
joachim99@14 5427 ])