]> git.sur5r.net Git - bacula/bacula/commitdiff
Update config + write own fgets() + ...
authorKern Sibbald <kern@sibbald.com>
Thu, 26 Jun 2003 16:08:06 +0000 (16:08 +0000)
committerKern Sibbald <kern@sibbald.com>
Thu, 26 Jun 2003 16:08:06 +0000 (16:08 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@613 91ce42f0-d328-0410-95d8-f526ca767f89

27 files changed:
bacula/autoconf/config.guess
bacula/autoconf/config.sub
bacula/autoconf/configure.in
bacula/configure
bacula/kernstodo
bacula/src/baconfig.h
bacula/src/dird/dird.c
bacula/src/dird/job.c
bacula/src/dird/ua_tree.c
bacula/src/dird/verify.c
bacula/src/filed/restore.c
bacula/src/findlib/attribs.c
bacula/src/findlib/bfile.c
bacula/src/findlib/create_file.c
bacula/src/findlib/protos.h
bacula/src/lib/attr.h
bacula/src/lib/bpipe.c
bacula/src/lib/bsys.c
bacula/src/lib/protos.h
bacula/src/lib/tree.h
bacula/src/stored/append.c
bacula/src/stored/bextract.c
bacula/src/stored/bls.c
bacula/src/stored/bscan.c
bacula/src/stored/btape.c
bacula/src/stored/record.h
bacula/src/version.h

index 0ce538bb85cc7ee026a4f024e6572cb1ce99b522..dff9e481b70f9505b49ce999629a168a19976f4f 100755 (executable)
@@ -1,8 +1,10 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
 #   Free Software Foundation, Inc.
-#
+
+timestamp='2001-09-04'
+
 # 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
 # the Free Software Foundation; either version 2 of the License, or
 # exits with 0.  Otherwise, it exits with 1.
 #
 # The plan is that this can be called by configure scripts if you
-# don't specify an explicit system type (host/target name).
-#
-# Only a few systems have been added to this list; please add others
-# (but try to keep the structure clean).
-#
+# don't specify an explicit build system type.
 
-# Use $HOST_CC if defined. $CC may point to a cross-compiler
-if test x"$CC_FOR_BUILD" = x; then
-  if test x"$HOST_CC" != x; then
-    CC_FOR_BUILD="$HOST_CC"
-  else
-    if test x"$CC" != x; then
-      CC_FOR_BUILD="$CC"
-    else
-      CC_FOR_BUILD=cc
-    fi
-  fi
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit 0 ;;
+    --version | -v )
+       echo "$version" ; exit 0 ;;
+    --help | --h* | -h )
+       echo "$usage"; exit 0 ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )        # Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help" >&2
+       exit 1 ;;
+    * )
+       break ;;
+  esac
+done
+
+if test $# != 0; then
+  echo "$me: too many arguments$help" >&2
+  exit 1
 fi
 
 
+dummy=dummy-$$
+trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script.
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,)    echo "int dummy(){}" > $dummy.c ;
+       for c in cc gcc c89 ; do
+         ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ;
+         if test $? = 0 ; then
+            CC_FOR_BUILD="$c"; break ;
+         fi ;
+       done ;
+       rm -f $dummy.c $dummy.o $dummy.rel ;
+       if test x"$CC_FOR_BUILD" = x ; then
+         CC_FOR_BUILD=no_compiler_found ;
+       fi
+       ;;
+ ,,*)   CC_FOR_BUILD=$CC ;;
+ ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
+esac'
+
 # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
-# (ghazi@noc.rutgers.edu 8/24/94.)
+# (ghazi@noc.rutgers.edu 1994-08-24)
 if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
        PATH=$PATH:/.attbin ; export PATH
 fi
 
 UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
 UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
-UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
 
-dummy=dummy-$$
-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
@@ -77,7 +136,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
        # object file format.
        # Determine the machine/vendor (is the vendor relevant).
        case "${UNAME_MACHINE}" in
-           amiga) machine=m68k-cbm ;;
+           amiga) machine=m68k-unknown ;;
            arm32) machine=arm-unknown ;;
            atari*) machine=m68k-atari ;;
            sun3*) machine=m68k-sun ;;
@@ -87,16 +146,25 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
            ibmrt|romp-ibm) machine=romp-ibm ;;
            *) machine=${UNAME_MACHINE}-unknown ;;
        esac
-       # The Operating System including object format.
-       if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
-               | grep __ELF__ >/dev/null
-       then
-           # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
-           # Return netbsd for either.  FIX?
-           os=netbsd
-       else
-           os=netbsdelf
-       fi
+       # The Operating System including object format, if it has switched
+       # to ELF recently, or will in the future.
+       case "${UNAME_MACHINE}" in
+           i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k)
+               eval $set_cc_for_build
+               if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+                       | grep __ELF__ >/dev/null
+               then
+                   # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+                   # Return netbsd for either.  FIX?
+                   os=netbsd
+               else
+                   os=netbsdelf
+               fi
+               ;;
+           *)
+               os=netbsd
+               ;;
+       esac
        # The OS release
        release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
        # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
@@ -137,6 +205,7 @@ main:
        jsr \$26,exit
        .end main
 EOF
+       eval $set_cc_for_build
        $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
        if test "$?" = 0 ; then
                case `./$dummy` in
@@ -158,6 +227,9 @@ EOF
                        2-307)
                                UNAME_MACHINE="alphaev67"
                                ;;
+                       2-1307)
+                               UNAME_MACHINE="alphaev68"
+                               ;;
                esac
        fi
        rm -f $dummy.s $dummy
@@ -173,7 +245,7 @@ EOF
        echo alpha-dec-winnt3.5
        exit 0 ;;
     Amiga*:UNIX_System_V:4.0:*)
-       echo m68k-cbm-sysv4
+       echo m68k-unknown-sysv4
        exit 0;;
     amiga:OpenBSD:*:*)
        echo m68k-unknown-openbsd${UNAME_RELEASE}
@@ -205,7 +277,7 @@ EOF
     arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
        echo arm-acorn-riscix${UNAME_RELEASE}
        exit 0;;
-    SR2?01:HI-UX/MPP:*:*)
+    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
        echo hppa1.1-hitachi-hiuxmpp
        exit 0;;
     Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
@@ -261,6 +333,9 @@ EOF
     aushp:SunOS:*:*)
        echo sparc-auspex-sunos${UNAME_RELEASE}
        exit 0 ;;
+    sparc*:NetBSD:*)
+       echo `uname -p`-unknown-netbsd${UNAME_RELEASE}
+       exit 0 ;;
     atari*:OpenBSD:*:*)
        echo m68k-unknown-openbsd${UNAME_RELEASE}
        exit 0 ;;
@@ -318,6 +393,7 @@ EOF
        echo clipper-intergraph-clix${UNAME_RELEASE}
        exit 0 ;;
     mips:*:*:UMIPS | mips:*:*:RISCos)
+       eval $set_cc_for_build
        sed 's/^        //' << EOF >$dummy.c
 #ifdef __cplusplus
 #include <stdio.h>  /* for printf() prototype */
@@ -341,10 +417,13 @@ EOF
 EOF
        $CC_FOR_BUILD $dummy.c -o $dummy \
          && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
-         && rm $dummy.c $dummy && exit 0
+         && rm -f $dummy.c $dummy && exit 0
        rm -f $dummy.c $dummy
        echo mips-mips-riscos${UNAME_RELEASE}
        exit 0 ;;
+    Motorola:PowerMAX_OS:*:*)
+       echo powerpc-motorola-powermax
+       exit 0 ;;
     Night_Hawk:Power_UNIX:*:*)
        echo powerpc-harris-powerunix
        exit 0 ;;
@@ -392,11 +471,20 @@ EOF
     ????????: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 '
-    i?86:AIX:*:*)
+    i*86:AIX:*:*)
        echo i386-ibm-aix
        exit 0 ;;
+    ia64:AIX:*:*)
+       if [ -x /usr/bin/oslevel ] ; then
+               IBM_REV=`/usr/bin/oslevel`
+       else
+               IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+       fi
+       echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+       exit 0 ;;
     *:AIX:2:3)
        if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+               eval $set_cc_for_build
                sed 's/^                //' << EOF >$dummy.c
                #include <sys/systemcfg.h>
 
@@ -408,7 +496,7 @@ EOF
                        exit(0);
                        }
 EOF
-               $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
+               $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
                rm -f $dummy.c $dummy
                echo rs6000-ibm-aix3.2.5
        elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
@@ -417,9 +505,9 @@ EOF
                echo rs6000-ibm-aix3.2
        fi
        exit 0 ;;
-    *:AIX:*:4)
+    *:AIX:*:[45])
        IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
-       if /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER >/dev/null 2>&1; then
+       if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
                IBM_ARCH=rs6000
        else
                IBM_ARCH=powerpc
@@ -427,7 +515,7 @@ EOF
        if [ -x /usr/bin/oslevel ] ; then
                IBM_REV=`/usr/bin/oslevel`
        else
-               IBM_REV=4.${UNAME_RELEASE}
+               IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
        fi
        echo ${IBM_ARCH}-ibm-aix${IBM_REV}
        exit 0 ;;
@@ -453,10 +541,29 @@ EOF
        echo m68k-hp-bsd4.4
        exit 0 ;;
     9000/[34678]??:HP-UX:*:*)
+       HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
        case "${UNAME_MACHINE}" in
            9000/31? )            HP_ARCH=m68000 ;;
            9000/[34]?? )         HP_ARCH=m68k ;;
            9000/[678][0-9][0-9])
+              case "${HPUX_REV}" in
+                11.[0-9][0-9])
+                  if [ -x /usr/bin/getconf ]; then
+                    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+                    case "${sc_cpu_version}" in
+                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+                      532)                      # CPU_PA_RISC2_0
+                        case "${sc_kernel_bits}" in
+                          32) HP_ARCH="hppa2.0n" ;;
+                          64) HP_ARCH="hppa2.0w" ;;
+                        esac ;;
+                    esac
+                  fi ;;
+              esac
+              if [ "${HP_ARCH}" = "" ]; then
+             eval $set_cc_for_build
               sed 's/^              //' << EOF >$dummy.c
 
               #define _HPUX_SOURCE
@@ -490,13 +597,19 @@ EOF
                   exit (0);
               }
 EOF
-       (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
-       rm -f $dummy.c $dummy
+           (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
+           if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
+           rm -f $dummy.c $dummy
+       fi ;;
        esac
-       HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
        echo ${HP_ARCH}-hp-hpux${HPUX_REV}
        exit 0 ;;
+    ia64:HP-UX:*:*)
+       HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+       echo ia64-hp-hpux${HPUX_REV}
+       exit 0 ;;
     3050*:HI-UX:*:*)
+       eval $set_cc_for_build
        sed 's/^        //' << EOF >$dummy.c
        #include <unistd.h>
        int
@@ -522,7 +635,7 @@ EOF
          exit (0);
        }
 EOF
-       $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
+       $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
        rm -f $dummy.c $dummy
        echo unknown-hitachi-hiuxwe2
        exit 0 ;;
@@ -532,7 +645,7 @@ EOF
     9000/8??:4.3bsd:*:*)
        echo hppa1.0-hp-bsd
        exit 0 ;;
-    *9??*:MPE/iX:*:*)
+    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
        echo hppa1.0-hp-mpeix
        exit 0 ;;
     hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
@@ -541,7 +654,7 @@ EOF
     hp8??:OSF1:*:*)
        echo hppa1.0-hp-osf
        exit 0 ;;
-    i?86:OSF1:*:*)
+    i*86:OSF1:*:*)
        if [ -x /usr/sbin/sysversion ] ; then
            echo ${UNAME_MACHINE}-unknown-osf1mk
        else
@@ -576,37 +689,39 @@ EOF
        echo xmp-cray-unicos
         exit 0 ;;
     CRAY*Y-MP:*:*:*)
-       echo ymp-cray-unicos${UNAME_RELEASE}
+       echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
        exit 0 ;;
     CRAY*[A-Z]90:*:*:*)
        echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
        | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
-             -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
+             -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+             -e 's/\.[^.]*$/.X/'
        exit 0 ;;
     CRAY*TS:*:*:*)
        echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
        exit 0 ;;
-    CRAY*T3E:*:*:*)
+    CRAY*T3D:*:*:*)
        echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
        exit 0 ;;
+    CRAY*T3E:*:*:*)
+       echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+       exit 0 ;;
     CRAY*SV1:*:*:*)
        echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
        exit 0 ;;
     CRAY-2:*:*:*)
        echo cray2-cray-unicos
         exit 0 ;;
-    F300:UNIX_System_V:*:*)
+    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+       FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
         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}"
+        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
         exit 0 ;;
-    F301:UNIX_System_V:*:*)
-       echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'`
-       exit 0 ;;
     hp300:OpenBSD:*:*)
        echo m68k-unknown-openbsd${UNAME_RELEASE}
        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}
        exit 0 ;;
     sparc*:BSD/OS:*:*)
@@ -627,6 +742,9 @@ EOF
     i*:MINGW*:*)
        echo ${UNAME_MACHINE}-pc-mingw32
        exit 0 ;;
+    i*:PW*:*)
+       echo ${UNAME_MACHINE}-pc-pw32
+       exit 0 ;;
     i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
        # How do we know it's Interix rather than the generic POSIX subsystem?
        # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
@@ -645,187 +763,96 @@ EOF
     *:GNU:*:*)
        echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
        exit 0 ;;
-    *:Linux:*:*)
-
+    i*86:Minix:*:*)
+       echo ${UNAME_MACHINE}-pc-minix
+       exit 0 ;;
+    arm*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit 0 ;;
+    ia64:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux
+       exit 0 ;;
+    m68*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit 0 ;;
+    mips:Linux:*:*)
+       case `sed -n '/^byte/s/^.*: \(.*\) endian/\1/p' < /proc/cpuinfo` in
+         big)    echo mips-unknown-linux-gnu && exit 0 ;;
+         little) echo mipsel-unknown-linux-gnu && exit 0 ;;
+       esac
+       ;;
+    ppc:Linux:*:*)
+       echo powerpc-unknown-linux-gnu
+       exit 0 ;;
+    ppc64:Linux:*:*)
+       echo powerpc64-unknown-linux-gnu
+       exit 0 ;;
+    alpha:Linux:*:*)
+       case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+         EV5)   UNAME_MACHINE=alphaev5 ;;
+         EV56)  UNAME_MACHINE=alphaev56 ;;
+         PCA56) UNAME_MACHINE=alphapca56 ;;
+         PCA57) UNAME_MACHINE=alphapca56 ;;
+         EV6)   UNAME_MACHINE=alphaev6 ;;
+         EV67)  UNAME_MACHINE=alphaev67 ;;
+         EV68*) UNAME_MACHINE=alphaev68 ;;
+        esac
+       objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
+       if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+       echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+       exit 0 ;;
+    parisc:Linux:*:* | hppa:Linux:*:*)
+       # Look for CPU level
+       case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+         PA7*) echo hppa1.1-unknown-linux-gnu ;;
+         PA8*) echo hppa2.0-unknown-linux-gnu ;;
+         *)    echo hppa-unknown-linux-gnu ;;
+       esac
+       exit 0 ;;
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
+       echo hppa64-unknown-linux-gnu
+       exit 0 ;;
+    s390:Linux:*:* | s390x:Linux:*:*)
+       echo ${UNAME_MACHINE}-ibm-linux
+       exit 0 ;;
+    sh*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit 0 ;;
+    sparc:Linux:*:* | sparc64:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit 0 ;;
+    x86_64:Linux:*:*)
+       echo x86_64-unknown-linux-gnu
+       exit 0 ;;
+    i*86:Linux:*:*)
        # 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
        # problems with other programs or directories called `ld' in the path.
-       ld_help_string=`cd /; ld --help 2>&1`
-       ld_supported_emulations=`echo $ld_help_string \
-                        | sed -ne '/supported emulations:/!d
+       ld_supported_targets=`cd /; ld --help 2>&1 \
+                        | sed -ne '/supported targets:/!d
                                    s/[         ][      ]*/ /g
-                                   s/.*supported emulations: *//
+                                   s/.*supported targets: *//
                                    s/ .*//
                                    p'`
-        case "$ld_supported_emulations" in
-         *ia64)
-               echo "${UNAME_MACHINE}-unknown-linux"
-               exit 0
+        case "$ld_supported_targets" in
+         elf32-i386)
+               TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
                ;;
-         i?86linux)
+         a.out-i386-linux)
                echo "${UNAME_MACHINE}-pc-linux-gnuaout"
-               exit 0
-               ;;
-         elf_i?86)
-               echo "${UNAME_MACHINE}-pc-linux"
-               exit 0
-               ;;
-         i?86coff)
+               exit 0 ;;               
+         coff-i386)
                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-gnuoldld"
-               exit 0
-               ;;
-         armelf_linux*)
-               echo "${UNAME_MACHINE}-unknown-linux-gnu"
-               exit 0
-               ;;
-         m68klinux)
-               echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
-               exit 0
-               ;;
-         elf32ppc | elf32ppclinux)
-               # Determine Lib Version
-               cat >$dummy.c <<EOF
-#include <features.h>
-#if defined(__GLIBC__)
-extern char __libc_version[];
-extern char __libc_release[];
-#endif
-main(argc, argv)
-     int argc;
-     char *argv[];
-{
-#if defined(__GLIBC__)
-  printf("%s %s\n", __libc_version, __libc_release);
-#else
-  printf("unkown\n");
-#endif
-  return 0;
-}
-EOF
-               LIBC=""
-               $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null
-               if test "$?" = 0 ; then
-                       ./$dummy | grep 1\.99 > /dev/null
-                       if test "$?" = 0 ; then
-                               LIBC="libc1"
-                       fi
-               fi
-               rm -f $dummy.c $dummy
-               echo powerpc-unknown-linux-gnu${LIBC}
-               exit 0
-               ;;
+               exit 0 ;;
+         "")
+               # Either a pre-BFD a.out linker (linux-gnuoldld) or
+               # one that does not give us useful --help.
+               echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
+               exit 0 ;;
        esac
-
-       if test "${UNAME_MACHINE}" = "alpha" ; then
-               cat <<EOF >$dummy.s
-                       .data
-               \$Lformat:
-                       .byte 37,100,45,37,120,10,0     # "%d-%x\n"
-
-                       .text
-                       .globl main
-                       .align 4
-                       .ent main
-               main:
-                       .frame \$30,16,\$26,0
-                       ldgp \$29,0(\$27)
-                       .prologue 1
-                       .long 0x47e03d80 # implver \$0
-                       lda \$2,-1
-                       .long 0x47e20c21 # amask \$2,\$1
-                       lda \$16,\$Lformat
-                       mov \$0,\$17
-                       not \$1,\$18
-                       jsr \$26,printf
-                       ldgp \$29,0(\$26)
-                       mov 0,\$16
-                       jsr \$26,exit
-                       .end main
-EOF
-               LIBC=""
-               $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
-               if test "$?" = 0 ; then
-                       case `./$dummy` in
-                       0-0)
-                               UNAME_MACHINE="alpha"
-                               ;;
-                       1-0)
-                               UNAME_MACHINE="alphaev5"
-                               ;;
-                       1-1)
-                               UNAME_MACHINE="alphaev56"
-                               ;;
-                       1-101)
-                               UNAME_MACHINE="alphapca56"
-                               ;;
-                       2-303)
-                               UNAME_MACHINE="alphaev6"
-                               ;;
-                       2-307)
-                               UNAME_MACHINE="alphaev67"
-                               ;;
-                       esac
-
-                       objdump --private-headers $dummy | \
-                         grep ld.so.1 > /dev/null
-                       if test "$?" = 0 ; then
-                               LIBC="libc1"
-                       fi
-               fi
-               rm -f $dummy.s $dummy
-               echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0
-       elif test "${UNAME_MACHINE}" = "mips" ; then
-         cat >$dummy.c <<EOF
-#ifdef __cplusplus
-#include <stdio.h>  /* for printf() prototype */
-       int main (int argc, char *argv[]) {
-#else
-       int main (argc, argv) int argc; char *argv[]; {
-#endif
-#ifdef __MIPSEB__
-  printf ("%s-unknown-linux-gnu\n", argv[1]);
-#endif
-#ifdef __MIPSEL__
-  printf ("%sel-unknown-linux-gnu\n", argv[1]);
-#endif
-  return 0;
-}
-EOF
-         $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
-         rm -f $dummy.c $dummy
-       elif test "${UNAME_MACHINE}" = "s390"; then
-         echo s390-ibm-linux && exit 0
-       else
-         # Either a pre-BFD a.out linker (linux-gnuoldld)
-         # or one that does not give us useful --help.
-         # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
-         # If ld does not provide *any* "supported emulations:"
-         # that means it is gnuoldld.
-         echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:"
-         test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
-
-         case "${UNAME_MACHINE}" in
-         i?86)
-           VENDOR=pc;
-           ;;
-         *)
-           VENDOR=unknown;
-           ;;
-         esac
-         # Determine whether the default compiler is a.out or elf
-         cat >$dummy.c <<EOF
+       # Determine whether the default compiler is a.out or elf
+       eval $set_cc_for_build
+       cat >$dummy.c <<EOF
 #include <features.h>
 #ifdef __cplusplus
 #include <stdio.h>  /* for printf() prototype */
@@ -836,28 +863,30 @@ EOF
 #ifdef __ELF__
 # ifdef __GLIBC__
 #  if __GLIBC__ >= 2
-    printf ("%s-${VENDOR}-linux-gnu\n", argv[1]);
+    printf ("%s-pc-linux-gnu\n", argv[1]);
 #  else
-    printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
+    printf ("%s-pc-linux-gnulibc1\n", argv[1]);
 #  endif
 # else
-   printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
+   printf ("%s-pc-linux-gnulibc1\n", argv[1]);
 # endif
 #else
-  printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]);
+  printf ("%s-pc-linux-gnuaout\n", argv[1]);
 #endif
   return 0;
 }
 EOF
-         $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
-         rm -f $dummy.c $dummy
-       fi ;;
-# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.  earlier versions
-# are messed up and put the nodename in both sysname and nodename.
-    i?86:DYNIX/ptx:4*:*)
+       $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0
+       rm -f $dummy.c $dummy
+       test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
+       ;;
+    i*86:DYNIX/ptx:4*:*)
+       # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+       # earlier versions are messed up and put the nodename in both
+       # sysname and nodename.
        echo i386-sequent-sysv4
        exit 0 ;;
-    i?86:UNIX_SV:4.2MP:2.*)
+    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,
@@ -865,7 +894,7 @@ EOF
         # 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.*:*)
+    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_REL}
@@ -873,16 +902,15 @@ EOF
                echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
        fi
        exit 0 ;;
-    i?86:*:5:7*)
-        # 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
+    i*86:*:5:[78]*)
+       case `/bin/uname -X | grep "^Machine"` in
+           *486*)           UNAME_MACHINE=i486 ;;
+           *Pentium)        UNAME_MACHINE=i586 ;;
+           *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+       esac
+       echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
        exit 0 ;;
-    i?86:*:3.2:*)
+    i*86:*:3.2:*)
        if test -f /usr/options/cb.name; then
                UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
                echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
@@ -900,7 +928,7 @@ EOF
                echo ${UNAME_MACHINE}-pc-sysv32
        fi
        exit 0 ;;
-    i?86:*DOS:*:*)
+    i*86:*DOS:*:*)
        echo ${UNAME_MACHINE}-pc-msdosdjgpp
        exit 0 ;;
     pc:*:*:*)
@@ -928,7 +956,7 @@ EOF
        exit 0 ;;
     M68*:*:R3V[567]*:*)
        test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
-    3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
+    3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
        OS_REL=''
        test -r /etc/.relid \
        && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
@@ -939,21 +967,24 @@ EOF
     3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
         /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
           && echo i486-ncr-sysv4 && exit 0 ;;
-    m68*:LynxOS:2.*:*)
+    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
        echo m68k-unknown-lynxos${UNAME_RELEASE}
        exit 0 ;;
     mc68030:UNIX_System_V:4.*:*)
        echo m68k-atari-sysv4
        exit 0 ;;
-    i?86:LynxOS:2.*:* | i?86:LynxOS:3.[01]*:*)
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
        echo i386-unknown-lynxos${UNAME_RELEASE}
        exit 0 ;;
     TSUNAMI:LynxOS:2.*:*)
        echo sparc-unknown-lynxos${UNAME_RELEASE}
        exit 0 ;;
-    rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*)
+    rs6000:LynxOS:2.*:*)
        echo rs6000-unknown-lynxos${UNAME_RELEASE}
        exit 0 ;;
+    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
+       echo powerpc-unknown-lynxos${UNAME_RELEASE}
+       exit 0 ;;
     SM[BE]S:UNIX_SV:*:*)
        echo mips-dde-sysv${UNAME_RELEASE}
        exit 0 ;;
@@ -971,8 +1002,8 @@ EOF
                echo ns32k-sni-sysv
        fi
        exit 0 ;;
-    PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
-                           # says <Richard.M.Bartel@ccMail.Census.GOV>
+    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+                      # says <Richard.M.Bartel@ccMail.Census.GOV>
         echo i586-unisys-sysv4
         exit 0 ;;
     *:UNIX_System_V:4*:FTX*)
@@ -984,10 +1015,14 @@ EOF
        # From seanf@swdc.stratus.com.
        echo i860-stratus-sysv4
        exit 0 ;;
+    *:VOS:*:*)
+       # From Paul.Green@stratus.com.
+       echo hppa1.1-stratus-vos
+       exit 0 ;;
     mc68*:A/UX:*:*)
        echo m68k-apple-aux${UNAME_RELEASE}
        exit 0 ;;
-    news*:NEWS-OS:*:6*)
+    news*:NEWS-OS:6*:*)
        echo mips-sony-newsos6
        exit 0 ;;
     R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
@@ -1030,20 +1065,64 @@ EOF
     *:QNX:*:4*)
        echo i386-pc-qnx
        exit 0 ;;
-    NSR-W:NONSTOP_KERNEL:*:*)
+    NSR-[KW]:NONSTOP_KERNEL:*:*)
        echo nsr-tandem-nsk${UNAME_RELEASE}
        exit 0 ;;
+    *:NonStop-UX:*:*)
+       echo mips-compaq-nonstopux
+       exit 0 ;;
     BS2000:POSIX*:*:*)
        echo bs2000-siemens-sysv
        exit 0 ;;
     DS/*:UNIX_System_V:*:*)
        echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
        exit 0 ;;
+    *:Plan9:*:*)
+       # "uname -m" is not consistent, so use $cputype instead. 386
+       # is converted to i386 for consistency with other x86
+       # operating systems.
+       if test "$cputype" = "386"; then
+           UNAME_MACHINE=i386
+       else
+           UNAME_MACHINE="$cputype"
+       fi
+       echo ${UNAME_MACHINE}-unknown-plan9
+       exit 0 ;;
+    i*86:OS/2:*:*)
+       # If we were able to find `uname', then EMX Unix compatibility
+       # is probably installed.
+       echo ${UNAME_MACHINE}-pc-os2-emx
+       exit 0 ;;
+    *:TOPS-10:*:*)
+       echo pdp10-unknown-tops10
+       exit 0 ;;
+    *:TENEX:*:*)
+       echo pdp10-unknown-tenex
+       exit 0 ;;
+    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+       echo pdp10-dec-tops20
+       exit 0 ;;
+    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+       echo pdp10-xkl-tops20
+       exit 0 ;;
+    *:TOPS-20:*:*)
+       echo pdp10-unknown-tops20
+       exit 0 ;;
+    *:ITS:*:*)
+       echo pdp10-unknown-its
+       exit 0 ;;
+    i*86:XTS-300:*:STOP)
+       echo ${UNAME_MACHINE}-unknown-stop
+       exit 0 ;;
+    i*86:atheos:*:*)
+       echo ${UNAME_MACHINE}-unknown-atheos
+       exit 0 ;;
 esac
 
 #echo '(No uname command or uname output not recognized.)' 1>&2
 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
 
+eval $set_cc_for_build
 cat >$dummy.c <<EOF
 #ifdef _SEQUENT_
 # include <sys/types.h>
@@ -1130,11 +1209,24 @@ main ()
 #endif
 
 #if defined (vax)
-#if !defined (ultrix)
-  printf ("vax-dec-bsd\n"); exit (0);
-#else
-  printf ("vax-dec-ultrix\n"); exit (0);
-#endif
+# if !defined (ultrix)
+#  include <sys/param.h>
+#  if defined (BSD)
+#   if BSD == 43
+      printf ("vax-dec-bsd4.3\n"); exit (0);
+#   else
+#    if BSD == 199006
+      printf ("vax-dec-bsd4.3reno\n"); exit (0);
+#    else
+      printf ("vax-dec-bsd\n"); exit (0);
+#    endif
+#   endif
+#  else
+    printf ("vax-dec-bsd\n"); exit (0);
+#  endif
+# else
+    printf ("vax-dec-ultrix\n"); exit (0);
+# endif
 #endif
 
 #if defined (alliant) && defined (i860)
@@ -1145,7 +1237,7 @@ main ()
 }
 EOF
 
-$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm $dummy.c $dummy && exit 0
+$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0
 rm -f $dummy.c $dummy
 
 # Apollos put the system type in the environment.
@@ -1178,6 +1270,48 @@ then
     esac
 fi
 
-#echo '(Unable to guess system type)' 1>&2
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+    ftp://ftp.gnu.org/pub/gnu/config/
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches@gnu.org> in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo               = `(hostinfo) 2>/dev/null`
+/bin/universe          = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch              = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM  = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
 
 exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
index c8e77851e69dd619632d512ff3cf4468f39b6d91..393f13d373dc87d2dbdd58b8243d27974bb5079d 100755 (executable)
@@ -1,8 +1,10 @@
 #! /bin/sh
-# Configuration validation subroutine script, version 1.1.
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
+# Configuration validation subroutine script.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
 #   Free Software Foundation, Inc.
-#
+
+timestamp='2001-09-07'
+
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
 # can handle that machine.  It does not imply ALL GNU software can.
@@ -27,7 +29,6 @@
 # configuration script generated by Autoconf, you may include it under
 # the same distribution terms that you use for the rest of that program.
 
-# Written by Per Bothner <bothner@cygnus.com>.
 # Please send patches to <config-patches@gnu.org>.
 #
 # Configuration subroutine to validate and canonicalize a configuration type.
 #      CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
 # It is wrong to echo any other type of specification.
 
-if [ x$1 = x ]
-then
-       echo Configuration name missing. 1>&2
-       echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
-       echo "or     $0 ALIAS" 1>&2
-       echo where ALIAS is a recognized configuration type. 1>&2
-       exit 1
-fi
+me=`echo "$0" | sed -e 's,.*/,,'`
 
-# First pass through any local machine types.
-case $1 in
-       *local*)
-               echo $1
-               exit 0
-               ;;
-       *)
-       ;;
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+       $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit 0 ;;
+    --version | -v )
+       echo "$version" ; exit 0 ;;
+    --help | --h* | -h )
+       echo "$usage"; exit 0 ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )        # Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help"
+       exit 1 ;;
+
+    *local*)
+       # First pass through any local machine types.
+       echo $1
+       exit 0;;
+
+    * )
+       break ;;
+  esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+    exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+    exit 1;;
 esac
 
 # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
 # Here we must recognize all the valid KERNEL-OS combinations.
 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
 case $maybe_os in
-  nto-qnx* | linux-gnu*)
+  nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-*)
     os=-$maybe_os
     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
     ;;
@@ -99,7 +143,7 @@ case $os in
        -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
        -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
        -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-       -apple)
+       -apple | -axis)
                os=
                basic_machine=$1
                ;;
@@ -113,6 +157,14 @@ case $os in
                os=-vxworks
                basic_machine=$1
                ;;
+       -chorusos*)
+               os=-chorusos
+               basic_machine=$1
+               ;;
+       -chorusrdb)
+               os=-chorusrdb
+               basic_machine=$1
+               ;;
        -hiux*)
                os=-hiuxwe2
                ;;
@@ -171,30 +223,50 @@ esac
 case $basic_machine in
        # Recognize the basic CPU types without company name.
        # Some are omitted here because they have special meanings below.
-       tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
-               | arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \
-               | 580 | i960 | h8300 \
-               | x86 | ppcbe | mipsbe | mipsle | shbe | shle | armbe | armle \
-               | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
-               | hppa64 \
-               | alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \
-               | alphaev6[78] \
-               | we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \
-               | 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \
-               | mips64orion | mips64orionel | mipstx39 | mipstx39el \
-               | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
-               | mips64vr5000 | miprs64vr5000el | mcore \
-               | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \
-               | thumb | d10v | fr30 | avr)
+       1750a | 580 \
+       | a29k \
+       | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+       | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
+       | c4x | clipper \
+       | d10v | d30v | dsp16xx \
+       | fr30 \
+       | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+       | i370 | i860 | i960 | ia64 \
+       | m32r | m68000 | m68k | m88k | mcore \
+       | mips16 | mips64 | mips64el | mips64orion | mips64orionel \
+       | mips64vr4100 | mips64vr4100el | mips64vr4300 \
+       | mips64vr4300el | mips64vr5000 | mips64vr5000el \
+       | mipsbe | mipseb | mipsel | mipsle | mipstx39 | mipstx39el \
+       | mipsisa32 \
+       | mn10200 | mn10300 \
+       | ns16k | ns32k \
+       | openrisc \
+       | pdp10 | pdp11 | pj | pjl \
+       | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+       | pyramid \
+       | s390 | s390x \
+       | sh | sh[34] | sh[34]eb | shbe | shle \
+       | sparc | sparc64 | sparclet | sparclite | sparcv9 | sparcv9b \
+       | stormy16 | strongarm \
+       | tahoe | thumb | tic80 | tron \
+       | v850 \
+       | we32k \
+       | x86 | xscale \
+       | z8k)
                basic_machine=$basic_machine-unknown
                ;;
-       m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65 | pj | pjl)
+       m6811 | m68hc11 | m6812 | m68hc12)
+               # Motorola 68HC11/12.
+               basic_machine=$basic_machine-unknown
+               os=-none
+               ;;
+       m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
                ;;
 
        # We use `pc' rather than `unknown'
        # because (1) that's what they normally are, and
        # (2) the word "unknown" tends to confuse beginning users.
-       i[34567]86)
+       i*86 | x86_64)
          basic_machine=$basic_machine-pc
          ;;
        # Object if more than one company name word.
@@ -203,28 +275,43 @@ case $basic_machine in
                exit 1
                ;;
        # Recognize the basic CPU types with company name.
-       # 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-* \
-             | xmp-* | ymp-* \
-             | x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* | armbe-* | armle-* \
-             | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \
-             | hppa2.0n-* | hppa64-* \
-             | alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \
-             | alphaev6[78]-* \
-             | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
-             | clipper-* | orion-* \
-             | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
-             | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \
-             | mips64el-* | mips64orion-* | mips64orionel-* \
-             | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
-             | mipstx39-* | mipstx39el-* | mcore-* \
-             | f301-* | armv*-* | s390-* | sv1-* | t3e-* \
-             | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
-             | thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* \
-             | bs2000-*)
+       580-* \
+       | a29k-* \
+       | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+       | alphapca5[67]-* | arc-* \
+       | arm-*  | armbe-* | armle-* | armv*-* \
+       | bs2000-* \
+       | c[123]* | c30-* | [cjt]90-* | c54x-* \
+       | clipper-* | cray2-* | cydra-* \
+       | d10v-* | d30v-* \
+       | elxsi-* \
+       | f30[01]-* | f700-* | fr30-* | fx80-* \
+       | h8300-* | h8500-* \
+       | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+       | i*86-* | i860-* | i960-* | ia64-* \
+       | m32r-* \
+       | m68000-* | m680[01234]0-* | m68360-* | m683?2-* | m68k-* \
+       | m88110-* | m88k-* | mcore-* \
+       | mips-* | mips16-* | mips64-* | mips64el-* | mips64orion-* \
+       | mips64orionel-* | mips64vr4100-* | mips64vr4100el-* \
+       | mips64vr4300-* | mips64vr4300el-* | mipsbe-* | mipseb-* \
+       | mipsle-* | mipsel-* | mipstx39-* | mipstx39el-* \
+       | none-* | np1-* | ns16k-* | ns32k-* \
+       | orion-* \
+       | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+       | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+       | pyramid-* \
+       | romp-* | rs6000-* \
+       | s390-* | s390x-* \
+       | sh-* | sh[34]-* | sh[34]eb-* | shbe-* | shle-* \
+       | sparc-* | sparc64-* | sparc86x-* | sparclite-* \
+       | sparcv9-* | sparcv9b-* | stormy16-* | strongarm-* | sv1-* \
+       | t3e-* | tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \
+       | v850-* | vax-* \
+       | we32k-* \
+       | x86-* | x86_64-* | xmp-* | xps100-* | xscale-* \
+       | ymp-* \
+       | z8k-*)
                ;;
        # Recognize the various machine names and aliases which stand
        # for a CPU type and a company and sometimes even an OS.
@@ -261,14 +348,14 @@ case $basic_machine in
                os=-sysv
                ;;
        amiga | amiga-*)
-               basic_machine=m68k-cbm
+               basic_machine=m68k-unknown
                ;;
        amigaos | amigados)
-               basic_machine=m68k-cbm
+               basic_machine=m68k-unknown
                os=-amigaos
                ;;
        amigaunix | amix)
-               basic_machine=m68k-cbm
+               basic_machine=m68k-unknown
                os=-sysv4
                ;;
        apollo68)
@@ -315,13 +402,16 @@ case $basic_machine in
                basic_machine=cray2-cray
                os=-unicos
                ;;
-       [ctj]90-cray)
-               basic_machine=c90-cray
+       [cjt]90)
+               basic_machine=${basic_machine}-cray
                os=-unicos
                ;;
        crds | unos)
                basic_machine=m68k-crds
                ;;
+       cris | cris-* | etrax*)
+               basic_machine=cris-axis
+               ;;
        da30 | da30-*)
                basic_machine=m68k-da30
                ;;
@@ -369,6 +459,10 @@ case $basic_machine in
                basic_machine=tron-gmicro
                os=-sysv
                ;;
+       go32)
+               basic_machine=i386-pc
+               os=-go32
+               ;;
        h3050r* | hiux*)
                basic_machine=hppa1.1-hitachi
                os=-hiuxwe2
@@ -444,19 +538,19 @@ case $basic_machine in
                basic_machine=i370-ibm
                ;;
 # I'm not sure what "Sysv32" means.  Should this be sysv3.2?
-       i[34567]86v32)
+       i*86v32)
                basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
                os=-sysv32
                ;;
-       i[34567]86v4*)
+       i*86v4*)
                basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
                os=-sysv4
                ;;
-       i[34567]86v)
+       i*86v)
                basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
                os=-sysv
                ;;
-       i[34567]86sol2)
+       i*86sol2)
                basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
                os=-solaris2
                ;;
@@ -468,14 +562,6 @@ case $basic_machine in
                basic_machine=i386-unknown
                os=-vsta
                ;;
-       i386-go32 | go32)
-               basic_machine=i386-unknown
-               os=-go32
-               ;;
-       i386-mingw32 | mingw32)
-               basic_machine=i386-unknown
-               os=-mingw32
-               ;;
        iris | iris4d)
                basic_machine=mips-sgi
                case $os in
@@ -501,6 +587,10 @@ case $basic_machine in
                basic_machine=ns32k-utek
                os=-sysv
                ;;
+       mingw32)
+               basic_machine=i386-pc
+               os=-mingw32
+               ;;
        miniframe)
                basic_machine=m68000-convergent
                ;;
@@ -531,7 +621,7 @@ case $basic_machine in
                os=-coff
                ;;
        msdos)
-               basic_machine=i386-unknown
+               basic_machine=i386-pc
                os=-msdos
                ;;
        mvs)
@@ -595,6 +685,10 @@ case $basic_machine in
                basic_machine=i960-intel
                os=-mon960
                ;;
+       nonstopux)
+               basic_machine=mips-compaq
+               os=-nonstopux
+               ;;
        np1)
                basic_machine=np1-gould
                ;;
@@ -630,28 +724,28 @@ case $basic_machine in
         pc532 | pc532-*)
                basic_machine=ns32k-pc532
                ;;
-       pentium | p5 | k5 | k6 | nexen)
+       pentium | p5 | k5 | k6 | nexgen)
                basic_machine=i586-pc
                ;;
-       pentiumpro | p6 | 6x86)
+       pentiumpro | p6 | 6x86 | athlon)
                basic_machine=i686-pc
                ;;
        pentiumii | pentium2)
-               basic_machine=i786-pc
+               basic_machine=i686-pc
                ;;
-       pentium-* | p5-* | k5-* | k6-* | nexen-*)
+       pentium-* | p5-* | k5-* | k6-* | nexgen-*)
                basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
                ;;
-       pentiumpro-* | p6-* | 6x86-*)
+       pentiumpro-* | p6-* | 6x86-* | athlon-*)
                basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
                ;;
        pentiumii-* | pentium2-*)
-               basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+               basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
                ;;
        pn)
                basic_machine=pn-gould
                ;;
-       power)  basic_machine=rs6000-ibm
+       power)  basic_machine=power-ibm
                ;;
        ppc)    basic_machine=powerpc-unknown
                ;;
@@ -663,9 +757,23 @@ case $basic_machine in
        ppcle-* | powerpclittle-*)
                basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
                ;;
+       ppc64)  basic_machine=powerpc64-unknown
+               ;;
+       ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+               basic_machine=powerpc64le-unknown
+               ;;
+       ppc64le-* | powerpc64little-*)
+               basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
        ps2)
                basic_machine=i386-ibm
                ;;
+       pw32)
+               basic_machine=i586-unknown
+               os=-pw32
+               ;;
        rom68k)
                basic_machine=m68k-rom68k
                os=-coff
@@ -757,6 +865,10 @@ case $basic_machine in
                basic_machine=t3e-cray
                os=-unicos
                ;;
+       tic54x | c54x*)
+               basic_machine=tic54x-unknown
+               os=-coff
+               ;;
        tx39)
                basic_machine=mipstx39-unknown
                ;;
@@ -809,6 +921,10 @@ case $basic_machine in
                basic_machine=hppa1.1-winbond
                os=-proelf
                ;;
+       windows32)
+               basic_machine=i386-pc
+               os=-windows32-msvcrt
+               ;;
        xmp)
                basic_machine=xmp-cray
                os=-unicos
@@ -852,13 +968,20 @@ case $basic_machine in
        vax)
                basic_machine=vax-dec
                ;;
+       pdp10)
+               # there are many clones, so DEC is not a safe bet
+               basic_machine=pdp10-unknown
+               ;;
        pdp11)
                basic_machine=pdp11-dec
                ;;
        we32k)
                basic_machine=we32k-att
                ;;
-       sparc | sparcv9)
+       sh3 | sh4 | sh3eb | sh4eb)
+               basic_machine=sh-unknown
+               ;;
+       sparc | sparcv9 | sparcv9b)
                basic_machine=sparc-sun
                ;;
         cydra)
@@ -880,6 +1003,9 @@ case $basic_machine in
                basic_machine=c4x-none
                os=-coff
                ;;
+       *-unknown)
+               # Make sure to match an already-canonicalized machine name.
+               ;;
        *)
                echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
                exit 1
@@ -936,15 +1062,18 @@ case $os in
              | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
              | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
              | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+             | -chorusos* | -chorusrdb* \
              | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
              | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
              | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
-             | -openstep* | -oskit*)
+             | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+             | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+             | -os2* | -vos*)
        # Remember, each alternative MUST END IN *, to match a version number.
                ;;
        -qnx*)
                case $basic_machine in
-                   x86-* | i[34567]86-*)
+                   x86-* | i*86-*)
                        ;;
                    *)
                        os=-nto$os
@@ -1000,7 +1129,7 @@ case $os in
        -ns2 )
                os=-nextstep2
                ;;
-       -nsk)
+       -nsk*)
                os=-nsk
                ;;
        # Preserve the version number of sinix5.
@@ -1037,7 +1166,7 @@ case $os in
        -xenix)
                os=-xenix
                ;;
-        -*mint | -*MiNT)
+        -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
                os=-mint
                ;;
        -none)
@@ -1071,6 +1200,9 @@ case $basic_machine in
        arm*-semi)
                os=-aout
                ;;
+       pdp10-*)
+               os=-tops20
+               ;;
         pdp11-*)
                os=-none
                ;;
@@ -1179,7 +1311,7 @@ case $basic_machine in
        *-masscomp)
                os=-rtu
                ;;
-       f301-fujitsu)
+       f30[01]-fujitsu | f700-fujitsu)
                os=-uxpv
                ;;
        *-rom68k)
@@ -1257,12 +1389,23 @@ case $basic_machine in
                        -mpw* | -macos*)
                                vendor=apple
                                ;;
-                       -*mint | -*MiNT)
+                       -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
                                vendor=atari
                                ;;
+                       -vos*)
+                               vendor=stratus
+                               ;;
                esac
                basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
                ;;
 esac
 
 echo $basic_machine$os
+exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
index 1bfe2d07e14df6e0180c31166e640b671cefc1ca..bda0b6f72b3f080f896b3f09004c68ac35125bc0 100644 (file)
@@ -19,7 +19,7 @@ dnl search for true and false programs.
 AC_PATH_PROGS(TRUEPRG, true, :)
 AC_PATH_PROGS(FALSEPRG, false, :)
 
-dnl AC_CANONICAL_HOST
+AC_CANONICAL_HOST
 
 dnl bacula version
 VERSION=`sed -n -e 's/^.*VERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
index 61180712137d240fa6e47df1093a3ae006274f85..9926b4ebfdd385c8aaf3a20e39e29b4402b8915d 100755 (executable)
@@ -707,6 +707,33 @@ test -n "$FALSEPRG" || FALSEPRG=":"
 
 
 
+# Make sure we can run config.sub.
+if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
+else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking host system type""... $ac_c" 1>&6
+echo "configure:717: checking host system type" >&5
+
+host_alias=$host
+case "$host_alias" in
+NONE)
+  case $nonopt in
+  NONE)
+    if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
+    else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
+    fi ;;
+  *) host_alias=$nonopt ;;
+  esac ;;
+esac
+
+host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
+host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$host" 1>&6
+
+
 VERSION=`sed -n -e 's/^.*VERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
 DATE=`sed -n -e 's/^.* \t*BDATE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
 LSMDATE=`sed -n -e 's/^.*LSMDATE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
@@ -717,7 +744,7 @@ echo "configuring for bacula $VERSION ($DATE)"
 # Extract the first word of "gcc", so it can be a program name with args.
 set dummy gcc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:721: checking for $ac_word" >&5
+echo "configure:748: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -747,7 +774,7 @@ if test -z "$CC"; then
   # Extract the first word of "cc", so it can be a program name with args.
 set dummy cc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:751: checking for $ac_word" >&5
+echo "configure:778: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -798,7 +825,7 @@ fi
       # Extract the first word of "cl", so it can be a program name with args.
 set dummy cl; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:802: checking for $ac_word" >&5
+echo "configure:829: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -830,7 +857,7 @@ fi
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:834: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:861: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
 
 ac_ext=c
 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -841,12 +868,12 @@ cross_compiling=$ac_cv_prog_cc_cross
 
 cat > conftest.$ac_ext << EOF
 
-#line 845 "configure"
+#line 872 "configure"
 #include "confdefs.h"
 
 main(){return(0);}
 EOF
