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