Ignore:
Timestamp:
12/10/15 10:45:35 (9 years ago)
Author:
tbretz
Message:
Updated to newer versions.
Location:
trunk/FACT++/.aux_dir
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/.aux_dir/compile

    r10183 r18384  
    11#! /bin/sh
    2 # Wrapper for compilers which do not understand `-c -o'.
    3 
    4 scriptversion=2009-10-06.20; # UTC
    5 
    6 # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009  Free Software
    7 # Foundation, Inc.
     2# Wrapper for compilers which do not understand '-c -o'.
     3
     4scriptversion=2012-10-14.11; # UTC
     5
     6# Copyright (C) 1999-2013 Free Software Foundation, Inc.
    87# Written by Tom Tromey <tromey@cygnus.com>.
    98#
     
    3029# <automake-patches@gnu.org>.
    3130
     31nl='
     32'
     33
     34# We need space, tab and new line, in precisely that order.  Quoting is
     35# there to prevent tools from complaining about whitespace usage.
     36IFS=" ""        $nl"
     37
     38file_conv=
     39
     40# func_file_conv build_file lazy
     41# Convert a $build file to $host form and store it in $file
     42# Currently only supports Windows hosts. If the determined conversion
     43# type is listed in (the comma separated) LAZY, no conversion will
     44# take place.
     45func_file_conv ()
     46{
     47  file=$1
     48  case $file in
     49    / | /[!/]*) # absolute file, and not a UNC file
     50      if test -z "$file_conv"; then
     51        # lazily determine how to convert abs files
     52        case `uname -s` in
     53          MINGW*)
     54            file_conv=mingw
     55            ;;
     56          CYGWIN*)
     57            file_conv=cygwin
     58            ;;
     59          *)
     60            file_conv=wine
     61            ;;
     62        esac
     63      fi
     64      case $file_conv/,$2, in
     65        *,$file_conv,*)
     66          ;;
     67        mingw/*)
     68          file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
     69          ;;
     70        cygwin/*)
     71          file=`cygpath -m "$file" || echo "$file"`
     72          ;;
     73        wine/*)
     74          file=`winepath -w "$file" || echo "$file"`
     75          ;;
     76      esac
     77      ;;
     78  esac
     79}
     80
     81# func_cl_dashL linkdir
     82# Make cl look for libraries in LINKDIR
     83func_cl_dashL ()
     84{
     85  func_file_conv "$1"
     86  if test -z "$lib_path"; then
     87    lib_path=$file
     88  else
     89    lib_path="$lib_path;$file"
     90  fi
     91  linker_opts="$linker_opts -LIBPATH:$file"
     92}
     93
     94# func_cl_dashl library
     95# Do a library search-path lookup for cl
     96func_cl_dashl ()
     97{
     98  lib=$1
     99  found=no
     100  save_IFS=$IFS
     101  IFS=';'
     102  for dir in $lib_path $LIB
     103  do
     104    IFS=$save_IFS
     105    if $shared && test -f "$dir/$lib.dll.lib"; then
     106      found=yes
     107      lib=$dir/$lib.dll.lib
     108      break
     109    fi
     110    if test -f "$dir/$lib.lib"; then
     111      found=yes
     112      lib=$dir/$lib.lib
     113      break
     114    fi
     115    if test -f "$dir/lib$lib.a"; then
     116      found=yes
     117      lib=$dir/lib$lib.a
     118      break
     119    fi
     120  done
     121  IFS=$save_IFS
     122
     123  if test "$found" != yes; then
     124    lib=$lib.lib
     125  fi
     126}
     127
     128# func_cl_wrapper cl arg...
     129# Adjust compile command to suit cl
     130func_cl_wrapper ()
     131{
     132  # Assume a capable shell
     133  lib_path=
     134  shared=:
     135  linker_opts=
     136  for arg
     137  do
     138    if test -n "$eat"; then
     139      eat=
     140    else
     141      case $1 in
     142        -o)
     143          # configure might choose to run compile as 'compile cc -o foo foo.c'.
     144          eat=1
     145          case $2 in
     146            *.o | *.[oO][bB][jJ])
     147              func_file_conv "$2"
     148              set x "$@" -Fo"$file"
     149              shift
     150              ;;
     151            *)
     152              func_file_conv "$2"
     153              set x "$@" -Fe"$file"
     154              shift
     155              ;;
     156          esac
     157          ;;
     158        -I)
     159          eat=1
     160          func_file_conv "$2" mingw
     161          set x "$@" -I"$file"
     162          shift
     163          ;;
     164        -I*)
     165          func_file_conv "${1#-I}" mingw
     166          set x "$@" -I"$file"
     167          shift
     168          ;;
     169        -l)
     170          eat=1
     171          func_cl_dashl "$2"
     172          set x "$@" "$lib"
     173          shift
     174          ;;
     175        -l*)
     176          func_cl_dashl "${1#-l}"
     177          set x "$@" "$lib"
     178          shift
     179          ;;
     180        -L)
     181          eat=1
     182          func_cl_dashL "$2"
     183          ;;
     184        -L*)
     185          func_cl_dashL "${1#-L}"
     186          ;;
     187        -static)
     188          shared=false
     189          ;;
     190        -Wl,*)
     191          arg=${1#-Wl,}
     192          save_ifs="$IFS"; IFS=','
     193          for flag in $arg; do
     194            IFS="$save_ifs"
     195            linker_opts="$linker_opts $flag"
     196          done
     197          IFS="$save_ifs"
     198          ;;
     199        -Xlinker)
     200          eat=1
     201          linker_opts="$linker_opts $2"
     202          ;;
     203        -*)
     204          set x "$@" "$1"
     205          shift
     206          ;;
     207        *.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
     208          func_file_conv "$1"
     209          set x "$@" -Tp"$file"
     210          shift
     211          ;;
     212        *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
     213          func_file_conv "$1" mingw
     214          set x "$@" "$file"
     215          shift
     216          ;;
     217        *)
     218          set x "$@" "$1"
     219          shift
     220          ;;
     221      esac
     222    fi
     223    shift
     224  done
     225  if test -n "$linker_opts"; then
     226    linker_opts="-link$linker_opts"
     227  fi
     228  exec "$@" $linker_opts
     229  exit 1
     230}
     231
     232eat=
     233
    32234case $1 in
    33235  '')
    34      echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
     236     echo "$0: No command.  Try '$0 --help' for more information." 1>&2
    35237     exit 1;
    36238     ;;
     
    39241Usage: compile [--help] [--version] PROGRAM [ARGS]
    40242
    41 Wrapper for compilers which do not understand `-c -o'.
    42 Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
     243Wrapper for compilers which do not understand '-c -o'.
     244Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
    43245arguments, and rename the output as expected.
    44246
    45247If you are trying to build a whole package this is not the
    46 right script to run: please start by reading the file `INSTALL'.
     248right script to run: please start by reading the file 'INSTALL'.
    47249
    48250Report bugs to <bug-automake@gnu.org>.
     
    54256    exit $?
    55257    ;;
     258  cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
     259    func_cl_wrapper "$@"      # Doesn't return...
     260    ;;
    56261esac
    57262
    58263ofile=
    59264cfile=
    60 eat=
    61265
    62266for arg
     
    67271    case $1 in
    68272      -o)
    69         # configure might choose to run compile as `compile cc -o foo foo.c'.
    70         # So we strip `-o arg' only if arg is an object.
     273        # configure might choose to run compile as 'compile cc -o foo foo.c'.
     274        # So we strip '-o arg' only if arg is an object.
    71275        eat=1
    72276        case $2 in
     
    95299
    96300if test -z "$ofile" || test -z "$cfile"; then
    97   # If no `-o' option was seen then we might have been invoked from a
     301  # If no '-o' option was seen then we might have been invoked from a
    98302  # pattern rule where we don't need one.  That is ok -- this is a
    99303  # normal compilation that the losing compiler can handle.  If no
    100   # `.c' file was seen then we are probably linking.  That is also
     304  # '.c' file was seen then we are probably linking.  That is also
    101305  # ok.
    102306  exec "$@"
     
    107311
    108312# Create the lock directory.
    109 # Note: use `[/\\:.-]' here to ensure that we don't use the same name
     313# Note: use '[/\\:.-]' here to ensure that we don't use the same name
    110314# that we are using for the .o file.  Also, base the name on the expected
    111315# object file name, since that is what matters with a parallel build.
  • trunk/FACT++/.aux_dir/config.guess

    r14328 r18384  
    11#! /bin/sh
    22# Attempt to guess a canonical system name.
    3 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
    4 #   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
    5 #   2011, 2012 Free Software Foundation, Inc.
    6 
    7 timestamp='2012-02-10'
     3#   Copyright 1992-2013 Free Software Foundation, Inc.
     4
     5timestamp='2013-06-10'
    86
    97# This file is free software; you can redistribute it and/or modify it
    108# under the terms of the GNU General Public License as published by
    11 # the Free Software Foundation; either version 2 of the License, or
     9# the Free Software Foundation; either version 3 of the License, or
    1210# (at your option) any later version.
    1311#
     
    2321# distribute this file as part of a program that contains a
    2422# configuration script generated by Autoconf, you may include it under
    25 # the same distribution terms that you use for the rest of that program.
    26 
    27 
    28 # Originally written by Per Bothner.  Please send patches (context
    29 # diff format) to <config-patches@gnu.org> and include a ChangeLog
    30 # entry.
     23# the same distribution terms that you use for the rest of that
     24# program.  This Exception is an additional permission under section 7
     25# of the GNU General Public License, version 3 ("GPLv3").
    3126#
    32 # This script attempts to guess a canonical system name similar to
    33 # config.sub.  If it succeeds, it prints the system name on stdout, and
    34 # exits with 0.  Otherwise, it exits with 1.
     27# Originally written by Per Bothner.
    3528#
    3629# You can get the latest version of this script from:
    3730# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
     31#
     32# Please send patches with a ChangeLog entry to config-patches@gnu.org.
     33
    3834
    3935me=`echo "$0" | sed -e 's,.*/,,'`
     
    5551
    5652Originally written by Per Bothner.
    57 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
    58 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
    59 Free Software Foundation, Inc.
     53Copyright 1992-2013 Free Software Foundation, Inc.
    6054
    6155This is free software; see the source for copying conditions.  There is NO
     
    138132UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
    139133UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
     134
     135case "${UNAME_SYSTEM}" in
     136Linux|GNU|GNU/*)
     137        # If the system lacks a compiler, then just pick glibc.
     138        # We could probably try harder.
     139        LIBC=gnu
     140
     141        eval $set_cc_for_build
     142        cat <<-EOF > $dummy.c
     143        #include <features.h>
     144        #if defined(__UCLIBC__)
     145        LIBC=uclibc
     146        #elif defined(__dietlibc__)
     147        LIBC=dietlibc
     148        #else
     149        LIBC=gnu
     150        #endif
     151        EOF
     152        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
     153        ;;
     154esac
    140155
    141156# Note: order is significant - the case branches are not exclusive.
     
    200215        # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
    201216        echo "${machine}-${os}${release}"
     217        exit ;;
     218    *:Bitrig:*:*)
     219        UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
     220        echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
    202221        exit ;;
    203222    *:OpenBSD:*:*)
     
    303322        echo arm-acorn-riscix${UNAME_RELEASE}
    304323        exit ;;
    305     arm:riscos:*:*|arm:RISCOS:*:*)
     324    arm*:riscos:*:*|arm*:RISCOS:*:*)
    306325        echo arm-unknown-riscos
    307326        exit ;;
     
    802821        echo ${UNAME_MACHINE}-pc-cygwin
    803822        exit ;;
     823    *:MINGW64*:*)
     824        echo ${UNAME_MACHINE}-pc-mingw64
     825        exit ;;
    804826    *:MINGW*:*)
    805827        echo ${UNAME_MACHINE}-pc-mingw32
     
    853875    *:GNU:*:*)
    854876        # the GNU system
    855         echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
     877        echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
    856878        exit ;;
    857879    *:GNU/*:*:*)
    858880        # other systems with GNU libc and userland
    859         echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
     881        echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
    860882        exit ;;
    861883    i*86:Minix:*:*)
     
    863885        exit ;;
    864886    aarch64:Linux:*:*)
    865         echo ${UNAME_MACHINE}-unknown-linux-gnu
     887        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
    866888        exit ;;
    867889    aarch64_be:Linux:*:*)
    868890        UNAME_MACHINE=aarch64_be
    869         echo ${UNAME_MACHINE}-unknown-linux-gnu
     891        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
    870892        exit ;;
    871893    alpha:Linux:*:*)
     
    880902        esac
    881903        objdump --private-headers /bin/sh | grep -q ld.so.1
    882         if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
    883         echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
     904        if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
     905        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
     906        exit ;;
     907    arc:Linux:*:* | arceb:Linux:*:*)
     908        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
    884909        exit ;;
    885910    arm*:Linux:*:*)
     
    888913            | grep -q __ARM_EABI__
    889914        then
    890             echo ${UNAME_MACHINE}-unknown-linux-gnu
     915            echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
    891916        else
    892917            if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
    893918                | grep -q __ARM_PCS_VFP
    894919            then
    895                 echo ${UNAME_MACHINE}-unknown-linux-gnueabi
     920                echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
    896921            else
    897                 echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
     922                echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
    898923            fi
    899924        fi
    900925        exit ;;
    901926    avr32*:Linux:*:*)
    902         echo ${UNAME_MACHINE}-unknown-linux-gnu
     927        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
    903928        exit ;;
    904929    cris:Linux:*:*)
    905         echo ${UNAME_MACHINE}-axis-linux-gnu
     930        echo ${UNAME_MACHINE}-axis-linux-${LIBC}
    906931        exit ;;
    907932    crisv32:Linux:*:*)
    908         echo ${UNAME_MACHINE}-axis-linux-gnu
     933        echo ${UNAME_MACHINE}-axis-linux-${LIBC}
    909934        exit ;;
    910935    frv:Linux:*:*)
    911         echo ${UNAME_MACHINE}-unknown-linux-gnu
     936        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
    912937        exit ;;
    913938    hexagon:Linux:*:*)
    914         echo ${UNAME_MACHINE}-unknown-linux-gnu
     939        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
    915940        exit ;;
    916941    i*86:Linux:*:*)
    917         LIBC=gnu
    918         eval $set_cc_for_build
    919         sed 's/^        //' << EOF >$dummy.c
    920         #ifdef __dietlibc__
    921         LIBC=dietlibc
    922         #endif
    923 EOF
    924         eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
    925         echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
     942        echo ${UNAME_MACHINE}-pc-linux-${LIBC}
    926943        exit ;;
    927944    ia64:Linux:*:*)
    928         echo ${UNAME_MACHINE}-unknown-linux-gnu
     945        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
    929946        exit ;;
    930947    m32r*:Linux:*:*)
    931         echo ${UNAME_MACHINE}-unknown-linux-gnu
     948        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
    932949        exit ;;
    933950    m68*:Linux:*:*)
    934         echo ${UNAME_MACHINE}-unknown-linux-gnu
     951        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
    935952        exit ;;
    936953    mips:Linux:*:* | mips64:Linux:*:*)
     
    951968EOF
    952969        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
    953         test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
     970        test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
    954971        ;;
     972    or1k:Linux:*:*)
     973        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
     974        exit ;;
    955975    or32:Linux:*:*)
    956         echo ${UNAME_MACHINE}-unknown-linux-gnu
     976        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
    957977        exit ;;
    958978    padre:Linux:*:*)
    959         echo sparc-unknown-linux-gnu
     979        echo sparc-unknown-linux-${LIBC}
    960980        exit ;;
    961981    parisc64:Linux:*:* | hppa64:Linux:*:*)
    962         echo hppa64-unknown-linux-gnu
     982        echo hppa64-unknown-linux-${LIBC}
    963983        exit ;;
    964984    parisc:Linux:*:* | hppa:Linux:*:*)
    965985        # Look for CPU level
    966986        case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
    967           PA7*) echo hppa1.1-unknown-linux-gnu ;;
    968           PA8*) echo hppa2.0-unknown-linux-gnu ;;
    969           *)    echo hppa-unknown-linux-gnu ;;
     987          PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
     988          PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
     989          *)    echo hppa-unknown-linux-${LIBC} ;;
    970990        esac
    971991        exit ;;
    972992    ppc64:Linux:*:*)
    973         echo powerpc64-unknown-linux-gnu
     993        echo powerpc64-unknown-linux-${LIBC}
    974994        exit ;;
    975995    ppc:Linux:*:*)
    976         echo powerpc-unknown-linux-gnu
     996        echo powerpc-unknown-linux-${LIBC}
     997        exit ;;
     998    ppc64le:Linux:*:*)
     999        echo powerpc64le-unknown-linux-${LIBC}
     1000        exit ;;
     1001    ppcle:Linux:*:*)
     1002        echo powerpcle-unknown-linux-${LIBC}
    9771003        exit ;;
    9781004    s390:Linux:*:* | s390x:Linux:*:*)
    979         echo ${UNAME_MACHINE}-ibm-linux
     1005        echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
    9801006        exit ;;
    9811007    sh64*:Linux:*:*)
    982         echo ${UNAME_MACHINE}-unknown-linux-gnu
     1008        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
    9831009        exit ;;
    9841010    sh*:Linux:*:*)
    985         echo ${UNAME_MACHINE}-unknown-linux-gnu
     1011        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
    9861012        exit ;;
    9871013    sparc:Linux:*:* | sparc64:Linux:*:*)
    988         echo ${UNAME_MACHINE}-unknown-linux-gnu
     1014        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
    9891015        exit ;;
    9901016    tile*:Linux:*:*)
    991         echo ${UNAME_MACHINE}-unknown-linux-gnu
     1017        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
    9921018        exit ;;
    9931019    vax:Linux:*:*)
    994         echo ${UNAME_MACHINE}-dec-linux-gnu
     1020        echo ${UNAME_MACHINE}-dec-linux-${LIBC}
    9951021        exit ;;
    9961022    x86_64:Linux:*:*)
    997         echo ${UNAME_MACHINE}-unknown-linux-gnu
     1023        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
    9981024        exit ;;
    9991025    xtensa*:Linux:*:*)
    1000         echo ${UNAME_MACHINE}-unknown-linux-gnu
     1026        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
    10011027        exit ;;
    10021028    i*86:DYNIX/ptx:4*:*)
     
    12021228        echo i586-pc-haiku
    12031229        exit ;;
     1230    x86_64:Haiku:*:*)
     1231        echo x86_64-unknown-haiku
     1232        exit ;;
    12041233    SX-4:SUPER-UX:*:*)
    12051234        echo sx4-nec-superux${UNAME_RELEASE}
     
    12281257    *:Darwin:*:*)
    12291258        UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
    1230         case $UNAME_PROCESSOR in
    1231             i386)
    1232                 eval $set_cc_for_build
    1233                 if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
    1234                   if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
    1235                       (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
    1236                       grep IS_64BIT_ARCH >/dev/null
    1237                   then
    1238                       UNAME_PROCESSOR="x86_64"
    1239                   fi
    1240                 fi ;;
    1241             unknown) UNAME_PROCESSOR=powerpc ;;
    1242         esac
     1259        eval $set_cc_for_build
     1260        if test "$UNAME_PROCESSOR" = unknown ; then
     1261            UNAME_PROCESSOR=powerpc
     1262        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
     1272            fi
     1273        fi
    12431274        echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
    12441275        exit ;;
     
    12571288        echo neo-tandem-nsk${UNAME_RELEASE}
    12581289        exit ;;
    1259     NSE-?:NONSTOP_KERNEL:*:*)
     1290    NSE-*:NONSTOP_KERNEL:*:*)
    12601291        echo nse-tandem-nsk${UNAME_RELEASE}
    12611292        exit ;;
     
    13301361        exit ;;
    13311362esac
    1332 
    1333 #echo '(No uname command or uname output not recognized.)' 1>&2
    1334 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
    13351363
    13361364eval $set_cc_for_build
  • trunk/FACT++/.aux_dir/config.sub

    r14328 r18384  
    11#! /bin/sh
    22# Configuration validation subroutine script.
    3 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
    4 #   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
    5 #   2011, 2012 Free Software Foundation, Inc.
    6 
    7 timestamp='2012-02-10'
    8 
    9 # This file is (in principle) common to ALL GNU software.
    10 # The presence of a machine in this file suggests that SOME GNU software
    11 # can handle that machine.  It does not imply ALL GNU software can.
    12 #
    13 # This file is free software; you can redistribute it and/or modify
    14 # it under the terms of the GNU General Public License as published by
    15 # the Free Software Foundation; either version 2 of the License, or
     3#   Copyright 1992-2013 Free Software Foundation, Inc.
     4
     5timestamp='2013-08-10'
     6
     7# This file is free software; you can redistribute it and/or modify it
     8# under the terms of the GNU General Public License as published by
     9# the Free Software Foundation; either version 3 of the License, or
    1610# (at your option) any later version.
    1711#
    18 # This program is distributed in the hope that it will be useful,
    19 # but WITHOUT ANY WARRANTY; without even the implied warranty of
    20 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    21 # GNU General Public License for more details.
     12# This program is distributed in the hope that it will be useful, but
     13# WITHOUT ANY WARRANTY; without even the implied warranty of
     14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     15# General Public License for more details.
    2216#
    2317# You should have received a copy of the GNU General Public License
     
    2721# distribute this file as part of a program that contains a
    2822# configuration script generated by Autoconf, you may include it under
    29 # the same distribution terms that you use for the rest of that program.
    30 
    31 
    32 # Please send patches to <config-patches@gnu.org>.  Submit a context
    33 # diff and a properly formatted GNU ChangeLog entry.
     23# the same distribution terms that you use for the rest of that
     24# program.  This Exception is an additional permission under section 7
     25# of the GNU General Public License, version 3 ("GPLv3").
     26
     27
     28# Please send patches with a ChangeLog entry to config-patches@gnu.org.
    3429#
    3530# Configuration subroutine to validate and canonicalize a configuration type.
     
    7469GNU config.sub ($timestamp)
    7570
    76 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
    77 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
    78 Free Software Foundation, Inc.
     71Copyright 1992-2013 Free Software Foundation, Inc.
    7972
    8073This is free software; see the source for copying conditions.  There is NO
     
    124117case $maybe_os in
    125118  nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
    126   linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
     119  linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
    127120  knetbsd*-gnu* | netbsd*-gnu* | \
    128121  kopensolaris*-gnu* | \
     
    157150        -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
    158151        -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
    159         -apple | -axis | -knuth | -cray | -microblaze)
     152        -apple | -axis | -knuth | -cray | -microblaze*)
    160153                os=
    161154                basic_machine=$1
     
    225218        -isc*)
    226219                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
     220                ;;
     221        -lynx*178)
     222                os=-lynxos178
     223                ;;
     224        -lynx*5)
     225                os=-lynxos5
    227226                ;;
    228227        -lynx*)
     
    254253        | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
    255254        | am33_2.0 \
    256         | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
    257         | be32 | be64 \
     255        | arc | arceb \
     256        | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
     257        | avr | avr32 \
     258        | be32 | be64 \
    258259        | bfin \
    259         | c4x | clipper \
     260        | c4x | c8051 | clipper \
    260261        | d10v | d30v | dlx | dsp16xx \
    261262        | epiphany \
     
    268269        | lm32 \
    269270        | m32c | m32r | m32rle | m68000 | m68k | m88k \
    270         | maxq | mb | microblaze | mcore | mep | metag \
     271        | maxq | mb | microblaze | microblazeel | mcore | mep | metag \
    271272        | mips | mipsbe | mipseb | mipsel | mipsle \
    272273        | mips16 \
     
    286287        | mipsisa64sb1 | mipsisa64sb1el \
    287288        | mipsisa64sr71k | mipsisa64sr71kel \
     289        | mipsr5900 | mipsr5900el \
    288290        | mipstx39 | mipstx39el \
    289291        | mn10200 | mn10300 \
     
    292294        | msp430 \
    293295        | nds32 | nds32le | nds32be \
    294         | nios | nios2 \
     296        | nios | nios2 | nios2eb | nios2el \
    295297        | ns16k | ns32k \
    296298        | open8 \
    297         | or32 \
     299        | or1k | or32 \
    298300        | pdp10 | pdp11 | pj | pjl \
    299301        | powerpc | powerpc64 | powerpc64le | powerpcle \
     
    365367        | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
    366368        | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
    367         | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
     369        | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
    368370        | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
    369371        | avr-* | avr32-* \
     
    371373        | bfin-* | bs2000-* \
    372374        | c[123]* | c30-* | [cjt]90-* | c4x-* \
    373         | clipper-* | craynv-* | cydra-* \
     375        | c8051-* | clipper-* | craynv-* | cydra-* \
    374376        | d10v-* | d30v-* | dlx-* \
    375377        | elxsi-* \
     
    384386        | m32c-* | m32r-* | m32rle-* \
    385387        | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
    386         | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
     388        | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
     389        | microblaze-* | microblazeel-* \
    387390        | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
    388391        | mips16-* \
     
    402405        | mipsisa64sb1-* | mipsisa64sb1el-* \
    403406        | mipsisa64sr71k-* | mipsisa64sr71kel-* \
     407        | mipsr5900-* | mipsr5900el-* \
    404408        | mipstx39-* | mipstx39el-* \
    405409        | mmix-* \
     
    407411        | msp430-* \
    408412        | nds32-* | nds32le-* | nds32be-* \
    409         | nios-* | nios2-* \
     413        | nios-* | nios2-* | nios2eb-* | nios2el-* \
    410414        | none-* | np1-* | ns16k-* | ns32k-* \
    411415        | open8-* \
     
    783787                os=-sysv
    784788                ;;
    785         microblaze)
     789        microblaze*)
    786790                basic_machine=microblaze-xilinx
    787791                ;;
     792        mingw64)
     793                basic_machine=x86_64-pc
     794                os=-mingw64
     795                ;;
    788796        mingw32)
    789                 basic_machine=i386-pc
     797                basic_machine=i686-pc
    790798                os=-mingw32
    791799                ;;
     
    823831                ;;
    824832        msys)
    825                 basic_machine=i386-pc
     833                basic_machine=i686-pc
    826834                os=-msys
    827835                ;;
     
    10141022                os=-pw32
    10151023                ;;
    1016         rdos)
     1024        rdos | rdos64)
     1025                basic_machine=x86_64-pc
     1026                os=-rdos
     1027                ;;
     1028        rdos32)
    10171029                basic_machine=i386-pc
    10181030                os=-rdos
     
    13411353              | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
    13421354              | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
    1343               | -sym* | -kopensolaris* \
     1355              | -sym* | -kopensolaris* | -plan9* \
    13441356              | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
    13451357              | -aos* | -aros* \
     
    13471359              | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
    13481360              | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
    1349               | -openbsd* | -solidbsd* \
     1361              | -bitrig* | -openbsd* | -solidbsd* \
    13501362              | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
    13511363              | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
     
    13541366              | -chorusos* | -chorusrdb* | -cegcc* \
    13551367              | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
    1356               | -mingw32* | -linux-gnu* | -linux-android* \
    1357               | -linux-newlib* | -linux-uclibc* \
     1368              | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
     1369              | -linux-newlib* | -linux-musl* | -linux-uclibc* \
    13581370              | -uxpv* | -beos* | -mpeix* | -udk* \
    13591371              | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
     
    14871499                os=-aros
    14881500                ;;
    1489         -kaos*)
    1490                 os=-kaos
    1491                 ;;
    14921501        -zvmoe)
    14931502                os=-zvmoe
     
    15381547                os=-coff
    15391548                ;;
     1549        c8051-*)
     1550                os=-elf
     1551                ;;
     1552        hexagon-*)
     1553                os=-elf
     1554                ;;
    15401555        tic54x-*)
    15411556                os=-coff
     
    15761591                ;;
    15771592        mips*-*)
     1593                os=-elf
     1594                ;;
     1595        or1k-*)
    15781596                os=-elf
    15791597                ;;
  • trunk/FACT++/.aux_dir/depcomp

    r10183 r18384  
    22# depcomp - compile a program generating dependencies as side-effects
    33
    4 scriptversion=2009-04-28.21; # UTC
    5 
    6 # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free
    7 # Software Foundation, Inc.
     4scriptversion=2013-05-30.07; # UTC
     5
     6# Copyright (C) 1999-2013 Free Software Foundation, Inc.
    87
    98# This program is free software; you can redistribute it and/or modify
     
    2928case $1 in
    3029  '')
    31      echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
    32      exit 1;
    33      ;;
     30    echo "$0: No command.  Try '$0 --help' for more information." 1>&2
     31    exit 1;
     32    ;;
    3433  -h | --h*)
    3534    cat <<\EOF
     
    4140Environment variables:
    4241  depmode     Dependency tracking mode.
    43   source      Source file read by `PROGRAMS ARGS'.
    44   object      Object file output by `PROGRAMS ARGS'.
     42  source      Source file read by 'PROGRAMS ARGS'.
     43  object      Object file output by 'PROGRAMS ARGS'.
    4544  DEPDIR      directory where to store dependencies.
    4645  depfile     Dependency file to output.
    47   tmpdepfile  Temporary file to use when outputing dependencies.
     46  tmpdepfile  Temporary file to use when outputting dependencies.
    4847  libtool     Whether libtool is used (yes/no).
    4948
     
    5857esac
    5958
     59# Get the directory component of the given path, and save it in the
     60# global variables '$dir'.  Note that this directory component will
     61# be either empty or ending with a '/' character.  This is deliberate.
     62set_dir_from ()
     63{
     64  case $1 in
     65    */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;;
     66      *) dir=;;
     67  esac
     68}
     69
     70# Get the suffix-stripped basename of the given path, and save it the
     71# global variable '$base'.
     72set_base_from ()
     73{
     74  base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'`
     75}
     76
     77# If no dependency file was actually created by the compiler invocation,
     78# we still have to create a dummy depfile, to avoid errors with the
     79# Makefile "include basename.Plo" scheme.
     80make_dummy_depfile ()
     81{
     82  echo "#dummy" > "$depfile"
     83}
     84
     85# Factor out some common post-processing of the generated depfile.
     86# Requires the auxiliary global variable '$tmpdepfile' to be set.
     87aix_post_process_depfile ()
     88{
     89  # If the compiler actually managed to produce a dependency file,
     90  # post-process it.
     91  if test -f "$tmpdepfile"; then
     92    # Each line is of the form 'foo.o: dependency.h'.
     93    # Do two passes, one to just change these to
     94    #   $object: dependency.h
     95    # and one to simply output
     96    #   dependency.h:
     97    # which is needed to avoid the deleted-header problem.
     98    { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile"
     99      sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile"
     100    } > "$depfile"
     101    rm -f "$tmpdepfile"
     102  else
     103    make_dummy_depfile
     104  fi
     105}
     106
     107# A tabulation character.
     108tab='   '
     109# A newline character.
     110nl='
     111'
     112# Character ranges might be problematic outside the C locale.
     113# These definitions help.
     114upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
     115lower=abcdefghijklmnopqrstuvwxyz
     116digits=0123456789
     117alpha=${upper}${lower}
     118
    60119if test -z "$depmode" || test -z "$source" || test -z "$object"; then
    61120  echo "depcomp: Variables source, object and depmode must be set" 1>&2
     
    69128
    70129rm -f "$tmpdepfile"
     130
     131# Avoid interferences from the environment.
     132gccflag= dashmflag=
    71133
    72134# Some modes work just like other modes, but use different flags.  We
     
    81143
    82144if test "$depmode" = dashXmstdout; then
    83    # This is just like dashmstdout with a different argument.
    84    dashmflag=-xM
    85    depmode=dashmstdout
     145  # This is just like dashmstdout with a different argument.
     146  dashmflag=-xM
     147  depmode=dashmstdout
    86148fi
    87149
    88150cygpath_u="cygpath -u -f -"
    89151if test "$depmode" = msvcmsys; then
    90    # This is just like msvisualcpp but w/o cygpath translation.
    91    # Just convert the backslash-escaped backslashes to single forward
    92    # slashes to satisfy depend.m4
    93    cygpath_u="sed s,\\\\\\\\,/,g"
    94    depmode=msvisualcpp
     152  # This is just like msvisualcpp but w/o cygpath translation.
     153  # Just convert the backslash-escaped backslashes to single forward
     154  # slashes to satisfy depend.m4
     155  cygpath_u='sed s,\\\\,/,g'
     156  depmode=msvisualcpp
     157fi
     158
     159if test "$depmode" = msvc7msys; then
     160  # This is just like msvc7 but w/o cygpath translation.
     161  # Just convert the backslash-escaped backslashes to single forward
     162  # slashes to satisfy depend.m4
     163  cygpath_u='sed s,\\\\,/,g'
     164  depmode=msvc7
     165fi
     166
     167if test "$depmode" = xlc; then
     168  # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
     169  gccflag=-qmakedep=gcc,-MF
     170  depmode=gcc
    95171fi
    96172
     
    115191  "$@"
    116192  stat=$?
    117   if test $stat -eq 0; then :
    118   else
     193  if test $stat -ne 0; then
    119194    rm -f "$tmpdepfile"
    120195    exit $stat
     
    124199
    125200gcc)
     201## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
     202## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
     203## (see the conditional assignment to $gccflag above).
    126204## There are various ways to get dependency output from gcc.  Here's
    127205## why we pick this rather obscure method:
     
    130208##   (We might end up doing this anyway to support other compilers.)
    131209## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
    132 ##   -MM, not -M (despite what the docs say).
     210##   -MM, not -M (despite what the docs say).  Also, it might not be
     211##   supported by the other compilers which use the 'gcc' depmode.
    133212## - Using -M directly means running the compiler twice (even worse
    134213##   than renaming).
     
    138217  "$@" -Wp,"$gccflag$tmpdepfile"
    139218  stat=$?
    140   if test $stat -eq 0; then :
    141   else
     219  if test $stat -ne 0; then
    142220    rm -f "$tmpdepfile"
    143221    exit $stat
     
    145223  rm -f "$depfile"
    146224  echo "$object : \\" > "$depfile"
    147   alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
    148 ## The second -e expression handles DOS-style file names with drive letters.
     225  # The second -e expression handles DOS-style file names with drive
     226  # letters.
    149227  sed -e 's/^[^:]*: / /' \
    150228      -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
    151 ## This next piece of magic avoids the `deleted header file' problem.
     229## This next piece of magic avoids the "deleted header file" problem.
    152230## The problem is that when a header file which appears in a .P file
    153231## is deleted, the dependency causes make to die (because there is
     
    155233## dummy dependencies for each header file.  Too bad gcc doesn't do
    156234## this for us directly.
    157   tr ' ' '
    158 ' < "$tmpdepfile" |
    159 ## Some versions of gcc put a space before the `:'.  On the theory
     235## Some versions of gcc put a space before the ':'.  On the theory
    160236## that the space means something, we add a space to the output as
    161 ## well.
     237## well.  hp depmode also adds that space, but also prefixes the VPATH
     238## to the object.  Take care to not repeat it in the output.
    162239## Some versions of the HPUX 10.20 sed can't process this invocation
    163240## correctly.  Breaking it into two sed invocations is a workaround.
    164     sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
     241  tr ' ' "$nl" < "$tmpdepfile" \
     242    | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
     243    | sed -e 's/$/ :/' >> "$depfile"
    165244  rm -f "$tmpdepfile"
    166245  ;;
     
    180259  fi
    181260  stat=$?
    182   if test $stat -eq 0; then :
    183   else
     261  if test $stat -ne 0; then
    184262    rm -f "$tmpdepfile"
    185263    exit $stat
     
    189267  if test -f "$tmpdepfile"; then  # yes, the sourcefile depend on other files
    190268    echo "$object : \\" > "$depfile"
    191 
    192269    # Clip off the initial element (the dependent).  Don't try to be
    193270    # clever and replace this with sed code, as IRIX sed won't handle
    194271    # lines with more than a fixed number of characters (4096 in
    195272    # IRIX 6.2 sed, 8192 in IRIX 6.5).  We also remove comment lines;
    196     # the IRIX cc adds comments like `#:fec' to the end of the
     273    # the IRIX cc adds comments like '#:fec' to the end of the
    197274    # dependency line.
    198     tr ' ' '
    199 ' < "$tmpdepfile" \
    200     | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
    201     tr '
    202 ' ' ' >> "$depfile"
     275    tr ' ' "$nl" < "$tmpdepfile" \
     276      | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \
     277      | tr "$nl" ' ' >> "$depfile"
    203278    echo >> "$depfile"
    204 
    205279    # The second pass generates a dummy entry for each header file.
    206     tr ' ' '
    207 ' < "$tmpdepfile" \
    208    | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
    209    >> "$depfile"
     280    tr ' ' "$nl" < "$tmpdepfile" \
     281      | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
     282      >> "$depfile"
    210283  else
    211     # The sourcefile does not contain any dependencies, so just
    212     # store a dummy comment line, to avoid errors with the Makefile
    213     # "include basename.Plo" scheme.
    214     echo "#dummy" > "$depfile"
     284    make_dummy_depfile
    215285  fi
    216286  rm -f "$tmpdepfile"
     287  ;;
     288
     289xlc)
     290  # This case exists only to let depend.m4 do its work.  It works by
     291  # looking at the text of this script.  This case will never be run,
     292  # since it is checked for above.
     293  exit 1
    217294  ;;
    218295
     
    220297  # The C for AIX Compiler uses -M and outputs the dependencies
    221298  # in a .u file.  In older versions, this file always lives in the
    222   # current directory.  Also, the AIX compiler puts `$object:' at the
     299  # current directory.  Also, the AIX compiler puts '$object:' at the
    223300  # start of each line; $object doesn't have directory information.
    224301  # Version 6 uses the directory in both cases.
    225   dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
    226   test "x$dir" = "x$object" && dir=
    227   base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
     302  set_dir_from "$object"
     303  set_base_from "$object"
    228304  if test "$libtool" = yes; then
    229305    tmpdepfile1=$dir$base.u
     
    238314  fi
    239315  stat=$?
    240 
    241   if test $stat -eq 0; then :
    242   else
     316  if test $stat -ne 0; then
    243317    rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
    244318    exit $stat
     
    249323    test -f "$tmpdepfile" && break
    250324  done
    251   if test -f "$tmpdepfile"; then
    252     # Each line is of the form `foo.o: dependent.h'.
    253     # Do two passes, one to just change these to
    254     # `$object: dependent.h' and one to simply `dependent.h:'.
    255     sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
    256     # That's a tab and a space in the [].
    257     sed -e 's,^.*\.[a-z]*:[      ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
    258   else
    259     # The sourcefile does not contain any dependencies, so just
    260     # store a dummy comment line, to avoid errors with the Makefile
    261     # "include basename.Plo" scheme.
    262     echo "#dummy" > "$depfile"
    263   fi
     325  aix_post_process_depfile
     326  ;;
     327
     328tcc)
     329  # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26
     330  # FIXME: That version still under development at the moment of writing.
     331  #        Make that this statement remains true also for stable, released
     332  #        versions.
     333  # It will wrap lines (doesn't matter whether long or short) with a
     334  # trailing '\', as in:
     335  #
     336  #   foo.o : \
     337  #    foo.c \
     338  #    foo.h \
     339  #
     340  # It will put a trailing '\' even on the last line, and will use leading
     341  # spaces rather than leading tabs (at least since its commit 0394caf7
     342  # "Emit spaces for -MD").
     343  "$@" -MD -MF "$tmpdepfile"
     344  stat=$?
     345  if test $stat -ne 0; then
     346    rm -f "$tmpdepfile"
     347    exit $stat
     348  fi
     349  rm -f "$depfile"
     350  # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'.
     351  # We have to change lines of the first kind to '$object: \'.
     352  sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile"
     353  # And for each line of the second kind, we have to emit a 'dep.h:'
     354  # dummy dependency, to avoid the deleted-header problem.
     355  sed -n -e 's|^  *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile"
    264356  rm -f "$tmpdepfile"
    265357  ;;
    266358
    267 icc)
    268   # Intel's C compiler understands `-MD -MF file'.  However on
    269   #    icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
    270   # ICC 7.0 will fill foo.d with something like
    271   #    foo.o: sub/foo.c
    272   #    foo.o: sub/foo.h
    273   # which is wrong.  We want:
    274   #    sub/foo.o: sub/foo.c
    275   #    sub/foo.o: sub/foo.h
    276   #    sub/foo.c:
    277   #    sub/foo.h:
    278   # ICC 7.1 will output
     359## The order of this option in the case statement is important, since the
     360## shell code in configure will try each of these formats in the order
     361## listed in this file.  A plain '-MD' option would be understood by many
     362## compilers, so we must ensure this comes after the gcc and icc options.
     363pgcc)
     364  # Portland's C compiler understands '-MD'.
     365  # Will always output deps to 'file.d' where file is the root name of the
     366  # source file under compilation, even if file resides in a subdirectory.
     367  # The object file name does not affect the name of the '.d' file.
     368  # pgcc 10.2 will output
    279369  #    foo.o: sub/foo.c sub/foo.h
    280   # and will wrap long lines using \ :
     370  # and will wrap long lines using '\' :
    281371  #    foo.o: sub/foo.c ... \
    282372  #     sub/foo.h ... \
    283373  #     ...
    284 
    285   "$@" -MD -MF "$tmpdepfile"
    286   stat=$?
    287   if test $stat -eq 0; then :
    288   else
     374  set_dir_from "$object"
     375  # Use the source, not the object, to determine the base name, since
     376  # that's sadly what pgcc will do too.
     377  set_base_from "$source"
     378  tmpdepfile=$base.d
     379
     380  # For projects that build the same source file twice into different object
     381  # files, the pgcc approach of using the *source* file root name can cause
     382  # problems in parallel builds.  Use a locking strategy to avoid stomping on
     383  # the same $tmpdepfile.
     384  lockdir=$base.d-lock
     385  trap "
     386    echo '$0: caught signal, cleaning up...' >&2
     387    rmdir '$lockdir'
     388    exit 1
     389  " 1 2 13 15
     390  numtries=100
     391  i=$numtries
     392  while test $i -gt 0; do
     393    # mkdir is a portable test-and-set.
     394    if mkdir "$lockdir" 2>/dev/null; then
     395      # This process acquired the lock.
     396      "$@" -MD
     397      stat=$?
     398      # Release the lock.
     399      rmdir "$lockdir"
     400      break
     401    else
     402      # If the lock is being held by a different process, wait
     403      # until the winning process is done or we timeout.
     404      while test -d "$lockdir" && test $i -gt 0; do
     405        sleep 1
     406        i=`expr $i - 1`
     407      done
     408    fi
     409    i=`expr $i - 1`
     410  done
     411  trap - 1 2 13 15
     412  if test $i -le 0; then
     413    echo "$0: failed to acquire lock after $numtries attempts" >&2
     414    echo "$0: check lockdir '$lockdir'" >&2
     415    exit 1
     416  fi
     417
     418  if test $stat -ne 0; then
    289419    rm -f "$tmpdepfile"
    290420    exit $stat
     
    298428  # Some versions of the HPUX 10.20 sed can't process this invocation
    299429  # correctly.  Breaking it into two sed invocations is a workaround.
    300   sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
    301     sed -e 's/$/ :/' >> "$depfile"
     430  sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \
     431    | sed -e 's/$/ :/' >> "$depfile"
    302432  rm -f "$tmpdepfile"
    303433  ;;
     
    310440  # happens to be.
    311441  # Much of this is similar to the tru64 case; see comments there.
    312   dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
    313   test "x$dir" = "x$object" && dir=
    314   base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
     442  set_dir_from  "$object"
     443  set_base_from "$object"
    315444  if test "$libtool" = yes; then
    316445    tmpdepfile1=$dir$base.d
     
    323452  fi
    324453  stat=$?
    325   if test $stat -eq 0; then :
    326   else
     454  if test $stat -ne 0; then
    327455     rm -f "$tmpdepfile1" "$tmpdepfile2"
    328456     exit $stat
     
    334462  done
    335463  if test -f "$tmpdepfile"; then
    336     sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
    337     # Add `dependent.h:' lines.
     464    sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile"
     465    # Add 'dependent.h:' lines.
    338466    sed -ne '2,${
    339                s/^ *//
    340                s/ \\*$//
    341                s/$/:/
    342                p
    343              }' "$tmpdepfile" >> "$depfile"
     467               s/^ *//
     468               s/ \\*$//
     469               s/$/:/
     470               p
     471             }' "$tmpdepfile" >> "$depfile"
    344472  else
    345     echo "#dummy" > "$depfile"
     473    make_dummy_depfile
    346474  fi
    347475  rm -f "$tmpdepfile" "$tmpdepfile2"
     
    349477
    350478tru64)
    351    # The Tru64 compiler uses -MD to generate dependencies as a side
    352    # effect.  `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
    353    # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
    354    # dependencies in `foo.d' instead, so we check for that too.
    355    # Subdirectories are respected.
    356    dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
    357    test "x$dir" = "x$object" && dir=
    358    base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
    359 
    360    if test "$libtool" = yes; then
    361       # With Tru64 cc, shared objects can also be used to make a
    362       # static library.  This mechanism is used in libtool 1.4 series to
    363       # handle both shared and static libraries in a single compilation.
    364       # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
    365       #
    366       # With libtool 1.5 this exception was removed, and libtool now
    367       # generates 2 separate objects for the 2 libraries.  These two
    368       # compilations output dependencies in $dir.libs/$base.o.d and
    369       # in $dir$base.o.d.  We have to check for both files, because
    370       # one of the two compilations can be disabled.  We should prefer
    371       # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
    372       # automatically cleaned when .libs/ is deleted, while ignoring
    373       # the former would cause a distcleancheck panic.
    374       tmpdepfile1=$dir.libs/$base.lo.d   # libtool 1.4
    375       tmpdepfile2=$dir$base.o.d          # libtool 1.5
    376       tmpdepfile3=$dir.libs/$base.o.d    # libtool 1.5
    377       tmpdepfile4=$dir.libs/$base.d      # Compaq CCC V6.2-504
    378       "$@" -Wc,-MD
    379    else
    380       tmpdepfile1=$dir$base.o.d
    381       tmpdepfile2=$dir$base.d
    382       tmpdepfile3=$dir$base.d
    383       tmpdepfile4=$dir$base.d
    384       "$@" -MD
    385    fi
    386 
    387    stat=$?
    388    if test $stat -eq 0; then :
    389    else
    390       rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
    391       exit $stat
    392    fi
    393 
    394    for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
    395    do
    396      test -f "$tmpdepfile" && break
    397    done
    398    if test -f "$tmpdepfile"; then
    399       sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
    400       # That's a tab and a space in the [].
    401       sed -e 's,^.*\.[a-z]*:[    ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
    402    else
    403       echo "#dummy" > "$depfile"
    404    fi
    405    rm -f "$tmpdepfile"
    406    ;;
     479  # The Tru64 compiler uses -MD to generate dependencies as a side
     480  # effect.  'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
     481  # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
     482  # dependencies in 'foo.d' instead, so we check for that too.
     483  # Subdirectories are respected.
     484  set_dir_from  "$object"
     485  set_base_from "$object"
     486
     487  if test "$libtool" = yes; then
     488    # Libtool generates 2 separate objects for the 2 libraries.  These
     489    # two compilations output dependencies in $dir.libs/$base.o.d and
     490    # in $dir$base.o.d.  We have to check for both files, because
     491    # one of the two compilations can be disabled.  We should prefer
     492    # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
     493    # automatically cleaned when .libs/ is deleted, while ignoring
     494    # the former would cause a distcleancheck panic.
     495    tmpdepfile1=$dir$base.o.d          # libtool 1.5
     496    tmpdepfile2=$dir.libs/$base.o.d    # Likewise.
     497    tmpdepfile3=$dir.libs/$base.d      # Compaq CCC V6.2-504
     498    "$@" -Wc,-MD
     499  else
     500    tmpdepfile1=$dir$base.d
     501    tmpdepfile2=$dir$base.d
     502    tmpdepfile3=$dir$base.d
     503    "$@" -MD
     504  fi
     505
     506  stat=$?
     507  if test $stat -ne 0; then
     508    rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
     509    exit $stat
     510  fi
     511
     512  for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
     513  do
     514    test -f "$tmpdepfile" && break
     515  done
     516  # Same post-processing that is required for AIX mode.
     517  aix_post_process_depfile
     518  ;;
     519
     520msvc7)
     521  if test "$libtool" = yes; then
     522    showIncludes=-Wc,-showIncludes
     523  else
     524    showIncludes=-showIncludes
     525  fi
     526  "$@" $showIncludes > "$tmpdepfile"
     527  stat=$?
     528  grep -v '^Note: including file: ' "$tmpdepfile"
     529  if test $stat -ne 0; then
     530    rm -f "$tmpdepfile"
     531    exit $stat
     532  fi
     533  rm -f "$depfile"
     534  echo "$object : \\" > "$depfile"
     535  # The first sed program below extracts the file names and escapes
     536  # backslashes for cygpath.  The second sed program outputs the file
     537  # name when reading, but also accumulates all include files in the
     538  # hold buffer in order to output them again at the end.  This only
     539  # works with sed implementations that can handle large buffers.
     540  sed < "$tmpdepfile" -n '
     541/^Note: including file:  *\(.*\)/ {
     542  s//\1/
     543  s/\\/\\\\/g
     544  p
     545}' | $cygpath_u | sort -u | sed -n '
     546s/ /\\ /g
     547s/\(.*\)/'"$tab"'\1 \\/p
     548s/.\(.*\) \\/\1:/
     549H
     550$ {
     551  s/.*/'"$tab"'/
     552  G
     553  p
     554}' >> "$depfile"
     555  echo >> "$depfile" # make sure the fragment doesn't end with a backslash
     556  rm -f "$tmpdepfile"
     557  ;;
     558
     559msvc7msys)
     560  # This case exists only to let depend.m4 do its work.  It works by
     561  # looking at the text of this script.  This case will never be run,
     562  # since it is checked for above.
     563  exit 1
     564  ;;
    407565
    408566#nosideeffect)
     
    423581  fi
    424582
    425   # Remove `-o $object'.
     583  # Remove '-o $object'.
    426584  IFS=" "
    427585  for arg
     
    443601
    444602  test -z "$dashmflag" && dashmflag=-M
    445   # Require at least two characters before searching for `:'
     603  # Require at least two characters before searching for ':'
    446604  # in the target name.  This is to cope with DOS-style filenames:
    447   # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
     605  # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
    448606  "$@" $dashmflag |
    449     sed 's:^[  ]*[^: ][^:][^:]*\:[    ]*:'"$object"'\: :' > "$tmpdepfile"
     607    sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile"
    450608  rm -f "$depfile"
    451609  cat < "$tmpdepfile" > "$depfile"
    452   tr ' ' '
    453 ' < "$tmpdepfile" | \
    454 ## Some versions of the HPUX 10.20 sed can't process this invocation
    455 ## correctly.  Breaking it into two sed invocations is a workaround.
    456     sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
     610  # Some versions of the HPUX 10.20 sed can't process this sed invocation
     611  # correctly.  Breaking it into two sed invocations is a workaround.
     612  tr ' ' "$nl" < "$tmpdepfile" \
     613    | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
     614    | sed -e 's/$/ :/' >> "$depfile"
    457615  rm -f "$tmpdepfile"
    458616  ;;
     
    504662  ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
    505663  rm -f "$depfile"
    506   cat < "$tmpdepfile" > "$depfile"
    507   sed '1,2d' "$tmpdepfile" | tr ' ' '
    508 ' | \
    509 ## Some versions of the HPUX 10.20 sed can't process this invocation
    510 ## correctly.  Breaking it into two sed invocations is a workaround.
    511     sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
     664  # makedepend may prepend the VPATH from the source file name to the object.
     665  # No need to regex-escape $object, excess matching of '.' is harmless.
     666  sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
     667  # Some versions of the HPUX 10.20 sed can't process the last invocation
     668  # correctly.  Breaking it into two sed invocations is a workaround.
     669  sed '1,2d' "$tmpdepfile" \
     670    | tr ' ' "$nl" \
     671    | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
     672    | sed -e 's/$/ :/' >> "$depfile"
    512673  rm -f "$tmpdepfile" "$tmpdepfile".bak
    513674  ;;
     
    526687  fi
    527688
    528   # Remove `-o $object'.
     689  # Remove '-o $object'.
    529690  IFS=" "
    530691  for arg
     
    545706  done
    546707
    547   "$@" -E |
    548     sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
    549        -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
    550     sed '$ s: \\$::' > "$tmpdepfile"
     708  "$@" -E \
     709    | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
     710             -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
     711    | sed '$ s: \\$::' > "$tmpdepfile"
    551712  rm -f "$depfile"
    552713  echo "$object : \\" > "$depfile"
     
    580741      ;;
    581742    "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
    582         set fnord "$@"
    583         shift
    584         shift
    585         ;;
     743        set fnord "$@"
     744        shift
     745        shift
     746        ;;
    586747    *)
    587         set fnord "$@" "$arg"
    588         shift
    589         shift
    590         ;;
     748        set fnord "$@" "$arg"
     749        shift
     750        shift
     751        ;;
    591752    esac
    592753  done
     
    595756  rm -f "$depfile"
    596757  echo "$object : \\" > "$depfile"
    597   sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::      \1 \\:p' >> "$depfile"
    598   echo "        " >> "$depfile"
     758  sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
     759  echo "$tab" >> "$depfile"
    599760  sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
    600761  rm -f "$tmpdepfile"
  • trunk/FACT++/.aux_dir/install-sh

    r10183 r18384  
    22# install - install a program, script, or datafile
    33
    4 scriptversion=2009-04-28.21; # UTC
     4scriptversion=2011-11-20.07; # UTC
    55
    66# This originates from X11R5 (mit/util/scripts/install.sh), which was
     
    3636#
    3737# Calling this script install-sh is preferred over install.sh, to prevent
    38 # `make' implicit rules from creating a file called install from it
     38# 'make' implicit rules from creating a file called install from it
    3939# when there is no Makefile.
    4040#
     
    157157
    158158    -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
    159163        shift;;
    160164
     
    187191    shift # arg
    188192    dst_arg=$arg
     193    # Protect names problematic for 'test' and other utilities.
     194    case $dst_arg in
     195      -* | [=\(\)!]) dst_arg=./$dst_arg;;
     196    esac
    189197  done
    190198fi
     
    195203    exit 1
    196204  fi
    197   # It's OK to call `install-sh -d' without argument.
     205  # It's OK to call 'install-sh -d' without argument.
    198206  # This can happen when creating conditional directories.
    199207  exit 0
     
    201209
    202210if test -z "$dir_arg"; then
    203   trap '(exit $?); exit' 1 2 13 15
     211  do_exit='(exit $ret); exit $ret'
     212  trap "ret=129; $do_exit" 1
     213  trap "ret=130; $do_exit" 2
     214  trap "ret=141; $do_exit" 13
     215  trap "ret=143; $do_exit" 15
    204216
    205217  # Set umask so as not to create temps with too-generous modes.
     
    229241for src
    230242do
    231   # Protect names starting with `-'.
     243  # Protect names problematic for 'test' and other utilities.
    232244  case $src in
    233     -*) src=./$src;;
     245    -* | [=\(\)!]) src=./$src;;
    234246  esac
    235247
     
    253265      exit 1
    254266    fi
    255 
    256267    dst=$dst_arg
    257     # Protect names starting with `-'.
    258     case $dst in
    259       -*) dst=./$dst;;
    260     esac
    261268
    262269    # If destination is a directory, append the input filename; won't work
     
    348355                   # Check for POSIX incompatibilities with -m.
    349356                   # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
    350                    # other-writeable bit of parent directory when it shouldn't.
     357                   # other-writable bit of parent directory when it shouldn't.
    351358                   # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
    352359                   ls_ld_tmpdir=`ls -ld "$tmpdir"`
     
    386393      case $dstdir in
    387394        /*) prefix='/';;
    388         -*) prefix='./';;
     395        [-=\(\)!]*) prefix='./';;
    389396        *)  prefix='';;
    390397      esac
     
    404411      for d
    405412      do
    406         test -z "$d" && continue
     413        test X"$d" = X && continue
    407414
    408415        prefix=$prefix$d
  • trunk/FACT++/.aux_dir/missing

    r10183 r18384  
    11#! /bin/sh
    2 # Common stub for a few missing GNU programs while installing.
    3 
    4 scriptversion=2009-04-28.21; # UTC
    5 
    6 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
    7 # 2008, 2009 Free Software Foundation, Inc.
    8 # Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
     2# Common wrapper for a few potentially missing GNU programs.
     3
     4scriptversion=2013-10-28.13; # UTC
     5
     6# Copyright (C) 1996-2013 Free Software Foundation, Inc.
     7# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
    98
    109# This program is free software; you can redistribute it and/or modify
     
    2726
    2827if test $# -eq 0; then
    29   echo 1>&2 "Try \`$0 --help' for more information"
     28  echo 1>&2 "Try '$0 --help' for more information"
    3029  exit 1
    3130fi
    3231
    33 run=:
    34 sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
    35 sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
    36 
    37 # In the cases where this matters, `missing' is being run in the
    38 # srcdir already.
    39 if test -f configure.ac; then
    40   configure_ac=configure.ac
    41 else
    42   configure_ac=configure.in
    43 fi
    44 
    45 msg="missing on your system"
    46 
    4732case $1 in
    48 --run)
    49   # Try to run requested program, and just exit if it succeeds.
    50   run=
    51   shift
    52   "$@" && exit 0
    53   # Exit code 63 means version mismatch.  This often happens
    54   # when the user try to use an ancient version of a tool on
    55   # a file that requires a minimum version.  In this case we
    56   # we should proceed has if the program had been absent, or
    57   # if --run hadn't been passed.
    58   if test $? = 63; then
    59     run=:
    60     msg="probably too old"
    61   fi
    62   ;;
     33
     34  --is-lightweight)
     35    # Used by our autoconf macros to check whether the available missing
     36    # script is modern enough.
     37    exit 0
     38    ;;
     39
     40  --run)
     41    # Back-compat with the calling convention used by older automake.
     42    shift
     43    ;;
    6344
    6445  -h|--h|--he|--hel|--help)
     
    6647$0 [OPTION]... PROGRAM [ARGUMENT]...
    6748
    68 Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
    69 error status if there is no known handling for PROGRAM.
     49Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
     50to PROGRAM being missing or too old.
    7051
    7152Options:
    7253  -h, --help      display this help and exit
    7354  -v, --version   output version information and exit
    74   --run           try to run the given command, and emulate it if it fails
    7555
    7656Supported PROGRAM values:
    77   aclocal      touch file \`aclocal.m4'
    78   autoconf     touch file \`configure'
    79   autoheader   touch file \`config.h.in'
    80   autom4te     touch the output file, or create a stub one
    81   automake     touch all \`Makefile.in' files
    82   bison        create \`y.tab.[ch]', if possible, from existing .[ch]
    83   flex         create \`lex.yy.c', if possible, from existing .c
    84   help2man     touch the output file
    85   lex          create \`lex.yy.c', if possible, from existing .c
    86   makeinfo     touch the output file
    87   tar          try tar, gnutar, gtar, then tar without non-portable flags
    88   yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
    89 
    90 Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
    91 \`g' are ignored when checking the name.
     57  aclocal   autoconf  autoheader   autom4te  automake  makeinfo
     58  bison     yacc      flex         lex       help2man
     59
     60Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
     61'g' are ignored when checking the name.
    9262
    9363Send bug reports to <bug-automake@gnu.org>."
     
    10171
    10272  -*)
    103     echo 1>&2 "$0: Unknown \`$1' option"
    104     echo 1>&2 "Try \`$0 --help' for more information"
     73    echo 1>&2 "$0: unknown '$1' option"
     74    echo 1>&2 "Try '$0 --help' for more information"
    10575    exit 1
    10676    ;;
     
    10878esac
    10979
    110 # normalize program name to check for.
    111 program=`echo "$1" | sed '
    112   s/^gnu-//; t
    113   s/^gnu//; t
    114   s/^g//; t'`
    115 
    116 # Now exit if we have it, but it failed.  Also exit now if we
    117 # don't have it and --version was passed (most likely to detect
    118 # the program).  This is about non-GNU programs, so use $1 not
    119 # $program.
    120 case $1 in
    121   lex*|yacc*)
    122     # Not GNU programs, they don't have --version.
    123     ;;
    124 
    125   tar*)
    126     if test -n "$run"; then
    127        echo 1>&2 "ERROR: \`tar' requires --run"
    128        exit 1
    129     elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
    130        exit 1
    131     fi
    132     ;;
    133 
    134   *)
    135     if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
    136        # We have it, but it failed.
    137        exit 1
    138     elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
    139        # Could not run --version or --help.  This is probably someone
    140        # running `$TOOL --version' or `$TOOL --help' to check whether
    141        # $TOOL exists and not knowing $TOOL uses missing.
    142        exit 1
    143     fi
    144     ;;
    145 esac
    146 
    147 # If it does not exist, or fails to run (possibly an outdated version),
    148 # try to emulate it.
    149 case $program in
    150   aclocal*)
    151     echo 1>&2 "\
    152 WARNING: \`$1' is $msg.  You should only need it if
    153          you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
    154          to install the \`Automake' and \`Perl' packages.  Grab them from
    155          any GNU archive site."
    156     touch aclocal.m4
    157     ;;
    158 
    159   autoconf*)
    160     echo 1>&2 "\
    161 WARNING: \`$1' is $msg.  You should only need it if
    162          you modified \`${configure_ac}'.  You might want to install the
    163          \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
    164          archive site."
    165     touch configure
    166     ;;
    167 
    168   autoheader*)
    169     echo 1>&2 "\
    170 WARNING: \`$1' is $msg.  You should only need it if
    171          you modified \`acconfig.h' or \`${configure_ac}'.  You might want
    172          to install the \`Autoconf' and \`GNU m4' packages.  Grab them
    173          from any GNU archive site."
    174     files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
    175     test -z "$files" && files="config.h"
    176     touch_files=
    177     for f in $files; do
    178       case $f in
    179       *:*) touch_files="$touch_files "`echo "$f" |
    180                                        sed -e 's/^[^:]*://' -e 's/:.*//'`;;
    181       *) touch_files="$touch_files $f.in";;
    182       esac
    183     done
    184     touch $touch_files
    185     ;;
    186 
    187   automake*)
    188     echo 1>&2 "\
    189 WARNING: \`$1' is $msg.  You should only need it if
    190          you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
    191          You might want to install the \`Automake' and \`Perl' packages.
    192          Grab them from any GNU archive site."
    193     find . -type f -name Makefile.am -print |
    194            sed 's/\.am$/.in/' |
    195            while read f; do touch "$f"; done
    196     ;;
    197 
    198   autom4te*)
    199     echo 1>&2 "\
    200 WARNING: \`$1' is needed, but is $msg.
    201          You might have modified some files without having the
    202          proper tools for further handling them.
    203          You can get \`$1' as part of \`Autoconf' from any GNU
    204          archive site."
    205 
    206     file=`echo "$*" | sed -n "$sed_output"`
    207     test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
    208     if test -f "$file"; then
    209         touch $file
    210     else
    211         test -z "$file" || exec >$file
    212         echo "#! /bin/sh"
    213         echo "# Created by GNU Automake missing as a replacement of"
    214         echo "#  $ $@"
    215         echo "exit 0"
    216         chmod +x $file
    217         exit 1
    218     fi
    219     ;;
    220 
    221   bison*|yacc*)
    222     echo 1>&2 "\
    223 WARNING: \`$1' $msg.  You should only need it if
    224          you modified a \`.y' file.  You may need the \`Bison' package
    225          in order for those modifications to take effect.  You can get
    226          \`Bison' from any GNU archive site."
    227     rm -f y.tab.c y.tab.h
    228     if test $# -ne 1; then
    229         eval LASTARG="\${$#}"
    230         case $LASTARG in
    231         *.y)
    232             SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
    233             if test -f "$SRCFILE"; then
    234                  cp "$SRCFILE" y.tab.c
    235             fi
    236             SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
    237             if test -f "$SRCFILE"; then
    238                  cp "$SRCFILE" y.tab.h
    239             fi
    240           ;;
    241         esac
    242     fi
    243     if test ! -f y.tab.h; then
    244         echo >y.tab.h
    245     fi
    246     if test ! -f y.tab.c; then
    247         echo 'main() { return 0; }' >y.tab.c
    248     fi
    249     ;;
    250 
    251   lex*|flex*)
    252     echo 1>&2 "\
    253 WARNING: \`$1' is $msg.  You should only need it if
    254          you modified a \`.l' file.  You may need the \`Flex' package
    255          in order for those modifications to take effect.  You can get
    256          \`Flex' from any GNU archive site."
    257     rm -f lex.yy.c
    258     if test $# -ne 1; then
    259         eval LASTARG="\${$#}"
    260         case $LASTARG in
    261         *.l)
    262             SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
    263             if test -f "$SRCFILE"; then
    264                  cp "$SRCFILE" lex.yy.c
    265             fi
    266           ;;
    267         esac
    268     fi
    269     if test ! -f lex.yy.c; then
    270         echo 'main() { return 0; }' >lex.yy.c
    271     fi
    272     ;;
    273 
    274   help2man*)
    275     echo 1>&2 "\
    276 WARNING: \`$1' is $msg.  You should only need it if
    277          you modified a dependency of a manual page.  You may need the
    278          \`Help2man' package in order for those modifications to take
    279          effect.  You can get \`Help2man' from any GNU archive site."
    280 
    281     file=`echo "$*" | sed -n "$sed_output"`
    282     test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
    283     if test -f "$file"; then
    284         touch $file
    285     else
    286         test -z "$file" || exec >$file
    287         echo ".ab help2man is required to generate this page"
    288         exit $?
    289     fi
    290     ;;
    291 
    292   makeinfo*)
    293     echo 1>&2 "\
    294 WARNING: \`$1' is $msg.  You should only need it if
    295          you modified a \`.texi' or \`.texinfo' file, or any other file
    296          indirectly affecting the aspect of the manual.  The spurious
    297          call might also be the consequence of using a buggy \`make' (AIX,
    298          DU, IRIX).  You might want to install the \`Texinfo' package or
    299          the \`GNU make' package.  Grab either from any GNU archive site."
    300     # The file to touch is that specified with -o ...
    301     file=`echo "$*" | sed -n "$sed_output"`
    302     test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
    303     if test -z "$file"; then
    304       # ... or it is the one specified with @setfilename ...
    305       infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
    306       file=`sed -n '
    307         /^@setfilename/{
    308           s/.* \([^ ]*\) *$/\1/
    309           p
    310           q
    311         }' $infile`
    312       # ... or it is derived from the source name (dir/f.texi becomes f.info)
    313       test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
    314     fi
    315     # If the file does not exist, the user really needs makeinfo;
    316     # let's fail without touching anything.
    317     test -f $file || exit 1
    318     touch $file
    319     ;;
    320 
    321   tar*)
    322     shift
    323 
    324     # We have already tried tar in the generic part.
    325     # Look for gnutar/gtar before invocation to avoid ugly error
    326     # messages.
    327     if (gnutar --version > /dev/null 2>&1); then
    328        gnutar "$@" && exit 0
    329     fi
    330     if (gtar --version > /dev/null 2>&1); then
    331        gtar "$@" && exit 0
    332     fi
    333     firstarg="$1"
    334     if shift; then
    335         case $firstarg in
    336         *o*)
    337             firstarg=`echo "$firstarg" | sed s/o//`
    338             tar "$firstarg" "$@" && exit 0
    339             ;;
    340         esac
    341         case $firstarg in
    342         *h*)
    343             firstarg=`echo "$firstarg" | sed s/h//`
    344             tar "$firstarg" "$@" && exit 0
    345             ;;
    346         esac
    347     fi
    348 
    349     echo 1>&2 "\
    350 WARNING: I can't seem to be able to run \`tar' with the given arguments.
    351          You may want to install GNU tar or Free paxutils, or check the
    352          command line arguments."
    353     exit 1
    354     ;;
    355 
    356   *)
    357     echo 1>&2 "\
    358 WARNING: \`$1' is needed, and is $msg.
    359          You might have modified some files without having the
    360          proper tools for further handling them.  Check the \`README' file,
    361          it often tells you about the needed prerequisites for installing
    362          this package.  You may also peek at any GNU archive site, in case
    363          some other package would contain this missing \`$1' program."
    364     exit 1
    365     ;;
    366 esac
    367 
    368 exit 0
     80# Run the given program, remember its exit status.
     81"$@"; st=$?
     82
     83# If it succeeded, we are done.
     84test $st -eq 0 && exit 0
     85
     86# Also exit now if we it failed (or wasn't found), and '--version' was
     87# passed; such an option is passed most likely to detect whether the
     88# program is present and works.
     89case $2 in --version|--help) exit $st;; esac
     90
     91# Exit code 63 means version mismatch.  This often happens when the user
     92# tries to use an ancient version of a tool on a file that requires a
     93# minimum version.
     94if test $st -eq 63; then
     95  msg="probably too old"
     96elif test $st -eq 127; then
     97  # Program was missing.
     98  msg="missing on your system"
     99else
     100  # Program was found and executed, but failed.  Give up.
     101  exit $st
     102fi
     103
     104perl_URL=http://www.perl.org/
     105flex_URL=http://flex.sourceforge.net/
     106gnu_software_URL=http://www.gnu.org/software
     107
     108program_details ()
     109{
     110  case $1 in
     111    aclocal|automake)
     112      echo "The '$1' program is part of the GNU Automake package:"
     113      echo "<$gnu_software_URL/automake>"
     114      echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
     115      echo "<$gnu_software_URL/autoconf>"
     116      echo "<$gnu_software_URL/m4/>"
     117      echo "<$perl_URL>"
     118      ;;
     119    autoconf|autom4te|autoheader)
     120      echo "The '$1' program is part of the GNU Autoconf package:"
     121      echo "<$gnu_software_URL/autoconf/>"
     122      echo "It also requires GNU m4 and Perl in order to run:"
     123      echo "<$gnu_software_URL/m4/>"
     124      echo "<$perl_URL>"
     125      ;;
     126  esac
     127}
     128
     129give_advice ()
     130{
     131  # Normalize program name to check for.
     132  normalized_program=`echo "$1" | sed '
     133    s/^gnu-//; t
     134    s/^gnu//; t
     135    s/^g//; t'`
     136
     137  printf '%s\n' "'$1' is $msg."
     138
     139  configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
     140  case $normalized_program in
     141    autoconf*)
     142      echo "You should only need it if you modified 'configure.ac',"
     143      echo "or m4 files included by it."
     144      program_details 'autoconf'
     145      ;;
     146    autoheader*)
     147      echo "You should only need it if you modified 'acconfig.h' or"
     148      echo "$configure_deps."
     149      program_details 'autoheader'
     150      ;;
     151    automake*)
     152      echo "You should only need it if you modified 'Makefile.am' or"
     153      echo "$configure_deps."
     154      program_details 'automake'
     155      ;;
     156    aclocal*)
     157      echo "You should only need it if you modified 'acinclude.m4' or"
     158      echo "$configure_deps."
     159      program_details 'aclocal'
     160      ;;
     161   autom4te*)
     162      echo "You might have modified some maintainer files that require"
     163      echo "the 'autom4te' program to be rebuilt."
     164      program_details 'autom4te'
     165      ;;
     166    bison*|yacc*)
     167      echo "You should only need it if you modified a '.y' file."
     168      echo "You may want to install the GNU Bison package:"
     169      echo "<$gnu_software_URL/bison/>"
     170      ;;
     171    lex*|flex*)
     172      echo "You should only need it if you modified a '.l' file."
     173      echo "You may want to install the Fast Lexical Analyzer package:"
     174      echo "<$flex_URL>"
     175      ;;
     176    help2man*)
     177      echo "You should only need it if you modified a dependency" \
     178           "of a man page."
     179      echo "You may want to install the GNU Help2man package:"
     180      echo "<$gnu_software_URL/help2man/>"
     181    ;;
     182    makeinfo*)
     183      echo "You should only need it if you modified a '.texi' file, or"
     184      echo "any other file indirectly affecting the aspect of the manual."
     185      echo "You might want to install the Texinfo package:"
     186      echo "<$gnu_software_URL/texinfo/>"
     187      echo "The spurious makeinfo call might also be the consequence of"
     188      echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
     189      echo "want to install GNU make:"
     190      echo "<$gnu_software_URL/make/>"
     191      ;;
     192    *)
     193      echo "You might have modified some files without having the proper"
     194      echo "tools for further handling them.  Check the 'README' file, it"
     195      echo "often tells you about the needed prerequisites for installing"
     196      echo "this package.  You may also peek at any GNU archive site, in"
     197      echo "case some other package contains this missing '$1' program."
     198      ;;
     199  esac
     200}
     201
     202give_advice "$1" | sed -e '1s/^/WARNING: /' \
     203                       -e '2,$s/^/         /' >&2
     204
     205# Propagate the correct exit status (expected to be 127 for a program
     206# not found, 63 for a program that failed due to version mismatch).
     207exit $st
    369208
    370209# Local variables:
Note: See TracChangeset for help on using the changeset viewer.