-if { (eval echo configure:850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   ac_cv_prog_cc_works=yes
   # If we can't run a trivial program, we are probably using a cross compiler.
   if (./conftest; exit) 2>/dev/null; then
@@ -872,12 +899,12 @@ if test $ac_cv_prog_cc_works = no; then
   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
 fi
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:876: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:903: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
 cross_compiling=$ac_cv_prog_cc_cross
 
 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:881: checking whether we are using GNU C" >&5
+echo "configure:908: checking whether we are using GNU C" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -886,7 +913,7 @@ else
   yes;
 #endif
 EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:890: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:917: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
   ac_cv_prog_gcc=yes
 else
   ac_cv_prog_gcc=no
@@ -905,7 +932,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
 ac_save_CFLAGS="$CFLAGS"
 CFLAGS=
 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:909: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:936: checking whether ${CC-cc} accepts -g" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -941,7 +968,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:945: checking for $ac_word" >&5
+echo "configure:972: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -973,7 +1000,7 @@ test -n "$CXX" || CXX="gcc"
 
 
 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:977: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
+echo "configure:1004: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
 
 ac_ext=C
 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -984,12 +1011,12 @@ cross_compiling=$ac_cv_prog_cxx_cross
 
 cat > conftest.$ac_ext << EOF
 
-#line 988 "configure"
+#line 1015 "configure"
 #include "confdefs.h"
 
 int main(){return(0);}
 EOF
-if { (eval echo configure:993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   ac_cv_prog_cxx_works=yes
   # If we can't run a trivial program, we are probably using a cross compiler.
   if (./conftest; exit) 2>/dev/null; then
@@ -1015,12 +1042,12 @@ if test $ac_cv_prog_cxx_works = no; then
   { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
 fi
 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:1019: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1046: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
 cross_compiling=$ac_cv_prog_cxx_cross
 
 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
-echo "configure:1024: checking whether we are using GNU C++" >&5
+echo "configure:1051: checking whether we are using GNU C++" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1029,7 +1056,7 @@ else
   yes;
 #endif
 EOF
-if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1033: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1060: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
   ac_cv_prog_gxx=yes
 else
   ac_cv_prog_gxx=no
@@ -1048,7 +1075,7 @@ ac_test_CXXFLAGS="${CXXFLAGS+set}"
 ac_save_CXXFLAGS="$CXXFLAGS"
 CXXFLAGS=
 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
-echo "configure:1052: checking whether ${CXX-g++} accepts -g" >&5
+echo "configure:1079: checking whether ${CXX-g++} accepts -g" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1089,7 +1116,7 @@ for ac_declaration in \
    'void exit (int);'
 do
   cat > conftest.$ac_ext <<EOF
-#line 1093 "configure"
+#line 1120 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 $ac_declaration
@@ -1097,7 +1124,7 @@ int main() {
 exit (42);
 ; return 0; }
 EOF
-if { (eval echo configure:1101: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1128: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   :
 else
   echo "configure: failed program was:" >&5
@@ -1107,14 +1134,14 @@ else
 fi
 rm -f conftest*
   cat > conftest.$ac_ext <<EOF
-#line 1111 "configure"
+#line 1138 "configure"
 #include "confdefs.h"
 $ac_declaration
 int main() {
 exit (42);
 ; return 0; }
 EOF
-if { (eval echo configure:1118: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1145: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   break
 else
@@ -1132,10 +1159,10 @@ fi
 
 if test "x$CC" != xcc; then
   echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
-echo "configure:1136: checking whether $CC and cc understand -c and -o together" >&5
+echo "configure:1163: checking whether $CC and cc understand -c and -o together" >&5
 else
   echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
-echo "configure:1139: checking whether cc understands -c and -o together" >&5
+echo "configure:1166: checking whether cc understands -c and -o together" >&5
 fi
 set dummy $CC; ac_cc="`echo $2 |
                       sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
@@ -1147,16 +1174,16 @@ else
 # We do the test twice because some compilers refuse to overwrite an
 # existing .o file with -o, though they will create one.
 ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
-if { (eval echo configure:1151: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
-   test -f conftest.o && { (eval echo configure:1152: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
+if { (eval echo configure:1178: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
+   test -f conftest.o && { (eval echo configure:1179: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
 then
   eval ac_cv_prog_cc_${ac_cc}_c_o=yes
   if test "x$CC" != xcc; then
     # Test first that cc exists at all.
-    if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1157: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
+    if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1184: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
       ac_try='cc -c conftest.c -o conftest.o 1>&5'
-      if { (eval echo configure:1159: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
-        test -f conftest.o && { (eval echo configure:1160: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
+      if { (eval echo configure:1186: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
+        test -f conftest.o && { (eval echo configure:1187: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
       then
         # cc works too.
         :
@@ -1182,7 +1209,7 @@ EOF
 
 fi
                        echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1186: checking how to run the C preprocessor" >&5
+echo "configure:1213: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -1197,13 +1224,13 @@ else
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp.
   cat > conftest.$ac_ext <<EOF
-#line 1201 "configure"
+#line 1228 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1207: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1234: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -1214,13 +1241,13 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 1218 "configure"
+#line 1245 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1224: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1251: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -1231,13 +1258,13 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -nologo -E"
   cat > conftest.$ac_ext <<EOF
-#line 1235 "configure"
+#line 1262 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1241: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1268: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -1263,13 +1290,13 @@ echo "$ac_t""$CPP" 1>&6
 
 if test $ac_cv_prog_gcc = yes; then
     echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
-echo "configure:1267: checking whether ${CC-cc} needs -traditional" >&5
+echo "configure:1294: checking whether ${CC-cc} needs -traditional" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
     ac_pattern="Autoconf.*'x'"
   cat > conftest.$ac_ext <<EOF
-#line 1273 "configure"
+#line 1300 "configure"
 #include "confdefs.h"
 #include <sgtty.h>
 Autoconf TIOCGETP
@@ -1287,7 +1314,7 @@ rm -f conftest*
 
   if test $ac_cv_prog_gcc_traditional = no; then
     cat > conftest.$ac_ext <<EOF
-#line 1291 "configure"
+#line 1318 "configure"
 #include "confdefs.h"
 #include <termio.h>
 Autoconf TCGETA
@@ -1328,7 +1355,7 @@ fi
 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
 # ./install, which can be erroneously created by make from ./install.sh.
 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:1332: checking for a BSD compatible install" >&5
+echo "configure:1359: checking for a BSD compatible install" >&5
 if test -z "$INSTALL"; then
 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1383,7 +1410,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 # Extract the first word of "ranlib", so it can be a program name with args.
 set dummy ranlib; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1387: checking for $ac_word" >&5
+echo "configure:1414: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1413,7 +1440,7 @@ fi
 # Extract the first word of "mv", so it can be a program name with args.
 set dummy mv; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1417: checking for $ac_word" >&5
+echo "configure:1444: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_MV'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1449,7 +1476,7 @@ fi
 # Extract the first word of "rm", so it can be a program name with args.
 set dummy rm; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1453: checking for $ac_word" >&5
+echo "configure:1480: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_RM'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1485,7 +1512,7 @@ fi
 # Extract the first word of "cp", so it can be a program name with args.
 set dummy cp; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1489: checking for $ac_word" >&5
+echo "configure:1516: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_CP'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1521,7 +1548,7 @@ fi
 # Extract the first word of "sed", so it can be a program name with args.
 set dummy sed; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1525: checking for $ac_word" >&5
+echo "configure:1552: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_SED'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1557,7 +1584,7 @@ fi
 # Extract the first word of "awk", so it can be a program name with args.
 set dummy awk; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1561: checking for $ac_word" >&5
+echo "configure:1588: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_AWK'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1593,7 +1620,7 @@ fi
 # Extract the first word of "echo", so it can be a program name with args.
 set dummy echo; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1597: checking for $ac_word" >&5
+echo "configure:1624: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_ECHO'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1629,7 +1656,7 @@ fi
 # Extract the first word of "cmp", so it can be a program name with args.
 set dummy cmp; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1633: checking for $ac_word" >&5
+echo "configure:1660: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_CMP'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1665,7 +1692,7 @@ fi
 # Extract the first word of "tbl", so it can be a program name with args.
 set dummy tbl; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1669: checking for $ac_word" >&5
+echo "configure:1696: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_TBL'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1701,7 +1728,7 @@ fi
 # Extract the first word of "ar", so it can be a program name with args.
 set dummy ar; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1705: checking for $ac_word" >&5
+echo "configure:1732: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_AR'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1737,7 +1764,7 @@ fi
 # Extract the first word of "ranlib", so it can be a program name with args.
 set dummy ranlib; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1741: checking for $ac_word" >&5
+echo "configure:1768: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_RANLIB'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1773,7 +1800,7 @@ fi
 # Extract the first word of "openssl", so it can be a program name with args.
 set dummy openssl; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1777: checking for $ac_word" >&5
+echo "configure:1804: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_OPENSSL'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1809,7 +1836,7 @@ fi
 # Extract the first word of "mtx", so it can be a program name with args.
 set dummy mtx; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1813: checking for $ac_word" >&5
+echo "configure:1840: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_MTX'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1845,7 +1872,7 @@ fi
 # Extract the first word of "pkg-config", so it can be a program name with args.
 set dummy pkg-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1849: checking for $ac_word" >&5
+echo "configure:1876: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_PKGCONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1893,14 +1920,14 @@ MAKE_SHELL=/bin/sh
 
 
 echo $ac_n "checking for Operating System""... $ac_c" 1>&6
-echo "configure:1897: checking for Operating System" >&5
+echo "configure:1924: checking for Operating System" >&5
 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:1899: checking for Cygwin environment" >&5
+echo "configure:1926: checking for Cygwin environment" >&5
 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1904 "configure"
+#line 1931 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -1911,7 +1938,7 @@ int main() {
 return __CYGWIN__;
 ; return 0; }
 EOF
-if { (eval echo configure:1915: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1942: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_cygwin=yes
 else
@@ -2257,7 +2284,7 @@ echo "$ac_t""" "" 1>&6
 # -----------------------------------------------------------
 # ----------------------------------------------------------
 echo $ac_n "checking for Operating System Distribution""... $ac_c" 1>&6
-echo "configure:2261: checking for Operating System Distribution" >&5
+echo "configure:2288: checking for Operating System Distribution" >&5
 if test "x$DISTNAME" != "x"
 then
         echo "distname set to $DISTNAME"
@@ -2386,7 +2413,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2390: checking for $ac_word" >&5
+echo "configure:2417: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2530,7 +2557,7 @@ fi
             # Extract the first word of "gnome-config", so it can be a program name with args.
 set dummy gnome-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2534: checking for $ac_word" >&5
+echo "configure:2561: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_GNOME_CONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2567,7 +2594,7 @@ fi
               no_gnome_config="yes"
             else
               echo $ac_n "checking if $GNOME_CONFIG works""... $ac_c" 1>&6
-echo "configure:2571: checking if $GNOME_CONFIG works" >&5
+echo "configure:2598: checking if $GNOME_CONFIG works" >&5
               if $GNOME_CONFIG --libs-only-l gnome >/dev/null 2>&1; then
                 echo "$ac_t""yes" 1>&6
                 
@@ -2575,7 +2602,7 @@ echo "configure:2571: checking if $GNOME_CONFIG works" >&5
         # Extract the first word of "orbit-config", so it can be a program name with args.
 set dummy orbit-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2579: checking for $ac_word" >&5
+echo "configure:2606: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_ORBIT_CONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2611,7 +2638,7 @@ fi
         # Extract the first word of "orbit-idl", so it can be a program name with args.
 set dummy orbit-idl; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2615: checking for $ac_word" >&5
+echo "configure:2642: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_ORBIT_IDL'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2645,7 +2672,7 @@ else
 fi
 
         echo $ac_n "checking for working ORBit environment""... $ac_c" 1>&6
-echo "configure:2649: checking for working ORBit environment" >&5
+echo "configure:2676: checking for working ORBit environment" >&5
 if eval "test \"`echo '$''{'gnome_cv_orbit_found'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2681,7 +2708,7 @@ fi
         fi
 
         echo $ac_n "checking for gnorba libraries""... $ac_c" 1>&6
-echo "configure:2685: checking for gnorba libraries" >&5
+echo "configure:2712: checking for gnorba libraries" >&5
 if eval "test \"`echo '$''{'gnome_cv_gnorba_found'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2745,7 +2772,7 @@ fi
         
             if test "$no_gnome_config" = "yes"; then
               echo $ac_n "checking for gnomeConf.sh file in $gnome_prefix""... $ac_c" 1>&6
-echo "configure:2749: checking for gnomeConf.sh file in $gnome_prefix" >&5
+echo "configure:2776: checking for gnomeConf.sh file in $gnome_prefix" >&5
               if test -f $gnome_prefix/gnomeConf.sh; then
                 echo "$ac_t""found" 1>&6
                 echo "loading gnome configuration from" \
@@ -2765,7 +2792,7 @@ echo "configure:2749: checking for gnomeConf.sh file in $gnome_prefix" >&5
           n=""
           for i in $n; do
             echo $ac_n "checking extra library \"$i\"""... $ac_c" 1>&6
-echo "configure:2769: checking extra library \"$i\"" >&5
+echo "configure:2796: checking extra library \"$i\"" >&5
             case $i in 
               applets)
                 
@@ -2952,17 +2979,17 @@ if test "${with_readline+set}" = set; then
          fi
          ac_safe=`echo "${with_readline}/readline.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for ${with_readline}/readline.h""... $ac_c" 1>&6
-echo "configure:2956: checking for ${with_readline}/readline.h" >&5
+echo "configure:2983: checking for ${with_readline}/readline.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2961 "configure"
+#line 2988 "configure"
 #include "confdefs.h"
 #include <${with_readline}/readline.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2966: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2993: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3000,17 +3027,17 @@ else
        # check for standard readline library
        ac_safe=`echo "/usr/include/readline/readline.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for /usr/include/readline/readline.h""... $ac_c" 1>&6
-echo "configure:3004: checking for /usr/include/readline/readline.h" >&5
+echo "configure:3031: checking for /usr/include/readline/readline.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3009 "configure"
+#line 3036 "configure"
 #include "confdefs.h"
 #include </usr/include/readline/readline.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3014: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3041: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3040,17 +3067,17 @@ else
           # Did not find standard library, so try Bacula's default
            ac_safe=`echo "${TOP_DIR}/depkgs/readline/readline.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for ${TOP_DIR}/depkgs/readline/readline.h""... $ac_c" 1>&6
-echo "configure:3044: checking for ${TOP_DIR}/depkgs/readline/readline.h" >&5
+echo "configure:3071: checking for ${TOP_DIR}/depkgs/readline/readline.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3049 "configure"
+#line 3076 "configure"
 #include "confdefs.h"
 #include <${TOP_DIR}/depkgs/readline/readline.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3054: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3081: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3102,12 +3129,12 @@ MAKE_SHELL=/bin/sh
 
 
 echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
-echo "configure:3106: checking whether stat file-mode macros are broken" >&5
+echo "configure:3133: checking whether stat file-mode macros are broken" >&5
 if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3111 "configure"
+#line 3138 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -3162,12 +3189,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
-echo "configure:3166: checking for $ac_hdr that defines DIR" >&5
+echo "configure:3193: checking for $ac_hdr that defines DIR" >&5
 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3171 "configure"
+#line 3198 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <$ac_hdr>
@@ -3175,7 +3202,7 @@ int main() {
 DIR *dirp = 0;
 ; return 0; }
 EOF
-if { (eval echo configure:3179: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3206: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   eval "ac_cv_header_dirent_$ac_safe=yes"
 else
@@ -3200,7 +3227,7 @@ done
 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
 if test $ac_header_dirent = dirent.h; then
 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
-echo "configure:3204: checking for opendir in -ldir" >&5
+echo "configure:3231: checking for opendir in -ldir" >&5
 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3208,7 +3235,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldir  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3212 "configure"
+#line 3239 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3219,7 +3246,7 @@ int main() {
 opendir()
 ; return 0; }
 EOF
-if { (eval echo configure:3223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3241,7 +3268,7 @@ fi
 
 else
 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:3245: checking for opendir in -lx" >&5
+echo "configure:3272: checking for opendir in -lx" >&5
 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3249,7 +3276,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lx  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3253 "configure"
+#line 3280 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3260,7 +3287,7 @@ int main() {
 opendir()
 ; return 0; }
 EOF
-if { (eval echo configure:3264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3286,12 +3313,12 @@ fi
 for ac_func in strcasecmp select setenv putenv tcgetattr setlocale lstat lchown
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3290: checking for $ac_func" >&5
+echo "configure:3317: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3295 "configure"
+#line 3322 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -3314,7 +3341,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -3341,12 +3368,12 @@ done
 for ac_func in nanosleep
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3345: checking for $ac_func" >&5
+echo "configure:3372: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3350 "configure"
+#line 3377 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -3369,7 +3396,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -3399,12 +3426,12 @@ done
 #    EXTRAOBJ="$EXTRAOBJ lib/getopt.o lib/getopt1.o"])
 
 echo $ac_n "checking for getopt_long""... $ac_c" 1>&6
-echo "configure:3403: checking for getopt_long" >&5
+echo "configure:3430: checking for getopt_long" >&5
 if eval "test \"`echo '$''{'ac_cv_func_getopt_long'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3408 "configure"
+#line 3435 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char getopt_long(); below.  */
@@ -3427,7 +3454,7 @@ getopt_long();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_getopt_long=yes"
 else
@@ -3452,7 +3479,7 @@ fi
 
 
 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
-echo "configure:3456: checking for working strcoll" >&5
+echo "configure:3483: checking for working strcoll" >&5
 if eval "test \"`echo '$''{'ac_cv_func_strcoll_works'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3460,7 +3487,7 @@ else
   ac_cv_func_strcoll_works=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 3464 "configure"
+#line 3491 "configure"
 #include "confdefs.h"
 #include <string.h>
 main ()
@@ -3470,7 +3497,7 @@ main ()
        strcoll ("123", "456") >= 0);
 }
 EOF
-if { (eval echo configure:3474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_func_strcoll_works=yes
 else
@@ -3498,17 +3525,17 @@ for ac_hdr in varargs.h \
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3502: checking for $ac_hdr" >&5
+echo "configure:3529: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3507 "configure"
+#line 3534 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3512: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3539: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3673,9 +3700,9 @@ if test "${with_tcp_wrappers+set}" = set; then
        saved_LIBS="$LIBS"
        LIBS="$LIBS -lwrap -lnsl"
        echo $ac_n "checking for libwrap""... $ac_c" 1>&6
-echo "configure:3677: checking for libwrap" >&5
+echo "configure:3704: checking for libwrap" >&5
        cat > conftest.$ac_ext <<EOF
-#line 3679 "configure"
+#line 3706 "configure"
 #include "confdefs.h"
  #include <tcpd.h>
             int deny_severity = 0;
@@ -3685,7 +3712,7 @@ int main() {
  hosts_access(req); 
 ; return 0; }
 EOF
-if { (eval echo configure:3689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   
            echo "$ac_t""yes" 1>&6
@@ -3957,7 +3984,7 @@ fi
 
 db_found=no
 echo $ac_n "checking for MySQL support""... $ac_c" 1>&6
-echo "configure:3961: checking for MySQL support" >&5
+echo "configure:3988: checking for MySQL support" >&5
 # Check whether --with-mysql or --without-mysql was given.
 if test "${with_mysql+set}" = set; then
   withval="$with_mysql"
@@ -4114,7 +4141,7 @@ fi
 
 db_found=no
 echo $ac_n "checking for SQLite support""... $ac_c" 1>&6
-echo "configure:4118: checking for SQLite support" >&5
+echo "configure:4145: checking for SQLite support" >&5
 # Check whether --with-sqlite or --without-sqlite was given.
 if test "${with_sqlite+set}" = set; then
   withval="$with_sqlite"
@@ -4190,19 +4217,19 @@ fi
 
 
 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:4194: checking for mingw32 environment" >&5
+echo "configure:4221: checking for mingw32 environment" >&5
 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4199 "configure"
+#line 4226 "configure"
 #include "confdefs.h"
 
 int main() {
 return __MINGW32__;
 ; return 0; }
 EOF
-if { (eval echo configure:4206: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4233: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_mingw32=yes
 else
@@ -4221,7 +4248,7 @@ test "$ac_cv_mingw32" = yes && MINGW32=yes
 
 
 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:4225: checking for executable suffix" >&5
+echo "configure:4252: checking for executable suffix" >&5
 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4231,7 +4258,7 @@ else
   rm -f conftest*
   echo 'int main () { return 0; }' > conftest.$ac_ext
   ac_cv_exeext=
-  if { (eval echo configure:4235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+  if { (eval echo configure:4262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
     for file in conftest.*; do
       case $file in
       *.c | *.o | *.obj) ;;
@@ -4254,7 +4281,7 @@ ac_exeext=$EXEEXT
 
 largefile_support="no"
 echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:4258: checking build system type" >&5
+echo "configure:4285: checking build system type" >&5
 
 build_alias=$build
 case "$build_alias" in
@@ -4271,33 +4298,6 @@ build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
 echo "$ac_t""$build" 1>&6
 
-
-# Make sure we can run config.sub.
-if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
-else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:4282: checking host system type" >&5
-
-host_alias=$host
-case "$host_alias" in
-NONE)
-  case $nonopt in
-  NONE)
-    if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
-    else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
-    fi ;;
-  *) host_alias=$nonopt ;;
-  esac ;;
-esac
-
-host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$host" 1>&6
-
 if test $host != $build; then
   ac_tool_prefix=${host_alias}-
 else
@@ -10004,6 +10004,11 @@ s%@mandir@%$mandir%g
 s%@BUILD_DIR@%$BUILD_DIR%g
 s%@TRUEPRG@%$TRUEPRG%g
 s%@FALSEPRG@%$FALSEPRG%g
+s%@host@%$host%g
+s%@host_alias@%$host_alias%g
+s%@host_cpu@%$host_cpu%g
+s%@host_vendor@%$host_vendor%g
+s%@host_os@%$host_os%g
 s%@VERSION@%$VERSION%g
 s%@DATE@%$DATE%g
 s%@LSMDATE@%$LSMDATE%g
@@ -10111,11 +10116,6 @@ s%@SQL_BINDIR@%$SQL_BINDIR%g
 s%@cats@%$cats%g
 s%@DB_NAME@%$DB_NAME%g
 s%@EXEEXT@%$EXEEXT%g
-s%@host@%$host%g
-s%@host_alias@%$host_alias%g
-s%@host_cpu@%$host_cpu%g
-s%@host_vendor@%$host_vendor%g
-s%@host_os@%$host_os%g
 s%@build@%$build%g
 s%@build_alias@%$build_alias%g
 s%@build_cpu@%$build_cpu%g
index 9b6222e3855b3e8dc42089b562e7d391b58974a0..a22d30bf070df561034bf98de683221aa8743bb1 100644 (file)
@@ -18,6 +18,8 @@ Documentation to do: (any release a little bit at a time)
   (./create_mys... ./make_my...).
 - Document c:/working directory better than /working directory.
 
+- Document Heart beat code 
+
           
 Testing to do: (painful)
 - that ALL console command line options work and are always implemented
@@ -32,7 +34,8 @@ Testing to do: (painful)
 - Figure out how to use ssh or stunnel to protect Bacula communications.
 
 For 1.31 release:
-- Finish Windows implementation.
+- Finish Windows implementation (add setting of correct type on restore,
+  add Portable Data Format flag).
 - Remove multiple simultaneous devices code in SD.
 - Check that Block number in JobMedia are correct.
 - Increment DB version prior to releasing.
index e003c9394ad3db4727b1eaaa3966fce9c42a82f6..86525db417839a5b01beb6d405e6493b21676053 100644 (file)
@@ -392,6 +392,10 @@ int  m_msg(char *file, int line, POOLMEM **msgbuf, char *fmt,...);
 #undef strdup
 #define strdup(buf) bad_call_on_strdup_use_bstrdup(buf)
 
+/* Use our fgets which handles interrupts */
+#undef fgets
+#define fgets(x,y,z) bfgets((x), (y), (z))
+
 #ifdef DEBUG
 #define bstrdup(str) strcpy((char *) b_malloc(__FILE__,__LINE__,strlen((str))+1),(str))
 #else
index 029ca2b26181aaf713b81035bb3274820457399c..f2960894db4c6f2af0dedbd729c0c9872eba49be 100644 (file)
@@ -162,7 +162,6 @@ int main (int argc, char *argv[])
    if (!no_signals) {
       init_signals(terminate_dird);
    }
-   signal(SIGCHLD, SIG_IGN);
 
    if (argc) {
       if (configfile != NULL) {
index ec28e6e2378f9d6cc4f26a5c00c267686ee2452d..f63929a6f45dec1687c2054c33259c035286fea9 100644 (file)
@@ -201,6 +201,7 @@ static void *job_thread(void *arg)
            
            before = edit_run_codes(jcr, before, jcr->job->RunBeforeJob);
             bpipe = open_bpipe(before, 0, "r");
+           free_pool_memory(before);
            while (fgets(line, sizeof(line), bpipe->rfd)) {
                Jmsg(jcr, M_INFO, 0, _("RunBefore: %s"), line);
            }
@@ -210,10 +211,8 @@ static void *job_thread(void *arg)
                  status);
               set_jcr_job_status(jcr, JS_FatalError);
               update_job_end_record(jcr);
-              free_pool_memory(before);
               goto bail_out;
            }
-           free_pool_memory(before);
         }
         switch (jcr->JobType) {
            case JT_BACKUP:
@@ -252,6 +251,7 @@ static void *job_thread(void *arg)
            
            after = edit_run_codes(jcr, after, jcr->job->RunAfterJob);
             bpipe = open_bpipe(after, 0, "r");
+           free_pool_memory(after);
            while (fgets(line, sizeof(line), bpipe->rfd)) {
                Jmsg(jcr, M_INFO, 0, _("RunAfter: %s"), line);
            }
@@ -262,7 +262,6 @@ static void *job_thread(void *arg)
               set_jcr_job_status(jcr, JS_FatalError);
               update_job_end_record(jcr);
            }
-           free_pool_memory(after);
         }
       }
 bail_out:
@@ -279,7 +278,7 @@ bail_out:
           */
         jcr->reschedule_count++;
         jcr->sched_time = time(NULL) + jcr->job->RescheduleInterval;
-         Dmsg2(000, "Reschedule Job %s in %d seconds.\n", jcr->Job,
+         Dmsg2(100, "Rescheduled Job %s to re-run in %d seconds.\n", jcr->Job,
            (int)jcr->job->RescheduleInterval);
         jcr->JobStatus = JS_Created; /* force new status */
         dird_free_jcr(jcr);          /* partial cleanup old stuff */
index 8b855085f8213129b2b94626f9d42d028566cabf..67663749b59d78d7d48c84e8edda819ef9840ba6 100644 (file)
@@ -191,7 +191,7 @@ static void set_extract(UAContext *ua, TREE_NODE *node, TREE_CTX *tree, int valu
       fdbr.FileId = 0;
       fdbr.JobId = node->JobId;
       if (db_get_file_attributes_record(ua->jcr, ua->db, cwd, &fdbr)) {
-        uint32_t LinkFI;
+        int32_t LinkFI;
         decode_stat(fdbr.LStat, &statp, &LinkFI); /* decode stat pkt */
         /*
          * If we point to a hard linked file, traverse the tree to
@@ -334,7 +334,7 @@ static int dircmd(UAContext *ua, TREE_CTX *tree)
         fdbr.FileId = 0;
         fdbr.JobId = node->JobId;
         if (db_get_file_attributes_record(ua->jcr, ua->db, cwd, &fdbr)) {
-           uint32_t LinkFI;
+           int32_t LinkFI;
            decode_stat(fdbr.LStat, &statp, &LinkFI); /* decode stat pkt */
            ls_output(buf, cwd, node->extract, &statp);
             bsendmsg(ua, "%s\n", buf);
index b1b4f40b712af0936d877c42f3c4f5144ae3abad..31ab1f3ffd4f70f97c21ba835ea8e1802e23c1ce 100644 (file)
@@ -490,7 +490,7 @@ int get_attributes_and_compare_to_catalog(JCR *jcr, JobId_t JobId)
        * Got attributes stream, decode it
        */
       if (stream == STREAM_UNIX_ATTRIBUTES || stream == STREAM_UNIX_ATTRIBUTES_EX) {
-        uint32_t LinkFIf, LinkFIc;
+        int32_t LinkFIf, LinkFIc;
          Dmsg2(400, "file_index=%d attr=%s\n", file_index, attr);
         jcr->JobFiles++;
         jcr->FileIndex = file_index;    /* remember attribute file_index */
index 2070f6e9cf9be17991ffb2a9d7dc289d8f8a664b..fc356f09dc3e65a32c9a5a936d4e08cb107438cc 100644 (file)
@@ -117,8 +117,6 @@ void do_restore(JCR *jcr)
       switch (stream) {
       case STREAM_UNIX_ATTRIBUTES:
       case STREAM_UNIX_ATTRIBUTES_EX:
-        uint32_t LinkFI;
-        int data_stream;
 
          Dmsg1(30, "Stream=Unix Attributes. extract=%d\n", extract);
         /* If extracting, it was from previous stream, so
@@ -146,12 +144,12 @@ void do_restore(JCR *jcr)
          Dmsg3(200, "File %s\nattrib=%s\nattribsEx=%s\n", attr->fname, 
               attr->attr, attr->attrEx);
 
-        data_stream = decode_stat(attr->attr, &attr->statp, &LinkFI);
+        attr->data_stream = decode_stat(attr->attr, &attr->statp, &attr->LinkFI);
 
-        if (!is_stream_supported(data_stream)) {
+        if (!is_stream_supported(attr->data_stream)) {
            if (!non_support_data++) {
                Jmsg(jcr, M_ERROR, 0, _("%s stream not supported on this Client.\n"),
-                 stream_to_ascii(data_stream));
+                 stream_to_ascii(attr->data_stream));
            }
            continue;
         }
index 70e44bf3581ca81cd5afabd1343b2e6f4a459b56..1fb2a7f22bdc0b84d21685ca84aae9801bb412a5 100755 (executable)
@@ -146,7 +146,7 @@ void encode_stat(char *buf, FF_PKT *ff_pkt, int data_stream)
 
 
 /* Decode a stat packet from base64 characters */
-int decode_stat(char *buf, struct stat *statp, uint32_t *LinkFI) 
+int decode_stat(char *buf, struct stat *statp, int32_t *LinkFI) 
 {
    char *p = buf;
    int64_t val;
index 84b2908c0a6376c48acff49af5b8c0da578bfc21..6ba27c29dd6a7e352150ef17884925073b90579c 100644 (file)
@@ -393,7 +393,7 @@ void binit(BFILE *bfd)
 
 int set_win32_backup(BFILE *bfd, int enable)
 {
-   return 0;
+   return !enable;
 }
 
 int is_win32_backup(void)
index 378e8553fb25c312f72a68e61a53357e3aae8d08..fff676d7d8479166c67ed846b5d6db2c4b3458d0 100644 (file)
@@ -71,6 +71,26 @@ int create_file(JCR *jcr, ATTR *attr, BFILE *ofd, int replace)
    struct stat mstatp;
 
    binit(ofd);
+   /* Set desired writing mode (BackupWrite() or write()) */
+   switch (attr->data_stream) {
+   case 0:
+      break;                         /* use default defined by system */
+
+   /* These streams require using BackupWrite() */
+   case STREAM_WIN32_ATTRIBUTES:
+   case STREAM_WIN32_DATA:
+   case STREAM_WIN32_GZIP_DATA:
+      if (!set_win32_backup(ofd, 1)) { /* use BackupWrite() */
+         Jmsg(jcr, M_ERROR, 0, _("Could not set Win32 output format.\n"));
+        return CF_ERROR;
+      }
+
+   /* All other stream use standard system I/O (portable) */
+   default:
+      set_win32_backup(ofd, 0);       /* Disable using BackupWrite() */
+      break;
+   }
+
    new_mode = attr->statp.st_mode;
    Dmsg2(300, "newmode=%x file=%s\n", new_mode, attr->ofname);
    parent_mode = S_IWUSR | S_IXUSR | new_mode;
index 8fe5c0c39b9739bc5d47032f0dd7958f52b1ff7d..0ea272357e5b8880ff76dfb5d6f82ac0315b7234 100644 (file)
@@ -25,7 +25,7 @@
 
 /* from attribs.c */
 void   encode_stat       (char *buf, FF_PKT *ff_pkt, int data_stream);
-int    decode_stat       (char *buf, struct stat *statp, uint32_t *LinkFI);
+int    decode_stat       (char *buf, struct stat *statp, int32_t *LinkFI);
 int    encode_attribsEx  (JCR *jcr, char *attribsEx, FF_PKT *ff_pkt);
 int    set_attributes    (JCR *jcr, ATTR *attr, BFILE *ofd);
 int    select_data_stream(FF_PKT *ff_pkt);
index 7b19eddddc08ec468eb8dc2bb04077f88f393338..572339426688eb1fe85a38c8e6e8d8feaa72cb69 100644 (file)
@@ -31,6 +31,7 @@ struct ATTR {
    int32_t data_stream;               /* id of data stream to follow */
    int32_t type;                      /* file type FT */
    int32_t file_index;                /* file index */
+   int32_t LinkFI;                    /* file index to data if hard link */
    struct stat statp;                 /* decoded stat packet */
    char *attr;                        /* attributes position */
    char *attrEx;                      /* extended attributes if any */
index 46f66886049ace7e77f8184ec9f5c1d04f9944f9..0a00caf73cc53c2bc2799b16e2192239d24b6ec1 100644 (file)
@@ -158,10 +158,15 @@ int close_bpipe(BPIPE *bpipe)
 
    /* wait for worker child to exit */
    for ( ;; ) {
+      Dmsg2(200, "Wait for %d opt=%d\n", bpipe->worker_pid, wait_option);
       wpid = waitpid(bpipe->worker_pid, &chldstatus, wait_option);
       if (wpid == bpipe->worker_pid || (wpid == -1 && errno != EINTR)) {
+         Dmsg3(200, "Got break wpid=%d status=%d ERR=%s\n", wpid, chldstatus,
+            wpid==-1?strerror(errno):"none");
         break;
       }
+      Dmsg3(200, "Got wpid=%d status=%d ERR=%s\n", wpid, chldstatus,
+            wpid==-1?strerror(errno):"none");
       if (remaining_wait > 0) {
         bmicrosleep(1, 0);            /* wait one second */
         remaining_wait--;
@@ -175,8 +180,10 @@ int close_bpipe(BPIPE *bpipe)
    if (wpid > 0) {
       if (WIFEXITED(chldstatus)) {          /* process exit()ed */
         stat = WEXITSTATUS(chldstatus);
+          Dmsg1(200, "status =%d\n", stat);
       } else if (WIFSIGNALED(chldstatus)) {  /* process died */
         stat = 1;
+         Dmsg0(200, "Signaled\n");
       }
       if (stat != 0) {
         errno = ECHILD;              /* set child errno */
@@ -186,9 +193,7 @@ int close_bpipe(BPIPE *bpipe)
       stop_child_timer(bpipe->timer_id);
    }
    free(bpipe);
-#ifdef HAVE_FREEBSD_OS
-   stat = 0;  /* kludge because FreeBSD doesn't seem to return valid status */
-#endif
+   Dmsg1(200, "returning stat = %d\n", stat);
    return stat;
 }
 
index 79c7072f197760b6ac827c22061d60be955095c2..5a39359605ca39c5fa36e155313a12a775677bd7 100644 (file)
@@ -438,3 +438,34 @@ strtoll(const char *ptr, char **endptr, int base)
    return (long long int)strtod(ptr, endptr);  
 }
 #endif
+
+/*
+ * Bacula's implementation of fgets(). The difference is that it handles
+ *   being interrupted by a signal (e.g. a SIGCHLD).
+ */
+#undef bfgets
+char *bfgets(char *s, int size, FILE *fd)
+{
+   char *p = s;
+   int ch;      
+   *p = 0;
+   for (int i=0; i < size-1; i++) {
+      do {
+        errno = 0;
+        ch = fgetc(fd);
+      } while (ch == -1 && (errno == EINTR || errno == EAGAIN));
+      if (ch == -1) {
+        if (i == 0) {
+           return NULL;
+        } else {
+           return s;
+        }
+      }
+      *p++ = ch;
+      *p = 0;
+      if (ch == '\n') {
+        break;
+      }
+   }
+   return s;
+}
index 33e4998131ef017c1fa236f28f6dbae07429fd8f..9b3516831eab15cdda04fad745694a18057ab605 100644 (file)
@@ -54,8 +54,9 @@ void    create_pid_file        (char *dir, char *progname, int port);
 int      delete_pid_file        (char *dir, char *progname, int port);
 void     drop                   (char *uid, char *gid);
 int      bmicrosleep            (time_t sec, long msec);
+char    *bfgets                 (char *s, int size, FILE *fd);
 #ifndef HAVE_STRTOLL
-long long int strtoll(const char *ptr, char **endptr, int base);
+long long int strtoll           (const char *ptr, char **endptr, int base);
 #endif
 
 /* bnet.c */
index 8e9bfdaa0be5a2bca97b28ea8726738fcb86fede..1367c63abe61be3131c2fc636abf5e189e578e20 100644 (file)
@@ -33,7 +33,7 @@ struct s_mem {
 
 struct s_tree_node {
    char *fname;                       /* file name */
-   uint32_t FileIndex;                /* file index */
+   int32_t FileIndex;                 /* file index */
    uint32_t JobId;                    /* JobId */
    short type;                        /* node type */
    short extract;                     /* set if extracting */
@@ -46,7 +46,7 @@ typedef struct s_tree_node TREE_NODE;
 
 struct s_tree_root {
    char *fname;                       /* file name */
-   uint32_t FileIndex;                /* file index */
+   int32_t FileIndex;                 /* file index */
    uint32_t JobId;                    /* JobId */
    short type;                        /* node type */
    short extract;                     /* set if extracting */
index bac65e28619e260714945681b67886302ef07a9c..9b2730f8e1fc19ea8bc8ac7b610842b27f83fc08 100644 (file)
@@ -38,7 +38,7 @@ static char OK_data[]    = "3000 OK data\n";
 int do_append_data(JCR *jcr) 
 {
    int32_t n;
-   long file_index, stream, last_file_index;
+   int32_t file_index, stream, last_file_index;
    BSOCK *ds;
    BSOCK *fd_sock = jcr->file_bsock;
    int ok = TRUE;
@@ -111,7 +111,6 @@ int do_append_data(JCR *jcr)
    jcr->VolFirstIndex = 0;
    jcr->run_time = time(NULL);             /* start counting time for rates */
    for (last_file_index = 0; ok && !job_canceled(jcr); ) {
-      char info[100];
 
       /* Read Stream header from the File daemon.
        *  The stream header consists of the following:
@@ -129,11 +128,29 @@ int do_append_data(JCR *jcr)
         ok = FALSE;
         break;
       }
-      if (sscanf(ds->msg, "%ld %ld %100s", &file_index, &stream, info) != 3) {
+       
+      /* 
+       * This hand scanning is a bit more complicated than a simple
+       *   sscanf, but it allows us to handle any size integer up to
+       *   int64_t without worrying about whether %d, %ld, %lld, or %q 
+       *   is the correct format for each different architecture.
+       * It is a real pity that sscanf() is not portable.
+       */
+      char *p = ds->msg;
+      while (B_ISSPACE(*p)) {
+        p++;
+      }
+      file_index = (int32_t)str_to_int64(p);
+      while (B_ISDIGIT(*p)) {
+        p++;
+      }
+      if (!B_ISSPACE(*p) || !B_ISDIGIT(*(p+1))) {
          Jmsg1(jcr, M_FATAL, 0, _("Malformed data header from FD: %s\n"), ds->msg);
         ok = FALSE;
         break;
       }
+      stream = (int32_t)str_to_int64(p);
+
       Dmsg2(190, "<filed: Header FilInx=%d stream=%d\n", file_index, stream);
 
       if (!(file_index > 0 && (file_index == last_file_index ||
index 710d5fb1261f2fc66e4ae89677d6d71688c2cfc2..3a20e5b9851be3e1382d6ef952740e15ec781989 100644 (file)
@@ -271,14 +271,12 @@ static void record_cb(JCR *jcr, DEVICE *dev, DEV_BLOCK *block, DEV_RECORD *rec)
       }
         
       if (file_is_included(ff, attr->fname) && !file_is_excluded(ff, attr->fname)) {
-        uint32_t LinkFI;
-        int data_stream;
 
-        data_stream = decode_stat(attr->attr, &attr->statp, &LinkFI);
-        if (!is_stream_supported(data_stream)) {
+        attr->data_stream = decode_stat(attr->attr, &attr->statp, &attr->LinkFI);
+        if (!is_stream_supported(attr->data_stream)) {
            if (!non_support_data++) {
                Jmsg(jcr, M_ERROR, 0, _("%s stream not supported on this Client.\n"),
-                 stream_to_ascii(data_stream));
+                 stream_to_ascii(attr->data_stream));
            }
            return;
         }
index ac8f5160676d2ae3725f8d50af0b62c709df404a..77af116b5eb56683cc4da4a06250f9fc26abe2b4 100644 (file)
@@ -342,8 +342,6 @@ static void record_cb(JCR *jcr, DEVICE *dev, DEV_BLOCK *block, DEV_RECORD *rec)
    /* File Attributes stream */
    if (rec->Stream == STREAM_UNIX_ATTRIBUTES || 
        rec->Stream == STREAM_UNIX_ATTRIBUTES_EX) {
-      uint32_t LinkFI;
-      int data_stream;
 
       if (!unpack_attributes_record(jcr, rec->Stream, rec->data, attr)) {
          Emsg0(M_ERROR_TERM, 0, _("Cannot continue.\n"));
@@ -354,11 +352,11 @@ static void record_cb(JCR *jcr, DEVICE *dev, DEV_BLOCK *block, DEV_RECORD *rec)
            rec->FileIndex, attr->file_index);
       }
 
-      data_stream = decode_stat(attr->attr, &attr->statp, &LinkFI);
-      if (!is_stream_supported(data_stream)) {
+      attr->data_stream = decode_stat(attr->attr, &attr->statp, &attr->LinkFI);
+      if (!is_stream_supported(attr->data_stream)) {
         if (!non_support_data++) {
             Jmsg(jcr, M_ERROR, 0, _("%s stream not supported on this Client.\n"),
-              stream_to_ascii(data_stream));
+              stream_to_ascii(attr->data_stream));
         }
         return;
       }
index a31b0f709e97c061bad3a72a3f7d24c0e2eb3e1f..5197c4538c2558f666deba7d8ca77a34e5a782be 100644 (file)
@@ -550,8 +550,7 @@ static void record_cb(JCR *bjcr, DEVICE *dev, DEV_BLOCK *block, DEV_RECORD *rec)
       }
        
       if (verbose > 1) {
-        uint32_t LinkFI;
-        decode_stat(attr->attr, &attr->statp, &LinkFI);
+        decode_stat(attr->attr, &attr->statp, &attr->LinkFI);
         build_attr_output_fnames(bjcr, attr);
         print_ls_output(bjcr, attr);
       }
index ee630be1e8df92bb90d4e06b4fc82e36feab298d..fedf6e60b15f320a387f59ec9eaaae3a80fd45de 100644 (file)
@@ -49,7 +49,7 @@ char VolName[MAX_NAME_LENGTH];
 DEVICE *dev = NULL;
 DEVRES *device = NULL;
 
-            
+           
 /* Forward referenced subroutines */
 static void do_tape_cmds();
 static void helpcmd();
@@ -84,7 +84,7 @@ static uint64_t vol_size;
 static uint64_t VolBytes;
 static time_t now;
 static double kbs;
-static long file_index;
+static int32_t file_index;
 static int end_of_tape = 0;
 static uint32_t LastBlock = 0;
 static uint32_t eot_block;
@@ -111,7 +111,7 @@ int get_cmd(char *prompt);
 
 /*********************************************************************
  *
- *         Main Bacula Pool Creation Program
+ *        Main Bacula Pool Creation Program
  *
  */
 int main(int argc, char *argv[])
@@ -122,7 +122,7 @@ int main(int argc, char *argv[])
    /* Sanity checks */
    if (TAPE_BSIZE % DEV_BSIZE != 0 || TAPE_BSIZE / DEV_BSIZE == 0) {
       Emsg2(M_ABORT, 0, "Tape block size (%d) not multiple of system size (%d)\n",
-         TAPE_BSIZE, DEV_BSIZE);
+        TAPE_BSIZE, DEV_BSIZE);
    }
    if (TAPE_BSIZE != (1 << (ffs(TAPE_BSIZE)-1))) {
       Emsg1(M_ABORT, 0, "Tape block size (%d) is not a power of 2\n", TAPE_BSIZE);
@@ -137,36 +137,36 @@ int main(int argc, char *argv[])
    while ((ch = getopt(argc, argv, "b:c:d:sv?")) != -1) {
       switch (ch) {
          case 'b':                    /* bootstrap file */
-            bsr = parse_bsr(NULL, optarg);
-//          dump_bsr(bsr);
-            break;
+           bsr = parse_bsr(NULL, optarg);
+//         dump_bsr(bsr);
+           break;
 
          case 'c':                    /* specify config file */
-            if (configfile != NULL) {
-               free(configfile);
-            }
-            configfile = bstrdup(optarg);
-            break;
+           if (configfile != NULL) {
+              free(configfile);
+           }
+           configfile = bstrdup(optarg);
+           break;
 
          case 'd':                    /* set debug level */
-            debug_level = atoi(optarg);
-            if (debug_level <= 0) {
-               debug_level = 1; 
-            }
-            break;
+           debug_level = atoi(optarg);
+           if (debug_level <= 0) {
+              debug_level = 1; 
+           }
+           break;
 
          case 's':
-            signals = FALSE;
-            break;
+           signals = FALSE;
+           break;
 
          case 'v':
-            verbose++;
-            break;
+           verbose++;
+           break;
 
          case '?':
-         default:
-            helpcmd();
-            exit(0);
+        default:
+           helpcmd();
+           exit(0);
 
       }  
    }
@@ -210,9 +210,9 @@ int main(int argc, char *argv[])
       Dmsg0(129, "Opening device.\n");
       if (open_dev(dev, jcr->VolumeName, READ_WRITE) < 0) {
          Emsg1(M_FATAL, 0, _("dev open failed: %s\n"), dev->errmsg);
-         unlock_device(dev);
-         free_block(block);
-         goto terminate;
+        unlock_device(dev);
+        free_block(block);
+        goto terminate;
       }
    }
    Dmsg1(129, "open_dev %s OK\n", dev_name(dev));
@@ -258,7 +258,7 @@ static void terminate_btape(int stat)
    }
 
    term_msg();
-   close_memory_pool();               /* free memory in pool */
+   close_memory_pool();              /* free memory in pool */
 
    sm_dump(False);
    exit(stat);
@@ -280,11 +280,11 @@ static void labelcmd()
    LockRes();
    for (device=NULL; (device=(DEVRES *)GetNextRes(R_DEVICE, (RES *)device)); ) {
       if (strcmp(device->device_name, dev->dev_name) == 0) {
-         jcr->device = device;        /* Arggg a bit of duplication here */
-         device->dev = dev;
-         dev->device = device;
-         found = 1;
-         break;
+        jcr->device = device;        /* Arggg a bit of duplication here */
+        device->dev = dev;
+        dev->device = device;
+        found = 1;
+        break;
       }
    } 
    UnlockRes();
@@ -297,10 +297,10 @@ static void labelcmd()
       strcpy(cmd, VolumeName);
    } else {
       if (!get_cmd("Enter Volume Name: ")) {
-         return;
+        return;
       }
    }
-         
+        
    if (!(dev->state & ST_OPENED)) {
       if (!open_device(dev)) {
          Pmsg1(0, "Device open failed. ERR=%s\n", strerror_dev(dev));
@@ -310,7 +310,7 @@ static void labelcmd()
 }
 
 /*
- * Read the tape label   
+ * Read the tape label  
  */
 static void readlabelcmd()
 {
@@ -323,28 +323,28 @@ static void readlabelcmd()
    switch (stat) {
       case VOL_NO_LABEL:
          Pmsg0(0, "Volume has no label.\n");
-         break;
+        break;
       case VOL_OK:
          Pmsg0(0, "Volume label read correctly.\n");
-         break;
+        break;
       case VOL_IO_ERROR:
          Pmsg1(0, "I/O error on device: ERR=%s", strerror_dev(dev));
-         break;
+        break;
       case VOL_NAME_ERROR:
          Pmsg0(0, "Volume name error\n");
-         break;
+        break;
       case VOL_CREATE_ERROR:
          Pmsg1(0, "Error creating label. ERR=%s", strerror_dev(dev));
-         break;
+        break;
       case VOL_VERSION_ERROR:
          Pmsg0(0, "Volume version error.\n");
-         break;
+        break;
       case VOL_LABEL_ERROR:
          Pmsg0(0, "Bad Volume label type.\n");
-         break;
+        break;
       default:
          Pmsg0(0, "Unknown error.\n");
-         break;
+        break;
    }
 
    debug_level = 20;
@@ -404,7 +404,7 @@ static void weofcmd()
 }
 
 
-/* Go to the end of the medium -- raw command   
+/* Go to the end of the medium -- raw command  
  * The idea was orginally that the end of the Bacula
  * medium would be flagged differently. This is not
  * currently the case. So, this is identical to the
@@ -534,11 +534,11 @@ static void rectestcmd()
       rec->data_len = i;
       sm_check(__FILE__, __LINE__, False);
       if (write_record_to_block(block, rec)) {
-         empty_block(block);
-         blkno++;
+        empty_block(block);
+        blkno++;
          Pmsg2(0, "Block %d i=%d\n", blkno, i);
       } else {
-         break;
+        break;
       }
       sm_check(__FILE__, __LINE__, False);
    }
@@ -638,7 +638,7 @@ static int re_read_block_test()
    for (int i=0; i<len; i++) {
       if (rec->data[i] != 3) {
          Pmsg0(0, _("Bad data in record. Test failed!\n"));
-         goto bail_out;
+        goto bail_out;
       }
    }
    Pmsg0(0, _("\nBlock re-read correct. Test succeeded!\n"));
@@ -675,14 +675,14 @@ static int append_test()
 "             and three records in file 2\n\n"));
    rewindcmd();
    wrcmd();
-   weofcmd();      /* end file 0 */
+   weofcmd();     /* end file 0 */
    wrcmd();
    wrcmd();
-   weofcmd();      /* end file 1 */
+   weofcmd();     /* end file 1 */
    wrcmd();
    wrcmd();
    wrcmd();
-   weofcmd();     /* end file 2 */
+   weofcmd();    /* end file 2 */
    rewindcmd();
    Pmsg0(0, _("Now moving to end of medium.\n"));
    eodcmd();
@@ -720,39 +720,39 @@ static void testcmd()
    int stat;
 
    stat = append_test();
-   if (stat == 1) {                   /* OK get out */
+   if (stat == 1) {                  /* OK get out */
       goto all_done;
    }
-   if (stat == -1) {                  /* first test failed */
+   if (stat == -1) {                 /* first test failed */
       if (dev_cap(dev, CAP_EOM)) {
          Pmsg0(-1, "\nAppend test failed. Attempting again.\n"
                    "Setting \"Hardware End of Medium = no\" and retrying append test.\n\n");
-         dev->capabilities &= ~CAP_EOM; /* turn off eom */
-         stat = append_test();
-         if (stat == 1) {
+        dev->capabilities &= ~CAP_EOM; /* turn off eom */
+        stat = append_test();
+        if (stat == 1) {
             Pmsg0(-1, "\n\nIt looks like the test worked this time, please add:\n\n"
                      "    Hardware End of Medium = No\n\n"
                      "to your Device resource in the Storage conf file.\n");
-            goto all_done;
-         }
-         if (stat == -1) {
+           goto all_done;
+        }
+        if (stat == -1) {
             Pmsg0(-1, "\n\nThat appears not to have corrected the problem.\n");
-            goto all_done;
-         }
-         /* Wrong count after append */
-         if (stat == -2) {
+           goto all_done;
+        }
+        /* Wrong count after append */
+        if (stat == -2) {
             Pmsg0(-1, "\n\nIt looks like the append failed. Attempting again.\n"
                      "Setting \"BSF at EOM = yes\" and retrying append test.\n");
-            dev->capabilities |= CAP_BSFATEOM; /* backspace on eom */
-            stat = append_test();
-            if (stat == 1) {
+           dev->capabilities |= CAP_BSFATEOM; /* backspace on eom */
+           stat = append_test();
+           if (stat == 1) {
                Pmsg0(-1, "\n\nIt looks like the test worked this time, please add:\n\n"
                      "    Hardware End of Medium = No\n"
                      "    BSR at EOM = yes\n\n"
                      "to your Device resource in the Storage conf file.\n");
-               goto all_done;
-            }
-         }
+              goto all_done;
+           }
+        }
 
          Pmsg0(-1, "\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"
                "Unable to correct the problem. You MUST fix this\n"
@@ -909,45 +909,45 @@ static void scancmd()
    Pmsg1(0, _("Starting scan at file %u\n"), dev->file);
    for (;;) {
       if ((stat = read(dev->fd, buf, sizeof(buf))) < 0) {
-         clrerror_dev(dev, -1);
+        clrerror_dev(dev, -1);
          Mmsg2(&dev->errmsg, "read error on %s. ERR=%s.\n",
-            dev->dev_name, strerror(dev->dev_errno));
+           dev->dev_name, strerror(dev->dev_errno));
          Pmsg2(0, "Bad status from read %d. ERR=%s\n", stat, strerror_dev(dev));
-         if (blocks > 0)
+        if (blocks > 0)
             printf("%d block%s of %d bytes in file %d\n",        
                     blocks, blocks>1?"s":"", block_size, dev->file);
-         return;
+        return;
       }
       Dmsg1(200, "read status = %d\n", stat);
 /*    sleep(1); */
       if (stat != block_size) {
-         update_pos_dev(dev);
-         if (blocks > 0) {
+        update_pos_dev(dev);
+        if (blocks > 0) {
             printf("%d block%s of %d bytes in file %d\n", 
                  blocks, blocks>1?"s":"", block_size, dev->file);
-            blocks = 0;
-         }
-         block_size = stat;
+           blocks = 0;
+        }
+        block_size = stat;
       }
-      if (stat == 0) {                /* EOF */
-         update_pos_dev(dev);
+      if (stat == 0) {               /* EOF */
+        update_pos_dev(dev);
          printf("End of File mark.\n");
-         /* Two reads of zero means end of tape */
-         if (dev->state & ST_EOF)
-            dev->state |= ST_EOT;
-         else {
-            dev->state |= ST_EOF;
-            dev->file++;
-         }
-         if (dev->state & ST_EOT) {
+        /* Two reads of zero means end of tape */
+        if (dev->state & ST_EOF)
+           dev->state |= ST_EOT;
+        else {
+           dev->state |= ST_EOF;
+           dev->file++;
+        }
+        if (dev->state & ST_EOT) {
             printf("End of tape\n");
-            break;
-         }
-      } else {                        /* Got data */
-         dev->state &= ~ST_EOF;
-         blocks++;
-         tot_blocks++;
-         bytes += stat;
+           break;
+        }
+      } else {                       /* Got data */
+        dev->state &= ~ST_EOF;
+        blocks++;
+        tot_blocks++;
+        bytes += stat;
       }
    }
    update_pos_dev(dev);
@@ -980,58 +980,58 @@ static void scan_blocks()
    for (;;) {
       if (!read_block_from_device(jcr, dev, block, NO_BLOCK_NUMBER_CHECK)) {
          Dmsg1(100, "!read_block(): ERR=%s\n", strerror_dev(dev));
-         if (dev->state & ST_EOT) {
-            if (blocks > 0) {
+        if (dev->state & ST_EOT) {
+           if (blocks > 0) {
                printf("%d block%s of %d bytes in file %d\n", 
                     blocks, blocks>1?"s":"", block_size, dev->file);
-               blocks = 0;
-            }
-            goto bail_out;
-         }
-         if (dev->state & ST_EOF) {
-            if (blocks > 0) {
+              blocks = 0;
+           }
+           goto bail_out;
+        }
+        if (dev->state & ST_EOF) {
+           if (blocks > 0) {
                printf("%d block%s of %d bytes in file %d\n",        
                        blocks, blocks>1?"s":"", block_size, dev->file);
-               blocks = 0;
-            }
+              blocks = 0;
+           }
             printf(_("End of File mark.\n"));
-            continue;
-         }
-         if (dev->state & ST_SHORT) {
-            if (blocks > 0) {
+           continue;
+        }
+        if (dev->state & ST_SHORT) {
+           if (blocks > 0) {
                printf("%d block%s of %d bytes in file %d\n",        
                        blocks, blocks>1?"s":"", block_size, dev->file);
-               blocks = 0;
-            }
+              blocks = 0;
+           }
             printf(_("Short block read.\n"));
-            continue;
-         }
+           continue;
+        }
          printf(_("Error reading block. ERR=%s\n"), strerror_dev(dev));
-         goto bail_out;
+        goto bail_out;
       }
       if (block->block_len != block_size) {
-         if (blocks > 0) {
+        if (blocks > 0) {
             printf("%d block%s of %d bytes in file %d\n",        
                     blocks, blocks>1?"s":"", block_size, dev->file);
-            blocks = 0;
-         }
-         block_size = block->block_len;
+           blocks = 0;
+        }
+        block_size = block->block_len;
       }
       blocks++;
       tot_blocks++;
       bytes += block->block_len;
       Dmsg5(100, "Blk=%u blen=%u bVer=%d SessId=%u SessTim=%u\n",
-         block->BlockNumber, block->block_len, block->BlockVer,
-         block->VolSessionId, block->VolSessionTime);
+        block->BlockNumber, block->block_len, block->BlockVer,
+        block->VolSessionId, block->VolSessionTime);
       if (verbose == 1) {
-         DEV_RECORD *rec = new_record();
-         read_record_from_block(block, rec);
+        DEV_RECORD *rec = new_record();
+        read_record_from_block(block, rec);
          Pmsg7(-1, "Block: %u blen=%u First rec FI=%s SessId=%u SessTim=%u Strm=%s rlen=%d\n",
-              block->BlockNumber, block->block_len,
-              FI_to_ascii(rec->FileIndex), rec->VolSessionId, rec->VolSessionTime,
-              stream_to_ascii(rec->Stream, rec->FileIndex), rec->data_len);
-         rec->remainder = 0;
-         free_record(rec);
+             block->BlockNumber, block->block_len,
+             FI_to_ascii(rec->FileIndex), rec->VolSessionId, rec->VolSessionTime,
+             stream_to_ascii(rec->Stream, rec->FileIndex), rec->data_len);
+        rec->remainder = 0;
+        free_record(rec);
       } else if (verbose > 1) {
          dump_block(block, "");
       }
@@ -1066,7 +1066,7 @@ static void statcmd()
 /* 
  * First we label the tape, then we fill
  *  it with data get a new tape and write a few blocks.
- */                            
+ */                           
 static void fillcmd()
 {
    DEV_RECORD rec;
@@ -1115,8 +1115,8 @@ This may take a long time -- hours! ...\n\n");
 
    /* 
     * Acquire output device for writing.  Note, after acquiring a
-    *   device, we MUST release it, which is done at the end of this
-    *   subroutine.
+    *  device, we MUST release it, which is done at the end of this
+    *  subroutine.
     */
    Dmsg0(100, "just before acquire_device\n");
    if (!(dev=acquire_device_for_append(jcr, dev, block))) {
@@ -1132,7 +1132,7 @@ This may take a long time -- hours! ...\n\n");
    if (!write_session_label(jcr, block, SOS_LABEL)) {
       set_jcr_job_status(jcr, JS_ErrorTerminated);
       Jmsg1(jcr, M_FATAL, 0, _("Write session label failed. ERR=%s\n"),
-         strerror_dev(dev));
+        strerror_dev(dev));
       ok = FALSE;
    }
    Pmsg0(-1, "Wrote Start Of Session label.\n");
@@ -1147,7 +1147,7 @@ This may take a long time -- hours! ...\n\n");
     * Generate data as if from File daemon, write to device   
     */
    jcr->VolFirstIndex = 0;
-   time(&jcr->run_time);              /* start counting time for rates */
+   time(&jcr->run_time);             /* start counting time for rates */
    Pmsg0(-1, "Begin writing records to first tape ...\n");
    for (file_index = 0; ok && !job_canceled(jcr); ) {
       rec.VolSessionId = jcr->VolSessionId;
@@ -1161,81 +1161,81 @@ This may take a long time -- hours! ...\n\n");
        */
       uint64_t *lp = (uint64_t *)rec.data;
       for (uint32_t i=0; i < (rec.data_len-sizeof(uint64_t))/sizeof(uint64_t); i++) {
-         *lp++ = ~file_index;
+        *lp++ = ~file_index;
       }
 
       Dmsg4(250, "before writ_rec FI=%d SessId=%d Strm=%s len=%d\n",
-         rec.FileIndex, rec.VolSessionId, stream_to_ascii(rec.Stream, rec.FileIndex), 
-         rec.data_len);
+        rec.FileIndex, rec.VolSessionId, stream_to_ascii(rec.Stream, rec.FileIndex), 
+        rec.data_len);
        
       while (!write_record_to_block(block, &rec)) {
-         /*
-          * When we get here we have just filled a block
-          */
+        /*
+         * When we get here we have just filled a block
+         */
          Dmsg2(150, "!write_record_to_block data_len=%d rem=%d\n", rec.data_len,
-                    rec.remainder);
-
-         /* Write block to tape */
-         if (!flush_block(block, 1)) {
-            return;
-         }
-
-         /* Every 5000 blocks (approx 322MB) report where we are.
-          */
-         if ((block->BlockNumber % 5000) == 0) {
-            now = time(NULL);
-            now -= jcr->run_time;
-            if (now <= 0) {
-               now = 1;
-            }
-            kbs = (double)dev->VolCatInfo.VolCatBytes / (1000.0 * (double)now);
+                   rec.remainder);
+
+        /* Write block to tape */
+        if (!flush_block(block, 1)) {
+           return;
+        }
+
+        /* Every 5000 blocks (approx 322MB) report where we are.
+         */
+        if ((block->BlockNumber % 5000) == 0) {
+           now = time(NULL);
+           now -= jcr->run_time;
+           if (now <= 0) {
+              now = 1;
+           }
+           kbs = (double)dev->VolCatInfo.VolCatBytes / (1000.0 * (double)now);
             Pmsg3(-1, "Wrote block=%u, VolBytes=%s rate=%.1f KB/s\n", block->BlockNumber,
-               edit_uint64_with_commas(dev->VolCatInfo.VolCatBytes, ec1), (float)kbs);
-         }
-         /* Every 15000 blocks (approx 1GB) write an EOF.
-          */
-         if ((block->BlockNumber % 15000) == 0) {
+              edit_uint64_with_commas(dev->VolCatInfo.VolCatBytes, ec1), (float)kbs);
+        }
+        /* Every 15000 blocks (approx 1GB) write an EOF.
+         */
+        if ((block->BlockNumber % 15000) == 0) {
             Pmsg0(-1, "Flush block, write EOF\n");
-            flush_block(block, 0);
-            weof_dev(dev, 1);
-         }
-
-         /* Get out after writing 10 blocks to the second tape */
-         if (++BlockNumber > 10 && stop != 0) {      /* get out */
-            break;    
-         }
+           flush_block(block, 0);
+           weof_dev(dev, 1);
+        }
+
+        /* Get out after writing 10 blocks to the second tape */
+        if (++BlockNumber > 10 && stop != 0) {      /* get out */
+           break;    
+        }
       }
       if (!ok) {
          Pmsg0(000, _("Not OK\n"));
-         break;
+        break;
       }
       jcr->JobBytes += rec.data_len;   /* increment bytes this job */
       Dmsg4(190, "write_record FI=%s SessId=%d Strm=%s len=%d\n",
-         FI_to_ascii(rec.FileIndex), rec.VolSessionId, 
-         stream_to_ascii(rec.Stream, rec.FileIndex), rec.data_len);
+        FI_to_ascii(rec.FileIndex), rec.VolSessionId, 
+        stream_to_ascii(rec.Stream, rec.FileIndex), rec.data_len);
 
       /* Get out after writing 10 blocks to the second tape */
-      if (BlockNumber > 10 && stop != 0) {      /* get out */
+      if (BlockNumber > 10 && stop != 0) {     /* get out */
          Pmsg0(-1, "Done writing ...\n");
-         break;    
+        break;    
       }
    }
    if (stop > 0) {
       Dmsg0(100, "Write_end_session_label()\n");
       /* Create Job status for end of session label */
       if (!job_canceled(jcr) && ok) {
-         set_jcr_job_status(jcr, JS_Terminated);
+        set_jcr_job_status(jcr, JS_Terminated);
       } else if (!ok) {
-         set_jcr_job_status(jcr, JS_ErrorTerminated);
+        set_jcr_job_status(jcr, JS_ErrorTerminated);
       }
       if (!write_session_label(jcr, block, EOS_LABEL)) {
          Pmsg1(000, _("Error writting end session label. ERR=%s\n"), strerror_dev(dev));
-         ok = FALSE;
+        ok = FALSE;
       }
       /* Write out final block of this session */
       if (!write_block_to_device(jcr, dev, block)) {
          Pmsg0(-1, _("Set ok=FALSE after write_block_to_device.\n"));
-         ok = FALSE;
+        ok = FALSE;
       }
       Pmsg0(-1, "Wrote End Of Session label.\n");
    }
@@ -1278,7 +1278,7 @@ static void unfillcmd()
    if (!simple) {
       /* Close device so user can use autochanger if desired */
       if (dev_cap(dev, CAP_OFFLINEUNMOUNT)) {
-         offline_dev(dev);
+        offline_dev(dev);
       }
       force_close_dev(dev);
       get_cmd(_("Mount first tape. Press enter when ready: ")); 
@@ -1291,11 +1291,11 @@ static void unfillcmd()
       dev->state &= ~ST_READ;
       if (!acquire_device_for_read(jcr, dev, block)) {
          Pmsg1(-1, "%s", dev->errmsg);
-         return;
+        return;
       }
    }
 
-   time(&jcr->run_time);              /* start counting time for rates */
+   time(&jcr->run_time);             /* start counting time for rates */
    stop = 0;
    file_index = 0;
    if (!simple) {
@@ -1309,27 +1309,27 @@ static void unfillcmd()
       Pmsg0(000, "Rewinding tape ...\n");
       if (!rewind_dev(dev)) {
          Pmsg1(-1, _("Error rewinding: ERR=%s\n"), strerror_dev(dev));
-         goto bail_out;
+        goto bail_out;
       }
       if (last_file > 0) {
          Pmsg1(000, "Forward spacing to last file=%u\n", last_file);
-         if (!fsf_dev(dev, last_file)) {
+        if (!fsf_dev(dev, last_file)) {
             Pmsg1(-1, _("Error in FSF: ERR=%s\n"), strerror_dev(dev));
-            goto bail_out;
-         }
+           goto bail_out;
+        }
       }
       Pmsg1(-1, _("Forward space to file %u complete. Reading blocks ...\n"), 
-            last_file);
+           last_file);
       Pmsg1(-1, _("Now reading to block %u.\n"), last_block_num);
       for (uint32_t i=0; i <= last_block_num; i++) {
-         if (!read_block_from_device(jcr, dev, block, NO_BLOCK_NUMBER_CHECK)) {
+        if (!read_block_from_device(jcr, dev, block, NO_BLOCK_NUMBER_CHECK)) {
             Pmsg1(-1, _("Error reading blocks: ERR=%s\n"), strerror_dev(dev));
             Pmsg2(-1, _("Wanted block %u error at block %u\n"), last_block_num, i);
-            goto bail_out;
-         }
-         if (i > 0 && i % 1000 == 0) {
+           goto bail_out;
+        }
+        if (i > 0 && i % 1000 == 0) {
             Pmsg1(-1, _("At block %u\n"), i);
-         }
+        }
       }
       if (last_block) {
          dump_block(last_block, _("Last block written"));
@@ -1353,69 +1353,69 @@ static void record_cb(JCR *jcr, DEVICE *dev, DEV_BLOCK *block, DEV_RECORD *rec)
 {
    SESSION_LABEL label;
 
-   if (stop > 1 && !dumped) {         /* on second tape */
+   if (stop > 1 && !dumped) {        /* on second tape */
       dumped = 1;
       dump_block(block, "First block on second tape");
       Pmsg4(-1, "Blk: FileIndex=%d: block=%u size=%d vol=%s\n", 
-           rec->FileIndex, block->BlockNumber, block->block_len, dev->VolHdr.VolName);
+          rec->FileIndex, block->BlockNumber, block->block_len, dev->VolHdr.VolName);
       Pmsg6(-1, "   Rec: VId=%d VT=%d FI=%s Strm=%s len=%d state=%x\n",
-           rec->VolSessionId, rec->VolSessionTime, 
-           FI_to_ascii(rec->FileIndex), stream_to_ascii(rec->Stream, rec->FileIndex),
-           rec->data_len, rec->state);
+          rec->VolSessionId, rec->VolSessionTime, 
+          FI_to_ascii(rec->FileIndex), stream_to_ascii(rec->Stream, rec->FileIndex),
+          rec->data_len, rec->state);
    }
    if (rec->FileIndex < 0) {
       if (verbose > 1) {
-         dump_label_record(dev, rec, 1);
+        dump_label_record(dev, rec, 1);
       }
       switch (rec->FileIndex) {
       case PRE_LABEL:
          Pmsg0(-1, "Volume is prelabeled. This tape cannot be scanned.\n");
-         return;
+        return;
       case VOL_LABEL:
-         unser_volume_label(dev, rec);
+        unser_volume_label(dev, rec);
          Pmsg3(-1, "VOL_LABEL: block=%u size=%d vol=%s\n", block->BlockNumber, 
-            block->block_len, dev->VolHdr.VolName);
-         stop++;
-         break;
+           block->block_len, dev->VolHdr.VolName);
+        stop++;
+        break;
       case SOS_LABEL:
-         unser_session_label(&label, rec);
+        unser_session_label(&label, rec);
          Pmsg1(-1, "SOS_LABEL: JobId=%u\n", label.JobId);
-         break;
+        break;
       case EOS_LABEL:
-         unser_session_label(&label, rec);
+        unser_session_label(&label, rec);
          Pmsg2(-1, "EOS_LABEL: block=%u JobId=%u\n", block->BlockNumber, 
-            label.JobId);
-         break;
+           label.JobId);
+        break;
       case EOM_LABEL:
          Pmsg0(-1, "EOM_LABEL:\n");
-         break;
-      case EOT_LABEL:              /* end of all tapes */
-         char ec1[50];
-
-         if (LastBlock != block->BlockNumber) {
-            VolBytes += block->block_len;
-         }
-         LastBlock = block->BlockNumber;
-         now = time(NULL);
-         now -= jcr->run_time;
-         if (now <= 0) {
-            now = 1;
-         }
-         kbs = (double)VolBytes / (1000 * now);
+        break;
+      case EOT_LABEL:             /* end of all tapes */
+        char ec1[50];
+
+        if (LastBlock != block->BlockNumber) {
+           VolBytes += block->block_len;
+        }
+        LastBlock = block->BlockNumber;
+        now = time(NULL);
+        now -= jcr->run_time;
+        if (now <= 0) {
+           now = 1;
+        }
+        kbs = (double)VolBytes / (1000 * now);
          Pmsg3(000, "Read block=%u, VolBytes=%s rate=%.1f KB/s\n", block->BlockNumber,
-                  edit_uint64_with_commas(VolBytes, ec1), (float)kbs);
+                 edit_uint64_with_commas(VolBytes, ec1), (float)kbs);
 
          Pmsg0(000, "End of all tapes.\n");
 
-         break;
+        break;
       default:
-         break;
+        break;
       }
       return;
    }
    if (++file_index != rec->FileIndex) {
       Pmsg3(000, "Incorrect FileIndex in Block %u. Got %d, expected %d.\n", 
-         block->BlockNumber, rec->FileIndex, file_index);
+        block->BlockNumber, rec->FileIndex, file_index);
    }
    /*
     * Now check that the right data is in the record.
@@ -1425,8 +1425,8 @@ static void record_cb(JCR *jcr, DEVICE *dev, DEV_BLOCK *block, DEV_RECORD *rec)
    for (uint32_t i=0; i < (REC_SIZE-sizeof(uint64_t))/sizeof(uint64_t); i++) {
       if (*lp++ != val) {
          Pmsg2(000, "Record %d contains bad data in Block %u.\n",
-            file_index, block->BlockNumber);
-         break;
+           file_index, block->BlockNumber);
+        break;
       }
    }
 
@@ -1438,11 +1438,11 @@ static void record_cb(JCR *jcr, DEVICE *dev, DEV_BLOCK *block, DEV_RECORD *rec)
       now = time(NULL);
       now -= jcr->run_time;
       if (now <= 0) {
-         now = 1;
+        now = 1;
       }
       kbs = (double)VolBytes / (1000 * now);
       Pmsg3(000, "Read block=%u, VolBytes=%s rate=%.1f KB/s\n", block->BlockNumber,
-               edit_uint64_with_commas(VolBytes, ec1), (float)kbs);
+              edit_uint64_with_commas(VolBytes, ec1), (float)kbs);
    }
    LastBlock = block->BlockNumber;
    if (end_of_tape) {
@@ -1475,44 +1475,44 @@ static int flush_block(DEV_BLOCK *block, int dump)
    this_file = dev->file;
    this_block_num = dev->block_num;
    if (!write_block_to_dev(jcr, dev, block)) {
-      Pmsg0(000, strerror_dev(dev));            
+      Pmsg0(000, strerror_dev(dev));           
       Pmsg3(000, "Block not written: FileIndex=%u Block=%u Size=%u\n", 
-         (unsigned)file_index, block->BlockNumber, block->block_len);
+        (unsigned)file_index, block->BlockNumber, block->block_len);
       Pmsg2(000, "last_block_num=%u this_block_num=%d\n", last_block_num,
-         this_block_num);
+        this_block_num);
       if (dump) {
          dump_block(block, "Block not written");
       }
       if (stop == 0) {
-         eot_block = block->BlockNumber;
-         eot_block_len = block->block_len;
-         eot_FileIndex = file_index;
+        eot_block = block->BlockNumber;
+        eot_block_len = block->block_len;
+        eot_FileIndex = file_index;
       }
       now = time(NULL);
       now -= jcr->run_time;
       if (now <= 0) {
-         now = 1;
+        now = 1;
       }
       kbs = (double)dev->VolCatInfo.VolCatBytes / (1000 * now);
       vol_size = dev->VolCatInfo.VolCatBytes;
       Pmsg2(000, "End of tape. VolumeCapacity=%s. Write rate = %.1f KB/s\n", 
-         edit_uint64_with_commas(dev->VolCatInfo.VolCatBytes, ec1), kbs);
+        edit_uint64_with_commas(dev->VolCatInfo.VolCatBytes, ec1), kbs);
 
       if (simple) {
-         stop = -1;                   /* stop, but do simplified test */
+        stop = -1;                   /* stop, but do simplified test */
       } else {
-         /* Full test in progress */
-         if (!fixup_device_block_write_error(jcr, dev, block)) {
+        /* Full test in progress */
+        if (!fixup_device_block_write_error(jcr, dev, block)) {
             Pmsg1(000, _("Cannot fixup device error. %s\n"), strerror_dev(dev));
-            ok = FALSE;
-            unlock_device(dev);
-            return 0;
-         }
-         stop = 1;                                                     
-         BlockNumber = 0;             /* start counting for second tape */
+           ok = FALSE;
+           unlock_device(dev);
+           return 0;
+        }
+        stop = 1;                                                     
+        BlockNumber = 0;             /* start counting for second tape */
       }
       unlock_device(dev);
-      return 1;                       /* end of tape reached */
+      return 1;                      /* end of tape reached */
    }
 
    /*
@@ -1534,7 +1534,7 @@ static int flush_block(DEV_BLOCK *block, int dump)
 /* 
  * First we label the tape, then we fill
  *  it with data get a new tape and write a few blocks.
- */                            
+ */                           
 static void qfillcmd()
 {
    DEV_BLOCK *block;
@@ -1567,11 +1567,11 @@ static void qfillcmd()
       }
       if (!write_record_to_block(block, rec)) {
          Pmsg0(0, _("Error writing record to block.\n")); 
-         goto bail_out;
+        goto bail_out;
       }
       if (!write_block_to_dev(jcr, dev, block)) {
          Pmsg0(0, _("Error writing block to device.\n")); 
-         goto bail_out;
+        goto bail_out;
       }
    }
    printf("\n");
@@ -1612,10 +1612,10 @@ static void rawfill_cmd()
       *p = block_num;
       stat = write(dev->fd, block->buf, block->buf_len);
       if (stat == (int)block->buf_len) {
-         if ((block_num++ % 100) == 0) {
+        if ((block_num++ % 100) == 0) {
             printf("+");
-         }
-         continue;
+        }
+        continue;
       }
       break;
    }
@@ -1656,7 +1656,7 @@ static struct cmdstruct commands[] = {
  {"wr",         wrcmd,        "write a single Bacula block"}, 
  {"rr",         rrcmd,        "read a single record"},
  {"qfill",      qfillcmd,     "quick fill command"},
-             };
+            };
 #define comsize (sizeof(commands)/sizeof(struct cmdstruct))
 
 static void
@@ -1669,15 +1669,15 @@ do_tape_cmds()
       sm_check(__FILE__, __LINE__, False);
       found = 0;
       for (i=0; i<comsize; i++)       /* search for command */
-         if (fstrsch(cmd,  commands[i].key)) {
-            (*commands[i].func)();    /* go execute command */
-            found = 1;
-            break;
-         }
+        if (fstrsch(cmd,  commands[i].key)) {
+           (*commands[i].func)();    /* go execute command */
+           found = 1;
+           break;
+        }
       if (!found)
          Pmsg1(0, _("%s is an illegal command\n"), cmd);
       if (quit)
-         break;
+        break;
    }
 }
 
@@ -1705,7 +1705,7 @@ static void usage()
 
 }
 
-/*      
+/*     
  * Get next input command from terminal.  This
  * routine is REALLY primitive, and should be enhanced
  * to have correct backspacing, etc.
@@ -1723,14 +1723,14 @@ get_cmd(char *prompt)
    cmd[i] = 0;
    while ((ch = fgetc(stdin)) != EOF) { 
       if (ch == '\n') {
-         strip_trailing_junk(cmd);
-         return 1;
+        strip_trailing_junk(cmd);
+        return 1;
       } else if (ch == 4 || ch == 0xd3 || ch == 0x8) {
-         if (i > 0)
-            cmd[--i] = 0;
-         continue;
+        if (i > 0)
+           cmd[--i] = 0;
+        continue;
       } 
-         
+        
       cmd[i++] = ch;
       cmd[i] = 0;
    }
@@ -1739,15 +1739,15 @@ get_cmd(char *prompt)
 }
 
 /* Dummies to replace askdir.c */
-int     dir_get_volume_info(JCR *jcr, enum get_vol_info_rw  writing) { return 1;}
-int     dir_update_volume_info(JCR *jcr, VOLUME_CAT_INFO *vol, int relabel) { return 1; }
-int     dir_create_jobmedia_record(JCR *jcr) { return 1; }
-int     dir_update_file_attributes(JCR *jcr, DEV_RECORD *rec) { return 1;}
-int     dir_send_job_status(JCR *jcr) {return 1;}
+int    dir_get_volume_info(JCR *jcr, enum get_vol_info_rw  writing) { return 1;}
+int    dir_update_volume_info(JCR *jcr, VOLUME_CAT_INFO *vol, int relabel) { return 1; }
+int    dir_create_jobmedia_record(JCR *jcr) { return 1; }
+int    dir_update_file_attributes(JCR *jcr, DEV_RECORD *rec) { return 1;}
+int    dir_send_job_status(JCR *jcr) {return 1;}
 
 
 
-int     dir_find_next_appendable_volume(JCR *jcr) 
+int    dir_find_next_appendable_volume(JCR *jcr) 
 { 
    return 1; 
 }
@@ -1762,7 +1762,7 @@ int dir_ask_sysop_to_mount_volume(JCR *jcr, DEVICE *dev)
    Pmsg1(-1, "%s", dev->errmsg);           /* print reason */
    fprintf(stderr, "Mount Volume \"%s\" on device %s and press return when ready: ",
       jcr->VolumeName, dev_name(dev));
-   getchar();   
+   getchar();  
    return 1;
 }
 
@@ -1775,7 +1775,7 @@ int dir_ask_sysop_to_mount_next_volume(JCR *jcr, DEVICE *dev)
    force_close_dev(dev);
    fprintf(stderr, "Mount next Volume on device %s and press return when ready: ",
       dev_name(dev));
-   getchar();   
+   getchar();  
    set_volume_name("TestVolume2", 2);
    labelcmd();
    VolumeName = NULL;
@@ -1801,7 +1801,7 @@ static int my_mount_next_read_volume(JCR *jcr, DEVICE *dev, DEV_BLOCK *block)
    }
    kbs = (double)VolBytes / (1000.0 * (double)now);
    Pmsg3(-1, "Read block=%u, VolBytes=%s rate=%.1f KB/s\n", block->BlockNumber,
-            edit_uint64_with_commas(VolBytes, ec1), (float)kbs);
+           edit_uint64_with_commas(VolBytes, ec1), (float)kbs);
 
    if (strcmp(jcr->VolumeName, "TestVolume2") == 0) {
       end_of_tape = 1;
@@ -1818,7 +1818,7 @@ static int my_mount_next_read_volume(JCR *jcr, DEVICE *dev, DEV_BLOCK *block)
       Pmsg2(0, "Cannot open Dev=%s, Vol=%s\n", dev_name(dev), jcr->VolumeName);
       return 0;
    }
-   return 1;                       /* next volume mounted */
+   return 1;                      /* next volume mounted */
 }
 
 static void set_volume_name(char *VolName, int volnum) 
index 4da29976d0d94b90c36ad55841aa08d96e117871..f0c3684d0c0a76b8b392486649bc7e0c0b72eb03 100644 (file)
 #define __RECORD_H 1
 
 /* Return codes from read_device_volume_label() */
-#define VOL_NOT_READ      0               /* Volume label not read */
-#define VOL_OK            1               /* volume name OK */
-#define VOL_NO_LABEL      2               /* volume not labeled */
-#define VOL_IO_ERROR      3               /* volume I/O error */
-#define VOL_NAME_ERROR    4               /* Volume name mismatch */
-#define VOL_CREATE_ERROR  5               /* Error creating label */
-#define VOL_VERSION_ERROR 6               /* Bacula version error */
-#define VOL_LABEL_ERROR   7               /* Bad label type */
-#define VOL_NO_MEDIA      8               /* Hard error -- no media present */
+#define VOL_NOT_READ     0               /* Volume label not read */
+#define VOL_OK           1               /* volume name OK */
+#define VOL_NO_LABEL     2               /* volume not labeled */
+#define VOL_IO_ERROR     3               /* volume I/O error */
+#define VOL_NAME_ERROR   4               /* Volume name mismatch */
+#define VOL_CREATE_ERROR  5              /* Error creating label */
+#define VOL_VERSION_ERROR 6              /* Bacula version error */
+#define VOL_LABEL_ERROR   7              /* Bad label type */
+#define VOL_NO_MEDIA     8               /* Hard error -- no media present */
 
 
 /*  See block.h for RECHDR_LENGTH */
  */
 
 /* Record state bit definitions */
-#define REC_NO_HEADER        (1<<0)   /* No header read */
+#define REC_NO_HEADER       (1<<0)   /* No header read */
 #define REC_PARTIAL_RECORD   (1<<1)   /* returning partial record */
 #define REC_BLOCK_EMPTY      (1<<2)   /* not enough data in block */
-#define REC_NO_MATCH         (1<<3)   /* No match on continuation data */
+#define REC_NO_MATCH        (1<<3)   /* No match on continuation data */
 #define REC_CONTINUATION     (1<<4)   /* Continuation record found */
-#define REC_ISTAPE           (1<<5)   /* Set if device is tape */
+#define REC_ISTAPE          (1<<5)   /* Set if device is tape */
 
 #define is_partial_record(r) ((r)->state & REC_PARTIAL_RECORD)
 #define is_block_empty(r)    ((r)->state & REC_BLOCK_EMPTY)
  *  This is the memory structure for the record header.
  */
 struct DEV_RECORD {
-   int      sync;                     /* synchronous */
+   int     sync;                     /* synchronous */
    /* File and Block are always returned on reading records, but
     *  only returned on writing if sync is set (obviously).
     */
-   uint32_t File;                     /* File number */
-   uint32_t Block;                    /* Block number */
-   uint32_t VolSessionId;             /* sequential id within this session */
-   uint32_t VolSessionTime;           /* session start time */
-   int32_t  FileIndex;                /* sequential file number */
-   int32_t  Stream;                   /* stream number */
-   uint32_t data_len;                 /* current record length */
-   uint32_t remainder;                /* remaining bytes to read/write */
-   uint32_t state;                    /* state bits */
+   uint32_t File;                    /* File number */
+   uint32_t Block;                   /* Block number */
+   uint32_t VolSessionId;            /* sequential id within this session */
+   uint32_t VolSessionTime;          /* session start time */
+   int32_t  FileIndex;               /* sequential file number */
+   int32_t  Stream;                  /* stream number */
+   uint32_t data_len;                /* current record length */
+   uint32_t remainder;               /* remaining bytes to read/write */
+   uint32_t state;                   /* state bits */
    uint8_t  ser_buf[WRITE_RECHDR_LENGTH];   /* serialized record header goes here */
-   POOLMEM *data;                     /* Record data. This MUST be a memory pool item */
-};           
+   POOLMEM *data;                    /* Record data. This MUST be a memory pool item */
+};          
 
 
 /*
@@ -101,12 +101,12 @@ struct DEV_RECORD {
  * Note, these values are negative to distinguish them
  * from user records where the FileIndex is forced positive.
  */
-#define PRE_LABEL   -1                /* Vol label on unwritten tape */
-#define VOL_LABEL   -2                /* Volume label first file */
-#define EOM_LABEL   -3                /* Writen at end of tape */        
-#define SOS_LABEL   -4                /* Start of Session */
-#define EOS_LABEL   -5                /* End of Session */
-#define EOT_LABEL   -6                /* End of physical tape (2 eofs) */
+#define PRE_LABEL   -1               /* Vol label on unwritten tape */
+#define VOL_LABEL   -2               /* Volume label first file */
+#define EOM_LABEL   -3               /* Writen at end of tape */        
+#define SOS_LABEL   -4               /* Start of Session */
+#define EOS_LABEL   -5               /* End of Session */
+#define EOT_LABEL   -6               /* End of physical tape (2 eofs) */
 
 /* 
  *   Volume Label Record.  This is the in-memory definition. The
@@ -121,27 +121,27 @@ struct Volume_Label {
    * in the DEVICE buffer, but are not actually written
    * to the tape.
    */
-  int32_t LabelType;                  /* This is written in header only */
-  uint32_t LabelSize;                 /* length of serialized label */
+  int32_t LabelType;                 /* This is written in header only */
+  uint32_t LabelSize;                /* length of serialized label */
   /*
    * The items below this line are stored on 
    * the tape
    */
-  char Id[32];                        /* Bacula Immortal ... */
+  char Id[32];                       /* Bacula Immortal ... */
 
-  uint32_t VerNum;                    /* Label version number */
+  uint32_t VerNum;                   /* Label version number */
 
   /* VerNum <= 10 */
-  float64_t label_date;               /* Date tape labeled */
-  float64_t label_time;               /* Time tape labeled */
+  float64_t label_date;              /* Date tape labeled */
+  float64_t label_time;              /* Time tape labeled */
 
   /* VerNum >= 11 */
-  btime_t   label_btime;              /* tdate tape labeled */
-  btime_t   write_btime;              /* tdate tape written */
+  btime_t   label_btime;             /* tdate tape labeled */
+  btime_t   write_btime;             /* tdate tape written */
 
   /* Unused with VerNum >= 11 */
-  float64_t write_date;               /* Date this label written */
-  float64_t write_time;               /* Time this label written */
+  float64_t write_date;              /* Date this label written */
+  float64_t write_time;              /* Time this label written */
 
   char VolName[MAX_NAME_LENGTH];      /* Volume name */
   char PrevVolName[MAX_NAME_LENGTH];  /* Previous Volume Name */
@@ -150,9 +150,9 @@ struct Volume_Label {
   char MediaType[MAX_NAME_LENGTH];    /* Type of this media */
 
   char HostName[MAX_NAME_LENGTH];     /* Host name of writing computer */
-  char LabelProg[50];                 /* Label program name */
-  char ProgVersion[50];               /* Program version */
-  char ProgDate[50];                  /* Program build date/time */
+  char LabelProg[50];                /* Label program name */
+  char ProgVersion[50];              /* Program version */
+  char ProgDate[50];                 /* Program build date/time */
 };
 
 #define SER_LENGTH_Volume_Label 1024   /* max serialised length of volume label */
@@ -165,27 +165,27 @@ typedef struct Volume_Label VOLUME_LABEL;
  *  This record is at the beginning and end of each session
  */
 struct Session_Label {
-  char Id[32];                        /* Bacula Immortal ... */
+  char Id[32];                       /* Bacula Immortal ... */
 
-  uint32_t VerNum;                    /* Label version number */
+  uint32_t VerNum;                   /* Label version number */
 
-  uint32_t JobId;                     /* Job id */
-  uint32_t VolumeIndex;               /* Sequence no of volume for this job */
+  uint32_t JobId;                    /* Job id */
+  uint32_t VolumeIndex;              /* Sequence no of volume for this job */
 
   /* VerNum >= 11 */
-  btime_t   write_btime;              /* Tdate this label written */
+  btime_t   write_btime;             /* Tdate this label written */
 
   /* VerNum < 11 */
-  float64_t write_date;               /* Date this label written */
+  float64_t write_date;              /* Date this label written */
 
   /* Unused VerNum >= 11 */
-  float64_t write_time;               /* Time this label written */
+  float64_t write_time;              /* Time this label written */
 
   char PoolName[MAX_NAME_LENGTH];     /* Pool name */
   char PoolType[MAX_NAME_LENGTH];     /* Pool type */
   char JobName[MAX_NAME_LENGTH];      /* base Job name */
   char ClientName[MAX_NAME_LENGTH];
-  char Job[MAX_NAME_LENGTH];          /* Unique name of this Job */
+  char Job[MAX_NAME_LENGTH];         /* Unique name of this Job */
   char FileSetName[MAX_NAME_LENGTH];
   char FileSetMD5[MAX_NAME_LENGTH];
   uint32_t JobType;
@@ -198,11 +198,11 @@ struct Session_Label {
   uint32_t StartFile;
   uint32_t EndFile;
   uint32_t JobErrors;
-  uint32_t JobStatus;                 /* Job status */
+  uint32_t JobStatus;                /* Job status */
 
 };
 typedef struct Session_Label SESSION_LABEL;
 
-#define SERIAL_BUFSIZE  1024          /* volume serialisation buffer size */
+#define SERIAL_BUFSIZE 1024          /* volume serialisation buffer size */
 
 #endif
index 2694345daea33c056dd06d0fe6aabadcb5e3d1fa..5022f86d8518e62e2ed20090bcb23f03d1942d58 100644 (file)
@@ -1,8 +1,8 @@
 /* */
 #define VERSION "1.31"
 #define VSTRING "1"
-#define BDATE   "25 Jun 2003"
-#define LSMDATE "25Jun03"
+#define BDATE   "26 Jun 2003"
+#define LSMDATE "26Jun03"
 
 /* Debug flags */
 #define DEBUG 1