diff options
Diffstat (limited to 'build-aux')
| -rwxr-xr-x | build-aux/compile | 228 | ||||
| -rwxr-xr-x | build-aux/depcomp | 190 | ||||
| -rwxr-xr-x | build-aux/install-sh | 29 | ||||
| -rwxr-xr-x | build-aux/missing | 53 | 
4 files changed, 370 insertions, 130 deletions
| diff --git a/build-aux/compile b/build-aux/compile index c0096a7..862a14e 100755 --- a/build-aux/compile +++ b/build-aux/compile @@ -1,10 +1,10 @@  #! /bin/sh -# Wrapper for compilers which do not understand `-c -o'. +# Wrapper for compilers which do not understand '-c -o'. -scriptversion=2009-10-06.20; # UTC +scriptversion=2012-03-05.13; # UTC -# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009  Free Software -# Foundation, Inc. +# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009, 2010, 2012 Free +# Software Foundation, Inc.  # Written by Tom Tromey <tromey@cygnus.com>.  #  # This program is free software; you can redistribute it and/or modify @@ -29,21 +29,219 @@ scriptversion=2009-10-06.20; # UTC  # bugs to <bug-automake@gnu.org> or send patches to  # <automake-patches@gnu.org>. +nl=' +' + +# We need space, tab and new line, in precisely that order.  Quoting is +# there to prevent tools from complaining about whitespace usage. +IFS=" ""	$nl" + +file_conv= + +# func_file_conv build_file lazy +# Convert a $build file to $host form and store it in $file +# Currently only supports Windows hosts. If the determined conversion +# type is listed in (the comma separated) LAZY, no conversion will +# take place. +func_file_conv () +{ +  file=$1 +  case $file in +    / | /[!/]*) # absolute file, and not a UNC file +      if test -z "$file_conv"; then +	# lazily determine how to convert abs files +	case `uname -s` in +	  MINGW*) +	    file_conv=mingw +	    ;; +	  CYGWIN*) +	    file_conv=cygwin +	    ;; +	  *) +	    file_conv=wine +	    ;; +	esac +      fi +      case $file_conv/,$2, in +	*,$file_conv,*) +	  ;; +	mingw/*) +	  file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` +	  ;; +	cygwin/*) +	  file=`cygpath -m "$file" || echo "$file"` +	  ;; +	wine/*) +	  file=`winepath -w "$file" || echo "$file"` +	  ;; +      esac +      ;; +  esac +} + +# func_cl_dashL linkdir +# Make cl look for libraries in LINKDIR +func_cl_dashL () +{ +  func_file_conv "$1" +  if test -z "$lib_path"; then +    lib_path=$file +  else +    lib_path="$lib_path;$file" +  fi +  linker_opts="$linker_opts -LIBPATH:$file" +} + +# func_cl_dashl library +# Do a library search-path lookup for cl +func_cl_dashl () +{ +  lib=$1 +  found=no +  save_IFS=$IFS +  IFS=';' +  for dir in $lib_path $LIB +  do +    IFS=$save_IFS +    if $shared && test -f "$dir/$lib.dll.lib"; then +      found=yes +      lib=$dir/$lib.dll.lib +      break +    fi +    if test -f "$dir/$lib.lib"; then +      found=yes +      lib=$dir/$lib.lib +      break +    fi +  done +  IFS=$save_IFS + +  if test "$found" != yes; then +    lib=$lib.lib +  fi +} + +# func_cl_wrapper cl arg... +# Adjust compile command to suit cl +func_cl_wrapper () +{ +  # Assume a capable shell +  lib_path= +  shared=: +  linker_opts= +  for arg +  do +    if test -n "$eat"; then +      eat= +    else +      case $1 in +	-o) +	  # configure might choose to run compile as 'compile cc -o foo foo.c'. +	  eat=1 +	  case $2 in +	    *.o | *.[oO][bB][jJ]) +	      func_file_conv "$2" +	      set x "$@" -Fo"$file" +	      shift +	      ;; +	    *) +	      func_file_conv "$2" +	      set x "$@" -Fe"$file" +	      shift +	      ;; +	  esac +	  ;; +	-I) +	  eat=1 +	  func_file_conv "$2" mingw +	  set x "$@" -I"$file" +	  shift +	  ;; +	-I*) +	  func_file_conv "${1#-I}" mingw +	  set x "$@" -I"$file" +	  shift +	  ;; +	-l) +	  eat=1 +	  func_cl_dashl "$2" +	  set x "$@" "$lib" +	  shift +	  ;; +	-l*) +	  func_cl_dashl "${1#-l}" +	  set x "$@" "$lib" +	  shift +	  ;; +	-L) +	  eat=1 +	  func_cl_dashL "$2" +	  ;; +	-L*) +	  func_cl_dashL "${1#-L}" +	  ;; +	-static) +	  shared=false +	  ;; +	-Wl,*) +	  arg=${1#-Wl,} +	  save_ifs="$IFS"; IFS=',' +	  for flag in $arg; do +	    IFS="$save_ifs" +	    linker_opts="$linker_opts $flag" +	  done +	  IFS="$save_ifs" +	  ;; +	-Xlinker) +	  eat=1 +	  linker_opts="$linker_opts $2" +	  ;; +	-*) +	  set x "$@" "$1" +	  shift +	  ;; +	*.cc | *.CC | *.cxx | *.CXX | *.[cC]++) +	  func_file_conv "$1" +	  set x "$@" -Tp"$file" +	  shift +	  ;; +	*.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) +	  func_file_conv "$1" mingw +	  set x "$@" "$file" +	  shift +	  ;; +	*) +	  set x "$@" "$1" +	  shift +	  ;; +      esac +    fi +    shift +  done +  if test -n "$linker_opts"; then +    linker_opts="-link$linker_opts" +  fi +  exec "$@" $linker_opts +  exit 1 +} + +eat= +  case $1 in    '') -     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2 +     echo "$0: No command.  Try '$0 --help' for more information." 1>&2       exit 1;       ;;    -h | --h*)      cat <<\EOF  Usage: compile [--help] [--version] PROGRAM [ARGS] -Wrapper for compilers which do not understand `-c -o'. -Remove `-o dest.o' from ARGS, run PROGRAM with the remaining +Wrapper for compilers which do not understand '-c -o'. +Remove '-o dest.o' from ARGS, run PROGRAM with the remaining  arguments, and rename the output as expected.  If you are trying to build a whole package this is not the -right script to run: please start by reading the file `INSTALL'. +right script to run: please start by reading the file 'INSTALL'.  Report bugs to <bug-automake@gnu.org>.  EOF @@ -53,11 +251,13 @@ EOF      echo "compile $scriptversion"      exit $?      ;; +  cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) +    func_cl_wrapper "$@"      # Doesn't return... +    ;;  esac  ofile=  cfile= -eat=  for arg  do @@ -66,8 +266,8 @@ do    else      case $1 in        -o) -	# configure might choose to run compile as `compile cc -o foo foo.c'. -	# So we strip `-o arg' only if arg is an object. +	# configure might choose to run compile as 'compile cc -o foo foo.c'. +	# So we strip '-o arg' only if arg is an object.  	eat=1  	case $2 in  	  *.o | *.obj) @@ -94,10 +294,10 @@ do  done  if test -z "$ofile" || test -z "$cfile"; then -  # If no `-o' option was seen then we might have been invoked from a +  # If no '-o' option was seen then we might have been invoked from a    # pattern rule where we don't need one.  That is ok -- this is a    # normal compilation that the losing compiler can handle.  If no -  # `.c' file was seen then we are probably linking.  That is also +  # '.c' file was seen then we are probably linking.  That is also    # ok.    exec "$@"  fi @@ -106,7 +306,7 @@ fi  cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`  # Create the lock directory. -# Note: use `[/\\:.-]' here to ensure that we don't use the same name +# Note: use '[/\\:.-]' here to ensure that we don't use the same name  # that we are using for the .o file.  Also, base the name on the expected  # object file name, since that is what matters with a parallel build.  lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d diff --git a/build-aux/depcomp b/build-aux/depcomp index df8eea7..25a39e6 100755 --- a/build-aux/depcomp +++ b/build-aux/depcomp @@ -1,10 +1,10 @@  #! /bin/sh  # depcomp - compile a program generating dependencies as side-effects -scriptversion=2009-04-28.21; # UTC +scriptversion=2012-03-27.16; # UTC -# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free -# Software Foundation, Inc. +# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010, +# 2011, 2012 Free Software Foundation, Inc.  # This program is free software; you can redistribute it and/or modify  # it under the terms of the GNU General Public License as published by @@ -28,7 +28,7 @@ scriptversion=2009-04-28.21; # UTC  case $1 in    '') -     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2 +     echo "$0: No command.  Try '$0 --help' for more information." 1>&2       exit 1;       ;;    -h | --h*) @@ -40,11 +40,11 @@ as side-effects.  Environment variables:    depmode     Dependency tracking mode. -  source      Source file read by `PROGRAMS ARGS'. -  object      Object file output by `PROGRAMS ARGS'. +  source      Source file read by 'PROGRAMS ARGS'. +  object      Object file output by 'PROGRAMS ARGS'.    DEPDIR      directory where to store dependencies.    depfile     Dependency file to output. -  tmpdepfile  Temporary file to use when outputing dependencies. +  tmpdepfile  Temporary file to use when outputting dependencies.    libtool     Whether libtool is used (yes/no).  Report bugs to <bug-automake@gnu.org>. @@ -57,6 +57,12 @@ EOF      ;;  esac +# A tabulation character. +tab='	' +# A newline character. +nl=' +' +  if test -z "$depmode" || test -z "$source" || test -z "$object"; then    echo "depcomp: Variables source, object and depmode must be set" 1>&2    exit 1 @@ -90,10 +96,24 @@ if test "$depmode" = msvcmsys; then     # This is just like msvisualcpp but w/o cygpath translation.     # Just convert the backslash-escaped backslashes to single forward     # slashes to satisfy depend.m4 -   cygpath_u="sed s,\\\\\\\\,/,g" +   cygpath_u='sed s,\\\\,/,g'     depmode=msvisualcpp  fi +if test "$depmode" = msvc7msys; then +   # This is just like msvc7 but w/o cygpath translation. +   # Just convert the backslash-escaped backslashes to single forward +   # slashes to satisfy depend.m4 +   cygpath_u='sed s,\\\\,/,g' +   depmode=msvc7 +fi + +if test "$depmode" = xlc; then +   # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency informations. +   gccflag=-qmakedep=gcc,-MF +   depmode=gcc +fi +  case "$depmode" in  gcc3)  ## gcc 3 implements dependency tracking that does exactly what @@ -148,20 +168,21 @@ gcc)  ## The second -e expression handles DOS-style file names with drive letters.    sed -e 's/^[^:]*: / /' \        -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" -## This next piece of magic avoids the `deleted header file' problem. +## This next piece of magic avoids the "deleted header file" problem.  ## The problem is that when a header file which appears in a .P file  ## is deleted, the dependency causes make to die (because there is  ## typically no way to rebuild the header).  We avoid this by adding  ## dummy dependencies for each header file.  Too bad gcc doesn't do  ## this for us directly. -  tr ' ' ' -' < "$tmpdepfile" | -## Some versions of gcc put a space before the `:'.  On the theory +  tr ' ' "$nl" < "$tmpdepfile" | +## Some versions of gcc put a space before the ':'.  On the theory  ## that the space means something, we add a space to the output as -## well. +## well.  hp depmode also adds that space, but also prefixes the VPATH +## to the object.  Take care to not repeat it in the output.  ## Some versions of the HPUX 10.20 sed can't process this invocation  ## correctly.  Breaking it into two sed invocations is a workaround. -    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" +    sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ +      | sed -e 's/$/ :/' >> "$depfile"    rm -f "$tmpdepfile"    ;; @@ -193,18 +214,15 @@ sgi)      # clever and replace this with sed code, as IRIX sed won't handle      # lines with more than a fixed number of characters (4096 in      # IRIX 6.2 sed, 8192 in IRIX 6.5).  We also remove comment lines; -    # the IRIX cc adds comments like `#:fec' to the end of the +    # the IRIX cc adds comments like '#:fec' to the end of the      # dependency line. -    tr ' ' ' -' < "$tmpdepfile" \ +    tr ' ' "$nl" < "$tmpdepfile" \      | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ -    tr ' -' ' ' >> "$depfile" +    tr "$nl" ' ' >> "$depfile"      echo >> "$depfile"      # The second pass generates a dummy entry for each header file. -    tr ' ' ' -' < "$tmpdepfile" \ +    tr ' ' "$nl" < "$tmpdepfile" \     | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \     >> "$depfile"    else @@ -216,10 +234,17 @@ sgi)    rm -f "$tmpdepfile"    ;; +xlc) +  # This case exists only to let depend.m4 do its work.  It works by +  # looking at the text of this script.  This case will never be run, +  # since it is checked for above. +  exit 1 +  ;; +  aix)    # The C for AIX Compiler uses -M and outputs the dependencies    # in a .u file.  In older versions, this file always lives in the -  # current directory.  Also, the AIX compiler puts `$object:' at the +  # current directory.  Also, the AIX compiler puts '$object:' at the    # start of each line; $object doesn't have directory information.    # Version 6 uses the directory in both cases.    dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` @@ -249,12 +274,11 @@ aix)      test -f "$tmpdepfile" && break    done    if test -f "$tmpdepfile"; then -    # Each line is of the form `foo.o: dependent.h'. +    # Each line is of the form 'foo.o: dependent.h'.      # Do two passes, one to just change these to -    # `$object: dependent.h' and one to simply `dependent.h:'. +    # '$object: dependent.h' and one to simply 'dependent.h:'.      sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" -    # That's a tab and a space in the []. -    sed -e 's,^.*\.[a-z]*:[	 ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" +    sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"    else      # The sourcefile does not contain any dependencies, so just      # store a dummy comment line, to avoid errors with the Makefile @@ -265,23 +289,26 @@ aix)    ;;  icc) -  # Intel's C compiler understands `-MD -MF file'.  However on -  #    icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c +  # Intel's C compiler anf tcc (Tiny C Compiler) understand '-MD -MF file'. +  # However on +  #    $CC -MD -MF foo.d -c -o sub/foo.o sub/foo.c    # ICC 7.0 will fill foo.d with something like    #    foo.o: sub/foo.c    #    foo.o: sub/foo.h -  # which is wrong.  We want: +  # which is wrong.  We want    #    sub/foo.o: sub/foo.c    #    sub/foo.o: sub/foo.h    #    sub/foo.c:    #    sub/foo.h:    # ICC 7.1 will output    #    foo.o: sub/foo.c sub/foo.h -  # and will wrap long lines using \ : +  # and will wrap long lines using '\':    #    foo.o: sub/foo.c ... \    #     sub/foo.h ... \    #     ... - +  # tcc 0.9.26 (FIXME still under development at the moment of writing) +  # will emit a similar output, but also prepend the continuation lines +  # with horizontal tabulation characters.    "$@" -MD -MF "$tmpdepfile"    stat=$?    if test $stat -eq 0; then : @@ -290,15 +317,21 @@ icc)      exit $stat    fi    rm -f "$depfile" -  # Each line is of the form `foo.o: dependent.h', -  # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. +  # Each line is of the form 'foo.o: dependent.h', +  # or 'foo.o: dep1.h dep2.h \', or ' dep3.h dep4.h \'.    # Do two passes, one to just change these to -  # `$object: dependent.h' and one to simply `dependent.h:'. -  sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" -  # Some versions of the HPUX 10.20 sed can't process this invocation -  # correctly.  Breaking it into two sed invocations is a workaround. -  sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | -    sed -e 's/$/ :/' >> "$depfile" +  # '$object: dependent.h' and one to simply 'dependent.h:'. +  sed -e "s/^[ $tab][ $tab]*/  /" -e "s,^[^:]*:,$object :," \ +    < "$tmpdepfile" > "$depfile" +  sed ' +    s/[ '"$tab"'][ '"$tab"']*/ /g +    s/^ *// +    s/ *\\*$// +    s/^[^:]*: *// +    /^$/d +    /:$/d +    s/$/ :/ +  ' < "$tmpdepfile" >> "$depfile"    rm -f "$tmpdepfile"    ;; @@ -334,7 +367,7 @@ hp2)    done    if test -f "$tmpdepfile"; then      sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" -    # Add `dependent.h:' lines. +    # Add 'dependent.h:' lines.      sed -ne '2,${  	       s/^ *//  	       s/ \\*$// @@ -349,9 +382,9 @@ hp2)  tru64)     # The Tru64 compiler uses -MD to generate dependencies as a side -   # effect.  `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. +   # effect.  'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.     # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put -   # dependencies in `foo.d' instead, so we check for that too. +   # dependencies in 'foo.d' instead, so we check for that too.     # Subdirectories are respected.     dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`     test "x$dir" = "x$object" && dir= @@ -397,14 +430,59 @@ tru64)     done     if test -f "$tmpdepfile"; then        sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" -      # That's a tab and a space in the []. -      sed -e 's,^.*\.[a-z]*:[	 ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" +      sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"     else        echo "#dummy" > "$depfile"     fi     rm -f "$tmpdepfile"     ;; +msvc7) +  if test "$libtool" = yes; then +    showIncludes=-Wc,-showIncludes +  else +    showIncludes=-showIncludes +  fi +  "$@" $showIncludes > "$tmpdepfile" +  stat=$? +  grep -v '^Note: including file: ' "$tmpdepfile" +  if test "$stat" = 0; then : +  else +    rm -f "$tmpdepfile" +    exit $stat +  fi +  rm -f "$depfile" +  echo "$object : \\" > "$depfile" +  # The first sed program below extracts the file names and escapes +  # backslashes for cygpath.  The second sed program outputs the file +  # name when reading, but also accumulates all include files in the +  # hold buffer in order to output them again at the end.  This only +  # works with sed implementations that can handle large buffers. +  sed < "$tmpdepfile" -n ' +/^Note: including file:  *\(.*\)/ { +  s//\1/ +  s/\\/\\\\/g +  p +}' | $cygpath_u | sort -u | sed -n ' +s/ /\\ /g +s/\(.*\)/'"$tab"'\1 \\/p +s/.\(.*\) \\/\1:/ +H +$ { +  s/.*/'"$tab"'/ +  G +  p +}' >> "$depfile" +  rm -f "$tmpdepfile" +  ;; + +msvc7msys) +  # This case exists only to let depend.m4 do its work.  It works by +  # looking at the text of this script.  This case will never be run, +  # since it is checked for above. +  exit 1 +  ;; +  #nosideeffect)    # This comment above is used by automake to tell side-effect    # dependency tracking mechanisms from slower ones. @@ -422,7 +500,7 @@ dashmstdout)      shift    fi -  # Remove `-o $object'. +  # Remove '-o $object'.    IFS=" "    for arg    do @@ -442,15 +520,14 @@ dashmstdout)    done    test -z "$dashmflag" && dashmflag=-M -  # Require at least two characters before searching for `:' +  # Require at least two characters before searching for ':'    # in the target name.  This is to cope with DOS-style filenames: -  # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. +  # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.    "$@" $dashmflag | -    sed 's:^[  ]*[^: ][^:][^:]*\:[    ]*:'"$object"'\: :' > "$tmpdepfile" +    sed 's:^['"$tab"' ]*[^:'"$tab"' ][^:][^:]*\:['"$tab"' ]*:'"$object"'\: :' > "$tmpdepfile"    rm -f "$depfile"    cat < "$tmpdepfile" > "$depfile" -  tr ' ' ' -' < "$tmpdepfile" | \ +  tr ' ' "$nl" < "$tmpdepfile" | \  ## Some versions of the HPUX 10.20 sed can't process this invocation  ## correctly.  Breaking it into two sed invocations is a workaround.      sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" @@ -503,9 +580,10 @@ makedepend)    touch "$tmpdepfile"    ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"    rm -f "$depfile" -  cat < "$tmpdepfile" > "$depfile" -  sed '1,2d' "$tmpdepfile" | tr ' ' ' -' | \ +  # makedepend may prepend the VPATH from the source file name to the object. +  # No need to regex-escape $object, excess matching of '.' is harmless. +  sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" +  sed '1,2d' "$tmpdepfile" | tr ' ' "$nl" | \  ## Some versions of the HPUX 10.20 sed can't process this invocation  ## correctly.  Breaking it into two sed invocations is a workaround.      sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" @@ -525,7 +603,7 @@ cpp)      shift    fi -  # Remove `-o $object'. +  # Remove '-o $object'.    IFS=" "    for arg    do @@ -594,8 +672,8 @@ msvisualcpp)    sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"    rm -f "$depfile"    echo "$object : \\" > "$depfile" -  sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::	\1 \\:p' >> "$depfile" -  echo "	" >> "$depfile" +  sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" +  echo "$tab" >> "$depfile"    sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"    rm -f "$tmpdepfile"    ;; diff --git a/build-aux/install-sh b/build-aux/install-sh index 6781b98..a9244eb 100755 --- a/build-aux/install-sh +++ b/build-aux/install-sh @@ -1,7 +1,7 @@  #!/bin/sh  # install - install a program, script, or datafile -scriptversion=2009-04-28.21; # UTC +scriptversion=2011-01-19.21; # UTC  # This originates from X11R5 (mit/util/scripts/install.sh), which was  # later released in X11R6 (xc/config/util/install.sh) with the @@ -156,6 +156,10 @@ while test $# -ne 0; do      -s) stripcmd=$stripprog;;      -t) dst_arg=$2 +	# Protect names problematic for `test' and other utilities. +	case $dst_arg in +	  -* | [=\(\)!]) dst_arg=./$dst_arg;; +	esac  	shift;;      -T) no_target_directory=true;; @@ -186,6 +190,10 @@ if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then      fi      shift # arg      dst_arg=$arg +    # Protect names problematic for `test' and other utilities. +    case $dst_arg in +      -* | [=\(\)!]) dst_arg=./$dst_arg;; +    esac    done  fi @@ -200,7 +208,11 @@ if test $# -eq 0; then  fi  if test -z "$dir_arg"; then -  trap '(exit $?); exit' 1 2 13 15 +  do_exit='(exit $ret); exit $ret' +  trap "ret=129; $do_exit" 1 +  trap "ret=130; $do_exit" 2 +  trap "ret=141; $do_exit" 13 +  trap "ret=143; $do_exit" 15    # Set umask so as not to create temps with too-generous modes.    # However, 'strip' requires both read and write access to temps. @@ -228,9 +240,9 @@ fi  for src  do -  # Protect names starting with `-'. +  # Protect names problematic for `test' and other utilities.    case $src in -    -*) src=./$src;; +    -* | [=\(\)!]) src=./$src;;    esac    if test -n "$dir_arg"; then @@ -252,12 +264,7 @@ do        echo "$0: no destination specified." >&2        exit 1      fi -      dst=$dst_arg -    # Protect names starting with `-'. -    case $dst in -      -*) dst=./$dst;; -    esac      # If destination is a directory, append the input filename; won't work      # if double slashes aren't ignored. @@ -385,7 +392,7 @@ do        case $dstdir in  	/*) prefix='/';; -	-*) prefix='./';; +	[-=\(\)!]*) prefix='./';;  	*)  prefix='';;        esac @@ -403,7 +410,7 @@ do        for d        do -	test -z "$d" && continue +	test X"$d" = X && continue  	prefix=$prefix$d  	if test -d "$prefix"; then diff --git a/build-aux/missing b/build-aux/missing index 28055d2..86a8fc3 100755 --- a/build-aux/missing +++ b/build-aux/missing @@ -1,10 +1,10 @@  #! /bin/sh  # Common stub for a few missing GNU programs while installing. -scriptversion=2009-04-28.21; # UTC +scriptversion=2012-01-06.13; # UTC  # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, -# 2008, 2009 Free Software Foundation, Inc. +# 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.  # Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.  # This program is free software; you can redistribute it and/or modify @@ -84,7 +84,6 @@ Supported PROGRAM values:    help2man     touch the output file    lex          create \`lex.yy.c', if possible, from existing .c    makeinfo     touch the output file -  tar          try tar, gnutar, gtar, then tar without non-portable flags    yacc         create \`y.tab.[ch]', if possible, from existing .[ch]  Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and @@ -122,15 +121,6 @@ case $1 in      # Not GNU programs, they don't have --version.      ;; -  tar*) -    if test -n "$run"; then -       echo 1>&2 "ERROR: \`tar' requires --run" -       exit 1 -    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then -       exit 1 -    fi -    ;; -    *)      if test -z "$run" && ($1 --version) > /dev/null 2>&1; then         # We have it, but it failed. @@ -226,7 +216,7 @@ WARNING: \`$1' $msg.  You should only need it if           \`Bison' from any GNU archive site."      rm -f y.tab.c y.tab.h      if test $# -ne 1; then -        eval LASTARG="\${$#}" +        eval LASTARG=\${$#}  	case $LASTARG in  	*.y)  	    SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` @@ -256,7 +246,7 @@ WARNING: \`$1' is $msg.  You should only need it if           \`Flex' from any GNU archive site."      rm -f lex.yy.c      if test $# -ne 1; then -        eval LASTARG="\${$#}" +        eval LASTARG=\${$#}  	case $LASTARG in  	*.l)  	    SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` @@ -318,41 +308,6 @@ WARNING: \`$1' is $msg.  You should only need it if      touch $file      ;; -  tar*) -    shift - -    # We have already tried tar in the generic part. -    # Look for gnutar/gtar before invocation to avoid ugly error -    # messages. -    if (gnutar --version > /dev/null 2>&1); then -       gnutar "$@" && exit 0 -    fi -    if (gtar --version > /dev/null 2>&1); then -       gtar "$@" && exit 0 -    fi -    firstarg="$1" -    if shift; then -	case $firstarg in -	*o*) -	    firstarg=`echo "$firstarg" | sed s/o//` -	    tar "$firstarg" "$@" && exit 0 -	    ;; -	esac -	case $firstarg in -	*h*) -	    firstarg=`echo "$firstarg" | sed s/h//` -	    tar "$firstarg" "$@" && exit 0 -	    ;; -	esac -    fi - -    echo 1>&2 "\ -WARNING: I can't seem to be able to run \`tar' with the given arguments. -         You may want to install GNU tar or Free paxutils, or check the -         command line arguments." -    exit 1 -    ;; -    *)      echo 1>&2 "\  WARNING: \`$1' is needed, and is $msg. | 
