| 1 | #! /bin/sh
|
|---|
| 2 |
|
|---|
| 3 | # ltconfig - Create a system-specific libtool.
|
|---|
| 4 | # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
|
|---|
| 5 | # Free Software Foundation, Inc.
|
|---|
| 6 | # Originally by Gordon Matzigkeit <[email protected]>, 1996
|
|---|
| 7 | #
|
|---|
| 8 | # This file is free software; you can redistribute it and/or modify it
|
|---|
| 9 | # under the terms of the GNU General Public License as published by
|
|---|
| 10 | # the Free Software Foundation; either version 2 of the License, or
|
|---|
| 11 | # (at your option) any later version.
|
|---|
| 12 | #
|
|---|
| 13 | # This program is distributed in the hope that it will be useful, but
|
|---|
| 14 | # WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|---|
| 16 | # General Public License for more details.
|
|---|
| 17 | #
|
|---|
| 18 | # You should have received a copy of the GNU General Public License
|
|---|
| 19 | # along with this program; if not, write to the Free Software
|
|---|
| 20 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|---|
| 21 | #
|
|---|
| 22 | # As a special exception to the GNU General Public License, if you
|
|---|
| 23 | # distribute this file as part of a program that contains a
|
|---|
| 24 | # configuration script generated by Autoconf, you may include it under
|
|---|
| 25 | # the same distribution terms that you use for the rest of that program.
|
|---|
| 26 |
|
|---|
| 27 | # A lot of this script is taken from autoconf-2.10.
|
|---|
| 28 |
|
|---|
| 29 | # Check that we are running under the correct shell.
|
|---|
| 30 | SHELL=${CONFIG_SHELL-/bin/sh}
|
|---|
| 31 | echo=echo
|
|---|
| 32 | if test "X$1" = X--no-reexec; then
|
|---|
| 33 | # Discard the --no-reexec flag, and continue.
|
|---|
| 34 | shift
|
|---|
| 35 | elif test "X$1" = X--fallback-echo; then
|
|---|
| 36 | # Avoid inline document here, it may be left over
|
|---|
| 37 | :
|
|---|
| 38 | elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
|
|---|
| 39 | # Yippee, $echo works!
|
|---|
| 40 | :
|
|---|
| 41 | else
|
|---|
| 42 | # Restart under the correct shell.
|
|---|
| 43 | exec "$SHELL" "$0" --no-reexec ${1+"$@"}
|
|---|
| 44 | fi
|
|---|
| 45 |
|
|---|
| 46 | if test "X$1" = X--fallback-echo; then
|
|---|
| 47 | # used as fallback echo
|
|---|
| 48 | shift
|
|---|
| 49 | cat <<EOF
|
|---|
| 50 | $*
|
|---|
| 51 | EOF
|
|---|
| 52 | exit 0
|
|---|
| 53 | fi
|
|---|
| 54 |
|
|---|
| 55 | # Find the correct PATH separator. Usually this is `:', but
|
|---|
| 56 | # DJGPP uses `;' like DOS.
|
|---|
| 57 | if test "X${PATH_SEPARATOR+set}" != Xset; then
|
|---|
| 58 | UNAME=${UNAME-`uname 2>/dev/null`}
|
|---|
| 59 | case X$UNAME in
|
|---|
| 60 | *-DOS) PATH_SEPARATOR=';' ;;
|
|---|
| 61 | *) PATH_SEPARATOR=':' ;;
|
|---|
| 62 | esac
|
|---|
| 63 | fi
|
|---|
| 64 |
|
|---|
| 65 | # The HP-UX ksh and POSIX shell print the target directory to stdout
|
|---|
| 66 | # if CDPATH is set.
|
|---|
| 67 | if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
|
|---|
| 68 |
|
|---|
| 69 | if test "X${echo_test_string+set}" != Xset; then
|
|---|
| 70 | # find a string as large as possible, as long as the shell can cope with it
|
|---|
| 71 | for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
|
|---|
| 72 | # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
|
|---|
| 73 | if (echo_test_string="`eval $cmd`") 2>/dev/null &&
|
|---|
| 74 | echo_test_string="`eval $cmd`" &&
|
|---|
| 75 | (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null; then
|
|---|
| 76 | break
|
|---|
| 77 | fi
|
|---|
| 78 | done
|
|---|
| 79 | fi
|
|---|
| 80 |
|
|---|
| 81 | if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
|
|---|
| 82 | echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
|
|---|
| 83 | test "X$echo_testing_string" = "X$echo_test_string"; then
|
|---|
| 84 | :
|
|---|
| 85 | else
|
|---|
| 86 | # The Solaris, AIX, and Digital Unix default echo programs unquote
|
|---|
| 87 | # backslashes. This makes it impossible to quote backslashes using
|
|---|
| 88 | # echo "$something" | sed 's/\\/\\\\/g'
|
|---|
| 89 | #
|
|---|
| 90 | # So, first we look for a working echo in the user's PATH.
|
|---|
| 91 |
|
|---|
| 92 | IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
|
|---|
| 93 | for dir in $PATH /usr/ucb; do
|
|---|
| 94 | if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
|
|---|
| 95 | test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
|
|---|
| 96 | echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
|
|---|
| 97 | test "X$echo_testing_string" = "X$echo_test_string"; then
|
|---|
| 98 | echo="$dir/echo"
|
|---|
| 99 | break
|
|---|
| 100 | fi
|
|---|
| 101 | done
|
|---|
| 102 | IFS="$save_ifs"
|
|---|
| 103 |
|
|---|
| 104 | if test "X$echo" = Xecho; then
|
|---|
| 105 | # We didn't find a better echo, so look for alternatives.
|
|---|
| 106 | if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
|
|---|
| 107 | echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
|
|---|
| 108 | test "X$echo_testing_string" = "X$echo_test_string"; then
|
|---|
| 109 | # This shell has a builtin print -r that does the trick.
|
|---|
| 110 | echo='print -r'
|
|---|
| 111 | elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
|
|---|
| 112 | test "X$CONFIG_SHELL" != X/bin/ksh; then
|
|---|
| 113 | # If we have ksh, try running ltconfig again with it.
|
|---|
| 114 | ORIGINAL_CONFIG_SHELL="${CONFIG_SHELL-/bin/sh}"
|
|---|
| 115 | export ORIGINAL_CONFIG_SHELL
|
|---|
| 116 | CONFIG_SHELL=/bin/ksh
|
|---|
| 117 | export CONFIG_SHELL
|
|---|
| 118 | exec "$CONFIG_SHELL" "$0" --no-reexec ${1+"$@"}
|
|---|
| 119 | else
|
|---|
| 120 | # Try using printf.
|
|---|
| 121 | echo='printf %s\n'
|
|---|
| 122 | if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
|
|---|
| 123 | echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
|
|---|
| 124 | test "X$echo_testing_string" = "X$echo_test_string"; then
|
|---|
| 125 | # Cool, printf works
|
|---|
| 126 | :
|
|---|
| 127 | elif echo_testing_string=`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null` &&
|
|---|
| 128 | test "X$echo_testing_string" = 'X\t' &&
|
|---|
| 129 | echo_testing_string=`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
|
|---|
| 130 | test "X$echo_testing_string" = "X$echo_test_string"; then
|
|---|
| 131 | CONFIG_SHELL="$ORIGINAL_CONFIG_SHELL"
|
|---|
| 132 | export CONFIG_SHELL
|
|---|
| 133 | SHELL="$CONFIG_SHELL"
|
|---|
| 134 | export SHELL
|
|---|
| 135 | echo="$CONFIG_SHELL $0 --fallback-echo"
|
|---|
| 136 | elif echo_testing_string=`("$CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null` &&
|
|---|
| 137 | test "X$echo_testing_string" = 'X\t' &&
|
|---|
| 138 | echo_testing_string=`("$CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
|
|---|
| 139 | test "X$echo_testing_string" = "X$echo_test_string"; then
|
|---|
| 140 | echo="$CONFIG_SHELL $0 --fallback-echo"
|
|---|
| 141 | else
|
|---|
| 142 | # maybe with a smaller string...
|
|---|
| 143 | prev=:
|
|---|
| 144 |
|
|---|
| 145 | for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
|
|---|
| 146 | if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null; then
|
|---|
| 147 | break
|
|---|
| 148 | fi
|
|---|
| 149 | prev="$cmd"
|
|---|
| 150 | done
|
|---|
| 151 |
|
|---|
| 152 | if test "$prev" != 'sed 50q "$0"'; then
|
|---|
| 153 | echo_test_string=`eval $prev`
|
|---|
| 154 |
|
|---|
| 155 | export echo_test_string
|
|---|
| 156 | exec "${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}}" "$0" ${1+"$@"}
|
|---|
| 157 | else
|
|---|
| 158 | # Oops. We lost completely, so just stick with echo.
|
|---|
| 159 | echo=echo
|
|---|
| 160 | fi
|
|---|
| 161 | fi
|
|---|
| 162 | fi
|
|---|
| 163 | fi
|
|---|
| 164 | fi
|
|---|
| 165 |
|
|---|
| 166 | # Sed substitution that helps us do robust quoting. It backslashifies
|
|---|
| 167 | # metacharacters that are still active within double-quoted strings.
|
|---|
| 168 | Xsed='sed -e s/^X//'
|
|---|
| 169 | sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
|
|---|
| 170 |
|
|---|
| 171 | # Same as above, but do not quote variable references.
|
|---|
| 172 | double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
|
|---|
| 173 |
|
|---|
| 174 | # Sed substitution to delay expansion of an escaped shell variable in a
|
|---|
| 175 | # double_quote_subst'ed string.
|
|---|
| 176 | delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
|
|---|
| 177 |
|
|---|
| 178 | # The name of this program.
|
|---|
| 179 | progname=`$echo "X$0" | $Xsed -e 's%^.*/%%'`
|
|---|
| 180 |
|
|---|
| 181 | # Constants:
|
|---|
| 182 | PROGRAM=ltconfig
|
|---|
| 183 | PACKAGE=libtool
|
|---|
| 184 | VERSION=1.4a-GCC3.0
|
|---|
| 185 | TIMESTAMP=" (1.641.2.256 2001/05/28 20:09:07 with GCC-local changes)"
|
|---|
| 186 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
|
|---|
| 187 | ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
|
|---|
| 188 | rm="rm -f"
|
|---|
| 189 |
|
|---|
| 190 | help="Try \`$progname --help' for more information."
|
|---|
| 191 |
|
|---|
| 192 | # Global variables:
|
|---|
| 193 | default_ofile=libtool
|
|---|
| 194 | can_build_shared=yes
|
|---|
| 195 | enable_shared=yes
|
|---|
| 196 | # All known linkers require a `.a' archive for static linking (except M$VC,
|
|---|
| 197 | # which needs '.lib').
|
|---|
| 198 | enable_static=yes
|
|---|
| 199 | enable_fast_install=yes
|
|---|
| 200 | enable_dlopen=unknown
|
|---|
| 201 | enable_win32_dll=no
|
|---|
| 202 | pic_mode=default
|
|---|
| 203 | ltmain=
|
|---|
| 204 | silent=
|
|---|
| 205 | srcdir=
|
|---|
| 206 | ac_config_guess=
|
|---|
| 207 | ac_config_sub=
|
|---|
| 208 | host=
|
|---|
| 209 | build=NONE
|
|---|
| 210 | nonopt=NONE
|
|---|
| 211 | ofile="$default_ofile"
|
|---|
| 212 | verify_host=yes
|
|---|
| 213 | tagname=
|
|---|
| 214 | with_gcc=no
|
|---|
| 215 | with_gnu_ld=no
|
|---|
| 216 | need_locks=yes
|
|---|
| 217 | ac_ext=c
|
|---|
| 218 | libext=a
|
|---|
| 219 | cache_file=
|
|---|
| 220 | max_cmd_len=
|
|---|
| 221 |
|
|---|
| 222 | ## Dependencies to place before and after the object being linked:
|
|---|
| 223 | predep_objects=
|
|---|
| 224 | postdep_objects=
|
|---|
| 225 | predeps=
|
|---|
| 226 | postdeps=
|
|---|
| 227 | compiler_lib_search_path=
|
|---|
| 228 |
|
|---|
| 229 | ## Link characteristics:
|
|---|
| 230 | allow_undefined_flag=
|
|---|
| 231 | no_undefined_flag=
|
|---|
| 232 | need_lib_prefix=unknown
|
|---|
| 233 | need_version=unknown
|
|---|
| 234 | # when you set need_version to no, make sure it does not cause -set_version
|
|---|
| 235 | # flags to be left without arguments
|
|---|
| 236 | archive_cmds=
|
|---|
| 237 | archive_expsym_cmds=
|
|---|
| 238 | old_archive_from_new_cmds=
|
|---|
| 239 | old_archive_from_expsyms_cmds=
|
|---|
| 240 | striplib=
|
|---|
| 241 | old_striplib=
|
|---|
| 242 | export_dynamic_flag_spec=
|
|---|
| 243 | whole_archive_flag_spec=
|
|---|
| 244 | thread_safe_flag_spec=
|
|---|
| 245 | hardcode_into_libs=no
|
|---|
| 246 | hardcode_libdir_flag_spec=
|
|---|
| 247 | hardcode_libdir_separator=
|
|---|
| 248 | hardcode_direct=no
|
|---|
| 249 | hardcode_minus_L=no
|
|---|
| 250 | hardcode_shlibpath_var=unsupported
|
|---|
| 251 | runpath_var=
|
|---|
| 252 | link_all_deplibs=unknown
|
|---|
| 253 | always_export_symbols=no
|
|---|
| 254 | export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
|
|---|
| 255 | # include_expsyms should be a list of space-separated symbols to be *always*
|
|---|
| 256 | # included in the symbol list
|
|---|
| 257 | include_expsyms=
|
|---|
| 258 | # exclude_expsyms can be an egrep regular expression of symbols to exclude
|
|---|
| 259 | # it will be wrapped by ` (' and `)$', so one must not match beginning or
|
|---|
| 260 | # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
|
|---|
| 261 | # as well as any symbol that contains `d'.
|
|---|
| 262 | exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
|
|---|
| 263 | # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
|
|---|
| 264 | # platforms (ab)use it in PIC code, but their linkers get confused if
|
|---|
| 265 | # the symbol is explicitly referenced. Since portable code cannot
|
|---|
| 266 | # rely on this symbol name, it's probably fine to never include it in
|
|---|
| 267 | # preloaded symbol tables.
|
|---|
| 268 | extract_expsyms_cmds=
|
|---|
| 269 |
|
|---|
| 270 | ## Tools:
|
|---|
| 271 | old_AR="$AR"
|
|---|
| 272 | old_AR_FLAGS="$AR_FLAGS"
|
|---|
| 273 | old_CC="$CC"
|
|---|
| 274 | old_CFLAGS="$CFLAGS"
|
|---|
| 275 | old_CPPFLAGS="$CPPFLAGS"
|
|---|
| 276 | old_LDFLAGS="$LDFLAGS"
|
|---|
| 277 | old_LIBS="$LIBS"
|
|---|
| 278 | old_MAGIC_CMD="$MAGIC_CMD"
|
|---|
| 279 | old_LD="$LD"
|
|---|
| 280 | old_LN_S="$LN_S"
|
|---|
| 281 | old_LTCC="$LTCC"
|
|---|
| 282 | old_NM="$NM"
|
|---|
| 283 | old_RANLIB="$RANLIB"
|
|---|
| 284 | old_STRIP="$STRIP"
|
|---|
| 285 | old_AS="$AS"
|
|---|
| 286 | old_DLLTOOL="$DLLTOOL"
|
|---|
| 287 | old_OBJDUMP="$OBJDUMP"
|
|---|
| 288 | old_OBJEXT="$OBJEXT"
|
|---|
| 289 | old_EXEEXT="$EXEEXT"
|
|---|
| 290 | old_reload_flag="$reload_flag"
|
|---|
| 291 | old_deplibs_check_method="$deplibs_check_method"
|
|---|
| 292 | old_file_magic_cmd="$file_magic_cmd"
|
|---|
| 293 |
|
|---|
| 294 | # Parse the command line options.
|
|---|
| 295 | args=
|
|---|
| 296 | prev=
|
|---|
| 297 | for option
|
|---|
| 298 | do
|
|---|
| 299 | case $option in
|
|---|
| 300 | -*=*) optarg=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
|
|---|
| 301 | *) optarg= ;;
|
|---|
| 302 | esac
|
|---|
| 303 |
|
|---|
| 304 | # If the previous option needs an argument, assign it.
|
|---|
| 305 | if test -n "$prev"; then
|
|---|
| 306 | eval "$prev=\$option"
|
|---|
| 307 | prev=
|
|---|
| 308 | continue
|
|---|
| 309 | fi
|
|---|
| 310 |
|
|---|
| 311 | case $option in
|
|---|
| 312 | --help) cat <<EOM
|
|---|
| 313 | Usage: $progname [OPTION]... LTMAIN [HOST]
|
|---|
| 314 |
|
|---|
| 315 | Generate a system-specific libtool script.
|
|---|
| 316 |
|
|---|
| 317 | --build configure for building on BUILD [BUILD=HOST]
|
|---|
| 318 | --debug enable verbose shell tracing
|
|---|
| 319 | --disable-shared do not build shared libraries
|
|---|
| 320 | --disable-static do not build static libraries
|
|---|
| 321 | --disable-fast-install do not optimize for fast installation
|
|---|
| 322 | --enable-dlopen enable dlopen support
|
|---|
| 323 | --enable-win32-dll enable building dlls on win32 hosts
|
|---|
| 324 | --help display this help and exit
|
|---|
| 325 | --no-verify do not verify that HOST is a valid host type
|
|---|
| 326 | -o, --output=FILE specify the output file [default=$default_ofile]
|
|---|
| 327 | --quiet same as \`--silent'
|
|---|
| 328 | --silent do not print informational messages
|
|---|
| 329 | --srcdir=DIR find \`config.guess' in DIR
|
|---|
| 330 | --version output version information and exit
|
|---|
| 331 | --add-tag=TAG append an alternate configuration
|
|---|
| 332 | --with-gcc assume that the GNU C compiler will be used
|
|---|
| 333 | --with-gnu-ld assume that the C compiler uses the GNU linker
|
|---|
| 334 | --prefer-pic try to use only PIC objects
|
|---|
| 335 | --prefer-non-pic try to use only non-PIC objects
|
|---|
| 336 | --disable-lock disable file locking
|
|---|
| 337 | --cache-file=FILE configure cache file
|
|---|
| 338 |
|
|---|
| 339 | LTMAIN is the \`ltmain.sh' shell script fragment or \`ltmain.c' program
|
|---|
| 340 | that provides basic libtool functionality.
|
|---|
| 341 |
|
|---|
| 342 | HOST is the canonical host system name [default=guessed].
|
|---|
| 343 | EOM
|
|---|
| 344 | exit 0
|
|---|
| 345 | ;;
|
|---|
| 346 |
|
|---|
| 347 | --build) prev=build ;;
|
|---|
| 348 | --build=*) build="$optarg" ;;
|
|---|
| 349 |
|
|---|
| 350 | --debug)
|
|---|
| 351 | echo "$progname: enabling shell trace mode"
|
|---|
| 352 | set -x
|
|---|
| 353 | ;;
|
|---|
| 354 |
|
|---|
| 355 | --disable-shared) enable_shared=no ;;
|
|---|
| 356 |
|
|---|
| 357 | --disable-static) enable_static=no ;;
|
|---|
| 358 |
|
|---|
| 359 | --disable-fast-install) enable_fast_install=no ;;
|
|---|
| 360 |
|
|---|
| 361 | --enable-dlopen) enable_dlopen=yes ;;
|
|---|
| 362 |
|
|---|
| 363 | --enable-win32-dll) enable_win32_dll=yes ;;
|
|---|
| 364 |
|
|---|
| 365 | --quiet | --silent) silent=yes ;;
|
|---|
| 366 |
|
|---|
| 367 | --srcdir) prev=srcdir ;;
|
|---|
| 368 | --srcdir=*) srcdir="$optarg" ;;
|
|---|
| 369 |
|
|---|
| 370 | --no-verify) verify_host=no ;;
|
|---|
| 371 |
|
|---|
| 372 | --output | -o) prev=ofile ;;
|
|---|
| 373 | --output=*) ofile="$optarg" ;;
|
|---|
| 374 |
|
|---|
| 375 | --version) echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"; exit 0 ;;
|
|---|
| 376 |
|
|---|
| 377 | --add-tag) prev=tagname ;;
|
|---|
| 378 | --add-tag=*) tagname="$optarg" ;;
|
|---|
| 379 |
|
|---|
| 380 | --with-gcc) with_gcc=yes ;;
|
|---|
| 381 | --with-gnu-ld) with_gnu_ld=yes ;;
|
|---|
| 382 |
|
|---|
| 383 | --prefer-pic) pic_mode=yes ;;
|
|---|
| 384 | --prefer-non-pic) pic_mode=no ;;
|
|---|
| 385 |
|
|---|
| 386 | --disable-lock) need_locks=no ;;
|
|---|
| 387 |
|
|---|
| 388 | --cache-file=*) cache_file="$optarg" ;;
|
|---|
| 389 |
|
|---|
| 390 | -*)
|
|---|
| 391 | echo "$progname: unrecognized option \`$option'" 1>&2
|
|---|
| 392 | echo "$help" 1>&2
|
|---|
| 393 | exit 1
|
|---|
| 394 | ;;
|
|---|
| 395 |
|
|---|
| 396 | *)
|
|---|
| 397 | if test -z "$ltmain"; then
|
|---|
| 398 | ltmain="$option"
|
|---|
| 399 | elif test -z "$host"; then
|
|---|
| 400 | # This generates an unnecessary warning for sparc-sun-solaris4.1.3_U1
|
|---|
| 401 | # if test -n "`echo $option| sed 's/[-a-z0-9.]//g'`"; then
|
|---|
| 402 | # echo "$progname: warning \`$option' is not a valid host type" 1>&2
|
|---|
| 403 | # fi
|
|---|
| 404 | host="$option"
|
|---|
| 405 | else
|
|---|
| 406 | echo "$progname: too many arguments" 1>&2
|
|---|
| 407 | echo "$help" 1>&2
|
|---|
| 408 | exit 1
|
|---|
| 409 | fi ;;
|
|---|
| 410 | esac
|
|---|
| 411 | done
|
|---|
| 412 |
|
|---|
| 413 | if test -z "$ltmain"; then
|
|---|
| 414 | echo "$progname: you must specify a LTMAIN file" 1>&2
|
|---|
| 415 | echo "$help" 1>&2
|
|---|
| 416 | exit 1
|
|---|
| 417 | fi
|
|---|
| 418 |
|
|---|
| 419 | if test ! -f "$ltmain"; then
|
|---|
| 420 | echo "$progname: \`$ltmain' does not exist" 1>&2
|
|---|
| 421 | echo "$help" 1>&2
|
|---|
| 422 | exit 1
|
|---|
| 423 | fi
|
|---|
| 424 |
|
|---|
| 425 | if test -n "$tagname"; then
|
|---|
| 426 | # Check whether tagname contains only valid characters
|
|---|
| 427 | case `$echo "X$tagname" | $Xsed -e 's/[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]//g'` in
|
|---|
| 428 | "") ;;
|
|---|
| 429 | *)
|
|---|
| 430 | echo "$progname: invalid tag name: $tagname" 1>&2
|
|---|
| 431 | exit 1
|
|---|
| 432 | ;;
|
|---|
| 433 | esac
|
|---|
| 434 |
|
|---|
| 435 | if grep "^### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$ofile" > /dev/null; then
|
|---|
| 436 | echo "$progname: tag name $tagname already exists" 1>&2
|
|---|
| 437 | exit 1
|
|---|
| 438 | fi
|
|---|
| 439 |
|
|---|
| 440 | if test ! -f "$ofile"; then
|
|---|
| 441 | echo "$progname: warning: output file \`$ofile' does not exist" 1>&2
|
|---|
| 442 | fi
|
|---|
| 443 |
|
|---|
| 444 | if test -z "$LTCC"; then
|
|---|
| 445 | eval "`$SHELL $ofile --config | grep '^LTCC='`"
|
|---|
| 446 | if test -z "$LTCC"; then
|
|---|
| 447 | echo "$progname: warning: output file \`$ofile' does not look like a libtool script" 1>&2
|
|---|
| 448 | else
|
|---|
| 449 | echo "$progname: warning: using \`LTCC=$LTCC', extracted from \`$ofile'" 1>&2
|
|---|
| 450 | fi
|
|---|
| 451 | fi
|
|---|
| 452 | fi
|
|---|
| 453 |
|
|---|
| 454 | # Quote any args containing shell metacharacters.
|
|---|
| 455 | ltconfig_args=
|
|---|
| 456 | for arg
|
|---|
| 457 | do
|
|---|
| 458 | case $arg in
|
|---|
| 459 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
|
|---|
| 460 | ltconfig_args="$ltconfig_args '$arg'" ;;
|
|---|
| 461 | *) ltconfig_args="$ltconfig_args $arg" ;;
|
|---|
| 462 | esac
|
|---|
| 463 | done
|
|---|
| 464 |
|
|---|
| 465 | # A relevant subset of AC_INIT.
|
|---|
| 466 |
|
|---|
| 467 | # File descriptor usage:
|
|---|
| 468 | # 0 standard input
|
|---|
| 469 | # 1 file creation
|
|---|
| 470 | # 2 errors and warnings
|
|---|
| 471 | # 3 some systems may open it to /dev/tty
|
|---|
| 472 | # 4 used on the Kubota Titan
|
|---|
| 473 | # 5 compiler messages saved in config.log
|
|---|
| 474 | # 6 checking for... messages and results
|
|---|
| 475 | if test "$silent" = yes; then
|
|---|
| 476 | exec 6>/dev/null
|
|---|
| 477 | else
|
|---|
| 478 | exec 6>&1
|
|---|
| 479 | fi
|
|---|
| 480 | exec 5>>./config.log
|
|---|
| 481 |
|
|---|
| 482 | # NLS nuisances.
|
|---|
| 483 | # Only set LANG and LC_ALL to C if already set.
|
|---|
| 484 | # These must not be set unconditionally because not all systems understand
|
|---|
| 485 | # e.g. LANG=C (notably SCO).
|
|---|
| 486 | if test "X${LC_ALL+set}" = Xset; then LC_ALL=C; export LC_ALL; fi
|
|---|
| 487 | if test "X${LANG+set}" = Xset; then LANG=C; export LANG; fi
|
|---|
| 488 |
|
|---|
|
|---|