New version

(Old svn revision: 334)
master
Bernhard Walle 2005-01-13 20:40:53 +00:00
parent b4b3107762
commit 3b31a7653b
9 changed files with 2734 additions and 2232 deletions

2779
aclocal.m4 vendored

File diff suppressed because it is too large Load Diff

145
compile
View File

@ -1,8 +1,9 @@
#! /bin/sh #! /bin/sh
# Wrapper for compilers which do not understand `-c -o'. # Wrapper for compilers which do not understand `-c -o'.
# Copyright 1999, 2000 Free Software Foundation, Inc. scriptversion=2004-10-12.08
# Copyright (C) 1999, 2000, 2003, 2004 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>. # Written by Tom Tromey <tromey@cygnus.com>.
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
@ -24,76 +25,118 @@
# configuration script generated by Autoconf, you may include it under # configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program. # the same distribution terms that you use for the rest of that program.
# Usage: # This file is maintained in Automake, please report
# compile PROGRAM [ARGS]... # bugs to <bug-automake@gnu.org> or send patches to
# `-o FOO.o' is removed from the args passed to the actual compile. # <automake-patches@gnu.org>.
prog=$1 case $1 in
shift '')
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
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'.
Report bugs to <bug-automake@gnu.org>.
EOF
exit 0
;;
-v | --v*)
echo "compile $scriptversion"
exit 0
;;
esac
ofile= ofile=
cfile= cfile=
args= eat=
while test $# -gt 0; do
case "$1" in for arg
-o) do
# configure might choose to run compile as `compile cc -o foo foo.c'. if test -n "$eat"; then
# So we do something ugly here. eat=
ofile=$2 else
shift case $1 in
case "$ofile" in -o)
*.o | *.obj) # 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
args="$args -o $ofile" case $2 in
ofile= *.o | *.obj)
;; ofile=$2
esac ;;
;; *)
*.c) set x "$@" -o "$2"
cfile=$1 shift
args="$args $1" ;;
;; esac
*) ;;
args="$args $1" *.c)
;; cfile=$1
esac set x "$@" "$1"
shift shift
;;
*)
set x "$@" "$1"
shift
;;
esac
fi
shift
done done
if test -z "$ofile" || test -z "$cfile"; then 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 # pattern rule where we don't need one. That is ok -- this is a
# normal compilation that the losing compiler can handle. If no # 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. # ok.
exec "$prog" $args exec "$@"
fi fi
# Name of file we expect compiler to create. # Name of file we expect compiler to create.
cofile=`echo $cfile | sed -e 's|^.*/||' -e 's/\.c$/.o/'` cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
# Create the lock directory. # 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 # 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. # object file name, since that is what matters with a parallel build.
lockdir=`echo $cofile | sed -e 's|[/.-]|_|g'`.d lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d
while true; do while true; do
if mkdir $lockdir > /dev/null 2>&1; then if mkdir "$lockdir" >/dev/null 2>&1; then
break break
fi fi
sleep 1 sleep 1
done done
# FIXME: race condition here if user kills between mkdir and trap. # FIXME: race condition here if user kills between mkdir and trap.
trap "rmdir $lockdir; exit 1" 1 2 15 trap "rmdir '$lockdir'; exit 1" 1 2 15
# Run the compile. # Run the compile.
"$prog" $args "$@"
status=$? ret=$?
if test -f "$cofile"; then if test -f "$cofile"; then
mv "$cofile" "$ofile" mv "$cofile" "$ofile"
elif test -f "${cofile}bj"; then
mv "${cofile}bj" "$ofile"
fi fi
rmdir $lockdir rmdir "$lockdir"
exit $status exit $ret
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:

125
config.guess vendored
View File

