Changeset 3623 for ThirdParty


Ignore:
Timestamp:
Aug 4, 2016 10:38:30 AM (3 years ago)
Author:
stefan
Message:

rerun autotools -i

Location:
ThirdParty/Glpk/branches/autotools-update
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • ThirdParty/Glpk/branches/autotools-update/config.guess

    r3193 r3623  
    11#! /bin/sh
    22# Attempt to guess a canonical system name.
    3 #   Copyright 1992-2013 Free Software Foundation, Inc.
    4 
    5 timestamp='2013-06-10'
     3#   Copyright 1992-2015 Free Software Foundation, Inc.
     4
     5timestamp='2015-01-01'
    66
    77# This file is free software; you can redistribute it and/or modify it
     
    2525# of the GNU General Public License, version 3 ("GPLv3").
    2626#
    27 # Originally written by Per Bothner.
     27# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
    2828#
    2929# You can get the latest version of this script from:
    3030# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
    3131#
    32 # Please send patches with a ChangeLog entry to config-patches@gnu.org.
     32# Please send patches to <config-patches@gnu.org>.
    3333
    3434
     
    5151
    5252Originally written by Per Bothner.
    53 Copyright 1992-2013 Free Software Foundation, Inc.
     53Copyright 1992-2015 Free Software Foundation, Inc.
    5454
    5555This is free software; see the source for copying conditions.  There is NO
     
    150150        #endif
    151151        EOF
    152         eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
     152        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
    153153        ;;
    154154esac
     
    580580                IBM_ARCH=powerpc
    581581        fi
    582         if [ -x /usr/bin/oslevel ] ; then
    583                 IBM_REV=`/usr/bin/oslevel`
     582        if [ -x /usr/bin/lslpp ] ; then
     583                IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
     584                           awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
    584585        else
    585586                IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
     
    827828        echo ${UNAME_MACHINE}-pc-mingw32
    828829        exit ;;
    829     i*:MSYS*:*)
     830    *:MSYS*:*)
    830831        echo ${UNAME_MACHINE}-pc-msys
    831832        exit ;;
     
    970971        test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
    971972        ;;
    972     or1k:Linux:*:*)
    973         echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
    974         exit ;;
    975     or32:Linux:*:*)
     973    openrisc*:Linux:*:*)
     974        echo or1k-unknown-linux-${LIBC}
     975        exit ;;
     976    or32:Linux:*:* | or1k*:Linux:*:*)
    976977        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
    977978        exit ;;
     
    12611262            UNAME_PROCESSOR=powerpc
    12621263        fi
    1263         if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
    1264             if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
    1265                 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
    1266                 grep IS_64BIT_ARCH >/dev/null
    1267             then
    1268                 case $UNAME_PROCESSOR in
    1269                     i386) UNAME_PROCESSOR=x86_64 ;;
    1270                     powerpc) UNAME_PROCESSOR=powerpc64 ;;
    1271                 esac
     1264        if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
     1265            if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
     1266                if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
     1267                    (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
     1268                    grep IS_64BIT_ARCH >/dev/null
     1269                then
     1270                    case $UNAME_PROCESSOR in
     1271                        i386) UNAME_PROCESSOR=x86_64 ;;
     1272                        powerpc) UNAME_PROCESSOR=powerpc64 ;;
     1273                    esac
     1274                fi
    12721275            fi
     1276        elif test "$UNAME_PROCESSOR" = i386 ; then
     1277            # Avoid executing cc on OS X 10.9, as it ships with a stub
     1278            # that puts up a graphical alert prompting to install
     1279            # developer tools.  Any system running Mac OS X 10.7 or
     1280            # later (Darwin 11 and later) is required to have a 64-bit
     1281            # processor. This is not true of the ARM version of Darwin
     1282            # that Apple uses in portable devices.
     1283            UNAME_PROCESSOR=x86_64
    12731284        fi
    12741285        echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
     
    13621373esac
    13631374
    1364 eval $set_cc_for_build
    1365 cat >$dummy.c <<EOF
    1366 #ifdef _SEQUENT_
    1367 # include <sys/types.h>
    1368 # include <sys/utsname.h>
    1369 #endif
    1370 main ()
    1371 {
    1372 #if defined (sony)
    1373 #if defined (MIPSEB)
    1374   /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
    1375      I don't know....  */
    1376   printf ("mips-sony-bsd\n"); exit (0);
    1377 #else
    1378 #include <sys/param.h>
    1379   printf ("m68k-sony-newsos%s\n",
    1380 #ifdef NEWSOS4
    1381         "4"
    1382 #else
    1383         ""
    1384 #endif
    1385         ); exit (0);
    1386 #endif
    1387 #endif
    1388 
    1389 #if defined (__arm) && defined (__acorn) && defined (__unix)
    1390   printf ("arm-acorn-riscix\n"); exit (0);
    1391 #endif
    1392 
    1393 #if defined (hp300) && !defined (hpux)
    1394   printf ("m68k-hp-bsd\n"); exit (0);
    1395 #endif
    1396 
    1397 #if defined (NeXT)
    1398 #if !defined (__ARCHITECTURE__)
    1399 #define __ARCHITECTURE__ "m68k"
    1400 #endif
    1401   int version;
    1402   version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
    1403   if (version < 4)
    1404     printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
    1405   else
    1406     printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
    1407   exit (0);
    1408 #endif
    1409 
    1410 #if defined (MULTIMAX) || defined (n16)
    1411 #if defined (UMAXV)
    1412   printf ("ns32k-encore-sysv\n"); exit (0);
    1413 #else
    1414 #if defined (CMU)
    1415   printf ("ns32k-encore-mach\n"); exit (0);
    1416 #else
    1417   printf ("ns32k-encore-bsd\n"); exit (0);
    1418 #endif
    1419 #endif
    1420 #endif
    1421 
    1422 #if defined (__386BSD__)
    1423   printf ("i386-pc-bsd\n"); exit (0);
    1424 #endif
    1425 
    1426 #if defined (sequent)
    1427 #if defined (i386)
    1428   printf ("i386-sequent-dynix\n"); exit (0);
    1429 #endif
    1430 #if defined (ns32000)
    1431   printf ("ns32k-sequent-dynix\n"); exit (0);
    1432 #endif
    1433 #endif
    1434 
    1435 #if defined (_SEQUENT_)
    1436     struct utsname un;
    1437 
    1438     uname(&un);
    1439 
    1440     if (strncmp(un.version, "V2", 2) == 0) {
    1441         printf ("i386-sequent-ptx2\n"); exit (0);
    1442     }
    1443     if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
    1444         printf ("i386-sequent-ptx1\n"); exit (0);
    1445     }
    1446     printf ("i386-sequent-ptx\n"); exit (0);
    1447 
    1448 #endif
    1449 
    1450 #if defined (vax)
    1451 # if !defined (ultrix)
    1452 #  include <sys/param.h>
    1453 #  if defined (BSD)
    1454 #   if BSD == 43
    1455       printf ("vax-dec-bsd4.3\n"); exit (0);
    1456 #   else
    1457 #    if BSD == 199006
    1458       printf ("vax-dec-bsd4.3reno\n"); exit (0);
    1459 #    else
    1460       printf ("vax-dec-bsd\n"); exit (0);
    1461 #    endif
    1462 #   endif
    1463 #  else
    1464     printf ("vax-dec-bsd\n"); exit (0);
    1465 #  endif
    1466 # else
    1467     printf ("vax-dec-ultrix\n"); exit (0);
    1468 # endif
    1469 #endif
    1470 
    1471 #if defined (alliant) && defined (i860)
    1472   printf ("i860-alliant-bsd\n"); exit (0);
    1473 #endif
    1474 
    1475   exit (1);
    1476 }
    1477 EOF
    1478 
    1479 $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
    1480         { echo "$SYSTEM_NAME"; exit; }
    1481 
    1482 # Apollos put the system type in the environment.
    1483 
    1484 test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
    1485 
    1486 # Convex versions that predate uname can use getsysinfo(1)
    1487 
    1488 if [ -x /usr/convex/getsysinfo ]
    1489 then
    1490     case `getsysinfo -f cpu_type` in
    1491     c1*)
    1492         echo c1-convex-bsd
    1493         exit ;;
    1494     c2*)
    1495         if getsysinfo -f scalar_acc
    1496         then echo c32-convex-bsd
    1497         else echo c2-convex-bsd
    1498         fi
    1499         exit ;;
    1500     c34*)
    1501         echo c34-convex-bsd
    1502         exit ;;
    1503     c38*)
    1504         echo c38-convex-bsd
    1505         exit ;;
    1506     c4*)
    1507         echo c4-convex-bsd
    1508         exit ;;
    1509     esac
    1510 fi
    1511 
    15121375cat >&2 <<EOF
    15131376$0: unable to guess system type
  • ThirdParty/Glpk/branches/autotools-update/config.sub

    r3193 r3623  
    11#! /bin/sh
    22# Configuration validation subroutine script.
    3 #   Copyright 1992-2013 Free Software Foundation, Inc.
    4 
    5 timestamp='2013-04-24'
     3#   Copyright 1992-2015 Free Software Foundation, Inc.
     4
     5timestamp='2015-01-01'
    66
    77# This file is free software; you can redistribute it and/or modify it
     
    2626
    2727
    28 # Please send patches with a ChangeLog entry to config-patches@gnu.org.
     28# Please send patches to <config-patches@gnu.org>.
    2929#
    3030# Configuration subroutine to validate and canonicalize a configuration type.
     
    6969GNU config.sub ($timestamp)
    7070
    71 Copyright 1992-2013 Free Software Foundation, Inc.
     71Copyright 1992-2015 Free Software Foundation, Inc.
    7272
    7373This is free software; see the source for copying conditions.  There is NO
     
    258258        | be32 | be64 \
    259259        | bfin \
    260         | c4x | clipper \
     260        | c4x | c8051 | clipper \
    261261        | d10v | d30v | dlx | dsp16xx \
    262262        | epiphany \
    263         | fido | fr30 | frv \
     263        | fido | fr30 | frv | ft32 \
    264264        | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
    265265        | hexagon \
    266266        | i370 | i860 | i960 | ia64 \
    267267        | ip2k | iq2000 \
     268        | k1om \
    268269        | le32 | le64 \
    269270        | lm32 \
     
    283284        | mipsisa32 | mipsisa32el \
    284285        | mipsisa32r2 | mipsisa32r2el \
     286        | mipsisa32r6 | mipsisa32r6el \
    285287        | mipsisa64 | mipsisa64el \
    286288        | mipsisa64r2 | mipsisa64r2el \
     289        | mipsisa64r6 | mipsisa64r6el \
    287290        | mipsisa64sb1 | mipsisa64sb1el \
    288291        | mipsisa64sr71k | mipsisa64sr71kel \
     
    296299        | nios | nios2 | nios2eb | nios2el \
    297300        | ns16k | ns32k \
    298         | open8 \
    299         | or1k | or32 \
     301        | open8 | or1k | or1knd | or32 \
    300302        | pdp10 | pdp11 | pj | pjl \
    301303        | powerpc | powerpc64 | powerpc64le | powerpcle \
    302304        | pyramid \
     305        | riscv32 | riscv64 \
    303306        | rl78 | rx \
    304307        | score \
     
    311314        | ubicom32 \
    312315        | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
     316        | visium \
    313317        | we32k \
    314318        | x86 | xc16x | xstormy16 | xtensa \
     
    325329                basic_machine=tic6x-unknown
    326330                ;;
    327         m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
     331        leon|leon[3-9])
     332                basic_machine=sparc-$basic_machine
     333                ;;
     334        m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
    328335                basic_machine=$basic_machine-unknown
    329336                os=-none
     
    373380        | bfin-* | bs2000-* \
    374381        | c[123]* | c30-* | [cjt]90-* | c4x-* \
    375         | clipper-* | craynv-* | cydra-* \
     382        | c8051-* | clipper-* | craynv-* | cydra-* \
    376383        | d10v-* | d30v-* | dlx-* \
    377384        | elxsi-* \
     
    382389        | i*86-* | i860-* | i960-* | ia64-* \
    383390        | ip2k-* | iq2000-* \
     391        | k1om-* \
    384392        | le32-* | le64-* \
    385393        | lm32-* \
     
    401409        | mipsisa32-* | mipsisa32el-* \
    402410        | mipsisa32r2-* | mipsisa32r2el-* \
     411        | mipsisa32r6-* | mipsisa32r6el-* \
    403412        | mipsisa64-* | mipsisa64el-* \
    404413        | mipsisa64r2-* | mipsisa64r2el-* \
     414        | mipsisa64r6-* | mipsisa64r6el-* \
    405415        | mipsisa64sb1-* | mipsisa64sb1el-* \
    406416        | mipsisa64sr71k-* | mipsisa64sr71kel-* \
     
    414424        | none-* | np1-* | ns16k-* | ns32k-* \
    415425        | open8-* \
     426        | or1k*-* \
    416427        | orion-* \
    417428        | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
     
    431442        | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
    432443        | vax-* \
     444        | visium-* \
    433445        | we32k-* \
    434446        | x86-* | x86_64-* | xc16x-* | xps100-* \
     
    768780                os=-sysv
    769781                ;;
     782        leon-*|leon[3-9]-*)
     783                basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'`
     784                ;;
    770785        m68knommu)
    771786                basic_machine=m68k-unknown
     
    795810                ;;
    796811        mingw32)
    797                 basic_machine=i386-pc
     812                basic_machine=i686-pc
    798813                os=-mingw32
    799814                ;;
     
    823838                os=-morphos
    824839                ;;
     840        moxiebox)
     841                basic_machine=moxie-unknown
     842                os=-moxiebox
     843                ;;
    825844        msdos)
    826845                basic_machine=i386-pc
     
    831850                ;;
    832851        msys)
    833                 basic_machine=i386-pc
     852                basic_machine=i686-pc
    834853                os=-msys
    835854                ;;
     
    13681387              | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
    13691388              | -linux-newlib* | -linux-musl* | -linux-uclibc* \
    1370               | -uxpv* | -beos* | -mpeix* | -udk* \
     1389              | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
    13711390              | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
    13721391              | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
     
    13751394              | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
    13761395              | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
    1377               | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
     1396              | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*)
    13781397        # Remember, each alternative MUST END IN *, to match a version number.
    13791398                ;;
     
    15471566                os=-coff
    15481567                ;;
     1568        c8051-*)
     1569                os=-elf
     1570                ;;
    15491571        hexagon-*)
    15501572                os=-elf
     
    15881610                ;;
    15891611        mips*-*)
    1590                 os=-elf
    1591                 ;;
    1592         or1k-*)
    15931612                os=-elf
    15941613                ;;
  • ThirdParty/Glpk/branches/autotools-update/depcomp

    r3193 r3623  
    44scriptversion=2013-05-30.07; # UTC
    55
    6 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
     6# Copyright (C) 1999-2015 Free Software Foundation, Inc.
    77
    88# This program is free software; you can redistribute it and/or modify
     
    250250  # since it is checked for above.
    251251  exit 1
    252   ;;
    253 
    254 sgi)
    255   if test "$libtool" = yes; then
    256     "$@" "-Wp,-MDupdate,$tmpdepfile"
    257   else
    258     "$@" -MDupdate "$tmpdepfile"
    259   fi
    260   stat=$?
    261   if test $stat -ne 0; then
    262     rm -f "$tmpdepfile"
    263     exit $stat
    264   fi
    265   rm -f "$depfile"
    266 
    267   if test -f "$tmpdepfile"; then  # yes, the sourcefile depend on other files
    268     echo "$object : \\" > "$depfile"
    269     # Clip off the initial element (the dependent).  Don't try to be
    270     # clever and replace this with sed code, as IRIX sed won't handle
    271     # lines with more than a fixed number of characters (4096 in
    272     # IRIX 6.2 sed, 8192 in IRIX 6.5).  We also remove comment lines;
    273     # the IRIX cc adds comments like '#:fec' to the end of the
    274     # dependency line.
    275     tr ' ' "$nl" < "$tmpdepfile" \
    276       | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \
    277       | tr "$nl" ' ' >> "$depfile"
    278     echo >> "$depfile"
    279     # The second pass generates a dummy entry for each header file.
    280     tr ' ' "$nl" < "$tmpdepfile" \
    281       | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
    282       >> "$depfile"
    283   else
    284     make_dummy_depfile
    285   fi
    286   rm -f "$tmpdepfile"
    287252  ;;
    288253
  • ThirdParty/Glpk/branches/autotools-update/install-sh

    r3193 r3623  
    22# install - install a program, script, or datafile
    33
    4 scriptversion=2011-11-20.07; # UTC
     4scriptversion=2013-12-25.23; # UTC
    55
    66# This originates from X11R5 (mit/util/scripts/install.sh), which was
     
    4242# from scratch.
    4343
     44tab='   '
    4445nl='
    4546'
    46 IFS=" ""        $nl"
    47 
    48 # set DOITPROG to echo to test this script
    49 
    50 # Don't use :- since 4.3BSD and earlier shells don't like it.
     47IFS=" $tab$nl"
     48
     49# Set DOITPROG to "echo" to test this script.
     50
    5151doit=${DOITPROG-}
    52 if test -z "$doit"; then
    53   doit_exec=exec
    54 else
    55   doit_exec=$doit
    56 fi
     52doit_exec=${doit:-exec}
    5753
    5854# Put in absolute file names if you don't have them in your path;
     
    6965stripprog=${STRIPPROG-strip}
    7066
    71 posix_glob='?'
    72 initialize_posix_glob='
    73   test "$posix_glob" != "?" || {
    74     if (set -f) 2>/dev/null; then
    75       posix_glob=
    76     else
    77       posix_glob=:
    78     fi
    79   }
    80 '
    81 
    8267posix_mkdir=
    8368
     
    9883
    9984copy_on_change=false
    100 no_target_directory=
     85is_target_a_directory=possibly
    10186
    10287usage="\
     
    138123
    139124    -g) chgrpcmd="$chgrpprog $2"
    140         shift;;
     125        shift;;
    141126
    142127    --help) echo "$usage"; exit $?;;
    143128
    144129    -m) mode=$2
    145         case $mode in
    146           *' '* | *'    '* | *'
    147 '*        | *'*'* | *'?'* | *'['*)
    148             echo "$0: invalid mode: $mode" >&2
    149             exit 1;;
    150         esac
    151         shift;;
     130        case $mode in
     131          *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
     132            echo "$0: invalid mode: $mode" >&2
     133            exit 1;;
     134        esac
     135        shift;;
    152136
    153137    -o) chowncmd="$chownprog $2"
    154         shift;;
     138        shift;;
    155139
    156140    -s) stripcmd=$stripprog;;
    157141
    158     -t) dst_arg=$2
    159         # Protect names problematic for 'test' and other utilities.
    160         case $dst_arg in
    161           -* | [=\(\)!]) dst_arg=./$dst_arg;;
    162         esac
    163         shift;;
    164 
    165     -T) no_target_directory=true;;
     142    -t)
     143        is_target_a_directory=always
     144        dst_arg=$2
     145        # Protect names problematic for 'test' and other utilities.
     146        case $dst_arg in
     147          -* | [=\(\)!]) dst_arg=./$dst_arg;;
     148        esac
     149        shift;;
     150
     151    -T) is_target_a_directory=never;;
    166152
    167153    --version) echo "$0 $scriptversion"; exit $?;;
    168154
    169     --) shift
    170         break;;
    171 
    172     -*) echo "$0: invalid option: $1" >&2
    173         exit 1;;
     155    --) shift
     156        break;;
     157
     158    -*) echo "$0: invalid option: $1" >&2
     159        exit 1;;
    174160
    175161    *)  break;;
     
    177163  shift
    178164done
     165
     166# We allow the use of options -d and -T together, by making -d
     167# take the precedence; this is for compatibility with GNU install.
     168
     169if test -n "$dir_arg"; then
     170  if test -n "$dst_arg"; then
     171    echo "$0: target directory not allowed when installing a directory." >&2
     172    exit 1
     173  fi
     174fi
    179175
    180176if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
     
    209205
    210206if test -z "$dir_arg"; then
     207  if test $# -gt 1 || test "$is_target_a_directory" = always; then
     208    if test ! -d "$dst_arg"; then
     209      echo "$0: $dst_arg: Is not a directory." >&2
     210      exit 1
     211    fi
     212  fi
     213fi
     214
     215if test -z "$dir_arg"; then
    211216  do_exit='(exit $ret); exit $ret'
    212217  trap "ret=129; $do_exit" 1
     
    224229    *[0-7])
    225230      if test -z "$stripcmd"; then
    226         u_plus_rw=
     231        u_plus_rw=
    227232      else
    228         u_plus_rw='% 200'
     233        u_plus_rw='% 200'
    229234      fi
    230235      cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
    231236    *)
    232237      if test -z "$stripcmd"; then
    233         u_plus_rw=
     238        u_plus_rw=
    234239      else
    235         u_plus_rw=,u+rw
     240        u_plus_rw=,u+rw
    236241      fi
    237242      cp_umask=$mode$u_plus_rw;;
     
    270275    # if double slashes aren't ignored.
    271276    if test -d "$dst"; then
    272       if test -n "$no_target_directory"; then
    273         echo "$0: $dst_arg: Is a directory" >&2
    274         exit 1
     277      if test "$is_target_a_directory" = never; then
     278        echo "$0: $dst_arg: Is a directory" >&2
     279        exit 1
    275280      fi
    276281      dstdir=$dst
     
    278283      dstdir_status=0
    279284    else
    280       # Prefer dirname, but fall back on a substitute if dirname fails.
    281       dstdir=`
    282         (dirname "$dst") 2>/dev/null ||
    283         expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
    284              X"$dst" : 'X\(//\)[^/]' \| \
    285              X"$dst" : 'X\(//\)$' \| \
    286              X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
    287         echo X"$dst" |
    288             sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
    289                    s//\1/
    290                    q
    291                  }
    292                  /^X\(\/\/\)[^/].*/{
    293                    s//\1/
    294                    q
    295                  }
    296                  /^X\(\/\/\)$/{
    297                    s//\1/
    298                    q
    299                  }
    300                  /^X\(\/\).*/{
    301                    s//\1/
    302                    q
    303                  }
    304                  s/.*/./; q'
    305       `
    306 
     285      dstdir=`dirname "$dst"`
    307286      test -d "$dstdir"
    308287      dstdir_status=$?
     
    315294    case $posix_mkdir in
    316295      '')
    317         # Create intermediate dirs using mode 755 as modified by the umask.
    318         # This is like FreeBSD 'install' as of 1997-10-28.
    319         umask=`umask`
    320         case $stripcmd.$umask in
    321           # Optimize common cases.
    322           *[2367][2367]) mkdir_umask=$umask;;
    323           .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
    324 
    325           *[0-7])
    326             mkdir_umask=`expr $umask + 22 \
    327               - $umask % 100 % 40 + $umask % 20 \
    328               - $umask % 10 % 4 + $umask % 2
    329             `;;
    330           *) mkdir_umask=$umask,go-w;;
    331         esac
    332 
    333         # With -d, create the new directory with the user-specified mode.
    334         # Otherwise, rely on $mkdir_umask.
    335         if test -n "$dir_arg"; then
    336           mkdir_mode=-m$mode
    337         else
    338           mkdir_mode=
    339         fi
    340 
    341         posix_mkdir=false
    342         case $umask in
    343           *[123567][0-7][0-7])
    344             # POSIX mkdir -p sets u+wx bits regardless of umask, which
    345             # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
    346             ;;
    347           *)
    348             tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
    349             trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
    350 
    351             if (umask $mkdir_umask &&
    352                 exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
    353             then
    354               if test -z "$dir_arg" || {
    355                    # Check for POSIX incompatibilities with -m.
    356                    # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
    357                    # other-writable bit of parent directory when it shouldn't.
    358                    # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
    359                    ls_ld_tmpdir=`ls -ld "$tmpdir"`
    360                    case $ls_ld_tmpdir in
    361                      d????-?r-*) different_mode=700;;
    362                      d????-?--*) different_mode=755;;
    363                      *) false;;
    364                    esac &&
    365                    $mkdirprog -m$different_mode -p -- "$tmpdir" && {
    366                      ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
    367                      test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
    368                    }
    369                 }
    370               then posix_mkdir=:
    371               fi
    372               rmdir "$tmpdir/d" "$tmpdir"
    373             else
    374               # Remove any dirs left behind by ancient mkdir implementations.
    375               rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
    376             fi
    377             trap '' 0;;
    378         esac;;
     296        # Create intermediate dirs using mode 755 as modified by the umask.
     297        # This is like FreeBSD 'install' as of 1997-10-28.
     298        umask=`umask`
     299        case $stripcmd.$umask in
     300          # Optimize common cases.
     301          *[2367][2367]) mkdir_umask=$umask;;
     302          .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
     303
     304          *[0-7])
     305            mkdir_umask=`expr $umask + 22 \
     306              - $umask % 100 % 40 + $umask % 20 \
     307              - $umask % 10 % 4 + $umask % 2
     308            `;;
     309          *) mkdir_umask=$umask,go-w;;
     310        esac
     311
     312        # With -d, create the new directory with the user-specified mode.
     313        # Otherwise, rely on $mkdir_umask.
     314        if test -n "$dir_arg"; then
     315          mkdir_mode=-m$mode
     316        else
     317          mkdir_mode=
     318        fi
     319
     320        posix_mkdir=false
     321        case $umask in
     322          *[123567][0-7][0-7])
     323            # POSIX mkdir -p sets u+wx bits regardless of umask, which
     324            # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
     325            ;;
     326          *)
     327            tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
     328            trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
     329
     330            if (umask $mkdir_umask &&
     331                exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
     332            then
     333              if test -z "$dir_arg" || {
     334                   # Check for POSIX incompatibilities with -m.
     335                   # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
     336                   # other-writable bit of parent directory when it shouldn't.
     337                   # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
     338                   ls_ld_tmpdir=`ls -ld "$tmpdir"`
     339                   case $ls_ld_tmpdir in
     340                     d????-?r-*) different_mode=700;;
     341                     d????-?--*) different_mode=755;;
     342                     *) false;;
     343                   esac &&
     344                   $mkdirprog -m$different_mode -p -- "$tmpdir" && {
     345                     ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
     346                     test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
     347                   }
     348                }
     349              then posix_mkdir=:
     350              fi
     351              rmdir "$tmpdir/d" "$tmpdir"
     352            else
     353              # Remove any dirs left behind by ancient mkdir implementations.
     354              rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
     355            fi
     356            trap '' 0;;
     357        esac;;
    379358    esac
    380359
    381360    if
    382361      $posix_mkdir && (
    383         umask $mkdir_umask &&
    384         $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
     362        umask $mkdir_umask &&
     363        $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
    385364      )
    386365    then :
     
    392371
    393372      case $dstdir in
    394         /*) prefix='/';;
    395         [-=\(\)!]*) prefix='./';;
    396         *)  prefix='';;
     373        /*) prefix='/';;
     374        [-=\(\)!]*) prefix='./';;
     375        *)  prefix='';;
    397376      esac
    398 
    399       eval "$initialize_posix_glob"
    400377
    401378      oIFS=$IFS
    402379      IFS=/
    403       $posix_glob set -f
     380      set -f
    404381      set fnord $dstdir
    405382      shift
    406       $posix_glob set +f
     383      set +f
    407384      IFS=$oIFS
    408385
     
    411388      for d
    412389      do
    413         test X"$d" = X && continue
    414 
    415         prefix=$prefix$d
    416         if test -d "$prefix"; then
    417           prefixes=
    418         else
    419           if $posix_mkdir; then
    420             (umask=$mkdir_umask &&
    421              $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
    422             # Don't fail if two instances are running concurrently.
    423             test -d "$prefix" || exit 1
    424           else
    425             case $prefix in
    426               *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
    427               *) qprefix=$prefix;;
    428             esac
    429             prefixes="$prefixes '$qprefix'"
    430           fi
    431         fi
    432         prefix=$prefix/
     390        test X"$d" = X && continue
     391
     392        prefix=$prefix$d
     393        if test -d "$prefix"; then
     394          prefixes=
     395        else
     396          if $posix_mkdir; then
     397            (umask=$mkdir_umask &&
     398             $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
     399            # Don't fail if two instances are running concurrently.
     400            test -d "$prefix" || exit 1
     401          else
     402            case $prefix in
     403              *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
     404              *) qprefix=$prefix;;
     405            esac
     406            prefixes="$prefixes '$qprefix'"
     407          fi
     408        fi
     409        prefix=$prefix/
    433410      done
    434411
    435412      if test -n "$prefixes"; then
    436         # Don't fail if two instances are running concurrently.
    437         (umask $mkdir_umask &&
    438         eval "\$doit_exec \$mkdirprog $prefixes") ||
    439           test -d "$dstdir" || exit 1
    440         obsolete_mkdir_used=true
     413        # Don't fail if two instances are running concurrently.
     414        (umask $mkdir_umask &&
     415        eval "\$doit_exec \$mkdirprog $prefixes") ||
     416          test -d "$dstdir" || exit 1
     417        obsolete_mkdir_used=true
    441418      fi
    442419    fi
     
    473450    # If -C, don't bother to copy if it wouldn't change the file.
    474451    if $copy_on_change &&
    475        old=`LC_ALL=C ls -dlL "$dst"     2>/dev/null` &&
    476        new=`LC_ALL=C ls -dlL "$dsttmp"  2>/dev/null` &&
    477 
    478        eval "$initialize_posix_glob" &&
    479        $posix_glob set -f &&
     452       old=`LC_ALL=C ls -dlL "$dst"     2>/dev/null` &&
     453       new=`LC_ALL=C ls -dlL "$dsttmp"  2>/dev/null` &&
     454       set -f &&
    480455       set X $old && old=:$2:$4:$5:$6 &&
    481456       set X $new && new=:$2:$4:$5:$6 &&
    482        $posix_glob set +f &&
    483 
     457       set +f &&
    484458       test "$old" = "$new" &&
    485459       $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
     
    494468      # support -f.
    495469      {
    496         # Now remove or move aside any old file at destination location.
    497         # We try this two ways since rm can't unlink itself on some
    498         # systems and the destination file might be busy for other
    499         # reasons.  In this case, the final cleanup might fail but the new
    500         # file should still install successfully.
    501         {
    502           test ! -f "$dst" ||
    503           $doit $rmcmd -f "$dst" 2>/dev/null ||
    504           { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
    505             { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
    506           } ||
    507           { echo "$0: cannot unlink or rename $dst" >&2
    508             (exit 1); exit 1
    509           }
    510         } &&
    511 
    512         # Now rename the file to the real destination.
    513         $doit $mvcmd "$dsttmp" "$dst"
     470        # Now remove or move aside any old file at destination location.
     471        # We try this two ways since rm can't unlink itself on some
     472        # systems and the destination file might be busy for other
     473        # reasons.  In this case, the final cleanup might fail but the new
     474        # file should still install successfully.
     475        {
     476          test ! -f "$dst" ||
     477          $doit $rmcmd -f "$dst" 2>/dev/null ||
     478          { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
     479            { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
     480          } ||
     481          { echo "$0: cannot unlink or rename $dst" >&2
     482            (exit 1); exit 1
     483          }
     484        } &&
     485
     486        # Now rename the file to the real destination.
     487        $doit $mvcmd "$dsttmp" "$dst"
    514488      }
    515489    fi || exit 1
  • ThirdParty/Glpk/branches/autotools-update/ltmain.sh

    r3193 r3623  
    1 
    2 # libtool (GNU libtool) 2.4.2
     1#! /bin/sh
     2## DO NOT EDIT - This file generated from ./build-aux/ltmain.in
     3##               by inline-source v2014-01-03.01
     4
     5# libtool (GNU libtool) 2.4.6
     6# Provide generalized library-building support services.
    37# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
    48
    5 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
    6 # 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
     9# Copyright (C) 1996-2015 Free Software Foundation, Inc.
    710# This is free software; see the source for copying conditions.  There is NO
    811# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
     
    2427#
    2528# You should have received a copy of the GNU General Public License
    26 # along with GNU Libtool; see the file COPYING.  If not, a copy
    27 # can be downloaded from http://www.gnu.org/licenses/gpl.html,
    28 # or obtained by writing to the Free Software Foundation, Inc.,
    29 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
    30 
    31 # Usage: $progname [OPTION]... [MODE-ARG]...
    32 #
    33 # Provide generalized library-building support services.
    34 #
    35 #       --config             show all configuration variables
    36 #       --debug              enable verbose shell tracing
    37 #   -n, --dry-run            display commands without modifying any files
    38 #       --features           display basic configuration information and exit
    39 #       --mode=MODE          use operation mode MODE
    40 #       --preserve-dup-deps  don't remove duplicate dependency libraries
    41 #       --quiet, --silent    don't print informational messages
    42 #       --no-quiet, --no-silent
    43 #                            print informational messages (default)
    44 #       --no-warn            don't display warning messages
    45 #       --tag=TAG            use configuration variables from tag TAG
    46 #   -v, --verbose            print more informational messages than default
    47 #       --no-verbose         don't print the extra informational messages
    48 #       --version            print version information
    49 #   -h, --help, --help-all   print short, long, or detailed help message
    50 #
    51 # MODE must be one of the following:
    52 #
    53 #         clean              remove files from the build directory
    54 #         compile            compile a source file into a libtool object
    55 #         execute            automatically set library path, then run a program
    56 #         finish             complete the installation of libtool libraries
    57 #         install            install libraries or executables
    58 #         link               create a library or an executable
    59 #         uninstall          remove libraries from an installed directory
    60 #
    61 # MODE-ARGS vary depending on the MODE.  When passed as first option,
    62 # `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that.
    63 # Try `$progname --help --mode=MODE' for a more detailed description of MODE.
    64 #
    65 # When reporting a bug, please describe a test case to reproduce it and
    66 # include the following information:
    67 #
    68 #         host-triplet: $host
    69 #         shell:                $SHELL
    70 #         compiler:             $LTCC
    71 #         compiler flags:               $LTCFLAGS
    72 #         linker:               $LD (gnu? $with_gnu_ld)
    73 #         $progname:    (GNU libtool) 2.4.2
    74 #         automake:     $automake_version
    75 #         autoconf:     $autoconf_version
    76 #
    77 # Report bugs to <bug-libtool@gnu.org>.
    78 # GNU libtool home page: <http://www.gnu.org/software/libtool/>.
    79 # General help using GNU software: <http://www.gnu.org/gethelp/>.
     29# along with this program.  If not, see <http://www.gnu.org/licenses/>.
     30
    8031
    8132PROGRAM=libtool
    8233PACKAGE=libtool
    83 VERSION=2.4.2
    84 TIMESTAMP=""
    85 package_revision=1.3337
    86 
    87 # Be Bourne compatible
    88 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
     34VERSION=2.4.6
     35package_revision=2.4.6
     36
     37
     38## ------ ##
     39## Usage. ##
     40## ------ ##
     41
     42# Run './libtool --help' for help with using this script from the
     43# command line.
     44
     45
     46## ------------------------------- ##
     47## User overridable command paths. ##
     48## ------------------------------- ##
     49
     50# After configure completes, it has a better idea of some of the
     51# shell tools we need than the defaults used by the functions shared
     52# with bootstrap, so set those here where they can still be over-
     53# ridden by the user, but otherwise take precedence.
     54
     55: ${AUTOCONF="autoconf"}
     56: ${AUTOMAKE="automake"}
     57
     58
     59## -------------------------- ##
     60## Source external libraries. ##
     61## -------------------------- ##
     62
     63# Much of our low-level functionality needs to be sourced from external
     64# libraries, which are installed to $pkgauxdir.
     65
     66# Set a version string for this script.
     67scriptversion=2015-01-20.17; # UTC
     68
     69# General shell script boiler plate, and helper functions.
     70# Written by Gary V. Vaughan, 2004
     71
     72# Copyright (C) 2004-2015 Free Software Foundation, Inc.
     73# This is free software; see the source for copying conditions.  There is NO
     74# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
     75
     76# This program is free software; you can redistribute it and/or modify
     77# it under the terms of the GNU General Public License as published by
     78# the Free Software Foundation; either version 3 of the License, or
     79# (at your option) any later version.
     80
     81# As a special exception to the GNU General Public License, if you distribute
     82# this file as part of a program or library that is built using GNU Libtool,
     83# you may include this file under the same distribution terms that you use
     84# for the rest of that program.
     85
     86# This program is distributed in the hope that it will be useful,
     87# but WITHOUT ANY WARRANTY; without even the implied warranty of
     88# MERCHANTABILITY or FITNES FOR A PARTICULAR PURPOSE. See the GNU
     89# General Public License for more details.
     90
     91# You should have received a copy of the GNU General Public License
     92# along with this program. If not, see <http://www.gnu.org/licenses/>.
     93
     94# Please report bugs or propose patches to gary@gnu.org.
     95
     96
     97## ------ ##
     98## Usage. ##
     99## ------ ##
     100
     101# Evaluate this file near the top of your script to gain access to
     102# the functions and variables defined here:
     103#
     104#   . `echo "$0" | ${SED-sed} 's|[^/]*$||'`/build-aux/funclib.sh
     105#
     106# If you need to override any of the default environment variable
     107# settings, do that before evaluating this file.
     108
     109
     110## -------------------- ##
     111## Shell normalisation. ##
     112## -------------------- ##
     113
     114# Some shells need a little help to be as Bourne compatible as possible.
     115# Before doing anything else, make sure all that help has been provided!
     116
     117DUALCASE=1; export DUALCASE # for MKS sh
     118if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
    89119  emulate sh
    90120  NULLCMD=:
    91   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
     121  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
    92122  # is contrary to our usage.  Disable this feature.
    93123  alias -g '${1+"$@"}'='"$@"'
    94124  setopt NO_GLOB_SUBST
    95125else
    96   case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
     126  case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac
    97127fi
    98 BIN_SH=xpg4; export BIN_SH # for Tru64
    99 DUALCASE=1; export DUALCASE # for MKS sh
    100 
    101 # A function that is used when there is no print builtin or printf.
    102 func_fallback_echo ()
    103 {
    104   eval 'cat <<_LTECHO_EOF
    105 $1
    106 _LTECHO_EOF'
    107 }
    108 
    109 # NLS nuisances: We save the old values to restore during execute mode.
    110 lt_user_locale=
    111 lt_safe_locale=
    112 for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
     128
     129# NLS nuisances: We save the old values in case they are required later.
     130_G_user_locale=
     131_G_safe_locale=
     132for _G_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
    113133do
    114   eval "if test \"\${$lt_var+set}\" = set; then
    115           save_$lt_var=\$$lt_var
    116           $lt_var=C
    117           export $lt_var
    118           lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\"
    119           lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\"
     134  eval "if test set = \"\${$_G_var+set}\"; then
     135          save_$_G_var=\$$_G_var
     136          $_G_var=C
     137          export $_G_var
     138          _G_user_locale=\"$_G_var=\\\$save_\$_G_var; \$_G_user_locale\"
     139          _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\"
    120140        fi"
    121141done
    122 LC_ALL=C
    123 LANGUAGE=C
    124 export LANGUAGE LC_ALL
    125 
    126 $lt_unset CDPATH
    127 
     142
     143# CDPATH.
     144(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
     145
     146# Make sure IFS has a sensible default
     147sp=' '
     148nl='
     149'
     150IFS="$sp        $nl"
     151
     152# There are apparently some retarded systems that use ';' as a PATH separator!
     153if test "${PATH_SEPARATOR+set}" != set; then
     154  PATH_SEPARATOR=:
     155  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
     156    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
     157      PATH_SEPARATOR=';'
     158  }
     159fi
     160
     161
     162
     163## ------------------------- ##
     164## Locate command utilities. ##
     165## ------------------------- ##
     166
     167
     168# func_executable_p FILE
     169# ----------------------
     170# Check that FILE is an executable regular file.
     171func_executable_p ()
     172{
     173    test -f "$1" && test -x "$1"
     174}
     175
     176
     177# func_path_progs PROGS_LIST CHECK_FUNC [PATH]
     178# --------------------------------------------
     179# Search for either a program that responds to --version with output
     180# containing "GNU", or else returned by CHECK_FUNC otherwise, by
     181# trying all the directories in PATH with each of the elements of
     182# PROGS_LIST.
     183#
     184# CHECK_FUNC should accept the path to a candidate program, and
     185# set $func_check_prog_result if it truncates its output less than
     186# $_G_path_prog_max characters.
     187func_path_progs ()
     188{
     189    _G_progs_list=$1
     190    _G_check_func=$2
     191    _G_PATH=${3-"$PATH"}
     192
     193    _G_path_prog_max=0
     194    _G_path_prog_found=false
     195    _G_save_IFS=$IFS; IFS=${PATH_SEPARATOR-:}
     196    for _G_dir in $_G_PATH; do
     197      IFS=$_G_save_IFS
     198      test -z "$_G_dir" && _G_dir=.
     199      for _G_prog_name in $_G_progs_list; do
     200        for _exeext in '' .EXE; do
     201          _G_path_prog=$_G_dir/$_G_prog_name$_exeext
     202          func_executable_p "$_G_path_prog" || continue
     203          case `"$_G_path_prog" --version 2>&1` in
     204            *GNU*) func_path_progs_result=$_G_path_prog _G_path_prog_found=: ;;
     205            *)     $_G_check_func $_G_path_prog
     206                   func_path_progs_result=$func_check_prog_result
     207                   ;;
     208          esac
     209          $_G_path_prog_found && break 3
     210        done
     211      done
     212    done
     213    IFS=$_G_save_IFS
     214    test -z "$func_path_progs_result" && {
     215      echo "no acceptable sed could be found in \$PATH" >&2
     216      exit 1
     217    }
     218}
     219
     220
     221# We want to be able to use the functions in this file before configure
     222# has figured out where the best binaries are kept, which means we have
     223# to search for them ourselves - except when the results are already set
     224# where we skip the searches.
     225
     226# Unless the user overrides by setting SED, search the path for either GNU
     227# sed, or the sed that truncates its output the least.
     228test -z "$SED" && {
     229  _G_sed_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
     230  for _G_i in 1 2 3 4 5 6 7; do
     231    _G_sed_script=$_G_sed_script$nl$_G_sed_script
     232  done
     233  echo "$_G_sed_script" 2>/dev/null | sed 99q >conftest.sed
     234  _G_sed_script=
     235
     236  func_check_prog_sed ()
     237  {
     238    _G_path_prog=$1
     239
     240    _G_count=0
     241    printf 0123456789 >conftest.in
     242    while :
     243    do
     244      cat conftest.in conftest.in >conftest.tmp
     245      mv conftest.tmp conftest.in
     246      cp conftest.in conftest.nl
     247      echo '' >> conftest.nl
     248      "$_G_path_prog" -f conftest.sed <conftest.nl >conftest.out 2>/dev/null || break
     249      diff conftest.out conftest.nl >/dev/null 2>&1 || break
     250      _G_count=`expr $_G_count + 1`
     251      if test "$_G_count" -gt "$_G_path_prog_max"; then
     252        # Best one so far, save it but keep looking for a better one
     253        func_check_prog_result=$_G_path_prog
     254        _G_path_prog_max=$_G_count
     255      fi
     256      # 10*(2^10) chars as input seems more than enough
     257      test 10 -lt "$_G_count" && break
     258    done
     259    rm -f conftest.in conftest.tmp conftest.nl conftest.out
     260  }
     261
     262  func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin
     263  rm -f conftest.sed
     264  SED=$func_path_progs_result
     265}
     266
     267
     268# Unless the user overrides by setting GREP, search the path for either GNU
     269# grep, or the grep that truncates its output the least.
     270test -z "$GREP" && {
     271  func_check_prog_grep ()
     272  {
     273    _G_path_prog=$1
     274
     275    _G_count=0
     276    _G_path_prog_max=0
     277    printf 0123456789 >conftest.in
     278    while :
     279    do
     280      cat conftest.in conftest.in >conftest.tmp
     281      mv conftest.tmp conftest.in
     282      cp conftest.in conftest.nl
     283      echo 'GREP' >> conftest.nl
     284      "$_G_path_prog" -e 'GREP$' -e '-(cannot match)-' <conftest.nl >conftest.out 2>/dev/null || break
     285      diff conftest.out conftest.nl >/dev/null 2>&1 || break
     286      _G_count=`expr $_G_count + 1`
     287      if test "$_G_count" -gt "$_G_path_prog_max"; then
     288        # Best one so far, save it but keep looking for a better one
     289        func_check_prog_result=$_G_path_prog
     290        _G_path_prog_max=$_G_count
     291      fi
     292      # 10*(2^10) chars as input seems more than enough
     293      test 10 -lt "$_G_count" && break
     294    done
     295    rm -f conftest.in conftest.tmp conftest.nl conftest.out
     296  }
     297
     298  func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin
     299  GREP=$func_path_progs_result
     300}
     301
     302
     303## ------------------------------- ##
     304## User overridable command paths. ##
     305## ------------------------------- ##
     306
     307# All uppercase variable names are used for environment variables.  These
     308# variables can be overridden by the user before calling a script that
     309# uses them if a suitable command of that name is not already available
     310# in the command search PATH.
     311
     312: ${CP="cp -f"}
     313: ${ECHO="printf %s\n"}
     314: ${EGREP="$GREP -E"}
     315: ${FGREP="$GREP -F"}
     316: ${LN_S="ln -s"}
     317: ${MAKE="make"}
     318: ${MKDIR="mkdir"}
     319: ${MV="mv -f"}
     320: ${RM="rm -f"}
     321: ${SHELL="${CONFIG_SHELL-/bin/sh}"}
     322
     323
     324## -------------------- ##
     325## Useful sed snippets. ##
     326## -------------------- ##
     327
     328sed_dirname='s|/[^/]*$||'
     329sed_basename='s|^.*/||'
     330
     331# Sed substitution that helps us do robust quoting.  It backslashifies
     332# metacharacters that are still active within double-quoted strings.
     333sed_quote_subst='s|\([`"$\\]\)|\\\1|g'
     334
     335# Same as above, but do not quote variable references.
     336sed_double_quote_subst='s/\(["`\\]\)/\\\1/g'
     337
     338# Sed substitution that turns a string into a regex matching for the
     339# string literally.
     340sed_make_literal_regex='s|[].[^$\\*\/]|\\&|g'
     341
     342# Sed substitution that converts a w32 file name or path
     343# that contains forward slashes, into one that contains
     344# (escaped) backslashes.  A very naive implementation.
     345sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
     346
     347# Re-'\' parameter expansions in output of sed_double_quote_subst that
     348# were '\'-ed in input to the same.  If an odd number of '\' preceded a
     349# '$' in input to sed_double_quote_subst, that '$' was protected from
     350# expansion.  Since each input '\' is now two '\'s, look for any number
     351# of runs of four '\'s followed by two '\'s and then a '$'.  '\' that '$'.
     352_G_bs='\\'
     353_G_bs2='\\\\'
     354_G_bs4='\\\\\\\\'
     355_G_dollar='\$'
     356sed_double_backslash="\
     357  s/$_G_bs4/&\\
     358/g
     359  s/^$_G_bs2$_G_dollar/$_G_bs&/
     360  s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g
     361  s/\n//g"
     362
     363
     364## ----------------- ##
     365## Global variables. ##
     366## ----------------- ##
     367
     368# Except for the global variables explicitly listed below, the following
     369# functions in the '^func_' namespace, and the '^require_' namespace
     370# variables initialised in the 'Resource management' section, sourcing
     371# this file will not pollute your global namespace with anything
     372# else. There's no portable way to scope variables in Bourne shell
     373# though, so actually running these functions will sometimes place
     374# results into a variable named after the function, and often use
     375# temporary variables in the '^_G_' namespace. If you are careful to
     376# avoid using those namespaces casually in your sourcing script, things
     377# should continue to work as you expect. And, of course, you can freely
     378# overwrite any of the functions or variables defined here before
     379# calling anything to customize them.
     380
     381EXIT_SUCCESS=0
     382EXIT_FAILURE=1
     383EXIT_MISMATCH=63  # $? = 63 is used to indicate version mismatch to missing.
     384EXIT_SKIP=77      # $? = 77 is used to indicate a skipped test to automake.
     385
     386# Allow overriding, eg assuming that you follow the convention of
     387# putting '$debug_cmd' at the start of all your functions, you can get
     388# bash to show function call trace with:
     389#
     390#    debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name
     391debug_cmd=${debug_cmd-":"}
     392exit_cmd=:
     393
     394# By convention, finish your script with:
     395#
     396#    exit $exit_status
     397#
     398# so that you can set exit_status to non-zero if you want to indicate
     399# something went wrong during execution without actually bailing out at
     400# the point of failure.
     401exit_status=$EXIT_SUCCESS
    128402
    129403# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
     
    132406# positional parameter $0, within a function call, is the name of the
    133407# function.
    134 progpath="$0"
    135 
    136 
    137 
    138 : ${CP="cp -f"}
    139 test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'}
    140 : ${MAKE="make"}
    141 : ${MKDIR="mkdir"}
    142 : ${MV="mv -f"}
    143 : ${RM="rm -f"}
    144 : ${SHELL="${CONFIG_SHELL-/bin/sh}"}
    145 : ${Xsed="$SED -e 1s/^X//"}
    146 
    147 # Global variables:
    148 EXIT_SUCCESS=0
    149 EXIT_FAILURE=1
    150 EXIT_MISMATCH=63  # $? = 63 is used to indicate version mismatch to missing.
    151 EXIT_SKIP=77      # $? = 77 is used to indicate a skipped test to automake.
    152 
    153 exit_status=$EXIT_SUCCESS
    154 
    155 # Make sure IFS has a sensible default
    156 lt_nl='
    157 '
    158 IFS="   $lt_nl"
    159 
    160 dirname="s,/[^/]*$,,"
    161 basename="s,^.*/,,"
    162 
    163 # func_dirname file append nondir_replacement
     408progpath=$0
     409
     410# The name of this program.
     411progname=`$ECHO "$progpath" |$SED "$sed_basename"`
     412
     413# Make sure we have an absolute progpath for reexecution:
     414case $progpath in
     415  [\\/]*|[A-Za-z]:\\*) ;;
     416  *[\\/]*)
     417     progdir=`$ECHO "$progpath" |$SED "$sed_dirname"`
     418     progdir=`cd "$progdir" && pwd`
     419     progpath=$progdir/$progname
     420     ;;
     421  *)
     422     _G_IFS=$IFS
     423     IFS=${PATH_SEPARATOR-:}
     424     for progdir in $PATH; do
     425       IFS=$_G_IFS
     426       test -x "$progdir/$progname" && break
     427     done
     428     IFS=$_G_IFS
     429     test -n "$progdir" || progdir=`pwd`
     430     progpath=$progdir/$progname
     431     ;;
     432esac
     433
     434
     435## ----------------- ##
     436## Standard options. ##
     437## ----------------- ##
     438
     439# The following options affect the operation of the functions defined
     440# below, and should be set appropriately depending on run-time para-
     441# meters passed on the command line.
     442
     443opt_dry_run=false
     444opt_quiet=false
     445opt_verbose=false
     446
     447# Categories 'all' and 'none' are always available.  Append any others
     448# you will pass as the first argument to func_warning from your own
     449# code.
     450warning_categories=
     451
     452# By default, display warnings according to 'opt_warning_types'.  Set
     453# 'warning_func'  to ':' to elide all warnings, or func_fatal_error to
     454# treat the next displayed warning as a fatal error.
     455warning_func=func_warn_and_continue
     456
     457# Set to 'all' to display all warnings, 'none' to suppress all
     458# warnings, or a space delimited list of some subset of
     459# 'warning_categories' to display only the listed warnings.
     460opt_warning_types=all
     461
     462
     463## -------------------- ##
     464## Resource management. ##
     465## -------------------- ##
     466
     467# This section contains definitions for functions that each ensure a
     468# particular resource (a file, or a non-empty configuration variable for
     469# example) is available, and if appropriate to extract default values
     470# from pertinent package files. Call them using their associated
     471# 'require_*' variable to ensure that they are executed, at most, once.
     472#
     473# It's entirely deliberate that calling these functions can set
     474# variables that don't obey the namespace limitations obeyed by the rest
     475# of this file, in order that that they be as useful as possible to
     476# callers.
     477
     478
     479# require_term_colors
     480# -------------------
     481# Allow display of bold text on terminals that support it.
     482require_term_colors=func_require_term_colors
     483func_require_term_colors ()
     484{
     485    $debug_cmd
     486
     487    test -t 1 && {
     488      # COLORTERM and USE_ANSI_COLORS environment variables take
     489      # precedence, because most terminfo databases neglect to describe
     490      # whether color sequences are supported.
     491      test -n "${COLORTERM+set}" && : ${USE_ANSI_COLORS="1"}
     492
     493      if test 1 = "$USE_ANSI_COLORS"; then
     494        # Standard ANSI escape sequences
     495        tc_reset='[0m'
     496        tc_bold='[1m';   tc_standout='[7m'
     497        tc_red='[31m';   tc_green='[32m'
     498        tc_blue='[34m';  tc_cyan='[36m'
     499      else
     500        # Otherwise trust the terminfo database after all.
     501        test -n "`tput sgr0 2>/dev/null`" && {
     502          tc_reset=`tput sgr0`
     503          test -n "`tput bold 2>/dev/null`" && tc_bold=`tput bold`
     504          tc_standout=$tc_bold
     505          test -n "`tput smso 2>/dev/null`" && tc_standout=`tput smso`
     506          test -n "`tput setaf 1 2>/dev/null`" && tc_red=`tput setaf 1`
     507          test -n "`tput setaf 2 2>/dev/null`" && tc_green=`tput setaf 2`
     508          test -n "`tput setaf 4 2>/dev/null`" && tc_blue=`tput setaf 4`
     509          test -n "`tput setaf 5 2>/dev/null`" && tc_cyan=`tput setaf 5`
     510        }
     511      fi
     512    }
     513
     514    require_term_colors=:
     515}
     516
     517
     518## ----------------- ##
     519## Function library. ##
     520## ----------------- ##
     521
     522# This section contains a variety of useful functions to call in your
     523# scripts. Take note of the portable wrappers for features provided by
     524# some modern shells, which will fall back to slower equivalents on
     525# less featureful shells.
     526
     527
     528# func_append VAR VALUE
     529# ---------------------
     530# Append VALUE onto the existing contents of VAR.
     531
     532  # We should try to minimise forks, especially on Windows where they are
     533  # unreasonably slow, so skip the feature probes when bash or zsh are
     534  # being used:
     535  if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then
     536    : ${_G_HAVE_ARITH_OP="yes"}
     537    : ${_G_HAVE_XSI_OPS="yes"}
     538    # The += operator was introduced in bash 3.1
     539    case $BASH_VERSION in
     540      [12].* | 3.0 | 3.0*) ;;
     541      *)
     542        : ${_G_HAVE_PLUSEQ_OP="yes"}
     543        ;;
     544    esac
     545  fi
     546
     547  # _G_HAVE_PLUSEQ_OP
     548  # Can be empty, in which case the shell is probed, "yes" if += is
     549  # useable or anything else if it does not work.
     550  test -z "$_G_HAVE_PLUSEQ_OP" \
     551    && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \
     552    && _G_HAVE_PLUSEQ_OP=yes
     553
     554if test yes = "$_G_HAVE_PLUSEQ_OP"
     555then
     556  # This is an XSI compatible shell, allowing a faster implementation...
     557  eval 'func_append ()
     558  {
     559    $debug_cmd
     560
     561    eval "$1+=\$2"
     562  }'
     563else
     564  # ...otherwise fall back to using expr, which is often a shell builtin.
     565  func_append ()
     566  {
     567    $debug_cmd
     568
     569    eval "$1=\$$1\$2"
     570  }
     571fi
     572
     573
     574# func_append_quoted VAR VALUE
     575# ----------------------------
     576# Quote VALUE and append to the end of shell variable VAR, separated
     577# by a space.
     578if test yes = "$_G_HAVE_PLUSEQ_OP"; then
     579  eval 'func_append_quoted ()
     580  {
     581    $debug_cmd
     582
     583    func_quote_for_eval "$2"
     584    eval "$1+=\\ \$func_quote_for_eval_result"
     585  }'
     586else
     587  func_append_quoted ()
     588  {
     589    $debug_cmd
     590
     591    func_quote_for_eval "$2"
     592    eval "$1=\$$1\\ \$func_quote_for_eval_result"
     593  }
     594fi
     595
     596
     597# func_append_uniq VAR VALUE
     598# --------------------------
     599# Append unique VALUE onto the existing contents of VAR, assuming
     600# entries are delimited by the first character of VALUE.  For example:
     601#
     602#   func_append_uniq options " --another-option option-argument"
     603#
     604# will only append to $options if " --another-option option-argument "
     605# is not already present somewhere in $options already (note spaces at
     606# each end implied by leading space in second argument).
     607func_append_uniq ()
     608{
     609    $debug_cmd
     610
     611    eval _G_current_value='`$ECHO $'$1'`'
     612    _G_delim=`expr "$2" : '\(.\)'`
     613
     614    case $_G_delim$_G_current_value$_G_delim in
     615      *"$2$_G_delim"*) ;;
     616      *) func_append "$@" ;;
     617    esac
     618}
     619
     620
     621# func_arith TERM...
     622# ------------------
     623# Set func_arith_result to the result of evaluating TERMs.
     624  test -z "$_G_HAVE_ARITH_OP" \
     625    && (eval 'test 2 = $(( 1 + 1 ))') 2>/dev/null \
     626    && _G_HAVE_ARITH_OP=yes
     627
     628if test yes = "$_G_HAVE_ARITH_OP"; then
     629  eval 'func_arith ()
     630  {
     631    $debug_cmd
     632
     633    func_arith_result=$(( $* ))
     634  }'
     635else
     636  func_arith ()
     637  {
     638    $debug_cmd
     639
     640    func_arith_result=`expr "$@"`
     641  }
     642fi
     643
     644
     645# func_basename FILE
     646# ------------------
     647# Set func_basename_result to FILE with everything up to and including
     648# the last / stripped.
     649if test yes = "$_G_HAVE_XSI_OPS"; then
     650  # If this shell supports suffix pattern removal, then use it to avoid
     651  # forking. Hide the definitions single quotes in case the shell chokes
     652  # on unsupported syntax...
     653  _b='func_basename_result=${1##*/}'
     654  _d='case $1 in
     655        */*) func_dirname_result=${1%/*}$2 ;;
     656        *  ) func_dirname_result=$3        ;;
     657      esac'
     658
     659else
     660  # ...otherwise fall back to using sed.
     661  _b='func_basename_result=`$ECHO "$1" |$SED "$sed_basename"`'
     662  _d='func_dirname_result=`$ECHO "$1"  |$SED "$sed_dirname"`
     663      if test "X$func_dirname_result" = "X$1"; then
     664        func_dirname_result=$3
     665      else
     666        func_append func_dirname_result "$2"
     667      fi'
     668fi
     669
     670eval 'func_basename ()
     671{
     672    $debug_cmd
     673
     674    '"$_b"'
     675}'
     676
     677
     678# func_dirname FILE APPEND NONDIR_REPLACEMENT
     679# -------------------------------------------
    164680# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
    165681# otherwise set result to NONDIR_REPLACEMENT.
    166 func_dirname ()
    167 {
    168     func_dirname_result=`$ECHO "${1}" | $SED "$dirname"`
    169     if test "X$func_dirname_result" = "X${1}"; then
    170       func_dirname_result="${3}"
    171     else
    172       func_dirname_result="$func_dirname_result${2}"
    173     fi
    174 } # func_dirname may be replaced by extended shell implementation
    175 
    176 
    177 # func_basename file
    178 func_basename ()
    179 {
    180     func_basename_result=`$ECHO "${1}" | $SED "$basename"`
    181 } # func_basename may be replaced by extended shell implementation
    182 
    183 
    184 # func_dirname_and_basename file append nondir_replacement
    185 # perform func_basename and func_dirname in a single function
     682eval 'func_dirname ()
     683{
     684    $debug_cmd
     685
     686    '"$_d"'
     687}'
     688
     689
     690# func_dirname_and_basename FILE APPEND NONDIR_REPLACEMENT
     691# --------------------------------------------------------
     692# Perform func_basename and func_dirname in a single function
    186693# call:
    187694#   dirname:  Compute the dirname of FILE.  If nonempty,
     
    191698#   basename: Compute filename of FILE.
    192699#             value retuned in "$func_basename_result"
    193 # Implementation must be kept synchronized with func_dirname
    194 # and func_basename. For efficiency, we do not delegate to
    195 # those functions but instead duplicate the functionality here.
    196 func_dirname_and_basename ()
    197 {
    198     # Extract subdirectory from the argument.
    199     func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"`
    200     if test "X$func_dirname_result" = "X${1}"; then
    201       func_dirname_result="${3}"
     700# For efficiency, we do not delegate to the functions above but instead
     701# duplicate the functionality here.
     702eval 'func_dirname_and_basename ()
     703{
     704    $debug_cmd
     705
     706    '"$_b"'
     707    '"$_d"'
     708}'
     709
     710
     711# func_echo ARG...
     712# ----------------
     713# Echo program name prefixed message.
     714func_echo ()
     715{
     716    $debug_cmd
     717
     718    _G_message=$*
     719
     720    func_echo_IFS=$IFS
     721    IFS=$nl
     722    for _G_line in $_G_message; do
     723      IFS=$func_echo_IFS
     724      $ECHO "$progname: $_G_line"
     725    done
     726    IFS=$func_echo_IFS
     727}
     728
     729
     730# func_echo_all ARG...
     731# --------------------
     732# Invoke $ECHO with all args, space-separated.
     733func_echo_all ()
     734{
     735    $ECHO "$*"
     736}
     737
     738
     739# func_echo_infix_1 INFIX ARG...
     740# ------------------------------
     741# Echo program name, followed by INFIX on the first line, with any
     742# additional lines not showing INFIX.
     743func_echo_infix_1 ()
     744{
     745    $debug_cmd
     746
     747    $require_term_colors
     748
     749    _G_infix=$1; shift
     750    _G_indent=$_G_infix
     751    _G_prefix="$progname: $_G_infix: "
     752    _G_message=$*
     753
     754    # Strip color escape sequences before counting printable length
     755    for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" "$tc_blue" "$tc_cyan"
     756    do
     757      test -n "$_G_tc" && {
     758        _G_esc_tc=`$ECHO "$_G_tc" | $SED "$sed_make_literal_regex"`
     759        _G_indent=`$ECHO "$_G_indent" | $SED "s|$_G_esc_tc||g"`
     760      }
     761    done
     762    _G_indent="$progname: "`echo "$_G_indent" | $SED 's|.| |g'`"  " ## exclude from sc_prohibit_nested_quotes
     763
     764    func_echo_infix_1_IFS=$IFS
     765    IFS=$nl
     766    for _G_line in $_G_message; do
     767      IFS=$func_echo_infix_1_IFS
     768      $ECHO "$_G_prefix$tc_bold$_G_line$tc_reset" >&2
     769      _G_prefix=$_G_indent
     770    done
     771    IFS=$func_echo_infix_1_IFS
     772}
     773
     774
     775# func_error ARG...
     776# -----------------
     777# Echo program name prefixed message to standard error.
     778func_error ()
     779{
     780    $debug_cmd
     781
     782    $require_term_colors
     783
     784    func_echo_infix_1 "  $tc_standout${tc_red}error$tc_reset" "$*" >&2
     785}
     786
     787
     788# func_fatal_error ARG...
     789# -----------------------
     790# Echo program name prefixed message to standard error, and exit.
     791func_fatal_error ()
     792{
     793    $debug_cmd
     794
     795    func_error "$*"
     796    exit $EXIT_FAILURE
     797}
     798
     799
     800# func_grep EXPRESSION FILENAME
     801# -----------------------------
     802# Check whether EXPRESSION matches any line of FILENAME, without output.
     803func_grep ()
     804{
     805    $debug_cmd
     806
     807    $GREP "$1" "$2" >/dev/null 2>&1
     808}
     809
     810
     811# func_len STRING
     812# ---------------
     813# Set func_len_result to the length of STRING. STRING may not
     814# start with a hyphen.
     815  test -z "$_G_HAVE_XSI_OPS" \
     816    && (eval 'x=a/b/c;
     817      test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \
     818    && _G_HAVE_XSI_OPS=yes
     819
     820if test yes = "$_G_HAVE_XSI_OPS"; then
     821  eval 'func_len ()
     822  {
     823    $debug_cmd
     824
     825    func_len_result=${#1}
     826  }'
     827else
     828  func_len ()
     829  {
     830    $debug_cmd
     831
     832    func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len`
     833  }
     834fi
     835
     836
     837# func_mkdir_p DIRECTORY-PATH
     838# ---------------------------
     839# Make sure the entire path to DIRECTORY-PATH is available.
     840func_mkdir_p ()
     841{
     842    $debug_cmd
     843
     844    _G_directory_path=$1
     845    _G_dir_list=
     846
     847    if test -n "$_G_directory_path" && test : != "$opt_dry_run"; then
     848
     849      # Protect directory names starting with '-'
     850      case $_G_directory_path in
     851        -*) _G_directory_path=./$_G_directory_path ;;
     852      esac
     853
     854      # While some portion of DIR does not yet exist...
     855      while test ! -d "$_G_directory_path"; do
     856        # ...make a list in topmost first order.  Use a colon delimited
     857        # list incase some portion of path contains whitespace.
     858        _G_dir_list=$_G_directory_path:$_G_dir_list
     859
     860        # If the last portion added has no slash in it, the list is done
     861        case $_G_directory_path in */*) ;; *) break ;; esac
     862
     863        # ...otherwise throw away the child directory and loop
     864        _G_directory_path=`$ECHO "$_G_directory_path" | $SED -e "$sed_dirname"`
     865      done
     866      _G_dir_list=`$ECHO "$_G_dir_list" | $SED 's|:*$||'`
     867
     868      func_mkdir_p_IFS=$IFS; IFS=:
     869      for _G_dir in $_G_dir_list; do
     870        IFS=$func_mkdir_p_IFS
     871        # mkdir can fail with a 'File exist' error if two processes
     872        # try to create one of the directories concurrently.  Don't
     873        # stop in that case!
     874        $MKDIR "$_G_dir" 2>/dev/null || :
     875      done
     876      IFS=$func_mkdir_p_IFS
     877
     878      # Bail out if we (or some other process) failed to create a directory.
     879      test -d "$_G_directory_path" || \
     880        func_fatal_error "Failed to create '$1'"
     881    fi
     882}
     883
     884
     885# func_mktempdir [BASENAME]
     886# -------------------------
     887# Make a temporary directory that won't clash with other running
     888# libtool processes, and avoids race conditions if possible.  If
     889# given, BASENAME is the basename for that directory.
     890func_mktempdir ()
     891{
     892    $debug_cmd
     893
     894    _G_template=${TMPDIR-/tmp}/${1-$progname}
     895
     896    if test : = "$opt_dry_run"; then
     897      # Return a directory name, but don't create it in dry-run mode
     898      _G_tmpdir=$_G_template-$$
    202899    else
    203       func_dirname_result="$func_dirname_result${2}"
     900
     901      # If mktemp works, use that first and foremost
     902      _G_tmpdir=`mktemp -d "$_G_template-XXXXXXXX" 2>/dev/null`
     903
     904      if test ! -d "$_G_tmpdir"; then
     905        # Failing that, at least try and use $RANDOM to avoid a race
     906        _G_tmpdir=$_G_template-${RANDOM-0}$$
     907
     908        func_mktempdir_umask=`umask`
     909        umask 0077
     910        $MKDIR "$_G_tmpdir"
     911        umask $func_mktempdir_umask
     912      fi
     913
     914      # If we're not in dry-run mode, bomb out on failure
     915      test -d "$_G_tmpdir" || \
     916        func_fatal_error "cannot create temporary directory '$_G_tmpdir'"
    204917    fi
    205     func_basename_result=`$ECHO "${1}" | $SED -e "$basename"`
    206 } # func_dirname_and_basename may be replaced by extended shell implementation
    207 
    208 
    209 # func_stripname prefix suffix name
    210 # strip PREFIX and SUFFIX off of NAME.
    211 # PREFIX and SUFFIX must not contain globbing or regex special
    212 # characters, hashes, percent signs, but SUFFIX may contain a leading
    213 # dot (in which case that matches only a dot).
    214 # func_strip_suffix prefix name
    215 func_stripname ()
    216 {
    217     case ${2} in
    218       .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
    219       *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
    220     esac
    221 } # func_stripname may be replaced by extended shell implementation
    222 
    223 
    224 # These SED scripts presuppose an absolute path with a trailing slash.
    225 pathcar='s,^/\([^/]*\).*$,\1,'
    226 pathcdr='s,^/[^/]*,,'
    227 removedotparts=':dotsl
    228                 s@/\./@/@g
    229                 t dotsl
    230                 s,/\.$,/,'
    231 collapseslashes='s@/\{1,\}@/@g'
    232 finalslash='s,/*$,/,'
     918
     919    $ECHO "$_G_tmpdir"
     920}
     921
    233922
    234923# func_normal_abspath PATH
     924# ------------------------
    235925# Remove doubled-up and trailing slashes, "." path components,
    236926# and cancel out any ".." path components in PATH after making
    237927# it an absolute path.
    238 #             value returned in "$func_normal_abspath_result"
    239928func_normal_abspath ()
    240929{
    241   # Start from root dir and reassemble the path.
    242   func_normal_abspath_result=
    243   func_normal_abspath_tpath=$1
    244   func_normal_abspath_altnamespace=
    245   case $func_normal_abspath_tpath in
    246     "")
    247       # Empty path, that just means $cwd.
    248       func_stripname '' '/' "`pwd`"
    249       func_normal_abspath_result=$func_stripname_result
    250       return
    251     ;;
    252     # The next three entries are used to spot a run of precisely
    253     # two leading slashes without using negated character classes;
    254     # we take advantage of case's first-match behaviour.
    255     ///*)
    256       # Unusual form of absolute path, do nothing.
    257     ;;
    258     //*)
    259       # Not necessarily an ordinary path; POSIX reserves leading '//'
    260       # and for example Cygwin uses it to access remote file shares
    261       # over CIFS/SMB, so we conserve a leading double slash if found.
    262       func_normal_abspath_altnamespace=/
    263     ;;
    264     /*)
    265       # Absolute path, do nothing.
    266     ;;
    267     *)
    268       # Relative path, prepend $cwd.
    269       func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath
    270     ;;
    271   esac
    272   # Cancel out all the simple stuff to save iterations.  We also want
    273   # the path to end with a slash for ease of parsing, so make sure
    274   # there is one (and only one) here.
    275   func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
    276         -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"`
    277   while :; do
    278     # Processed it all yet?
    279     if test "$func_normal_abspath_tpath" = / ; then
    280       # If we ascended to the root using ".." the result may be empty now.
    281       if test -z "$func_normal_abspath_result" ; then
    282         func_normal_abspath_result=/
    283       fi
    284       break
    285     fi
    286     func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \
    287         -e "$pathcar"`
     930    $debug_cmd
     931
     932    # These SED scripts presuppose an absolute path with a trailing slash.
     933    _G_pathcar='s|^/\([^/]*\).*$|\1|'
     934    _G_pathcdr='s|^/[^/]*||'
     935    _G_removedotparts=':dotsl
     936                s|/\./|/|g
     937                t dotsl
     938                s|/\.$|/|'
     939    _G_collapseslashes='s|/\{1,\}|/|g'
     940    _G_finalslash='s|/*$|/|'
     941
     942    # Start from root dir and reassemble the path.
     943    func_normal_abspath_result=
     944    func_normal_abspath_tpath=$1
     945    func_normal_abspath_altnamespace=
     946    case $func_normal_abspath_tpath in
     947      "")
     948        # Empty path, that just means $cwd.
     949        func_stripname '' '/' "`pwd`"
     950        func_normal_abspath_result=$func_stripname_result
     951        return
     952        ;;
     953      # The next three entries are used to spot a run of precisely
     954      # two leading slashes without using negated character classes;
     955      # we take advantage of case's first-match behaviour.
     956      ///*)
     957        # Unusual form of absolute path, do nothing.
     958        ;;
     959      //*)
     960        # Not necessarily an ordinary path; POSIX reserves leading '//'
     961        # and for example Cygwin uses it to access remote file shares
     962        # over CIFS/SMB, so we conserve a leading double slash if found.
     963        func_normal_abspath_altnamespace=/
     964        ;;
     965      /*)
     966        # Absolute path, do nothing.
     967        ;;
     968      *)
     969        # Relative path, prepend $cwd.
     970        func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath
     971        ;;
     972    esac
     973
     974    # Cancel out all the simple stuff to save iterations.  We also want
     975    # the path to end with a slash for ease of parsing, so make sure
     976    # there is one (and only one) here.
    288977    func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
    289         -e "$pathcdr"`
    290     # Figure out what to do with it
    291     case $func_normal_abspath_tcomponent in
    292       "")
    293         # Trailing empty path component, ignore it.
    294       ;;
    295       ..)
    296         # Parent dir; strip last assembled component from result.
    297         func_dirname "$func_normal_abspath_result"
    298         func_normal_abspath_result=$func_dirname_result
    299       ;;
    300       *)
    301         # Actual path component, append it.
    302         func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent
    303       ;;
    304     esac
    305   done
    306   # Restore leading double-slash if one was found on entry.
    307   func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result
    308 }
    309 
    310 # func_relative_path SRCDIR DSTDIR
    311 # generates a relative path from SRCDIR to DSTDIR, with a trailing
    312 # slash if non-empty, suitable for immediately appending a filename
    313 # without needing to append a separator.
    314 #             value returned in "$func_relative_path_result"
    315 func_relative_path ()
    316 {
    317   func_relative_path_result=
    318   func_normal_abspath "$1"
    319   func_relative_path_tlibdir=$func_normal_abspath_result
    320   func_normal_abspath "$2"
    321   func_relative_path_tbindir=$func_normal_abspath_result
    322 
    323   # Ascend the tree starting from libdir
    324   while :; do
    325     # check if we have found a prefix of bindir
    326     case $func_relative_path_tbindir in
    327       $func_relative_path_tlibdir)
    328         # found an exact match
    329         func_relative_path_tcancelled=
    330         break
    331         ;;
    332       $func_relative_path_tlibdir*)
    333         # found a matching prefix
    334         func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir"
    335         func_relative_path_tcancelled=$func_stripname_result
    336         if test -z "$func_relative_path_result"; then
    337           func_relative_path_result=.
     978          -e "$_G_removedotparts" -e "$_G_collapseslashes" -e "$_G_finalslash"`
     979    while :; do
     980      # Processed it all yet?
     981      if test / = "$func_normal_abspath_tpath"; then
     982        # If we ascended to the root using ".." the result may be empty now.
     983        if test -z "$func_normal_abspath_result"; then
     984          func_normal_abspath_result=/
    338985        fi
    339986        break
    340         ;;
    341       *)
    342         func_dirname $func_relative_path_tlibdir
    343         func_relative_path_tlibdir=${func_dirname_result}
    344         if test "x$func_relative_path_tlibdir" = x ; then
    345           # Have to descend all the way to the root!
    346           func_relative_path_result=../$func_relative_path_result
    347           func_relative_path_tcancelled=$func_relative_path_tbindir
    348           break
    349         fi
    350         func_relative_path_result=../$func_relative_path_result
    351         ;;
    352     esac
    353   done
    354 
    355   # Now calculate path; take care to avoid doubling-up slashes.
    356   func_stripname '' '/' "$func_relative_path_result"
    357   func_relative_path_result=$func_stripname_result
    358   func_stripname '/' '/' "$func_relative_path_tcancelled"
    359   if test "x$func_stripname_result" != x ; then
    360     func_relative_path_result=${func_relative_path_result}/${func_stripname_result}
    361   fi
    362 
    363   # Normalisation. If bindir is libdir, return empty string,
    364   # else relative path ending with a slash; either way, target
    365   # file name can be directly appended.
    366   if test ! -z "$func_relative_path_result"; then
    367     func_stripname './' '' "$func_relative_path_result/"
    368     func_relative_path_result=$func_stripname_result
    369   fi
    370 }
    371 
    372 # The name of this program:
    373 func_dirname_and_basename "$progpath"
    374 progname=$func_basename_result
    375 
    376 # Make sure we have an absolute path for reexecution:
    377 case $progpath in
    378   [\\/]*|[A-Za-z]:\\*) ;;
    379   *[\\/]*)
    380      progdir=$func_dirname_result
    381      progdir=`cd "$progdir" && pwd`
    382      progpath="$progdir/$progname"
    383      ;;
    384   *)
    385      save_IFS="$IFS"
    386      IFS=${PATH_SEPARATOR-:}
    387      for progdir in $PATH; do
    388        IFS="$save_IFS"
    389        test -x "$progdir/$progname" && break
    390      done
    391      IFS="$save_IFS"
    392      test -n "$progdir" || progdir=`pwd`
    393      progpath="$progdir/$progname"
    394      ;;
    395 esac
    396 
    397 # Sed substitution that helps us do robust quoting.  It backslashifies
    398 # metacharacters that are still active within double-quoted strings.
    399 Xsed="${SED}"' -e 1s/^X//'
    400 sed_quote_subst='s/\([`"$\\]\)/\\\1/g'
    401 
    402 # Same as above, but do not quote variable references.
    403 double_quote_subst='s/\(["`\\]\)/\\\1/g'
    404 
    405 # Sed substitution that turns a string into a regex matching for the
    406 # string literally.
    407 sed_make_literal_regex='s,[].[^$\\*\/],\\&,g'
    408 
    409 # Sed substitution that converts a w32 file name or path
    410 # which contains forward slashes, into one that contains
    411 # (escaped) backslashes.  A very naive implementation.
    412 lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
    413 
    414 # Re-`\' parameter expansions in output of double_quote_subst that were
    415 # `\'-ed in input to the same.  If an odd number of `\' preceded a '$'
    416 # in input to double_quote_subst, that '$' was protected from expansion.
    417 # Since each input `\' is now two `\'s, look for any number of runs of
    418 # four `\'s followed by two `\'s and then a '$'.  `\' that '$'.
    419 bs='\\'
    420 bs2='\\\\'
    421 bs4='\\\\\\\\'
    422 dollar='\$'
    423 sed_double_backslash="\
    424   s/$bs4/&\\
    425 /g
    426   s/^$bs2$dollar/$bs&/
    427   s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g
    428   s/\n//g"
    429 
    430 # Standard options:
    431 opt_dry_run=false
    432 opt_help=false
    433 opt_quiet=false
    434 opt_verbose=false
    435 opt_warning=:
    436 
    437 # func_echo arg...
    438 # Echo program name prefixed message, along with the current mode
    439 # name if it has been set yet.
    440 func_echo ()
    441 {
    442     $ECHO "$progname: ${opt_mode+$opt_mode: }$*"
    443 }
    444 
    445 # func_verbose arg...
    446 # Echo program name prefixed message in verbose mode only.
    447 func_verbose ()
    448 {
    449     $opt_verbose && func_echo ${1+"$@"}
     987      fi
     988      func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \
     989          -e "$_G_pathcar"`
     990      func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
     991          -e "$_G_pathcdr"`
     992      # Figure out what to do with it
     993      case $func_normal_abspath_tcomponent in
     994        "")
     995          # Trailing empty path component, ignore it.
     996          ;;
     997        ..)
     998          # Parent dir; strip last assembled component from result.
     999          func_dirname "$func_normal_abspath_result"
     1000          func_normal_abspath_result=$func_dirname_result
     1001          ;;
     1002        *)
     1003          # Actual path component, append it.
     1004          func_append func_normal_abspath_result "/$func_normal_abspath_tcomponent"
     1005          ;;
     1006      esac
     1007    done
     1008    # Restore leading double-slash if one was found on entry.
     1009    func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result
     1010}
     1011
     1012
     1013# func_notquiet ARG...
     1014# --------------------
     1015# Echo program name prefixed message only when not in quiet mode.
     1016func_notquiet ()
     1017{
     1018    $debug_cmd
     1019
     1020    $opt_quiet || func_echo ${1+"$@"}
    4501021
    4511022    # A bug in bash halts the script if the last line of a function
     
    4551026}
    4561027
    457 # func_echo_all arg...
    458 # Invoke $ECHO with all args, space-separated.
    459 func_echo_all ()
    460 {
    461     $ECHO "$*"
    462 }
    463 
    464 # func_error arg...
    465 # Echo program name prefixed message to standard error.
    466 func_error ()
    467 {
    468     $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2
    469 }
    470 
    471 # func_warning arg...
    472 # Echo program name prefixed warning message to standard error.
    473 func_warning ()
    474 {
    475     $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2
    476 
    477     # bash bug again:
     1028
     1029# func_relative_path SRCDIR DSTDIR
     1030# --------------------------------
     1031# Set func_relative_path_result to the relative path from SRCDIR to DSTDIR.
     1032func_relative_path ()
     1033{
     1034    $debug_cmd
     1035
     1036    func_relative_path_result=
     1037    func_normal_abspath "$1"
     1038    func_relative_path_tlibdir=$func_normal_abspath_result
     1039    func_normal_abspath "$2"
     1040    func_relative_path_tbindir=$func_normal_abspath_result
     1041
     1042    # Ascend the tree starting from libdir
     1043    while :; do
     1044      # check if we have found a prefix of bindir
     1045      case $func_relative_path_tbindir in
     1046        $func_relative_path_tlibdir)
     1047          # found an exact match
     1048          func_relative_path_tcancelled=
     1049          break
     1050          ;;
     1051        $func_relative_path_tlibdir*)
     1052          # found a matching prefix
     1053          func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir"
     1054          func_relative_path_tcancelled=$func_stripname_result
     1055          if test -z "$func_relative_path_result"; then
     1056            func_relative_path_result=.
     1057          fi
     1058          break
     1059          ;;
     1060        *)
     1061          func_dirname $func_relative_path_tlibdir
     1062          func_relative_path_tlibdir=$func_dirname_result
     1063          if test -z "$func_relative_path_tlibdir"; then
     1064            # Have to descend all the way to the root!
     1065            func_relative_path_result=../$func_relative_path_result
     1066            func_relative_path_tcancelled=$func_relative_path_tbindir
     1067            break
     1068          fi
     1069          func_relative_path_result=../$func_relative_path_result
     1070          ;;
     1071      esac
     1072    done
     1073
     1074    # Now calculate path; take care to avoid doubling-up slashes.
     1075    func_stripname '' '/' "$func_relative_path_result"
     1076    func_relative_path_result=$func_stripname_result
     1077    func_stripname '/' '/' "$func_relative_path_tcancelled"
     1078    if test -n "$func_stripname_result"; then
     1079      func_append func_relative_path_result "/$func_stripname_result"
     1080    fi
     1081
     1082    # Normalisation. If bindir is libdir, return '.' else relative path.
     1083    if test -n "$func_relative_path_result"; then
     1084      func_stripname './' '' "$func_relative_path_result"
     1085      func_relative_path_result=$func_stripname_result
     1086    fi
     1087
     1088    test -n "$func_relative_path_result" || func_relative_path_result=.
     1089
    4781090    :
    4791091}
    4801092
    481 # func_fatal_error arg...
    482 # Echo program name prefixed message to standard error, and exit.
    483 func_fatal_error ()
    484 {
    485     func_error ${1+"$@"}
    486     exit $EXIT_FAILURE
    487 }
    488 
    489 # func_fatal_help arg...
    490 # Echo program name prefixed message to standard error, followed by
    491 # a help hint, and exit.
    492 func_fatal_help ()
    493 {
    494     func_error ${1+"$@"}
    495     func_fatal_error "$help"
    496 }
    497 help="Try \`$progname --help' for more information."  ## default
    498 
    499 
    500 # func_grep expression filename
    501 # Check whether EXPRESSION matches any line of FILENAME, without output.
    502 func_grep ()
    503 {
    504     $GREP "$1" "$2" >/dev/null 2>&1
    505 }
    506 
    507 
    508 # func_mkdir_p directory-path
    509 # Make sure the entire path to DIRECTORY-PATH is available.
    510 func_mkdir_p ()
    511 {
    512     my_directory_path="$1"
    513     my_dir_list=
    514 
    515     if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then
    516 
    517       # Protect directory names starting with `-'
    518       case $my_directory_path in
    519         -*) my_directory_path="./$my_directory_path" ;;
     1093
     1094# func_quote_for_eval ARG...
     1095# --------------------------
     1096# Aesthetically quote ARGs to be evaled later.
     1097# This function returns two values:
     1098#   i) func_quote_for_eval_result
     1099#      double-quoted, suitable for a subsequent eval
     1100#  ii) func_quote_for_eval_unquoted_result
     1101#      has all characters that are still active within double
     1102#      quotes backslashified.
     1103func_quote_for_eval ()
     1104{
     1105    $debug_cmd
     1106
     1107    func_quote_for_eval_unquoted_result=
     1108    func_quote_for_eval_result=
     1109    while test 0 -lt $#; do
     1110      case $1 in
     1111        *[\\\`\"\$]*)
     1112          _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;;
     1113        *)
     1114          _G_unquoted_arg=$1 ;;
    5201115      esac
    521 
    522       # While some portion of DIR does not yet exist...
    523       while test ! -d "$my_directory_path"; do
    524         # ...make a list in topmost first order.  Use a colon delimited
    525         # list incase some portion of path contains whitespace.
    526         my_dir_list="$my_directory_path:$my_dir_list"
    527 
    528         # If the last portion added has no slash in it, the list is done
    529         case $my_directory_path in */*) ;; *) break ;; esac
    530 
    531         # ...otherwise throw away the child directory and loop
    532         my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"`
    533       done
    534       my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'`
    535 
    536       save_mkdir_p_IFS="$IFS"; IFS=':'
    537       for my_dir in $my_dir_list; do
    538         IFS="$save_mkdir_p_IFS"
    539         # mkdir can fail with a `File exist' error if two processes
    540         # try to create one of the directories concurrently.  Don't
    541         # stop in that case!
    542         $MKDIR "$my_dir" 2>/dev/null || :
    543       done
    544       IFS="$save_mkdir_p_IFS"
    545 
    546       # Bail out if we (or some other process) failed to create a directory.
    547       test -d "$my_directory_path" || \
    548         func_fatal_error "Failed to create \`$1'"
    549     fi
    550 }
    551 
    552 
    553 # func_mktempdir [string]
    554 # Make a temporary directory that won't clash with other running
    555 # libtool processes, and avoids race conditions if possible.  If
    556 # given, STRING is the basename for that directory.
    557 func_mktempdir ()
    558 {
    559     my_template="${TMPDIR-/tmp}/${1-$progname}"
    560 
    561     if test "$opt_dry_run" = ":"; then
    562       # Return a directory name, but don't create it in dry-run mode
    563       my_tmpdir="${my_template}-$$"
    564     else
    565 
    566       # If mktemp works, use that first and foremost
    567       my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
    568 
    569       if test ! -d "$my_tmpdir"; then
    570         # Failing that, at least try and use $RANDOM to avoid a race
    571         my_tmpdir="${my_template}-${RANDOM-0}$$"
    572 
    573         save_mktempdir_umask=`umask`
    574         umask 0077
    575         $MKDIR "$my_tmpdir"
    576         umask $save_mktempdir_umask
     1116      if test -n "$func_quote_for_eval_unquoted_result"; then
     1117        func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg"
     1118      else
     1119        func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg"
    5771120      fi
    5781121
    579       # If we're not in dry-run mode, bomb out on failure
    580       test -d "$my_tmpdir" || \
    581         func_fatal_error "cannot create temporary directory \`$my_tmpdir'"
    582     fi
    583 
    584     $ECHO "$my_tmpdir"
    585 }
    586 
    587 
    588 # func_quote_for_eval arg
    589 # Aesthetically quote ARG to be evaled later.
    590 # This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT
    591 # is double-quoted, suitable for a subsequent eval, whereas
    592 # FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters
    593 # which are still active within double quotes backslashified.
    594 func_quote_for_eval ()
    595 {
    596     case $1 in
    597       *[\\\`\"\$]*)
    598         func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;;
    599       *)
    600         func_quote_for_eval_unquoted_result="$1" ;;
    601     esac
    602 
    603     case $func_quote_for_eval_unquoted_result in
    604       # Double-quote args containing shell metacharacters to delay
    605       # word splitting, command substitution and and variable
    606       # expansion for a subsequent eval.
    607       # Many Bourne shells cannot handle close brackets correctly
    608       # in scan sets, so we specify it separately.
    609       *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \     ]*|*]*|"")
    610         func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\""
    611         ;;
    612       *)
    613         func_quote_for_eval_result="$func_quote_for_eval_unquoted_result"
    614     esac
    615 }
    616 
    617 
    618 # func_quote_for_expand arg
     1122      case $_G_unquoted_arg in
     1123        # Double-quote args containing shell metacharacters to delay
     1124        # word splitting, command substitution and variable expansion
     1125        # for a subsequent eval.
     1126        # Many Bourne shells cannot handle close brackets correctly
     1127        # in scan sets, so we specify it separately.
     1128        *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \   ]*|*]*|"")
     1129          _G_quoted_arg=\"$_G_unquoted_arg\"
     1130          ;;
     1131        *)
     1132          _G_quoted_arg=$_G_unquoted_arg
     1133          ;;
     1134      esac
     1135
     1136      if test -n "$func_quote_for_eval_result"; then
     1137        func_append func_quote_for_eval_result " $_G_quoted_arg"
     1138      else
     1139        func_append func_quote_for_eval_result "$_G_quoted_arg"
     1140      fi
     1141      shift
     1142    done
     1143}
     1144
     1145
     1146# func_quote_for_expand ARG
     1147# -------------------------
    6191148# Aesthetically quote ARG to be evaled later; same as above,
    6201149# but do not quote variable references.
    6211150func_quote_for_expand ()
    6221151{
     1152    $debug_cmd
     1153
    6231154    case $1 in
    6241155      *[\\\`\"]*)
    625         my_arg=`$ECHO "$1" | $SED \
    626             -e "$double_quote_subst" -e "$sed_double_backslash"` ;;
     1156        _G_arg=`$ECHO "$1" | $SED \
     1157            -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;;
    6271158      *)
    628         my_arg="$1" ;;
     1159        _G_arg=$1 ;;
    6291160    esac
    6301161
    631     case $my_arg in
     1162    case $_G_arg in
    6321163      # Double-quote args containing shell metacharacters to delay
    6331164      # word splitting and command substitution for a subsequent eval.
     
    6351166      # in scan sets, so we specify it separately.
    6361167      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \     ]*|*]*|"")
    637         my_arg="\"$my_arg\""
     1168        _G_arg=\"$_G_arg\"
    6381169        ;;
    6391170    esac
    6401171
    641     func_quote_for_expand_result="$my_arg"
    642 }
    643 
    644 
    645 # func_show_eval cmd [fail_exp]
    646 # Unless opt_silent is true, then output CMD.  Then, if opt_dryrun is
     1172    func_quote_for_expand_result=$_G_arg
     1173}
     1174
     1175
     1176# func_stripname PREFIX SUFFIX NAME
     1177# ---------------------------------
     1178# strip PREFIX and SUFFIX from NAME, and store in func_stripname_result.
     1179# PREFIX and SUFFIX must not contain globbing or regex special
     1180# characters, hashes, percent signs, but SUFFIX may contain a leading
     1181# dot (in which case that matches only a dot).
     1182if test yes = "$_G_HAVE_XSI_OPS"; then
     1183  eval 'func_stripname ()
     1184  {
     1185    $debug_cmd
     1186
     1187    # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
     1188    # positional parameters, so assign one to ordinary variable first.
     1189    func_stripname_result=$3
     1190    func_stripname_result=${func_stripname_result#"$1"}
     1191    func_stripname_result=${func_stripname_result%"$2"}
     1192  }'
     1193else
     1194  func_stripname ()
     1195  {
     1196    $debug_cmd
     1197
     1198    case $2 in
     1199      .*) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%\\\\$2\$%%"`;;
     1200      *)  func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%$2\$%%"`;;
     1201    esac
     1202  }
     1203fi
     1204
     1205
     1206# func_show_eval CMD [FAIL_EXP]
     1207# -----------------------------
     1208# Unless opt_quiet is true, then output CMD.  Then, if opt_dryrun is
    6471209# not true, evaluate CMD.  If the evaluation of CMD fails, and FAIL_EXP
    6481210# is given, then evaluate it.
    6491211func_show_eval ()
    6501212{
    651     my_cmd="$1"
    652     my_fail_exp="${2-:}"
    653 
    654     ${opt_silent-false} || {
    655       func_quote_for_expand "$my_cmd"
    656       eval "func_echo $func_quote_for_expand_result"
     1213    $debug_cmd
     1214
     1215    _G_cmd=$1
     1216    _G_fail_exp=${2-':'}
     1217
     1218    func_quote_for_expand "$_G_cmd"
     1219    eval "func_notquiet $func_quote_for_expand_result"
     1220
     1221    $opt_dry_run || {
     1222      eval "$_G_cmd"
     1223      _G_status=$?
     1224      if test 0 -ne "$_G_status"; then
     1225        eval "(exit $_G_status); $_G_fail_exp"
     1226      fi
    6571227    }
    658 
    659     if ${opt_dry_run-false}; then :; else
    660       eval "$my_cmd"
    661       my_status=$?
    662       if test "$my_status" -eq 0; then :; else
    663         eval "(exit $my_status); $my_fail_exp"
    664       fi
    665     fi
    666 }
    667 
    668 
    669 # func_show_eval_locale cmd [fail_exp]
    670 # Unless opt_silent is true, then output CMD.  Then, if opt_dryrun is
     1228}
     1229
     1230
     1231# func_show_eval_locale CMD [FAIL_EXP]
     1232# ------------------------------------
     1233# Unless opt_quiet is true, then output CMD.  Then, if opt_dryrun is
    6711234# not true, evaluate CMD.  If the evaluation of CMD fails, and FAIL_EXP
    6721235# is given, then evaluate it.  Use the saved locale for evaluation.
    6731236func_show_eval_locale ()
    6741237{
    675     my_cmd="$1"
    676     my_fail_exp="${2-:}"
    677 
    678     ${opt_silent-false} || {
    679       func_quote_for_expand "$my_cmd"
     1238    $debug_cmd
     1239
     1240    _G_cmd=$1
     1241    _G_fail_exp=${2-':'}
     1242
     1243    $opt_quiet || {
     1244      func_quote_for_expand "$_G_cmd"
    6801245      eval "func_echo $func_quote_for_expand_result"
    6811246    }
    6821247
    683     if ${opt_dry_run-false}; then :; else
    684       eval "$lt_user_locale
    685             $my_cmd"
    686       my_status=$?
    687       eval "$lt_safe_locale"
    688       if test "$my_status" -eq 0; then :; else
    689         eval "(exit $my_status); $my_fail_exp"
     1248    $opt_dry_run || {
     1249      eval "$_G_user_locale
     1250            $_G_cmd"
     1251      _G_status=$?
     1252      eval "$_G_safe_locale"
     1253      if test 0 -ne "$_G_status"; then
     1254        eval "(exit $_G_status); $_G_fail_exp"
    6901255      fi
    691     fi
    692 }
     1256    }
     1257}
     1258
    6931259
    6941260# func_tr_sh
     1261# ----------
    6951262# Turn $1 into a string suitable for a shell variable name.
    6961263# Result is stored in $func_tr_sh_result.  All characters
     
    6991266func_tr_sh ()
    7001267{
    701   case $1 in
    702   [0-9]* | *[!a-zA-Z0-9_]*)
    703     func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'`
    704     ;;
    705   * )
    706     func_tr_sh_result=$1
    707     ;;
    708   esac
    709 }
    710 
    711 
    712 # func_version
    713 # Echo version message to standard output and exit.
    714 func_version ()
    715 {
    716     $opt_debug
    717 
    718     $SED -n '/(C)/!b go
    719         :more
    720         /\./!{
    721           N
    722           s/\n# / /
    723           b more
    724         }
    725         :go
    726         /^# '$PROGRAM' (GNU /,/# warranty; / {
    727         s/^# //
    728         s/^# *$//
    729         s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/
    730         p
    731      }' < "$progpath"
    732      exit $?
    733 }
    734 
    735 # func_usage
    736 # Echo short help message to standard output and exit.
    737 func_usage ()
    738 {
    739     $opt_debug
    740 
    741     $SED -n '/^# Usage:/,/^#  *.*--help/ {
    742         s/^# //
    743         s/^# *$//
    744         s/\$progname/'$progname'/
    745         p
    746     }' < "$progpath"
    747     echo
    748     $ECHO "run \`$progname --help | more' for full usage"
    749     exit $?
    750 }
    751 
    752 # func_help [NOEXIT]
    753 # Echo long help message to standard output and exit,
    754 # unless 'noexit' is passed as argument.
     1268    $debug_cmd
     1269
     1270    case $1 in
     1271    [0-9]* | *[!a-zA-Z0-9_]*)
     1272      func_tr_sh_result=`$ECHO "$1" | $SED -e 's/^\([0-9]\)/_\1/' -e 's/[^a-zA-Z0-9_]/_/g'`
     1273      ;;
     1274    * )
     1275      func_tr_sh_result=$1
     1276      ;;
     1277    esac
     1278}
     1279
     1280
     1281# func_verbose ARG...
     1282# -------------------
     1283# Echo program name prefixed message in verbose mode only.
     1284func_verbose ()
     1285{
     1286    $debug_cmd
     1287
     1288    $opt_verbose && func_echo "$*"
     1289
     1290    :
     1291}
     1292
     1293
     1294# func_warn_and_continue ARG...
     1295# -----------------------------
     1296# Echo program name prefixed warning message to standard error.
     1297func_warn_and_continue ()
     1298{
     1299    $debug_cmd
     1300
     1301    $require_term_colors
     1302
     1303    func_echo_infix_1 "${tc_red}warning$tc_reset" "$*" >&2
     1304}
     1305
     1306
     1307# func_warning CATEGORY ARG...
     1308# ----------------------------
     1309# Echo program name prefixed warning message to standard error. Warning
     1310# messages can be filtered according to CATEGORY, where this function
     1311# elides messages where CATEGORY is not listed in the global variable
     1312# 'opt_warning_types'.
     1313func_warning ()
     1314{
     1315    $debug_cmd
     1316
     1317    # CATEGORY must be in the warning_categories list!
     1318    case " $warning_categories " in
     1319      *" $1 "*) ;;
     1320      *) func_internal_error "invalid warning category '$1'" ;;
     1321    esac
     1322
     1323    _G_category=$1
     1324    shift
     1325
     1326    case " $opt_warning_types " in
     1327      *" $_G_category "*) $warning_func ${1+"$@"} ;;
     1328    esac
     1329}
     1330
     1331
     1332# func_sort_ver VER1 VER2
     1333# -----------------------
     1334# 'sort -V' is not generally available.
     1335# Note this deviates from the version comparison in automake
     1336# in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a
     1337# but this should suffice as we won't be specifying old
     1338# version formats or redundant trailing .0 in bootstrap.conf.
     1339# If we did want full compatibility then we should probably
     1340# use m4_version_compare from autoconf.
     1341func_sort_ver ()
     1342{
     1343    $debug_cmd
     1344
     1345    printf '%s\n%s\n' "$1" "$2" \
     1346      | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n -k 6,6n -k 7,7n -k 8,8n -k 9,9n
     1347}
     1348
     1349# func_lt_ver PREV CURR
     1350# ---------------------
     1351# Return true if PREV and CURR are in the correct order according to
     1352# func_sort_ver, otherwise false.  Use it like this:
     1353#
     1354#  func_lt_ver "$prev_ver" "$proposed_ver" || func_fatal_error "..."
     1355func_lt_ver ()
     1356{
     1357    $debug_cmd
     1358
     1359    test "x$1" = x`func_sort_ver "$1" "$2" | $SED 1q`
     1360}
     1361
     1362
     1363# Local variables:
     1364# mode: shell-script
     1365# sh-indentation: 2
     1366# eval: (add-hook 'before-save-hook 'time-stamp)
     1367# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC"
     1368# time-stamp-time-zone: "UTC"
     1369# End:
     1370#! /bin/sh
     1371
     1372# Set a version string for this script.
     1373scriptversion=2014-01-07.03; # UTC
     1374
     1375# A portable, pluggable option parser for Bourne shell.
     1376# Written by Gary V. Vaughan, 2010
     1377
     1378# Copyright (C) 2010-2015 Free Software Foundation, Inc.
     1379# This is free software; see the source for copying conditions.  There is NO
     1380# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
     1381
     1382# This program is free software: you can redistribute it and/or modify
     1383# it under the terms of the GNU General Public License as published by
     1384# the Free Software Foundation, either version 3 of the License, or
     1385# (at your option) any later version.
     1386
     1387# This program is distributed in the hope that it will be useful,
     1388# but WITHOUT ANY WARRANTY; without even the implied warranty of
     1389# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     1390# GNU General Public License for more details.
     1391
     1392# You should have received a copy of the GNU General Public License
     1393# along with this program.  If not, see <http://www.gnu.org/licenses/>.
     1394
     1395# Please report bugs or propose patches to gary@gnu.org.
     1396
     1397
     1398## ------ ##
     1399## Usage. ##
     1400## ------ ##
     1401
     1402# This file is a library for parsing options in your shell scripts along
     1403# with assorted other useful supporting features that you can make use
     1404# of too.
     1405#
     1406# For the simplest scripts you might need only:
     1407#
     1408#   #!/bin/sh
     1409#   . relative/path/to/funclib.sh
     1410#   . relative/path/to/options-parser
     1411#   scriptversion=1.0
     1412#   func_options ${1+"$@"}
     1413#   eval set dummy "$func_options_result"; shift
     1414#   ...rest of your script...
     1415#
     1416# In order for the '--version' option to work, you will need to have a
     1417# suitably formatted comment like the one at the top of this file
     1418# starting with '# Written by ' and ending with '# warranty; '.
     1419#
     1420# For '-h' and '--help' to work, you will also need a one line
     1421# description of your script's purpose in a comment directly above the
     1422# '# Written by ' line, like the one at the top of this file.
     1423#
     1424# The default options also support '--debug', which will turn on shell
     1425# execution tracing (see the comment above debug_cmd below for another
     1426# use), and '--verbose' and the func_verbose function to allow your script
     1427# to display verbose messages only when your user has specified
     1428# '--verbose'.
     1429#
     1430# After sourcing this file, you can plug processing for additional
     1431# options by amending the variables from the 'Configuration' section
     1432# below, and following the instructions in the 'Option parsing'
     1433# section further down.
     1434
     1435## -------------- ##
     1436## Configuration. ##
     1437## -------------- ##
     1438
     1439# You should override these variables in your script after sourcing this
     1440# file so that they reflect the customisations you have added to the
     1441# option parser.
     1442
     1443# The usage line for option parsing errors and the start of '-h' and
     1444# '--help' output messages. You can embed shell variables for delayed
     1445# expansion at the time the message is displayed, but you will need to
     1446# quote other shell meta-characters carefully to prevent them being
     1447# expanded when the contents are evaled.
     1448usage='$progpath [OPTION]...'
     1449
     1450# Short help message in response to '-h' and '--help'.  Add to this or
     1451# override it after sourcing this library to reflect the full set of
     1452# options your script accepts.
     1453usage_message="\
     1454       --debug        enable verbose shell tracing
     1455   -W, --warnings=CATEGORY
     1456                      report the warnings falling in CATEGORY [all]
     1457   -v, --verbose      verbosely report processing
     1458       --version      print version information and exit
     1459   -h, --help         print short or long help message and exit
     1460"
     1461
     1462# Additional text appended to 'usage_message' in response to '--help'.
     1463long_help_message="
     1464Warning categories include:
     1465       'all'          show all warnings
     1466       'none'         turn off all the warnings
     1467       'error'        warnings are treated as fatal errors"
     1468
     1469# Help message printed before fatal option parsing errors.
     1470fatal_help="Try '\$progname --help' for more information."
     1471
     1472
     1473
     1474## ------------------------- ##
     1475## Hook function management. ##
     1476## ------------------------- ##
     1477
     1478# This section contains functions for adding, removing, and running hooks
     1479# to the main code.  A hook is just a named list of of function, that can
     1480# be run in order later on.
     1481
     1482# func_hookable FUNC_NAME
     1483# -----------------------
     1484# Declare that FUNC_NAME will run hooks added with
     1485# 'func_add_hook FUNC_NAME ...'.
     1486func_hookable ()
     1487{
     1488    $debug_cmd
     1489
     1490    func_append hookable_fns " $1"
     1491}
     1492
     1493
     1494# func_add_hook FUNC_NAME HOOK_FUNC
     1495# ---------------------------------
     1496# Request that FUNC_NAME call HOOK_FUNC before it returns.  FUNC_NAME must
     1497# first have been declared "hookable" by a call to 'func_hookable'.
     1498func_add_hook ()
     1499{
     1500    $debug_cmd
     1501
     1502    case " $hookable_fns " in
     1503      *" $1 "*) ;;
     1504      *) func_fatal_error "'$1' does not accept hook functions." ;;
     1505    esac
     1506
     1507    eval func_append ${1}_hooks '" $2"'
     1508}
     1509
     1510
     1511# func_remove_hook FUNC_NAME HOOK_FUNC
     1512# ------------------------------------
     1513# Remove HOOK_FUNC from the list of functions called by FUNC_NAME.
     1514func_remove_hook ()
     1515{
     1516    $debug_cmd
     1517
     1518    eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`'
     1519}
     1520
     1521
     1522# func_run_hooks FUNC_NAME [ARG]...
     1523# ---------------------------------
     1524# Run all hook functions registered to FUNC_NAME.
     1525# It is assumed that the list of hook functions contains nothing more
     1526# than a whitespace-delimited list of legal shell function names, and
     1527# no effort is wasted trying to catch shell meta-characters or preserve
     1528# whitespace.
     1529func_run_hooks ()
     1530{
     1531    $debug_cmd
     1532
     1533    case " $hookable_fns " in
     1534      *" $1 "*) ;;
     1535      *) func_fatal_error "'$1' does not support hook funcions.n" ;;
     1536    esac
     1537
     1538    eval _G_hook_fns=\$$1_hooks; shift
     1539
     1540    for _G_hook in $_G_hook_fns; do
     1541      eval $_G_hook '"$@"'
     1542
     1543      # store returned options list back into positional
     1544      # parameters for next 'cmd' execution.
     1545      eval _G_hook_result=\$${_G_hook}_result
     1546      eval set dummy "$_G_hook_result"; shift
     1547    done
     1548
     1549    func_quote_for_eval ${1+"$@"}
     1550    func_run_hooks_result=$func_quote_for_eval_result
     1551}
     1552
     1553
     1554
     1555## --------------- ##
     1556## Option parsing. ##
     1557## --------------- ##
     1558
     1559# In order to add your own option parsing hooks, you must accept the
     1560# full positional parameter list in your hook function, remove any
     1561# options that you action, and then pass back the remaining unprocessed
     1562# options in '<hooked_function_name>_result', escaped suitably for
     1563# 'eval'.  Like this:
     1564#
     1565#    my_options_prep ()
     1566#    {
     1567#        $debug_cmd
     1568#
     1569#        # Extend the existing usage message.
     1570#        usage_message=$usage_message'
     1571#      -s, --silent       don'\''t print informational messages
     1572#    '
     1573#
     1574#        func_quote_for_eval ${1+"$@"}
     1575#        my_options_prep_result=$func_quote_for_eval_result
     1576#    }
     1577#    func_add_hook func_options_prep my_options_prep
     1578#
     1579#
     1580#    my_silent_option ()
     1581#    {
     1582#        $debug_cmd
     1583#
     1584#        # Note that for efficiency, we parse as many options as we can
     1585#        # recognise in a loop before passing the remainder back to the
     1586#        # caller on the first unrecognised argument we encounter.
     1587#        while test $# -gt 0; do
     1588#          opt=$1; shift
     1589#          case $opt in
     1590#            --silent|-s) opt_silent=: ;;
     1591#            # Separate non-argument short options:
     1592#            -s*)         func_split_short_opt "$_G_opt"
     1593#                         set dummy "$func_split_short_opt_name" \
     1594#                             "-$func_split_short_opt_arg" ${1+"$@"}
     1595#                         shift
     1596#                         ;;
     1597#            *)            set dummy "$_G_opt" "$*"; shift; break ;;
     1598#          esac
     1599#        done
     1600#
     1601#        func_quote_for_eval ${1+"$@"}
     1602#        my_silent_option_result=$func_quote_for_eval_result
     1603#    }
     1604#    func_add_hook func_parse_options my_silent_option
     1605#
     1606#
     1607#    my_option_validation ()
     1608#    {
     1609#        $debug_cmd
     1610#
     1611#        $opt_silent && $opt_verbose && func_fatal_help "\
     1612#    '--silent' and '--verbose' options are mutually exclusive."
     1613#
     1614#        func_quote_for_eval ${1+"$@"}
     1615#        my_option_validation_result=$func_quote_for_eval_result
     1616#    }
     1617#    func_add_hook func_validate_options my_option_validation
     1618#
     1619# You'll alse need to manually amend $usage_message to reflect the extra
     1620# options you parse.  It's preferable to append if you can, so that
     1621# multiple option parsing hooks can be added safely.
     1622
     1623
     1624# func_options [ARG]...
     1625# ---------------------
     1626# All the functions called inside func_options are hookable. See the
     1627# individual implementations for details.
     1628func_hookable func_options
     1629func_options ()
     1630{
     1631    $debug_cmd
     1632
     1633    func_options_prep ${1+"$@"}
     1634    eval func_parse_options \
     1635        ${func_options_prep_result+"$func_options_prep_result"}
     1636    eval func_validate_options \
     1637        ${func_parse_options_result+"$func_parse_options_result"}
     1638
     1639    eval func_run_hooks func_options \
     1640        ${func_validate_options_result+"$func_validate_options_result"}
     1641
     1642    # save modified positional parameters for caller
     1643    func_options_result=$func_run_hooks_result
     1644}
     1645
     1646
     1647# func_options_prep [ARG]...
     1648# --------------------------
     1649# All initialisations required before starting the option parse loop.
     1650# Note that when calling hook functions, we pass through the list of
     1651# positional parameters.  If a hook function modifies that list, and
     1652# needs to propogate that back to rest of this script, then the complete
     1653# modified list must be put in 'func_run_hooks_result' before
     1654# returning.
     1655func_hookable func_options_prep
     1656func_options_prep ()
     1657{
     1658    $debug_cmd
     1659
     1660    # Option defaults:
     1661    opt_verbose=false
     1662    opt_warning_types=
     1663
     1664    func_run_hooks func_options_prep ${1+"$@"}
     1665
     1666    # save modified positional parameters for caller
     1667    func_options_prep_result=$func_run_hooks_result
     1668}
     1669
     1670
     1671# func_parse_options [ARG]...
     1672# ---------------------------
     1673# The main option parsing loop.
     1674func_hookable func_parse_options
     1675func_parse_options ()
     1676{
     1677    $debug_cmd
     1678
     1679    func_parse_options_result=
     1680
     1681    # this just eases exit handling
     1682    while test $# -gt 0; do
     1683      # Defer to hook functions for initial option parsing, so they
     1684      # get priority in the event of reusing an option name.
     1685      func_run_hooks func_parse_options ${1+"$@"}
     1686
     1687      # Adjust func_parse_options positional parameters to match
     1688      eval set dummy "$func_run_hooks_result"; shift
     1689
     1690      # Break out of the loop if we already parsed every option.
     1691      test $# -gt 0 || break
     1692
     1693      _G_opt=$1
     1694      shift
     1695      case $_G_opt in
     1696        --debug|-x)   debug_cmd='set -x'
     1697                      func_echo "enabling shell trace mode"
     1698                      $debug_cmd
     1699                      ;;
     1700
     1701        --no-warnings|--no-warning|--no-warn)
     1702                      set dummy --warnings none ${1+"$@"}
     1703                      shift
     1704                      ;;
     1705
     1706        --warnings|--warning|-W)
     1707                      test $# = 0 && func_missing_arg $_G_opt && break
     1708                      case " $warning_categories $1" in
     1709                        *" $1 "*)
     1710                          # trailing space prevents matching last $1 above
     1711                          func_append_uniq opt_warning_types " $1"
     1712                          ;;
     1713                        *all)
     1714                          opt_warning_types=$warning_categories
     1715                          ;;
     1716                        *none)
     1717                          opt_warning_types=none
     1718                          warning_func=:
     1719                          ;;
     1720                        *error)
     1721                          opt_warning_types=$warning_categories
     1722                          warning_func=func_fatal_error
     1723                          ;;
     1724                        *)
     1725                          func_fatal_error \
     1726                             "unsupported warning category: '$1'"
     1727                          ;;
     1728                      esac
     1729                      shift
     1730                      ;;
     1731
     1732        --verbose|-v) opt_verbose=: ;;
     1733        --version)    func_version ;;
     1734        -\?|-h)       func_usage ;;
     1735        --help)       func_help ;;
     1736
     1737        # Separate optargs to long options (plugins may need this):
     1738        --*=*)        func_split_equals "$_G_opt"
     1739                      set dummy "$func_split_equals_lhs" \
     1740                          "$func_split_equals_rhs" ${1+"$@"}
     1741                      shift
     1742                      ;;
     1743
     1744       # Separate optargs to short options:
     1745        -W*)
     1746                      func_split_short_opt "$_G_opt"
     1747                      set dummy "$func_split_short_opt_name" \
     1748                          "$func_split_short_opt_arg" ${1+"$@"}
     1749                      shift
     1750                      ;;
     1751
     1752        # Separate non-argument short options:
     1753        -\?*|-h*|-v*|-x*)
     1754                      func_split_short_opt "$_G_opt"
     1755                      set dummy "$func_split_short_opt_name" \
     1756                          "-$func_split_short_opt_arg" ${1+"$@"}
     1757                      shift
     1758                      ;;
     1759
     1760        --)           break ;;
     1761        -*)           func_fatal_help "unrecognised option: '$_G_opt'" ;;
     1762        *)            set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
     1763      esac
     1764    done
     1765
     1766    # save modified positional parameters for caller
     1767    func_quote_for_eval ${1+"$@"}
     1768    func_parse_options_result=$func_quote_for_eval_result
     1769}
     1770
     1771
     1772# func_validate_options [ARG]...
     1773# ------------------------------
     1774# Perform any sanity checks on option settings and/or unconsumed
     1775# arguments.
     1776func_hookable func_validate_options
     1777func_validate_options ()
     1778{
     1779    $debug_cmd
     1780
     1781    # Display all warnings if -W was not given.
     1782    test -n "$opt_warning_types" || opt_warning_types=" $warning_categories"
     1783
     1784    func_run_hooks func_validate_options ${1+"$@"}
     1785
     1786    # Bail if the options were screwed!
     1787    $exit_cmd $EXIT_FAILURE
     1788
     1789    # save modified positional parameters for caller
     1790    func_validate_options_result=$func_run_hooks_result
     1791}
     1792
     1793
     1794
     1795## ----------------- ##
     1796## Helper functions. ##
     1797## ----------------- ##
     1798
     1799# This section contains the helper functions used by the rest of the
     1800# hookable option parser framework in ascii-betical order.
     1801
     1802
     1803# func_fatal_help ARG...
     1804# ----------------------
     1805# Echo program name prefixed message to standard error, followed by
     1806# a help hint, and exit.
     1807func_fatal_help ()
     1808{
     1809    $debug_cmd
     1810
     1811    eval \$ECHO \""Usage: $usage"\"
     1812    eval \$ECHO \""$fatal_help"\"
     1813    func_error ${1+"$@"}
     1814    exit $EXIT_FAILURE
     1815}
     1816
     1817
     1818# func_help
     1819# ---------
     1820# Echo long help message to standard output and exit.
    7551821func_help ()
    7561822{
    757     $opt_debug
    758 
    759     $SED -n '/^# Usage:/,/# Report bugs to/ {
    760         :print
    761         s/^# //
    762         s/^# *$//
    763         s*\$progname*'$progname'*
    764         s*\$host*'"$host"'*
    765         s*\$SHELL*'"$SHELL"'*
    766         s*\$LTCC*'"$LTCC"'*
    767         s*\$LTCFLAGS*'"$LTCFLAGS"'*
    768         s*\$LD*'"$LD"'*
    769         s/\$with_gnu_ld/'"$with_gnu_ld"'/
    770         s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/
    771         s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/
    772         p
    773         d
    774      }
    775      /^# .* home page:/b print
    776      /^# General help using/b print
    777      ' < "$progpath"
    778     ret=$?
    779     if test -z "$1"; then
    780       exit $ret
    781     fi
    782 }
    783 
    784 # func_missing_arg argname
     1823    $debug_cmd
     1824
     1825    func_usage_message
     1826    $ECHO "$long_help_message"
     1827    exit 0
     1828}
     1829
     1830
     1831# func_missing_arg ARGNAME
     1832# ------------------------
    7851833# Echo program name prefixed message to standard error and set global
    7861834# exit_cmd.
    7871835func_missing_arg ()
    7881836{
    789     $opt_debug
    790 
    791     func_error "missing argument for $1."
     1837    $debug_cmd
     1838
     1839    func_error "Missing argument for '$1'."
    7921840    exit_cmd=exit
    7931841}
    7941842
    7951843
    796 # func_split_short_opt shortopt
     1844# func_split_equals STRING
     1845# ------------------------
     1846# Set func_split_equals_lhs and func_split_equals_rhs shell variables after
     1847# splitting STRING at the '=' sign.
     1848test -z "$_G_HAVE_XSI_OPS" \
     1849    && (eval 'x=a/b/c;
     1850      test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \
     1851    && _G_HAVE_XSI_OPS=yes
     1852
     1853if test yes = "$_G_HAVE_XSI_OPS"
     1854then
     1855  # This is an XSI compatible shell, allowing a faster implementation...
     1856  eval 'func_split_equals ()
     1857  {
     1858      $debug_cmd
     1859
     1860      func_split_equals_lhs=${1%%=*}
     1861      func_split_equals_rhs=${1#*=}
     1862      test "x$func_split_equals_lhs" = "x$1" \
     1863        && func_split_equals_rhs=
     1864  }'
     1865else
     1866  # ...otherwise fall back to using expr, which is often a shell builtin.
     1867  func_split_equals ()
     1868  {
     1869      $debug_cmd
     1870
     1871      func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'`
     1872      func_split_equals_rhs=
     1873      test "x$func_split_equals_lhs" = "x$1" \
     1874        || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'`
     1875  }
     1876fi #func_split_equals
     1877
     1878
     1879# func_split_short_opt SHORTOPT
     1880# -----------------------------
    7971881# Set func_split_short_opt_name and func_split_short_opt_arg shell
    7981882# variables after splitting SHORTOPT after the 2nd character.
    799 func_split_short_opt ()
    800 {
    801     my_sed_short_opt='1s/^\(..\).*$/\1/;q'
    802     my_sed_short_rest='1s/^..\(.*\)$/\1/;q'
    803 
    804     func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"`
    805     func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"`
    806 } # func_split_short_opt may be replaced by extended shell implementation
    807 
    808 
    809 # func_split_long_opt longopt
    810 # Set func_split_long_opt_name and func_split_long_opt_arg shell
    811 # variables after splitting LONGOPT at the `=' sign.
    812 func_split_long_opt ()
    813 {
    814     my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q'
    815     my_sed_long_arg='1s/^--[^=]*=//'
    816 
    817     func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"`
    818     func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"`
    819 } # func_split_long_opt may be replaced by extended shell implementation
    820 
    821 exit_cmd=:
    822 
    823 
    824 
    825 
    826 
    827 magic="%%%MAGIC variable%%%"
    828 magic_exe="%%%MAGIC EXE variable%%%"
    829 
    830 # Global variables.
    831 nonopt=
    832 preserve_args=
    833 lo2o="s/\\.lo\$/.${objext}/"
    834 o2lo="s/\\.${objext}\$/.lo/"
    835 extracted_archives=
    836 extracted_serial=0
    837 
    838 # If this variable is set in any of the actions, the command in it
    839 # will be execed at the end.  This prevents here-documents from being
    840 # left over by shells.
    841 exec_cmd=
    842 
    843 # func_append var value
    844 # Append VALUE to the end of shell variable VAR.
    845 func_append ()
    846 {
    847     eval "${1}=\$${1}\${2}"
    848 } # func_append may be replaced by extended shell implementation
    849 
    850 # func_append_quoted var value
    851 # Quote VALUE and append to the end of shell variable VAR, separated
    852 # by a space.
    853 func_append_quoted ()
    854 {
    855     func_quote_for_eval "${2}"
    856     eval "${1}=\$${1}\\ \$func_quote_for_eval_result"
    857 } # func_append_quoted may be replaced by extended shell implementation
    858 
    859 
    860 # func_arith arithmetic-term...
    861 func_arith ()
    862 {
    863     func_arith_result=`expr "${@}"`
    864 } # func_arith may be replaced by extended shell implementation
    865 
    866 
    867 # func_len string
    868 # STRING may not start with a hyphen.
    869 func_len ()
    870 {
    871     func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len`
    872 } # func_len may be replaced by extended shell implementation
    873 
    874 
    875 # func_lo2o object
    876 func_lo2o ()
    877 {
    878     func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"`
    879 } # func_lo2o may be replaced by extended shell implementation
    880 
    881 
    882 # func_xform libobj-or-source
    883 func_xform ()
    884 {
    885     func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'`
    886 } # func_xform may be replaced by extended shell implementation
    887 
    888 
    889 # func_fatal_configuration arg...
     1883if test yes = "$_G_HAVE_XSI_OPS"
     1884then
     1885  # This is an XSI compatible shell, allowing a faster implementation...
     1886  eval 'func_split_short_opt ()
     1887  {
     1888      $debug_cmd
     1889
     1890      func_split_short_opt_arg=${1#??}
     1891      func_split_short_opt_name=${1%"$func_split_short_opt_arg"}
     1892  }'
     1893else
     1894  # ...otherwise fall back to using expr, which is often a shell builtin.
     1895  func_split_short_opt ()
     1896  {
     1897      $debug_cmd
     1898
     1899      func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'`
     1900      func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'`
     1901  }
     1902fi #func_split_short_opt
     1903
     1904
     1905# func_usage
     1906# ----------
     1907# Echo short help message to standard output and exit.
     1908func_usage ()
     1909{
     1910    $debug_cmd
     1911
     1912    func_usage_message
     1913    $ECHO "Run '$progname --help |${PAGER-more}' for full usage"
     1914    exit 0
     1915}
     1916
     1917
     1918# func_usage_message
     1919# ------------------
     1920# Echo short help message to standard output.
     1921func_usage_message ()
     1922{
     1923    $debug_cmd
     1924
     1925    eval \$ECHO \""Usage: $usage"\"
     1926    echo
     1927    $SED -n 's|^# ||
     1928        /^Written by/{
     1929          x;p;x
     1930        }
     1931        h
     1932        /^Written by/q' < "$progpath"
     1933    echo
     1934    eval \$ECHO \""$usage_message"\"
     1935}
     1936
     1937
     1938# func_version
     1939# ------------
     1940# Echo version message to standard output and exit.
     1941func_version ()
     1942{
     1943    $debug_cmd
     1944
     1945    printf '%s\n' "$progname $scriptversion"
     1946    $SED -n '
     1947        /(C)/!b go
     1948        :more
     1949        /\./!{
     1950          N
     1951          s|\n# | |
     1952          b more
     1953        }
     1954        :go
     1955        /^# Written by /,/# warranty; / {
     1956          s|^# ||
     1957          s|^# *$||
     1958          s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2|
     1959          p
     1960        }
     1961        /^# Written by / {
     1962          s|^# ||
     1963          p
     1964        }
     1965        /^warranty; /q' < "$progpath"
     1966
     1967    exit $?
     1968}
     1969
     1970
     1971# Local variables:
     1972# mode: shell-script
     1973# sh-indentation: 2
     1974# eval: (add-hook 'before-save-hook 'time-stamp)
     1975# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC"
     1976# time-stamp-time-zone: "UTC"
     1977# End:
     1978
     1979# Set a version string.
     1980scriptversion='(GNU libtool) 2.4.6'
     1981
     1982
     1983# func_echo ARG...
     1984# ----------------
     1985# Libtool also displays the current mode in messages, so override
     1986# funclib.sh func_echo with this custom definition.
     1987func_echo ()
     1988{
     1989    $debug_cmd
     1990
     1991    _G_message=$*
     1992
     1993    func_echo_IFS=$IFS
     1994    IFS=$nl
     1995    for _G_line in $_G_message; do
     1996      IFS=$func_echo_IFS
     1997      $ECHO "$progname${opt_mode+: $opt_mode}: $_G_line"
     1998    done
     1999    IFS=$func_echo_IFS
     2000}
     2001
     2002
     2003# func_warning ARG...
     2004# -------------------
     2005# Libtool warnings are not categorized, so override funclib.sh
     2006# func_warning with this simpler definition.
     2007func_warning ()
     2008{
     2009    $debug_cmd
     2010
     2011    $warning_func ${1+"$@"}
     2012}
     2013
     2014
     2015## ---------------- ##
     2016## Options parsing. ##
     2017## ---------------- ##
     2018
     2019# Hook in the functions to make sure our own options are parsed during
     2020# the option parsing loop.
     2021
     2022usage='$progpath [OPTION]... [MODE-ARG]...'
     2023
     2024# Short help message in response to '-h'.
     2025usage_message="Options:
     2026       --config             show all configuration variables
     2027       --debug              enable verbose shell tracing
     2028   -n, --dry-run            display commands without modifying any files
     2029       --features           display basic configuration information and exit
     2030       --mode=MODE          use operation mode MODE
     2031       --no-warnings        equivalent to '-Wnone'
     2032       --preserve-dup-deps  don't remove duplicate dependency libraries
     2033       --quiet, --silent    don't print informational messages
     2034       --tag=TAG            use configuration variables from tag TAG
     2035   -v, --verbose            print more informational messages than default
     2036       --version            print version information
     2037   -W, --warnings=CATEGORY  report the warnings falling in CATEGORY [all]
     2038   -h, --help, --help-all   print short, long, or detailed help message
     2039"
     2040
     2041# Additional text appended to 'usage_message' in response to '--help'.
     2042func_help ()
     2043{
     2044    $debug_cmd
     2045
     2046    func_usage_message
     2047    $ECHO "$long_help_message
     2048
     2049MODE must be one of the following:
     2050
     2051       clean           remove files from the build directory
     2052       compile         compile a source file into a libtool object
     2053       execute         automatically set library path, then run a program
     2054       finish          complete the installation of libtool libraries
     2055       install         install libraries or executables
     2056       link            create a library or an executable
     2057       uninstall       remove libraries from an installed directory
     2058
     2059MODE-ARGS vary depending on the MODE.  When passed as first option,
     2060'--mode=MODE' may be abbreviated as 'MODE' or a unique abbreviation of that.
     2061Try '$progname --help --mode=MODE' for a more detailed description of MODE.
     2062
     2063When reporting a bug, please describe a test case to reproduce it and
     2064include the following information:
     2065
     2066       host-triplet:   $host
     2067       shell:          $SHELL
     2068       compiler:       $LTCC
     2069       compiler flags: $LTCFLAGS
     2070       linker:         $LD (gnu? $with_gnu_ld)
     2071       version:        $progname (GNU libtool) 2.4.6
     2072       automake:       `($AUTOMAKE --version) 2>/dev/null |$SED 1q`
     2073       autoconf:       `($AUTOCONF --version) 2>/dev/null |$SED 1q`
     2074
     2075Report bugs to <bug-libtool@gnu.org>.
     2076GNU libtool home page: <http://www.gnu.org/software/libtool/>.
     2077General help using GNU software: <http://www.gnu.org/gethelp/>."
     2078    exit 0
     2079}
     2080
     2081
     2082# func_lo2o OBJECT-NAME
     2083# ---------------------
     2084# Transform OBJECT-NAME from a '.lo' suffix to the platform specific
     2085# object suffix.
     2086
     2087lo2o=s/\\.lo\$/.$objext/
     2088o2lo=s/\\.$objext\$/.lo/
     2089
     2090if test yes = "$_G_HAVE_XSI_OPS"; then
     2091  eval 'func_lo2o ()
     2092  {
     2093    case $1 in
     2094      *.lo) func_lo2o_result=${1%.lo}.$objext ;;
     2095      *   ) func_lo2o_result=$1               ;;
     2096    esac
     2097  }'
     2098
     2099  # func_xform LIBOBJ-OR-SOURCE
     2100  # ---------------------------
     2101  # Transform LIBOBJ-OR-SOURCE from a '.o' or '.c' (or otherwise)
     2102  # suffix to a '.lo' libtool-object suffix.
     2103  eval 'func_xform ()
     2104  {
     2105    func_xform_result=${1%.*}.lo
     2106  }'
     2107else
     2108  # ...otherwise fall back to using sed.
     2109  func_lo2o ()
     2110  {
     2111    func_lo2o_result=`$ECHO "$1" | $SED "$lo2o"`
     2112  }
     2113
     2114  func_xform ()
     2115  {
     2116    func_xform_result=`$ECHO "$1" | $SED 's|\.[^.]*$|.lo|'`
     2117  }
     2118fi
     2119
     2120
     2121# func_fatal_configuration ARG...
     2122# -------------------------------
    8902123# Echo program name prefixed message to standard error, followed by
    8912124# a configuration failure hint, and exit.
    8922125func_fatal_configuration ()
    8932126{
    894     func_error ${1+"$@"}
    895     func_error "See the $PACKAGE documentation for more information."
    896     func_fatal_error "Fatal configuration error."
     2127    func__fatal_error ${1+"$@"} \
     2128      "See the $PACKAGE documentation for more information." \
     2129      "Fatal configuration error."
    8972130}
    8982131
    8992132
    9002133# func_config
     2134# -----------
    9012135# Display the configuration for all the tags in this script.
    9022136func_config ()
     
    9162150}
    9172151
     2152
    9182153# func_features
     2154# -------------
    9192155# Display the features supported by this script.
    9202156func_features ()
    9212157{
    9222158    echo "host: $host"
    923     if test "$build_libtool_libs" = yes; then
     2159    if test yes = "$build_libtool_libs"; then
    9242160      echo "enable shared libraries"
    9252161    else
    9262162      echo "disable shared libraries"
    9272163    fi
    928     if test "$build_old_libs" = yes; then
     2164    if test yes = "$build_old_libs"; then
    9292165      echo "enable static libraries"
    9302166    else
     
    9352171}
    9362172
    937 # func_enable_tag tagname
     2173
     2174# func_enable_tag TAGNAME
     2175# -----------------------
    9382176# Verify that TAGNAME is valid, and either flag an error and exit, or
    9392177# enable the TAGNAME tag.  We also add TAGNAME to the global $taglist
     
    9412179func_enable_tag ()
    9422180{
    943   # Global variable:
    944   tagname="$1"
    945 
    946   re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
    947   re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
    948   sed_extractcf="/$re_begincf/,/$re_endcf/p"
    949 
    950   # Validate tagname.
    951   case $tagname in
    952     *[!-_A-Za-z0-9,/]*)
    953       func_fatal_error "invalid tag name: $tagname"
    954       ;;
    955   esac
    956 
    957   # Don't test for the "default" C tag, as we know it's
    958   # there but not specially marked.
    959   case $tagname in
    960     CC) ;;
     2181    # Global variable:
     2182    tagname=$1
     2183
     2184    re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
     2185    re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
     2186    sed_extractcf=/$re_begincf/,/$re_endcf/p
     2187
     2188    # Validate tagname.
     2189    case $tagname in
     2190      *[!-_A-Za-z0-9,/]*)
     2191        func_fatal_error "invalid tag name: $tagname"
     2192        ;;
     2193    esac
     2194
     2195    # Don't test for the "default" C tag, as we know it's
     2196    # there but not specially marked.
     2197    case $tagname in
     2198        CC) ;;
    9612199    *)
    962       if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then
    963         taglist="$taglist $tagname"
    964 
    965         # Evaluate the configuration.  Be careful to quote the path
    966         # and the sed script, to avoid splitting on whitespace, but
    967         # also don't use non-portable quotes within backquotes within
    968         # quotes we have to do it in 2 steps:
    969         extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
    970         eval "$extractedcf"
    971       else
    972         func_error "ignoring unknown tag $tagname"
    973       fi
    974       ;;
    975   esac
    976 }
     2200        if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then
     2201          taglist="$taglist $tagname"
     2202
     2203          # Evaluate the configuration.  Be careful to quote the path
     2204          # and the sed script, to avoid splitting on whitespace, but
     2205          # also don't use non-portable quotes within backquotes within
     2206          # quotes we have to do it in 2 steps:
     2207          extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
     2208          eval "$extractedcf"
     2209        else
     2210          func_error "ignoring unknown tag $tagname"
     2211        fi
     2212        ;;
     2213    esac
     2214}
     2215
    9772216
    9782217# func_check_version_match
     2218# ------------------------
    9792219# Ensure that we are using m4 macros, and libtool script from the same
    9802220# release of libtool.
    9812221func_check_version_match ()
    9822222{
    983   if test "$package_revision" != "$macro_revision"; then
    984     if test "$VERSION" != "$macro_version"; then
    985       if test -z "$macro_version"; then
    986         cat >&2 <<_LT_EOF
     2223    if test "$package_revision" != "$macro_revision"; then
     2224      if test "$VERSION" != "$macro_version"; then
     2225        if test -z "$macro_version"; then
     2226          cat >&2 <<_LT_EOF
    9872227$progname: Version mismatch error.  This is $PACKAGE $VERSION, but the
    9882228$progname: definition of this LT_INIT comes from an older release.
     
    9902230$progname: and run autoconf again.
    9912231_LT_EOF
    992       else
    993         cat >&2 <<_LT_EOF
     2232        else
     2233          cat >&2 <<_LT_EOF
    9942234$progname: Version mismatch error.  This is $PACKAGE $VERSION, but the
    9952235$progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
     
    9972237$progname: and run autoconf again.
    9982238_LT_EOF
    999       fi
    1000     else
    1001       cat >&2 <<_LT_EOF
     2239        fi
     2240      else
     2241        cat >&2 <<_LT_EOF
    10022242$progname: Version mismatch error.  This is $PACKAGE $VERSION, revision $package_revision,
    10032243$progname: but the definition of this LT_INIT comes from revision $macro_revision.
     
    10052245$progname: of $PACKAGE $VERSION and run autoconf again.
    10062246_LT_EOF
     2247      fi
     2248
     2249      exit $EXIT_MISMATCH
    10072250    fi
    1008 
    1009     exit $EXIT_MISMATCH
    1010   fi
    1011 }
    1012 
    1013 
    1014 # Shorthand for --mode=foo, only valid as the first argument
    1015 case $1 in
    1016 clean|clea|cle|cl)
    1017   shift; set dummy --mode clean ${1+"$@"}; shift
    1018   ;;
    1019 compile|compil|compi|comp|com|co|c)
    1020   shift; set dummy --mode compile ${1+"$@"}; shift
    1021   ;;
    1022 execute|execut|execu|exec|exe|ex|e)
    1023   shift; set dummy --mode execute ${1+"$@"}; shift
    1024   ;;
    1025 finish|finis|fini|fin|fi|f)
    1026   shift; set dummy --mode finish ${1+"$@"}; shift
    1027   ;;
    1028 install|instal|insta|inst|ins|in|i)
    1029   shift; set dummy --mode install ${1+"$@"}; shift
    1030   ;;
    1031 link|lin|li|l)
    1032   shift; set dummy --mode link ${1+"$@"}; shift
    1033   ;;
    1034 uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
    1035   shift; set dummy --mode uninstall ${1+"$@"}; shift
    1036   ;;
    1037 esac
    1038 
    1039 
    1040 
    1041 # Option defaults:
    1042 opt_debug=:
    1043 opt_dry_run=false
    1044 opt_config=false
    1045 opt_preserve_dup_deps=false
    1046 opt_features=false
    1047 opt_finish=false
    1048 opt_help=false
    1049 opt_help_all=false
    1050 opt_silent=:
    1051 opt_warning=:
    1052 opt_verbose=:
    1053 opt_silent=false
    1054 opt_verbose=false
    1055 
    1056 
    1057 # Parse options once, thoroughly.  This comes as soon as possible in the
    1058 # script to make things like `--version' happen as quickly as we can.
    1059 {
    1060   # this just eases exit handling
    1061   while test $# -gt 0; do
    1062     opt="$1"
    1063     shift
    1064     case $opt in
    1065       --debug|-x)       opt_debug='set -x'
    1066                         func_echo "enabling shell trace mode"
    1067                         $opt_debug
    1068                         ;;
    1069       --dry-run|--dryrun|-n)
    1070                         opt_dry_run=:
    1071                         ;;
    1072       --config)
    1073                         opt_config=:
    1074 func_config
    1075                         ;;
    1076       --dlopen|-dlopen)
    1077                         optarg="$1"
    1078                         opt_dlopen="${opt_dlopen+$opt_dlopen
    1079 }$optarg"
    1080                         shift
    1081                         ;;
    1082       --preserve-dup-deps)
    1083                         opt_preserve_dup_deps=:
    1084                         ;;
    1085       --features)
    1086                         opt_features=:
    1087 func_features
    1088                         ;;
    1089       --finish)
    1090                         opt_finish=:
    1091 set dummy --mode finish ${1+"$@"}; shift
    1092                         ;;
    1093       --help)
    1094                         opt_help=:
    1095                         ;;
    1096       --help-all)
    1097                         opt_help_all=:
    1098 opt_help=': help-all'
    1099                         ;;
    1100       --mode)
    1101                         test $# = 0 && func_missing_arg $opt && break
    1102                         optarg="$1"
    1103                         opt_mode="$optarg"
    1104 case $optarg in
    1105   # Valid mode arguments:
    1106   clean|compile|execute|finish|install|link|relink|uninstall) ;;
    1107 
    1108   # Catch anything else as an error
    1109   *) func_error "invalid argument for $opt"
    1110      exit_cmd=exit
    1111      break
    1112      ;;
    1113 esac
    1114                         shift
    1115                         ;;
    1116       --no-silent|--no-quiet)
    1117                         opt_silent=false
    1118 func_append preserve_args " $opt"
    1119                         ;;
    1120       --no-warning|--no-warn)
    1121                         opt_warning=false
    1122 func_append preserve_args " $opt"
    1123                         ;;
    1124       --no-verbose)
    1125                         opt_verbose=false
    1126 func_append preserve_args " $opt"
    1127                         ;;
    1128       --silent|--quiet)
    1129                         opt_silent=:
    1130 func_append preserve_args " $opt"
    1131         opt_verbose=false
    1132                         ;;
    1133       --verbose|-v)
    1134                         opt_verbose=:
    1135 func_append preserve_args " $opt"
    1136 opt_silent=false
    1137                         ;;
    1138       --tag)
    1139                         test $# = 0 && func_missing_arg $opt && break
    1140                         optarg="$1"
    1141                         opt_tag="$optarg"
    1142 func_append preserve_args " $opt $optarg"
    1143 func_enable_tag "$optarg"
    1144                         shift
    1145                         ;;
    1146 
    1147       -\?|-h)           func_usage                              ;;
    1148       --help)           func_help                               ;;
    1149       --version)        func_version                            ;;
    1150 
    1151       # Separate optargs to long options:
    1152       --*=*)
    1153                         func_split_long_opt "$opt"
    1154                         set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"}
    1155                         shift
    1156                         ;;
    1157 
    1158       # Separate non-argument short options:
    1159       -\?*|-h*|-n*|-v*)
    1160                         func_split_short_opt "$opt"
    1161                         set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"}
    1162                         shift
    1163                         ;;
    1164 
    1165       --)               break                                   ;;
    1166       -*)               func_fatal_help "unrecognized option \`$opt'" ;;
    1167       *)                set dummy "$opt" ${1+"$@"};     shift; break  ;;
     2251}
     2252
     2253
     2254# libtool_options_prep [ARG]...
     2255# -----------------------------
     2256# Preparation for options parsed by libtool.
     2257libtool_options_prep ()
     2258{
     2259    $debug_mode
     2260
     2261    # Option defaults:
     2262    opt_config=false
     2263    opt_dlopen=
     2264    opt_dry_run=false
     2265    opt_help=false
     2266    opt_mode=
     2267    opt_preserve_dup_deps=false
     2268    opt_quiet=false
     2269
     2270    nonopt=
     2271    preserve_args=
     2272
     2273    # Shorthand for --mode=foo, only valid as the first argument
     2274    case $1 in
     2275    clean|clea|cle|cl)
     2276      shift; set dummy --mode clean ${1+"$@"}; shift
     2277      ;;
     2278    compile|compil|compi|comp|com|co|c)
     2279      shift; set dummy --mode compile ${1+"$@"}; shift
     2280      ;;
     2281    execute|execut|execu|exec|exe|ex|e)
     2282      shift; set dummy --mode execute ${1+"$@"}; shift
     2283      ;;
     2284    finish|finis|fini|fin|fi|f)
     2285      shift; set dummy --mode finish ${1+"$@"}; shift
     2286      ;;
     2287    install|instal|insta|inst|ins|in|i)
     2288      shift; set dummy --mode install ${1+"$@"}; shift
     2289      ;;
     2290    link|lin|li|l)
     2291      shift; set dummy --mode link ${1+"$@"}; shift
     2292      ;;
     2293    uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
     2294      shift; set dummy --mode uninstall ${1+"$@"}; shift
     2295      ;;
    11682296    esac
    1169   done
    1170 
    1171   # Validate options:
    1172 
    1173   # save first non-option argument
    1174   if test "$#" -gt 0; then
    1175     nonopt="$opt"
    1176     shift
    1177   fi
    1178 
    1179   # preserve --debug
    1180   test "$opt_debug" = : || func_append preserve_args " --debug"
    1181 
    1182   case $host in
    1183     *cygwin* | *mingw* | *pw32* | *cegcc*)
    1184       # don't eliminate duplications in $postdeps and $predeps
    1185       opt_duplicate_compiler_generated_deps=:
    1186       ;;
    1187     *)
    1188       opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps
    1189       ;;
    1190   esac
    1191 
    1192   $opt_help || {
    1193     # Sanity checks first:
    1194     func_check_version_match
    1195 
    1196     if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
    1197       func_fatal_configuration "not configured to build any kind of library"
     2297
     2298    # Pass back the list of options.
     2299    func_quote_for_eval ${1+"$@"}
     2300    libtool_options_prep_result=$func_quote_for_eval_result
     2301}
     2302func_add_hook func_options_prep libtool_options_prep
     2303
     2304
     2305# libtool_parse_options [ARG]...
     2306# ---------------------------------
     2307# Provide handling for libtool specific options.
     2308libtool_parse_options ()
     2309{
     2310    $debug_cmd
     2311
     2312    # Perform our own loop to consume as many options as possible in
     2313    # each iteration.
     2314    while test $# -gt 0; do
     2315      _G_opt=$1
     2316      shift
     2317      case $_G_opt in
     2318        --dry-run|--dryrun|-n)
     2319                        opt_dry_run=:
     2320                        ;;
     2321
     2322        --config)       func_config ;;
     2323
     2324        --dlopen|-dlopen)
     2325                        opt_dlopen="${opt_dlopen+$opt_dlopen
     2326}$1"
     2327                        shift
     2328                        ;;
     2329
     2330        --preserve-dup-deps)
     2331                        opt_preserve_dup_deps=: ;;
     2332
     2333        --features)     func_features ;;
     2334
     2335        --finish)       set dummy --mode finish ${1+"$@"}; shift ;;
     2336
     2337        --help)         opt_help=: ;;
     2338
     2339        --help-all)     opt_help=': help-all' ;;
     2340
     2341        --mode)         test $# = 0 && func_missing_arg $_G_opt && break
     2342                        opt_mode=$1
     2343                        case $1 in
     2344                          # Valid mode arguments:
     2345                          clean|compile|execute|finish|install|link|relink|uninstall) ;;
     2346
     2347                          # Catch anything else as an error
     2348                          *) func_error "invalid argument for $_G_opt"
     2349                             exit_cmd=exit
     2350                             break
     2351                             ;;
     2352                        esac
     2353                        shift
     2354                        ;;
     2355
     2356        --no-silent|--no-quiet)
     2357                        opt_quiet=false
     2358                        func_append preserve_args " $_G_opt"
     2359                        ;;
     2360
     2361        --no-warnings|--no-warning|--no-warn)
     2362                        opt_warning=false
     2363                        func_append preserve_args " $_G_opt"
     2364                        ;;
     2365
     2366        --no-verbose)
     2367                        opt_verbose=false
     2368                        func_append preserve_args " $_G_opt"
     2369                        ;;
     2370
     2371        --silent|--quiet)
     2372                        opt_quiet=:
     2373                        opt_verbose=false
     2374                        func_append preserve_args " $_G_opt"
     2375                        ;;
     2376
     2377        --tag)          test $# = 0 && func_missing_arg $_G_opt && break
     2378                        opt_tag=$1
     2379                        func_append preserve_args " $_G_opt $1"
     2380                        func_enable_tag "$1"
     2381                        shift
     2382                        ;;
     2383
     2384        --verbose|-v)   opt_quiet=false
     2385                        opt_verbose=:
     2386                        func_append preserve_args " $_G_opt"
     2387                        ;;
     2388
     2389        # An option not handled by this hook function:
     2390        *)              set dummy "$_G_opt" ${1+"$@"};  shift; break  ;;
     2391      esac
     2392    done
     2393
     2394
     2395    # save modified positional parameters for caller
     2396    func_quote_for_eval ${1+"$@"}
     2397    libtool_parse_options_result=$func_quote_for_eval_result
     2398}
     2399func_add_hook func_parse_options libtool_parse_options
     2400
     2401
     2402
     2403# libtool_validate_options [ARG]...
     2404# ---------------------------------
     2405# Perform any sanity checks on option settings and/or unconsumed
     2406# arguments.
     2407libtool_validate_options ()
     2408{
     2409    # save first non-option argument
     2410    if test 0 -lt $#; then
     2411      nonopt=$1
     2412      shift
    11982413    fi
    11992414
    1200     # Darwin sucks
    1201     eval std_shrext=\"$shrext_cmds\"
    1202 
    1203     # Only execute mode is allowed to have -dlopen flags.
    1204     if test -n "$opt_dlopen" && test "$opt_mode" != execute; then
    1205       func_error "unrecognized option \`-dlopen'"
    1206       $ECHO "$help" 1>&2
    1207       exit $EXIT_FAILURE
    1208     fi
    1209 
    1210     # Change the help message to a mode-specific one.
    1211     generic_help="$help"
    1212     help="Try \`$progname --help --mode=$opt_mode' for more information."
    1213   }
    1214 
    1215 
    1216   # Bail if the options were screwed
    1217   $exit_cmd $EXIT_FAILURE
    1218 }
    1219 
     2415    # preserve --debug
     2416    test : = "$debug_cmd" || func_append preserve_args " --debug"
     2417
     2418    case $host in
     2419      # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452
     2420      # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788
     2421      *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*)
     2422        # don't eliminate duplications in $postdeps and $predeps
     2423        opt_duplicate_compiler_generated_deps=:
     2424        ;;
     2425      *)
     2426        opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps
     2427        ;;
     2428    esac
     2429
     2430    $opt_help || {
     2431      # Sanity checks first:
     2432      func_check_version_match
     2433
     2434      test yes != "$build_libtool_libs" \
     2435        && test yes != "$build_old_libs" \
     2436        && func_fatal_configuration "not configured to build any kind of library"
     2437
     2438      # Darwin sucks
     2439      eval std_shrext=\"$shrext_cmds\"
     2440
     2441      # Only execute mode is allowed to have -dlopen flags.
     2442      if test -n "$opt_dlopen" && test execute != "$opt_mode"; then
     2443        func_error "unrecognized option '-dlopen'"
     2444        $ECHO "$help" 1>&2
     2445        exit $EXIT_FAILURE
     2446      fi
     2447
     2448      # Change the help message to a mode-specific one.
     2449      generic_help=$help
     2450      help="Try '$progname --help --mode=$opt_mode' for more information."
     2451    }
     2452
     2453    # Pass back the unparsed argument list
     2454    func_quote_for_eval ${1+"$@"}
     2455    libtool_validate_options_result=$func_quote_for_eval_result
     2456}
     2457func_add_hook func_validate_options libtool_validate_options
     2458
     2459
     2460# Process options as early as possible so that --help and --version
     2461# can return quickly.
     2462func_options ${1+"$@"}
     2463eval set dummy "$func_options_result"; shift
    12202464
    12212465
     
    12252469## ----------- ##
    12262470
     2471magic='%%%MAGIC variable%%%'
     2472magic_exe='%%%MAGIC EXE variable%%%'
     2473
     2474# Global variables.
     2475extracted_archives=
     2476extracted_serial=0
     2477
     2478# If this variable is set in any of the actions, the command in it
     2479# will be execed at the end.  This prevents here-documents from being
     2480# left over by shells.
     2481exec_cmd=
     2482
     2483
     2484# A function that is used when there is no print builtin or printf.
     2485func_fallback_echo ()
     2486{
     2487  eval 'cat <<_LTECHO_EOF
     2488$1
     2489_LTECHO_EOF'
     2490}
     2491
     2492# func_generated_by_libtool
     2493# True iff stdin has been generated by Libtool. This function is only
     2494# a basic sanity check; it will hardly flush out determined imposters.
     2495func_generated_by_libtool_p ()
     2496{
     2497  $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
     2498}
     2499
    12272500# func_lalib_p file
    1228 # True iff FILE is a libtool `.la' library or `.lo' object file.
     2501# True iff FILE is a libtool '.la' library or '.lo' object file.
    12292502# This function is only a basic sanity check; it will hardly flush out
    12302503# determined imposters.
     
    12322505{
    12332506    test -f "$1" &&
    1234       $SED -e 4q "$1" 2>/dev/null \
    1235         | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
     2507      $SED -e 4q "$1" 2>/dev/null | func_generated_by_libtool_p
    12362508}
    12372509
    12382510# func_lalib_unsafe_p file
    1239 # True iff FILE is a libtool `.la' library or `.lo' object file.
     2511# True iff FILE is a libtool '.la' library or '.lo' object file.
    12402512# This function implements the same check as func_lalib_p without
    12412513# resorting to external programs.  To this end, it redirects stdin and
    12422514# closes it afterwards, without saving the original file descriptor.
    12432515# As a safety measure, use it only where a negative result would be
    1244 # fatal anyway.  Works if `file' does not exist.
     2516# fatal anyway.  Works if 'file' does not exist.
    12452517func_lalib_unsafe_p ()
    12462518{
     
    12502522        do
    12512523            read lalib_p_line
    1252             case "$lalib_p_line" in
     2524            case $lalib_p_line in
    12532525                \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;;
    12542526            esac
     
    12562528        exec 0<&5 5<&-
    12572529    fi
    1258     test "$lalib_p" = yes
     2530    test yes = "$lalib_p"
    12592531}
    12602532
     
    12652537func_ltwrapper_script_p ()
    12662538{
    1267     func_lalib_p "$1"
     2539    test -f "$1" &&
     2540      $lt_truncate_bin < "$1" 2>/dev/null | func_generated_by_libtool_p
    12682541}
    12692542
     
    12902563    func_dirname_and_basename "$1" "" "."
    12912564    func_stripname '' '.exe' "$func_basename_result"
    1292     func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
     2565    func_ltwrapper_scriptname_result=$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper
    12932566}
    12942567
     
    13092582func_execute_cmds ()
    13102583{
    1311     $opt_debug
     2584    $debug_cmd
     2585
    13122586    save_ifs=$IFS; IFS='~'
    13132587    for cmd in $1; do
     2588      IFS=$sp$nl
     2589      eval cmd=\"$cmd\"
    13142590      IFS=$save_ifs
    1315       eval cmd=\"$cmd\"
    13162591      func_show_eval "$cmd" "${2-:}"
    13172592    done
     
    13252600# FILE even if both FILE and FILE.exe exist: automatic-append-.exe
    13262601# behavior happens only for exec(3), not for open(2)!  Also, sourcing
    1327 # `FILE.' does not work on cygwin managed mounts.
     2602# 'FILE.' does not work on cygwin managed mounts.
    13282603func_source ()
    13292604{
    1330     $opt_debug
     2605    $debug_cmd
     2606
    13312607    case $1 in
    13322608    */* | *\\*) . "$1" ;;
     
    13552631func_replace_sysroot ()
    13562632{
    1357   case "$lt_sysroot:$1" in
     2633  case $lt_sysroot:$1 in
    13582634  ?*:"$lt_sysroot"*)
    13592635    func_stripname "$lt_sysroot" '' "$1"
    1360     func_replace_sysroot_result="=$func_stripname_result"
     2636    func_replace_sysroot_result='='$func_stripname_result
    13612637    ;;
    13622638  *)
     
    13752651func_infer_tag ()
    13762652{
    1377     $opt_debug
     2653    $debug_cmd
     2654
    13782655    if test -n "$available_tags" && test -z "$tagname"; then
    13792656      CC_quoted=
     
    13942671          if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
    13952672            # Evaluate the configuration.
    1396             eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
     2673            eval "`$SED -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
    13972674            CC_quoted=
    13982675            for arg in $CC; do
     
    14192696        if test -z "$tagname"; then
    14202697          func_echo "unable to infer tagged configuration"
    1421           func_fatal_error "specify a tag with \`--tag'"
     2698          func_fatal_error "specify a tag with '--tag'"
    14222699#       else
    14232700#         func_verbose "using $tagname tagged configuration"
     
    14352712func_write_libtool_object ()
    14362713{
    1437     write_libobj=${1}
    1438     if test "$build_libtool_libs" = yes; then
    1439       write_lobj=\'${2}\'
     2714    write_libobj=$1
     2715    if test yes = "$build_libtool_libs"; then
     2716      write_lobj=\'$2\'
    14402717    else
    14412718      write_lobj=none
    14422719    fi
    14432720
    1444     if test "$build_old_libs" = yes; then
    1445       write_oldobj=\'${3}\'
     2721    if test yes = "$build_old_libs"; then
     2722      write_oldobj=\'$3\'
    14462723    else
    14472724      write_oldobj=none
     
    14512728      cat >${write_libobj}T <<EOF
    14522729# $write_libobj - a libtool object file
    1453 # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
     2730# Generated by $PROGRAM (GNU $PACKAGE) $VERSION
    14542731#
    14552732# Please DO NOT delete this file!
     
    14632740
    14642741EOF
    1465       $MV "${write_libobj}T" "${write_libobj}"
     2742      $MV "${write_libobj}T" "$write_libobj"
    14662743    }
    14672744}
     
    14832760func_convert_core_file_wine_to_w32 ()
    14842761{
    1485   $opt_debug
    1486   func_convert_core_file_wine_to_w32_result="$1"
     2762  $debug_cmd
     2763
     2764  func_convert_core_file_wine_to_w32_result=$1
    14872765  if test -n "$1"; then
    14882766    # Unfortunately, winepath does not exit with a non-zero error code, so we
     
    14922770    # zero AND non-empty stdout, which explains the odd construction:
    14932771    func_convert_core_file_wine_to_w32_tmp=`winepath -w "$1" 2>/dev/null`
    1494     if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then
     2772    if test "$?" -eq 0 && test -n "$func_convert_core_file_wine_to_w32_tmp"; then
    14952773      func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" |
    1496         $SED -e "$lt_sed_naive_backslashify"`
     2774        $SED -e "$sed_naive_backslashify"`
    14972775    else
    14982776      func_convert_core_file_wine_to_w32_result=
     
    15152793func_convert_core_path_wine_to_w32 ()
    15162794{
    1517   $opt_debug
     2795  $debug_cmd
     2796
    15182797  # unfortunately, winepath doesn't convert paths, only file names
    1519   func_convert_core_path_wine_to_w32_result=""
     2798  func_convert_core_path_wine_to_w32_result=
    15202799  if test -n "$1"; then
    15212800    oldIFS=$IFS
     
    15242803      IFS=$oldIFS
    15252804      func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f"
    1526       if test -n "$func_convert_core_file_wine_to_w32_result" ; then
     2805      if test -n "$func_convert_core_file_wine_to_w32_result"; then
    15272806        if test -z "$func_convert_core_path_wine_to_w32_result"; then
    1528           func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result"
     2807          func_convert_core_path_wine_to_w32_result=$func_convert_core_file_wine_to_w32_result
    15292808        else
    15302809          func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result"
     
    15552834func_cygpath ()
    15562835{
    1557   $opt_debug
     2836  $debug_cmd
     2837
    15582838  if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then
    15592839    func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null`
     
    15642844  else
    15652845    func_cygpath_result=
    1566     func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'"
     2846    func_error "LT_CYGPATH is empty or specifies non-existent file: '$LT_CYGPATH'"
    15672847  fi
    15682848}
     
    15752855func_convert_core_msys_to_w32 ()
    15762856{
    1577   $opt_debug
     2857  $debug_cmd
     2858
    15782859  # awkward: cmd appends spaces to result
    15792860  func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null |
    1580     $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"`
     2861    $SED -e 's/[ ]*$//' -e "$sed_naive_backslashify"`
    15812862}
    15822863#end: func_convert_core_msys_to_w32
     
    15892870func_convert_file_check ()
    15902871{
    1591   $opt_debug
    1592   if test -z "$2" && test -n "$1" ; then
     2872  $debug_cmd
     2873
     2874  if test -z "$2" && test -n "$1"; then
    15932875    func_error "Could not determine host file name corresponding to"
    1594     func_error "  \`$1'"
     2876    func_error "  '$1'"
    15952877    func_error "Continuing, but uninstalled executables may not work."
    15962878    # Fallback:
    1597     func_to_host_file_result="$1"
     2879    func_to_host_file_result=$1
    15982880  fi
    15992881}
     
    16072889func_convert_path_check ()
    16082890{
    1609   $opt_debug
     2891  $debug_cmd
     2892
    16102893  if test -z "$4" && test -n "$3"; then
    16112894    func_error "Could not determine the host path corresponding to"
    1612     func_error "  \`$3'"
     2895    func_error "  '$3'"
    16132896    func_error "Continuing, but uninstalled executables may not work."
    16142897    # Fallback.  This is a deliberately simplistic "conversion" and
     
    16192902        $SED -e "$lt_replace_pathsep_chars"`
    16202903    else
    1621       func_to_host_path_result="$3"
     2904      func_to_host_path_result=$3
    16222905    fi
    16232906  fi
     
    16312914func_convert_path_front_back_pathsep ()
    16322915{
    1633   $opt_debug
     2916  $debug_cmd
     2917
    16342918  case $4 in
    1635   $1 ) func_to_host_path_result="$3$func_to_host_path_result"
     2919  $1 ) func_to_host_path_result=$3$func_to_host_path_result
    16362920    ;;
    16372921  esac
     
    16472931# $build to $host FILE NAME CONVERSION FUNCTIONS #
    16482932##################################################
    1649 # invoked via `$to_host_file_cmd ARG'
     2933# invoked via '$to_host_file_cmd ARG'
    16502934#
    16512935# In each case, ARG is the path to be converted from $build to $host format.
     
    16582942func_to_host_file ()
    16592943{
    1660   $opt_debug
     2944  $debug_cmd
     2945
    16612946  $to_host_file_cmd "$1"
    16622947}
     
    16702955func_to_tool_file ()
    16712956{
    1672   $opt_debug
     2957  $debug_cmd
     2958
    16732959  case ,$2, in
    16742960    *,"$to_tool_file_cmd",*)
     
    16882974func_convert_file_noop ()
    16892975{
    1690   func_to_host_file_result="$1"
     2976  func_to_host_file_result=$1
    16912977}
    16922978# end func_convert_file_noop
     
    16992985func_convert_file_msys_to_w32 ()
    17002986{
    1701   $opt_debug
    1702   func_to_host_file_result="$1"
     2987  $debug_cmd
     2988
     2989  func_to_host_file_result=$1
    17032990  if test -n "$1"; then
    17042991    func_convert_core_msys_to_w32 "$1"
    1705     func_to_host_file_result="$func_convert_core_msys_to_w32_result"
     2992    func_to_host_file_result=$func_convert_core_msys_to_w32_result
    17062993  fi
    17072994  func_convert_file_check "$1" "$func_to_host_file_result"
     
    17153002func_convert_file_cygwin_to_w32 ()
    17163003{
    1717   $opt_debug
    1718   func_to_host_file_result="$1"
     3004  $debug_cmd
     3005
     3006  func_to_host_file_result=$1
    17193007  if test -n "$1"; then
    17203008    # because $build is cygwin, we call "the" cygpath in $PATH; no need to use
     
    17323020func_convert_file_nix_to_w32 ()
    17333021{
    1734   $opt_debug
    1735   func_to_host_file_result="$1"
     3022  $debug_cmd
     3023
     3024  func_to_host_file_result=$1
    17363025  if test -n "$1"; then
    17373026    func_convert_core_file_wine_to_w32 "$1"
    1738     func_to_host_file_result="$func_convert_core_file_wine_to_w32_result"
     3027    func_to_host_file_result=$func_convert_core_file_wine_to_w32_result
    17393028  fi
    17403029  func_convert_file_check "$1" "$func_to_host_file_result"
     
    17483037func_convert_file_msys_to_cygwin ()
    17493038{
    1750   $opt_debug
    1751   func_to_host_file_result="$1"
     3039  $debug_cmd
     3040
     3041  func_to_host_file_result=$1
    17523042  if test -n "$1"; then
    17533043    func_convert_core_msys_to_w32 "$1"
    17543044    func_cygpath -u "$func_convert_core_msys_to_w32_result"
    1755     func_to_host_file_result="$func_cygpath_result"
     3045    func_to_host_file_result=$func_cygpath_result
    17563046  fi
    17573047  func_convert_file_check "$1" "$func_to_host_file_result"
     
    17663056func_convert_file_nix_to_cygwin ()
    17673057{
    1768   $opt_debug
    1769   func_to_host_file_result="$1"
     3058  $debug_cmd
     3059
     3060  func_to_host_file_result=$1
    17703061  if test -n "$1"; then
    17713062    # convert from *nix to w32, then use cygpath to convert from w32 to cygwin.
    17723063    func_convert_core_file_wine_to_w32 "$1"
    17733064    func_cygpath -u "$func_convert_core_file_wine_to_w32_result"
    1774     func_to_host_file_result="$func_cygpath_result"
     3065    func_to_host_file_result=$func_cygpath_result
    17753066  fi
    17763067  func_convert_file_check "$1" "$func_to_host_file_result"
     
    17823073# $build to $host PATH CONVERSION FUNCTIONS #
    17833074#############################################
    1784 # invoked via `$to_host_path_cmd ARG'
     3075# invoked via '$to_host_path_cmd ARG'
    17853076#
    17863077# In each case, ARG is the path to be converted from $build to $host format.
     
    18063097func_init_to_host_path_cmd ()
    18073098{
    1808   $opt_debug
     3099  $debug_cmd
     3100
    18093101  if test -z "$to_host_path_cmd"; then
    18103102    func_stripname 'func_convert_file_' '' "$to_host_file_cmd"
    1811     to_host_path_cmd="func_convert_path_${func_stripname_result}"
     3103    to_host_path_cmd=func_convert_path_$func_stripname_result
    18123104  fi
    18133105}
     
    18193111func_to_host_path ()
    18203112{
    1821   $opt_debug
     3113  $debug_cmd
     3114
    18223115  func_init_to_host_path_cmd
    18233116  $to_host_path_cmd "$1"
     
    18303123func_convert_path_noop ()
    18313124{
    1832   func_to_host_path_result="$1"
     3125  func_to_host_path_result=$1
    18333126}
    18343127# end func_convert_path_noop
     
    18413134func_convert_path_msys_to_w32 ()
    18423135{
    1843   $opt_debug
    1844   func_to_host_path_result="$1"
     3136  $debug_cmd
     3137
     3138  func_to_host_path_result=$1
    18453139  if test -n "$1"; then
    18463140    # Remove leading and trailing path separator characters from ARG.  MSYS
     
    18503144    func_to_host_path_tmp1=$func_stripname_result
    18513145    func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
    1852     func_to_host_path_result="$func_convert_core_msys_to_w32_result"
     3146    func_to_host_path_result=$func_convert_core_msys_to_w32_result
    18533147    func_convert_path_check : ";" \
    18543148      "$func_to_host_path_tmp1" "$func_to_host_path_result"
     
    18643158func_convert_path_cygwin_to_w32 ()
    18653159{
    1866   $opt_debug
    1867   func_to_host_path_result="$1"
     3160  $debug_cmd
     3161
     3162  func_to_host_path_result=$1
    18683163  if test -n "$1"; then
    18693164    # See func_convert_path_msys_to_w32:
     
    18843179func_convert_path_nix_to_w32 ()
    18853180{
    1886   $opt_debug
    1887   func_to_host_path_result="$1"
     3181  $debug_cmd
     3182
     3183  func_to_host_path_result=$1
    18883184  if test -n "$1"; then
    18893185    # See func_convert_path_msys_to_w32:
     
    18913187    func_to_host_path_tmp1=$func_stripname_result
    18923188    func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
    1893     func_to_host_path_result="$func_convert_core_path_wine_to_w32_result"
     3189    func_to_host_path_result=$func_convert_core_path_wine_to_w32_result
    18943190    func_convert_path_check : ";" \
    18953191      "$func_to_host_path_tmp1" "$func_to_host_path_result"
     
    19053201func_convert_path_msys_to_cygwin ()
    19063202{
    1907   $opt_debug
    1908   func_to_host_path_result="$1"
     3203  $debug_cmd
     3204
     3205  func_to_host_path_result=$1
    19093206  if test -n "$1"; then
    19103207    # See func_convert_path_msys_to_w32:
     
    19133210    func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
    19143211    func_cygpath -u -p "$func_convert_core_msys_to_w32_result"
    1915     func_to_host_path_result="$func_cygpath_result"
     3212    func_to_host_path_result=$func_cygpath_result
    19163213    func_convert_path_check : : \
    19173214      "$func_to_host_path_tmp1" "$func_to_host_path_result"
     
    19283225func_convert_path_nix_to_cygwin ()
    19293226{
    1930   $opt_debug
    1931   func_to_host_path_result="$1"
     3227  $debug_cmd
     3228
     3229  func_to_host_path_result=$1
    19323230  if test -n "$1"; then
    19333231    # Remove leading and trailing path separator characters from
     
    19383236    func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
    19393237    func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result"
    1940     func_to_host_path_result="$func_cygpath_result"
     3238    func_to_host_path_result=$func_cygpath_result
    19413239    func_convert_path_check : : \
    19423240      "$func_to_host_path_tmp1" "$func_to_host_path_result"
     
    19473245
    19483246
     3247# func_dll_def_p FILE
     3248# True iff FILE is a Windows DLL '.def' file.
     3249# Keep in sync with _LT_DLL_DEF_P in libtool.m4
     3250func_dll_def_p ()
     3251{
     3252  $debug_cmd
     3253
     3254  func_dll_def_p_tmp=`$SED -n \
     3255    -e 's/^[     ]*//' \
     3256    -e '/^\(;.*\)*$/d' \
     3257    -e 's/^\(EXPORTS\|LIBRARY\)\([       ].*\)*$/DEF/p' \
     3258    -e q \
     3259    "$1"`
     3260  test DEF = "$func_dll_def_p_tmp"
     3261}
     3262
     3263
    19493264# func_mode_compile arg...
    19503265func_mode_compile ()
    19513266{
    1952     $opt_debug
     3267    $debug_cmd
     3268
    19533269    # Get the compilation command and the source file.
    19543270    base_compile=
    1955     srcfile="$nonopt"  #  always keep a non-empty value in "srcfile"
     3271    srcfile=$nonopt  #  always keep a non-empty value in "srcfile"
    19563272    suppress_opt=yes
    19573273    suppress_output=
     
    19663282      arg  )
    19673283        # do not "continue".  Instead, add this to base_compile
    1968         lastarg="$arg"
     3284        lastarg=$arg
    19693285        arg_mode=normal
    19703286        ;;
    19713287
    19723288      target )
    1973         libobj="$arg"
     3289        libobj=$arg
    19743290        arg_mode=normal
    19753291        continue
     
    19813297        -o)
    19823298          test -n "$libobj" && \
    1983             func_fatal_error "you cannot specify \`-o' more than once"
     3299            func_fatal_error "you cannot specify '-o' more than once"
    19843300          arg_mode=target
    19853301          continue
     
    20103326          args=$func_stripname_result
    20113327          lastarg=
    2012           save_ifs="$IFS"; IFS=','
     3328          save_ifs=$IFS; IFS=,
    20133329          for arg in $args; do
    2014             IFS="$save_ifs"
     3330            IFS=$save_ifs
    20153331            func_append_quoted lastarg "$arg"
    20163332          done
    2017           IFS="$save_ifs"
     3333          IFS=$save_ifs
    20183334          func_stripname ' ' '' "$lastarg"
    20193335          lastarg=$func_stripname_result
     
    20283344          # The previous "srcfile" becomes the current argument.
    20293345          #
    2030           lastarg="$srcfile"
    2031           srcfile="$arg"
     3346          lastarg=$srcfile
     3347          srcfile=$arg
    20323348          ;;
    20333349        esac  #  case $arg
     
    20443360      ;;
    20453361    target)
    2046       func_fatal_error "you must specify a target with \`-o'"
     3362      func_fatal_error "you must specify a target with '-o'"
    20473363      ;;
    20483364    *)
     
    20503366      test -z "$libobj" && {
    20513367        func_basename "$srcfile"
    2052         libobj="$func_basename_result"
     3368        libobj=$func_basename_result
    20533369      }
    20543370      ;;
     
    20703386    *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;;
    20713387    *)
    2072       func_fatal_error "cannot determine name of library object from \`$libobj'"
     3388      func_fatal_error "cannot determine name of library object from '$libobj'"
    20733389      ;;
    20743390    esac
     
    20793395      case $arg in
    20803396      -shared)
    2081         test "$build_libtool_libs" != yes && \
    2082           func_fatal_configuration "can not build a shared library"
     3397        test yes = "$build_libtool_libs" \
     3398          || func_fatal_configuration "cannot build a shared library"
    20833399        build_old_libs=no
    20843400        continue
     
    21063422    test "X$libobj" != "X$func_quote_for_eval_result" \
    21073423      && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"'    &()|`$[]' \
    2108       && func_warning "libobj name \`$libobj' may not contain shell special characters."
     3424      && func_warning "libobj name '$libobj' may not contain shell special characters."
    21093425    func_dirname_and_basename "$obj" "/" ""
    2110     objname="$func_basename_result"
    2111     xdir="$func_dirname_result"
    2112     lobj=${xdir}$objdir/$objname
     3426    objname=$func_basename_result
     3427    xdir=$func_dirname_result
     3428    lobj=$xdir$objdir/$objname
    21133429
    21143430    test -z "$base_compile" && \
     
    21163432
    21173433    # Delete any leftover library objects.
    2118     if test "$build_old_libs" = yes; then
     3434    if test yes = "$build_old_libs"; then
    21193435      removelist="$obj $lobj $libobj ${libobj}T"
    21203436    else
     
    21283444      ;;
    21293445    esac
    2130     if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
     3446    if test no = "$pic_mode" && test pass_all != "$deplibs_check_method"; then
    21313447      # non-PIC code in shared libraries is not supported
    21323448      pic_mode=default
     
    21353451    # Calculate the filename of the output object if compiler does
    21363452    # not support -o with -c
    2137     if test "$compiler_c_o" = no; then
    2138       output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext}
    2139       lockfile="$output_obj.lock"
     3453    if test no = "$compiler_c_o"; then
     3454      output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.$objext
     3455      lockfile=$output_obj.lock
    21403456    else
    21413457      output_obj=
     
    21463462    # Lock this critical section if it is needed
    21473463    # We use this script file to make the link, it avoids creating a new file
    2148     if test "$need_locks" = yes; then
     3464    if test yes = "$need_locks"; then
    21493465      until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
    21503466        func_echo "Waiting for $lockfile to be removed"
    21513467        sleep 2
    21523468      done
    2153     elif test "$need_locks" = warn; then
     3469    elif test warn = "$need_locks"; then
    21543470      if test -f "$lockfile"; then
    21553471        $ECHO "\
     
    21593475This indicates that another process is trying to use the same
    21603476temporary object file, and libtool could not work around it because
    2161 your compiler does not support \`-c' and \`-o' together.  If you
     3477your compiler does not support '-c' and '-o' together.  If you
    21623478repeat this compilation, it may succeed, by chance, but you had better
    21633479avoid parallel builds (make -j) in this platform, or get a better
     
    21813497
    21823498    # Only build a PIC object if we are building libtool libraries.
    2183     if test "$build_libtool_libs" = yes; then
     3499    if test yes = "$build_libtool_libs"; then
    21843500      # Without this assignment, base_compile gets emptied.
    21853501      fbsd_hideous_sh_bug=$base_compile
    21863502
    2187       if test "$pic_mode" != no; then
     3503      if test no != "$pic_mode"; then
    21883504        command="$base_compile $qsrcfile $pic_flag"
    21893505      else
     
    22023518          'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE'
    22033519
    2204       if test "$need_locks" = warn &&
     3520      if test warn = "$need_locks" &&
    22053521         test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
    22063522        $ECHO "\
     
    22133529This indicates that another process is trying to use the same
    22143530temporary object file, and libtool could not work around it because
    2215 your compiler does not support \`-c' and \`-o' together.  If you
     3531your compiler does not support '-c' and '-o' together.  If you
    22163532repeat this compilation, it may succeed, by chance, but you had better
    22173533avoid parallel builds (make -j) in this platform, or get a better
     
    22293545
    22303546      # Allow error messages only from the first compilation.
    2231       if test "$suppress_opt" = yes; then
     3547      if test yes = "$suppress_opt"; then
    22323548        suppress_output=' >/dev/null 2>&1'
    22333549      fi
     
    22353551
    22363552    # Only build a position-dependent object if we build old libraries.
    2237     if test "$build_old_libs" = yes; then
    2238       if test "$pic_mode" != yes; then
     3553    if test yes = "$build_old_libs"; then
     3554      if test yes != "$pic_mode"; then
    22393555        # Don't build PIC code
    22403556        command="$base_compile $qsrcfile$pie_flag"
     
    22423558        command="$base_compile $qsrcfile $pic_flag"
    22433559      fi
    2244       if test "$compiler_c_o" = yes; then
     3560      if test yes = "$compiler_c_o"; then
    22453561        func_append command " -o $obj"
    22463562      fi
     
    22513567        '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
    22523568
    2253       if test "$need_locks" = warn &&
     3569      if test warn = "$need_locks" &&
    22543570         test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
    22553571        $ECHO "\
     
    22623578This indicates that another process is trying to use the same
    22633579temporary object file, and libtool could not work around it because
    2264 your compiler does not support \`-c' and \`-o' together.  If you
     3580your compiler does not support '-c' and '-o' together.  If you
    22653581repeat this compilation, it may succeed, by chance, but you had better
    22663582avoid parallel builds (make -j) in this platform, or get a better
     
    22823598
    22833599      # Unlock the critical section if it was locked
    2284       if test "$need_locks" != no; then
     3600      if test no != "$need_locks"; then
    22853601        removelist=$lockfile
    22863602        $RM "$lockfile"
     
    22923608
    22933609$opt_help || {
    2294   test "$opt_mode" = compile && func_mode_compile ${1+"$@"}
     3610  test compile = "$opt_mode" && func_mode_compile ${1+"$@"}
    22953611}
    22963612
     
    23123628
    23133629RM is the name of the program to use to delete files associated with each FILE
    2314 (typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
     3630(typically '/bin/rm').  RM-OPTIONS are options (such as '-f') to be passed
    23153631to RM.
    23163632
     
    23313647  -prefer-pic       try to build PIC objects only
    23323648  -prefer-non-pic   try to build non-PIC objects only
    2333   -shared           do not build a \`.o' file suitable for static linking
    2334   -static           only build a \`.o' file suitable for static linking
     3649  -shared           do not build a '.o' file suitable for static linking
     3650  -static           only build a '.o' file suitable for static linking
    23353651  -Wc,FLAG          pass FLAG directly to the compiler
    23363652
    2337 COMPILE-COMMAND is a command to be used in creating a \`standard' object file
     3653COMPILE-COMMAND is a command to be used in creating a 'standard' object file
    23383654from the given SOURCEFILE.
    23393655
    23403656The output file name is determined by removing the directory component from
    2341 SOURCEFILE, then substituting the C source code suffix \`.c' with the
    2342 library object suffix, \`.lo'."
     3657SOURCEFILE, then substituting the C source code suffix '.c' with the
     3658library object suffix, '.lo'."
    23433659        ;;
    23443660
     
    23533669  -dlopen FILE      add the directory containing FILE to the library path
    23543670
    2355 This mode sets the library path environment variable according to \`-dlopen'
     3671This mode sets the library path environment variable according to '-dlopen'
    23563672flags.
    23573673
     
    23723688
    23733689The commands that this mode executes may require superuser privileges.  Use
    2374 the \`--dry-run' option if you just want to see what would be executed."
     3690the '--dry-run' option if you just want to see what would be executed."
    23753691        ;;
    23763692
     
    23823698
    23833699INSTALL-COMMAND is the installation command.  The first component should be
    2384 either the \`install' or \`cp' program.
     3700either the 'install' or 'cp' program.
    23853701
    23863702The following components of INSTALL-COMMAND are treated specially:
     
    24083724  -bindir BINDIR    specify path to binaries directory (for systems where
    24093725                    libraries must be found in the PATH setting at runtime)
    2410   -dlopen FILE      \`-dlpreopen' FILE if it cannot be dlopened at runtime
     3726  -dlopen FILE      '-dlpreopen' FILE if it cannot be dlopened at runtime
    24113727  -dlpreopen FILE   link in FILE and add its symbols to lt_preloaded_symbols
    24123728  -export-dynamic   allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
     
    24223738  -no-undefined     declare that a library does not refer to external symbols
    24233739  -o OUTPUT-FILE    create OUTPUT-FILE from the specified objects
    2424   -objectlist FILE  Use a list of object files found in FILE to specify objects
     3740  -objectlist FILE  use a list of object files found in FILE to specify objects
     3741  -os2dllname NAME  force a short DLL name on OS/2 (no effect on other OSes)
    24253742  -precious-files-regex REGEX
    24263743                    don't remove output files matching REGEX
     
    24423759  -XCClinker FLAG   pass link-specific FLAG to the compiler driver (CC)
    24433760
    2444 All other options (arguments beginning with \`-') are ignored.
    2445 
    2446 Every other argument is treated as a filename.  Files ending in \`.la' are
     3761All other options (arguments beginning with '-') are ignored.
     3762
     3763Every other argument is treated as a filename.  Files ending in '.la' are
    24473764treated as uninstalled libtool libraries, other files are standard or library
    24483765object files.
    24493766
    2450 If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
    2451 only library objects (\`.lo' files) may be specified, and \`-rpath' is
     3767If the OUTPUT-FILE ends in '.la', then a libtool library is created,
     3768only library objects ('.lo' files) may be specified, and '-rpath' is
    24523769required, except when creating a convenience library.
    24533770
    2454 If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
    2455 using \`ar' and \`ranlib', or on Windows using \`lib'.
    2456 
    2457 If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
     3771If OUTPUT-FILE ends in '.a' or '.lib', then a standard library is created
     3772using 'ar' and 'ranlib', or on Windows using 'lib'.
     3773
     3774If OUTPUT-FILE ends in '.lo' or '.$objext', then a reloadable object file
    24583775is created, otherwise an executable program is created."
    24593776        ;;
     
    24663783
    24673784RM is the name of the program to use to delete files associated with each FILE
    2468 (typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
     3785(typically '/bin/rm').  RM-OPTIONS are options (such as '-f') to be passed
    24693786to RM.
    24703787
     
    24743791
    24753792      *)
    2476         func_fatal_help "invalid operation mode \`$opt_mode'"
     3793        func_fatal_help "invalid operation mode '$opt_mode'"
    24773794        ;;
    24783795    esac
    24793796
    24803797    echo
    2481     $ECHO "Try \`$progname --help' for more information about other modes."
     3798    $ECHO "Try '$progname --help' for more information about other modes."
    24823799}
    24833800
    24843801# Now that we've collected a possible --mode arg, show help if necessary
    24853802if $opt_help; then
    2486   if test "$opt_help" = :; then
     3803  if test : = "$opt_help"; then
    24873804    func_mode_help
    24883805  else
     
    24923809        func_mode_help
    24933810      done
    2494     } | sed -n '1p; 2,$s/^Usage:/  or: /p'
     3811    } | $SED -n '1p; 2,$s/^Usage:/  or: /p'
    24953812    {
    24963813      func_help noexit
     
    25003817      done
    25013818    } |
    2502     sed '1d
     3819    $SED '1d
    25033820      /^When reporting/,/^Report/{
    25043821        H
     
    25173834func_mode_execute ()
    25183835{
    2519     $opt_debug
     3836    $debug_cmd
     3837
    25203838    # The first argument is the command name.
    2521     cmd="$nonopt"
     3839    cmd=$nonopt
    25223840    test -z "$cmd" && \
    25233841      func_fatal_help "you must specify a COMMAND"
     
    25263844    for file in $opt_dlopen; do
    25273845      test -f "$file" \
    2528         || func_fatal_help "\`$file' is not a file"
     3846        || func_fatal_help "'$file' is not a file"
    25293847
    25303848      dir=
     
    25363854        # Check to see that this really is a libtool archive.
    25373855        func_lalib_unsafe_p "$file" \
    2538           || func_fatal_help "\`$lib' is not a valid libtool archive"
     3856          || func_fatal_help "'$lib' is not a valid libtool archive"
    25393857
    25403858        # Read the libtool library.
     
    25473865          # Warn if it was a shared library.
    25483866          test -n "$library_names" && \
    2549             func_warning "\`$file' was not linked with \`-export-dynamic'"
     3867            func_warning "'$file' was not linked with '-export-dynamic'"
    25503868          continue
    25513869        fi
    25523870
    25533871        func_dirname "$file" "" "."
    2554         dir="$func_dirname_result"
     3872        dir=$func_dirname_result
    25553873
    25563874        if test -f "$dir/$objdir/$dlname"; then
     
    25583876        else
    25593877          if test ! -f "$dir/$dlname"; then
    2560             func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'"
     3878            func_fatal_error "cannot find '$dlname' in '$dir' or '$dir/$objdir'"
    25613879          fi
    25623880        fi
     
    25663884        # Just add the directory containing the .lo file.
    25673885        func_dirname "$file" "" "."
    2568         dir="$func_dirname_result"
     3886        dir=$func_dirname_result
    25693887        ;;
    25703888
    25713889      *)
    2572         func_warning "\`-dlopen' is ignored for non-libtool libraries and objects"
     3890        func_warning "'-dlopen' is ignored for non-libtool libraries and objects"
    25733891        continue
    25743892        ;;
     
    25773895      # Get the absolute pathname.
    25783896      absdir=`cd "$dir" && pwd`
    2579       test -n "$absdir" && dir="$absdir"
     3897      test -n "$absdir" && dir=$absdir
    25803898
    25813899      # Now add the directory to shlibpath_var.
     
    25893907    # This variable tells wrapper scripts just to set shlibpath_var
    25903908    # rather than running their programs.
    2591     libtool_execute_magic="$magic"
     3909    libtool_execute_magic=$magic
    25923910
    25933911    # Check if any of the arguments is a wrapper script.
     
    26023920          func_source "$file"
    26033921          # Transform arg to wrapped name.
    2604           file="$progdir/$program"
     3922          file=$progdir/$program
    26053923        elif func_ltwrapper_executable_p "$file"; then
    26063924          func_ltwrapper_scriptname "$file"
    26073925          func_source "$func_ltwrapper_scriptname_result"
    26083926          # Transform arg to wrapped name.
    2609           file="$progdir/$program"
     3927          file=$progdir/$program
    26103928        fi
    26113929        ;;
     
    26153933    done
    26163934
    2617     if test "X$opt_dry_run" = Xfalse; then
     3935    if $opt_dry_run; then
     3936      # Display what would be done.
     3937      if test -n "$shlibpath_var"; then
     3938        eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
     3939        echo "export $shlibpath_var"
     3940      fi
     3941      $ECHO "$cmd$args"
     3942      exit $EXIT_SUCCESS
     3943    else
    26183944      if test -n "$shlibpath_var"; then
    26193945        # Export the shlibpath_var.
     
    26323958
    26333959      # Now prepare to actually exec the command.
    2634       exec_cmd="\$cmd$args"
    2635     else
    2636       # Display what would be done.
    2637       if test -n "$shlibpath_var"; then
    2638         eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
    2639         echo "export $shlibpath_var"
    2640       fi
    2641       $ECHO "$cmd$args"
    2642       exit $EXIT_SUCCESS
     3960      exec_cmd=\$cmd$args
    26433961    fi
    26443962}
    26453963
    2646 test "$opt_mode" = execute && func_mode_execute ${1+"$@"}
     3964test execute = "$opt_mode" && func_mode_execute ${1+"$@"}
    26473965
    26483966
     
    26503968func_mode_finish ()
    26513969{
    2652     $opt_debug
     3970    $debug_cmd
     3971
    26533972    libs=
    26543973    libdirs=
     
    26643983          func_append libs " $opt"
    26653984        else
    2666           func_warning "\`$opt' is not a valid libtool archive"
     3985          func_warning "'$opt' is not a valid libtool archive"
    26673986        fi
    26683987
    26693988      else
    2670         func_fatal_error "invalid argument \`$opt'"
     3989        func_fatal_error "invalid argument '$opt'"
    26713990      fi
    26723991    done
     
    26834002      if $opt_dry_run; then
    26844003        for lib in $libs; do
    2685           echo "removing references to $lt_sysroot and \`=' prefixes from $lib"
     4004          echo "removing references to $lt_sysroot and '=' prefixes from $lib"
    26864005        done
    26874006      else
    26884007        tmpdir=`func_mktempdir`
    26894008        for lib in $libs; do
    2690           sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \
     4009          $SED -e "$sysroot_cmd s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \
    26914010            > $tmpdir/tmp-la
    26924011          mv -f $tmpdir/tmp-la $lib
     
    27134032
    27144033    # Exit here if they wanted silent mode.
    2715     $opt_silent && exit $EXIT_SUCCESS
     4034    $opt_quiet && exit $EXIT_SUCCESS
    27164035
    27174036    if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
     
    27244043      echo "If you ever happen to want to link against installed libraries"
    27254044      echo "in a given directory, LIBDIR, you must either use libtool, and"
    2726       echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
     4045      echo "specify the full pathname of the library, or use the '-LLIBDIR'"
    27274046      echo "flag during linking and do at least one of the following:"
    27284047      if test -n "$shlibpath_var"; then
    2729         echo "   - add LIBDIR to the \`$shlibpath_var' environment variable"
     4048        echo "   - add LIBDIR to the '$shlibpath_var' environment variable"
    27304049        echo "     during execution"
    27314050      fi
    27324051      if test -n "$runpath_var"; then
    2733         echo "   - add LIBDIR to the \`$runpath_var' environment variable"
     4052        echo "   - add LIBDIR to the '$runpath_var' environment variable"
    27344053        echo "     during linking"
    27354054      fi
     
    27384057        eval flag=\"$hardcode_libdir_flag_spec\"
    27394058
    2740         $ECHO "   - use the \`$flag' linker flag"
     4059        $ECHO "   - use the '$flag' linker flag"
    27414060      fi
    27424061      if test -n "$admincmds"; then
     
    27444063      fi
    27454064      if test -f /etc/ld.so.conf; then
    2746         echo "   - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
     4065        echo "   - have your system administrator add LIBDIR to '/etc/ld.so.conf'"
    27474066      fi
    27484067      echo
     
    27634082}
    27644083
    2765 test "$opt_mode" = finish && func_mode_finish ${1+"$@"}
     4084test finish = "$opt_mode" && func_mode_finish ${1+"$@"}
    27664085
    27674086
     
    27694088func_mode_install ()
    27704089{
    2771     $opt_debug
     4090    $debug_cmd
     4091
    27724092    # There may be an optional sh(1) argument at the beginning of
    27734093    # install_prog (especially on Windows NT).
    2774     if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
     4094    if test "$SHELL" = "$nonopt" || test /bin/sh = "$nonopt" ||
    27754095       # Allow the use of GNU shtool's install command.
    2776        case $nonopt in *shtool*) :;; *) false;; esac; then
     4096       case $nonopt in *shtool*) :;; *) false;; esac
     4097    then
    27774098      # Aesthetically quote it.
    27784099      func_quote_for_eval "$nonopt"
     
    28014122    prev=
    28024123    install_type=
    2803     isdir=no
     4124    isdir=false
    28044125    stripme=
    28054126    no_mode=:
     
    28144135
    28154136      case $arg in
    2816       -d) isdir=yes ;;
     4137      -d) isdir=: ;;
    28174138      -f)
    28184139        if $install_cp; then :; else
     
    28324153        # If the previous option needed an argument, then skip it.
    28334154        if test -n "$prev"; then
    2834           if test "x$prev" = x-m && test -n "$install_override_mode"; then
     4155          if test X-m = "X$prev" && test -n "$install_override_mode"; then
    28354156            arg2=$install_override_mode
    28364157            no_mode=false
     
    28574178
    28584179    test -n "$prev" && \
    2859       func_fatal_help "the \`$prev' option requires an argument"
     4180      func_fatal_help "the '$prev' option requires an argument"
    28604181
    28614182    if test -n "$install_override_mode" && $no_mode; then
     
    28794200
    28804201    # Check to see that the destination is a directory.
    2881     test -d "$dest" && isdir=yes
    2882     if test "$isdir" = yes; then
    2883       destdir="$dest"
     4202    test -d "$dest" && isdir=:
     4203    if $isdir; then
     4204      destdir=$dest
    28844205      destname=
    28854206    else
    28864207      func_dirname_and_basename "$dest" "" "."
    2887       destdir="$func_dirname_result"
    2888       destname="$func_basename_result"
     4208      destdir=$func_dirname_result
     4209      destname=$func_basename_result
    28894210
    28904211      # Not a directory, so check to see that there is only one file specified.
    28914212      set dummy $files; shift
    28924213      test "$#" -gt 1 && \
    2893         func_fatal_help "\`$dest' is not a directory"
     4214        func_fatal_help "'$dest' is not a directory"
    28944215    fi
    28954216    case $destdir in
     
    29004221        *.lo) ;;
    29014222        *)
    2902           func_fatal_help "\`$destdir' must be an absolute directory name"
     4223          func_fatal_help "'$destdir' must be an absolute directory name"
    29034224          ;;
    29044225        esac
     
    29094230    # This variable tells wrapper scripts just to set variables rather
    29104231    # than running their programs.
    2911     libtool_install_magic="$magic"
     4232    libtool_install_magic=$magic
    29124233
    29134234    staticlibs=
     
    29294250        # Check to see that this really is a libtool archive.
    29304251        func_lalib_unsafe_p "$file" \
    2931           || func_fatal_help "\`$file' is not a valid libtool archive"
     4252          || func_fatal_help "'$file' is not a valid libtool archive"
    29324253
    29334254        library_names=
     
    29514272
    29524273        func_dirname "$file" "/" ""
    2953         dir="$func_dirname_result"
     4274        dir=$func_dirname_result
    29544275        func_append dir "$objdir"
    29554276
     
    29654286          # but it's something to keep an eye on.
    29664287          test "$inst_prefix_dir" = "$destdir" && \
    2967             func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir"
     4288            func_fatal_error "error: cannot install '$file' to a directory not ending in $libdir"
    29684289
    29694290          if test -n "$inst_prefix_dir"; then
     
    29744295          fi
    29754296
    2976           func_warning "relinking \`$file'"
     4297          func_warning "relinking '$file'"
    29774298          func_show_eval "$relink_command" \
    2978             'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"'
     4299            'func_fatal_error "error: relink '\''$file'\'' with the above command before installing it"'
    29794300        fi
    29804301
     
    29824303        set dummy $library_names; shift
    29834304        if test -n "$1"; then
    2984           realname="$1"
     4305          realname=$1
    29854306          shift
    29864307
    2987           srcname="$realname"
    2988           test -n "$relink_command" && srcname="$realname"T
     4308          srcname=$realname
     4309          test -n "$relink_command" && srcname=${realname}T
    29894310
    29904311          # Install the shared library and build the symlinks.
    29914312          func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \
    29924313              'exit $?'
    2993           tstripme="$stripme"
     4314          tstripme=$stripme
    29944315          case $host_os in
    29954316          cygwin* | mingw* | pw32* | cegcc*)
    29964317            case $realname in
    29974318            *.dll.a)
    2998               tstripme=""
     4319              tstripme=
     4320              ;;
     4321            esac
     4322            ;;
     4323          os2*)
     4324            case $realname in
     4325            *_dll.a)
     4326              tstripme=
    29994327              ;;
    30004328            esac
     
    30074335          if test "$#" -gt 0; then
    30084336            # Delete the old symlinks, and create new ones.
    3009             # Try `ln -sf' first, because the `ln' binary might depend on
     4337            # Try 'ln -sf' first, because the 'ln' binary might depend on
    30104338            # the symlink we replace!  Solaris /bin/ln does not understand -f,
    30114339            # so we also need to try rm && ln -s.
     
    30184346
    30194347          # Do each command in the postinstall commands.
    3020           lib="$destdir/$realname"
     4348          lib=$destdir/$realname
    30214349          func_execute_cmds "$postinstall_cmds" 'exit $?'
    30224350        fi
     
    30244352        # Install the pseudo-library for information purposes.
    30254353        func_basename "$file"
    3026         name="$func_basename_result"
    3027         instname="$dir/$name"i
     4354        name=$func_basename_result
     4355        instname=$dir/${name}i
    30284356        func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'
    30294357
     
    30374365        # Figure out destination file name, if it wasn't already specified.
    30384366        if test -n "$destname"; then
    3039           destfile="$destdir/$destname"
     4367          destfile=$destdir/$destname
    30404368        else
    30414369          func_basename "$file"
    3042           destfile="$func_basename_result"
    3043           destfile="$destdir/$destfile"
     4370          destfile=$func_basename_result
     4371          destfile=$destdir/$destfile
    30444372        fi
    30454373
     
    30514379          ;;
    30524380        *.$objext)
    3053           staticdest="$destfile"
     4381          staticdest=$destfile
    30544382          destfile=
    30554383          ;;
    30564384        *)
    3057           func_fatal_help "cannot copy a libtool object to \`$destfile'"
     4385          func_fatal_help "cannot copy a libtool object to '$destfile'"
    30584386          ;;
    30594387        esac
     
    30644392
    30654393        # Install the old object if enabled.
    3066         if test "$build_old_libs" = yes; then
     4394        if test yes = "$build_old_libs"; then
    30674395          # Deduce the name of the old-style object file.
    30684396          func_lo2o "$file"
     
    30764404        # Figure out destination file name, if it wasn't already specified.
    30774405        if test -n "$destname"; then
    3078           destfile="$destdir/$destname"
     4406          destfile=$destdir/$destname
    30794407        else
    30804408          func_basename "$file"
    3081           destfile="$func_basename_result"
    3082           destfile="$destdir/$destfile"
     4409          destfile=$func_basename_result
     4410          destfile=$destdir/$destfile
    30834411        fi
    30844412
     
    30864414        # because it is most likely a libtool script we actually want to
    30874415        # install
    3088         stripped_ext=""
     4416        stripped_ext=
    30894417        case $file in
    30904418          *.exe)
     
    30924420              func_stripname '' '.exe' "$file"
    30934421              file=$func_stripname_result
    3094               stripped_ext=".exe"
     4422              stripped_ext=.exe
    30954423            fi
    30964424            ;;
     
    31204448          # Check the variables that should have been set.
    31214449          test -z "$generated_by_libtool_version" && \
    3122             func_fatal_error "invalid libtool wrapper script \`$wrapper'"
    3123 
    3124           finalize=yes
     4450            func_fatal_error "invalid libtool wrapper script '$wrapper'"
     4451
     4452          finalize=:
    31254453          for lib in $notinst_deplibs; do
    31264454            # Check to see that each library is installed.
     
    31294457              func_source "$lib"
    31304458            fi
    3131             libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test
     4459            libfile=$libdir/`$ECHO "$lib" | $SED 's%^.*/%%g'`
    31324460            if test -n "$libdir" && test ! -f "$libfile"; then
    3133               func_warning "\`$lib' has not been installed in \`$libdir'"
    3134               finalize=no
     4461              func_warning "'$lib' has not been installed in '$libdir'"
     4462              finalize=false
    31354463            fi
    31364464          done
     
    31404468
    31414469          outputname=
    3142           if test "$fast_install" = no && test -n "$relink_command"; then
     4470          if test no = "$fast_install" && test -n "$relink_command"; then
    31434471            $opt_dry_run || {
    3144               if test "$finalize" = yes; then
     4472              if $finalize; then
    31454473                tmpdir=`func_mktempdir`
    31464474                func_basename "$file$stripped_ext"
    3147                 file="$func_basename_result"
    3148                 outputname="$tmpdir/$file"
     4475                file=$func_basename_result
     4476                outputname=$tmpdir/$file
    31494477                # Replace the output file specification.
    31504478                relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'`
    31514479
    3152                 $opt_silent || {
     4480                $opt_quiet || {
    31534481                  func_quote_for_expand "$relink_command"
    31544482                  eval "func_echo $func_quote_for_expand_result"
     
    31564484                if eval "$relink_command"; then :
    31574485                  else
    3158                   func_error "error: relink \`$file' with the above command before installing it"
     4486                  func_error "error: relink '$file' with the above command before installing it"
    31594487                  $opt_dry_run || ${RM}r "$tmpdir"
    31604488                  continue
    31614489                fi
    3162                 file="$outputname"
     4490                file=$outputname
    31634491              else
    3164                 func_warning "cannot relink \`$file'"
     4492                func_warning "cannot relink '$file'"
    31654493              fi
    31664494            }
     
    31994527    for file in $staticlibs; do
    32004528      func_basename "$file"
    3201       name="$func_basename_result"
     4529      name=$func_basename_result
    32024530
    32034531      # Set up the ranlib parameters.
    3204       oldlib="$destdir/$name"
     4532      oldlib=$destdir/$name
    32054533      func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
    32064534      tool_oldlib=$func_to_tool_file_result
     
    32174545
    32184546    test -n "$future_libdirs" && \
    3219       func_warning "remember to run \`$progname --finish$future_libdirs'"
     4547      func_warning "remember to run '$progname --finish$future_libdirs'"
    32204548
    32214549    if test -n "$current_libdirs"; then
    32224550      # Maybe just do a dry run.
    32234551      $opt_dry_run && current_libdirs=" -n$current_libdirs"
    3224       exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
     4552      exec_cmd='$SHELL "$progpath" $preserve_args --finish$current_libdirs'
    32254553    else
    32264554      exit $EXIT_SUCCESS
     
    32284556}
    32294557
    3230 test "$opt_mode" = install && func_mode_install ${1+"$@"}
     4558test install = "$opt_mode" && func_mode_install ${1+"$@"}
    32314559
    32324560
     
    32364564func_generate_dlsyms ()
    32374565{
    3238     $opt_debug
    3239     my_outputname="$1"
    3240     my_originator="$2"
    3241     my_pic_p="${3-no}"
    3242     my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'`
     4566    $debug_cmd
     4567
     4568    my_outputname=$1
     4569    my_originator=$2
     4570    my_pic_p=${3-false}
     4571    my_prefix=`$ECHO "$my_originator" | $SED 's%[^a-zA-Z0-9]%_%g'`
    32434572    my_dlsyms=
    32444573
    3245     if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
     4574    if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then
    32464575      if test -n "$NM" && test -n "$global_symbol_pipe"; then
    3247         my_dlsyms="${my_outputname}S.c"
     4576        my_dlsyms=${my_outputname}S.c
    32484577      else
    32494578        func_error "not configured to extract global symbols from dlpreopened files"
     
    32564585      *.c)
    32574586        # Discover the nlist of each of the dlfiles.
    3258         nlist="$output_objdir/${my_outputname}.nm"
     4587        nlist=$output_objdir/$my_outputname.nm
    32594588
    32604589        func_show_eval "$RM $nlist ${nlist}S ${nlist}T"
     
    32644593
    32654594        $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\
    3266 /* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */
    3267 /* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */
     4595/* $my_dlsyms - symbol resolution table for '$my_outputname' dlsym emulation. */
     4596/* Generated by $PROGRAM (GNU $PACKAGE) $VERSION */
    32684597
    32694598#ifdef __cplusplus
     
    32714600#endif
    32724601
    3273 #if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4))
     4602#if defined __GNUC__ && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4))
    32744603#pragma GCC diagnostic ignored \"-Wstrict-prototypes\"
    32754604#endif
    32764605
    32774606/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
    3278 #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
    3279 /* DATA imports from DLLs on WIN32 con't be const, because runtime
     4607#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
     4608/* DATA imports from DLLs on WIN32 can't be const, because runtime
    32804609   relocations are performed -- see ld's documentation on pseudo-relocs.  */
    32814610# define LT_DLSYM_CONST
    3282 #elif defined(__osf__)
     4611#elif defined __osf__
    32834612/* This system does not cope well with relocations in const data.  */
    32844613# define LT_DLSYM_CONST
     
    32874616#endif
    32884617
     4618#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0)
     4619
    32894620/* External symbol declarations for the compiler. */\
    32904621"
    32914622
    3292         if test "$dlself" = yes; then
    3293           func_verbose "generating symbol list for \`$output'"
     4623        if test yes = "$dlself"; then
     4624          func_verbose "generating symbol list for '$output'"
    32944625
    32954626          $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist"
     
    32994630          for progfile in $progfiles; do
    33004631            func_to_tool_file "$progfile" func_convert_file_msys_to_w32
    3301             func_verbose "extracting global C symbols from \`$func_to_tool_file_result'"
     4632            func_verbose "extracting global C symbols from '$func_to_tool_file_result'"
    33024633            $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'"<