joachim99@2: #! /bin/sh joachim99@2: joachim99@2: # ltconfig - Create a system-specific libtool. joachim99@2: # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 joachim99@2: # Free Software Foundation, Inc. joachim99@2: # Originally by Gordon Matzigkeit , 1996 joachim99@2: # joachim99@2: # This file is free software; you can redistribute it and/or modify it joachim99@2: # under the terms of the GNU General Public License as published by joachim99@2: # the Free Software Foundation; either version 2 of the License, or joachim99@2: # (at your option) any later version. joachim99@2: # joachim99@2: # This program is distributed in the hope that it will be useful, but joachim99@2: # WITHOUT ANY WARRANTY; without even the implied warranty of joachim99@2: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU joachim99@2: # General Public License for more details. joachim99@2: # joachim99@2: # You should have received a copy of the GNU General Public License joachim99@2: # along with this program; if not, write to the Free Software joachim99@2: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. joachim99@2: # joachim99@2: # As a special exception to the GNU General Public License, if you joachim99@2: # distribute this file as part of a program that contains a joachim99@2: # configuration script generated by Autoconf, you may include it under joachim99@2: # the same distribution terms that you use for the rest of that program. joachim99@2: joachim99@2: # A lot of this script is taken from autoconf-2.10. joachim99@2: joachim99@2: # Check that we are running under the correct shell. joachim99@2: SHELL=${CONFIG_SHELL-/bin/sh} joachim99@2: echo=echo joachim99@2: if test "X$1" = X--no-reexec; then joachim99@2: # Discard the --no-reexec flag, and continue. joachim99@2: shift joachim99@2: elif test "X$1" = X--fallback-echo; then joachim99@2: # Avoid inline document here, it may be left over joachim99@2: : joachim99@2: elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then joachim99@2: # Yippee, $echo works! joachim99@2: : joachim99@2: else joachim99@2: # Restart under the correct shell. joachim99@2: exec "$SHELL" "$0" --no-reexec ${1+"$@"} joachim99@2: fi joachim99@2: joachim99@2: if test "X$1" = X--fallback-echo; then joachim99@2: # used as fallback echo joachim99@2: shift joachim99@2: cat </dev/null`} joachim99@2: case X$UNAME in joachim99@2: *-DOS) PATH_SEPARATOR=';' ;; joachim99@2: *) PATH_SEPARATOR=':' ;; joachim99@2: esac joachim99@2: fi joachim99@2: joachim99@2: # The HP-UX ksh and POSIX shell print the target directory to stdout joachim99@2: # if CDPATH is set. joachim99@2: if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi joachim99@2: joachim99@2: if test "X${echo_test_string+set}" != Xset; then joachim99@2: # find a string as large as possible, as long as the shell can cope with it joachim99@2: for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do joachim99@2: # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... joachim99@2: if (echo_test_string="`eval $cmd`") 2>/dev/null && joachim99@2: echo_test_string="`eval $cmd`" && joachim99@2: (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null; then joachim99@2: break joachim99@2: fi joachim99@2: done joachim99@2: fi joachim99@2: joachim99@2: if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && joachim99@2: echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && joachim99@2: test "X$echo_testing_string" = "X$echo_test_string"; then joachim99@2: : joachim99@2: else joachim99@2: # The Solaris, AIX, and Digital Unix default echo programs unquote joachim99@2: # backslashes. This makes it impossible to quote backslashes using joachim99@2: # echo "$something" | sed 's/\\/\\\\/g' joachim99@2: # joachim99@2: # So, first we look for a working echo in the user's PATH. joachim99@2: joachim99@2: IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" joachim99@2: for dir in $PATH /usr/ucb; do joachim99@2: if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && joachim99@2: test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && joachim99@2: echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && joachim99@2: test "X$echo_testing_string" = "X$echo_test_string"; then joachim99@2: echo="$dir/echo" joachim99@2: break joachim99@2: fi joachim99@2: done joachim99@2: IFS="$save_ifs" joachim99@2: joachim99@2: if test "X$echo" = Xecho; then joachim99@2: # We didn't find a better echo, so look for alternatives. joachim99@2: if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && joachim99@2: echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && joachim99@2: test "X$echo_testing_string" = "X$echo_test_string"; then joachim99@2: # This shell has a builtin print -r that does the trick. joachim99@2: echo='print -r' joachim99@2: elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && joachim99@2: test "X$CONFIG_SHELL" != X/bin/ksh; then joachim99@2: # If we have ksh, try running ltconfig again with it. joachim99@2: ORIGINAL_CONFIG_SHELL="${CONFIG_SHELL-/bin/sh}" joachim99@2: export ORIGINAL_CONFIG_SHELL joachim99@2: CONFIG_SHELL=/bin/ksh joachim99@2: export CONFIG_SHELL joachim99@2: exec "$CONFIG_SHELL" "$0" --no-reexec ${1+"$@"} joachim99@2: else joachim99@2: # Try using printf. joachim99@2: echo='printf %s\n' joachim99@2: if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && joachim99@2: echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && joachim99@2: test "X$echo_testing_string" = "X$echo_test_string"; then joachim99@2: # Cool, printf works joachim99@2: : joachim99@2: elif echo_testing_string=`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null` && joachim99@2: test "X$echo_testing_string" = 'X\t' && joachim99@2: echo_testing_string=`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && joachim99@2: test "X$echo_testing_string" = "X$echo_test_string"; then joachim99@2: CONFIG_SHELL="$ORIGINAL_CONFIG_SHELL" joachim99@2: export CONFIG_SHELL joachim99@2: SHELL="$CONFIG_SHELL" joachim99@2: export SHELL joachim99@2: echo="$CONFIG_SHELL $0 --fallback-echo" joachim99@2: elif echo_testing_string=`("$CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null` && joachim99@2: test "X$echo_testing_string" = 'X\t' && joachim99@2: echo_testing_string=`("$CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && joachim99@2: test "X$echo_testing_string" = "X$echo_test_string"; then joachim99@2: echo="$CONFIG_SHELL $0 --fallback-echo" joachim99@2: else joachim99@2: # maybe with a smaller string... joachim99@2: prev=: joachim99@2: joachim99@2: for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do joachim99@2: if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null; then joachim99@2: break joachim99@2: fi joachim99@2: prev="$cmd" joachim99@2: done joachim99@2: joachim99@2: if test "$prev" != 'sed 50q "$0"'; then joachim99@2: echo_test_string=`eval $prev` joachim99@2: joachim99@2: export echo_test_string joachim99@2: exec "${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}}" "$0" ${1+"$@"} joachim99@2: else joachim99@2: # Oops. We lost completely, so just stick with echo. joachim99@2: echo=echo joachim99@2: fi joachim99@2: fi joachim99@2: fi joachim99@2: fi joachim99@2: fi joachim99@2: joachim99@2: # Sed substitution that helps us do robust quoting. It backslashifies joachim99@2: # metacharacters that are still active within double-quoted strings. joachim99@2: Xsed='sed -e s/^X//' joachim99@2: sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' joachim99@2: joachim99@2: # Same as above, but do not quote variable references. joachim99@2: double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' joachim99@2: joachim99@2: # Sed substitution to delay expansion of an escaped shell variable in a joachim99@2: # double_quote_subst'ed string. joachim99@2: delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' joachim99@2: joachim99@2: # The name of this program. joachim99@2: progname=`$echo "X$0" | $Xsed -e 's%^.*/%%'` joachim99@2: joachim99@2: # Constants: joachim99@2: PROGRAM=ltconfig joachim99@2: PACKAGE=libtool joachim99@2: VERSION=1.4a joachim99@2: TIMESTAMP=" (1.641.2.206mm 2001/04/03 21:47:47)" joachim99@2: ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' joachim99@2: ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' joachim99@2: rm="rm -f" joachim99@2: joachim99@2: help="Try \`$progname --help' for more information." joachim99@2: joachim99@2: # Global variables: joachim99@2: default_ofile=libtool joachim99@2: can_build_shared=yes joachim99@2: enable_shared=yes joachim99@2: # All known linkers require a `.a' archive for static linking (except M$VC, joachim99@2: # which needs '.lib'). joachim99@2: enable_static=yes joachim99@2: enable_fast_install=yes joachim99@2: enable_dlopen=unknown joachim99@2: enable_win32_dll=no joachim99@2: pic_mode=default joachim99@2: ltmain= joachim99@2: silent= joachim99@2: srcdir= joachim99@2: ac_config_guess= joachim99@2: ac_config_sub= joachim99@2: host= joachim99@2: build=NONE joachim99@2: nonopt=NONE joachim99@2: ofile="$default_ofile" joachim99@2: verify_host=yes joachim99@2: tagname= joachim99@2: with_gcc=no joachim99@2: with_gnu_ld=no joachim99@2: need_locks=yes joachim99@2: ac_ext=c joachim99@2: libext=a joachim99@2: cache_file= joachim99@2: max_cmd_len= joachim99@2: joachim99@2: ## Dependencies to place before and after the object being linked: joachim99@2: predep_objects= joachim99@2: postdep_objects= joachim99@2: predeps= joachim99@2: postdeps= joachim99@2: compiler_lib_search_path= joachim99@2: joachim99@2: ## Link characteristics: joachim99@2: allow_undefined_flag= joachim99@2: no_undefined_flag= joachim99@2: need_lib_prefix=unknown joachim99@2: need_version=unknown joachim99@2: # when you set need_version to no, make sure it does not cause -set_version joachim99@2: # flags to be left without arguments joachim99@2: archive_cmds= joachim99@2: archive_expsym_cmds= joachim99@2: old_archive_from_new_cmds= joachim99@2: old_archive_from_expsyms_cmds= joachim99@2: striplib= joachim99@2: old_striplib= joachim99@2: export_dynamic_flag_spec= joachim99@2: whole_archive_flag_spec= joachim99@2: thread_safe_flag_spec= joachim99@2: hardcode_into_libs=no joachim99@2: hardcode_libdir_flag_spec= joachim99@2: hardcode_libdir_separator= joachim99@2: hardcode_direct=no joachim99@2: hardcode_minus_L=no joachim99@2: hardcode_shlibpath_var=unsupported joachim99@2: runpath_var= joachim99@2: link_all_deplibs=unknown joachim99@2: always_export_symbols=no joachim99@2: export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols' joachim99@2: # include_expsyms should be a list of space-separated symbols to be *always* joachim99@2: # included in the symbol list joachim99@2: include_expsyms= joachim99@2: # exclude_expsyms can be an egrep regular expression of symbols to exclude joachim99@2: # it will be wrapped by ` (' and `)$', so one must not match beginning or joachim99@2: # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', joachim99@2: # as well as any symbol that contains `d'. joachim99@2: exclude_expsyms="_GLOBAL_OFFSET_TABLE_" joachim99@2: # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out joachim99@2: # platforms (ab)use it in PIC code, but their linkers get confused if joachim99@2: # the symbol is explicitly referenced. Since portable code cannot joachim99@2: # rely on this symbol name, it's probably fine to never include it in joachim99@2: # preloaded symbol tables. joachim99@2: extract_expsyms_cmds= joachim99@2: joachim99@2: ## Tools: joachim99@2: old_AR="$AR" joachim99@2: old_AR_FLAGS="$AR_FLAGS" joachim99@2: old_CC="$CC" joachim99@2: old_CFLAGS="$CFLAGS" joachim99@2: old_CPPFLAGS="$CPPFLAGS" joachim99@2: old_LDFLAGS="$LDFLAGS" joachim99@2: old_LIBS="$LIBS" joachim99@2: old_MAGIC_CMD="$MAGIC_CMD" joachim99@2: old_LD="$LD" joachim99@2: old_LN_S="$LN_S" joachim99@2: old_LTCC="$LTCC" joachim99@2: old_NM="$NM" joachim99@2: old_RANLIB="$RANLIB" joachim99@2: old_STRIP="$STRIP" joachim99@2: old_AS="$AS" joachim99@2: old_DLLTOOL="$DLLTOOL" joachim99@2: old_OBJDUMP="$OBJDUMP" joachim99@2: old_OBJEXT="$OBJEXT" joachim99@2: old_EXEEXT="$EXEEXT" joachim99@2: old_reload_flag="$reload_flag" joachim99@2: old_deplibs_check_method="$deplibs_check_method" joachim99@2: old_file_magic_cmd="$file_magic_cmd" joachim99@2: joachim99@2: # Parse the command line options. joachim99@2: args= joachim99@2: prev= joachim99@2: for option joachim99@2: do joachim99@2: case $option in joachim99@2: -*=*) optarg=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; joachim99@2: *) optarg= ;; joachim99@2: esac joachim99@2: joachim99@2: # If the previous option needs an argument, assign it. joachim99@2: if test -n "$prev"; then joachim99@2: eval "$prev=\$option" joachim99@2: prev= joachim99@2: continue joachim99@2: fi joachim99@2: joachim99@2: case $option in joachim99@2: --help) cat <&2 joachim99@2: echo "$help" 1>&2 joachim99@2: exit 1 joachim99@2: ;; joachim99@2: joachim99@2: *) joachim99@2: if test -z "$ltmain"; then joachim99@2: ltmain="$option" joachim99@2: elif test -z "$host"; then joachim99@2: # This generates an unnecessary warning for sparc-sun-solaris4.1.3_U1 joachim99@2: # if test -n "`echo $option| sed 's/[-a-z0-9.]//g'`"; then joachim99@2: # echo "$progname: warning \`$option' is not a valid host type" 1>&2 joachim99@2: # fi joachim99@2: host="$option" joachim99@2: else joachim99@2: echo "$progname: too many arguments" 1>&2 joachim99@2: echo "$help" 1>&2 joachim99@2: exit 1 joachim99@2: fi ;; joachim99@2: esac joachim99@2: done joachim99@2: joachim99@2: if test -z "$ltmain"; then joachim99@2: echo "$progname: you must specify a LTMAIN file" 1>&2 joachim99@2: echo "$help" 1>&2 joachim99@2: exit 1 joachim99@2: fi joachim99@2: joachim99@2: if test ! -f "$ltmain"; then joachim99@2: echo "$progname: \`$ltmain' does not exist" 1>&2 joachim99@2: echo "$help" 1>&2 joachim99@2: exit 1 joachim99@2: fi joachim99@2: joachim99@2: if test -n "$tagname"; then joachim99@2: # Check whether tagname contains only valid characters joachim99@2: case `$echo "X$tagname" | $Xsed -e 's/[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]//g'` in joachim99@2: "") ;; joachim99@2: *) joachim99@2: echo "$progname: invalid tag name: $tagname" 1>&2 joachim99@2: exit 1 joachim99@2: ;; joachim99@2: esac joachim99@2: joachim99@2: if grep "^### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$ofile" > /dev/null; then joachim99@2: echo "$progname: tag name $tagname already exists" 1>&2 joachim99@2: exit 1 joachim99@2: fi joachim99@2: joachim99@2: if test ! -f "$ofile"; then joachim99@2: echo "$progname: warning: output file \`$ofile' does not exist" 1>&2 joachim99@2: fi joachim99@2: joachim99@2: if test -z "$LTCC"; then joachim99@2: eval "`$SHELL $ofile --config | grep '^LTCC='`" joachim99@2: if test -z "$LTCC"; then joachim99@2: echo "$progname: warning: output file \`$ofile' does not look like a libtool script" 1>&2 joachim99@2: else joachim99@2: echo "$progname: warning: using \`LTCC=$LTCC', extracted from \`$ofile'" 1>&2 joachim99@2: fi joachim99@2: fi joachim99@2: fi joachim99@2: joachim99@2: # Quote any args containing shell metacharacters. joachim99@2: ltconfig_args= joachim99@2: for arg joachim99@2: do joachim99@2: case $arg in joachim99@2: *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) joachim99@2: ltconfig_args="$ltconfig_args '$arg'" ;; joachim99@2: *) ltconfig_args="$ltconfig_args $arg" ;; joachim99@2: esac joachim99@2: done joachim99@2: joachim99@2: # A relevant subset of AC_INIT. joachim99@2: joachim99@2: # File descriptor usage: joachim99@2: # 0 standard input joachim99@2: # 1 file creation joachim99@2: # 2 errors and warnings joachim99@2: # 3 some systems may open it to /dev/tty joachim99@2: # 4 used on the Kubota Titan joachim99@2: # 5 compiler messages saved in config.log joachim99@2: # 6 checking for... messages and results joachim99@2: if test "$silent" = yes; then joachim99@2: exec 6>/dev/null joachim99@2: else joachim99@2: exec 6>&1 joachim99@2: fi joachim99@2: exec 5>>./config.log joachim99@2: joachim99@2: # NLS nuisances. joachim99@2: # Only set LANG and LC_ALL to C if already set. joachim99@2: # These must not be set unconditionally because not all systems understand joachim99@2: # e.g. LANG=C (notably SCO). joachim99@2: if test "X${LC_ALL+set}" = Xset; then LC_ALL=C; export LC_ALL; fi joachim99@2: if test "X${LANG+set}" = Xset; then LANG=C; export LANG; fi joachim99@2: joachim99@2: if test -n "$cache_file" && test -r "$cache_file" && test -f "$cache_file"; then joachim99@2: echo "loading cache $cache_file within ltconfig" joachim99@2: . $cache_file joachim99@2: fi joachim99@2: joachim99@2: if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then joachim99@2: # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. joachim99@2: if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then joachim99@2: ac_n= ac_c=' joachim99@2: ' ac_t=' ' joachim99@2: else joachim99@2: ac_n=-n ac_c= ac_t= joachim99@2: fi joachim99@2: else joachim99@2: ac_n= ac_c='\c' ac_t= joachim99@2: fi joachim99@2: joachim99@2: if test -z "$srcdir"; then joachim99@2: # Assume the source directory is the same one as the path to LTMAIN. joachim99@2: srcdir=`$echo "X$ltmain" | $Xsed -e 's%/[^/]*$%%'` joachim99@2: test "$srcdir" = "$ltmain" && srcdir=. joachim99@2: fi joachim99@2: joachim99@2: trap "$rm conftest*; exit 1" 1 2 15 joachim99@2: if test "$verify_host" = yes; then joachim99@2: # Check for config.guess and config.sub. joachim99@2: ac_aux_dir= joachim99@2: for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do joachim99@2: if test -f $ac_dir/config.guess; then joachim99@2: ac_aux_dir=$ac_dir joachim99@2: break joachim99@2: fi joachim99@2: done joachim99@2: if test -z "$ac_aux_dir"; then joachim99@2: echo "$progname: cannot find config.guess in $srcdir $srcdir/.. $srcdir/../.." 1>&2 joachim99@2: echo "$help" 1>&2 joachim99@2: exit 1 joachim99@2: fi joachim99@2: ac_config_guess=$ac_aux_dir/config.guess joachim99@2: ac_config_sub=$ac_aux_dir/config.sub joachim99@2: joachim99@2: # Make sure we can run config.sub. joachim99@2: if $SHELL $ac_config_sub sun4 >/dev/null 2>&1; then : joachim99@2: else joachim99@2: echo "$progname: cannot run $ac_config_sub" 1>&2 joachim99@2: echo "$help" 1>&2 joachim99@2: exit 1 joachim99@2: fi joachim99@2: joachim99@2: echo $ac_n "checking host system type""... $ac_c" 1>&6 joachim99@2: joachim99@2: host_alias=$host joachim99@2: case $host_alias in joachim99@2: "") joachim99@2: # Force config.guess to use the C compiler. joachim99@2: # CC_FOR_BUILD overrides the CC variable in config.guess but I had joachim99@2: # problems with it so do it this way for now. joachim99@2: CC="$LTCC" joachim99@2: joachim99@2: if host_alias=`$SHELL $ac_config_guess`; then : joachim99@2: else joachim99@2: echo "$progname: cannot guess host type; you must specify one" 1>&2 joachim99@2: echo "$help" 1>&2 joachim99@2: exit 1 joachim99@2: fi joachim99@2: joachim99@2: # Restore the C compiler. joachim99@2: CC="$old_CC" joachim99@2: ;; joachim99@2: esac joachim99@2: host=`$SHELL $ac_config_sub $host_alias` joachim99@2: echo "$ac_t$host" 1>&6 joachim99@2: joachim99@2: # Make sure the host verified. joachim99@2: test -z "$host" && exit 1 joachim99@2: joachim99@2: # Check for the build system type joachim99@2: echo $ac_n "checking build system type... $ac_c" 1>&6 joachim99@2: joachim99@2: build_alias=$build joachim99@2: case $build_alias in joachim99@2: NONE) joachim99@2: case $nonopt in joachim99@2: NONE) build_alias=$host_alias ;; joachim99@2: *) build_alias=$nonopt ;; joachim99@2: esac ;; joachim99@2: esac joachim99@2: joachim99@2: build=`$SHELL $ac_config_sub $build_alias` joachim99@2: build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` joachim99@2: build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` joachim99@2: build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` joachim99@2: echo "$ac_t""$build" 1>&6 joachim99@2: joachim99@2: elif test -z "$host"; then joachim99@2: echo "$progname: you must specify a host type if you use \`--no-verify'" 1>&2 joachim99@2: echo "$help" 1>&2 joachim99@2: exit 1 joachim99@2: else joachim99@2: host_alias=$host joachim99@2: build_alias=$host_alias joachim99@2: build=$host joachim99@2: fi joachim99@2: joachim99@2: if test x"$host" != x"$build"; then joachim99@2: ac_tool_prefix=${host_alias}- joachim99@2: else joachim99@2: ac_tool_prefix= joachim99@2: fi joachim99@2: joachim99@2: host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` joachim99@2: host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` joachim99@2: host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` joachim99@2: joachim99@2: # Transform linux* to *-*-linux-gnu*, to support old configure scripts. joachim99@2: case $host_os in joachim99@2: linux-gnu*) ;; joachim99@2: linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` joachim99@2: esac joachim99@2: joachim99@2: case $host_os in joachim99@2: aix3*) joachim99@2: # AIX sometimes has problems with the GCC collect2 program. For some joachim99@2: # reason, if we set the COLLECT_NAMES environment variable, the problems joachim99@2: # vanish in a puff of smoke. joachim99@2: if test "X${COLLECT_NAMES+set}" != Xset; then joachim99@2: COLLECT_NAMES= joachim99@2: export COLLECT_NAMES joachim99@2: fi joachim99@2: ;; joachim99@2: esac joachim99@2: joachim99@2: # Determine commands to create old-style static archives. joachim99@2: old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' joachim99@2: old_postinstall_cmds='chmod 644 $oldlib' joachim99@2: old_postuninstall_cmds= joachim99@2: joachim99@2: if test -n "$RANLIB"; then joachim99@2: old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" joachim99@2: old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" joachim99@2: fi joachim99@2: joachim99@2: # Source the script associated with the $tagname tag configuration. joachim99@2: if test -n "$tagname"; then joachim99@2: . $ltmain joachim99@2: else joachim99@2: # FIXME: We should use a variable here joachim99@2: # Configure for a C compiler joachim99@2: . $srcdir/ltcf-c.sh joachim99@2: fi joachim99@2: joachim99@2: # Set sane defaults for various variables joachim99@2: test -z "$AR" && AR=ar joachim99@2: test -z "$AR_FLAGS" && AR_FLAGS=cru joachim99@2: test -z "$AS" && AS=as joachim99@2: test -z "$CC" && CC=cc joachim99@2: test -z "$DLLTOOL" && DLLTOOL=dlltool joachim99@2: test -z "$MAGIC_CMD" && MAGIC_CMD=file joachim99@2: test -z "$LD" && LD=ld joachim99@2: test -z "$LN_S" && LN_S="ln -s" joachim99@2: test -z "$NM" && NM=nm joachim99@2: test -z "$OBJDUMP" && OBJDUMP=objdump joachim99@2: test -z "$RANLIB" && RANLIB=: joachim99@2: test -z "$STRIP" && STRIP=: joachim99@2: test -z "$objext" && objext=o joachim99@2: joachim99@2: echo $ac_n "checking for objdir... $ac_c" 1>&6 joachim99@2: rm -f .libs 2>/dev/null joachim99@2: mkdir .libs 2>/dev/null joachim99@2: if test -d .libs; then joachim99@2: objdir=.libs joachim99@2: else joachim99@2: # MS-DOS does not allow filenames that begin with a dot. joachim99@2: objdir=_libs joachim99@2: fi joachim99@2: rmdir .libs 2>/dev/null joachim99@2: echo "$ac_t$objdir" 1>&6 joachim99@2: joachim99@2: # If no C compiler was specified, use CC. joachim99@2: LTCC=${LTCC-"$CC"} joachim99@2: joachim99@2: # Allow CC to be a program name with arguments. joachim99@2: set dummy $CC joachim99@2: compiler="$2" joachim99@2: joachim99@2: # We assume here that the value for ac_cv_prog_cc_pic will not be cached joachim99@2: # in isolation, and that seeing it set (from the cache) indicates that joachim99@2: # the associated values are set (in the cache) correctly too. joachim99@2: echo $ac_n "checking for $compiler option to produce PIC... $ac_c" 1>&6 joachim99@2: echo "$progname:678:checking for $compiler option to produce PIC" 1>&5 joachim99@2: joachim99@2: if test -z "$ac_cv_prog_cc_pic"; then joachim99@2: echo "$ac_t"none 1>&6 joachim99@2: else joachim99@2: echo "$ac_t""$ac_cv_prog_cc_pic" 1>&6 joachim99@2: joachim99@2: # Check to make sure the pic_flag actually works. joachim99@2: echo $ac_n "checking if $compiler PIC flag $ac_cv_prog_cc_pic works... $ac_c" 1>&6 joachim99@2: echo "$progname:687:checking that $compiler PIC flag $ac_cv_prog_cc_pic works." 1>&5 joachim99@2: if test "X${ac_cv_prog_cc_pic_works+set}" = Xset && \ joachim99@2: test "X${ac_cv_prog_cc_pic_works}" != X; then joachim99@2: echo $ac_n "(cached) $ac_c" 1>&6 joachim99@2: else joachim99@2: ac_cv_prog_cc_pic_works=yes joachim99@2: $rm conftest* joachim99@2: echo $lt_simple_compile_test_code > conftest.$ac_ext joachim99@2: save_CFLAGS="$CFLAGS" joachim99@2: CFLAGS="$CFLAGS $ac_cv_prog_cc_pic -DPIC" joachim99@2: if { (eval echo $progname:697: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then joachim99@2: # Append any warnings to the config.log. joachim99@2: cat conftest.err 1>&5 joachim99@2: joachim99@2: case $host_os in joachim99@2: hpux9* | hpux10* | hpux11*) joachim99@2: # On HP-UX, both CC and GCC only warn that PIC is supported... then joachim99@2: # they create non-PIC objects. So, if there were any warnings, we joachim99@2: # assume that PIC is not supported. joachim99@2: if test -s conftest.err; then joachim99@2: ac_cv_prog_cc_pic_works=no joachim99@2: ac_cv_prog_cc_can_build_shared=no joachim99@2: ac_cv_prog_cc_pic= joachim99@2: else joachim99@2: ac_cv_prog_cc_pic_works=yes joachim99@2: ac_cv_prog_cc_pic=" $ac_cv_prog_cc_pic" joachim99@2: fi joachim99@2: ;; joachim99@2: *) joachim99@2: ac_cv_prog_cc_pic_works=yes joachim99@2: ac_cv_prog_cc_pic=" $ac_cv_prog_cc_pic" joachim99@2: ;; joachim99@2: esac joachim99@2: else joachim99@2: # Append any errors to the config.log. joachim99@2: cat conftest.err 1>&5 joachim99@2: ac_cv_prog_cc_pic_works=no joachim99@2: ac_cv_prog_cc_can_build_shared=no joachim99@2: ac_cv_prog_cc_pic= joachim99@2: fi joachim99@2: CFLAGS="$save_CFLAGS" joachim99@2: $rm conftest* joachim99@2: fi joachim99@2: # Belt *and* braces to stop my trousers falling down: joachim99@2: if test "X$ac_cv_prog_cc_pic_works" = Xno; then joachim99@2: ac_cv_prog_cc_pic= joachim99@2: ac_cv_prog_cc_can_build_shared=no joachim99@2: fi joachim99@2: echo "$ac_t""$ac_cv_prog_cc_pic_works" 1>&6 joachim99@2: fi joachim99@2: joachim99@2: # Check for any special shared library compilation flags. joachim99@2: if test -n "$ac_cv_prog_cc_shlib"; then joachim99@2: echo "$progname: warning: \`$CC' requires \`$ac_cv_prog_cc_shlib' to build shared libraries" 1>&2 joachim99@2: if echo "$old_CC $old_CFLAGS " | egrep -e "[ ]$ac_cv_prog_cc_shlib[ ]" >/dev/null; then : joachim99@2: else joachim99@2: echo "$progname: add \`$ac_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2 joachim99@2: ac_cv_prog_cc_can_build_shared=no joachim99@2: fi joachim99@2: fi joachim99@2: joachim99@2: echo $ac_n "checking if $compiler static flag $ac_cv_prog_cc_static works... $ac_c" 1>&6 joachim99@2: echo "$progname:749: checking if $compiler static flag $ac_cv_prog_cc_static works" >&5 joachim99@2: if test "X${ac_cv_prog_cc_static_works+set}" = Xset && \ joachim99@2: test "X${ac_cv_prog_cc_static_works}" != X; then joachim99@2: echo $ac_n "(cached) $ac_c" 1>&6 joachim99@2: else joachim99@2: $rm conftest* joachim99@2: echo $lt_simple_link_test_code > conftest.$ac_ext joachim99@2: save_LDFLAGS="$LDFLAGS" joachim99@2: LDFLAGS="$LDFLAGS $ac_cv_prog_cc_static" joachim99@2: if { (eval echo $progname:758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then joachim99@2: ac_cv_prog_cc_static_works=yes joachim99@2: else joachim99@2: ac_cv_prog_cc_static_works=no joachim99@2: ac_cv_prog_cc_static= joachim99@2: fi joachim99@2: LDFLAGS="$save_LDFLAGS" joachim99@2: $rm conftest* joachim99@2: fi joachim99@2: # Belt *and* braces to stop my trousers falling down: joachim99@2: if test "X$ac_cv_prog_cc_static_works" = Xno; then joachim99@2: ac_cv_prog_cc_static= joachim99@2: fi joachim99@2: echo "$ac_t""$ac_cv_prog_cc_static_works" 1>&6 joachim99@2: pic_flag="$ac_cv_prog_cc_pic" joachim99@2: special_shlib_compile_flags="$ac_cv_prog_cc_shlib" joachim99@2: wl="$ac_cv_prog_cc_wl" joachim99@2: link_static_flag="$ac_cv_prog_cc_static" joachim99@2: no_builtin_flag="$ac_cv_prog_cc_no_builtin" joachim99@2: can_build_shared="$ac_cv_prog_cc_can_build_shared" joachim99@2: joachim99@2: # find the maximum length of command line arguments joachim99@2: echo "$progname:780: finding the maximum length of command line arguments" 1>&5 joachim99@2: echo $ac_n "finding the maximum length of command line arguments... $ac_c" 1>&6 joachim99@2: if test "${lt_cv_sys_max_cmd_len+set}" = set; then joachim99@2: echo $ac_n "(cached) $ac_c" 1>&6 joachim99@2: else joachim99@2: i=0 joachim99@2: testring="ABCDEF" joachim99@2: while test `$CONFIG_SHELL $0 --fallback-echo "X$testring" >/dev/null 2>&1` == `echo "X$testring" >/dev/null 2>&1` && joachim99@2: new_result=`expr "X$testring" : ".*" 2>&1` && joachim99@2: lt_cv_sys_max_cmd_len=$new_result && joachim99@2: test $i != 32 # 1 MB should be enough joachim99@2: do joachim99@2: i=`expr $i + 1` joachim99@2: testring=$testring$testring joachim99@2: done joachim99@2: testring= joachim99@2: # add a significant safety factor because C++ compilers can tack on massive amounts joachim99@2: # of additional arguments before passing them to the linker. 1/4 should be good. joachim99@2: len=`expr $lt_cv_sys_max_cmd_len \/ 4` joachim99@2: lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len - $len` joachim99@2: fi joachim99@2: echo "$progname:@lineno@: result: $lt_cv_sys_max_cmd_len" 1>&5 joachim99@2: echo "${ac_t}$lt_cv_sys_max_cmd_len" 1>&6 joachim99@2: joachim99@2: if test -n $lt_cv_sys_max_cmd_len ; then joachim99@2: max_cmd_len=$lt_cv_sys_max_cmd_len joachim99@2: else joachim99@2: max_cmd_len=none joachim99@2: fi joachim99@2: joachim99@2: # Check to see if options -o and -c are simultaneously supported by compiler joachim99@2: echo $ac_n "checking if $compiler supports -c -o file.$objext... $ac_c" 1>&6 joachim99@2: if test "${lt_cv_compiler_c_o+set}" = set; then joachim99@2: echo $ac_n "(cached) $ac_c" 1>&6 joachim99@2: else joachim99@2: $rm -r conftest 2>/dev/null joachim99@2: mkdir conftest joachim99@2: cd conftest joachim99@2: $rm conftest* joachim99@2: echo $lt_simple_compile_test_code > conftest.$ac_ext joachim99@2: mkdir out joachim99@2: # According to Tom Tromey, Ian Lance Taylor reported there are C compilers joachim99@2: # that will create temporary files in the current directory regardless of joachim99@2: # the output directory. Thus, making CWD read-only will cause this test joachim99@2: # to fail, enabling locking or at least warning the user not to do parallel joachim99@2: # builds. joachim99@2: chmod -w . joachim99@2: save_CFLAGS="$CFLAGS" joachim99@2: CFLAGS="$CFLAGS -o out/conftest2.$objext" joachim99@2: echo "$progname:829: checking if $compiler supports -c -o file.$objext" >&5 joachim99@2: if { (eval echo $progname:830: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$objext; then joachim99@2: joachim99@2: # The compiler can only warn and ignore the option if not recognized joachim99@2: # So say no if there are warnings joachim99@2: if test -s out/conftest.err; then joachim99@2: lt_cv_compiler_c_o=no joachim99@2: else joachim99@2: lt_cv_compiler_c_o=yes joachim99@2: fi joachim99@2: else joachim99@2: # Append any errors to the config.log. joachim99@2: cat out/conftest.err 1>&5 joachim99@2: lt_cv_compiler_c_o=no joachim99@2: fi joachim99@2: CFLAGS="$save_CFLAGS" joachim99@2: chmod u+w . joachim99@2: $rm conftest* out/* joachim99@2: rmdir out joachim99@2: cd .. joachim99@2: rmdir conftest joachim99@2: $rm -r conftest 2>/dev/null joachim99@2: fi joachim99@2: compiler_c_o=$lt_cv_compiler_c_o joachim99@2: echo "${ac_t}$compiler_c_o" 1>&6 joachim99@2: joachim99@2: # Check to see if we can do hard links to lock some files if needed joachim99@2: hard_links="nottested" joachim99@2: if test "$compiler_c_o" = no && test "$need_locks" != no; then joachim99@2: # do not overwrite the value of need_locks provided by the user joachim99@2: echo $ac_n "checking if we can lock with hard links... $ac_c" 1>&6 joachim99@2: hard_links=yes joachim99@2: $rm conftest* joachim99@2: ln conftest.a conftest.b 2>/dev/null && hard_links=no joachim99@2: touch conftest.a joachim99@2: ln conftest.a conftest.b 2>&5 || hard_links=no joachim99@2: ln conftest.a conftest.b 2>/dev/null && hard_links=no joachim99@2: echo "$ac_t$hard_links" 1>&6 joachim99@2: $rm conftest* joachim99@2: if test "$hard_links" = no; then joachim99@2: echo "*** WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2 joachim99@2: need_locks=warn joachim99@2: fi joachim99@2: else joachim99@2: need_locks=no joachim99@2: fi joachim99@2: joachim99@2: if test "$with_gcc" = yes; then joachim99@2: # Check to see if options -fno-rtti -fno-exceptions are supported by compiler joachim99@2: echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions ... $ac_c" 1>&6 joachim99@2: $rm conftest* joachim99@2: echo $lt_simple_compile_test_code > conftest.$ac_ext joachim99@2: save_CFLAGS="$CFLAGS" joachim99@2: CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext" joachim99@2: echo "$progname:883: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 joachim99@2: if { (eval echo $progname:884: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then joachim99@2: joachim99@2: # The compiler can only warn and ignore the option if not recognized joachim99@2: # So say no if there are warnings joachim99@2: if test -s conftest.err; then joachim99@2: echo "$ac_t"no 1>&6 joachim99@2: compiler_rtti_exceptions=no joachim99@2: else joachim99@2: echo "$ac_t"yes 1>&6 joachim99@2: compiler_rtti_exceptions=yes joachim99@2: fi joachim99@2: else joachim99@2: # Append any errors to the config.log. joachim99@2: cat conftest.err 1>&5 joachim99@2: compiler_rtti_exceptions=no joachim99@2: echo "$ac_t"no 1>&6 joachim99@2: fi joachim99@2: CFLAGS="$save_CFLAGS" joachim99@2: $rm conftest* joachim99@2: joachim99@2: if test "$compiler_rtti_exceptions" = "yes"; then joachim99@2: no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions' joachim99@2: else joachim99@2: no_builtin_flag=' -fno-builtin' joachim99@2: fi joachim99@2: joachim99@2: fi joachim99@2: joachim99@2: # See if the linker supports building shared libraries. joachim99@2: echo $ac_n "checking whether the linker ($LD) supports shared libraries... $ac_c" 1>&6 joachim99@2: joachim99@2: echo "$ac_t$ld_shlibs" 1>&6 joachim99@2: test "$ld_shlibs" = no && can_build_shared=no joachim99@2: joachim99@2: # Check hardcoding attributes. joachim99@2: echo $ac_n "checking how to hardcode library paths into programs... $ac_c" 1>&6 joachim99@2: hardcode_action= joachim99@2: if test -n "$hardcode_libdir_flag_spec" || \ joachim99@2: test -n "$runpath_var"; then joachim99@2: joachim99@2: # We can hardcode non-existant directories. joachim99@2: if test "$hardcode_direct" != no && joachim99@2: # If the only mechanism to avoid hardcoding is shlibpath_var, we joachim99@2: # have to relink, otherwise we might link with an installed library joachim99@2: # when we should be linking with a yet-to-be-installed one joachim99@2: ## test "$hardcode_shlibpath_var" != no && joachim99@2: test "$hardcode_minus_L" != no; then joachim99@2: # Linking always hardcodes the temporary library directory. joachim99@2: hardcode_action=relink joachim99@2: else joachim99@2: # We can link without hardcoding, and we can hardcode nonexisting dirs. joachim99@2: hardcode_action=immediate joachim99@2: fi joachim99@2: else joachim99@2: # We cannot hardcode anything, or else we can only hardcode existing joachim99@2: # directories. joachim99@2: hardcode_action=unsupported joachim99@2: fi joachim99@2: echo "$ac_t$hardcode_action" 1>&6 joachim99@2: joachim99@2: echo $ac_n "checking whether stripping libraries is possible... $ac_c" 1>&6 joachim99@2: if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then joachim99@2: test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" joachim99@2: test -z "$striplib" && striplib="$STRIP --strip-unneeded" joachim99@2: echo "${ac_t}yes" 1>&6 joachim99@2: else joachim99@2: echo "${ac_t}no" 1>&6 joachim99@2: fi joachim99@2: joachim99@2: case $reload_flag in joachim99@2: "" | " "*) ;; joachim99@2: *) reload_flag=" $reload_flag" ;; joachim99@2: esac joachim99@2: reload_cmds='$LD$reload_flag -o $output$reload_objs' joachim99@2: test -z "$deplibs_check_method" && deplibs_check_method=unknown joachim99@2: joachim99@2: # PORTME Fill in your ld.so characteristics joachim99@2: library_names_spec= joachim99@2: libname_spec='lib$name' joachim99@2: soname_spec= joachim99@2: postinstall_cmds= joachim99@2: postuninstall_cmds= joachim99@2: finish_cmds= joachim99@2: finish_eval= joachim99@2: shlibpath_var= joachim99@2: shlibpath_overrides_runpath=unknown joachim99@2: version_type=none joachim99@2: dynamic_linker="$host_os ld.so" joachim99@2: sys_lib_dlsearch_path_spec="/lib /usr/lib" joachim99@2: sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" joachim99@2: joachim99@2: echo $ac_n "checking dynamic linker characteristics... $ac_c" 1>&6 joachim99@2: case $host_os in joachim99@2: aix3*) joachim99@2: version_type=linux joachim99@2: library_names_spec='${libname}${release}.so$versuffix $libname.a' joachim99@2: shlibpath_var=LIBPATH joachim99@2: joachim99@2: # AIX 3 has no versioning support, so we append a major version to the name. joachim99@2: soname_spec='${libname}${release}.so$major' joachim99@2: ;; joachim99@2: joachim99@2: aix4* | aix5*) joachim99@2: if test "$host_cpu" = ia64; then joachim99@2: # AIX 5 supports IA64 joachim99@2: library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' joachim99@2: shlibpath_var=LD_LIBRARY_PATH joachim99@2: else joachim99@2: # AIX (on Power*) has no versioning support, so currently we can not hardcode correct joachim99@2: # soname into executable. Probably we can add versioning support to joachim99@2: # collect2, so additional links can be useful in future. joachim99@2: # We preserve .a as extension for shared libraries though AIX4.2 joachim99@2: # and later linker supports .so joachim99@2: if test "$aix_use_runtimelinking" = yes; then joachim99@2: # If using run time linking (on AIX 4.2 or later) use lib.so instead of joachim99@2: # lib.a to let people know that these are not typical AIX shared libraries. joachim99@2: library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' joachim99@2: # We want symlinks to be created for the different names. joachim99@2: version_type=linux joachim99@2: else joachim99@2: # We preserve .a as extension for shared libraries though AIX4.2 joachim99@2: # and later when we are not doing run time linking. joachim99@2: library_names_spec='${libname}${release}.a $libname.a' joachim99@2: soname_spec='${libname}${release}.so$major.o' joachim99@2: fi joachim99@2: # If we're using GNU nm, then we don't want the "-C" option. joachim99@2: # -C means demangle to AIX nm, but means don't demangle with GNU nm joachim99@2: if $NM -V 2>&1 | egrep '(GNU)' > /dev/null; then joachim99@2: 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' joachim99@2: else joachim99@2: 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' joachim99@2: fi joachim99@2: shlibpath_var=LIBPATH joachim99@2: deplibs_check_method=pass_all joachim99@2: # Put the right runpath into libraries. joachim99@2: hardcode_into_libs=yes joachim99@2: case $host_os in joachim99@2: aix4 | aix4.[01] | aix4.[01].*) joachim99@2: if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' joachim99@2: echo ' yes ' joachim99@2: echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then joachim99@2: : joachim99@2: else joachim99@2: # With GCC up to 2.95.x, collect2 would create an import file joachim99@2: # for dependence libraries. The import file would start with joachim99@2: # the line `#! .'. This would cause the generated library to joachim99@2: # depend on `.', always an invalid library. This was fixed in joachim99@2: # development snapshots of GCC prior to 3.0. joachim99@2: can_build_shared=no joachim99@2: fi joachim99@2: ;; joachim99@2: esac joachim99@2: fi joachim99@2: ;; joachim99@2: joachim99@2: amigaos*) joachim99@2: library_names_spec='$libname.ixlibrary $libname.a' joachim99@2: # Create ${libname}_ixlibrary.a entries in /sys/libs. joachim99@2: finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done' joachim99@2: ;; joachim99@2: joachim99@2: beos*) joachim99@2: library_names_spec='${libname}.so' joachim99@2: dynamic_linker="$host_os ld.so" joachim99@2: shlibpath_var=LIBRARY_PATH joachim99@2: lt_cv_dlopen="load_add_on" joachim99@2: lt_cv_dlopen_libs= joachim99@2: lt_cv_dlopen_self=yes joachim99@2: ;; joachim99@2: joachim99@2: bsdi4*) joachim99@2: version_type=linux joachim99@2: need_version=no joachim99@2: library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' joachim99@2: soname_spec='${libname}${release}.so$major' joachim99@2: finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' joachim99@2: shlibpath_var=LD_LIBRARY_PATH joachim99@2: sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" joachim99@2: sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" joachim99@2: export_dynamic_flag_spec=-rdynamic joachim99@2: # the default ld.so.conf also contains /usr/contrib/lib and joachim99@2: # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow joachim99@2: # libtool to hard-code these into programs joachim99@2: ;; joachim99@2: joachim99@2: cygwin* | mingw* | pw32*) joachim99@2: version_type=windows joachim99@2: need_version=no joachim99@2: need_lib_prefix=no joachim99@2: case $with_gcc,$host_os in joachim99@2: yes,cygwin*) joachim99@2: library_names_spec='$libname.dll.a' joachim99@2: soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | [sed -e 's/[.]/-/g']`${versuffix}.dll' joachim99@2: postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i; echo \$dlname'\''`~ joachim99@2: dldir=$destdir/`dirname \$dlpath`~ joachim99@2: test -d \$dldir || mkdir -p \$dldir~ joachim99@2: $install_prog .libs/$dlname \$dldir/$dlname' joachim99@2: postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~ joachim99@2: dlpath=$dir/\$dldll; $rm \$dlpath' joachim99@2: ;; joachim99@2: yes,mingw*) joachim99@2: library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll' joachim99@2: sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"` joachim99@2: ;; joachim99@2: yes,pw32*) joachim99@2: library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll' joachim99@2: ;; joachim99@2: *) joachim99@2: library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib' joachim99@2: ;; joachim99@2: esac joachim99@2: dynamic_linker='Win32 ld.exe' joachim99@2: # FIXME: first we should search . and the directory the executable is in joachim99@2: shlibpath_var=PATH joachim99@2: lt_cv_dlopen="LoadLibrary" joachim99@2: lt_cv_dlopen_libs= joachim99@2: ;; joachim99@2: joachim99@2: darwin* | rhapsody*) joachim99@2: dynamic_linker="$host_os dyld" joachim99@2: version_type=darwin joachim99@2: need_lib_prefix=no joachim99@2: need_version=no joachim99@2: library_names_spec='${libname}${release}${versuffix}.`test .$module = .yes && echo so || echo dylib` ${libname}${release}${major}.$`test .$module = .yes && echo so || echo dylib` ${libname}.`test .$module = .yes && echo so || echo dylib`' joachim99@2: soname_spec='${libname}${release}${major}.`test .$module = .yes && echo so || echo dylib`' joachim99@2: shlibpath_overrides_runpath=yes joachim99@2: shlibpath_var=DYLD_LIBRARY_PATH joachim99@2: ;; joachim99@2: joachim99@2: freebsd1*) joachim99@2: dynamic_linker=no joachim99@2: ;; joachim99@2: joachim99@2: freebsd*) joachim99@2: objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` joachim99@2: version_type=freebsd-$objformat joachim99@2: case $version_type in joachim99@2: freebsd-elf*) joachim99@2: library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' joachim99@2: need_version=no joachim99@2: need_lib_prefix=no joachim99@2: ;; joachim99@2: freebsd-*) joachim99@2: library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix' joachim99@2: need_version=yes joachim99@2: ;; joachim99@2: esac joachim99@2: shlibpath_var=LD_LIBRARY_PATH joachim99@2: case $host_os in joachim99@2: freebsd2*) joachim99@2: shlibpath_overrides_runpath=yes joachim99@2: ;; joachim99@2: *) joachim99@2: shlibpath_overrides_runpath=no joachim99@2: hardcode_into_libs=yes joachim99@2: ;; joachim99@2: esac joachim99@2: ;; joachim99@2: joachim99@2: gnu*) joachim99@2: version_type=linux joachim99@2: need_lib_prefix=no joachim99@2: need_version=no joachim99@2: library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so' joachim99@2: soname_spec='${libname}${release}.so$major' joachim99@2: shlibpath_var=LD_LIBRARY_PATH joachim99@2: hardcode_into_libs=yes joachim99@2: ;; joachim99@2: joachim99@2: hpux9* | hpux10* | hpux11*) joachim99@2: # Give a soname corresponding to the major version so that dld.sl refuses to joachim99@2: # link against other versions. joachim99@2: dynamic_linker="$host_os dld.sl" joachim99@2: version_type=sunos joachim99@2: hardcode_into_libs=all joachim99@2: need_lib_prefix=no joachim99@2: need_version=no joachim99@2: shlibpath_var=SHLIB_PATH joachim99@2: shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH joachim99@2: library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl' joachim99@2: soname_spec='${libname}${release}.sl$major' joachim99@2: # HP-UX runs *really* slowly unless shared libraries are mode 555. joachim99@2: postinstall_cmds='chmod 555 $lib' joachim99@2: ;; joachim99@2: joachim99@2: irix5* | irix6*) joachim99@2: version_type=irix joachim99@2: need_lib_prefix=no joachim99@2: need_version=no joachim99@2: soname_spec='${libname}${release}.so$major' joachim99@2: library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so' joachim99@2: case $host_os in joachim99@2: irix5*) joachim99@2: libsuff= shlibsuff= joachim99@2: ;; joachim99@2: *) joachim99@2: case $LD in # libtool.m4 will add one of these switches to LD joachim99@2: *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;; joachim99@2: *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; joachim99@2: *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;; joachim99@2: *) libsuff= shlibsuff= libmagic=never-match;; joachim99@2: esac joachim99@2: ;; joachim99@2: esac joachim99@2: shlibpath_var=LD_LIBRARY${shlibsuff}_PATH joachim99@2: shlibpath_overrides_runpath=no joachim99@2: sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" joachim99@2: sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" joachim99@2: ;; joachim99@2: joachim99@2: # No shared lib support for Linux oldld, aout, or coff. joachim99@2: linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*) joachim99@2: dynamic_linker=no joachim99@2: ;; joachim99@2: joachim99@2: # This must be Linux ELF. joachim99@2: linux-gnu*) joachim99@2: version_type=linux joachim99@2: need_lib_prefix=no joachim99@2: need_version=no joachim99@2: library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' joachim99@2: soname_spec='${libname}${release}.so$major' joachim99@2: finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' joachim99@2: shlibpath_var=LD_LIBRARY_PATH joachim99@2: shlibpath_overrides_runpath=no joachim99@2: # This implies no fast_install, which is unacceptable. joachim99@2: # Some rework will be needed to allow for fast_install joachim99@2: # before this can be enabled. joachim99@2: hardcode_into_libs=yes joachim99@2: joachim99@2: # We used to test for /lib/ld.so.1 and disable shared libraries on joachim99@2: # powerpc, because MkLinux only supported shared libraries with the joachim99@2: # GNU dynamic linker. Since this was broken with cross compilers, joachim99@2: # most powerpc-linux boxes support dynamic linking these days and joachim99@2: # people can always --disable-shared, the test was removed, and we joachim99@2: # assume the GNU/Linux dynamic linker is in use. joachim99@2: dynamic_linker='GNU/Linux ld.so' joachim99@2: ;; joachim99@2: joachim99@2: netbsd*) joachim99@2: version_type=sunos joachim99@2: if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then joachim99@2: library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' joachim99@2: finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' joachim99@2: dynamic_linker='NetBSD (a.out) ld.so' joachim99@2: need_version=yes joachim99@2: else joachim99@2: library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so' joachim99@2: soname_spec='${libname}${release}.so$major' joachim99@2: dynamic_linker='NetBSD ld.elf_so' joachim99@2: fi joachim99@2: shlibpath_var=LD_LIBRARY_PATH joachim99@2: shlibpath_overrides_runpath=yes joachim99@2: hardcode_into_libs=yes joachim99@2: ;; joachim99@2: joachim99@2: newsos6) joachim99@2: version_type=linux joachim99@2: library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' joachim99@2: shlibpath_var=LD_LIBRARY_PATH joachim99@2: shlibpath_overrides_runpath=yes joachim99@2: ;; joachim99@2: joachim99@2: openbsd*) joachim99@2: version_type=sunos joachim99@2: if test "$with_gnu_ld" = yes; then joachim99@2: need_lib_prefix=no joachim99@2: need_version=no joachim99@2: fi joachim99@2: library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' joachim99@2: finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' joachim99@2: shlibpath_var=LD_LIBRARY_PATH joachim99@2: # OpenBSD 2.7 the overriding is needed for fast-install joachim99@2: shlibpath_overrides_runpath=yes joachim99@2: ;; joachim99@2: joachim99@2: os2*) joachim99@2: libname_spec='$name' joachim99@2: need_lib_prefix=no joachim99@2: library_names_spec='$libname.dll $libname.a' joachim99@2: dynamic_linker='OS/2 ld.exe' joachim99@2: shlibpath_var=LIBPATH joachim99@2: ;; joachim99@2: joachim99@2: osf3* | osf4* | osf5*) joachim99@2: version_type=osf joachim99@2: need_version=no joachim99@2: soname_spec='${libname}${release}.so' joachim99@2: library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' joachim99@2: shlibpath_var=LD_LIBRARY_PATH joachim99@2: sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" joachim99@2: sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" joachim99@2: ;; joachim99@2: joachim99@2: sco3.2v5*) joachim99@2: version_type=osf joachim99@2: soname_spec='${libname}${release}.so$major' joachim99@2: library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' joachim99@2: shlibpath_var=LD_LIBRARY_PATH joachim99@2: ;; joachim99@2: joachim99@2: solaris*) joachim99@2: version_type=linux joachim99@2: need_lib_prefix=no joachim99@2: need_version=no joachim99@2: library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' joachim99@2: soname_spec='${libname}${release}.so$major' joachim99@2: shlibpath_var=LD_LIBRARY_PATH joachim99@2: shlibpath_overrides_runpath=yes joachim99@2: hardcode_into_libs=yes joachim99@2: # ldd complains unless libraries are executable joachim99@2: postinstall_cmds='chmod +x $lib' joachim99@2: ;; joachim99@2: joachim99@2: sunos4*) joachim99@2: version_type=sunos joachim99@2: library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' joachim99@2: finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' joachim99@2: shlibpath_var=LD_LIBRARY_PATH joachim99@2: shlibpath_overrides_runpath=yes joachim99@2: if test "$with_gnu_ld" = yes; then joachim99@2: need_lib_prefix=no joachim99@2: fi joachim99@2: need_version=yes joachim99@2: ;; joachim99@2: joachim99@2: sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) joachim99@2: version_type=linux joachim99@2: library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' joachim99@2: soname_spec='${libname}${release}.so$major' joachim99@2: shlibpath_var=LD_LIBRARY_PATH joachim99@2: case $host_vendor in joachim99@2: motorola) joachim99@2: need_lib_prefix=no joachim99@2: need_version=no joachim99@2: shlibpath_overrides_runpath=no joachim99@2: sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' joachim99@2: ;; joachim99@2: esac joachim99@2: ;; joachim99@2: joachim99@2: uts4*) joachim99@2: version_type=linux joachim99@2: library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' joachim99@2: soname_spec='${libname}${release}.so$major' joachim99@2: shlibpath_var=LD_LIBRARY_PATH joachim99@2: ;; joachim99@2: joachim99@2: dgux*) joachim99@2: version_type=linux joachim99@2: need_lib_prefix=no joachim99@2: need_version=no joachim99@2: library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' joachim99@2: soname_spec='${libname}${release}.so$major' joachim99@2: shlibpath_var=LD_LIBRARY_PATH joachim99@2: ;; joachim99@2: joachim99@2: sysv4*MP*) joachim99@2: if test -d /usr/nec ;then joachim99@2: version_type=linux joachim99@2: library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so' joachim99@2: soname_spec='$libname.so.$major' joachim99@2: shlibpath_var=LD_LIBRARY_PATH joachim99@2: fi joachim99@2: ;; joachim99@2: joachim99@2: *) joachim99@2: dynamic_linker=no joachim99@2: ;; joachim99@2: esac joachim99@2: echo "$ac_t$dynamic_linker" 1>&6 joachim99@2: test "$dynamic_linker" = no && can_build_shared=no joachim99@2: joachim99@2: # Check for command to grab the raw symbol name followed by C symbol from nm. joachim99@2: echo $ac_n "checking command to parse $NM output... $ac_c" 1>&6 joachim99@2: joachim99@2: # These are sane defaults that work on at least a few old systems. joachim99@2: # [They come from Ultrix. What could be older than Ultrix?!! ;)] joachim99@2: joachim99@2: # Character class describing NM global symbol codes. joachim99@2: symcode='[BCDEGRST]' joachim99@2: joachim99@2: # Regexp to match symbols that can be accessed directly from C. joachim99@2: sympat='\([_A-Za-z][_A-Za-z0-9]*\)' joachim99@2: joachim99@2: # Transform the above into a raw symbol and a C symbol. joachim99@2: symxfrm='\1 \2\3 \3' joachim99@2: joachim99@2: # Transform an extracted symbol line into a proper C declaration joachim99@2: global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'" joachim99@2: joachim99@2: # Define system-specific variables. joachim99@2: case $host_os in joachim99@2: aix*) joachim99@2: symcode='[BCDT]' joachim99@2: ;; joachim99@2: cygwin* | mingw* | pw32*) joachim99@2: symcode='[ABCDGISTW]' joachim99@2: ;; joachim99@2: hpux*) # Its linker distinguishes data from code symbols joachim99@2: global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^. .* \(.*\)$/extern char \1;/p'" joachim99@2: ;; joachim99@2: irix*) joachim99@2: symcode='[BCDEGRST]' joachim99@2: ;; joachim99@2: solaris* | sysv5*) joachim99@2: symcode='[BDT]' joachim99@2: ;; joachim99@2: sysv4) joachim99@2: symcode='[DFNSTU]' joachim99@2: ;; joachim99@2: esac joachim99@2: joachim99@2: # Handle CRLF in mingw tool chain joachim99@2: opt_cr= joachim99@2: case $host_os in joachim99@2: mingw*) joachim99@2: opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp joachim99@2: ;; joachim99@2: esac joachim99@2: joachim99@2: # If we're using GNU nm, then use its standard symbol codes. joachim99@2: if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then joachim99@2: symcode='[ABCDGISTW]' joachim99@2: fi joachim99@2: joachim99@2: # Try without a prefix undercore, then with it. joachim99@2: for ac_symprfx in "" "_"; do joachim99@2: joachim99@2: # Write the raw and C identifiers. joachim99@2: global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode\)[ ][ ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'" joachim99@2: joachim99@2: # Check to see that the pipe works correctly. joachim99@2: pipe_works=no joachim99@2: $rm conftest* joachim99@2: cat > conftest.$ac_ext <&5 joachim99@2: if { (eval echo $progname:1424: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then joachim99@2: # Now try to grab the symbols. joachim99@2: nlist=conftest.nm joachim99@2: if { echo "$progname:1427: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then joachim99@2: joachim99@2: # Try sorting and uniquifying the output. joachim99@2: if sort "$nlist" | uniq > "$nlist"T; then joachim99@2: mv -f "$nlist"T "$nlist" joachim99@2: else joachim99@2: rm -f "$nlist"T joachim99@2: fi joachim99@2: joachim99@2: # Make sure that we snagged all the symbols we need. joachim99@2: if egrep ' nm_test_var$' "$nlist" >/dev/null; then joachim99@2: if egrep ' nm_test_func$' "$nlist" >/dev/null; then joachim99@2: cat < conftest.$ac_ext joachim99@2: #ifdef __cplusplus joachim99@2: extern "C" { joachim99@2: #endif joachim99@2: joachim99@2: EOF joachim99@2: # Now generate the symbol file. joachim99@2: eval "$global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext' joachim99@2: joachim99@2: cat <> conftest.$ac_ext joachim99@2: #if defined (__STDC__) && __STDC__ joachim99@2: # define lt_ptr_t void * joachim99@2: #else joachim99@2: # define lt_ptr_t char * joachim99@2: # define const joachim99@2: #endif joachim99@2: joachim99@2: /* The mapping between symbol names and symbols. */ joachim99@2: const struct { joachim99@2: const char *name; joachim99@2: lt_ptr_t address; joachim99@2: } joachim99@2: lt_preloaded_symbols[] = joachim99@2: { joachim99@2: EOF joachim99@2: sed 's/^. \(.*\) \(.*\)$/ {"\2", (lt_ptr_t) \&\2},/' < "$nlist" >> conftest.$ac_ext joachim99@2: cat <<\EOF >> conftest.$ac_ext joachim99@2: {0, (lt_ptr_t) 0} joachim99@2: }; joachim99@2: joachim99@2: #ifdef __cplusplus joachim99@2: } joachim99@2: #endif joachim99@2: EOF joachim99@2: # Now try linking the two files. joachim99@2: mv conftest.$objext conftstm.$objext joachim99@2: save_LIBS="$LIBS" joachim99@2: save_CFLAGS="$CFLAGS" joachim99@2: LIBS="conftstm.$objext" joachim99@2: CFLAGS="$CFLAGS$no_builtin_flag" joachim99@2: if { (eval echo $progname:1479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then joachim99@2: pipe_works=yes joachim99@2: else joachim99@2: echo "$progname: failed program was:" >&5 joachim99@2: cat conftest.$ac_ext >&5 joachim99@2: fi joachim99@2: LIBS="$save_LIBS" joachim99@2: else joachim99@2: echo "cannot find nm_test_func in $nlist" >&5 joachim99@2: fi joachim99@2: else joachim99@2: echo "cannot find nm_test_var in $nlist" >&5 joachim99@2: fi joachim99@2: else joachim99@2: echo "cannot run $global_symbol_pipe" >&5 joachim99@2: fi joachim99@2: else joachim99@2: echo "$progname: failed program was:" >&5 joachim99@2: cat conftest.$ac_ext >&5 joachim99@2: fi joachim99@2: $rm conftest* conftst* joachim99@2: joachim99@2: # Do not use the global_symbol_pipe unless it works. joachim99@2: if test "$pipe_works" = yes; then joachim99@2: break joachim99@2: else joachim99@2: global_symbol_pipe= joachim99@2: fi joachim99@2: done joachim99@2: if test "$pipe_works" = yes; then joachim99@2: echo "${ac_t}ok" 1>&6 joachim99@2: else joachim99@2: echo "${ac_t}failed" 1>&6 joachim99@2: fi joachim99@2: joachim99@2: if test -z "$global_symbol_pipe"; then joachim99@2: global_symbol_to_cdecl= joachim99@2: fi joachim99@2: joachim99@2: # Report the final consequences. joachim99@2: echo "checking if libtool supports shared libraries... $can_build_shared" 1>&6 joachim99@2: joachim99@2: # Only try to build win32 dlls if AC_LIBTOOL_WIN32_DLL was used in joachim99@2: # configure.in, otherwise build static only libraries. joachim99@2: case $host_os in joachim99@2: cygwin* | mingw* | pw32* | os2*) joachim99@2: if test x$can_build_shared = xyes; then joachim99@2: test x$enable_win32_dll = xno && can_build_shared=no joachim99@2: echo "checking if package supports dlls... $can_build_shared" 1>&6 joachim99@2: fi joachim99@2: ;; joachim99@2: esac joachim99@2: joachim99@2: echo $ac_n "checking whether to build shared libraries... $ac_c" 1>&6 joachim99@2: test "$can_build_shared" = "no" && enable_shared=no joachim99@2: joachim99@2: # On AIX, shared libraries and static libraries use the same namespace, and joachim99@2: # are all built from PIC. joachim99@2: case $host_os in joachim99@2: aix3*) joachim99@2: test "$enable_shared" = yes && enable_static=no joachim99@2: if test -n "$RANLIB"; then joachim99@2: archive_cmds="$archive_cmds~\$RANLIB \$lib" joachim99@2: postinstall_cmds='$RANLIB $lib' joachim99@2: fi joachim99@2: ;; joachim99@2: joachim99@2: aix4* | aix5*) joachim99@2: test "$enable_shared" = yes && enable_static=no joachim99@2: ;; joachim99@2: esac joachim99@2: joachim99@2: echo "$ac_t$enable_shared" 1>&6 joachim99@2: joachim99@2: # Make sure either enable_shared or enable_static is yes. joachim99@2: test "$enable_shared" = yes || enable_static=yes joachim99@2: joachim99@2: echo "checking whether to build static libraries... $enable_static" 1>&6 joachim99@2: joachim99@2: if test "$hardcode_action" = relink; then joachim99@2: # Fast installation is not supported joachim99@2: enable_fast_install=no joachim99@2: elif test "$shlibpath_overrides_runpath" = yes || joachim99@2: test "$enable_shared" = no; then joachim99@2: # Fast installation is not necessary joachim99@2: enable_fast_install=needless joachim99@2: fi joachim99@2: joachim99@2: variables_saved_for_relink="PATH $shlibpath_var $runpath_var" joachim99@2: if test "$with_gcc" = yes; then joachim99@2: variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" joachim99@2: fi joachim99@2: joachim99@2: # Check whether we must set pic_mode to default joachim99@2: test -z "$pic_flag" && pic_mode=default joachim99@2: joachim99@2: if test "x$enable_dlopen" != xyes; then joachim99@2: enable_dlopen=unknown joachim99@2: enable_dlopen_self=unknown joachim99@2: enable_dlopen_self_static=unknown joachim99@2: else joachim99@2: if test "X${lt_cv_dlopen+set}" != Xset; then joachim99@2: lt_cv_dlopen=no lt_cv_dlopen_libs= joachim99@2: echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 joachim99@2: echo "$progname:1583: checking for dlopen in -ldl" >&5 joachim99@2: if test "X${ac_cv_lib_dl_dlopen+set}" = Xset; then joachim99@2: echo $ac_n "(cached) $ac_c" 1>&6 joachim99@2: else joachim99@2: ac_save_LIBS="$LIBS" joachim99@2: LIBS="-ldl $LIBS" joachim99@2: cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then joachim99@2: rm -rf conftest* joachim99@2: ac_cv_lib_dl_dlopen=yes joachim99@2: else joachim99@2: echo "$progname: failed program was:" >&5 joachim99@2: cat conftest.$ac_ext >&5 joachim99@2: rm -rf conftest* joachim99@2: ac_cv_lib_dl_dlopen=no joachim99@2: fi joachim99@2: rm -f conftest* joachim99@2: LIBS="$ac_save_LIBS" joachim99@2: joachim99@2: fi joachim99@2: if test "X$ac_cv_lib_dl_dlopen" = Xyes; then joachim99@2: echo "$ac_t""yes" 1>&6 joachim99@2: lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" joachim99@2: else joachim99@2: echo "$ac_t""no" 1>&6 joachim99@2: echo $ac_n "checking for dlopen""... $ac_c" 1>&6 joachim99@2: echo "$progname:1622: checking for dlopen" >&5 joachim99@2: if test "X${ac_cv_func_dlopen+set}" = Xset; then joachim99@2: echo $ac_n "(cached) $ac_c" 1>&6 joachim99@2: else joachim99@2: cat > conftest.$ac_ext < joachim99@2: /* Override any gcc2 internal prototype to avoid an error. */ joachim99@2: /* We use char because int might match the return type of a gcc2 joachim99@2: builtin and then its argument prototype would still apply. */ joachim99@2: #ifdef __cplusplus joachim99@2: extern "C" joachim99@2: #endif joachim99@2: char dlopen(); joachim99@2: joachim99@2: int main() { joachim99@2: joachim99@2: /* The GNU C library defines this for functions which it implements joachim99@2: to always fail with ENOSYS. Some functions are actually named joachim99@2: something starting with __ and the normal name is an alias. */ joachim99@2: #if defined (__stub_dlopen) || defined (__stub___dlopen) joachim99@2: choke me joachim99@2: #else joachim99@2: dlopen(); joachim99@2: #endif joachim99@2: joachim99@2: ; return 0; } joachim99@2: EOF joachim99@2: if { (eval echo $progname:1652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then joachim99@2: rm -rf conftest* joachim99@2: ac_cv_func_dlopen=yes joachim99@2: else joachim99@2: echo "$progname: failed program was:" >&5 joachim99@2: cat conftest.$ac_ext >&5 joachim99@2: rm -rf conftest* joachim99@2: ac_cv_func_dlopen=no joachim99@2: fi joachim99@2: rm -f conftest* joachim99@2: fi joachim99@2: if test "X$ac_cv_func_dlopen" = Xyes; then joachim99@2: echo "$ac_t""yes" 1>&6 joachim99@2: lt_cv_dlopen="dlopen" joachim99@2: else joachim99@2: echo "$ac_t""no" 1>&6 joachim99@2: echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6 joachim99@2: echo "$progname:1669: checking for dlopen in -lsvld" >&5 joachim99@2: if test "X${ac_cv_lib_svld_dlopen+set}" = Xset; then joachim99@2: echo $ac_n "(cached) $ac_c" 1>&6 joachim99@2: else joachim99@2: ac_save_LIBS="$LIBS" joachim99@2: LIBS="-lsvld $LIBS" joachim99@2: cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then joachim99@2: rm -rf conftest* joachim99@2: ac_cv_lib_svld_dlopen=yes joachim99@2: else joachim99@2: echo "$progname: failed program was:" >&5 joachim99@2: cat conftest.$ac_ext >&5 joachim99@2: rm -rf conftest* joachim99@2: ac_cv_lib_svld_dlopen=no joachim99@2: fi joachim99@2: rm -f conftest* joachim99@2: LIBS="$ac_save_LIBS" joachim99@2: joachim99@2: fi joachim99@2: if test "X$ac_cv_lib_svld_dlopen" = Xyes; then joachim99@2: echo "$ac_t""yes" 1>&6 joachim99@2: lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" joachim99@2: else joachim99@2: echo "$ac_t""no" 1>&6 joachim99@2: echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6 joachim99@2: echo "$progname:1708: checking for dld_link in -ldld" >&5 joachim99@2: if test "X${ac_cv_lib_dld_dld_link+set}" = Xset; then joachim99@2: echo $ac_n "(cached) $ac_c" 1>&6 joachim99@2: else joachim99@2: ac_save_LIBS="$LIBS" joachim99@2: LIBS="-ldld $LIBS" joachim99@2: cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then joachim99@2: rm -rf conftest* joachim99@2: ac_cv_lib_dld_dld_link=yes joachim99@2: else joachim99@2: echo "$progname: failed program was:" >&5 joachim99@2: cat conftest.$ac_ext >&5 joachim99@2: rm -rf conftest* joachim99@2: ac_cv_lib_dld_dld_link=no joachim99@2: fi joachim99@2: rm -f conftest* joachim99@2: LIBS="$ac_save_LIBS" joachim99@2: joachim99@2: fi joachim99@2: if test "X$ac_cv_lib_dld_dld_link" = Xyes; then joachim99@2: echo "$ac_t""yes" 1>&6 joachim99@2: lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" joachim99@2: else joachim99@2: echo "$ac_t""no" 1>&6 joachim99@2: echo $ac_n "checking for shl_load""... $ac_c" 1>&6 joachim99@2: echo "$progname:1747: checking for shl_load" >&5 joachim99@2: if test "X${ac_cv_func_shl_load+set}" = Xset; then joachim99@2: echo $ac_n "(cached) $ac_c" 1>&6 joachim99@2: else joachim99@2: cat > conftest.$ac_ext < joachim99@2: /* Override any gcc2 internal prototype to avoid an error. */ joachim99@2: /* We use char because int might match the return type of a gcc2 joachim99@2: builtin and then its argument prototype would still apply. */ joachim99@2: #ifdef __cplusplus joachim99@2: extern "C" joachim99@2: #endif joachim99@2: char shl_load(); joachim99@2: joachim99@2: int main() { joachim99@2: joachim99@2: /* The GNU C library defines this for functions which it implements joachim99@2: to always fail with ENOSYS. Some functions are actually named joachim99@2: something starting with __ and the normal name is an alias. */ joachim99@2: #if defined (__stub_shl_load) || defined (__stub___shl_load) joachim99@2: choke me joachim99@2: #else joachim99@2: shl_load(); joachim99@2: #endif joachim99@2: joachim99@2: ; return 0; } joachim99@2: EOF joachim99@2: if { (eval echo $progname:1777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then joachim99@2: rm -rf conftest* joachim99@2: ac_cv_func_shl_load=yes joachim99@2: else joachim99@2: echo "$progname: failed program was:" >&5 joachim99@2: cat conftest.$ac_ext >&5 joachim99@2: rm -rf conftest* joachim99@2: ac_cv_func_shl_load=no joachim99@2: fi joachim99@2: rm -f conftest* joachim99@2: fi joachim99@2: joachim99@2: if test "X$ac_cv_func_shl_load" = Xyes; then joachim99@2: echo "$ac_t""yes" 1>&6 joachim99@2: lt_cv_dlopen="shl_load" joachim99@2: else joachim99@2: echo "$ac_t""no" 1>&6 joachim99@2: echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 joachim99@2: echo "$progname:1795: checking for shl_load in -ldld" >&5 joachim99@2: if test "X${ac_cv_lib_dld_shl_load+set}" = Xset; then joachim99@2: echo $ac_n "(cached) $ac_c" 1>&6 joachim99@2: else joachim99@2: ac_save_LIBS="$LIBS" joachim99@2: LIBS="-ldld $LIBS" joachim99@2: cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then joachim99@2: rm -rf conftest* joachim99@2: ac_cv_lib_dld_shl_load=yes joachim99@2: else joachim99@2: echo "$progname: failed program was:" >&5 joachim99@2: cat conftest.$ac_ext >&5 joachim99@2: rm -rf conftest* joachim99@2: ac_cv_lib_dld_shl_load=no joachim99@2: fi joachim99@2: rm -f conftest* joachim99@2: LIBS="$ac_save_LIBS" joachim99@2: joachim99@2: fi joachim99@2: if test "X$ac_cv_lib_dld_shl_load" = Xyes; then joachim99@2: echo "$ac_t""yes" 1>&6 joachim99@2: lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" joachim99@2: else joachim99@2: echo "$ac_t""no" 1>&6 joachim99@2: fi joachim99@2: joachim99@2: joachim99@2: fi joachim99@2: joachim99@2: joachim99@2: fi joachim99@2: joachim99@2: joachim99@2: fi joachim99@2: joachim99@2: joachim99@2: fi joachim99@2: joachim99@2: fi joachim99@2: joachim99@2: fi joachim99@2: joachim99@2: if test "x$lt_cv_dlopen" != xno; then joachim99@2: enable_dlopen=yes joachim99@2: else joachim99@2: enable_dlopen=no joachim99@2: fi joachim99@2: joachim99@2: case $lt_cv_dlopen in joachim99@2: dlopen) joachim99@2: for ac_hdr in dlfcn.h; do joachim99@2: ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` joachim99@2: echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 joachim99@2: echo "$progname:1863: checking for $ac_hdr" >&5 joachim99@2: if eval "test \"`echo 'X$''{'ac_cv_header_$ac_safe'+set}'`\" = Xset"; then joachim99@2: echo $ac_n "(cached) $ac_c" 1>&6 joachim99@2: else joachim99@2: cat > conftest.$ac_ext < joachim99@2: int fnord = 0; joachim99@2: int main () { return(0); } joachim99@2: EOF joachim99@2: ac_try="$ac_compile >/dev/null 2>conftest.out" joachim99@2: { (eval echo $progname:1874: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } joachim99@2: ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` joachim99@2: if test -z "$ac_err"; then joachim99@2: rm -rf conftest* joachim99@2: eval "ac_cv_header_$ac_safe=yes" joachim99@2: else joachim99@2: echo "$ac_err" >&5 joachim99@2: echo "$progname: failed program was:" >&5 joachim99@2: cat conftest.$ac_ext >&5 joachim99@2: rm -rf conftest* joachim99@2: eval "ac_cv_header_$ac_safe=no" joachim99@2: fi joachim99@2: rm -f conftest* joachim99@2: fi joachim99@2: if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then joachim99@2: echo "$ac_t""yes" 1>&6 joachim99@2: else joachim99@2: echo "$ac_t""no" 1>&6 joachim99@2: fi joachim99@2: done joachim99@2: joachim99@2: if test "x$ac_cv_header_dlfcn_h" = xyes; then joachim99@2: CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" joachim99@2: fi joachim99@2: eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" joachim99@2: LIBS="$lt_cv_dlopen_libs $LIBS" joachim99@2: joachim99@2: echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6 joachim99@2: echo "$progname:1902: checking whether a program can dlopen itself" >&5 joachim99@2: if test "X${lt_cv_dlopen_self+set}" = Xset; then joachim99@2: echo $ac_n "(cached) $ac_c" 1>&6 joachim99@2: else joachim99@2: if test "$cross_compiling" = yes; then joachim99@2: lt_cv_dlopen_self=cross joachim99@2: else joachim99@2: cat > conftest.$ac_ext < joachim99@2: #endif joachim99@2: joachim99@2: #include joachim99@2: joachim99@2: #ifdef RTLD_GLOBAL joachim99@2: # define LTDL_GLOBAL RTLD_GLOBAL joachim99@2: #else joachim99@2: # ifdef DL_GLOBAL joachim99@2: # define LTDL_GLOBAL DL_GLOBAL joachim99@2: # else joachim99@2: # define LTDL_GLOBAL 0 joachim99@2: # endif joachim99@2: #endif joachim99@2: joachim99@2: /* We may have to define LTDL_LAZY_OR_NOW in the command line if we joachim99@2: find out it does not work in some platform. */ joachim99@2: #ifndef LTDL_LAZY_OR_NOW joachim99@2: # ifdef RTLD_LAZY joachim99@2: # define LTDL_LAZY_OR_NOW RTLD_LAZY joachim99@2: # else joachim99@2: # ifdef DL_LAZY joachim99@2: # define LTDL_LAZY_OR_NOW DL_LAZY joachim99@2: # else joachim99@2: # ifdef RTLD_NOW joachim99@2: # define LTDL_LAZY_OR_NOW RTLD_NOW joachim99@2: # else joachim99@2: # ifdef DL_NOW joachim99@2: # define LTDL_LAZY_OR_NOW DL_NOW joachim99@2: # else joachim99@2: # define LTDL_LAZY_OR_NOW 0 joachim99@2: # endif joachim99@2: # endif joachim99@2: # endif joachim99@2: # endif joachim99@2: #endif joachim99@2: joachim99@2: void fnord() { int i=42; } joachim99@2: int main() { joachim99@2: void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW); joachim99@2: if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord"); joachim99@2: if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); return 1;} joachim99@2: joachim99@2: EOF joachim99@2: if { (eval echo $progname:1957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null joachim99@2: then joachim99@2: lt_cv_dlopen_self=yes joachim99@2: else joachim99@2: echo "$progname: failed program was:" >&5 joachim99@2: cat conftest.$ac_ext >&5 joachim99@2: rm -fr conftest* joachim99@2: lt_cv_dlopen_self=no joachim99@2: fi joachim99@2: rm -fr conftest* joachim99@2: fi joachim99@2: joachim99@2: fi joachim99@2: joachim99@2: echo "$ac_t""$lt_cv_dlopen_self" 1>&6 joachim99@2: joachim99@2: if test "$lt_cv_dlopen_self" = yes; then joachim99@2: LDFLAGS="$LDFLAGS $link_static_flag" joachim99@2: echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6 joachim99@2: echo "$progname:1976: checking whether a statically linked program can dlopen itself" >&5 joachim99@2: if test "X${lt_cv_dlopen_self_static+set}" = Xset; then joachim99@2: echo $ac_n "(cached) $ac_c" 1>&6 joachim99@2: else joachim99@2: if test "$cross_compiling" = yes; then joachim99@2: lt_cv_dlopen_self_static=cross joachim99@2: else joachim99@2: cat > conftest.$ac_ext < joachim99@2: #endif joachim99@2: joachim99@2: #include joachim99@2: joachim99@2: #ifdef RTLD_GLOBAL joachim99@2: # define LTDL_GLOBAL RTLD_GLOBAL joachim99@2: #else joachim99@2: # ifdef DL_GLOBAL joachim99@2: # define LTDL_GLOBAL DL_GLOBAL joachim99@2: # else joachim99@2: # define LTDL_GLOBAL 0 joachim99@2: # endif joachim99@2: #endif joachim99@2: joachim99@2: /* We may have to define LTDL_LAZY_OR_NOW in the command line if we joachim99@2: find out it does not work in some platform. */ joachim99@2: #ifndef LTDL_LAZY_OR_NOW joachim99@2: # ifdef RTLD_LAZY joachim99@2: # define LTDL_LAZY_OR_NOW RTLD_LAZY joachim99@2: # else joachim99@2: # ifdef DL_LAZY joachim99@2: # define LTDL_LAZY_OR_NOW DL_LAZY joachim99@2: # else joachim99@2: # ifdef RTLD_NOW joachim99@2: # define LTDL_LAZY_OR_NOW RTLD_NOW joachim99@2: # else joachim99@2: # ifdef DL_NOW joachim99@2: # define LTDL_LAZY_OR_NOW DL_NOW joachim99@2: # else joachim99@2: # define LTDL_LAZY_OR_NOW 0 joachim99@2: # endif joachim99@2: # endif joachim99@2: # endif joachim99@2: # endif joachim99@2: #endif joachim99@2: joachim99@2: void fnord() { int i=42; } joachim99@2: int main() { joachim99@2: void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW); joachim99@2: if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord"); joachim99@2: if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); return 1; } joachim99@2: joachim99@2: EOF joachim99@2: if { (eval echo $progname:2031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null joachim99@2: then joachim99@2: lt_cv_dlopen_self_static=yes joachim99@2: else joachim99@2: echo "$progname: failed program was:" >&5 joachim99@2: cat conftest.$ac_ext >&5 joachim99@2: rm -fr conftest* joachim99@2: lt_cv_dlopen_self_static=no joachim99@2: fi joachim99@2: rm -fr conftest* joachim99@2: fi joachim99@2: joachim99@2: fi joachim99@2: joachim99@2: echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6 joachim99@2: fi joachim99@2: ;; joachim99@2: esac joachim99@2: joachim99@2: case $lt_cv_dlopen_self in joachim99@2: yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; joachim99@2: *) enable_dlopen_self=unknown ;; joachim99@2: esac joachim99@2: joachim99@2: case $lt_cv_dlopen_self_static in joachim99@2: yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; joachim99@2: *) enable_dlopen_self_static=unknown ;; joachim99@2: esac joachim99@2: fi joachim99@2: joachim99@2: # Copy echo and quote the copy, instead of the original, because it is joachim99@2: # used later. joachim99@2: ltecho="$echo" joachim99@2: if test "X$ltecho" = "X$CONFIG_SHELL $0 --fallback-echo"; then joachim99@2: ltecho="$CONFIG_SHELL \$0 --fallback-echo" joachim99@2: fi joachim99@2: LTSHELL="$SHELL" joachim99@2: joachim99@2: LTCONFIG_VERSION="$VERSION" joachim99@2: joachim99@2: # Only quote variables if we're using ltmain.sh. joachim99@2: case $ltmain in joachim99@2: *.sh) joachim99@2: # Now quote all the things that may contain metacharacters. joachim99@2: for var in ltecho old_AR old_AR_FLAGS old_CC old_LTCC old_CFLAGS old_CPPFLAGS \ joachim99@2: old_MAGIC_CMD old_LD old_LDFLAGS old_LIBS \ joachim99@2: old_LN_S old_NM old_RANLIB old_STRIP \ joachim99@2: old_AS old_DLLTOOL old_OBJDUMP \ joachim99@2: old_OBJEXT old_EXEEXT old_reload_flag \ joachim99@2: old_deplibs_check_method old_file_magic_cmd \ joachim99@2: AR AR_FLAGS CC LTCC LD LN_S NM LTSHELL LTCONFIG_VERSION \ joachim99@2: reload_flag reload_cmds wl \ joachim99@2: pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \ joachim99@2: thread_safe_flag_spec whole_archive_flag_spec libname_spec \ joachim99@2: library_names_spec soname_spec \ joachim99@2: RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \ joachim99@2: old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \ joachim99@2: postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \ joachim99@2: predep_objects postdep_objects predeps postdeps compiler_lib_search_path \ joachim99@2: old_striplib striplib file_magic_cmd export_symbols_cmds \ joachim99@2: deplibs_check_method allow_undefined_flag no_undefined_flag \ joachim99@2: finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \ joachim99@2: hardcode_libdir_flag_spec hardcode_libdir_separator \ joachim99@2: sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ joachim99@2: compiler_c_o need_locks exclude_expsyms include_expsyms; do joachim99@2: joachim99@2: case $var in joachim99@2: reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \ joachim99@2: old_postinstall_cmds | old_postuninstall_cmds | \ joachim99@2: export_symbols_cmds | archive_cmds | archive_expsym_cmds | \ joachim99@2: extract_expsyms_cmds | old_archive_from_expsyms_cmds | \ joachim99@2: postinstall_cmds | postuninstall_cmds | \ joachim99@2: finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) joachim99@2: # Double-quote double-evaled strings. joachim99@2: eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ### testsuite: skip nested quoting test joachim99@2: ;; joachim99@2: *) joachim99@2: eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ### testsuite: skip nested quoting test joachim99@2: ;; joachim99@2: esac joachim99@2: done joachim99@2: joachim99@2: case $ltecho in joachim99@2: *'\$0 --fallback-echo"') joachim99@2: ltecho=`$echo "X$ltecho" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` joachim99@2: ;; joachim99@2: esac joachim99@2: joachim99@2: if test -z "$tagname"; then joachim99@2: trap "$rm \"$ofile\"; exit 1" 1 2 15 joachim99@2: echo "creating $ofile" joachim99@2: $rm "$ofile" joachim99@2: cat < "$ofile" joachim99@2: #! $SHELL joachim99@2: joachim99@2: # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. joachim99@2: # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) joachim99@2: # NOTE: Changes made to this file will be lost: look at ltconfig or ltmain.sh. joachim99@2: # joachim99@2: # Copyright (C) 1996-2000 Free Software Foundation, Inc. joachim99@2: # Originally by Gordon Matzigkeit , 1996 joachim99@2: # joachim99@2: # This program is free software; you can redistribute it and/or modify joachim99@2: # it under the terms of the GNU General Public License as published by joachim99@2: # the Free Software Foundation; either version 2 of the License, or joachim99@2: # (at your option) any later version. joachim99@2: # joachim99@2: # This program is distributed in the hope that it will be useful, but joachim99@2: # WITHOUT ANY WARRANTY; without even the implied warranty of joachim99@2: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU joachim99@2: # General Public License for more details. joachim99@2: # joachim99@2: # You should have received a copy of the GNU General Public License joachim99@2: # along with this program; if not, write to the Free Software joachim99@2: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. joachim99@2: # joachim99@2: # As a special exception to the GNU General Public License, if you joachim99@2: # distribute this file as part of a program that contains a joachim99@2: # configuration script generated by Autoconf, you may include it under joachim99@2: # the same distribution terms that you use for the rest of that program. joachim99@2: joachim99@2: # Sed that helps us avoid accidentally triggering echo(1) options like -n. joachim99@2: Xsed="sed -e s/^X//" joachim99@2: joachim99@2: # The HP-UX ksh and POSIX shell print the target directory to stdout joachim99@2: # if CDPATH is set. joachim99@2: if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi joachim99@2: joachim99@2: # The names of the tagged configurations supported by this script. joachim99@2: available_tags= joachim99@2: joachim99@2: ### BEGIN LIBTOOL CONFIG joachim99@2: EOF joachim99@2: else joachim99@2: echo "appending configuration tag \"$tagname\" to $ofile" joachim99@2: echo "### BEGIN LIBTOOL TAG CONFIG: $tagname" >> "$ofile" joachim99@2: fi joachim99@2: cfgfile="$ofile" joachim99@2: ;; joachim99@2: joachim99@2: *) joachim99@2: # Double-quote the variables that need it (for aesthetics). joachim99@2: for var in old_AR old_AR_FLAGS old_CC old_LTCC old_CFLAGS old_CPPFLAGS \ joachim99@2: old_MAGIC_CMD old_LD old_LDFLAGS old_LIBS \ joachim99@2: old_LN_S old_NM old_RANLIB old_STRIP \ joachim99@2: old_AS old_DLLTOOL old_OBJDUMP \ joachim99@2: old_OBJEXT old_EXEEXT old_reload_flag \ joachim99@2: old_deplibs_check_method old_file_magic_cmd; do joachim99@2: eval "$var=\\\"\$var\\\"" joachim99@2: done joachim99@2: joachim99@2: # Just create a config file. joachim99@2: cfgfile="$ofile.cfg" joachim99@2: if test -z "$tagname"; then joachim99@2: trap "$rm \"$cfgfile\"; exit 1" 1 2 15 joachim99@2: echo "creating $cfgfile" joachim99@2: $rm "$cfgfile" joachim99@2: cat < "$cfgfile" joachim99@2: # `$echo "$cfgfile" | sed 's%^.*/%%'` - Libtool configuration file. joachim99@2: # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) joachim99@2: joachim99@2: ### BEGIN LIBTOOL CONFIG joachim99@2: EOF joachim99@2: else joachim99@2: echo "appending to $cfgfile" joachim99@2: echo "### BEGIN LIBTOOL TAG CONFIG: $tagname" >> "$ofile" joachim99@2: fi joachim99@2: ;; joachim99@2: esac joachim99@2: joachim99@2: cat <> "$cfgfile" joachim99@2: # Libtool was configured as follows, on host `(hostname || uname -n) 2>/dev/null | sed 1q`: joachim99@2: # joachim99@2: # AR=$old_AR AR_FLAGS=$old_AR_FLAGS LTCC=$old_LTCC CC=$old_CC \\ joachim99@2: # CFLAGS=$old_CFLAGS CPPFLAGS=$old_CPPFLAGS \\ joachim99@2: # MAGIC_CMD=$old_MAGIC_CMD LD=$old_LD LDFLAGS=$old_LDFLAGS LIBS=$old_LIBS \\ joachim99@2: # LN_S=$old_LN_S NM=$old_NM RANLIB=$old_RANLIB STRIP=$old_STRIP \\ joachim99@2: # AS=$old_AS DLLTOOL=$old_DLLTOOL OBJDUMP=$old_OBJDUMP \\ joachim99@2: # objext=$old_OBJEXT exeext=$old_EXEEXT reload_flag=$old_reload_flag \\ joachim99@2: # deplibs_check_method=$old_deplibs_check_method \\ joachim99@2: # file_magic_cmd=$old_file_magic_cmd \\ joachim99@2: # $0$ltconfig_args joachim99@2: # joachim99@2: # Compiler and other test output produced by $progname, useful for joachim99@2: # debugging $progname, is in ./config.log if it exists. joachim99@2: joachim99@2: # The version of $progname that generated this script. joachim99@2: LTCONFIG_VERSION=$LTCONFIG_VERSION joachim99@2: joachim99@2: # Shell to use when invoking shell scripts. joachim99@2: SHELL=$LTSHELL joachim99@2: joachim99@2: # Whether or not to build shared libraries. joachim99@2: build_libtool_libs=$enable_shared joachim99@2: joachim99@2: # Whether or not to add -lc for building shared libraries. joachim99@2: build_libtool_need_lc=$need_lc joachim99@2: joachim99@2: # Whether or not to build static libraries. joachim99@2: build_old_libs=$enable_static joachim99@2: joachim99@2: # Whether or not to optimize for fast installation. joachim99@2: fast_install=$enable_fast_install joachim99@2: joachim99@2: # The host system. joachim99@2: host_alias=$host_alias joachim99@2: host=$host joachim99@2: joachim99@2: # An echo program that does not interpret backslashes. joachim99@2: echo=$ltecho joachim99@2: joachim99@2: # The archiver. joachim99@2: AR=$AR joachim99@2: AR_FLAGS=$AR_FLAGS joachim99@2: joachim99@2: # A C compiler. joachim99@2: LTCC=$LTCC joachim99@2: joachim99@2: # A language-specific compiler. joachim99@2: CC=$CC joachim99@2: joachim99@2: # Is the compiler the GNU C compiler? joachim99@2: with_gcc=$with_gcc joachim99@2: joachim99@2: # The linker used to build libraries. joachim99@2: LD=$LD joachim99@2: joachim99@2: # Whether we need hard or soft links. joachim99@2: LN_S=$LN_S joachim99@2: joachim99@2: # A BSD-compatible nm program. joachim99@2: NM=$NM joachim99@2: joachim99@2: # A symbol stripping program joachim99@2: STRIP=$STRIP joachim99@2: joachim99@2: # Used to examine libraries when file_magic_cmd begins "file" joachim99@2: MAGIC_CMD=$MAGIC_CMD joachim99@2: joachim99@2: # Used on cygwin: DLL creation program. joachim99@2: DLLTOOL="$DLLTOOL" joachim99@2: joachim99@2: # Used on cygwin: object dumper. joachim99@2: OBJDUMP="$OBJDUMP" joachim99@2: joachim99@2: # Used on cygwin: assembler. joachim99@2: AS="$AS" joachim99@2: joachim99@2: # The name of the directory that contains temporary libtool files. joachim99@2: objdir=$objdir joachim99@2: joachim99@2: # How to create reloadable object files. joachim99@2: reload_flag=$reload_flag joachim99@2: reload_cmds=$reload_cmds joachim99@2: joachim99@2: # How to pass a linker flag through the compiler. joachim99@2: wl=$wl joachim99@2: joachim99@2: # Object file suffix (normally "o"). joachim99@2: objext="$objext" joachim99@2: joachim99@2: # Old archive suffix (normally "a"). joachim99@2: libext="$libext" joachim99@2: joachim99@2: # Executable file suffix (normally ""). joachim99@2: exeext="$exeext" joachim99@2: joachim99@2: # Additional compiler flags for building library objects. joachim99@2: pic_flag=$pic_flag joachim99@2: pic_mode=$pic_mode joachim99@2: joachim99@2: # What is the maximum length of a command? joachim99@2: max_cmd_len=$max_cmd_len joachim99@2: joachim99@2: # Does compiler simultaneously support -c and -o options? joachim99@2: compiler_c_o=$compiler_c_o joachim99@2: joachim99@2: # Must we lock files when doing compilation ? joachim99@2: need_locks=$need_locks joachim99@2: joachim99@2: # Do we need the lib prefix for modules? joachim99@2: need_lib_prefix=$need_lib_prefix joachim99@2: joachim99@2: # Do we need a version for libraries? joachim99@2: need_version=$need_version joachim99@2: joachim99@2: # Whether dlopen is supported. joachim99@2: dlopen_support=$enable_dlopen joachim99@2: joachim99@2: # Whether dlopen of programs is supported. joachim99@2: dlopen_self=$enable_dlopen_self joachim99@2: joachim99@2: # Whether dlopen of statically linked programs is supported. joachim99@2: dlopen_self_static=$enable_dlopen_self_static joachim99@2: joachim99@2: # Compiler flag to prevent dynamic linking. joachim99@2: link_static_flag=$link_static_flag joachim99@2: joachim99@2: # Compiler flag to turn off builtin functions. joachim99@2: no_builtin_flag=$no_builtin_flag joachim99@2: joachim99@2: # Compiler flag to allow reflexive dlopens. joachim99@2: export_dynamic_flag_spec=$export_dynamic_flag_spec joachim99@2: joachim99@2: # Compiler flag to generate shared objects directly from archives. joachim99@2: whole_archive_flag_spec=$whole_archive_flag_spec joachim99@2: joachim99@2: # Compiler flag to generate thread-safe objects. joachim99@2: thread_safe_flag_spec=$thread_safe_flag_spec joachim99@2: joachim99@2: # Library versioning type. joachim99@2: version_type=$version_type joachim99@2: joachim99@2: # Format of library name prefix. joachim99@2: libname_spec=$libname_spec joachim99@2: joachim99@2: # List of archive names. First name is the real one, the rest are links. joachim99@2: # The last name is the one that the linker finds with -lNAME. joachim99@2: library_names_spec=$library_names_spec joachim99@2: joachim99@2: # The coded name of the library, if different from the real name. joachim99@2: soname_spec=$soname_spec joachim99@2: joachim99@2: # Commands used to build and install an old-style archive. joachim99@2: RANLIB=$RANLIB joachim99@2: old_archive_cmds=$old_archive_cmds joachim99@2: old_postinstall_cmds=$old_postinstall_cmds joachim99@2: old_postuninstall_cmds=$old_postuninstall_cmds joachim99@2: joachim99@2: # Create an old-style archive from a shared archive. joachim99@2: old_archive_from_new_cmds=$old_archive_from_new_cmds joachim99@2: joachim99@2: # Create a temporary old-style archive to link instead of a shared archive. joachim99@2: old_archive_from_expsyms_cmds=$old_archive_from_expsyms_cmds joachim99@2: joachim99@2: # Commands used to build and install a shared archive. joachim99@2: archive_cmds=$archive_cmds joachim99@2: archive_expsym_cmds=$archive_expsym_cmds joachim99@2: postinstall_cmds=$postinstall_cmds joachim99@2: postuninstall_cmds=$postuninstall_cmds joachim99@2: joachim99@2: # Commands to strip libraries. joachim99@2: old_striplib=$old_striplib joachim99@2: striplib=$striplib joachim99@2: joachim99@2: # Dependencies to place before the objects being linked to create a joachim99@2: # shared library. joachim99@2: predep_objects=$predep_objects joachim99@2: joachim99@2: # Dependencies to place after the objects being linked to create a joachim99@2: # shared library. joachim99@2: postdep_objects=$postdep_objects joachim99@2: joachim99@2: # Dependencies to place before the objects being linked to create a joachim99@2: # shared library. joachim99@2: predeps=$predeps joachim99@2: joachim99@2: # Dependencies to place after the objects being linked to create a joachim99@2: # shared library. joachim99@2: postdeps=$postdeps joachim99@2: joachim99@2: # The library search path used internally by the compiler when linking joachim99@2: # a shared library. joachim99@2: compiler_lib_search_path=$compiler_lib_search_path joachim99@2: joachim99@2: # Method to check whether dependent libraries are shared objects. joachim99@2: deplibs_check_method=$deplibs_check_method joachim99@2: joachim99@2: # Command to use when deplibs_check_method == file_magic. joachim99@2: file_magic_cmd=$file_magic_cmd joachim99@2: joachim99@2: # Flag that allows shared libraries with undefined symbols to be built. joachim99@2: allow_undefined_flag=$allow_undefined_flag joachim99@2: joachim99@2: # Flag that forces no undefined symbols. joachim99@2: no_undefined_flag=$no_undefined_flag joachim99@2: joachim99@2: # Commands used to finish a libtool library installation in a directory. joachim99@2: finish_cmds=$finish_cmds joachim99@2: joachim99@2: # Same as above, but a single script fragment to be evaled but not shown. joachim99@2: finish_eval=$finish_eval joachim99@2: joachim99@2: # Take the output of nm and produce a listing of raw symbols and C names. joachim99@2: global_symbol_pipe=$global_symbol_pipe joachim99@2: joachim99@2: # Transform the output of nm in a proper C declaration joachim99@2: global_symbol_to_cdecl=$global_symbol_to_cdecl joachim99@2: joachim99@2: # This is the shared library runtime path variable. joachim99@2: runpath_var=$runpath_var joachim99@2: joachim99@2: # This is the shared library path variable. joachim99@2: shlibpath_var=$shlibpath_var joachim99@2: joachim99@2: # Is shlibpath searched before the hard-coded library search path? joachim99@2: shlibpath_overrides_runpath=$shlibpath_overrides_runpath joachim99@2: joachim99@2: # How to hardcode a shared library path into an executable. joachim99@2: hardcode_action=$hardcode_action joachim99@2: joachim99@2: # Whether we should hardcode library paths into libraries. joachim99@2: hardcode_into_libs=$hardcode_into_libs joachim99@2: joachim99@2: # Flag to hardcode \$libdir into a binary during linking. joachim99@2: # This must work even if \$libdir does not exist. joachim99@2: hardcode_libdir_flag_spec=$hardcode_libdir_flag_spec joachim99@2: joachim99@2: # Whether we need a single -rpath flag with a separated argument. joachim99@2: hardcode_libdir_separator=$hardcode_libdir_separator joachim99@2: joachim99@2: # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the joachim99@2: # resulting binary. joachim99@2: hardcode_direct=$hardcode_direct joachim99@2: joachim99@2: # Set to yes if using the -LDIR flag during linking hardcodes DIR into the joachim99@2: # resulting binary. joachim99@2: hardcode_minus_L=$hardcode_minus_L joachim99@2: joachim99@2: # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into joachim99@2: # the resulting binary. joachim99@2: hardcode_shlibpath_var=$hardcode_shlibpath_var joachim99@2: joachim99@2: # Variables whose values should be saved in libtool wrapper scripts and joachim99@2: # restored at relink time. joachim99@2: variables_saved_for_relink="$variables_saved_for_relink" joachim99@2: joachim99@2: # Whether libtool must link a program against all its dependency libraries. joachim99@2: link_all_deplibs=$link_all_deplibs joachim99@2: joachim99@2: # Compile-time system search path for libraries joachim99@2: sys_lib_search_path_spec=$sys_lib_search_path_spec joachim99@2: joachim99@2: # Run-time system search path for libraries joachim99@2: sys_lib_dlsearch_path_spec=$sys_lib_dlsearch_path_spec joachim99@2: joachim99@2: # Fix the shell variable \$srcfile for the compiler. joachim99@2: fix_srcfile_path="$fix_srcfile_path" joachim99@2: joachim99@2: # Set to yes if exported symbols are required. joachim99@2: always_export_symbols=$always_export_symbols joachim99@2: joachim99@2: # The commands to list exported symbols. joachim99@2: export_symbols_cmds=$export_symbols_cmds joachim99@2: joachim99@2: # The commands to extract the exported symbol list from a shared archive. joachim99@2: extract_expsyms_cmds=$extract_expsyms_cmds joachim99@2: joachim99@2: # Symbols that should not be listed in the preloaded symbols. joachim99@2: exclude_expsyms=$exclude_expsyms joachim99@2: joachim99@2: # Symbols that must always be exported. joachim99@2: include_expsyms=$include_expsyms joachim99@2: joachim99@2: EOF joachim99@2: joachim99@2: if test -z "$tagname"; then joachim99@2: echo '### END LIBTOOL CONFIG' >> "$ofile" joachim99@2: else joachim99@2: echo "### END LIBTOOL TAG CONFIG: $tagname" >> "$ofile" joachim99@2: fi joachim99@2: joachim99@2: case $ltmain in joachim99@2: *.sh) joachim99@2: echo >> "$ofile" joachim99@2: if test -z "$tagname"; then joachim99@2: case $host_os in joachim99@2: aix3*) joachim99@2: cat <<\EOF >> "$ofile" joachim99@2: joachim99@2: # AIX sometimes has problems with the GCC collect2 program. For some joachim99@2: # reason, if we set the COLLECT_NAMES environment variable, the problems joachim99@2: # vanish in a puff of smoke. joachim99@2: if test "X${COLLECT_NAMES+set}" != Xset; then joachim99@2: COLLECT_NAMES= joachim99@2: export COLLECT_NAMES joachim99@2: fi joachim99@2: EOF joachim99@2: ;; joachim99@2: esac joachim99@2: case $host in joachim99@2: *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) joachim99@2: cat <<'EOF' >> "$ofile" joachim99@2: # This is a source program that is used to create dlls on Windows joachim99@2: # Don't remove nor modify the starting and closing comments joachim99@2: # /* ltdll.c starts here */ joachim99@2: # #define WIN32_LEAN_AND_MEAN joachim99@2: # #include joachim99@2: # #undef WIN32_LEAN_AND_MEAN joachim99@2: # #include joachim99@2: # joachim99@2: # #ifndef __CYGWIN__ joachim99@2: # # ifdef __CYGWIN32__ joachim99@2: # # define __CYGWIN__ __CYGWIN32__ joachim99@2: # # endif joachim99@2: # #endif joachim99@2: # joachim99@2: # #ifdef __cplusplus joachim99@2: # extern "C" { joachim99@2: # #endif joachim99@2: # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); joachim99@2: # #ifdef __cplusplus joachim99@2: # } joachim99@2: # #endif joachim99@2: # joachim99@2: # #ifdef __CYGWIN__ joachim99@2: # #include joachim99@2: # DECLARE_CYGWIN_DLL( DllMain ); joachim99@2: # #endif joachim99@2: # HINSTANCE __hDllInstance_base; joachim99@2: # joachim99@2: # BOOL APIENTRY joachim99@2: # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) joachim99@2: # { joachim99@2: # __hDllInstance_base = hInst; joachim99@2: # return TRUE; joachim99@2: # } joachim99@2: # /* ltdll.c ends here */ joachim99@2: # This is a source program that is used to create import libraries joachim99@2: # on Windows for dlls which lack them. Don't remove nor modify the joachim99@2: # starting and closing comments joachim99@2: # /* impgen.c starts here */ joachim99@2: # /* Copyright (C) 1999-2000 Free Software Foundation, Inc. joachim99@2: # joachim99@2: # This file is part of GNU libtool. joachim99@2: # joachim99@2: # This program is free software; you can redistribute it and/or modify joachim99@2: # it under the terms of the GNU General Public License as published by joachim99@2: # the Free Software Foundation; either version 2 of the License, or joachim99@2: # (at your option) any later version. joachim99@2: # joachim99@2: # This program is distributed in the hope that it will be useful, joachim99@2: # but WITHOUT ANY WARRANTY; without even the implied warranty of joachim99@2: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the joachim99@2: # GNU General Public License for more details. joachim99@2: # joachim99@2: # You should have received a copy of the GNU General Public License joachim99@2: # along with this program; if not, write to the Free Software joachim99@2: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. joachim99@2: # */ joachim99@2: # joachim99@2: # #include /* for printf() */ joachim99@2: # #include /* for open(), lseek(), read() */ joachim99@2: # #include /* for O_RDONLY, O_BINARY */ joachim99@2: # #include /* for strdup() */ joachim99@2: # joachim99@2: # /* O_BINARY isn't required (or even defined sometimes) under Unix */ joachim99@2: # #ifndef O_BINARY joachim99@2: # #define O_BINARY 0 joachim99@2: # #endif joachim99@2: # joachim99@2: # static unsigned int joachim99@2: # pe_get16 (fd, offset) joachim99@2: # int fd; joachim99@2: # int offset; joachim99@2: # { joachim99@2: # unsigned char b[2]; joachim99@2: # lseek (fd, offset, SEEK_SET); joachim99@2: # read (fd, b, 2); joachim99@2: # return b[0] + (b[1]<<8); joachim99@2: # } joachim99@2: # joachim99@2: # static unsigned int joachim99@2: # pe_get32 (fd, offset) joachim99@2: # int fd; joachim99@2: # int offset; joachim99@2: # { joachim99@2: # unsigned char b[4]; joachim99@2: # lseek (fd, offset, SEEK_SET); joachim99@2: # read (fd, b, 4); joachim99@2: # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); joachim99@2: # } joachim99@2: # joachim99@2: # static unsigned int joachim99@2: # pe_as32 (ptr) joachim99@2: # void *ptr; joachim99@2: # { joachim99@2: # unsigned char *b = ptr; joachim99@2: # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); joachim99@2: # } joachim99@2: # joachim99@2: # int joachim99@2: # main (argc, argv) joachim99@2: # int argc; joachim99@2: # char *argv[]; joachim99@2: # { joachim99@2: # int dll; joachim99@2: # unsigned long pe_header_offset, opthdr_ofs, num_entries, i; joachim99@2: # unsigned long export_rva, export_size, nsections, secptr, expptr; joachim99@2: # unsigned long name_rvas, nexp; joachim99@2: # unsigned char *expdata, *erva; joachim99@2: # char *filename, *dll_name; joachim99@2: # joachim99@2: # filename = argv[1]; joachim99@2: # joachim99@2: # dll = open(filename, O_RDONLY|O_BINARY); joachim99@2: # if (dll < 1) joachim99@2: # return 1; joachim99@2: # joachim99@2: # dll_name = filename; joachim99@2: # joachim99@2: # for (i=0; filename[i]; i++) joachim99@2: # if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':') joachim99@2: # dll_name = filename + i +1; joachim99@2: # joachim99@2: # pe_header_offset = pe_get32 (dll, 0x3c); joachim99@2: # opthdr_ofs = pe_header_offset + 4 + 20; joachim99@2: # num_entries = pe_get32 (dll, opthdr_ofs + 92); joachim99@2: # joachim99@2: # if (num_entries < 1) /* no exports */ joachim99@2: # return 1; joachim99@2: # joachim99@2: # export_rva = pe_get32 (dll, opthdr_ofs + 96); joachim99@2: # export_size = pe_get32 (dll, opthdr_ofs + 100); joachim99@2: # nsections = pe_get16 (dll, pe_header_offset + 4 +2); joachim99@2: # secptr = (pe_header_offset + 4 + 20 + joachim99@2: # pe_get16 (dll, pe_header_offset + 4 + 16)); joachim99@2: # joachim99@2: # expptr = 0; joachim99@2: # for (i = 0; i < nsections; i++) joachim99@2: # { joachim99@2: # char sname[8]; joachim99@2: # unsigned long secptr1 = secptr + 40 * i; joachim99@2: # unsigned long vaddr = pe_get32 (dll, secptr1 + 12); joachim99@2: # unsigned long vsize = pe_get32 (dll, secptr1 + 16); joachim99@2: # unsigned long fptr = pe_get32 (dll, secptr1 + 20); joachim99@2: # lseek(dll, secptr1, SEEK_SET); joachim99@2: # read(dll, sname, 8); joachim99@2: # if (vaddr <= export_rva && vaddr+vsize > export_rva) joachim99@2: # { joachim99@2: # expptr = fptr + (export_rva - vaddr); joachim99@2: # if (export_rva + export_size > vaddr + vsize) joachim99@2: # export_size = vsize - (export_rva - vaddr); joachim99@2: # break; joachim99@2: # } joachim99@2: # } joachim99@2: # joachim99@2: # expdata = (unsigned char*)malloc(export_size); joachim99@2: # lseek (dll, expptr, SEEK_SET); joachim99@2: # read (dll, expdata, export_size); joachim99@2: # erva = expdata - export_rva; joachim99@2: # joachim99@2: # nexp = pe_as32 (expdata+24); joachim99@2: # name_rvas = pe_as32 (expdata+32); joachim99@2: # joachim99@2: # printf ("EXPORTS\n"); joachim99@2: # for (i = 0; i> "$ofile" || (rm -f "$ofile"; exit 1) joachim99@2: # We use sed instead of cat because bash on DJGPP gets confused if joachim99@2: # if finds mixed CR/LF and LF-only lines. Since sed operates in joachim99@2: # text mode, it properly converts lines to CR/LF. This bash problem joachim99@2: # is reportedly fixed, but why not run on old versions too? joachim99@2: joachim99@2: chmod +x "$ofile" joachim99@2: fi joachim99@2: ;; joachim99@2: joachim99@2: *) joachim99@2: # Compile the libtool program. joachim99@2: echo "FIXME: would compile $ltmain" joachim99@2: ;; joachim99@2: esac joachim99@2: joachim99@2: # Update the list of available tags. joachim99@2: if test -n "$tagname"; then joachim99@2: joachim99@2: # Extract list of available tagged configurations in $ofile. joachim99@2: # Note that this assumes the entire list is on one line. joachim99@2: available_tags=`grep "^available_tags=" $ofile | sed -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` joachim99@2: joachim99@2: # Append the new tag name to the list of available tags. joachim99@2: available_tags="$available_tags $tagname" joachim99@2: joachim99@2: # Now substitute the updated of available tags. joachim99@2: if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' ${ofile} > ${ofile}.new"; then joachim99@2: mv ${ofile}.new ${ofile} joachim99@2: chmod +x "$ofile" joachim99@2: else joachim99@2: rm -f ${ofile}.new joachim99@2: echo "$progname: unable to update list of available tagged configurations." joachim99@2: exit 1 joachim99@2: fi joachim99@2: fi joachim99@2: joachim99@2: # Don't cache tagged configuration! joachim99@2: test -n "$cache_file" && test -z "$tagname" || exit 0 joachim99@2: joachim99@2: # AC_CACHE_SAVE joachim99@2: trap '' 1 2 15 joachim99@2: cat > confcache <<\EOF joachim99@2: # This file is a shell script that caches the results of configure joachim99@2: # tests run on this system so they can be shared between configure joachim99@2: # scripts and configure runs. It is not useful on other systems. joachim99@2: # If it contains results you don't want to keep, you may remove or edit it. joachim99@2: # joachim99@2: # By default, configure uses ./config.cache as the cache file, joachim99@2: # creating it if it does not exist already. You can give configure joachim99@2: # the --cache-file=FILE option to use a different cache file; that is joachim99@2: # what configure does when it calls configure scripts in joachim99@2: # subdirectories, so they share the cache. joachim99@2: # Giving --cache-file=/dev/null disables caching, for debugging configure. joachim99@2: # config.status only pays attention to the cache file if you give it the joachim99@2: # --recheck option to rerun configure. joachim99@2: # joachim99@2: EOF joachim99@2: # The following way of writing the cache mishandles newlines in values, joachim99@2: # but we know of no workaround that is simple, portable, and efficient. joachim99@2: # So, don't put newlines in cache variables' values. joachim99@2: # Ultrix sh set writes to stderr and can't be redirected directly, joachim99@2: # and sets the high bit in the cache file unless we assign to the vars. joachim99@2: (set) 2>&1 | joachim99@2: case `(ac_space=' '; set | grep ac_space) 2>&1` in joachim99@2: *ac_space=\ *) joachim99@2: # `set' does not quote correctly, so add quotes (double-quote substitution joachim99@2: # turns \\\\ into \\, and sed turns \\ into \). joachim99@2: sed -n \ joachim99@2: -e "s/'/'\\\\''/g" \ joachim99@2: -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" joachim99@2: ;; joachim99@2: *) joachim99@2: # `set' quotes correctly as required by POSIX, so do not add quotes. joachim99@2: sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' joachim99@2: ;; joachim99@2: esac >> confcache joachim99@2: if cmp -s $cache_file confcache; then joachim99@2: : joachim99@2: else joachim99@2: if test -w $cache_file; then joachim99@2: echo "updating cache $cache_file" joachim99@2: cat confcache > $cache_file joachim99@2: else joachim99@2: echo "not updating unwritable cache $cache_file" joachim99@2: fi joachim99@2: fi joachim99@2: rm -f confcache joachim99@2: joachim99@2: exit 0 joachim99@2: joachim99@2: # Local Variables: joachim99@2: # mode:shell-script joachim99@2: # sh-indentation:2 joachim99@2: # End: