]> www.ginac.de Git - ginac.git/commitdiff
* Fix incompatibilities with recent versions of libreadline by having
authorRichard Kreckel <Richard.Kreckel@uni-mainz.de>
Thu, 3 May 2001 23:50:48 +0000 (23:50 +0000)
committerRichard Kreckel <Richard.Kreckel@uni-mainz.de>
Thu, 3 May 2001 23:50:48 +0000 (23:50 +0000)
  configure find out the version and then doing ugly things with #ifdef.
* config.*: updates from upstream.

NEWS
acconfig.h
acinclude.m4
config.guess
config.sub
configure.in

diff --git a/NEWS b/NEWS
index f2a78fa0f2c57f04e162439ed0bd9233c9923be2..60ae0667a33b083eb58e5845bc39ae937aa7324e 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,8 @@
 This file records noteworthy changes.
 
 This file records noteworthy changes.
 
+0.8.3 (<date>)
+* Fix some build-problems (with recent libreadline).
+
 0.8.2 (24 April 2001)
 * degree(), ldegree(), coeff(), lcoeff(), tcoeff() and collect() work with
   non-symbols as the second argument in ginsh.
 0.8.2 (24 April 2001)
 * degree(), ldegree(), coeff(), lcoeff(), tcoeff() and collect() work with
   non-symbols as the second argument in ginsh.
index c73dd6c13bd5e547cf89f8764822e654e4f8e028..cac25acaf978ddfa4a1988e94b83ea1d3c47ba18 100644 (file)
 /* GiNaC archive file version age.  */
 #undef ARCHIVE_AGE
 
 /* GiNaC archive file version age.  */
 #undef ARCHIVE_AGE
 
+/* Major version of libreadline.  */
+#undef GINAC_RLVERSION_MAJOR
+
+/* Minor version of libreadline.  */
+#undef GINAC_RLVERSION_MINOR
+
 \f
 /* Leave that blank line there!!  Autoheader needs it.
    If you're adding to this file, keep in mind:
 \f
 /* Leave that blank line there!!  Autoheader needs it.
    If you're adding to this file, keep in mind:
index 157d7b854fd096872900a477338df08c2b755aec..68f75b2f2519dfc035aab8f1963600c8c3ded000 100644 (file)
@@ -4,6 +4,37 @@ dnl additions' names with AC_ but with GINAC_ in order to steer clear of
 dnl future trouble.
 dnl ===========================================================================
 
 dnl future trouble.
 dnl ===========================================================================
 
+dnl Usage: GINAC_RLVERSION
+dnl The maintainers of libreadline are complete morons: they don't care a shit
+dnl about compatiblilty (which is not so bad by itself) and at the same time 
+dnl they don't export the version to the preprocessor so we could kluge around 
+dnl incomatiblities.  The only reliable way to figure out the version is by 
+dnl checking the extern variable rl_library_version at runtime.  &#@$%*!
+AC_DEFUN(GINAC_RLVERSION,
+[AC_CACHE_CHECK([for version of libreadline], ginac_cv_rlversion, [
+AC_TRY_RUN([
+#include <stdio.h>
+#include <sys/types.h>
+#include <readline/readline.h>
+
+main()
+{
+    FILE *fd;
+    fd = fopen("conftest.out", "w");
+    fprintf(fd, "%s\n", rl_library_version);
+    fclose(fd);
+    exit(0);
+}], ginac_cv_rlversion=`cat 'conftest.out'`, ginac_cv_rlversion='unknown', ginac_cv_rlversion='4.2')
+if test "x${ginac_cv_rlversion}" != "xunknown"; then
+  RLVERSION_MAJOR=`echo ${ginac_cv_rlversion} | sed -e 's/\([[0-9]]\)\.\([[0-9]]\)/\1/'`
+  AC_DEFINE_UNQUOTED(GINAC_RLVERSION_MAJOR, $RLVERSION_MAJOR)
+  RLVERSION_MINOR=`echo ${ginac_cv_rlversion} | sed -e 's/\([[0-9]]\)\.\([[0-9]]\)/\2/'`
+  AC_DEFINE_UNQUOTED(GINAC_RLVERSION_MINOR, $RLVERSION_MINOR)
+else
+  GINAC_WARNING([I could not run a test of libreadline (needed for building ginsh ginsh).])
+fi
+])])
+
 dnl Usage: GINAC_TERMCAP
 dnl libreadline is based on the termcap functions.
 dnl Some systems have tgetent(), tgetnum(), tgetstr(), tgetflag(), tputs(),
 dnl Usage: GINAC_TERMCAP
 dnl libreadline is based on the termcap functions.
 dnl Some systems have tgetent(), tgetnum(), tgetstr(), tgetflag(), tputs(),
index 32a779ba9d32849131cc51a4cb2c613da1c90091..ba661651615d361468d6b54633a37f57662f8bbe 100755 (executable)
@@ -3,7 +3,7 @@
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
 #   Free Software Foundation, Inc.
 
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
 #   Free Software Foundation, Inc.
 
-timestamp='2001-01-17'
+timestamp='2001-04-20'
 
 # 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
 
 # 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
@@ -33,10 +33,6 @@ timestamp='2001-01-17'
 #
 # The plan is that this can be called by configure scripts if you
 # don't specify an explicit build system type.
 #
 # The plan is that this can be called by configure scripts if you
 # don't specify an explicit build system type.
-#
-# Only a few systems have been added to this list; please add others
-# (but try to keep the structure clean).
-#
 
 me=`echo "$0" | sed -e 's,.*/,,'`
 
 
 me=`echo "$0" | sed -e 's,.*/,,'`
 
