?? ltconfig
字號(hào):
#! /bin/sh# ltconfig - Create a system-specific libtool.# Copyright (C) 1996-1999 Free Software Foundation, Inc.# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996## This file is free software; you can redistribute it and/or modify it# under the terms of the GNU General Public License as published by# the Free Software Foundation; either version 2 of the License, or# (at your option) any later version.## This program is distributed in the hope that it will be useful, but# WITHOUT ANY WARRANTY; without even the implied warranty of# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU# General Public License for more details.## You should have received a copy of the GNU General Public License# along with this program; if not, write to the Free Software# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.## As a special exception to the GNU General Public License, if you# distribute this file as part of a program that contains a# configuration script generated by Autoconf, you may include it under# the same distribution terms that you use for the rest of that program.# A lot of this script is taken from autoconf-2.10.# Check that we are running under the correct shell.SHELL=${CONFIG_SHELL-/bin/sh}echo=echoif test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shiftelif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over :elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then # Yippee, $echo works! :else # Restart under the correct shell. exec "$SHELL" "$0" --no-reexec ${1+"$@"}fiif test "X$1" = X--fallback-echo; then # used as fallback echo shift cat <<EOF$*EOF exit 0fi# Find the correct PATH separator. Usually this is `:', but# DJGPP uses `;' like DOS.if test "X${PATH_SEPARATOR+set}" != Xset; then UNAME=${UNAME-`uname 2>/dev/null`} case X$UNAME in *-DOS) PATH_SEPARATOR=';' ;; *) PATH_SEPARATOR=':' ;; esacfi# The HP-UX ksh and POSIX shell print the target directory to stdout# if CDPATH is set.if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fiif test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if (echo_test_string="`eval $cmd`") 2>/dev/null && echo_test_string="`eval $cmd`" && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null; then break fi donefiif test "X`($echo '\t') 2>/dev/null`" != 'X\t' || test "X`($echo "$echo_test_string") 2>/dev/null`" != X"$echo_test_string"; then # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" for dir in $PATH /usr/ucb; do if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && test "X`($dir/echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then echo="$dir/echo" break fi done IFS="$save_ifs" if test "X$echo" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && test "X`(print -r "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then # This shell has a builtin print -r that does the trick. echo='print -r' elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running ltconfig again with it. ORIGINAL_CONFIG_SHELL="${CONFIG_SHELL-/bin/sh}" export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" --no-reexec ${1+"$@"} else # Try using printf. echo='printf "%s\n"' if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && test "X`($echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then # Cool, printf works : elif test "X`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null`" = 'X\t' && test "X`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then CONFIG_SHELL="$ORIGINAL_CONFIG_SHELL" export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL echo="$CONFIG_SHELL $0 --fallback-echo" elif test "X`("$CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null`" = 'X\t' && test "X`("$CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then echo="$CONFIG_SHELL $0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null; then break fi prev="$cmd" done if test "$prev" != 'sed 50q "$0"'; then echo_test_string=`eval $prev` export echo_test_string exec "${ORIGINAL_CONFIG_SHELL}" "$0" ${1+"$@"} else # Oops. We lost completely, so just stick with echo. echo=echo fi fi fi fifi# Sed substitution that helps us do robust quoting. It backslashifies# metacharacters that are still active within double-quoted strings.Xsed='sed -e s/^X//'sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'# Same as above, but do not quote variable references.double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'# Sed substitution to delay expansion of an escaped shell variable in a# double_quote_subst'ed string.delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'# The name of this program.progname=`$echo "X$0" | $Xsed -e 's%^.*/%%'`# Constants:PROGRAM=ltconfigPACKAGE=libtoolVERSION=1.3.4TIMESTAMP=" (1.385.2.196 1999/12/07 21:47:57)"ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'rm="rm -f"help="Try \`$progname --help' for more information."# Global variables:default_ofile=libtoolcan_build_shared=yesenable_shared=yes# All known linkers require a `.a' archive for static linking (except M$VC,# which needs '.lib').enable_static=yesenable_fast_install=yesenable_dlopen=unknownenable_win32_dll=noltmain=silent=srcdir=ac_config_guess=ac_config_sub=host=nonopt=ofile="$default_ofile"verify_host=yeswith_gcc=nowith_gnu_ld=noneed_locks=yesac_ext=cobjext=olibext=aexeext=cache_file=old_AR="$AR"old_CC="$CC"old_CFLAGS="$CFLAGS"old_CPPFLAGS="$CPPFLAGS"old_LDFLAGS="$LDFLAGS"old_LD="$LD"old_LN_S="$LN_S"old_LIBS="$LIBS"old_NM="$NM"old_RANLIB="$RANLIB"old_DLLTOOL="$DLLTOOL"old_OBJDUMP="$OBJDUMP"old_AS="$AS"# Parse the command line options.args=prev=for optiondo case "$option" in -*=*) optarg=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; *) optarg= ;; esac # If the previous option needs an argument, assign it. if test -n "$prev"; then eval "$prev=\$option" prev= continue fi case "$option" in --help) cat <<EOMUsage: $progname [OPTION]... [HOST [LTMAIN]]Generate a system-specific libtool script. --debug enable verbose shell tracing --disable-shared do not build shared libraries --disable-static do not build static libraries --disable-fast-install do not optimize for fast installation --enable-dlopen enable dlopen support --enable-win32-dll enable building dlls on win32 hosts --help display this help and exit --no-verify do not verify that HOST is a valid host type-o, --output=FILE specify the output file [default=$default_ofile] --quiet same as \`--silent' --silent do not print informational messages --srcdir=DIR find \`config.guess' in DIR --version output version information and exit --with-gcc assume that the GNU C compiler will be used --with-gnu-ld assume that the C compiler uses the GNU linker --disable-lock disable file locking --cache-file=FILE configure cache fileLTMAIN is the \`ltmain.sh' shell script fragment or \`ltmain.c' programthat provides basic libtool functionality.HOST is the canonical host system name [default=guessed].EOM exit 0 ;; --debug) echo "$progname: enabling shell trace mode" set -x ;; --disable-shared) enable_shared=no ;; --disable-static) enable_static=no ;; --disable-fast-install) enable_fast_install=no ;; --enable-dlopen) enable_dlopen=yes ;; --enable-win32-dll) enable_win32_dll=yes ;; --quiet | --silent) silent=yes ;; --srcdir) prev=srcdir ;; --srcdir=*) srcdir="$optarg" ;; --no-verify) verify_host=no ;; --output | -o) prev=ofile ;; --output=*) ofile="$optarg" ;; --version) echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"; exit 0 ;; --with-gcc) with_gcc=yes ;; --with-gnu-ld) with_gnu_ld=yes ;; --disable-lock) need_locks=no ;; --cache-file=*) cache_file="$optarg" ;; -*) echo "$progname: unrecognized option \`$option'" 1>&2 echo "$help" 1>&2 exit 1 ;; *) if test -z "$ltmain"; then ltmain="$option" elif test -z "$host"; then# This generates an unnecessary warning for sparc-sun-solaris4.1.3_U1# if test -n "`echo $option| sed 's/[-a-z0-9.]//g'`"; then# echo "$progname: warning \`$option' is not a valid host type" 1>&2# fi host="$option" else echo "$progname: too many arguments" 1>&2 echo "$help" 1>&2 exit 1 fi ;; esacdoneif test -z "$ltmain"; then echo "$progname: you must specify a LTMAIN file" 1>&2 echo "$help" 1>&2 exit 1fiif test ! -f "$ltmain"; then echo "$progname: \`$ltmain' does not exist" 1>&2 echo "$help" 1>&2 exit 1fi# Quote any args containing shell metacharacters.ltconfig_args=for argdo case "$arg" in *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) ltconfig_args="$ltconfig_args '$arg'" ;; *) ltconfig_args="$ltconfig_args $arg" ;; esacdone# A relevant subset of AC_INIT.# File descriptor usage:# 0 standard input# 1 file creation# 2 errors and warnings# 3 some systems may open it to /dev/tty# 4 used on the Kubota Titan# 5 compiler messages saved in config.log# 6 checking for... messages and resultsif test "$silent" = yes; then exec 6>/dev/nullelse exec 6>&1fiexec 5>>./config.log# NLS nuisances.# Only set LANG and LC_ALL to C if already set.# These must not be set unconditionally because not all systems understand# e.g. LANG=C (notably SCO).if test "X${LC_ALL+set}" = Xset; then LC_ALL=C; export LC_ALL; fiif test "X${LANG+set}" = Xset; then LANG=C; export LANG; fiif test -n "$cache_file" && test -r "$cache_file"; then echo "loading cache $cache_file within ltconfig" . $cache_filefiif (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then ac_n= ac_c='' ac_t=' ' else ac_n=-n ac_c= ac_t= fielse ac_n= ac_c='\c' ac_t=fiif test -z "$srcdir"; then # Assume the source directory is the same one as the path to LTMAIN. srcdir=`$echo "X$ltmain" | $Xsed -e 's%/[^/]*$%%'` test "$srcdir" = "$ltmain" && srcdir=.fitrap "$rm conftest*; exit 1" 1 2 15if test "$verify_host" = yes; then # Check for config.guess and config.sub. ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/config.guess; then ac_aux_dir=$ac_dir break
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -