5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# ltconfig - Create a system-specific libtool.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Copyright (C) 1996-1999 Free Software Foundation, Inc.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# This file is free software; you can redistribute it and/or modify it
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# under the terms of the GNU General Public License as published by
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# the Free Software Foundation; either version 2 of the License, or
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# (at your option) any later version.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# This program is distributed in the hope that it will be useful, but
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# WITHOUT ANY WARRANTY; without even the implied warranty of
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# General Public License for more details.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# You should have received a copy of the GNU General Public License
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# along with this program; if not, write to the Free Software
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# As a special exception to the GNU General Public License, if you
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# distribute this file as part of a program that contains a
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# configuration script generated by Autoconf, you may include it under
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# the same distribution terms that you use for the rest of that program.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# A lot of this script is taken from autoconf-2.10.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Check that we are running under the correct shell.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # Discard the --no-reexec flag, and continue.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # Avoid inline document here, it may be left over
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewselif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # Yippee, $echo works!
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # Restart under the correct shell.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # used as fallback echo
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Find the correct PATH separator. Usually this is `:', but
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# DJGPP uses `;' like DOS.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# The HP-UX ksh and POSIX shell print the target directory to stdout
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# if CDPATH is set.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsif test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsif test "X${echo_test_string+set}" != Xset; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # find a string as large as possible, as long as the shell can cope with it
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews if (echo_test_string="`eval $cmd`") 2>/dev/null &&
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsif test "X`($echo '\t') 2>/dev/null`" != 'X\t' ||
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews test "X`($echo "$echo_test_string") 2>/dev/null`" != X"$echo_test_string"; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # The Solaris, AIX, and Digital Unix default echo programs unquote
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # backslashes. This makes it impossible to quote backslashes using
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # echo "$something" | sed 's/\\/\\\\/g'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # So, first we look for a working echo in the user's PATH.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews test "X`($dir/echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # We didn't find a better echo, so look for alternatives.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews test "X`(print -r "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # This shell has a builtin print -r that does the trick.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews echo='print -r'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # If we have ksh, try running ltconfig again with it.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews ORIGINAL_CONFIG_SHELL="${CONFIG_SHELL-/bin/sh}"
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews exec "$CONFIG_SHELL" "$0" --no-reexec ${1+"$@"}
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # Try using printf.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews echo='printf "%s\n"'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews test "X`($echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # Cool, printf works
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews elif test "X`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null`" = 'X\t' &&
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews test "X`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews echo="$CONFIG_SHELL $0 --fallback-echo"
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews elif test "X`("$CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null`" = 'X\t' &&
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews test "X`("$CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews echo="$CONFIG_SHELL $0 --fallback-echo"
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # maybe with a smaller string...
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # Oops. We lost completely, so just stick with echo.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Sed substitution that helps us do robust quoting. It backslashifies
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# metacharacters that are still active within double-quoted strings.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Same as above, but do not quote variable references.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Sed substitution to delay expansion of an escaped shell variable in a
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# double_quote_subst'ed string.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# The name of this program.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewshelp="Try \`$progname --help' for more information."
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Global variables:
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# All known linkers require a `.a' archive for static linking (except M$VC,
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# which needs '.lib').
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Parse the command line options.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews -*=*) optarg=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # If the previous option needs an argument, assign it.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews if test -n "$prev"; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews eval "$prev=\$option"
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsUsage: $progname [OPTION]... [HOST [LTMAIN]]
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsGenerate a system-specific libtool script.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews --debug enable verbose shell tracing
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews --disable-shared do not build shared libraries
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews --disable-static do not build static libraries
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews --disable-fast-install do not optimize for fast installation
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews --enable-dlopen enable dlopen support
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews --enable-win32-dll enable building dlls on win32 hosts
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews --help display this help and exit
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews --no-verify do not verify that HOST is a valid host type
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews-o, --output=FILE specify the output file [default=$default_ofile]
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews --quiet same as \`--silent'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews --silent do not print informational messages
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews --srcdir=DIR find \`config.guess' in DIR
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews --version output version information and exit
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews --with-gcc assume that the GNU C compiler will be used
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews --with-gnu-ld assume that the C compiler uses the GNU linker
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews --disable-lock disable file locking
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews --cache-file=FILE configure cache file
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsLTMAIN is the \`ltmain.sh' shell script fragment or \`ltmain.c' program
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsthat provides basic libtool functionality.
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsHOST is the canonical host system name [default=guessed].
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews echo "$progname: enabling shell trace mode"
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews --disable-fast-install) enable_fast_install=no ;;
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews --version) echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"; exit 0 ;;
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews echo "$progname: unrecognized option \`$option'" 1>&2
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews if test -z "$ltmain"; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews elif test -z "$host"; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# This generates an unnecessary warning for sparc-sun-solaris4.1.3_U1
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# if test -n "`echo $option| sed 's/[-a-z0-9.]//g'`"; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# echo "$progname: warning \`$option' is not a valid host type" 1>&2
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsif test -z "$ltmain"; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews echo "$progname: you must specify a LTMAIN file" 1>&2
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsif test ! -f "$ltmain"; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews echo "$progname: \`$ltmain' does not exist" 1>&2
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Quote any args containing shell metacharacters.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# A relevant subset of AC_INIT.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# File descriptor usage:
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# 0 standard input
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# 1 file creation
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# 2 errors and warnings
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# 3 some systems may open it to /dev/tty
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# 4 used on the Kubota Titan
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# 5 compiler messages saved in config.log
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# 6 checking for... messages and results
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# NLS nuisances.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Only set LANG and LC_ALL to C if already set.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# These must not be set unconditionally because not all systems understand
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# e.g. LANG=C (notably SCO).
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsif test "X${LC_ALL+set}" = Xset; then LC_ALL=C; export LC_ALL; fi
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsif test "X${LANG+set}" = Xset; then LANG=C; export LANG; fi
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsif test -n "$cache_file" && test -r "$cache_file"; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews echo "loading cache $cache_file within ltconfig"
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsif (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsif test -z "$srcdir"; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # Assume the source directory is the same one as the path to LTMAIN.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews srcdir=`$echo "X$ltmain" | $Xsed -e 's%/[^/]*$%%'`
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # Check for config.guess and config.sub.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews if test -z "$ac_aux_dir"; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews echo "$progname: cannot find config.guess in $srcdir $srcdir/.. $srcdir/../.." 1>&2
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # Make sure we can run config.sub.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews if $SHELL $ac_config_sub sun4 >/dev/null 2>&1; then :
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews echo "$progname: cannot run $ac_config_sub" 1>&2
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews echo $ac_n "checking host system type""... $ac_c" 1>&6
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews if host_alias=`$SHELL $ac_config_guess`; then :
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews echo "$progname: cannot guess host type; you must specify one" 1>&2
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # Make sure the host verified.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewselif test -z "$host"; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews echo "$progname: you must specify a host type if you use \`--no-verify'" 1>&2
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewslinux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewshost_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewshost_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewshost_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # AIX sometimes has problems with the GCC collect2 program. For some
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # reason, if we set the COLLECT_NAMES environment variable, the problems
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # vanish in a puff of smoke.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Determine commands to create old-style static archives.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Set a sane default for `AR'.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Set a sane default for `OBJDUMP'.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# If RANLIB is not set, then run the test.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews if test -f $dir/ranlib || test -f $dir/ranlib$ac_exeext; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsif test -n "$RANLIB"; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Set sane defaults for `DLLTOOL', `OBJDUMP', and `AS', used on cygwin.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Check to see if we are using GCC.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsif test "$with_gcc" != yes || test -z "$CC"; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # If CC is not set, then try to find GCC or a usable CC.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews if test -z "$CC"; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews if test -f $dir/gcc || test -f $dir/gcc$ac_exeext; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews if test -n "$CC"; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # Not "gcc", so try "cc", rejecting "/usr/ucb/cc".
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews if test -z "$CC"; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews if test -f $dir/cc || test -f $dir/cc$ac_exeext; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # We found a bogon in the path, so make sure we never use it.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # We chose a different compiler from the bogus one.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # However, it has the same name, so the bogon will be chosen
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # first if we set CC to just the name; use the full file name.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews if test -n "$CC"; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews if test -z "$CC"; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews echo "$progname: error: no acceptable cc found in \$PATH" 1>&2
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # Now see if the compiler is really GCC.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews echo $ac_n "checking whether we are using GNU C... $ac_c" 1>&6
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews echo "$progname:581: checking whether we are using GNU C" >&5
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews#ifdef __GNUC__
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews if { ac_try='${CC-cc} -E conftest.c'; { (eval echo $progname:589: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Allow CC to be a program name with arguments.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsecho $ac_n "checking for object suffix... $ac_c" 1>&6
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsecho "$progname:603: checking for object suffix" >& 5
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsif { (eval echo $progname:604: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; }; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # Append any warnings to the config.log.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews *) objext=`echo $ac_file | sed -e s/conftest.//` ;;
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsecho $ac_n "checking for executable suffix... $ac_c" 1>&6
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsif eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews echo "$progname:629: checking for executable suffix" >& 5
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews if { (eval echo $progname:630: \"$ac_link\") 1>&5; (eval $ac_link) 2>conftest.err; }; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # Append any warnings to the config.log.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews *) ac_cv_exeext=.`echo $ac_file | sed -e s/conftest.//` ;;
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsecho $ac_n "checking for $compiler option to produce PIC... $ac_c" 1>&6
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # PIC is the default for these OSes.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # Below there is a dirty hack to force normal static linking with -ldl
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # The problem is because libdl dynamically linked with both libc and
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # libC (AIX C++ library), which obviously doesn't included in libraries
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # list by gcc. This cause undefined symbols with -static flags.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # This hack allows C programs to be linked with "-static -ldl", but
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # we not sure about C++ programs.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # We can build DLLs from non-PIC.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # FIXME: we need at least 68020 code to build shared libraries, but
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # adding the `-m68020' flag to GCC prevents building anything better,
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # like `-m68040'.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews pic_flag='-m68020 -resident32 -malways-restore-a4'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # PORTME Check for PIC flags for the system compiler.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # All AIX code is PIC.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # Is there a better link_static_flag that works with the bundled CC?
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # PIC (with -KPIC) is the default.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # We can build DLLs from non-PIC.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # All OSF/1 code is PIC.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsif test -n "$pic_flag"; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # Check to make sure the pic_flag actually works.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews echo $ac_n "checking if $compiler PIC flag $pic_flag works... $ac_c" 1>&6
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews echo "$progname:776: checking if $compiler PIC flag $pic_flag works" >&5
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews if { (eval echo $progname:777: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # Append any warnings to the config.log.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # On HP-UX, both CC and GCC only warn that PIC is supported... then they
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # create non-PIC objects. So, if there were any warnings, we assume that
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # PIC is not supported.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews if test -s conftest.err; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # Append any errors to the config.log.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Check to see if options -o and -c are simultaneously supported by compiler
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsecho $ac_n "checking if $compiler supports -c -o file.o... $ac_c" 1>&6
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# that will create temporary files in the current directory regardless of
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# the output directory. Thus, making CWD read-only will cause this test
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# to fail, enabling locking or at least warning the user not to do parallel
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsecho "$progname:829: checking if $compiler supports -c -o file.o" >&5
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsif { (eval echo $progname:830: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.o; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # The compiler can only warn and ignore the option if not recognized
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # So say no if there are warnings
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # Append any errors to the config.log.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # Check to see if we can write to a .lo
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews echo $ac_n "checking if $compiler supports -c -o file.lo... $ac_c" 1>&6
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews echo "$progname:862: checking if $compiler supports -c -o file.lo" >&5
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsif { (eval echo $progname:863: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.lo; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # The compiler can only warn and ignore the option if not recognized
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # So say no if there are warnings
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews if test -s conftest.err; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # Append any errors to the config.log.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Check to see if we can do hard links to lock some files if needed
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsif test "$compiler_c_o" = no && test "$need_locks" != no; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # do not overwrite the value of need_locks provided by the user
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews echo $ac_n "checking if we can lock with hard links... $ac_c" 1>&6
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews ln conftest.a conftest.b 2>/dev/null && hard_links=no
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews ln conftest.a conftest.b 2>/dev/null && hard_links=no
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews echo "*** WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions ... $ac_c" 1>&6
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.c"
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews echo "$progname:914: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews if { (eval echo $progname:915: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # The compiler can only warn and ignore the option if not recognized
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # So say no if there are warnings
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews if test -s conftest.err; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # Append any errors to the config.log.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews if test "$compiler_rtti_exceptions" = "yes"; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Check for any special shared library compilation flags.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews echo "$progname: warning: \`$CC' requires \`$special_shlib_compile_flags' to build shared libraries" 1>&2
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews if echo "$old_CC $old_CFLAGS " | egrep -e "[ ]$special_shlib_compile_flags[ ]" >/dev/null; then :
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews echo "$progname: add \`$special_shlib_compile_flags' to the CC or CFLAGS env variable and reconfigure" 1>&2
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsecho $ac_n "checking if $compiler static flag $link_static_flag works... $ac_c" 1>&6
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsecho "$progname:958: checking if $compiler static flag $link_static_flag works" >&5
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsif { (eval echo $progname:959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsif test -z "$LN_S"; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # Check to see if we can use ln -s, or we need hard links.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews echo $ac_n "checking whether ln -s works... $ac_c" 1>&6
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Make sure LD is an absolute path.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsif test -z "$LD"; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # Check if gcc -print-prog-name=ld gives a path.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews echo $ac_n "checking for ld used by GCC... $ac_c" 1>&6
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews echo "$progname:991: checking for ld used by GCC" >&5
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # Accept absolute paths.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews [\\/]* | [A-Za-z]:[\\/]*)
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # Canonicalize the path of ld
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # If it fails, then pretend we are not using GCC.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # If it is relative, then search for the first ld in PATH.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews echo "$progname:1018: checking for non-GNU ld" >&5
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews if test -z "$LD"; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # Check to see if the program is GNU ld. I'd rather use --version,
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # but apparently some GNU ld's only accept -v.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # Break only if it was the GNU/non-GNU ld that we prefer.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews if "$LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews if test -n "$LD"; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews if test -z "$LD"; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews echo "$progname: error: no acceptable ld found in \$PATH" 1>&2
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Check to see if it really is or is not GNU ld.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsecho $ac_n "checking if the linker ($LD) is GNU ld... $ac_c" 1>&6
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# I'd rather use --version here, but apparently some GNU ld's only accept -v.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsif $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# See if the linker supports building shared libraries.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsecho $ac_n "checking whether the linker ($LD) supports shared libraries... $ac_c" 1>&6
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# when you set need_version to no, make sure it does not cause -set_version
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# flags to be left without arguments
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsexport_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# include_expsyms should be a list of space-separated symbols to be *always*
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# included in the symbol list
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# exclude_expsyms can be an egrep regular expression of symbols to exclude
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# it will be wrapped by ` (' and `)$', so one must not match beginning or
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# as well as any symbol that contains `d'.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# platforms (ab)use it in PIC code, but their linkers get confused if
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# the symbol is explicitly referenced. Since portable code cannot
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# rely on this symbol name, it's probably fine to never include it in
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# preloaded symbol tables.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # FIXME: the MSVC++ port hasn't been tested in a loooong time
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # When not using gcc, we currently assume that we are using
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # Microsoft Visual C++.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # If archive_cmds runs LD, not CC, wlarc should be empty
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # See if GNU ld supports shared libraries.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # On AIX, the GNU linker is very broken
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews*** Warning: the GNU linker, at least up to release 2.9.1, is reported
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews*** to be unable to reliably create shared libraries on AIX.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews*** Therefore, libtool is disabling shared libraries support. If you
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews*** really care for shared libraries, you may want to modify your PATH
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews*** so that a non-GNU linker is found, and then restart.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews archive_cmds='$rm $objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data~$AR cru $lib $libobjs~$RANLIB $lib~(cd $objdir && a2ixlibrary -32)'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # that the semantics of dynamic libraries on AmigaOS, at least up
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # to version 4, is to share data among multiple programs linked
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # with the same dynamic library. Since this doesn't match the
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # behavior of shared libraries on other platforms, we can use
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # support --undefined. This deserves some investigation. FIXME
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews archive_cmds='$CC -nostart $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # hardcode_libdir_flag_spec is actually meaningless, as there is
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # no search path for DLLs.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # Extract the symbol export list from an `--export-all' def file,
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # then regenerate the def file from the symbol export list, so that
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # the compiled dll only exports the symbol export list.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # Be careful not to strip the DATA tag left by newer dlltools.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews export_symbols_cmds='test -f $objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews test -f $objdir/$soname-ltdll.$objext || (cd $objdir && $CC -c $soname-ltdll.c)~
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews $DLLTOOL --export-all --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --output-def $objdir/$soname-def $objdir/$soname-ltdll.$objext $libobjs $convenience~
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $objdir/$soname-def > $export_symbols'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # If DATA tags from a recent dlltool are present, honour them!
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews archive_expsym_cmds='echo EXPORTS > $objdir/$soname-def~
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews cat $export_symbols | while read symbol; do
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews set dummy \$symbol;
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews 2) echo " \$2 @ \$_lt_hint ; " >> $objdir/$soname-def;;
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews *) echo " \$2 @ \$_lt_hint \$3 ; " >> $objdir/$soname-def;;
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews _lt_hint=`expr 1 + \$_lt_hint`;
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews test -f $objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews test -f $objdir/$soname-ltdll.$objext || (cd $objdir && $CC -c $soname-ltdll.c)~
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews $CC -Wl,--base-file,$objdir/$soname-base -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews $DLLTOOL --as=$AS --dllname $soname --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews $CC -Wl,--base-file,$objdir/$soname-base $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews $DLLTOOL --as=$AS --dllname $soname --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews $CC $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews old_archive_from_new_cmds='$DLLTOOL --as=$AS --dllname $soname --def $objdir/$soname-def --output-lib $objdir/$libname.a'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews archive_cmds='$LD -Bshareable $libobjs $deplibs $linkopts -o $lib'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # can we support soname and/or expsyms with a.out? -oliva
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews*** Warning: The releases 2.8.* of the GNU linker cannot reliably
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews*** create shared libraries on Solaris systems. Therefore, libtool
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews*** is disabling shared libraries support. We urge you to upgrade GNU
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews*** binutils to release 2.9.1 or newer. Another option is to modify
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews*** your PATH or compiler configuration so that the native linker is
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews*** used, and then restart.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linkopts'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews export_dynamic_flag_spec='${wl}--export-dynamic'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # dlltool doesn't understand --whole-archive et. al.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # ancient GNU ld didn't support --whole-archive et. al.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # PORTME fill in a description of your system's linker (not GNU ld)
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews archive_expsym_cmds='$LD -o $objdir/$soname $libobjs $deplibs $linkopts -bE:$export_symbols -T512 -H512 -bM:SRE~$AR cru $lib $objdir/$soname'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # Note: this linker hardcodes the directories in LIBPATH if there
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # are no directories specified by -L.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews if test "$with_gcc" = yes && test -z "$link_static_flag"; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # Neither direct hardcoding nor static linking is supported with a
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # broken collect2.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews hardcode_libdir_flag_spec='${wl}-b ${wl}nolibpath ${wl}-b ${wl}libpath:$libdir:/usr/lib:/lib'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews if test -f "$collect2name" && \
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews strings "$collect2name" | grep resolve_lib_name >/dev/null
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # We have reworked collect2
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # We have old collect2
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # It fails to find uninstalled libraries when the uninstalled
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # path is not listed in the libpath. Setting hardcode_minus_L
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # to unsupported forces relinking
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews archive_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bexpall ${wl}-bnoentry${allow_undefined_flag}'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews archive_expsym_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # According to Greg Wooledge, -bexpall is only supported from AIX 4.2 on
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews archive_cmds='$rm $objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data~$AR cru $lib $libobjs~$RANLIB $lib~(cd $objdir && a2ixlibrary -32)'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # see comment about different semantics on the GNU ld section
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # When not using gcc, we currently assume that we are using
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # Microsoft Visual C++.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # hardcode_libdir_flag_spec is actually meaningless, as there is
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # no search path for DLLs.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # Tell ltmain to make .lib files, not .a files.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # FIXME: Setting linknames here is a bad hack.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews archive_cmds='$CC -o $lib $libobjs $linkopts `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # The linker will automatically build a .lib file if we build a DLL.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # FIXME: Should let the user specify the lib program.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # support. Future versions do this automatically, but an explicit c++rt0.o
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # does not break anything, and helps significantly (at the cost of a little
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # extra space).
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts /usr/lib/c++rt0.o'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews archive_cmds='$CC -shared -o $lib $libobjs $deplibs $linkopts'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews hpux9*) archive_cmds='$rm $objdir/$soname~$LD -b +b $install_libdir -o $objdir/$soname $libobjs $deplibs $linkopts~test $objdir/$soname = $lib || mv $objdir/$soname $lib' ;;
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linkopts' ;;
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews hardcode_minus_L=yes # Not in the search PATH, but as the default
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # location of the library.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews archive_cmds='$LD -shared $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts' # a.out
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linkopts' # ELF
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $objdir/$libname.def~$echo DATA >> $objdir/$libname.def~$echo " SINGLE NONSHARED" >> $objdir/$libname.def~$echo EXPORTS >> $objdir/$libname.def~emxexp $libobjs >> $objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $linkopts $objdir/$libname.def'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews old_archive_from_new_cmds='emximp -o $objdir/$libname.a $objdir/$libname.def'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews osf4* | osf5*) # As osf3* with the addition of the -msym flag
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $linkopts ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linkopts -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews archive_cmds='$CC -bundle -undefined suppress -o $lib $libobjs $deplibs $linkopts'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # $CC -shared without GNU ld will not create a library from C++
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # object files and a static libstdc++, better avoid it by now
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linkopts'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linkopts~$rm $lib.exp'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews *) # Supported since Solaris 2.6 (maybe 2.5.1?)
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linkopts'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # Use $CC to link under sequent, because it throws in some extra .o
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # files that make .init and .fini sections work.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $linkopts'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews hardcode_direct=no #Motorola manual says yes, but my tests say they lie
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # $CC -shared without GNU ld will not create a library from C++
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # object files and a static libstdc++, better avoid it by now
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linkopts'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linkopts~$rm $lib.exp'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews archive_cmds='$LD -G -o $lib $libobjs $deplibs $linkopts'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsif test -z "$NM"; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews echo $ac_n "checking for BSD-compatible nm... $ac_c" 1>&6
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews [\\/]* | [A-Za-z]:[\\/]*) ;; # Let the user override the test with a path.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews for ac_dir in $PATH /usr/ucb /usr/ccs/bin /bin; do
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # Check to see if the nm accepts a BSD-compat flag.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # Adding the `sed 1q' prevents false positives on HP-UX, which says:
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # nm: unknown option "B" ignored
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews NM=${NM="$ac_dir/nm"} # keep the first match, but
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews continue # so that we can try to find one that supports BSD flags
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Check for command to grab the raw symbol name followed by C symbol from nm.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsecho $ac_n "checking command to parse $NM output... $ac_c" 1>&6
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# These are sane defaults that work on at least a few old systems.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# [They come from Ultrix. What could be older than Ultrix?!! ;)]
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Character class describing NM global symbol codes.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Regexp to match symbols that can be accessed directly from C.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Transform the above into a raw symbol and a C symbol.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Transform an extracted symbol line into a proper C declaration
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsglobal_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Define system-specific variables.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewshpux*) # Its linker distinguishes data from code symbols
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^. .* \(.*\)$/extern char \1;/p'"
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# If we're using GNU nm, then use its standard symbol codes.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsif $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Try without a prefix undercore, then with it.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # Write the raw and C identifiers.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode\)[ ][ ]*\($ac_symprfx\)$sympat$/$symxfrm/p'"
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # Check to see that the pipe works correctly.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews#ifdef __cplusplus
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewschar nm_test_var;
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsvoid nm_test_func(){}
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews#ifdef __cplusplus
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsmain(){nm_test_var='a';nm_test_func();return(0);}
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews echo "$progname:1653: checking if global_symbol_pipe works" >&5
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews if { (eval echo $progname:1654: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # Now try to grab the symbols.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews if { echo "$progname:1657: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # Try sorting and uniquifying the output.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # Make sure that we snagged all the symbols we need.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews if egrep ' nm_test_var$' "$nlist" >/dev/null; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews if egrep ' nm_test_func$' "$nlist" >/dev/null; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews#ifdef __cplusplus
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # Now generate the symbol file.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews eval "$global_symbol_to_cdecl"' < "$nlist" >> conftest.c'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews#if defined (__STDC__) && __STDC__
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# define lt_ptr_t void *
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# define lt_ptr_t char *
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# define const
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews/* The mapping between symbol names and symbols. */
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsconst struct {
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews const char *name;
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews lt_ptr_t address;
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewslt_preloaded_symbols[] =
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews sed 's/^. \(.*\) \(.*\)$/ {"\2", (lt_ptr_t) \&\2},/' < "$nlist" >> conftest.c
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews#ifdef __cplusplus
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # Now try linking the two files.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews if { (eval echo $progname:1709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # Do not use the global_symbol_pipe unless it works.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsif test -z "$global_symbol_pipe"; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Check hardcoding attributes.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsecho $ac_n "checking how to hardcode library paths into programs... $ac_c" 1>&6
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews test -n "$runpath_var"; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # We can hardcode non-existant directories.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # If the only mechanism to avoid hardcoding is shlibpath_var, we
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # have to relink, otherwise we might link with an installed library
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # when we should be linking with a yet-to-be-installed one
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews ## test "$hardcode_shlibpath_var" != no &&
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # Linking always hardcodes the temporary library directory.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # We can link without hardcoding, and we can hardcode nonexisting dirs.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # We cannot hardcode anything, or else we can only hardcode existing
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # directories.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsreload_cmds='$LD$reload_flag -o $output$reload_objs'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsecho $ac_n "checking for $LD option to reload object files... $ac_c" 1>&6
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# PORTME Some linkers may need a different reload flag.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewstest -n "$reload_flag" && reload_flag=" $reload_flag"
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# PORTME Fill in your ld.so characteristics
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewssys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Need to set the preceding variable on all platforms that support
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# interlibrary dependencies.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# 'none' -- dependencies not supported.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# `unknown' -- same as none, but documents that we really don't know.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# 'pass_all' -- all dependencies passed with no checks.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# 'test_compile' -- check by making test program.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# 'file_magic [regex]' -- check by looking for files in library path
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# which responds to the $file_magic_cmd with a given egrep regex.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# If you have `file' or equivalent on your system and you're not sure
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# whether `pass_all' will *always* work, you probably want this one.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsecho $ac_n "checking dynamic linker characteristics... $ac_c" 1>&6
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews library_names_spec='${libname}${release}.so$versuffix $libname.a'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # AIX has no versioning support, so we append a major version to the name.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # AIX has no versioning support, so currently we can not hardcode correct
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # soname into executable. Probably we can add versioning support to
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # collect2, so additional links can be useful in future.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # We preserve .a as extension for shared libraries though AIX4.2
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # and later linker supports .so
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.a'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews library_names_spec='$libname.ixlibrary $libname.a'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # Create ${libname}_ixlibrary.a entries in /sys/libs.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews 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'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # the default ld.so.conf also contains /usr/contrib/lib and
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # libtool to hard-code these into programs
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.a'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # FIXME: first we should search . and the directory the executable is in
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews freebsd2* | freebsd3.[01]* | freebsdelf3.[01]*)
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews *) # from 3.2 on
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # Give a soname corresponding to the major version so that dld.sl refuses to
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # link against other versions.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # HP-UX runs *really* slowly unless shared libraries are mode 555.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # TODO: Does this work for hpux-11 too?
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major ${libname}${release}.so $libname.so'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # this will be overridden with pass_all, but let us keep it just in case
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews case "$LD" in # libtool.m4 will add one of these switches to LD
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews file_magic_test_file=`echo /lib${libsuff}/libc.so*`
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# No shared lib support for Linux oldld, aout, or coff.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewslinux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# This must be Linux ELF.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # Only the GNU ld.so supports shared libraries on MkLinux.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # this will be overridden with pass_all, but let us keep it just in case
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews deplibs_check_method='file_magic COFF format alpha shared library'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # ldd complains unless libraries are executable
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews deplibs_check_method="file_magic ELF [0-9][0-9]-bit [LM]SB dynamic lib"
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews 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]'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewstest "$dynamic_linker" = no && can_build_shared=no
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Report the final consequences.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsecho "checking if libtool supports shared libraries... $can_build_shared" 1>&6
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Only try to build win32 dlls if AC_LIBTOOL_WIN32_DLL was used in
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# configure.in, otherwise build static only libraries.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews test x$enable_win32_dll = xno && can_build_shared=no
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews echo "checking if package supports dlls... $can_build_shared" 1>&6
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsif test -n "$file_magic_test_file" && test -n "$file_magic_cmd"; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews "file_magic "*)
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews*** Warning: the command libtool uses to detect shared libraries,
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews*** $file_magic_cmd, produces output that libtool cannot recognize.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews*** The result is that libtool may fail to recognize shared libraries
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews*** as such. This will affect the creation of libtool libraries that
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews*** depend on shared libraries, but programs linked with such libtool
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews*** libraries will work regardless of this problem. Nevertheless, you
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews*** may want to report the problem to your system manager and/or to
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews*** bug-libtool@gnu.org
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsecho $ac_n "checking whether to build shared libraries... $ac_c" 1>&6
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewstest "$can_build_shared" = "no" && enable_shared=no
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# On AIX, shared libraries and static libraries use the same namespace, and
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# are all built from PIC.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews test "$enable_shared" = yes && enable_static=no
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews if test -n "$RANLIB"; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews test "$enable_shared" = yes && enable_static=no
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Make sure either enable_shared or enable_static is yes.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewstest "$enable_shared" = yes || enable_static=yes
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsecho "checking whether to build static libraries... $enable_static" 1>&6
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # Fast installation is not supported
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewselif test "$shlibpath_overrides_runpath" = yes ||
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # Fast installation is not necessary
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsif test -d .libs; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # MS-DOS does not allow filenames that begin with a dot.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsif eval "test \"`echo '$''{'lt_cv_dlopen'+set}'`\" != set"; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsecho $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsecho "$progname:2248: checking for dlopen in -ldl" >&5
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsif eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews#line 2256 "ltconfig"
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews/* Override any gcc2 internal prototype to avoid an error. */
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews/* We use char because int might match the return type of a gcc2
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews builtin and then its argument prototype would still apply. */
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews#ifdef __cplusplus
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewschar dlopen();
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews; return 0; }
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsif { (eval echo $progname:2269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews eval "ac_cv_lib_$ac_lib_var=yes"
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews eval "ac_cv_lib_$ac_lib_var=no"
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsecho $ac_n "checking for dlopen""... $ac_c" 1>&6
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsif eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews#line 2293 "ltconfig"
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews/* System header to define __stub macros and hopefully few prototypes,
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews which can conflict with char dlopen(); below. */
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews#include <assert.h>
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews/* Override any gcc2 internal prototype to avoid an error. */
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews/* We use char because int might match the return type of a gcc2
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews builtin and then its argument prototype would still apply. */
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews#ifdef __cplusplus
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewschar dlopen();
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews/* The GNU C library defines this for functions which it implements
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews to always fail with ENOSYS. Some functions are actually named
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews something starting with __ and the normal name is an alias. */
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews#if defined (__stub_dlopen) || defined (__stub___dlopen)
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews; return 0; }
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsif { (eval echo $progname:2318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews eval "ac_cv_func_dlopen=yes"
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews eval "ac_cv_func_dlopen=no"
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsif eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsecho $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsecho "$progname:2335: checking for dld_link in -ldld" >&5
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsac_lib_var=`echo dld'_'dld_link | sed 'y%./+-%__p_%'`
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsif eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews#line 2343 "ltconfig"
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews/* Override any gcc2 internal prototype to avoid an error. */
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews/* We use char because int might match the return type of a gcc2
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews builtin and then its argument prototype would still apply. */
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews#ifdef __cplusplus
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewschar dld_link();
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews; return 0; }
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsif { (eval echo $progname:2356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews eval "ac_cv_lib_$ac_lib_var=yes"
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews eval "ac_cv_lib_$ac_lib_var=no"
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsecho $ac_n "checking for shl_load""... $ac_c" 1>&6
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsecho "$progname:2375: checking for shl_load" >&5
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsif eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews#line 2380 "ltconfig"
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews/* System header to define __stub macros and hopefully few prototypes,
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews which can conflict with char shl_load(); below. */
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews#include <assert.h>
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews/* Override any gcc2 internal prototype to avoid an error. */
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews/* We use char because int might match the return type of a gcc2
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews builtin and then its argument prototype would still apply. */
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews#ifdef __cplusplus
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewschar shl_load();
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews/* The GNU C library defines this for functions which it implements
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews to always fail with ENOSYS. Some functions are actually named
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews something starting with __ and the normal name is an alias. */
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews#if defined (__stub_shl_load) || defined (__stub___shl_load)
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews; return 0; }
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsif { (eval echo $progname:2405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews eval "ac_cv_func_shl_load=yes"
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews eval "ac_cv_func_shl_load=no"
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsif eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsecho $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsecho "$progname:2423: checking for shl_load in -ldld" >&5
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsif eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews#line 2431 "ltconfig"
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews#include "confdefs.h"
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews/* Override any gcc2 internal prototype to avoid an error. */
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews/* We use char because int might match the return type of a gcc2
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews builtin and then its argument prototype would still apply. */
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews#ifdef __cplusplus
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewschar shl_load();
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews; return 0; }
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsif { (eval echo $progname:2445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews eval "ac_cv_lib_$ac_lib_var=yes"
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews eval "ac_cv_lib_$ac_lib_var=no"
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews#line 2493 "ltconfig"
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews#include <$ac_hdr>
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsint fnord = 0;
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews{ (eval echo $progname:2498: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsif test -z "$ac_err"; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews eval "ac_cv_header_$ac_safe=yes"
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews eval "ac_cv_header_$ac_safe=no"
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsecho "$progname:2526: checking whether a program can dlopen itself" >&5
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsif test "${lt_cv_dlopen_self+set}" = set; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews#line 2534 "ltconfig"
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews#if HAVE_DLFCN_H
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews#include <dlfcn.h>
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews#include <stdio.h>
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews#ifdef RTLD_GLOBAL
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# define LTDL_GLOBAL RTLD_GLOBAL
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# ifdef DL_GLOBAL
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# define LTDL_GLOBAL DL_GLOBAL
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# define LTDL_GLOBAL 0
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews/* We may have to define LTDL_LAZY_OR_NOW in the command line if we
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews find out it does not work in some platform. */
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews#ifndef LTDL_LAZY_OR_NOW
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# ifdef RTLD_LAZY
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# define LTDL_LAZY_OR_NOW RTLD_LAZY
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# ifdef DL_LAZY
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# define LTDL_LAZY_OR_NOW DL_LAZY
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# ifdef RTLD_NOW
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# define LTDL_LAZY_OR_NOW RTLD_NOW
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# ifdef DL_NOW
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# define LTDL_LAZY_OR_NOW DL_NOW
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# define LTDL_LAZY_OR_NOW 0
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsfnord() { int i=42;}
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsmain() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); }
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsif { (eval echo $progname:2580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsecho "$progname:2599: checking whether a statically linked program can dlopen itself" >&5
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsif test "${lt_cv_dlopen_self_static+set}" = set; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews#line 2607 "ltconfig"
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews#if HAVE_DLFCN_H
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews#include <dlfcn.h>
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews#include <stdio.h>
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews#ifdef RTLD_GLOBAL
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# define LTDL_GLOBAL RTLD_GLOBAL
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# ifdef DL_GLOBAL
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# define LTDL_GLOBAL DL_GLOBAL
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# define LTDL_GLOBAL 0
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews/* We may have to define LTDL_LAZY_OR_NOW in the command line if we
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews find out it does not work in some platform. */
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews#ifndef LTDL_LAZY_OR_NOW
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# ifdef RTLD_LAZY
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# define LTDL_LAZY_OR_NOW RTLD_LAZY
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# ifdef DL_LAZY
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# define LTDL_LAZY_OR_NOW DL_LAZY
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# ifdef RTLD_NOW
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# define LTDL_LAZY_OR_NOW RTLD_NOW
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# ifdef DL_NOW
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# define LTDL_LAZY_OR_NOW DL_NOW
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# define LTDL_LAZY_OR_NOW 0
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsfnord() { int i=42;}
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsmain() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); }
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsif { (eval echo $progname:2653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Copy echo and quote the copy, instead of the original, because it is
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# used later.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsif test "X$ltecho" = "X$CONFIG_SHELL $0 --fallback-echo"; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Only quote variables if we're using ltmain.sh.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # Now quote all the things that may contain metacharacters.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews for var in ltecho old_CC old_CFLAGS old_CPPFLAGS \
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews old_NM old_RANLIB old_LN_S old_DLLTOOL old_OBJDUMP old_AS \
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews thread_safe_flag_spec whole_archive_flag_spec libname_spec \
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds postuninstall_cmds \
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews file_magic_cmd export_symbols_cmds deplibs_check_method allow_undefined_flag no_undefined_flag \
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews hardcode_libdir_flag_spec hardcode_libdir_separator \
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews old_postinstall_cmds | old_postuninstall_cmds | \
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # Double-quote double-evaled strings.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews *'\$0 --fallback-echo"')
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews ltecho=`$echo "X$ltecho" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews echo "creating $ofile"
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# NOTE: Changes made to this file will be lost: look at ltconfig or ltmain.sh.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Copyright (C) 1996-1999 Free Software Foundation, Inc.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# This program is free software; you can redistribute it and/or modify
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# it under the terms of the GNU General Public License as published by
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# the Free Software Foundation; either version 2 of the License, or
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# (at your option) any later version.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# This program is distributed in the hope that it will be useful, but
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# WITHOUT ANY WARRANTY; without even the implied warranty of
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# General Public License for more details.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# You should have received a copy of the GNU General Public License
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# along with this program; if not, write to the Free Software
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# As a special exception to the GNU General Public License, if you
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# distribute this file as part of a program that contains a
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# configuration script generated by Autoconf, you may include it under
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# the same distribution terms that you use for the rest of that program.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Sed that helps us avoid accidentally triggering echo(1) options like -n.
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsXsed="sed -e s/^X//"
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# The HP-UX ksh and POSIX shell print the target directory to stdout
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# if CDPATH is set.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsif test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews### BEGIN LIBTOOL CONFIG
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # Double-quote the variables that need it (for aesthetics).
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews old_NM old_RANLIB old_LN_S old_DLLTOOL old_OBJDUMP old_AS; do
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews eval "$var=\\\"\$var\\\""
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # Just create a config file.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews echo "creating $cfgfile"
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# `$echo "$cfgfile" | sed 's%^.*/%%'` - Libtool configuration file.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Libtool was configured as follows, on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# CC=$old_CC CFLAGS=$old_CFLAGS CPPFLAGS=$old_CPPFLAGS \\
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# LD=$old_LD LDFLAGS=$old_LDFLAGS LIBS=$old_LIBS \\
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# NM=$old_NM RANLIB=$old_RANLIB LN_S=$old_LN_S \\
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# DLLTOOL=$old_DLLTOOL OBJDUMP=$old_OBJDUMP AS=$old_AS \\
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# $0$ltconfig_args
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Compiler and other test output produced by $progname, useful for
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# debugging $progname, is in ./config.log if it exists.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# The version of $progname that generated this script.
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsLTCONFIG_VERSION=$LTCONFIG_VERSION
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Shell to use when invoking shell scripts.
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsSHELL=$LTSHELL
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Whether or not to build shared libraries.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsbuild_libtool_libs=$enable_shared
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Whether or not to build static libraries.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsbuild_old_libs=$enable_static
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Whether or not to optimize for fast installation.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsfast_install=$enable_fast_install
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# The host system.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewshost_alias=$host_alias
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# An echo program that does not interpret backslashes.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# The archiver.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# The default C compiler.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# The linker used to build libraries.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Whether we need hard or soft links.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# A BSD-compatible nm program.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Used on cygwin: DLL creation program.
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsDLLTOOL="$DLLTOOL"
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Used on cygwin: object dumper.
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsOBJDUMP="$OBJDUMP"
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Used on cygwin: assembler.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# The name of the directory that contains temporary libtool files.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsobjdir=$objdir
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# How to create reloadable object files.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsreload_flag=$reload_flag
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsreload_cmds=$reload_cmds
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# How to pass a linker flag through the compiler.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Object file suffix (normally "o").
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsobjext="$objext"
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Old archive suffix (normally "a").
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewslibext="$libext"
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Executable file suffix (normally "").
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsexeext="$exeext"
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Additional compiler flags for building library objects.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewspic_flag=$pic_flag
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Does compiler simultaneously support -c and -o options?
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewscompiler_c_o=$compiler_c_o
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Can we write directly to a .lo ?
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewscompiler_o_lo=$compiler_o_lo
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Must we lock files when doing compilation ?
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsneed_locks=$need_locks
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Do we need the lib prefix for modules?
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsneed_lib_prefix=$need_lib_prefix
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Do we need a version for libraries?
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsneed_version=$need_version
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Whether dlopen is supported.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsdlopen=$enable_dlopen
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Whether dlopen of programs is supported.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsdlopen_self=$enable_dlopen_self
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Whether dlopen of statically linked programs is supported.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsdlopen_self_static=$enable_dlopen_self_static
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Compiler flag to prevent dynamic linking.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewslink_static_flag=$link_static_flag
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Compiler flag to turn off builtin functions.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsno_builtin_flag=$no_builtin_flag
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Compiler flag to allow reflexive dlopens.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsexport_dynamic_flag_spec=$export_dynamic_flag_spec
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Compiler flag to generate shared objects directly from archives.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewswhole_archive_flag_spec=$whole_archive_flag_spec
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Compiler flag to generate thread-safe objects.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsthread_safe_flag_spec=$thread_safe_flag_spec
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Library versioning type.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsversion_type=$version_type
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Format of library name prefix.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewslibname_spec=$libname_spec
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# List of archive names. First name is the real one, the rest are links.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# The last name is the one that the linker finds with -lNAME.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewslibrary_names_spec=$library_names_spec
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# The coded name of the library, if different from the real name.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewssoname_spec=$soname_spec
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Commands used to build and install an old-style archive.
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsRANLIB=$RANLIB
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsold_archive_cmds=$old_archive_cmds
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsold_postinstall_cmds=$old_postinstall_cmds
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsold_postuninstall_cmds=$old_postuninstall_cmds
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Create an old-style archive from a shared archive.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsold_archive_from_new_cmds=$old_archive_from_new_cmds
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Commands used to build and install a shared archive.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsarchive_cmds=$archive_cmds
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsarchive_expsym_cmds=$archive_expsym_cmds
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewspostinstall_cmds=$postinstall_cmds
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewspostuninstall_cmds=$postuninstall_cmds
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Method to check whether dependent libraries are shared objects.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsdeplibs_check_method=$deplibs_check_method
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Command to use when deplibs_check_method == file_magic.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsfile_magic_cmd=$file_magic_cmd
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Flag that allows shared libraries with undefined symbols to be built.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsallow_undefined_flag=$allow_undefined_flag
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Flag that forces no undefined symbols.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsno_undefined_flag=$no_undefined_flag
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Commands used to finish a libtool library installation in a directory.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsfinish_cmds=$finish_cmds
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Same as above, but a single script fragment to be evaled but not shown.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsfinish_eval=$finish_eval
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Take the output of nm and produce a listing of raw symbols and C names.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsglobal_symbol_pipe=$global_symbol_pipe
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Transform the output of nm in a proper C declaration
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsglobal_symbol_to_cdecl=$global_symbol_to_cdecl
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# This is the shared library runtime path variable.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsrunpath_var=$runpath_var
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# This is the shared library path variable.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsshlibpath_var=$shlibpath_var
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Is shlibpath searched before the hard-coded library search path?
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsshlibpath_overrides_runpath=$shlibpath_overrides_runpath
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# How to hardcode a shared library path into an executable.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewshardcode_action=$hardcode_action
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Flag to hardcode \$libdir into a binary during linking.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# This must work even if \$libdir does not exist.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewshardcode_libdir_flag_spec=$hardcode_libdir_flag_spec
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Whether we need a single -rpath flag with a separated argument.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewshardcode_libdir_separator=$hardcode_libdir_separator
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# resulting binary.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewshardcode_direct=$hardcode_direct
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# resulting binary.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewshardcode_minus_L=$hardcode_minus_L
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# the resulting binary.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewshardcode_shlibpath_var=$hardcode_shlibpath_var
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Compile-time system search path for libraries
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewssys_lib_search_path_spec=$sys_lib_search_path_spec
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Run-time system search path for libraries
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewssys_lib_dlsearch_path_spec=$sys_lib_dlsearch_path_spec
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Fix the shell variable \$srcfile for the compiler.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsfix_srcfile_path="$fix_srcfile_path"
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Set to yes if exported symbols are required.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsalways_export_symbols=$always_export_symbols
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# The commands to list exported symbols.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsexport_symbols_cmds=$export_symbols_cmds
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Symbols that should not be listed in the preloaded symbols.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsexclude_expsyms=$exclude_expsyms
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Symbols that must always be exported.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsinclude_expsyms=$include_expsyms
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# AIX sometimes has problems with the GCC collect2 program. For some
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# reason, if we set the COLLECT_NAMES environment variable, the problems
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# vanish in a puff of smoke.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # Append the ltmain.sh script.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews sed '$q' "$ltmain" >> "$ofile" || (rm -f "$ofile"; exit 1)
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # We use sed instead of cat because bash on DJGPP gets confused if
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # if finds mixed CR/LF and LF-only lines. Since sed operates in
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # text mode, it properly converts lines to CR/LF. This bash problem
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # is reportedly fixed, but why not run on old versions too?
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # Compile the libtool program.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews echo "FIXME: would compile $ltmain"
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# AC_CACHE_SAVE
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# This file is a shell script that caches the results of configure
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# tests run on this system so they can be shared between configure
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# scripts and configure runs. It is not useful on other systems.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# If it contains results you don't want to keep, you may remove or edit it.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# By default, configure uses ./config.cache as the cache file,
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# creating it if it does not exist already. You can give configure
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# the --cache-file=FILE option to use a different cache file; that is
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# what configure does when it calls configure scripts in
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# subdirectories, so they share the cache.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Giving --cache-file=/dev/null disables caching, for debugging configure.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# config.status only pays attention to the cache file if you give it the
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# --recheck option to rerun configure.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# The following way of writing the cache mishandles newlines in values,
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# but we know of no workaround that is simple, portable, and efficient.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# So, don't put newlines in cache variables' values.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Ultrix sh set writes to stderr and can't be redirected directly,
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# and sets the high bit in the cache file unless we assign to the vars.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews case `(ac_space=' '; set | grep ac_space) 2>&1` in
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # `set' does not quote correctly, so add quotes (double-quote substitution
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # turns \\\\ into \\, and sed turns \\ into \).
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews -e "s/'/'\\\\''/g" \
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # `set' quotes correctly as required by POSIX, so do not add quotes.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews if test -w $cache_file; then
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews echo "updating cache $cache_file"
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews echo "not updating unwritable cache $cache_file"
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Local Variables:
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# mode:shell-script
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# sh-indentation:2