@@ -412,10 +408,13 @@ EOF
 EOF
        $CC_FOR_BUILD $dummy.c -o $dummy \
          && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
 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 ;;
        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 ;;
     Night_Hawk:Power_UNIX:*:*)
        echo powerpc-harris-powerunix
        exit 0 ;;
@@ -463,9 +462,17 @@ 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 '
     ????????: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 ;;
        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
                sed 's/^                //' << EOF >$dummy.c
     *:AIX:2:3)
        if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
                sed 's/^                //' << EOF >$dummy.c
@@ -479,7 +486,7 @@ EOF
                        exit(0);
                        }
 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
                rm -f $dummy.c $dummy
                echo rs6000-ibm-aix3.2.5
        elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
@@ -488,9 +495,9 @@ EOF
                echo rs6000-ibm-aix3.2
        fi
        exit 0 ;;
                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 }'`
        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
                IBM_ARCH=rs6000
        else
                IBM_ARCH=powerpc
@@ -498,23 +505,10 @@ EOF
        if [ -x /usr/bin/oslevel ] ; then
                IBM_REV=`/usr/bin/oslevel`
        else
        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 ;;
        fi
        echo ${IBM_ARCH}-ibm-aix${IBM_REV}
        exit 0 ;;
-    *:AIX:*:5)
-       case "`lsattr -El proc0 -a type -F value`" in
-           PowerPC*) IBM_ARCH=powerpc
-                     IBM_MANUF=ibm ;;
-           Itanium)  IBM_ARCH=ia64
-                     IBM_MANUF=unknown ;;
-           POWER*)   IBM_ARCH=power
-                     IBM_MANUF=ibm ;;
-           *)        IBM_ARCH=powerpc
-                     IBM_MANUF=ibm ;;
-       esac
-       echo ${IBM_ARCH}-${IBM_MANUF}-aix${UNAME_VERSION}.${UNAME_RELEASE}
-       exit 0 ;;
     *:AIX:*:*)
        echo rs6000-ibm-aix
        exit 0 ;;
     *:AIX:*:*)
        echo rs6000-ibm-aix
        exit 0 ;;
@@ -629,7 +623,7 @@ EOF
          exit (0);
        }
 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 ;;
        rm -f $dummy.c $dummy
        echo unknown-hitachi-hiuxwe2
        exit 0 ;;
@@ -648,7 +642,7 @@ EOF
     hp8??:OSF1:*:*)
        echo hppa1.0-hp-osf
        exit 0 ;;
     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
        if [ -x /usr/sbin/sysversion ] ; then
            echo ${UNAME_MACHINE}-unknown-osf1mk
        else
@@ -714,7 +708,7 @@ EOF
     hp300:OpenBSD:*:*)
        echo m68k-unknown-openbsd${UNAME_RELEASE}
        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:*:*)
        echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
        exit 0 ;;
     sparc*:BSD/OS:*:*)
@@ -759,60 +753,38 @@ EOF
     i*86:Minix:*:*)
        echo ${UNAME_MACHINE}-pc-minix
        exit 0 ;;
     i*86:Minix:*:*)
        echo ${UNAME_MACHINE}-pc-minix
        exit 0 ;;
-    *: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_supported_emulations=`cd /; ld --help 2>&1 \
-                        | sed -ne '/supported emulations:/!d
-                                   s/[         ][      ]*/ /g
-                                   s/.*supported emulations: *//
-                                   s/ .*//
-                                   p'`
-        case "$ld_supported_emulations" in
-         *ia64)
-               echo "${UNAME_MACHINE}-unknown-linux"
-               exit 0
-               ;;
-         i?86linux)
-               echo "${UNAME_MACHINE}-pc-linux-gnuaout"
-               exit 0
-               ;;
-         elf_i?86)
-               TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
-               ;;
-         i?86coff)
-               echo "${UNAME_MACHINE}-pc-linux-gnucoff"
-               exit 0
-               ;;
-         sparclinux)
-               echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
-               exit 0
-               ;;
-         elf32_sparc)
-               echo "${UNAME_MACHINE}-unknown-linux-gnu"
-               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
+    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:*:*)
+       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 -f $dummy.c $dummy && exit 0
+       rm -f $dummy.c $dummy
+       ;;
+    ppc:Linux:*:*)
+       # Determine Lib Version
+       cat >$dummy.c <<EOF
 #include <features.h>
 #if defined(__GLIBC__)
 extern char __libc_version[];
 #include <features.h>
 #if defined(__GLIBC__)
 extern char __libc_version[];
@@ -825,143 +797,127 @@ main(argc, argv)
 #if defined(__GLIBC__)
   printf("%s %s\n", __libc_version, __libc_release);
 #else
 #if defined(__GLIBC__)
   printf("%s %s\n", __libc_version, __libc_release);
 #else
-  printf("unkown\n");
+  printf("unknown\n");
 #endif
   return 0;
 }
 EOF
 #endif
   return 0;
 }
 EOF
-               LIBC=""
-               $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null
+       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 ;;
+    alpha:Linux:*:*)
+       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
                if test "$?" = 0 ; then
-                       ./$dummy | grep 1\.99 > /dev/null
-                       if test "$?" = 0 ; then
-                               LIBC="libc1"
-                       fi
+                       LIBC="libc1"
                fi
                fi
-               rm -f $dummy.c $dummy
-               echo powerpc-unknown-linux-gnu${LIBC}
+       fi
+       rm -f $dummy.s $dummy
+       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_supported_emulations=`cd /; ld --help 2>&1 \
+                        | sed -ne '/supported emulations:/!d
+                                   s/[         ][      ]*/ /g
+                                   s/.*supported emulations: *//
+                                   s/ .*//
+                                   p'`
+        case "$ld_supported_emulations" in
+         i*86linux)
+               echo "${UNAME_MACHINE}-pc-linux-gnuaout"
                exit 0
                ;;
                exit 0
                ;;
-         shelf_linux)
-               echo "${UNAME_MACHINE}-unknown-linux-gnu"
+         elf_i*86)
+               TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
+               ;;
+         i*86coff)
+               echo "${UNAME_MACHINE}-pc-linux-gnucoff"
                exit 0
                ;;
        esac
                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
-       elif test "${UNAME_MACHINE}" = "x86_64"; then
-         echo x86_64-unknown-linux-gnu && exit 0
-       elif test "${UNAME_MACHINE}" = "parisc" -o "${UNAME_MACHINE}" = "hppa"; then
-         # 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
-       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.
-         test -z "$ld_supported_emulations" \
-           && 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
+       # 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.
+       test -z "$ld_supported_emulations" && 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
 #include <features.h>
 #ifdef __cplusplus
 #include <stdio.h>  /* for printf() prototype */
 #include <features.h>
 #ifdef __cplusplus
 #include <stdio.h>  /* for printf() prototype */
@@ -985,16 +941,16 @@ EOF
   return 0;
 }
 EOF
   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
-         test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
-       fi ;;
+       $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
+       ;;
 # 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.
 # 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*:*)
+    i*86:DYNIX/ptx:4*:*)
        echo i386-sequent-sysv4
        exit 0 ;;
        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,
         # 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,
@@ -1002,7 +958,7 @@ EOF
         # Use sysv4.2uw... so that sysv4* matches it.
        echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
        exit 0 ;;
         # 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}
        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}
@@ -1010,7 +966,7 @@ EOF
                echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
        fi
        exit 0 ;;
                echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
        fi
        exit 0 ;;
-    i?86:*:5:7*)
+    i*86:*:5:7*)
         # Fixed at (any) Pentium or better
         UNAME_MACHINE=i586
         if [ ${UNAME_SYSTEM} = "UnixWare" ] ; then
         # Fixed at (any) Pentium or better
         UNAME_MACHINE=i586
         if [ ${UNAME_SYSTEM} = "UnixWare" ] ; then
@@ -1019,7 +975,7 @@ EOF
            echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
        fi
        exit 0 ;;
            echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
        fi
        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
        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
@@ -1037,7 +993,7 @@ EOF
                echo ${UNAME_MACHINE}-pc-sysv32
        fi
        exit 0 ;;
                echo ${UNAME_MACHINE}-pc-sysv32
        fi
        exit 0 ;;
-    i?86:*DOS:*:*)
+    i*86:*DOS:*:*)
        echo ${UNAME_MACHINE}-pc-msdosdjgpp
        exit 0 ;;
     pc:*:*:*)
        echo ${UNAME_MACHINE}-pc-msdosdjgpp
        exit 0 ;;
     pc:*:*:*)
@@ -1076,13 +1032,13 @@ 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 ;;
     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 ;;
        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 i386-unknown-lynxos${UNAME_RELEASE}
        exit 0 ;;
     TSUNAMI:LynxOS:2.*:*)
@@ -1091,7 +1047,7 @@ EOF
     rs6000:LynxOS:2.*:*)
        echo rs6000-unknown-lynxos${UNAME_RELEASE}
        exit 0 ;;
     rs6000:LynxOS:2.*:*)
        echo rs6000-unknown-lynxos${UNAME_RELEASE}
        exit 0 ;;
-    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:*)
+    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 powerpc-unknown-lynxos${UNAME_RELEASE}
        exit 0 ;;
     SM[BE]S:UNIX_SV:*:*)
@@ -1193,7 +1149,7 @@ EOF
        fi
        echo ${UNAME_MACHINE}-unknown-plan9
        exit 0 ;;
        fi
        echo ${UNAME_MACHINE}-unknown-plan9
        exit 0 ;;
-    i?86:OS/2:*:*)
+    i*86:OS/2:*:*)
        # If we were able to find `uname', then EMX Unix compatibility
        # is probably installed.
        echo ${UNAME_MACHINE}-pc-os2-emx
        # If we were able to find `uname', then EMX Unix compatibility
        # is probably installed.
        echo ${UNAME_MACHINE}-pc-os2-emx
@@ -1307,11 +1263,24 @@ main ()
 #endif
 
 #if defined (vax)
 #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)
 #endif
 
 #if defined (alliant) && defined (i860)
@@ -1322,7 +1291,7 @@ main ()
 }
 EOF
 
 }
 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.
 rm -f $dummy.c $dummy
 
 # Apollos put the system type in the environment.
index fe8d4aca1acdb46b8d0888eefecb8e59c34e898b..a06a480adafdfbe81925988759b3e29088d6d2e0 100755 (executable)
@@ -3,7 +3,7 @@
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
 #   Free Software Foundation, Inc.
 
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
 #   Free Software Foundation, Inc.
 
-timestamp='2001-01-12'
+timestamp='2001-04-20'
 
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
 
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
@@ -230,9 +230,11 @@ case $basic_machine in
                | mips16 | mips64 | mipsel | mips64el \
                | mips64orion | mips64orionel | mipstx39 | mipstx39el \
                | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
                | mips16 | mips64 | mipsel | mips64el \
                | mips64orion | mips64orionel | mipstx39 | mipstx39el \
                | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
-               | mips64vr5000 | miprs64vr5000el | mcore \
-               | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \
-               | thumb | d10v | d30v | fr30 | avr | openrisc)
+               | mips64vr5000 | miprs64vr5000el | mcore | s390 | s390x \
+               | sparc | sparclet | sparclite | sparc64 | sparcv9 | sparcv9b \
+               | v850 | c4x \
+               | thumb | d10v | d30v | fr30 | avr | openrisc | tic80 \
+               | pj | pjl | h8500)
                basic_machine=$basic_machine-unknown
                ;;
        m6811 | m68hc11 | m6812 | m68hc12)
                basic_machine=$basic_machine-unknown
                ;;
        m6811 | m68hc11 | m6812 | m68hc12)
@@ -240,13 +242,13 @@ case $basic_machine in
                basic_machine=$basic_machine-unknown
                os=-none
                ;;
                basic_machine=$basic_machine-unknown
                os=-none
                ;;
-       m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65 | pj | pjl)
+       m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | w65)
                ;;
 
        # We use `pc' rather than `unknown'
        # because (1) that's what they normally are, and
        # (2) the word "unknown" tends to confuse beginning users.
                ;;
 
        # 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[234567]86 | x86_64)
+       i*86 | x86_64)
          basic_machine=$basic_machine-pc
          ;;
        # Object if more than one company name word.
          basic_machine=$basic_machine-pc
          ;;
        # Object if more than one company name word.
@@ -256,7 +258,7 @@ case $basic_machine in
                ;;
        # Recognize the basic CPU types with company name.
        # FIXME: clean up the formatting here.
                ;;
        # Recognize the basic CPU types with company name.
        # FIXME: clean up the formatting here.