@ -1,9 +1,9 @@
#! /bin/sh #! /bin/sh
# Attempt to guess a canonical system name. # Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. # 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
timestamp='2003-07-02' timestamp='2004-10-25'
# This file is free software; you can redistribute it and/or modify it # This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by # under the terms of the GNU General Public License as published by
@ -53,7 +53,7 @@ version="\
GNU config.guess ($timestamp) GNU config.guess ($timestamp)
Originally written by Per Bothner. Originally written by Per Bothner.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc. Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO This is free software; see the source for copying conditions. There is NO
@ -207,15 +207,21 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
echo "${machine}-${os}${release}" echo "${machine}-${os}${release}"
exit 0 ;; exit 0 ;;
amd64:OpenBSD:*:*)
echo x86_64-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
amiga:OpenBSD:*:*) amiga:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE} echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;; exit 0 ;;
arc:OpenBSD:*:*) cats:OpenBSD:*:*)
echo mipsel-unknown-openbsd${UNAME_RELEASE} echo arm-unknown-openbsd${UNAME_RELEASE}
exit 0 ;; exit 0 ;;
hp300:OpenBSD:*:*) hp300:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE} echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;; exit 0 ;;
luna88k:OpenBSD:*:*)
echo m88k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
mac68k:OpenBSD:*:*) mac68k:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE} echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;; exit 0 ;;
@ -231,25 +237,33 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
mvmeppc:OpenBSD:*:*) mvmeppc:OpenBSD:*:*)
echo powerpc-unknown-openbsd${UNAME_RELEASE} echo powerpc-unknown-openbsd${UNAME_RELEASE}
exit 0 ;; exit 0 ;;
pmax:OpenBSD:*:*)
echo mipsel-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
sgi:OpenBSD:*:*) sgi:OpenBSD:*:*)
echo mipseb-unknown-openbsd${UNAME_RELEASE} echo mips64-unknown-openbsd${UNAME_RELEASE}
exit 0 ;; exit 0 ;;
sun3:OpenBSD:*:*) sun3:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE} echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;; exit 0 ;;
wgrisc:OpenBSD:*:*)
echo mipsel-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
*:OpenBSD:*:*) *:OpenBSD:*:*)
echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
exit 0 ;; exit 0 ;;
*:ekkoBSD:*:*)
echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
exit 0 ;;
macppc:MirBSD:*:*)
echo powerppc-unknown-mirbsd${UNAME_RELEASE}
exit 0 ;;
*:MirBSD:*:*)
echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
exit 0 ;;
alpha:OSF1:*:*) alpha:OSF1:*:*)
if test $UNAME_RELEASE = "V4.0"; then case $UNAME_RELEASE in
*4.0)
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
fi ;;
*5.*)
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
;;
esac
# According to Compaq, /usr/sbin/psrinfo has been available on # According to Compaq, /usr/sbin/psrinfo has been available on
# OSF/1 and Tru64 systems produced since 1995. I hope that # OSF/1 and Tru64 systems produced since 1995. I hope that
# covers most systems running today. This code pipes the CPU # covers most systems running today. This code pipes the CPU
@ -287,14 +301,12 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
"EV7.9 (21364A)") "EV7.9 (21364A)")
UNAME_MACHINE="alphaev79" ;; UNAME_MACHINE="alphaev79" ;;
esac esac
# A Pn.n version is a patched version.
# A Vn.n version is a released version. # A Vn.n version is a released version.
# A Tn.n version is a released field test version. # A Tn.n version is a released field test version.
# A Xn.n version is an unreleased experimental baselevel. # A Xn.n version is an unreleased experimental baselevel.
# 1.2 uses "1.2" for uname -r. # 1.2 uses "1.2" for uname -r.
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
exit 0 ;;
Alpha*:OpenVMS:*:*)
echo alpha-hp-vms
exit 0 ;; exit 0 ;;
Alpha\ *:Windows_NT*:*) Alpha\ *:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem? # How do we know it's Interix rather than the generic POSIX subsystem?
@ -317,6 +329,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*:OS/390:*:*) *:OS/390:*:*)
echo i370-ibm-openedition echo i370-ibm-openedition
exit 0 ;; exit 0 ;;
*:OS400:*:*)
echo powerpc-ibm-os400
exit 0 ;;
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
echo arm-acorn-riscix${UNAME_RELEASE} echo arm-acorn-riscix${UNAME_RELEASE}
exit 0;; exit 0;;
@ -337,7 +352,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
DRS?6000:unix:4.0:6*) DRS?6000:unix:4.0:6*)
echo sparc-icl-nx6 echo sparc-icl-nx6
exit 0 ;; exit 0 ;;
DRS?6000:UNIX_SV:4.2*:7*) DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
case `/usr/bin/uname -p` in case `/usr/bin/uname -p` in
sparc) echo sparc-icl-nx7 && exit 0 ;; sparc) echo sparc-icl-nx7 && exit 0 ;;
esac ;; esac ;;
@ -409,6 +424,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
echo m68k-unknown-mint${UNAME_RELEASE} echo m68k-unknown-mint${UNAME_RELEASE}
exit 0 ;; exit 0 ;;
m68k:machten:*:*)
echo m68k-apple-machten${UNAME_RELEASE}
exit 0 ;;
powerpc:machten:*:*) powerpc:machten:*:*)
echo powerpc-apple-machten${UNAME_RELEASE} echo powerpc-apple-machten${UNAME_RELEASE}
exit 0 ;; exit 0 ;;
@ -744,7 +762,7 @@ EOF
echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;; exit 0 ;;
*:UNICOS/mp:*:*) *:UNICOS/mp:*:*)
echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;; exit 0 ;;
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
@ -752,6 +770,11 @@ EOF
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit 0 ;; exit 0 ;;
5000:UNIX_System_V:4.*:*)
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit 0 ;;
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
exit 0 ;; exit 0 ;;
@ -761,22 +784,8 @@ EOF
*:BSD/OS:*:*) *:BSD/OS:*:*)
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
exit 0 ;; exit 0 ;;
*:FreeBSD:*:*|*:GNU/FreeBSD:*:*) *:FreeBSD:*:*)
# Determine whether the default compiler uses glibc. echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#include <features.h>
#if __GLIBC__ >= 2
LIBC=gnu
#else
LIBC=
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
# GNU/FreeBSD systems have a "k" prefix to indicate we are using
# FreeBSD's kernel, but not the complete OS.
case ${LIBC} in gnu) kernel_only='k' ;; esac
echo ${UNAME_MACHINE}-unknown-${kernel_only}freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
exit 0 ;; exit 0 ;;
i*:CYGWIN*:*) i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin echo ${UNAME_MACHINE}-pc-cygwin
@ -809,8 +818,13 @@ EOF
echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit 0 ;; exit 0 ;;
*:GNU:*:*) *:GNU:*:*)
# the GNU system
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
exit 0 ;; exit 0 ;;
*:GNU/*:*:*)
# other systems with GNU libc and userland
echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
exit 0 ;;
i*86:Minix:*:*) i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix echo ${UNAME_MACHINE}-pc-minix
exit 0 ;; exit 0 ;;
@ -820,9 +834,18 @@ EOF
cris:Linux:*:*) cris:Linux:*:*)
echo cris-axis-linux echo cris-axis-linux
exit 0 ;; exit 0 ;;
crisv32:Linux:*:*)
echo crisv32-axis-linux
exit 0 ;;
frv:Linux:*:*)
echo frv-${VENDOR}-linux
exit 0 ;;
ia64:Linux:*:*) ia64:Linux:*:*)
echo ${UNAME_MACHINE}-${VENDOR}-linux echo ${UNAME_MACHINE}-${VENDOR}-linux
exit 0 ;; exit 0 ;;
m32r*:Linux:*:*)
echo ${UNAME_MACHINE}-${VENDOR}-linux
exit 0 ;;
m68*:Linux:*:*) m68*:Linux:*:*)
echo ${UNAME_MACHINE}-${VENDOR}-linux echo ${UNAME_MACHINE}-${VENDOR}-linux
exit 0 ;; exit 0 ;;
@ -958,6 +981,9 @@ EOF
LIBC=gnuaout LIBC=gnuaout
#endif #endif
#endif #endif
#ifdef __dietlibc__
LIBC=dietlibc
#endif
EOF EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
test x"${LIBC}" != x && echo "${UNAME_MACHINE}-${VENDOR}-linux-${LIBC}" | sed 's/linux-gnu/linux/' && exit 0 test x"${LIBC}" != x && echo "${UNAME_MACHINE}-${VENDOR}-linux-${LIBC}" | sed 's/linux-gnu/linux/' && exit 0
@ -988,6 +1014,9 @@ EOF
i*86:atheos:*:*) i*86:atheos:*:*)
echo ${UNAME_MACHINE}-unknown-atheos echo ${UNAME_MACHINE}-unknown-atheos
exit 0 ;; exit 0 ;;
i*86:syllable:*:*)
echo ${UNAME_MACHINE}-pc-syllable
exit 0 ;;
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
echo i386-unknown-lynxos${UNAME_RELEASE} echo i386-unknown-lynxos${UNAME_RELEASE}
exit 0 ;; exit 0 ;;
@ -1057,9 +1086,9 @@ EOF
M680?0:D-NIX:5.3:*) M680?0:D-NIX:5.3:*)
echo m68k-diab-dnix echo m68k-diab-dnix
exit 0 ;; exit 0 ;;
M68*:*:R3V[567]*:*) M68*:*:R3V[5678]*:*)
test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0) 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
OS_REL='' OS_REL=''
test -r /etc/.relid \ test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
@ -1157,9 +1186,10 @@ EOF
echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
exit 0 ;; exit 0 ;;
*:Darwin:*:*) *:Darwin:*:*)
case `uname -p` in UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
case $UNAME_PROCESSOR in
*86) UNAME_PROCESSOR=i686 ;; *86) UNAME_PROCESSOR=i686 ;;
powerpc) UNAME_PROCESSOR=powerpc ;; unknown) UNAME_PROCESSOR=powerpc ;;
esac esac
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
exit 0 ;; exit 0 ;;
@ -1174,7 +1204,7 @@ EOF
*:QNX:*:4*) *:QNX:*:4*)
echo i386-pc-qnx echo i386-pc-qnx
exit 0 ;; exit 0 ;;
NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*) NSR-?:NONSTOP_KERNEL:*:*)
echo nsr-tandem-nsk${UNAME_RELEASE} echo nsr-tandem-nsk${UNAME_RELEASE}
exit 0 ;; exit 0 ;;
*:NonStop-UX:*:*) *:NonStop-UX:*:*)
@ -1218,6 +1248,19 @@ EOF
SEI:*:*:SEIUX) SEI:*:*:SEIUX)
echo mips-sei-seiux${UNAME_RELEASE} echo mips-sei-seiux${UNAME_RELEASE}
exit 0 ;; exit 0 ;;
*:DragonFly:*:*)
echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
exit 0 ;;
*:*VMS:*:*)
UNAME_MACHINE=`(uname -p) 2>/dev/null`
case "${UNAME_MACHINE}" in
A*) echo alpha-dec-vms && exit 0 ;;
I*) echo ia64-dec-vms && exit 0 ;;
V*) echo vax-dec-vms && exit 0 ;;
esac ;;
*:XENIX:*:SysV)
echo i386-pc-xenix
exit 0 ;;
esac esac
#echo '(No uname command or uname output not recognized.)' 1>&2 #echo '(No uname command or uname output not recognized.)' 1>&2

103
config.sub vendored
View File

@ -1,9 +1,9 @@
#! /bin/sh #! /bin/sh
# Configuration validation subroutine script. # Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. # 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
timestamp='2003-07-04' timestamp='2004-08-29'
# This file is (in principle) common to ALL GNU software. # This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software # The presence of a machine in this file suggests that SOME GNU software
@ -70,7 +70,7 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\ version="\
GNU config.sub ($timestamp) GNU config.sub ($timestamp)
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc. Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO This is free software; see the source for copying conditions. There is NO
@ -118,7 +118,8 @@ esac
# Here we must recognize all the valid KERNEL-OS combinations. # Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in case $maybe_os in
nto-qnx* | linux-gnu* | kfreebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;; ;;
@ -144,7 +145,7 @@ case $os in
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-apple | -axis) -apple | -axis | -knuth | -cray)
os= os=
basic_machine=$1 basic_machine=$1
;; ;;
@ -228,14 +229,15 @@ case $basic_machine in
| a29k \ | a29k \
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
| c4x | clipper \ | c4x | clipper \
| d10v | d30v | dlx | dsp16xx \ | d10v | d30v | dlx | dsp16xx \
| fr30 | frv \ | fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| i370 | i860 | i960 | ia64 \ | i370 | i860 | i960 | ia64 \
| ip2k \ | ip2k | iq2000 \
| m32r | m68000 | m68k | m88k | mcore \ | m32r | m32rle | m68000 | m68k | m88k | mcore \
| mips | mipsbe | mipseb | mipsel | mipsle \ | mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \ | mips16 \
| mips64 | mips64el \ | mips64 | mips64el \
@ -247,6 +249,7 @@ case $basic_machine in
| mipsisa32 | mipsisa32el \ | mipsisa32 | mipsisa32el \
| mipsisa32r2 | mipsisa32r2el \ | mipsisa32r2 | mipsisa32r2el \
| mipsisa64 | mipsisa64el \ | mipsisa64 | mipsisa64el \
| mipsisa64r2 | mipsisa64r2el \
| mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sb1 | mipsisa64sb1el \
| mipsisa64sr71k | mipsisa64sr71kel \ | mipsisa64sr71k | mipsisa64sr71kel \
| mipstx39 | mipstx39el \ | mipstx39 | mipstx39el \
@ -259,7 +262,7 @@ case $basic_machine in
| pyramid \ | pyramid \
| sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \ | sh64 | sh64le \
| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \
| strongarm \ | strongarm \
| tahoe | thumb | tic4x | tic80 | tron \ | tahoe | thumb | tic4x | tic80 | tron \
| v850 | v850e \ | v850 | v850e \
@ -297,15 +300,15 @@ case $basic_machine in
| avr-* \ | avr-* \
| bs2000-* \ | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
| clipper-* | cydra-* \ | clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \ | d10v-* | d30v-* | dlx-* \
| elxsi-* \ | elxsi-* \
| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \ | h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| i*86-* | i860-* | i960-* | ia64-* \ | i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* \ | ip2k-* | iq2000-* \
| m32r-* \ | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
| m88110-* | m88k-* | mcore-* \ | m88110-* | m88k-* | mcore-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
@ -319,11 +322,13 @@ case $basic_machine in
| mipsisa32-* | mipsisa32el-* \ | mipsisa32-* | mipsisa32el-* \
| mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa32r2-* | mipsisa32r2el-* \
| mipsisa64-* | mipsisa64el-* \ | mipsisa64-* | mipsisa64el-* \
| mipsisa64r2-* | mipsisa64r2el-* \
| mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \
| mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \
| mipstx39-* | mipstx39el-* \ | mipstx39-* | mipstx39el-* \
| mmix-* \
| msp430-* \ | msp430-* \
| none-* | np1-* | nv1-* | ns16k-* | ns32k-* \ | none-* | np1-* | ns16k-* | ns32k-* \
| orion-* \ | orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
@ -332,7 +337,7 @@ case $basic_machine in
| sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
| sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
| tahoe-* | thumb-* \ | tahoe-* | thumb-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tron-* \ | tron-* \
@ -359,6 +364,9 @@ case $basic_machine in
basic_machine=a29k-amd basic_machine=a29k-amd
os=-udi os=-udi
;; ;;
abacus)
basic_machine=abacus-unknown
;;
adobe68k) adobe68k)
basic_machine=m68010-adobe basic_machine=m68010-adobe
os=-scout os=-scout
@ -376,6 +384,9 @@ case $basic_machine in
amd64) amd64)
basic_machine=x86_64-pc basic_machine=x86_64-pc
;; ;;
amd64-*)
basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
amdahl) amdahl)
basic_machine=580-amdahl basic_machine=580-amdahl
os=-sysv os=-sysv
@ -435,12 +446,27 @@ case $basic_machine in
basic_machine=j90-cray basic_machine=j90-cray
os=-unicos os=-unicos
;; ;;
craynv)
basic_machine=craynv-cray
os=-unicosmp
;;
cr16c)
basic_machine=cr16c-unknown
os=-elf
;;
crds | unos) crds | unos)
basic_machine=m68k-crds basic_machine=m68k-crds
;; ;;
crisv32 | crisv32-* | etraxfs*)
basic_machine=crisv32-axis
;;
cris | cris-* | etrax*) cris | cris-* | etrax*)
basic_machine=cris-axis basic_machine=cris-axis
;; ;;
crx)
basic_machine=crx-unknown
os=-elf
;;
da30 | da30-*) da30 | da30-*)
basic_machine=m68k-da30 basic_machine=m68k-da30
;; ;;
@ -641,10 +667,6 @@ case $basic_machine in
mips3*) mips3*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
;; ;;
mmix*)
basic_machine=mmix-knuth
os=-mmixware
;;
monitor) monitor)
basic_machine=m68k-rom68k basic_machine=m68k-rom68k
os=-coff os=-coff
@ -725,10 +747,6 @@ case $basic_machine in
np1) np1)
basic_machine=np1-gould basic_machine=np1-gould
;; ;;
nv1)
basic_machine=nv1-cray
os=-unicosmp
;;
nsr-tandem) nsr-tandem)
basic_machine=nsr-tandem basic_machine=nsr-tandem
;; ;;
@ -740,6 +758,10 @@ case $basic_machine in
basic_machine=or32-unknown basic_machine=or32-unknown
os=-coff os=-coff
;; ;;
os400)
basic_machine=powerpc-ibm
os=-os400
;;
OSE68000 | ose68000) OSE68000 | ose68000)
basic_machine=m68000-ericsson basic_machine=m68000-ericsson
os=-ose os=-ose
@ -960,6 +982,10 @@ case $basic_machine in
tower | tower-32) tower | tower-32)
basic_machine=m68k-ncr basic_machine=m68k-ncr
;; ;;
tpf)
basic_machine=s390x-ibm
os=-tpf
;;
udi29k) udi29k)
basic_machine=a29k-amd basic_machine=a29k-amd
os=-udi os=-udi
@ -1033,6 +1059,9 @@ case $basic_machine in
romp) romp)
basic_machine=romp-ibm basic_machine=romp-ibm
;; ;;
mmix)
basic_machine=mmix-knuth
;;
rs6000) rs6000)
basic_machine=rs6000-ibm basic_machine=rs6000-ibm
;; ;;
@ -1055,7 +1084,7 @@ case $basic_machine in
sh64) sh64)
basic_machine=sh64-unknown basic_machine=sh64-unknown
;; ;;
sparc | sparcv9 | sparcv9b) sparc | sparcv8 | sparcv9 | sparcv9b)
basic_machine=sparc-sun basic_machine=sparc-sun
;; ;;
cydra) cydra)
@ -1128,19 +1157,20 @@ case $os in
| -aos* \ | -aos* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -netbsd* | -openbsd* | -kfreebsd* | -freebsd* | -riscix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
| -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* \ | -chorusos* | -chorusrdb* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux* | -uxpv* | -beos* | -mpeix* | -udk* \ | -mingw32* | -linux* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei*) | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*)
# Remember, each alternative MUST END IN *, to match a version number. # Remember, each alternative MUST END IN *, to match a version number.
;; ;;
-qnx*) -qnx*)
@ -1164,6 +1194,9 @@ case $os in
-mac*) -mac*)
os=`echo $os | sed -e 's|mac|macos|'` os=`echo $os | sed -e 's|mac|macos|'`
;; ;;
-linux-dietlibc)
os=-linux-dietlibc
;;
-sunos5*) -sunos5*)
os=`echo $os | sed -e 's|sunos5|solaris2|'` os=`echo $os | sed -e 's|sunos5|solaris2|'`
;; ;;
@ -1173,6 +1206,9 @@ case $os in
-opened*) -opened*)
os=-openedition os=-openedition
;; ;;
-os400*)
os=-os400
;;
-wince*) -wince*)
os=-wince os=-wince
;; ;;
@ -1194,6 +1230,9 @@ case $os in
-atheos*) -atheos*)
os=-atheos os=-atheos
;; ;;
-syllable*)
os=-syllable
;;
-386bsd) -386bsd)
os=-bsd os=-bsd
;; ;;
@ -1216,6 +1255,9 @@ case $os in
-sinix*) -sinix*)
os=-sysv4 os=-sysv4
;; ;;
-tpf*)
os=-tpf
;;
-triton*) -triton*)
os=-sysv3 os=-sysv3
;; ;;
@ -1332,6 +1374,9 @@ case $basic_machine in
*-ibm) *-ibm)
os=-aix os=-aix
;; ;;
*-knuth)
os=-mmixware
;;
*-wec) *-wec)
os=-proelf os=-proelf
;; ;;
@ -1464,9 +1509,15 @@ case $basic_machine in
-mvs* | -opened*) -mvs* | -opened*)
vendor=ibm vendor=ibm
;; ;;
-os400*)
vendor=ibm
;;
-ptx*) -ptx*)
vendor=sequent vendor=sequent
;; ;;
-tpf*)
vendor=ibm
;;
-vxsim* | -vxworks* | -windiss*) -vxsim* | -vxworks* | -windiss*)
vendor=wrs vendor=wrs
;; ;;

104
depcomp
View File

@ -1,7 +1,9 @@
#! /bin/sh #! /bin/sh
# depcomp - compile a program generating dependencies as side-effects # depcomp - compile a program generating dependencies as side-effects
# Copyright 1999, 2000 Free Software Foundation, Inc.
scriptversion=2004-05-31.23
# Copyright (C) 1999, 2000, 2003, 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify # 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 # it under the terms of the GNU General Public License as published by
@ -25,22 +27,45 @@
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>. # Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
case $1 in
'')
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
cat <<\EOF
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
Run PROGRAMS ARGS to compile a file, generating dependencies
as side-effects.
Environment variables:
depmode Dependency tracking mode.
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.
libtool Whether libtool is used (yes/no).
Report bugs to <bug-automake@gnu.org>.
EOF
exit 0
;;
-v | --v*)
echo "depcomp $scriptversion"
exit 0
;;
esac
if test -z "$depmode" || test -z "$source" || test -z "$object"; then if test -z "$depmode" || test -z "$source" || test -z "$object"; then
echo "depcomp: Variables source, object and depmode must be set" 1>&2 echo "depcomp: Variables source, object and depmode must be set" 1>&2
exit 1 exit 1
fi fi
# `libtool' can also be set to `yes' or `no'.
if test -z "$depfile"; then
base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'`
dir=`echo "$object" | sed 's,/.*$,/,'`
if test "$dir" = "$object"; then
dir=
fi
# FIXME: should be _deps on DOS.
depfile="$dir.deps/$base"
fi
# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
depfile=${depfile-`echo "$object" |
sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
rm -f "$tmpdepfile" rm -f "$tmpdepfile"
@ -172,19 +197,25 @@ sgi)
aix) aix)
# The C for AIX Compiler uses -M and outputs the dependencies # The C for AIX Compiler uses -M and outputs the dependencies
# in a .u file. This file always lives in the current directory. # in a .u file. In older versions, this file always lives in the
# Also, the AIX compiler puts `$object:' at the start of each line; # current directory. Also, the AIX compiler puts `$object:' at the
# $object doesn't have directory information. # start of each line; $object doesn't have directory information.
stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'` # Version 6 uses the directory in both cases.
stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
tmpdepfile="$stripped.u" tmpdepfile="$stripped.u"
outname="$stripped.o"
if test "$libtool" = yes; then if test "$libtool" = yes; then
"$@" -Wc,-M "$@" -Wc,-M
else else
"$@" -M "$@" -M
fi fi
stat=$? stat=$?
if test -f "$tmpdepfile"; then :
else
stripped=`echo "$stripped" | sed 's,^.*/,,'`
tmpdepfile="$stripped.u"
fi
if test $stat -eq 0; then : if test $stat -eq 0; then :
else else
rm -f "$tmpdepfile" rm -f "$tmpdepfile"
@ -192,6 +223,7 @@ aix)
fi fi
if test -f "$tmpdepfile"; then if test -f "$tmpdepfile"; then
outname="$stripped.o"
# 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 # 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:'.
@ -255,31 +287,40 @@ tru64)
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
if test "$libtool" = yes; then if test "$libtool" = yes; then
# Dependencies are output in .lo.d with libtool 1.4.
# With libtool 1.5 they are output both in $dir.libs/$base.o.d
# and in $dir.libs/$base.o.d and $dir$base.o.d. We process the
# latter, because the former will be cleaned when $dir.libs is
# erased.
tmpdepfile1="$dir.libs/$base.lo.d" tmpdepfile1="$dir.libs/$base.lo.d"
tmpdepfile2="$dir.libs/$base.d" tmpdepfile2="$dir$base.o.d"
tmpdepfile3="$dir.libs/$base.d"
"$@" -Wc,-MD "$@" -Wc,-MD
else else
tmpdepfile1="$dir$base.o.d" tmpdepfile1="$dir$base.o.d"
tmpdepfile2="$dir$base.d" tmpdepfile2="$dir$base.d"
tmpdepfile3="$dir$base.d"
"$@" -MD "$@" -MD
fi fi
stat=$? stat=$?
if test $stat -eq 0; then : if test $stat -eq 0; then :
else else
rm -f "$tmpdepfile1" "$tmpdepfile2" rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
exit $stat exit $stat
fi fi
if test -f "$tmpdepfile1"; then if test -f "$tmpdepfile1"; then
tmpdepfile="$tmpdepfile1" tmpdepfile="$tmpdepfile1"
else elif test -f "$tmpdepfile2"; then
tmpdepfile="$tmpdepfile2" tmpdepfile="$tmpdepfile2"
else
tmpdepfile="$tmpdepfile3"
fi fi
if test -f "$tmpdepfile"; then if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
# That's a space and a tab in the []. # That's a tab and a space in the [].
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
else else
echo "#dummy" > "$depfile" echo "#dummy" > "$depfile"
fi fi
@ -292,7 +333,7 @@ tru64)
dashmstdout) dashmstdout)
# Important note: in order to support this mode, a compiler *must* # Important note: in order to support this mode, a compiler *must*
# always write the proprocessed file to stdout, regardless of -o. # always write the preprocessed file to stdout, regardless of -o.
"$@" || exit $? "$@" || exit $?
# Remove the call to Libtool. # Remove the call to Libtool.
@ -388,7 +429,7 @@ makedepend)
cpp) cpp)
# Important note: in order to support this mode, a compiler *must* # Important note: in order to support this mode, a compiler *must*
# always write the proprocessed file to stdout. # always write the preprocessed file to stdout.
"$@" || exit $? "$@" || exit $?
# Remove the call to Libtool. # Remove the call to Libtool.
@ -430,7 +471,7 @@ cpp)
msvisualcpp) msvisualcpp)
# Important note: in order to support this mode, a compiler *must* # Important note: in order to support this mode, a compiler *must*
# always write the proprocessed file to stdout, regardless of -o, # always write the preprocessed file to stdout, regardless of -o,
# because we must use -o when running libtool. # because we must use -o when running libtool.
"$@" || exit $? "$@" || exit $?
IFS=" " IFS=" "
@ -470,3 +511,12 @@ none)
esac esac
exit 0 exit 0
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:

