annotate kdiff3/admin/ltconfig @ 6:a23681732506

Files have moved into the src directory.
author joachim99
date Mon, 06 Oct 2003 18:32:37 +0000
parents 53b8ecbce0cb
children
rev   line source
joachim99@2 1 #! /bin/sh
joachim99@2 2
joachim99@2 3 # ltconfig - Create a system-specific libtool.
joachim99@2 4 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
joachim99@2 5 # Free Software Foundation, Inc.
joachim99@2 6 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
joachim99@2 7 #
joachim99@2 8 # This file is free software; you can redistribute it and/or modify it
joachim99@2 9 # under the terms of the GNU General Public License as published by
joachim99@2 10 # the Free Software Foundation; either version 2 of the License, or
joachim99@2 11 # (at your option) any later version.
joachim99@2 12 #
joachim99@2 13 # This program is distributed in the hope that it will be useful, but
joachim99@2 14 # WITHOUT ANY WARRANTY; without even the implied warranty of
joachim99@2 15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
joachim99@2 16 # General Public License for more details.
joachim99@2 17 #
joachim99@2 18 # You should have received a copy of the GNU General Public License
joachim99@2 19 # along with this program; if not, write to the Free Software
joachim99@2 20 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
joachim99@2 21 #
joachim99@2 22 # As a special exception to the GNU General Public License, if you
joachim99@2 23 # distribute this file as part of a program that contains a
joachim99@2 24 # configuration script generated by Autoconf, you may include it under
joachim99@2 25 # the same distribution terms that you use for the rest of that program.
joachim99@2 26
joachim99@2 27 # A lot of this script is taken from autoconf-2.10.
joachim99@2 28
joachim99@2 29 # Check that we are running under the correct shell.
joachim99@2 30 SHELL=${CONFIG_SHELL-/bin/sh}
joachim99@2 31 echo=echo
joachim99@2 32 if test "X$1" = X--no-reexec; then
joachim99@2 33 # Discard the --no-reexec flag, and continue.
joachim99@2 34 shift
joachim99@2 35 elif test "X$1" = X--fallback-echo; then
joachim99@2 36 # Avoid inline document here, it may be left over
joachim99@2 37 :
joachim99@2 38 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
joachim99@2 39 # Yippee, $echo works!
joachim99@2 40 :
joachim99@2 41 else
joachim99@2 42 # Restart under the correct shell.
joachim99@2 43 exec "$SHELL" "$0" --no-reexec ${1+"$@"}
joachim99@2 44 fi
joachim99@2 45
joachim99@2 46 if test "X$1" = X--fallback-echo; then
joachim99@2 47 # used as fallback echo
joachim99@2 48 shift
joachim99@2 49 cat <<EOF
joachim99@2 50 $*
joachim99@2 51 EOF
joachim99@2 52 exit 0
joachim99@2 53 fi
joachim99@2 54
joachim99@2 55 # Find the correct PATH separator. Usually this is `:', but
joachim99@2 56 # DJGPP uses `;' like DOS.
joachim99@2 57 if test "X${PATH_SEPARATOR+set}" != Xset; then
joachim99@2 58 UNAME=${UNAME-`uname 2>/dev/null`}
joachim99@2 59 case X$UNAME in
joachim99@2 60 *-DOS) PATH_SEPARATOR=';' ;;
joachim99@2 61 *) PATH_SEPARATOR=':' ;;
joachim99@2 62 esac
joachim99@2 63 fi
joachim99@2 64
joachim99@2 65 # The HP-UX ksh and POSIX shell print the target directory to stdout
joachim99@2 66 # if CDPATH is set.
joachim99@2 67 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
joachim99@2 68
joachim99@2 69 if test "X${echo_test_string+set}" != Xset; then
joachim99@2 70 # find a string as large as possible, as long as the shell can cope with it
joachim99@2 71 for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
joachim99@2 72 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
joachim99@2 73 if (echo_test_string="`eval $cmd`") 2>/dev/null &&
joachim99@2 74 echo_test_string="`eval $cmd`" &&
joachim99@2 75 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null; then
joachim99@2 76 break
joachim99@2 77 fi
joachim99@2 78 done
joachim99@2 79 fi
joachim99@2 80
joachim99@2 81 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
joachim99@2 82 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
joachim99@2 83 test "X$echo_testing_string" = "X$echo_test_string"; then
joachim99@2 84 :
joachim99@2 85 else
joachim99@2 86 # The Solaris, AIX, and Digital Unix default echo programs unquote
joachim99@2 87 # backslashes. This makes it impossible to quote backslashes using
joachim99@2 88 # echo "$something" | sed 's/\\/\\\\/g'
joachim99@2 89 #
joachim99@2 90 # So, first we look for a working echo in the user's PATH.
joachim99@2 91
joachim99@2 92 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
joachim99@2 93 for dir in $PATH /usr/ucb; do
joachim99@2 94 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
joachim99@2 95 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
joachim99@2 96 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
joachim99@2 97 test "X$echo_testing_string" = "X$echo_test_string"; then
joachim99@2 98 echo="$dir/echo"
joachim99@2 99 break
joachim99@2 100 fi
joachim99@2 101 done
joachim99@2 102 IFS="$save_ifs"
joachim99@2 103
joachim99@2 104 if test "X$echo" = Xecho; then
joachim99@2 105 # We didn't find a better echo, so look for alternatives.
joachim99@2 106 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
joachim99@2 107 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
joachim99@2 108 test "X$echo_testing_string" = "X$echo_test_string"; then
joachim99@2 109 # This shell has a builtin print -r that does the trick.
joachim99@2 110 echo='print -r'
joachim99@2 111 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
joachim99@2 112 test "X$CONFIG_SHELL" != X/bin/ksh; then
joachim99@2 113 # If we have ksh, try running ltconfig again with it.
joachim99@2 114 ORIGINAL_CONFIG_SHELL="${CONFIG_SHELL-/bin/sh}"
joachim99@2 115 export ORIGINAL_CONFIG_SHELL
joachim99@2 116 CONFIG_SHELL=/bin/ksh
joachim99@2 117 export CONFIG_SHELL
joachim99@2 118 exec "$CONFIG_SHELL" "$0" --no-reexec ${1+"$@"}
joachim99@2 119 else
joachim99@2 120 # Try using printf.
joachim99@2 121 echo='printf %s\n'
joachim99@2 122 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
joachim99@2 123 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
joachim99@2 124 test "X$echo_testing_string" = "X$echo_test_string"; then
joachim99@2 125 # Cool, printf works
joachim99@2 126 :
joachim99@2 127 elif echo_testing_string=`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null` &&
joachim99@2 128 test "X$echo_testing_string" = 'X\t' &&
joachim99@2 129 echo_testing_string=`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
joachim99@2 130 test "X$echo_testing_string" = "X$echo_test_string"; then
joachim99@2 131 CONFIG_SHELL="$ORIGINAL_CONFIG_SHELL"
joachim99@2 132 export CONFIG_SHELL
joachim99@2 133 SHELL="$CONFIG_SHELL"
joachim99@2 134 export SHELL
joachim99@2 135 echo="$CONFIG_SHELL $0 --fallback-echo"
joachim99@2 136 elif echo_testing_string=`("$CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null` &&
joachim99@2 137 test "X$echo_testing_string" = 'X\t' &&
joachim99@2 138 echo_testing_string=`("$CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
joachim99@2 139 test "X$echo_testing_string" = "X$echo_test_string"; then
joachim99@2 140 echo="$CONFIG_SHELL $0 --fallback-echo"
joachim99@2 141 else
joachim99@2 142 # maybe with a smaller string...
joachim99@2 143 prev=:
joachim99@2 144
joachim99@2 145 for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
joachim99@2 146 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null; then
joachim99@2 147 break
joachim99@2 148 fi
joachim99@2 149 prev="$cmd"
joachim99@2 150 done
joachim99@2 151
joachim99@2 152 if test "$prev" != 'sed 50q "$0"'; then
joachim99@2 153 echo_test_string=`eval $prev`
joachim99@2 154
joachim99@2 155 export echo_test_string
joachim99@2 156 exec "${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}}" "$0" ${1+"$@"}
joachim99@2 157 else
joachim99@2 158 # Oops. We lost completely, so just stick with echo.
joachim99@2 159 echo=echo
joachim99@2 160 fi
joachim99@2 161 fi
joachim99@2 162 fi
joachim99@2 163 fi
joachim99@2 164 fi
joachim99@2 165
joachim99@2 166 # Sed substitution that helps us do robust quoting. It backslashifies
joachim99@2 167 # metacharacters that are still active within double-quoted strings.
joachim99@2 168 Xsed='sed -e s/^X//'
joachim99@2 169 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
joachim99@2 170
joachim99@2 171 # Same as above, but do not quote variable references.
joachim99@2 172 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
joachim99@2 173
joachim99@2 174 # Sed substitution to delay expansion of an escaped shell variable in a
joachim99@2 175 # double_quote_subst'ed string.
joachim99@2 176 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
joachim99@2 177
joachim99@2 178 # The name of this program.
joachim99@2 179 progname=`$echo "X$0" | $Xsed -e 's%^.*/%%'`
joachim99@2 180
joachim99@2 181 # Constants:
joachim99@2 182 PROGRAM=ltconfig
joachim99@2 183 PACKAGE=libtool
joachim99@2 184 VERSION=1.4a
joachim99@2 185 TIMESTAMP=" (1.641.2.206mm 2001/04/03 21:47:47)"
joachim99@2 186 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
joachim99@2 187 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
joachim99@2 188 rm="rm -f"
joachim99@2 189
joachim99@2 190 help="Try \`$progname --help' for more information."
joachim99@2 191
joachim99@2 192 # Global variables:
joachim99@2 193 default_ofile=libtool
joachim99@2 194 can_build_shared=yes
joachim99@2 195 enable_shared=yes
joachim99@2 196 # All known linkers require a `.a' archive for static linking (except M$VC,
joachim99@2 197 # which needs '.lib').
joachim99@2 198 enable_static=yes
joachim99@2 199 enable_fast_install=yes
joachim99@2 200 enable_dlopen=unknown
joachim99@2 201 enable_win32_dll=no
joachim99@2 202 pic_mode=default
joachim99@2 203 ltmain=
joachim99@2 204 silent=
joachim99@2 205 srcdir=
joachim99@2 206 ac_config_guess=
joachim99@2 207 ac_config_sub=
joachim99@2 208 host=
joachim99@2 209 build=NONE
joachim99@2 210 nonopt=NONE
joachim99@2 211 ofile="$default_ofile"
joachim99@2 212 verify_host=yes
joachim99@2 213 tagname=
joachim99@2 214 with_gcc=no
joachim99@2 215 with_gnu_ld=no
joachim99@2 216 need_locks=yes
joachim99@2 217 ac_ext=c
joachim99@2 218 libext=a
joachim99@2 219 cache_file=
joachim99@2 220 max_cmd_len=
joachim99@2 221
joachim99@2 222 ## Dependencies to place before and after the object being linked:
joachim99@2 223 predep_objects=
joachim99@2 224 postdep_objects=
joachim99@2 225 predeps=
joachim99@2 226 postdeps=
joachim99@2 227 compiler_lib_search_path=
joachim99@2 228
joachim99@2 229 ## Link characteristics:
joachim99@2 230 allow_undefined_flag=
joachim99@2 231 no_undefined_flag=
joachim99@2 232 need_lib_prefix=unknown
joachim99@2 233 need_version=unknown
joachim99@2 234 # when you set need_version to no, make sure it does not cause -set_version
joachim99@2 235 # flags to be left without arguments
joachim99@2 236 archive_cmds=
joachim99@2 237 archive_expsym_cmds=
joachim99@2 238 old_archive_from_new_cmds=
joachim99@2 239 old_archive_from_expsyms_cmds=
joachim99@2 240 striplib=
joachim99@2 241 old_striplib=
joachim99@2 242 export_dynamic_flag_spec=
joachim99@2 243 whole_archive_flag_spec=
joachim99@2 244 thread_safe_flag_spec=
joachim99@2 245 hardcode_into_libs=no
joachim99@2 246 hardcode_libdir_flag_spec=
joachim99@2 247 hardcode_libdir_separator=
joachim99@2 248 hardcode_direct=no
joachim99@2 249 hardcode_minus_L=no
joachim99@2 250 hardcode_shlibpath_var=unsupported
joachim99@2 251 runpath_var=
joachim99@2 252 link_all_deplibs=unknown
joachim99@2 253 always_export_symbols=no
joachim99@2 254 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
joachim99@2 255 # include_expsyms should be a list of space-separated symbols to be *always*
joachim99@2 256 # included in the symbol list
joachim99@2 257 include_expsyms=
joachim99@2 258 # exclude_expsyms can be an egrep regular expression of symbols to exclude
joachim99@2 259 # it will be wrapped by ` (' and `)$', so one must not match beginning or
joachim99@2 260 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
joachim99@2 261 # as well as any symbol that contains `d'.
joachim99@2 262 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
joachim99@2 263 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
joachim99@2 264 # platforms (ab)use it in PIC code, but their linkers get confused if
joachim99@2 265 # the symbol is explicitly referenced. Since portable code cannot
joachim99@2 266 # rely on this symbol name, it's probably fine to never include it in
joachim99@2 267 # preloaded symbol tables.
joachim99@2 268 extract_expsyms_cmds=
joachim99@2 269
joachim99@2 270 ## Tools:
joachim99@2 271 old_AR="$AR"
joachim99@2 272 old_AR_FLAGS="$AR_FLAGS"
joachim99@2 273 old_CC="$CC"
joachim99@2 274 old_CFLAGS="$CFLAGS"
joachim99@2 275 old_CPPFLAGS="$CPPFLAGS"
joachim99@2 276 old_LDFLAGS="$LDFLAGS"
joachim99@2 277 old_LIBS="$LIBS"
joachim99@2 278 old_MAGIC_CMD="$MAGIC_CMD"
joachim99@2 279 old_LD="$LD"
joachim99@2 280 old_LN_S="$LN_S"
joachim99@2 281 old_LTCC="$LTCC"
joachim99@2 282 old_NM="$NM"
joachim99@2 283 old_RANLIB="$RANLIB"
joachim99@2 284 old_STRIP="$STRIP"
joachim99@2 285 old_AS="$AS"
joachim99@2 286 old_DLLTOOL="$DLLTOOL"
joachim99@2 287 old_OBJDUMP="$OBJDUMP"
joachim99@2 288 old_OBJEXT="$OBJEXT"
joachim99@2 289 old_EXEEXT="$EXEEXT"
joachim99@2 290 old_reload_flag="$reload_flag"
joachim99@2 291 old_deplibs_check_method="$deplibs_check_method"
joachim99@2 292 old_file_magic_cmd="$file_magic_cmd"
joachim99@2 293
joachim99@2 294 # Parse the command line options.
joachim99@2 295 args=
joachim99@2 296 prev=
joachim99@2 297 for option
joachim99@2 298 do
joachim99@2 299 case $option in
joachim99@2 300 -*=*) optarg=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
joachim99@2 301 *) optarg= ;;
joachim99@2 302 esac
joachim99@2 303
joachim99@2 304 # If the previous option needs an argument, assign it.
joachim99@2 305 if test -n "$prev"; then
joachim99@2 306 eval "$prev=\$option"
joachim99@2 307 prev=
joachim99@2 308 continue
joachim99@2 309 fi
joachim99@2 310
joachim99@2 311 case $option in
joachim99@2 312 --help) cat <<EOM
joachim99@2 313 Usage: $progname [OPTION]... LTMAIN [HOST]
joachim99@2 314
joachim99@2 315 Generate a system-specific libtool script.
joachim99@2 316
joachim99@2 317 --build configure for building on BUILD [BUILD=HOST]
joachim99@2 318 --debug enable verbose shell tracing
joachim99@2 319 --disable-shared do not build shared libraries
joachim99@2 320 --disable-static do not build static libraries
joachim99@2 321 --disable-fast-install do not optimize for fast installation
joachim99@2 322 --enable-dlopen enable dlopen support
joachim99@2 323 --enable-win32-dll enable building dlls on win32 hosts
joachim99@2 324 --help display this help and exit
joachim99@2 325 --no-verify do not verify that HOST is a valid host type
joachim99@2 326 -o, --output=FILE specify the output file [default=$default_ofile]
joachim99@2 327 --quiet same as \`--silent'
joachim99@2 328 --silent do not print informational messages
joachim99@2 329 --srcdir=DIR find \`config.guess' in DIR
joachim99@2 330 --version output version information and exit
joachim99@2 331 --add-tag=TAG append an alternate configuration
joachim99@2 332 --with-gcc assume that the GNU C compiler will be used
joachim99@2 333 --with-gnu-ld assume that the C compiler uses the GNU linker
joachim99@2 334 --prefer-pic try to use only PIC objects
joachim99@2 335 --prefer-non-pic try to use only non-PIC objects
joachim99@2 336 --disable-lock disable file locking
joachim99@2 337 --cache-file=FILE configure cache file
joachim99@2 338
joachim99@2 339 LTMAIN is the \`ltmain.sh' shell script fragment or \`ltmain.c' program
joachim99@2 340 that provides basic libtool functionality.
joachim99@2 341
joachim99@2 342 HOST is the canonical host system name [default=guessed].
joachim99@2 343 EOM
joachim99@2 344 exit 0
joachim99@2 345 ;;
joachim99@2 346
joachim99@2 347 --build) prev=build ;;
joachim99@2 348 --build=*) build="$optarg" ;;
joachim99@2 349
joachim99@2 350 --debug)
joachim99@2 351 echo "$progname: enabling shell trace mode"
joachim99@2 352 set -x
joachim99@2 353 ;;
joachim99@2 354
joachim99@2 355 --disable-shared) enable_shared=no ;;
joachim99@2 356
joachim99@2 357 --disable-static) enable_static=no ;;
joachim99@2 358
joachim99@2 359 --disable-fast-install) enable_fast_install=no ;;
joachim99@2 360
joachim99@2 361 --enable-dlopen) enable_dlopen=yes ;;
joachim99@2 362
joachim99@2 363 --enable-win32-dll) enable_win32_dll=yes ;;
joachim99@2 364
joachim99@2 365 --quiet | --silent) silent=yes ;;
joachim99@2 366
joachim99@2 367 --srcdir) prev=srcdir ;;
joachim99@2 368 --srcdir=*) srcdir="$optarg" ;;
joachim99@2 369
joachim99@2 370 --no-verify) verify_host=no ;;
joachim99@2 371
joachim99@2 372 --output | -o) prev=ofile ;;
joachim99@2 373 --output=*) ofile="$optarg" ;;
joachim99@2 374
joachim99@2 375 --version) echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"; exit 0 ;;
joachim99@2 376
joachim99@2 377 --add-tag) prev=tagname ;;
joachim99@2 378 --add-tag=*) tagname="$optarg" ;;
joachim99@2 379
joachim99@2 380 --with-gcc) with_gcc=yes ;;
joachim99@2 381 --with-gnu-ld) with_gnu_ld=yes ;;
joachim99@2 382
joachim99@2 383 --prefer-pic) pic_mode=yes ;;
joachim99@2 384 --prefer-non-pic) pic_mode=no ;;
joachim99@2 385
joachim99@2 386 --disable-lock) need_locks=no ;;
joachim99@2 387
joachim99@2 388 --cache-file=*) cache_file="$optarg" ;;
joachim99@2 389
joachim99@2 390 -*)
joachim99@2 391 echo "$progname: unrecognized option \`$option'" 1>&2
joachim99@2 392 echo "$help" 1>&2
joachim99@2 393 exit 1
joachim99@2 394 ;;
joachim99@2 395
joachim99@2 396 *)
joachim99@2 397 if test -z "$ltmain"; then
joachim99@2 398 ltmain="$option"
joachim99@2 399 elif test -z "$host"; then
joachim99@2 400 # This generates an unnecessary warning for sparc-sun-solaris4.1.3_U1
joachim99@2 401 # if test -n "`echo $option| sed 's/[-a-z0-9.]//g'`"; then
joachim99@2 402 # echo "$progname: warning \`$option' is not a valid host type" 1>&2
joachim99@2 403 # fi
joachim99@2 404 host="$option"
joachim99@2 405 else
joachim99@2 406 echo "$progname: too many arguments" 1>&2
joachim99@2 407 echo "$help" 1>&2
joachim99@2 408 exit 1
joachim99@2 409 fi ;;
joachim99@2 410 esac
joachim99@2 411 done
joachim99@2 412
joachim99@2 413 if test -z "$ltmain"; then
joachim99@2 414 echo "$progname: you must specify a LTMAIN file" 1>&2
joachim99@2 415 echo "$help" 1>&2
joachim99@2 416 exit 1
joachim99@2 417 fi
joachim99@2 418
joachim99@2 419 if test ! -f "$ltmain"; then
joachim99@2 420 echo "$progname: \`$ltmain' does not exist" 1>&2
joachim99@2 421 echo "$help" 1>&2
joachim99@2 422 exit 1
joachim99@2 423 fi
joachim99@2 424
joachim99@2 425 if test -n "$tagname"; then
joachim99@2 426 # Check whether tagname contains only valid characters
joachim99@2 427 case `$echo "X$tagname" | $Xsed -e 's/[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]//g'` in
joachim99@2 428 "") ;;
joachim99@2 429 *)
joachim99@2 430 echo "$progname: invalid tag name: $tagname" 1>&2
joachim99@2 431 exit 1
joachim99@2 432 ;;
joachim99@2 433 esac
joachim99@2 434
joachim99@2 435 if grep "^### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$ofile" > /dev/null; then
joachim99@2 436 echo "$progname: tag name $tagname already exists" 1>&2
joachim99@2 437 exit 1
joachim99@2 438 fi
joachim99@2 439
joachim99@2 440 if test ! -f "$ofile"; then
joachim99@2 441 echo "$progname: warning: output file \`$ofile' does not exist" 1>&2
joachim99@2 442 fi
joachim99@2 443
joachim99@2 444 if test -z "$LTCC"; then
joachim99@2 445 eval "`$SHELL $ofile --config | grep '^LTCC='`"
joachim99@2 446 if test -z "$LTCC"; then
joachim99@2 447 echo "$progname: warning: output file \`$ofile' does not look like a libtool script" 1>&2
joachim99@2 448 else
joachim99@2 449 echo "$progname: warning: using \`LTCC=$LTCC', extracted from \`$ofile'" 1>&2
joachim99@2 450 fi
joachim99@2 451 fi
joachim99@2 452 fi
joachim99@2 453
joachim99@2 454 # Quote any args containing shell metacharacters.
joachim99@2 455 ltconfig_args=
joachim99@2 456 for arg
joachim99@2 457 do
joachim99@2 458 case $arg in
joachim99@2 459 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
joachim99@2 460 ltconfig_args="$ltconfig_args '$arg'" ;;
joachim99@2 461 *) ltconfig_args="$ltconfig_args $arg" ;;
joachim99@2 462 esac
joachim99@2 463 done
joachim99@2 464
joachim99@2 465 # A relevant subset of AC_INIT.
joachim99@2 466
joachim99@2 467 # File descriptor usage:
joachim99@2 468 # 0 standard input
joachim99@2 469 # 1 file creation
joachim99@2 470 # 2 errors and warnings
joachim99@2 471 # 3 some systems may open it to /dev/tty
joachim99@2 472 # 4 used on the Kubota Titan
joachim99@2 473 # 5 compiler messages saved in config.log
joachim99@2 474 # 6 checking for... messages and results
joachim99@2 475 if test "$silent" = yes; then
joachim99@2 476 exec 6>/dev/null
joachim99@2 477 else
joachim99@2 478 exec 6>&1
joachim99@2 479 fi
joachim99@2 480 exec 5>>./config.log
joachim99@2 481
joachim99@2 482 # NLS nuisances.
joachim99@2 483 # Only set LANG and LC_ALL to C if already set.
joachim99@2 484 # These must not be set unconditionally because not all systems understand
joachim99@2 485 # e.g. LANG=C (notably SCO).
joachim99@2 486 if test "X${LC_ALL+set}" = Xset; then LC_ALL=C; export LC_ALL; fi
joachim99@2 487 if test "X${LANG+set}" = Xset; then LANG=C; export LANG; fi
joachim99@2 488
joachim99@2 489 if test -n "$cache_file" && test -r "$cache_file" && test -f "$cache_file"; then
joachim99@2 490 echo "loading cache $cache_file within ltconfig"
joachim99@2 491 . $cache_file
joachim99@2 492 fi
joachim99@2 493
joachim99@2 494 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
joachim99@2 495 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
joachim99@2 496 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
joachim99@2 497 ac_n= ac_c='
joachim99@2 498 ' ac_t=' '
joachim99@2 499 else
joachim99@2 500 ac_n=-n ac_c= ac_t=
joachim99@2 501 fi
joachim99@2 502 else
joachim99@2 503 ac_n= ac_c='\c' ac_t=
joachim99@2 504 fi
joachim99@2 505
joachim99@2 506 if test -z "$srcdir"; then
joachim99@2 507 # Assume the source directory is the same one as the path to LTMAIN.
joachim99@2 508 srcdir=`$echo "X$ltmain" | $Xsed -e 's%/[^/]*$%%'`
joachim99@2 509 test "$srcdir" = "$ltmain" && srcdir=.
joachim99@2 510 fi
joachim99@2 511
joachim99@2 512 trap "$rm conftest*; exit 1" 1 2 15
joachim99@2 513 if test "$verify_host" = yes; then
joachim99@2 514 # Check for config.guess and config.sub.
joachim99@2 515 ac_aux_dir=
joachim99@2 516 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
joachim99@2 517 if test -f $ac_dir/config.guess; then
joachim99@2 518 ac_aux_dir=$ac_dir
joachim99@2 519 break
joachim99@2 520 fi
joachim99@2 521 done
joachim99@2 522 if test -z "$ac_aux_dir"; then
joachim99@2 523 echo "$progname: cannot find config.guess in $srcdir $srcdir/.. $srcdir/../.." 1>&2
joachim99@2 524 echo "$help" 1>&2
joachim99@2 525 exit 1
joachim99@2 526 fi
joachim99@2 527 ac_config_guess=$ac_aux_dir/config.guess
joachim99@2 528 ac_config_sub=$ac_aux_dir/config.sub
joachim99@2 529
joachim99@2 530 # Make sure we can run config.sub.
joachim99@2 531 if $SHELL $ac_config_sub sun4 >/dev/null 2>&1; then :
joachim99@2 532 else
joachim99@2 533 echo "$progname: cannot run $ac_config_sub" 1>&2
joachim99@2 534 echo "$help" 1>&2
joachim99@2 535 exit 1
joachim99@2 536 fi
joachim99@2 537
joachim99@2 538 echo $ac_n "checking host system type""... $ac_c" 1>&6
joachim99@2 539
joachim99@2 540 host_alias=$host
joachim99@2 541 case $host_alias in
joachim99@2 542 "")
joachim99@2 543 # Force config.guess to use the C compiler.
joachim99@2 544 # CC_FOR_BUILD overrides the CC variable in config.guess but I had
joachim99@2 545 # problems with it so do it this way for now.
joachim99@2 546 CC="$LTCC"
joachim99@2 547
joachim99@2 548 if host_alias=`$SHELL $ac_config_guess`; then :
joachim99@2 549 else
joachim99@2 550 echo "$progname: cannot guess host type; you must specify one" 1>&2
joachim99@2 551 echo "$help" 1>&2
joachim99@2 552 exit 1
joachim99@2 553 fi
joachim99@2 554
joachim99@2 555 # Restore the C compiler.
joachim99@2 556 CC="$old_CC"
joachim99@2 557 ;;
joachim99@2 558 esac
joachim99@2 559 host=`$SHELL $ac_config_sub $host_alias`
joachim99@2 560 echo "$ac_t$host" 1>&6
joachim99@2 561
joachim99@2 562 # Make sure the host verified.
joachim99@2 563 test -z "$host" && exit 1
joachim99@2 564
joachim99@2 565 # Check for the build system type
joachim99@2 566 echo $ac_n "checking build system type... $ac_c" 1>&6
joachim99@2 567
joachim99@2 568 build_alias=$build
joachim99@2 569 case $build_alias in
joachim99@2 570 NONE)
joachim99@2 571 case $nonopt in
joachim99@2 572 NONE) build_alias=$host_alias ;;
joachim99@2 573 *) build_alias=$nonopt ;;
joachim99@2 574 esac ;;
joachim99@2 575 esac
joachim99@2 576
joachim99@2 577 build=`$SHELL $ac_config_sub $build_alias`
joachim99@2 578 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
joachim99@2 579 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
joachim99@2 580 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
joachim99@2 581 echo "$ac_t""$build" 1>&6
joachim99@2 582
joachim99@2 583 elif test -z "$host"; then
joachim99@2 584 echo "$progname: you must specify a host type if you use \`--no-verify'" 1>&2
joachim99@2 585 echo "$help" 1>&2
joachim99@2 586 exit 1
joachim99@2 587 else
joachim99@2 588 host_alias=$host
joachim99@2 589 build_alias=$host_alias
joachim99@2 590 build=$host
joachim99@2 591 fi
joachim99@2 592
joachim99@2 593 if test x"$host" != x"$build"; then
joachim99@2 594 ac_tool_prefix=${host_alias}-
joachim99@2 595 else
joachim99@2 596 ac_tool_prefix=
joachim99@2 597 fi
joachim99@2 598
joachim99@2 599 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
joachim99@2 600 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
joachim99@2 601 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
joachim99@2 602
joachim99@2 603 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
joachim99@2 604 case $host_os in
joachim99@2 605 linux-gnu*) ;;
joachim99@2 606 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
joachim99@2 607 esac
joachim99@2 608
joachim99@2 609 case $host_os in
joachim99@2 610 aix3*)
joachim99@2 611 # AIX sometimes has problems with the GCC collect2 program. For some
joachim99@2 612 # reason, if we set the COLLECT_NAMES environment variable, the problems
joachim99@2 613 # vanish in a puff of smoke.
joachim99@2 614 if test "X${COLLECT_NAMES+set}" != Xset; then
joachim99@2 615 COLLECT_NAMES=
joachim99@2 616 export COLLECT_NAMES
joachim99@2 617 fi
joachim99@2 618 ;;
joachim99@2 619 esac
joachim99@2 620
joachim99@2 621 # Determine commands to create old-style static archives.
joachim99@2 622 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
joachim99@2 623 old_postinstall_cmds='chmod 644 $oldlib'
joachim99@2 624 old_postuninstall_cmds=
joachim99@2 625
joachim99@2 626 if test -n "$RANLIB"; then
joachim99@2 627 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
joachim99@2 628 old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
joachim99@2 629 fi
joachim99@2 630
joachim99@2 631 # Source the script associated with the $tagname tag configuration.
joachim99@2 632 if test -n "$tagname"; then
joachim99@2 633 . $ltmain
joachim99@2 634 else
joachim99@2 635 # FIXME: We should use a variable here
joachim99@2 636 # Configure for a C compiler
joachim99@2 637 . $srcdir/ltcf-c.sh
joachim99@2 638 fi
joachim99@2 639
joachim99@2 640 # Set sane defaults for various variables
joachim99@2 641 test -z "$AR" && AR=ar
joachim99@2 642 test -z "$AR_FLAGS" && AR_FLAGS=cru
joachim99@2 643 test -z "$AS" && AS=as
joachim99@2 644 test -z "$CC" && CC=cc
joachim99@2 645 test -z "$DLLTOOL" && DLLTOOL=dlltool
joachim99@2 646 test -z "$MAGIC_CMD" && MAGIC_CMD=file
joachim99@2 647 test -z "$LD" && LD=ld
joachim99@2 648 test -z "$LN_S" && LN_S="ln -s"
joachim99@2 649 test -z "$NM" && NM=nm
joachim99@2 650 test -z "$OBJDUMP" && OBJDUMP=objdump
joachim99@2 651 test -z "$RANLIB" && RANLIB=:
joachim99@2 652 test -z "$STRIP" && STRIP=:
joachim99@2 653 test -z "$objext" && objext=o
joachim99@2 654
joachim99@2 655 echo $ac_n "checking for objdir... $ac_c" 1>&6
joachim99@2 656 rm -f .libs 2>/dev/null
joachim99@2 657 mkdir .libs 2>/dev/null
joachim99@2 658 if test -d .libs; then
joachim99@2 659 objdir=.libs
joachim99@2 660 else
joachim99@2 661 # MS-DOS does not allow filenames that begin with a dot.
joachim99@2 662 objdir=_libs
joachim99@2 663 fi
joachim99@2 664 rmdir .libs 2>/dev/null
joachim99@2 665 echo "$ac_t$objdir" 1>&6
joachim99@2 666
joachim99@2 667 # If no C compiler was specified, use CC.
joachim99@2 668 LTCC=${LTCC-"$CC"}
joachim99@2 669
joachim99@2 670 # Allow CC to be a program name with arguments.
joachim99@2 671 set dummy $CC
joachim99@2 672 compiler="$2"
joachim99@2 673
joachim99@2 674 # We assume here that the value for ac_cv_prog_cc_pic will not be cached
joachim99@2 675 # in isolation, and that seeing it set (from the cache) indicates that
joachim99@2 676 # the associated values are set (in the cache) correctly too.
joachim99@2 677 echo $ac_n "checking for $compiler option to produce PIC... $ac_c" 1>&6
joachim99@2 678 echo "$progname:678:checking for $compiler option to produce PIC" 1>&5
joachim99@2 679
joachim99@2 680 if test -z "$ac_cv_prog_cc_pic"; then
joachim99@2 681 echo "$ac_t"none 1>&6
joachim99@2 682 else
joachim99@2 683 echo "$ac_t""$ac_cv_prog_cc_pic" 1>&6
joachim99@2 684
joachim99@2 685 # Check to make sure the pic_flag actually works.
joachim99@2 686 echo $ac_n "checking if $compiler PIC flag $ac_cv_prog_cc_pic works... $ac_c" 1>&6
joachim99@2 687 echo "$progname:687:checking that $compiler PIC flag $ac_cv_prog_cc_pic works." 1>&5
joachim99@2 688 if test "X${ac_cv_prog_cc_pic_works+set}" = Xset && \
joachim99@2 689 test "X${ac_cv_prog_cc_pic_works}" != X; then
joachim99@2 690 echo $ac_n "(cached) $ac_c" 1>&6
joachim99@2 691 else
joachim99@2 692 ac_cv_prog_cc_pic_works=yes
joachim99@2 693 $rm conftest*
joachim99@2 694 echo $lt_simple_compile_test_code > conftest.$ac_ext
joachim99@2 695 save_CFLAGS="$CFLAGS"
joachim99@2 696 CFLAGS="$CFLAGS $ac_cv_prog_cc_pic -DPIC"
joachim99@2 697 if { (eval echo $progname:697: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then
joachim99@2 698 # Append any warnings to the config.log.
joachim99@2 699 cat conftest.err 1>&5
joachim99@2 700
joachim99@2 701 case $host_os in
joachim99@2 702 hpux9* | hpux10* | hpux11*)
joachim99@2 703 # On HP-UX, both CC and GCC only warn that PIC is supported... then
joachim99@2 704 # they create non-PIC objects. So, if there were any warnings, we
joachim99@2 705 # assume that PIC is not supported.
joachim99@2 706 if test -s conftest.err; then
joachim99@2 707 ac_cv_prog_cc_pic_works=no
joachim99@2 708 ac_cv_prog_cc_can_build_shared=no
joachim99@2 709 ac_cv_prog_cc_pic=
joachim99@2 710 else
joachim99@2 711 ac_cv_prog_cc_pic_works=yes
joachim99@2 712 ac_cv_prog_cc_pic=" $ac_cv_prog_cc_pic"
joachim99@2 713 fi
joachim99@2 714 ;;
joachim99@2 715 *)
joachim99@2 716 ac_cv_prog_cc_pic_works=yes
joachim99@2 717 ac_cv_prog_cc_pic=" $ac_cv_prog_cc_pic"
joachim99@2 718 ;;
joachim99@2 719 esac
joachim99@2 720 else
joachim99@2 721 # Append any errors to the config.log.
joachim99@2 722 cat conftest.err 1>&5
joachim99@2 723 ac_cv_prog_cc_pic_works=no
joachim99@2 724 ac_cv_prog_cc_can_build_shared=no
joachim99@2 725 ac_cv_prog_cc_pic=
joachim99@2 726 fi
joachim99@2 727 CFLAGS="$save_CFLAGS"
joachim99@2 728 $rm conftest*
joachim99@2 729 fi
joachim99@2 730 # Belt *and* braces to stop my trousers falling down:
joachim99@2 731 if test "X$ac_cv_prog_cc_pic_works" = Xno; then
joachim99@2 732 ac_cv_prog_cc_pic=
joachim99@2 733 ac_cv_prog_cc_can_build_shared=no
joachim99@2 734 fi
joachim99@2 735 echo "$ac_t""$ac_cv_prog_cc_pic_works" 1>&6
joachim99@2 736 fi
joachim99@2 737
joachim99@2 738 # Check for any special shared library compilation flags.
joachim99@2 739 if test -n "$ac_cv_prog_cc_shlib"; then
joachim99@2 740 echo "$progname: warning: \`$CC' requires \`$ac_cv_prog_cc_shlib' to build shared libraries" 1>&2
joachim99@2 741 if echo "$old_CC $old_CFLAGS " | egrep -e "[ ]$ac_cv_prog_cc_shlib[ ]" >/dev/null; then :
joachim99@2 742 else
joachim99@2 743 echo "$progname: add \`$ac_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
joachim99@2 744 ac_cv_prog_cc_can_build_shared=no
joachim99@2 745 fi
joachim99@2 746 fi
joachim99@2 747
joachim99@2 748 echo $ac_n "checking if $compiler static flag $ac_cv_prog_cc_static works... $ac_c" 1>&6
joachim99@2 749 echo "$progname:749: checking if $compiler static flag $ac_cv_prog_cc_static works" >&5
joachim99@2 750 if test "X${ac_cv_prog_cc_static_works+set}" = Xset && \
joachim99@2 751 test "X${ac_cv_prog_cc_static_works}" != X; then
joachim99@2 752 echo $ac_n "(cached) $ac_c" 1>&6
joachim99@2 753 else
joachim99@2 754 $rm conftest*
joachim99@2 755 echo $lt_simple_link_test_code > conftest.$ac_ext
joachim99@2 756 save_LDFLAGS="$LDFLAGS"
joachim99@2 757 LDFLAGS="$LDFLAGS $ac_cv_prog_cc_static"
joachim99@2 758 if { (eval echo $progname:758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
joachim99@2 759 ac_cv_prog_cc_static_works=yes
joachim99@2 760 else
joachim99@2 761 ac_cv_prog_cc_static_works=no
joachim99@2 762 ac_cv_prog_cc_static=
joachim99@2 763 fi
joachim99@2 764 LDFLAGS="$save_LDFLAGS"
joachim99@2 765 $rm conftest*
joachim99@2 766 fi
joachim99@2 767 # Belt *and* braces to stop my trousers falling down:
joachim99@2 768 if test "X$ac_cv_prog_cc_static_works" = Xno; then
joachim99@2 769 ac_cv_prog_cc_static=
joachim99@2 770 fi
joachim99@2 771 echo "$ac_t""$ac_cv_prog_cc_static_works" 1>&6
joachim99@2 772 pic_flag="$ac_cv_prog_cc_pic"
joachim99@2 773 special_shlib_compile_flags="$ac_cv_prog_cc_shlib"
joachim99@2 774 wl="$ac_cv_prog_cc_wl"
joachim99@2 775 link_static_flag="$ac_cv_prog_cc_static"
joachim99@2 776 no_builtin_flag="$ac_cv_prog_cc_no_builtin"
joachim99@2 777 can_build_shared="$ac_cv_prog_cc_can_build_shared"
joachim99@2 778
joachim99@2 779 # find the maximum length of command line arguments
joachim99@2 780 echo "$progname:780: finding the maximum length of command line arguments" 1>&5
joachim99@2 781 echo $ac_n "finding the maximum length of command line arguments... $ac_c" 1>&6
joachim99@2 782 if test "${lt_cv_sys_max_cmd_len+set}" = set; then
joachim99@2 783 echo $ac_n "(cached) $ac_c" 1>&6
joachim99@2 784 else
joachim99@2 785 i=0
joachim99@2 786 testring="ABCDEF"
joachim99@2 787 while test `$CONFIG_SHELL $0 --fallback-echo "X$testring" >/dev/null 2>&1` == `echo "X$testring" >/dev/null 2>&1` &&
joachim99@2 788 new_result=`expr "X$testring" : ".*" 2>&1` &&
joachim99@2 789 lt_cv_sys_max_cmd_len=$new_result &&
joachim99@2 790 test $i != 32 # 1 MB should be enough
joachim99@2 791 do
joachim99@2 792 i=`expr $i + 1`
joachim99@2 793 testring=$testring$testring
joachim99@2 794 done
joachim99@2 795 testring=
joachim99@2 796 # add a significant safety factor because C++ compilers can tack on massive amounts
joachim99@2 797 # of additional arguments before passing them to the linker. 1/4 should be good.
joachim99@2 798 len=`expr $lt_cv_sys_max_cmd_len \/ 4`
joachim99@2 799 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len - $len`
joachim99@2 800 fi
joachim99@2 801 echo "$progname:@lineno@: result: $lt_cv_sys_max_cmd_len" 1>&5
joachim99@2 802 echo "${ac_t}$lt_cv_sys_max_cmd_len" 1>&6
joachim99@2 803
joachim99@2 804 if test -n $lt_cv_sys_max_cmd_len ; then
joachim99@2 805 max_cmd_len=$lt_cv_sys_max_cmd_len
joachim99@2 806 else
joachim99@2 807 max_cmd_len=none
joachim99@2 808 fi
joachim99@2 809
joachim99@2 810 # Check to see if options -o and -c are simultaneously supported by compiler
joachim99@2 811 echo $ac_n "checking if $compiler supports -c -o file.$objext... $ac_c" 1>&6
joachim99@2 812 if test "${lt_cv_compiler_c_o+set}" = set; then
joachim99@2 813 echo $ac_n "(cached) $ac_c" 1>&6
joachim99@2 814 else
joachim99@2 815 $rm -r conftest 2>/dev/null
joachim99@2 816 mkdir conftest
joachim99@2 817 cd conftest
joachim99@2 818 $rm conftest*
joachim99@2 819 echo $lt_simple_compile_test_code > conftest.$ac_ext
joachim99@2 820 mkdir out
joachim99@2 821 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
joachim99@2 822 # that will create temporary files in the current directory regardless of
joachim99@2 823 # the output directory. Thus, making CWD read-only will cause this test
joachim99@2 824 # to fail, enabling locking or at least warning the user not to do parallel
joachim99@2 825 # builds.
joachim99@2 826 chmod -w .
joachim99@2 827 save_CFLAGS="$CFLAGS"
joachim99@2 828 CFLAGS="$CFLAGS -o out/conftest2.$objext"
joachim99@2 829 echo "$progname:829: checking if $compiler supports -c -o file.$objext" >&5
joachim99@2 830 if { (eval echo $progname:830: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$objext; then
joachim99@2 831
joachim99@2 832 # The compiler can only warn and ignore the option if not recognized
joachim99@2 833 # So say no if there are warnings
joachim99@2 834 if test -s out/conftest.err; then
joachim99@2 835 lt_cv_compiler_c_o=no
joachim99@2 836 else
joachim99@2 837 lt_cv_compiler_c_o=yes
joachim99@2 838 fi
joachim99@2 839 else
joachim99@2 840 # Append any errors to the config.log.
joachim99@2 841 cat out/conftest.err 1>&5
joachim99@2 842 lt_cv_compiler_c_o=no
joachim99@2 843 fi
joachim99@2 844 CFLAGS="$save_CFLAGS"
joachim99@2 845 chmod u+w .
joachim99@2 846 $rm conftest* out/*
joachim99@2 847 rmdir out
joachim99@2 848 cd ..
joachim99@2 849 rmdir conftest
joachim99@2 850 $rm -r conftest 2>/dev/null
joachim99@2 851 fi
joachim99@2 852 compiler_c_o=$lt_cv_compiler_c_o
joachim99@2 853 echo "${ac_t}$compiler_c_o" 1>&6
joachim99@2 854
joachim99@2 855 # Check to see if we can do hard links to lock some files if needed
joachim99@2 856 hard_links="nottested"
joachim99@2 857 if test "$compiler_c_o" = no && test "$need_locks" != no; then
joachim99@2 858 # do not overwrite the value of need_locks provided by the user
joachim99@2 859 echo $ac_n "checking if we can lock with hard links... $ac_c" 1>&6
joachim99@2 860 hard_links=yes
joachim99@2 861 $rm conftest*
joachim99@2 862 ln conftest.a conftest.b 2>/dev/null && hard_links=no
joachim99@2 863 touch conftest.a
joachim99@2 864 ln conftest.a conftest.b 2>&5 || hard_links=no
joachim99@2 865 ln conftest.a conftest.b 2>/dev/null && hard_links=no
joachim99@2 866 echo "$ac_t$hard_links" 1>&6
joachim99@2 867 $rm conftest*
joachim99@2 868 if test "$hard_links" = no; then
joachim99@2 869 echo "*** WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2
joachim99@2 870 need_locks=warn
joachim99@2 871 fi
joachim99@2 872 else
joachim99@2 873 need_locks=no
joachim99@2 874 fi
joachim99@2 875
joachim99@2 876 if test "$with_gcc" = yes; then
joachim99@2 877 # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
joachim99@2 878 echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions ... $ac_c" 1>&6
joachim99@2 879 $rm conftest*
joachim99@2 880 echo $lt_simple_compile_test_code > conftest.$ac_ext
joachim99@2 881 save_CFLAGS="$CFLAGS"
joachim99@2 882 CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
joachim99@2 883 echo "$progname:883: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
joachim99@2 884 if { (eval echo $progname:884: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then
joachim99@2 885
joachim99@2 886 # The compiler can only warn and ignore the option if not recognized
joachim99@2 887 # So say no if there are warnings
joachim99@2 888 if test -s conftest.err; then
joachim99@2 889 echo "$ac_t"no 1>&6
joachim99@2 890 compiler_rtti_exceptions=no
joachim99@2 891 else
joachim99@2 892 echo "$ac_t"yes 1>&6
joachim99@2 893 compiler_rtti_exceptions=yes
joachim99@2 894 fi
joachim99@2 895 else
joachim99@2 896 # Append any errors to the config.log.
joachim99@2 897 cat conftest.err 1>&5
joachim99@2 898 compiler_rtti_exceptions=no
joachim99@2 899 echo "$ac_t"no 1>&6
joachim99@2 900 fi
joachim99@2 901 CFLAGS="$save_CFLAGS"
joachim99@2 902 $rm conftest*
joachim99@2 903
joachim99@2 904 if test "$compiler_rtti_exceptions" = "yes"; then
joachim99@2 905 no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
joachim99@2 906 else
joachim99@2 907 no_builtin_flag=' -fno-builtin'
joachim99@2 908 fi
joachim99@2 909
joachim99@2 910 fi
joachim99@2 911
joachim99@2 912 # See if the linker supports building shared libraries.
joachim99@2 913 echo $ac_n "checking whether the linker ($LD) supports shared libraries... $ac_c" 1>&6
joachim99@2 914
joachim99@2 915 echo "$ac_t$ld_shlibs" 1>&6
joachim99@2 916 test "$ld_shlibs" = no && can_build_shared=no
joachim99@2 917
joachim99@2 918 # Check hardcoding attributes.
joachim99@2 919 echo $ac_n "checking how to hardcode library paths into programs... $ac_c" 1>&6
joachim99@2 920 hardcode_action=
joachim99@2 921 if test -n "$hardcode_libdir_flag_spec" || \
joachim99@2 922 test -n "$runpath_var"; then
joachim99@2 923
joachim99@2 924 # We can hardcode non-existant directories.
joachim99@2 925 if test "$hardcode_direct" != no &&
joachim99@2 926 # If the only mechanism to avoid hardcoding is shlibpath_var, we
joachim99@2 927 # have to relink, otherwise we might link with an installed library
joachim99@2 928 # when we should be linking with a yet-to-be-installed one
joachim99@2 929 ## test "$hardcode_shlibpath_var" != no &&
joachim99@2 930 test "$hardcode_minus_L" != no; then
joachim99@2 931 # Linking always hardcodes the temporary library directory.
joachim99@2 932 hardcode_action=relink
joachim99@2 933 else
joachim99@2 934 # We can link without hardcoding, and we can hardcode nonexisting dirs.
joachim99@2 935 hardcode_action=immediate
joachim99@2 936 fi
joachim99@2 937 else
joachim99@2 938 # We cannot hardcode anything, or else we can only hardcode existing
joachim99@2 939 # directories.
joachim99@2 940 hardcode_action=unsupported
joachim99@2 941 fi
joachim99@2 942 echo "$ac_t$hardcode_action" 1>&6
joachim99@2 943
joachim99@2 944 echo $ac_n "checking whether stripping libraries is possible... $ac_c" 1>&6
joachim99@2 945 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
joachim99@2 946 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
joachim99@2 947 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
joachim99@2 948 echo "${ac_t}yes" 1>&6
joachim99@2 949 else
joachim99@2 950 echo "${ac_t}no" 1>&6
joachim99@2 951 fi
joachim99@2 952
joachim99@2 953 case $reload_flag in
joachim99@2 954 "" | " "*) ;;
joachim99@2 955 *) reload_flag=" $reload_flag" ;;
joachim99@2 956 esac
joachim99@2 957 reload_cmds='$LD$reload_flag -o $output$reload_objs'
joachim99@2 958 test -z "$deplibs_check_method" && deplibs_check_method=unknown
joachim99@2 959
joachim99@2 960 # PORTME Fill in your ld.so characteristics
joachim99@2 961 library_names_spec=
joachim99@2 962 libname_spec='lib$name'
joachim99@2 963 soname_spec=
joachim99@2 964 postinstall_cmds=
joachim99@2 965 postuninstall_cmds=
joachim99@2 966 finish_cmds=
joachim99@2 967 finish_eval=
joachim99@2 968 shlibpath_var=
joachim99@2 969 shlibpath_overrides_runpath=unknown
joachim99@2 970 version_type=none
joachim99@2 971 dynamic_linker="$host_os ld.so"
joachim99@2 972 sys_lib_dlsearch_path_spec="/lib /usr/lib"
joachim99@2 973 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
joachim99@2 974
joachim99@2 975 echo $ac_n "checking dynamic linker characteristics... $ac_c" 1>&6
joachim99@2 976 case $host_os in
joachim99@2 977 aix3*)
joachim99@2 978 version_type=linux
joachim99@2 979 library_names_spec='${libname}${release}.so$versuffix $libname.a'
joachim99@2 980 shlibpath_var=LIBPATH
joachim99@2 981
joachim99@2 982 # AIX 3 has no versioning support, so we append a major version to the name.
joachim99@2 983 soname_spec='${libname}${release}.so$major'
joachim99@2 984 ;;
joachim99@2 985
joachim99@2 986 aix4* | aix5*)
joachim99@2 987 if test "$host_cpu" = ia64; then
joachim99@2 988 # AIX 5 supports IA64
joachim99@2 989 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
joachim99@2 990 shlibpath_var=LD_LIBRARY_PATH
joachim99@2 991 else
joachim99@2 992 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
joachim99@2 993 # soname into executable. Probably we can add versioning support to
joachim99@2 994 # collect2, so additional links can be useful in future.
joachim99@2 995 # We preserve .a as extension for shared libraries though AIX4.2
joachim99@2 996 # and later linker supports .so
joachim99@2 997 if test "$aix_use_runtimelinking" = yes; then
joachim99@2 998 # If using run time linking (on AIX 4.2 or later) use lib<name>.so instead of
joachim99@2 999 # lib<name>.a to let people know that these are not typical AIX shared libraries.
joachim99@2 1000 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
joachim99@2 1001 # We want symlinks to be created for the different names.
joachim99@2 1002 version_type=linux
joachim99@2 1003 else
joachim99@2 1004 # We preserve .a as extension for shared libraries though AIX4.2
joachim99@2 1005 # and later when we are not doing run time linking.
joachim99@2 1006 library_names_spec='${libname}${release}.a $libname.a'
joachim99@2 1007 soname_spec='${libname}${release}.so$major.o'
joachim99@2 1008 fi
joachim99@2 1009 # If we're using GNU nm, then we don't want the "-C" option.
joachim99@2 1010 # -C means demangle to AIX nm, but means don't demangle with GNU nm
joachim99@2 1011 if $NM -V 2>&1 | egrep '(GNU)' > /dev/null; then
joachim99@2 1012 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 1013 else
joachim99@2 1014 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 1015 fi
joachim99@2 1016 shlibpath_var=LIBPATH
joachim99@2 1017 deplibs_check_method=pass_all
joachim99@2 1018 # Put the right runpath into libraries.
joachim99@2 1019 hardcode_into_libs=yes
joachim99@2 1020 case $host_os in
joachim99@2 1021 aix4 | aix4.[01] | aix4.[01].*)
joachim99@2 1022 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
joachim99@2 1023 echo ' yes '
joachim99@2 1024 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
joachim99@2 1025 :
joachim99@2 1026 else
joachim99@2 1027 # With GCC up to 2.95.x, collect2 would create an import file
joachim99@2 1028 # for dependence libraries. The import file would start with
joachim99@2 1029 # the line `#! .'. This would cause the generated library to
joachim99@2 1030 # depend on `.', always an invalid library. This was fixed in
joachim99@2 1031 # development snapshots of GCC prior to 3.0.
joachim99@2 1032 can_build_shared=no
joachim99@2 1033 fi
joachim99@2 1034 ;;
joachim99@2 1035 esac
joachim99@2 1036 fi
joachim99@2 1037 ;;
joachim99@2 1038
joachim99@2 1039 amigaos*)
joachim99@2 1040 library_names_spec='$libname.ixlibrary $libname.a'
joachim99@2 1041 # Create ${libname}_ixlibrary.a entries in /sys/libs.
joachim99@2 1042 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 1043 ;;
joachim99@2 1044
joachim99@2 1045 beos*)
joachim99@2 1046 library_names_spec='${libname}.so'
joachim99@2 1047 dynamic_linker="$host_os ld.so"
joachim99@2 1048 shlibpath_var=LIBRARY_PATH
joachim99@2 1049 lt_cv_dlopen="load_add_on"
joachim99@2 1050 lt_cv_dlopen_libs=
joachim99@2 1051 lt_cv_dlopen_self=yes
joachim99@2 1052 ;;
joachim99@2 1053
joachim99@2 1054 bsdi4*)
joachim99@2 1055 version_type=linux
joachim99@2 1056 need_version=no
joachim99@2 1057 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
joachim99@2 1058 soname_spec='${libname}${release}.so$major'
joachim99@2 1059 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
joachim99@2 1060 shlibpath_var=LD_LIBRARY_PATH
joachim99@2 1061 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
joachim99@2 1062 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
joachim99@2 1063 export_dynamic_flag_spec=-rdynamic
joachim99@2 1064 # the default ld.so.conf also contains /usr/contrib/lib and
joachim99@2 1065 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
joachim99@2 1066 # libtool to hard-code these into programs
joachim99@2 1067 ;;
joachim99@2 1068
joachim99@2 1069 cygwin* | mingw* | pw32*)
joachim99@2 1070 version_type=windows
joachim99@2 1071 need_version=no
joachim99@2 1072 need_lib_prefix=no
joachim99@2 1073 case $with_gcc,$host_os in
joachim99@2 1074 yes,cygwin*)
joachim99@2 1075 library_names_spec='$libname.dll.a'
joachim99@2 1076 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | [sed -e 's/[.]/-/g']`${versuffix}.dll'
joachim99@2 1077 postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i; echo \$dlname'\''`~
joachim99@2 1078 dldir=$destdir/`dirname \$dlpath`~
joachim99@2 1079 test -d \$dldir || mkdir -p \$dldir~
joachim99@2 1080 $install_prog .libs/$dlname \$dldir/$dlname'
joachim99@2 1081 postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
joachim99@2 1082 dlpath=$dir/\$dldll; $rm \$dlpath'
joachim99@2 1083 ;;
joachim99@2 1084 yes,mingw*)
joachim99@2 1085 library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
joachim99@2 1086 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
joachim99@2 1087 ;;
joachim99@2 1088 yes,pw32*)
joachim99@2 1089 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
joachim99@2 1090 ;;
joachim99@2 1091 *)
joachim99@2 1092 library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
joachim99@2 1093 ;;
joachim99@2 1094 esac
joachim99@2 1095 dynamic_linker='Win32 ld.exe'
joachim99@2 1096 # FIXME: first we should search . and the directory the executable is in
joachim99@2 1097 shlibpath_var=PATH
joachim99@2 1098 lt_cv_dlopen="LoadLibrary"
joachim99@2 1099 lt_cv_dlopen_libs=
joachim99@2 1100 ;;
joachim99@2 1101
joachim99@2 1102 darwin* | rhapsody*)
joachim99@2 1103 dynamic_linker="$host_os dyld"
joachim99@2 1104 version_type=darwin
joachim99@2 1105 need_lib_prefix=no
joachim99@2 1106 need_version=no
joachim99@2 1107 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 1108 soname_spec='${libname}${release}${major}.`test .$module = .yes && echo so || echo dylib`'
joachim99@2 1109 shlibpath_overrides_runpath=yes
joachim99@2 1110 shlibpath_var=DYLD_LIBRARY_PATH
joachim99@2 1111 ;;
joachim99@2 1112
joachim99@2 1113 freebsd1*)
joachim99@2 1114 dynamic_linker=no
joachim99@2 1115 ;;
joachim99@2 1116
joachim99@2 1117 freebsd*)
joachim99@2 1118 objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
joachim99@2 1119 version_type=freebsd-$objformat
joachim99@2 1120 case $version_type in
joachim99@2 1121 freebsd-elf*)
joachim99@2 1122 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
joachim99@2 1123 need_version=no
joachim99@2 1124 need_lib_prefix=no
joachim99@2 1125 ;;
joachim99@2 1126 freebsd-*)
joachim99@2 1127 library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
joachim99@2 1128 need_version=yes
joachim99@2 1129 ;;
joachim99@2 1130 esac
joachim99@2 1131 shlibpath_var=LD_LIBRARY_PATH
joachim99@2 1132 case $host_os in
joachim99@2 1133 freebsd2*)
joachim99@2 1134 shlibpath_overrides_runpath=yes
joachim99@2 1135 ;;
joachim99@2 1136 *)
joachim99@2 1137 shlibpath_overrides_runpath=no
joachim99@2 1138 hardcode_into_libs=yes
joachim99@2 1139 ;;
joachim99@2 1140 esac
joachim99@2 1141 ;;
joachim99@2 1142
joachim99@2 1143 gnu*)
joachim99@2 1144 version_type=linux
joachim99@2 1145 need_lib_prefix=no
joachim99@2 1146 need_version=no
joachim99@2 1147 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
joachim99@2 1148 soname_spec='${libname}${release}.so$major'
joachim99@2 1149 shlibpath_var=LD_LIBRARY_PATH
joachim99@2 1150 hardcode_into_libs=yes
joachim99@2 1151 ;;
joachim99@2 1152
joachim99@2 1153 hpux9* | hpux10* | hpux11*)
joachim99@2 1154 # Give a soname corresponding to the major version so that dld.sl refuses to
joachim99@2 1155 # link against other versions.
joachim99@2 1156 dynamic_linker="$host_os dld.sl"
joachim99@2 1157 version_type=sunos
joachim99@2 1158 hardcode_into_libs=all
joachim99@2 1159 need_lib_prefix=no
joachim99@2 1160 need_version=no
joachim99@2 1161 shlibpath_var=SHLIB_PATH
joachim99@2 1162 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
joachim99@2 1163 library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
joachim99@2 1164 soname_spec='${libname}${release}.sl$major'
joachim99@2 1165 # HP-UX runs *really* slowly unless shared libraries are mode 555.
joachim99@2 1166 postinstall_cmds='chmod 555 $lib'
joachim99@2 1167 ;;
joachim99@2 1168
joachim99@2 1169 irix5* | irix6*)
joachim99@2 1170 version_type=irix
joachim99@2 1171 need_lib_prefix=no
joachim99@2 1172 need_version=no
joachim99@2 1173 soname_spec='${libname}${release}.so$major'
joachim99@2 1174 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
joachim99@2 1175 case $host_os in
joachim99@2 1176 irix5*)
joachim99@2 1177 libsuff= shlibsuff=
joachim99@2 1178 ;;
joachim99@2 1179 *)
joachim99@2 1180 case $LD in # libtool.m4 will add one of these switches to LD
joachim99@2 1181 *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
joachim99@2 1182 *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
joachim99@2 1183 *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
joachim99@2 1184 *) libsuff= shlibsuff= libmagic=never-match;;
joachim99@2 1185 esac
joachim99@2 1186 ;;
joachim99@2 1187 esac
joachim99@2 1188 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
joachim99@2 1189 shlibpath_overrides_runpath=no
joachim99@2 1190 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
joachim99@2 1191 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
joachim99@2 1192 ;;
joachim99@2 1193
joachim99@2 1194 # No shared lib support for Linux oldld, aout, or coff.
joachim99@2 1195 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
joachim99@2 1196 dynamic_linker=no
joachim99@2 1197 ;;
joachim99@2 1198
joachim99@2 1199 # This must be Linux ELF.
joachim99@2 1200 linux-gnu*)
joachim99@2 1201 version_type=linux
joachim99@2 1202 need_lib_prefix=no
joachim99@2 1203 need_version=no
joachim99@2 1204 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
joachim99@2 1205 soname_spec='${libname}${release}.so$major'
joachim99@2 1206 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
joachim99@2 1207 shlibpath_var=LD_LIBRARY_PATH
joachim99@2 1208 shlibpath_overrides_runpath=no
joachim99@2 1209 # This implies no fast_install, which is unacceptable.
joachim99@2 1210 # Some rework will be needed to allow for fast_install
joachim99@2 1211 # before this can be enabled.
joachim99@2 1212 hardcode_into_libs=yes
joachim99@2 1213
joachim99@2 1214 # We used to test for /lib/ld.so.1 and disable shared libraries on
joachim99@2 1215 # powerpc, because MkLinux only supported shared libraries with the
joachim99@2 1216 # GNU dynamic linker. Since this was broken with cross compilers,
joachim99@2 1217 # most powerpc-linux boxes support dynamic linking these days and
joachim99@2 1218 # people can always --disable-shared, the test was removed, and we
joachim99@2 1219 # assume the GNU/Linux dynamic linker is in use.
joachim99@2 1220 dynamic_linker='GNU/Linux ld.so'
joachim99@2 1221 ;;
joachim99@2 1222
joachim99@2 1223 netbsd*)
joachim99@2 1224 version_type=sunos
joachim99@2 1225 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
joachim99@2 1226 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
joachim99@2 1227 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
joachim99@2 1228 dynamic_linker='NetBSD (a.out) ld.so'
joachim99@2 1229 need_version=yes
joachim99@2 1230 else
joachim99@2 1231 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
joachim99@2 1232 soname_spec='${libname}${release}.so$major'
joachim99@2 1233 dynamic_linker='NetBSD ld.elf_so'
joachim99@2 1234 fi
joachim99@2 1235 shlibpath_var=LD_LIBRARY_PATH
joachim99@2 1236 shlibpath_overrides_runpath=yes
joachim99@2 1237 hardcode_into_libs=yes
joachim99@2 1238 ;;
joachim99@2 1239
joachim99@2 1240 newsos6)
joachim99@2 1241 version_type=linux
joachim99@2 1242 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
joachim99@2 1243 shlibpath_var=LD_LIBRARY_PATH
joachim99@2 1244 shlibpath_overrides_runpath=yes
joachim99@2 1245 ;;
joachim99@2 1246
joachim99@2 1247 openbsd*)
joachim99@2 1248 version_type=sunos
joachim99@2 1249 if test "$with_gnu_ld" = yes; then
joachim99@2 1250 need_lib_prefix=no
joachim99@2 1251 need_version=no
joachim99@2 1252 fi
joachim99@2 1253 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
joachim99@2 1254 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
joachim99@2 1255 shlibpath_var=LD_LIBRARY_PATH
joachim99@2 1256 # OpenBSD 2.7 the overriding is needed for fast-install
joachim99@2 1257 shlibpath_overrides_runpath=yes
joachim99@2 1258 ;;
joachim99@2 1259
joachim99@2 1260 os2*)
joachim99@2 1261 libname_spec='$name'
joachim99@2 1262 need_lib_prefix=no
joachim99@2 1263 library_names_spec='$libname.dll $libname.a'
joachim99@2 1264 dynamic_linker='OS/2 ld.exe'
joachim99@2 1265 shlibpath_var=LIBPATH
joachim99@2 1266 ;;
joachim99@2 1267
joachim99@2 1268 osf3* | osf4* | osf5*)
joachim99@2 1269 version_type=osf
joachim99@2 1270 need_version=no
joachim99@2 1271 soname_spec='${libname}${release}.so'
joachim99@2 1272 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
joachim99@2 1273 shlibpath_var=LD_LIBRARY_PATH
joachim99@2 1274 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
joachim99@2 1275 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
joachim99@2 1276 ;;
joachim99@2 1277
joachim99@2 1278 sco3.2v5*)
joachim99@2 1279 version_type=osf
joachim99@2 1280 soname_spec='${libname}${release}.so$major'
joachim99@2 1281 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
joachim99@2 1282 shlibpath_var=LD_LIBRARY_PATH
joachim99@2 1283 ;;
joachim99@2 1284
joachim99@2 1285 solaris*)
joachim99@2 1286 version_type=linux
joachim99@2 1287 need_lib_prefix=no
joachim99@2 1288 need_version=no
joachim99@2 1289 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
joachim99@2 1290 soname_spec='${libname}${release}.so$major'
joachim99@2 1291 shlibpath_var=LD_LIBRARY_PATH
joachim99@2 1292 shlibpath_overrides_runpath=yes
joachim99@2 1293 hardcode_into_libs=yes
joachim99@2 1294 # ldd complains unless libraries are executable
joachim99@2 1295 postinstall_cmds='chmod +x $lib'
joachim99@2 1296 ;;
joachim99@2 1297
joachim99@2 1298 sunos4*)
joachim99@2 1299 version_type=sunos
joachim99@2 1300 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
joachim99@2 1301 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
joachim99@2 1302 shlibpath_var=LD_LIBRARY_PATH
joachim99@2 1303 shlibpath_overrides_runpath=yes
joachim99@2 1304 if test "$with_gnu_ld" = yes; then
joachim99@2 1305 need_lib_prefix=no
joachim99@2 1306 fi
joachim99@2 1307 need_version=yes
joachim99@2 1308 ;;
joachim99@2 1309
joachim99@2 1310 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
joachim99@2 1311 version_type=linux
joachim99@2 1312 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
joachim99@2 1313 soname_spec='${libname}${release}.so$major'
joachim99@2 1314 shlibpath_var=LD_LIBRARY_PATH
joachim99@2 1315 case $host_vendor in
joachim99@2 1316 motorola)
joachim99@2 1317 need_lib_prefix=no
joachim99@2 1318 need_version=no
joachim99@2 1319 shlibpath_overrides_runpath=no
joachim99@2 1320 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
joachim99@2 1321 ;;
joachim99@2 1322 esac
joachim99@2 1323 ;;
joachim99@2 1324
joachim99@2 1325 uts4*)
joachim99@2 1326 version_type=linux
joachim99@2 1327 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
joachim99@2 1328 soname_spec='${libname}${release}.so$major'
joachim99@2 1329 shlibpath_var=LD_LIBRARY_PATH
joachim99@2 1330 ;;
joachim99@2 1331
joachim99@2 1332 dgux*)
joachim99@2 1333 version_type=linux
joachim99@2 1334 need_lib_prefix=no
joachim99@2 1335 need_version=no
joachim99@2 1336 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
joachim99@2 1337 soname_spec='${libname}${release}.so$major'
joachim99@2 1338 shlibpath_var=LD_LIBRARY_PATH
joachim99@2 1339 ;;
joachim99@2 1340
joachim99@2 1341 sysv4*MP*)
joachim99@2 1342 if test -d /usr/nec ;then
joachim99@2 1343 version_type=linux
joachim99@2 1344 library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
joachim99@2 1345 soname_spec='$libname.so.$major'
joachim99@2 1346 shlibpath_var=LD_LIBRARY_PATH
joachim99@2 1347 fi
joachim99@2 1348 ;;
joachim99@2 1349
joachim99@2 1350 *)
joachim99@2 1351 dynamic_linker=no
joachim99@2 1352 ;;
joachim99@2 1353 esac
joachim99@2 1354 echo "$ac_t$dynamic_linker" 1>&6
joachim99@2 1355 test "$dynamic_linker" = no && can_build_shared=no
joachim99@2 1356
joachim99@2 1357 # Check for command to grab the raw symbol name followed by C symbol from nm.
joachim99@2 1358 echo $ac_n "checking command to parse $NM output... $ac_c" 1>&6
joachim99@2 1359
joachim99@2 1360 # These are sane defaults that work on at least a few old systems.
joachim99@2 1361 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
joachim99@2 1362
joachim99@2 1363 # Character class describing NM global symbol codes.
joachim99@2 1364 symcode='[BCDEGRST]'
joachim99@2 1365
joachim99@2 1366 # Regexp to match symbols that can be accessed directly from C.
joachim99@2 1367 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
joachim99@2 1368
joachim99@2 1369 # Transform the above into a raw symbol and a C symbol.
joachim99@2 1370 symxfrm='\1 \2\3 \3'
joachim99@2 1371
joachim99@2 1372 # Transform an extracted symbol line into a proper C declaration
joachim99@2 1373 global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
joachim99@2 1374
joachim99@2 1375 # Define system-specific variables.
joachim99@2 1376 case $host_os in
joachim99@2 1377 aix*)
joachim99@2 1378 symcode='[BCDT]'
joachim99@2 1379 ;;
joachim99@2 1380 cygwin* | mingw* | pw32*)
joachim99@2 1381 symcode='[ABCDGISTW]'
joachim99@2 1382 ;;
joachim99@2 1383 hpux*) # Its linker distinguishes data from code symbols
joachim99@2 1384 global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^. .* \(.*\)$/extern char \1;/p'"
joachim99@2 1385 ;;
joachim99@2 1386 irix*)
joachim99@2 1387 symcode='[BCDEGRST]'
joachim99@2 1388 ;;
joachim99@2 1389 solaris* | sysv5*)
joachim99@2 1390 symcode='[BDT]'
joachim99@2 1391 ;;
joachim99@2 1392 sysv4)
joachim99@2 1393 symcode='[DFNSTU]'
joachim99@2 1394 ;;
joachim99@2 1395 esac
joachim99@2 1396
joachim99@2 1397 # Handle CRLF in mingw tool chain
joachim99@2 1398 opt_cr=
joachim99@2 1399 case $host_os in
joachim99@2 1400 mingw*)
joachim99@2 1401 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
joachim99@2 1402 ;;
joachim99@2 1403 esac
joachim99@2 1404
joachim99@2 1405 # If we're using GNU nm, then use its standard symbol codes.
joachim99@2 1406 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
joachim99@2 1407 symcode='[ABCDGISTW]'
joachim99@2 1408 fi
joachim99@2 1409
joachim99@2 1410 # Try without a prefix undercore, then with it.
joachim99@2 1411 for ac_symprfx in "" "_"; do
joachim99@2 1412
joachim99@2 1413 # Write the raw and C identifiers.
joachim99@2 1414 global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode\)[ ][ ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
joachim99@2 1415
joachim99@2 1416 # Check to see that the pipe works correctly.
joachim99@2 1417 pipe_works=no
joachim99@2 1418 $rm conftest*
joachim99@2 1419 cat > conftest.$ac_ext <<EOF
joachim99@2 1420 #ifdef __cplusplus
joachim99@2 1421 extern "C" {
joachim99@2 1422 #endif
joachim99@2 1423 char nm_test_var;
joachim99@2 1424 void nm_test_func(){}
joachim99@2 1425 #ifdef __cplusplus
joachim99@2 1426 }
joachim99@2 1427 #endif
joachim99@2 1428 int main(){nm_test_var='a';nm_test_func();return(0);}
joachim99@2 1429 EOF
joachim99@2 1430
joachim99@2 1431 echo "$progname:1423: checking if global_symbol_pipe works" >&5
joachim99@2 1432 if { (eval echo $progname:1424: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then
joachim99@2 1433 # Now try to grab the symbols.
joachim99@2 1434 nlist=conftest.nm
joachim99@2 1435 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 1436
joachim99@2 1437 # Try sorting and uniquifying the output.
joachim99@2 1438 if sort "$nlist" | uniq > "$nlist"T; then
joachim99@2 1439 mv -f "$nlist"T "$nlist"
joachim99@2 1440 else
joachim99@2 1441 rm -f "$nlist"T
joachim99@2 1442 fi
joachim99@2 1443
joachim99@2 1444 # Make sure that we snagged all the symbols we need.
joachim99@2 1445 if egrep ' nm_test_var$' "$nlist" >/dev/null; then
joachim99@2 1446 if egrep ' nm_test_func$' "$nlist" >/dev/null; then
joachim99@2 1447 cat <<EOF > conftest.$ac_ext
joachim99@2 1448 #ifdef __cplusplus
joachim99@2 1449 extern "C" {
joachim99@2 1450 #endif
joachim99@2 1451
joachim99@2 1452 EOF
joachim99@2 1453 # Now generate the symbol file.
joachim99@2 1454 eval "$global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
joachim99@2 1455
joachim99@2 1456 cat <<EOF >> conftest.$ac_ext
joachim99@2 1457 #if defined (__STDC__) && __STDC__
joachim99@2 1458 # define lt_ptr_t void *
joachim99@2 1459 #else
joachim99@2 1460 # define lt_ptr_t char *
joachim99@2 1461 # define const
joachim99@2 1462 #endif
joachim99@2 1463
joachim99@2 1464 /* The mapping between symbol names and symbols. */
joachim99@2 1465 const struct {
joachim99@2 1466 const char *name;
joachim99@2 1467 lt_ptr_t address;
joachim99@2 1468 }
joachim99@2 1469 lt_preloaded_symbols[] =
joachim99@2 1470 {
joachim99@2 1471 EOF
joachim99@2 1472 sed 's/^. \(.*\) \(.*\)$/ {"\2", (lt_ptr_t) \&\2},/' < "$nlist" >> conftest.$ac_ext
joachim99@2 1473 cat <<\EOF >> conftest.$ac_ext
joachim99@2 1474 {0, (lt_ptr_t) 0}
joachim99@2 1475 };
joachim99@2 1476
joachim99@2 1477 #ifdef __cplusplus
joachim99@2 1478 }
joachim99@2 1479 #endif
joachim99@2 1480 EOF
joachim99@2 1481 # Now try linking the two files.
joachim99@2 1482 mv conftest.$objext conftstm.$objext
joachim99@2 1483 save_LIBS="$LIBS"
joachim99@2 1484 save_CFLAGS="$CFLAGS"
joachim99@2 1485 LIBS="conftstm.$objext"
joachim99@2 1486 CFLAGS="$CFLAGS$no_builtin_flag"
joachim99@2 1487 if { (eval echo $progname:1479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
joachim99@2 1488 pipe_works=yes
joachim99@2 1489 else
joachim99@2 1490 echo "$progname: failed program was:" >&5
joachim99@2 1491 cat conftest.$ac_ext >&5
joachim99@2 1492 fi
joachim99@2 1493 LIBS="$save_LIBS"
joachim99@2 1494 else
joachim99@2 1495 echo "cannot find nm_test_func in $nlist" >&5
joachim99@2 1496 fi
joachim99@2 1497 else
joachim99@2 1498 echo "cannot find nm_test_var in $nlist" >&5
joachim99@2 1499 fi
joachim99@2 1500 else
joachim99@2 1501 echo "cannot run $global_symbol_pipe" >&5
joachim99@2 1502 fi
joachim99@2 1503 else
joachim99@2 1504 echo "$progname: failed program was:" >&5
joachim99@2 1505 cat conftest.$ac_ext >&5
joachim99@2 1506 fi
joachim99@2 1507 $rm conftest* conftst*
joachim99@2 1508
joachim99@2 1509 # Do not use the global_symbol_pipe unless it works.
joachim99@2 1510 if test "$pipe_works" = yes; then
joachim99@2 1511 break
joachim99@2 1512 else
joachim99@2 1513 global_symbol_pipe=
joachim99@2 1514 fi
joachim99@2 1515 done
joachim99@2 1516 if test "$pipe_works" = yes; then
joachim99@2 1517 echo "${ac_t}ok" 1>&6
joachim99@2 1518 else
joachim99@2 1519 echo "${ac_t}failed" 1>&6
joachim99@2 1520 fi
joachim99@2 1521
joachim99@2 1522 if test -z "$global_symbol_pipe"; then
joachim99@2 1523 global_symbol_to_cdecl=
joachim99@2 1524 fi
joachim99@2 1525
joachim99@2 1526 # Report the final consequences.
joachim99@2 1527 echo "checking if libtool supports shared libraries... $can_build_shared" 1>&6
joachim99@2 1528
joachim99@2 1529 # Only try to build win32 dlls if AC_LIBTOOL_WIN32_DLL was used in
joachim99@2 1530 # configure.in, otherwise build static only libraries.
joachim99@2 1531 case $host_os in
joachim99@2 1532 cygwin* | mingw* | pw32* | os2*)
joachim99@2 1533 if test x$can_build_shared = xyes; then
joachim99@2 1534 test x$enable_win32_dll = xno && can_build_shared=no
joachim99@2 1535 echo "checking if package supports dlls... $can_build_shared" 1>&6
joachim99@2 1536 fi
joachim99@2 1537 ;;
joachim99@2 1538 esac
joachim99@2 1539
joachim99@2 1540 echo $ac_n "checking whether to build shared libraries... $ac_c" 1>&6
joachim99@2 1541 test "$can_build_shared" = "no" && enable_shared=no
joachim99@2 1542
joachim99@2 1543 # On AIX, shared libraries and static libraries use the same namespace, and
joachim99@2 1544 # are all built from PIC.
joachim99@2 1545 case $host_os in
joachim99@2 1546 aix3*)
joachim99@2 1547 test "$enable_shared" = yes && enable_static=no
joachim99@2 1548 if test -n "$RANLIB"; then
joachim99@2 1549 archive_cmds="$archive_cmds~\$RANLIB \$lib"
joachim99@2 1550 postinstall_cmds='$RANLIB $lib'
joachim99@2 1551 fi
joachim99@2 1552 ;;
joachim99@2 1553
joachim99@2 1554 aix4* | aix5*)
joachim99@2 1555 test "$enable_shared" = yes && enable_static=no
joachim99@2 1556 ;;
joachim99@2 1557 esac
joachim99@2 1558
joachim99@2 1559 echo "$ac_t$enable_shared" 1>&6
joachim99@2 1560
joachim99@2 1561 # Make sure either enable_shared or enable_static is yes.
joachim99@2 1562 test "$enable_shared" = yes || enable_static=yes
joachim99@2 1563
joachim99@2 1564 echo "checking whether to build static libraries... $enable_static" 1>&6
joachim99@2 1565
joachim99@2 1566 if test "$hardcode_action" = relink; then
joachim99@2 1567 # Fast installation is not supported
joachim99@2 1568 enable_fast_install=no
joachim99@2 1569 elif test "$shlibpath_overrides_runpath" = yes ||
joachim99@2 1570 test "$enable_shared" = no; then
joachim99@2 1571 # Fast installation is not necessary
joachim99@2 1572 enable_fast_install=needless
joachim99@2 1573 fi
joachim99@2 1574
joachim99@2 1575 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
joachim99@2 1576 if test "$with_gcc" = yes; then
joachim99@2 1577 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
joachim99@2 1578 fi
joachim99@2 1579
joachim99@2 1580 # Check whether we must set pic_mode to default
joachim99@2 1581 test -z "$pic_flag" && pic_mode=default
joachim99@2 1582
joachim99@2 1583 if test "x$enable_dlopen" != xyes; then
joachim99@2 1584 enable_dlopen=unknown
joachim99@2 1585 enable_dlopen_self=unknown
joachim99@2 1586 enable_dlopen_self_static=unknown
joachim99@2 1587 else
joachim99@2 1588 if test "X${lt_cv_dlopen+set}" != Xset; then
joachim99@2 1589 lt_cv_dlopen=no lt_cv_dlopen_libs=
joachim99@2 1590 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
joachim99@2 1591 echo "$progname:1583: checking for dlopen in -ldl" >&5
joachim99@2 1592 if test "X${ac_cv_lib_dl_dlopen+set}" = Xset; then
joachim99@2 1593 echo $ac_n "(cached) $ac_c" 1>&6
joachim99@2 1594 else
joachim99@2 1595 ac_save_LIBS="$LIBS"
joachim99@2 1596 LIBS="-ldl $LIBS"
joachim99@2 1597 cat > conftest.$ac_ext <<EOF
joachim99@2 1598 /*#line 1590 "ltconfig"*/
joachim99@2 1599 /* Override any gcc2 internal prototype to avoid an error. */
joachim99@2 1600 /* We use char because int might match the return type of a gcc2
joachim99@2 1601 builtin and then its argument prototype would still apply. */
joachim99@2 1602 #ifdef __cplusplus
joachim99@2 1603 extern "C"
joachim99@2 1604 #endif
joachim99@2 1605 char dlopen();
joachim99@2 1606
joachim99@2 1607 int main() {
joachim99@2 1608 dlopen()
joachim99@2 1609 ; return 0; }
joachim99@2 1610 EOF
joachim99@2 1611 if { (eval echo $progname:1603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
joachim99@2 1612 rm -rf conftest*
joachim99@2 1613 ac_cv_lib_dl_dlopen=yes
joachim99@2 1614 else
joachim99@2 1615 echo "$progname: failed program was:" >&5
joachim99@2 1616 cat conftest.$ac_ext >&5
joachim99@2 1617 rm -rf conftest*
joachim99@2 1618 ac_cv_lib_dl_dlopen=no
joachim99@2 1619 fi
joachim99@2 1620 rm -f conftest*
joachim99@2 1621 LIBS="$ac_save_LIBS"
joachim99@2 1622
joachim99@2 1623 fi
joachim99@2 1624 if test "X$ac_cv_lib_dl_dlopen" = Xyes; then
joachim99@2 1625 echo "$ac_t""yes" 1>&6
joachim99@2 1626 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
joachim99@2 1627 else
joachim99@2 1628 echo "$ac_t""no" 1>&6
joachim99@2 1629 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
joachim99@2 1630 echo "$progname:1622: checking for dlopen" >&5
joachim99@2 1631 if test "X${ac_cv_func_dlopen+set}" = Xset; then
joachim99@2 1632 echo $ac_n "(cached) $ac_c" 1>&6
joachim99@2 1633 else
joachim99@2 1634 cat > conftest.$ac_ext <<EOF
joachim99@2 1635 /*#line 1627 "ltconfig"*/
joachim99@2 1636 /* System header to define __stub macros and hopefully few prototypes,
joachim99@2 1637 which can conflict with char dlopen(); below. */
joachim99@2 1638 #include <assert.h>
joachim99@2 1639 /* Override any gcc2 internal prototype to avoid an error. */
joachim99@2 1640 /* We use char because int might match the return type of a gcc2
joachim99@2 1641 builtin and then its argument prototype would still apply. */
joachim99@2 1642 #ifdef __cplusplus
joachim99@2 1643 extern "C"
joachim99@2 1644 #endif
joachim99@2 1645 char dlopen();
joachim99@2 1646
joachim99@2 1647 int main() {
joachim99@2 1648
joachim99@2 1649 /* The GNU C library defines this for functions which it implements
joachim99@2 1650 to always fail with ENOSYS. Some functions are actually named
joachim99@2 1651 something starting with __ and the normal name is an alias. */
joachim99@2 1652 #if defined (__stub_dlopen) || defined (__stub___dlopen)
joachim99@2 1653 choke me
joachim99@2 1654 #else
joachim99@2 1655 dlopen();
joachim99@2 1656 #endif
joachim99@2 1657
joachim99@2 1658 ; return 0; }
joachim99@2 1659 EOF
joachim99@2 1660 if { (eval echo $progname:1652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
joachim99@2 1661 rm -rf conftest*
joachim99@2 1662 ac_cv_func_dlopen=yes
joachim99@2 1663 else
joachim99@2 1664 echo "$progname: failed program was:" >&5
joachim99@2 1665 cat conftest.$ac_ext >&5
joachim99@2 1666 rm -rf conftest*
joachim99@2 1667 ac_cv_func_dlopen=no
joachim99@2 1668 fi
joachim99@2 1669 rm -f conftest*
joachim99@2 1670 fi
joachim99@2 1671 if test "X$ac_cv_func_dlopen" = Xyes; then
joachim99@2 1672 echo "$ac_t""yes" 1>&6
joachim99@2 1673 lt_cv_dlopen="dlopen"
joachim99@2 1674 else
joachim99@2 1675 echo "$ac_t""no" 1>&6
joachim99@2 1676 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
joachim99@2 1677 echo "$progname:1669: checking for dlopen in -lsvld" >&5
joachim99@2 1678 if test "X${ac_cv_lib_svld_dlopen+set}" = Xset; then
joachim99@2 1679 echo $ac_n "(cached) $ac_c" 1>&6
joachim99@2 1680 else
joachim99@2 1681 ac_save_LIBS="$LIBS"
joachim99@2 1682 LIBS="-lsvld $LIBS"
joachim99@2 1683 cat > conftest.$ac_ext <<EOF
joachim99@2 1684 /*#line 1676 "ltconfig"*/
joachim99@2 1685 /* Override any gcc2 internal prototype to avoid an error. */
joachim99@2 1686 /* We use char because int might match the return type of a gcc2
joachim99@2 1687 builtin and then its argument prototype would still apply. */
joachim99@2 1688 #ifdef __cplusplus
joachim99@2 1689 extern "C"
joachim99@2 1690 #endif
joachim99@2 1691 char dlopen();
joachim99@2 1692
joachim99@2 1693 int main() {
joachim99@2 1694 dlopen()
joachim99@2 1695 ; return 0; }
joachim99@2 1696 EOF
joachim99@2 1697 if { (eval echo $progname:1689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
joachim99@2 1698 rm -rf conftest*
joachim99@2 1699 ac_cv_lib_svld_dlopen=yes
joachim99@2 1700 else
joachim99@2 1701 echo "$progname: failed program was:" >&5
joachim99@2 1702 cat conftest.$ac_ext >&5
joachim99@2 1703 rm -rf conftest*
joachim99@2 1704 ac_cv_lib_svld_dlopen=no
joachim99@2 1705 fi
joachim99@2 1706 rm -f conftest*
joachim99@2 1707 LIBS="$ac_save_LIBS"
joachim99@2 1708
joachim99@2 1709 fi
joachim99@2 1710 if test "X$ac_cv_lib_svld_dlopen" = Xyes; then
joachim99@2 1711 echo "$ac_t""yes" 1>&6
joachim99@2 1712 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
joachim99@2 1713 else
joachim99@2 1714 echo "$ac_t""no" 1>&6
joachim99@2 1715 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
joachim99@2 1716 echo "$progname:1708: checking for dld_link in -ldld" >&5
joachim99@2 1717 if test "X${ac_cv_lib_dld_dld_link+set}" = Xset; then
joachim99@2 1718 echo $ac_n "(cached) $ac_c" 1>&6
joachim99@2 1719 else
joachim99@2 1720 ac_save_LIBS="$LIBS"
joachim99@2 1721 LIBS="-ldld $LIBS"
joachim99@2 1722 cat > conftest.$ac_ext <<EOF
joachim99@2 1723 /*#line 1715 "ltconfig"*/
joachim99@2 1724 /* Override any gcc2 internal prototype to avoid an error. */
joachim99@2 1725 /* We use char because int might match the return type of a gcc2
joachim99@2 1726 builtin and then its argument prototype would still apply. */
joachim99@2 1727 #ifdef __cplusplus
joachim99@2 1728 extern "C"
joachim99@2 1729 #endif
joachim99@2 1730 char dld_link();
joachim99@2 1731
joachim99@2 1732 int main() {
joachim99@2 1733 dld_link()
joachim99@2 1734 ; return 0; }
joachim99@2 1735 EOF
joachim99@2 1736 if { (eval echo $progname:1728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
joachim99@2 1737 rm -rf conftest*
joachim99@2 1738 ac_cv_lib_dld_dld_link=yes
joachim99@2 1739 else
joachim99@2 1740 echo "$progname: failed program was:" >&5
joachim99@2 1741 cat conftest.$ac_ext >&5
joachim99@2 1742 rm -rf conftest*
joachim99@2 1743 ac_cv_lib_dld_dld_link=no
joachim99@2 1744 fi
joachim99@2 1745 rm -f conftest*
joachim99@2 1746 LIBS="$ac_save_LIBS"
joachim99@2 1747
joachim99@2 1748 fi
joachim99@2 1749 if test "X$ac_cv_lib_dld_dld_link" = Xyes; then
joachim99@2 1750 echo "$ac_t""yes" 1>&6
joachim99@2 1751 lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
joachim99@2 1752 else
joachim99@2 1753 echo "$ac_t""no" 1>&6
joachim99@2 1754 echo $ac_n "checking for shl_load""... $ac_c" 1>&6
joachim99@2 1755 echo "$progname:1747: checking for shl_load" >&5
joachim99@2 1756 if test "X${ac_cv_func_shl_load+set}" = Xset; then
joachim99@2 1757 echo $ac_n "(cached) $ac_c" 1>&6
joachim99@2 1758 else
joachim99@2 1759 cat > conftest.$ac_ext <<EOF
joachim99@2 1760 /*#line 1752 "ltconfig"*/
joachim99@2 1761 /* System header to define __stub macros and hopefully few prototypes,
joachim99@2 1762 which can conflict with char shl_load(); below. */
joachim99@2 1763 #include <assert.h>
joachim99@2 1764 /* Override any gcc2 internal prototype to avoid an error. */
joachim99@2 1765 /* We use char because int might match the return type of a gcc2
joachim99@2 1766 builtin and then its argument prototype would still apply. */
joachim99@2 1767 #ifdef __cplusplus
joachim99@2 1768 extern "C"
joachim99@2 1769 #endif
joachim99@2 1770 char shl_load();
joachim99@2 1771
joachim99@2 1772 int main() {
joachim99@2 1773
joachim99@2 1774 /* The GNU C library defines this for functions which it implements
joachim99@2 1775 to always fail with ENOSYS. Some functions are actually named
joachim99@2 1776 something starting with __ and the normal name is an alias. */
joachim99@2 1777 #if defined (__stub_shl_load) || defined (__stub___shl_load)
joachim99@2 1778 choke me
joachim99@2 1779 #else
joachim99@2 1780 shl_load();
joachim99@2 1781 #endif
joachim99@2 1782
joachim99@2 1783 ; return 0; }
joachim99@2 1784 EOF
joachim99@2 1785 if { (eval echo $progname:1777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
joachim99@2 1786 rm -rf conftest*
joachim99@2 1787 ac_cv_func_shl_load=yes
joachim99@2 1788 else
joachim99@2 1789 echo "$progname: failed program was:" >&5
joachim99@2 1790 cat conftest.$ac_ext >&5
joachim99@2 1791 rm -rf conftest*
joachim99@2 1792 ac_cv_func_shl_load=no
joachim99@2 1793 fi
joachim99@2 1794 rm -f conftest*
joachim99@2 1795 fi
joachim99@2 1796
joachim99@2 1797 if test "X$ac_cv_func_shl_load" = Xyes; then
joachim99@2 1798 echo "$ac_t""yes" 1>&6
joachim99@2 1799 lt_cv_dlopen="shl_load"
joachim99@2 1800 else
joachim99@2 1801 echo "$ac_t""no" 1>&6
joachim99@2 1802 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
joachim99@2 1803 echo "$progname:1795: checking for shl_load in -ldld" >&5
joachim99@2 1804 if test "X${ac_cv_lib_dld_shl_load+set}" = Xset; then
joachim99@2 1805 echo $ac_n "(cached) $ac_c" 1>&6
joachim99@2 1806 else
joachim99@2 1807 ac_save_LIBS="$LIBS"
joachim99@2 1808 LIBS="-ldld $LIBS"
joachim99@2 1809 cat > conftest.$ac_ext <<EOF
joachim99@2 1810 /*#line 1802 "ltconfig"*/
joachim99@2 1811 #include "confdefs.h"
joachim99@2 1812 /* Override any gcc2 internal prototype to avoid an error. */
joachim99@2 1813 /* We use char because int might match the return type of a gcc2
joachim99@2 1814 builtin and then its argument prototype would still apply. */
joachim99@2 1815 #ifdef __cplusplus
joachim99@2 1816 extern "C"
joachim99@2 1817 #endif
joachim99@2 1818 char shl_load();
joachim99@2 1819
joachim99@2 1820 int main() {
joachim99@2 1821 shl_load()
joachim99@2 1822 ; return 0; }
joachim99@2 1823 EOF
joachim99@2 1824 if { (eval echo $progname:1816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
joachim99@2 1825 rm -rf conftest*
joachim99@2 1826 ac_cv_lib_dld_shl_load=yes
joachim99@2 1827 else
joachim99@2 1828 echo "$progname: failed program was:" >&5
joachim99@2 1829 cat conftest.$ac_ext >&5
joachim99@2 1830 rm -rf conftest*
joachim99@2 1831 ac_cv_lib_dld_shl_load=no
joachim99@2 1832 fi
joachim99@2 1833 rm -f conftest*
joachim99@2 1834 LIBS="$ac_save_LIBS"
joachim99@2 1835
joachim99@2 1836 fi
joachim99@2 1837 if test "X$ac_cv_lib_dld_shl_load" = Xyes; then
joachim99@2 1838 echo "$ac_t""yes" 1>&6
joachim99@2 1839 lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
joachim99@2 1840 else
joachim99@2 1841 echo "$ac_t""no" 1>&6
joachim99@2 1842 fi
joachim99@2 1843
joachim99@2 1844
joachim99@2 1845 fi
joachim99@2 1846
joachim99@2 1847
joachim99@2 1848 fi
joachim99@2 1849
joachim99@2 1850
joachim99@2 1851 fi
joachim99@2 1852
joachim99@2 1853
joachim99@2 1854 fi
joachim99@2 1855
joachim99@2 1856 fi
joachim99@2 1857
joachim99@2 1858 fi
joachim99@2 1859
joachim99@2 1860 if test "x$lt_cv_dlopen" != xno; then
joachim99@2 1861 enable_dlopen=yes
joachim99@2 1862 else
joachim99@2 1863 enable_dlopen=no
joachim99@2 1864 fi
joachim99@2 1865
joachim99@2 1866 case $lt_cv_dlopen in
joachim99@2 1867 dlopen)
joachim99@2 1868 for ac_hdr in dlfcn.h; do
joachim99@2 1869 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
joachim99@2 1870 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
joachim99@2 1871 echo "$progname:1863: checking for $ac_hdr" >&5
joachim99@2 1872 if eval "test \"`echo 'X$''{'ac_cv_header_$ac_safe'+set}'`\" = Xset"; then
joachim99@2 1873 echo $ac_n "(cached) $ac_c" 1>&6
joachim99@2 1874 else
joachim99@2 1875 cat > conftest.$ac_ext <<EOF
joachim99@2 1876 /*#line 1868 "ltconfig"*/
joachim99@2 1877 #include <$ac_hdr>
joachim99@2 1878 int fnord = 0;
joachim99@2 1879 int main () { return(0); }
joachim99@2 1880 EOF
joachim99@2 1881 ac_try="$ac_compile >/dev/null 2>conftest.out"
joachim99@2 1882 { (eval echo $progname:1874: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
joachim99@2 1883 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
joachim99@2 1884 if test -z "$ac_err"; then
joachim99@2 1885 rm -rf conftest*
joachim99@2 1886 eval "ac_cv_header_$ac_safe=yes"
joachim99@2 1887 else
joachim99@2 1888 echo "$ac_err" >&5
joachim99@2 1889 echo "$progname: failed program was:" >&5
joachim99@2 1890 cat conftest.$ac_ext >&5
joachim99@2 1891 rm -rf conftest*
joachim99@2 1892 eval "ac_cv_header_$ac_safe=no"
joachim99@2 1893 fi
joachim99@2 1894 rm -f conftest*
joachim99@2 1895 fi
joachim99@2 1896 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
joachim99@2 1897 echo "$ac_t""yes" 1>&6
joachim99@2 1898 else
joachim99@2 1899 echo "$ac_t""no" 1>&6
joachim99@2 1900 fi
joachim99@2 1901 done
joachim99@2 1902
joachim99@2 1903 if test "x$ac_cv_header_dlfcn_h" = xyes; then
joachim99@2 1904 CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
joachim99@2 1905 fi
joachim99@2 1906 eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
joachim99@2 1907 LIBS="$lt_cv_dlopen_libs $LIBS"
joachim99@2 1908
joachim99@2 1909 echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
joachim99@2 1910 echo "$progname:1902: checking whether a program can dlopen itself" >&5
joachim99@2 1911 if test "X${lt_cv_dlopen_self+set}" = Xset; then
joachim99@2 1912 echo $ac_n "(cached) $ac_c" 1>&6
joachim99@2 1913 else
joachim99@2 1914 if test "$cross_compiling" = yes; then
joachim99@2 1915 lt_cv_dlopen_self=cross
joachim99@2 1916 else
joachim99@2 1917 cat > conftest.$ac_ext <<EOF
joachim99@2 1918 /*#line 1910 "ltconfig"*/
joachim99@2 1919
joachim99@2 1920 #if HAVE_DLFCN_H
joachim99@2 1921 #include <dlfcn.h>
joachim99@2 1922 #endif
joachim99@2 1923
joachim99@2 1924 #include <stdio.h>
joachim99@2 1925
joachim99@2 1926 #ifdef RTLD_GLOBAL
joachim99@2 1927 # define LTDL_GLOBAL RTLD_GLOBAL
joachim99@2 1928 #else
joachim99@2 1929 # ifdef DL_GLOBAL
joachim99@2 1930 # define LTDL_GLOBAL DL_GLOBAL
joachim99@2 1931 # else
joachim99@2 1932 # define LTDL_GLOBAL 0
joachim99@2 1933 # endif
joachim99@2 1934 #endif
joachim99@2 1935
joachim99@2 1936 /* We may have to define LTDL_LAZY_OR_NOW in the command line if we
joachim99@2 1937 find out it does not work in some platform. */
joachim99@2 1938 #ifndef LTDL_LAZY_OR_NOW
joachim99@2 1939 # ifdef RTLD_LAZY
joachim99@2 1940 # define LTDL_LAZY_OR_NOW RTLD_LAZY
joachim99@2 1941 # else
joachim99@2 1942 # ifdef DL_LAZY
joachim99@2 1943 # define LTDL_LAZY_OR_NOW DL_LAZY
joachim99@2 1944 # else
joachim99@2 1945 # ifdef RTLD_NOW
joachim99@2 1946 # define LTDL_LAZY_OR_NOW RTLD_NOW
joachim99@2 1947 # else
joachim99@2 1948 # ifdef DL_NOW
joachim99@2 1949 # define LTDL_LAZY_OR_NOW DL_NOW
joachim99@2 1950 # else
joachim99@2 1951 # define LTDL_LAZY_OR_NOW 0
joachim99@2 1952 # endif
joachim99@2 1953 # endif
joachim99@2 1954 # endif
joachim99@2 1955 # endif
joachim99@2 1956 #endif
joachim99@2 1957
joachim99@2 1958 void fnord() { int i=42; }
joachim99@2 1959 int main() {
joachim99@2 1960 void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
joachim99@2 1961 if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
joachim99@2 1962 if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); return 1;}
joachim99@2 1963
joachim99@2 1964 EOF
joachim99@2 1965 if { (eval echo $progname:1957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
joachim99@2 1966 then
joachim99@2 1967 lt_cv_dlopen_self=yes
joachim99@2 1968 else
joachim99@2 1969 echo "$progname: failed program was:" >&5
joachim99@2 1970 cat conftest.$ac_ext >&5
joachim99@2 1971 rm -fr conftest*
joachim99@2 1972 lt_cv_dlopen_self=no
joachim99@2 1973 fi
joachim99@2 1974 rm -fr conftest*
joachim99@2 1975 fi
joachim99@2 1976
joachim99@2 1977 fi
joachim99@2 1978
joachim99@2 1979 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
joachim99@2 1980
joachim99@2 1981 if test "$lt_cv_dlopen_self" = yes; then
joachim99@2 1982 LDFLAGS="$LDFLAGS $link_static_flag"
joachim99@2 1983 echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
joachim99@2 1984 echo "$progname:1976: checking whether a statically linked program can dlopen itself" >&5
joachim99@2 1985 if test "X${lt_cv_dlopen_self_static+set}" = Xset; then
joachim99@2 1986 echo $ac_n "(cached) $ac_c" 1>&6
joachim99@2 1987 else
joachim99@2 1988 if test "$cross_compiling" = yes; then
joachim99@2 1989 lt_cv_dlopen_self_static=cross
joachim99@2 1990 else
joachim99@2 1991 cat > conftest.$ac_ext <<EOF
joachim99@2 1992 /*#line 1984 "ltconfig"*/
joachim99@2 1993
joachim99@2 1994 #if HAVE_DLFCN_H
joachim99@2 1995 #include <dlfcn.h>
joachim99@2 1996 #endif
joachim99@2 1997
joachim99@2 1998 #include <stdio.h>
joachim99@2 1999
joachim99@2 2000 #ifdef RTLD_GLOBAL
joachim99@2 2001 # define LTDL_GLOBAL RTLD_GLOBAL
joachim99@2 2002 #else
joachim99@2 2003 # ifdef DL_GLOBAL
joachim99@2 2004 # define LTDL_GLOBAL DL_GLOBAL
joachim99@2 2005 # else
joachim99@2 2006 # define LTDL_GLOBAL 0
joachim99@2 2007 # endif
joachim99@2 2008 #endif
joachim99@2 2009
joachim99@2 2010 /* We may have to define LTDL_LAZY_OR_NOW in the command line if we
joachim99@2 2011 find out it does not work in some platform. */
joachim99@2 2012 #ifndef LTDL_LAZY_OR_NOW
joachim99@2 2013 # ifdef RTLD_LAZY
joachim99@2 2014 # define LTDL_LAZY_OR_NOW RTLD_LAZY
joachim99@2 2015 # else
joachim99@2 2016 # ifdef DL_LAZY
joachim99@2 2017 # define LTDL_LAZY_OR_NOW DL_LAZY
joachim99@2 2018 # else
joachim99@2 2019 # ifdef RTLD_NOW
joachim99@2 2020 # define LTDL_LAZY_OR_NOW RTLD_NOW
joachim99@2 2021 # else
joachim99@2 2022 # ifdef DL_NOW
joachim99@2 2023 # define LTDL_LAZY_OR_NOW DL_NOW
joachim99@2 2024 # else
joachim99@2 2025 # define LTDL_LAZY_OR_NOW 0
joachim99@2 2026 # endif
joachim99@2 2027 # endif
joachim99@2 2028 # endif
joachim99@2 2029 # endif
joachim99@2 2030 #endif
joachim99@2 2031
joachim99@2 2032 void fnord() { int i=42; }
joachim99@2 2033 int main() {
joachim99@2 2034 void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
joachim99@2 2035 if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
joachim99@2 2036 if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); return 1; }
joachim99@2 2037
joachim99@2 2038 EOF
joachim99@2 2039 if { (eval echo $progname:2031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
joachim99@2 2040 then
joachim99@2 2041 lt_cv_dlopen_self_static=yes
joachim99@2 2042 else
joachim99@2 2043 echo "$progname: failed program was:" >&5
joachim99@2 2044 cat conftest.$ac_ext >&5
joachim99@2 2045 rm -fr conftest*
joachim99@2 2046 lt_cv_dlopen_self_static=no
joachim99@2 2047 fi
joachim99@2 2048 rm -fr conftest*
joachim99@2 2049 fi
joachim99@2 2050
joachim99@2 2051 fi
joachim99@2 2052
joachim99@2 2053 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
joachim99@2 2054 fi
joachim99@2 2055 ;;
joachim99@2 2056 esac
joachim99@2 2057
joachim99@2 2058 case $lt_cv_dlopen_self in
joachim99@2 2059 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
joachim99@2 2060 *) enable_dlopen_self=unknown ;;
joachim99@2 2061 esac
joachim99@2 2062
joachim99@2 2063 case $lt_cv_dlopen_self_static in
joachim99@2 2064 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
joachim99@2 2065 *) enable_dlopen_self_static=unknown ;;
joachim99@2 2066 esac
joachim99@2 2067 fi
joachim99@2 2068
joachim99@2 2069 # Copy echo and quote the copy, instead of the original, because it is
joachim99@2 2070 # used later.
joachim99@2 2071 ltecho="$echo"
joachim99@2 2072 if test "X$ltecho" = "X$CONFIG_SHELL $0 --fallback-echo"; then
joachim99@2 2073 ltecho="$CONFIG_SHELL \$0 --fallback-echo"
joachim99@2 2074 fi
joachim99@2 2075 LTSHELL="$SHELL"
joachim99@2 2076
joachim99@2 2077 LTCONFIG_VERSION="$VERSION"
joachim99@2 2078
joachim99@2 2079 # Only quote variables if we're using ltmain.sh.
joachim99@2 2080 case $ltmain in
joachim99@2 2081 *.sh)
joachim99@2 2082 # Now quote all the things that may contain metacharacters.
joachim99@2 2083 for var in ltecho old_AR old_AR_FLAGS old_CC old_LTCC old_CFLAGS old_CPPFLAGS \
joachim99@2 2084 old_MAGIC_CMD old_LD old_LDFLAGS old_LIBS \
joachim99@2 2085 old_LN_S old_NM old_RANLIB old_STRIP \
joachim99@2 2086 old_AS old_DLLTOOL old_OBJDUMP \
joachim99@2 2087 old_OBJEXT old_EXEEXT old_reload_flag \
joachim99@2 2088 old_deplibs_check_method old_file_magic_cmd \
joachim99@2 2089 AR AR_FLAGS CC LTCC LD LN_S NM LTSHELL LTCONFIG_VERSION \
joachim99@2 2090 reload_flag reload_cmds wl \
joachim99@2 2091 pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
joachim99@2 2092 thread_safe_flag_spec whole_archive_flag_spec libname_spec \
joachim99@2 2093 library_names_spec soname_spec \
joachim99@2 2094 RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
joachim99@2 2095 old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
joachim99@2 2096 postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
joachim99@2 2097 predep_objects postdep_objects predeps postdeps compiler_lib_search_path \
joachim99@2 2098 old_striplib striplib file_magic_cmd export_symbols_cmds \
joachim99@2 2099 deplibs_check_method allow_undefined_flag no_undefined_flag \
joachim99@2 2100 finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
joachim99@2 2101 hardcode_libdir_flag_spec hardcode_libdir_separator \
joachim99@2 2102 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
joachim99@2 2103 compiler_c_o need_locks exclude_expsyms include_expsyms; do
joachim99@2 2104
joachim99@2 2105 case $var in
joachim99@2 2106 reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
joachim99@2 2107 old_postinstall_cmds | old_postuninstall_cmds | \
joachim99@2 2108 export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
joachim99@2 2109 extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
joachim99@2 2110 postinstall_cmds | postuninstall_cmds | \
joachim99@2 2111 finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
joachim99@2 2112 # Double-quote double-evaled strings.
joachim99@2 2113 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 2114 ;;
joachim99@2 2115 *)
joachim99@2 2116 eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ### testsuite: skip nested quoting test
joachim99@2 2117 ;;
joachim99@2 2118 esac
joachim99@2 2119 done
joachim99@2 2120
joachim99@2 2121 case $ltecho in
joachim99@2 2122 *'\$0 --fallback-echo"')
joachim99@2 2123 ltecho=`$echo "X$ltecho" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
joachim99@2 2124 ;;
joachim99@2 2125 esac
joachim99@2 2126
joachim99@2 2127 if test -z "$tagname"; then
joachim99@2 2128 trap "$rm \"$ofile\"; exit 1" 1 2 15
joachim99@2 2129 echo "creating $ofile"
joachim99@2 2130 $rm "$ofile"
joachim99@2 2131 cat <<EOF > "$ofile"
joachim99@2 2132 #! $SHELL
joachim99@2 2133
joachim99@2 2134 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
joachim99@2 2135 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
joachim99@2 2136 # NOTE: Changes made to this file will be lost: look at ltconfig or ltmain.sh.
joachim99@2 2137 #
joachim99@2 2138 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
joachim99@2 2139 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
joachim99@2 2140 #
joachim99@2 2141 # This program is free software; you can redistribute it and/or modify
joachim99@2 2142 # it under the terms of the GNU General Public License as published by
joachim99@2 2143 # the Free Software Foundation; either version 2 of the License, or
joachim99@2 2144 # (at your option) any later version.
joachim99@2 2145 #
joachim99@2 2146 # This program is distributed in the hope that it will be useful, but
joachim99@2 2147 # WITHOUT ANY WARRANTY; without even the implied warranty of
joachim99@2 2148 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
joachim99@2 2149 # General Public License for more details.
joachim99@2 2150 #
joachim99@2 2151 # You should have received a copy of the GNU General Public License
joachim99@2 2152 # along with this program; if not, write to the Free Software
joachim99@2 2153 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
joachim99@2 2154 #
joachim99@2 2155 # As a special exception to the GNU General Public License, if you
joachim99@2 2156 # distribute this file as part of a program that contains a
joachim99@2 2157 # configuration script generated by Autoconf, you may include it under
joachim99@2 2158 # the same distribution terms that you use for the rest of that program.
joachim99@2 2159
joachim99@2 2160 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
joachim99@2 2161 Xsed="sed -e s/^X//"
joachim99@2 2162
joachim99@2 2163 # The HP-UX ksh and POSIX shell print the target directory to stdout
joachim99@2 2164 # if CDPATH is set.
joachim99@2 2165 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
joachim99@2 2166
joachim99@2 2167 # The names of the tagged configurations supported by this script.
joachim99@2 2168 available_tags=
joachim99@2 2169
joachim99@2 2170 ### BEGIN LIBTOOL CONFIG
joachim99@2 2171 EOF
joachim99@2 2172 else
joachim99@2 2173 echo "appending configuration tag \"$tagname\" to $ofile"
joachim99@2 2174 echo "### BEGIN LIBTOOL TAG CONFIG: $tagname" >> "$ofile"
joachim99@2 2175 fi
joachim99@2 2176 cfgfile="$ofile"
joachim99@2 2177 ;;
joachim99@2 2178
joachim99@2 2179 *)
joachim99@2 2180 # Double-quote the variables that need it (for aesthetics).
joachim99@2 2181 for var in old_AR old_AR_FLAGS old_CC old_LTCC old_CFLAGS old_CPPFLAGS \
joachim99@2 2182 old_MAGIC_CMD old_LD old_LDFLAGS old_LIBS \
joachim99@2 2183 old_LN_S old_NM old_RANLIB old_STRIP \
joachim99@2 2184 old_AS old_DLLTOOL old_OBJDUMP \
joachim99@2 2185 old_OBJEXT old_EXEEXT old_reload_flag \
joachim99@2 2186 old_deplibs_check_method old_file_magic_cmd; do
joachim99@2 2187 eval "$var=\\\"\$var\\\""
joachim99@2 2188 done
joachim99@2 2189
joachim99@2 2190 # Just create a config file.
joachim99@2 2191 cfgfile="$ofile.cfg"
joachim99@2 2192 if test -z "$tagname"; then
joachim99@2 2193 trap "$rm \"$cfgfile\"; exit 1" 1 2 15
joachim99@2 2194 echo "creating $cfgfile"
joachim99@2 2195 $rm "$cfgfile"
joachim99@2 2196 cat <<EOF > "$cfgfile"
joachim99@2 2197 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Libtool configuration file.
joachim99@2 2198 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
joachim99@2 2199
joachim99@2 2200 ### BEGIN LIBTOOL CONFIG
joachim99@2 2201 EOF
joachim99@2 2202 else
joachim99@2 2203 echo "appending to $cfgfile"
joachim99@2 2204 echo "### BEGIN LIBTOOL TAG CONFIG: $tagname" >> "$ofile"
joachim99@2 2205 fi
joachim99@2 2206 ;;
joachim99@2 2207 esac
joachim99@2 2208
joachim99@2 2209 cat <<EOF >> "$cfgfile"
joachim99@2 2210 # Libtool was configured as follows, on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
joachim99@2 2211 #
joachim99@2 2212 # AR=$old_AR AR_FLAGS=$old_AR_FLAGS LTCC=$old_LTCC CC=$old_CC \\
joachim99@2 2213 # CFLAGS=$old_CFLAGS CPPFLAGS=$old_CPPFLAGS \\
joachim99@2 2214 # MAGIC_CMD=$old_MAGIC_CMD LD=$old_LD LDFLAGS=$old_LDFLAGS LIBS=$old_LIBS \\
joachim99@2 2215 # LN_S=$old_LN_S NM=$old_NM RANLIB=$old_RANLIB STRIP=$old_STRIP \\
joachim99@2 2216 # AS=$old_AS DLLTOOL=$old_DLLTOOL OBJDUMP=$old_OBJDUMP \\
joachim99@2 2217 # objext=$old_OBJEXT exeext=$old_EXEEXT reload_flag=$old_reload_flag \\
joachim99@2 2218 # deplibs_check_method=$old_deplibs_check_method \\
joachim99@2 2219 # file_magic_cmd=$old_file_magic_cmd \\
joachim99@2 2220 # $0$ltconfig_args
joachim99@2 2221 #
joachim99@2 2222 # Compiler and other test output produced by $progname, useful for
joachim99@2 2223 # debugging $progname, is in ./config.log if it exists.
joachim99@2 2224
joachim99@2 2225 # The version of $progname that generated this script.
joachim99@2 2226 LTCONFIG_VERSION=$LTCONFIG_VERSION
joachim99@2 2227
joachim99@2 2228 # Shell to use when invoking shell scripts.
joachim99@2 2229 SHELL=$LTSHELL
joachim99@2 2230
joachim99@2 2231 # Whether or not to build shared libraries.
joachim99@2 2232 build_libtool_libs=$enable_shared
joachim99@2 2233
joachim99@2 2234 # Whether or not to add -lc for building shared libraries.
joachim99@2 2235 build_libtool_need_lc=$need_lc
joachim99@2 2236
joachim99@2 2237 # Whether or not to build static libraries.
joachim99@2 2238 build_old_libs=$enable_static
joachim99@2 2239
joachim99@2 2240 # Whether or not to optimize for fast installation.
joachim99@2 2241 fast_install=$enable_fast_install
joachim99@2 2242
joachim99@2 2243 # The host system.
joachim99@2 2244 host_alias=$host_alias
joachim99@2 2245 host=$host
joachim99@2 2246
joachim99@2 2247 # An echo program that does not interpret backslashes.
joachim99@2 2248 echo=$ltecho
joachim99@2 2249
joachim99@2 2250 # The archiver.
joachim99@2 2251 AR=$AR
joachim99@2 2252 AR_FLAGS=$AR_FLAGS
joachim99@2 2253
joachim99@2 2254 # A C compiler.
joachim99@2 2255 LTCC=$LTCC
joachim99@2 2256
joachim99@2 2257 # A language-specific compiler.
joachim99@2 2258 CC=$CC
joachim99@2 2259
joachim99@2 2260 # Is the compiler the GNU C compiler?
joachim99@2 2261 with_gcc=$with_gcc
joachim99@2 2262
joachim99@2 2263 # The linker used to build libraries.
joachim99@2 2264 LD=$LD
joachim99@2 2265
joachim99@2 2266 # Whether we need hard or soft links.
joachim99@2 2267 LN_S=$LN_S
joachim99@2 2268
joachim99@2 2269 # A BSD-compatible nm program.
joachim99@2 2270 NM=$NM
joachim99@2 2271
joachim99@2 2272 # A symbol stripping program
joachim99@2 2273 STRIP=$STRIP
joachim99@2 2274
joachim99@2 2275 # Used to examine libraries when file_magic_cmd begins "file"
joachim99@2 2276 MAGIC_CMD=$MAGIC_CMD
joachim99@2 2277
joachim99@2 2278 # Used on cygwin: DLL creation program.
joachim99@2 2279 DLLTOOL="$DLLTOOL"
joachim99@2 2280
joachim99@2 2281 # Used on cygwin: object dumper.
joachim99@2 2282 OBJDUMP="$OBJDUMP"
joachim99@2 2283
joachim99@2 2284 # Used on cygwin: assembler.
joachim99@2 2285 AS="$AS"
joachim99@2 2286
joachim99@2 2287 # The name of the directory that contains temporary libtool files.
joachim99@2 2288 objdir=$objdir
joachim99@2 2289
joachim99@2 2290 # How to create reloadable object files.
joachim99@2 2291 reload_flag=$reload_flag
joachim99@2 2292 reload_cmds=$reload_cmds
joachim99@2 2293
joachim99@2 2294 # How to pass a linker flag through the compiler.
joachim99@2 2295 wl=$wl
joachim99@2 2296
joachim99@2 2297 # Object file suffix (normally "o").
joachim99@2 2298 objext="$objext"
joachim99@2 2299
joachim99@2 2300 # Old archive suffix (normally "a").
joachim99@2 2301 libext="$libext"
joachim99@2 2302
joachim99@2 2303 # Executable file suffix (normally "").
joachim99@2 2304 exeext="$exeext"
joachim99@2 2305
joachim99@2 2306 # Additional compiler flags for building library objects.
joachim99@2 2307 pic_flag=$pic_flag
joachim99@2 2308 pic_mode=$pic_mode
joachim99@2 2309
joachim99@2 2310 # What is the maximum length of a command?
joachim99@2 2311 max_cmd_len=$max_cmd_len
joachim99@2 2312
joachim99@2 2313 # Does compiler simultaneously support -c and -o options?
joachim99@2 2314 compiler_c_o=$compiler_c_o
joachim99@2 2315
joachim99@2 2316 # Must we lock files when doing compilation ?
joachim99@2 2317 need_locks=$need_locks
joachim99@2 2318
joachim99@2 2319 # Do we need the lib prefix for modules?
joachim99@2 2320 need_lib_prefix=$need_lib_prefix
joachim99@2 2321
joachim99@2 2322 # Do we need a version for libraries?
joachim99@2 2323 need_version=$need_version
joachim99@2 2324
joachim99@2 2325 # Whether dlopen is supported.
joachim99@2 2326 dlopen_support=$enable_dlopen
joachim99@2 2327
joachim99@2 2328 # Whether dlopen of programs is supported.
joachim99@2 2329 dlopen_self=$enable_dlopen_self
joachim99@2 2330
joachim99@2 2331 # Whether dlopen of statically linked programs is supported.
joachim99@2 2332 dlopen_self_static=$enable_dlopen_self_static
joachim99@2 2333
joachim99@2 2334 # Compiler flag to prevent dynamic linking.
joachim99@2 2335 link_static_flag=$link_static_flag
joachim99@2 2336
joachim99@2 2337 # Compiler flag to turn off builtin functions.
joachim99@2 2338 no_builtin_flag=$no_builtin_flag
joachim99@2 2339
joachim99@2 2340 # Compiler flag to allow reflexive dlopens.
joachim99@2 2341 export_dynamic_flag_spec=$export_dynamic_flag_spec
joachim99@2 2342
joachim99@2 2343 # Compiler flag to generate shared objects directly from archives.
joachim99@2 2344 whole_archive_flag_spec=$whole_archive_flag_spec
joachim99@2 2345
joachim99@2 2346 # Compiler flag to generate thread-safe objects.
joachim99@2 2347 thread_safe_flag_spec=$thread_safe_flag_spec
joachim99@2 2348
joachim99@2 2349 # Library versioning type.
joachim99@2 2350 version_type=$version_type
joachim99@2 2351
joachim99@2 2352 # Format of library name prefix.
joachim99@2 2353 libname_spec=$libname_spec
joachim99@2 2354
joachim99@2 2355 # List of archive names. First name is the real one, the rest are links.
joachim99@2 2356 # The last name is the one that the linker finds with -lNAME.
joachim99@2 2357 library_names_spec=$library_names_spec
joachim99@2 2358
joachim99@2 2359 # The coded name of the library, if different from the real name.
joachim99@2 2360 soname_spec=$soname_spec
joachim99@2 2361
joachim99@2 2362 # Commands used to build and install an old-style archive.
joachim99@2 2363 RANLIB=$RANLIB
joachim99@2 2364 old_archive_cmds=$old_archive_cmds
joachim99@2 2365 old_postinstall_cmds=$old_postinstall_cmds
joachim99@2 2366 old_postuninstall_cmds=$old_postuninstall_cmds
joachim99@2 2367
joachim99@2 2368 # Create an old-style archive from a shared archive.
joachim99@2 2369 old_archive_from_new_cmds=$old_archive_from_new_cmds
joachim99@2 2370
joachim99@2 2371 # Create a temporary old-style archive to link instead of a shared archive.
joachim99@2 2372 old_archive_from_expsyms_cmds=$old_archive_from_expsyms_cmds
joachim99@2 2373
joachim99@2 2374 # Commands used to build and install a shared archive.
joachim99@2 2375 archive_cmds=$archive_cmds
joachim99@2 2376 archive_expsym_cmds=$archive_expsym_cmds
joachim99@2 2377 postinstall_cmds=$postinstall_cmds
joachim99@2 2378 postuninstall_cmds=$postuninstall_cmds
joachim99@2 2379
joachim99@2 2380 # Commands to strip libraries.
joachim99@2 2381 old_striplib=$old_striplib
joachim99@2 2382 striplib=$striplib
joachim99@2 2383
joachim99@2 2384 # Dependencies to place before the objects being linked to create a
joachim99@2 2385 # shared library.
joachim99@2 2386 predep_objects=$predep_objects
joachim99@2 2387
joachim99@2 2388 # Dependencies to place after the objects being linked to create a
joachim99@2 2389 # shared library.
joachim99@2 2390 postdep_objects=$postdep_objects
joachim99@2 2391
joachim99@2 2392 # Dependencies to place before the objects being linked to create a
joachim99@2 2393 # shared library.
joachim99@2 2394 predeps=$predeps
joachim99@2 2395
joachim99@2 2396 # Dependencies to place after the objects being linked to create a
joachim99@2 2397 # shared library.
joachim99@2 2398 postdeps=$postdeps
joachim99@2 2399
joachim99@2 2400 # The library search path used internally by the compiler when linking
joachim99@2 2401 # a shared library.
joachim99@2 2402 compiler_lib_search_path=$compiler_lib_search_path
joachim99@2 2403
joachim99@2 2404 # Method to check whether dependent libraries are shared objects.
joachim99@2 2405 deplibs_check_method=$deplibs_check_method
joachim99@2 2406
joachim99@2 2407 # Command to use when deplibs_check_method == file_magic.
joachim99@2 2408 file_magic_cmd=$file_magic_cmd
joachim99@2 2409
joachim99@2 2410 # Flag that allows shared libraries with undefined symbols to be built.
joachim99@2 2411 allow_undefined_flag=$allow_undefined_flag
joachim99@2 2412
joachim99@2 2413 # Flag that forces no undefined symbols.
joachim99@2 2414 no_undefined_flag=$no_undefined_flag
joachim99@2 2415
joachim99@2 2416 # Commands used to finish a libtool library installation in a directory.
joachim99@2 2417 finish_cmds=$finish_cmds
joachim99@2 2418
joachim99@2 2419 # Same as above, but a single script fragment to be evaled but not shown.
joachim99@2 2420 finish_eval=$finish_eval
joachim99@2 2421
joachim99@2 2422 # Take the output of nm and produce a listing of raw symbols and C names.
joachim99@2 2423 global_symbol_pipe=$global_symbol_pipe
joachim99@2 2424
joachim99@2 2425 # Transform the output of nm in a proper C declaration
joachim99@2 2426 global_symbol_to_cdecl=$global_symbol_to_cdecl
joachim99@2 2427
joachim99@2 2428 # This is the shared library runtime path variable.
joachim99@2 2429 runpath_var=$runpath_var
joachim99@2 2430
joachim99@2 2431 # This is the shared library path variable.
joachim99@2 2432 shlibpath_var=$shlibpath_var
joachim99@2 2433
joachim99@2 2434 # Is shlibpath searched before the hard-coded library search path?
joachim99@2 2435 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
joachim99@2 2436
joachim99@2 2437 # How to hardcode a shared library path into an executable.
joachim99@2 2438 hardcode_action=$hardcode_action
joachim99@2 2439
joachim99@2 2440 # Whether we should hardcode library paths into libraries.
joachim99@2 2441 hardcode_into_libs=$hardcode_into_libs
joachim99@2 2442
joachim99@2 2443 # Flag to hardcode \$libdir into a binary during linking.
joachim99@2 2444 # This must work even if \$libdir does not exist.
joachim99@2 2445 hardcode_libdir_flag_spec=$hardcode_libdir_flag_spec
joachim99@2 2446
joachim99@2 2447 # Whether we need a single -rpath flag with a separated argument.
joachim99@2 2448 hardcode_libdir_separator=$hardcode_libdir_separator
joachim99@2 2449
joachim99@2 2450 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
joachim99@2 2451 # resulting binary.
joachim99@2 2452 hardcode_direct=$hardcode_direct
joachim99@2 2453
joachim99@2 2454 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
joachim99@2 2455 # resulting binary.
joachim99@2 2456 hardcode_minus_L=$hardcode_minus_L
joachim99@2 2457
joachim99@2 2458 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
joachim99@2 2459 # the resulting binary.
joachim99@2 2460 hardcode_shlibpath_var=$hardcode_shlibpath_var
joachim99@2 2461
joachim99@2 2462 # Variables whose values should be saved in libtool wrapper scripts and
joachim99@2 2463 # restored at relink time.
joachim99@2 2464 variables_saved_for_relink="$variables_saved_for_relink"
joachim99@2 2465
joachim99@2 2466 # Whether libtool must link a program against all its dependency libraries.
joachim99@2 2467 link_all_deplibs=$link_all_deplibs
joachim99@2 2468
joachim99@2 2469 # Compile-time system search path for libraries
joachim99@2 2470 sys_lib_search_path_spec=$sys_lib_search_path_spec
joachim99@2 2471
joachim99@2 2472 # Run-time system search path for libraries
joachim99@2 2473 sys_lib_dlsearch_path_spec=$sys_lib_dlsearch_path_spec
joachim99@2 2474
joachim99@2 2475 # Fix the shell variable \$srcfile for the compiler.
joachim99@2 2476 fix_srcfile_path="$fix_srcfile_path"
joachim99@2 2477
joachim99@2 2478 # Set to yes if exported symbols are required.
joachim99@2 2479 always_export_symbols=$always_export_symbols
joachim99@2 2480
joachim99@2 2481 # The commands to list exported symbols.
joachim99@2 2482 export_symbols_cmds=$export_symbols_cmds
joachim99@2 2483
joachim99@2 2484 # The commands to extract the exported symbol list from a shared archive.
joachim99@2 2485 extract_expsyms_cmds=$extract_expsyms_cmds
joachim99@2 2486
joachim99@2 2487 # Symbols that should not be listed in the preloaded symbols.
joachim99@2 2488 exclude_expsyms=$exclude_expsyms
joachim99@2 2489
joachim99@2 2490 # Symbols that must always be exported.
joachim99@2 2491 include_expsyms=$include_expsyms
joachim99@2 2492
joachim99@2 2493 EOF
joachim99@2 2494
joachim99@2 2495 if test -z "$tagname"; then
joachim99@2 2496 echo '### END LIBTOOL CONFIG' >> "$ofile"
joachim99@2 2497 else
joachim99@2 2498 echo "### END LIBTOOL TAG CONFIG: $tagname" >> "$ofile"
joachim99@2 2499 fi
joachim99@2 2500
joachim99@2 2501 case $ltmain in
joachim99@2 2502 *.sh)
joachim99@2 2503 echo >> "$ofile"
joachim99@2 2504 if test -z "$tagname"; then
joachim99@2 2505 case $host_os in
joachim99@2 2506 aix3*)
joachim99@2 2507 cat <<\EOF >> "$ofile"
joachim99@2 2508
joachim99@2 2509 # AIX sometimes has problems with the GCC collect2 program. For some
joachim99@2 2510 # reason, if we set the COLLECT_NAMES environment variable, the problems
joachim99@2 2511 # vanish in a puff of smoke.
joachim99@2 2512 if test "X${COLLECT_NAMES+set}" != Xset; then
joachim99@2 2513 COLLECT_NAMES=
joachim99@2 2514 export COLLECT_NAMES
joachim99@2 2515 fi
joachim99@2 2516 EOF
joachim99@2 2517 ;;
joachim99@2 2518 esac
joachim99@2 2519 case $host in
joachim99@2 2520 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
joachim99@2 2521 cat <<'EOF' >> "$ofile"
joachim99@2 2522 # This is a source program that is used to create dlls on Windows
joachim99@2 2523 # Don't remove nor modify the starting and closing comments
joachim99@2 2524 # /* ltdll.c starts here */
joachim99@2 2525 # #define WIN32_LEAN_AND_MEAN
joachim99@2 2526 # #include <windows.h>
joachim99@2 2527 # #undef WIN32_LEAN_AND_MEAN
joachim99@2 2528 # #include <stdio.h>
joachim99@2 2529 #
joachim99@2 2530 # #ifndef __CYGWIN__
joachim99@2 2531 # # ifdef __CYGWIN32__
joachim99@2 2532 # # define __CYGWIN__ __CYGWIN32__
joachim99@2 2533 # # endif
joachim99@2 2534 # #endif
joachim99@2 2535 #
joachim99@2 2536 # #ifdef __cplusplus
joachim99@2 2537 # extern "C" {
joachim99@2 2538 # #endif
joachim99@2 2539 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
joachim99@2 2540 # #ifdef __cplusplus
joachim99@2 2541 # }
joachim99@2 2542 # #endif
joachim99@2 2543 #
joachim99@2 2544 # #ifdef __CYGWIN__
joachim99@2 2545 # #include <cygwin/cygwin_dll.h>
joachim99@2 2546 # DECLARE_CYGWIN_DLL( DllMain );
joachim99@2 2547 # #endif
joachim99@2 2548 # HINSTANCE __hDllInstance_base;
joachim99@2 2549 #
joachim99@2 2550 # BOOL APIENTRY
joachim99@2 2551 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
joachim99@2 2552 # {
joachim99@2 2553 # __hDllInstance_base = hInst;
joachim99@2 2554 # return TRUE;
joachim99@2 2555 # }
joachim99@2 2556 # /* ltdll.c ends here */
joachim99@2 2557 # This is a source program that is used to create import libraries
joachim99@2 2558 # on Windows for dlls which lack them. Don't remove nor modify the
joachim99@2 2559 # starting and closing comments
joachim99@2 2560 # /* impgen.c starts here */
joachim99@2 2561 # /* Copyright (C) 1999-2000 Free Software Foundation, Inc.
joachim99@2 2562 #
joachim99@2 2563 # This file is part of GNU libtool.
joachim99@2 2564 #
joachim99@2 2565 # This program is free software; you can redistribute it and/or modify
joachim99@2 2566 # it under the terms of the GNU General Public License as published by
joachim99@2 2567 # the Free Software Foundation; either version 2 of the License, or
joachim99@2 2568 # (at your option) any later version.
joachim99@2 2569 #
joachim99@2 2570 # This program is distributed in the hope that it will be useful,
joachim99@2 2571 # but WITHOUT ANY WARRANTY; without even the implied warranty of
joachim99@2 2572 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
joachim99@2 2573 # GNU General Public License for more details.
joachim99@2 2574 #
joachim99@2 2575 # You should have received a copy of the GNU General Public License
joachim99@2 2576 # along with this program; if not, write to the Free Software
joachim99@2 2577 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
joachim99@2 2578 # */
joachim99@2 2579 #
joachim99@2 2580 # #include <stdio.h> /* for printf() */
joachim99@2 2581 # #include <unistd.h> /* for open(), lseek(), read() */
joachim99@2 2582 # #include <fcntl.h> /* for O_RDONLY, O_BINARY */
joachim99@2 2583 # #include <string.h> /* for strdup() */
joachim99@2 2584 #
joachim99@2 2585 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
joachim99@2 2586 # #ifndef O_BINARY
joachim99@2 2587 # #define O_BINARY 0
joachim99@2 2588 # #endif
joachim99@2 2589 #
joachim99@2 2590 # static unsigned int
joachim99@2 2591 # pe_get16 (fd, offset)
joachim99@2 2592 # int fd;
joachim99@2 2593 # int offset;
joachim99@2 2594 # {
joachim99@2 2595 # unsigned char b[2];
joachim99@2 2596 # lseek (fd, offset, SEEK_SET);
joachim99@2 2597 # read (fd, b, 2);
joachim99@2 2598 # return b[0] + (b[1]<<8);
joachim99@2 2599 # }
joachim99@2 2600 #
joachim99@2 2601 # static unsigned int
joachim99@2 2602 # pe_get32 (fd, offset)
joachim99@2 2603 # int fd;
joachim99@2 2604 # int offset;
joachim99@2 2605 # {
joachim99@2 2606 # unsigned char b[4];
joachim99@2 2607 # lseek (fd, offset, SEEK_SET);
joachim99@2 2608 # read (fd, b, 4);
joachim99@2 2609 # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
joachim99@2 2610 # }
joachim99@2 2611 #
joachim99@2 2612 # static unsigned int
joachim99@2 2613 # pe_as32 (ptr)
joachim99@2 2614 # void *ptr;
joachim99@2 2615 # {
joachim99@2 2616 # unsigned char *b = ptr;
joachim99@2 2617 # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
joachim99@2 2618 # }
joachim99@2 2619 #
joachim99@2 2620 # int
joachim99@2 2621 # main (argc, argv)
joachim99@2 2622 # int argc;
joachim99@2 2623 # char *argv[];
joachim99@2 2624 # {
joachim99@2 2625 # int dll;
joachim99@2 2626 # unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
joachim99@2 2627 # unsigned long export_rva, export_size, nsections, secptr, expptr;
joachim99@2 2628 # unsigned long name_rvas, nexp;
joachim99@2 2629 # unsigned char *expdata, *erva;
joachim99@2 2630 # char *filename, *dll_name;
joachim99@2 2631 #
joachim99@2 2632 # filename = argv[1];
joachim99@2 2633 #
joachim99@2 2634 # dll = open(filename, O_RDONLY|O_BINARY);
joachim99@2 2635 # if (dll < 1)
joachim99@2 2636 # return 1;
joachim99@2 2637 #
joachim99@2 2638 # dll_name = filename;
joachim99@2 2639 #
joachim99@2 2640 # for (i=0; filename[i]; i++)
joachim99@2 2641 # if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
joachim99@2 2642 # dll_name = filename + i +1;
joachim99@2 2643 #
joachim99@2 2644 # pe_header_offset = pe_get32 (dll, 0x3c);
joachim99@2 2645 # opthdr_ofs = pe_header_offset + 4 + 20;
joachim99@2 2646 # num_entries = pe_get32 (dll, opthdr_ofs + 92);
joachim99@2 2647 #
joachim99@2 2648 # if (num_entries < 1) /* no exports */
joachim99@2 2649 # return 1;
joachim99@2 2650 #
joachim99@2 2651 # export_rva = pe_get32 (dll, opthdr_ofs + 96);
joachim99@2 2652 # export_size = pe_get32 (dll, opthdr_ofs + 100);
joachim99@2 2653 # nsections = pe_get16 (dll, pe_header_offset + 4 +2);
joachim99@2 2654 # secptr = (pe_header_offset + 4 + 20 +
joachim99@2 2655 # pe_get16 (dll, pe_header_offset + 4 + 16));
joachim99@2 2656 #
joachim99@2 2657 # expptr = 0;
joachim99@2 2658 # for (i = 0; i < nsections; i++)
joachim99@2 2659 # {
joachim99@2 2660 # char sname[8];
joachim99@2 2661 # unsigned long secptr1 = secptr + 40 * i;
joachim99@2 2662 # unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
joachim99@2 2663 # unsigned long vsize = pe_get32 (dll, secptr1 + 16);
joachim99@2 2664 # unsigned long fptr = pe_get32 (dll, secptr1 + 20);
joachim99@2 2665 # lseek(dll, secptr1, SEEK_SET);
joachim99@2 2666 # read(dll, sname, 8);
joachim99@2 2667 # if (vaddr <= export_rva && vaddr+vsize > export_rva)
joachim99@2 2668 # {
joachim99@2 2669 # expptr = fptr + (export_rva - vaddr);
joachim99@2 2670 # if (export_rva + export_size > vaddr + vsize)
joachim99@2 2671 # export_size = vsize - (export_rva - vaddr);
joachim99@2 2672 # break;
joachim99@2 2673 # }
joachim99@2 2674 # }
joachim99@2 2675 #
joachim99@2 2676 # expdata = (unsigned char*)malloc(export_size);
joachim99@2 2677 # lseek (dll, expptr, SEEK_SET);
joachim99@2 2678 # read (dll, expdata, export_size);
joachim99@2 2679 # erva = expdata - export_rva;
joachim99@2 2680 #
joachim99@2 2681 # nexp = pe_as32 (expdata+24);
joachim99@2 2682 # name_rvas = pe_as32 (expdata+32);
joachim99@2 2683 #
joachim99@2 2684 # printf ("EXPORTS\n");
joachim99@2 2685 # for (i = 0; i<nexp; i++)
joachim99@2 2686 # {
joachim99@2 2687 # unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
joachim99@2 2688 # printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
joachim99@2 2689 # }
joachim99@2 2690 #
joachim99@2 2691 # return 0;
joachim99@2 2692 # }
joachim99@2 2693 # /* impgen.c ends here */
joachim99@2 2694
joachim99@2 2695 EOF
joachim99@2 2696 ;;
joachim99@2 2697 esac
joachim99@2 2698
joachim99@2 2699
joachim99@2 2700 # Append the ltmain.sh script.
joachim99@2 2701 sed '$q' "$ltmain" >> "$ofile" || (rm -f "$ofile"; exit 1)
joachim99@2 2702 # We use sed instead of cat because bash on DJGPP gets confused if
joachim99@2 2703 # if finds mixed CR/LF and LF-only lines. Since sed operates in
joachim99@2 2704 # text mode, it properly converts lines to CR/LF. This bash problem
joachim99@2 2705 # is reportedly fixed, but why not run on old versions too?
joachim99@2 2706
joachim99@2 2707 chmod +x "$ofile"
joachim99@2 2708 fi
joachim99@2 2709 ;;
joachim99@2 2710
joachim99@2 2711 *)
joachim99@2 2712 # Compile the libtool program.
joachim99@2 2713 echo "FIXME: would compile $ltmain"
joachim99@2 2714 ;;
joachim99@2 2715 esac
joachim99@2 2716
joachim99@2 2717 # Update the list of available tags.
joachim99@2 2718 if test -n "$tagname"; then
joachim99@2 2719
joachim99@2 2720 # Extract list of available tagged configurations in $ofile.
joachim99@2 2721 # Note that this assumes the entire list is on one line.
joachim99@2 2722 available_tags=`grep "^available_tags=" $ofile | sed -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
joachim99@2 2723
joachim99@2 2724 # Append the new tag name to the list of available tags.
joachim99@2 2725 available_tags="$available_tags $tagname"
joachim99@2 2726
joachim99@2 2727 # Now substitute the updated of available tags.
joachim99@2 2728 if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' ${ofile} > ${ofile}.new"; then
joachim99@2 2729 mv ${ofile}.new ${ofile}
joachim99@2 2730 chmod +x "$ofile"
joachim99@2 2731 else
joachim99@2 2732 rm -f ${ofile}.new
joachim99@2 2733 echo "$progname: unable to update list of available tagged configurations."
joachim99@2 2734 exit 1
joachim99@2 2735 fi
joachim99@2 2736 fi
joachim99@2 2737
joachim99@2 2738 # Don't cache tagged configuration!
joachim99@2 2739 test -n "$cache_file" && test -z "$tagname" || exit 0
joachim99@2 2740
joachim99@2 2741 # AC_CACHE_SAVE
joachim99@2 2742 trap '' 1 2 15
joachim99@2 2743 cat > confcache <<\EOF
joachim99@2 2744 # This file is a shell script that caches the results of configure
joachim99@2 2745 # tests run on this system so they can be shared between configure
joachim99@2 2746 # scripts and configure runs. It is not useful on other systems.
joachim99@2 2747 # If it contains results you don't want to keep, you may remove or edit it.
joachim99@2 2748 #
joachim99@2 2749 # By default, configure uses ./config.cache as the cache file,
joachim99@2 2750 # creating it if it does not exist already. You can give configure
joachim99@2 2751 # the --cache-file=FILE option to use a different cache file; that is
joachim99@2 2752 # what configure does when it calls configure scripts in
joachim99@2 2753 # subdirectories, so they share the cache.
joachim99@2 2754 # Giving --cache-file=/dev/null disables caching, for debugging configure.
joachim99@2 2755 # config.status only pays attention to the cache file if you give it the
joachim99@2 2756 # --recheck option to rerun configure.
joachim99@2 2757 #
joachim99@2 2758 EOF
joachim99@2 2759 # The following way of writing the cache mishandles newlines in values,
joachim99@2 2760 # but we know of no workaround that is simple, portable, and efficient.
joachim99@2 2761 # So, don't put newlines in cache variables' values.
joachim99@2 2762 # Ultrix sh set writes to stderr and can't be redirected directly,
joachim99@2 2763 # and sets the high bit in the cache file unless we assign to the vars.
joachim99@2 2764 (set) 2>&1 |
joachim99@2 2765 case `(ac_space=' '; set | grep ac_space) 2>&1` in
joachim99@2 2766 *ac_space=\ *)
joachim99@2 2767 # `set' does not quote correctly, so add quotes (double-quote substitution
joachim99@2 2768 # turns \\\\ into \\, and sed turns \\ into \).
joachim99@2 2769 sed -n \
joachim99@2 2770 -e "s/'/'\\\\''/g" \
joachim99@2 2771 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
joachim99@2 2772 ;;
joachim99@2 2773 *)
joachim99@2 2774 # `set' quotes correctly as required by POSIX, so do not add quotes.
joachim99@2 2775 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
joachim99@2 2776 ;;
joachim99@2 2777 esac >> confcache
joachim99@2 2778 if cmp -s $cache_file confcache; then
joachim99@2 2779 :
joachim99@2 2780 else
joachim99@2 2781 if test -w $cache_file; then
joachim99@2 2782 echo "updating cache $cache_file"
joachim99@2 2783 cat confcache > $cache_file
joachim99@2 2784 else
joachim99@2 2785 echo "not updating unwritable cache $cache_file"
joachim99@2 2786 fi
joachim99@2 2787 fi
joachim99@2 2788 rm -f confcache
joachim99@2 2789
joachim99@2 2790 exit 0
joachim99@2 2791
joachim99@2 2792 # Local Variables:
joachim99@2 2793 # mode:shell-script
joachim99@2 2794 # sh-indentation:2
joachim99@2 2795 # End: