103a78d15Sespie#! /bin/sh 203a78d15Sespie 303a78d15Sespie# ltconfig - Create a system-specific libtool. 403a78d15Sespie# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 503a78d15Sespie# Free Software Foundation, Inc. 603a78d15Sespie# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 703a78d15Sespie# 803a78d15Sespie# This file is free software; you can redistribute it and/or modify it 903a78d15Sespie# under the terms of the GNU General Public License as published by 1003a78d15Sespie# the Free Software Foundation; either version 2 of the License, or 1103a78d15Sespie# (at your option) any later version. 1203a78d15Sespie# 1303a78d15Sespie# This program is distributed in the hope that it will be useful, but 1403a78d15Sespie# WITHOUT ANY WARRANTY; without even the implied warranty of 1503a78d15Sespie# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1603a78d15Sespie# General Public License for more details. 1703a78d15Sespie# 1803a78d15Sespie# You should have received a copy of the GNU General Public License 1903a78d15Sespie# along with this program; if not, write to the Free Software 2003a78d15Sespie# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 2103a78d15Sespie# 2203a78d15Sespie# As a special exception to the GNU General Public License, if you 2303a78d15Sespie# distribute this file as part of a program that contains a 2403a78d15Sespie# configuration script generated by Autoconf, you may include it under 2503a78d15Sespie# the same distribution terms that you use for the rest of that program. 2603a78d15Sespie 2703a78d15Sespie# A lot of this script is taken from autoconf-2.10. 2803a78d15Sespie 2903a78d15Sespie# Check that we are running under the correct shell. 3003a78d15SespieSHELL=${CONFIG_SHELL-/bin/sh} 3103a78d15Sespieecho=echo 3203a78d15Sespieif test "X$1" = X--no-reexec; then 3303a78d15Sespie # Discard the --no-reexec flag, and continue. 3403a78d15Sespie shift 3503a78d15Sespieelif test "X$1" = X--fallback-echo; then 3603a78d15Sespie # Avoid inline document here, it may be left over 3703a78d15Sespie : 3803a78d15Sespieelif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then 3903a78d15Sespie # Yippee, $echo works! 4003a78d15Sespie : 4103a78d15Sespieelse 4203a78d15Sespie # Restart under the correct shell. 4303a78d15Sespie exec "$SHELL" "$0" --no-reexec ${1+"$@"} 4403a78d15Sespiefi 4503a78d15Sespie 4603a78d15Sespieif test "X$1" = X--fallback-echo; then 4703a78d15Sespie # used as fallback echo 4803a78d15Sespie shift 4903a78d15Sespie cat <<EOF 5003a78d15Sespie$* 5103a78d15SespieEOF 5203a78d15Sespie exit 0 5303a78d15Sespiefi 5403a78d15Sespie 5503a78d15Sespie# Find the correct PATH separator. Usually this is `:', but 5603a78d15Sespie# DJGPP uses `;' like DOS. 5703a78d15Sespieif test "X${PATH_SEPARATOR+set}" != Xset; then 5803a78d15Sespie UNAME=${UNAME-`uname 2>/dev/null`} 5903a78d15Sespie case X$UNAME in 6003a78d15Sespie *-DOS) PATH_SEPARATOR=';' ;; 6103a78d15Sespie *) PATH_SEPARATOR=':' ;; 6203a78d15Sespie esac 6303a78d15Sespiefi 6403a78d15Sespie 6503a78d15Sespie# The HP-UX ksh and POSIX shell print the target directory to stdout 6603a78d15Sespie# if CDPATH is set. 6703a78d15Sespieif test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi 6803a78d15Sespie 6903a78d15Sespieif test "X${echo_test_string+set}" != Xset; then 7003a78d15Sespie # find a string as large as possible, as long as the shell can cope with it 7103a78d15Sespie for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do 7203a78d15Sespie # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... 7303a78d15Sespie if (echo_test_string="`eval $cmd`") 2>/dev/null && 7403a78d15Sespie echo_test_string="`eval $cmd`" && 7503a78d15Sespie (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null; then 7603a78d15Sespie break 7703a78d15Sespie fi 7803a78d15Sespie done 7903a78d15Sespiefi 8003a78d15Sespie 8103a78d15Sespieif test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 8203a78d15Sespie echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 8303a78d15Sespie test "X$echo_testing_string" = "X$echo_test_string"; then 8403a78d15Sespie : 8503a78d15Sespieelse 8603a78d15Sespie # The Solaris, AIX, and Digital Unix default echo programs unquote 8703a78d15Sespie # backslashes. This makes it impossible to quote backslashes using 8803a78d15Sespie # echo "$something" | sed 's/\\/\\\\/g' 8903a78d15Sespie # 9003a78d15Sespie # So, first we look for a working echo in the user's PATH. 9103a78d15Sespie 9203a78d15Sespie IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" 9303a78d15Sespie for dir in $PATH /usr/ucb; do 9403a78d15Sespie if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && 9503a78d15Sespie test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && 9603a78d15Sespie echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && 9703a78d15Sespie test "X$echo_testing_string" = "X$echo_test_string"; then 9803a78d15Sespie echo="$dir/echo" 9903a78d15Sespie break 10003a78d15Sespie fi 10103a78d15Sespie done 10203a78d15Sespie IFS="$save_ifs" 10303a78d15Sespie 10403a78d15Sespie if test "X$echo" = Xecho; then 10503a78d15Sespie # We didn't find a better echo, so look for alternatives. 10603a78d15Sespie if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && 10703a78d15Sespie echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && 10803a78d15Sespie test "X$echo_testing_string" = "X$echo_test_string"; then 10903a78d15Sespie # This shell has a builtin print -r that does the trick. 11003a78d15Sespie echo='print -r' 11103a78d15Sespie elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && 11203a78d15Sespie test "X$CONFIG_SHELL" != X/bin/ksh; then 11303a78d15Sespie # If we have ksh, try running ltconfig again with it. 11403a78d15Sespie ORIGINAL_CONFIG_SHELL="${CONFIG_SHELL-/bin/sh}" 11503a78d15Sespie export ORIGINAL_CONFIG_SHELL 11603a78d15Sespie CONFIG_SHELL=/bin/ksh 11703a78d15Sespie export CONFIG_SHELL 11803a78d15Sespie exec "$CONFIG_SHELL" "$0" --no-reexec ${1+"$@"} 11903a78d15Sespie else 12003a78d15Sespie # Try using printf. 12103a78d15Sespie echo='printf %s\n' 12203a78d15Sespie if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 12303a78d15Sespie echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 12403a78d15Sespie test "X$echo_testing_string" = "X$echo_test_string"; then 12503a78d15Sespie # Cool, printf works 12603a78d15Sespie : 12703a78d15Sespie elif echo_testing_string=`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null` && 12803a78d15Sespie test "X$echo_testing_string" = 'X\t' && 12903a78d15Sespie echo_testing_string=`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && 13003a78d15Sespie test "X$echo_testing_string" = "X$echo_test_string"; then 13103a78d15Sespie CONFIG_SHELL="$ORIGINAL_CONFIG_SHELL" 13203a78d15Sespie export CONFIG_SHELL 13303a78d15Sespie SHELL="$CONFIG_SHELL" 13403a78d15Sespie export SHELL 13503a78d15Sespie echo="$CONFIG_SHELL $0 --fallback-echo" 13603a78d15Sespie elif echo_testing_string=`("$CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null` && 13703a78d15Sespie test "X$echo_testing_string" = 'X\t' && 13803a78d15Sespie echo_testing_string=`("$CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && 13903a78d15Sespie test "X$echo_testing_string" = "X$echo_test_string"; then 14003a78d15Sespie echo="$CONFIG_SHELL $0 --fallback-echo" 14103a78d15Sespie else 14203a78d15Sespie # maybe with a smaller string... 14303a78d15Sespie prev=: 14403a78d15Sespie 14503a78d15Sespie for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do 14603a78d15Sespie if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null; then 14703a78d15Sespie break 14803a78d15Sespie fi 14903a78d15Sespie prev="$cmd" 15003a78d15Sespie done 15103a78d15Sespie 15203a78d15Sespie if test "$prev" != 'sed 50q "$0"'; then 15303a78d15Sespie echo_test_string=`eval $prev` 15403a78d15Sespie 15503a78d15Sespie export echo_test_string 15603a78d15Sespie exec "${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}}" "$0" ${1+"$@"} 15703a78d15Sespie else 15803a78d15Sespie # Oops. We lost completely, so just stick with echo. 15903a78d15Sespie echo=echo 16003a78d15Sespie fi 16103a78d15Sespie fi 16203a78d15Sespie fi 16303a78d15Sespie fi 16403a78d15Sespiefi 16503a78d15Sespie 16603a78d15Sespie# Sed substitution that helps us do robust quoting. It backslashifies 16703a78d15Sespie# metacharacters that are still active within double-quoted strings. 16803a78d15SespieXsed='sed -e s/^X//' 16903a78d15Sespiesed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' 17003a78d15Sespie 17103a78d15Sespie# Same as above, but do not quote variable references. 17203a78d15Sespiedouble_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' 17303a78d15Sespie 17403a78d15Sespie# Sed substitution to delay expansion of an escaped shell variable in a 17503a78d15Sespie# double_quote_subst'ed string. 17603a78d15Sespiedelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 17703a78d15Sespie 17803a78d15Sespie# The name of this program. 17903a78d15Sespieprogname=`$echo "X$0" | $Xsed -e 's%^.*/%%'` 18003a78d15Sespie 18103a78d15Sespie# Constants: 18203a78d15SespiePROGRAM=ltconfig 18303a78d15SespiePACKAGE=libtool 18403a78d15SespieVERSION=1.4a-GCC3.0 18503a78d15SespieTIMESTAMP=" (1.641.2.256 2001/05/28 20:09:07 with GCC-local changes)" 18603a78d15Sespieac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' 18703a78d15Sespieac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' 18803a78d15Sespierm="rm -f" 18903a78d15Sespie 19003a78d15Sespiehelp="Try \`$progname --help' for more information." 19103a78d15Sespie 19203a78d15Sespie# Global variables: 19303a78d15Sespiedefault_ofile=libtool 19403a78d15Sespiecan_build_shared=yes 19503a78d15Sespieenable_shared=yes 19603a78d15Sespie# All known linkers require a `.a' archive for static linking (except M$VC, 19703a78d15Sespie# which needs '.lib'). 19803a78d15Sespieenable_static=yes 19903a78d15Sespieenable_fast_install=yes 20003a78d15Sespieenable_dlopen=unknown 20103a78d15Sespieenable_win32_dll=no 20203a78d15Sespiepic_mode=default 20303a78d15Sespieltmain= 20403a78d15Sespiesilent= 20503a78d15Sespiesrcdir= 20603a78d15Sespieac_config_guess= 20703a78d15Sespieac_config_sub= 20803a78d15Sespiehost= 20903a78d15Sespiebuild=NONE 21003a78d15Sespienonopt=NONE 21103a78d15Sespieofile="$default_ofile" 21203a78d15Sespieverify_host=yes 21303a78d15Sespietagname= 21403a78d15Sespiewith_gcc=no 21503a78d15Sespiewith_gnu_ld=no 21603a78d15Sespieneed_locks=yes 21703a78d15Sespieac_ext=c 21803a78d15Sespielibext=a 21903a78d15Sespiecache_file= 22003a78d15Sespiemax_cmd_len= 22103a78d15Sespie 22203a78d15Sespie## Dependencies to place before and after the object being linked: 22303a78d15Sespiepredep_objects= 22403a78d15Sespiepostdep_objects= 22503a78d15Sespiepredeps= 22603a78d15Sespiepostdeps= 22703a78d15Sespiecompiler_lib_search_path= 22803a78d15Sespie 22903a78d15Sespie## Link characteristics: 23003a78d15Sespieallow_undefined_flag= 23103a78d15Sespieno_undefined_flag= 23203a78d15Sespieneed_lib_prefix=unknown 23303a78d15Sespieneed_version=unknown 23403a78d15Sespie# when you set need_version to no, make sure it does not cause -set_version 23503a78d15Sespie# flags to be left without arguments 23603a78d15Sespiearchive_cmds= 23703a78d15Sespiearchive_expsym_cmds= 23803a78d15Sespieold_archive_from_new_cmds= 23903a78d15Sespieold_archive_from_expsyms_cmds= 24003a78d15Sespiestriplib= 24103a78d15Sespieold_striplib= 24203a78d15Sespieexport_dynamic_flag_spec= 24303a78d15Sespiewhole_archive_flag_spec= 24403a78d15Sespiethread_safe_flag_spec= 24503a78d15Sespiehardcode_into_libs=no 24603a78d15Sespiehardcode_libdir_flag_spec= 24703a78d15Sespiehardcode_libdir_separator= 24803a78d15Sespiehardcode_direct=no 24903a78d15Sespiehardcode_minus_L=no 25003a78d15Sespiehardcode_shlibpath_var=unsupported 25103a78d15Sespierunpath_var= 25203a78d15Sespielink_all_deplibs=unknown 25303a78d15Sespiealways_export_symbols=no 25403a78d15Sespieexport_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols' 25503a78d15Sespie# include_expsyms should be a list of space-separated symbols to be *always* 25603a78d15Sespie# included in the symbol list 25703a78d15Sespieinclude_expsyms= 25803a78d15Sespie# exclude_expsyms can be an egrep regular expression of symbols to exclude 25903a78d15Sespie# it will be wrapped by ` (' and `)$', so one must not match beginning or 26003a78d15Sespie# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 26103a78d15Sespie# as well as any symbol that contains `d'. 26203a78d15Sespieexclude_expsyms="_GLOBAL_OFFSET_TABLE_" 26303a78d15Sespie# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 26403a78d15Sespie# platforms (ab)use it in PIC code, but their linkers get confused if 26503a78d15Sespie# the symbol is explicitly referenced. Since portable code cannot 26603a78d15Sespie# rely on this symbol name, it's probably fine to never include it in 26703a78d15Sespie# preloaded symbol tables. 26803a78d15Sespieextract_expsyms_cmds= 26903a78d15Sespie 27003a78d15Sespie## Tools: 27103a78d15Sespieold_AR="$AR" 27203a78d15Sespieold_AR_FLAGS="$AR_FLAGS" 27303a78d15Sespieold_CC="$CC" 27403a78d15Sespieold_CFLAGS="$CFLAGS" 27503a78d15Sespieold_CPPFLAGS="$CPPFLAGS" 27603a78d15Sespieold_LDFLAGS="$LDFLAGS" 27703a78d15Sespieold_LIBS="$LIBS" 27803a78d15Sespieold_MAGIC_CMD="$MAGIC_CMD" 27903a78d15Sespieold_LD="$LD" 28003a78d15Sespieold_LN_S="$LN_S" 28103a78d15Sespieold_LTCC="$LTCC" 28203a78d15Sespieold_NM="$NM" 28303a78d15Sespieold_RANLIB="$RANLIB" 28403a78d15Sespieold_STRIP="$STRIP" 28503a78d15Sespieold_AS="$AS" 28603a78d15Sespieold_DLLTOOL="$DLLTOOL" 28703a78d15Sespieold_OBJDUMP="$OBJDUMP" 28803a78d15Sespieold_OBJEXT="$OBJEXT" 28903a78d15Sespieold_EXEEXT="$EXEEXT" 29003a78d15Sespieold_reload_flag="$reload_flag" 29103a78d15Sespieold_deplibs_check_method="$deplibs_check_method" 29203a78d15Sespieold_file_magic_cmd="$file_magic_cmd" 29303a78d15Sespie 29403a78d15Sespie# Parse the command line options. 29503a78d15Sespieargs= 29603a78d15Sespieprev= 29703a78d15Sespiefor option 29803a78d15Sespiedo 29903a78d15Sespie case $option in 30003a78d15Sespie -*=*) optarg=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; 30103a78d15Sespie *) optarg= ;; 30203a78d15Sespie esac 30303a78d15Sespie 30403a78d15Sespie # If the previous option needs an argument, assign it. 30503a78d15Sespie if test -n "$prev"; then 30603a78d15Sespie eval "$prev=\$option" 30703a78d15Sespie prev= 30803a78d15Sespie continue 30903a78d15Sespie fi 31003a78d15Sespie 31103a78d15Sespie case $option in 31203a78d15Sespie --help) cat <<EOM 31303a78d15SespieUsage: $progname [OPTION]... LTMAIN [HOST] 31403a78d15Sespie 31503a78d15SespieGenerate a system-specific libtool script. 31603a78d15Sespie 31703a78d15Sespie --build configure for building on BUILD [BUILD=HOST] 31803a78d15Sespie --debug enable verbose shell tracing 31903a78d15Sespie --disable-shared do not build shared libraries 32003a78d15Sespie --disable-static do not build static libraries 32103a78d15Sespie --disable-fast-install do not optimize for fast installation 32203a78d15Sespie --enable-dlopen enable dlopen support 32303a78d15Sespie --enable-win32-dll enable building dlls on win32 hosts 32403a78d15Sespie --help display this help and exit 32503a78d15Sespie --no-verify do not verify that HOST is a valid host type 32603a78d15Sespie-o, --output=FILE specify the output file [default=$default_ofile] 32703a78d15Sespie --quiet same as \`--silent' 32803a78d15Sespie --silent do not print informational messages 32903a78d15Sespie --srcdir=DIR find \`config.guess' in DIR 33003a78d15Sespie --version output version information and exit 33103a78d15Sespie --add-tag=TAG append an alternate configuration 33203a78d15Sespie --with-gcc assume that the GNU C compiler will be used 33303a78d15Sespie --with-gnu-ld assume that the C compiler uses the GNU linker 33403a78d15Sespie --prefer-pic try to use only PIC objects 33503a78d15Sespie --prefer-non-pic try to use only non-PIC objects 33603a78d15Sespie --disable-lock disable file locking 33703a78d15Sespie --cache-file=FILE configure cache file 33803a78d15Sespie 33903a78d15SespieLTMAIN is the \`ltmain.sh' shell script fragment or \`ltmain.c' program 34003a78d15Sespiethat provides basic libtool functionality. 34103a78d15Sespie 34203a78d15SespieHOST is the canonical host system name [default=guessed]. 34303a78d15SespieEOM 34403a78d15Sespie exit 0 34503a78d15Sespie ;; 34603a78d15Sespie 34703a78d15Sespie --build) prev=build ;; 34803a78d15Sespie --build=*) build="$optarg" ;; 34903a78d15Sespie 35003a78d15Sespie --debug) 35103a78d15Sespie echo "$progname: enabling shell trace mode" 35203a78d15Sespie set -x 35303a78d15Sespie ;; 35403a78d15Sespie 35503a78d15Sespie --disable-shared) enable_shared=no ;; 35603a78d15Sespie 35703a78d15Sespie --disable-static) enable_static=no ;; 35803a78d15Sespie 35903a78d15Sespie --disable-fast-install) enable_fast_install=no ;; 36003a78d15Sespie 36103a78d15Sespie --enable-dlopen) enable_dlopen=yes ;; 36203a78d15Sespie 36303a78d15Sespie --enable-win32-dll) enable_win32_dll=yes ;; 36403a78d15Sespie 36503a78d15Sespie --quiet | --silent) silent=yes ;; 36603a78d15Sespie 36703a78d15Sespie --srcdir) prev=srcdir ;; 36803a78d15Sespie --srcdir=*) srcdir="$optarg" ;; 36903a78d15Sespie 37003a78d15Sespie --no-verify) verify_host=no ;; 37103a78d15Sespie 37203a78d15Sespie --output | -o) prev=ofile ;; 37303a78d15Sespie --output=*) ofile="$optarg" ;; 37403a78d15Sespie 37503a78d15Sespie --version) echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"; exit 0 ;; 37603a78d15Sespie 37703a78d15Sespie --add-tag) prev=tagname ;; 37803a78d15Sespie --add-tag=*) tagname="$optarg" ;; 37903a78d15Sespie 38003a78d15Sespie --with-gcc) with_gcc=yes ;; 38103a78d15Sespie --with-gnu-ld) with_gnu_ld=yes ;; 38203a78d15Sespie 38303a78d15Sespie --prefer-pic) pic_mode=yes ;; 38403a78d15Sespie --prefer-non-pic) pic_mode=no ;; 38503a78d15Sespie 38603a78d15Sespie --disable-lock) need_locks=no ;; 38703a78d15Sespie 38803a78d15Sespie --cache-file=*) cache_file="$optarg" ;; 38903a78d15Sespie 39003a78d15Sespie -*) 39103a78d15Sespie echo "$progname: unrecognized option \`$option'" 1>&2 39203a78d15Sespie echo "$help" 1>&2 39303a78d15Sespie exit 1 39403a78d15Sespie ;; 39503a78d15Sespie 39603a78d15Sespie *) 39703a78d15Sespie if test -z "$ltmain"; then 39803a78d15Sespie ltmain="$option" 39903a78d15Sespie elif test -z "$host"; then 40003a78d15Sespie# This generates an unnecessary warning for sparc-sun-solaris4.1.3_U1 40103a78d15Sespie# if test -n "`echo $option| sed 's/[-a-z0-9.]//g'`"; then 40203a78d15Sespie# echo "$progname: warning \`$option' is not a valid host type" 1>&2 40303a78d15Sespie# fi 40403a78d15Sespie host="$option" 40503a78d15Sespie else 40603a78d15Sespie echo "$progname: too many arguments" 1>&2 40703a78d15Sespie echo "$help" 1>&2 40803a78d15Sespie exit 1 40903a78d15Sespie fi ;; 41003a78d15Sespie esac 41103a78d15Sespiedone 41203a78d15Sespie 41303a78d15Sespieif test -z "$ltmain"; then 41403a78d15Sespie echo "$progname: you must specify a LTMAIN file" 1>&2 41503a78d15Sespie echo "$help" 1>&2 41603a78d15Sespie exit 1 41703a78d15Sespiefi 41803a78d15Sespie 41903a78d15Sespieif test ! -f "$ltmain"; then 42003a78d15Sespie echo "$progname: \`$ltmain' does not exist" 1>&2 42103a78d15Sespie echo "$help" 1>&2 42203a78d15Sespie exit 1 42303a78d15Sespiefi 42403a78d15Sespie 42503a78d15Sespieif test -n "$tagname"; then 42603a78d15Sespie # Check whether tagname contains only valid characters 42703a78d15Sespie case `$echo "X$tagname" | $Xsed -e 's/[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]//g'` in 42803a78d15Sespie "") ;; 42903a78d15Sespie *) 43003a78d15Sespie echo "$progname: invalid tag name: $tagname" 1>&2 43103a78d15Sespie exit 1 43203a78d15Sespie ;; 43303a78d15Sespie esac 43403a78d15Sespie 43503a78d15Sespie if grep "^### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$ofile" > /dev/null; then 43603a78d15Sespie echo "$progname: tag name $tagname already exists" 1>&2 43703a78d15Sespie exit 1 43803a78d15Sespie fi 43903a78d15Sespie 44003a78d15Sespie if test ! -f "$ofile"; then 44103a78d15Sespie echo "$progname: warning: output file \`$ofile' does not exist" 1>&2 44203a78d15Sespie fi 44303a78d15Sespie 44403a78d15Sespie if test -z "$LTCC"; then 44503a78d15Sespie eval "`$SHELL $ofile --config | grep '^LTCC='`" 44603a78d15Sespie if test -z "$LTCC"; then 44703a78d15Sespie echo "$progname: warning: output file \`$ofile' does not look like a libtool script" 1>&2 44803a78d15Sespie else 44903a78d15Sespie echo "$progname: warning: using \`LTCC=$LTCC', extracted from \`$ofile'" 1>&2 45003a78d15Sespie fi 45103a78d15Sespie fi 45203a78d15Sespiefi 45303a78d15Sespie 45403a78d15Sespie# Quote any args containing shell metacharacters. 45503a78d15Sespieltconfig_args= 45603a78d15Sespiefor arg 45703a78d15Sespiedo 45803a78d15Sespie case $arg in 45903a78d15Sespie *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) 46003a78d15Sespie ltconfig_args="$ltconfig_args '$arg'" ;; 46103a78d15Sespie *) ltconfig_args="$ltconfig_args $arg" ;; 46203a78d15Sespie esac 46303a78d15Sespiedone 46403a78d15Sespie 46503a78d15Sespie# A relevant subset of AC_INIT. 46603a78d15Sespie 46703a78d15Sespie# File descriptor usage: 46803a78d15Sespie# 0 standard input 46903a78d15Sespie# 1 file creation 47003a78d15Sespie# 2 errors and warnings 47103a78d15Sespie# 3 some systems may open it to /dev/tty 47203a78d15Sespie# 4 used on the Kubota Titan 47303a78d15Sespie# 5 compiler messages saved in config.log 47403a78d15Sespie# 6 checking for... messages and results 47503a78d15Sespieif test "$silent" = yes; then 47603a78d15Sespie exec 6>/dev/null 47703a78d15Sespieelse 47803a78d15Sespie exec 6>&1 47903a78d15Sespiefi 48003a78d15Sespieexec 5>>./config.log 48103a78d15Sespie 48203a78d15Sespie# NLS nuisances. 48303a78d15Sespie# Only set LANG and LC_ALL to C if already set. 48403a78d15Sespie# These must not be set unconditionally because not all systems understand 48503a78d15Sespie# e.g. LANG=C (notably SCO). 48603a78d15Sespieif test "X${LC_ALL+set}" = Xset; then LC_ALL=C; export LC_ALL; fi 48703a78d15Sespieif test "X${LANG+set}" = Xset; then LANG=C; export LANG; fi 48803a78d15Sespie 48903a78d15Sespieif test -n "$cache_file" && test -r "$cache_file" && test -f "$cache_file"; then 49003a78d15Sespie echo "loading cache $cache_file within ltconfig" 49103a78d15Sespie . $cache_file 49203a78d15Sespiefi 49303a78d15Sespie 49403a78d15Sespieif (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then 49503a78d15Sespie # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. 49603a78d15Sespie if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then 49703a78d15Sespie ac_n= ac_c=' 49803a78d15Sespie' ac_t=' ' 49903a78d15Sespie else 50003a78d15Sespie ac_n=-n ac_c= ac_t= 50103a78d15Sespie fi 50203a78d15Sespieelse 50303a78d15Sespie ac_n= ac_c='\c' ac_t= 50403a78d15Sespiefi 50503a78d15Sespie 50603a78d15Sespieif test -z "$srcdir"; then 50703a78d15Sespie # Assume the source directory is the same one as the path to LTMAIN. 50803a78d15Sespie srcdir=`$echo "X$ltmain" | $Xsed -e 's%/[^/]*$%%'` 50903a78d15Sespie test "$srcdir" = "$ltmain" && srcdir=. 51003a78d15Sespiefi 51103a78d15Sespie 51203a78d15Sespietrap "$rm conftest*; exit 1" 1 2 15 51303a78d15Sespieif test "$verify_host" = yes; then 51403a78d15Sespie # Check for config.guess and config.sub. 51503a78d15Sespie ac_aux_dir= 51603a78d15Sespie for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do 51703a78d15Sespie if test -f $ac_dir/config.guess; then 51803a78d15Sespie ac_aux_dir=$ac_dir 51903a78d15Sespie break 52003a78d15Sespie fi 52103a78d15Sespie done 52203a78d15Sespie if test -z "$ac_aux_dir"; then 52303a78d15Sespie echo "$progname: cannot find config.guess in $srcdir $srcdir/.. $srcdir/../.." 1>&2 52403a78d15Sespie echo "$help" 1>&2 52503a78d15Sespie exit 1 52603a78d15Sespie fi 52703a78d15Sespie ac_config_guess=$ac_aux_dir/config.guess 52803a78d15Sespie ac_config_sub=$ac_aux_dir/config.sub 52903a78d15Sespie 53003a78d15Sespie # Make sure we can run config.sub. 53103a78d15Sespie if $SHELL $ac_config_sub sun4 >/dev/null 2>&1; then : 53203a78d15Sespie else 53303a78d15Sespie echo "$progname: cannot run $ac_config_sub" 1>&2 53403a78d15Sespie echo "$help" 1>&2 53503a78d15Sespie exit 1 53603a78d15Sespie fi 53703a78d15Sespie 53803a78d15Sespie echo $ac_n "checking host system type""... $ac_c" 1>&6 53903a78d15Sespie 54003a78d15Sespie host_alias=$host 54103a78d15Sespie case $host_alias in 54203a78d15Sespie "") 54303a78d15Sespie # Force config.guess to use the C compiler. 54403a78d15Sespie # CC_FOR_BUILD overrides the CC variable in config.guess but I had 54503a78d15Sespie # problems with it so do it this way for now. 54603a78d15Sespie CC="$LTCC" 54703a78d15Sespie 54803a78d15Sespie if host_alias=`$SHELL $ac_config_guess`; then : 54903a78d15Sespie else 55003a78d15Sespie echo "$progname: cannot guess host type; you must specify one" 1>&2 55103a78d15Sespie echo "$help" 1>&2 55203a78d15Sespie exit 1 55303a78d15Sespie fi 55403a78d15Sespie 55503a78d15Sespie # Restore the C compiler. 55603a78d15Sespie CC="$old_CC" 55703a78d15Sespie ;; 55803a78d15Sespie esac 55903a78d15Sespie host=`$SHELL $ac_config_sub $host_alias` 56003a78d15Sespie echo "$ac_t$host" 1>&6 56103a78d15Sespie 56203a78d15Sespie # Make sure the host verified. 56303a78d15Sespie test -z "$host" && exit 1 56403a78d15Sespie 56503a78d15Sespie # Check for the build system type 56603a78d15Sespie echo $ac_n "checking build system type... $ac_c" 1>&6 56703a78d15Sespie 56803a78d15Sespie build_alias=$build 56903a78d15Sespie case $build_alias in 57003a78d15Sespie NONE) 57103a78d15Sespie case $nonopt in 57203a78d15Sespie NONE) build_alias=$host_alias ;; 57303a78d15Sespie *) build_alias=$nonopt ;; 57403a78d15Sespie esac ;; 57503a78d15Sespie esac 57603a78d15Sespie 57703a78d15Sespie build=`$SHELL $ac_config_sub $build_alias` 57803a78d15Sespie build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` 57903a78d15Sespie build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` 58003a78d15Sespie build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` 58103a78d15Sespie echo "$ac_t""$build" 1>&6 58203a78d15Sespie 58303a78d15Sespieelif test -z "$host"; then 58403a78d15Sespie echo "$progname: you must specify a host type if you use \`--no-verify'" 1>&2 58503a78d15Sespie echo "$help" 1>&2 58603a78d15Sespie exit 1 58703a78d15Sespieelse 58803a78d15Sespie host_alias=$host 58903a78d15Sespie build_alias=$host_alias 59003a78d15Sespie build=$host 59103a78d15Sespiefi 59203a78d15Sespie 59303a78d15Sespieif test x"$host" != x"$build"; then 59403a78d15Sespie ac_tool_prefix=${host_alias}- 59503a78d15Sespieelse 59603a78d15Sespie ac_tool_prefix= 59703a78d15Sespiefi 59803a78d15Sespie 59903a78d15Sespiehost_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` 60003a78d15Sespiehost_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` 60103a78d15Sespiehost_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` 60203a78d15Sespie 60303a78d15Sespie# Transform linux* to *-*-linux-gnu*, to support old configure scripts. 60403a78d15Sespiecase $host_os in 60503a78d15Sespielinux-gnu*) ;; 60603a78d15Sespielinux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` 60703a78d15Sespieesac 60803a78d15Sespie 60903a78d15Sespiecase $host_os in 61003a78d15Sespieaix3*) 61103a78d15Sespie # AIX sometimes has problems with the GCC collect2 program. For some 61203a78d15Sespie # reason, if we set the COLLECT_NAMES environment variable, the problems 61303a78d15Sespie # vanish in a puff of smoke. 61403a78d15Sespie if test "X${COLLECT_NAMES+set}" != Xset; then 61503a78d15Sespie COLLECT_NAMES= 61603a78d15Sespie export COLLECT_NAMES 61703a78d15Sespie fi 61803a78d15Sespie ;; 61903a78d15Sespieesac 62003a78d15Sespie 62103a78d15Sespie# Determine commands to create old-style static archives. 62203a78d15Sespieold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' 62303a78d15Sespieold_postinstall_cmds='chmod 644 $oldlib' 62403a78d15Sespieold_postuninstall_cmds= 62503a78d15Sespie 62603a78d15Sespieif test -n "$RANLIB"; then 62703a78d15Sespie old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 628*c5bbcf84Sespie case $host_os in 629*c5bbcf84Sespie openbsd*) 630*c5bbcf84Sespie old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds";; 631*c5bbcf84Sespie *) 632*c5bbcf84Sespie old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds";; 633*c5bbcf84Sespie esac 63403a78d15Sespiefi 63503a78d15Sespie 63603a78d15Sespie# Source the script associated with the $tagname tag configuration. 63703a78d15Sespieif test -n "$tagname"; then 63803a78d15Sespie . $ltmain 63903a78d15Sespieelse 64003a78d15Sespie # FIXME: We should use a variable here 64103a78d15Sespie # Configure for a C compiler 64203a78d15Sespie . $srcdir/ltcf-c.sh 64303a78d15Sespiefi 64403a78d15Sespie 64503a78d15Sespie# Set sane defaults for various variables 64603a78d15Sespietest -z "$AR" && AR=ar 64703a78d15Sespietest -z "$AR_FLAGS" && AR_FLAGS=cru 64803a78d15Sespietest -z "$AS" && AS=as 64903a78d15Sespietest -z "$CC" && CC=cc 65003a78d15Sespietest -z "$DLLTOOL" && DLLTOOL=dlltool 65103a78d15Sespietest -z "$MAGIC_CMD" && MAGIC_CMD=file 65203a78d15Sespietest -z "$LD" && LD=ld 65303a78d15Sespietest -z "$LN_S" && LN_S="ln -s" 65403a78d15Sespietest -z "$NM" && NM=nm 65503a78d15Sespietest -z "$OBJDUMP" && OBJDUMP=objdump 65603a78d15Sespietest -z "$RANLIB" && RANLIB=: 65703a78d15Sespietest -z "$STRIP" && STRIP=: 65803a78d15Sespietest -z "$objext" && objext=o 65903a78d15Sespie 66003a78d15Sespieecho $ac_n "checking for objdir... $ac_c" 1>&6 66103a78d15Sespierm -f .libs 2>/dev/null 66203a78d15Sespiemkdir .libs 2>/dev/null 66303a78d15Sespieif test -d .libs; then 66403a78d15Sespie objdir=.libs 66503a78d15Sespieelse 66603a78d15Sespie # MS-DOS does not allow filenames that begin with a dot. 66703a78d15Sespie objdir=_libs 66803a78d15Sespiefi 66903a78d15Sespiermdir .libs 2>/dev/null 67003a78d15Sespieecho "$ac_t$objdir" 1>&6 67103a78d15Sespie 67203a78d15Sespie# If no C compiler was specified, use CC. 67303a78d15SespieLTCC=${LTCC-"$CC"} 67403a78d15Sespie 67503a78d15Sespie# Allow CC to be a program name with arguments. 67603a78d15Sespieset dummy $CC 67703a78d15Sespiecompiler="$2" 67803a78d15Sespie 67903a78d15Sespie# We assume here that the value for ac_cv_prog_cc_pic will not be cached 68003a78d15Sespie# in isolation, and that seeing it set (from the cache) indicates that 68103a78d15Sespie# the associated values are set (in the cache) correctly too. 68203a78d15Sespieecho $ac_n "checking for $compiler option to produce PIC... $ac_c" 1>&6 68303a78d15Sespieecho "$progname:678:checking for $compiler option to produce PIC" 1>&5 68403a78d15Sespie 68503a78d15Sespieif test -z "$ac_cv_prog_cc_pic"; then 68603a78d15Sespie echo "$ac_t"none 1>&6 68703a78d15Sespieelse 68803a78d15Sespie echo "$ac_t""$ac_cv_prog_cc_pic" 1>&6 68903a78d15Sespie 69003a78d15Sespie # Check to make sure the pic_flag actually works. 69103a78d15Sespie echo $ac_n "checking if $compiler PIC flag $ac_cv_prog_cc_pic works... $ac_c" 1>&6 69203a78d15Sespie echo "$progname:687:checking that $compiler PIC flag $ac_cv_prog_cc_pic works." 1>&5 69303a78d15Sespie if test "X${ac_cv_prog_cc_pic_works+set}" = Xset && \ 69403a78d15Sespie test "X${ac_cv_prog_cc_pic_works}" != X; then 69503a78d15Sespie echo $ac_n "(cached) $ac_c" 1>&6 69603a78d15Sespie else 69703a78d15Sespie ac_cv_prog_cc_pic_works=yes 69803a78d15Sespie $rm conftest* 69903a78d15Sespie echo $lt_simple_compile_test_code > conftest.$ac_ext 70003a78d15Sespie save_CFLAGS="$CFLAGS" 70103a78d15Sespie CFLAGS="$CFLAGS $ac_cv_prog_cc_pic -DPIC" 70203a78d15Sespie if { (eval echo $progname:697: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then 70303a78d15Sespie # Append any warnings to the config.log. 70403a78d15Sespie cat conftest.err 1>&5 70503a78d15Sespie 70603a78d15Sespie case $host_os in 70703a78d15Sespie hpux9* | hpux10* | hpux11*) 70803a78d15Sespie # On HP-UX, both CC and GCC only warn that PIC is supported... then 70903a78d15Sespie # they create non-PIC objects. So, if there were any warnings, we 71003a78d15Sespie # assume that PIC is not supported. 71103a78d15Sespie if test -s conftest.err; then 71203a78d15Sespie ac_cv_prog_cc_pic_works=no 71303a78d15Sespie ac_cv_prog_cc_can_build_shared=no 71403a78d15Sespie ac_cv_prog_cc_pic= 71503a78d15Sespie else 71603a78d15Sespie ac_cv_prog_cc_pic_works=yes 71703a78d15Sespie ac_cv_prog_cc_pic=" $ac_cv_prog_cc_pic" 71803a78d15Sespie fi 71903a78d15Sespie ;; 72003a78d15Sespie *) 72103a78d15Sespie ac_cv_prog_cc_pic_works=yes 72203a78d15Sespie ac_cv_prog_cc_pic=" $ac_cv_prog_cc_pic" 72303a78d15Sespie ;; 72403a78d15Sespie esac 72503a78d15Sespie else 72603a78d15Sespie # Append any errors to the config.log. 72703a78d15Sespie cat conftest.err 1>&5 72803a78d15Sespie ac_cv_prog_cc_pic_works=no 72903a78d15Sespie ac_cv_prog_cc_can_build_shared=no 73003a78d15Sespie ac_cv_prog_cc_pic= 73103a78d15Sespie fi 73203a78d15Sespie CFLAGS="$save_CFLAGS" 73303a78d15Sespie $rm conftest* 73403a78d15Sespie fi 73503a78d15Sespie # Belt *and* braces to stop my trousers falling down: 73603a78d15Sespie if test "X$ac_cv_prog_cc_pic_works" = Xno; then 73703a78d15Sespie ac_cv_prog_cc_pic= 73803a78d15Sespie ac_cv_prog_cc_can_build_shared=no 73903a78d15Sespie fi 74003a78d15Sespie echo "$ac_t""$ac_cv_prog_cc_pic_works" 1>&6 74103a78d15Sespiefi 74203a78d15Sespie 74303a78d15Sespie# Check for any special shared library compilation flags. 74403a78d15Sespieif test -n "$ac_cv_prog_cc_shlib"; then 74503a78d15Sespie echo "$progname: warning: \`$CC' requires \`$ac_cv_prog_cc_shlib' to build shared libraries" 1>&2 74603a78d15Sespie if echo "$old_CC $old_CFLAGS " | egrep -e "[ ]$ac_cv_prog_cc_shlib[ ]" >/dev/null; then : 74703a78d15Sespie else 74803a78d15Sespie echo "$progname: add \`$ac_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2 74903a78d15Sespie ac_cv_prog_cc_can_build_shared=no 75003a78d15Sespie fi 75103a78d15Sespiefi 75203a78d15Sespie 75303a78d15Sespieecho $ac_n "checking if $compiler static flag $ac_cv_prog_cc_static works... $ac_c" 1>&6 75403a78d15Sespieecho "$progname:749: checking if $compiler static flag $ac_cv_prog_cc_static works" >&5 75503a78d15Sespieif test "X${ac_cv_prog_cc_static_works+set}" = Xset && \ 75603a78d15Sespie test "X${ac_cv_prog_cc_static_works}" != X; then 75703a78d15Sespie echo $ac_n "(cached) $ac_c" 1>&6 75803a78d15Sespieelse 75903a78d15Sespie $rm conftest* 76003a78d15Sespie echo $lt_simple_link_test_code > conftest.$ac_ext 76103a78d15Sespie save_LDFLAGS="$LDFLAGS" 76203a78d15Sespie LDFLAGS="$LDFLAGS $ac_cv_prog_cc_static" 76303a78d15Sespie if { (eval echo $progname:758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then 76403a78d15Sespie ac_cv_prog_cc_static_works=yes 76503a78d15Sespie else 76603a78d15Sespie ac_cv_prog_cc_static_works=no 76703a78d15Sespie ac_cv_prog_cc_static= 76803a78d15Sespie fi 76903a78d15Sespie LDFLAGS="$save_LDFLAGS" 77003a78d15Sespie $rm conftest* 77103a78d15Sespiefi 77203a78d15Sespie# Belt *and* braces to stop my trousers falling down: 77303a78d15Sespieif test "X$ac_cv_prog_cc_static_works" = Xno; then 77403a78d15Sespie ac_cv_prog_cc_static= 77503a78d15Sespiefi 77603a78d15Sespieecho "$ac_t""$ac_cv_prog_cc_static_works" 1>&6 77703a78d15Sespiepic_flag="$ac_cv_prog_cc_pic" 77803a78d15Sespiespecial_shlib_compile_flags="$ac_cv_prog_cc_shlib" 77903a78d15Sespiewl="$ac_cv_prog_cc_wl" 78003a78d15Sespielink_static_flag="$ac_cv_prog_cc_static" 78103a78d15Sespieno_builtin_flag="$ac_cv_prog_cc_no_builtin" 78203a78d15Sespiecan_build_shared="$ac_cv_prog_cc_can_build_shared" 78303a78d15Sespie 78403a78d15Sespie# find the maximum length of command line arguments 78503a78d15Sespieecho "$progname:780: finding the maximum length of command line arguments" 1>&5 78603a78d15Sespieecho $ac_n "finding the maximum length of command line arguments... $ac_c" 1>&6 78703a78d15Sespieif test "${lt_cv_sys_max_cmd_len+set}" = set; then 78803a78d15Sespie echo $ac_n "(cached) $ac_c" 1>&6 78903a78d15Sespieelse 79003a78d15Sespie i=0 79103a78d15Sespie testring="ABCD" 79203a78d15Sespie # If test is not a shell built-in, we'll probably end up computing a 79303a78d15Sespie # maximum length that is only half of the actual maximum length, but 79403a78d15Sespie # we can't tell. 79503a78d15Sespie while test "X"`$CONFIG_SHELL $0 --fallback-echo "X$testring" 2>/dev/null` \ 79603a78d15Sespie = "XX$testring" && 79703a78d15Sespie new_result=`expr "X$testring" : ".*" 2>&1` && 79803a78d15Sespie lt_cv_sys_max_cmd_len=$new_result && 79903a78d15Sespie test $i != 17 # 1/2 MB should be enough 80003a78d15Sespie do 80103a78d15Sespie i=`expr $i + 1` 80203a78d15Sespie testring=$testring$testring 80303a78d15Sespie done 80403a78d15Sespie testring= 80503a78d15Sespie # add a significant safety factor because C++ compilers can tack on massive amounts 80603a78d15Sespie # of additional arguments before passing them to the linker. 1/4 should be good. 80703a78d15Sespie len=`expr $lt_cv_sys_max_cmd_len \/ 4` 80803a78d15Sespie lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len - $len` 80903a78d15Sespiefi 81003a78d15Sespieecho "$progname:@lineno@: result: $lt_cv_sys_max_cmd_len" 1>&5 81103a78d15Sespieecho "${ac_t}$lt_cv_sys_max_cmd_len" 1>&6 81203a78d15Sespie 81303a78d15Sespieif test -n $lt_cv_sys_max_cmd_len ; then 81403a78d15Sespie max_cmd_len=$lt_cv_sys_max_cmd_len 81503a78d15Sespieelse 81603a78d15Sespie max_cmd_len=none 81703a78d15Sespiefi 81803a78d15Sespie 81903a78d15Sespie# Check to see if options -o and -c are simultaneously supported by compiler 82003a78d15Sespieecho $ac_n "checking if $compiler supports -c -o file.$objext... $ac_c" 1>&6 82103a78d15Sespieif test "${lt_cv_compiler_c_o+set}" = set; then 82203a78d15Sespie echo $ac_n "(cached) $ac_c" 1>&6 82303a78d15Sespieelse 82403a78d15Sespie $rm -r conftest 2>/dev/null 82503a78d15Sespie mkdir conftest 82603a78d15Sespie cd conftest 82703a78d15Sespie $rm conftest* 82803a78d15Sespie echo $lt_simple_compile_test_code > conftest.$ac_ext 82903a78d15Sespie mkdir out 83003a78d15Sespie # According to Tom Tromey, Ian Lance Taylor reported there are C compilers 83103a78d15Sespie # that will create temporary files in the current directory regardless of 83203a78d15Sespie # the output directory. Thus, making CWD read-only will cause this test 83303a78d15Sespie # to fail, enabling locking or at least warning the user not to do parallel 83403a78d15Sespie # builds. 83503a78d15Sespie chmod -w . 83603a78d15Sespie save_CFLAGS="$CFLAGS" 83703a78d15Sespie CFLAGS="$CFLAGS -o out/conftest2.$objext" 83803a78d15Sespie echo "$progname:833: checking if $compiler supports -c -o file.$objext" >&5 83903a78d15Sespie if { (eval echo $progname:834: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$objext; then 84003a78d15Sespie 84103a78d15Sespie # The compiler can only warn and ignore the option if not recognized 84203a78d15Sespie # So say no if there are warnings 84303a78d15Sespie if test -s out/conftest.err; then 84403a78d15Sespie lt_cv_compiler_c_o=no 84503a78d15Sespie else 84603a78d15Sespie lt_cv_compiler_c_o=yes 84703a78d15Sespie fi 84803a78d15Sespie else 84903a78d15Sespie # Append any errors to the config.log. 85003a78d15Sespie cat out/conftest.err 1>&5 85103a78d15Sespie lt_cv_compiler_c_o=no 85203a78d15Sespie fi 85303a78d15Sespie CFLAGS="$save_CFLAGS" 85403a78d15Sespie chmod u+w . 85503a78d15Sespie $rm conftest* out/* 85603a78d15Sespie rmdir out 85703a78d15Sespie cd .. 85803a78d15Sespie rmdir conftest 85903a78d15Sespie $rm -r conftest 2>/dev/null 86003a78d15Sespiefi 86103a78d15Sespiecompiler_c_o=$lt_cv_compiler_c_o 86203a78d15Sespieecho "${ac_t}$compiler_c_o" 1>&6 86303a78d15Sespie 86403a78d15Sespie# Check to see if we can do hard links to lock some files if needed 86503a78d15Sespiehard_links="nottested" 86603a78d15Sespieif test "$compiler_c_o" = no && test "$need_locks" != no; then 86703a78d15Sespie # do not overwrite the value of need_locks provided by the user 86803a78d15Sespie echo $ac_n "checking if we can lock with hard links... $ac_c" 1>&6 86903a78d15Sespie hard_links=yes 87003a78d15Sespie $rm conftest* 87103a78d15Sespie ln conftest.a conftest.b 2>/dev/null && hard_links=no 87203a78d15Sespie touch conftest.a 87303a78d15Sespie ln conftest.a conftest.b 2>&5 || hard_links=no 87403a78d15Sespie ln conftest.a conftest.b 2>/dev/null && hard_links=no 87503a78d15Sespie echo "$ac_t$hard_links" 1>&6 87603a78d15Sespie $rm conftest* 87703a78d15Sespie if test "$hard_links" = no; then 87803a78d15Sespie echo "*** WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2 87903a78d15Sespie need_locks=warn 88003a78d15Sespie fi 88103a78d15Sespieelse 88203a78d15Sespie need_locks=no 88303a78d15Sespiefi 88403a78d15Sespie 88503a78d15Sespieif test "$with_gcc" = yes; then 88603a78d15Sespie # Check to see if options -fno-rtti -fno-exceptions are supported by compiler 88703a78d15Sespie echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions ... $ac_c" 1>&6 88803a78d15Sespie $rm conftest* 88903a78d15Sespie echo $lt_simple_compile_test_code > conftest.$ac_ext 89003a78d15Sespie save_CFLAGS="$CFLAGS" 89103a78d15Sespie CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext" 89203a78d15Sespie echo "$progname:887: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 89303a78d15Sespie if { (eval echo $progname:888: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then 89403a78d15Sespie 89503a78d15Sespie # The compiler can only warn and ignore the option if not recognized 89603a78d15Sespie # So say no if there are warnings 89703a78d15Sespie if test -s conftest.err; then 89803a78d15Sespie echo "$ac_t"no 1>&6 89903a78d15Sespie compiler_rtti_exceptions=no 90003a78d15Sespie else 90103a78d15Sespie echo "$ac_t"yes 1>&6 90203a78d15Sespie compiler_rtti_exceptions=yes 90303a78d15Sespie fi 90403a78d15Sespie else 90503a78d15Sespie # Append any errors to the config.log. 90603a78d15Sespie cat conftest.err 1>&5 90703a78d15Sespie compiler_rtti_exceptions=no 90803a78d15Sespie echo "$ac_t"no 1>&6 90903a78d15Sespie fi 91003a78d15Sespie CFLAGS="$save_CFLAGS" 91103a78d15Sespie $rm conftest* 91203a78d15Sespie 91303a78d15Sespie if test "$compiler_rtti_exceptions" = "yes"; then 91403a78d15Sespie no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions' 91503a78d15Sespie else 91603a78d15Sespie no_builtin_flag=' -fno-builtin' 91703a78d15Sespie fi 91803a78d15Sespie 91903a78d15Sespiefi 92003a78d15Sespie 92103a78d15Sespie# See if the linker supports building shared libraries. 92203a78d15Sespieecho $ac_n "checking whether the linker ($LD) supports shared libraries... $ac_c" 1>&6 92303a78d15Sespie 92403a78d15Sespieecho "$ac_t$ld_shlibs" 1>&6 92503a78d15Sespietest "$ld_shlibs" = no && can_build_shared=no 92603a78d15Sespie 92703a78d15Sespie# Check hardcoding attributes. 92803a78d15Sespieecho $ac_n "checking how to hardcode library paths into programs... $ac_c" 1>&6 92903a78d15Sespiehardcode_action= 93003a78d15Sespieif test -n "$hardcode_libdir_flag_spec" || \ 93103a78d15Sespie test -n "$runpath_var"; then 93203a78d15Sespie 93303a78d15Sespie # We can hardcode non-existant directories. 93403a78d15Sespie if test "$hardcode_direct" != no && 93503a78d15Sespie # If the only mechanism to avoid hardcoding is shlibpath_var, we 93603a78d15Sespie # have to relink, otherwise we might link with an installed library 93703a78d15Sespie # when we should be linking with a yet-to-be-installed one 93803a78d15Sespie ## test "$hardcode_shlibpath_var" != no && 93903a78d15Sespie test "$hardcode_minus_L" != no; then 94003a78d15Sespie # Linking always hardcodes the temporary library directory. 94103a78d15Sespie hardcode_action=relink 94203a78d15Sespie else 94303a78d15Sespie # We can link without hardcoding, and we can hardcode nonexisting dirs. 94403a78d15Sespie hardcode_action=immediate 94503a78d15Sespie fi 94603a78d15Sespieelse 94703a78d15Sespie # We cannot hardcode anything, or else we can only hardcode existing 94803a78d15Sespie # directories. 94903a78d15Sespie hardcode_action=unsupported 95003a78d15Sespiefi 95103a78d15Sespieecho "$ac_t$hardcode_action" 1>&6 95203a78d15Sespie 95303a78d15Sespieecho $ac_n "checking whether stripping libraries is possible... $ac_c" 1>&6 95403a78d15Sespieif test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then 95503a78d15Sespie test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 95603a78d15Sespie test -z "$striplib" && striplib="$STRIP --strip-unneeded" 95703a78d15Sespie echo "${ac_t}yes" 1>&6 95803a78d15Sespieelse 95903a78d15Sespie echo "${ac_t}no" 1>&6 96003a78d15Sespiefi 96103a78d15Sespie 96203a78d15Sespiecase $reload_flag in 96303a78d15Sespie"" | " "*) ;; 96403a78d15Sespie*) reload_flag=" $reload_flag" ;; 96503a78d15Sespieesac 96603a78d15Sespiereload_cmds='$LD$reload_flag -o $output$reload_objs' 96703a78d15Sespietest -z "$deplibs_check_method" && deplibs_check_method=unknown 96803a78d15Sespie 96903a78d15Sespie# PORTME Fill in your ld.so characteristics 97003a78d15Sespielibrary_names_spec= 97103a78d15Sespielibname_spec='lib$name' 97203a78d15Sespiesoname_spec= 97303a78d15Sespiepostinstall_cmds= 97403a78d15Sespiepostuninstall_cmds= 97503a78d15Sespiefinish_cmds= 97603a78d15Sespiefinish_eval= 97703a78d15Sespieshlibpath_var= 97803a78d15Sespieshlibpath_overrides_runpath=unknown 97903a78d15Sespieversion_type=none 98003a78d15Sespiedynamic_linker="$host_os ld.so" 98103a78d15Sespiesys_lib_dlsearch_path_spec="/lib /usr/lib" 98203a78d15Sespiesys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 98303a78d15Sespie 98403a78d15Sespieecho $ac_n "checking dynamic linker characteristics... $ac_c" 1>&6 98503a78d15Sespiecase $host_os in 98603a78d15Sespieaix3*) 98703a78d15Sespie version_type=linux 98803a78d15Sespie library_names_spec='${libname}${release}.so$versuffix $libname.a' 98903a78d15Sespie shlibpath_var=LIBPATH 99003a78d15Sespie 99103a78d15Sespie # AIX 3 has no versioning support, so we append a major version to the name. 99203a78d15Sespie soname_spec='${libname}${release}.so$major' 99303a78d15Sespie ;; 99403a78d15Sespie 99503a78d15Sespieaix4* | aix5*) 99603a78d15Sespie version_type=linux 99703a78d15Sespie if test "$host_cpu" = ia64; then 99803a78d15Sespie # AIX 5 supports IA64 99903a78d15Sespie library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' 100003a78d15Sespie shlibpath_var=LD_LIBRARY_PATH 100103a78d15Sespie else 100203a78d15Sespie # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 100303a78d15Sespie # soname into executable. Probably we can add versioning support to 100403a78d15Sespie # collect2, so additional links can be useful in future. 100503a78d15Sespie # We preserve .a as extension for shared libraries though AIX4.2 100603a78d15Sespie # and later linker supports .so 100703a78d15Sespie if test "$aix_use_runtimelinking" = yes; then 100803a78d15Sespie # If using run time linking (on AIX 4.2 or later) use lib<name>.so instead of 100903a78d15Sespie # lib<name>.a to let people know that these are not typical AIX shared libraries. 101003a78d15Sespie library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' 101103a78d15Sespie else 101203a78d15Sespie # We preserve .a as extension for shared libraries though AIX4.2 101303a78d15Sespie # and later when we are not doing run time linking. 101403a78d15Sespie library_names_spec='${libname}${release}.a $libname.a' 101503a78d15Sespie soname_spec='${libname}${release}.so$major' 101603a78d15Sespie fi 101703a78d15Sespie # If we're using GNU nm, then we don't want the "-C" option. 101803a78d15Sespie # -C means demangle to AIX nm, but means don't demangle with GNU nm 101903a78d15Sespie if $NM -V 2>&1 | egrep '(GNU)' > /dev/null; then 102003a78d15Sespie export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' 102103a78d15Sespie else 102203a78d15Sespie export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' 102303a78d15Sespie fi 102403a78d15Sespie shlibpath_var=LIBPATH 102503a78d15Sespie deplibs_check_method=pass_all 102603a78d15Sespie case $host_os in 102703a78d15Sespie aix4 | aix4.[01] | aix4.[01].*) 102803a78d15Sespie if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 102903a78d15Sespie echo ' yes ' 103003a78d15Sespie echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then 103103a78d15Sespie : 103203a78d15Sespie else 103303a78d15Sespie # With GCC up to 2.95.x, collect2 would create an import file 103403a78d15Sespie # for dependence libraries. The import file would start with 103503a78d15Sespie # the line `#! .'. This would cause the generated library to 103603a78d15Sespie # depend on `.', always an invalid library. This was fixed in 103703a78d15Sespie # development snapshots of GCC prior to 3.0. 103803a78d15Sespie can_build_shared=no 103903a78d15Sespie fi 104003a78d15Sespie ;; 104103a78d15Sespie esac 104203a78d15Sespie fi 104303a78d15Sespie ;; 104403a78d15Sespie 104503a78d15Sespieamigaos*) 104603a78d15Sespie library_names_spec='$libname.ixlibrary $libname.a' 104703a78d15Sespie # Create ${libname}_ixlibrary.a entries in /sys/libs. 104803a78d15Sespie 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' 104903a78d15Sespie ;; 105003a78d15Sespie 105103a78d15Sespiebeos*) 105203a78d15Sespie library_names_spec='${libname}.so' 105303a78d15Sespie dynamic_linker="$host_os ld.so" 105403a78d15Sespie shlibpath_var=LIBRARY_PATH 105503a78d15Sespie lt_cv_dlopen="load_add_on" 105603a78d15Sespie lt_cv_dlopen_libs= 105703a78d15Sespie lt_cv_dlopen_self=yes 105803a78d15Sespie ;; 105903a78d15Sespie 106003a78d15Sespiebsdi4*) 106103a78d15Sespie version_type=linux 106203a78d15Sespie need_version=no 106303a78d15Sespie library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' 106403a78d15Sespie soname_spec='${libname}${release}.so$major' 106503a78d15Sespie finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 106603a78d15Sespie shlibpath_var=LD_LIBRARY_PATH 106703a78d15Sespie sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 106803a78d15Sespie sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 106903a78d15Sespie export_dynamic_flag_spec=-rdynamic 107003a78d15Sespie # the default ld.so.conf also contains /usr/contrib/lib and 107103a78d15Sespie # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 107203a78d15Sespie # libtool to hard-code these into programs 107303a78d15Sespie ;; 107403a78d15Sespie 107503a78d15Sespiecygwin* | mingw* | pw32*) 107603a78d15Sespie version_type=windows 107703a78d15Sespie need_version=no 107803a78d15Sespie need_lib_prefix=no 107903a78d15Sespie case $with_gcc,$host_os in 108003a78d15Sespie yes,cygwin*) 108103a78d15Sespie library_names_spec='$libname.dll.a' 108203a78d15Sespie soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | [sed -e 's/[.]/-/g']`${versuffix}.dll' 108303a78d15Sespie postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i; echo \$dlname'\''`~ 108403a78d15Sespie dldir=$destdir/`dirname \$dlpath`~ 108503a78d15Sespie test -d \$dldir || mkdir -p \$dldir~ 108603a78d15Sespie $install_prog .libs/$dlname \$dldir/$dlname' 108703a78d15Sespie postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~ 108803a78d15Sespie dlpath=$dir/\$dldll; $rm \$dlpath' 108903a78d15Sespie ;; 109003a78d15Sespie yes,mingw*) 109103a78d15Sespie library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll' 109203a78d15Sespie sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"` 109303a78d15Sespie ;; 109403a78d15Sespie yes,pw32*) 109503a78d15Sespie library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll' 109603a78d15Sespie;; 109703a78d15Sespie *) 109803a78d15Sespie library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib' 109903a78d15Sespie ;; 110003a78d15Sespie esac 110103a78d15Sespie dynamic_linker='Win32 ld.exe' 110203a78d15Sespie # FIXME: first we should search . and the directory the executable is in 110303a78d15Sespie shlibpath_var=PATH 110403a78d15Sespie lt_cv_dlopen="LoadLibrary" 110503a78d15Sespie lt_cv_dlopen_libs= 110603a78d15Sespie ;; 110703a78d15Sespie 110803a78d15Sespiedarwin* | rhapsody*) 110903a78d15Sespie dynamic_linker="$host_os dyld" 111003a78d15Sespie version_type=darwin 111103a78d15Sespie need_lib_prefix=no 111203a78d15Sespie need_version=no 111303a78d15Sespie library_names_spec='${libname}${release}${versuffix}.`test .$module = .yes && echo so || echo dylib` ${libname}${release}${major}.$`test .$module = .yes && echo so || echo dylib` ${libname}.`test .$module = .yes && echo so || echo dylib`' 111403a78d15Sespie soname_spec='${libname}${release}${major}.`test .$module = .yes && echo so || echo dylib`' 111503a78d15Sespie shlibpath_overrides_runpath=yes 111603a78d15Sespie shlibpath_var=DYLD_LIBRARY_PATH 111703a78d15Sespie ;; 111803a78d15Sespie 111903a78d15Sespiefreebsd1*) 112003a78d15Sespie dynamic_linker=no 112103a78d15Sespie ;; 112203a78d15Sespie 112303a78d15Sespiefreebsd*) 112403a78d15Sespie objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` 112503a78d15Sespie version_type=freebsd-$objformat 112603a78d15Sespie case $version_type in 112703a78d15Sespie freebsd-elf*) 112803a78d15Sespie library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' 112903a78d15Sespie need_version=no 113003a78d15Sespie need_lc=no 113103a78d15Sespie need_lib_prefix=no 113203a78d15Sespie ;; 113303a78d15Sespie freebsd-*) 113403a78d15Sespie library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix' 113503a78d15Sespie need_version=yes 113603a78d15Sespie ;; 113703a78d15Sespie esac 113803a78d15Sespie shlibpath_var=LD_LIBRARY_PATH 113903a78d15Sespie case $host_os in 114003a78d15Sespie freebsd2*) 114103a78d15Sespie shlibpath_overrides_runpath=yes 114203a78d15Sespie ;; 114303a78d15Sespie *) 114403a78d15Sespie shlibpath_overrides_runpath=no 114503a78d15Sespie hardcode_into_libs=yes 114603a78d15Sespie ;; 114703a78d15Sespie esac 114803a78d15Sespie ;; 114903a78d15Sespie 115003a78d15Sespiegnu*) 115103a78d15Sespie version_type=linux 115203a78d15Sespie need_lib_prefix=no 115303a78d15Sespie need_version=no 115403a78d15Sespie library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so' 115503a78d15Sespie soname_spec='${libname}${release}.so$major' 115603a78d15Sespie shlibpath_var=LD_LIBRARY_PATH 115703a78d15Sespie hardcode_into_libs=yes 115803a78d15Sespie ;; 115903a78d15Sespie 116003a78d15Sespiehpux9* | hpux10* | hpux11*) 116103a78d15Sespie # Give a soname corresponding to the major version so that dld.sl refuses to 116203a78d15Sespie # link against other versions. 116303a78d15Sespie version_type=sunos 116403a78d15Sespie need_lib_prefix=no 116503a78d15Sespie need_version=no 116603a78d15Sespie case "$host_cpu" in 116703a78d15Sespie ia64*) 116803a78d15Sespie dynamic_linker="$host_os dld.so" 116903a78d15Sespie shlibpath_var=LD_LIBRARY_PATH 117003a78d15Sespie library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' 117103a78d15Sespie soname_spec='${libname}${release}.so$major' 117203a78d15Sespie shlibpath_var=LD_LIBRARY_PATH 117303a78d15Sespie shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 117403a78d15Sespie if test "X$HPUX_IA64_MODE" = X32; then 117503a78d15Sespie sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32/usr/local/lib" 117603a78d15Sespie else 117703a78d15Sespie sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 117803a78d15Sespie fi 117903a78d15Sespie sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 118003a78d15Sespie ;; 118103a78d15Sespie *) 118203a78d15Sespie dynamic_linker="$host_os dld.sl" 118303a78d15Sespie shlibpath_var=SHLIB_PATH 118403a78d15Sespie shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 118503a78d15Sespie library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl' 118603a78d15Sespie soname_spec='${libname}${release}.sl$major' 118703a78d15Sespie ;; 118803a78d15Sespie esac 118903a78d15Sespie # HP-UX runs *really* slowly unless shared libraries are mode 555. 119003a78d15Sespie postinstall_cmds='chmod 555 $lib' 119103a78d15Sespie ;; 119203a78d15Sespie 119303a78d15Sespieirix5* | irix6*) 119403a78d15Sespie if test "$with_gnu_ld" = yes; then 119503a78d15Sespie version_type=linux 119603a78d15Sespie else 119703a78d15Sespie version_type=irix 119803a78d15Sespie fi 119903a78d15Sespie version_type=irix 120003a78d15Sespie need_lib_prefix=no 120103a78d15Sespie need_version=no 120203a78d15Sespie soname_spec='${libname}${release}.so$major' 120303a78d15Sespie library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so' 120403a78d15Sespie case $host_os in 120503a78d15Sespie irix5*) 120603a78d15Sespie libsuff= shlibsuff= 120703a78d15Sespie ;; 120803a78d15Sespie *) 120903a78d15Sespie case $LD in # libtool.m4 will add one of these switches to LD 121003a78d15Sespie *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 121103a78d15Sespie libsuff= shlibsuff= libmagic=32-bit;; 121203a78d15Sespie *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 121303a78d15Sespie libsuff=32 shlibsuff=N32 libmagic=N32;; 121403a78d15Sespie *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 121503a78d15Sespie libsuff=64 shlibsuff=64 libmagic=64-bit;; 121603a78d15Sespie *) libsuff= shlibsuff= libmagic=never-match;; 121703a78d15Sespie esac 121803a78d15Sespie ;; 121903a78d15Sespie esac 122003a78d15Sespie shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 122103a78d15Sespie shlibpath_overrides_runpath=no 122203a78d15Sespie sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 122303a78d15Sespie sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 122403a78d15Sespie ;; 122503a78d15Sespie 122603a78d15Sespie# No shared lib support for Linux oldld, aout, or coff. 122703a78d15Sespielinux-gnuoldld* | linux-gnuaout* | linux-gnucoff*) 122803a78d15Sespie dynamic_linker=no 122903a78d15Sespie ;; 123003a78d15Sespie 123103a78d15Sespie# This must be Linux ELF. 123203a78d15Sespielinux-gnu*) 123303a78d15Sespie version_type=linux 123403a78d15Sespie need_lib_prefix=no 123503a78d15Sespie need_version=no 123603a78d15Sespie library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' 123703a78d15Sespie soname_spec='${libname}${release}.so$major' 123803a78d15Sespie finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 123903a78d15Sespie shlibpath_var=LD_LIBRARY_PATH 124003a78d15Sespie shlibpath_overrides_runpath=no 124103a78d15Sespie # This implies no fast_install, which is unacceptable. 124203a78d15Sespie # Some rework will be needed to allow for fast_install 124303a78d15Sespie # before this can be enabled. 124403a78d15Sespie hardcode_into_libs=yes 124503a78d15Sespie 124603a78d15Sespie # We used to test for /lib/ld.so.1 and disable shared libraries on 124703a78d15Sespie # powerpc, because MkLinux only supported shared libraries with the 124803a78d15Sespie # GNU dynamic linker. Since this was broken with cross compilers, 124903a78d15Sespie # most powerpc-linux boxes support dynamic linking these days and 125003a78d15Sespie # people can always --disable-shared, the test was removed, and we 125103a78d15Sespie # assume the GNU/Linux dynamic linker is in use. 125203a78d15Sespie dynamic_linker='GNU/Linux ld.so' 125303a78d15Sespie ;; 125403a78d15Sespie 125503a78d15Sespienetbsd*) 125603a78d15Sespie need_lib_prefix=no 125703a78d15Sespie need_version=no 125803a78d15Sespie version_type=sunos 125903a78d15Sespie if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 126003a78d15Sespie library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' 126103a78d15Sespie finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 126203a78d15Sespie dynamic_linker='NetBSD (a.out) ld.so' 126303a78d15Sespie else 126403a78d15Sespie library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so' 126503a78d15Sespie soname_spec='${libname}${release}.so$major' 126603a78d15Sespie dynamic_linker='NetBSD ld.elf_so' 126703a78d15Sespie fi 126803a78d15Sespie shlibpath_var=LD_LIBRARY_PATH 126903a78d15Sespie shlibpath_overrides_runpath=yes 127003a78d15Sespie hardcode_into_libs=yes 127103a78d15Sespie ;; 127203a78d15Sespie 127303a78d15Sespienewsos6) 127403a78d15Sespie version_type=linux 127503a78d15Sespie library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' 127603a78d15Sespie shlibpath_var=LD_LIBRARY_PATH 127703a78d15Sespie shlibpath_overrides_runpath=yes 127803a78d15Sespie ;; 127903a78d15Sespie 128003a78d15Sespieopenbsd*) 128103a78d15Sespie version_type=sunos 128203a78d15Sespie if test "$with_gnu_ld" = yes; then 128303a78d15Sespie need_lib_prefix=no 128403a78d15Sespie need_version=no 128503a78d15Sespie fi 128603a78d15Sespie library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' 128703a78d15Sespie finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 128803a78d15Sespie shlibpath_var=LD_LIBRARY_PATH 1289*c5bbcf84Sespie shlibpath_overrides_runpath=yes 1290*c5bbcf84Sespie deplib_check_method=pass_all 1291*c5bbcf84Sespie sys_lib_dlsearch_path_spec='/usr/lib /usr/local/lib /usr/X11R6/lib' 129203a78d15Sespie ;; 129303a78d15Sespie 129403a78d15Sespieos2*) 129503a78d15Sespie libname_spec='$name' 129603a78d15Sespie need_lib_prefix=no 129703a78d15Sespie library_names_spec='$libname.dll $libname.a' 129803a78d15Sespie dynamic_linker='OS/2 ld.exe' 129903a78d15Sespie shlibpath_var=LIBPATH 130003a78d15Sespie ;; 130103a78d15Sespie 130203a78d15Sespieosf3* | osf4* | osf5*) 130303a78d15Sespie version_type=osf 130403a78d15Sespie need_version=no 130503a78d15Sespie soname_spec='${libname}${release}.so$major' 130603a78d15Sespie library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' 130703a78d15Sespie shlibpath_var=LD_LIBRARY_PATH 130803a78d15Sespie sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 130903a78d15Sespie sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 131003a78d15Sespie ;; 131103a78d15Sespie 131203a78d15Sespiesco3.2v5*) 131303a78d15Sespie version_type=osf 131403a78d15Sespie soname_spec='${libname}${release}.so$major' 131503a78d15Sespie library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' 131603a78d15Sespie shlibpath_var=LD_LIBRARY_PATH 131703a78d15Sespie ;; 131803a78d15Sespie 131903a78d15Sespiesolaris*) 132003a78d15Sespie version_type=linux 132103a78d15Sespie need_lib_prefix=no 132203a78d15Sespie need_version=no 132303a78d15Sespie library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' 132403a78d15Sespie soname_spec='${libname}${release}.so$major' 132503a78d15Sespie shlibpath_var=LD_LIBRARY_PATH 132603a78d15Sespie shlibpath_overrides_runpath=yes 132703a78d15Sespie hardcode_into_libs=yes 132803a78d15Sespie # ldd complains unless libraries are executable 132903a78d15Sespie postinstall_cmds='chmod +x $lib' 133003a78d15Sespie ;; 133103a78d15Sespie 133203a78d15Sespiesunos4*) 133303a78d15Sespie version_type=sunos 133403a78d15Sespie library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' 133503a78d15Sespie finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 133603a78d15Sespie shlibpath_var=LD_LIBRARY_PATH 133703a78d15Sespie shlibpath_overrides_runpath=yes 133803a78d15Sespie if test "$with_gnu_ld" = yes; then 133903a78d15Sespie need_lib_prefix=no 134003a78d15Sespie fi 134103a78d15Sespie need_version=yes 134203a78d15Sespie ;; 134303a78d15Sespie 134403a78d15Sespiesysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 134503a78d15Sespie version_type=linux 134603a78d15Sespie library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' 134703a78d15Sespie soname_spec='${libname}${release}.so$major' 134803a78d15Sespie shlibpath_var=LD_LIBRARY_PATH 134903a78d15Sespie case $host_vendor in 135003a78d15Sespie motorola) 135103a78d15Sespie need_lib_prefix=no 135203a78d15Sespie need_version=no 135303a78d15Sespie shlibpath_overrides_runpath=no 135403a78d15Sespie sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 135503a78d15Sespie ;; 135603a78d15Sespie esac 135703a78d15Sespie ;; 135803a78d15Sespie 135903a78d15Sespieuts4*) 136003a78d15Sespie version_type=linux 136103a78d15Sespie library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' 136203a78d15Sespie soname_spec='${libname}${release}.so$major' 136303a78d15Sespie shlibpath_var=LD_LIBRARY_PATH 136403a78d15Sespie ;; 136503a78d15Sespie 136603a78d15Sespiedgux*) 136703a78d15Sespie version_type=linux 136803a78d15Sespie need_lib_prefix=no 136903a78d15Sespie need_version=no 137003a78d15Sespie library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' 137103a78d15Sespie soname_spec='${libname}${release}.so$major' 137203a78d15Sespie shlibpath_var=LD_LIBRARY_PATH 137303a78d15Sespie ;; 137403a78d15Sespie 137503a78d15Sespiesysv4*MP*) 137603a78d15Sespie if test -d /usr/nec ;then 137703a78d15Sespie version_type=linux 137803a78d15Sespie library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so' 137903a78d15Sespie soname_spec='$libname.so.$major' 138003a78d15Sespie shlibpath_var=LD_LIBRARY_PATH 138103a78d15Sespie fi 138203a78d15Sespie ;; 138303a78d15Sespie 138403a78d15Sespie*) 138503a78d15Sespie dynamic_linker=no 138603a78d15Sespie ;; 138703a78d15Sespieesac 138803a78d15Sespieecho "$ac_t$dynamic_linker" 1>&6 138903a78d15Sespietest "$dynamic_linker" = no && can_build_shared=no 139003a78d15Sespie 139103a78d15Sespie# Check for command to grab the raw symbol name followed by C symbol from nm. 139203a78d15Sespieecho $ac_n "checking command to parse $NM output... $ac_c" 1>&6 139303a78d15Sespie 139403a78d15Sespie# These are sane defaults that work on at least a few old systems. 139503a78d15Sespie# [They come from Ultrix. What could be older than Ultrix?!! ;)] 139603a78d15Sespie 139703a78d15Sespie# Character class describing NM global symbol codes. 139803a78d15Sespiesymcode='[BCDEGRST]' 139903a78d15Sespie 140003a78d15Sespie# Regexp to match symbols that can be accessed directly from C. 140103a78d15Sespiesympat='\([_A-Za-z][_A-Za-z0-9]*\)' 140203a78d15Sespie 140303a78d15Sespie# Transform the above into a raw symbol and a C symbol. 140403a78d15Sespiesymxfrm='\1 \2\3 \3' 140503a78d15Sespie 140603a78d15Sespie# Transform an extracted symbol line into a proper C declaration 140703a78d15Sespieglobal_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'" 140803a78d15Sespie 140903a78d15Sespie# Define system-specific variables. 141003a78d15Sespiecase $host_os in 141103a78d15Sespieaix*) 141203a78d15Sespie symcode='[BCDT]' 141303a78d15Sespie ;; 141403a78d15Sespiecygwin* | mingw* | pw32*) 141503a78d15Sespie symcode='[ABCDGISTW]' 141603a78d15Sespie ;; 141703a78d15Sespiehpux*) # Its linker distinguishes data from code symbols 141803a78d15Sespie global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 141903a78d15Sespie ;; 142003a78d15Sespieirix*) 142103a78d15Sespie symcode='[BCDEGRST]' 142203a78d15Sespie ;; 142303a78d15Sespiesolaris* | sysv5*) 142403a78d15Sespie symcode='[BDT]' 142503a78d15Sespie ;; 142603a78d15Sespiesysv4) 142703a78d15Sespie symcode='[DFNSTU]' 142803a78d15Sespie ;; 142903a78d15Sespieesac 143003a78d15Sespie 143103a78d15Sespie# Handle CRLF in mingw tool chain 143203a78d15Sespieopt_cr= 143303a78d15Sespiecase $host_os in 143403a78d15Sespiemingw*) 143503a78d15Sespie opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp 143603a78d15Sespie ;; 143703a78d15Sespieesac 143803a78d15Sespie 143903a78d15Sespie# If we're using GNU nm, then use its standard symbol codes. 144003a78d15Sespieif $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then 144103a78d15Sespie symcode='[ABCDGISTW]' 144203a78d15Sespiefi 144303a78d15Sespie 144403a78d15Sespie# Try without a prefix undercore, then with it. 144503a78d15Sespiefor ac_symprfx in "" "_"; do 144603a78d15Sespie 144703a78d15Sespie # Write the raw and C identifiers. 144803a78d15Sespie global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'" 144903a78d15Sespie 145003a78d15Sespie # Check to see that the pipe works correctly. 145103a78d15Sespie pipe_works=no 145203a78d15Sespie $rm conftest* 145303a78d15Sespie cat > conftest.$ac_ext <<EOF 145403a78d15Sespie#ifdef __cplusplus 145503a78d15Sespieextern "C" { 145603a78d15Sespie#endif 145703a78d15Sespiechar nm_test_var; 145803a78d15Sespievoid nm_test_func(){} 145903a78d15Sespie#ifdef __cplusplus 146003a78d15Sespie} 146103a78d15Sespie#endif 146203a78d15Sespieint main(){nm_test_var='a';nm_test_func();return(0);} 146303a78d15SespieEOF 146403a78d15Sespie 146503a78d15Sespie echo "$progname:1431: checking if global_symbol_pipe works" >&5 146603a78d15Sespie if { (eval echo $progname:1432: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then 146703a78d15Sespie # Now try to grab the symbols. 146803a78d15Sespie nlist=conftest.nm 146903a78d15Sespie if { echo "$progname:1435: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then 147003a78d15Sespie 147103a78d15Sespie # Try sorting and uniquifying the output. 147203a78d15Sespie if sort "$nlist" | uniq > "$nlist"T; then 147303a78d15Sespie mv -f "$nlist"T "$nlist" 147403a78d15Sespie else 147503a78d15Sespie rm -f "$nlist"T 147603a78d15Sespie fi 147703a78d15Sespie 147803a78d15Sespie # Make sure that we snagged all the symbols we need. 147903a78d15Sespie if egrep ' nm_test_var$' "$nlist" >/dev/null; then 148003a78d15Sespie if egrep ' nm_test_func$' "$nlist" >/dev/null; then 148103a78d15Sespie cat <<EOF > conftest.$ac_ext 148203a78d15Sespie#ifdef __cplusplus 148303a78d15Sespieextern "C" { 148403a78d15Sespie#endif 148503a78d15Sespie 148603a78d15SespieEOF 148703a78d15Sespie # Now generate the symbol file. 148803a78d15Sespie eval "$global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext' 148903a78d15Sespie 149003a78d15Sespie cat <<EOF >> conftest.$ac_ext 149103a78d15Sespie#if defined (__STDC__) && __STDC__ 149203a78d15Sespie# define lt_ptr_t void * 149303a78d15Sespie#else 149403a78d15Sespie# define lt_ptr_t char * 149503a78d15Sespie# define const 149603a78d15Sespie#endif 149703a78d15Sespie 149803a78d15Sespie/* The mapping between symbol names and symbols. */ 149903a78d15Sespieconst struct { 150003a78d15Sespie const char *name; 150103a78d15Sespie lt_ptr_t address; 150203a78d15Sespie} 150303a78d15Sespielt_preloaded_symbols[] = 150403a78d15Sespie{ 150503a78d15SespieEOF 150603a78d15Sespie sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" >> conftest.$ac_ext 150703a78d15Sespie cat <<\EOF >> conftest.$ac_ext 150803a78d15Sespie {0, (lt_ptr_t) 0} 150903a78d15Sespie}; 151003a78d15Sespie 151103a78d15Sespie#ifdef __cplusplus 151203a78d15Sespie} 151303a78d15Sespie#endif 151403a78d15SespieEOF 151503a78d15Sespie # Now try linking the two files. 151603a78d15Sespie mv conftest.$objext conftstm.$objext 151703a78d15Sespie save_LIBS="$LIBS" 151803a78d15Sespie save_CFLAGS="$CFLAGS" 151903a78d15Sespie LIBS="conftstm.$objext" 152003a78d15Sespie CFLAGS="$CFLAGS$no_builtin_flag" 152103a78d15Sespie if { (eval echo $progname:1487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then 152203a78d15Sespie pipe_works=yes 152303a78d15Sespie else 152403a78d15Sespie echo "$progname: failed program was:" >&5 152503a78d15Sespie cat conftest.$ac_ext >&5 152603a78d15Sespie fi 152703a78d15Sespie LIBS="$save_LIBS" 152803a78d15Sespie else 152903a78d15Sespie echo "cannot find nm_test_func in $nlist" >&5 153003a78d15Sespie fi 153103a78d15Sespie else 153203a78d15Sespie echo "cannot find nm_test_var in $nlist" >&5 153303a78d15Sespie fi 153403a78d15Sespie else 153503a78d15Sespie echo "cannot run $global_symbol_pipe" >&5 153603a78d15Sespie fi 153703a78d15Sespie else 153803a78d15Sespie echo "$progname: failed program was:" >&5 153903a78d15Sespie cat conftest.$ac_ext >&5 154003a78d15Sespie fi 154103a78d15Sespie $rm conftest* conftst* 154203a78d15Sespie 154303a78d15Sespie # Do not use the global_symbol_pipe unless it works. 154403a78d15Sespie if test "$pipe_works" = yes; then 154503a78d15Sespie break 154603a78d15Sespie else 154703a78d15Sespie global_symbol_pipe= 154803a78d15Sespie fi 154903a78d15Sespiedone 155003a78d15Sespieif test "$pipe_works" = yes; then 155103a78d15Sespie echo "${ac_t}ok" 1>&6 155203a78d15Sespieelse 155303a78d15Sespie echo "${ac_t}failed" 1>&6 155403a78d15Sespiefi 155503a78d15Sespie 155603a78d15Sespieif test -z "$global_symbol_pipe"; then 155703a78d15Sespie global_symbol_to_cdecl= 155803a78d15Sespiefi 155903a78d15Sespie 156003a78d15Sespie# Report the final consequences. 156103a78d15Sespieecho "checking if libtool supports shared libraries... $can_build_shared" 1>&6 156203a78d15Sespie 156303a78d15Sespie# Only try to build win32 dlls if AC_LIBTOOL_WIN32_DLL was used in 156403a78d15Sespie# configure.in, otherwise build static only libraries. 156503a78d15Sespiecase $host_os in 156603a78d15Sespiecygwin* | mingw* | pw32* | os2*) 156703a78d15Sespie if test x$can_build_shared = xyes; then 156803a78d15Sespie test x$enable_win32_dll = xno && can_build_shared=no 156903a78d15Sespie echo "checking if package supports dlls... $can_build_shared" 1>&6 157003a78d15Sespie fi 157103a78d15Sespie;; 157203a78d15Sespieesac 157303a78d15Sespie 157403a78d15Sespieecho $ac_n "checking whether to build shared libraries... $ac_c" 1>&6 157503a78d15Sespietest "$can_build_shared" = "no" && enable_shared=no 157603a78d15Sespie 157703a78d15Sespie# On AIX, shared libraries and static libraries use the same namespace, and 157803a78d15Sespie# are all built from PIC. 157903a78d15Sespiecase $host_os in 158003a78d15Sespieaix3*) 158103a78d15Sespie test "$enable_shared" = yes && enable_static=no 158203a78d15Sespie if test -n "$RANLIB"; then 158303a78d15Sespie archive_cmds="$archive_cmds~\$RANLIB \$lib" 158403a78d15Sespie postinstall_cmds='$RANLIB $lib' 158503a78d15Sespie fi 158603a78d15Sespie ;; 158703a78d15Sespie 158803a78d15Sespieaix4*) 158903a78d15Sespie test "$enable_shared" = yes && enable_static=no 159003a78d15Sespie ;; 159103a78d15Sespieesac 159203a78d15Sespie 159303a78d15Sespieecho "$ac_t$enable_shared" 1>&6 159403a78d15Sespie 159503a78d15Sespie# Make sure either enable_shared or enable_static is yes. 159603a78d15Sespietest "$enable_shared" = yes || enable_static=yes 159703a78d15Sespie 159803a78d15Sespieecho "checking whether to build static libraries... $enable_static" 1>&6 159903a78d15Sespie 160003a78d15Sespieif test "$hardcode_action" = relink; then 160103a78d15Sespie # Fast installation is not supported 160203a78d15Sespie enable_fast_install=no 160303a78d15Sespieelif test "$shlibpath_overrides_runpath" = yes || 160403a78d15Sespie test "$enable_shared" = no; then 160503a78d15Sespie # Fast installation is not necessary 160603a78d15Sespie enable_fast_install=needless 160703a78d15Sespiefi 160803a78d15Sespie 160903a78d15Sespievariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 161003a78d15Sespieif test "$with_gcc" = yes; then 161103a78d15Sespie variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 161203a78d15Sespiefi 161303a78d15Sespie 161403a78d15Sespie# Check whether we must set pic_mode to default 161503a78d15Sespietest -z "$pic_flag" && pic_mode=default 161603a78d15Sespie 161703a78d15Sespieif test "x$enable_dlopen" != xyes; then 161803a78d15Sespie enable_dlopen=unknown 161903a78d15Sespie enable_dlopen_self=unknown 162003a78d15Sespie enable_dlopen_self_static=unknown 162103a78d15Sespieelse 162203a78d15Sespieif test "X${lt_cv_dlopen+set}" != Xset; then 162303a78d15Sespie lt_cv_dlopen=no lt_cv_dlopen_libs= 162403a78d15Sespieecho $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 162503a78d15Sespieecho "$progname:1591: checking for dlopen in -ldl" >&5 162603a78d15Sespieif test "X${ac_cv_lib_dl_dlopen+set}" = Xset; then 162703a78d15Sespie echo $ac_n "(cached) $ac_c" 1>&6 162803a78d15Sespieelse 162903a78d15Sespie ac_save_LIBS="$LIBS" 163003a78d15SespieLIBS="-ldl $LIBS" 163103a78d15Sespiecat > conftest.$ac_ext <<EOF 163203a78d15Sespie#line 1598 "ltconfig" 163303a78d15Sespie/* Override any gcc2 internal prototype to avoid an error. */ 163403a78d15Sespie/* We use char because int might match the return type of a gcc2 163503a78d15Sespie builtin and then its argument prototype would still apply. */ 163603a78d15Sespie#ifdef __cplusplus 163703a78d15Sespieextern "C" 163803a78d15Sespie#endif 163903a78d15Sespiechar dlopen(); 164003a78d15Sespie 164103a78d15Sespieint main() { 164203a78d15Sespiedlopen() 164303a78d15Sespie; return 0; } 164403a78d15SespieEOF 164503a78d15Sespieif { (eval echo $progname:1611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 164603a78d15Sespie rm -rf conftest* 164703a78d15Sespie ac_cv_lib_dl_dlopen=yes 164803a78d15Sespieelse 164903a78d15Sespie echo "$progname: failed program was:" >&5 165003a78d15Sespie cat conftest.$ac_ext >&5 165103a78d15Sespie rm -rf conftest* 165203a78d15Sespie ac_cv_lib_dl_dlopen=no 165303a78d15Sespiefi 165403a78d15Sespierm -f conftest* 165503a78d15SespieLIBS="$ac_save_LIBS" 165603a78d15Sespie 165703a78d15Sespiefi 165803a78d15Sespieif test "X$ac_cv_lib_dl_dlopen" = Xyes; then 165903a78d15Sespie echo "$ac_t""yes" 1>&6 166003a78d15Sespie lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" 166103a78d15Sespieelse 166203a78d15Sespie echo "$ac_t""no" 1>&6 166303a78d15Sespieecho $ac_n "checking for dlopen""... $ac_c" 1>&6 166403a78d15Sespieecho "$progname:1630: checking for dlopen" >&5 166503a78d15Sespieif test "X${ac_cv_func_dlopen+set}" = Xset; then 166603a78d15Sespie echo $ac_n "(cached) $ac_c" 1>&6 166703a78d15Sespieelse 166803a78d15Sespie cat > conftest.$ac_ext <<EOF 166903a78d15Sespie#line 1635 "ltconfig" 167003a78d15Sespie/* System header to define __stub macros and hopefully few prototypes, 167103a78d15Sespie which can conflict with char dlopen(); below. */ 167203a78d15Sespie#include <assert.h> 167303a78d15Sespie/* Override any gcc2 internal prototype to avoid an error. */ 167403a78d15Sespie/* We use char because int might match the return type of a gcc2 167503a78d15Sespie builtin and then its argument prototype would still apply. */ 167603a78d15Sespie#ifdef __cplusplus 167703a78d15Sespieextern "C" 167803a78d15Sespie#endif 167903a78d15Sespiechar dlopen(); 168003a78d15Sespie 168103a78d15Sespieint main() { 168203a78d15Sespie 168303a78d15Sespie/* The GNU C library defines this for functions which it implements 168403a78d15Sespie to always fail with ENOSYS. Some functions are actually named 168503a78d15Sespie something starting with __ and the normal name is an alias. */ 168603a78d15Sespie#if defined (__stub_dlopen) || defined (__stub___dlopen) 168703a78d15Sespiechoke me 168803a78d15Sespie#else 168903a78d15Sespiedlopen(); 169003a78d15Sespie#endif 169103a78d15Sespie 169203a78d15Sespie; return 0; } 169303a78d15SespieEOF 169403a78d15Sespieif { (eval echo $progname:1660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 169503a78d15Sespie rm -rf conftest* 169603a78d15Sespie ac_cv_func_dlopen=yes 169703a78d15Sespieelse 169803a78d15Sespie echo "$progname: failed program was:" >&5 169903a78d15Sespie cat conftest.$ac_ext >&5 170003a78d15Sespie rm -rf conftest* 170103a78d15Sespie ac_cv_func_dlopen=no 170203a78d15Sespiefi 170303a78d15Sespierm -f conftest* 170403a78d15Sespiefi 170503a78d15Sespieif test "X$ac_cv_func_dlopen" = Xyes; then 170603a78d15Sespie echo "$ac_t""yes" 1>&6 170703a78d15Sespie lt_cv_dlopen="dlopen" 170803a78d15Sespieelse 170903a78d15Sespie echo "$ac_t""no" 1>&6 171003a78d15Sespieecho $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6 171103a78d15Sespieecho "$progname:1677: checking for dlopen in -lsvld" >&5 171203a78d15Sespieif test "X${ac_cv_lib_svld_dlopen+set}" = Xset; then 171303a78d15Sespie echo $ac_n "(cached) $ac_c" 1>&6 171403a78d15Sespieelse 171503a78d15Sespie ac_save_LIBS="$LIBS" 171603a78d15SespieLIBS="-lsvld $LIBS" 171703a78d15Sespiecat > conftest.$ac_ext <<EOF 171803a78d15Sespie#line 1684 "ltconfig" 171903a78d15Sespie/* Override any gcc2 internal prototype to avoid an error. */ 172003a78d15Sespie/* We use char because int might match the return type of a gcc2 172103a78d15Sespie builtin and then its argument prototype would still apply. */ 172203a78d15Sespie#ifdef __cplusplus 172303a78d15Sespieextern "C" 172403a78d15Sespie#endif 172503a78d15Sespiechar dlopen(); 172603a78d15Sespie 172703a78d15Sespieint main() { 172803a78d15Sespiedlopen() 172903a78d15Sespie; return 0; } 173003a78d15SespieEOF 173103a78d15Sespieif { (eval echo $progname:1697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 173203a78d15Sespie rm -rf conftest* 173303a78d15Sespie ac_cv_lib_svld_dlopen=yes 173403a78d15Sespieelse 173503a78d15Sespie echo "$progname: failed program was:" >&5 173603a78d15Sespie cat conftest.$ac_ext >&5 173703a78d15Sespie rm -rf conftest* 173803a78d15Sespie ac_cv_lib_svld_dlopen=no 173903a78d15Sespiefi 174003a78d15Sespierm -f conftest* 174103a78d15SespieLIBS="$ac_save_LIBS" 174203a78d15Sespie 174303a78d15Sespiefi 174403a78d15Sespieif test "X$ac_cv_lib_svld_dlopen" = Xyes; then 174503a78d15Sespie echo "$ac_t""yes" 1>&6 174603a78d15Sespie lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" 174703a78d15Sespieelse 174803a78d15Sespie echo "$ac_t""no" 1>&6 174903a78d15Sespieecho $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6 175003a78d15Sespieecho "$progname:1716: checking for dld_link in -ldld" >&5 175103a78d15Sespieif test "X${ac_cv_lib_dld_dld_link+set}" = Xset; then 175203a78d15Sespie echo $ac_n "(cached) $ac_c" 1>&6 175303a78d15Sespieelse 175403a78d15Sespie ac_save_LIBS="$LIBS" 175503a78d15SespieLIBS="-ldld $LIBS" 175603a78d15Sespiecat > conftest.$ac_ext <<EOF 175703a78d15Sespie#line 1723 "ltconfig" 175803a78d15Sespie/* Override any gcc2 internal prototype to avoid an error. */ 175903a78d15Sespie/* We use char because int might match the return type of a gcc2 176003a78d15Sespie builtin and then its argument prototype would still apply. */ 176103a78d15Sespie#ifdef __cplusplus 176203a78d15Sespieextern "C" 176303a78d15Sespie#endif 176403a78d15Sespiechar dld_link(); 176503a78d15Sespie 176603a78d15Sespieint main() { 176703a78d15Sespiedld_link() 176803a78d15Sespie; return 0; } 176903a78d15SespieEOF 177003a78d15Sespieif { (eval echo $progname:1736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 177103a78d15Sespie rm -rf conftest* 177203a78d15Sespie ac_cv_lib_dld_dld_link=yes 177303a78d15Sespieelse 177403a78d15Sespie echo "$progname: failed program was:" >&5 177503a78d15Sespie cat conftest.$ac_ext >&5 177603a78d15Sespie rm -rf conftest* 177703a78d15Sespie ac_cv_lib_dld_dld_link=no 177803a78d15Sespiefi 177903a78d15Sespierm -f conftest* 178003a78d15SespieLIBS="$ac_save_LIBS" 178103a78d15Sespie 178203a78d15Sespiefi 178303a78d15Sespieif test "X$ac_cv_lib_dld_dld_link" = Xyes; then 178403a78d15Sespie echo "$ac_t""yes" 1>&6 178503a78d15Sespie lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" 178603a78d15Sespieelse 178703a78d15Sespie echo "$ac_t""no" 1>&6 178803a78d15Sespieecho $ac_n "checking for shl_load""... $ac_c" 1>&6 178903a78d15Sespieecho "$progname:1755: checking for shl_load" >&5 179003a78d15Sespieif test "X${ac_cv_func_shl_load+set}" = Xset; then 179103a78d15Sespie echo $ac_n "(cached) $ac_c" 1>&6 179203a78d15Sespieelse 179303a78d15Sespie cat > conftest.$ac_ext <<EOF 179403a78d15Sespie#line 1760 "ltconfig" 179503a78d15Sespie/* System header to define __stub macros and hopefully few prototypes, 179603a78d15Sespie which can conflict with char shl_load(); below. */ 179703a78d15Sespie#include <assert.h> 179803a78d15Sespie/* Override any gcc2 internal prototype to avoid an error. */ 179903a78d15Sespie/* We use char because int might match the return type of a gcc2 180003a78d15Sespie builtin and then its argument prototype would still apply. */ 180103a78d15Sespie#ifdef __cplusplus 180203a78d15Sespieextern "C" 180303a78d15Sespie#endif 180403a78d15Sespiechar shl_load(); 180503a78d15Sespie 180603a78d15Sespieint main() { 180703a78d15Sespie 180803a78d15Sespie/* The GNU C library defines this for functions which it implements 180903a78d15Sespie to always fail with ENOSYS. Some functions are actually named 181003a78d15Sespie something starting with __ and the normal name is an alias. */ 181103a78d15Sespie#if defined (__stub_shl_load) || defined (__stub___shl_load) 181203a78d15Sespiechoke me 181303a78d15Sespie#else 181403a78d15Sespieshl_load(); 181503a78d15Sespie#endif 181603a78d15Sespie 181703a78d15Sespie; return 0; } 181803a78d15SespieEOF 181903a78d15Sespieif { (eval echo $progname:1785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 182003a78d15Sespie rm -rf conftest* 182103a78d15Sespie ac_cv_func_shl_load=yes 182203a78d15Sespieelse 182303a78d15Sespie echo "$progname: failed program was:" >&5 182403a78d15Sespie cat conftest.$ac_ext >&5 182503a78d15Sespie rm -rf conftest* 182603a78d15Sespie ac_cv_func_shl_load=no 182703a78d15Sespiefi 182803a78d15Sespierm -f conftest* 182903a78d15Sespiefi 183003a78d15Sespie 183103a78d15Sespieif test "X$ac_cv_func_shl_load" = Xyes; then 183203a78d15Sespie echo "$ac_t""yes" 1>&6 183303a78d15Sespie lt_cv_dlopen="shl_load" 183403a78d15Sespieelse 183503a78d15Sespie echo "$ac_t""no" 1>&6 183603a78d15Sespieecho $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 183703a78d15Sespieecho "$progname:1803: checking for shl_load in -ldld" >&5 183803a78d15Sespieif test "X${ac_cv_lib_dld_shl_load+set}" = Xset; then 183903a78d15Sespie echo $ac_n "(cached) $ac_c" 1>&6 184003a78d15Sespieelse 184103a78d15Sespie ac_save_LIBS="$LIBS" 184203a78d15SespieLIBS="-ldld $LIBS" 184303a78d15Sespiecat > conftest.$ac_ext <<EOF 184403a78d15Sespie#line 1810 "ltconfig" 184503a78d15Sespie#include "confdefs.h" 184603a78d15Sespie/* Override any gcc2 internal prototype to avoid an error. */ 184703a78d15Sespie/* We use char because int might match the return type of a gcc2 184803a78d15Sespie builtin and then its argument prototype would still apply. */ 184903a78d15Sespie#ifdef __cplusplus 185003a78d15Sespieextern "C" 185103a78d15Sespie#endif 185203a78d15Sespiechar shl_load(); 185303a78d15Sespie 185403a78d15Sespieint main() { 185503a78d15Sespieshl_load() 185603a78d15Sespie; return 0; } 185703a78d15SespieEOF 185803a78d15Sespieif { (eval echo $progname:1824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 185903a78d15Sespie rm -rf conftest* 186003a78d15Sespie ac_cv_lib_dld_shl_load=yes 186103a78d15Sespieelse 186203a78d15Sespie echo "$progname: failed program was:" >&5 186303a78d15Sespie cat conftest.$ac_ext >&5 186403a78d15Sespie rm -rf conftest* 186503a78d15Sespie ac_cv_lib_dld_shl_load=no 186603a78d15Sespiefi 186703a78d15Sespierm -f conftest* 186803a78d15SespieLIBS="$ac_save_LIBS" 186903a78d15Sespie 187003a78d15Sespiefi 187103a78d15Sespieif test "X$ac_cv_lib_dld_shl_load" = Xyes; then 187203a78d15Sespie echo "$ac_t""yes" 1>&6 187303a78d15Sespie lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" 187403a78d15Sespieelse 187503a78d15Sespie echo "$ac_t""no" 1>&6 187603a78d15Sespiefi 187703a78d15Sespie 187803a78d15Sespie 187903a78d15Sespiefi 188003a78d15Sespie 188103a78d15Sespie 188203a78d15Sespiefi 188303a78d15Sespie 188403a78d15Sespie 188503a78d15Sespiefi 188603a78d15Sespie 188703a78d15Sespie 188803a78d15Sespiefi 188903a78d15Sespie 189003a78d15Sespiefi 189103a78d15Sespie 189203a78d15Sespiefi 189303a78d15Sespie 189403a78d15Sespie if test "x$lt_cv_dlopen" != xno; then 189503a78d15Sespie enable_dlopen=yes 189603a78d15Sespie else 189703a78d15Sespie enable_dlopen=no 189803a78d15Sespie fi 189903a78d15Sespie 190003a78d15Sespie case $lt_cv_dlopen in 190103a78d15Sespie dlopen) 190203a78d15Sespiefor ac_hdr in dlfcn.h; do 190303a78d15Sespieac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` 190403a78d15Sespieecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 190503a78d15Sespieecho "$progname:1871: checking for $ac_hdr" >&5 190603a78d15Sespieif eval "test \"`echo 'X$''{'ac_cv_header_$ac_safe'+set}'`\" = Xset"; then 190703a78d15Sespie echo $ac_n "(cached) $ac_c" 1>&6 190803a78d15Sespieelse 190903a78d15Sespie cat > conftest.$ac_ext <<EOF 191003a78d15Sespie#line 1876 "ltconfig" 191103a78d15Sespie#include <$ac_hdr> 191203a78d15Sespieint fnord = 0; 191303a78d15Sespieint main () { return(0); } 191403a78d15SespieEOF 191503a78d15Sespieac_try="$ac_compile >/dev/null 2>conftest.out" 191603a78d15Sespie{ (eval echo $progname:1882: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 191703a78d15Sespieac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 191803a78d15Sespieif test -z "$ac_err"; then 191903a78d15Sespie rm -rf conftest* 192003a78d15Sespie eval "ac_cv_header_$ac_safe=yes" 192103a78d15Sespieelse 192203a78d15Sespie echo "$ac_err" >&5 192303a78d15Sespie echo "$progname: failed program was:" >&5 192403a78d15Sespie cat conftest.$ac_ext >&5 192503a78d15Sespie rm -rf conftest* 192603a78d15Sespie eval "ac_cv_header_$ac_safe=no" 192703a78d15Sespiefi 192803a78d15Sespierm -f conftest* 192903a78d15Sespiefi 193003a78d15Sespieif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then 193103a78d15Sespie echo "$ac_t""yes" 1>&6 193203a78d15Sespieelse 193303a78d15Sespie echo "$ac_t""no" 1>&6 193403a78d15Sespiefi 193503a78d15Sespiedone 193603a78d15Sespie 193703a78d15Sespie if test "x$ac_cv_header_dlfcn_h" = xyes; then 193803a78d15Sespie CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 193903a78d15Sespie fi 194003a78d15Sespie eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 194103a78d15Sespie LIBS="$lt_cv_dlopen_libs $LIBS" 194203a78d15Sespie 194303a78d15Sespie echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6 194403a78d15Sespieecho "$progname:1910: checking whether a program can dlopen itself" >&5 194503a78d15Sespieif test "X${lt_cv_dlopen_self+set}" = Xset; then 194603a78d15Sespie echo $ac_n "(cached) $ac_c" 1>&6 194703a78d15Sespieelse 194803a78d15Sespie if test "$cross_compiling" = yes; then 194903a78d15Sespie lt_cv_dlopen_self=cross 195003a78d15Sespie else 195103a78d15Sespie cat > conftest.$ac_ext <<EOF 195203a78d15Sespie#line 1918 "ltconfig" 195303a78d15Sespie 195403a78d15Sespie#if HAVE_DLFCN_H 195503a78d15Sespie#include <dlfcn.h> 195603a78d15Sespie#endif 195703a78d15Sespie 195803a78d15Sespie#include <stdio.h> 195903a78d15Sespie 196003a78d15Sespie#ifdef RTLD_GLOBAL 196103a78d15Sespie# define LTDL_GLOBAL RTLD_GLOBAL 196203a78d15Sespie#else 196303a78d15Sespie# ifdef DL_GLOBAL 196403a78d15Sespie# define LTDL_GLOBAL DL_GLOBAL 196503a78d15Sespie# else 196603a78d15Sespie# define LTDL_GLOBAL 0 196703a78d15Sespie# endif 196803a78d15Sespie#endif 196903a78d15Sespie 197003a78d15Sespie/* We may have to define LTDL_LAZY_OR_NOW in the command line if we 197103a78d15Sespie find out it does not work in some platform. */ 197203a78d15Sespie#ifndef LTDL_LAZY_OR_NOW 197303a78d15Sespie# ifdef RTLD_LAZY 197403a78d15Sespie# define LTDL_LAZY_OR_NOW RTLD_LAZY 197503a78d15Sespie# else 197603a78d15Sespie# ifdef DL_LAZY 197703a78d15Sespie# define LTDL_LAZY_OR_NOW DL_LAZY 197803a78d15Sespie# else 197903a78d15Sespie# ifdef RTLD_NOW 198003a78d15Sespie# define LTDL_LAZY_OR_NOW RTLD_NOW 198103a78d15Sespie# else 198203a78d15Sespie# ifdef DL_NOW 198303a78d15Sespie# define LTDL_LAZY_OR_NOW DL_NOW 198403a78d15Sespie# else 198503a78d15Sespie# define LTDL_LAZY_OR_NOW 0 198603a78d15Sespie# endif 198703a78d15Sespie# endif 198803a78d15Sespie# endif 198903a78d15Sespie# endif 199003a78d15Sespie#endif 199103a78d15Sespie 199203a78d15Sespievoid fnord() { int i=42; } 199303a78d15Sespieint main() { 199403a78d15Sespie void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW); 199503a78d15Sespie if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord"); 199603a78d15Sespie if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); } 199703a78d15Sespie 199803a78d15SespieEOF 199903a78d15Sespieif { (eval echo $progname:1965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null 200003a78d15Sespiethen 200103a78d15Sespie lt_cv_dlopen_self=yes 200203a78d15Sespieelse 200303a78d15Sespie echo "$progname: failed program was:" >&5 200403a78d15Sespie cat conftest.$ac_ext >&5 200503a78d15Sespie rm -fr conftest* 200603a78d15Sespie lt_cv_dlopen_self=no 200703a78d15Sespiefi 200803a78d15Sespierm -fr conftest* 200903a78d15Sespiefi 201003a78d15Sespie 201103a78d15Sespiefi 201203a78d15Sespie 201303a78d15Sespieecho "$ac_t""$lt_cv_dlopen_self" 1>&6 201403a78d15Sespie 201503a78d15Sespie if test "$lt_cv_dlopen_self" = yes; then 201603a78d15Sespie LDFLAGS="$LDFLAGS $link_static_flag" 201703a78d15Sespie echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6 201803a78d15Sespieecho "$progname:1984: checking whether a statically linked program can dlopen itself" >&5 201903a78d15Sespieif test "X${lt_cv_dlopen_self_static+set}" = Xset; then 202003a78d15Sespie echo $ac_n "(cached) $ac_c" 1>&6 202103a78d15Sespieelse 202203a78d15Sespie if test "$cross_compiling" = yes; then 202303a78d15Sespie lt_cv_dlopen_self_static=cross 202403a78d15Sespie else 202503a78d15Sespie cat > conftest.$ac_ext <<EOF 202603a78d15Sespie#line 1992 "ltconfig" 202703a78d15Sespie 202803a78d15Sespie#if HAVE_DLFCN_H 202903a78d15Sespie#include <dlfcn.h> 203003a78d15Sespie#endif 203103a78d15Sespie 203203a78d15Sespie#include <stdio.h> 203303a78d15Sespie 203403a78d15Sespie#ifdef RTLD_GLOBAL 203503a78d15Sespie# define LTDL_GLOBAL RTLD_GLOBAL 203603a78d15Sespie#else 203703a78d15Sespie# ifdef DL_GLOBAL 203803a78d15Sespie# define LTDL_GLOBAL DL_GLOBAL 203903a78d15Sespie# else 204003a78d15Sespie# define LTDL_GLOBAL 0 204103a78d15Sespie# endif 204203a78d15Sespie#endif 204303a78d15Sespie 204403a78d15Sespie/* We may have to define LTDL_LAZY_OR_NOW in the command line if we 204503a78d15Sespie find out it does not work in some platform. */ 204603a78d15Sespie#ifndef LTDL_LAZY_OR_NOW 204703a78d15Sespie# ifdef RTLD_LAZY 204803a78d15Sespie# define LTDL_LAZY_OR_NOW RTLD_LAZY 204903a78d15Sespie# else 205003a78d15Sespie# ifdef DL_LAZY 205103a78d15Sespie# define LTDL_LAZY_OR_NOW DL_LAZY 205203a78d15Sespie# else 205303a78d15Sespie# ifdef RTLD_NOW 205403a78d15Sespie# define LTDL_LAZY_OR_NOW RTLD_NOW 205503a78d15Sespie# else 205603a78d15Sespie# ifdef DL_NOW 205703a78d15Sespie# define LTDL_LAZY_OR_NOW DL_NOW 205803a78d15Sespie# else 205903a78d15Sespie# define LTDL_LAZY_OR_NOW 0 206003a78d15Sespie# endif 206103a78d15Sespie# endif 206203a78d15Sespie# endif 206303a78d15Sespie# endif 206403a78d15Sespie#endif 206503a78d15Sespie 206603a78d15Sespievoid fnord() { int i=42; } 206703a78d15Sespieint main() { 206803a78d15Sespie void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW); 206903a78d15Sespie if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord"); 207003a78d15Sespie if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); } 207103a78d15Sespie 207203a78d15SespieEOF 207303a78d15Sespieif { (eval echo $progname:2039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null 207403a78d15Sespiethen 207503a78d15Sespie lt_cv_dlopen_self_static=yes 207603a78d15Sespieelse 207703a78d15Sespie echo "$progname: failed program was:" >&5 207803a78d15Sespie cat conftest.$ac_ext >&5 207903a78d15Sespie rm -fr conftest* 208003a78d15Sespie lt_cv_dlopen_self_static=no 208103a78d15Sespiefi 208203a78d15Sespierm -fr conftest* 208303a78d15Sespiefi 208403a78d15Sespie 208503a78d15Sespiefi 208603a78d15Sespie 208703a78d15Sespieecho "$ac_t""$lt_cv_dlopen_self_static" 1>&6 208803a78d15Sespiefi 208903a78d15Sespie ;; 209003a78d15Sespie esac 209103a78d15Sespie 209203a78d15Sespie case $lt_cv_dlopen_self in 209303a78d15Sespie yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 209403a78d15Sespie *) enable_dlopen_self=unknown ;; 209503a78d15Sespie esac 209603a78d15Sespie 209703a78d15Sespie case $lt_cv_dlopen_self_static in 209803a78d15Sespie yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 209903a78d15Sespie *) enable_dlopen_self_static=unknown ;; 210003a78d15Sespie esac 210103a78d15Sespiefi 210203a78d15Sespie 210303a78d15Sespie# Copy echo and quote the copy, instead of the original, because it is 210403a78d15Sespie# used later. 210503a78d15Sespieltecho="$echo" 210603a78d15Sespieif test "X$ltecho" = "X$CONFIG_SHELL $0 --fallback-echo"; then 210703a78d15Sespie ltecho="$CONFIG_SHELL \$0 --fallback-echo" 210803a78d15Sespiefi 210903a78d15SespieLTSHELL="$SHELL" 211003a78d15Sespie 211103a78d15SespieLTCONFIG_VERSION="$VERSION" 211203a78d15Sespie 211303a78d15Sespie# Only quote variables if we're using ltmain.sh. 211403a78d15Sespiecase $ltmain in 211503a78d15Sespie*.sh) 211603a78d15Sespie # Now quote all the things that may contain metacharacters. 211703a78d15Sespie for var in ltecho old_AR old_AR_FLAGS old_CC old_LTCC old_CFLAGS old_CPPFLAGS \ 211803a78d15Sespie old_MAGIC_CMD old_LD old_LDFLAGS old_LIBS \ 211903a78d15Sespie old_LN_S old_NM old_RANLIB old_STRIP \ 212003a78d15Sespie old_AS old_DLLTOOL old_OBJDUMP \ 212103a78d15Sespie old_OBJEXT old_EXEEXT old_reload_flag \ 212203a78d15Sespie old_deplibs_check_method old_file_magic_cmd \ 212303a78d15Sespie AR AR_FLAGS CC LTCC LD LN_S NM LTSHELL LTCONFIG_VERSION \ 212403a78d15Sespie reload_flag reload_cmds wl \ 212503a78d15Sespie pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \ 212603a78d15Sespie thread_safe_flag_spec whole_archive_flag_spec libname_spec \ 212703a78d15Sespie library_names_spec soname_spec \ 212803a78d15Sespie RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \ 212903a78d15Sespie old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \ 213003a78d15Sespie postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \ 213103a78d15Sespie predep_objects postdep_objects predeps postdeps compiler_lib_search_path \ 213203a78d15Sespie old_striplib striplib file_magic_cmd export_symbols_cmds \ 213303a78d15Sespie deplibs_check_method allow_undefined_flag no_undefined_flag \ 213403a78d15Sespie finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \ 213503a78d15Sespie hardcode_libdir_flag_spec hardcode_libdir_separator \ 213603a78d15Sespie sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ 213703a78d15Sespie compiler_c_o need_locks exclude_expsyms include_expsyms; do 213803a78d15Sespie 213903a78d15Sespie case $var in 214003a78d15Sespie reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \ 214103a78d15Sespie old_postinstall_cmds | old_postuninstall_cmds | \ 214203a78d15Sespie export_symbols_cmds | archive_cmds | archive_expsym_cmds | \ 214303a78d15Sespie extract_expsyms_cmds | old_archive_from_expsyms_cmds | \ 214403a78d15Sespie postinstall_cmds | postuninstall_cmds | \ 214503a78d15Sespie finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) 214603a78d15Sespie # Double-quote double-evaled strings. 214703a78d15Sespie eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ### testsuite: skip nested quoting test 214803a78d15Sespie ;; 214903a78d15Sespie *) 215003a78d15Sespie eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ### testsuite: skip nested quoting test 215103a78d15Sespie ;; 215203a78d15Sespie esac 215303a78d15Sespie done 215403a78d15Sespie 215503a78d15Sespie case $ltecho in 215603a78d15Sespie *'\$0 --fallback-echo"') 215703a78d15Sespie ltecho=`$echo "X$ltecho" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` 215803a78d15Sespie ;; 215903a78d15Sespie esac 216003a78d15Sespie 216103a78d15Sespie if test -z "$tagname"; then 216203a78d15Sespie trap "$rm \"$ofile\"; exit 1" 1 2 15 216303a78d15Sespie echo "creating $ofile" 216403a78d15Sespie $rm "$ofile" 216503a78d15Sespie cat <<EOF > "$ofile" 216603a78d15Sespie#! $SHELL 216703a78d15Sespie 216803a78d15Sespie# `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 216903a78d15Sespie# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) 217003a78d15Sespie# NOTE: Changes made to this file will be lost: look at ltconfig or ltmain.sh. 217103a78d15Sespie# 217203a78d15Sespie# Copyright (C) 1996-2000 Free Software Foundation, Inc. 217303a78d15Sespie# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 217403a78d15Sespie# 217503a78d15Sespie# This program is free software; you can redistribute it and/or modify 217603a78d15Sespie# it under the terms of the GNU General Public License as published by 217703a78d15Sespie# the Free Software Foundation; either version 2 of the License, or 217803a78d15Sespie# (at your option) any later version. 217903a78d15Sespie# 218003a78d15Sespie# This program is distributed in the hope that it will be useful, but 218103a78d15Sespie# WITHOUT ANY WARRANTY; without even the implied warranty of 218203a78d15Sespie# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 218303a78d15Sespie# General Public License for more details. 218403a78d15Sespie# 218503a78d15Sespie# You should have received a copy of the GNU General Public License 218603a78d15Sespie# along with this program; if not, write to the Free Software 218703a78d15Sespie# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 218803a78d15Sespie# 218903a78d15Sespie# As a special exception to the GNU General Public License, if you 219003a78d15Sespie# distribute this file as part of a program that contains a 219103a78d15Sespie# configuration script generated by Autoconf, you may include it under 219203a78d15Sespie# the same distribution terms that you use for the rest of that program. 219303a78d15Sespie 219403a78d15Sespie# Sed that helps us avoid accidentally triggering echo(1) options like -n. 219503a78d15SespieXsed="sed -e s/^X//" 219603a78d15Sespie 219703a78d15Sespie# The HP-UX ksh and POSIX shell print the target directory to stdout 219803a78d15Sespie# if CDPATH is set. 219903a78d15Sespieif test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi 220003a78d15Sespie 220103a78d15Sespie# The names of the tagged configurations supported by this script. 220203a78d15Sespieavailable_tags= 220303a78d15Sespie 220403a78d15Sespie### BEGIN LIBTOOL CONFIG 220503a78d15SespieEOF 220603a78d15Sespie else 220703a78d15Sespie echo "appending configuration tag \"$tagname\" to $ofile" 220803a78d15Sespie echo "### BEGIN LIBTOOL TAG CONFIG: $tagname" >> "$ofile" 220903a78d15Sespie fi 221003a78d15Sespie cfgfile="$ofile" 221103a78d15Sespie ;; 221203a78d15Sespie 221303a78d15Sespie*) 221403a78d15Sespie # Double-quote the variables that need it (for aesthetics). 221503a78d15Sespie for var in old_AR old_AR_FLAGS old_CC old_LTCC old_CFLAGS old_CPPFLAGS \ 221603a78d15Sespie old_MAGIC_CMD old_LD old_LDFLAGS old_LIBS \ 221703a78d15Sespie old_LN_S old_NM old_RANLIB old_STRIP \ 221803a78d15Sespie old_AS old_DLLTOOL old_OBJDUMP \ 221903a78d15Sespie old_OBJEXT old_EXEEXT old_reload_flag \ 222003a78d15Sespie old_deplibs_check_method old_file_magic_cmd; do 222103a78d15Sespie eval "$var=\\\"\$var\\\"" 222203a78d15Sespie done 222303a78d15Sespie 222403a78d15Sespie # Just create a config file. 222503a78d15Sespie cfgfile="$ofile.cfg" 222603a78d15Sespie if test -z "$tagname"; then 222703a78d15Sespie trap "$rm \"$cfgfile\"; exit 1" 1 2 15 222803a78d15Sespie echo "creating $cfgfile" 222903a78d15Sespie $rm "$cfgfile" 223003a78d15Sespie cat <<EOF > "$cfgfile" 223103a78d15Sespie# `$echo "$cfgfile" | sed 's%^.*/%%'` - Libtool configuration file. 223203a78d15Sespie# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) 223303a78d15Sespie 223403a78d15Sespie### BEGIN LIBTOOL CONFIG 223503a78d15SespieEOF 223603a78d15Sespie else 223703a78d15Sespie echo "appending to $cfgfile" 223803a78d15Sespie echo "### BEGIN LIBTOOL TAG CONFIG: $tagname" >> "$ofile" 223903a78d15Sespie fi 224003a78d15Sespie ;; 224103a78d15Sespieesac 224203a78d15Sespie 224303a78d15Sespiecat <<EOF >> "$cfgfile" 224403a78d15Sespie# Libtool was configured as follows, on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 224503a78d15Sespie# 224603a78d15Sespie# AR=$old_AR AR_FLAGS=$old_AR_FLAGS LTCC=$old_LTCC CC=$old_CC \\ 224703a78d15Sespie# CFLAGS=$old_CFLAGS CPPFLAGS=$old_CPPFLAGS \\ 224803a78d15Sespie# MAGIC_CMD=$old_MAGIC_CMD LD=$old_LD LDFLAGS=$old_LDFLAGS LIBS=$old_LIBS \\ 224903a78d15Sespie# LN_S=$old_LN_S NM=$old_NM RANLIB=$old_RANLIB STRIP=$old_STRIP \\ 225003a78d15Sespie# AS=$old_AS DLLTOOL=$old_DLLTOOL OBJDUMP=$old_OBJDUMP \\ 225103a78d15Sespie# objext=$old_OBJEXT exeext=$old_EXEEXT reload_flag=$old_reload_flag \\ 225203a78d15Sespie# deplibs_check_method=$old_deplibs_check_method \\ 225303a78d15Sespie# file_magic_cmd=$old_file_magic_cmd \\ 225403a78d15Sespie# $0$ltconfig_args 225503a78d15Sespie# 225603a78d15Sespie# Compiler and other test output produced by $progname, useful for 225703a78d15Sespie# debugging $progname, is in ./config.log if it exists. 225803a78d15Sespie 225903a78d15Sespie# The version of $progname that generated this script. 226003a78d15SespieLTCONFIG_VERSION=$LTCONFIG_VERSION 226103a78d15Sespie 226203a78d15Sespie# Shell to use when invoking shell scripts. 226303a78d15SespieSHELL=$LTSHELL 226403a78d15Sespie 226503a78d15Sespie# Whether or not to build shared libraries. 226603a78d15Sespiebuild_libtool_libs=$enable_shared 226703a78d15Sespie 226803a78d15Sespie# Whether or not to add -lc for building shared libraries. 226903a78d15Sespiebuild_libtool_need_lc=$need_lc 227003a78d15Sespie 227103a78d15Sespie# Whether or not to build static libraries. 227203a78d15Sespiebuild_old_libs=$enable_static 227303a78d15Sespie 227403a78d15Sespie# Whether or not to optimize for fast installation. 227503a78d15Sespiefast_install=$enable_fast_install 227603a78d15Sespie 227703a78d15Sespie# The host system. 227803a78d15Sespiehost_alias=$host_alias 227903a78d15Sespiehost=$host 228003a78d15Sespie 228103a78d15Sespie# An echo program that does not interpret backslashes. 228203a78d15Sespieecho=$ltecho 228303a78d15Sespie 228403a78d15Sespie# The archiver. 228503a78d15SespieAR=$AR 228603a78d15SespieAR_FLAGS=$AR_FLAGS 228703a78d15Sespie 228803a78d15Sespie# A C compiler. 228903a78d15SespieLTCC=$LTCC 229003a78d15Sespie 229103a78d15Sespie# A language-specific compiler. 229203a78d15SespieCC=$CC 229303a78d15Sespie 229403a78d15Sespie# Is the compiler the GNU C compiler? 229503a78d15Sespiewith_gcc=$with_gcc 229603a78d15Sespie 229703a78d15Sespie# The linker used to build libraries. 229803a78d15SespieLD=$LD 229903a78d15Sespie 230003a78d15Sespie# Whether we need hard or soft links. 230103a78d15SespieLN_S=$LN_S 230203a78d15Sespie 230303a78d15Sespie# A BSD-compatible nm program. 230403a78d15SespieNM=$NM 230503a78d15Sespie 230603a78d15Sespie# A symbol stripping program 230703a78d15SespieSTRIP=$STRIP 230803a78d15Sespie 230903a78d15Sespie# Used to examine libraries when file_magic_cmd begins "file" 231003a78d15SespieMAGIC_CMD=$MAGIC_CMD 231103a78d15Sespie 231203a78d15Sespie# Used on cygwin: DLL creation program. 231303a78d15SespieDLLTOOL="$DLLTOOL" 231403a78d15Sespie 231503a78d15Sespie# Used on cygwin: object dumper. 231603a78d15SespieOBJDUMP="$OBJDUMP" 231703a78d15Sespie 231803a78d15Sespie# Used on cygwin: assembler. 231903a78d15SespieAS="$AS" 232003a78d15Sespie 232103a78d15Sespie# The name of the directory that contains temporary libtool files. 232203a78d15Sespieobjdir=$objdir 232303a78d15Sespie 232403a78d15Sespie# How to create reloadable object files. 232503a78d15Sespiereload_flag=$reload_flag 232603a78d15Sespiereload_cmds=$reload_cmds 232703a78d15Sespie 232803a78d15Sespie# How to pass a linker flag through the compiler. 232903a78d15Sespiewl=$wl 233003a78d15Sespie 233103a78d15Sespie# Object file suffix (normally "o"). 233203a78d15Sespieobjext="$objext" 233303a78d15Sespie 233403a78d15Sespie# Old archive suffix (normally "a"). 233503a78d15Sespielibext="$libext" 233603a78d15Sespie 233703a78d15Sespie# Executable file suffix (normally ""). 233803a78d15Sespieexeext="$exeext" 233903a78d15Sespie 234003a78d15Sespie# Additional compiler flags for building library objects. 234103a78d15Sespiepic_flag=$pic_flag 234203a78d15Sespiepic_mode=$pic_mode 234303a78d15Sespie 234403a78d15Sespie# What is the maximum length of a command? 234503a78d15Sespiemax_cmd_len=$max_cmd_len 234603a78d15Sespie 234703a78d15Sespie# Does compiler simultaneously support -c and -o options? 234803a78d15Sespiecompiler_c_o=$compiler_c_o 234903a78d15Sespie 235003a78d15Sespie# Must we lock files when doing compilation ? 235103a78d15Sespieneed_locks=$need_locks 235203a78d15Sespie 235303a78d15Sespie# Do we need the lib prefix for modules? 235403a78d15Sespieneed_lib_prefix=$need_lib_prefix 235503a78d15Sespie 235603a78d15Sespie# Do we need a version for libraries? 235703a78d15Sespieneed_version=$need_version 235803a78d15Sespie 235903a78d15Sespie# Whether dlopen is supported. 236003a78d15Sespiedlopen_support=$enable_dlopen 236103a78d15Sespie 236203a78d15Sespie# Whether dlopen of programs is supported. 236303a78d15Sespiedlopen_self=$enable_dlopen_self 236403a78d15Sespie 236503a78d15Sespie# Whether dlopen of statically linked programs is supported. 236603a78d15Sespiedlopen_self_static=$enable_dlopen_self_static 236703a78d15Sespie 236803a78d15Sespie# Compiler flag to prevent dynamic linking. 236903a78d15Sespielink_static_flag=$link_static_flag 237003a78d15Sespie 237103a78d15Sespie# Compiler flag to turn off builtin functions. 237203a78d15Sespieno_builtin_flag=$no_builtin_flag 237303a78d15Sespie 237403a78d15Sespie# Compiler flag to allow reflexive dlopens. 237503a78d15Sespieexport_dynamic_flag_spec=$export_dynamic_flag_spec 237603a78d15Sespie 237703a78d15Sespie# Compiler flag to generate shared objects directly from archives. 237803a78d15Sespiewhole_archive_flag_spec=$whole_archive_flag_spec 237903a78d15Sespie 238003a78d15Sespie# Compiler flag to generate thread-safe objects. 238103a78d15Sespiethread_safe_flag_spec=$thread_safe_flag_spec 238203a78d15Sespie 238303a78d15Sespie# Library versioning type. 238403a78d15Sespieversion_type=$version_type 238503a78d15Sespie 238603a78d15Sespie# Format of library name prefix. 238703a78d15Sespielibname_spec=$libname_spec 238803a78d15Sespie 238903a78d15Sespie# List of archive names. First name is the real one, the rest are links. 239003a78d15Sespie# The last name is the one that the linker finds with -lNAME. 239103a78d15Sespielibrary_names_spec=$library_names_spec 239203a78d15Sespie 239303a78d15Sespie# The coded name of the library, if different from the real name. 239403a78d15Sespiesoname_spec=$soname_spec 239503a78d15Sespie 239603a78d15Sespie# Commands used to build and install an old-style archive. 239703a78d15SespieRANLIB=$RANLIB 239803a78d15Sespieold_archive_cmds=$old_archive_cmds 239903a78d15Sespieold_postinstall_cmds=$old_postinstall_cmds 240003a78d15Sespieold_postuninstall_cmds=$old_postuninstall_cmds 240103a78d15Sespie 240203a78d15Sespie# Create an old-style archive from a shared archive. 240303a78d15Sespieold_archive_from_new_cmds=$old_archive_from_new_cmds 240403a78d15Sespie 240503a78d15Sespie# Create a temporary old-style archive to link instead of a shared archive. 240603a78d15Sespieold_archive_from_expsyms_cmds=$old_archive_from_expsyms_cmds 240703a78d15Sespie 240803a78d15Sespie# Commands used to build and install a shared archive. 240903a78d15Sespiearchive_cmds=$archive_cmds 241003a78d15Sespiearchive_expsym_cmds=$archive_expsym_cmds 241103a78d15Sespiepostinstall_cmds=$postinstall_cmds 241203a78d15Sespiepostuninstall_cmds=$postuninstall_cmds 241303a78d15Sespie 241403a78d15Sespie# Commands to strip libraries. 241503a78d15Sespieold_striplib=$old_striplib 241603a78d15Sespiestriplib=$striplib 241703a78d15Sespie 241803a78d15Sespie# Dependencies to place before the objects being linked to create a 241903a78d15Sespie# shared library. 242003a78d15Sespiepredep_objects=$predep_objects 242103a78d15Sespie 242203a78d15Sespie# Dependencies to place after the objects being linked to create a 242303a78d15Sespie# shared library. 242403a78d15Sespiepostdep_objects=$postdep_objects 242503a78d15Sespie 242603a78d15Sespie# Dependencies to place before the objects being linked to create a 242703a78d15Sespie# shared library. 242803a78d15Sespiepredeps=$predeps 242903a78d15Sespie 243003a78d15Sespie# Dependencies to place after the objects being linked to create a 243103a78d15Sespie# shared library. 243203a78d15Sespiepostdeps=$postdeps 243303a78d15Sespie 243403a78d15Sespie# The library search path used internally by the compiler when linking 243503a78d15Sespie# a shared library. 243603a78d15Sespiecompiler_lib_search_path=$compiler_lib_search_path 243703a78d15Sespie 243803a78d15Sespie# Method to check whether dependent libraries are shared objects. 243903a78d15Sespiedeplibs_check_method=$deplibs_check_method 244003a78d15Sespie 244103a78d15Sespie# Command to use when deplibs_check_method == file_magic. 244203a78d15Sespiefile_magic_cmd=$file_magic_cmd 244303a78d15Sespie 244403a78d15Sespie# Flag that allows shared libraries with undefined symbols to be built. 244503a78d15Sespieallow_undefined_flag=$allow_undefined_flag 244603a78d15Sespie 244703a78d15Sespie# Flag that forces no undefined symbols. 244803a78d15Sespieno_undefined_flag=$no_undefined_flag 244903a78d15Sespie 245003a78d15Sespie# Commands used to finish a libtool library installation in a directory. 245103a78d15Sespiefinish_cmds=$finish_cmds 245203a78d15Sespie 245303a78d15Sespie# Same as above, but a single script fragment to be evaled but not shown. 245403a78d15Sespiefinish_eval=$finish_eval 245503a78d15Sespie 245603a78d15Sespie# Take the output of nm and produce a listing of raw symbols and C names. 245703a78d15Sespieglobal_symbol_pipe=$global_symbol_pipe 245803a78d15Sespie 245903a78d15Sespie# Transform the output of nm in a proper C declaration 246003a78d15Sespieglobal_symbol_to_cdecl=$global_symbol_to_cdecl 246103a78d15Sespie 246203a78d15Sespie# This is the shared library runtime path variable. 246303a78d15Sespierunpath_var=$runpath_var 246403a78d15Sespie 246503a78d15Sespie# This is the shared library path variable. 246603a78d15Sespieshlibpath_var=$shlibpath_var 246703a78d15Sespie 246803a78d15Sespie# Is shlibpath searched before the hard-coded library search path? 246903a78d15Sespieshlibpath_overrides_runpath=$shlibpath_overrides_runpath 247003a78d15Sespie 247103a78d15Sespie# How to hardcode a shared library path into an executable. 247203a78d15Sespiehardcode_action=$hardcode_action 247303a78d15Sespie 247403a78d15Sespie# Whether we should hardcode library paths into libraries. 247503a78d15Sespiehardcode_into_libs=$hardcode_into_libs 247603a78d15Sespie 247703a78d15Sespie# Flag to hardcode \$libdir into a binary during linking. 247803a78d15Sespie# This must work even if \$libdir does not exist. 247903a78d15Sespiehardcode_libdir_flag_spec=$hardcode_libdir_flag_spec 248003a78d15Sespie 248103a78d15Sespie# Whether we need a single -rpath flag with a separated argument. 248203a78d15Sespiehardcode_libdir_separator=$hardcode_libdir_separator 248303a78d15Sespie 248403a78d15Sespie# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the 248503a78d15Sespie# resulting binary. 248603a78d15Sespiehardcode_direct=$hardcode_direct 248703a78d15Sespie 248803a78d15Sespie# Set to yes if using the -LDIR flag during linking hardcodes DIR into the 248903a78d15Sespie# resulting binary. 249003a78d15Sespiehardcode_minus_L=$hardcode_minus_L 249103a78d15Sespie 249203a78d15Sespie# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into 249303a78d15Sespie# the resulting binary. 249403a78d15Sespiehardcode_shlibpath_var=$hardcode_shlibpath_var 249503a78d15Sespie 249603a78d15Sespie# Variables whose values should be saved in libtool wrapper scripts and 249703a78d15Sespie# restored at relink time. 249803a78d15Sespievariables_saved_for_relink="$variables_saved_for_relink" 249903a78d15Sespie 250003a78d15Sespie# Whether libtool must link a program against all its dependency libraries. 250103a78d15Sespielink_all_deplibs=$link_all_deplibs 250203a78d15Sespie 250303a78d15Sespie# Compile-time system search path for libraries 250403a78d15Sespiesys_lib_search_path_spec=$sys_lib_search_path_spec 250503a78d15Sespie 250603a78d15Sespie# Run-time system search path for libraries 250703a78d15Sespiesys_lib_dlsearch_path_spec=$sys_lib_dlsearch_path_spec 250803a78d15Sespie 250903a78d15Sespie# Fix the shell variable \$srcfile for the compiler. 251003a78d15Sespiefix_srcfile_path="$fix_srcfile_path" 251103a78d15Sespie 251203a78d15Sespie# Set to yes if exported symbols are required. 251303a78d15Sespiealways_export_symbols=$always_export_symbols 251403a78d15Sespie 251503a78d15Sespie# The commands to list exported symbols. 251603a78d15Sespieexport_symbols_cmds=$export_symbols_cmds 251703a78d15Sespie 251803a78d15Sespie# The commands to extract the exported symbol list from a shared archive. 251903a78d15Sespieextract_expsyms_cmds=$extract_expsyms_cmds 252003a78d15Sespie 252103a78d15Sespie# Symbols that should not be listed in the preloaded symbols. 252203a78d15Sespieexclude_expsyms=$exclude_expsyms 252303a78d15Sespie 252403a78d15Sespie# Symbols that must always be exported. 252503a78d15Sespieinclude_expsyms=$include_expsyms 252603a78d15Sespie 252703a78d15SespieEOF 252803a78d15Sespie 252903a78d15Sespieif test -z "$tagname"; then 253003a78d15Sespie echo '### END LIBTOOL CONFIG' >> "$ofile" 253103a78d15Sespieelse 253203a78d15Sespie echo "### END LIBTOOL TAG CONFIG: $tagname" >> "$ofile" 253303a78d15Sespiefi 253403a78d15Sespie 253503a78d15Sespiecase $ltmain in 253603a78d15Sespie*.sh) 253703a78d15Sespie echo >> "$ofile" 253803a78d15Sespie if test -z "$tagname"; then 253903a78d15Sespie case $host_os in 254003a78d15Sespie aix3*) 254103a78d15Sespie cat <<\EOF >> "$ofile" 254203a78d15Sespie 254303a78d15Sespie# AIX sometimes has problems with the GCC collect2 program. For some 254403a78d15Sespie# reason, if we set the COLLECT_NAMES environment variable, the problems 254503a78d15Sespie# vanish in a puff of smoke. 254603a78d15Sespieif test "X${COLLECT_NAMES+set}" != Xset; then 254703a78d15Sespie COLLECT_NAMES= 254803a78d15Sespie export COLLECT_NAMES 254903a78d15Sespiefi 255003a78d15SespieEOF 255103a78d15Sespie ;; 255203a78d15Sespie esac 255303a78d15Sespie case $host in 255403a78d15Sespie *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) 255503a78d15Sespie cat <<'EOF' >> "$ofile" 255603a78d15Sespie # This is a source program that is used to create dlls on Windows 255703a78d15Sespie # Don't remove nor modify the starting and closing comments 255803a78d15Sespie# /* ltdll.c starts here */ 255903a78d15Sespie# #define WIN32_LEAN_AND_MEAN 256003a78d15Sespie# #include <windows.h> 256103a78d15Sespie# #undef WIN32_LEAN_AND_MEAN 256203a78d15Sespie# #include <stdio.h> 256303a78d15Sespie# 256403a78d15Sespie# #ifndef __CYGWIN__ 256503a78d15Sespie# # ifdef __CYGWIN32__ 256603a78d15Sespie# # define __CYGWIN__ __CYGWIN32__ 256703a78d15Sespie# # endif 256803a78d15Sespie# #endif 256903a78d15Sespie# 257003a78d15Sespie# #ifdef __cplusplus 257103a78d15Sespie# extern "C" { 257203a78d15Sespie# #endif 257303a78d15Sespie# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); 257403a78d15Sespie# #ifdef __cplusplus 257503a78d15Sespie# } 257603a78d15Sespie# #endif 257703a78d15Sespie# 257803a78d15Sespie# #ifdef __CYGWIN__ 257903a78d15Sespie# #include <cygwin/cygwin_dll.h> 258003a78d15Sespie# DECLARE_CYGWIN_DLL( DllMain ); 258103a78d15Sespie# #endif 258203a78d15Sespie# HINSTANCE __hDllInstance_base; 258303a78d15Sespie# 258403a78d15Sespie# BOOL APIENTRY 258503a78d15Sespie# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) 258603a78d15Sespie# { 258703a78d15Sespie# __hDllInstance_base = hInst; 258803a78d15Sespie# return TRUE; 258903a78d15Sespie# } 259003a78d15Sespie# /* ltdll.c ends here */ 259103a78d15Sespie # This is a source program that is used to create import libraries 259203a78d15Sespie # on Windows for dlls which lack them. Don't remove nor modify the 259303a78d15Sespie # starting and closing comments 259403a78d15Sespie# /* impgen.c starts here */ 259503a78d15Sespie# /* Copyright (C) 1999-2000 Free Software Foundation, Inc. 259603a78d15Sespie# 259703a78d15Sespie# This file is part of GNU libtool. 259803a78d15Sespie# 259903a78d15Sespie# This program is free software; you can redistribute it and/or modify 260003a78d15Sespie# it under the terms of the GNU General Public License as published by 260103a78d15Sespie# the Free Software Foundation; either version 2 of the License, or 260203a78d15Sespie# (at your option) any later version. 260303a78d15Sespie# 260403a78d15Sespie# This program is distributed in the hope that it will be useful, 260503a78d15Sespie# but WITHOUT ANY WARRANTY; without even the implied warranty of 260603a78d15Sespie# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 260703a78d15Sespie# GNU General Public License for more details. 260803a78d15Sespie# 260903a78d15Sespie# You should have received a copy of the GNU General Public License 261003a78d15Sespie# along with this program; if not, write to the Free Software 261103a78d15Sespie# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 261203a78d15Sespie# */ 261303a78d15Sespie# 261403a78d15Sespie# #include <stdio.h> /* for printf() */ 261503a78d15Sespie# #include <unistd.h> /* for open(), lseek(), read() */ 261603a78d15Sespie# #include <fcntl.h> /* for O_RDONLY, O_BINARY */ 261703a78d15Sespie# #include <string.h> /* for strdup() */ 261803a78d15Sespie# 261903a78d15Sespie# /* O_BINARY isn't required (or even defined sometimes) under Unix */ 262003a78d15Sespie# #ifndef O_BINARY 262103a78d15Sespie# #define O_BINARY 0 262203a78d15Sespie# #endif 262303a78d15Sespie# 262403a78d15Sespie# static unsigned int 262503a78d15Sespie# pe_get16 (fd, offset) 262603a78d15Sespie# int fd; 262703a78d15Sespie# int offset; 262803a78d15Sespie# { 262903a78d15Sespie# unsigned char b[2]; 263003a78d15Sespie# lseek (fd, offset, SEEK_SET); 263103a78d15Sespie# read (fd, b, 2); 263203a78d15Sespie# return b[0] + (b[1]<<8); 263303a78d15Sespie# } 263403a78d15Sespie# 263503a78d15Sespie# static unsigned int 263603a78d15Sespie# pe_get32 (fd, offset) 263703a78d15Sespie# int fd; 263803a78d15Sespie# int offset; 263903a78d15Sespie# { 264003a78d15Sespie# unsigned char b[4]; 264103a78d15Sespie# lseek (fd, offset, SEEK_SET); 264203a78d15Sespie# read (fd, b, 4); 264303a78d15Sespie# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); 264403a78d15Sespie# } 264503a78d15Sespie# 264603a78d15Sespie# static unsigned int 264703a78d15Sespie# pe_as32 (ptr) 264803a78d15Sespie# void *ptr; 264903a78d15Sespie# { 265003a78d15Sespie# unsigned char *b = ptr; 265103a78d15Sespie# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); 265203a78d15Sespie# } 265303a78d15Sespie# 265403a78d15Sespie# int 265503a78d15Sespie# main (argc, argv) 265603a78d15Sespie# int argc; 265703a78d15Sespie# char *argv[]; 265803a78d15Sespie# { 265903a78d15Sespie# int dll; 266003a78d15Sespie# unsigned long pe_header_offset, opthdr_ofs, num_entries, i; 266103a78d15Sespie# unsigned long export_rva, export_size, nsections, secptr, expptr; 266203a78d15Sespie# unsigned long name_rvas, nexp; 266303a78d15Sespie# unsigned char *expdata, *erva; 266403a78d15Sespie# char *filename, *dll_name; 266503a78d15Sespie# 266603a78d15Sespie# filename = argv[1]; 266703a78d15Sespie# 266803a78d15Sespie# dll = open(filename, O_RDONLY|O_BINARY); 266903a78d15Sespie# if (dll < 1) 267003a78d15Sespie# return 1; 267103a78d15Sespie# 267203a78d15Sespie# dll_name = filename; 267303a78d15Sespie# 267403a78d15Sespie# for (i=0; filename[i]; i++) 267503a78d15Sespie# if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':') 267603a78d15Sespie# dll_name = filename + i +1; 267703a78d15Sespie# 267803a78d15Sespie# pe_header_offset = pe_get32 (dll, 0x3c); 267903a78d15Sespie# opthdr_ofs = pe_header_offset + 4 + 20; 268003a78d15Sespie# num_entries = pe_get32 (dll, opthdr_ofs + 92); 268103a78d15Sespie# 268203a78d15Sespie# if (num_entries < 1) /* no exports */ 268303a78d15Sespie# return 1; 268403a78d15Sespie# 268503a78d15Sespie# export_rva = pe_get32 (dll, opthdr_ofs + 96); 268603a78d15Sespie# export_size = pe_get32 (dll, opthdr_ofs + 100); 268703a78d15Sespie# nsections = pe_get16 (dll, pe_header_offset + 4 +2); 268803a78d15Sespie# secptr = (pe_header_offset + 4 + 20 + 268903a78d15Sespie# pe_get16 (dll, pe_header_offset + 4 + 16)); 269003a78d15Sespie# 269103a78d15Sespie# expptr = 0; 269203a78d15Sespie# for (i = 0; i < nsections; i++) 269303a78d15Sespie# { 269403a78d15Sespie# char sname[8]; 269503a78d15Sespie# unsigned long secptr1 = secptr + 40 * i; 269603a78d15Sespie# unsigned long vaddr = pe_get32 (dll, secptr1 + 12); 269703a78d15Sespie# unsigned long vsize = pe_get32 (dll, secptr1 + 16); 269803a78d15Sespie# unsigned long fptr = pe_get32 (dll, secptr1 + 20); 269903a78d15Sespie# lseek(dll, secptr1, SEEK_SET); 270003a78d15Sespie# read(dll, sname, 8); 270103a78d15Sespie# if (vaddr <= export_rva && vaddr+vsize > export_rva) 270203a78d15Sespie# { 270303a78d15Sespie# expptr = fptr + (export_rva - vaddr); 270403a78d15Sespie# if (export_rva + export_size > vaddr + vsize) 270503a78d15Sespie# export_size = vsize - (export_rva - vaddr); 270603a78d15Sespie# break; 270703a78d15Sespie# } 270803a78d15Sespie# } 270903a78d15Sespie# 271003a78d15Sespie# expdata = (unsigned char*)malloc(export_size); 271103a78d15Sespie# lseek (dll, expptr, SEEK_SET); 271203a78d15Sespie# read (dll, expdata, export_size); 271303a78d15Sespie# erva = expdata - export_rva; 271403a78d15Sespie# 271503a78d15Sespie# nexp = pe_as32 (expdata+24); 271603a78d15Sespie# name_rvas = pe_as32 (expdata+32); 271703a78d15Sespie# 271803a78d15Sespie# printf ("EXPORTS\n"); 271903a78d15Sespie# for (i = 0; i<nexp; i++) 272003a78d15Sespie# { 272103a78d15Sespie# unsigned long name_rva = pe_as32 (erva+name_rvas+i*4); 272203a78d15Sespie# printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i); 272303a78d15Sespie# } 272403a78d15Sespie# 272503a78d15Sespie# return 0; 272603a78d15Sespie# } 272703a78d15Sespie# /* impgen.c ends here */ 272803a78d15Sespie 272903a78d15SespieEOF 273003a78d15Sespie ;; 273103a78d15Sespie esac 273203a78d15Sespie 273303a78d15Sespie 273403a78d15Sespie # Append the ltmain.sh script. 273503a78d15Sespie sed '$q' "$ltmain" >> "$ofile" || (rm -f "$ofile"; exit 1) 273603a78d15Sespie # We use sed instead of cat because bash on DJGPP gets confused if 273703a78d15Sespie # if finds mixed CR/LF and LF-only lines. Since sed operates in 273803a78d15Sespie # text mode, it properly converts lines to CR/LF. This bash problem 273903a78d15Sespie # is reportedly fixed, but why not run on old versions too? 274003a78d15Sespie 274103a78d15Sespie chmod +x "$ofile" 274203a78d15Sespie fi 274303a78d15Sespie ;; 274403a78d15Sespie 274503a78d15Sespie*) 274603a78d15Sespie # Compile the libtool program. 274703a78d15Sespie echo "FIXME: would compile $ltmain" 274803a78d15Sespie ;; 274903a78d15Sespieesac 275003a78d15Sespie 275103a78d15Sespie# Update the list of available tags. 275203a78d15Sespieif test -n "$tagname"; then 275303a78d15Sespie 275403a78d15Sespie # Extract list of available tagged configurations in $ofile. 275503a78d15Sespie # Note that this assumes the entire list is on one line. 275603a78d15Sespie available_tags=`grep "^available_tags=" $ofile | sed -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` 275703a78d15Sespie 275803a78d15Sespie # Append the new tag name to the list of available tags. 275903a78d15Sespie available_tags="$available_tags $tagname" 276003a78d15Sespie 276103a78d15Sespie # Now substitute the updated of available tags. 276203a78d15Sespie if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' ${ofile} > ${ofile}.new"; then 276303a78d15Sespie mv ${ofile}.new ${ofile} 276403a78d15Sespie chmod +x "$ofile" 276503a78d15Sespie else 276603a78d15Sespie rm -f ${ofile}.new 276703a78d15Sespie echo "$progname: unable to update list of available tagged configurations." 276803a78d15Sespie exit 1 276903a78d15Sespie fi 277003a78d15Sespiefi 277103a78d15Sespie 277203a78d15Sespie# Don't cache tagged configuration! 277303a78d15Sespietest -n "$cache_file" && test -z "$tagname" || exit 0 277403a78d15Sespie 277503a78d15Sespie# AC_CACHE_SAVE 277603a78d15Sespietrap '' 1 2 15 277703a78d15Sespiecat > confcache <<\EOF 277803a78d15Sespie# This file is a shell script that caches the results of configure 277903a78d15Sespie# tests run on this system so they can be shared between configure 278003a78d15Sespie# scripts and configure runs. It is not useful on other systems. 278103a78d15Sespie# If it contains results you don't want to keep, you may remove or edit it. 278203a78d15Sespie# 278303a78d15Sespie# By default, configure uses ./config.cache as the cache file, 278403a78d15Sespie# creating it if it does not exist already. You can give configure 278503a78d15Sespie# the --cache-file=FILE option to use a different cache file; that is 278603a78d15Sespie# what configure does when it calls configure scripts in 278703a78d15Sespie# subdirectories, so they share the cache. 278803a78d15Sespie# Giving --cache-file=/dev/null disables caching, for debugging configure. 278903a78d15Sespie# config.status only pays attention to the cache file if you give it the 279003a78d15Sespie# --recheck option to rerun configure. 279103a78d15Sespie# 279203a78d15SespieEOF 279303a78d15Sespie# The following way of writing the cache mishandles newlines in values, 279403a78d15Sespie# but we know of no workaround that is simple, portable, and efficient. 279503a78d15Sespie# So, don't put newlines in cache variables' values. 279603a78d15Sespie# Ultrix sh set writes to stderr and can't be redirected directly, 279703a78d15Sespie# and sets the high bit in the cache file unless we assign to the vars. 279803a78d15Sespie(set) 2>&1 | 279903a78d15Sespie case `(ac_space=' '; set | grep ac_space) 2>&1` in 280003a78d15Sespie *ac_space=\ *) 280103a78d15Sespie # `set' does not quote correctly, so add quotes (double-quote substitution 280203a78d15Sespie # turns \\\\ into \\, and sed turns \\ into \). 280303a78d15Sespie sed -n \ 280403a78d15Sespie -e "s/'/'\\\\''/g" \ 280503a78d15Sespie -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" 280603a78d15Sespie ;; 280703a78d15Sespie *) 280803a78d15Sespie # `set' quotes correctly as required by POSIX, so do not add quotes. 280903a78d15Sespie sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' 281003a78d15Sespie ;; 281103a78d15Sespie esac >> confcache 281203a78d15Sespieif cmp -s $cache_file confcache; then 281303a78d15Sespie : 281403a78d15Sespieelse 281503a78d15Sespie if test -w $cache_file; then 281603a78d15Sespie echo "updating cache $cache_file" 281703a78d15Sespie cat confcache > $cache_file 281803a78d15Sespie else 281903a78d15Sespie echo "not updating unwritable cache $cache_file" 282003a78d15Sespie fi 282103a78d15Sespiefi 282203a78d15Sespierm -f confcache 282303a78d15Sespie 282403a78d15Sespieexit 0 282503a78d15Sespie 282603a78d15Sespie# Local Variables: 282703a78d15Sespie# mode:shell-script 282803a78d15Sespie# sh-indentation:2 282903a78d15Sespie# End: 2830