View File

@ -1,7 +1,8 @@
#!/bin/sh #!/bin/sh
#
# install - install a program, script, or datafile # install - install a program, script, or datafile
#
scriptversion=2004-10-22.00
# This originates from X11R5 (mit/util/scripts/install.sh), which was # This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the # later released in X11R6 (xc/config/util/install.sh) with the
# following copyright and license. # following copyright and license.
@ -41,13 +42,11 @@
# from scratch. It can only install one file at a time, a restriction # from scratch. It can only install one file at a time, a restriction
# shared with many OS's install programs. # shared with many OS's install programs.
# set DOITPROG to echo to test this script # set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it. # Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}" doit="${DOITPROG-}"
# put in absolute paths if you don't have them in your path; or use env. vars. # put in absolute paths if you don't have them in your path; or use env. vars.
mvprog="${MVPROG-mv}" mvprog="${MVPROG-mv}"
@ -59,236 +58,266 @@ stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}" rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}" mkdirprog="${MKDIRPROG-mkdir}"
transformbasename=""
transform_arg=""
instcmd="$mvprog"
chmodcmd="$chmodprog 0755" chmodcmd="$chmodprog 0755"
chowncmd="" chowncmd=
chgrpcmd="" chgrpcmd=
stripcmd="" stripcmd=
rmcmd="$rmprog -f" rmcmd="$rmprog -f"
mvcmd="$mvprog" mvcmd="$mvprog"
src="" src=
dst="" dst=
dir_arg="" dir_arg=
dstarg=
no_target_directory=
while [ x"$1" != x ]; do usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
case $1 in or: $0 [OPTION]... SRCFILES... DIRECTORY
-c) instcmd=$cpprog or: $0 [OPTION]... -t DIRECTORY SRCFILES...
shift or: $0 [OPTION]... -d DIRECTORIES...
continue;;
-d) dir_arg=true In the 1st form, copy SRCFILE to DSTFILE.
shift In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
continue;; In the 4th, create DIRECTORIES.
-m) chmodcmd="$chmodprog $2" Options:
shift -c (ignored)
shift -d create directories instead of installing files.
continue;; -g GROUP $chgrpprog installed files to GROUP.
-m MODE $chmodprog installed files to MODE.
-o USER $chownprog installed files to USER.
-s $stripprog installed files.
-t DIRECTORY install into DIRECTORY.
-T report an error if DSTFILE is a directory.
--help display this help and exit.
--version display version info and exit.
-o) chowncmd="$chownprog $2" Environment variables override the default commands:
shift CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
shift "
continue;;
-g) chgrpcmd="$chgrpprog $2" while test -n "$1"; do
shift case $1 in
shift -c) shift
continue;; continue;;
-s) stripcmd=$stripprog -d) dir_arg=true
shift shift
continue;; continue;;
-t=*) transformarg=`echo $1 | sed 's/-t=//'` -g) chgrpcmd="$chgrpprog $2"
shift shift
continue;; shift
continue;;
-b=*) transformbasename=`echo $1 | sed 's/-b=//'` --help) echo "$usage"; exit 0;;
shift
continue;;
*) if [ x"$src" = x ] -m) chmodcmd="$chmodprog $2"
then shift
src=$1 shift
else continue;;
# this colon is to work around a 386BSD /bin/sh bug
:
dst=$1
fi
shift
continue;;
esac
done
if [ x"$src" = x ] -o) chowncmd="$chownprog $2"
then shift
echo "$0: no input file specified" >&2 shift
exit 1 continue;;
else
:
fi
if [ x"$dir_arg" != x ]; then -s) stripcmd=$stripprog
dst=$src shift
src="" continue;;
if [ -d "$dst" ]; then -t) dstarg=$2
instcmd=:
chmodcmd=""
else
instcmd=$mkdirprog
fi
else
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if [ -f "$src" ] || [ -d "$src" ]
then
:
else
echo "$0: $src does not exist" >&2
exit 1
fi
if [ x"$dst" = x ]
then
echo "$0: no destination specified" >&2
exit 1
else
:
fi
# If destination is a directory, append the input filename; if your system
# does not like double slashes in filenames, you may need to add some logic
if [ -d "$dst" ]
then
dst=$dst/`basename "$src"`
else
:
fi
fi
## this sed command emulates the dirname command
dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
# Make sure that the destination directory exists.
# this part is taken from Noah Friedman's mkinstalldirs script
# Skip lots of stat calls in the usual case.
if [ ! -d "$dstdir" ]; then
defaultIFS='
'
IFS="${IFS-$defaultIFS}"
oIFS=$IFS
# Some sh's can't handle IFS=/ for some reason.
IFS='%'
set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
IFS=$oIFS
pathcomp=''
while [ $# -ne 0 ] ; do
pathcomp=$pathcomp$1
shift shift
shift
continue;;
if [ ! -d "$pathcomp" ] ; -T) no_target_directory=true
then shift
$mkdirprog "$pathcomp" continue;;
else
:
fi
pathcomp=$pathcomp/ --version) echo "$0 $scriptversion"; exit 0;;
*) # When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified.
test -n "$dir_arg$dstarg" && break
# Otherwise, the last argument is the destination. Remove it from $@.
for arg
do
if test -n "$dstarg"; then
# $@ is not empty: it contains at least $arg.
set fnord "$@" "$dstarg"
shift # fnord
fi
shift # arg
dstarg=$arg
done
break;;
esac
done done
if test -z "$1"; then
if test -z "$dir_arg"; then
echo "$0: no input file specified." >&2
exit 1
fi
# It's OK to call `install-sh -d' without argument.
# This can happen when creating conditional directories.
exit 0
fi fi
if [ x"$dir_arg" != x ] for src
then do
$doit $instcmd "$dst" && # Protect names starting with `-'.
case $src in
-*) src=./$src ;;
esac
if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else : ; fi && if test -n "$dir_arg"; then
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else : ; fi && dst=$src
if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else : ; fi && src=
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else : ; fi
else
# If we're going to rename the final executable, determine the name now. if test -d "$dst"; then
mkdircmd=:
chmodcmd=
else
mkdircmd=$mkdirprog
fi
else
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if test ! -f "$src" && test ! -d "$src"; then
echo "$0: $src does not exist." >&2
exit 1
fi
if [ x"$transformarg" = x ] if test -z "$dstarg"; then
then echo "$0: no destination specified." >&2
dstfile=`basename "$dst"` exit 1
else fi
dstfile=`basename "$dst" $transformbasename |
sed $transformarg`$transformbasename
fi
# don't allow the sed command to completely eliminate the filename dst=$dstarg
# Protect names starting with `-'.
case $dst in
-*) dst=./$dst ;;
esac
if [ x"$dstfile" = x ] # If destination is a directory, append the input filename; won't work
then # if double slashes aren't ignored.
dstfile=`basename "$dst"` if test -d "$dst"; then
else if test -n "$no_target_directory"; then
: echo "$0: $dstarg: Is a directory" >&2
fi exit 1
fi
dst=$dst/`basename "$src"`
fi
fi
# Make a couple of temp file names in the proper directory. # This sed command emulates the dirname command.
dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'`
dsttmp=$dstdir/_inst.$$_ # Make sure that the destination directory exists.
rmtmp=$dstdir/_rm.$$_
# Trap to clean up temp files at exit. # Skip lots of stat calls in the usual case.
if test ! -d "$dstdir"; then
defaultIFS='
'
IFS="${IFS-$defaultIFS}"
trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0 oIFS=$IFS
trap '(exit $?); exit' 1 2 13 15 # Some sh's can't handle IFS=/ for some reason.
IFS='%'
set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
shift
IFS=$oIFS
# Move or copy the file name to the temp name pathcomp=
$doit $instcmd "$src" "$dsttmp" && while test $# -ne 0 ; do
pathcomp=$pathcomp$1
shift
if test ! -d "$pathcomp"; then
$mkdirprog "$pathcomp"
# mkdir can fail with a `File exist' error in case several
# install-sh are creating the directory concurrently. This
# is OK.
test -d "$pathcomp" || exit
fi
pathcomp=$pathcomp/
done
fi
# and set any options; do chmod last to preserve setuid bits if test -n "$dir_arg"; then
$doit $mkdircmd "$dst" \
&& { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
&& { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
&& { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
&& { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
# If any of these fail, we abort the whole thing. If we want to else
# ignore errors from any of these, just make sure not to ignore dstfile=`basename "$dst"`
# errors from the above "$doit $instcmd $src $dsttmp" command.
if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else :;fi && # Make a couple of temp file names in the proper directory.
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else :;fi && dsttmp=$dstdir/_inst.$$_
if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; else :;fi && rmtmp=$dstdir/_rm.$$_
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else :;fi &&
# Now remove or move aside any old file at destination location. We try this # Trap to clean up those temp files at exit.
# two ways since rm can't unlink itself on some systems and the destination trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
# file might be busy for other reasons. In this case, the final cleanup trap '(exit $?); exit' 1 2 13 15
# might fail but the new file should still install successfully.
{ # Copy the file name to the temp name.
if [ -f "$dstdir/$dstfile" ] $doit $cpprog "$src" "$dsttmp" &&
then
$doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null ||
$doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null ||
{
echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
(exit 1); exit
}
else
:
fi
} &&
# Now rename the file to the real destination. # and set any options; do chmod last to preserve setuid bits.
#
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $cpprog $src $dsttmp" command.
#
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
&& { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
&& { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
&& { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
$doit $mvcmd "$dsttmp" "$dstdir/$dstfile" # Now rename the file to the real destination.
{ $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \
|| {
# The rename failed, perhaps because mv can't rename something else
# to itself, or perhaps because mv is so ancient that it does not
# support -f.
fi && # Now remove or move aside any old file at destination location.
# We try this two ways since rm can't unlink itself on some
# systems and the destination file might be busy for other
# reasons. In this case, the final cleanup might fail but the new
# file should still install successfully.
{
if test -f "$dstdir/$dstfile"; then
$doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
|| $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
|| {
echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
(exit 1); exit
}
else
:
fi
} &&
# Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
}
}
fi || { (exit 1); exit; }
done
# The final little trick to "correctly" pass the exit status to the exit trap. # The final little trick to "correctly" pass the exit status to the exit trap.
{ {
(exit 0); exit (exit 0); exit
} }
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:

1027
ltmain.sh

File diff suppressed because it is too large Load Diff

131
missing
View File

@ -1,6 +1,10 @@
#! /bin/sh #! /bin/sh
# Common stub for a few missing GNU programs while installing. # Common stub for a few missing GNU programs while installing.
# Copyright (C) 1996, 1997, 1999, 2000, 2002 Free Software Foundation, Inc.
scriptversion=2004-09-07.08
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004
# Free Software Foundation, Inc.
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. # Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
@ -38,18 +42,24 @@ else
configure_ac=configure.in configure_ac=configure.in
fi fi
msg="missing on your system"
case "$1" in case "$1" in
--run) --run)
# Try to run requested program, and just exit if it succeeds. # Try to run requested program, and just exit if it succeeds.
run= run=
shift shift
"$@" && exit 0 "$@" && exit 0
# Exit code 63 means version mismatch. This often happens
# when the user try to use an ancient version of a tool on
# a file that requires a minimum version. In this case we
# we should proceed has if the program had been absent, or
# if --run hadn't been passed.
if test $? = 63; then
run=:
msg="probably too old"
fi
;; ;;
esac
# If it does not exist, or fails to run (possibly an outdated version),
# try to emulate it.
case "$1" in
-h|--h|--he|--hel|--help) -h|--h|--he|--hel|--help)
echo "\ echo "\
@ -74,11 +84,15 @@ Supported PROGRAM values:
lex create \`lex.yy.c', if possible, from existing .c lex create \`lex.yy.c', if possible, from existing .c
makeinfo touch the output file makeinfo touch the output file
tar try tar, gnutar, gtar, then tar without non-portable flags tar try tar, gnutar, gtar, then tar without non-portable flags
yacc create \`y.tab.[ch]', if possible, from existing .[ch]" yacc create \`y.tab.[ch]', if possible, from existing .[ch]
Send bug reports to <bug-automake@gnu.org>."
exit 0
;; ;;
-v|--v|--ve|--ver|--vers|--versi|--versio|--version) -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
echo "missing 0.4 - GNU automake" echo "missing $scriptversion (GNU Automake)"
exit 0
;; ;;
-*) -*)
@ -87,14 +101,44 @@ Supported PROGRAM values:
exit 1 exit 1
;; ;;
aclocal*) esac
# Now exit if we have it, but it failed. Also exit now if we
# don't have it and --version was passed (most likely to detect
# the program).
case "$1" in
lex|yacc)
# 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 if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed. # We have it, but it failed.
exit 1 exit 1
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
# Could not run --version or --help. This is probably someone
# running `$TOOL --version' or `$TOOL --help' to check whether
# $TOOL exists and not knowing $TOOL uses missing.
exit 1
fi fi
;;
esac
# If it does not exist, or fails to run (possibly an outdated version),
# try to emulate it.
case "$1" in
aclocal*)
echo 1>&2 "\ echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if WARNING: \`$1' is $msg. You should only need it if
you modified \`acinclude.m4' or \`${configure_ac}'. You might want you modified \`acinclude.m4' or \`${configure_ac}'. You might want
to install the \`Automake' and \`Perl' packages. Grab them from to install the \`Automake' and \`Perl' packages. Grab them from
any GNU archive site." any GNU archive site."
@ -102,13 +146,8 @@ WARNING: \`$1' is missing on your system. You should only need it if
;; ;;
autoconf) autoconf)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\ echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if WARNING: \`$1' is $msg. You should only need it if
you modified \`${configure_ac}'. You might want to install the you modified \`${configure_ac}'. You might want to install the
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU \`Autoconf' and \`GNU m4' packages. Grab them from any GNU
archive site." archive site."
@ -116,13 +155,8 @@ WARNING: \`$1' is missing on your system. You should only need it if
;; ;;
autoheader) autoheader)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\ echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if WARNING: \`$1' is $msg. You should only need it if
you modified \`acconfig.h' or \`${configure_ac}'. You might want you modified \`acconfig.h' or \`${configure_ac}'. You might want
to install the \`Autoconf' and \`GNU m4' packages. Grab them to install the \`Autoconf' and \`GNU m4' packages. Grab them
from any GNU archive site." from any GNU archive site."
@ -140,13 +174,8 @@ WARNING: \`$1' is missing on your system. You should only need it if
;; ;;
automake*) automake*)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\ echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if WARNING: \`$1' is $msg. You should only need it if
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
You might want to install the \`Automake' and \`Perl' packages. You might want to install the \`Automake' and \`Perl' packages.
Grab them from any GNU archive site." Grab them from any GNU archive site."
@ -156,16 +185,11 @@ WARNING: \`$1' is missing on your system. You should only need it if
;; ;;
autom4te) autom4te)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\ echo 1>&2 "\
WARNING: \`$1' is needed, and you do not seem to have it handy on your WARNING: \`$1' is needed, but is $msg.
system. You might have modified some files without having the You might have modified some files without having the
proper tools for further handling them. proper tools for further handling them.
You can get \`$1Help2man' as part of \`Autoconf' from any GNU You can get \`$1' as part of \`Autoconf' from any GNU
archive site." archive site."
file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
@ -185,7 +209,7 @@ WARNING: \`$1' is needed, and you do not seem to have it handy on your
bison|yacc) bison|yacc)
echo 1>&2 "\ echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if WARNING: \`$1' $msg. You should only need it if
you modified a \`.y' file. You may need the \`Bison' package you modified a \`.y' file. You may need the \`Bison' package
in order for those modifications to take effect. You can get in order for those modifications to take effect. You can get
\`Bison' from any GNU archive site." \`Bison' from any GNU archive site."
@ -215,7 +239,7 @@ WARNING: \`$1' is missing on your system. You should only need it if
lex|flex) lex|flex)
echo 1>&2 "\ echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if WARNING: \`$1' is $msg. You should only need it if
you modified a \`.l' file. You may need the \`Flex' package you modified a \`.l' file. You may need the \`Flex' package
in order for those modifications to take effect. You can get in order for those modifications to take effect. You can get
\`Flex' from any GNU archive site." \`Flex' from any GNU archive site."
@ -237,13 +261,8 @@ WARNING: \`$1' is missing on your system. You should only need it if
;; ;;
help2man) help2man)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\ echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if WARNING: \`$1' is $msg. You should only need it if
you modified a dependency of a manual page. You may need the you modified a dependency of a manual page. You may need the
\`Help2man' package in order for those modifications to take \`Help2man' package in order for those modifications to take
effect. You can get \`Help2man' from any GNU archive site." effect. You can get \`Help2man' from any GNU archive site."
@ -262,13 +281,8 @@ WARNING: \`$1' is missing on your system. You should only need it if
;; ;;
makeinfo) makeinfo)
if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
# We have makeinfo, but it failed.
exit 1
fi
echo 1>&2 "\ echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if WARNING: \`$1' is $msg. You should only need it if
you modified a \`.texi' or \`.texinfo' file, or any other file you modified a \`.texi' or \`.texinfo' file, or any other file
indirectly affecting the aspect of the manual. The spurious indirectly affecting the aspect of the manual. The spurious
call might also be the consequence of using a buggy \`make' (AIX, call might also be the consequence of using a buggy \`make' (AIX,
@ -284,10 +298,6 @@ WARNING: \`$1' is missing on your system. You should only need it if
tar) tar)
shift shift
if test -n "$run"; then
echo 1>&2 "ERROR: \`tar' requires --run"
exit 1
fi
# We have already tried tar in the generic part. # We have already tried tar in the generic part.
# Look for gnutar/gtar before invocation to avoid ugly error # Look for gnutar/gtar before invocation to avoid ugly error
@ -323,10 +333,10 @@ WARNING: I can't seem to be able to run \`tar' with the given arguments.
*) *)
echo 1>&2 "\ echo 1>&2 "\
WARNING: \`$1' is needed, and you do not seem to have it handy on your WARNING: \`$1' is needed, and is $msg.
system. You might have modified some files without having the You might have modified some files without having the
proper tools for further handling them. Check the \`README' file, proper tools for further handling them. Check the \`README' file,
it often tells you about the needed prerequirements for installing it often tells you about the needed prerequisites for installing
this package. You may also peek at any GNU archive site, in case this package. You may also peek at any GNU archive site, in case
some other package would contain this missing \`$1' program." some other package would contain this missing \`$1' program."
exit 1 exit 1
@ -334,3 +344,10 @@ WARNING: \`$1' is needed, and you do not seem to have it handy on your
esac esac
exit 0 exit 0
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:

View File

@ -1,20 +1,32 @@
#! /bin/sh #! /bin/sh
# mkinstalldirs --- make directory hierarchy # mkinstalldirs --- make directory hierarchy
# Author: Noah Friedman <friedman@prep.ai.mit.edu>
scriptversion=2004-02-15.20
# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
# Created: 1993-05-16 # Created: 1993-05-16
# Public domain # Public domain.
#
# This file is maintained in Automake, please report
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
errstatus=0 errstatus=0
dirmode="" dirmode=""
usage="\ usage="\
Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..." Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
Create each directory DIR (with mode MODE, if specified), including all
leading file name components.
Report bugs to <bug-automake@gnu.org>."
# process command line arguments # process command line arguments
while test $# -gt 0 ; do while test $# -gt 0 ; do
case $1 in case $1 in
-h | --help | --h*) # -h for help -h | --help | --h*) # -h for help
echo "$usage" 1>&2 echo "$usage"
exit 0 exit 0
;; ;;
-m) # -m PERM arg -m) # -m PERM arg
@ -23,6 +35,10 @@ while test $# -gt 0 ; do
dirmode=$1 dirmode=$1
shift shift
;; ;;
--version)
echo "$0 $scriptversion"
exit 0
;;
--) # stop option processing --) # stop option processing
shift shift
break break
@ -50,17 +66,37 @@ case $# in
0) exit 0 ;; 0) exit 0 ;;
esac esac
# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and
# mkdir -p a/c at the same time, both will detect that a is missing,
# one will create a, then the other will try to create a and die with
# a "File exists" error. This is a problem when calling mkinstalldirs
# from a parallel make. We use --version in the probe to restrict
# ourselves to GNU mkdir, which is thread-safe.
case $dirmode in case $dirmode in
'') '')
if mkdir -p -- . 2>/dev/null; then if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
echo "mkdir -p -- $*" echo "mkdir -p -- $*"
exec mkdir -p -- "$@" exec mkdir -p -- "$@"
else
# On NextStep and OpenStep, the `mkdir' command does not
# recognize any option. It will interpret all options as
# directories to create, and then abort because `.' already
# exists.
test -d ./-p && rmdir ./-p
test -d ./--version && rmdir ./--version
fi fi
;; ;;
*) *)
if mkdir -m "$dirmode" -p -- . 2>/dev/null; then if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 &&
test ! -d ./--version; then
echo "mkdir -m $dirmode -p -- $*" echo "mkdir -m $dirmode -p -- $*"
exec mkdir -m "$dirmode" -p -- "$@" exec mkdir -m "$dirmode" -p -- "$@"
else
# Clean up after NextStep and OpenStep mkdir.
for d in ./-m ./-p ./--version "./$dirmode";
do
test -d $d && rmdir $d
done
fi fi
;; ;;
esac esac
@ -84,17 +120,17 @@ do
mkdir "$pathcomp" || lasterr=$? mkdir "$pathcomp" || lasterr=$?
if test ! -d "$pathcomp"; then if test ! -d "$pathcomp"; then
errstatus=$lasterr errstatus=$lasterr
else else
if test ! -z "$dirmode"; then if test ! -z "$dirmode"; then
echo "chmod $dirmode $pathcomp" echo "chmod $dirmode $pathcomp"
lasterr="" lasterr=""
chmod "$dirmode" "$pathcomp" || lasterr=$? chmod "$dirmode" "$pathcomp" || lasterr=$?
if test ! -z "$lasterr"; then if test ! -z "$lasterr"; then
errstatus=$lasterr errstatus=$lasterr
fi fi
fi fi
fi fi
fi fi
@ -107,5 +143,8 @@ exit $errstatus
# Local Variables: # Local Variables:
# mode: shell-script # mode: shell-script
# sh-indentation: 2 # sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End: # End:
# mkinstalldirs ends here