From 08e3fbb986bed2f39cc5dca806faca9654c3a6df Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Mon, 28 May 2001 21:12:27 +0000 Subject: Merged back some changes fron gnupg. Fixed doc building. --- scripts/ChangeLog | 14 +- scripts/config.guess | 276 ++++++++++++++++------------- scripts/config.sub | 94 +++++----- scripts/db2any | 489 +++++++++++++++++++++++++++++++++++++++++++++++++++ scripts/db2html.in | 151 ---------------- scripts/distfiles | 2 +- 6 files changed, 699 insertions(+), 327 deletions(-) create mode 100755 scripts/db2any delete mode 100755 scripts/db2html.in (limited to 'scripts') diff --git a/scripts/ChangeLog b/scripts/ChangeLog index 16779ff2..4d33d039 100644 --- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,7 +1,12 @@ +2001-05-28 Werner Koch + + * db2html.in: Removed. + * db2any: New. Taken from GPH + Mon Jul 17 16:35:47 CEST 2000 Werner Koch - * config.gues, config.sub: Support for s390-ibm-linux-gnu; thanks - to Holger Smolinski. Add support for QNX; by Sam Roberts. + * config.gues, config.sub: Support for s390-ibm-linux-gnu; thanks + to Holger Smolinski. Add support for QNX; by Sam Roberts. Tue Oct 26 14:10:21 CEST 1999 Werner Koch @@ -10,29 +15,24 @@ Tue Oct 26 14:10:21 CEST 1999 Werner Koch Wed Sep 15 16:22:17 CEST 1999 Werner Koch - * gnupg.spec: Add Portuguese description Thu Sep 2 16:40:55 CEST 1999 Werner Koch - * mkdiff: changed format of diff file name and made script more general. Wed Aug 4 10:34:18 CEST 1999 Werner Koch - * config.guess: Updated from gnu/common and applied my emx patch again. * config.sub: Updated from gnu/common. Wed Jul 14 19:42:08 CEST 1999 Werner Koch - * ltmain.sh, ltconfig.sh : Updated to libtool 1.3.3 Mon Jul 12 14:55:34 CEST 1999 Werner Koch - * autogen.sh: Run libtoolize Sat May 22 22:47:26 CEST 1999 Werner Koch diff --git a/scripts/config.guess b/scripts/config.guess index 50fd53e3..e1b58717 100755 --- a/scripts/config.guess +++ b/scripts/config.guess @@ -10,7 +10,7 @@ # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License @@ -24,7 +24,7 @@ # Written by Per Bothner . # The master version of this file is at the FSF in /home/gd/gnu/lib. -# Please send patches to the Autoconf mailing list . +# Please send patches to . # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and @@ -68,9 +68,6 @@ trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15 # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in - *:QNX:*:*) - echo i386-pc-qnx - exit 0 ;; alpha:OSF1:*:*) if test $UNAME_RELEASE = "V4.0"; then UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` @@ -159,6 +156,9 @@ EOF wgrisc:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit 0 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit 0;; @@ -229,30 +229,30 @@ EOF exit 0 ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor + # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} - exit 0 ;; + exit 0 ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit 0 ;; + echo m68k-milan-mint${UNAME_RELEASE} + exit 0 ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit 0 ;; + echo m68k-hades-mint${UNAME_RELEASE} + exit 0 ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit 0 ;; + echo m68k-unknown-mint${UNAME_RELEASE} + exit 0 ;; sun3*:NetBSD:*:*) echo m68k-sun-netbsd${UNAME_RELEASE} exit 0 ;; @@ -275,8 +275,8 @@ EOF echo powerpc-apple-machten${UNAME_RELEASE} exit 0 ;; macppc:NetBSD:*:*) - echo powerpc-apple-netbsd${UNAME_RELEASE} - exit 0 ;; + echo powerpc-apple-netbsd${UNAME_RELEASE} + exit 0 ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit 0 ;; @@ -290,7 +290,7 @@ EOF echo clipper-intergraph-clix${UNAME_RELEASE} exit 0 ;; mips:*:*:UMIPS | mips:*:*:RISCos) - sed 's/^ //' << EOF >$dummy.c + sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus int main (int argc, char *argv[]) { #else @@ -329,19 +329,22 @@ EOF echo m88k-motorola-sysv3 exit 0 ;; AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \ - -o ${TARGET_BINARY_INTERFACE}x = x ] ; then + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ + [ ${TARGET_BINARY_INTERFACE}x = x ] + then echo m88k-dg-dgux${UNAME_RELEASE} - else + else echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else + echo i586-dg-dgux${UNAME_RELEASE} fi - else echo i586-dg-dgux${UNAME_RELEASE} - fi - exit 0 ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) + exit 0 ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit 0 ;; M88*:*:R3*:*) @@ -359,13 +362,13 @@ EOF exit 0 ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i?86:AIX:*:*) echo i386-ibm-aix exit 0 ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - sed 's/^ //' << EOF >$dummy.c + sed 's/^ //' << EOF >$dummy.c #include main() @@ -405,9 +408,9 @@ EOF ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit 0 ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit 0 ;; # report: romp-ibm BSD 4.3 + exit 0 ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit 0 ;; @@ -422,48 +425,48 @@ EOF exit 0 ;; 9000/[34678]??:HP-UX:*:*) case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) - sed 's/^ //' << EOF >$dummy.c - #include - #include + sed 's/^ //' << EOF >$dummy.c + #include + #include - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } EOF - ($CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy` + (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy` rm -f $dummy.c $dummy esac HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit 0 ;; 3050*:HI-UX:*:*) - sed 's/^ //' << EOF >$dummy.c + sed 's/^ //' << EOF >$dummy.c #include int main () @@ -471,7 +474,7 @@ EOF long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct - results, however. */ + results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) @@ -522,25 +525,25 @@ EOF exit 0 ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd - exit 0 ;; + exit 0 ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi - exit 0 ;; + exit 0 ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd - exit 0 ;; + exit 0 ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd - exit 0 ;; + exit 0 ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd - exit 0 ;; + exit 0 ;; CRAY*X-MP:*:*:*) echo xmp-cray-unicos - exit 0 ;; + exit 0 ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} exit 0 ;; @@ -553,16 +556,16 @@ EOF echo t90-cray-unicos${UNAME_RELEASE} exit 0 ;; CRAY*T3E:*:*:*) - echo t3e-cray-unicosmk${UNAME_RELEASE} + echo alpha-cray-unicosmk${UNAME_RELEASE} exit 0 ;; CRAY-2:*:*:*) echo cray2-cray-unicos - exit 0 ;; + exit 0 ;; F300:UNIX_System_V:*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit 0 ;; + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit 0 ;; F301:UNIX_System_V:*:*) echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'` exit 0 ;; @@ -591,7 +594,7 @@ EOF echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit 0 ;; *:NetBSD:*:*) - echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'` exit 0 ;; *:OpenBSD:*:*) echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` @@ -621,12 +624,6 @@ EOF echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit 0 ;; *:Linux:*:*) - # uname on the ARM produces all sorts of strangeness, and we need to - # filter it out. - case "$UNAME_MACHINE" in - armv*) UNAME_MACHINE=$UNAME_MACHINE ;; - arm* | sa110*) UNAME_MACHINE="arm" ;; - esac # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent @@ -634,17 +631,43 @@ EOF ld_help_string=`cd /; ld --help 2>&1` ld_supported_emulations=`echo $ld_help_string \ | sed -ne '/supported emulations:/!d - s/[ ][ ]*/ /g + s/[ ][ ]*/ /g s/.*supported emulations: *// s/ .*// p'` - case "$ld_supported_emulations" in - i?86linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0 ;; - i?86coff) echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0 ;; - sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; - armlinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; - m68klinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; - elf_s390) echo "${UNAME_MACHINE}-ibm-linux-gnu" ; exit 0 ;; + case "$ld_supported_emulations" in + *ia64) + echo "${UNAME_MACHINE}-unknown-linux" + exit 0 + ;; + i?86linux) + echo "${UNAME_MACHINE}-pc-linux-gnuaout" + exit 0 + ;; + i?86coff) + echo "${UNAME_MACHINE}-pc-linux-gnucoff" + exit 0 + ;; + sparclinux) + echo "${UNAME_MACHINE}-unknown-linux-gnuaout" + exit 0 + ;; + armlinux) + echo "${UNAME_MACHINE}-unknown-linux-gnuaout" + exit 0 + ;; + elf32arm*) + echo "${UNAME_MACHINE}-unknown-linux-gnu" + exit 0 + ;; + armelf_linux*) + echo "${UNAME_MACHINE}-unknown-linux-gnu" + exit 0 + ;; + m68klinux) + echo "${UNAME_MACHINE}-unknown-linux-gnuaout" + exit 0 + ;; elf32ppc) # Determine Lib Version cat >$dummy.c <$dummy.s + sed 's/^ //' <$dummy.s .globl main .ent main main: @@ -793,27 +818,29 @@ EOF echo i386-sequent-sysv4 exit 0 ;; i?86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit 0 ;; i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE} + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE} + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit 0 ;; i?86:*:5:7*) - UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` - (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) && UNAME_MACHINE=i586 - (/bin/uname -X|egrep '^Machine.*Pent.*II' >/dev/null) && UNAME_MACHINE=i686 - (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) && UNAME_MACHINE=i585 - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}${UNAME_VERSION}-sysv${UNAME_RELEASE} + # Fixed at (any) Pentium or better + UNAME_MACHINE=i586 + if [ ${UNAME_SYSTEM} = "UnixWare" ] ; then + echo ${UNAME_MACHINE}-sco-sysv${UNAME_RELEASE}uw${UNAME_VERSION} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE} + fi exit 0 ;; i?86:*:3.2:*) if test -f /usr/options/cb.name; then @@ -834,10 +861,10 @@ EOF fi exit 0 ;; pc:*:*:*) - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i386. + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i386. echo i386-pc-msdosdjgpp - exit 0 ;; + exit 0 ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit 0 ;; @@ -866,8 +893,8 @@ EOF /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && echo i486-ncr-sysv4 && exit 0 ;; + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && echo i486-ncr-sysv4 && exit 0 ;; m68*:LynxOS:2.*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit 0 ;; @@ -901,9 +928,9 @@ EOF fi exit 0 ;; PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit 0 ;; + # says + echo i586-unisys-sysv4 + exit 0 ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm @@ -921,11 +948,11 @@ EOF exit 0 ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} + echo mips-nec-sysv${UNAME_RELEASE} else - echo mips-unknown-sysv${UNAME_RELEASE} + echo mips-unknown-sysv${UNAME_RELEASE} fi - exit 0 ;; + exit 0 ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit 0 ;; @@ -947,6 +974,9 @@ EOF *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit 0 ;; + *:QNX:*:4*) + echo i386-qnx-qnx${UNAME_VERSION} + exit 0 ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 @@ -968,11 +998,11 @@ main () #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 - "4" + "4" #else "" #endif - ); exit (0); + ); exit (0); #endif #endif @@ -1049,10 +1079,6 @@ main () printf ("i860-alliant-bsd\n"); exit (0); #endif -#if defined(__EMX__) - printf ("i386-pc-os2_emx"); exit(0); -#endif - exit (1); } EOF diff --git a/scripts/config.sub b/scripts/config.sub index 0159f720..28426bb8 100755 --- a/scripts/config.sub +++ b/scripts/config.sub @@ -12,7 +12,7 @@ # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License @@ -34,7 +34,7 @@ # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations -# it does not support. The user should be able to distinguish +# it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. @@ -105,7 +105,7 @@ case $os in -scout) ;; -wrs) - os=vxworks + os=-vxworks basic_machine=$1 ;; -hiux*) @@ -156,27 +156,31 @@ case $os in -psos*) os=-psos ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. - tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \ + tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \ | arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \ | 580 | i960 | h8300 \ | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \ - | alpha | alphaev[4-7] | alphaev56 | alphapca5[67] | s390 \ + | alpha | alphaev[4-7] | alphaev56 | alphapca5[67] \ | we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \ | 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \ | mips64orion | mips64orionel | mipstx39 | mipstx39el \ | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \ - | mips64vr5000 | miprs64vr5000el \ + | mips64vr5000 | miprs64vr5000el | mcore \ | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \ - | thumb | d10v) + | thumb | d10v | fr30) basic_machine=$basic_machine-unknown ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65) + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65 | pj | pjl) ;; # We use `pc' rather than `unknown' @@ -185,19 +189,14 @@ case $basic_machine in i[34567]86) basic_machine=$basic_machine-pc ;; - s390 | s390-ibm) - basic_machine=s390-ibm - ;; - s390-redhat) - basic_machine=s390-redhat - ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. - vax-* | tahoe-* | i[34567]86-* | i860-* | m32r-* | m68k-* | m68000-* \ + # FIXME: clean up the formatting here. + vax-* | tahoe-* | i[34567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \ | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \ | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \ @@ -210,10 +209,10 @@ case $basic_machine in | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \ | mips64el-* | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \ - | mipstx39-* | mipstx39el-* \ + | mipstx39-* | mipstx39el-* | mcore-* \ | f301-* | armv*-* | t3e-* \ | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \ - | thumb-* | v850-* | d30v-* | tic30-* | c30-* ) + | thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* ) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. @@ -431,7 +430,6 @@ case $basic_machine in ;; i370-ibm* | ibm*) basic_machine=i370-ibm - os=-mvs ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i[34567]86v32) @@ -466,6 +464,9 @@ case $basic_machine in basic_machine=i386-unknown os=-mingw32 ;; + i386-qnx | qnx) + basic_machine=i386-qnx + ;; iris | iris4d) basic_machine=mips-sgi case $os in @@ -494,7 +495,7 @@ case $basic_machine in miniframe) basic_machine=m68000-convergent ;; - *mint | *MiNT) + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; @@ -520,6 +521,10 @@ case $basic_machine in basic_machine=i386-unknown os=-msdos ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; ncr3000) basic_machine=i486-ncr os=-sysv4 @@ -529,7 +534,7 @@ case $basic_machine in os=-netbsd ;; netwinder) - basic_machine=armv4l-corel + basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) @@ -606,7 +611,7 @@ case $basic_machine in pbb) basic_machine=m68k-tti ;; - pc532 | pc532-*) + pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pentium | p5 | k5 | k6 | nexen) @@ -633,12 +638,12 @@ case $basic_machine in power) basic_machine=rs6000-ibm ;; ppc) basic_machine=powerpc-unknown - ;; + ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown - ;; + ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; @@ -762,8 +767,8 @@ case $basic_machine in os=-vms ;; vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; + basic_machine=f301-fujitsu + ;; vxworks960) basic_machine=i960-wrs os=-vxworks @@ -788,7 +793,7 @@ case $basic_machine in basic_machine=xmp-cray os=-unicos ;; - xps | xps100) + xps | xps100) basic_machine=xps100-honeywell ;; z8k-*-coff) @@ -836,7 +841,7 @@ case $basic_machine in sparc | sparcv9) basic_machine=sparc-sun ;; - cydra) + cydra) basic_machine=cydra-cydrome ;; orion) @@ -878,8 +883,8 @@ esac if [ x"$os" != x"" ] then case $os in - # First match some system type aliases - # that might get confused with valid system types. + # First match some system type aliases + # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` @@ -887,9 +892,6 @@ case $os in -solaris) os=-solaris2 ;; - -qnx) - os=-qnx - ;; -svr4*) os=-sysv4 ;; @@ -916,7 +918,7 @@ case $os in | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -rhapsody* | -openstep* | -oskit*) + | -interix* | -uwin* | -rhapsody* | -opened* | -openstep* | -oskit*) # Remember, each alternative MUST END IN *, to match a version number. ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ @@ -935,6 +937,9 @@ case $os in -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; + -opened*) + os=-openedition + ;; -osfrose*) os=-osfrose ;; @@ -957,7 +962,7 @@ case $os in os=-sysv ;; -ns2 ) - os=-nextstep2 + os=-nextstep2 ;; # Preserve the version number of sinix5. -sinix5.*) @@ -972,6 +977,9 @@ case $os in -oss*) os=-sysv3 ;; + -qnx) + os=-qnx4 + ;; -svr4) os=-sysv4 ;; @@ -993,8 +1001,8 @@ case $os in -xenix) os=-xenix ;; - -*mint | -*MiNT) - os=-mint + -*mint | -*MiNT) + os=-mint ;; -none) ;; @@ -1021,13 +1029,13 @@ case $basic_machine in *-acorn) os=-riscix1.2 ;; - arm*-corel) + arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; - pdp11-*) + pdp11-*) os=-none ;; *-dec | vax-*) @@ -1117,19 +1125,19 @@ case $basic_machine in *-next) os=-nextstep3 ;; - *-gould) + *-gould) os=-sysv ;; - *-highlevel) + *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; - *-sgi) + *-sgi) os=-irix ;; - *-siemens) + *-siemens) os=-sysv4 ;; *-masscomp) @@ -1195,7 +1203,7 @@ case $basic_machine in -genix*) vendor=ns ;; - -mvs*) + -mvs* | -opened*) vendor=ibm ;; -ptx*) diff --git a/scripts/db2any b/scripts/db2any new file mode 100755 index 00000000..96606f8c --- /dev/null +++ b/scripts/db2any @@ -0,0 +1,489 @@ +#!/bin/sh +# db2any - Docbook to html/ps/info rendering +# +# Copyright (C) 2000, 2001 Free Software Foundation, Inc +# +# This is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA +# +# Note: This requires a Posix shell +# +# $Id$ + +pgm="db2any" +version="0.7.3" + +usage () { + echo 'usage: db2any [--help] [options] filename' >&2 + exit 1 +} + +show_banner () { + cat <&2 + exit 1 + fi + mode="$1" + ;; + --manvolume) + shift + if [ $# = 0 ]; then + echo "$pgm: missing argument for --manvolume" >&2 + exit 1 + fi + manvolume="$1" + ;; + --usestyle) + shift + if [ $# = 0 ]; then + echo "$pgm: missing argument for --usestyle" >&2 + exit 1 + fi + usestyle="$1" + ;; + --verbose) + verbose=yes + ;; + --draft) + draft=yes + ;; + --ignore-xref) + ignore_xref=yes + ;; + --) + shift + break + ;; + *) + echo "$pgm: invalid option $1" >&2 + exit 1 + ;; + esac + shift +done + +if [ $# = $expected_args ]; then + if [ $# = 1 ]; then + input="$1" + fi +else + usage +fi + +# check the mode +case "$mode" in + html|HTML) + mode=html + ;; + tex|TEX|TeX|dvi) + mode=dvi + ;; + man|MAN) + mode=man + ;; + texi|TEXI|texinfo|TEXINFO) + mode=texinfo + ;; + check) + ;; + none) + if [ $systemcheck_only != yes ]; then + echo "$pgm: no mode specified; use one of: ${all_modes}" >&2 + exit 1 + fi + ;; + *) + echo "$pgm: invalid mode $mode" >&2 + echo "$pgm: valid modes are: ${all_modes}" >&2 + exit 1 + ;; +esac + +if [ -n $usestyle ]; then + if [ ! -f $usestyle ]; then + echo "$pgm: cannot access local stylesteet" >&2 + exit 1 + fi +fi + +####################################### +# Options are all parsed here # +####################################### + +# check whether the given program is availbale in the path +check_prog () { + tmp="$1" + save_ifs="$IFS"; IFS=":" + for i in $PATH; do + test -z "$i" && i=. + if test -f $i/$tmp; then + IFS="$save_ifs" + return 0 + fi + done + IFS="$save_ifs" + return 1 +} + + +# Figure out all what we need to know about the system we are +# running on and where the Docbook tools are installed. +# Tell about it when running in verbose mode. +do_systemcheck () { + # look for Jade + jade_version=`jade -v &1 | \ + sed -n 's/.*:I:.*Jade version "\([0-9.]*\)"/\1/p'` + if [ -z "$jade_version" ]; then + echo "$pgm: error: jade not found" >&2 + exit 1 + fi + [ $verbose = yes ] && echo "$pgm: Jade version $jade_version found" >&2 + + # look for JadeTeX + if ! jadetex -v 2>/dev/null | grep -q '^TeX' ; then + echo "$pgm: error: jadetex not found" >&2 + exit 1 + fi + + # look for the docbook-to-man script. Fixme: we should check that it + # it is a recent version. + if ! docbook-to-man 2>&1 | grep -q '^usage' ; then + echo "$pgm: error: docbook-to-man not found" >&2 + exit 1 + fi + [ $verbose = yes ] && echo "$pgm: docbook-to-man found" >&2 + + # look for the docbook-to-texi scripts. + if ! check_prog docbook2texi ; then + echo "$pgm: error: docbook2texi not found" >&2 + exit 1 + fi + [ $verbose = yes ] && echo "$pgm: docbook2texi found" >&2 + if ! sgml2xml -v /dev/null 2>&1 | grep 'SP version' >/dev/null 2>&1 ; then + echo "$pgm: error: sgml2xml not found" >&2 + exit 1 + fi + [ $verbose = yes ] && echo "$pgm: sgml2xml found" >&2 + + # figure out where our stylesheets are + tex_stylesheet=none + for d in ${stylesheet_dirs}; do + file=${d}/print/docbook.dsl + if [ -f $file ]; then + tex_stylesheet=$file + break + fi + done + [ $verbose = yes ] && echo "$pgm: TeX stylesheet: ${tex_stylesheet}" >&2 + html_stylesheet=none + for d in ${stylesheet_dirs}; do + file=${d}/html/docbook.dsl + if [ -f $file ]; then + html_stylesheet=$file + break + fi + done + [ $verbose = yes ] && echo "$pgm: HTML stylesheet: ${html_stylesheet}" >&2 + if [ $tex_stylesheet = none -o $html_stylesheet = none ]; then + echo "$pgm: error: stylesheets not found" >&2 + exit 1 + fi + +} + + +# Render the docbook as HTML +render_html () { + output="`basename $input| sed 's/\.sgml$//'`.html" + + if [ -n "$usestyle" ]; then + tmpstyle="`pwd`/`basename $usestyle`-html.tmp" + if [ ! -f $tmpstyle -o $usestyle -nt $tmpstyle ]; then + sed "s%@DOCBOOK_DSL@%$html_stylesheet%" $usestyle > $tmpstyle + fi + else + tmpstyle="$tex_stylesheet" + fi + + + # --nosplts creates just one HTML file + if test $nosplit = yes; then + echo "running jade on '$input' ..." >&2 + jade -D . -d $tmpstyle -t sgml -i html -V nochunks $input > $output + echo "$output created" + return 0 + fi + + # Make sure that we have a html subdir + if test -d html ; then + : + else + if mkdir html; then + echo "'html' directory created" >&2 + else + echo "failed to create 'html' directory" >&2 + exit 1 + fi + fi + + outputdir="html/`basename $input| sed 's/\.sgml$//'`" + + if test -d $outputdir ; then + : + else + if mkdir $outputdir; then + echo "'$outputdir' created" >&2 + else + echo "failed to create '$outputdir'" >&2 + exit 1 + fi + fi + echo "creating html pages in '$outputdir' ..." >&2 + if test "$input" = "`basename $input`"; then + inp="../../$input" + else + inp="$input" + fi + + [ $verbose = yes ] && echo "running jade on '$inp' ..." >&2 + (cd $outputdir && jade -D . -t sgml -i html -d $tmpstyle $inp ) + [ $verbose = yes ] && echo "html version in '$outputdir' created" >&2 + + # break out all filerefs and copy them to the outputdirectory + # fixme: handling of path components is wrong + if test $copyfiles = yes; then + echo "looking for filerefs ..." >&2 + for file in `nsgmls -i html $input \ + | awk '/^AFILEREF[ \t]+CDATA/ {print $3}'`; do + d=$outputdir/`basename $file` + if cat $file > $outputdir/`basename $file` ; then + echo " $file -> $d" >&2 + fi + done + fi + + mainfile=`ls $outputdir/${doctype}* | head -1` + + # create a html index file for it, so that we can more easy + # find the rendred pages + cat > $output <$output + + +$mainfile + + + +EOF + + [ $verbose = yes ] && echo "$output created with link to '$mainfile'" >&2 +} + + +# This function expects the source file in $texfile and +# the name of the logfle in $logfile +run_jadetex () { + [ -f $logfile ] && rm $logfile + jadetex $texfile + if ! tail $logfile | grep -q '^Output written on'; then + echo "JadeTeX failed" >&2 + exit 1 + fi +} + +# Render the docbook to DVI +render_dvi () { + output="`basename $input| sed 's/\.sgml$//'`.dvi" + texfile="`basename $input| sed 's/\.sgml$//'`.tex" + logfile="`basename $input| sed 's/\.sgml$//'`.log" + auxfile="`basename $input| sed 's/\.sgml$//'`.aux" + + if [ -n "$usestyle" ]; then + tmpstyle="`basename $usestyle`-tex.tmp" + if [ ! -f $tmpstyle -o $usestyle -nt $tmpstyle ]; then + sed "s%@DOCBOOK_DSL@%$tex_stylesheet%" $usestyle > $tmpstyle + fi + else + tmpstyle="$tex_stylesheet" + fi + [ $verbose = yes ] && echo "running jade on '$input' ..." >&2 + jade -D . -t tex -i tex -d $tmpstyle -o $texfile $input + if ! tail $texfile | grep -q '\\endFOT{}'; then + echo "Jade failed" >&2 + exit 1 + fi + + # Better delete the aux file first + [ -f $auxfile ] && rm $auxfile + # The first run won't get the references right, so we have to + # run it 2 or 3 times. JadeTex doesn't indicate whether a third + # run is required, so we do it always. + run_jadetex + if [ $draft = no ]; then + if tail -100 $logfile \ + | grep -q '^LaTeX Warning: There were undefined references'; then + echo 'running JadeTeX a second and third 2time' >&2 + run_jadetex + run_jadetex + fi + fi + + [ $verbose = yes ] && echo "$output created as '$output'" >&2 +} + +# Render the docbook to troff +render_man () { + output="`basename $input| sed 's/\.sgml$//'`.$manvolume" + + [ $verbose = yes ] && echo "running docbook-to-man on '$input' ..." >&2 + docbook-to-man $input > $output + [ $verbose = yes ] && echo "man page '$output' created" >&2 +} + +# Render the docbook to texinfo +render_texinfo () { + output="`basename $input| sed 's/\.sgml$/.texi/'`" + tmpxml="`basename $input| sed 's/\.sgml$/.xml/'`" + + [ $verbose = yes ] && echo "running sgml2xml on '$input' ..." >&2 + sgml2xml -x lower $input > $tmpxml + [ $verbose = yes ] && echo "running docbook2texi on '$tmpxml' ..." >&2 + docbook2texi $tmpxml | sed 's,--,---,' >$output + rm $tmpxml + [ $verbose = yes ] && echo "texinfo '$output' created" >&2 + +} + +####################################### +# main function # +####################################### + +do_systemcheck +[ $systemcheck_only = yes ] && exit 0 + +if [ ! -f "$input" ]; then + input="$input.sgml" + if [ ! -f "$input" ]; then + echo "$pgm: '$input': no such file" >&2 + exit 1 + fi +fi + +# grep the document type +doctype=`grep -i '\&2 + exit 1 +fi +[ $verbose = yes ] && echo "$input: DOCTYPE is '$doctype'" >&2 + +case $mode in + check) + nsgmls -vs $input + exit $? + ;; + html) + render_html + ;; + dvi) + render_dvi + ;; + man) + render_man + ;; + texinfo) + render_texinfo + ;; +esac + + +exit 0 diff --git a/scripts/db2html.in b/scripts/db2html.in deleted file mode 100755 index ba35afbc..00000000 --- a/scripts/db2html.in +++ /dev/null @@ -1,151 +0,0 @@ -#!/bin/sh -# db2html.in - Docbook to HTML rendering (wk 2000-02-15) -# -# Copyright (C) 2000 Free Software Foundation -# -# This is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - -nosplit=no -copyfiles=no -stylesheet=@DSL_FOR_HTML@ -JADE=@JADE@ - -usage () { - echo 'usage: db2html [--nosplit] [--copyfiles] filename' >&2 - exit 1 -} - - -while test "`echo $1 | head -c1`" = "-"; do - case $1 in - --version) - cat <&2 - exit 1 - ;; - esac - shift -done - -if test $# = 1; then - input="$1" -else - usage -fi - -# grep the document type -doctype=`grep -i '\&2 -else - echo "DOCTYPE is '$doctype'" >&2 -fi - -output="`basename $input| sed 's/\.sgml$//'`.html" - - -if test $nosplit = yes; then - echo "running jade on '$input' ..." >&2 - $JADE -d $stylesheet -t sgml -i html -V nochunks $input > $output - echo "$output created" - exit 0 -fi - -if test -d html ; then - : -else - if mkdir html; then - echo "'html' directory created" >&2 - else - echo "failed to create 'html' directory" >&2 - exit 1 - fi -fi - -outputdir="html/`basename $input| sed 's/\.sgml$//'`" - -if test -d $outputdir ; then - : -else - if mkdir $outputdir; then - echo "'$outputdir' created" >&2 - else - echo "failed to create '$outputdir'" >&2 - exit 1 - fi -fi -echo "creating html pages in '$outputdir' ..." >&2 -if test "$input" = "`basename $input`"; then - inp="../../$input" -else - inp="$input" -fi -echo "running jade on '$inp' ..." >&2 -(cd $outputdir && $JADE -t sgml -i html -d $stylesheet $inp ) -echo "html version in '$outputdir' created" >&2 - -# break out all filerefs and copy them to the outputdirectory -# fixme: handling of path components is wrong -if test $copyfiles = yes; then - echo "looking for filerefs ..." >&2 - for file in `nsgmls -i html $input \ - | awk '/^AFILEREF[ \t]+CDATA/ {print $3}'`; do - d=$outputdir/`basename $file` - if cat $file > $outputdir/`basename $file` ; then - echo " $file -> $d" >&2 - fi - done -fi - -mainfile=`ls $outputdir/${doctype}* | head -1` - -cat > $output <$output - - -$mainfile - - - -EOF - -echo "$output created with link to '$mainfile'" >&2 - -exit 0 - diff --git a/scripts/distfiles b/scripts/distfiles index 56cf2172..2d79a5b7 100644 --- a/scripts/distfiles +++ b/scripts/distfiles @@ -7,5 +7,5 @@ autogen.sh ChangeLog ltconfig ltmain.sh -db2html.in +db2any -- cgit v1.2.1