(linenum→info "unix/slp.c:2238")

gcc/4.2.2/ltconfig

    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 <gord@gnu.ai.mit.edu>, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 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: file_list_spec=
  270: 
  271: ## Tools:
  272: old_AR="$AR"
  273: old_AR_FLAGS="$AR_FLAGS"
  274: old_CC="$CC"
  275: old_CFLAGS="$CFLAGS"
  276: old_CPPFLAGS="$CPPFLAGS"
  277: old_LDFLAGS="$LDFLAGS"
  278: old_LIBS="$LIBS"
  279: old_MAGIC_CMD="$MAGIC_CMD"
  280: old_LD="$LD"
  281: old_LN_S="$LN_S"
  282: old_LTCC="$LTCC"
  283: old_NM="$NM"
  284: old_RANLIB="$RANLIB"
  285: old_STRIP="$STRIP"
  286: old_AS="$AS"
  287: old_DLLTOOL="$DLLTOOL"
  288: old_OBJDUMP="$OBJDUMP"
  289: old_OBJEXT="$OBJEXT"
  290: old_EXEEXT="$EXEEXT"
  291: old_reload_flag="$reload_flag"
  292: old_deplibs_check_method="$deplibs_check_method"
  293: old_file_magic_cmd="$file_magic_cmd"
  294: 
  295: # Parse the command line options.
  296: args=
  297: prev=
  298: for option
  299: do
  300:   case $option in
  301:   -*=*) optarg=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  302:   *) optarg= ;;
  303:   esac
  304: 
  305:   # If the previous option needs an argument, assign it.
  306:   if test -n "$prev"; then
  307:     eval "$prev=\$option"
  308:     prev=
  309:     continue
  310:   fi
  311: 
  312:   case $option in
  313:   --help) cat <<EOM
  314: Usage: $progname [OPTION]... LTMAIN [HOST]
  315: 
  316: Generate a system-specific libtool script.
  317: 
  318:     --build                configure for building on BUILD [BUILD=HOST]
  319:     --debug                enable verbose shell tracing
  320:     --disable-shared       do not build shared libraries
  321:     --disable-static       do not build static libraries
  322:     --disable-fast-install do not optimize for fast installation
  323:     --enable-dlopen        enable dlopen support
  324:     --enable-win32-dll     enable building dlls on win32 hosts
  325:     --help                 display this help and exit
  326:     --no-verify            do not verify that HOST is a valid host type
  327: -o, --output=FILE          specify the output file [default=$default_ofile]
  328:     --quiet                same as \`--silent'
  329:     --silent               do not print informational messages
  330:     --srcdir=DIR           find \`config.guess' in DIR
  331:     --version              output version information and exit
  332:     --add-tag=TAG          append an alternate configuration
  333:     --with-gcc             assume that the GNU C compiler will be used
  334:     --with-gnu-ld          assume that the C compiler uses the GNU linker
  335:     --prefer-pic           try to use only PIC objects
  336:     --prefer-non-pic       try to use only non-PIC objects
  337:     --disable-lock         disable file locking
  338:     --cache-file=FILE      configure cache file
  339: 
  340: LTMAIN is the \`ltmain.sh' shell script fragment or \`ltmain.c' program
  341: that provides basic libtool functionality.
  342: 
  343: HOST is the canonical host system name [default=guessed].
  344: EOM
  345:   exit 0
  346:   ;;
  347: 
  348:   --build) prev=build ;;
  349:   --build=*) build="$optarg" ;;
  350: 
  351:   --debug)
  352:     echo "$progname: enabling shell trace mode"
  353:     set -x
  354:     ;;
  355: 
  356:   --disable-shared) enable_shared=no ;;
  357: 
  358:   --disable-static) enable_static=no ;;
  359: 
  360:   --disable-fast-install) enable_fast_install=no ;;
  361: 
  362:   --enable-dlopen) enable_dlopen=yes ;;
  363: 
  364:   --enable-win32-dll) enable_win32_dll=yes ;;
  365: 
  366:   --quiet | --silent) silent=yes ;;
  367: 
  368:   --srcdir) prev=srcdir ;;
  369:   --srcdir=*) srcdir="$optarg" ;;
  370: 
  371:   --no-verify) verify_host=no ;;
  372: 
  373:   --output | -o) prev=ofile ;;
  374:   --output=*) ofile="$optarg" ;;
  375: 
  376:   --version) echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"; exit 0 ;;
  377: 
  378:   --add-tag) prev=tagname ;;
  379:   --add-tag=*) tagname="$optarg" ;;
  380: 
  381:   --with-gcc) with_gcc=yes ;;
  382:   --with-gnu-ld) with_gnu_ld=yes ;;
  383: 
  384:   --prefer-pic) pic_mode=yes ;;
  385:   --prefer-non-pic) pic_mode=no ;;
  386: 
  387:   --disable-lock) need_locks=no ;;
  388: 
  389:   --cache-file=*) cache_file="$optarg" ;;
  390: 
  391:   -*)
  392:     echo "$progname: unrecognized option \`$option'" 1>&2
  393:     echo "$help" 1>&2
  394:     exit 1
  395:     ;;
  396: 
  397:   *)
  398:     if test -z "$ltmain"; then
  399:       ltmain="$option"
  400:     elif test -z "$host"; then
  401: # This generates an unnecessary warning for sparc-sun-solaris4.1.3_U1
  402: #      if test -n "`echo $option| sed 's/[-a-z0-9.]//g'`"; then
  403: #        echo "$progname: warning \`$option' is not a valid host type" 1>&2
  404: #      fi
  405:       host="$option"
  406:     else
  407:       echo "$progname: too many arguments" 1>&2
  408:       echo "$help" 1>&2
  409:       exit 1
  410:     fi ;;
  411:   esac
  412: done
  413: 
  414: if test -z "$ltmain"; then
  415:   echo "$progname: you must specify a LTMAIN file" 1>&2
  416:   echo "$help" 1>&2
  417:   exit 1
  418: fi
  419: 
  420: if test ! -f "$ltmain"; then
  421:   echo "$progname: \`$ltmain' does not exist" 1>&2
  422:   echo "$help" 1>&2
  423:   exit 1
  424: fi
  425: 
  426: if test -n "$tagname"; then
  427:   # Check whether tagname contains only valid characters
  428:   case `$echo "X$tagname" | $Xsed -e 's/[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]//g'` in
  429:   "") ;;
  430:   *)
  431:     echo "$progname: invalid tag name: $tagname" 1>&2
  432:     exit 1
  433:     ;;
  434:   esac
  435: 
  436:   if grep "^### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$ofile" > /dev/null; then
  437:     echo "$progname: tag name $tagname already exists" 1>&2
  438:     exit 1
  439:   fi
  440: 
  441:   if test ! -f "$ofile"; then
  442:     echo "$progname: warning: output file \`$ofile' does not exist" 1>&2
  443:   fi
  444: 
  445:   if test -z "$LTCC"; then
  446:     eval "`$SHELL $ofile --config | grep '^LTCC='`"
  447:     if test -z "$LTCC"; then
  448:       echo "$progname: warning: output file \`$ofile' does not look like a libtool script" 1>&2
  449:     else
  450:       echo "$progname: warning: using \`LTCC=$LTCC', extracted from \`$ofile'" 1>&2
  451:     fi
  452:   fi
  453: fi
  454: 
  455: # Quote any args containing shell metacharacters.
  456: ltconfig_args=
  457: for arg
  458: do
  459:   case $arg in
  460:   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  461:   ltconfig_args="$ltconfig_args '$arg'" ;;
  462:   *) ltconfig_args="$ltconfig_args $arg" ;;
  463:   esac
  464: done
  465: 
  466: # A relevant subset of AC_INIT.
  467: 
  468: # File descriptor usage:
  469: # 0 standard input
  470: # 1 file creation
  471: # 2 errors and warnings
  472: # 3 some systems may open it to /dev/tty
  473: # 4 used on the Kubota Titan
  474: # 5 compiler messages saved in config.log
  475: # 6 checking for... messages and results
  476: if test "$silent" = yes; then
  477:   exec 6>/dev/null
  478: else
  479:   exec 6>&1
  480: fi
  481: exec 5>>./config.log
  482: 
  483: # NLS nuisances.
  484: # Only set LANG and LC_ALL to C if already set.
  485: # These must not be set unconditionally because not all systems understand
  486: # e.g. LANG=C (notably SCO).
  487: if test "X${LC_ALL+set}" = Xset; then LC_ALL=C; export LC_ALL; fi
  488: if test "X${LANG+set}"   = Xset; then LANG=C;   export LANG;   fi
  489: 
  490: if test -n "$cache_file" && test -r "$cache_file" && test -f "$cache_file"; then
  491:   echo "loading cache $cache_file within ltconfig"
  492:   . $cache_file
  493: fi
  494: 
  495: if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  496:   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  497:   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
  498:     ac_n= ac_c='
  499: ' ac_t='        '
  500:   else
  501:     ac_n=-n ac_c= ac_t=
  502:   fi
  503: else
  504:   ac_n= ac_c='\c' ac_t=
  505: fi
  506: 
  507: if test -z "$srcdir"; then
  508:   # Assume the source directory is the same one as the path to LTMAIN.
  509:   srcdir=`$echo "X$ltmain" | $Xsed -e 's%/[^/]*$%%'`
  510:   test "$srcdir" = "$ltmain" && srcdir=.
  511: fi
  512: 
  513: trap "$rm conftest*; exit 1" 1 2 15
  514: if test "$verify_host" = yes; then
  515:   # Check for config.guess and config.sub.
  516:   ac_aux_dir=
  517:   for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
  518:     if test -f $ac_dir/config.guess; then
  519:       ac_aux_dir=$ac_dir
  520:       break
  521:     fi
  522:   done
  523:   if test -z "$ac_aux_dir"; then
  524:     echo "$progname: cannot find config.guess in $srcdir $srcdir/.. $srcdir/../.." 1>&2
  525:     echo "$help" 1>&2
  526:     exit 1
  527:   fi
  528:   ac_config_guess=$ac_aux_dir/config.guess
  529:   ac_config_sub=$ac_aux_dir/config.sub
  530: 
  531:   # Make sure we can run config.sub.
  532:   if $SHELL $ac_config_sub sun4 >/dev/null 2>&1; then :
  533:   else
  534:     echo "$progname: cannot run $ac_config_sub" 1>&2
  535:     echo "$help" 1>&2
  536:     exit 1
  537:   fi
  538: 
  539:   echo $ac_n "checking host system type""... $ac_c" 1>&6
  540: 
  541:   host_alias=$host
  542:   case $host_alias in
  543:   "")
  544:     # Force config.guess to use the C compiler.
  545:     # CC_FOR_BUILD overrides the CC variable in config.guess but I had
  546:     # problems with it so do it this way for now.
  547:     CC="$LTCC"
  548: 
  549:     if host_alias=`$SHELL $ac_config_guess`; then :
  550:     else
  551:       echo "$progname: cannot guess host type; you must specify one" 1>&2
  552:       echo "$help" 1>&2
  553:       exit 1
  554:     fi
  555: 
  556:     # Restore the C compiler.
  557:     CC="$old_CC"
  558:     ;;
  559:   esac
  560:   host=`$SHELL $ac_config_sub $host_alias`
  561:   echo "$ac_t$host" 1>&6
  562: 
  563:   # Make sure the host verified.
  564:   test -z "$host" && exit 1
  565: 
  566:   # Check for the build system type
  567:   echo $ac_n "checking build system type... $ac_c" 1>&6
  568: 
  569:   build_alias=$build
  570:   case $build_alias in
  571:   NONE)
  572:     case $nonopt in
  573:     NONE) build_alias=$host_alias ;;
  574:     *) build_alias=$nonopt ;;
  575:     esac ;;
  576:   esac
  577: 
  578:   build=`$SHELL $ac_config_sub $build_alias`
  579:   build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
  580:   build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
  581:   build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
  582:   echo "$ac_t""$build" 1>&6
  583: 
  584: elif test -z "$host"; then
  585:   echo "$progname: you must specify a host type if you use \`--no-verify'" 1>&2
  586:   echo "$help" 1>&2
  587:   exit 1
  588: else
  589:   host_alias=$host
  590:   build_alias=$host_alias
  591:   build=$host
  592: fi
  593: 
  594: if test x"$host" != x"$build"; then
  595:   ac_tool_prefix=${host_alias}-
  596: else
  597:   ac_tool_prefix=
  598: fi
  599: 
  600: host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
  601: host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
  602: host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
  603: 
  604: # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
  605: case $host_os in
  606: linux-gnu*) ;;
  607: linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
  608: esac
  609: 
  610: case $host_os in
  611: aix3*)
  612:   # AIX sometimes has problems with the GCC collect2 program.  For some
  613:   # reason, if we set the COLLECT_NAMES environment variable, the problems
  614:   # vanish in a puff of smoke.
  615:   if test "X${COLLECT_NAMES+set}" != Xset; then
  616:     COLLECT_NAMES=
  617:     export COLLECT_NAMES
  618:   fi
  619:   ;;
  620: esac
  621: 
  622: # Determine commands to create old-style static archives.
  623: old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
  624: old_postinstall_cmds='chmod 644 $oldlib'
  625: old_postuninstall_cmds=
  626: 
  627: if test -n "$RANLIB"; then
  628:   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
  629:   old_postinstall_cmds="~$old_postinstall_cmds~\$RANLIB \$oldlib"
  630: fi
  631: 
  632: # Source the script associated with the $tagname tag configuration.
  633: if test -n "$tagname"; then
  634:   . $ltmain
  635: else
  636:   # FIXME:  We should use a variable here
  637:   # Configure for a C compiler
  638:   . $srcdir/ltcf-c.sh
  639: fi
  640: 
  641: # Set sane defaults for various variables
  642: test -z "$AR" && AR=ar
  643: test -z "$AR_FLAGS" && AR_FLAGS=cru
  644: test -z "$AS" && AS=as
  645: test -z "$CC" && CC=cc
  646: test -z "$DLLTOOL" && DLLTOOL=dlltool
  647: test -z "$MAGIC_CMD" && MAGIC_CMD=file
  648: test -z "$LD" && LD=ld
  649: test -z "$LN_S" && LN_S="ln -s"
  650: test -z "$NM" && NM=nm
  651: test -z "$OBJDUMP" && OBJDUMP=objdump
  652: test -z "$RANLIB" && RANLIB=:
  653: test -z "$STRIP" && STRIP=:
  654: test -z "$objext" && objext=o
  655: 
  656: echo $ac_n "checking for objdir... $ac_c" 1>&6
  657: rm -f .libs 2>/dev/null
  658: mkdir .libs 2>/dev/null
  659: if test -d .libs; then
  660:   objdir=.libs
  661: else
  662:   # MS-DOS does not allow filenames that begin with a dot.
  663:   objdir=_libs
  664: fi
  665: rmdir .libs 2>/dev/null
  666: echo "$ac_t$objdir" 1>&6
  667: 
  668: # If no C compiler was specified, use CC.
  669: LTCC=${LTCC-"$CC"}
  670: 
  671: # Allow CC to be a program name with arguments.
  672: set dummy $CC
  673: compiler="$2"
  674: 
  675: # We assume here that the value for ac_cv_prog_cc_pic will not be cached
  676: # in isolation, and that seeing it set (from the cache) indicates that
  677: # the associated values are set (in the cache) correctly too.
  678: echo $ac_n "checking for $compiler option to produce PIC... $ac_c" 1>&6
  679: echo "$progname:678:checking for $compiler option to produce PIC" 1>&5
  680: 
  681: if test -z "$ac_cv_prog_cc_pic"; then
  682:   echo "$ac_t"none 1>&6
  683: else
  684:   echo "$ac_t""$ac_cv_prog_cc_pic" 1>&6
  685: 
  686:   # Check to make sure the pic_flag actually works.
  687:   echo $ac_n "checking if $compiler PIC flag $ac_cv_prog_cc_pic works... $ac_c" 1>&6
  688:   echo "$progname:687:checking that $compiler PIC flag $ac_cv_prog_cc_pic works." 1>&5
  689:   if test "X${ac_cv_prog_cc_pic_works+set}" = Xset && \
  690:      test "X${ac_cv_prog_cc_pic_works}" != X; then
  691:     echo $ac_n "(cached) $ac_c" 1>&6
  692:   else
  693:     ac_cv_prog_cc_pic_works=yes
  694:     $rm conftest*
  695:     echo $lt_simple_compile_test_code > conftest.$ac_ext
  696:     save_CFLAGS="$CFLAGS"
  697:     CFLAGS="$CFLAGS $ac_cv_prog_cc_pic -DPIC"
  698:     if { (eval echo $progname:697: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then
  699:       # Append any warnings to the config.log.
  700:       cat conftest.err 1>&5
  701: 
  702:       case $host_os in
  703:       hpux9* | hpux10* | hpux11*)
  704:         # On HP-UX, both CC and GCC only warn that PIC is supported... then
  705:         # they create non-PIC objects.  So, if there were any warnings, we
  706:         # assume that PIC is not supported.
  707:         if test -s conftest.err; then
  708:           ac_cv_prog_cc_pic_works=no
  709:           ac_cv_prog_cc_can_build_shared=no
  710:           ac_cv_prog_cc_pic=
  711:         else
  712:           ac_cv_prog_cc_pic_works=yes
  713:           ac_cv_prog_cc_pic=" $ac_cv_prog_cc_pic"
  714:         fi
  715:         ;;
  716:       *)
  717:         ac_cv_prog_cc_pic_works=yes
  718:         ac_cv_prog_cc_pic=" $ac_cv_prog_cc_pic"
  719:         ;;
  720:       esac
  721:     else
  722:       # Append any errors to the config.log.
  723:       cat conftest.err 1>&5
  724:       ac_cv_prog_cc_pic_works=no
  725:       ac_cv_prog_cc_can_build_shared=no
  726:       ac_cv_prog_cc_pic=
  727:     fi
  728:     CFLAGS="$save_CFLAGS"
  729:     $rm conftest*
  730:   fi
  731:   # Belt *and* braces to stop my trousers falling down:
  732:   if test "X$ac_cv_prog_cc_pic_works" = Xno; then
  733:     ac_cv_prog_cc_pic=
  734:     ac_cv_prog_cc_can_build_shared=no
  735:   fi
  736:   echo "$ac_t""$ac_cv_prog_cc_pic_works" 1>&6
  737: fi
  738: 
  739: # Check for any special shared library compilation flags.
  740: if test -n "$ac_cv_prog_cc_shlib"; then
  741:   echo "$progname: warning: \`$CC' requires \`$ac_cv_prog_cc_shlib' to build shared libraries" 1>&2
  742:   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$ac_cv_prog_cc_shlib[  ]" >/dev/null; then :
  743:   else
  744:     echo "$progname: add \`$ac_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
  745:     ac_cv_prog_cc_can_build_shared=no
  746:   fi
  747: fi
  748: 
  749: echo $ac_n "checking if $compiler static flag $ac_cv_prog_cc_static works... $ac_c" 1>&6
  750: echo "$progname:749: checking if $compiler static flag $ac_cv_prog_cc_static works" >&5
  751: if test "X${ac_cv_prog_cc_static_works+set}" = Xset && \
  752:    test "X${ac_cv_prog_cc_static_works}" != X; then
  753:   echo $ac_n "(cached) $ac_c" 1>&6
  754: else
  755:   $rm conftest*
  756:   echo $lt_simple_link_test_code > conftest.$ac_ext
  757:   save_LDFLAGS="$LDFLAGS"
  758:   LDFLAGS="$LDFLAGS $ac_cv_prog_cc_static"
  759:   if { (eval echo $progname:758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  760:     ac_cv_prog_cc_static_works=yes
  761:   else
  762:     ac_cv_prog_cc_static_works=no
  763:     ac_cv_prog_cc_static=
  764:   fi
  765:   LDFLAGS="$save_LDFLAGS"
  766:   $rm conftest*
  767: fi
  768: # Belt *and* braces to stop my trousers falling down:
  769: if test "X$ac_cv_prog_cc_static_works" = Xno; then
  770:   ac_cv_prog_cc_static=
  771: fi
  772: echo "$ac_t""$ac_cv_prog_cc_static_works" 1>&6
  773: pic_flag="$ac_cv_prog_cc_pic"
  774: special_shlib_compile_flags="$ac_cv_prog_cc_shlib"
  775: wl="$ac_cv_prog_cc_wl"
  776: link_static_flag="$ac_cv_prog_cc_static"
  777: no_builtin_flag="$ac_cv_prog_cc_no_builtin"
  778: can_build_shared="$ac_cv_prog_cc_can_build_shared"
  779: 
  780: # find the maximum length of command line arguments
  781: echo "$progname:780: finding the maximum length of command line arguments" 1>&5
  782: echo $ac_n "finding the maximum length of command line arguments... $ac_c" 1>&6
  783: if test "${lt_cv_sys_max_cmd_len+set}" = set; then
  784:   echo $ac_n "(cached) $ac_c" 1>&6
  785: else
  786:   i=0
  787:   testring="ABCD"
  788:   # If test is not a shell built-in, we'll probably end up computing a
  789:   # maximum length that is only half of the actual maximum length, but
  790:   # we can't tell.
  791:   while test "X"`$CONFIG_SHELL $0 --fallback-echo "X$testring" 2>/dev/null` \
  792:              = "XX$testring" &&
  793:           new_result=`expr "X$testring" : ".*" 2>&1` &&
  794:           lt_cv_sys_max_cmd_len=$new_result &&
  795:           test $i != 17 # 1/2 MB should be enough
  796:   do
  797:     i=`expr $i + 1`
  798:     testring=$testring$testring
  799:   done
  800:   testring=
  801:   # add a significant safety factor because C++ compilers can tack on massive amounts
  802:   # of additional arguments before passing them to the linker.  1/4 should be good.
  803:   len=`expr $lt_cv_sys_max_cmd_len \/ 4`
  804:   lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len - $len`
  805: fi
  806: echo "$progname:@lineno@: result: $lt_cv_sys_max_cmd_len" 1>&5
  807: echo "${ac_t}$lt_cv_sys_max_cmd_len" 1>&6
  808: 
  809: if test -n $lt_cv_sys_max_cmd_len ; then
  810:   max_cmd_len=$lt_cv_sys_max_cmd_len
  811: else
  812:   max_cmd_len=none
  813: fi
  814: 
  815: # Check to see if options -o and -c are simultaneously supported by compiler
  816: echo $ac_n "checking if $compiler supports -c -o file.$objext... $ac_c" 1>&6
  817: if test "${lt_cv_compiler_c_o+set}" = set; then
  818:   echo $ac_n "(cached) $ac_c" 1>&6
  819: else
  820:   $rm -r conftest 2>/dev/null
  821:   mkdir conftest
  822:   cd conftest
  823:   $rm conftest*
  824:   echo $lt_simple_compile_test_code > conftest.$ac_ext
  825:   mkdir out
  826:   # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
  827:   # that will create temporary files in the current directory regardless of
  828:   # the output directory.  Thus, making CWD read-only will cause this test
  829:   # to fail, enabling locking or at least warning the user not to do parallel
  830:   # builds.
  831:   chmod -w .
  832:   save_CFLAGS="$CFLAGS"
  833:   CFLAGS="$CFLAGS -o out/conftest2.$objext"
  834:   echo "$progname:833: checking if $compiler supports -c -o file.$objext" >&5
  835:   if { (eval echo $progname:834: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$objext; then
  836: 
  837:     # The compiler can only warn and ignore the option if not recognized