annotate src/libmad-0.15.1b/aclocal.m4 @ 169:223a55898ab9 tip default

Add null config files
author Chris Cannam <cannam@all-day-breakfast.com>
date Mon, 02 Mar 2020 14:03:47 +0000
parents 545efbb81310
children
rev   line source
cannam@85 1 # generated automatically by aclocal 1.8.2 -*- Autoconf -*-
cannam@85 2
cannam@85 3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
cannam@85 4 # Free Software Foundation, Inc.
cannam@85 5 # This file is free software; the Free Software Foundation
cannam@85 6 # gives unlimited permission to copy and/or distribute it,
cannam@85 7 # with or without modifications, as long as this notice is preserved.
cannam@85 8
cannam@85 9 # This program is distributed in the hope that it will be useful,
cannam@85 10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
cannam@85 11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
cannam@85 12 # PARTICULAR PURPOSE.
cannam@85 13
cannam@85 14 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
cannam@85 15
cannam@85 16 # serial 47 AC_PROG_LIBTOOL
cannam@85 17 # Debian $Rev: 192 $
cannam@85 18
cannam@85 19
cannam@85 20 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
cannam@85 21 # -----------------------------------------------------------
cannam@85 22 # If this macro is not defined by Autoconf, define it here.
cannam@85 23 m4_ifdef([AC_PROVIDE_IFELSE],
cannam@85 24 [],
cannam@85 25 [m4_define([AC_PROVIDE_IFELSE],
cannam@85 26 [m4_ifdef([AC_PROVIDE_$1],
cannam@85 27 [$2], [$3])])])
cannam@85 28
cannam@85 29
cannam@85 30 # AC_PROG_LIBTOOL
cannam@85 31 # ---------------
cannam@85 32 AC_DEFUN([AC_PROG_LIBTOOL],
cannam@85 33 [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
cannam@85 34 dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
cannam@85 35 dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
cannam@85 36 AC_PROVIDE_IFELSE([AC_PROG_CXX],
cannam@85 37 [AC_LIBTOOL_CXX],
cannam@85 38 [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
cannam@85 39 ])])
cannam@85 40 dnl And a similar setup for Fortran 77 support
cannam@85 41 AC_PROVIDE_IFELSE([AC_PROG_F77],
cannam@85 42 [AC_LIBTOOL_F77],
cannam@85 43 [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
cannam@85 44 ])])
cannam@85 45
cannam@85 46 dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
cannam@85 47 dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
cannam@85 48 dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
cannam@85 49 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
cannam@85 50 [AC_LIBTOOL_GCJ],
cannam@85 51 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
cannam@85 52 [AC_LIBTOOL_GCJ],
cannam@85 53 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
cannam@85 54 [AC_LIBTOOL_GCJ],
cannam@85 55 [ifdef([AC_PROG_GCJ],
cannam@85 56 [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
cannam@85 57 ifdef([A][M_PROG_GCJ],
cannam@85 58 [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
cannam@85 59 ifdef([LT_AC_PROG_GCJ],
cannam@85 60 [define([LT_AC_PROG_GCJ],
cannam@85 61 defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
cannam@85 62 ])])# AC_PROG_LIBTOOL
cannam@85 63
cannam@85 64
cannam@85 65 # _AC_PROG_LIBTOOL
cannam@85 66 # ----------------
cannam@85 67 AC_DEFUN([_AC_PROG_LIBTOOL],
cannam@85 68 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
cannam@85 69 AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
cannam@85 70 AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
cannam@85 71 AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
cannam@85 72
cannam@85 73 # This can be used to rebuild libtool when needed
cannam@85 74 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
cannam@85 75
cannam@85 76 # Always use our own libtool.
cannam@85 77 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
cannam@85 78 AC_SUBST(LIBTOOL)dnl
cannam@85 79
cannam@85 80 # Prevent multiple expansion
cannam@85 81 define([AC_PROG_LIBTOOL], [])
cannam@85 82 ])# _AC_PROG_LIBTOOL
cannam@85 83
cannam@85 84
cannam@85 85 # AC_LIBTOOL_SETUP
cannam@85 86 # ----------------
cannam@85 87 AC_DEFUN([AC_LIBTOOL_SETUP],
cannam@85 88 [AC_PREREQ(2.50)dnl
cannam@85 89 AC_REQUIRE([AC_ENABLE_SHARED])dnl
cannam@85 90 AC_REQUIRE([AC_ENABLE_STATIC])dnl
cannam@85 91 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
cannam@85 92 AC_REQUIRE([AC_CANONICAL_HOST])dnl
cannam@85 93 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
cannam@85 94 AC_REQUIRE([AC_PROG_CC])dnl
cannam@85 95 AC_REQUIRE([AC_PROG_LD])dnl
cannam@85 96 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
cannam@85 97 AC_REQUIRE([AC_PROG_NM])dnl
cannam@85 98
cannam@85 99 AC_REQUIRE([AC_PROG_LN_S])dnl
cannam@85 100 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
cannam@85 101 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
cannam@85 102 AC_REQUIRE([AC_OBJEXT])dnl
cannam@85 103 AC_REQUIRE([AC_EXEEXT])dnl
cannam@85 104 dnl
cannam@85 105
cannam@85 106 AC_LIBTOOL_SYS_MAX_CMD_LEN
cannam@85 107 AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
cannam@85 108 AC_LIBTOOL_OBJDIR
cannam@85 109
cannam@85 110 AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
cannam@85 111 _LT_AC_PROG_ECHO_BACKSLASH
cannam@85 112
cannam@85 113 case $host_os in
cannam@85 114 aix3*)
cannam@85 115 # AIX sometimes has problems with the GCC collect2 program. For some
cannam@85 116 # reason, if we set the COLLECT_NAMES environment variable, the problems
cannam@85 117 # vanish in a puff of smoke.
cannam@85 118 if test "X${COLLECT_NAMES+set}" != Xset; then
cannam@85 119 COLLECT_NAMES=
cannam@85 120 export COLLECT_NAMES
cannam@85 121 fi
cannam@85 122 ;;
cannam@85 123 esac
cannam@85 124
cannam@85 125 # Sed substitution that helps us do robust quoting. It backslashifies
cannam@85 126 # metacharacters that are still active within double-quoted strings.
cannam@85 127 Xsed='sed -e s/^X//'
cannam@85 128 [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
cannam@85 129
cannam@85 130 # Same as above, but do not quote variable references.
cannam@85 131 [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
cannam@85 132
cannam@85 133 # Sed substitution to delay expansion of an escaped shell variable in a
cannam@85 134 # double_quote_subst'ed string.
cannam@85 135 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
cannam@85 136
cannam@85 137 # Sed substitution to avoid accidental globbing in evaled expressions
cannam@85 138 no_glob_subst='s/\*/\\\*/g'
cannam@85 139
cannam@85 140 # Constants:
cannam@85 141 rm="rm -f"
cannam@85 142
cannam@85 143 # Global variables:
cannam@85 144 default_ofile=libtool
cannam@85 145 can_build_shared=yes
cannam@85 146
cannam@85 147 # All known linkers require a `.a' archive for static linking (except M$VC,
cannam@85 148 # which needs '.lib').
cannam@85 149 libext=a
cannam@85 150 ltmain="$ac_aux_dir/ltmain.sh"
cannam@85 151 ofile="$default_ofile"
cannam@85 152 with_gnu_ld="$lt_cv_prog_gnu_ld"
cannam@85 153
cannam@85 154 AC_CHECK_TOOL(AR, ar, false)
cannam@85 155 AC_CHECK_TOOL(RANLIB, ranlib, :)
cannam@85 156 AC_CHECK_TOOL(STRIP, strip, :)
cannam@85 157
cannam@85 158 old_CC="$CC"
cannam@85 159 old_CFLAGS="$CFLAGS"
cannam@85 160
cannam@85 161 # Set sane defaults for various variables
cannam@85 162 test -z "$AR" && AR=ar
cannam@85 163 test -z "$AR_FLAGS" && AR_FLAGS=cru
cannam@85 164 test -z "$AS" && AS=as
cannam@85 165 test -z "$CC" && CC=cc
cannam@85 166 test -z "$LTCC" && LTCC=$CC
cannam@85 167 test -z "$DLLTOOL" && DLLTOOL=dlltool
cannam@85 168 test -z "$LD" && LD=ld
cannam@85 169 test -z "$LN_S" && LN_S="ln -s"
cannam@85 170 test -z "$MAGIC_CMD" && MAGIC_CMD=file
cannam@85 171 test -z "$NM" && NM=nm
cannam@85 172 test -z "$SED" && SED=sed
cannam@85 173 test -z "$OBJDUMP" && OBJDUMP=objdump
cannam@85 174 test -z "$RANLIB" && RANLIB=:
cannam@85 175 test -z "$STRIP" && STRIP=:
cannam@85 176 test -z "$ac_objext" && ac_objext=o
cannam@85 177
cannam@85 178 # Determine commands to create old-style static archives.
cannam@85 179 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
cannam@85 180 old_postinstall_cmds='chmod 644 $oldlib'
cannam@85 181 old_postuninstall_cmds=
cannam@85 182
cannam@85 183 if test -n "$RANLIB"; then
cannam@85 184 case $host_os in
cannam@85 185 openbsd*)
cannam@85 186 old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
cannam@85 187 ;;
cannam@85 188 *)
cannam@85 189 old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
cannam@85 190 ;;
cannam@85 191 esac
cannam@85 192 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
cannam@85 193 fi
cannam@85 194
cannam@85 195 # Only perform the check for file, if the check method requires it
cannam@85 196 case $deplibs_check_method in
cannam@85 197 file_magic*)
cannam@85 198 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
cannam@85 199 AC_PATH_MAGIC
cannam@85 200 fi
cannam@85 201 ;;
cannam@85 202 esac
cannam@85 203
cannam@85 204 AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
cannam@85 205 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
cannam@85 206 enable_win32_dll=yes, enable_win32_dll=no)
cannam@85 207
cannam@85 208 AC_ARG_ENABLE([libtool-lock],
cannam@85 209 [AC_HELP_STRING([--disable-libtool-lock],
cannam@85 210 [avoid locking (might break parallel builds)])])
cannam@85 211 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
cannam@85 212
cannam@85 213 AC_ARG_WITH([pic],
cannam@85 214 [AC_HELP_STRING([--with-pic],
cannam@85 215 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
cannam@85 216 [pic_mode="$withval"],
cannam@85 217 [pic_mode=default])
cannam@85 218 test -z "$pic_mode" && pic_mode=default
cannam@85 219
cannam@85 220 # Use C for the default configuration in the libtool script
cannam@85 221 tagname=
cannam@85 222 AC_LIBTOOL_LANG_C_CONFIG
cannam@85 223 _LT_AC_TAGCONFIG
cannam@85 224 ])# AC_LIBTOOL_SETUP
cannam@85 225
cannam@85 226
cannam@85 227 # _LT_AC_SYS_COMPILER
cannam@85 228 # -------------------
cannam@85 229 AC_DEFUN([_LT_AC_SYS_COMPILER],
cannam@85 230 [AC_REQUIRE([AC_PROG_CC])dnl
cannam@85 231
cannam@85 232 # If no C compiler was specified, use CC.
cannam@85 233 LTCC=${LTCC-"$CC"}
cannam@85 234
cannam@85 235 # Allow CC to be a program name with arguments.
cannam@85 236 compiler=$CC
cannam@85 237 ])# _LT_AC_SYS_COMPILER
cannam@85 238
cannam@85 239
cannam@85 240 # _LT_AC_SYS_LIBPATH_AIX
cannam@85 241 # ----------------------
cannam@85 242 # Links a minimal program and checks the executable
cannam@85 243 # for the system default hardcoded library path. In most cases,
cannam@85 244 # this is /usr/lib:/lib, but when the MPI compilers are used
cannam@85 245 # the location of the communication and MPI libs are included too.
cannam@85 246 # If we don't find anything, use the default library path according
cannam@85 247 # to the aix ld manual.
cannam@85 248 AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
cannam@85 249 [AC_LINK_IFELSE(AC_LANG_PROGRAM,[
cannam@85 250 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
cannam@85 251 }'`
cannam@85 252 # Check for a 64-bit object if we didn't find anything.
cannam@85 253 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; }
cannam@85 254 }'`; fi],[])
cannam@85 255 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
cannam@85 256 ])# _LT_AC_SYS_LIBPATH_AIX
cannam@85 257
cannam@85 258
cannam@85 259 # _LT_AC_SHELL_INIT(ARG)
cannam@85 260 # ----------------------
cannam@85 261 AC_DEFUN([_LT_AC_SHELL_INIT],
cannam@85 262 [ifdef([AC_DIVERSION_NOTICE],
cannam@85 263 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
cannam@85 264 [AC_DIVERT_PUSH(NOTICE)])
cannam@85 265 $1
cannam@85 266 AC_DIVERT_POP
cannam@85 267 ])# _LT_AC_SHELL_INIT
cannam@85 268
cannam@85 269
cannam@85 270 # _LT_AC_PROG_ECHO_BACKSLASH
cannam@85 271 # --------------------------
cannam@85 272 # Add some code to the start of the generated configure script which
cannam@85 273 # will find an echo command which doesn't interpret backslashes.
cannam@85 274 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
cannam@85 275 [_LT_AC_SHELL_INIT([
cannam@85 276 # Check that we are running under the correct shell.
cannam@85 277 SHELL=${CONFIG_SHELL-/bin/sh}
cannam@85 278
cannam@85 279 case X$ECHO in
cannam@85 280 X*--fallback-echo)
cannam@85 281 # Remove one level of quotation (which was required for Make).
cannam@85 282 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
cannam@85 283 ;;
cannam@85 284 esac
cannam@85 285
cannam@85 286 echo=${ECHO-echo}
cannam@85 287 if test "X[$]1" = X--no-reexec; then
cannam@85 288 # Discard the --no-reexec flag, and continue.
cannam@85 289 shift
cannam@85 290 elif test "X[$]1" = X--fallback-echo; then
cannam@85 291 # Avoid inline document here, it may be left over
cannam@85 292 :
cannam@85 293 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
cannam@85 294 # Yippee, $echo works!
cannam@85 295 :
cannam@85 296 else
cannam@85 297 # Restart under the correct shell.
cannam@85 298 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
cannam@85 299 fi
cannam@85 300
cannam@85 301 if test "X[$]1" = X--fallback-echo; then
cannam@85 302 # used as fallback echo
cannam@85 303 shift
cannam@85 304 cat <<EOF
cannam@85 305 [$]*
cannam@85 306 EOF
cannam@85 307 exit 0
cannam@85 308 fi
cannam@85 309
cannam@85 310 # The HP-UX ksh and POSIX shell print the target directory to stdout
cannam@85 311 # if CDPATH is set.
cannam@85 312 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
cannam@85 313
cannam@85 314 if test -z "$ECHO"; then
cannam@85 315 if test "X${echo_test_string+set}" != Xset; then
cannam@85 316 # find a string as large as possible, as long as the shell can cope with it
cannam@85 317 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
cannam@85 318 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
cannam@85 319 if (echo_test_string="`eval $cmd`") 2>/dev/null &&
cannam@85 320 echo_test_string="`eval $cmd`" &&
cannam@85 321 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
cannam@85 322 then
cannam@85 323 break
cannam@85 324 fi
cannam@85 325 done
cannam@85 326 fi
cannam@85 327
cannam@85 328 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
cannam@85 329 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
cannam@85 330 test "X$echo_testing_string" = "X$echo_test_string"; then
cannam@85 331 :
cannam@85 332 else
cannam@85 333 # The Solaris, AIX, and Digital Unix default echo programs unquote
cannam@85 334 # backslashes. This makes it impossible to quote backslashes using
cannam@85 335 # echo "$something" | sed 's/\\/\\\\/g'
cannam@85 336 #
cannam@85 337 # So, first we look for a working echo in the user's PATH.
cannam@85 338
cannam@85 339 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
cannam@85 340 for dir in $PATH /usr/ucb; do
cannam@85 341 IFS="$lt_save_ifs"
cannam@85 342 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
cannam@85 343 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
cannam@85 344 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
cannam@85 345 test "X$echo_testing_string" = "X$echo_test_string"; then
cannam@85 346 echo="$dir/echo"
cannam@85 347 break
cannam@85 348 fi
cannam@85 349 done
cannam@85 350 IFS="$lt_save_ifs"
cannam@85 351
cannam@85 352 if test "X$echo" = Xecho; then
cannam@85 353 # We didn't find a better echo, so look for alternatives.
cannam@85 354 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
cannam@85 355 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
cannam@85 356 test "X$echo_testing_string" = "X$echo_test_string"; then
cannam@85 357 # This shell has a builtin print -r that does the trick.
cannam@85 358 echo='print -r'
cannam@85 359 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
cannam@85 360 test "X$CONFIG_SHELL" != X/bin/ksh; then
cannam@85 361 # If we have ksh, try running configure again with it.
cannam@85 362 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
cannam@85 363 export ORIGINAL_CONFIG_SHELL
cannam@85 364 CONFIG_SHELL=/bin/ksh
cannam@85 365 export CONFIG_SHELL
cannam@85 366 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
cannam@85 367 else
cannam@85 368 # Try using printf.
cannam@85 369 echo='printf %s\n'
cannam@85 370 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
cannam@85 371 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
cannam@85 372 test "X$echo_testing_string" = "X$echo_test_string"; then
cannam@85 373 # Cool, printf works
cannam@85 374 :
cannam@85 375 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
cannam@85 376 test "X$echo_testing_string" = 'X\t' &&
cannam@85 377 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
cannam@85 378 test "X$echo_testing_string" = "X$echo_test_string"; then
cannam@85 379 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
cannam@85 380 export CONFIG_SHELL
cannam@85 381 SHELL="$CONFIG_SHELL"
cannam@85 382 export SHELL
cannam@85 383 echo="$CONFIG_SHELL [$]0 --fallback-echo"
cannam@85 384 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
cannam@85 385 test "X$echo_testing_string" = 'X\t' &&
cannam@85 386 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
cannam@85 387 test "X$echo_testing_string" = "X$echo_test_string"; then
cannam@85 388 echo="$CONFIG_SHELL [$]0 --fallback-echo"
cannam@85 389 else
cannam@85 390 # maybe with a smaller string...
cannam@85 391 prev=:
cannam@85 392
cannam@85 393 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
cannam@85 394 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
cannam@85 395 then
cannam@85 396 break
cannam@85 397 fi
cannam@85 398 prev="$cmd"
cannam@85 399 done
cannam@85 400
cannam@85 401 if test "$prev" != 'sed 50q "[$]0"'; then
cannam@85 402 echo_test_string=`eval $prev`
cannam@85 403 export echo_test_string
cannam@85 404 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
cannam@85 405 else
cannam@85 406 # Oops. We lost completely, so just stick with echo.
cannam@85 407 echo=echo
cannam@85 408 fi
cannam@85 409 fi
cannam@85 410 fi
cannam@85 411 fi
cannam@85 412 fi
cannam@85 413 fi
cannam@85 414
cannam@85 415 # Copy echo and quote the copy suitably for passing to libtool from
cannam@85 416 # the Makefile, instead of quoting the original, which is used later.
cannam@85 417 ECHO=$echo
cannam@85 418 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
cannam@85 419 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
cannam@85 420 fi
cannam@85 421
cannam@85 422 AC_SUBST(ECHO)
cannam@85 423 ])])# _LT_AC_PROG_ECHO_BACKSLASH
cannam@85 424
cannam@85 425
cannam@85 426 # _LT_AC_LOCK
cannam@85 427 # -----------
cannam@85 428 AC_DEFUN([_LT_AC_LOCK],
cannam@85 429 [AC_ARG_ENABLE([libtool-lock],
cannam@85 430 [AC_HELP_STRING([--disable-libtool-lock],
cannam@85 431 [avoid locking (might break parallel builds)])])
cannam@85 432 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
cannam@85 433
cannam@85 434 # Some flags need to be propagated to the compiler or linker for good
cannam@85 435 # libtool support.
cannam@85 436 case $host in
cannam@85 437 ia64-*-hpux*)
cannam@85 438 # Find out which ABI we are using.
cannam@85 439 echo 'int i;' > conftest.$ac_ext
cannam@85 440 if AC_TRY_EVAL(ac_compile); then
cannam@85 441 case `/usr/bin/file conftest.$ac_objext` in
cannam@85 442 *ELF-32*)
cannam@85 443 HPUX_IA64_MODE="32"
cannam@85 444 ;;
cannam@85 445 *ELF-64*)
cannam@85 446 HPUX_IA64_MODE="64"
cannam@85 447 ;;
cannam@85 448 esac
cannam@85 449 fi
cannam@85 450 rm -rf conftest*
cannam@85 451 ;;
cannam@85 452 *-*-irix6*)
cannam@85 453 # Find out which ABI we are using.
cannam@85 454 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
cannam@85 455 if AC_TRY_EVAL(ac_compile); then
cannam@85 456 if test "$lt_cv_prog_gnu_ld" = yes; then
cannam@85 457 case `/usr/bin/file conftest.$ac_objext` in
cannam@85 458 *32-bit*)
cannam@85 459 LD="${LD-ld} -melf32bsmip"
cannam@85 460 ;;
cannam@85 461 *N32*)
cannam@85 462 LD="${LD-ld} -melf32bmipn32"
cannam@85 463 ;;
cannam@85 464 *64-bit*)
cannam@85 465 LD="${LD-ld} -melf64bmip"
cannam@85 466 ;;
cannam@85 467 esac
cannam@85 468 else
cannam@85 469 case `/usr/bin/file conftest.$ac_objext` in
cannam@85 470 *32-bit*)
cannam@85 471 LD="${LD-ld} -32"
cannam@85 472 ;;
cannam@85 473 *N32*)
cannam@85 474 LD="${LD-ld} -n32"
cannam@85 475 ;;
cannam@85 476 *64-bit*)
cannam@85 477 LD="${LD-ld} -64"
cannam@85 478 ;;
cannam@85 479 esac
cannam@85 480 fi
cannam@85 481 fi
cannam@85 482 rm -rf conftest*
cannam@85 483 ;;
cannam@85 484
cannam@85 485 x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
cannam@85 486 # Find out which ABI we are using.
cannam@85 487 echo 'int i;' > conftest.$ac_ext
cannam@85 488 if AC_TRY_EVAL(ac_compile); then
cannam@85 489 case "`/usr/bin/file conftest.o`" in
cannam@85 490 *32-bit*)
cannam@85 491 case $host in
cannam@85 492 x86_64-*linux*)
cannam@85 493 LD="${LD-ld} -m elf_i386"
cannam@85 494 ;;
cannam@85 495 ppc64-*linux*|powerpc64-*linux*)
cannam@85 496 LD="${LD-ld} -m elf32ppclinux"
cannam@85 497 ;;
cannam@85 498 s390x-*linux*)
cannam@85 499 LD="${LD-ld} -m elf_s390"
cannam@85 500 ;;
cannam@85 501 sparc64-*linux*)
cannam@85 502 LD="${LD-ld} -m elf32_sparc"
cannam@85 503 ;;
cannam@85 504 esac
cannam@85 505 ;;
cannam@85 506 *64-bit*)
cannam@85 507 case $host in
cannam@85 508 x86_64-*linux*)
cannam@85 509 LD="${LD-ld} -m elf_x86_64"
cannam@85 510 ;;
cannam@85 511 ppc*-*linux*|powerpc*-*linux*)
cannam@85 512 LD="${LD-ld} -m elf64ppc"
cannam@85 513 ;;
cannam@85 514 s390*-*linux*)
cannam@85 515 LD="${LD-ld} -m elf64_s390"
cannam@85 516 ;;
cannam@85 517 sparc*-*linux*)
cannam@85 518 LD="${LD-ld} -m elf64_sparc"
cannam@85 519 ;;
cannam@85 520 esac
cannam@85 521 ;;
cannam@85 522 esac
cannam@85 523 fi
cannam@85 524 rm -rf conftest*
cannam@85 525 ;;
cannam@85 526
cannam@85 527 *-*-sco3.2v5*)
cannam@85 528 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
cannam@85 529 SAVE_CFLAGS="$CFLAGS"
cannam@85 530 CFLAGS="$CFLAGS -belf"
cannam@85 531 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
cannam@85 532 [AC_LANG_PUSH(C)
cannam@85 533 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
cannam@85 534 AC_LANG_POP])
cannam@85 535 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
cannam@85 536 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
cannam@85 537 CFLAGS="$SAVE_CFLAGS"
cannam@85 538 fi
cannam@85 539 ;;
cannam@85 540 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
cannam@85 541 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
cannam@85 542 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
cannam@85 543 AC_CHECK_TOOL(AS, as, false)
cannam@85 544 AC_CHECK_TOOL(OBJDUMP, objdump, false)
cannam@85 545 ;;
cannam@85 546 ])
cannam@85 547 esac
cannam@85 548
cannam@85 549 need_locks="$enable_libtool_lock"
cannam@85 550
cannam@85 551 ])# _LT_AC_LOCK
cannam@85 552
cannam@85 553
cannam@85 554 # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
cannam@85 555 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
cannam@85 556 # ----------------------------------------------------------------
cannam@85 557 # Check whether the given compiler option works
cannam@85 558 AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
cannam@85 559 [AC_REQUIRE([LT_AC_PROG_SED])
cannam@85 560 AC_CACHE_CHECK([$1], [$2],
cannam@85 561 [$2=no
cannam@85 562 ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
cannam@85 563 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
cannam@85 564 lt_compiler_flag="$3"
cannam@85 565 # Insert the option either (1) after the last *FLAGS variable, or
cannam@85 566 # (2) before a word containing "conftest.", or (3) at the end.
cannam@85 567 # Note that $ac_compile itself does not contain backslashes and begins
cannam@85 568 # with a dollar sign (not a hyphen), so the echo should work correctly.
cannam@85 569 # The option is referenced via a variable to avoid confusing sed.
cannam@85 570 lt_compile=`echo "$ac_compile" | $SED \
cannam@85 571 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
cannam@85 572 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
cannam@85 573 -e 's:$: $lt_compiler_flag:'`
cannam@85 574 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
cannam@85 575 (eval "$lt_compile" 2>conftest.err)
cannam@85 576 ac_status=$?
cannam@85 577 cat conftest.err >&AS_MESSAGE_LOG_FD
cannam@85 578 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
cannam@85 579 if (exit $ac_status) && test -s "$ac_outfile"; then
cannam@85 580 # The compiler can only warn and ignore the option if not recognized
cannam@85 581 # So say no if there are warnings
cannam@85 582 if test ! -s conftest.err; then
cannam@85 583 $2=yes
cannam@85 584 fi
cannam@85 585 fi
cannam@85 586 $rm conftest*
cannam@85 587 ])
cannam@85 588
cannam@85 589 if test x"[$]$2" = xyes; then
cannam@85 590 ifelse([$5], , :, [$5])
cannam@85 591 else
cannam@85 592 ifelse([$6], , :, [$6])
cannam@85 593 fi
cannam@85 594 ])# AC_LIBTOOL_COMPILER_OPTION
cannam@85 595
cannam@85 596
cannam@85 597 # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
cannam@85 598 # [ACTION-SUCCESS], [ACTION-FAILURE])
cannam@85 599 # ------------------------------------------------------------
cannam@85 600 # Check whether the given compiler option works
cannam@85 601 AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
cannam@85 602 [AC_CACHE_CHECK([$1], [$2],
cannam@85 603 [$2=no
cannam@85 604 save_LDFLAGS="$LDFLAGS"
cannam@85 605 LDFLAGS="$LDFLAGS $3"
cannam@85 606 printf "$lt_simple_link_test_code" > conftest.$ac_ext
cannam@85 607 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
cannam@85 608 # The compiler can only warn and ignore the option if not recognized
cannam@85 609 # So say no if there are warnings
cannam@85 610 if test -s conftest.err; then
cannam@85 611 # Append any errors to the config.log.
cannam@85 612 cat conftest.err 1>&AS_MESSAGE_LOG_FD
cannam@85 613 else
cannam@85 614 $2=yes
cannam@85 615 fi
cannam@85 616 fi
cannam@85 617 $rm conftest*
cannam@85 618 LDFLAGS="$save_LDFLAGS"
cannam@85 619 ])
cannam@85 620
cannam@85 621 if test x"[$]$2" = xyes; then
cannam@85 622 ifelse([$4], , :, [$4])
cannam@85 623 else
cannam@85 624 ifelse([$5], , :, [$5])
cannam@85 625 fi
cannam@85 626 ])# AC_LIBTOOL_LINKER_OPTION
cannam@85 627
cannam@85 628
cannam@85 629 # AC_LIBTOOL_SYS_MAX_CMD_LEN
cannam@85 630 # --------------------------
cannam@85 631 AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
cannam@85 632 [# find the maximum length of command line arguments
cannam@85 633 AC_MSG_CHECKING([the maximum length of command line arguments])
cannam@85 634 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
cannam@85 635 i=0
cannam@85 636 testring="ABCD"
cannam@85 637
cannam@85 638 case $build_os in
cannam@85 639 msdosdjgpp*)
cannam@85 640 # On DJGPP, this test can blow up pretty badly due to problems in libc
cannam@85 641 # (any single argument exceeding 2000 bytes causes a buffer overrun
cannam@85 642 # during glob expansion). Even if it were fixed, the result of this
cannam@85 643 # check would be larger than it should be.
cannam@85 644 lt_cv_sys_max_cmd_len=12288; # 12K is about right
cannam@85 645 ;;
cannam@85 646
cannam@85 647 gnu*)
cannam@85 648 # Under GNU Hurd, this test is not required because there is
cannam@85 649 # no limit to the length of command line arguments.
cannam@85 650 # Libtool will interpret -1 as no limit whatsoever
cannam@85 651 lt_cv_sys_max_cmd_len=-1;
cannam@85 652 ;;
cannam@85 653
cannam@85 654 cygwin* | mingw*)
cannam@85 655 # On Win9x/ME, this test blows up -- it succeeds, but takes
cannam@85 656 # about 5 minutes as the teststring grows exponentially.
cannam@85 657 # Worse, since 9x/ME are not pre-emptively multitasking,
cannam@85 658 # you end up with a "frozen" computer, even though with patience
cannam@85 659 # the test eventually succeeds (with a max line length of 256k).
cannam@85 660 # Instead, let's just punt: use the minimum linelength reported by
cannam@85 661 # all of the supported platforms: 8192 (on NT/2K/XP).
cannam@85 662 lt_cv_sys_max_cmd_len=8192;
cannam@85 663 ;;
cannam@85 664
cannam@85 665 amigaos*)
cannam@85 666 # On AmigaOS with pdksh, this test takes hours, literally.
cannam@85 667 # So we just punt and use a minimum line length of 8192.
cannam@85 668 lt_cv_sys_max_cmd_len=8192;
cannam@85 669 ;;
cannam@85 670
cannam@85 671 *)
cannam@85 672 # If test is not a shell built-in, we'll probably end up computing a
cannam@85 673 # maximum length that is only half of the actual maximum length, but
cannam@85 674 # we can't tell.
cannam@85 675 while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$testring" 2>/dev/null` \
cannam@85 676 = "XX$testring") >/dev/null 2>&1 &&
cannam@85 677 new_result=`expr "X$testring" : ".*" 2>&1` &&
cannam@85 678 lt_cv_sys_max_cmd_len=$new_result &&
cannam@85 679 test $i != 17 # 1/2 MB should be enough
cannam@85 680 do
cannam@85 681 i=`expr $i + 1`
cannam@85 682 testring=$testring$testring
cannam@85 683 done
cannam@85 684 testring=
cannam@85 685 # Add a significant safety factor because C++ compilers can tack on massive
cannam@85 686 # amounts of additional arguments before passing them to the linker.
cannam@85 687 # It appears as though 1/2 is a usable value.
cannam@85 688 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
cannam@85 689 ;;
cannam@85 690 esac
cannam@85 691 ])
cannam@85 692 if test -n $lt_cv_sys_max_cmd_len ; then
cannam@85 693 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
cannam@85 694 else
cannam@85 695 AC_MSG_RESULT(none)
cannam@85 696 fi
cannam@85 697 ])# AC_LIBTOOL_SYS_MAX_CMD_LEN
cannam@85 698
cannam@85 699
cannam@85 700 # _LT_AC_CHECK_DLFCN
cannam@85 701 # --------------------
cannam@85 702 AC_DEFUN([_LT_AC_CHECK_DLFCN],
cannam@85 703 [AC_CHECK_HEADERS(dlfcn.h)dnl
cannam@85 704 ])# _LT_AC_CHECK_DLFCN
cannam@85 705
cannam@85 706
cannam@85 707 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
cannam@85 708 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
cannam@85 709 # ------------------------------------------------------------------
cannam@85 710 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
cannam@85 711 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
cannam@85 712 if test "$cross_compiling" = yes; then :
cannam@85 713 [$4]
cannam@85 714 else
cannam@85 715 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
cannam@85 716 lt_status=$lt_dlunknown
cannam@85 717 cat > conftest.$ac_ext <<EOF
cannam@85 718 [#line __oline__ "configure"
cannam@85 719 #include "confdefs.h"
cannam@85 720
cannam@85 721 #if HAVE_DLFCN_H
cannam@85 722 #include <dlfcn.h>
cannam@85 723 #endif
cannam@85 724
cannam@85 725 #include <stdio.h>
cannam@85 726
cannam@85 727 #ifdef RTLD_GLOBAL
cannam@85 728 # define LT_DLGLOBAL RTLD_GLOBAL
cannam@85 729 #else
cannam@85 730 # ifdef DL_GLOBAL
cannam@85 731 # define LT_DLGLOBAL DL_GLOBAL
cannam@85 732 # else
cannam@85 733 # define LT_DLGLOBAL 0
cannam@85 734 # endif
cannam@85 735 #endif
cannam@85 736
cannam@85 737 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
cannam@85 738 find out it does not work in some platform. */
cannam@85 739 #ifndef LT_DLLAZY_OR_NOW
cannam@85 740 # ifdef RTLD_LAZY
cannam@85 741 # define LT_DLLAZY_OR_NOW RTLD_LAZY
cannam@85 742 # else
cannam@85 743 # ifdef DL_LAZY
cannam@85 744 # define LT_DLLAZY_OR_NOW DL_LAZY
cannam@85 745 # else
cannam@85 746 # ifdef RTLD_NOW
cannam@85 747 # define LT_DLLAZY_OR_NOW RTLD_NOW
cannam@85 748 # else
cannam@85 749 # ifdef DL_NOW
cannam@85 750 # define LT_DLLAZY_OR_NOW DL_NOW
cannam@85 751 # else
cannam@85 752 # define LT_DLLAZY_OR_NOW 0
cannam@85 753 # endif
cannam@85 754 # endif
cannam@85 755 # endif
cannam@85 756 # endif
cannam@85 757 #endif
cannam@85 758
cannam@85 759 #ifdef __cplusplus
cannam@85 760 extern "C" void exit (int);
cannam@85 761 #endif
cannam@85 762
cannam@85 763 void fnord() { int i=42;}
cannam@85 764 int main ()
cannam@85 765 {
cannam@85 766 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
cannam@85 767 int status = $lt_dlunknown;
cannam@85 768
cannam@85 769 if (self)
cannam@85 770 {
cannam@85 771 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
cannam@85 772 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
cannam@85 773 /* dlclose (self); */
cannam@85 774 }
cannam@85 775
cannam@85 776 exit (status);
cannam@85 777 }]
cannam@85 778 EOF
cannam@85 779 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
cannam@85 780 (./conftest; exit; ) 2>/dev/null
cannam@85 781 lt_status=$?
cannam@85 782 case x$lt_status in
cannam@85 783 x$lt_dlno_uscore) $1 ;;
cannam@85 784 x$lt_dlneed_uscore) $2 ;;
cannam@85 785 x$lt_unknown|x*) $3 ;;
cannam@85 786 esac
cannam@85 787 else :
cannam@85 788 # compilation failed
cannam@85 789 $3
cannam@85 790 fi
cannam@85 791 fi
cannam@85 792 rm -fr conftest*
cannam@85 793 ])# _LT_AC_TRY_DLOPEN_SELF
cannam@85 794
cannam@85 795
cannam@85 796 # AC_LIBTOOL_DLOPEN_SELF
cannam@85 797 # -------------------
cannam@85 798 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
cannam@85 799 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
cannam@85 800 if test "x$enable_dlopen" != xyes; then
cannam@85 801 enable_dlopen=unknown
cannam@85 802 enable_dlopen_self=unknown
cannam@85 803 enable_dlopen_self_static=unknown
cannam@85 804 else
cannam@85 805 lt_cv_dlopen=no
cannam@85 806 lt_cv_dlopen_libs=
cannam@85 807
cannam@85 808 case $host_os in
cannam@85 809 beos*)
cannam@85 810 lt_cv_dlopen="load_add_on"
cannam@85 811 lt_cv_dlopen_libs=
cannam@85 812 lt_cv_dlopen_self=yes
cannam@85 813 ;;
cannam@85 814
cannam@85 815 mingw* | pw32*)
cannam@85 816 lt_cv_dlopen="LoadLibrary"
cannam@85 817 lt_cv_dlopen_libs=
cannam@85 818 ;;
cannam@85 819
cannam@85 820 cygwin*)
cannam@85 821 lt_cv_dlopen="dlopen"
cannam@85 822 lt_cv_dlopen_libs=
cannam@85 823 ;;
cannam@85 824
cannam@85 825 darwin*)
cannam@85 826 # if libdl is installed we need to link against it
cannam@85 827 AC_CHECK_LIB([dl], [dlopen],
cannam@85 828 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
cannam@85 829 lt_cv_dlopen="dyld"
cannam@85 830 lt_cv_dlopen_libs=
cannam@85 831 lt_cv_dlopen_self=yes
cannam@85 832 ])
cannam@85 833 ;;
cannam@85 834
cannam@85 835 *)
cannam@85 836 AC_CHECK_FUNC([shl_load],
cannam@85 837 [lt_cv_dlopen="shl_load"],
cannam@85 838 [AC_CHECK_LIB([dld], [shl_load],
cannam@85 839 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
cannam@85 840 [AC_CHECK_FUNC([dlopen],
cannam@85 841 [lt_cv_dlopen="dlopen"],
cannam@85 842 [AC_CHECK_LIB([dl], [dlopen],
cannam@85 843 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
cannam@85 844 [AC_CHECK_LIB([svld], [dlopen],
cannam@85 845 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
cannam@85 846 [AC_CHECK_LIB([dld], [dld_link],
cannam@85 847 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
cannam@85 848 ])
cannam@85 849 ])
cannam@85 850 ])
cannam@85 851 ])
cannam@85 852 ])
cannam@85 853 ;;
cannam@85 854 esac
cannam@85 855
cannam@85 856 if test "x$lt_cv_dlopen" != xno; then
cannam@85 857 enable_dlopen=yes
cannam@85 858 else
cannam@85 859 enable_dlopen=no
cannam@85 860 fi
cannam@85 861
cannam@85 862 case $lt_cv_dlopen in
cannam@85 863 dlopen)
cannam@85 864 save_CPPFLAGS="$CPPFLAGS"
cannam@85 865 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
cannam@85 866
cannam@85 867 save_LDFLAGS="$LDFLAGS"
cannam@85 868 eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
cannam@85 869
cannam@85 870 save_LIBS="$LIBS"
cannam@85 871 LIBS="$lt_cv_dlopen_libs $LIBS"
cannam@85 872
cannam@85 873 AC_CACHE_CHECK([whether a program can dlopen itself],
cannam@85 874 lt_cv_dlopen_self, [dnl
cannam@85 875 _LT_AC_TRY_DLOPEN_SELF(
cannam@85 876 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
cannam@85 877 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
cannam@85 878 ])
cannam@85 879
cannam@85 880 if test "x$lt_cv_dlopen_self" = xyes; then
cannam@85 881 LDFLAGS="$LDFLAGS $link_static_flag"
cannam@85 882 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
cannam@85 883 lt_cv_dlopen_self_static, [dnl
cannam@85 884 _LT_AC_TRY_DLOPEN_SELF(
cannam@85 885 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
cannam@85 886 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
cannam@85 887 ])
cannam@85 888 fi
cannam@85 889
cannam@85 890 CPPFLAGS="$save_CPPFLAGS"
cannam@85 891 LDFLAGS="$save_LDFLAGS"
cannam@85 892 LIBS="$save_LIBS"
cannam@85 893 ;;
cannam@85 894 esac
cannam@85 895
cannam@85 896 case $lt_cv_dlopen_self in
cannam@85 897 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
cannam@85 898 *) enable_dlopen_self=unknown ;;
cannam@85 899 esac
cannam@85 900
cannam@85 901 case $lt_cv_dlopen_self_static in
cannam@85 902 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
cannam@85 903 *) enable_dlopen_self_static=unknown ;;
cannam@85 904 esac
cannam@85 905 fi
cannam@85 906 ])# AC_LIBTOOL_DLOPEN_SELF
cannam@85 907
cannam@85 908
cannam@85 909 # AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
cannam@85 910 # ---------------------------------
cannam@85 911 # Check to see if options -c and -o are simultaneously supported by compiler
cannam@85 912 AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
cannam@85 913 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
cannam@85 914 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
cannam@85 915 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
cannam@85 916 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
cannam@85 917 $rm -r conftest 2>/dev/null
cannam@85 918 mkdir conftest
cannam@85 919 cd conftest
cannam@85 920 mkdir out
cannam@85 921 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
cannam@85 922
cannam@85 923 lt_compiler_flag="-o out/conftest2.$ac_objext"
cannam@85 924 # Insert the option either (1) after the last *FLAGS variable, or
cannam@85 925 # (2) before a word containing "conftest.", or (3) at the end.
cannam@85 926 # Note that $ac_compile itself does not contain backslashes and begins
cannam@85 927 # with a dollar sign (not a hyphen), so the echo should work correctly.
cannam@85 928 lt_compile=`echo "$ac_compile" | $SED \
cannam@85 929 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
cannam@85 930 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
cannam@85 931 -e 's:$: $lt_compiler_flag:'`
cannam@85 932 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
cannam@85 933 (eval "$lt_compile" 2>out/conftest.err)
cannam@85 934 ac_status=$?
cannam@85 935 cat out/conftest.err >&AS_MESSAGE_LOG_FD
cannam@85 936 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
cannam@85 937 if (exit $ac_status) && test -s out/conftest2.$ac_objext
cannam@85 938 then
cannam@85 939 # The compiler can only warn and ignore the option if not recognized
cannam@85 940 # So say no if there are warnings
cannam@85 941 if test ! -s out/conftest.err; then
cannam@85 942 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
cannam@85 943 fi
cannam@85 944 fi
cannam@85 945 chmod u+w .
cannam@85 946 $rm conftest*
cannam@85 947 # SGI C++ compiler will create directory out/ii_files/ for
cannam@85 948 # template instantiation
cannam@85 949 test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
cannam@85 950 $rm out/* && rmdir out
cannam@85 951 cd ..
cannam@85 952 rmdir conftest
cannam@85 953 $rm conftest*
cannam@85 954 ])
cannam@85 955 ])# AC_LIBTOOL_PROG_CC_C_O
cannam@85 956
cannam@85 957
cannam@85 958 # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
cannam@85 959 # -----------------------------------------
cannam@85 960 # Check to see if we can do hard links to lock some files if needed
cannam@85 961 AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
cannam@85 962 [AC_REQUIRE([_LT_AC_LOCK])dnl
cannam@85 963
cannam@85 964 hard_links="nottested"
cannam@85 965 if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
cannam@85 966 # do not overwrite the value of need_locks provided by the user
cannam@85 967 AC_MSG_CHECKING([if we can lock with hard links])
cannam@85 968 hard_links=yes
cannam@85 969 $rm conftest*
cannam@85 970 ln conftest.a conftest.b 2>/dev/null && hard_links=no
cannam@85 971 touch conftest.a
cannam@85 972 ln conftest.a conftest.b 2>&5 || hard_links=no
cannam@85 973 ln conftest.a conftest.b 2>/dev/null && hard_links=no
cannam@85 974 AC_MSG_RESULT([$hard_links])
cannam@85 975 if test "$hard_links" = no; then
cannam@85 976 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
cannam@85 977 need_locks=warn
cannam@85 978 fi
cannam@85 979 else
cannam@85 980 need_locks=no
cannam@85 981 fi
cannam@85 982 ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
cannam@85 983
cannam@85 984
cannam@85 985 # AC_LIBTOOL_OBJDIR
cannam@85 986 # -----------------
cannam@85 987 AC_DEFUN([AC_LIBTOOL_OBJDIR],
cannam@85 988 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
cannam@85 989 [rm -f .libs 2>/dev/null
cannam@85 990 mkdir .libs 2>/dev/null
cannam@85 991 if test -d .libs; then
cannam@85 992 lt_cv_objdir=.libs
cannam@85 993 else
cannam@85 994 # MS-DOS does not allow filenames that begin with a dot.
cannam@85 995 lt_cv_objdir=_libs
cannam@85 996 fi
cannam@85 997 rmdir .libs 2>/dev/null])
cannam@85 998 objdir=$lt_cv_objdir
cannam@85 999 ])# AC_LIBTOOL_OBJDIR
cannam@85 1000
cannam@85 1001
cannam@85 1002 # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
cannam@85 1003 # ----------------------------------------------
cannam@85 1004 # Check hardcoding attributes.
cannam@85 1005 AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
cannam@85 1006 [AC_MSG_CHECKING([how to hardcode library paths into programs])
cannam@85 1007 _LT_AC_TAGVAR(hardcode_action, $1)=
cannam@85 1008 if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
cannam@85 1009 test -n "$_LT_AC_TAGVAR(runpath_var $1)" || \
cannam@85 1010 test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)"="Xyes" ; then
cannam@85 1011
cannam@85 1012 # We can hardcode non-existant directories.
cannam@85 1013 if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
cannam@85 1014 # If the only mechanism to avoid hardcoding is shlibpath_var, we
cannam@85 1015 # have to relink, otherwise we might link with an installed library
cannam@85 1016 # when we should be linking with a yet-to-be-installed one
cannam@85 1017 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
cannam@85 1018 test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
cannam@85 1019 # Linking always hardcodes the temporary library directory.
cannam@85 1020 _LT_AC_TAGVAR(hardcode_action, $1)=relink
cannam@85 1021 else
cannam@85 1022 # We can link without hardcoding, and we can hardcode nonexisting dirs.
cannam@85 1023 _LT_AC_TAGVAR(hardcode_action, $1)=immediate
cannam@85 1024 fi
cannam@85 1025 else
cannam@85 1026 # We cannot hardcode anything, or else we can only hardcode existing
cannam@85 1027 # directories.
cannam@85 1028 _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
cannam@85 1029 fi
cannam@85 1030 AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
cannam@85 1031
cannam@85 1032 if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
cannam@85 1033 # Fast installation is not supported
cannam@85 1034 enable_fast_install=no
cannam@85 1035 elif test "$shlibpath_overrides_runpath" = yes ||
cannam@85 1036 test "$enable_shared" = no; then
cannam@85 1037 # Fast installation is not necessary
cannam@85 1038 enable_fast_install=needless
cannam@85 1039 fi
cannam@85 1040 ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
cannam@85 1041
cannam@85 1042
cannam@85 1043 # AC_LIBTOOL_SYS_LIB_STRIP
cannam@85 1044 # ------------------------
cannam@85 1045 AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
cannam@85 1046 [striplib=
cannam@85 1047 old_striplib=
cannam@85 1048 AC_MSG_CHECKING([whether stripping libraries is possible])
cannam@85 1049 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
cannam@85 1050 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
cannam@85 1051 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
cannam@85 1052 AC_MSG_RESULT([yes])
cannam@85 1053 else
cannam@85 1054 # FIXME - insert some real tests, host_os isn't really good enough
cannam@85 1055 case $host_os in
cannam@85 1056 darwin*)
cannam@85 1057 if test -n "$STRIP" ; then
cannam@85 1058 striplib="$STRIP -x"
cannam@85 1059 AC_MSG_RESULT([yes])
cannam@85 1060 else
cannam@85 1061 AC_MSG_RESULT([no])
cannam@85 1062 fi
cannam@85 1063 ;;
cannam@85 1064 *)
cannam@85 1065 AC_MSG_RESULT([no])
cannam@85 1066 ;;
cannam@85 1067 esac
cannam@85 1068 fi
cannam@85 1069 ])# AC_LIBTOOL_SYS_LIB_STRIP
cannam@85 1070
cannam@85 1071
cannam@85 1072 # AC_LIBTOOL_SYS_DYNAMIC_LINKER
cannam@85 1073 # -----------------------------
cannam@85 1074 # PORTME Fill in your ld.so characteristics
cannam@85 1075 AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
cannam@85 1076 [AC_MSG_CHECKING([dynamic linker characteristics])
cannam@85 1077 library_names_spec=
cannam@85 1078 libname_spec='lib$name'
cannam@85 1079 soname_spec=
cannam@85 1080 shrext=".so"
cannam@85 1081 postinstall_cmds=
cannam@85 1082 postuninstall_cmds=
cannam@85 1083 finish_cmds=
cannam@85 1084 finish_eval=
cannam@85 1085 shlibpath_var=
cannam@85 1086 shlibpath_overrides_runpath=unknown
cannam@85 1087 version_type=none
cannam@85 1088 dynamic_linker="$host_os ld.so"
cannam@85 1089 sys_lib_dlsearch_path_spec="/lib /usr/lib"
cannam@85 1090 if test "$GCC" = yes; then
cannam@85 1091 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
cannam@85 1092 if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
cannam@85 1093 # if the path contains ";" then we assume it to be the separator
cannam@85 1094 # otherwise default to the standard path separator (i.e. ":") - it is
cannam@85 1095 # assumed that no part of a normal pathname contains ";" but that should
cannam@85 1096 # okay in the real world where ";" in dirpaths is itself problematic.
cannam@85 1097 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
cannam@85 1098 else
cannam@85 1099 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
cannam@85 1100 fi
cannam@85 1101 else
cannam@85 1102 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
cannam@85 1103 fi
cannam@85 1104 need_lib_prefix=unknown
cannam@85 1105 hardcode_into_libs=no
cannam@85 1106
cannam@85 1107 # when you set need_version to no, make sure it does not cause -set_version
cannam@85 1108 # flags to be left without arguments
cannam@85 1109 need_version=unknown
cannam@85 1110
cannam@85 1111 case $host_os in
cannam@85 1112 aix3*)
cannam@85 1113 version_type=linux
cannam@85 1114 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
cannam@85 1115 shlibpath_var=LIBPATH
cannam@85 1116
cannam@85 1117 # AIX 3 has no versioning support, so we append a major version to the name.
cannam@85 1118 soname_spec='${libname}${release}${shared_ext}$major'
cannam@85 1119 ;;
cannam@85 1120
cannam@85 1121 aix4* | aix5*)
cannam@85 1122 version_type=linux
cannam@85 1123 need_lib_prefix=no
cannam@85 1124 need_version=no
cannam@85 1125 hardcode_into_libs=yes
cannam@85 1126 if test "$host_cpu" = ia64; then
cannam@85 1127 # AIX 5 supports IA64
cannam@85 1128 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
cannam@85 1129 shlibpath_var=LD_LIBRARY_PATH
cannam@85 1130 else
cannam@85 1131 # With GCC up to 2.95.x, collect2 would create an import file
cannam@85 1132 # for dependence libraries. The import file would start with
cannam@85 1133 # the line `#! .'. This would cause the generated library to
cannam@85 1134 # depend on `.', always an invalid library. This was fixed in
cannam@85 1135 # development snapshots of GCC prior to 3.0.
cannam@85 1136 case $host_os in
cannam@85 1137 aix4 | aix4.[[01]] | aix4.[[01]].*)
cannam@85 1138 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
cannam@85 1139 echo ' yes '
cannam@85 1140 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
cannam@85 1141 :
cannam@85 1142 else
cannam@85 1143 can_build_shared=no
cannam@85 1144 fi
cannam@85 1145 ;;
cannam@85 1146 esac
cannam@85 1147 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
cannam@85 1148 # soname into executable. Probably we can add versioning support to
cannam@85 1149 # collect2, so additional links can be useful in future.
cannam@85 1150 if test "$aix_use_runtimelinking" = yes; then
cannam@85 1151 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
cannam@85 1152 # instead of lib<name>.a to let people know that these are not
cannam@85 1153 # typical AIX shared libraries.
cannam@85 1154 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
cannam@85 1155 else
cannam@85 1156 # We preserve .a as extension for shared libraries through AIX4.2
cannam@85 1157 # and later when we are not doing run time linking.
cannam@85 1158 library_names_spec='${libname}${release}.a $libname.a'
cannam@85 1159 soname_spec='${libname}${release}${shared_ext}$major'
cannam@85 1160 fi
cannam@85 1161 shlibpath_var=LIBPATH
cannam@85 1162 fi
cannam@85 1163 ;;
cannam@85 1164
cannam@85 1165 amigaos*)
cannam@85 1166 library_names_spec='$libname.ixlibrary $libname.a'
cannam@85 1167 # Create ${libname}_ixlibrary.a entries in /sys/libs.
cannam@85 1168 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'
cannam@85 1169 ;;
cannam@85 1170
cannam@85 1171 beos*)
cannam@85 1172 library_names_spec='${libname}${shared_ext}'
cannam@85 1173 dynamic_linker="$host_os ld.so"
cannam@85 1174 shlibpath_var=LIBRARY_PATH
cannam@85 1175 ;;
cannam@85 1176
cannam@85 1177 bsdi4*)
cannam@85 1178 version_type=linux
cannam@85 1179 need_version=no
cannam@85 1180 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
cannam@85 1181 soname_spec='${libname}${release}${shared_ext}$major'
cannam@85 1182 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
cannam@85 1183 shlibpath_var=LD_LIBRARY_PATH
cannam@85 1184 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
cannam@85 1185 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
cannam@85 1186 # the default ld.so.conf also contains /usr/contrib/lib and
cannam@85 1187 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
cannam@85 1188 # libtool to hard-code these into programs
cannam@85 1189 ;;
cannam@85 1190
cannam@85 1191 cygwin* | mingw* | pw32*)
cannam@85 1192 version_type=windows
cannam@85 1193 shrext=".dll"
cannam@85 1194 need_version=no
cannam@85 1195 need_lib_prefix=no
cannam@85 1196
cannam@85 1197 case $GCC,$host_os in
cannam@85 1198 yes,cygwin* | yes,mingw* | yes,pw32*)
cannam@85 1199 library_names_spec='$libname.dll.a'
cannam@85 1200 # DLL is installed to $(libdir)/../bin by postinstall_cmds
cannam@85 1201 postinstall_cmds='base_file=`basename \${file}`~
cannam@85 1202 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
cannam@85 1203 dldir=$destdir/`dirname \$dlpath`~
cannam@85 1204 test -d \$dldir || mkdir -p \$dldir~
cannam@85 1205 $install_prog $dir/$dlname \$dldir/$dlname'
cannam@85 1206 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
cannam@85 1207 dlpath=$dir/\$dldll~
cannam@85 1208 $rm \$dlpath'
cannam@85 1209 shlibpath_overrides_runpath=yes
cannam@85 1210
cannam@85 1211 case $host_os in
cannam@85 1212 cygwin*)
cannam@85 1213 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
cannam@85 1214 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
cannam@85 1215 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
cannam@85 1216 ;;
cannam@85 1217 mingw*)
cannam@85 1218 # MinGW DLLs use traditional 'lib' prefix
cannam@85 1219 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
cannam@85 1220 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
cannam@85 1221 if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
cannam@85 1222 # It is most probably a Windows format PATH printed by
cannam@85 1223 # mingw gcc, but we are running on Cygwin. Gcc prints its search
cannam@85 1224 # path with ; separators, and with drive letters. We can handle the
cannam@85 1225 # drive letters (cygwin fileutils understands them), so leave them,
cannam@85 1226 # especially as we might pass files found there to a mingw objdump,
cannam@85 1227 # which wouldn't understand a cygwinified path. Ahh.
cannam@85 1228 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
cannam@85 1229 else
cannam@85 1230 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
cannam@85 1231 fi
cannam@85 1232 ;;
cannam@85 1233 pw32*)
cannam@85 1234 # pw32 DLLs use 'pw' prefix rather than 'lib'
cannam@85 1235 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
cannam@85 1236 ;;
cannam@85 1237 esac
cannam@85 1238 ;;
cannam@85 1239
cannam@85 1240 *)
cannam@85 1241 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
cannam@85 1242 ;;
cannam@85 1243 esac
cannam@85 1244 dynamic_linker='Win32 ld.exe'
cannam@85 1245 # FIXME: first we should search . and the directory the executable is in
cannam@85 1246 shlibpath_var=PATH
cannam@85 1247 ;;
cannam@85 1248
cannam@85 1249 darwin* | rhapsody*)
cannam@85 1250 dynamic_linker="$host_os dyld"
cannam@85 1251 version_type=darwin
cannam@85 1252 need_lib_prefix=no
cannam@85 1253 need_version=no
cannam@85 1254 library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
cannam@85 1255 soname_spec='${libname}${release}${major}$shared_ext'
cannam@85 1256 shlibpath_overrides_runpath=yes
cannam@85 1257 shlibpath_var=DYLD_LIBRARY_PATH
cannam@85 1258 shrext='$(test .$module = .yes && echo .so || echo .dylib)'
cannam@85 1259 # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
cannam@85 1260 if test "$GCC" = yes; then
cannam@85 1261 sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
cannam@85 1262 else
cannam@85 1263 sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
cannam@85 1264 fi
cannam@85 1265 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
cannam@85 1266 ;;
cannam@85 1267
cannam@85 1268 dgux*)
cannam@85 1269 version_type=linux
cannam@85 1270 need_lib_prefix=no
cannam@85 1271 need_version=no
cannam@85 1272 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
cannam@85 1273 soname_spec='${libname}${release}${shared_ext}$major'
cannam@85 1274 shlibpath_var=LD_LIBRARY_PATH
cannam@85 1275 ;;
cannam@85 1276
cannam@85 1277 freebsd1*)
cannam@85 1278 dynamic_linker=no
cannam@85 1279 ;;
cannam@85 1280
cannam@85 1281 kfreebsd*-gnu)
cannam@85 1282 version_type=linux
cannam@85 1283 need_lib_prefix=no
cannam@85 1284 need_version=no
cannam@85 1285 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
cannam@85 1286 soname_spec='${libname}${release}${shared_ext}$major'
cannam@85 1287 shlibpath_var=LD_LIBRARY_PATH
cannam@85 1288 shlibpath_overrides_runpath=no
cannam@85 1289 hardcode_into_libs=yes
cannam@85 1290 dynamic_linker='GNU ld.so'
cannam@85 1291 ;;
cannam@85 1292
cannam@85 1293 freebsd*)
cannam@85 1294 objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
cannam@85 1295 version_type=freebsd-$objformat
cannam@85 1296 case $version_type in
cannam@85 1297 freebsd-elf*)
cannam@85 1298 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
cannam@85 1299 need_version=no
cannam@85 1300 need_lib_prefix=no
cannam@85 1301 ;;
cannam@85 1302 freebsd-*)
cannam@85 1303 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
cannam@85 1304 need_version=yes
cannam@85 1305 ;;
cannam@85 1306 esac
cannam@85 1307 shlibpath_var=LD_LIBRARY_PATH
cannam@85 1308 case $host_os in
cannam@85 1309 freebsd2*)
cannam@85 1310 shlibpath_overrides_runpath=yes
cannam@85 1311 ;;
cannam@85 1312 freebsd3.[01]* | freebsdelf3.[01]*)
cannam@85 1313 shlibpath_overrides_runpath=yes
cannam@85 1314 hardcode_into_libs=yes
cannam@85 1315 ;;
cannam@85 1316 *) # from 3.2 on
cannam@85 1317 shlibpath_overrides_runpath=no
cannam@85 1318 hardcode_into_libs=yes
cannam@85 1319 ;;
cannam@85 1320 esac
cannam@85 1321 ;;
cannam@85 1322
cannam@85 1323 gnu*)
cannam@85 1324 version_type=linux
cannam@85 1325 need_lib_prefix=no
cannam@85 1326 need_version=no
cannam@85 1327 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
cannam@85 1328 soname_spec='${libname}${release}${shared_ext}$major'
cannam@85 1329 shlibpath_var=LD_LIBRARY_PATH
cannam@85 1330 hardcode_into_libs=yes
cannam@85 1331 ;;
cannam@85 1332
cannam@85 1333 hpux9* | hpux10* | hpux11*)
cannam@85 1334 # Give a soname corresponding to the major version so that dld.sl refuses to
cannam@85 1335 # link against other versions.
cannam@85 1336 version_type=sunos
cannam@85 1337 need_lib_prefix=no
cannam@85 1338 need_version=no
cannam@85 1339 case "$host_cpu" in
cannam@85 1340 ia64*)
cannam@85 1341 shrext='.so'
cannam@85 1342 hardcode_into_libs=yes
cannam@85 1343 dynamic_linker="$host_os dld.so"
cannam@85 1344 shlibpath_var=LD_LIBRARY_PATH
cannam@85 1345 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
cannam@85 1346 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
cannam@85 1347 soname_spec='${libname}${release}${shared_ext}$major'
cannam@85 1348 if test "X$HPUX_IA64_MODE" = X32; then
cannam@85 1349 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
cannam@85 1350 else
cannam@85 1351 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
cannam@85 1352 fi
cannam@85 1353 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
cannam@85 1354 ;;
cannam@85 1355 hppa*64*)
cannam@85 1356 shrext='.sl'
cannam@85 1357 hardcode_into_libs=yes
cannam@85 1358 dynamic_linker="$host_os dld.sl"
cannam@85 1359 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
cannam@85 1360 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
cannam@85 1361 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
cannam@85 1362 soname_spec='${libname}${release}${shared_ext}$major'
cannam@85 1363 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
cannam@85 1364 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
cannam@85 1365 ;;
cannam@85 1366 *)
cannam@85 1367 shrext='.sl'
cannam@85 1368 dynamic_linker="$host_os dld.sl"
cannam@85 1369 shlibpath_var=SHLIB_PATH
cannam@85 1370 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
cannam@85 1371 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
cannam@85 1372 soname_spec='${libname}${release}${shared_ext}$major'
cannam@85 1373 ;;
cannam@85 1374 esac
cannam@85 1375 # HP-UX runs *really* slowly unless shared libraries are mode 555.
cannam@85 1376 postinstall_cmds='chmod 555 $lib'
cannam@85 1377 ;;
cannam@85 1378
cannam@85 1379 irix5* | irix6* | nonstopux*)
cannam@85 1380 case $host_os in
cannam@85 1381 nonstopux*) version_type=nonstopux ;;
cannam@85 1382 *)
cannam@85 1383 if test "$lt_cv_prog_gnu_ld" = yes; then
cannam@85 1384 version_type=linux
cannam@85 1385 else
cannam@85 1386 version_type=irix
cannam@85 1387 fi ;;
cannam@85 1388 esac
cannam@85 1389 need_lib_prefix=no
cannam@85 1390 need_version=no
cannam@85 1391 soname_spec='${libname}${release}${shared_ext}$major'
cannam@85 1392 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
cannam@85 1393 case $host_os in
cannam@85 1394 irix5* | nonstopux*)
cannam@85 1395 libsuff= shlibsuff=
cannam@85 1396 ;;
cannam@85 1397 *)
cannam@85 1398 case $LD in # libtool.m4 will add one of these switches to LD
cannam@85 1399 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
cannam@85 1400 libsuff= shlibsuff= libmagic=32-bit;;
cannam@85 1401 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
cannam@85 1402 libsuff=32 shlibsuff=N32 libmagic=N32;;
cannam@85 1403 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
cannam@85 1404 libsuff=64 shlibsuff=64 libmagic=64-bit;;
cannam@85 1405 *) libsuff= shlibsuff= libmagic=never-match;;
cannam@85 1406 esac
cannam@85 1407 ;;
cannam@85 1408 esac
cannam@85 1409 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
cannam@85 1410 shlibpath_overrides_runpath=no
cannam@85 1411 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
cannam@85 1412 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
cannam@85 1413 hardcode_into_libs=yes
cannam@85 1414 ;;
cannam@85 1415
cannam@85 1416 # No shared lib support for Linux oldld, aout, or coff.
cannam@85 1417 linux*oldld* | linux*aout* | linux*coff*)
cannam@85 1418 dynamic_linker=no
cannam@85 1419 ;;
cannam@85 1420
cannam@85 1421 # This must be Linux ELF.
cannam@85 1422 linux*)
cannam@85 1423 version_type=linux
cannam@85 1424 need_lib_prefix=no
cannam@85 1425 need_version=no
cannam@85 1426 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
cannam@85 1427 soname_spec='${libname}${release}${shared_ext}$major'
cannam@85 1428 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
cannam@85 1429 shlibpath_var=LD_LIBRARY_PATH
cannam@85 1430 shlibpath_overrides_runpath=no
cannam@85 1431 # This implies no fast_install, which is unacceptable.
cannam@85 1432 # Some rework will be needed to allow for fast_install
cannam@85 1433 # before this can be enabled.
cannam@85 1434 hardcode_into_libs=yes
cannam@85 1435
cannam@85 1436 # Append ld.so.conf contents to the search path
cannam@85 1437 if test -f /etc/ld.so.conf; then
cannam@85 1438 ld_extra=`$SED -e 's/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g' /etc/ld.so.conf`
cannam@85 1439 sys_lib_dlsearch_path_spec="/lib /usr/lib $ld_extra"
cannam@85 1440 fi
cannam@85 1441
cannam@85 1442 # We used to test for /lib/ld.so.1 and disable shared libraries on
cannam@85 1443 # powerpc, because MkLinux only supported shared libraries with the
cannam@85 1444 # GNU dynamic linker. Since this was broken with cross compilers,
cannam@85 1445 # most powerpc-linux boxes support dynamic linking these days and
cannam@85 1446 # people can always --disable-shared, the test was removed, and we
cannam@85 1447 # assume the GNU/Linux dynamic linker is in use.
cannam@85 1448 dynamic_linker='GNU/Linux ld.so'
cannam@85 1449 ;;
cannam@85 1450
cannam@85 1451 knetbsd*-gnu)
cannam@85 1452 version_type=linux
cannam@85 1453 need_lib_prefix=no
cannam@85 1454 need_version=no
cannam@85 1455 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
cannam@85 1456 soname_spec='${libname}${release}${shared_ext}$major'
cannam@85 1457 shlibpath_var=LD_LIBRARY_PATH
cannam@85 1458 shlibpath_overrides_runpath=no
cannam@85 1459 hardcode_into_libs=yes
cannam@85 1460 dynamic_linker='GNU ld.so'
cannam@85 1461 ;;
cannam@85 1462
cannam@85 1463 netbsd*)
cannam@85 1464 version_type=sunos
cannam@85 1465 need_lib_prefix=no
cannam@85 1466 need_version=no
cannam@85 1467 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
cannam@85 1468 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
cannam@85 1469 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
cannam@85 1470 dynamic_linker='NetBSD (a.out) ld.so'
cannam@85 1471 else
cannam@85 1472 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
cannam@85 1473 soname_spec='${libname}${release}${shared_ext}$major'
cannam@85 1474 dynamic_linker='NetBSD ld.elf_so'
cannam@85 1475 fi
cannam@85 1476 shlibpath_var=LD_LIBRARY_PATH
cannam@85 1477 shlibpath_overrides_runpath=yes
cannam@85 1478 hardcode_into_libs=yes
cannam@85 1479 ;;
cannam@85 1480
cannam@85 1481 newsos6)
cannam@85 1482 version_type=linux
cannam@85 1483 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
cannam@85 1484 shlibpath_var=LD_LIBRARY_PATH
cannam@85 1485 shlibpath_overrides_runpath=yes
cannam@85 1486 ;;
cannam@85 1487
cannam@85 1488 nto-qnx*)
cannam@85 1489 version_type=linux
cannam@85 1490 need_lib_prefix=no
cannam@85 1491 need_version=no
cannam@85 1492 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
cannam@85 1493 soname_spec='${libname}${release}${shared_ext}$major'
cannam@85 1494 shlibpath_var=LD_LIBRARY_PATH
cannam@85 1495 shlibpath_overrides_runpath=yes
cannam@85 1496 ;;
cannam@85 1497
cannam@85 1498 openbsd*)
cannam@85 1499 version_type=sunos
cannam@85 1500 need_lib_prefix=no
cannam@85 1501 need_version=yes
cannam@85 1502 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
cannam@85 1503 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
cannam@85 1504 shlibpath_var=LD_LIBRARY_PATH
cannam@85 1505 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
cannam@85 1506 case $host_os in
cannam@85 1507 openbsd2.[[89]] | openbsd2.[[89]].*)
cannam@85 1508 shlibpath_overrides_runpath=no
cannam@85 1509 ;;
cannam@85 1510 *)
cannam@85 1511 shlibpath_overrides_runpath=yes
cannam@85 1512 ;;
cannam@85 1513 esac
cannam@85 1514 else
cannam@85 1515 shlibpath_overrides_runpath=yes
cannam@85 1516 fi
cannam@85 1517 ;;
cannam@85 1518
cannam@85 1519 os2*)
cannam@85 1520 libname_spec='$name'
cannam@85 1521 shrext=".dll"
cannam@85 1522 need_lib_prefix=no
cannam@85 1523 library_names_spec='$libname${shared_ext} $libname.a'
cannam@85 1524 dynamic_linker='OS/2 ld.exe'
cannam@85 1525 shlibpath_var=LIBPATH
cannam@85 1526 ;;
cannam@85 1527
cannam@85 1528 osf3* | osf4* | osf5*)
cannam@85 1529 version_type=osf
cannam@85 1530 need_lib_prefix=no
cannam@85 1531 need_version=no
cannam@85 1532 soname_spec='${libname}${release}${shared_ext}$major'
cannam@85 1533 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
cannam@85 1534 shlibpath_var=LD_LIBRARY_PATH
cannam@85 1535 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
cannam@85 1536 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
cannam@85 1537 ;;
cannam@85 1538
cannam@85 1539 sco3.2v5*)
cannam@85 1540 version_type=osf
cannam@85 1541 soname_spec='${libname}${release}${shared_ext}$major'
cannam@85 1542 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
cannam@85 1543 shlibpath_var=LD_LIBRARY_PATH
cannam@85 1544 ;;
cannam@85 1545
cannam@85 1546 solaris*)
cannam@85 1547 version_type=linux
cannam@85 1548 need_lib_prefix=no
cannam@85 1549 need_version=no
cannam@85 1550 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
cannam@85 1551 soname_spec='${libname}${release}${shared_ext}$major'
cannam@85 1552 shlibpath_var=LD_LIBRARY_PATH
cannam@85 1553 shlibpath_overrides_runpath=yes
cannam@85 1554 hardcode_into_libs=yes
cannam@85 1555 # ldd complains unless libraries are executable
cannam@85 1556 postinstall_cmds='chmod +x $lib'
cannam@85 1557 ;;
cannam@85 1558
cannam@85 1559 sunos4*)
cannam@85 1560 version_type=sunos
cannam@85 1561 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
cannam@85 1562 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
cannam@85 1563 shlibpath_var=LD_LIBRARY_PATH
cannam@85 1564 shlibpath_overrides_runpath=yes
cannam@85 1565 if test "$with_gnu_ld" = yes; then
cannam@85 1566 need_lib_prefix=no
cannam@85 1567 fi
cannam@85 1568 need_version=yes
cannam@85 1569 ;;
cannam@85 1570
cannam@85 1571 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
cannam@85 1572 version_type=linux
cannam@85 1573 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
cannam@85 1574 soname_spec='${libname}${release}${shared_ext}$major'
cannam@85 1575 shlibpath_var=LD_LIBRARY_PATH
cannam@85 1576 case $host_vendor in
cannam@85 1577 sni)
cannam@85 1578 shlibpath_overrides_runpath=no
cannam@85 1579 need_lib_prefix=no
cannam@85 1580 export_dynamic_flag_spec='${wl}-Blargedynsym'
cannam@85 1581 runpath_var=LD_RUN_PATH
cannam@85 1582 ;;
cannam@85 1583 siemens)
cannam@85 1584 need_lib_prefix=no
cannam@85 1585 ;;
cannam@85 1586 motorola)
cannam@85 1587 need_lib_prefix=no
cannam@85 1588 need_version=no
cannam@85 1589 shlibpath_overrides_runpath=no
cannam@85 1590 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
cannam@85 1591 ;;
cannam@85 1592 esac
cannam@85 1593 ;;
cannam@85 1594
cannam@85 1595 sysv4*MP*)
cannam@85 1596 if test -d /usr/nec ;then
cannam@85 1597 version_type=linux
cannam@85 1598 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
cannam@85 1599 soname_spec='$libname${shared_ext}.$major'
cannam@85 1600 shlibpath_var=LD_LIBRARY_PATH
cannam@85 1601 fi
cannam@85 1602 ;;
cannam@85 1603
cannam@85 1604 uts4*)
cannam@85 1605 version_type=linux
cannam@85 1606 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
cannam@85 1607 soname_spec='${libname}${release}${shared_ext}$major'
cannam@85 1608 shlibpath_var=LD_LIBRARY_PATH
cannam@85 1609 ;;
cannam@85 1610
cannam@85 1611 *)
cannam@85 1612 dynamic_linker=no
cannam@85 1613 ;;
cannam@85 1614 esac
cannam@85 1615 AC_MSG_RESULT([$dynamic_linker])
cannam@85 1616 test "$dynamic_linker" = no && can_build_shared=no
cannam@85 1617 ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
cannam@85 1618
cannam@85 1619
cannam@85 1620 # _LT_AC_TAGCONFIG
cannam@85 1621 # ----------------
cannam@85 1622 AC_DEFUN([_LT_AC_TAGCONFIG],
cannam@85 1623 [AC_ARG_WITH([tags],
cannam@85 1624 [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
cannam@85 1625 [include additional configurations @<:@automatic@:>@])],
cannam@85 1626 [tagnames="$withval"])
cannam@85 1627
cannam@85 1628 if test -f "$ltmain" && test -n "$tagnames"; then
cannam@85 1629 if test ! -f "${ofile}"; then
cannam@85 1630 AC_MSG_WARN([output file `$ofile' does not exist])
cannam@85 1631 fi
cannam@85 1632
cannam@85 1633 if test -z "$LTCC"; then
cannam@85 1634 eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
cannam@85 1635 if test -z "$LTCC"; then
cannam@85 1636 AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
cannam@85 1637 else
cannam@85 1638 AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
cannam@85 1639 fi
cannam@85 1640 fi
cannam@85 1641
cannam@85 1642 # Extract list of available tagged configurations in $ofile.
cannam@85 1643 # Note that this assumes the entire list is on one line.
cannam@85 1644 available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
cannam@85 1645
cannam@85 1646 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
cannam@85 1647 for tagname in $tagnames; do
cannam@85 1648 IFS="$lt_save_ifs"
cannam@85 1649 # Check whether tagname contains only valid characters
cannam@85 1650 case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
cannam@85 1651 "") ;;
cannam@85 1652 *) AC_MSG_ERROR([invalid tag name: $tagname])
cannam@85 1653 ;;
cannam@85 1654 esac
cannam@85 1655
cannam@85 1656 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
cannam@85 1657 then
cannam@85 1658 AC_MSG_ERROR([tag name \"$tagname\" already exists])
cannam@85 1659 fi
cannam@85 1660
cannam@85 1661 # Update the list of available tags.
cannam@85 1662 if test -n "$tagname"; then
cannam@85 1663 echo appending configuration tag \"$tagname\" to $ofile
cannam@85 1664
cannam@85 1665 case $tagname in
cannam@85 1666 CXX)
cannam@85 1667 if test -n "$CXX" && test "X$CXX" != "Xno"; then
cannam@85 1668 AC_LIBTOOL_LANG_CXX_CONFIG
cannam@85 1669 else
cannam@85 1670 tagname=""
cannam@85 1671 fi
cannam@85 1672 ;;
cannam@85 1673
cannam@85 1674 F77)
cannam@85 1675 if test -n "$F77" && test "X$F77" != "Xno"; then
cannam@85 1676 AC_LIBTOOL_LANG_F77_CONFIG
cannam@85 1677 else
cannam@85 1678 tagname=""
cannam@85 1679 fi
cannam@85 1680 ;;
cannam@85 1681
cannam@85 1682 GCJ)
cannam@85 1683 if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
cannam@85 1684 AC_LIBTOOL_LANG_GCJ_CONFIG
cannam@85 1685 else
cannam@85 1686 tagname=""
cannam@85 1687 fi
cannam@85 1688 ;;
cannam@85 1689
cannam@85 1690 RC)
cannam@85 1691 AC_LIBTOOL_LANG_RC_CONFIG
cannam@85 1692 ;;
cannam@85 1693
cannam@85 1694 *)
cannam@85 1695 AC_MSG_ERROR([Unsupported tag name: $tagname])
cannam@85 1696 ;;
cannam@85 1697 esac
cannam@85 1698
cannam@85 1699 # Append the new tag name to the list of available tags.
cannam@85 1700 if test -n "$tagname" ; then
cannam@85 1701 available_tags="$available_tags $tagname"
cannam@85 1702 fi
cannam@85 1703 fi
cannam@85 1704 done
cannam@85 1705 IFS="$lt_save_ifs"
cannam@85 1706
cannam@85 1707 # Now substitute the updated list of available tags.
cannam@85 1708 if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
cannam@85 1709 mv "${ofile}T" "$ofile"
cannam@85 1710 chmod +x "$ofile"
cannam@85 1711 else
cannam@85 1712 rm -f "${ofile}T"
cannam@85 1713 AC_MSG_ERROR([unable to update list of available tagged configurations.])
cannam@85 1714 fi
cannam@85 1715 fi
cannam@85 1716 ])# _LT_AC_TAGCONFIG
cannam@85 1717
cannam@85 1718
cannam@85 1719 # AC_LIBTOOL_DLOPEN
cannam@85 1720 # -----------------
cannam@85 1721 # enable checks for dlopen support
cannam@85 1722 AC_DEFUN([AC_LIBTOOL_DLOPEN],
cannam@85 1723 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
cannam@85 1724 ])# AC_LIBTOOL_DLOPEN
cannam@85 1725
cannam@85 1726
cannam@85 1727 # AC_LIBTOOL_WIN32_DLL
cannam@85 1728 # --------------------
cannam@85 1729 # declare package support for building win32 dll's
cannam@85 1730 AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
cannam@85 1731 [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
cannam@85 1732 ])# AC_LIBTOOL_WIN32_DLL
cannam@85 1733
cannam@85 1734
cannam@85 1735 # AC_ENABLE_SHARED([DEFAULT])
cannam@85 1736 # ---------------------------
cannam@85 1737 # implement the --enable-shared flag
cannam@85 1738 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
cannam@85 1739 AC_DEFUN([AC_ENABLE_SHARED],
cannam@85 1740 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
cannam@85 1741 AC_ARG_ENABLE([shared],
cannam@85 1742 [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
cannam@85 1743 [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
cannam@85 1744 [p=${PACKAGE-default}
cannam@85 1745 case $enableval in
cannam@85 1746 yes) enable_shared=yes ;;
cannam@85 1747 no) enable_shared=no ;;
cannam@85 1748 *)
cannam@85 1749 enable_shared=no
cannam@85 1750 # Look at the argument we got. We use all the common list separators.
cannam@85 1751 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
cannam@85 1752 for pkg in $enableval; do
cannam@85 1753 IFS="$lt_save_ifs"
cannam@85 1754 if test "X$pkg" = "X$p"; then
cannam@85 1755 enable_shared=yes
cannam@85 1756 fi
cannam@85 1757 done
cannam@85 1758 IFS="$lt_save_ifs"
cannam@85 1759 ;;
cannam@85 1760 esac],
cannam@85 1761 [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
cannam@85 1762 ])# AC_ENABLE_SHARED
cannam@85 1763
cannam@85 1764
cannam@85 1765 # AC_DISABLE_SHARED
cannam@85 1766 # -----------------
cannam@85 1767 #- set the default shared flag to --disable-shared
cannam@85 1768 AC_DEFUN([AC_DISABLE_SHARED],
cannam@85 1769 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
cannam@85 1770 AC_ENABLE_SHARED(no)
cannam@85 1771 ])# AC_DISABLE_SHARED
cannam@85 1772
cannam@85 1773
cannam@85 1774 # AC_ENABLE_STATIC([DEFAULT])
cannam@85 1775 # ---------------------------
cannam@85 1776 # implement the --enable-static flag
cannam@85 1777 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
cannam@85 1778 AC_DEFUN([AC_ENABLE_STATIC],
cannam@85 1779 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
cannam@85 1780 AC_ARG_ENABLE([static],
cannam@85 1781 [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
cannam@85 1782 [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
cannam@85 1783 [p=${PACKAGE-default}
cannam@85 1784 case $enableval in
cannam@85 1785 yes) enable_static=yes ;;
cannam@85 1786 no) enable_static=no ;;
cannam@85 1787 *)
cannam@85 1788 enable_static=no
cannam@85 1789 # Look at the argument we got. We use all the common list separators.
cannam@85 1790 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
cannam@85 1791 for pkg in $enableval; do
cannam@85 1792 IFS="$lt_save_ifs"
cannam@85 1793 if test "X$pkg" = "X$p"; then
cannam@85 1794 enable_static=yes
cannam@85 1795 fi
cannam@85 1796 done
cannam@85 1797 IFS="$lt_save_ifs"
cannam@85 1798 ;;
cannam@85 1799 esac],
cannam@85 1800 [enable_static=]AC_ENABLE_STATIC_DEFAULT)
cannam@85 1801 ])# AC_ENABLE_STATIC
cannam@85 1802
cannam@85 1803
cannam@85 1804 # AC_DISABLE_STATIC
cannam@85 1805 # -----------------
cannam@85 1806 # set the default static flag to --disable-static
cannam@85 1807 AC_DEFUN([AC_DISABLE_STATIC],
cannam@85 1808 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
cannam@85 1809 AC_ENABLE_STATIC(no)
cannam@85 1810 ])# AC_DISABLE_STATIC
cannam@85 1811
cannam@85 1812
cannam@85 1813 # AC_ENABLE_FAST_INSTALL([DEFAULT])
cannam@85 1814 # ---------------------------------
cannam@85 1815 # implement the --enable-fast-install flag
cannam@85 1816 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
cannam@85 1817 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
cannam@85 1818 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
cannam@85 1819 AC_ARG_ENABLE([fast-install],
cannam@85 1820 [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
cannam@85 1821 [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
cannam@85 1822 [p=${PACKAGE-default}
cannam@85 1823 case $enableval in
cannam@85 1824 yes) enable_fast_install=yes ;;
cannam@85 1825 no) enable_fast_install=no ;;
cannam@85 1826 *)
cannam@85 1827 enable_fast_install=no
cannam@85 1828 # Look at the argument we got. We use all the common list separators.
cannam@85 1829 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
cannam@85 1830 for pkg in $enableval; do
cannam@85 1831 IFS="$lt_save_ifs"
cannam@85 1832 if test "X$pkg" = "X$p"; then
cannam@85 1833 enable_fast_install=yes
cannam@85 1834 fi
cannam@85 1835 done
cannam@85 1836 IFS="$lt_save_ifs"
cannam@85 1837 ;;
cannam@85 1838 esac],
cannam@85 1839 [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
cannam@85 1840 ])# AC_ENABLE_FAST_INSTALL
cannam@85 1841
cannam@85 1842
cannam@85 1843 # AC_DISABLE_FAST_INSTALL
cannam@85 1844 # -----------------------
cannam@85 1845 # set the default to --disable-fast-install
cannam@85 1846 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
cannam@85 1847 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
cannam@85 1848 AC_ENABLE_FAST_INSTALL(no)
cannam@85 1849 ])# AC_DISABLE_FAST_INSTALL
cannam@85 1850
cannam@85 1851
cannam@85 1852 # AC_LIBTOOL_PICMODE([MODE])
cannam@85 1853 # --------------------------
cannam@85 1854 # implement the --with-pic flag
cannam@85 1855 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
cannam@85 1856 AC_DEFUN([AC_LIBTOOL_PICMODE],
cannam@85 1857 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
cannam@85 1858 pic_mode=ifelse($#,1,$1,default)
cannam@85 1859 ])# AC_LIBTOOL_PICMODE
cannam@85 1860
cannam@85 1861
cannam@85 1862 # AC_PROG_EGREP
cannam@85 1863 # -------------
cannam@85 1864 # This is predefined starting with Autoconf 2.54, so this conditional
cannam@85 1865 # definition can be removed once we require Autoconf 2.54 or later.
cannam@85 1866 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
cannam@85 1867 [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
cannam@85 1868 [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
cannam@85 1869 then ac_cv_prog_egrep='grep -E'
cannam@85 1870 else ac_cv_prog_egrep='egrep'
cannam@85 1871 fi])
cannam@85 1872 EGREP=$ac_cv_prog_egrep
cannam@85 1873 AC_SUBST([EGREP])
cannam@85 1874 ])])
cannam@85 1875
cannam@85 1876
cannam@85 1877 # AC_PATH_TOOL_PREFIX
cannam@85 1878 # -------------------
cannam@85 1879 # find a file program which can recognise shared library
cannam@85 1880 AC_DEFUN([AC_PATH_TOOL_PREFIX],
cannam@85 1881 [AC_REQUIRE([AC_PROG_EGREP])dnl
cannam@85 1882 AC_MSG_CHECKING([for $1])
cannam@85 1883 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
cannam@85 1884 [case $MAGIC_CMD in
cannam@85 1885 [[\\/*] | ?:[\\/]*])
cannam@85 1886 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
cannam@85 1887 ;;
cannam@85 1888 *)
cannam@85 1889 lt_save_MAGIC_CMD="$MAGIC_CMD"
cannam@85 1890 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
cannam@85 1891 dnl $ac_dummy forces splitting on constant user-supplied paths.
cannam@85 1892 dnl POSIX.2 word splitting is done only on the output of word expansions,
cannam@85 1893 dnl not every word. This closes a longstanding sh security hole.
cannam@85 1894 ac_dummy="ifelse([$2], , $PATH, [$2])"
cannam@85 1895 for ac_dir in $ac_dummy; do
cannam@85 1896 IFS="$lt_save_ifs"
cannam@85 1897 test -z "$ac_dir" && ac_dir=.
cannam@85 1898 if test -f $ac_dir/$1; then
cannam@85 1899 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
cannam@85 1900 if test -n "$file_magic_test_file"; then
cannam@85 1901 case $deplibs_check_method in
cannam@85 1902 "file_magic "*)
cannam@85 1903 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
cannam@85 1904 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
cannam@85 1905 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
cannam@85 1906 $EGREP "$file_magic_regex" > /dev/null; then
cannam@85 1907 :
cannam@85 1908 else
cannam@85 1909 cat <<EOF 1>&2
cannam@85 1910
cannam@85 1911 *** Warning: the command libtool uses to detect shared libraries,
cannam@85 1912 *** $file_magic_cmd, produces output that libtool cannot recognize.
cannam@85 1913 *** The result is that libtool may fail to recognize shared libraries
cannam@85 1914 *** as such. This will affect the creation of libtool libraries that
cannam@85 1915 *** depend on shared libraries, but programs linked with such libtool
cannam@85 1916 *** libraries will work regardless of this problem. Nevertheless, you
cannam@85 1917 *** may want to report the problem to your system manager and/or to
cannam@85 1918 *** bug-libtool@gnu.org
cannam@85 1919
cannam@85 1920 EOF
cannam@85 1921 fi ;;
cannam@85 1922 esac
cannam@85 1923 fi
cannam@85 1924 break
cannam@85 1925 fi
cannam@85 1926 done
cannam@85 1927 IFS="$lt_save_ifs"
cannam@85 1928 MAGIC_CMD="$lt_save_MAGIC_CMD"
cannam@85 1929 ;;
cannam@85 1930 esac])
cannam@85 1931 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
cannam@85 1932 if test -n "$MAGIC_CMD"; then
cannam@85 1933 AC_MSG_RESULT($MAGIC_CMD)
cannam@85 1934 else
cannam@85 1935 AC_MSG_RESULT(no)
cannam@85 1936 fi
cannam@85 1937 ])# AC_PATH_TOOL_PREFIX
cannam@85 1938
cannam@85 1939
cannam@85 1940 # AC_PATH_MAGIC
cannam@85 1941 # -------------
cannam@85 1942 # find a file program which can recognise a shared library
cannam@85 1943 AC_DEFUN([AC_PATH_MAGIC],
cannam@85 1944 [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
cannam@85 1945 if test -z "$lt_cv_path_MAGIC_CMD"; then
cannam@85 1946 if test -n "$ac_tool_prefix"; then
cannam@85 1947 AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
cannam@85 1948 else
cannam@85 1949 MAGIC_CMD=:
cannam@85 1950 fi
cannam@85 1951 fi
cannam@85 1952 ])# AC_PATH_MAGIC
cannam@85 1953
cannam@85 1954
cannam@85 1955 # AC_PROG_LD
cannam@85 1956 # ----------
cannam@85 1957 # find the pathname to the GNU or non-GNU linker
cannam@85 1958 AC_DEFUN([AC_PROG_LD],
cannam@85 1959 [AC_ARG_WITH([gnu-ld],
cannam@85 1960 [AC_HELP_STRING([--with-gnu-ld],
cannam@85 1961 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
cannam@85 1962 [test "$withval" = no || with_gnu_ld=yes],
cannam@85 1963 [with_gnu_ld=no])
cannam@85 1964 AC_REQUIRE([LT_AC_PROG_SED])dnl
cannam@85 1965 AC_REQUIRE([AC_PROG_CC])dnl
cannam@85 1966 AC_REQUIRE([AC_CANONICAL_HOST])dnl
cannam@85 1967 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
cannam@85 1968 ac_prog=ld
cannam@85 1969 if test "$GCC" = yes; then
cannam@85 1970 # Check if gcc -print-prog-name=ld gives a path.
cannam@85 1971 AC_MSG_CHECKING([for ld used by $CC])
cannam@85 1972 case $host in
cannam@85 1973 *-*-mingw*)
cannam@85 1974 # gcc leaves a trailing carriage return which upsets mingw
cannam@85 1975 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
cannam@85 1976 *)
cannam@85 1977 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
cannam@85 1978 esac
cannam@85 1979 case $ac_prog in
cannam@85 1980 # Accept absolute paths.
cannam@85 1981 [[\\/]]* | ?:[[\\/]]*)
cannam@85 1982 re_direlt='/[[^/]][[^/]]*/\.\./'
cannam@85 1983 # Canonicalize the pathname of ld
cannam@85 1984 ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
cannam@85 1985 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
cannam@85 1986 ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
cannam@85 1987 done
cannam@85 1988 test -z "$LD" && LD="$ac_prog"
cannam@85 1989 ;;
cannam@85 1990 "")
cannam@85 1991 # If it fails, then pretend we aren't using GCC.
cannam@85 1992 ac_prog=ld
cannam@85 1993 ;;
cannam@85 1994 *)
cannam@85 1995 # If it is relative, then search for the first ld in PATH.
cannam@85 1996 with_gnu_ld=unknown
cannam@85 1997 ;;
cannam@85 1998 esac
cannam@85 1999 elif test "$with_gnu_ld" = yes; then
cannam@85 2000 AC_MSG_CHECKING([for GNU ld])
cannam@85 2001 else
cannam@85 2002 AC_MSG_CHECKING([for non-GNU ld])
cannam@85 2003 fi
cannam@85 2004 AC_CACHE_VAL(lt_cv_path_LD,
cannam@85 2005 [if test -z "$LD"; then
cannam@85 2006 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
cannam@85 2007 for ac_dir in $PATH; do
cannam@85 2008 IFS="$lt_save_ifs"
cannam@85 2009 test -z "$ac_dir" && ac_dir=.
cannam@85 2010 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
cannam@85 2011 lt_cv_path_LD="$ac_dir/$ac_prog"
cannam@85 2012 # Check to see if the program is GNU ld. I'd rather use --version,
cannam@85 2013 # but apparently some GNU ld's only accept -v.
cannam@85 2014 # Break only if it was the GNU/non-GNU ld that we prefer.
cannam@85 2015 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
cannam@85 2016 *GNU* | *'with BFD'*)
cannam@85 2017 test "$with_gnu_ld" != no && break
cannam@85 2018 ;;
cannam@85 2019 *)
cannam@85 2020 test "$with_gnu_ld" != yes && break
cannam@85 2021 ;;
cannam@85 2022 esac
cannam@85 2023 fi
cannam@85 2024 done
cannam@85 2025 IFS="$lt_save_ifs"
cannam@85 2026 else
cannam@85 2027 lt_cv_path_LD="$LD" # Let the user override the test with a path.
cannam@85 2028 fi])
cannam@85 2029 LD="$lt_cv_path_LD"
cannam@85 2030 if test -n "$LD"; then
cannam@85 2031 AC_MSG_RESULT($LD)
cannam@85 2032 else
cannam@85 2033 AC_MSG_RESULT(no)
cannam@85 2034 fi
cannam@85 2035 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
cannam@85 2036 AC_PROG_LD_GNU
cannam@85 2037 ])# AC_PROG_LD
cannam@85 2038
cannam@85 2039
cannam@85 2040 # AC_PROG_LD_GNU
cannam@85 2041 # --------------
cannam@85 2042 AC_DEFUN([AC_PROG_LD_GNU],
cannam@85 2043 [AC_REQUIRE([AC_PROG_EGREP])dnl
cannam@85 2044 AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
cannam@85 2045 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
cannam@85 2046 case `$LD -v 2>&1 </dev/null` in
cannam@85 2047 *GNU* | *'with BFD'*)
cannam@85 2048 lt_cv_prog_gnu_ld=yes
cannam@85 2049 ;;
cannam@85 2050 *)
cannam@85 2051 lt_cv_prog_gnu_ld=no
cannam@85 2052 ;;
cannam@85 2053 esac])
cannam@85 2054 with_gnu_ld=$lt_cv_prog_gnu_ld
cannam@85 2055 ])# AC_PROG_LD_GNU
cannam@85 2056
cannam@85 2057
cannam@85 2058 # AC_PROG_LD_RELOAD_FLAG
cannam@85 2059 # ----------------------
cannam@85 2060 # find reload flag for linker
cannam@85 2061 # -- PORTME Some linkers may need a different reload flag.
cannam@85 2062 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
cannam@85 2063 [AC_CACHE_CHECK([for $LD option to reload object files],
cannam@85 2064 lt_cv_ld_reload_flag,
cannam@85 2065 [lt_cv_ld_reload_flag='-r'])
cannam@85 2066 reload_flag=$lt_cv_ld_reload_flag
cannam@85 2067 case $reload_flag in
cannam@85 2068 "" | " "*) ;;
cannam@85 2069 *) reload_flag=" $reload_flag" ;;
cannam@85 2070 esac
cannam@85 2071 reload_cmds='$LD$reload_flag -o $output$reload_objs'
cannam@85 2072 ])# AC_PROG_LD_RELOAD_FLAG
cannam@85 2073
cannam@85 2074
cannam@85 2075 # AC_DEPLIBS_CHECK_METHOD
cannam@85 2076 # -----------------------
cannam@85 2077 # how to check for library dependencies
cannam@85 2078 # -- PORTME fill in with the dynamic library characteristics
cannam@85 2079 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
cannam@85 2080 [AC_CACHE_CHECK([how to recognise dependent libraries],
cannam@85 2081 lt_cv_deplibs_check_method,
cannam@85 2082 [lt_cv_file_magic_cmd='$MAGIC_CMD'
cannam@85 2083 lt_cv_file_magic_test_file=
cannam@85 2084 lt_cv_deplibs_check_method='unknown'
cannam@85 2085 # Need to set the preceding variable on all platforms that support
cannam@85 2086 # interlibrary dependencies.
cannam@85 2087 # 'none' -- dependencies not supported.
cannam@85 2088 # `unknown' -- same as none, but documents that we really don't know.
cannam@85 2089 # 'pass_all' -- all dependencies passed with no checks.
cannam@85 2090 # 'test_compile' -- check by making test program.
cannam@85 2091 # 'file_magic [[regex]]' -- check by looking for files in library path
cannam@85 2092 # which responds to the $file_magic_cmd with a given extended regex.
cannam@85 2093 # If you have `file' or equivalent on your system and you're not sure
cannam@85 2094 # whether `pass_all' will *always* work, you probably want this one.
cannam@85 2095
cannam@85 2096 case $host_os in
cannam@85 2097 aix4* | aix5*)
cannam@85 2098 lt_cv_deplibs_check_method=pass_all
cannam@85 2099 ;;
cannam@85 2100
cannam@85 2101 beos*)
cannam@85 2102 lt_cv_deplibs_check_method=pass_all
cannam@85 2103 ;;
cannam@85 2104
cannam@85 2105 bsdi4*)
cannam@85 2106 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
cannam@85 2107 lt_cv_file_magic_cmd='/usr/bin/file -L'
cannam@85 2108 lt_cv_file_magic_test_file=/shlib/libc.so
cannam@85 2109 ;;
cannam@85 2110
cannam@85 2111 cygwin*)
cannam@85 2112 # win32_libid is a shell function defined in ltmain.sh
cannam@85 2113 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
cannam@85 2114 lt_cv_file_magic_cmd='win32_libid'
cannam@85 2115 ;;
cannam@85 2116
cannam@85 2117 mingw* | pw32*)
cannam@85 2118 # Base MSYS/MinGW do not provide the 'file' command needed by
cannam@85 2119 # win32_libid shell function, so use a weaker test based on 'objdump'.
cannam@85 2120 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
cannam@85 2121 lt_cv_file_magic_cmd='$OBJDUMP -f'
cannam@85 2122 ;;
cannam@85 2123
cannam@85 2124 darwin* | rhapsody*)
cannam@85 2125 lt_cv_deplibs_check_method=pass_all
cannam@85 2126 ;;
cannam@85 2127
cannam@85 2128 freebsd* | kfreebsd*-gnu)
cannam@85 2129 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
cannam@85 2130 case $host_cpu in
cannam@85 2131 i*86 )
cannam@85 2132 # Not sure whether the presence of OpenBSD here was a mistake.
cannam@85 2133 # Let's accept both of them until this is cleared up.
cannam@85 2134 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
cannam@85 2135 lt_cv_file_magic_cmd=/usr/bin/file
cannam@85 2136 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
cannam@85 2137 ;;
cannam@85 2138 esac
cannam@85 2139 else
cannam@85 2140 lt_cv_deplibs_check_method=pass_all
cannam@85 2141 fi
cannam@85 2142 ;;
cannam@85 2143
cannam@85 2144 gnu*)
cannam@85 2145 lt_cv_deplibs_check_method=pass_all
cannam@85 2146 ;;
cannam@85 2147
cannam@85 2148 hpux10.20* | hpux11*)
cannam@85 2149 lt_cv_file_magic_cmd=/usr/bin/file
cannam@85 2150 case "$host_cpu" in
cannam@85 2151 ia64*)
cannam@85 2152 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
cannam@85 2153 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
cannam@85 2154 ;;
cannam@85 2155 hppa*64*)
cannam@85 2156 [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
cannam@85 2157 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
cannam@85 2158 ;;
cannam@85 2159 *)
cannam@85 2160 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
cannam@85 2161 lt_cv_file_magic_test_file=/usr/lib/libc.sl
cannam@85 2162 ;;
cannam@85 2163 esac
cannam@85 2164 ;;
cannam@85 2165
cannam@85 2166 irix5* | irix6* | nonstopux*)
cannam@85 2167 case $LD in
cannam@85 2168 *-32|*"-32 ") libmagic=32-bit;;
cannam@85 2169 *-n32|*"-n32 ") libmagic=N32;;
cannam@85 2170 *-64|*"-64 ") libmagic=64-bit;;
cannam@85 2171 *) libmagic=never-match;;
cannam@85 2172 esac
cannam@85 2173 lt_cv_deplibs_check_method=pass_all
cannam@85 2174 ;;
cannam@85 2175
cannam@85 2176 # This must be Linux ELF.
cannam@85 2177 linux*)
cannam@85 2178 lt_cv_deplibs_check_method=pass_all
cannam@85 2179 ;;
cannam@85 2180
cannam@85 2181 netbsd* | knetbsd*-gnu)
cannam@85 2182 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
cannam@85 2183 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
cannam@85 2184 else
cannam@85 2185 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
cannam@85 2186 fi
cannam@85 2187 ;;
cannam@85 2188
cannam@85 2189 newos6*)
cannam@85 2190 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
cannam@85 2191 lt_cv_file_magic_cmd=/usr/bin/file
cannam@85 2192 lt_cv_file_magic_test_file=/usr/lib/libnls.so
cannam@85 2193 ;;
cannam@85 2194
cannam@85 2195 nto-qnx*)
cannam@85 2196 lt_cv_deplibs_check_method=unknown
cannam@85 2197 ;;
cannam@85 2198
cannam@85 2199 openbsd*)
cannam@85 2200 lt_cv_file_magic_cmd=/usr/bin/file
cannam@85 2201 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
cannam@85 2202 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
cannam@85 2203 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
cannam@85 2204 else
cannam@85 2205 lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
cannam@85 2206 fi
cannam@85 2207 ;;
cannam@85 2208
cannam@85 2209 osf3* | osf4* | osf5*)
cannam@85 2210 lt_cv_deplibs_check_method=pass_all
cannam@85 2211 ;;
cannam@85 2212
cannam@85 2213 sco3.2v5*)
cannam@85 2214 lt_cv_deplibs_check_method=pass_all
cannam@85 2215 ;;
cannam@85 2216
cannam@85 2217 solaris*)
cannam@85 2218 lt_cv_deplibs_check_method=pass_all
cannam@85 2219 ;;
cannam@85 2220
cannam@85 2221 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
cannam@85 2222 case $host_vendor in
cannam@85 2223 motorola)
cannam@85 2224 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]]'
cannam@85 2225 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
cannam@85 2226 ;;
cannam@85 2227 ncr)
cannam@85 2228 lt_cv_deplibs_check_method=pass_all
cannam@85 2229 ;;
cannam@85 2230 sequent)
cannam@85 2231 lt_cv_file_magic_cmd='/bin/file'
cannam@85 2232 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
cannam@85 2233 ;;
cannam@85 2234 sni)
cannam@85 2235 lt_cv_file_magic_cmd='/bin/file'
cannam@85 2236 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
cannam@85 2237 lt_cv_file_magic_test_file=/lib/libc.so
cannam@85 2238 ;;
cannam@85 2239 siemens)
cannam@85 2240 lt_cv_deplibs_check_method=pass_all
cannam@85 2241 ;;
cannam@85 2242 esac
cannam@85 2243 ;;
cannam@85 2244
cannam@85 2245 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
cannam@85 2246 lt_cv_deplibs_check_method=pass_all
cannam@85 2247 ;;
cannam@85 2248 esac
cannam@85 2249 ])
cannam@85 2250 file_magic_cmd=$lt_cv_file_magic_cmd
cannam@85 2251 deplibs_check_method=$lt_cv_deplibs_check_method
cannam@85 2252 test -z "$deplibs_check_method" && deplibs_check_method=unknown
cannam@85 2253 ])# AC_DEPLIBS_CHECK_METHOD
cannam@85 2254
cannam@85 2255
cannam@85 2256 # AC_PROG_NM
cannam@85 2257 # ----------
cannam@85 2258 # find the pathname to a BSD-compatible name lister
cannam@85 2259 AC_DEFUN([AC_PROG_NM],
cannam@85 2260 [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
cannam@85 2261 [if test -n "$NM"; then
cannam@85 2262 # Let the user override the test.
cannam@85 2263 lt_cv_path_NM="$NM"
cannam@85 2264 else
cannam@85 2265 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
cannam@85 2266 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
cannam@85 2267 IFS="$lt_save_ifs"
cannam@85 2268 test -z "$ac_dir" && ac_dir=.
cannam@85 2269 tmp_nm="$ac_dir/${ac_tool_prefix}nm"
cannam@85 2270 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
cannam@85 2271 # Check to see if the nm accepts a BSD-compat flag.
cannam@85 2272 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
cannam@85 2273 # nm: unknown option "B" ignored
cannam@85 2274 # Tru64's nm complains that /dev/null is an invalid object file
cannam@85 2275 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
cannam@85 2276 */dev/null* | *'Invalid file or object type'*)
cannam@85 2277 lt_cv_path_NM="$tmp_nm -B"
cannam@85 2278 break
cannam@85 2279 ;;
cannam@85 2280 *)
cannam@85 2281 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
cannam@85 2282 */dev/null*)
cannam@85 2283 lt_cv_path_NM="$tmp_nm -p"
cannam@85 2284 break
cannam@85 2285 ;;
cannam@85 2286 *)
cannam@85 2287 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
cannam@85 2288 continue # so that we can try to find one that supports BSD flags
cannam@85 2289 ;;
cannam@85 2290 esac
cannam@85 2291 esac
cannam@85 2292 fi
cannam@85 2293 done
cannam@85 2294 IFS="$lt_save_ifs"
cannam@85 2295 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
cannam@85 2296 fi])
cannam@85 2297 NM="$lt_cv_path_NM"
cannam@85 2298 ])# AC_PROG_NM
cannam@85 2299
cannam@85 2300
cannam@85 2301 # AC_CHECK_LIBM
cannam@85 2302 # -------------
cannam@85 2303 # check for math library
cannam@85 2304 AC_DEFUN([AC_CHECK_LIBM],
cannam@85 2305 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
cannam@85 2306 LIBM=
cannam@85 2307 case $host in
cannam@85 2308 *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
cannam@85 2309 # These system don't have libm, or don't need it
cannam@85 2310 ;;
cannam@85 2311 *-ncr-sysv4.3*)
cannam@85 2312 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
cannam@85 2313 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
cannam@85 2314 ;;
cannam@85 2315 *)
cannam@85 2316 AC_CHECK_LIB(m, cos, LIBM="-lm")
cannam@85 2317 ;;
cannam@85 2318 esac
cannam@85 2319 ])# AC_CHECK_LIBM
cannam@85 2320
cannam@85 2321
cannam@85 2322 # AC_LIBLTDL_CONVENIENCE([DIRECTORY])
cannam@85 2323 # -----------------------------------
cannam@85 2324 # sets LIBLTDL to the link flags for the libltdl convenience library and
cannam@85 2325 # LTDLINCL to the include flags for the libltdl header and adds
cannam@85 2326 # --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL
cannam@85 2327 # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
cannam@85 2328 # DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will
cannam@85 2329 # be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
cannam@85 2330 # '${top_srcdir}/' (note the single quotes!). If your package is not
cannam@85 2331 # flat and you're not using automake, define top_builddir and
cannam@85 2332 # top_srcdir appropriately in the Makefiles.
cannam@85 2333 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
cannam@85 2334 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
cannam@85 2335 case $enable_ltdl_convenience in
cannam@85 2336 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
cannam@85 2337 "") enable_ltdl_convenience=yes
cannam@85 2338 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
cannam@85 2339 esac
cannam@85 2340 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
cannam@85 2341 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
cannam@85 2342 # For backwards non-gettext consistent compatibility...
cannam@85 2343 INCLTDL="$LTDLINCL"
cannam@85 2344 ])# AC_LIBLTDL_CONVENIENCE
cannam@85 2345
cannam@85 2346
cannam@85 2347 # AC_LIBLTDL_INSTALLABLE([DIRECTORY])
cannam@85 2348 # -----------------------------------
cannam@85 2349 # sets LIBLTDL to the link flags for the libltdl installable library and
cannam@85 2350 # LTDLINCL to the include flags for the libltdl header and adds
cannam@85 2351 # --enable-ltdl-install to the configure arguments. Note that LIBLTDL
cannam@85 2352 # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
cannam@85 2353 # DIRECTORY is not provided and an installed libltdl is not found, it is
cannam@85 2354 # assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/'
cannam@85 2355 # and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
cannam@85 2356 # quotes!). If your package is not flat and you're not using automake,
cannam@85 2357 # define top_builddir and top_srcdir appropriately in the Makefiles.
cannam@85 2358 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
cannam@85 2359 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
cannam@85 2360 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
cannam@85 2361 AC_CHECK_LIB(ltdl, lt_dlinit,
cannam@85 2362 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
cannam@85 2363 [if test x"$enable_ltdl_install" = xno; then
cannam@85 2364 AC_MSG_WARN([libltdl not installed, but installation disabled])
cannam@85 2365 else
cannam@85 2366 enable_ltdl_install=yes
cannam@85 2367 fi
cannam@85 2368 ])
cannam@85 2369 if test x"$enable_ltdl_install" = x"yes"; then
cannam@85 2370 ac_configure_args="$ac_configure_args --enable-ltdl-install"
cannam@85 2371 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
cannam@85 2372 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
cannam@85 2373 else
cannam@85 2374 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
cannam@85 2375 LIBLTDL="-lltdl"
cannam@85 2376 LTDLINCL=
cannam@85 2377 fi
cannam@85 2378 # For backwards non-gettext consistent compatibility...
cannam@85 2379 INCLTDL="$LTDLINCL"
cannam@85 2380 ])# AC_LIBLTDL_INSTALLABLE
cannam@85 2381
cannam@85 2382
cannam@85 2383 # AC_LIBTOOL_CXX
cannam@85 2384 # --------------
cannam@85 2385 # enable support for C++ libraries
cannam@85 2386 AC_DEFUN([AC_LIBTOOL_CXX],
cannam@85 2387 [AC_REQUIRE([_LT_AC_LANG_CXX])
cannam@85 2388 ])# AC_LIBTOOL_CXX
cannam@85 2389
cannam@85 2390
cannam@85 2391 # _LT_AC_LANG_CXX
cannam@85 2392 # ---------------
cannam@85 2393 AC_DEFUN([_LT_AC_LANG_CXX],
cannam@85 2394 [AC_REQUIRE([AC_PROG_CXX])
cannam@85 2395 AC_REQUIRE([AC_PROG_CXXCPP])
cannam@85 2396 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
cannam@85 2397 ])# _LT_AC_LANG_CXX
cannam@85 2398
cannam@85 2399
cannam@85 2400 # AC_LIBTOOL_F77
cannam@85 2401 # --------------
cannam@85 2402 # enable support for Fortran 77 libraries
cannam@85 2403 AC_DEFUN([AC_LIBTOOL_F77],
cannam@85 2404 [AC_REQUIRE([_LT_AC_LANG_F77])
cannam@85 2405 ])# AC_LIBTOOL_F77
cannam@85 2406
cannam@85 2407
cannam@85 2408 # _LT_AC_LANG_F77
cannam@85 2409 # ---------------
cannam@85 2410 AC_DEFUN([_LT_AC_LANG_F77],
cannam@85 2411 [AC_REQUIRE([AC_PROG_F77])
cannam@85 2412 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
cannam@85 2413 ])# _LT_AC_LANG_F77
cannam@85 2414
cannam@85 2415
cannam@85 2416 # AC_LIBTOOL_GCJ
cannam@85 2417 # --------------
cannam@85 2418 # enable support for GCJ libraries
cannam@85 2419 AC_DEFUN([AC_LIBTOOL_GCJ],
cannam@85 2420 [AC_REQUIRE([_LT_AC_LANG_GCJ])
cannam@85 2421 ])# AC_LIBTOOL_GCJ
cannam@85 2422
cannam@85 2423
cannam@85 2424 # _LT_AC_LANG_GCJ
cannam@85 2425 # ---------------
cannam@85 2426 AC_DEFUN([_LT_AC_LANG_GCJ],
cannam@85 2427 [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
cannam@85 2428 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
cannam@85 2429 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
cannam@85 2430 [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
cannam@85 2431 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
cannam@85 2432 [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
cannam@85 2433 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
cannam@85 2434 ])# _LT_AC_LANG_GCJ
cannam@85 2435
cannam@85 2436
cannam@85 2437 # AC_LIBTOOL_RC
cannam@85 2438 # --------------
cannam@85 2439 # enable support for Windows resource files
cannam@85 2440 AC_DEFUN([AC_LIBTOOL_RC],
cannam@85 2441 [AC_REQUIRE([LT_AC_PROG_RC])
cannam@85 2442 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
cannam@85 2443 ])# AC_LIBTOOL_RC
cannam@85 2444
cannam@85 2445
cannam@85 2446 # AC_LIBTOOL_LANG_C_CONFIG
cannam@85 2447 # ------------------------
cannam@85 2448 # Ensure that the configuration vars for the C compiler are
cannam@85 2449 # suitably defined. Those variables are subsequently used by
cannam@85 2450 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
cannam@85 2451 AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
cannam@85 2452 AC_DEFUN([_LT_AC_LANG_C_CONFIG],
cannam@85 2453 [lt_save_CC="$CC"
cannam@85 2454 AC_LANG_PUSH(C)
cannam@85 2455
cannam@85 2456 # Source file extension for C test sources.
cannam@85 2457 ac_ext=c
cannam@85 2458
cannam@85 2459 # Object file extension for compiled C test sources.
cannam@85 2460 objext=o
cannam@85 2461 _LT_AC_TAGVAR(objext, $1)=$objext
cannam@85 2462
cannam@85 2463 # Code to be used in simple compile tests
cannam@85 2464 lt_simple_compile_test_code="int some_variable = 0;\n"
cannam@85 2465
cannam@85 2466 # Code to be used in simple link tests
cannam@85 2467 lt_simple_link_test_code='int main(){return(0);}\n'
cannam@85 2468
cannam@85 2469 _LT_AC_SYS_COMPILER
cannam@85 2470
cannam@85 2471 #
cannam@85 2472 # Check for any special shared library compilation flags.
cannam@85 2473 #
cannam@85 2474 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
cannam@85 2475 if test "$GCC" = no; then
cannam@85 2476 case $host_os in
cannam@85 2477 sco3.2v5*)
cannam@85 2478 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
cannam@85 2479 ;;
cannam@85 2480 esac
cannam@85 2481 fi
cannam@85 2482 if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
cannam@85 2483 AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
cannam@85 2484 if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ ]]" >/dev/null; then :
cannam@85 2485 else
cannam@85 2486 AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
cannam@85 2487 _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
cannam@85 2488 fi
cannam@85 2489 fi
cannam@85 2490
cannam@85 2491
cannam@85 2492 #
cannam@85 2493 # Check to make sure the static flag actually works.
cannam@85 2494 #
cannam@85 2495 AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
cannam@85 2496 _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
cannam@85 2497 $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
cannam@85 2498 [],
cannam@85 2499 [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
cannam@85 2500
cannam@85 2501
cannam@85 2502 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
cannam@85 2503 AC_LIBTOOL_PROG_COMPILER_PIC($1)
cannam@85 2504 AC_LIBTOOL_PROG_CC_C_O($1)
cannam@85 2505 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
cannam@85 2506 AC_LIBTOOL_PROG_LD_SHLIBS($1)
cannam@85 2507 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
cannam@85 2508 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
cannam@85 2509 AC_LIBTOOL_SYS_LIB_STRIP
cannam@85 2510 AC_LIBTOOL_DLOPEN_SELF($1)
cannam@85 2511
cannam@85 2512 # Report which librarie types wil actually be built
cannam@85 2513 AC_MSG_CHECKING([if libtool supports shared libraries])
cannam@85 2514 AC_MSG_RESULT([$can_build_shared])
cannam@85 2515
cannam@85 2516 AC_MSG_CHECKING([whether to build shared libraries])
cannam@85 2517 test "$can_build_shared" = "no" && enable_shared=no
cannam@85 2518
cannam@85 2519 # On AIX, shared libraries and static libraries use the same namespace, and
cannam@85 2520 # are all built from PIC.
cannam@85 2521 case "$host_os" in
cannam@85 2522 aix3*)
cannam@85 2523 test "$enable_shared" = yes && enable_static=no
cannam@85 2524 if test -n "$RANLIB"; then
cannam@85 2525 archive_cmds="$archive_cmds~\$RANLIB \$lib"
cannam@85 2526 postinstall_cmds='$RANLIB $lib'
cannam@85 2527 fi
cannam@85 2528 ;;
cannam@85 2529
cannam@85 2530 aix4*)
cannam@85 2531 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
cannam@85 2532 test "$enable_shared" = yes && enable_static=no
cannam@85 2533 fi
cannam@85 2534 ;;
cannam@85 2535 darwin* | rhapsody*)
cannam@85 2536 if test "$GCC" = yes; then
cannam@85 2537 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
cannam@85 2538 case "$host_os" in
cannam@85 2539 rhapsody* | darwin1.[[012]])
cannam@85 2540 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
cannam@85 2541 ;;
cannam@85 2542 *) # Darwin 1.3 on
cannam@85 2543 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
cannam@85 2544 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
cannam@85 2545 else
cannam@85 2546 case ${MACOSX_DEPLOYMENT_TARGET} in
cannam@85 2547 10.[[012]])
cannam@85 2548 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
cannam@85 2549 ;;
cannam@85 2550 10.*)
cannam@85 2551 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
cannam@85 2552 ;;
cannam@85 2553 esac
cannam@85 2554 fi
cannam@85 2555 ;;
cannam@85 2556 esac
cannam@85 2557 output_verbose_link_cmd='echo'
cannam@85 2558 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring'
cannam@85 2559 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
cannam@85 2560 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
cannam@85 2561 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
cannam@85 2562 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
cannam@85 2563 _LT_AC_TAGVAR(hardcode_direct, $1)=no
cannam@85 2564 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
cannam@85 2565 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
cannam@85 2566 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
cannam@85 2567 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
cannam@85 2568 else
cannam@85 2569 _LT_AC_TAGVAR(ld_shlibs, $1)=no
cannam@85 2570 fi
cannam@85 2571 ;;
cannam@85 2572 esac
cannam@85 2573 AC_MSG_RESULT([$enable_shared])
cannam@85 2574
cannam@85 2575 AC_MSG_CHECKING([whether to build static libraries])
cannam@85 2576 # Make sure either enable_shared or enable_static is yes.
cannam@85 2577 test "$enable_shared" = yes || enable_static=yes
cannam@85 2578 AC_MSG_RESULT([$enable_static])
cannam@85 2579
cannam@85 2580 AC_LIBTOOL_CONFIG($1)
cannam@85 2581
cannam@85 2582 AC_LANG_POP
cannam@85 2583 CC="$lt_save_CC"
cannam@85 2584 ])# AC_LIBTOOL_LANG_C_CONFIG
cannam@85 2585
cannam@85 2586
cannam@85 2587 # AC_LIBTOOL_LANG_CXX_CONFIG
cannam@85 2588 # --------------------------
cannam@85 2589 # Ensure that the configuration vars for the C compiler are
cannam@85 2590 # suitably defined. Those variables are subsequently used by
cannam@85 2591 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
cannam@85 2592 AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
cannam@85 2593 AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
cannam@85 2594 [AC_LANG_PUSH(C++)
cannam@85 2595 AC_REQUIRE([AC_PROG_CXX])
cannam@85 2596 AC_REQUIRE([AC_PROG_CXXCPP])
cannam@85 2597
cannam@85 2598 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
cannam@85 2599 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
cannam@85 2600 _LT_AC_TAGVAR(always_export_symbols, $1)=no
cannam@85 2601 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
cannam@85 2602 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
cannam@85 2603 _LT_AC_TAGVAR(hardcode_direct, $1)=no
cannam@85 2604 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
cannam@85 2605 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
cannam@85 2606 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
cannam@85 2607 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
cannam@85 2608 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
cannam@85 2609 _LT_AC_TAGVAR(module_cmds, $1)=
cannam@85 2610 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
cannam@85 2611 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
cannam@85 2612 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
cannam@85 2613 _LT_AC_TAGVAR(no_undefined_flag, $1)=
cannam@85 2614 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
cannam@85 2615 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
cannam@85 2616
cannam@85 2617 # Dependencies to place before and after the object being linked:
cannam@85 2618 _LT_AC_TAGVAR(predep_objects, $1)=
cannam@85 2619 _LT_AC_TAGVAR(postdep_objects, $1)=
cannam@85 2620 _LT_AC_TAGVAR(predeps, $1)=
cannam@85 2621 _LT_AC_TAGVAR(postdeps, $1)=
cannam@85 2622 _LT_AC_TAGVAR(compiler_lib_search_path, $1)=
cannam@85 2623
cannam@85 2624 # Source file extension for C++ test sources.
cannam@85 2625 ac_ext=cc
cannam@85 2626
cannam@85 2627 # Object file extension for compiled C++ test sources.
cannam@85 2628 objext=o
cannam@85 2629 _LT_AC_TAGVAR(objext, $1)=$objext
cannam@85 2630
cannam@85 2631 # Code to be used in simple compile tests
cannam@85 2632 lt_simple_compile_test_code="int some_variable = 0;\n"
cannam@85 2633
cannam@85 2634 # Code to be used in simple link tests
cannam@85 2635 lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
cannam@85 2636
cannam@85 2637 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
cannam@85 2638 _LT_AC_SYS_COMPILER
cannam@85 2639
cannam@85 2640 # Allow CC to be a program name with arguments.
cannam@85 2641 lt_save_CC=$CC
cannam@85 2642 lt_save_LD=$LD
cannam@85 2643 lt_save_GCC=$GCC
cannam@85 2644 GCC=$GXX
cannam@85 2645 lt_save_with_gnu_ld=$with_gnu_ld
cannam@85 2646 lt_save_path_LD=$lt_cv_path_LD
cannam@85 2647 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
cannam@85 2648 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
cannam@85 2649 else
cannam@85 2650 unset lt_cv_prog_gnu_ld
cannam@85 2651 fi
cannam@85 2652 if test -n "${lt_cv_path_LDCXX+set}"; then
cannam@85 2653 lt_cv_path_LD=$lt_cv_path_LDCXX
cannam@85 2654 else
cannam@85 2655 unset lt_cv_path_LD
cannam@85 2656 fi
cannam@85 2657 test -z "${LDCXX+set}" || LD=$LDCXX
cannam@85 2658 CC=${CXX-"c++"}
cannam@85 2659 compiler=$CC
cannam@85 2660 _LT_AC_TAGVAR(compiler, $1)=$CC
cannam@85 2661 cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
cannam@85 2662
cannam@85 2663 # We don't want -fno-exception wen compiling C++ code, so set the
cannam@85 2664 # no_builtin_flag separately
cannam@85 2665 if test "$GXX" = yes; then
cannam@85 2666 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
cannam@85 2667 else
cannam@85 2668 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
cannam@85 2669 fi
cannam@85 2670
cannam@85 2671 if test "$GXX" = yes; then
cannam@85 2672 # Set up default GNU C++ configuration
cannam@85 2673
cannam@85 2674 AC_PROG_LD
cannam@85 2675
cannam@85 2676 # Check if GNU C++ uses GNU ld as the underlying linker, since the
cannam@85 2677 # archiving commands below assume that GNU ld is being used.
cannam@85 2678 if test "$with_gnu_ld" = yes; then
cannam@85 2679 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
cannam@85 2680 _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'
cannam@85 2681
cannam@85 2682 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
cannam@85 2683 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
cannam@85 2684
cannam@85 2685 # If archive_cmds runs LD, not CC, wlarc should be empty
cannam@85 2686 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
cannam@85 2687 # investigate it a little bit more. (MM)
cannam@85 2688 wlarc='${wl}'
cannam@85 2689
cannam@85 2690 # ancient GNU ld didn't support --whole-archive et. al.
cannam@85 2691 if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
cannam@85 2692 grep 'no-whole-archive' > /dev/null; then
cannam@85 2693 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
cannam@85 2694 else
cannam@85 2695 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
cannam@85 2696 fi
cannam@85 2697 else
cannam@85 2698 with_gnu_ld=no
cannam@85 2699 wlarc=
cannam@85 2700
cannam@85 2701 # A generic and very simple default shared library creation
cannam@85 2702 # command for GNU C++ for the case where it uses the native
cannam@85 2703 # linker, instead of GNU ld. If possible, this setting should
cannam@85 2704 # overridden to take advantage of the native linker features on
cannam@85 2705 # the platform it is being used on.
cannam@85 2706 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
cannam@85 2707 fi
cannam@85 2708
cannam@85 2709 # Commands to make compiler produce verbose output that lists
cannam@85 2710 # what "hidden" libraries, object files and flags are used when
cannam@85 2711 # linking a shared library.
cannam@85 2712 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
cannam@85 2713
cannam@85 2714 else
cannam@85 2715 GXX=no
cannam@85 2716 with_gnu_ld=no
cannam@85 2717 wlarc=
cannam@85 2718 fi
cannam@85 2719
cannam@85 2720 # PORTME: fill in a description of your system's C++ link characteristics
cannam@85 2721 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
cannam@85 2722 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
cannam@85 2723 case $host_os in
cannam@85 2724 aix3*)
cannam@85 2725 # FIXME: insert proper C++ library support
cannam@85 2726 _LT_AC_TAGVAR(ld_shlibs, $1)=no
cannam@85 2727 ;;
cannam@85 2728 aix4* | aix5*)
cannam@85 2729 if test "$host_cpu" = ia64; then
cannam@85 2730 # On IA64, the linker does run time linking by default, so we don't
cannam@85 2731 # have to do anything special.
cannam@85 2732 aix_use_runtimelinking=no
cannam@85 2733 exp_sym_flag='-Bexport'
cannam@85 2734 no_entry_flag=""
cannam@85 2735 else
cannam@85 2736 aix_use_runtimelinking=no
cannam@85 2737
cannam@85 2738 # Test if we are trying to use run time linking or normal
cannam@85 2739 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
cannam@85 2740 # need to do runtime linking.
cannam@85 2741 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
cannam@85 2742 for ld_flag in $LDFLAGS; do
cannam@85 2743 case $ld_flag in
cannam@85 2744 *-brtl*)
cannam@85 2745 aix_use_runtimelinking=yes
cannam@85 2746 break
cannam@85 2747 ;;
cannam@85 2748 esac
cannam@85 2749 done
cannam@85 2750 esac
cannam@85 2751
cannam@85 2752 exp_sym_flag='-bexport'
cannam@85 2753 no_entry_flag='-bnoentry'
cannam@85 2754 fi
cannam@85 2755
cannam@85 2756 # When large executables or shared objects are built, AIX ld can
cannam@85 2757 # have problems creating the table of contents. If linking a library
cannam@85 2758 # or program results in "error TOC overflow" add -mminimal-toc to
cannam@85 2759 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
cannam@85 2760 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
cannam@85 2761
cannam@85 2762 _LT_AC_TAGVAR(archive_cmds, $1)=''
cannam@85 2763 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
cannam@85 2764 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
cannam@85 2765 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
cannam@85 2766
cannam@85 2767 if test "$GXX" = yes; then
cannam@85 2768 case $host_os in aix4.[012]|aix4.[012].*)
cannam@85 2769 # We only want to do this on AIX 4.2 and lower, the check
cannam@85 2770 # below for broken collect2 doesn't work under 4.3+
cannam@85 2771 collect2name=`${CC} -print-prog-name=collect2`
cannam@85 2772 if test -f "$collect2name" && \
cannam@85 2773 strings "$collect2name" | grep resolve_lib_name >/dev/null
cannam@85 2774 then
cannam@85 2775 # We have reworked collect2
cannam@85 2776 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
cannam@85 2777 else
cannam@85 2778 # We have old collect2
cannam@85 2779 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
cannam@85 2780 # It fails to find uninstalled libraries when the uninstalled
cannam@85 2781 # path is not listed in the libpath. Setting hardcode_minus_L
cannam@85 2782 # to unsupported forces relinking
cannam@85 2783 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
cannam@85 2784 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
cannam@85 2785 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
cannam@85 2786 fi
cannam@85 2787 esac
cannam@85 2788 shared_flag='-shared'
cannam@85 2789 else
cannam@85 2790 # not using gcc
cannam@85 2791 if test "$host_cpu" = ia64; then
cannam@85 2792 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
cannam@85 2793 # chokes on -Wl,-G. The following line is correct:
cannam@85 2794 shared_flag='-G'
cannam@85 2795 else
cannam@85 2796 if test "$aix_use_runtimelinking" = yes; then
cannam@85 2797 shared_flag='${wl}-G'
cannam@85 2798 else
cannam@85 2799 shared_flag='${wl}-bM:SRE'
cannam@85 2800 fi
cannam@85 2801 fi
cannam@85 2802 fi
cannam@85 2803
cannam@85 2804 # It seems that -bexpall does not export symbols beginning with
cannam@85 2805 # underscore (_), so it is better to generate a list of symbols to export.
cannam@85 2806 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
cannam@85 2807 if test "$aix_use_runtimelinking" = yes; then
cannam@85 2808 # Warning - without using the other runtime loading flags (-brtl),
cannam@85 2809 # -berok will link without error, but may produce a broken library.
cannam@85 2810 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
cannam@85 2811 # Determine the default libpath from the value encoded in an empty executable.
cannam@85 2812 _LT_AC_SYS_LIBPATH_AIX
cannam@85 2813 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
cannam@85 2814
cannam@85 2815 _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}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
cannam@85 2816 else
cannam@85 2817 if test "$host_cpu" = ia64; then
cannam@85 2818 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
cannam@85 2819 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
cannam@85 2820 _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"
cannam@85 2821 else
cannam@85 2822 # Determine the default libpath from the value encoded in an empty executable.
cannam@85 2823 _LT_AC_SYS_LIBPATH_AIX
cannam@85 2824 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
cannam@85 2825 # Warning - without using the other run time loading flags,
cannam@85 2826 # -berok will link without error, but may produce a broken library.
cannam@85 2827 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
cannam@85 2828 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
cannam@85 2829 # -bexpall does not export symbols beginning with underscore (_)
cannam@85 2830 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
cannam@85 2831 # Exported symbols can be pulled into shared objects from archives
cannam@85 2832 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
cannam@85 2833 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
cannam@85 2834 # This is similar to how AIX traditionally builds it's shared libraries.
cannam@85 2835 _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'
cannam@85 2836 fi
cannam@85 2837 fi
cannam@85 2838 ;;
cannam@85 2839 chorus*)
cannam@85 2840 case $cc_basename in
cannam@85 2841 *)
cannam@85 2842 # FIXME: insert proper C++ library support
cannam@85 2843 _LT_AC_TAGVAR(ld_shlibs, $1)=no
cannam@85 2844 ;;
cannam@85 2845 esac
cannam@85 2846 ;;
cannam@85 2847
cannam@85 2848 cygwin* | mingw* | pw32*)
cannam@85 2849 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
cannam@85 2850 # as there is no search path for DLLs.
cannam@85 2851 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
cannam@85 2852 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
cannam@85 2853 _LT_AC_TAGVAR(always_export_symbols, $1)=no
cannam@85 2854 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
cannam@85 2855
cannam@85 2856 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
cannam@85 2857 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
cannam@85 2858 # If the export-symbols file already is a .def file (1st line
cannam@85 2859 # is EXPORTS), use it as is; otherwise, prepend...
cannam@85 2860 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
cannam@85 2861 cp $export_symbols $output_objdir/$soname.def;
cannam@85 2862 else
cannam@85 2863 echo EXPORTS > $output_objdir/$soname.def;
cannam@85 2864 cat $export_symbols >> $output_objdir/$soname.def;
cannam@85 2865 fi~
cannam@85 2866 $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
cannam@85 2867 else
cannam@85 2868 _LT_AC_TAGVAR(ld_shlibs, $1)=no
cannam@85 2869 fi
cannam@85 2870 ;;
cannam@85 2871
cannam@85 2872 darwin* | rhapsody*)
cannam@85 2873 if test "$GXX" = yes; then
cannam@85 2874 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
cannam@85 2875 case "$host_os" in
cannam@85 2876 rhapsody* | darwin1.[[012]])
cannam@85 2877 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
cannam@85 2878 ;;
cannam@85 2879 *) # Darwin 1.3 on
cannam@85 2880 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
cannam@85 2881 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
cannam@85 2882 else
cannam@85 2883 case ${MACOSX_DEPLOYMENT_TARGET} in
cannam@85 2884 10.[[012]])
cannam@85 2885 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
cannam@85 2886 ;;
cannam@85 2887 10.*)
cannam@85 2888 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
cannam@85 2889 ;;
cannam@85 2890 esac
cannam@85 2891 fi
cannam@85 2892 ;;
cannam@85 2893 esac
cannam@85 2894 lt_int_apple_cc_single_mod=no
cannam@85 2895 output_verbose_link_cmd='echo'
cannam@85 2896 if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
cannam@85 2897 lt_int_apple_cc_single_mod=yes
cannam@85 2898 fi
cannam@85 2899 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
cannam@85 2900 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
cannam@85 2901 else
cannam@85 2902 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
cannam@85 2903 fi
cannam@85 2904 _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
cannam@85 2905
cannam@85 2906 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
cannam@85 2907 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
cannam@85 2908 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
cannam@85 2909 else
cannam@85 2910 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
cannam@85 2911 fi
cannam@85 2912 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
cannam@85 2913 _LT_AC_TAGVAR(hardcode_direct, $1)=no
cannam@85 2914 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
cannam@85 2915 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
cannam@85 2916 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
cannam@85 2917 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
cannam@85 2918 else
cannam@85 2919 _LT_AC_TAGVAR(ld_shlibs, $1)=no
cannam@85 2920 fi
cannam@85 2921 ;;
cannam@85 2922
cannam@85 2923 dgux*)
cannam@85 2924 case $cc_basename in
cannam@85 2925 ec++)
cannam@85 2926 # FIXME: insert proper C++ library support
cannam@85 2927 _LT_AC_TAGVAR(ld_shlibs, $1)=no
cannam@85 2928 ;;
cannam@85 2929 ghcx)
cannam@85 2930 # Green Hills C++ Compiler
cannam@85 2931 # FIXME: insert proper C++ library support
cannam@85 2932 _LT_AC_TAGVAR(ld_shlibs, $1)=no
cannam@85 2933 ;;
cannam@85 2934 *)
cannam@85 2935 # FIXME: insert proper C++ library support
cannam@85 2936 _LT_AC_TAGVAR(ld_shlibs, $1)=no
cannam@85 2937 ;;
cannam@85 2938 esac
cannam@85 2939 ;;
cannam@85 2940 freebsd[12]*)
cannam@85 2941 # C++ shared libraries reported to be fairly broken before switch to ELF
cannam@85 2942 _LT_AC_TAGVAR(ld_shlibs, $1)=no
cannam@85 2943 ;;
cannam@85 2944 freebsd-elf*)
cannam@85 2945 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
cannam@85 2946 ;;
cannam@85 2947 freebsd* | kfreebsd*-gnu)
cannam@85 2948 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
cannam@85 2949 # conventions
cannam@85 2950 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
cannam@85 2951 ;;
cannam@85 2952 gnu*)
cannam@85 2953 ;;
cannam@85 2954 hpux9*)
cannam@85 2955 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
cannam@85 2956 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@85 2957 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
cannam@85 2958 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
cannam@85 2959 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
cannam@85 2960 # but as the default
cannam@85 2961 # location of the library.
cannam@85 2962
cannam@85 2963 case $cc_basename in
cannam@85 2964 CC)
cannam@85 2965 # FIXME: insert proper C++ library support
cannam@85 2966 _LT_AC_TAGVAR(ld_shlibs, $1)=no
cannam@85 2967 ;;
cannam@85 2968 aCC)
cannam@85 2969 _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'
cannam@85 2970 # Commands to make compiler produce verbose output that lists
cannam@85 2971 # what "hidden" libraries, object files and flags are used when
cannam@85 2972 # linking a shared library.
cannam@85 2973 #
cannam@85 2974 # There doesn't appear to be a way to prevent this compiler from
cannam@85 2975 # explicitly linking system object files so we need to strip them
cannam@85 2976 # from the output so that they don't get included in the library
cannam@85 2977 # dependencies.
cannam@85 2978 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'
cannam@85 2979 ;;
cannam@85 2980 *)
cannam@85 2981 if test "$GXX" = yes; then
cannam@85 2982 _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'
cannam@85 2983 else
cannam@85 2984 # FIXME: insert proper C++ library support
cannam@85 2985 _LT_AC_TAGVAR(ld_shlibs, $1)=no
cannam@85 2986 fi
cannam@85 2987 ;;
cannam@85 2988 esac
cannam@85 2989 ;;
cannam@85 2990 hpux10*|hpux11*)
cannam@85 2991 if test $with_gnu_ld = no; then
cannam@85 2992 case "$host_cpu" in
cannam@85 2993 hppa*64*)
cannam@85 2994 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
cannam@85 2995 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
cannam@85 2996 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@85 2997 ;;
cannam@85 2998 ia64*)
cannam@85 2999 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
cannam@85 3000 ;;
cannam@85 3001 *)
cannam@85 3002 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
cannam@85 3003 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@85 3004 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
cannam@85 3005 ;;
cannam@85 3006 esac
cannam@85 3007 fi
cannam@85 3008 case "$host_cpu" in
cannam@85 3009 hppa*64*)
cannam@85 3010 _LT_AC_TAGVAR(hardcode_direct, $1)=no
cannam@85 3011 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@85 3012 ;;
cannam@85 3013 ia64*)
cannam@85 3014 _LT_AC_TAGVAR(hardcode_direct, $1)=no
cannam@85 3015 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@85 3016 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
cannam@85 3017 # but as the default
cannam@85 3018 # location of the library.
cannam@85 3019 ;;
cannam@85 3020 *)
cannam@85 3021 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
cannam@85 3022 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
cannam@85 3023 # but as the default
cannam@85 3024 # location of the library.
cannam@85 3025 ;;
cannam@85 3026 esac
cannam@85 3027
cannam@85 3028 case $cc_basename in
cannam@85 3029 CC)
cannam@85 3030 # FIXME: insert proper C++ library support
cannam@85 3031 _LT_AC_TAGVAR(ld_shlibs, $1)=no
cannam@85 3032 ;;
cannam@85 3033 aCC)
cannam@85 3034 case "$host_cpu" in
cannam@85 3035 hppa*64*|ia64*)
cannam@85 3036 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
cannam@85 3037 ;;
cannam@85 3038 *)
cannam@85 3039 _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'
cannam@85 3040 ;;
cannam@85 3041 esac
cannam@85 3042 # Commands to make compiler produce verbose output that lists
cannam@85 3043 # what "hidden" libraries, object files and flags are used when
cannam@85 3044 # linking a shared library.
cannam@85 3045 #
cannam@85 3046 # There doesn't appear to be a way to prevent this compiler from
cannam@85 3047 # explicitly linking system object files so we need to strip them
cannam@85 3048 # from the output so that they don't get included in the library
cannam@85 3049 # dependencies.
cannam@85 3050 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
cannam@85 3051 ;;
cannam@85 3052 *)
cannam@85 3053 if test "$GXX" = yes; then
cannam@85 3054 if test $with_gnu_ld = no; then
cannam@85 3055 case "$host_cpu" in
cannam@85 3056 ia64*|hppa*64*)
cannam@85 3057 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
cannam@85 3058 ;;
cannam@85 3059 *)
cannam@85 3060 _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'
cannam@85 3061 ;;
cannam@85 3062 esac
cannam@85 3063 fi
cannam@85 3064 else
cannam@85 3065 # FIXME: insert proper C++ library support
cannam@85 3066 _LT_AC_TAGVAR(ld_shlibs, $1)=no
cannam@85 3067 fi
cannam@85 3068 ;;
cannam@85 3069 esac
cannam@85 3070 ;;
cannam@85 3071 irix5* | irix6*)
cannam@85 3072 case $cc_basename in
cannam@85 3073 CC)
cannam@85 3074 # SGI C++
cannam@85 3075 _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'
cannam@85 3076
cannam@85 3077 # Archives containing C++ object files must be created using
cannam@85 3078 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
cannam@85 3079 # necessary to make sure instantiated templates are included
cannam@85 3080 # in the archive.
cannam@85 3081 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
cannam@85 3082 ;;
cannam@85 3083 *)
cannam@85 3084 if test "$GXX" = yes; then
cannam@85 3085 if test "$with_gnu_ld" = no; then
cannam@85 3086 _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'
cannam@85 3087 else
cannam@85 3088 _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` -o $lib'
cannam@85 3089 fi
cannam@85 3090 fi
cannam@85 3091 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
cannam@85 3092 ;;
cannam@85 3093 esac
cannam@85 3094 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
cannam@85 3095 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@85 3096 ;;
cannam@85 3097 linux*)
cannam@85 3098 case $cc_basename in
cannam@85 3099 KCC)
cannam@85 3100 # Kuck and Associates, Inc. (KAI) C++ Compiler
cannam@85 3101
cannam@85 3102 # KCC will only create a shared library if the output file
cannam@85 3103 # ends with ".so" (or ".sl" for HP-UX), so rename the library
cannam@85 3104 # to its proper name (with version) after linking.
cannam@85 3105 _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
cannam@85 3106 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
cannam@85 3107 # Commands to make compiler produce verbose output that lists
cannam@85 3108 # what "hidden" libraries, object files and flags are used when
cannam@85 3109 # linking a shared library.
cannam@85 3110 #
cannam@85 3111 # There doesn't appear to be a way to prevent this compiler from
cannam@85 3112 # explicitly linking system object files so we need to strip them
cannam@85 3113 # from the output so that they don't get included in the library
cannam@85 3114 # dependencies.
cannam@85 3115 output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
cannam@85 3116
cannam@85 3117 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
cannam@85 3118 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
cannam@85 3119
cannam@85 3120 # Archives containing C++ object files must be created using
cannam@85 3121 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
cannam@85 3122 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
cannam@85 3123 ;;
cannam@85 3124 icpc)
cannam@85 3125 # Intel C++
cannam@85 3126 with_gnu_ld=yes
cannam@85 3127 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
cannam@85 3128 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
cannam@85 3129 _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'
cannam@85 3130 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
cannam@85 3131 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
cannam@85 3132 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
cannam@85 3133 ;;
cannam@85 3134 cxx)
cannam@85 3135 # Compaq C++
cannam@85 3136 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
cannam@85 3137 _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'
cannam@85 3138
cannam@85 3139 runpath_var=LD_RUN_PATH
cannam@85 3140 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
cannam@85 3141 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@85 3142
cannam@85 3143 # Commands to make compiler produce verbose output that lists
cannam@85 3144 # what "hidden" libraries, object files and flags are used when
cannam@85 3145 # linking a shared library.
cannam@85 3146 #
cannam@85 3147 # There doesn't appear to be a way to prevent this compiler from
cannam@85 3148 # explicitly linking system object files so we need to strip them
cannam@85 3149 # from the output so that they don't get included in the library
cannam@85 3150 # dependencies.
cannam@85 3151 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'
cannam@85 3152 ;;
cannam@85 3153 esac
cannam@85 3154 ;;
cannam@85 3155 lynxos*)
cannam@85 3156 # FIXME: insert proper C++ library support
cannam@85 3157 _LT_AC_TAGVAR(ld_shlibs, $1)=no
cannam@85 3158 ;;
cannam@85 3159 m88k*)
cannam@85 3160 # FIXME: insert proper C++ library support
cannam@85 3161 _LT_AC_TAGVAR(ld_shlibs, $1)=no
cannam@85 3162 ;;
cannam@85 3163 mvs*)
cannam@85 3164 case $cc_basename in
cannam@85 3165 cxx)
cannam@85 3166 # FIXME: insert proper C++ library support
cannam@85 3167 _LT_AC_TAGVAR(ld_shlibs, $1)=no
cannam@85 3168 ;;
cannam@85 3169 *)
cannam@85 3170 # FIXME: insert proper C++ library support
cannam@85 3171 _LT_AC_TAGVAR(ld_shlibs, $1)=no
cannam@85 3172 ;;
cannam@85 3173 esac
cannam@85 3174 ;;
cannam@85 3175 netbsd* | knetbsd*-gnu)
cannam@85 3176 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
cannam@85 3177 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
cannam@85 3178 wlarc=
cannam@85 3179 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
cannam@85 3180 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
cannam@85 3181 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@85 3182 fi
cannam@85 3183 # Workaround some broken pre-1.5 toolchains
cannam@85 3184 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
cannam@85 3185 ;;
cannam@85 3186 osf3*)
cannam@85 3187 case $cc_basename in
cannam@85 3188 KCC)
cannam@85 3189 # Kuck and Associates, Inc. (KAI) C++ Compiler
cannam@85 3190
cannam@85 3191 # KCC will only create a shared library if the output file
cannam@85 3192 # ends with ".so" (or ".sl" for HP-UX), so rename the library
cannam@85 3193 # to its proper name (with version) after linking.
cannam@85 3194 _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
cannam@85 3195
cannam@85 3196 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
cannam@85 3197 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@85 3198
cannam@85 3199 # Archives containing C++ object files must be created using
cannam@85 3200 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
cannam@85 3201 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
cannam@85 3202
cannam@85 3203 ;;
cannam@85 3204 RCC)
cannam@85 3205 # Rational C++ 2.4.1
cannam@85 3206 # FIXME: insert proper C++ library support
cannam@85 3207 _LT_AC_TAGVAR(ld_shlibs, $1)=no
cannam@85 3208 ;;
cannam@85 3209 cxx)
cannam@85 3210 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
cannam@85 3211 _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'
cannam@85 3212
cannam@85 3213 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
cannam@85 3214 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@85 3215
cannam@85 3216 # Commands to make compiler produce verbose output that lists
cannam@85 3217 # what "hidden" libraries, object files and flags are used when
cannam@85 3218 # linking a shared library.
cannam@85 3219 #
cannam@85 3220 # There doesn't appear to be a way to prevent this compiler from
cannam@85 3221 # explicitly linking system object files so we need to strip them
cannam@85 3222 # from the output so that they don't get included in the library
cannam@85 3223 # dependencies.
cannam@85 3224 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'
cannam@85 3225 ;;
cannam@85 3226 *)
cannam@85 3227 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
cannam@85 3228 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
cannam@85 3229 _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'
cannam@85 3230
cannam@85 3231 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
cannam@85 3232 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@85 3233
cannam@85 3234 # Commands to make compiler produce verbose output that lists
cannam@85 3235 # what "hidden" libraries, object files and flags are used when
cannam@85 3236 # linking a shared library.
cannam@85 3237 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
cannam@85 3238
cannam@85 3239 else
cannam@85 3240 # FIXME: insert proper C++ library support
cannam@85 3241 _LT_AC_TAGVAR(ld_shlibs, $1)=no
cannam@85 3242 fi
cannam@85 3243 ;;
cannam@85 3244 esac
cannam@85 3245 ;;
cannam@85 3246 osf4* | osf5*)
cannam@85 3247 case $cc_basename in
cannam@85 3248 KCC)
cannam@85 3249 # Kuck and Associates, Inc. (KAI) C++ Compiler
cannam@85 3250
cannam@85 3251 # KCC will only create a shared library if the output file
cannam@85 3252 # ends with ".so" (or ".sl" for HP-UX), so rename the library
cannam@85 3253 # to its proper name (with version) after linking.
cannam@85 3254 _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
cannam@85 3255
cannam@85 3256 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
cannam@85 3257 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@85 3258
cannam@85 3259 # Archives containing C++ object files must be created using
cannam@85 3260 # the KAI C++ compiler.
cannam@85 3261 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
cannam@85 3262 ;;
cannam@85 3263 RCC)
cannam@85 3264 # Rational C++ 2.4.1
cannam@85 3265 # FIXME: insert proper C++ library support
cannam@85 3266 _LT_AC_TAGVAR(ld_shlibs, $1)=no
cannam@85 3267 ;;
cannam@85 3268 cxx)
cannam@85 3269 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
cannam@85 3270 _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'
cannam@85 3271 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
cannam@85 3272 echo "-hidden">> $lib.exp~
cannam@85 3273 $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~
cannam@85 3274 $rm $lib.exp'
cannam@85 3275
cannam@85 3276 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
cannam@85 3277 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@85 3278
cannam@85 3279 # Commands to make compiler produce verbose output that lists
cannam@85 3280 # what "hidden" libraries, object files and flags are used when
cannam@85 3281 # linking a shared library.
cannam@85 3282 #
cannam@85 3283 # There doesn't appear to be a way to prevent this compiler from
cannam@85 3284 # explicitly linking system object files so we need to strip them
cannam@85 3285 # from the output so that they don't get included in the library
cannam@85 3286 # dependencies.
cannam@85 3287 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'
cannam@85 3288 ;;
cannam@85 3289 *)
cannam@85 3290 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
cannam@85 3291 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
cannam@85 3292 _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'
cannam@85 3293
cannam@85 3294 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
cannam@85 3295 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@85 3296
cannam@85 3297 # Commands to make compiler produce verbose output that lists
cannam@85 3298 # what "hidden" libraries, object files and flags are used when
cannam@85 3299 # linking a shared library.
cannam@85 3300 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
cannam@85 3301
cannam@85 3302 else
cannam@85 3303 # FIXME: insert proper C++ library support
cannam@85 3304 _LT_AC_TAGVAR(ld_shlibs, $1)=no
cannam@85 3305 fi
cannam@85 3306 ;;
cannam@85 3307 esac
cannam@85 3308 ;;
cannam@85 3309 psos*)
cannam@85 3310 # FIXME: insert proper C++ library support
cannam@85 3311 _LT_AC_TAGVAR(ld_shlibs, $1)=no
cannam@85 3312 ;;
cannam@85 3313 sco*)
cannam@85 3314 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
cannam@85 3315 case $cc_basename in
cannam@85 3316 CC)
cannam@85 3317 # FIXME: insert proper C++ library support
cannam@85 3318 _LT_AC_TAGVAR(ld_shlibs, $1)=no
cannam@85 3319 ;;
cannam@85 3320 *)
cannam@85 3321 # FIXME: insert proper C++ library support
cannam@85 3322 _LT_AC_TAGVAR(ld_shlibs, $1)=no
cannam@85 3323 ;;
cannam@85 3324 esac
cannam@85 3325 ;;
cannam@85 3326 sunos4*)
cannam@85 3327 case $cc_basename in
cannam@85 3328 CC)
cannam@85 3329 # Sun C++ 4.x
cannam@85 3330 # FIXME: insert proper C++ library support
cannam@85 3331 _LT_AC_TAGVAR(ld_shlibs, $1)=no
cannam@85 3332 ;;
cannam@85 3333 lcc)
cannam@85 3334 # Lucid
cannam@85 3335 # FIXME: insert proper C++ library support
cannam@85 3336 _LT_AC_TAGVAR(ld_shlibs, $1)=no
cannam@85 3337 ;;
cannam@85 3338 *)
cannam@85 3339 # FIXME: insert proper C++ library support
cannam@85 3340 _LT_AC_TAGVAR(ld_shlibs, $1)=no
cannam@85 3341 ;;
cannam@85 3342 esac
cannam@85 3343 ;;
cannam@85 3344 solaris*)
cannam@85 3345 case $cc_basename in
cannam@85 3346 CC)
cannam@85 3347 # Sun C++ 4.2, 5.x and Centerline C++
cannam@85 3348 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
cannam@85 3349 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
cannam@85 3350 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
cannam@85 3351 $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'
cannam@85 3352
cannam@85 3353 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
cannam@85 3354 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@85 3355 case $host_os in
cannam@85 3356 solaris2.[0-5] | solaris2.[0-5].*) ;;
cannam@85 3357 *)
cannam@85 3358 # The C++ compiler is used as linker so we must use $wl
cannam@85 3359 # flag to pass the commands to the underlying system
cannam@85 3360 # linker.
cannam@85 3361 # Supported since Solaris 2.6 (maybe 2.5.1?)
cannam@85 3362 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
cannam@85 3363 ;;
cannam@85 3364 esac
cannam@85 3365 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
cannam@85 3366
cannam@85 3367 # Commands to make compiler produce verbose output that lists
cannam@85 3368 # what "hidden" libraries, object files and flags are used when
cannam@85 3369 # linking a shared library.
cannam@85 3370 #
cannam@85 3371 # There doesn't appear to be a way to prevent this compiler from
cannam@85 3372 # explicitly linking system object files so we need to strip them
cannam@85 3373 # from the output so that they don't get included in the library
cannam@85 3374 # dependencies.
cannam@85 3375 output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
cannam@85 3376
cannam@85 3377 # Archives containing C++ object files must be created using
cannam@85 3378 # "CC -xar", where "CC" is the Sun C++ compiler. This is
cannam@85 3379 # necessary to make sure instantiated templates are included
cannam@85 3380 # in the archive.
cannam@85 3381 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
cannam@85 3382 ;;
cannam@85 3383 gcx)
cannam@85 3384 # Green Hills C++ Compiler
cannam@85 3385 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
cannam@85 3386
cannam@85 3387 # The C++ compiler must be used to create the archive.
cannam@85 3388 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
cannam@85 3389 ;;
cannam@85 3390 *)
cannam@85 3391 # GNU C++ compiler with Solaris linker
cannam@85 3392 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
cannam@85 3393 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
cannam@85 3394 if $CC --version | grep -v '^2\.7' > /dev/null; then
cannam@85 3395 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
cannam@85 3396 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
cannam@85 3397 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
cannam@85 3398
cannam@85 3399 # Commands to make compiler produce verbose output that lists
cannam@85 3400 # what "hidden" libraries, object files and flags are used when
cannam@85 3401 # linking a shared library.
cannam@85 3402 output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
cannam@85 3403 else
cannam@85 3404 # g++ 2.7 appears to require `-G' NOT `-shared' on this
cannam@85 3405 # platform.
cannam@85 3406 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
cannam@85 3407 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
cannam@85 3408 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
cannam@85 3409
cannam@85 3410 # Commands to make compiler produce verbose output that lists
cannam@85 3411 # what "hidden" libraries, object files and flags are used when
cannam@85 3412 # linking a shared library.
cannam@85 3413 output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
cannam@85 3414 fi
cannam@85 3415
cannam@85 3416 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
cannam@85 3417 fi
cannam@85 3418 ;;
cannam@85 3419 esac
cannam@85 3420 ;;
cannam@85 3421 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
cannam@85 3422 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
cannam@85 3423 ;;
cannam@85 3424 tandem*)
cannam@85 3425 case $cc_basename in
cannam@85 3426 NCC)
cannam@85 3427 # NonStop-UX NCC 3.20
cannam@85 3428 # FIXME: insert proper C++ library support
cannam@85 3429 _LT_AC_TAGVAR(ld_shlibs, $1)=no
cannam@85 3430 ;;
cannam@85 3431 *)
cannam@85 3432 # FIXME: insert proper C++ library support
cannam@85 3433 _LT_AC_TAGVAR(ld_shlibs, $1)=no
cannam@85 3434 ;;
cannam@85 3435 esac
cannam@85 3436 ;;
cannam@85 3437 vxworks*)
cannam@85 3438 # FIXME: insert proper C++ library support
cannam@85 3439 _LT_AC_TAGVAR(ld_shlibs, $1)=no
cannam@85 3440 ;;
cannam@85 3441 *)
cannam@85 3442 # FIXME: insert proper C++ library support
cannam@85 3443 _LT_AC_TAGVAR(ld_shlibs, $1)=no
cannam@85 3444 ;;
cannam@85 3445 esac
cannam@85 3446 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
cannam@85 3447 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
cannam@85 3448
cannam@85 3449 _LT_AC_TAGVAR(GCC, $1)="$GXX"
cannam@85 3450 _LT_AC_TAGVAR(LD, $1)="$LD"
cannam@85 3451
cannam@85 3452 AC_LIBTOOL_POSTDEP_PREDEP($1)
cannam@85 3453 AC_LIBTOOL_PROG_COMPILER_PIC($1)
cannam@85 3454 AC_LIBTOOL_PROG_CC_C_O($1)
cannam@85 3455 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
cannam@85 3456 AC_LIBTOOL_PROG_LD_SHLIBS($1)
cannam@85 3457 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
cannam@85 3458 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
cannam@85 3459 AC_LIBTOOL_SYS_LIB_STRIP
cannam@85 3460 AC_LIBTOOL_DLOPEN_SELF($1)
cannam@85 3461
cannam@85 3462 AC_LIBTOOL_CONFIG($1)
cannam@85 3463
cannam@85 3464 AC_LANG_POP
cannam@85 3465 CC=$lt_save_CC
cannam@85 3466 LDCXX=$LD
cannam@85 3467 LD=$lt_save_LD
cannam@85 3468 GCC=$lt_save_GCC
cannam@85 3469 with_gnu_ldcxx=$with_gnu_ld
cannam@85 3470 with_gnu_ld=$lt_save_with_gnu_ld
cannam@85 3471 lt_cv_path_LDCXX=$lt_cv_path_LD
cannam@85 3472 lt_cv_path_LD=$lt_save_path_LD
cannam@85 3473 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
cannam@85 3474 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
cannam@85 3475 ])# AC_LIBTOOL_LANG_CXX_CONFIG
cannam@85 3476
cannam@85 3477 # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
cannam@85 3478 # ------------------------
cannam@85 3479 # Figure out "hidden" library dependencies from verbose
cannam@85 3480 # compiler output when linking a shared library.
cannam@85 3481 # Parse the compiler output and extract the necessary
cannam@85 3482 # objects, libraries and library flags.
cannam@85 3483 AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
cannam@85 3484 dnl we can't use the lt_simple_compile_test_code here,
cannam@85 3485 dnl because it contains code intended for an executable,
cannam@85 3486 dnl not a library. It's possible we should let each
cannam@85 3487 dnl tag define a new lt_????_link_test_code variable,
cannam@85 3488 dnl but it's only used here...
cannam@85 3489 ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
cannam@85 3490 int a;
cannam@85 3491 void foo (void) { a = 0; }
cannam@85 3492 EOF
cannam@85 3493 ],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
cannam@85 3494 class Foo
cannam@85 3495 {
cannam@85 3496 public:
cannam@85 3497 Foo (void) { a = 0; }
cannam@85 3498 private:
cannam@85 3499 int a;
cannam@85 3500 };
cannam@85 3501 EOF
cannam@85 3502 ],[$1],[F77],[cat > conftest.$ac_ext <<EOF
cannam@85 3503 subroutine foo
cannam@85 3504 implicit none
cannam@85 3505 integer*4 a
cannam@85 3506 a=0
cannam@85 3507 return
cannam@85 3508 end
cannam@85 3509 EOF
cannam@85 3510 ],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
cannam@85 3511 public class foo {
cannam@85 3512 private int a;
cannam@85 3513 public void bar (void) {
cannam@85 3514 a = 0;
cannam@85 3515 }
cannam@85 3516 };
cannam@85 3517 EOF
cannam@85 3518 ])
cannam@85 3519 dnl Parse the compiler output and extract the necessary
cannam@85 3520 dnl objects, libraries and library flags.
cannam@85 3521 if AC_TRY_EVAL(ac_compile); then
cannam@85 3522 # Parse the compiler output and extract the necessary
cannam@85 3523 # objects, libraries and library flags.
cannam@85 3524
cannam@85 3525 # Sentinel used to keep track of whether or not we are before
cannam@85 3526 # the conftest object file.
cannam@85 3527 pre_test_object_deps_done=no
cannam@85 3528
cannam@85 3529 # The `*' in the case matches for architectures that use `case' in
cannam@85 3530 # $output_verbose_cmd can trigger glob expansion during the loop
cannam@85 3531 # eval without this substitution.
cannam@85 3532 output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
cannam@85 3533
cannam@85 3534 for p in `eval $output_verbose_link_cmd`; do
cannam@85 3535 case $p in
cannam@85 3536
cannam@85 3537 -L* | -R* | -l*)
cannam@85 3538 # Some compilers place space between "-{L,R}" and the path.
cannam@85 3539 # Remove the space.
cannam@85 3540 if test $p = "-L" \
cannam@85 3541 || test $p = "-R"; then
cannam@85 3542 prev=$p
cannam@85 3543 continue
cannam@85 3544 else
cannam@85 3545 prev=
cannam@85 3546 fi
cannam@85 3547
cannam@85 3548 if test "$pre_test_object_deps_done" = no; then
cannam@85 3549 case $p in
cannam@85 3550 -L* | -R*)
cannam@85 3551 # Internal compiler library paths should come after those
cannam@85 3552 # provided the user. The postdeps already come after the
cannam@85 3553 # user supplied libs so there is no need to process them.
cannam@85 3554 if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
cannam@85 3555 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
cannam@85 3556 else
cannam@85 3557 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
cannam@85 3558 fi
cannam@85 3559 ;;
cannam@85 3560 # The "-l" case would never come before the object being
cannam@85 3561 # linked, so don't bother handling this case.
cannam@85 3562 esac
cannam@85 3563 else
cannam@85 3564 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
cannam@85 3565 _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
cannam@85 3566 else
cannam@85 3567 _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
cannam@85 3568 fi
cannam@85 3569 fi
cannam@85 3570 ;;
cannam@85 3571
cannam@85 3572 *.$objext)
cannam@85 3573 # This assumes that the test object file only shows up
cannam@85 3574 # once in the compiler output.
cannam@85 3575 if test "$p" = "conftest.$objext"; then
cannam@85 3576 pre_test_object_deps_done=yes
cannam@85 3577 continue
cannam@85 3578 fi
cannam@85 3579
cannam@85 3580 if test "$pre_test_object_deps_done" = no; then
cannam@85 3581 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
cannam@85 3582 _LT_AC_TAGVAR(predep_objects, $1)="$p"
cannam@85 3583 else
cannam@85 3584 _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
cannam@85 3585 fi
cannam@85 3586 else
cannam@85 3587 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
cannam@85 3588 _LT_AC_TAGVAR(postdep_objects, $1)="$p"
cannam@85 3589 else
cannam@85 3590 _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
cannam@85 3591 fi
cannam@85 3592 fi
cannam@85 3593 ;;
cannam@85 3594
cannam@85 3595 *) ;; # Ignore the rest.
cannam@85 3596
cannam@85 3597 esac
cannam@85 3598 done
cannam@85 3599
cannam@85 3600 # Clean up.
cannam@85 3601 rm -f a.out a.exe
cannam@85 3602 else
cannam@85 3603 echo "libtool.m4: error: problem compiling $1 test program"
cannam@85 3604 fi
cannam@85 3605
cannam@85 3606 $rm -f confest.$objext
cannam@85 3607
cannam@85 3608 case " $_LT_AC_TAGVAR(postdeps, $1) " in
cannam@85 3609 *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
cannam@85 3610 esac
cannam@85 3611 ])# AC_LIBTOOL_POSTDEP_PREDEP
cannam@85 3612
cannam@85 3613 # AC_LIBTOOL_LANG_F77_CONFIG
cannam@85 3614 # ------------------------
cannam@85 3615 # Ensure that the configuration vars for the C compiler are
cannam@85 3616 # suitably defined. Those variables are subsequently used by
cannam@85 3617 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
cannam@85 3618 AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
cannam@85 3619 AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
cannam@85 3620 [AC_REQUIRE([AC_PROG_F77])
cannam@85 3621 AC_LANG_PUSH(Fortran 77)
cannam@85 3622
cannam@85 3623 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
cannam@85 3624 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
cannam@85 3625 _LT_AC_TAGVAR(always_export_symbols, $1)=no
cannam@85 3626 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
cannam@85 3627 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
cannam@85 3628 _LT_AC_TAGVAR(hardcode_direct, $1)=no
cannam@85 3629 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
cannam@85 3630 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
cannam@85 3631 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
cannam@85 3632 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
cannam@85 3633 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
cannam@85 3634 _LT_AC_TAGVAR(module_cmds, $1)=
cannam@85 3635 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
cannam@85 3636 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
cannam@85 3637 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
cannam@85 3638 _LT_AC_TAGVAR(no_undefined_flag, $1)=
cannam@85 3639 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
cannam@85 3640 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
cannam@85 3641
cannam@85 3642 # Source file extension for f77 test sources.
cannam@85 3643 ac_ext=f
cannam@85 3644
cannam@85 3645 # Object file extension for compiled f77 test sources.
cannam@85 3646 objext=o
cannam@85 3647 _LT_AC_TAGVAR(objext, $1)=$objext
cannam@85 3648
cannam@85 3649 # Code to be used in simple compile tests
cannam@85 3650 lt_simple_compile_test_code=" subroutine t\n return\n end\n"
cannam@85 3651
cannam@85 3652 # Code to be used in simple link tests
cannam@85 3653 lt_simple_link_test_code=" program t\n end\n"
cannam@85 3654
cannam@85 3655 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
cannam@85 3656 _LT_AC_SYS_COMPILER
cannam@85 3657
cannam@85 3658 # Allow CC to be a program name with arguments.
cannam@85 3659 lt_save_CC="$CC"
cannam@85 3660 CC=${F77-"f77"}
cannam@85 3661 compiler=$CC
cannam@85 3662 _LT_AC_TAGVAR(compiler, $1)=$CC
cannam@85 3663 cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
cannam@85 3664
cannam@85 3665 AC_MSG_CHECKING([if libtool supports shared libraries])
cannam@85 3666 AC_MSG_RESULT([$can_build_shared])
cannam@85 3667
cannam@85 3668 AC_MSG_CHECKING([whether to build shared libraries])
cannam@85 3669 test "$can_build_shared" = "no" && enable_shared=no
cannam@85 3670
cannam@85 3671 # On AIX, shared libraries and static libraries use the same namespace, and
cannam@85 3672 # are all built from PIC.
cannam@85 3673 case "$host_os" in
cannam@85 3674 aix3*)
cannam@85 3675 test "$enable_shared" = yes && enable_static=no
cannam@85 3676 if test -n "$RANLIB"; then
cannam@85 3677 archive_cmds="$archive_cmds~\$RANLIB \$lib"
cannam@85 3678 postinstall_cmds='$RANLIB $lib'
cannam@85 3679 fi
cannam@85 3680 ;;
cannam@85 3681 aix4*)
cannam@85 3682 test "$enable_shared" = yes && enable_static=no
cannam@85 3683 ;;
cannam@85 3684 esac
cannam@85 3685 AC_MSG_RESULT([$enable_shared])
cannam@85 3686
cannam@85 3687 AC_MSG_CHECKING([whether to build static libraries])
cannam@85 3688 # Make sure either enable_shared or enable_static is yes.
cannam@85 3689 test "$enable_shared" = yes || enable_static=yes
cannam@85 3690 AC_MSG_RESULT([$enable_static])
cannam@85 3691
cannam@85 3692 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
cannam@85 3693
cannam@85 3694 _LT_AC_TAGVAR(GCC, $1)="$G77"
cannam@85 3695 _LT_AC_TAGVAR(LD, $1)="$LD"
cannam@85 3696
cannam@85 3697 AC_LIBTOOL_PROG_COMPILER_PIC($1)
cannam@85 3698 AC_LIBTOOL_PROG_CC_C_O($1)
cannam@85 3699 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
cannam@85 3700 AC_LIBTOOL_PROG_LD_SHLIBS($1)
cannam@85 3701 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
cannam@85 3702 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
cannam@85 3703 AC_LIBTOOL_SYS_LIB_STRIP
cannam@85 3704
cannam@85 3705
cannam@85 3706 AC_LIBTOOL_CONFIG($1)
cannam@85 3707
cannam@85 3708 AC_LANG_POP
cannam@85 3709 CC="$lt_save_CC"
cannam@85 3710 ])# AC_LIBTOOL_LANG_F77_CONFIG
cannam@85 3711
cannam@85 3712
cannam@85 3713 # AC_LIBTOOL_LANG_GCJ_CONFIG
cannam@85 3714 # --------------------------
cannam@85 3715 # Ensure that the configuration vars for the C compiler are
cannam@85 3716 # suitably defined. Those variables are subsequently used by
cannam@85 3717 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
cannam@85 3718 AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
cannam@85 3719 AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
cannam@85 3720 [AC_LANG_SAVE
cannam@85 3721
cannam@85 3722 # Source file extension for Java test sources.
cannam@85 3723 ac_ext=java
cannam@85 3724
cannam@85 3725 # Object file extension for compiled Java test sources.
cannam@85 3726 objext=o
cannam@85 3727 _LT_AC_TAGVAR(objext, $1)=$objext
cannam@85 3728
cannam@85 3729 # Code to be used in simple compile tests
cannam@85 3730 lt_simple_compile_test_code="class foo {}\n"
cannam@85 3731
cannam@85 3732 # Code to be used in simple link tests
cannam@85 3733 lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
cannam@85 3734
cannam@85 3735 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
cannam@85 3736 _LT_AC_SYS_COMPILER
cannam@85 3737
cannam@85 3738 # Allow CC to be a program name with arguments.
cannam@85 3739 lt_save_CC="$CC"
cannam@85 3740 CC=${GCJ-"gcj"}
cannam@85 3741 compiler=$CC
cannam@85 3742 _LT_AC_TAGVAR(compiler, $1)=$CC
cannam@85 3743
cannam@85 3744 # GCJ did not exist at the time GCC didn't implicitly link libc in.
cannam@85 3745 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
cannam@85 3746
cannam@85 3747 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
cannam@85 3748 AC_LIBTOOL_PROG_COMPILER_PIC($1)
cannam@85 3749 AC_LIBTOOL_PROG_CC_C_O($1)
cannam@85 3750 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
cannam@85 3751 AC_LIBTOOL_PROG_LD_SHLIBS($1)
cannam@85 3752 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
cannam@85 3753 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
cannam@85 3754 AC_LIBTOOL_SYS_LIB_STRIP
cannam@85 3755 AC_LIBTOOL_DLOPEN_SELF($1)
cannam@85 3756
cannam@85 3757 AC_LIBTOOL_CONFIG($1)
cannam@85 3758
cannam@85 3759 AC_LANG_RESTORE
cannam@85 3760 CC="$lt_save_CC"
cannam@85 3761 ])# AC_LIBTOOL_LANG_GCJ_CONFIG
cannam@85 3762
cannam@85 3763
cannam@85 3764 # AC_LIBTOOL_LANG_RC_CONFIG
cannam@85 3765 # --------------------------
cannam@85 3766 # Ensure that the configuration vars for the Windows resource compiler are
cannam@85 3767 # suitably defined. Those variables are subsequently used by
cannam@85 3768 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
cannam@85 3769 AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
cannam@85 3770 AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
cannam@85 3771 [AC_LANG_SAVE
cannam@85 3772
cannam@85 3773 # Source file extension for RC test sources.
cannam@85 3774 ac_ext=rc
cannam@85 3775
cannam@85 3776 # Object file extension for compiled RC test sources.
cannam@85 3777 objext=o
cannam@85 3778 _LT_AC_TAGVAR(objext, $1)=$objext
cannam@85 3779
cannam@85 3780 # Code to be used in simple compile tests
cannam@85 3781 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
cannam@85 3782
cannam@85 3783 # Code to be used in simple link tests
cannam@85 3784 lt_simple_link_test_code="$lt_simple_compile_test_code"
cannam@85 3785
cannam@85 3786 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
cannam@85 3787 _LT_AC_SYS_COMPILER
cannam@85 3788
cannam@85 3789 # Allow CC to be a program name with arguments.
cannam@85 3790 lt_save_CC="$CC"
cannam@85 3791 CC=${RC-"windres"}
cannam@85 3792 compiler=$CC
cannam@85 3793 _LT_AC_TAGVAR(compiler, $1)=$CC
cannam@85 3794 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
cannam@85 3795
cannam@85 3796 AC_LIBTOOL_CONFIG($1)
cannam@85 3797
cannam@85 3798 AC_LANG_RESTORE
cannam@85 3799 CC="$lt_save_CC"
cannam@85 3800 ])# AC_LIBTOOL_LANG_RC_CONFIG
cannam@85 3801
cannam@85 3802
cannam@85 3803 # AC_LIBTOOL_CONFIG([TAGNAME])
cannam@85 3804 # ----------------------------
cannam@85 3805 # If TAGNAME is not passed, then create an initial libtool script
cannam@85 3806 # with a default configuration from the untagged config vars. Otherwise
cannam@85 3807 # add code to config.status for appending the configuration named by
cannam@85 3808 # TAGNAME from the matching tagged config vars.
cannam@85 3809 AC_DEFUN([AC_LIBTOOL_CONFIG],
cannam@85 3810 [# The else clause should only fire when bootstrapping the
cannam@85 3811 # libtool distribution, otherwise you forgot to ship ltmain.sh
cannam@85 3812 # with your package, and you will get complaints that there are
cannam@85 3813 # no rules to generate ltmain.sh.
cannam@85 3814 if test -f "$ltmain"; then
cannam@85 3815 # See if we are running on zsh, and set the options which allow our commands through
cannam@85 3816 # without removal of \ escapes.
cannam@85 3817 if test -n "${ZSH_VERSION+set}" ; then
cannam@85 3818 setopt NO_GLOB_SUBST
cannam@85 3819 fi
cannam@85 3820 # Now quote all the things that may contain metacharacters while being
cannam@85 3821 # careful not to overquote the AC_SUBSTed values. We take copies of the
cannam@85 3822 # variables and quote the copies for generation of the libtool script.
cannam@85 3823 for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
cannam@85 3824 SED SHELL STRIP \
cannam@85 3825 libname_spec library_names_spec soname_spec extract_expsyms_cmds \
cannam@85 3826 old_striplib striplib file_magic_cmd finish_cmds finish_eval \
cannam@85 3827 deplibs_check_method reload_flag reload_cmds need_locks \
cannam@85 3828 lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
cannam@85 3829 lt_cv_sys_global_symbol_to_c_name_address \
cannam@85 3830 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
cannam@85 3831 old_postinstall_cmds old_postuninstall_cmds \
cannam@85 3832 _LT_AC_TAGVAR(compiler, $1) \
cannam@85 3833 _LT_AC_TAGVAR(CC, $1) \
cannam@85 3834 _LT_AC_TAGVAR(LD, $1) \
cannam@85 3835 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
cannam@85 3836 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
cannam@85 3837 _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
cannam@85 3838 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
cannam@85 3839 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
cannam@85 3840 _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
cannam@85 3841 _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
cannam@85 3842 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
cannam@85 3843 _LT_AC_TAGVAR(old_archive_cmds, $1) \
cannam@85 3844 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
cannam@85 3845 _LT_AC_TAGVAR(predep_objects, $1) \
cannam@85 3846 _LT_AC_TAGVAR(postdep_objects, $1) \
cannam@85 3847 _LT_AC_TAGVAR(predeps, $1) \
cannam@85 3848 _LT_AC_TAGVAR(postdeps, $1) \
cannam@85 3849 _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
cannam@85 3850 _LT_AC_TAGVAR(archive_cmds, $1) \
cannam@85 3851 _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
cannam@85 3852 _LT_AC_TAGVAR(postinstall_cmds, $1) \
cannam@85 3853 _LT_AC_TAGVAR(postuninstall_cmds, $1) \
cannam@85 3854 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
cannam@85 3855 _LT_AC_TAGVAR(allow_undefined_flag, $1) \
cannam@85 3856 _LT_AC_TAGVAR(no_undefined_flag, $1) \
cannam@85 3857 _LT_AC_TAGVAR(export_symbols_cmds, $1) \
cannam@85 3858 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
cannam@85 3859 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
cannam@85 3860 _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
cannam@85 3861 _LT_AC_TAGVAR(hardcode_automatic, $1) \
cannam@85 3862 _LT_AC_TAGVAR(module_cmds, $1) \
cannam@85 3863 _LT_AC_TAGVAR(module_expsym_cmds, $1) \
cannam@85 3864 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
cannam@85 3865 _LT_AC_TAGVAR(exclude_expsyms, $1) \
cannam@85 3866 _LT_AC_TAGVAR(include_expsyms, $1); do
cannam@85 3867
cannam@85 3868 case $var in
cannam@85 3869 _LT_AC_TAGVAR(old_archive_cmds, $1) | \
cannam@85 3870 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
cannam@85 3871 _LT_AC_TAGVAR(archive_cmds, $1) | \
cannam@85 3872 _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
cannam@85 3873 _LT_AC_TAGVAR(module_cmds, $1) | \
cannam@85 3874 _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
cannam@85 3875 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
cannam@85 3876 _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
cannam@85 3877 extract_expsyms_cmds | reload_cmds | finish_cmds | \
cannam@85 3878 postinstall_cmds | postuninstall_cmds | \
cannam@85 3879 old_postinstall_cmds | old_postuninstall_cmds | \
cannam@85 3880 sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
cannam@85 3881 # Double-quote double-evaled strings.
cannam@85 3882 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
cannam@85 3883 ;;
cannam@85 3884 *)
cannam@85 3885 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
cannam@85 3886 ;;
cannam@85 3887 esac
cannam@85 3888 done
cannam@85 3889
cannam@85 3890 case $lt_echo in
cannam@85 3891 *'\[$]0 --fallback-echo"')
cannam@85 3892 lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
cannam@85 3893 ;;
cannam@85 3894 esac
cannam@85 3895
cannam@85 3896 ifelse([$1], [],
cannam@85 3897 [cfgfile="${ofile}T"
cannam@85 3898 trap "$rm \"$cfgfile\"; exit 1" 1 2 15
cannam@85 3899 $rm -f "$cfgfile"
cannam@85 3900 AC_MSG_NOTICE([creating $ofile])],
cannam@85 3901 [cfgfile="$ofile"])
cannam@85 3902
cannam@85 3903 cat <<__EOF__ >> "$cfgfile"
cannam@85 3904 ifelse([$1], [],
cannam@85 3905 [#! $SHELL
cannam@85 3906
cannam@85 3907 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
cannam@85 3908 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
cannam@85 3909 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
cannam@85 3910 #
cannam@85 3911 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
cannam@85 3912 # Free Software Foundation, Inc.
cannam@85 3913 #
cannam@85 3914 # This file is part of GNU Libtool:
cannam@85 3915 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
cannam@85 3916 #
cannam@85 3917 # This program is free software; you can redistribute it and/or modify
cannam@85 3918 # it under the terms of the GNU General Public License as published by
cannam@85 3919 # the Free Software Foundation; either version 2 of the License, or
cannam@85 3920 # (at your option) any later version.
cannam@85 3921 #
cannam@85 3922 # This program is distributed in the hope that it will be useful, but
cannam@85 3923 # WITHOUT ANY WARRANTY; without even the implied warranty of
cannam@85 3924 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
cannam@85 3925 # General Public License for more details.
cannam@85 3926 #
cannam@85 3927 # You should have received a copy of the GNU General Public License
cannam@85 3928 # along with this program; if not, write to the Free Software
cannam@85 3929 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
cannam@85 3930 #
cannam@85 3931 # As a special exception to the GNU General Public License, if you
cannam@85 3932 # distribute this file as part of a program that contains a
cannam@85 3933 # configuration script generated by Autoconf, you may include it under
cannam@85 3934 # the same distribution terms that you use for the rest of that program.
cannam@85 3935
cannam@85 3936 # A sed program that does not truncate output.
cannam@85 3937 SED=$lt_SED
cannam@85 3938
cannam@85 3939 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
cannam@85 3940 Xsed="$SED -e s/^X//"
cannam@85 3941
cannam@85 3942 # The HP-UX ksh and POSIX shell print the target directory to stdout
cannam@85 3943 # if CDPATH is set.
cannam@85 3944 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
cannam@85 3945
cannam@85 3946 # The names of the tagged configurations supported by this script.
cannam@85 3947 available_tags=
cannam@85 3948
cannam@85 3949 # ### BEGIN LIBTOOL CONFIG],
cannam@85 3950 [# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
cannam@85 3951
cannam@85 3952 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
cannam@85 3953
cannam@85 3954 # Shell to use when invoking shell scripts.
cannam@85 3955 SHELL=$lt_SHELL
cannam@85 3956
cannam@85 3957 # Whether or not to build shared libraries.
cannam@85 3958 build_libtool_libs=$enable_shared
cannam@85 3959
cannam@85 3960 # Whether or not to build static libraries.
cannam@85 3961 build_old_libs=$enable_static
cannam@85 3962
cannam@85 3963 # Whether or not to add -lc for building shared libraries.
cannam@85 3964 build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
cannam@85 3965
cannam@85 3966 # Whether or not to disallow shared libs when runtime libs are static
cannam@85 3967 allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
cannam@85 3968
cannam@85 3969 # Whether or not to optimize for fast installation.
cannam@85 3970 fast_install=$enable_fast_install
cannam@85 3971
cannam@85 3972 # The host system.
cannam@85 3973 host_alias=$host_alias
cannam@85 3974 host=$host
cannam@85 3975
cannam@85 3976 # An echo program that does not interpret backslashes.
cannam@85 3977 echo=$lt_echo
cannam@85 3978
cannam@85 3979 # The archiver.
cannam@85 3980 AR=$lt_AR
cannam@85 3981 AR_FLAGS=$lt_AR_FLAGS
cannam@85 3982
cannam@85 3983 # A C compiler.
cannam@85 3984 LTCC=$lt_LTCC
cannam@85 3985
cannam@85 3986 # A language-specific compiler.
cannam@85 3987 CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
cannam@85 3988
cannam@85 3989 # Is the compiler the GNU C compiler?
cannam@85 3990 with_gcc=$_LT_AC_TAGVAR(GCC, $1)
cannam@85 3991
cannam@85 3992 # An ERE matcher.
cannam@85 3993 EGREP=$lt_EGREP
cannam@85 3994
cannam@85 3995 # The linker used to build libraries.
cannam@85 3996 LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
cannam@85 3997
cannam@85 3998 # Whether we need hard or soft links.
cannam@85 3999 LN_S=$lt_LN_S
cannam@85 4000
cannam@85 4001 # A BSD-compatible nm program.
cannam@85 4002 NM=$lt_NM
cannam@85 4003
cannam@85 4004 # A symbol stripping program
cannam@85 4005 STRIP=$lt_STRIP
cannam@85 4006
cannam@85 4007 # Used to examine libraries when file_magic_cmd begins "file"
cannam@85 4008 MAGIC_CMD=$MAGIC_CMD
cannam@85 4009
cannam@85 4010 # Used on cygwin: DLL creation program.
cannam@85 4011 DLLTOOL="$DLLTOOL"
cannam@85 4012
cannam@85 4013 # Used on cygwin: object dumper.
cannam@85 4014 OBJDUMP="$OBJDUMP"
cannam@85 4015
cannam@85 4016 # Used on cygwin: assembler.
cannam@85 4017 AS="$AS"
cannam@85 4018
cannam@85 4019 # The name of the directory that contains temporary libtool files.
cannam@85 4020 objdir=$objdir
cannam@85 4021
cannam@85 4022 # How to create reloadable object files.
cannam@85 4023 reload_flag=$lt_reload_flag
cannam@85 4024 reload_cmds=$lt_reload_cmds
cannam@85 4025
cannam@85 4026 # How to pass a linker flag through the compiler.
cannam@85 4027 wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
cannam@85 4028
cannam@85 4029 # Object file suffix (normally "o").
cannam@85 4030 objext="$ac_objext"
cannam@85 4031
cannam@85 4032 # Old archive suffix (normally "a").
cannam@85 4033 libext="$libext"
cannam@85 4034
cannam@85 4035 # Shared library suffix (normally ".so").
cannam@85 4036 shrext='$shrext'
cannam@85 4037
cannam@85 4038 # Executable file suffix (normally "").
cannam@85 4039 exeext="$exeext"
cannam@85 4040
cannam@85 4041 # Additional compiler flags for building library objects.
cannam@85 4042 pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
cannam@85 4043 pic_mode=$pic_mode
cannam@85 4044
cannam@85 4045 # What is the maximum length of a command?
cannam@85 4046 max_cmd_len=$lt_cv_sys_max_cmd_len
cannam@85 4047
cannam@85 4048 # Does compiler simultaneously support -c and -o options?
cannam@85 4049 compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
cannam@85 4050
cannam@85 4051 # Must we lock files when doing compilation ?
cannam@85 4052 need_locks=$lt_need_locks
cannam@85 4053
cannam@85 4054 # Do we need the lib prefix for modules?
cannam@85 4055 need_lib_prefix=$need_lib_prefix
cannam@85 4056
cannam@85 4057 # Do we need a version for libraries?
cannam@85 4058 need_version=$need_version
cannam@85 4059
cannam@85 4060 # Whether dlopen is supported.
cannam@85 4061 dlopen_support=$enable_dlopen
cannam@85 4062
cannam@85 4063 # Whether dlopen of programs is supported.
cannam@85 4064 dlopen_self=$enable_dlopen_self
cannam@85 4065
cannam@85 4066 # Whether dlopen of statically linked programs is supported.
cannam@85 4067 dlopen_self_static=$enable_dlopen_self_static
cannam@85 4068
cannam@85 4069 # Compiler flag to prevent dynamic linking.
cannam@85 4070 link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
cannam@85 4071
cannam@85 4072 # Compiler flag to turn off builtin functions.
cannam@85 4073 no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
cannam@85 4074
cannam@85 4075 # Compiler flag to allow reflexive dlopens.
cannam@85 4076 export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
cannam@85 4077
cannam@85 4078 # Compiler flag to generate shared objects directly from archives.
cannam@85 4079 whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
cannam@85 4080
cannam@85 4081 # Compiler flag to generate thread-safe objects.
cannam@85 4082 thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
cannam@85 4083
cannam@85 4084 # Library versioning type.
cannam@85 4085 version_type=$version_type
cannam@85 4086
cannam@85 4087 # Format of library name prefix.
cannam@85 4088 libname_spec=$lt_libname_spec
cannam@85 4089
cannam@85 4090 # List of archive names. First name is the real one, the rest are links.
cannam@85 4091 # The last name is the one that the linker finds with -lNAME.
cannam@85 4092 library_names_spec=$lt_library_names_spec
cannam@85 4093
cannam@85 4094 # The coded name of the library, if different from the real name.
cannam@85 4095 soname_spec=$lt_soname_spec
cannam@85 4096
cannam@85 4097 # Commands used to build and install an old-style archive.
cannam@85 4098 RANLIB=$lt_RANLIB
cannam@85 4099 old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
cannam@85 4100 old_postinstall_cmds=$lt_old_postinstall_cmds
cannam@85 4101 old_postuninstall_cmds=$lt_old_postuninstall_cmds
cannam@85 4102
cannam@85 4103 # Create an old-style archive from a shared archive.
cannam@85 4104 old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
cannam@85 4105
cannam@85 4106 # Create a temporary old-style archive to link instead of a shared archive.
cannam@85 4107 old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
cannam@85 4108
cannam@85 4109 # Commands used to build and install a shared archive.
cannam@85 4110 archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
cannam@85 4111 archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
cannam@85 4112 postinstall_cmds=$lt_postinstall_cmds
cannam@85 4113 postuninstall_cmds=$lt_postuninstall_cmds
cannam@85 4114
cannam@85 4115 # Commands used to build a loadable module (assumed same as above if empty)
cannam@85 4116 module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
cannam@85 4117 module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
cannam@85 4118
cannam@85 4119 # Commands to strip libraries.
cannam@85 4120 old_striplib=$lt_old_striplib
cannam@85 4121 striplib=$lt_striplib
cannam@85 4122
cannam@85 4123 # Dependencies to place before the objects being linked to create a
cannam@85 4124 # shared library.
cannam@85 4125 predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
cannam@85 4126
cannam@85 4127 # Dependencies to place after the objects being linked to create a
cannam@85 4128 # shared library.
cannam@85 4129 postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
cannam@85 4130
cannam@85 4131 # Dependencies to place before the objects being linked to create a
cannam@85 4132 # shared library.
cannam@85 4133 predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
cannam@85 4134
cannam@85 4135 # Dependencies to place after the objects being linked to create a
cannam@85 4136 # shared library.
cannam@85 4137 postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
cannam@85 4138
cannam@85 4139 # The library search path used internally by the compiler when linking
cannam@85 4140 # a shared library.
cannam@85 4141 compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
cannam@85 4142
cannam@85 4143 # Method to check whether dependent libraries are shared objects.
cannam@85 4144 deplibs_check_method=$lt_deplibs_check_method
cannam@85 4145
cannam@85 4146 # Command to use when deplibs_check_method == file_magic.
cannam@85 4147 file_magic_cmd=$lt_file_magic_cmd
cannam@85 4148
cannam@85 4149 # Flag that allows shared libraries with undefined symbols to be built.
cannam@85 4150 allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
cannam@85 4151
cannam@85 4152 # Flag that forces no undefined symbols.
cannam@85 4153 no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
cannam@85 4154
cannam@85 4155 # Commands used to finish a libtool library installation in a directory.
cannam@85 4156 finish_cmds=$lt_finish_cmds
cannam@85 4157
cannam@85 4158 # Same as above, but a single script fragment to be evaled but not shown.
cannam@85 4159 finish_eval=$lt_finish_eval
cannam@85 4160
cannam@85 4161 # Take the output of nm and produce a listing of raw symbols and C names.
cannam@85 4162 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
cannam@85 4163
cannam@85 4164 # Transform the output of nm in a proper C declaration
cannam@85 4165 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
cannam@85 4166
cannam@85 4167 # Transform the output of nm in a C name address pair
cannam@85 4168 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
cannam@85 4169
cannam@85 4170 # This is the shared library runtime path variable.
cannam@85 4171 runpath_var=$runpath_var
cannam@85 4172
cannam@85 4173 # This is the shared library path variable.
cannam@85 4174 shlibpath_var=$shlibpath_var
cannam@85 4175
cannam@85 4176 # Is shlibpath searched before the hard-coded library search path?
cannam@85 4177 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
cannam@85 4178
cannam@85 4179 # How to hardcode a shared library path into an executable.
cannam@85 4180 hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
cannam@85 4181
cannam@85 4182 # Whether we should hardcode library paths into libraries.
cannam@85 4183 hardcode_into_libs=$hardcode_into_libs
cannam@85 4184
cannam@85 4185 # Flag to hardcode \$libdir into a binary during linking.
cannam@85 4186 # This must work even if \$libdir does not exist.
cannam@85 4187 hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
cannam@85 4188
cannam@85 4189 # If ld is used when linking, flag to hardcode \$libdir into
cannam@85 4190 # a binary during linking. This must work even if \$libdir does
cannam@85 4191 # not exist.
cannam@85 4192 hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
cannam@85 4193
cannam@85 4194 # Whether we need a single -rpath flag with a separated argument.
cannam@85 4195 hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
cannam@85 4196
cannam@85 4197 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
cannam@85 4198 # resulting binary.
cannam@85 4199 hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
cannam@85 4200
cannam@85 4201 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
cannam@85 4202 # resulting binary.
cannam@85 4203 hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
cannam@85 4204
cannam@85 4205 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
cannam@85 4206 # the resulting binary.
cannam@85 4207 hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
cannam@85 4208
cannam@85 4209 # Set to yes if building a shared library automatically hardcodes DIR into the library
cannam@85 4210 # and all subsequent libraries and executables linked against it.
cannam@85 4211 hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
cannam@85 4212
cannam@85 4213 # Variables whose values should be saved in libtool wrapper scripts and
cannam@85 4214 # restored at relink time.
cannam@85 4215 variables_saved_for_relink="$variables_saved_for_relink"
cannam@85 4216
cannam@85 4217 # Whether libtool must link a program against all its dependency libraries.
cannam@85 4218 link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
cannam@85 4219
cannam@85 4220 # Compile-time system search path for libraries
cannam@85 4221 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
cannam@85 4222
cannam@85 4223 # Run-time system search path for libraries
cannam@85 4224 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
cannam@85 4225
cannam@85 4226 # Fix the shell variable \$srcfile for the compiler.
cannam@85 4227 fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
cannam@85 4228
cannam@85 4229 # Set to yes if exported symbols are required.
cannam@85 4230 always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
cannam@85 4231
cannam@85 4232 # The commands to list exported symbols.
cannam@85 4233 export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
cannam@85 4234
cannam@85 4235 # The commands to extract the exported symbol list from a shared archive.
cannam@85 4236 extract_expsyms_cmds=$lt_extract_expsyms_cmds
cannam@85 4237
cannam@85 4238 # Symbols that should not be listed in the preloaded symbols.
cannam@85 4239 exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
cannam@85 4240
cannam@85 4241 # Symbols that must always be exported.
cannam@85 4242 include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
cannam@85 4243
cannam@85 4244 ifelse([$1],[],
cannam@85 4245 [# ### END LIBTOOL CONFIG],
cannam@85 4246 [# ### END LIBTOOL TAG CONFIG: $tagname])
cannam@85 4247
cannam@85 4248 __EOF__
cannam@85 4249
cannam@85 4250 ifelse([$1],[], [
cannam@85 4251 case $host_os in
cannam@85 4252 aix3*)
cannam@85 4253 cat <<\EOF >> "$cfgfile"
cannam@85 4254
cannam@85 4255 # AIX sometimes has problems with the GCC collect2 program. For some
cannam@85 4256 # reason, if we set the COLLECT_NAMES environment variable, the problems
cannam@85 4257 # vanish in a puff of smoke.
cannam@85 4258 if test "X${COLLECT_NAMES+set}" != Xset; then
cannam@85 4259 COLLECT_NAMES=
cannam@85 4260 export COLLECT_NAMES
cannam@85 4261 fi
cannam@85 4262 EOF
cannam@85 4263 ;;
cannam@85 4264 esac
cannam@85 4265
cannam@85 4266 # We use sed instead of cat because bash on DJGPP gets confused if
cannam@85 4267 # if finds mixed CR/LF and LF-only lines. Since sed operates in
cannam@85 4268 # text mode, it properly converts lines to CR/LF. This bash problem
cannam@85 4269 # is reportedly fixed, but why not run on old versions too?
cannam@85 4270 sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
cannam@85 4271
cannam@85 4272 mv -f "$cfgfile" "$ofile" || \
cannam@85 4273 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
cannam@85 4274 chmod +x "$ofile"
cannam@85 4275 ])
cannam@85 4276 else
cannam@85 4277 # If there is no Makefile yet, we rely on a make rule to execute
cannam@85 4278 # `config.status --recheck' to rerun these tests and create the
cannam@85 4279 # libtool script then.
cannam@85 4280 ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
cannam@85 4281 if test -f "$ltmain_in"; then
cannam@85 4282 test -f Makefile && make "$ltmain"
cannam@85 4283 fi
cannam@85 4284 fi
cannam@85 4285 ])# AC_LIBTOOL_CONFIG
cannam@85 4286
cannam@85 4287
cannam@85 4288 # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
cannam@85 4289 # -------------------------------------------
cannam@85 4290 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
cannam@85 4291 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
cannam@85 4292
cannam@85 4293 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
cannam@85 4294
cannam@85 4295 if test "$GCC" = yes; then
cannam@85 4296 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
cannam@85 4297
cannam@85 4298 AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
cannam@85 4299 lt_cv_prog_compiler_rtti_exceptions,
cannam@85 4300 [-fno-rtti -fno-exceptions], [],
cannam@85 4301 [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
cannam@85 4302 fi
cannam@85 4303 ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
cannam@85 4304
cannam@85 4305
cannam@85 4306 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
cannam@85 4307 # ---------------------------------
cannam@85 4308 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
cannam@85 4309 [AC_REQUIRE([AC_CANONICAL_HOST])
cannam@85 4310 AC_REQUIRE([AC_PROG_NM])
cannam@85 4311 AC_REQUIRE([AC_OBJEXT])
cannam@85 4312 # Check for command to grab the raw symbol name followed by C symbol from nm.
cannam@85 4313 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
cannam@85 4314 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
cannam@85 4315 [
cannam@85 4316 # These are sane defaults that work on at least a few old systems.
cannam@85 4317 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
cannam@85 4318
cannam@85 4319 # Character class describing NM global symbol codes.
cannam@85 4320 symcode='[[BCDEGRST]]'
cannam@85 4321
cannam@85 4322 # Regexp to match symbols that can be accessed directly from C.
cannam@85 4323 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
cannam@85 4324
cannam@85 4325 # Transform the above into a raw symbol and a C symbol.
cannam@85 4326 symxfrm='\1 \2\3 \3'
cannam@85 4327
cannam@85 4328 # Transform an extracted symbol line into a proper C declaration
cannam@85 4329 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
cannam@85 4330
cannam@85 4331 # Transform an extracted symbol line into symbol name and symbol address
cannam@85 4332 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'"
cannam@85 4333
cannam@85 4334 # Define system-specific variables.
cannam@85 4335 case $host_os in
cannam@85 4336 aix*)
cannam@85 4337 symcode='[[BCDT]]'
cannam@85 4338 ;;
cannam@85 4339 cygwin* | mingw* | pw32*)
cannam@85 4340 symcode='[[ABCDGISTW]]'
cannam@85 4341 ;;
cannam@85 4342 hpux*) # Its linker distinguishes data from code symbols
cannam@85 4343 if test "$host_cpu" = ia64; then
cannam@85 4344 symcode='[[ABCDEGRST]]'
cannam@85 4345 fi
cannam@85 4346 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
cannam@85 4347 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'"
cannam@85 4348 ;;
cannam@85 4349 irix* | nonstopux*)
cannam@85 4350 symcode='[[BCDEGRST]]'
cannam@85 4351 ;;
cannam@85 4352 osf*)
cannam@85 4353 symcode='[[BCDEGQRST]]'
cannam@85 4354 ;;
cannam@85 4355 solaris* | sysv5*)
cannam@85 4356 symcode='[[BDRT]]'
cannam@85 4357 ;;
cannam@85 4358 sysv4)
cannam@85 4359 symcode='[[DFNSTU]]'
cannam@85 4360 ;;
cannam@85 4361 esac
cannam@85 4362
cannam@85 4363 # Handle CRLF in mingw tool chain
cannam@85 4364 opt_cr=
cannam@85 4365 case $build_os in
cannam@85 4366 mingw*)
cannam@85 4367 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
cannam@85 4368 ;;
cannam@85 4369 esac
cannam@85 4370
cannam@85 4371 # If we're using GNU nm, then use its standard symbol codes.
cannam@85 4372 case `$NM -V 2>&1` in
cannam@85 4373 *GNU* | *'with BFD'*)
cannam@85 4374 symcode='[[ABCDGIRSTW]]' ;;
cannam@85 4375 esac
cannam@85 4376
cannam@85 4377 # Try without a prefix undercore, then with it.
cannam@85 4378 for ac_symprfx in "" "_"; do
cannam@85 4379
cannam@85 4380 # Write the raw and C identifiers.
cannam@85 4381 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
cannam@85 4382
cannam@85 4383 # Check to see that the pipe works correctly.
cannam@85 4384 pipe_works=no
cannam@85 4385
cannam@85 4386 rm -f conftest*
cannam@85 4387 cat > conftest.$ac_ext <<EOF
cannam@85 4388 #ifdef __cplusplus
cannam@85 4389 extern "C" {
cannam@85 4390 #endif
cannam@85 4391 char nm_test_var;
cannam@85 4392 void nm_test_func(){}
cannam@85 4393 #ifdef __cplusplus
cannam@85 4394 }
cannam@85 4395 #endif
cannam@85 4396 int main(){nm_test_var='a';nm_test_func();return(0);}
cannam@85 4397 EOF
cannam@85 4398
cannam@85 4399 if AC_TRY_EVAL(ac_compile); then
cannam@85 4400 # Now try to grab the symbols.
cannam@85 4401 nlist=conftest.nm
cannam@85 4402 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
cannam@85 4403 # Try sorting and uniquifying the output.
cannam@85 4404 if sort "$nlist" | uniq > "$nlist"T; then
cannam@85 4405 mv -f "$nlist"T "$nlist"
cannam@85 4406 else
cannam@85 4407 rm -f "$nlist"T
cannam@85 4408 fi
cannam@85 4409
cannam@85 4410 # Make sure that we snagged all the symbols we need.
cannam@85 4411 if grep ' nm_test_var$' "$nlist" >/dev/null; then
cannam@85 4412 if grep ' nm_test_func$' "$nlist" >/dev/null; then
cannam@85 4413 cat <<EOF > conftest.$ac_ext
cannam@85 4414 #ifdef __cplusplus
cannam@85 4415 extern "C" {
cannam@85 4416 #endif
cannam@85 4417
cannam@85 4418 EOF
cannam@85 4419 # Now generate the symbol file.
cannam@85 4420 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
cannam@85 4421
cannam@85 4422 cat <<EOF >> conftest.$ac_ext
cannam@85 4423 #if defined (__STDC__) && __STDC__
cannam@85 4424 # define lt_ptr_t void *
cannam@85 4425 #else
cannam@85 4426 # define lt_ptr_t char *
cannam@85 4427 # define const
cannam@85 4428 #endif
cannam@85 4429
cannam@85 4430 /* The mapping between symbol names and symbols. */
cannam@85 4431 const struct {
cannam@85 4432 const char *name;
cannam@85 4433 lt_ptr_t address;
cannam@85 4434 }
cannam@85 4435 lt_preloaded_symbols[[]] =
cannam@85 4436 {
cannam@85 4437 EOF
cannam@85 4438 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
cannam@85 4439 cat <<\EOF >> conftest.$ac_ext
cannam@85 4440 {0, (lt_ptr_t) 0}
cannam@85 4441 };
cannam@85 4442
cannam@85 4443 #ifdef __cplusplus
cannam@85 4444 }
cannam@85 4445 #endif
cannam@85 4446 EOF
cannam@85 4447 # Now try linking the two files.
cannam@85 4448 mv conftest.$ac_objext conftstm.$ac_objext
cannam@85 4449 lt_save_LIBS="$LIBS"
cannam@85 4450 lt_save_CFLAGS="$CFLAGS"
cannam@85 4451 LIBS="conftstm.$ac_objext"
cannam@85 4452 CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
cannam@85 4453 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
cannam@85 4454 pipe_works=yes
cannam@85 4455 fi
cannam@85 4456 LIBS="$lt_save_LIBS"
cannam@85 4457 CFLAGS="$lt_save_CFLAGS"
cannam@85 4458 else
cannam@85 4459 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
cannam@85 4460 fi
cannam@85 4461 else
cannam@85 4462 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
cannam@85 4463 fi
cannam@85 4464 else
cannam@85 4465 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
cannam@85 4466 fi
cannam@85 4467 else
cannam@85 4468 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
cannam@85 4469 cat conftest.$ac_ext >&5
cannam@85 4470 fi
cannam@85 4471 rm -f conftest* conftst*
cannam@85 4472
cannam@85 4473 # Do not use the global_symbol_pipe unless it works.
cannam@85 4474 if test "$pipe_works" = yes; then
cannam@85 4475 break
cannam@85 4476 else
cannam@85 4477 lt_cv_sys_global_symbol_pipe=
cannam@85 4478 fi
cannam@85 4479 done
cannam@85 4480 ])
cannam@85 4481 if test -z "$lt_cv_sys_global_symbol_pipe"; then
cannam@85 4482 lt_cv_sys_global_symbol_to_cdecl=
cannam@85 4483 fi
cannam@85 4484 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
cannam@85 4485 AC_MSG_RESULT(failed)
cannam@85 4486 else
cannam@85 4487 AC_MSG_RESULT(ok)
cannam@85 4488 fi
cannam@85 4489 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
cannam@85 4490
cannam@85 4491
cannam@85 4492 # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
cannam@85 4493 # ---------------------------------------
cannam@85 4494 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
cannam@85 4495 [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
cannam@85 4496 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
cannam@85 4497 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
cannam@85 4498
cannam@85 4499 AC_MSG_CHECKING([for $compiler option to produce PIC])
cannam@85 4500 ifelse([$1],[CXX],[
cannam@85 4501 # C++ specific cases for pic, static, wl, etc.
cannam@85 4502 if test "$GXX" = yes; then
cannam@85 4503 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@85 4504 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
cannam@85 4505
cannam@85 4506 case $host_os in
cannam@85 4507 aix*)
cannam@85 4508 # All AIX code is PIC.
cannam@85 4509 if test "$host_cpu" = ia64; then
cannam@85 4510 # AIX 5 now supports IA64 processor
cannam@85 4511 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@85 4512 fi
cannam@85 4513 ;;
cannam@85 4514 amigaos*)
cannam@85 4515 # FIXME: we need at least 68020 code to build shared libraries, but
cannam@85 4516 # adding the `-m68020' flag to GCC prevents building anything better,
cannam@85 4517 # like `-m68040'.
cannam@85 4518 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
cannam@85 4519 ;;
cannam@85 4520 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
cannam@85 4521 # PIC is the default for these OSes.
cannam@85 4522 ;;
cannam@85 4523 mingw* | os2* | pw32*)
cannam@85 4524 # This hack is so that the source file can tell whether it is being
cannam@85 4525 # built for inclusion in a dll (and should export symbols for example).
cannam@85 4526 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
cannam@85 4527 ;;
cannam@85 4528 darwin* | rhapsody*)
cannam@85 4529 # PIC is the default on this platform
cannam@85 4530 # Common symbols not allowed in MH_DYLIB files
cannam@85 4531 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
cannam@85 4532 ;;
cannam@85 4533 *djgpp*)
cannam@85 4534 # DJGPP does not support shared libraries at all
cannam@85 4535 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
cannam@85 4536 ;;
cannam@85 4537 sysv4*MP*)
cannam@85 4538 if test -d /usr/nec; then
cannam@85 4539 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
cannam@85 4540 fi
cannam@85 4541 ;;
cannam@85 4542 hpux*)
cannam@85 4543 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
cannam@85 4544 # not for PA HP-UX.
cannam@85 4545 case "$host_cpu" in
cannam@85 4546 hppa*64*|ia64*)
cannam@85 4547 ;;
cannam@85 4548 *)
cannam@85 4549 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
cannam@85 4550 ;;
cannam@85 4551 esac
cannam@85 4552 ;;
cannam@85 4553 *)
cannam@85 4554 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
cannam@85 4555 ;;
cannam@85 4556 esac
cannam@85 4557 else
cannam@85 4558 case $host_os in
cannam@85 4559 aix4* | aix5*)
cannam@85 4560 # All AIX code is PIC.
cannam@85 4561 if test "$host_cpu" = ia64; then
cannam@85 4562 # AIX 5 now supports IA64 processor
cannam@85 4563 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@85 4564 else
cannam@85 4565 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
cannam@85 4566 fi
cannam@85 4567 ;;
cannam@85 4568 chorus*)
cannam@85 4569 case $cc_basename in
cannam@85 4570 cxch68)
cannam@85 4571 # Green Hills C++ Compiler
cannam@85 4572 # _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"
cannam@85 4573 ;;
cannam@85 4574 esac
cannam@85 4575 ;;
cannam@85 4576 dgux*)
cannam@85 4577 case $cc_basename in
cannam@85 4578 ec++)
cannam@85 4579 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
cannam@85 4580 ;;
cannam@85 4581 ghcx)
cannam@85 4582 # Green Hills C++ Compiler
cannam@85 4583 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
cannam@85 4584 ;;
cannam@85 4585 *)
cannam@85 4586 ;;
cannam@85 4587 esac
cannam@85 4588 ;;
cannam@85 4589 freebsd* | kfreebsd*-gnu)
cannam@85 4590 # FreeBSD uses GNU C++
cannam@85 4591 ;;
cannam@85 4592 hpux9* | hpux10* | hpux11*)
cannam@85 4593 case $cc_basename in
cannam@85 4594 CC)
cannam@85 4595 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@85 4596 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
cannam@85 4597 if test "$host_cpu" != ia64; then
cannam@85 4598 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
cannam@85 4599 fi
cannam@85 4600 ;;
cannam@85 4601 aCC)
cannam@85 4602 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@85 4603 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
cannam@85 4604 case "$host_cpu" in
cannam@85 4605 hppa*64*|ia64*)
cannam@85 4606 # +Z the default
cannam@85 4607 ;;
cannam@85 4608 *)
cannam@85 4609 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
cannam@85 4610 ;;
cannam@85 4611 esac
cannam@85 4612 ;;
cannam@85 4613 *)
cannam@85 4614 ;;
cannam@85 4615 esac
cannam@85 4616 ;;
cannam@85 4617 irix5* | irix6* | nonstopux*)
cannam@85 4618 case $cc_basename in
cannam@85 4619 CC)
cannam@85 4620 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@85 4621 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
cannam@85 4622 # CC pic flag -KPIC is the default.
cannam@85 4623 ;;
cannam@85 4624 *)
cannam@85 4625 ;;
cannam@85 4626 esac
cannam@85 4627 ;;
cannam@85 4628 linux*)
cannam@85 4629 case $cc_basename in
cannam@85 4630 KCC)
cannam@85 4631 # KAI C++ Compiler
cannam@85 4632 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
cannam@85 4633 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
cannam@85 4634 ;;
cannam@85 4635 icpc)
cannam@85 4636 # Intel C++
cannam@85 4637 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@85 4638 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
cannam@85 4639 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
cannam@85 4640 ;;
cannam@85 4641 cxx)
cannam@85 4642 # Compaq C++
cannam@85 4643 # Make sure the PIC flag is empty. It appears that all Alpha
cannam@85 4644 # Linux and Compaq Tru64 Unix objects are PIC.
cannam@85 4645 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
cannam@85 4646 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
cannam@85 4647 ;;
cannam@85 4648 *)
cannam@85 4649 ;;
cannam@85 4650 esac
cannam@85 4651 ;;
cannam@85 4652 lynxos*)
cannam@85 4653 ;;
cannam@85 4654 m88k*)
cannam@85 4655 ;;
cannam@85 4656 mvs*)
cannam@85 4657 case $cc_basename in
cannam@85 4658 cxx)
cannam@85 4659 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
cannam@85 4660 ;;
cannam@85 4661 *)
cannam@85 4662 ;;
cannam@85 4663 esac
cannam@85 4664 ;;
cannam@85 4665 netbsd* | knetbsd*-gnu)
cannam@85 4666 ;;
cannam@85 4667 osf3* | osf4* | osf5*)
cannam@85 4668 case $cc_basename in
cannam@85 4669 KCC)
cannam@85 4670 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
cannam@85 4671 ;;
cannam@85 4672 RCC)
cannam@85 4673 # Rational C++ 2.4.1
cannam@85 4674 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
cannam@85 4675 ;;
cannam@85 4676 cxx)
cannam@85 4677 # Digital/Compaq C++
cannam@85 4678 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@85 4679 # Make sure the PIC flag is empty. It appears that all Alpha
cannam@85 4680 # Linux and Compaq Tru64 Unix objects are PIC.
cannam@85 4681 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
cannam@85 4682 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
cannam@85 4683 ;;
cannam@85 4684 *)
cannam@85 4685 ;;
cannam@85 4686 esac
cannam@85 4687 ;;
cannam@85 4688 psos*)
cannam@85 4689 ;;
cannam@85 4690 sco*)
cannam@85 4691 case $cc_basename in
cannam@85 4692 CC)
cannam@85 4693 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
cannam@85 4694 ;;
cannam@85 4695 *)
cannam@85 4696 ;;
cannam@85 4697 esac
cannam@85 4698 ;;
cannam@85 4699 solaris*)
cannam@85 4700 case $cc_basename in
cannam@85 4701 CC)
cannam@85 4702 # Sun C++ 4.2, 5.x and Centerline C++
cannam@85 4703 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
cannam@85 4704 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@85 4705 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
cannam@85 4706 ;;
cannam@85 4707 gcx)
cannam@85 4708 # Green Hills C++ Compiler
cannam@85 4709 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
cannam@85 4710 ;;
cannam@85 4711 *)
cannam@85 4712 ;;
cannam@85 4713 esac
cannam@85 4714 ;;
cannam@85 4715 sunos4*)
cannam@85 4716 case $cc_basename in
cannam@85 4717 CC)
cannam@85 4718 # Sun C++ 4.x
cannam@85 4719 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
cannam@85 4720 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@85 4721 ;;
cannam@85 4722 lcc)
cannam@85 4723 # Lucid
cannam@85 4724 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
cannam@85 4725 ;;
cannam@85 4726 *)
cannam@85 4727 ;;
cannam@85 4728 esac
cannam@85 4729 ;;
cannam@85 4730 tandem*)
cannam@85 4731 case $cc_basename in
cannam@85 4732 NCC)
cannam@85 4733 # NonStop-UX NCC 3.20
cannam@85 4734 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
cannam@85 4735 ;;
cannam@85 4736 *)
cannam@85 4737 ;;
cannam@85 4738 esac
cannam@85 4739 ;;
cannam@85 4740 unixware*)
cannam@85 4741 ;;
cannam@85 4742 vxworks*)
cannam@85 4743 ;;
cannam@85 4744 *)
cannam@85 4745 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
cannam@85 4746 ;;
cannam@85 4747 esac
cannam@85 4748 fi
cannam@85 4749 ],
cannam@85 4750 [
cannam@85 4751 if test "$GCC" = yes; then
cannam@85 4752 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@85 4753 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
cannam@85 4754
cannam@85 4755 case $host_os in
cannam@85 4756 aix*)
cannam@85 4757 # All AIX code is PIC.
cannam@85 4758 if test "$host_cpu" = ia64; then
cannam@85 4759 # AIX 5 now supports IA64 processor
cannam@85 4760 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@85 4761 fi
cannam@85 4762 ;;
cannam@85 4763
cannam@85 4764 amigaos*)
cannam@85 4765 # FIXME: we need at least 68020 code to build shared libraries, but
cannam@85 4766 # adding the `-m68020' flag to GCC prevents building anything better,
cannam@85 4767 # like `-m68040'.
cannam@85 4768 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
cannam@85 4769 ;;
cannam@85 4770
cannam@85 4771 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
cannam@85 4772 # PIC is the default for these OSes.
cannam@85 4773 ;;
cannam@85 4774
cannam@85 4775 mingw* | pw32* | os2*)
cannam@85 4776 # This hack is so that the source file can tell whether it is being
cannam@85 4777 # built for inclusion in a dll (and should export symbols for example).
cannam@85 4778 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
cannam@85 4779 ;;
cannam@85 4780
cannam@85 4781 darwin* | rhapsody*)
cannam@85 4782 # PIC is the default on this platform
cannam@85 4783 # Common symbols not allowed in MH_DYLIB files
cannam@85 4784 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
cannam@85 4785 ;;
cannam@85 4786
cannam@85 4787 msdosdjgpp*)
cannam@85 4788 # Just because we use GCC doesn't mean we suddenly get shared libraries
cannam@85 4789 # on systems that don't support them.
cannam@85 4790 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
cannam@85 4791 enable_shared=no
cannam@85 4792 ;;
cannam@85 4793
cannam@85 4794 sysv4*MP*)
cannam@85 4795 if test -d /usr/nec; then
cannam@85 4796 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
cannam@85 4797 fi
cannam@85 4798 ;;
cannam@85 4799
cannam@85 4800 hpux*)
cannam@85 4801 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
cannam@85 4802 # not for PA HP-UX.
cannam@85 4803 case "$host_cpu" in
cannam@85 4804 hppa*64*|ia64*)
cannam@85 4805 # +Z the default
cannam@85 4806 ;;
cannam@85 4807 *)
cannam@85 4808 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
cannam@85 4809 ;;
cannam@85 4810 esac
cannam@85 4811 ;;
cannam@85 4812
cannam@85 4813 *)
cannam@85 4814 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
cannam@85 4815 ;;
cannam@85 4816 esac
cannam@85 4817 else
cannam@85 4818 # PORTME Check for flag to pass linker flags through the system compiler.
cannam@85 4819 case $host_os in
cannam@85 4820 aix*)
cannam@85 4821 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@85 4822 if test "$host_cpu" = ia64; then
cannam@85 4823 # AIX 5 now supports IA64 processor
cannam@85 4824 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@85 4825 else
cannam@85 4826 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
cannam@85 4827 fi
cannam@85 4828 ;;
cannam@85 4829
cannam@85 4830 mingw* | pw32* | os2*)
cannam@85 4831 # This hack is so that the source file can tell whether it is being
cannam@85 4832 # built for inclusion in a dll (and should export symbols for example).
cannam@85 4833 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
cannam@85 4834 ;;
cannam@85 4835
cannam@85 4836 hpux9* | hpux10* | hpux11*)
cannam@85 4837 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@85 4838 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
cannam@85 4839 # not for PA HP-UX.
cannam@85 4840 case "$host_cpu" in
cannam@85 4841 hppa*64*|ia64*)
cannam@85 4842 # +Z the default
cannam@85 4843 ;;
cannam@85 4844 *)
cannam@85 4845 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
cannam@85 4846 ;;
cannam@85 4847 esac
cannam@85 4848 # Is there a better lt_prog_compiler_static that works with the bundled CC?
cannam@85 4849 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
cannam@85 4850 ;;
cannam@85 4851
cannam@85 4852 irix5* | irix6* | nonstopux*)
cannam@85 4853 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@85 4854 # PIC (with -KPIC) is the default.
cannam@85 4855 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
cannam@85 4856 ;;
cannam@85 4857
cannam@85 4858 newsos6)
cannam@85 4859 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
cannam@85 4860 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@85 4861 ;;
cannam@85 4862
cannam@85 4863 linux*)
cannam@85 4864 case $CC in
cannam@85 4865 icc* | ecc*)
cannam@85 4866 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@85 4867 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
cannam@85 4868 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
cannam@85 4869 ;;
cannam@85 4870 ccc*)
cannam@85 4871 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@85 4872 # All Alpha code is PIC.
cannam@85 4873 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
cannam@85 4874 ;;
cannam@85 4875 esac
cannam@85 4876 ;;
cannam@85 4877
cannam@85 4878 osf3* | osf4* | osf5*)
cannam@85 4879 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@85 4880 # All OSF/1 code is PIC.
cannam@85 4881 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
cannam@85 4882 ;;
cannam@85 4883
cannam@85 4884 sco3.2v5*)
cannam@85 4885 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
cannam@85 4886 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
cannam@85 4887 ;;
cannam@85 4888
cannam@85 4889 solaris*)
cannam@85 4890 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@85 4891 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
cannam@85 4892 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@85 4893 ;;
cannam@85 4894
cannam@85 4895 sunos4*)
cannam@85 4896 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
cannam@85 4897 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
cannam@85 4898 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@85 4899 ;;
cannam@85 4900
cannam@85 4901 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
cannam@85 4902 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@85 4903 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
cannam@85 4904 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@85 4905 ;;
cannam@85 4906
cannam@85 4907 sysv4*MP*)
cannam@85 4908 if test -d /usr/nec ;then
cannam@85 4909 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
cannam@85 4910 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@85 4911 fi
cannam@85 4912 ;;
cannam@85 4913
cannam@85 4914 uts4*)
cannam@85 4915 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
cannam@85 4916 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@85 4917 ;;
cannam@85 4918
cannam@85 4919 *)
cannam@85 4920 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
cannam@85 4921 ;;
cannam@85 4922 esac
cannam@85 4923 fi
cannam@85 4924 ])
cannam@85 4925 AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
cannam@85 4926
cannam@85 4927 #
cannam@85 4928 # Check to make sure the PIC flag actually works.
cannam@85 4929 #
cannam@85 4930 if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
cannam@85 4931 AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
cannam@85 4932 _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
cannam@85 4933 [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
cannam@85 4934 [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
cannam@85 4935 "" | " "*) ;;
cannam@85 4936 *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
cannam@85 4937 esac],
cannam@85 4938 [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
cannam@85 4939 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
cannam@85 4940 fi
cannam@85 4941 case "$host_os" in
cannam@85 4942 # For platforms which do not support PIC, -DPIC is meaningless:
cannam@85 4943 *djgpp*)
cannam@85 4944 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
cannam@85 4945 ;;
cannam@85 4946 *)
cannam@85 4947 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
cannam@85 4948 ;;
cannam@85 4949 esac
cannam@85 4950 ])
cannam@85 4951
cannam@85 4952
cannam@85 4953 # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
cannam@85 4954 # ------------------------------------
cannam@85 4955 # See if the linker supports building shared libraries.
cannam@85 4956 AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
cannam@85 4957 [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
cannam@85 4958 ifelse([$1],[CXX],[
cannam@85 4959 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
cannam@85 4960 case $host_os in
cannam@85 4961 aix4* | aix5*)
cannam@85 4962 # If we're using GNU nm, then we don't want the "-C" option.
cannam@85 4963 # -C means demangle to AIX nm, but means don't demangle with GNU nm
cannam@85 4964 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
cannam@85 4965 _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'
cannam@85 4966 else
cannam@85 4967 _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'
cannam@85 4968 fi
cannam@85 4969 ;;
cannam@85 4970 pw32*)
cannam@85 4971 _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
cannam@85 4972 ;;
cannam@85 4973 cygwin* | mingw*)
cannam@85 4974 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
cannam@85 4975 ;;
cannam@85 4976 *)
cannam@85 4977 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
cannam@85 4978 ;;
cannam@85 4979 esac
cannam@85 4980 ],[
cannam@85 4981 runpath_var=
cannam@85 4982 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
cannam@85 4983 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
cannam@85 4984 _LT_AC_TAGVAR(archive_cmds, $1)=
cannam@85 4985 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
cannam@85 4986 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
cannam@85 4987 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
cannam@85 4988 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
cannam@85 4989 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
cannam@85 4990 _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
cannam@85 4991 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
cannam@85 4992 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
cannam@85 4993 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
cannam@85 4994 _LT_AC_TAGVAR(hardcode_direct, $1)=no
cannam@85 4995 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
cannam@85 4996 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
cannam@85 4997 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
cannam@85 4998 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
cannam@85 4999 _LT_AC_TAGVAR(module_cmds, $1)=
cannam@85 5000 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
cannam@85 5001 _LT_AC_TAGVAR(always_export_symbols, $1)=no
cannam@85 5002 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
cannam@85 5003 # include_expsyms should be a list of space-separated symbols to be *always*
cannam@85 5004 # included in the symbol list
cannam@85 5005 _LT_AC_TAGVAR(include_expsyms, $1)=
cannam@85 5006 # exclude_expsyms can be an extended regexp of symbols to exclude
cannam@85 5007 # it will be wrapped by ` (' and `)$', so one must not match beginning or
cannam@85 5008 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
cannam@85 5009 # as well as any symbol that contains `d'.
cannam@85 5010 _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
cannam@85 5011 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
cannam@85 5012 # platforms (ab)use it in PIC code, but their linkers get confused if
cannam@85 5013 # the symbol is explicitly referenced. Since portable code cannot
cannam@85 5014 # rely on this symbol name, it's probably fine to never include it in
cannam@85 5015 # preloaded symbol tables.
cannam@85 5016 extract_expsyms_cmds=
cannam@85 5017
cannam@85 5018 case $host_os in
cannam@85 5019 cygwin* | mingw* | pw32*)
cannam@85 5020 # FIXME: the MSVC++ port hasn't been tested in a loooong time
cannam@85 5021 # When not using gcc, we currently assume that we are using
cannam@85 5022 # Microsoft Visual C++.
cannam@85 5023 if test "$GCC" != yes; then
cannam@85 5024 with_gnu_ld=no
cannam@85 5025 fi
cannam@85 5026 ;;
cannam@85 5027 openbsd*)
cannam@85 5028 with_gnu_ld=no
cannam@85 5029 ;;
cannam@85 5030 esac
cannam@85 5031
cannam@85 5032 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
cannam@85 5033 if test "$with_gnu_ld" = yes; then
cannam@85 5034 # If archive_cmds runs LD, not CC, wlarc should be empty
cannam@85 5035 wlarc='${wl}'
cannam@85 5036
cannam@85 5037 # See if GNU ld supports shared libraries.
cannam@85 5038 case $host_os in
cannam@85 5039 aix3* | aix4* | aix5*)
cannam@85 5040 # On AIX/PPC, the GNU linker is very broken
cannam@85 5041 if test "$host_cpu" != ia64; then
cannam@85 5042 _LT_AC_TAGVAR(ld_shlibs, $1)=no
cannam@85 5043 cat <<EOF 1>&2
cannam@85 5044
cannam@85 5045 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
cannam@85 5046 *** to be unable to reliably create shared libraries on AIX.
cannam@85 5047 *** Therefore, libtool is disabling shared libraries support. If you
cannam@85 5048 *** really care for shared libraries, you may want to modify your PATH
cannam@85 5049 *** so that a non-GNU linker is found, and then restart.
cannam@85 5050
cannam@85 5051 EOF
cannam@85 5052 fi
cannam@85 5053 ;;
cannam@85 5054
cannam@85 5055 amigaos*)
cannam@85 5056 _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)'
cannam@85 5057 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
cannam@85 5058 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
cannam@85 5059
cannam@85 5060 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
cannam@85 5061 # that the semantics of dynamic libraries on AmigaOS, at least up
cannam@85 5062 # to version 4, is to share data among multiple programs linked
cannam@85 5063 # with the same dynamic library. Since this doesn't match the
cannam@85 5064 # behavior of shared libraries on other platforms, we can't use
cannam@85 5065 # them.
cannam@85 5066 _LT_AC_TAGVAR(ld_shlibs, $1)=no
cannam@85 5067 ;;
cannam@85 5068
cannam@85 5069 beos*)
cannam@85 5070 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
cannam@85 5071 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
cannam@85 5072 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
cannam@85 5073 # support --undefined. This deserves some investigation. FIXME
cannam@85 5074 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
cannam@85 5075 else
cannam@85 5076 _LT_AC_TAGVAR(ld_shlibs, $1)=no
cannam@85 5077 fi
cannam@85 5078 ;;
cannam@85 5079
cannam@85 5080 cygwin* | mingw* | pw32*)
cannam@85 5081 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
cannam@85 5082 # as there is no search path for DLLs.
cannam@85 5083 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
cannam@85 5084 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
cannam@85 5085 _LT_AC_TAGVAR(always_export_symbols, $1)=no
cannam@85 5086 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
cannam@85 5087 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
cannam@85 5088
cannam@85 5089 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
cannam@85 5090 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
cannam@85 5091 # If the export-symbols file already is a .def file (1st line
cannam@85 5092 # is EXPORTS), use it as is; otherwise, prepend...
cannam@85 5093 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
cannam@85 5094 cp $export_symbols $output_objdir/$soname.def;
cannam@85 5095 else
cannam@85 5096 echo EXPORTS > $output_objdir/$soname.def;
cannam@85 5097 cat $export_symbols >> $output_objdir/$soname.def;
cannam@85 5098 fi~
cannam@85 5099 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
cannam@85 5100 else
cannam@85 5101 ld_shlibs=no
cannam@85 5102 fi
cannam@85 5103 ;;
cannam@85 5104
cannam@85 5105 netbsd* | knetbsd*-gnu)
cannam@85 5106 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
cannam@85 5107 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
cannam@85 5108 wlarc=
cannam@85 5109 else
cannam@85 5110 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
cannam@85 5111 _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'
cannam@85 5112 fi
cannam@85 5113 ;;
cannam@85 5114
cannam@85 5115 solaris* | sysv5*)
cannam@85 5116 if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
cannam@85 5117 _LT_AC_TAGVAR(ld_shlibs, $1)=no
cannam@85 5118 cat <<EOF 1>&2
cannam@85 5119
cannam@85 5120 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
cannam@85 5121 *** create shared libraries on Solaris systems. Therefore, libtool
cannam@85 5122 *** is disabling shared libraries support. We urge you to upgrade GNU
cannam@85 5123 *** binutils to release 2.9.1 or newer. Another option is to modify
cannam@85 5124 *** your PATH or compiler configuration so that the native linker is
cannam@85 5125 *** used, and then restart.
cannam@85 5126
cannam@85 5127 EOF
cannam@85 5128 elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
cannam@85 5129 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
cannam@85 5130 _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'
cannam@85 5131 else
cannam@85 5132 _LT_AC_TAGVAR(ld_shlibs, $1)=no
cannam@85 5133 fi
cannam@85 5134 ;;
cannam@85 5135
cannam@85 5136 sunos4*)
cannam@85 5137 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
cannam@85 5138 wlarc=
cannam@85 5139 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
cannam@85 5140 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@85 5141 ;;
cannam@85 5142
cannam@85 5143 linux*)
cannam@85 5144 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
cannam@85 5145 tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
cannam@85 5146 _LT_AC_TAGVAR(archive_cmds, $1)="$tmp_archive_cmds"
cannam@85 5147 supports_anon_versioning=no
cannam@85 5148 case `$LD -v 2>/dev/null` in
cannam@85 5149 *\ [01].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
cannam@85 5150 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
cannam@85 5151 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
cannam@85 5152 *\ 2.11.*) ;; # other 2.11 versions
cannam@85 5153 *) supports_anon_versioning=yes ;;
cannam@85 5154 esac
cannam@85 5155 if test $supports_anon_versioning = yes; then
cannam@85 5156 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
cannam@85 5157 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
cannam@85 5158 $echo "local: *; };" >> $output_objdir/$libname.ver~
cannam@85 5159 $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
cannam@85 5160 else
cannam@85 5161 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="$tmp_archive_cmds"
cannam@85 5162 fi
cannam@85 5163 else
cannam@85 5164 _LT_AC_TAGVAR(ld_shlibs, $1)=no
cannam@85 5165 fi
cannam@85 5166 ;;
cannam@85 5167
cannam@85 5168 *)
cannam@85 5169 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
cannam@85 5170 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
cannam@85 5171 _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'
cannam@85 5172 else
cannam@85 5173 _LT_AC_TAGVAR(ld_shlibs, $1)=no
cannam@85 5174 fi
cannam@85 5175 ;;
cannam@85 5176 esac
cannam@85 5177
cannam@85 5178 if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
cannam@85 5179 runpath_var=LD_RUN_PATH
cannam@85 5180 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
cannam@85 5181 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
cannam@85 5182 # ancient GNU ld didn't support --whole-archive et. al.
cannam@85 5183 if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
cannam@85 5184 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
cannam@85 5185 else
cannam@85 5186 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
cannam@85 5187 fi
cannam@85 5188 fi
cannam@85 5189 else
cannam@85 5190 # PORTME fill in a description of your system's linker (not GNU ld)
cannam@85 5191 case $host_os in
cannam@85 5192 aix3*)
cannam@85 5193 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
cannam@85 5194 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
cannam@85 5195 _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'
cannam@85 5196 # Note: this linker hardcodes the directories in LIBPATH if there
cannam@85 5197 # are no directories specified by -L.
cannam@85 5198 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
cannam@85 5199 if test "$GCC" = yes && test -z "$link_static_flag"; then
cannam@85 5200 # Neither direct hardcoding nor static linking is supported with a
cannam@85 5201 # broken collect2.
cannam@85 5202 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
cannam@85 5203 fi
cannam@85 5204 ;;
cannam@85 5205
cannam@85 5206 aix4* | aix5*)
cannam@85 5207 if test "$host_cpu" = ia64; then
cannam@85 5208 # On IA64, the linker does run time linking by default, so we don't
cannam@85 5209 # have to do anything special.
cannam@85 5210 aix_use_runtimelinking=no
cannam@85 5211 exp_sym_flag='-Bexport'
cannam@85 5212 no_entry_flag=""
cannam@85 5213 else
cannam@85 5214 # If we're using GNU nm, then we don't want the "-C" option.
cannam@85 5215 # -C means demangle to AIX nm, but means don't demangle with GNU nm
cannam@85 5216 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
cannam@85 5217 _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'
cannam@85 5218 else
cannam@85 5219 _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'
cannam@85 5220 fi
cannam@85 5221 aix_use_runtimelinking=no
cannam@85 5222
cannam@85 5223 # Test if we are trying to use run time linking or normal
cannam@85 5224 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
cannam@85 5225 # need to do runtime linking.
cannam@85 5226 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
cannam@85 5227 for ld_flag in $LDFLAGS; do
cannam@85 5228 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
cannam@85 5229 aix_use_runtimelinking=yes
cannam@85 5230 break
cannam@85 5231 fi
cannam@85 5232 done
cannam@85 5233 esac
cannam@85 5234
cannam@85 5235 exp_sym_flag='-bexport'
cannam@85 5236 no_entry_flag='-bnoentry'
cannam@85 5237 fi
cannam@85 5238
cannam@85 5239 # When large executables or shared objects are built, AIX ld can
cannam@85 5240 # have problems creating the table of contents. If linking a library
cannam@85 5241 # or program results in "error TOC overflow" add -mminimal-toc to
cannam@85 5242 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
cannam@85 5243 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
cannam@85 5244
cannam@85 5245 _LT_AC_TAGVAR(archive_cmds, $1)=''
cannam@85 5246 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
cannam@85 5247 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
cannam@85 5248 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
cannam@85 5249
cannam@85 5250 if test "$GCC" = yes; then
cannam@85 5251 case $host_os in aix4.[012]|aix4.[012].*)
cannam@85 5252 # We only want to do this on AIX 4.2 and lower, the check
cannam@85 5253 # below for broken collect2 doesn't work under 4.3+
cannam@85 5254 collect2name=`${CC} -print-prog-name=collect2`
cannam@85 5255 if test -f "$collect2name" && \
cannam@85 5256 strings "$collect2name" | grep resolve_lib_name >/dev/null
cannam@85 5257 then
cannam@85 5258 # We have reworked collect2
cannam@85 5259 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
cannam@85 5260 else
cannam@85 5261 # We have old collect2
cannam@85 5262 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
cannam@85 5263 # It fails to find uninstalled libraries when the uninstalled
cannam@85 5264 # path is not listed in the libpath. Setting hardcode_minus_L
cannam@85 5265 # to unsupported forces relinking
cannam@85 5266 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
cannam@85 5267 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
cannam@85 5268 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
cannam@85 5269 fi
cannam@85 5270 esac
cannam@85 5271 shared_flag='-shared'
cannam@85 5272 else
cannam@85 5273 # not using gcc
cannam@85 5274 if test "$host_cpu" = ia64; then
cannam@85 5275 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
cannam@85 5276 # chokes on -Wl,-G. The following line is correct:
cannam@85 5277 shared_flag='-G'
cannam@85 5278 else
cannam@85 5279 if test "$aix_use_runtimelinking" = yes; then
cannam@85 5280 shared_flag='${wl}-G'
cannam@85 5281 else
cannam@85 5282 shared_flag='${wl}-bM:SRE'
cannam@85 5283 fi
cannam@85 5284 fi
cannam@85 5285 fi
cannam@85 5286
cannam@85 5287 # It seems that -bexpall does not export symbols beginning with
cannam@85 5288 # underscore (_), so it is better to generate a list of symbols to export.
cannam@85 5289 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
cannam@85 5290 if test "$aix_use_runtimelinking" = yes; then
cannam@85 5291 # Warning - without using the other runtime loading flags (-brtl),
cannam@85 5292 # -berok will link without error, but may produce a broken library.
cannam@85 5293 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
cannam@85 5294 # Determine the default libpath from the value encoded in an empty executable.
cannam@85 5295 _LT_AC_SYS_LIBPATH_AIX
cannam@85 5296 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
cannam@85 5297 _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}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
cannam@85 5298 else
cannam@85 5299 if test "$host_cpu" = ia64; then
cannam@85 5300 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
cannam@85 5301 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
cannam@85 5302 _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"
cannam@85 5303 else
cannam@85 5304 # Determine the default libpath from the value encoded in an empty executable.
cannam@85 5305 _LT_AC_SYS_LIBPATH_AIX
cannam@85 5306 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
cannam@85 5307 # Warning - without using the other run time loading flags,
cannam@85 5308 # -berok will link without error, but may produce a broken library.
cannam@85 5309 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
cannam@85 5310 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
cannam@85 5311 # -bexpall does not export symbols beginning with underscore (_)
cannam@85 5312 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
cannam@85 5313 # Exported symbols can be pulled into shared objects from archives
cannam@85 5314 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
cannam@85 5315 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
cannam@85 5316 # This is similar to how AIX traditionally builds it's shared libraries.
cannam@85 5317 _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'
cannam@85 5318 fi
cannam@85 5319 fi
cannam@85 5320 ;;
cannam@85 5321
cannam@85 5322 amigaos*)
cannam@85 5323 _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)'
cannam@85 5324 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
cannam@85 5325 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
cannam@85 5326 # see comment about different semantics on the GNU ld section
cannam@85 5327 _LT_AC_TAGVAR(ld_shlibs, $1)=no
cannam@85 5328 ;;
cannam@85 5329
cannam@85 5330 bsdi4*)
cannam@85 5331 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
cannam@85 5332 ;;
cannam@85 5333
cannam@85 5334 cygwin* | mingw* | pw32*)
cannam@85 5335 # When not using gcc, we currently assume that we are using
cannam@85 5336 # Microsoft Visual C++.
cannam@85 5337 # hardcode_libdir_flag_spec is actually meaningless, as there is
cannam@85 5338 # no search path for DLLs.
cannam@85 5339 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
cannam@85 5340 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
cannam@85 5341 # Tell ltmain to make .lib files, not .a files.
cannam@85 5342 libext=lib
cannam@85 5343 # Tell ltmain to make .dll files, not .so files.
cannam@85 5344 shrext=".dll"
cannam@85 5345 # FIXME: Setting linknames here is a bad hack.
cannam@85 5346 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
cannam@85 5347 # The linker will automatically build a .lib file if we build a DLL.
cannam@85 5348 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
cannam@85 5349 # FIXME: Should let the user specify the lib program.
cannam@85 5350 _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
cannam@85 5351 fix_srcfile_path='`cygpath -w "$srcfile"`'
cannam@85 5352 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
cannam@85 5353 ;;
cannam@85 5354
cannam@85 5355 darwin* | rhapsody*)
cannam@85 5356 if test "$GXX" = yes ; then
cannam@85 5357 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
cannam@85 5358 case "$host_os" in
cannam@85 5359 rhapsody* | darwin1.[[012]])
cannam@85 5360 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
cannam@85 5361 ;;
cannam@85 5362 *) # Darwin 1.3 on
cannam@85 5363 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
cannam@85 5364 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
cannam@85 5365 else
cannam@85 5366 case ${MACOSX_DEPLOYMENT_TARGET} in
cannam@85 5367 10.[[012]])
cannam@85 5368 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
cannam@85 5369 ;;
cannam@85 5370 10.*)
cannam@85 5371 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
cannam@85 5372 ;;
cannam@85 5373 esac
cannam@85 5374 fi
cannam@85 5375 ;;
cannam@85 5376 esac
cannam@85 5377 lt_int_apple_cc_single_mod=no
cannam@85 5378 output_verbose_link_cmd='echo'
cannam@85 5379 if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
cannam@85 5380 lt_int_apple_cc_single_mod=yes
cannam@85 5381 fi
cannam@85 5382 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
cannam@85 5383 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
cannam@85 5384 else
cannam@85 5385 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
cannam@85 5386 fi
cannam@85 5387 _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
cannam@85 5388 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
cannam@85 5389 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
cannam@85 5390 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
cannam@85 5391 else
cannam@85 5392 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
cannam@85 5393 fi
cannam@85 5394 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
cannam@85 5395 _LT_AC_TAGVAR(hardcode_direct, $1)=no
cannam@85 5396 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
cannam@85 5397 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
cannam@85 5398 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
cannam@85 5399 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
cannam@85 5400 else
cannam@85 5401 _LT_AC_TAGVAR(ld_shlibs, $1)=no
cannam@85 5402 fi
cannam@85 5403 ;;
cannam@85 5404
cannam@85 5405 dgux*)
cannam@85 5406 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
cannam@85 5407 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
cannam@85 5408 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@85 5409 ;;
cannam@85 5410
cannam@85 5411 freebsd1*)
cannam@85 5412 _LT_AC_TAGVAR(ld_shlibs, $1)=no
cannam@85 5413 ;;
cannam@85 5414
cannam@85 5415 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
cannam@85 5416 # support. Future versions do this automatically, but an explicit c++rt0.o
cannam@85 5417 # does not break anything, and helps significantly (at the cost of a little
cannam@85 5418 # extra space).
cannam@85 5419 freebsd2.2*)
cannam@85 5420 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
cannam@85 5421 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
cannam@85 5422 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
cannam@85 5423 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@85 5424 ;;
cannam@85 5425
cannam@85 5426 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
cannam@85 5427 freebsd2*)
cannam@85 5428 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
cannam@85 5429 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
cannam@85 5430 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
cannam@85 5431 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@85 5432 ;;
cannam@85 5433
cannam@85 5434 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
cannam@85 5435 freebsd* | kfreebsd*-gnu)
cannam@85 5436 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
cannam@85 5437 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
cannam@85 5438 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
cannam@85 5439 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@85 5440 ;;
cannam@85 5441
cannam@85 5442 hpux9*)
cannam@85 5443 if test "$GCC" = yes; then
cannam@85 5444 _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'
cannam@85 5445 else
cannam@85 5446 _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'
cannam@85 5447 fi
cannam@85 5448 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
cannam@85 5449 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@85 5450 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
cannam@85 5451
cannam@85 5452 # hardcode_minus_L: Not really in the search PATH,
cannam@85 5453 # but as the default location of the library.
cannam@85 5454 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
cannam@85 5455 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
cannam@85 5456 ;;
cannam@85 5457
cannam@85 5458 hpux10* | hpux11*)
cannam@85 5459 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
cannam@85 5460 case "$host_cpu" in
cannam@85 5461 hppa*64*|ia64*)
cannam@85 5462 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@85 5463 ;;
cannam@85 5464 *)
cannam@85 5465 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
cannam@85 5466 ;;
cannam@85 5467 esac
cannam@85 5468 else
cannam@85 5469 case "$host_cpu" in
cannam@85 5470 hppa*64*|ia64*)
cannam@85 5471 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
cannam@85 5472 ;;
cannam@85 5473 *)
cannam@85 5474 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
cannam@85 5475 ;;
cannam@85 5476 esac
cannam@85 5477 fi
cannam@85 5478 if test "$with_gnu_ld" = no; then
cannam@85 5479 case "$host_cpu" in
cannam@85 5480 hppa*64*)
cannam@85 5481 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
cannam@85 5482 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
cannam@85 5483 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@85 5484 _LT_AC_TAGVAR(hardcode_direct, $1)=no
cannam@85 5485 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@85 5486 ;;
cannam@85 5487 ia64*)
cannam@85 5488 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
cannam@85 5489 _LT_AC_TAGVAR(hardcode_direct, $1)=no
cannam@85 5490 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@85 5491
cannam@85 5492 # hardcode_minus_L: Not really in the search PATH,
cannam@85 5493 # but as the default location of the library.
cannam@85 5494 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
cannam@85 5495 ;;
cannam@85 5496 *)
cannam@85 5497 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
cannam@85 5498 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@85 5499 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
cannam@85 5500 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
cannam@85 5501
cannam@85 5502 # hardcode_minus_L: Not really in the search PATH,
cannam@85 5503 # but as the default location of the library.
cannam@85 5504 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
cannam@85 5505 ;;
cannam@85 5506 esac
cannam@85 5507 fi
cannam@85 5508 ;;
cannam@85 5509
cannam@85 5510 irix5* | irix6* | nonstopux*)
cannam@85 5511 if test "$GCC" = yes; then
cannam@85 5512 _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'
cannam@85 5513 else
cannam@85 5514 _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'
cannam@85 5515 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
cannam@85 5516 fi
cannam@85 5517 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
cannam@85 5518 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@85 5519 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
cannam@85 5520 ;;
cannam@85 5521
cannam@85 5522 netbsd* | knetbsd*-gnu)
cannam@85 5523 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
cannam@85 5524 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
cannam@85 5525 else
cannam@85 5526 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
cannam@85 5527 fi
cannam@85 5528 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
cannam@85 5529 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
cannam@85 5530 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@85 5531 ;;
cannam@85 5532
cannam@85 5533 newsos6)
cannam@85 5534 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
cannam@85 5535 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
cannam@85 5536 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
cannam@85 5537 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@85 5538 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@85 5539 ;;
cannam@85 5540
cannam@85 5541 openbsd*)
cannam@85 5542 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
cannam@85 5543 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@85 5544 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
cannam@85 5545 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
cannam@85 5546 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
cannam@85 5547 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
cannam@85 5548 else
cannam@85 5549 case $host_os in
cannam@85 5550 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
cannam@85 5551 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
cannam@85 5552 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
cannam@85 5553 ;;
cannam@85 5554 *)
cannam@85 5555 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
cannam@85 5556 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
cannam@85 5557 ;;
cannam@85 5558 esac
cannam@85 5559 fi
cannam@85 5560 ;;
cannam@85 5561
cannam@85 5562 os2*)
cannam@85 5563 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
cannam@85 5564 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
cannam@85 5565 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
cannam@85 5566 _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'
cannam@85 5567 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
cannam@85 5568 ;;
cannam@85 5569
cannam@85 5570 osf3*)
cannam@85 5571 if test "$GCC" = yes; then
cannam@85 5572 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
cannam@85 5573 _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'
cannam@85 5574 else
cannam@85 5575 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
cannam@85 5576 _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'
cannam@85 5577 fi
cannam@85 5578 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
cannam@85 5579 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@85 5580 ;;
cannam@85 5581
cannam@85 5582 osf4* | osf5*) # as osf3* with the addition of -msym flag
cannam@85 5583 if test "$GCC" = yes; then
cannam@85 5584 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
cannam@85 5585 _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'
cannam@85 5586 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
cannam@85 5587 else
cannam@85 5588 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
cannam@85 5589 _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'
cannam@85 5590 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
cannam@85 5591 $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'
cannam@85 5592
cannam@85 5593 # Both c and cxx compiler support -rpath directly
cannam@85 5594 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
cannam@85 5595 fi
cannam@85 5596 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@85 5597 ;;
cannam@85 5598
cannam@85 5599 sco3.2v5*)
cannam@85 5600 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
cannam@85 5601 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@85 5602 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
cannam@85 5603 runpath_var=LD_RUN_PATH
cannam@85 5604 hardcode_runpath_var=yes
cannam@85 5605 ;;
cannam@85 5606
cannam@85 5607 solaris*)
cannam@85 5608 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
cannam@85 5609 if test "$GCC" = yes; then
cannam@85 5610 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@85 5611 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
cannam@85 5612 $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
cannam@85 5613 else
cannam@85 5614 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
cannam@85 5615 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
cannam@85 5616 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
cannam@85 5617 fi
cannam@85 5618 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
cannam@85 5619 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@85 5620 case $host_os in
cannam@85 5621 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
cannam@85 5622 *) # Supported since Solaris 2.6 (maybe 2.5.1?)
cannam@85 5623 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
cannam@85 5624 esac
cannam@85 5625 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
cannam@85 5626 ;;
cannam@85 5627
cannam@85 5628 sunos4*)
cannam@85 5629 if test "x$host_vendor" = xsequent; then
cannam@85 5630 # Use $CC to link under sequent, because it throws in some extra .o
cannam@85 5631 # files that make .init and .fini sections work.
cannam@85 5632 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@85 5633 else
cannam@85 5634 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
cannam@85 5635 fi
cannam@85 5636 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
cannam@85 5637 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
cannam@85 5638 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
cannam@85 5639 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@85 5640 ;;
cannam@85 5641
cannam@85 5642 sysv4)
cannam@85 5643 case $host_vendor in
cannam@85 5644 sni)
cannam@85 5645 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
cannam@85 5646 _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
cannam@85 5647 ;;
cannam@85 5648 siemens)
cannam@85 5649 ## LD is ld it makes a PLAMLIB
cannam@85 5650 ## CC just makes a GrossModule.
cannam@85 5651 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
cannam@85 5652 _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
cannam@85 5653 _LT_AC_TAGVAR(hardcode_direct, $1)=no
cannam@85 5654 ;;
cannam@85 5655 motorola)
cannam@85 5656 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
cannam@85 5657 _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
cannam@85 5658 ;;
cannam@85 5659 esac
cannam@85 5660 runpath_var='LD_RUN_PATH'
cannam@85 5661 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@85 5662 ;;
cannam@85 5663
cannam@85 5664 sysv4.3*)
cannam@85 5665 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
cannam@85 5666 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@85 5667 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
cannam@85 5668 ;;
cannam@85 5669
cannam@85 5670 sysv4*MP*)
cannam@85 5671 if test -d /usr/nec; then
cannam@85 5672 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
cannam@85 5673 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@85 5674 runpath_var=LD_RUN_PATH
cannam@85 5675 hardcode_runpath_var=yes
cannam@85 5676 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
cannam@85 5677 fi
cannam@85 5678 ;;
cannam@85 5679
cannam@85 5680 sysv4.2uw2*)
cannam@85 5681 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
cannam@85 5682 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
cannam@85 5683 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
cannam@85 5684 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@85 5685 hardcode_runpath_var=yes
cannam@85 5686 runpath_var=LD_RUN_PATH
cannam@85 5687 ;;
cannam@85 5688
cannam@85 5689 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
cannam@85 5690 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
cannam@85 5691 if test "$GCC" = yes; then
cannam@85 5692 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@85 5693 else
cannam@85 5694 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@85 5695 fi
cannam@85 5696 runpath_var='LD_RUN_PATH'
cannam@85 5697 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@85 5698 ;;
cannam@85 5699
cannam@85 5700 sysv5*)
cannam@85 5701 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
cannam@85 5702 # $CC -shared without GNU ld will not create a library from C++
cannam@85 5703 # object files and a static libstdc++, better avoid it by now
cannam@85 5704 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
cannam@85 5705 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
cannam@85 5706 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
cannam@85 5707 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
cannam@85 5708 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@85 5709 runpath_var='LD_RUN_PATH'
cannam@85 5710 ;;
cannam@85 5711
cannam@85 5712 uts4*)
cannam@85 5713 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
cannam@85 5714 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
cannam@85 5715 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@85 5716 ;;
cannam@85 5717
cannam@85 5718 *)
cannam@85 5719 _LT_AC_TAGVAR(ld_shlibs, $1)=no
cannam@85 5720 ;;
cannam@85 5721 esac
cannam@85 5722 fi
cannam@85 5723 ])
cannam@85 5724 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
cannam@85 5725 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
cannam@85 5726
cannam@85 5727 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
cannam@85 5728 if test "$GCC" = yes; then
cannam@85 5729 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
cannam@85 5730 fi
cannam@85 5731
cannam@85 5732 #
cannam@85 5733 # Do we need to explicitly link libc?
cannam@85 5734 #
cannam@85 5735 case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
cannam@85 5736 x|xyes)
cannam@85 5737 # Assume -lc should be added
cannam@85 5738 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
cannam@85 5739
cannam@85 5740 if test "$enable_shared" = yes && test "$GCC" = yes; then
cannam@85 5741 case $_LT_AC_TAGVAR(archive_cmds, $1) in
cannam@85 5742 *'~'*)
cannam@85 5743 # FIXME: we may have to deal with multi-command sequences.
cannam@85 5744 ;;
cannam@85 5745 '$CC '*)
cannam@85 5746 # Test whether the compiler implicitly links with -lc since on some
cannam@85 5747 # systems, -lgcc has to come before -lc. If gcc already passes -lc
cannam@85 5748 # to ld, don't add -lc before -lgcc.
cannam@85 5749 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
cannam@85 5750 $rm conftest*
cannam@85 5751 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
cannam@85 5752
cannam@85 5753 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
cannam@85 5754 soname=conftest
cannam@85 5755 lib=conftest
cannam@85 5756 libobjs=conftest.$ac_objext
cannam@85 5757 deplibs=
cannam@85 5758 wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
cannam@85 5759 compiler_flags=-v
cannam@85 5760 linker_flags=-v
cannam@85 5761 verstring=
cannam@85 5762 output_objdir=.
cannam@85 5763 libname=conftest
cannam@85 5764 lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
cannam@85 5765 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
cannam@85 5766 if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
cannam@85 5767 then
cannam@85 5768 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
cannam@85 5769 else
cannam@85 5770 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
cannam@85 5771 fi
cannam@85 5772 _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
cannam@85 5773 else
cannam@85 5774 cat conftest.err 1>&5
cannam@85 5775 fi
cannam@85 5776 $rm conftest*
cannam@85 5777 AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
cannam@85 5778 ;;
cannam@85 5779 esac
cannam@85 5780 fi
cannam@85 5781 ;;
cannam@85 5782 esac
cannam@85 5783 ])# AC_LIBTOOL_PROG_LD_SHLIBS
cannam@85 5784
cannam@85 5785
cannam@85 5786 # _LT_AC_FILE_LTDLL_C
cannam@85 5787 # -------------------
cannam@85 5788 # Be careful that the start marker always follows a newline.
cannam@85 5789 AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
cannam@85 5790 # /* ltdll.c starts here */
cannam@85 5791 # #define WIN32_LEAN_AND_MEAN
cannam@85 5792 # #include <windows.h>
cannam@85 5793 # #undef WIN32_LEAN_AND_MEAN
cannam@85 5794 # #include <stdio.h>
cannam@85 5795 #
cannam@85 5796 # #ifndef __CYGWIN__
cannam@85 5797 # # ifdef __CYGWIN32__
cannam@85 5798 # # define __CYGWIN__ __CYGWIN32__
cannam@85 5799 # # endif
cannam@85 5800 # #endif
cannam@85 5801 #
cannam@85 5802 # #ifdef __cplusplus
cannam@85 5803 # extern "C" {
cannam@85 5804 # #endif
cannam@85 5805 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
cannam@85 5806 # #ifdef __cplusplus
cannam@85 5807 # }
cannam@85 5808 # #endif
cannam@85 5809 #
cannam@85 5810 # #ifdef __CYGWIN__
cannam@85 5811 # #include <cygwin/cygwin_dll.h>
cannam@85 5812 # DECLARE_CYGWIN_DLL( DllMain );
cannam@85 5813 # #endif
cannam@85 5814 # HINSTANCE __hDllInstance_base;
cannam@85 5815 #
cannam@85 5816 # BOOL APIENTRY
cannam@85 5817 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
cannam@85 5818 # {
cannam@85 5819 # __hDllInstance_base = hInst;
cannam@85 5820 # return TRUE;
cannam@85 5821 # }
cannam@85 5822 # /* ltdll.c ends here */
cannam@85 5823 ])# _LT_AC_FILE_LTDLL_C
cannam@85 5824
cannam@85 5825
cannam@85 5826 # _LT_AC_TAGVAR(VARNAME, [TAGNAME])
cannam@85 5827 # ---------------------------------
cannam@85 5828 AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
cannam@85 5829
cannam@85 5830
cannam@85 5831 # old names
cannam@85 5832 AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
cannam@85 5833 AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
cannam@85 5834 AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
cannam@85 5835 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
cannam@85 5836 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
cannam@85 5837 AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
cannam@85 5838 AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
cannam@85 5839
cannam@85 5840 # This is just to silence aclocal about the macro not being used
cannam@85 5841 ifelse([AC_DISABLE_FAST_INSTALL])
cannam@85 5842
cannam@85 5843 AC_DEFUN([LT_AC_PROG_GCJ],
cannam@85 5844 [AC_CHECK_TOOL(GCJ, gcj, no)
cannam@85 5845 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
cannam@85 5846 AC_SUBST(GCJFLAGS)
cannam@85 5847 ])
cannam@85 5848
cannam@85 5849 AC_DEFUN([LT_AC_PROG_RC],
cannam@85 5850 [AC_CHECK_TOOL(RC, windres, no)
cannam@85 5851 ])
cannam@85 5852
cannam@85 5853 # NOTE: This macro has been submitted for inclusion into #
cannam@85 5854 # GNU Autoconf as AC_PROG_SED. When it is available in #
cannam@85 5855 # a released version of Autoconf we should remove this #
cannam@85 5856 # macro and use it instead. #
cannam@85 5857 # LT_AC_PROG_SED
cannam@85 5858 # --------------
cannam@85 5859 # Check for a fully-functional sed program, that truncates
cannam@85 5860 # as few characters as possible. Prefer GNU sed if found.
cannam@85 5861 AC_DEFUN([LT_AC_PROG_SED],
cannam@85 5862 [AC_MSG_CHECKING([for a sed that does not truncate output])
cannam@85 5863 AC_CACHE_VAL(lt_cv_path_SED,
cannam@85 5864 [# Loop through the user's path and test for sed and gsed.
cannam@85 5865 # Then use that list of sed's as ones to test for truncation.
cannam@85 5866 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
cannam@85 5867 for as_dir in $PATH
cannam@85 5868 do
cannam@85 5869 IFS=$as_save_IFS
cannam@85 5870 test -z "$as_dir" && as_dir=.
cannam@85 5871 for lt_ac_prog in sed gsed; do
cannam@85 5872 for ac_exec_ext in '' $ac_executable_extensions; do
cannam@85 5873 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
cannam@85 5874 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
cannam@85 5875 fi
cannam@85 5876 done
cannam@85 5877 done
cannam@85 5878 done
cannam@85 5879 lt_ac_max=0
cannam@85 5880 lt_ac_count=0
cannam@85 5881 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
cannam@85 5882 # along with /bin/sed that truncates output.
cannam@85 5883 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
cannam@85 5884 test ! -f $lt_ac_sed && break
cannam@85 5885 cat /dev/null > conftest.in
cannam@85 5886 lt_ac_count=0
cannam@85 5887 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
cannam@85 5888 # Check for GNU sed and select it if it is found.
cannam@85 5889 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
cannam@85 5890 lt_cv_path_SED=$lt_ac_sed
cannam@85 5891 break
cannam@85 5892 fi
cannam@85 5893 while true; do
cannam@85 5894 cat conftest.in conftest.in >conftest.tmp
cannam@85 5895 mv conftest.tmp conftest.in
cannam@85 5896 cp conftest.in conftest.nl
cannam@85 5897 echo >>conftest.nl
cannam@85 5898 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
cannam@85 5899 cmp -s conftest.out conftest.nl || break
cannam@85 5900 # 10000 chars as input seems more than enough
cannam@85 5901 test $lt_ac_count -gt 10 && break
cannam@85 5902 lt_ac_count=`expr $lt_ac_count + 1`
cannam@85 5903 if test $lt_ac_count -gt $lt_ac_max; then
cannam@85 5904 lt_ac_max=$lt_ac_count
cannam@85 5905 lt_cv_path_SED=$lt_ac_sed
cannam@85 5906 fi
cannam@85 5907 done
cannam@85 5908 done
cannam@85 5909 SED=$lt_cv_path_SED
cannam@85 5910 ])
cannam@85 5911 AC_MSG_RESULT([$SED])
cannam@85 5912 ])
cannam@85 5913
cannam@85 5914 # -*- Autoconf -*-
cannam@85 5915 # Copyright (C) 2002, 2003 Free Software Foundation, Inc.
cannam@85 5916 # Generated from amversion.in; do not edit by hand.
cannam@85 5917
cannam@85 5918 # This program is free software; you can redistribute it and/or modify
cannam@85 5919 # it under the terms of the GNU General Public License as published by
cannam@85 5920 # the Free Software Foundation; either version 2, or (at your option)
cannam@85 5921 # any later version.
cannam@85 5922
cannam@85 5923 # This program is distributed in the hope that it will be useful,
cannam@85 5924 # but WITHOUT ANY WARRANTY; without even the implied warranty of
cannam@85 5925 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
cannam@85 5926 # GNU General Public License for more details.
cannam@85 5927
cannam@85 5928 # You should have received a copy of the GNU General Public License
cannam@85 5929 # along with this program; if not, write to the Free Software
cannam@85 5930 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
cannam@85 5931
cannam@85 5932 # AM_AUTOMAKE_VERSION(VERSION)
cannam@85 5933 # ----------------------------
cannam@85 5934 # Automake X.Y traces this macro to ensure aclocal.m4 has been
cannam@85 5935 # generated from the m4 files accompanying Automake X.Y.
cannam@85 5936 AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.8"])
cannam@85 5937
cannam@85 5938 # AM_SET_CURRENT_AUTOMAKE_VERSION
cannam@85 5939 # -------------------------------
cannam@85 5940 # Call AM_AUTOMAKE_VERSION so it can be traced.
cannam@85 5941 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
cannam@85 5942 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
cannam@85 5943 [AM_AUTOMAKE_VERSION([1.8.2])])
cannam@85 5944
cannam@85 5945 # Figure out how to run the assembler. -*- Autoconf -*-
cannam@85 5946
cannam@85 5947 # serial 3
cannam@85 5948
cannam@85 5949 # Copyright (C) 2001, 2003, 2004 Free Software Foundation, Inc.
cannam@85 5950
cannam@85 5951 # This program is free software; you can redistribute it and/or modify
cannam@85 5952 # it under the terms of the GNU General Public License as published by
cannam@85 5953 # the Free Software Foundation; either version 2, or (at your option)
cannam@85 5954 # any later version.
cannam@85 5955
cannam@85 5956 # This program is distributed in the hope that it will be useful,
cannam@85 5957 # but WITHOUT ANY WARRANTY; without even the implied warranty of
cannam@85 5958 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
cannam@85 5959 # GNU General Public License for more details.
cannam@85 5960
cannam@85 5961 # You should have received a copy of the GNU General Public License
cannam@85 5962 # along with this program; if not, write to the Free Software
cannam@85 5963 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
cannam@85 5964 # 02111-1307, USA.
cannam@85 5965
cannam@85 5966 # AM_PROG_AS
cannam@85 5967 # ----------
cannam@85 5968 AC_DEFUN([AM_PROG_AS],
cannam@85 5969 [# By default we simply use the C compiler to build assembly code.
cannam@85 5970 AC_REQUIRE([AC_PROG_CC])
cannam@85 5971 test "${CCAS+set}" = set || CCAS=$CC
cannam@85 5972 test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
cannam@85 5973 AC_ARG_VAR([CCAS], [assembler compiler command (defaults to CC)])
cannam@85 5974 AC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)])
cannam@85 5975 ])
cannam@85 5976
cannam@85 5977 # AM_AUX_DIR_EXPAND
cannam@85 5978
cannam@85 5979 # Copyright (C) 2001, 2003 Free Software Foundation, Inc.
cannam@85 5980
cannam@85 5981 # This program is free software; you can redistribute it and/or modify
cannam@85 5982 # it under the terms of the GNU General Public License as published by
cannam@85 5983 # the Free Software Foundation; either version 2, or (at your option)
cannam@85 5984 # any later version.
cannam@85 5985
cannam@85 5986 # This program is distributed in the hope that it will be useful,
cannam@85 5987 # but WITHOUT ANY WARRANTY; without even the implied warranty of
cannam@85 5988 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
cannam@85 5989 # GNU General Public License for more details.
cannam@85 5990
cannam@85 5991 # You should have received a copy of the GNU General Public License
cannam@85 5992 # along with this program; if not, write to the Free Software
cannam@85 5993 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
cannam@85 5994 # 02111-1307, USA.
cannam@85 5995
cannam@85 5996 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
cannam@85 5997 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
cannam@85 5998 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
cannam@85 5999 #
cannam@85 6000 # Of course, Automake must honor this variable whenever it calls a
cannam@85 6001 # tool from the auxiliary directory. The problem is that $srcdir (and
cannam@85 6002 # therefore $ac_aux_dir as well) can be either absolute or relative,
cannam@85 6003 # depending on how configure is run. This is pretty annoying, since
cannam@85 6004 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
cannam@85 6005 # source directory, any form will work fine, but in subdirectories a
cannam@85 6006 # relative path needs to be adjusted first.
cannam@85 6007 #
cannam@85 6008 # $ac_aux_dir/missing
cannam@85 6009 # fails when called from a subdirectory if $ac_aux_dir is relative
cannam@85 6010 # $top_srcdir/$ac_aux_dir/missing
cannam@85 6011 # fails if $ac_aux_dir is absolute,
cannam@85 6012 # fails when called from a subdirectory in a VPATH build with
cannam@85 6013 # a relative $ac_aux_dir
cannam@85 6014 #
cannam@85 6015 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
cannam@85 6016 # are both prefixed by $srcdir. In an in-source build this is usually
cannam@85 6017 # harmless because $srcdir is `.', but things will broke when you
cannam@85 6018 # start a VPATH build or use an absolute $srcdir.
cannam@85 6019 #
cannam@85 6020 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
cannam@85 6021 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
cannam@85 6022 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
cannam@85 6023 # and then we would define $MISSING as
cannam@85 6024 # MISSING="\${SHELL} $am_aux_dir/missing"
cannam@85 6025 # This will work as long as MISSING is not called from configure, because
cannam@85 6026 # unfortunately $(top_srcdir) has no meaning in configure.
cannam@85 6027 # However there are other variables, like CC, which are often used in
cannam@85 6028 # configure, and could therefore not use this "fixed" $ac_aux_dir.
cannam@85 6029 #
cannam@85 6030 # Another solution, used here, is to always expand $ac_aux_dir to an
cannam@85 6031 # absolute PATH. The drawback is that using absolute paths prevent a
cannam@85 6032 # configured tree to be moved without reconfiguration.
cannam@85 6033
cannam@85 6034 AC_DEFUN([AM_AUX_DIR_EXPAND],
cannam@85 6035 [dnl Rely on autoconf to set up CDPATH properly.
cannam@85 6036 AC_PREREQ([2.50])dnl
cannam@85 6037 # expand $ac_aux_dir to an absolute path
cannam@85 6038 am_aux_dir=`cd $ac_aux_dir && pwd`
cannam@85 6039 ])
cannam@85 6040
cannam@85 6041 # AM_CONDITIONAL -*- Autoconf -*-
cannam@85 6042
cannam@85 6043 # Copyright (C) 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
cannam@85 6044
cannam@85 6045 # This program is free software; you can redistribute it and/or modify
cannam@85 6046 # it under the terms of the GNU General Public License as published by
cannam@85 6047 # the Free Software Foundation; either version 2, or (at your option)
cannam@85 6048 # any later version.
cannam@85 6049
cannam@85 6050 # This program is distributed in the hope that it will be useful,
cannam@85 6051 # but WITHOUT ANY WARRANTY; without even the implied warranty of
cannam@85 6052 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
cannam@85 6053 # GNU General Public License for more details.
cannam@85 6054
cannam@85 6055 # You should have received a copy of the GNU General Public License
cannam@85 6056 # along with this program; if not, write to the Free Software
cannam@85 6057 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
cannam@85 6058 # 02111-1307, USA.
cannam@85 6059
cannam@85 6060 # serial 6
cannam@85 6061
cannam@85 6062 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
cannam@85 6063 # -------------------------------------
cannam@85 6064 # Define a conditional.
cannam@85 6065 AC_DEFUN([AM_CONDITIONAL],
cannam@85 6066 [AC_PREREQ(2.52)dnl
cannam@85 6067 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
cannam@85 6068 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
cannam@85 6069 AC_SUBST([$1_TRUE])
cannam@85 6070 AC_SUBST([$1_FALSE])
cannam@85 6071 if $2; then
cannam@85 6072 $1_TRUE=
cannam@85 6073 $1_FALSE='#'
cannam@85 6074 else
cannam@85 6075 $1_TRUE='#'
cannam@85 6076 $1_FALSE=
cannam@85 6077 fi
cannam@85 6078 AC_CONFIG_COMMANDS_PRE(
cannam@85 6079 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
cannam@85 6080 AC_MSG_ERROR([conditional "$1" was never defined.
cannam@85 6081 Usually this means the macro was only invoked conditionally.])
cannam@85 6082 fi])])
cannam@85 6083
cannam@85 6084 # serial 6 -*- Autoconf -*-
cannam@85 6085
cannam@85 6086 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
cannam@85 6087 # Free Software Foundation, Inc.
cannam@85 6088
cannam@85 6089 # This program is free software; you can redistribute it and/or modify
cannam@85 6090 # it under the terms of the GNU General Public License as published by
cannam@85 6091 # the Free Software Foundation; either version 2, or (at your option)
cannam@85 6092 # any later version.
cannam@85 6093
cannam@85 6094 # This program is distributed in the hope that it will be useful,
cannam@85 6095 # but WITHOUT ANY WARRANTY; without even the implied warranty of
cannam@85 6096 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
cannam@85 6097 # GNU General Public License for more details.
cannam@85 6098
cannam@85 6099 # You should have received a copy of the GNU General Public License
cannam@85 6100 # along with this program; if not, write to the Free Software
cannam@85 6101 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
cannam@85 6102 # 02111-1307, USA.
cannam@85 6103
cannam@85 6104
cannam@85 6105 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
cannam@85 6106 # written in clear, in which case automake, when reading aclocal.m4,
cannam@85 6107 # will think it sees a *use*, and therefore will trigger all it's
cannam@85 6108 # C support machinery. Also note that it means that autoscan, seeing
cannam@85 6109 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
cannam@85 6110
cannam@85 6111
cannam@85 6112
cannam@85 6113 # _AM_DEPENDENCIES(NAME)
cannam@85 6114 # ----------------------
cannam@85 6115 # See how the compiler implements dependency checking.
cannam@85 6116 # NAME is "CC", "CXX", "GCJ", or "OBJC".
cannam@85 6117 # We try a few techniques and use that to set a single cache variable.
cannam@85 6118 #
cannam@85 6119 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
cannam@85 6120 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
cannam@85 6121 # dependency, and given that the user is not expected to run this macro,
cannam@85 6122 # just rely on AC_PROG_CC.
cannam@85 6123 AC_DEFUN([_AM_DEPENDENCIES],
cannam@85 6124 [AC_REQUIRE([AM_SET_DEPDIR])dnl
cannam@85 6125 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
cannam@85 6126 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
cannam@85 6127 AC_REQUIRE([AM_DEP_TRACK])dnl
cannam@85 6128
cannam@85 6129 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
cannam@85 6130 [$1], CXX, [depcc="$CXX" am_compiler_list=],
cannam@85 6131 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
cannam@85 6132 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
cannam@85 6133 [depcc="$$1" am_compiler_list=])
cannam@85 6134
cannam@85 6135 AC_CACHE_CHECK([dependency style of $depcc],
cannam@85 6136 [am_cv_$1_dependencies_compiler_type],
cannam@85 6137 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
cannam@85 6138 # We make a subdir and do the tests there. Otherwise we can end up
cannam@85 6139 # making bogus files that we don't know about and never remove. For
cannam@85 6140 # instance it was reported that on HP-UX the gcc test will end up
cannam@85 6141 # making a dummy file named `D' -- because `-MD' means `put the output
cannam@85 6142 # in D'.
cannam@85 6143 mkdir conftest.dir
cannam@85 6144 # Copy depcomp to subdir because otherwise we won't find it if we're
cannam@85 6145 # using a relative directory.
cannam@85 6146 cp "$am_depcomp" conftest.dir
cannam@85 6147 cd conftest.dir
cannam@85 6148 # We will build objects and dependencies in a subdirectory because
cannam@85 6149 # it helps to detect inapplicable dependency modes. For instance
cannam@85 6150 # both Tru64's cc and ICC support -MD to output dependencies as a
cannam@85 6151 # side effect of compilation, but ICC will put the dependencies in
cannam@85 6152 # the current directory while Tru64 will put them in the object
cannam@85 6153 # directory.
cannam@85 6154 mkdir sub
cannam@85 6155
cannam@85 6156 am_cv_$1_dependencies_compiler_type=none
cannam@85 6157 if test "$am_compiler_list" = ""; then
cannam@85 6158 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
cannam@85 6159 fi
cannam@85 6160 for depmode in $am_compiler_list; do
cannam@85 6161 # Setup a source with many dependencies, because some compilers
cannam@85 6162 # like to wrap large dependency lists on column 80 (with \), and
cannam@85 6163 # we should not choose a depcomp mode which is confused by this.
cannam@85 6164 #
cannam@85 6165 # We need to recreate these files for each test, as the compiler may
cannam@85 6166 # overwrite some of them when testing with obscure command lines.
cannam@85 6167 # This happens at least with the AIX C compiler.
cannam@85 6168 : > sub/conftest.c
cannam@85 6169 for i in 1 2 3 4 5 6; do
cannam@85 6170 echo '#include "conftst'$i'.h"' >> sub/conftest.c
cannam@85 6171 : > sub/conftst$i.h
cannam@85 6172 done
cannam@85 6173 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
cannam@85 6174
cannam@85 6175 case $depmode in
cannam@85 6176 nosideeffect)
cannam@85 6177 # after this tag, mechanisms are not by side-effect, so they'll
cannam@85 6178 # only be used when explicitly requested
cannam@85 6179 if test "x$enable_dependency_tracking" = xyes; then
cannam@85 6180 continue
cannam@85 6181 else
cannam@85 6182 break
cannam@85 6183 fi
cannam@85 6184 ;;
cannam@85 6185 none) break ;;
cannam@85 6186 esac
cannam@85 6187 # We check with `-c' and `-o' for the sake of the "dashmstdout"
cannam@85 6188 # mode. It turns out that the SunPro C++ compiler does not properly
cannam@85 6189 # handle `-M -o', and we need to detect this.
cannam@85 6190 if depmode=$depmode \
cannam@85 6191 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
cannam@85 6192 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
cannam@85 6193 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
cannam@85 6194 >/dev/null 2>conftest.err &&
cannam@85 6195 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
cannam@85 6196 grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
cannam@85 6197 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
cannam@85 6198 # icc doesn't choke on unknown options, it will just issue warnings
cannam@85 6199 # (even with -Werror). So we grep stderr for any message
cannam@85 6200 # that says an option was ignored.
cannam@85 6201 if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
cannam@85 6202 am_cv_$1_dependencies_compiler_type=$depmode
cannam@85 6203 break
cannam@85 6204 fi
cannam@85 6205 fi
cannam@85 6206 done
cannam@85 6207
cannam@85 6208 cd ..
cannam@85 6209 rm -rf conftest.dir
cannam@85 6210 else
cannam@85 6211 am_cv_$1_dependencies_compiler_type=none
cannam@85 6212 fi
cannam@85 6213 ])
cannam@85 6214 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
cannam@85 6215 AM_CONDITIONAL([am__fastdep$1], [
cannam@85 6216 test "x$enable_dependency_tracking" != xno \
cannam@85 6217 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
cannam@85 6218 ])
cannam@85 6219
cannam@85 6220
cannam@85 6221 # AM_SET_DEPDIR
cannam@85 6222 # -------------
cannam@85 6223 # Choose a directory name for dependency files.
cannam@85 6224 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
cannam@85 6225 AC_DEFUN([AM_SET_DEPDIR],
cannam@85 6226 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
cannam@85 6227 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
cannam@85 6228 ])
cannam@85 6229
cannam@85 6230
cannam@85 6231 # AM_DEP_TRACK
cannam@85 6232 # ------------
cannam@85 6233 AC_DEFUN([AM_DEP_TRACK],
cannam@85 6234 [AC_ARG_ENABLE(dependency-tracking,
cannam@85 6235 [ --disable-dependency-tracking speeds up one-time build
cannam@85 6236 --enable-dependency-tracking do not reject slow dependency extractors])
cannam@85 6237 if test "x$enable_dependency_tracking" != xno; then
cannam@85 6238 am_depcomp="$ac_aux_dir/depcomp"
cannam@85 6239 AMDEPBACKSLASH='\'
cannam@85 6240 fi
cannam@85 6241 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
cannam@85 6242 AC_SUBST([AMDEPBACKSLASH])
cannam@85 6243 ])
cannam@85 6244
cannam@85 6245 # Generate code to set up dependency tracking. -*- Autoconf -*-
cannam@85 6246
cannam@85 6247 # Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
cannam@85 6248
cannam@85 6249 # This program is free software; you can redistribute it and/or modify
cannam@85 6250 # it under the terms of the GNU General Public License as published by
cannam@85 6251 # the Free Software Foundation; either version 2, or (at your option)
cannam@85 6252 # any later version.
cannam@85 6253
cannam@85 6254 # This program is distributed in the hope that it will be useful,
cannam@85 6255 # but WITHOUT ANY WARRANTY; without even the implied warranty of
cannam@85 6256 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
cannam@85 6257 # GNU General Public License for more details.
cannam@85 6258
cannam@85 6259 # You should have received a copy of the GNU General Public License
cannam@85 6260 # along with this program; if not, write to the Free Software
cannam@85 6261 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
cannam@85 6262 # 02111-1307, USA.
cannam@85 6263
cannam@85 6264 #serial 2
cannam@85 6265
cannam@85 6266 # _AM_OUTPUT_DEPENDENCY_COMMANDS
cannam@85 6267 # ------------------------------
cannam@85 6268 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
cannam@85 6269 [for mf in $CONFIG_FILES; do
cannam@85 6270 # Strip MF so we end up with the name of the file.
cannam@85 6271 mf=`echo "$mf" | sed -e 's/:.*$//'`
cannam@85 6272 # Check whether this is an Automake generated Makefile or not.
cannam@85 6273 # We used to match only the files named `Makefile.in', but
cannam@85 6274 # some people rename them; so instead we look at the file content.
cannam@85 6275 # Grep'ing the first line is not enough: some people post-process
cannam@85 6276 # each Makefile.in and add a new line on top of each file to say so.
cannam@85 6277 # So let's grep whole file.
cannam@85 6278 if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
cannam@85 6279 dirpart=`AS_DIRNAME("$mf")`
cannam@85 6280 else
cannam@85 6281 continue
cannam@85 6282 fi
cannam@85 6283 grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
cannam@85 6284 # Extract the definition of DEP_FILES from the Makefile without
cannam@85 6285 # running `make'.
cannam@85 6286 DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
cannam@85 6287 test -z "$DEPDIR" && continue
cannam@85 6288 # When using ansi2knr, U may be empty or an underscore; expand it
cannam@85 6289 U=`sed -n -e '/^U = / s///p' < "$mf"`
cannam@85 6290 test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
cannam@85 6291 # We invoke sed twice because it is the simplest approach to
cannam@85 6292 # changing $(DEPDIR) to its actual value in the expansion.
cannam@85 6293 for file in `sed -n -e '
cannam@85 6294 /^DEP_FILES = .*\\\\$/ {
cannam@85 6295 s/^DEP_FILES = //
cannam@85 6296 :loop
cannam@85 6297 s/\\\\$//
cannam@85 6298 p
cannam@85 6299 n
cannam@85 6300 /\\\\$/ b loop
cannam@85 6301 p
cannam@85 6302 }
cannam@85 6303 /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
cannam@85 6304 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
cannam@85 6305 # Make sure the directory exists.
cannam@85 6306 test -f "$dirpart/$file" && continue
cannam@85 6307 fdir=`AS_DIRNAME(["$file"])`
cannam@85 6308 AS_MKDIR_P([$dirpart/$fdir])
cannam@85 6309 # echo "creating $dirpart/$file"
cannam@85 6310 echo '# dummy' > "$dirpart/$file"
cannam@85 6311 done
cannam@85 6312 done
cannam@85 6313 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
cannam@85 6314
cannam@85 6315
cannam@85 6316 # AM_OUTPUT_DEPENDENCY_COMMANDS
cannam@85 6317 # -----------------------------
cannam@85 6318 # This macro should only be invoked once -- use via AC_REQUIRE.
cannam@85 6319 #
cannam@85 6320 # This code is only required when automatic dependency tracking
cannam@85 6321 # is enabled. FIXME. This creates each `.P' file that we will
cannam@85 6322 # need in order to bootstrap the dependency handling code.
cannam@85 6323 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
cannam@85 6324 [AC_CONFIG_COMMANDS([depfiles],
cannam@85 6325 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
cannam@85 6326 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
cannam@85 6327 ])
cannam@85 6328
cannam@85 6329 # Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
cannam@85 6330
cannam@85 6331 # Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
cannam@85 6332
cannam@85 6333 # This program is free software; you can redistribute it and/or modify
cannam@85 6334 # it under the terms of the GNU General Public License as published by
cannam@85 6335 # the Free Software Foundation; either version 2, or (at your option)
cannam@85 6336 # any later version.
cannam@85 6337
cannam@85 6338 # This program is distributed in the hope that it will be useful,
cannam@85 6339 # but WITHOUT ANY WARRANTY; without even the implied warranty of
cannam@85 6340 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
cannam@85 6341 # GNU General Public License for more details.
cannam@85 6342
cannam@85 6343 # You should have received a copy of the GNU General Public License
cannam@85 6344 # along with this program; if not, write to the Free Software
cannam@85 6345 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
cannam@85 6346 # 02111-1307, USA.
cannam@85 6347
cannam@85 6348 # serial 7
cannam@85 6349
cannam@85 6350 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
cannam@85 6351 AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
cannam@85 6352
cannam@85 6353 # Do all the work for Automake. -*- Autoconf -*-
cannam@85 6354
cannam@85 6355 # This macro actually does too much some checks are only needed if
cannam@85 6356 # your package does certain things. But this isn't really a big deal.
cannam@85 6357
cannam@85 6358 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
cannam@85 6359 # Free Software Foundation, Inc.
cannam@85 6360
cannam@85 6361 # This program is free software; you can redistribute it and/or modify
cannam@85 6362 # it under the terms of the GNU General Public License as published by
cannam@85 6363 # the Free Software Foundation; either version 2, or (at your option)
cannam@85 6364 # any later version.
cannam@85 6365
cannam@85 6366 # This program is distributed in the hope that it will be useful,
cannam@85 6367 # but WITHOUT ANY WARRANTY; without even the implied warranty of
cannam@85 6368 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
cannam@85 6369 # GNU General Public License for more details.
cannam@85 6370
cannam@85 6371 # You should have received a copy of the GNU General Public License
cannam@85 6372 # along with this program; if not, write to the Free Software
cannam@85 6373 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
cannam@85 6374 # 02111-1307, USA.
cannam@85 6375
cannam@85 6376 # serial 11
cannam@85 6377
cannam@85 6378 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
cannam@85 6379 # AM_INIT_AUTOMAKE([OPTIONS])
cannam@85 6380 # -----------------------------------------------
cannam@85 6381 # The call with PACKAGE and VERSION arguments is the old style
cannam@85 6382 # call (pre autoconf-2.50), which is being phased out. PACKAGE
cannam@85 6383 # and VERSION should now be passed to AC_INIT and removed from
cannam@85 6384 # the call to AM_INIT_AUTOMAKE.
cannam@85 6385 # We support both call styles for the transition. After
cannam@85 6386 # the next Automake release, Autoconf can make the AC_INIT
cannam@85 6387 # arguments mandatory, and then we can depend on a new Autoconf
cannam@85 6388 # release and drop the old call support.
cannam@85 6389 AC_DEFUN([AM_INIT_AUTOMAKE],
cannam@85 6390 [AC_PREREQ([2.58])dnl
cannam@85 6391 dnl Autoconf wants to disallow AM_ names. We explicitly allow
cannam@85 6392 dnl the ones we care about.
cannam@85 6393 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
cannam@85 6394 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
cannam@85 6395 AC_REQUIRE([AC_PROG_INSTALL])dnl
cannam@85 6396 # test to see if srcdir already configured
cannam@85 6397 if test "`cd $srcdir && pwd`" != "`pwd`" &&
cannam@85 6398 test -f $srcdir/config.status; then
cannam@85 6399 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
cannam@85 6400 fi
cannam@85 6401
cannam@85 6402 # test whether we have cygpath
cannam@85 6403 if test -z "$CYGPATH_W"; then
cannam@85 6404 if (cygpath --version) >/dev/null 2>/dev/null; then
cannam@85 6405 CYGPATH_W='cygpath -w'
cannam@85 6406 else
cannam@85 6407 CYGPATH_W=echo
cannam@85 6408 fi
cannam@85 6409 fi
cannam@85 6410 AC_SUBST([CYGPATH_W])
cannam@85 6411
cannam@85 6412 # Define the identity of the package.
cannam@85 6413 dnl Distinguish between old-style and new-style calls.
cannam@85 6414 m4_ifval([$2],
cannam@85 6415 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
cannam@85 6416 AC_SUBST([PACKAGE], [$1])dnl
cannam@85 6417 AC_SUBST([VERSION], [$2])],
cannam@85 6418 [_AM_SET_OPTIONS([$1])dnl
cannam@85 6419 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
cannam@85 6420 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
cannam@85 6421
cannam@85 6422 _AM_IF_OPTION([no-define],,
cannam@85 6423 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
cannam@85 6424 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
cannam@85 6425
cannam@85 6426 # Some tools Automake needs.
cannam@85 6427 AC_REQUIRE([AM_SANITY_CHECK])dnl
cannam@85 6428 AC_REQUIRE([AC_ARG_PROGRAM])dnl
cannam@85 6429 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
cannam@85 6430 AM_MISSING_PROG(AUTOCONF, autoconf)
cannam@85 6431 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
cannam@85 6432 AM_MISSING_PROG(AUTOHEADER, autoheader)
cannam@85 6433 AM_MISSING_PROG(MAKEINFO, makeinfo)
cannam@85 6434 AM_MISSING_PROG(AMTAR, tar)
cannam@85 6435 AM_PROG_INSTALL_SH
cannam@85 6436 AM_PROG_INSTALL_STRIP
cannam@85 6437 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
cannam@85 6438 # We need awk for the "check" target. The system "awk" is bad on
cannam@85 6439 # some platforms.
cannam@85 6440 AC_REQUIRE([AC_PROG_AWK])dnl
cannam@85 6441 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
cannam@85 6442 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
cannam@85 6443
cannam@85 6444 _AM_IF_OPTION([no-dependencies],,
cannam@85 6445 [AC_PROVIDE_IFELSE([AC_PROG_CC],
cannam@85 6446 [_AM_DEPENDENCIES(CC)],
cannam@85 6447 [define([AC_PROG_CC],
cannam@85 6448 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
cannam@85 6449 AC_PROVIDE_IFELSE([AC_PROG_CXX],
cannam@85 6450 [_AM_DEPENDENCIES(CXX)],
cannam@85 6451 [define([AC_PROG_CXX],
cannam@85 6452 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
cannam@85 6453 ])
cannam@85 6454 ])
cannam@85 6455
cannam@85 6456
cannam@85 6457 # When config.status generates a header, we must update the stamp-h file.
cannam@85 6458 # This file resides in the same directory as the config header
cannam@85 6459 # that is generated. The stamp files are numbered to have different names.
cannam@85 6460
cannam@85 6461 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
cannam@85 6462 # loop where config.status creates the headers, so we can generate
cannam@85 6463 # our stamp files there.
cannam@85 6464 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
cannam@85 6465 [# Compute $1's index in $config_headers.
cannam@85 6466 _am_stamp_count=1
cannam@85 6467 for _am_header in $config_headers :; do
cannam@85 6468 case $_am_header in
cannam@85 6469 $1 | $1:* )
cannam@85 6470 break ;;
cannam@85 6471 * )
cannam@85 6472 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
cannam@85 6473 esac
cannam@85 6474 done
cannam@85 6475 echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
cannam@85 6476
cannam@85 6477 # AM_PROG_INSTALL_SH
cannam@85 6478 # ------------------
cannam@85 6479 # Define $install_sh.
cannam@85 6480
cannam@85 6481 # Copyright (C) 2001, 2003 Free Software Foundation, Inc.
cannam@85 6482
cannam@85 6483 # This program is free software; you can redistribute it and/or modify
cannam@85 6484 # it under the terms of the GNU General Public License as published by
cannam@85 6485 # the Free Software Foundation; either version 2, or (at your option)
cannam@85 6486 # any later version.
cannam@85 6487
cannam@85 6488 # This program is distributed in the hope that it will be useful,
cannam@85 6489 # but WITHOUT ANY WARRANTY; without even the implied warranty of
cannam@85 6490 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
cannam@85 6491 # GNU General Public License for more details.
cannam@85 6492
cannam@85 6493 # You should have received a copy of the GNU General Public License
cannam@85 6494 # along with this program; if not, write to the Free Software
cannam@85 6495 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
cannam@85 6496 # 02111-1307, USA.
cannam@85 6497
cannam@85 6498 AC_DEFUN([AM_PROG_INSTALL_SH],
cannam@85 6499 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
cannam@85 6500 install_sh=${install_sh-"$am_aux_dir/install-sh"}
cannam@85 6501 AC_SUBST(install_sh)])
cannam@85 6502
cannam@85 6503 # -*- Autoconf -*-
cannam@85 6504 # Copyright (C) 2003 Free Software Foundation, Inc.
cannam@85 6505
cannam@85 6506 # This program is free software; you can redistribute it and/or modify
cannam@85 6507 # it under the terms of the GNU General Public License as published by
cannam@85 6508 # the Free Software Foundation; either version 2, or (at your option)
cannam@85 6509 # any later version.
cannam@85 6510
cannam@85 6511 # This program is distributed in the hope that it will be useful,
cannam@85 6512 # but WITHOUT ANY WARRANTY; without even the implied warranty of
cannam@85 6513 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
cannam@85 6514 # GNU General Public License for more details.
cannam@85 6515
cannam@85 6516 # You should have received a copy of the GNU General Public License
cannam@85 6517 # along with this program; if not, write to the Free Software
cannam@85 6518 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
cannam@85 6519 # 02111-1307, USA.
cannam@85 6520
cannam@85 6521 # serial 1
cannam@85 6522
cannam@85 6523 # Check whether the underlying file-system supports filenames
cannam@85 6524 # with a leading dot. For instance MS-DOS doesn't.
cannam@85 6525 AC_DEFUN([AM_SET_LEADING_DOT],
cannam@85 6526 [rm -rf .tst 2>/dev/null
cannam@85 6527 mkdir .tst 2>/dev/null
cannam@85 6528 if test -d .tst; then
cannam@85 6529 am__leading_dot=.
cannam@85 6530 else
cannam@85 6531 am__leading_dot=_
cannam@85 6532 fi
cannam@85 6533 rmdir .tst 2>/dev/null
cannam@85 6534 AC_SUBST([am__leading_dot])])
cannam@85 6535
cannam@85 6536 # Check to see how 'make' treats includes. -*- Autoconf -*-
cannam@85 6537
cannam@85 6538 # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
cannam@85 6539
cannam@85 6540 # This program is free software; you can redistribute it and/or modify
cannam@85 6541 # it under the terms of the GNU General Public License as published by
cannam@85 6542 # the Free Software Foundation; either version 2, or (at your option)
cannam@85 6543 # any later version.
cannam@85 6544
cannam@85 6545 # This program is distributed in the hope that it will be useful,
cannam@85 6546 # but WITHOUT ANY WARRANTY; without even the implied warranty of
cannam@85 6547 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
cannam@85 6548 # GNU General Public License for more details.
cannam@85 6549
cannam@85 6550 # You should have received a copy of the GNU General Public License
cannam@85 6551 # along with this program; if not, write to the Free Software
cannam@85 6552 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
cannam@85 6553 # 02111-1307, USA.
cannam@85 6554
cannam@85 6555 # serial 2
cannam@85 6556
cannam@85 6557 # AM_MAKE_INCLUDE()
cannam@85 6558 # -----------------
cannam@85 6559 # Check to see how make treats includes.
cannam@85 6560 AC_DEFUN([AM_MAKE_INCLUDE],
cannam@85 6561 [am_make=${MAKE-make}
cannam@85 6562 cat > confinc << 'END'
cannam@85 6563 am__doit:
cannam@85 6564 @echo done
cannam@85 6565 .PHONY: am__doit
cannam@85 6566 END
cannam@85 6567 # If we don't find an include directive, just comment out the code.
cannam@85 6568 AC_MSG_CHECKING([for style of include used by $am_make])
cannam@85 6569 am__include="#"
cannam@85 6570 am__quote=
cannam@85 6571 _am_result=none
cannam@85 6572 # First try GNU make style include.
cannam@85 6573 echo "include confinc" > confmf
cannam@85 6574 # We grep out `Entering directory' and `Leaving directory'
cannam@85 6575 # messages which can occur if `w' ends up in MAKEFLAGS.
cannam@85 6576 # In particular we don't look at `^make:' because GNU make might
cannam@85 6577 # be invoked under some other name (usually "gmake"), in which
cannam@85 6578 # case it prints its new name instead of `make'.
cannam@85 6579 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
cannam@85 6580 am__include=include
cannam@85 6581 am__quote=
cannam@85 6582 _am_result=GNU
cannam@85 6583 fi
cannam@85 6584 # Now try BSD make style include.
cannam@85 6585 if test "$am__include" = "#"; then
cannam@85 6586 echo '.include "confinc"' > confmf
cannam@85 6587 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
cannam@85 6588 am__include=.include
cannam@85 6589 am__quote="\""
cannam@85 6590 _am_result=BSD
cannam@85 6591 fi
cannam@85 6592 fi
cannam@85 6593 AC_SUBST([am__include])
cannam@85 6594 AC_SUBST([am__quote])
cannam@85 6595 AC_MSG_RESULT([$_am_result])
cannam@85 6596 rm -f confinc confmf
cannam@85 6597 ])
cannam@85 6598
cannam@85 6599 # -*- Autoconf -*-
cannam@85 6600
cannam@85 6601
cannam@85 6602 # Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
cannam@85 6603
cannam@85 6604 # This program is free software; you can redistribute it and/or modify
cannam@85 6605 # it under the terms of the GNU General Public License as published by
cannam@85 6606 # the Free Software Foundation; either version 2, or (at your option)
cannam@85 6607 # any later version.
cannam@85 6608
cannam@85 6609 # This program is distributed in the hope that it will be useful,
cannam@85 6610 # but WITHOUT ANY WARRANTY; without even the implied warranty of
cannam@85 6611 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
cannam@85 6612 # GNU General Public License for more details.
cannam@85 6613
cannam@85 6614 # You should have received a copy of the GNU General Public License
cannam@85 6615 # along with this program; if not, write to the Free Software
cannam@85 6616 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
cannam@85 6617 # 02111-1307, USA.
cannam@85 6618
cannam@85 6619 # serial 3
cannam@85 6620
cannam@85 6621 # AM_MISSING_PROG(NAME, PROGRAM)
cannam@85 6622 # ------------------------------
cannam@85 6623 AC_DEFUN([AM_MISSING_PROG],
cannam@85 6624 [AC_REQUIRE([AM_MISSING_HAS_RUN])
cannam@85 6625 $1=${$1-"${am_missing_run}$2"}
cannam@85 6626 AC_SUBST($1)])
cannam@85 6627
cannam@85 6628
cannam@85 6629 # AM_MISSING_HAS_RUN
cannam@85 6630 # ------------------
cannam@85 6631 # Define MISSING if not defined so far and test if it supports --run.
cannam@85 6632 # If it does, set am_missing_run to use it, otherwise, to nothing.
cannam@85 6633 AC_DEFUN([AM_MISSING_HAS_RUN],
cannam@85 6634 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
cannam@85 6635 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
cannam@85 6636 # Use eval to expand $SHELL
cannam@85 6637 if eval "$MISSING --run true"; then
cannam@85 6638 am_missing_run="$MISSING --run "
cannam@85 6639 else
cannam@85 6640 am_missing_run=
cannam@85 6641 AC_MSG_WARN([`missing' script is too old or missing])
cannam@85 6642 fi
cannam@85 6643 ])
cannam@85 6644
cannam@85 6645 # AM_PROG_MKDIR_P
cannam@85 6646 # ---------------
cannam@85 6647 # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
cannam@85 6648
cannam@85 6649 # Copyright (C) 2003, 2004 Free Software Foundation, Inc.
cannam@85 6650
cannam@85 6651 # This program is free software; you can redistribute it and/or modify
cannam@85 6652 # it under the terms of the GNU General Public License as published by
cannam@85 6653 # the Free Software Foundation; either version 2, or (at your option)
cannam@85 6654 # any later version.
cannam@85 6655
cannam@85 6656 # This program is distributed in the hope that it will be useful,
cannam@85 6657 # but WITHOUT ANY WARRANTY; without even the implied warranty of
cannam@85 6658 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
cannam@85 6659 # GNU General Public License for more details.
cannam@85 6660
cannam@85 6661 # You should have received a copy of the GNU General Public License
cannam@85 6662 # along with this program; if not, write to the Free Software
cannam@85 6663 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
cannam@85 6664 # 02111-1307, USA.
cannam@85 6665
cannam@85 6666 # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
cannam@85 6667 # created by `make install' are always world readable, even if the
cannam@85 6668 # installer happens to have an overly restrictive umask (e.g. 077).
cannam@85 6669 # This was a mistake. There are at least two reasons why we must not
cannam@85 6670 # use `-m 0755':
cannam@85 6671 # - it causes special bits like SGID to be ignored,
cannam@85 6672 # - it may be too restrictive (some setups expect 775 directories).
cannam@85 6673 #
cannam@85 6674 # Do not use -m 0755 and let people choose whatever they expect by
cannam@85 6675 # setting umask.
cannam@85 6676 AC_DEFUN([AM_PROG_MKDIR_P],
cannam@85 6677 [if mkdir -p -- . 2>/dev/null; then
cannam@85 6678 # Keeping the `.' argument allows $(mkdir_p) to be used without
cannam@85 6679 # argument. Indeed, we sometimes output rules like
cannam@85 6680 # $(mkdir_p) $(somedir)
cannam@85 6681 # where $(somedir) is conditionally defined.
cannam@85 6682 # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more
cannam@85 6683 # expensive solution, as it forces Make to start a sub-shell.)
cannam@85 6684 mkdir_p='mkdir -p -- .'
cannam@85 6685 else
cannam@85 6686 # On NextStep and OpenStep, the `mkdir' command does not
cannam@85 6687 # recognize any option. It will interpret all options as
cannam@85 6688 # directories to create, and then abort because `.' already
cannam@85 6689 # exists.
cannam@85 6690 for d in ./-p ./--;
cannam@85 6691 do
cannam@85 6692 test -d $d && rmdir $d
cannam@85 6693 done
cannam@85 6694 # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
cannam@85 6695 if test -f "$ac_aux_dir/mkinstalldirs"; then
cannam@85 6696 mkdir_p='$(mkinstalldirs)'
cannam@85 6697 else
cannam@85 6698 mkdir_p='$(install_sh) -d'
cannam@85 6699 fi
cannam@85 6700 fi
cannam@85 6701 AC_SUBST([mkdir_p])])
cannam@85 6702
cannam@85 6703 # Helper functions for option handling. -*- Autoconf -*-
cannam@85 6704
cannam@85 6705 # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
cannam@85 6706
cannam@85 6707 # This program is free software; you can redistribute it and/or modify
cannam@85 6708 # it under the terms of the GNU General Public License as published by
cannam@85 6709 # the Free Software Foundation; either version 2, or (at your option)
cannam@85 6710 # any later version.
cannam@85 6711
cannam@85 6712 # This program is distributed in the hope that it will be useful,
cannam@85 6713 # but WITHOUT ANY WARRANTY; without even the implied warranty of
cannam@85 6714 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
cannam@85 6715 # GNU General Public License for more details.
cannam@85 6716
cannam@85 6717 # You should have received a copy of the GNU General Public License
cannam@85 6718 # along with this program; if not, write to the Free Software
cannam@85 6719 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
cannam@85 6720 # 02111-1307, USA.
cannam@85 6721
cannam@85 6722 # serial 2
cannam@85 6723
cannam@85 6724 # _AM_MANGLE_OPTION(NAME)
cannam@85 6725 # -----------------------
cannam@85 6726 AC_DEFUN([_AM_MANGLE_OPTION],
cannam@85 6727 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
cannam@85 6728
cannam@85 6729 # _AM_SET_OPTION(NAME)
cannam@85 6730 # ------------------------------
cannam@85 6731 # Set option NAME. Presently that only means defining a flag for this option.
cannam@85 6732 AC_DEFUN([_AM_SET_OPTION],
cannam@85 6733 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
cannam@85 6734
cannam@85 6735 # _AM_SET_OPTIONS(OPTIONS)
cannam@85 6736 # ----------------------------------
cannam@85 6737 # OPTIONS is a space-separated list of Automake options.
cannam@85 6738 AC_DEFUN([_AM_SET_OPTIONS],
cannam@85 6739 [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
cannam@85 6740
cannam@85 6741 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
cannam@85 6742 # -------------------------------------------
cannam@85 6743 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
cannam@85 6744 AC_DEFUN([_AM_IF_OPTION],
cannam@85 6745 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
cannam@85 6746
cannam@85 6747 #
cannam@85 6748 # Check to make sure that the build environment is sane.
cannam@85 6749 #
cannam@85 6750
cannam@85 6751 # Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
cannam@85 6752
cannam@85 6753 # This program is free software; you can redistribute it and/or modify
cannam@85 6754 # it under the terms of the GNU General Public License as published by
cannam@85 6755 # the Free Software Foundation; either version 2, or (at your option)
cannam@85 6756 # any later version.
cannam@85 6757
cannam@85 6758 # This program is distributed in the hope that it will be useful,
cannam@85 6759 # but WITHOUT ANY WARRANTY; without even the implied warranty of
cannam@85 6760 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
cannam@85 6761 # GNU General Public License for more details.
cannam@85 6762
cannam@85 6763 # You should have received a copy of the GNU General Public License
cannam@85 6764 # along with this program; if not, write to the Free Software
cannam@85 6765 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
cannam@85 6766 # 02111-1307, USA.
cannam@85 6767
cannam@85 6768 # serial 3
cannam@85 6769
cannam@85 6770 # AM_SANITY_CHECK
cannam@85 6771 # ---------------
cannam@85 6772 AC_DEFUN([AM_SANITY_CHECK],
cannam@85 6773 [AC_MSG_CHECKING([whether build environment is sane])
cannam@85 6774 # Just in case
cannam@85 6775 sleep 1
cannam@85 6776 echo timestamp > conftest.file
cannam@85 6777 # Do `set' in a subshell so we don't clobber the current shell's
cannam@85 6778 # arguments. Must try -L first in case configure is actually a
cannam@85 6779 # symlink; some systems play weird games with the mod time of symlinks
cannam@85 6780 # (eg FreeBSD returns the mod time of the symlink's containing
cannam@85 6781 # directory).
cannam@85 6782 if (
cannam@85 6783 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
cannam@85 6784 if test "$[*]" = "X"; then
cannam@85 6785 # -L didn't work.
cannam@85 6786 set X `ls -t $srcdir/configure conftest.file`
cannam@85 6787 fi
cannam@85 6788 rm -f conftest.file
cannam@85 6789 if test "$[*]" != "X $srcdir/configure conftest.file" \
cannam@85 6790 && test "$[*]" != "X conftest.file $srcdir/configure"; then
cannam@85 6791
cannam@85 6792 # If neither matched, then we have a broken ls. This can happen
cannam@85 6793 # if, for instance, CONFIG_SHELL is bash and it inherits a
cannam@85 6794 # broken ls alias from the environment. This has actually
cannam@85 6795 # happened. Such a system could not be considered "sane".
cannam@85 6796 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
cannam@85 6797 alias in your environment])
cannam@85 6798 fi
cannam@85 6799
cannam@85 6800 test "$[2]" = conftest.file
cannam@85 6801 )
cannam@85 6802 then
cannam@85 6803 # Ok.
cannam@85 6804 :
cannam@85 6805 else
cannam@85 6806 AC_MSG_ERROR([newly created file is older than distributed files!
cannam@85 6807 Check your system clock])
cannam@85 6808 fi
cannam@85 6809 AC_MSG_RESULT(yes)])
cannam@85 6810
cannam@85 6811 # AM_PROG_INSTALL_STRIP
cannam@85 6812
cannam@85 6813 # Copyright (C) 2001, 2003 Free Software Foundation, Inc.
cannam@85 6814
cannam@85 6815 # This program is free software; you can redistribute it and/or modify
cannam@85 6816 # it under the terms of the GNU General Public License as published by
cannam@85 6817 # the Free Software Foundation; either version 2, or (at your option)
cannam@85 6818 # any later version.
cannam@85 6819
cannam@85 6820 # This program is distributed in the hope that it will be useful,
cannam@85 6821 # but WITHOUT ANY WARRANTY; without even the implied warranty of
cannam@85 6822 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
cannam@85 6823 # GNU General Public License for more details.
cannam@85 6824
cannam@85 6825 # You should have received a copy of the GNU General Public License
cannam@85 6826 # along with this program; if not, write to the Free Software
cannam@85 6827 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
cannam@85 6828 # 02111-1307, USA.
cannam@85 6829
cannam@85 6830 # One issue with vendor `install' (even GNU) is that you can't
cannam@85 6831 # specify the program used to strip binaries. This is especially
cannam@85 6832 # annoying in cross-compiling environments, where the build's strip
cannam@85 6833 # is unlikely to handle the host's binaries.
cannam@85 6834 # Fortunately install-sh will honor a STRIPPROG variable, so we
cannam@85 6835 # always use install-sh in `make install-strip', and initialize
cannam@85 6836 # STRIPPROG with the value of the STRIP variable (set by the user).
cannam@85 6837 AC_DEFUN([AM_PROG_INSTALL_STRIP],
cannam@85 6838 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
cannam@85 6839 # Installed binaries are usually stripped using `strip' when the user
cannam@85 6840 # run `make install-strip'. However `strip' might not be the right
cannam@85 6841 # tool to use in cross-compilation environments, therefore Automake
cannam@85 6842 # will honor the `STRIP' environment variable to overrule this program.
cannam@85 6843 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
cannam@85 6844 if test "$cross_compiling" != no; then
cannam@85 6845 AC_CHECK_TOOL([STRIP], [strip], :)
cannam@85 6846 fi
cannam@85 6847 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
cannam@85 6848 AC_SUBST([INSTALL_STRIP_PROGRAM])])
cannam@85 6849