-       vax-* | tahoe-* | i[234567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \
+       vax-* | tahoe-* | i*86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \
              | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | c[123]* \
              | arm-*  | armbe-* | armle-* | armv*-* | strongarm-* | xscale-* \
              | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
              | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | c[123]* \
              | arm-*  | armbe-* | armle-* | armv*-* | strongarm-* | xscale-* \
              | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
@@ -270,14 +272,16 @@ case $basic_machine in
              | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
              | clipper-* | orion-* \
              | sparclite-* | pdp10-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
              | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
              | clipper-* | orion-* \
              | sparclite-* | pdp10-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
-             | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \
+             | sparc64-* | sparcv9-* | sparcv9b-* | sparc86x-* \
+             | mips16-* | mips64-* | mipsel-* \
              | mips64el-* | mips64orion-* | mips64orionel-* \
              | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
              | mipstx39-* | mipstx39el-* | mcore-* \
              | mips64el-* | mips64orion-* | mips64orionel-* \
              | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
              | mipstx39-* | mipstx39el-* | mcore-* \
-             | f30[01]-* | f700-* | s390-* | sv1-* | t3e-* \
+             | f30[01]-* | f700-* | s390-* | s390x-* | sv1-* | t3e-* \
+             | [cjt]90-* \
              | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
              | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
-             | thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* \
-             | bs2000-* | tic54x-* | c54x-* | x86_64-*)
+             | thumb-* | v850-* | d30v-* | tic30-* | tic80-* | c30-* | fr30-* \
+             | bs2000-* | tic54x-* | c54x-* | x86_64-* | pj-* | pjl-*)
                ;;
        # Recognize the various machine names and aliases which stand
        # for a CPU type and a company and sometimes even an OS.
                ;;
        # Recognize the various machine names and aliases which stand
        # for a CPU type and a company and sometimes even an OS.
@@ -368,8 +372,8 @@ case $basic_machine in
                basic_machine=cray2-cray
                os=-unicos
                ;;
                basic_machine=cray2-cray
                os=-unicos
                ;;
-       [ctj]90-cray)
-               basic_machine=c90-cray
+       [cjt]90)
+               basic_machine=${basic_machine}-cray
                os=-unicos
                ;;
        crds | unos)
                os=-unicos
                ;;
        crds | unos)
@@ -504,19 +508,19 @@ case $basic_machine in
                basic_machine=i370-ibm
                ;;
 # I'm not sure what "Sysv32" means.  Should this be sysv3.2?
                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
                ;;
                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
                ;;
                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
                ;;
                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
                ;;
                basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
                os=-solaris2
                ;;
@@ -933,7 +937,7 @@ case $basic_machine in
        sh3 | sh4)
                basic_machine=sh-unknown
                ;;
        sh3 | sh4)
                basic_machine=sh-unknown
                ;;
-       sparc | sparcv9)
+       sparc | sparcv9 | sparcv9b)
                basic_machine=sparc-sun
                ;;
         cydra)
                basic_machine=sparc-sun
                ;;
         cydra)
@@ -955,6 +959,9 @@ case $basic_machine in
                basic_machine=c4x-none
                os=-coff
                ;;
                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
        *)
                echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
                exit 1
@@ -1020,7 +1027,7 @@ case $os in
                ;;
        -qnx*)
                case $basic_machine in
                ;;
        -qnx*)
                case $basic_machine in
-                   x86-* | i[34567]86-*)
+                   x86-* | i*86-*)
                        ;;
                    *)
                        os=-nto$os
                        ;;
                    *)
                        os=-nto$os
index 692ba3eea868826af1d4b791825f9dfa70217ba1..efc2f8865e576e5b28d7d9f9944271fbce73d93a 100644 (file)
@@ -94,7 +94,9 @@ GINAC_TERMCAP
 save_LIBS=$LIBS
 LIBS="$LIBTERMCAP $LIBS"
 AC_CHECK_LIB(readline, readline)
 save_LIBS=$LIBS
 LIBS="$LIBTERMCAP $LIBS"
 AC_CHECK_LIB(readline, readline)
-if test "x${ac_cv_lib_readline_readline}" != "xyes"; then
+if test "x${ac_cv_lib_readline_readline}" = "xyes"; then
+  GINAC_RLVERSION
+else
   GINAC_WARNING([I could not find libreadline (needed by ginsh).])
 fi
 GINSH_LIBS=$LIBS
   GINAC_WARNING([I could not find libreadline (needed by ginsh).])
 fi
 GINSH_LIBS=$LIBS