Changeset f413ec5 in git


Ignore:
Timestamp:
Aug 25, 1999, 6:02:48 PM (25 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'b4f17ed1d25f93d46dbe29e4b499baecc2fd51bb')
Children:
ba268720cf39a2b4c332fd5d4b4546ed4f01cc8e
Parents:
abcc453829974f82c44759593b2abe1da573a348
Message:
* hannes: dynamic loading of readline
  (Makefile.in cntrlc.cc configure configure.in feResource.cc
   febase.cc febase.h febase.inc feread.cc misc.cc mod2.h.in)


git-svn-id: file:///usr/local/Singular/svn/trunk@3549 2c84dea3-7e68-4137-9b89-c4e89433aadc
Location:
Singular
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • Singular/Makefile.in

    rabcc453 rf413ec5  
    5454LDFLAGS         = @LDFLAGS@
    5555LD_DYN_FLAGS    = @LD_DYN_FLAGS@
     56LD_LIBC         = @LD_LIBC@
    5657STATIC_LDFLAGS  = @STATIC_LDFLAGS@
    5758LIBS            = -lm @NEED_LIBS@
     
    181182        ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${CXXTEMPLFLAGS} ${DEFS} -o Singular \
    182183        tesths.cc iparith.o mpsr_Tok.o ${OBJS} ${LDFLAGS} ${LIBS} \
    183         ${LD_DYN_FLAGS} gmalloc.o
     184        ${LD_DYN_FLAGS} gmalloc.o ${LD_LIBC}
    184185
    185186Singular-static: mod2.h Makefile version.h scanner.cc  gmalloc.o \
     
    188189        -o Singular-static \
    189190        tesths.cc iparith.o mpsr_Tok.o \
    190         ${OBJS} ${STATIC_LDFLAGS} ${LDFLAGS} ${LIBS} ${LD_DYN_FLAGS} gmalloc.o
     191        ${OBJS} ${STATIC_LDFLAGS} ${LDFLAGS} ${LIBS} ${LD_DYN_FLAGS} \
     192        gmalloc.o ${LD_LIBC}
    191193
    192194iparith.o mpsr_Tok.o : iparith.inc mpsr_Tok.inc
     
    198200        ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${CXXTEMPLFLAGS} ${DEFS} -DGENTABLE \
    199201             -o gentable iparith.cc tesths.cc mpsr_Tok.cc \
    200              ${OBJS} ${LDFLAGS} ${LIBS} gmalloc.o
     202             ${OBJS} ${LDFLAGS} ${LIBS} gmalloc.o ${LD_LIBC}
    201203        ./gentable
    202204        /bin/rm -f gentable gentable.exe
  • Singular/cntrlc.cc

    rabcc453 rf413ec5  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: cntrlc.cc,v 1.23 1999-05-10 12:51:18 krueger Exp $ */
     4/* $Id: cntrlc.cc,v 1.24 1999-08-25 16:02:42 Singular Exp $ */
    55/*
    66* ABSTRACT - interupt handling
     
    1212#include <stdlib.h>
    1313#include <signal.h>
     14#include "version.h"
    1415#include "mod2.h"
    1516#include "tok.h"
     
    1819#include "febase.h"
    1920#include "cntrlc.h"
    20 #include "version.h"
    2121#include "polys.h"
    2222#ifdef PAGE_TEST
  • Singular/configure

    rabcc453 rf413ec5  
    22
    33# Guess values for system-dependent variables and create Makefiles.
    4 # Generated automatically using autoconf version 2.13
     4# Generated automatically using autoconf version 2.12
    55# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
    66#
     
    3333  --with-namespaces       do compile namespace support"
    3434ac_help="$ac_help
    35   --with-dl               do use dl (no dynamic linking)"
     35  --with-dl               do use dl (dynamic linking)"
    3636ac_help="$ac_help
    3737  --with-apint=PACKAGE    use PACKAGE for arbitary integer arithmetic"
     
    8484subdirs=
    8585MFLAGS= MAKEFLAGS=
    86 SHELL=${CONFIG_SHELL-/bin/sh}
    8786# Maximum number of lines to put in a shell here document.
    8887ac_max_here_lines=12
     
    368367
    369368  -version | --version | --versio | --versi | --vers)
    370     echo "configure generated by autoconf version 2.13"
     369    echo "configure generated by autoconf version 2.12"
    371370    exit 0 ;;
    372371
     
    538537ac_cpp='$CPP $CPPFLAGS'
    539538ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
    540 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
     539ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
    541540cross_compiling=$ac_cv_prog_cc_cross
    542541
    543 ac_exeext=
    544 ac_objext=o
    545542if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
    546543  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
     
    560557
    561558echo $ac_n "checking uname for singular""... $ac_c" 1>&6
    562 echo "configure:563: checking uname for singular" >&5
     559echo "configure:560: checking uname for singular" >&5
    563560if eval "test \"`echo '$''{'ac_cv_singuname'+set}'`\" = set"; then
    564561  echo $ac_n "(cached) $ac_c" 1>&6
     
    648645set dummy gcc; ac_word=$2
    649646echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    650 echo "configure:651: checking for $ac_word" >&5
     647echo "configure:648: checking for $ac_word" >&5
    651648if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
    652649  echo $ac_n "(cached) $ac_c" 1>&6
     
    655652  ac_cv_prog_CC="$CC" # Let the user override the test.
    656653else
    657   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
    658   ac_dummy="$PATH"
    659   for ac_dir in $ac_dummy; do
     654  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
     655  for ac_dir in $PATH; do
    660656    test -z "$ac_dir" && ac_dir=.
    661657    if test -f $ac_dir/$ac_word; then
     
    678674set dummy cc; ac_word=$2
    679675echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    680 echo "configure:681: checking for $ac_word" >&5
     676echo "configure:677: checking for $ac_word" >&5
    681677if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
    682678  echo $ac_n "(cached) $ac_c" 1>&6
     
    685681  ac_cv_prog_CC="$CC" # Let the user override the test.
    686682else
    687   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
     683  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
    688684  ac_prog_rejected=no
    689   ac_dummy="$PATH"
    690   for ac_dir in $ac_dummy; do
     685  for ac_dir in $PATH; do
    691686    test -z "$ac_dir" && ac_dir=.
    692687    if test -f $ac_dir/$ac_word; then
     
    723718fi
    724719
    725   if test -z "$CC"; then
    726     case "`uname -s`" in
    727     *win32* | *WIN32*)
    728       # Extract the first word of "cl", so it can be a program name with args.
    729 set dummy cl; ac_word=$2
    730 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    731 echo "configure:732: checking for $ac_word" >&5
    732 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
    733   echo $ac_n "(cached) $ac_c" 1>&6
    734 else
    735   if test -n "$CC"; then
    736   ac_cv_prog_CC="$CC" # Let the user override the test.
    737 else
    738   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
    739   ac_dummy="$PATH"
    740   for ac_dir in $ac_dummy; do
    741     test -z "$ac_dir" && ac_dir=.
    742     if test -f $ac_dir/$ac_word; then
    743       ac_cv_prog_CC="cl"
    744       break
    745     fi
    746   done
    747   IFS="$ac_save_ifs"
    748 fi
    749 fi
    750 CC="$ac_cv_prog_CC"
    751 if test -n "$CC"; then
    752   echo "$ac_t""$CC" 1>&6
    753 else
    754   echo "$ac_t""no" 1>&6
    755 fi
    756  ;;
    757     esac
    758   fi
    759720  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
    760721fi
    761722
    762723echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
    763 echo "configure:764: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
     724echo "configure:725: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
    764725
    765726ac_ext=c
     
    767728ac_cpp='$CPP $CPPFLAGS'
    768729ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
    769 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
     730ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
    770731cross_compiling=$ac_cv_prog_cc_cross
    771732
    772 cat > conftest.$ac_ext << EOF
    773 
    774 #line 775 "configure"
    775 #include "confdefs.h"
    776 
     733cat > conftest.$ac_ext <<EOF
     734#line 735 "configure"
     735#include "confdefs.h"
    777736main(){return(0);}
    778737EOF
    779 if { (eval echo configure:780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     738if { (eval echo configure:739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    780739  ac_cv_prog_cc_works=yes
    781740  # If we can't run a trivial program, we are probably using a cross compiler.
     
    791750fi
    792751rm -fr conftest*
    793 ac_ext=c
    794 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
    795 ac_cpp='$CPP $CPPFLAGS'
    796 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
    797 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
    798 cross_compiling=$ac_cv_prog_cc_cross
    799752
    800753echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
     
    803756fi
    804757echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
    805 echo "configure:806: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
     758echo "configure:759: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
    806759echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
    807760cross_compiling=$ac_cv_prog_cc_cross
    808761
    809762echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
    810 echo "configure:811: checking whether we are using GNU C" >&5
     763echo "configure:764: checking whether we are using GNU C" >&5
    811764if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
    812765  echo $ac_n "(cached) $ac_c" 1>&6
     
    817770#endif
    818771EOF
    819 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:820: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
     772if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:773: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
    820773  ac_cv_prog_gcc=yes
    821774else
     
    828781if test $ac_cv_prog_gcc = yes; then
    829782  GCC=yes
    830 else
    831   GCC=
    832 fi
    833 
    834 ac_test_CFLAGS="${CFLAGS+set}"
    835 ac_save_CFLAGS="$CFLAGS"
    836 CFLAGS=
    837 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
    838 echo "configure:839: checking whether ${CC-cc} accepts -g" >&5
     783  ac_test_CFLAGS="${CFLAGS+set}"
     784  ac_save_CFLAGS="$CFLAGS"
     785  CFLAGS=
     786  echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
     787echo "configure:788: checking whether ${CC-cc} accepts -g" >&5
    839788if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
    840789  echo $ac_n "(cached) $ac_c" 1>&6
     
    851800
    852801echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
    853 if test "$ac_test_CFLAGS" = set; then
    854   CFLAGS="$ac_save_CFLAGS"
    855 elif test $ac_cv_prog_cc_g = yes; then
    856   if test "$GCC" = yes; then
     802  if test "$ac_test_CFLAGS" = set; then
     803    CFLAGS="$ac_save_CFLAGS"
     804  elif test $ac_cv_prog_cc_g = yes; then
    857805    CFLAGS="-g -O2"
    858806  else
    859     CFLAGS="-g"
     807    CFLAGS="-O2"
    860808  fi
    861809else
    862   if test "$GCC" = yes; then
    863     CFLAGS="-O2"
    864   else
    865     CFLAGS=
    866   fi
     810  GCC=
     811  test "${CFLAGS+set}" = set || CFLAGS="-g"
    867812fi
    868813
    869814echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
    870 echo "configure:871: checking how to run the C preprocessor" >&5
     815echo "configure:816: checking how to run the C preprocessor" >&5
    871816# On Suns, sometimes $CPP names a directory.
    872817if test -n "$CPP" && test -d "$CPP"; then
     
    883828  # not just through cpp.
    884829  cat > conftest.$ac_ext <<EOF
    885 #line 886 "configure"
     830#line 831 "configure"
    886831#include "confdefs.h"
    887832#include <assert.h>
     
    889834EOF
    890835ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    891 { (eval echo configure:892: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    892 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
     836{ (eval echo configure:837: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     837ac_err=`grep -v '^ *+' conftest.out`
    893838if test -z "$ac_err"; then
    894839  :
     
    900845  CPP="${CC-cc} -E -traditional-cpp"
    901846  cat > conftest.$ac_ext <<EOF
    902 #line 903 "configure"
     847#line 848 "configure"
    903848#include "confdefs.h"
    904849#include <assert.h>
     
    906851EOF
    907852ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    908 { (eval echo configure:909: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    909 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
     853{ (eval echo configure:854: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     854ac_err=`grep -v '^ *+' conftest.out`
    910855if test -z "$ac_err"; then
    911856  :
     
    915860  cat conftest.$ac_ext >&5
    916861  rm -rf conftest*
    917   CPP="${CC-cc} -nologo -E"
    918   cat > conftest.$ac_ext <<EOF
    919 #line 920 "configure"
    920 #include "confdefs.h"
    921 #include <assert.h>
    922 Syntax Error
    923 EOF
    924 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    925 { (eval echo configure:926: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    926 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
    927 if test -z "$ac_err"; then
    928   :
    929 else
    930   echo "$ac_err" >&5
    931   echo "configure: failed program was:" >&5
    932   cat conftest.$ac_ext >&5
    933   rm -rf conftest*
    934862  CPP=/lib/cpp
    935863fi
     
    937865fi
    938866rm -f conftest*
    939 fi
    940 rm -f conftest*
    941867  ac_cv_prog_CPP="$CPP"
    942868fi
     
    947873echo "$ac_t""$CPP" 1>&6
    948874
    949 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
     875for ac_prog in $CCC c++ g++ gcc CC cxx cc++
    950876do
    951877# Extract the first word of "$ac_prog", so it can be a program name with args.
    952878set dummy $ac_prog; ac_word=$2
    953879echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    954 echo "configure:955: checking for $ac_word" >&5
     880echo "configure:881: checking for $ac_word" >&5
    955881if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
    956882  echo $ac_n "(cached) $ac_c" 1>&6
     
    959885  ac_cv_prog_CXX="$CXX" # Let the user override the test.
    960886else
    961   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
    962   ac_dummy="$PATH"
    963   for ac_dir in $ac_dummy; do
     887  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
     888  for ac_dir in $PATH; do
    964889    test -z "$ac_dir" && ac_dir=.
    965890    if test -f $ac_dir/$ac_word; then
     
    984909
    985910echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
    986 echo "configure:987: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
     911echo "configure:912: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
    987912
    988913ac_ext=C
     
    990915ac_cpp='$CXXCPP $CPPFLAGS'
    991916ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
    992 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
     917ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
    993918cross_compiling=$ac_cv_prog_cxx_cross
    994919
    995 cat > conftest.$ac_ext << EOF
    996 
    997 #line 998 "configure"
    998 #include "confdefs.h"
    999 
    1000 int main(){return(0);}
    1001 EOF
    1002 if { (eval echo configure:1003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     920cat > conftest.$ac_ext <<EOF
     921#line 922 "configure"
     922#include "confdefs.h"
     923main(){return(0);}
     924EOF
     925if { (eval echo configure:926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    1003926  ac_cv_prog_cxx_works=yes
    1004927  # If we can't run a trivial program, we are probably using a cross compiler.
     
    1018941ac_cpp='$CPP $CPPFLAGS'
    1019942ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
    1020 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
     943ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
    1021944cross_compiling=$ac_cv_prog_cc_cross
    1022945
     
    1026949fi
    1027950echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
    1028 echo "configure:1029: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
     951echo "configure:952: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
    1029952echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
    1030953cross_compiling=$ac_cv_prog_cxx_cross
    1031954
    1032955echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
    1033 echo "configure:1034: checking whether we are using GNU C++" >&5
     956echo "configure:957: checking whether we are using GNU C++" >&5
    1034957if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
    1035958  echo $ac_n "(cached) $ac_c" 1>&6
     
    1040963#endif
    1041964EOF
    1042 if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1043: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
     965if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:966: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
    1043966  ac_cv_prog_gxx=yes
    1044967else
     
    1051974if test $ac_cv_prog_gxx = yes; then
    1052975  GXX=yes
    1053 else
    1054   GXX=
    1055 fi
    1056 
    1057 ac_test_CXXFLAGS="${CXXFLAGS+set}"
    1058 ac_save_CXXFLAGS="$CXXFLAGS"
    1059 CXXFLAGS=
    1060 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
    1061 echo "configure:1062: checking whether ${CXX-g++} accepts -g" >&5
     976  ac_test_CXXFLAGS="${CXXFLAGS+set}"
     977  ac_save_CXXFLAGS="$CXXFLAGS"
     978  CXXFLAGS=
     979  echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
     980echo "configure:981: checking whether ${CXX-g++} accepts -g" >&5
    1062981if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
    1063982  echo $ac_n "(cached) $ac_c" 1>&6
     
    1074993
    1075994echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
    1076 if test "$ac_test_CXXFLAGS" = set; then
    1077   CXXFLAGS="$ac_save_CXXFLAGS"
    1078 elif test $ac_cv_prog_cxx_g = yes; then
    1079   if test "$GXX" = yes; then
     995  if test "$ac_test_CXXFLAGS" = set; then
     996    CXXFLAGS="$ac_save_CXXFLAGS"
     997  elif test $ac_cv_prog_cxx_g = yes; then
    1080998    CXXFLAGS="-g -O2"
    1081999  else
    1082     CXXFLAGS="-g"
     1000    CXXFLAGS="-O2"
    10831001  fi
    10841002else
    1085   if test "$GXX" = yes; then
    1086     CXXFLAGS="-O2"
    1087   else
    1088     CXXFLAGS=
    1089   fi
     1003  GXX=
     1004  test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
    10901005fi
    10911006
    10921007echo $ac_n "checking for AIX""... $ac_c" 1>&6
    1093 echo "configure:1094: checking for AIX" >&5
     1008echo "configure:1009: checking for AIX" >&5
    10941009cat > conftest.$ac_ext <<EOF
    1095 #line 1096 "configure"
     1010#line 1011 "configure"
    10961011#include "confdefs.h"
    10971012#ifdef _AIX
     
    11231038# check whether the compiler accepts -pipe
    11241039echo $ac_n "checking whether compiler accepts -pipe""... $ac_c" 1>&6
    1125 echo "configure:1126: checking whether compiler accepts -pipe" >&5
     1040echo "configure:1041: checking whether compiler accepts -pipe" >&5
    11261041temp_cflags=${CFLAGS}
    11271042CFLAGS="${CFLAGS} -pipe"
     
    11301045else
    11311046  cat > conftest.$ac_ext <<EOF
    1132 #line 1133 "configure"
     1047#line 1048 "configure"
    11331048#include "confdefs.h"
    11341049
     
    11371052; return 0; }
    11381053EOF
    1139 if { (eval echo configure:1140: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     1054if { (eval echo configure:1055: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    11401055  rm -rf conftest*
    11411056  ac_cv_cxx_have_pipe=yes
     
    11611076# Customize CFLAGS
    11621077echo $ac_n "checking whether _AIX is defined""... $ac_c" 1>&6
    1163 echo "configure:1164: checking whether _AIX is defined" >&5
     1078echo "configure:1079: checking whether _AIX is defined" >&5
    11641079if eval "test \"`echo '$''{'ac_cv_is_aix'+set}'`\" = set"; then
    11651080  echo $ac_n "(cached) $ac_c" 1>&6
    11661081else
    11671082  cat > conftest.$ac_ext <<EOF
    1168 #line 1169 "configure"
     1083#line 1084 "configure"
    11691084#include "confdefs.h"
    11701085#ifdef _AIX
     
    12171132
    12181133echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
    1219 echo "configure:1220: checking whether ${MAKE-make} sets \${MAKE}" >&5
     1134echo "configure:1135: checking whether ${MAKE-make} sets \${MAKE}" >&5
    12201135set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
    12211136if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
     
    12901205if test "${with_lex+set}" != set; then
    12911206  echo $ac_n "checking for flex""... $ac_c" 1>&6
    1292 echo "configure:1293: checking for flex" >&5
     1207echo "configure:1208: checking for flex" >&5
    12931208    if eval "test \"`echo '$''{'ac_cv_prog_flex'+set}'`\" = set"; then
    12941209  echo $ac_n "(cached) $ac_c" 1>&6
     
    13211236set dummy $ac_prog; ac_word=$2
    13221237echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    1323 echo "configure:1324: checking for $ac_word" >&5
     1238echo "configure:1239: checking for $ac_word" >&5
    13241239if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
    13251240  echo $ac_n "(cached) $ac_c" 1>&6
     
    13281243  ac_cv_prog_LEX="$LEX" # Let the user override the test.
    13291244else
    1330   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
    1331   ac_dummy="$PATH"
    1332   for ac_dir in $ac_dummy; do
     1245  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
     1246  for ac_dir in $PATH; do
    13331247    test -z "$ac_dir" && ac_dir=.
    13341248    if test -f $ac_dir/$ac_word; then
     
    13611275set dummy $ac_prog; ac_word=$2
    13621276echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    1363 echo "configure:1364: checking for $ac_word" >&5
     1277echo "configure:1278: checking for $ac_word" >&5
    13641278if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then
    13651279  echo $ac_n "(cached) $ac_c" 1>&6
     
    13681282  ac_cv_prog_BISON="$BISON" # Let the user override the test.
    13691283else
    1370   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
    1371   ac_dummy="$PATH"
    1372   for ac_dir in $ac_dummy; do
     1284  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
     1285  for ac_dir in $PATH; do
    13731286    test -z "$ac_dir" && ac_dir=.
    13741287    if test -f $ac_dir/$ac_word; then
     
    13961309# ln -s 
    13971310echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
    1398 echo "configure:1399: checking whether ln -s works" >&5
     1311echo "configure:1312: checking whether ln -s works" >&5
    13991312if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
    14001313  echo $ac_n "(cached) $ac_c" 1>&6
     
    14191332# lib checks
    14201333echo $ac_n "checking for atof in -lm""... $ac_c" 1>&6
    1421 echo "configure:1422: checking for atof in -lm" >&5
     1334echo "configure:1335: checking for atof in -lm" >&5
    14221335ac_lib_var=`echo m'_'atof | sed 'y%./+-%__p_%'`
    14231336if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     
    14271340LIBS="-lm  $LIBS"
    14281341cat > conftest.$ac_ext <<EOF
    1429 #line 1430 "configure"
     1342#line 1343 "configure"
    14301343#include "confdefs.h"
    14311344/* Override any gcc2 internal prototype to avoid an error.  */
     
    14381351; return 0; }
    14391352EOF
    1440 if { (eval echo configure:1441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     1353if { (eval echo configure:1354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    14411354  rm -rf conftest*
    14421355  eval "ac_cv_lib_$ac_lib_var=yes"
     
    14661379
    14671380echo $ac_n "checking for socket in -lbsd""... $ac_c" 1>&6
    1468 echo "configure:1469: checking for socket in -lbsd" >&5
     1381echo "configure:1382: checking for socket in -lbsd" >&5
    14691382ac_lib_var=`echo bsd'_'socket | sed 'y%./+-%__p_%'`
    14701383if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     
    14741387LIBS="-lbsd  $LIBS"
    14751388cat > conftest.$ac_ext <<EOF
    1476 #line 1477 "configure"
     1389#line 1390 "configure"
    14771390#include "confdefs.h"
    14781391/* Override any gcc2 internal prototype to avoid an error.  */
     
    14851398; return 0; }
    14861399EOF
    1487 if { (eval echo configure:1488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     1400if { (eval echo configure:1401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    14881401  rm -rf conftest*
    14891402  eval "ac_cv_lib_$ac_lib_var=yes"
     
    15131426
    15141427echo $ac_n "checking for listen in -lsocket""... $ac_c" 1>&6
    1515 echo "configure:1516: checking for listen in -lsocket" >&5
     1428echo "configure:1429: checking for listen in -lsocket" >&5
    15161429ac_lib_var=`echo socket'_'listen | sed 'y%./+-%__p_%'`
    15171430if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     
    15211434LIBS="-lsocket  $LIBS"
    15221435cat > conftest.$ac_ext <<EOF
    1523 #line 1524 "configure"
     1436#line 1437 "configure"
    15241437#include "confdefs.h"
    15251438/* Override any gcc2 internal prototype to avoid an error.  */
     
    15321445; return 0; }
    15331446EOF
    1534 if { (eval echo configure:1535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     1447if { (eval echo configure:1448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    15351448  rm -rf conftest*
    15361449  eval "ac_cv_lib_$ac_lib_var=yes"
     
    15601473
    15611474echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
    1562 echo "configure:1563: checking for gethostbyname in -lnsl" >&5
     1475echo "configure:1476: checking for gethostbyname in -lnsl" >&5
    15631476ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
    15641477if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     
    15681481LIBS="-lnsl  $LIBS"
    15691482cat > conftest.$ac_ext <<EOF
    1570 #line 1571 "configure"
     1483#line 1484 "configure"
    15711484#include "confdefs.h"
    15721485/* Override any gcc2 internal prototype to avoid an error.  */
     
    15791492; return 0; }
    15801493EOF
    1581 if { (eval echo configure:1582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     1494if { (eval echo configure:1495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    15821495  rm -rf conftest*
    15831496  eval "ac_cv_lib_$ac_lib_var=yes"
     
    16071520
    16081521echo $ac_n "checking for index in -lucb""... $ac_c" 1>&6
    1609 echo "configure:1610: checking for index in -lucb" >&5
     1522echo "configure:1523: checking for index in -lucb" >&5
    16101523ac_lib_var=`echo ucb'_'index | sed 'y%./+-%__p_%'`
    16111524if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     
    16151528LIBS="-lucb  $LIBS"
    16161529cat > conftest.$ac_ext <<EOF
    1617 #line 1618 "configure"
     1530#line 1531 "configure"
    16181531#include "confdefs.h"
    16191532/* Override any gcc2 internal prototype to avoid an error.  */
     
    16261539; return 0; }
    16271540EOF
    1628 if { (eval echo configure:1629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     1541if { (eval echo configure:1542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    16291542  rm -rf conftest*
    16301543  eval "ac_cv_lib_$ac_lib_var=yes"
     
    16561569# heder file checks
    16571570echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
    1658 echo "configure:1659: checking for ANSI C header files" >&5
     1571echo "configure:1572: checking for ANSI C header files" >&5
    16591572if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
    16601573  echo $ac_n "(cached) $ac_c" 1>&6
    16611574else
    16621575  cat > conftest.$ac_ext <<EOF
    1663 #line 1664 "configure"
     1576#line 1577 "configure"
    16641577#include "confdefs.h"
    16651578#include <stdlib.h>
     
    16691582EOF
    16701583ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    1671 { (eval echo configure:1672: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    1672 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
     1584{ (eval echo configure:1585: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     1585ac_err=`grep -v '^ *+' conftest.out`
    16731586if test -z "$ac_err"; then
    16741587  rm -rf conftest*
     
    16861599  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
    16871600cat > conftest.$ac_ext <<EOF
    1688 #line 1689 "configure"
     1601#line 1602 "configure"
    16891602#include "confdefs.h"
    16901603#include <string.h>
     
    17041617  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
    17051618cat > conftest.$ac_ext <<EOF
    1706 #line 1707 "configure"
     1619#line 1620 "configure"
    17071620#include "confdefs.h"
    17081621#include <stdlib.h>
     
    17251638else
    17261639  cat > conftest.$ac_ext <<EOF
    1727 #line 1728 "configure"
     1640#line 1641 "configure"
    17281641#include "confdefs.h"
    17291642#include <ctype.h>
     
    17361649
    17371650EOF
    1738 if { (eval echo configure:1739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
     1651if { (eval echo configure:1652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
    17391652then
    17401653  :
     
    17631676ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
    17641677echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
    1765 echo "configure:1766: checking for $ac_hdr" >&5
     1678echo "configure:1679: checking for $ac_hdr" >&5
    17661679if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    17671680  echo $ac_n "(cached) $ac_c" 1>&6
    17681681else
    17691682  cat > conftest.$ac_ext <<EOF
    1770 #line 1771 "configure"
     1683#line 1684 "configure"
    17711684#include "confdefs.h"
    17721685#include <$ac_hdr>
    17731686EOF
    17741687ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    1775 { (eval echo configure:1776: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    1776 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
     1688{ (eval echo configure:1689: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     1689ac_err=`grep -v '^ *+' conftest.out`
    17771690if test -z "$ac_err"; then
    17781691  rm -rf conftest*
     
    18051718ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
    18061719echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
    1807 echo "configure:1808: checking for $ac_hdr" >&5
     1720echo "configure:1721: checking for $ac_hdr" >&5
    18081721if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    18091722  echo $ac_n "(cached) $ac_c" 1>&6
    18101723else
    18111724  cat > conftest.$ac_ext <<EOF
    1812 #line 1813 "configure"
     1725#line 1726 "configure"
    18131726#include "confdefs.h"
    18141727#include <$ac_hdr>
    18151728EOF
    18161729ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    1817 { (eval echo configure:1818: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    1818 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
     1730{ (eval echo configure:1731: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     1731ac_err=`grep -v '^ *+' conftest.out`
    18191732if test -z "$ac_err"; then
    18201733  rm -rf conftest*
     
    18441757# typedefs, structures
    18451758echo $ac_n "checking for working const""... $ac_c" 1>&6
    1846 echo "configure:1847: checking for working const" >&5
     1759echo "configure:1760: checking for working const" >&5
    18471760if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
    18481761  echo $ac_n "(cached) $ac_c" 1>&6
    18491762else
    18501763  cat > conftest.$ac_ext <<EOF
    1851 #line 1852 "configure"
     1764#line 1765 "configure"
    18521765#include "confdefs.h"
    18531766
     
    18981811; return 0; }
    18991812EOF
    1900 if { (eval echo configure:1901: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     1813if { (eval echo configure:1814: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    19011814  rm -rf conftest*
    19021815  ac_cv_c_const=yes
     
    19191832
    19201833echo $ac_n "checking for inline""... $ac_c" 1>&6
    1921 echo "configure:1922: checking for inline" >&5
     1834echo "configure:1835: checking for inline" >&5
    19221835if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
    19231836  echo $ac_n "(cached) $ac_c" 1>&6
     
    19261839for ac_kw in inline __inline__ __inline; do
    19271840  cat > conftest.$ac_ext <<EOF
    1928 #line 1929 "configure"
     1841#line 1842 "configure"
    19291842#include "confdefs.h"
    19301843
     
    19331846; return 0; }
    19341847EOF
    1935 if { (eval echo configure:1936: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     1848if { (eval echo configure:1849: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    19361849  rm -rf conftest*
    19371850  ac_cv_c_inline=$ac_kw; break
     
    19591872
    19601873echo $ac_n "checking for size_t""... $ac_c" 1>&6
    1961 echo "configure:1962: checking for size_t" >&5
     1874echo "configure:1875: checking for size_t" >&5
    19621875if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
    19631876  echo $ac_n "(cached) $ac_c" 1>&6
    19641877else
    19651878  cat > conftest.$ac_ext <<EOF
    1966 #line 1967 "configure"
     1879#line 1880 "configure"
    19671880#include "confdefs.h"
    19681881#include <sys/types.h>
     
    19731886EOF
    19741887if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
    1975   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
     1888  egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
    19761889  rm -rf conftest*
    19771890  ac_cv_type_size_t=yes
     
    19921905
    19931906echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
    1994 echo "configure:1995: checking whether time.h and sys/time.h may both be included" >&5
     1907echo "configure:1908: checking whether time.h and sys/time.h may both be included" >&5
    19951908if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
    19961909  echo $ac_n "(cached) $ac_c" 1>&6
    19971910else
    19981911  cat > conftest.$ac_ext <<EOF
    1999 #line 2000 "configure"
     1912#line 1913 "configure"
    20001913#include "confdefs.h"
    20011914#include <sys/types.h>
     
    20061919; return 0; }
    20071920EOF
    2008 if { (eval echo configure:2009: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     1921if { (eval echo configure:1922: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    20091922  rm -rf conftest*
    20101923  ac_cv_header_time=yes
     
    20271940
    20281941echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
    2029 echo "configure:2030: checking whether struct tm is in sys/time.h or time.h" >&5
     1942echo "configure:1943: checking whether struct tm is in sys/time.h or time.h" >&5
    20301943if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
    20311944  echo $ac_n "(cached) $ac_c" 1>&6
    20321945else
    20331946  cat > conftest.$ac_ext <<EOF
    2034 #line 2035 "configure"
     1947#line 1948 "configure"
    20351948#include "confdefs.h"
    20361949#include <sys/types.h>
     
    20401953; return 0; }
    20411954EOF
    2042 if { (eval echo configure:2043: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     1955if { (eval echo configure:1956: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    20431956  rm -rf conftest*
    20441957  ac_cv_struct_tm=time.h
     
    20651978# for constant arguments.  Useless!
    20661979echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
    2067 echo "configure:2068: checking for working alloca.h" >&5
     1980echo "configure:1981: checking for working alloca.h" >&5
    20681981if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
    20691982  echo $ac_n "(cached) $ac_c" 1>&6
    20701983else
    20711984  cat > conftest.$ac_ext <<EOF
    2072 #line 2073 "configure"
     1985#line 1986 "configure"
    20731986#include "confdefs.h"
    20741987#include <alloca.h>
     
    20771990; return 0; }
    20781991EOF
    2079 if { (eval echo configure:2080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     1992if { (eval echo configure:1993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    20801993  rm -rf conftest*
    20811994  ac_cv_header_alloca_h=yes
     
    20982011
    20992012echo $ac_n "checking for alloca""... $ac_c" 1>&6
    2100 echo "configure:2101: checking for alloca" >&5
     2013echo "configure:2014: checking for alloca" >&5
    21012014if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
    21022015  echo $ac_n "(cached) $ac_c" 1>&6
    21032016else
    21042017  cat > conftest.$ac_ext <<EOF
    2105 #line 2106 "configure"
     2018#line 2019 "configure"
    21062019#include "confdefs.h"
    21072020
     
    21092022# define alloca __builtin_alloca
    21102023#else
    2111 # ifdef _MSC_VER
    2112 #  include <malloc.h>
    2113 #  define alloca _alloca
     2024# if HAVE_ALLOCA_H
     2025#  include <alloca.h>
    21142026# else
    2115 #  if HAVE_ALLOCA_H
    2116 #   include <alloca.h>
     2027#  ifdef _AIX
     2028 #pragma alloca
    21172029#  else
    2118 #   ifdef _AIX
    2119  #pragma alloca
    2120 #   else
    2121 #    ifndef alloca /* predefined by HP cc +Olibcalls */
     2030#   ifndef alloca /* predefined by HP cc +Olibcalls */
    21222031char *alloca ();
    2123 #    endif
    21242032#   endif
    21252033#  endif
     
    21312039; return 0; }
    21322040EOF
    2133 if { (eval echo configure:2134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     2041if { (eval echo configure:2042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    21342042  rm -rf conftest*
    21352043  ac_cv_func_alloca_works=yes
     
    21562064  # contain a buggy version.  If you still want to use their alloca,
    21572065  # use ar to extract alloca.o from them instead of compiling alloca.c.
    2158   ALLOCA=alloca.${ac_objext}
     2066  ALLOCA=alloca.o
    21592067  cat >> confdefs.h <<\EOF
    21602068#define C_ALLOCA 1
     
    21632071
    21642072echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
    2165 echo "configure:2166: checking whether alloca needs Cray hooks" >&5
     2073echo "configure:2074: checking whether alloca needs Cray hooks" >&5
    21662074if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
    21672075  echo $ac_n "(cached) $ac_c" 1>&6
    21682076else
    21692077  cat > conftest.$ac_ext <<EOF
    2170 #line 2171 "configure"
     2078#line 2079 "configure"
    21712079#include "confdefs.h"
    21722080#if defined(CRAY) && ! defined(CRAY2)
     
    21932101for ac_func in _getb67 GETB67 getb67; do
    21942102  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
    2195 echo "configure:2196: checking for $ac_func" >&5
     2103echo "configure:2104: checking for $ac_func" >&5
    21962104if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    21972105  echo $ac_n "(cached) $ac_c" 1>&6
    21982106else
    21992107  cat > conftest.$ac_ext <<EOF
    2200 #line 2201 "configure"
     2108#line 2109 "configure"
    22012109#include "confdefs.h"
    22022110/* System header to define __stub macros and hopefully few prototypes,
     
    22212129; return 0; }
    22222130EOF
    2223 if { (eval echo configure:2224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     2131if { (eval echo configure:2132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    22242132  rm -rf conftest*
    22252133  eval "ac_cv_func_$ac_func=yes"
     
    22482156
    22492157echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
    2250 echo "configure:2251: checking stack direction for C alloca" >&5
     2158echo "configure:2159: checking stack direction for C alloca" >&5
    22512159if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
    22522160  echo $ac_n "(cached) $ac_c" 1>&6
     
    22562164else
    22572165  cat > conftest.$ac_ext <<EOF
    2258 #line 2259 "configure"
     2166#line 2167 "configure"
    22592167#include "confdefs.h"
    22602168find_stack_direction ()
     
    22752183}
    22762184EOF
    2277 if { (eval echo configure:2278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
     2185if { (eval echo configure:2186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
    22782186then
    22792187  ac_cv_c_stack_direction=1
     
    22982206if test $ac_cv_prog_gcc = yes; then
    22992207    echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
    2300 echo "configure:2301: checking whether ${CC-cc} needs -traditional" >&5
     2208echo "configure:2209: checking whether ${CC-cc} needs -traditional" >&5
    23012209if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
    23022210  echo $ac_n "(cached) $ac_c" 1>&6
     
    23042212    ac_pattern="Autoconf.*'x'"
    23052213  cat > conftest.$ac_ext <<EOF
    2306 #line 2307 "configure"
     2214#line 2215 "configure"
    23072215#include "confdefs.h"
    23082216#include <sgtty.h>
     
    23222230  if test $ac_cv_prog_gcc_traditional = no; then
    23232231    cat > conftest.$ac_ext <<EOF
    2324 #line 2325 "configure"
     2232#line 2233 "configure"
    23252233#include "confdefs.h"
    23262234#include <termio.h>
     
    23472255ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
    23482256echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
    2349 echo "configure:2350: checking for $ac_hdr" >&5
     2257echo "configure:2258: checking for $ac_hdr" >&5
    23502258if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    23512259  echo $ac_n "(cached) $ac_c" 1>&6
    23522260else
    23532261  cat > conftest.$ac_ext <<EOF
    2354 #line 2355 "configure"
     2262#line 2263 "configure"
    23552263#include "confdefs.h"
    23562264#include <$ac_hdr>
    23572265EOF
    23582266ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    2359 { (eval echo configure:2360: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    2360 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
     2267{ (eval echo configure:2268: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     2268ac_err=`grep -v '^ *+' conftest.out`
    23612269if test -z "$ac_err"; then
    23622270  rm -rf conftest*
     
    23862294do
    23872295echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
    2388 echo "configure:2389: checking for $ac_func" >&5
     2296echo "configure:2297: checking for $ac_func" >&5
    23892297if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    23902298  echo $ac_n "(cached) $ac_c" 1>&6
    23912299else
    23922300  cat > conftest.$ac_ext <<EOF
    2393 #line 2394 "configure"
     2301#line 2302 "configure"
    23942302#include "confdefs.h"
    23952303/* System header to define __stub macros and hopefully few prototypes,
     
    24142322; return 0; }
    24152323EOF
    2416 if { (eval echo configure:2417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     2324if { (eval echo configure:2325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    24172325  rm -rf conftest*
    24182326  eval "ac_cv_func_$ac_func=yes"
     
    24392347
    24402348echo $ac_n "checking for working mmap""... $ac_c" 1>&6
    2441 echo "configure:2442: checking for working mmap" >&5
     2349echo "configure:2350: checking for working mmap" >&5
    24422350if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
    24432351  echo $ac_n "(cached) $ac_c" 1>&6
     
    24472355else
    24482356  cat > conftest.$ac_ext <<EOF
    2449 #line 2450 "configure"
     2357#line 2358 "configure"
    24502358#include "confdefs.h"
    24512359
     
    25872495
    25882496EOF
    2589 if { (eval echo configure:2590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
     2497if { (eval echo configure:2498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
    25902498then
    25912499  ac_cv_func_mmap_fixed_mapped=yes
     
    26102518
    26112519echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
    2612 echo "configure:2613: checking return type of signal handlers" >&5
     2520echo "configure:2521: checking return type of signal handlers" >&5
    26132521if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
    26142522  echo $ac_n "(cached) $ac_c" 1>&6
    26152523else
    26162524  cat > conftest.$ac_ext <<EOF
    2617 #line 2618 "configure"
     2525#line 2526 "configure"
    26182526#include "confdefs.h"
    26192527#include <sys/types.h>
     
    26322540; return 0; }
    26332541EOF
    2634 if { (eval echo configure:2635: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     2542if { (eval echo configure:2543: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    26352543  rm -rf conftest*
    26362544  ac_cv_type_signal=void
     
    26512559
    26522560echo $ac_n "checking for vprintf""... $ac_c" 1>&6
    2653 echo "configure:2654: checking for vprintf" >&5
     2561echo "configure:2562: checking for vprintf" >&5
    26542562if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
    26552563  echo $ac_n "(cached) $ac_c" 1>&6
    26562564else
    26572565  cat > conftest.$ac_ext <<EOF
    2658 #line 2659 "configure"
     2566#line 2567 "configure"
    26592567#include "confdefs.h"
    26602568/* System header to define __stub macros and hopefully few prototypes,
     
    26792587; return 0; }
    26802588EOF
    2681 if { (eval echo configure:2682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     2589if { (eval echo configure:2590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    26822590  rm -rf conftest*
    26832591  eval "ac_cv_func_vprintf=yes"
     
    27032611if test "$ac_cv_func_vprintf" != yes; then
    27042612echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
    2705 echo "configure:2706: checking for _doprnt" >&5
     2613echo "configure:2614: checking for _doprnt" >&5
    27062614if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
    27072615  echo $ac_n "(cached) $ac_c" 1>&6
    27082616else
    27092617  cat > conftest.$ac_ext <<EOF
    2710 #line 2711 "configure"
     2618#line 2619 "configure"
    27112619#include "confdefs.h"
    27122620/* System header to define __stub macros and hopefully few prototypes,
     
    27312639; return 0; }
    27322640EOF
    2733 if { (eval echo configure:2734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     2641if { (eval echo configure:2642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    27342642  rm -rf conftest*
    27352643  eval "ac_cv_func__doprnt=yes"
     
    27582666do
    27592667echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
    2760 echo "configure:2761: checking for $ac_func" >&5
     2668echo "configure:2669: checking for $ac_func" >&5
    27612669if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    27622670  echo $ac_n "(cached) $ac_c" 1>&6
    27632671else
    27642672  cat > conftest.$ac_ext <<EOF
    2765 #line 2766 "configure"
     2673#line 2674 "configure"
    27662674#include "confdefs.h"
    27672675/* System header to define __stub macros and hopefully few prototypes,
     
    27862694; return 0; }
    27872695EOF
    2788 if { (eval echo configure:2789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     2696if { (eval echo configure:2697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    27892697  rm -rf conftest*
    27902698  eval "ac_cv_func_$ac_func=yes"
     
    28142722# arithmetic shifts
    28152723echo $ac_n "checking whether your machine has correct arithmetic shifts""... $ac_c" 1>&6
    2816 echo "configure:2817: checking whether your machine has correct arithmetic shifts" >&5
     2724echo "configure:2725: checking whether your machine has correct arithmetic shifts" >&5
    28172725if eval "test \"`echo '$''{'ac_cv_shift'+set}'`\" = set"; then
    28182726  echo $ac_n "(cached) $ac_c" 1>&6
     
    28272735else
    28282736  cat > conftest.$ac_ext <<EOF
    2829 #line 2830 "configure"
     2737#line 2738 "configure"
    28302738#include "confdefs.h"
    28312739 int main() { if (-2 >> 1 == -1) exit(0); else exit(1); }
    28322740EOF
    2833 if { (eval echo configure:2834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
     2741if { (eval echo configure:2742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
    28342742then
    28352743  ac_cv_shift=yes
     
    28562764# check for a peculiar constructor initialization
    28572765echo $ac_n "checking whether explicit C++ constructor calls are allowed""... $ac_c" 1>&6
    2858 echo "configure:2859: checking whether explicit C++ constructor calls are allowed" >&5
     2766echo "configure:2767: checking whether explicit C++ constructor calls are allowed" >&5
    28592767
    28602768ac_ext=C
     
    28622770ac_cpp='$CXXCPP $CPPFLAGS'
    28632771ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
    2864 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
     2772ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
    28652773cross_compiling=$ac_cv_prog_cxx_cross
    28662774
     
    28692777else
    28702778  cat > conftest.$ac_ext <<EOF
    2871 #line 2872 "configure"
     2779#line 2780 "configure"
    28722780#include "confdefs.h"
    28732781
     
    28872795; return 0; }
    28882796EOF
    2889 if { (eval echo configure:2890: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     2797if { (eval echo configure:2798: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    28902798  rm -rf conftest*
    28912799  ac_cv_explicit_const=yes
     
    29032811ac_cpp='$CPP $CPPFLAGS'
    29042812ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
    2905 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
     2813ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
    29062814cross_compiling=$ac_cv_prog_cc_cross
    29072815
     
    29162824# sprintf returns number of printed chars
    29172825echo $ac_n "checking whether vsprintf returns number of printed chars""... $ac_c" 1>&6
    2918 echo "configure:2919: checking whether vsprintf returns number of printed chars" >&5
     2826echo "configure:2827: checking whether vsprintf returns number of printed chars" >&5
    29192827if eval "test \"`echo '$''{'ac_cv_returns_n_of_chars'+set}'`\" = set"; then
    29202828  echo $ac_n "(cached) $ac_c" 1>&6
     
    29242832else
    29252833  cat > conftest.$ac_ext <<EOF
    2926 #line 2927 "configure"
     2834#line 2835 "configure"
    29272835#include "confdefs.h"
    29282836#include <stdio.h>
    29292837 main() { char *str=(char*)malloc(20); if (((int) sprintf(str,"123456789")) == 9) exit(0); else exit(1); }
    29302838EOF
    2931 if { (eval echo configure:2932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
     2839if { (eval echo configure:2840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
    29322840then
    29332841  ac_cv_returns_n_of_chars=yes
     
    29552863# determine ALIGN_8
    29562864echo $ac_n "checking size of char""... $ac_c" 1>&6
    2957 echo "configure:2958: checking size of char" >&5
     2865echo "configure:2866: checking size of char" >&5
    29582866if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
    29592867  echo $ac_n "(cached) $ac_c" 1>&6
     
    29632871else
    29642872  cat > conftest.$ac_ext <<EOF
    2965 #line 2966 "configure"
     2873#line 2874 "configure"
    29662874#include "confdefs.h"
    29672875#include <stdio.h>
     
    29742882}
    29752883EOF
    2976 if { (eval echo configure:2977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
     2884if { (eval echo configure:2885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
    29772885then
    29782886  ac_cv_sizeof_char=`cat conftestval`
     
    29942902
    29952903echo $ac_n "checking size of short""... $ac_c" 1>&6
    2996 echo "configure:2997: checking size of short" >&5
     2904echo "configure:2905: checking size of short" >&5
    29972905if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
    29982906  echo $ac_n "(cached) $ac_c" 1>&6
     
    30022910else
    30032911  cat > conftest.$ac_ext <<EOF
    3004 #line 3005 "configure"
     2912#line 2913 "configure"
    30052913#include "confdefs.h"
    30062914#include <stdio.h>
     
    30132921}
    30142922EOF
    3015 if { (eval echo configure:3016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
     2923if { (eval echo configure:2924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
    30162924then
    30172925  ac_cv_sizeof_short=`cat conftestval`
     
    30332941
    30342942echo $ac_n "checking size of int""... $ac_c" 1>&6
    3035 echo "configure:3036: checking size of int" >&5
     2943echo "configure:2944: checking size of int" >&5
    30362944if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
    30372945  echo $ac_n "(cached) $ac_c" 1>&6
     
    30412949else
    30422950  cat > conftest.$ac_ext <<EOF
    3043 #line 3044 "configure"
     2951#line 2952 "configure"
    30442952#include "confdefs.h"
    30452953#include <stdio.h>
     
    30522960}
    30532961EOF
    3054 if { (eval echo configure:3055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
     2962if { (eval echo configure:2963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
    30552963then
    30562964  ac_cv_sizeof_int=`cat conftestval`
     
    30722980
    30732981echo $ac_n "checking size of long""... $ac_c" 1>&6
    3074 echo "configure:3075: checking size of long" >&5
     2982echo "configure:2983: checking size of long" >&5
    30752983if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
    30762984  echo $ac_n "(cached) $ac_c" 1>&6
     
    30802988else
    30812989  cat > conftest.$ac_ext <<EOF
    3082 #line 3083 "configure"
     2990#line 2991 "configure"
    30832991#include "confdefs.h"
    30842992#include <stdio.h>
     
    30912999}
    30923000EOF
    3093 if { (eval echo configure:3094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
     3001if { (eval echo configure:3002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
    30943002then
    30953003  ac_cv_sizeof_long=`cat conftestval`
     
    31113019
    31123020echo $ac_n "checking size of void*""... $ac_c" 1>&6
    3113 echo "configure:3114: checking size of void*" >&5
     3021echo "configure:3022: checking size of void*" >&5
    31143022if eval "test \"`echo '$''{'ac_cv_sizeof_voidp'+set}'`\" = set"; then
    31153023  echo $ac_n "(cached) $ac_c" 1>&6
     
    31193027else
    31203028  cat > conftest.$ac_ext <<EOF
    3121 #line 3122 "configure"
     3029#line 3030 "configure"
    31223030#include "confdefs.h"
    31233031#include <stdio.h>
     
    31303038}
    31313039EOF
    3132 if { (eval echo configure:3133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
     3040if { (eval echo configure:3041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
    31333041then
    31343042  ac_cv_sizeof_voidp=`cat conftestval`
     
    31503058
    31513059echo $ac_n "checking size of double""... $ac_c" 1>&6
    3152 echo "configure:3153: checking size of double" >&5
     3060echo "configure:3061: checking size of double" >&5
    31533061if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
    31543062  echo $ac_n "(cached) $ac_c" 1>&6
     
    31583066else
    31593067  cat > conftest.$ac_ext <<EOF
    3160 #line 3161 "configure"
     3068#line 3069 "configure"
    31613069#include "confdefs.h"
    31623070#include <stdio.h>
     
    31693077}
    31703078EOF
    3171 if { (eval echo configure:3172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
     3079if { (eval echo configure:3080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
    31723080then
    31733081  ac_cv_sizeof_double=`cat conftestval`
     
    31893097
    31903098echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
    3191 echo "configure:3192: checking whether byte ordering is bigendian" >&5
     3099echo "configure:3100: checking whether byte ordering is bigendian" >&5
    31923100if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
    31933101  echo $ac_n "(cached) $ac_c" 1>&6
     
    31963104# See if sys/param.h defines the BYTE_ORDER macro.
    31973105cat > conftest.$ac_ext <<EOF
    3198 #line 3199 "configure"
     3106#line 3107 "configure"
    31993107#include "confdefs.h"
    32003108#include <sys/types.h>
     
    32073115; return 0; }
    32083116EOF
    3209 if { (eval echo configure:3210: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     3117if { (eval echo configure:3118: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    32103118  rm -rf conftest*
    32113119  # It does; now see whether it defined to BIG_ENDIAN or not.
    32123120cat > conftest.$ac_ext <<EOF
    3213 #line 3214 "configure"
     3121#line 3122 "configure"
    32143122#include "confdefs.h"
    32153123#include <sys/types.h>
     
    32223130; return 0; }
    32233131EOF
    3224 if { (eval echo configure:3225: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     3132if { (eval echo configure:3133: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    32253133  rm -rf conftest*
    32263134  ac_cv_c_bigendian=yes
     
    32423150else
    32433151  cat > conftest.$ac_ext <<EOF
    3244 #line 3245 "configure"
     3152#line 3153 "configure"
    32453153#include "confdefs.h"
    32463154main () {
     
    32553163}
    32563164EOF
    3257 if { (eval echo configure:3258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
     3165if { (eval echo configure:3166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
    32583166then
    32593167  ac_cv_c_bigendian=no
     
    32923200
    32933201echo $ac_n "checking size of system page""... $ac_c" 1>&6
    3294 echo "configure:3295: checking size of system page" >&5
     3202echo "configure:3203: checking size of system page" >&5
    32953203if eval "test \"`echo '$''{'ac_cv_pagesize'+set}'`\" = set"; then
    32963204  echo $ac_n "(cached) $ac_c" 1>&6
     
    33003208else
    33013209  cat > conftest.$ac_ext <<EOF
    3302 #line 3303 "configure"
     3210#line 3211 "configure"
    33033211#include "confdefs.h"
    33043212#include <stdio.h>
     
    33143222}
    33153223EOF
    3316 if { (eval echo configure:3317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
     3224if { (eval echo configure:3225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
    33173225then
    33183226  ac_cv_pagesize=`cat conftestval`
     
    33383246
    33393247echo $ac_n "checking for page aligned valloc""... $ac_c" 1>&6
    3340 echo "configure:3341: checking for page aligned valloc" >&5
     3248echo "configure:3249: checking for page aligned valloc" >&5
    33413249if eval "test \"`echo '$''{'ac_cv_have_page_alignment'+set}'`\" = set"; then
    33423250  echo $ac_n "(cached) $ac_c" 1>&6
     
    33843292else
    33853293  cat > conftest.$ac_ext <<EOF
    3386 #line 3387 "configure"
     3294#line 3295 "configure"
    33873295#include "confdefs.h"
    33883296
     
    33913299
    33923300EOF
    3393 if { (eval echo configure:3394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
     3301if { (eval echo configure:3302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
    33943302then
    33953303  ac_cv_have_page_alignment="ac_cv_usable_pagesize="`cat  conftestval`
     
    34083316else
    34093317  cat > conftest.$ac_ext <<EOF
    3410 #line 3411 "configure"
     3318#line 3319 "configure"
    34113319#include "confdefs.h"
    34123320
     
    34153323
    34163324EOF
    3417 if { (eval echo configure:3418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
     3325if { (eval echo configure:3326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
    34183326then
    34193327  ac_cv_have_page_alignment="ac_cv_usable_pagesize="`cat  conftestval`
     
    34353343else
    34363344  cat > conftest.$ac_ext <<EOF
    3437 #line 3438 "configure"
     3345#line 3346 "configure"
    34383346#include "confdefs.h"
    34393347
     
    34443352
    34453353EOF
    3446 if { (eval echo configure:3447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
     3354if { (eval echo configure:3355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
    34473355then
    34483356  ac_cv_have_page_alignment="ac_cv_have_gmalloc=yes; ac_cv_usable_pagesize="`cat  conftestval`
     
    34613369else
    34623370  cat > conftest.$ac_ext <<EOF
    3463 #line 3464 "configure"
     3371#line 3372 "configure"
    34643372#include "confdefs.h"
    34653373
     
    34703378
    34713379EOF
    3472 if { (eval echo configure:3473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
     3380if { (eval echo configure:3381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
    34733381then
    34743382  ac_cv_have_page_alignment="ac_cv_have_gmalloc=yes; ac_cv_usable_pagesize="`cat  conftestval`
     
    36093517if test "${with_perl5+set}" != set; then
    36103518  echo $ac_n "checking for perl5""... $ac_c" 1>&6
    3611 echo "configure:3612: checking for perl5" >&5
     3519echo "configure:3520: checking for perl5" >&5
    36123520    if eval "test \"`echo '$''{'ac_cv_prog_perl5'+set}'`\" = set"; then
    36133521  echo $ac_n "(cached) $ac_c" 1>&6
     
    36463554set dummy $ac_prog; ac_word=$2
    36473555echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    3648 echo "configure:3649: checking for $ac_word" >&5
     3556echo "configure:3557: checking for $ac_word" >&5
    36493557if eval "test \"`echo '$''{'ac_cv_prog_PERL5'+set}'`\" = set"; then
    36503558  echo $ac_n "(cached) $ac_c" 1>&6
     
    36533561  ac_cv_prog_PERL5="$PERL5" # Let the user override the test.
    36543562else
    3655   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
    3656   ac_dummy="$PATH"
    3657   for ac_dir in $ac_dummy; do
     3563  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
     3564  for ac_dir in $PATH; do
    36583565    test -z "$ac_dir" && ac_dir=.
    36593566    if test -f $ac_dir/$ac_word; then
     
    36843591if test "$with_readline" != no; then
    36853592  echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
    3686 echo "configure:3687: checking for tgetent in -lncurses" >&5
     3593echo "configure:3594: checking for tgetent in -lncurses" >&5
    36873594ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
    36883595if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     
    36923599LIBS="-lncurses  $LIBS"
    36933600cat > conftest.$ac_ext <<EOF
    3694 #line 3695 "configure"
     3601#line 3602 "configure"
    36953602#include "confdefs.h"
    36963603/* Override any gcc2 internal prototype to avoid an error.  */
     
    37033610; return 0; }
    37043611EOF
    3705 if { (eval echo configure:3706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     3612if { (eval echo configure:3613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    37063613  rm -rf conftest*
    37073614  eval "ac_cv_lib_$ac_lib_var=yes"
     
    37303637\
    37313638   echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
    3732 echo "configure:3733: checking for tgetent in -lcurses" >&5
     3639echo "configure:3640: checking for tgetent in -lcurses" >&5
    37333640ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
    37343641if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     
    37383645LIBS="-lcurses  $LIBS"
    37393646cat > conftest.$ac_ext <<EOF
    3740 #line 3741 "configure"
     3647#line 3648 "configure"
    37413648#include "confdefs.h"
    37423649/* Override any gcc2 internal prototype to avoid an error.  */
     
    37493656; return 0; }
    37503657EOF
    3751 if { (eval echo configure:3752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     3658if { (eval echo configure:3659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    37523659  rm -rf conftest*
    37533660  eval "ac_cv_lib_$ac_lib_var=yes"
     
    37763683\
    37773684   echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
    3778 echo "configure:3779: checking for tgetent in -ltermcap" >&5
     3685echo "configure:3686: checking for tgetent in -ltermcap" >&5
    37793686ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
    37803687if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     
    37843691LIBS="-ltermcap  $LIBS"
    37853692cat > conftest.$ac_ext <<EOF
    3786 #line 3787 "configure"
     3693#line 3694 "configure"
    37873694#include "confdefs.h"
    37883695/* Override any gcc2 internal prototype to avoid an error.  */
     
    37953702; return 0; }
    37963703EOF
    3797 if { (eval echo configure:3798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     3704if { (eval echo configure:3705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    37983705  rm -rf conftest*
    37993706  eval "ac_cv_lib_$ac_lib_var=yes"
     
    38273734
    38283735   echo $ac_n "checking for rl_abort in -lreadline""... $ac_c" 1>&6
    3829 echo "configure:3830: checking for rl_abort in -lreadline" >&5
     3736echo "configure:3737: checking for rl_abort in -lreadline" >&5
    38303737ac_lib_var=`echo readline'_'rl_abort | sed 'y%./+-%__p_%'`
    38313738if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     
    38353742LIBS="-lreadline  $LIBS"
    38363743cat > conftest.$ac_ext <<EOF
    3837 #line 3838 "configure"
     3744#line 3745 "configure"
    38383745#include "confdefs.h"
    38393746/* Override any gcc2 internal prototype to avoid an error.  */
     
    38463753; return 0; }
    38473754EOF
    3848 if { (eval echo configure:3849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     3755if { (eval echo configure:3756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    38493756  rm -rf conftest*
    38503757  eval "ac_cv_lib_$ac_lib_var=yes"
     
    38773784ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
    38783785echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
    3879 echo "configure:3880: checking for $ac_hdr" >&5
     3786echo "configure:3787: checking for $ac_hdr" >&5
    38803787if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    38813788  echo $ac_n "(cached) $ac_c" 1>&6
    38823789else
    38833790  cat > conftest.$ac_ext <<EOF
    3884 #line 3885 "configure"
     3791#line 3792 "configure"
    38853792#include "confdefs.h"
    38863793#include <$ac_hdr>
    38873794EOF
    38883795ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    3889 { (eval echo configure:3890: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    3890 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
     3796{ (eval echo configure:3797: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     3797ac_err=`grep -v '^ *+' conftest.out`
    38913798if test -z "$ac_err"; then
    38923799  rm -rf conftest*
     
    39163823      test "$ac_cv_header_readline_readline_h" = yes; then
    39173824     echo $ac_n "checking whether readline.h is ok""... $ac_c" 1>&6
    3918 echo "configure:3919: checking whether readline.h is ok" >&5
     3825echo "configure:3826: checking whether readline.h is ok" >&5
    39193826     if eval "test \"`echo '$''{'ac_cv_header_readline_readline_h_ok'+set}'`\" = set"; then
    39203827  echo $ac_n "(cached) $ac_c" 1>&6
    39213828else
    39223829  cat > conftest.$ac_ext <<EOF
    3923 #line 3924 "configure"
     3830#line 3831 "configure"
    39243831#include "confdefs.h"
    39253832#include<unistd.h>
     
    39463853; return 0; }
    39473854EOF
    3948 if { (eval echo configure:3949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     3855if { (eval echo configure:3856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    39493856  rm -rf conftest*
    39503857  ac_cv_header_readline_readline_h_ok="yes"
     
    39623869#not ok -- try once more with explicitly declaring everything
    39633870      echo $ac_n "checking whether or not we nevertheless can use readline""... $ac_c" 1>&6
    3964 echo "configure:3965: checking whether or not we nevertheless can use readline" >&5
     3871echo "configure:3872: checking whether or not we nevertheless can use readline" >&5
    39653872      if eval "test \"`echo '$''{'ac_cv_have_readline'+set}'`\" = set"; then
    39663873  echo $ac_n "(cached) $ac_c" 1>&6
    39673874else
    39683875  cat > conftest.$ac_ext <<EOF
    3969 #line 3970 "configure"
     3876#line 3877 "configure"
    39703877#include "confdefs.h"
    39713878#include <stdio.h>
     
    39973904; return 0; }
    39983905EOF
    3999 if { (eval echo configure:4000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     3906if { (eval echo configure:3907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    40003907  rm -rf conftest*
    40013908  ac_cv_have_readline="yes"
     
    40393946fi
    40403947
    4041 #   
    4042 # dl
    4043 if test "$with_dl" = yes; then
    4044   echo $ac_n "checking for dl_init in -ldl""... $ac_c" 1>&6
    4045 echo "configure:4046: checking for dl_init in -ldl" >&5
    4046 ac_lib_var=`echo dl'_'dl_init | sed 'y%./+-%__p_%'`
    4047 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    4048   echo $ac_n "(cached) $ac_c" 1>&6
    4049 else
    4050   ac_save_LIBS="$LIBS"
    4051 LIBS="-ldl  $LIBS"
    4052 cat > conftest.$ac_ext <<EOF
    4053 #line 4054 "configure"
    4054 #include "confdefs.h"
    4055 /* Override any gcc2 internal prototype to avoid an error.  */
    4056 /* We use char because int might match the return type of a gcc2
    4057     builtin and then its argument prototype would still apply.  */
    4058 char dl_init();
    4059 
    4060 int main() {
    4061 dl_init()
    4062 ; return 0; }
    4063 EOF
    4064 if { (eval echo configure:4065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    4065   rm -rf conftest*
    4066   eval "ac_cv_lib_$ac_lib_var=yes"
    4067 else
    4068   echo "configure: failed program was:" >&5
    4069   cat conftest.$ac_ext >&5
    4070   rm -rf conftest*
    4071   eval "ac_cv_lib_$ac_lib_var=no"
    4072 fi
    4073 rm -f conftest*
    4074 LIBS="$ac_save_LIBS"
    4075 
    4076 fi
    4077 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
    4078   echo "$ac_t""yes" 1>&6
    4079   \
    4080    echo "configure: warning: building without dl: disabling dynamic linking" 1>&2
    4081 else
    4082   echo "$ac_t""no" 1>&6
    4083 fi
    4084 
    4085 fi
    4086 
    40873948NEED_LIBS=$LIBS
    40883949
    40893950# gmp, smallgmp, MP, MPT, factory, libfac
    40903951echo $ac_n "checking for mpq_init in -lgmp""... $ac_c" 1>&6
    4091 echo "configure:4092: checking for mpq_init in -lgmp" >&5
     3952echo "configure:3953: checking for mpq_init in -lgmp" >&5
    40923953ac_lib_var=`echo gmp'_'mpq_init | sed 'y%./+-%__p_%'`
    40933954if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     
    40973958LIBS="-lgmp  $LIBS"
    40983959cat > conftest.$ac_ext <<EOF
    4099 #line 4100 "configure"
     3960#line 3961 "configure"
    41003961#include "confdefs.h"
    41013962/* Override any gcc2 internal prototype to avoid an error.  */
     
    41083969; return 0; }
    41093970EOF
    4110 if { (eval echo configure:4111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     3971if { (eval echo configure:3972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    41113972  rm -rf conftest*
    41123973  eval "ac_cv_lib_$ac_lib_var=yes"
     
    41394000fi
    41404001echo $ac_n "checking for mpz_init in -lsmallgmp""... $ac_c" 1>&6
    4141 echo "configure:4142: checking for mpz_init in -lsmallgmp" >&5
     4002echo "configure:4003: checking for mpz_init in -lsmallgmp" >&5
    41424003ac_lib_var=`echo smallgmp'_'mpz_init | sed 'y%./+-%__p_%'`
    41434004if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     
    41474008LIBS="-lsmallgmp  $LIBS"
    41484009cat > conftest.$ac_ext <<EOF
    4149 #line 4150 "configure"
     4010#line 4011 "configure"
    41504011#include "confdefs.h"
    41514012/* Override any gcc2 internal prototype to avoid an error.  */
     
    41584019; return 0; }
    41594020EOF
    4160 if { (eval echo configure:4161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     4021if { (eval echo configure:4022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    41614022  rm -rf conftest*
    41624023  eval "ac_cv_lib_$ac_lib_var=yes"
     
    41864047
    41874048echo $ac_n "checking for IMP_PutGmpInt in -lMP""... $ac_c" 1>&6
    4188 echo "configure:4189: checking for IMP_PutGmpInt in -lMP" >&5
     4049echo "configure:4050: checking for IMP_PutGmpInt in -lMP" >&5
    41894050ac_lib_var=`echo MP'_'IMP_PutGmpInt | sed 'y%./+-%__p_%'`
    41904051if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     
    41944055LIBS="-lMP  $LIBS"
    41954056cat > conftest.$ac_ext <<EOF
    4196 #line 4197 "configure"
     4057#line 4058 "configure"
    41974058#include "confdefs.h"
    41984059/* Override any gcc2 internal prototype to avoid an error.  */
     
    42054066; return 0; }
    42064067EOF
    4207 if { (eval echo configure:4208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     4068if { (eval echo configure:4069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    42084069  rm -rf conftest*
    42094070  eval "ac_cv_lib_$ac_lib_var=yes"
     
    42334094
    42344095echo $ac_n "checking for MPT_GetTree in -lMPT""... $ac_c" 1>&6
    4235 echo "configure:4236: checking for MPT_GetTree in -lMPT" >&5
     4096echo "configure:4097: checking for MPT_GetTree in -lMPT" >&5
    42364097ac_lib_var=`echo MPT'_'MPT_GetTree | sed 'y%./+-%__p_%'`
    42374098if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     
    42414102LIBS="-lMPT  $LIBS"
    42424103cat > conftest.$ac_ext <<EOF
    4243 #line 4244 "configure"
     4104#line 4105 "configure"
    42444105#include "confdefs.h"
    42454106/* Override any gcc2 internal prototype to avoid an error.  */
     
    42524113; return 0; }
    42534114EOF
    4254 if { (eval echo configure:4255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     4115if { (eval echo configure:4116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    42554116  rm -rf conftest*
    42564117  eval "ac_cv_lib_$ac_lib_var=yes"
     
    42804141
    42814142echo $ac_n "checking for atof in -lsingcf""... $ac_c" 1>&6
    4282 echo "configure:4283: checking for atof in -lsingcf" >&5
     4143echo "configure:4144: checking for atof in -lsingcf" >&5
    42834144ac_lib_var=`echo singcf'_'atof | sed 'y%./+-%__p_%'`
    42844145if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     
    42884149LIBS="-lsingcf  $LIBS"
    42894150cat > conftest.$ac_ext <<EOF
    4290 #line 4291 "configure"
     4151#line 4152 "configure"
    42914152#include "confdefs.h"
    42924153/* Override any gcc2 internal prototype to avoid an error.  */
     
    42994160; return 0; }
    43004161EOF
    4301 if { (eval echo configure:4302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     4162if { (eval echo configure:4163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    43024163  rm -rf conftest*
    43034164  eval "ac_cv_lib_$ac_lib_var=yes"
     
    43274188
    43284189echo $ac_n "checking for atof in -lsingfac""... $ac_c" 1>&6
    4329 echo "configure:4330: checking for atof in -lsingfac" >&5
     4190echo "configure:4191: checking for atof in -lsingfac" >&5
    43304191ac_lib_var=`echo singfac'_'atof | sed 'y%./+-%__p_%'`
    43314192if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     
    43354196LIBS="-lsingfac  $LIBS"
    43364197cat > conftest.$ac_ext <<EOF
    4337 #line 4338 "configure"
     4198#line 4199 "configure"
    43384199#include "confdefs.h"
    43394200/* Override any gcc2 internal prototype to avoid an error.  */
     
    43464207; return 0; }
    43474208EOF
    4348 if { (eval echo configure:4349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     4209if { (eval echo configure:4210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    43494210  rm -rf conftest*
    43504211  eval "ac_cv_lib_$ac_lib_var=yes"
     
    43784239ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
    43794240echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
    4380 echo "configure:4381: checking for $ac_hdr" >&5
     4241echo "configure:4242: checking for $ac_hdr" >&5
    43814242if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    43824243  echo $ac_n "(cached) $ac_c" 1>&6
    43834244else
    43844245  cat > conftest.$ac_ext <<EOF
    4385 #line 4386 "configure"
     4246#line 4247 "configure"
    43864247#include "confdefs.h"
    43874248#include <$ac_hdr>
    43884249EOF
    43894250ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    4390 { (eval echo configure:4391: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    4391 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
     4251{ (eval echo configure:4252: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     4252ac_err=`grep -v '^ *+' conftest.out`
    43924253if test -z "$ac_err"; then
    43934254  rm -rf conftest*
     
    44454306# evaluate results
    44464307echo $ac_n "checking which apint package to use""... $ac_c" 1>&6
    4447 echo "configure:4448: checking which apint package to use" >&5
     4308echo "configure:4309: checking which apint package to use" >&5
    44484309if test "${with_apint}" != gmp && test "${with_apint}" != smallgmp; then
    44494310  if test "$ac_gmp_ok" = yes || test "$enable_gmp" = yes; then
     
    44854346fi
    44864347
     4348#   
     4349# dl
     4350if test "$with_dl" != no; then
     4351  echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
     4352echo "configure:4353: checking for dlopen in -ldl" >&5
     4353ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
     4354if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     4355  echo $ac_n "(cached) $ac_c" 1>&6
     4356else
     4357  ac_save_LIBS="$LIBS"
     4358LIBS="-ldl  $LIBS"
     4359cat > conftest.$ac_ext <<EOF
     4360#line 4361 "configure"
     4361#include "confdefs.h"
     4362/* Override any gcc2 internal prototype to avoid an error.  */
     4363/* We use char because int might match the return type of a gcc2
     4364    builtin and then its argument prototype would still apply.  */
     4365char dlopen();
     4366
     4367int main() {
     4368dlopen()
     4369; return 0; }
     4370EOF
     4371if { (eval echo configure:4372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
     4372  rm -rf conftest*
     4373  eval "ac_cv_lib_$ac_lib_var=yes"
     4374else
     4375  echo "configure: failed program was:" >&5
     4376  cat conftest.$ac_ext >&5
     4377  rm -rf conftest*
     4378  eval "ac_cv_lib_$ac_lib_var=no"
     4379fi
     4380rm -f conftest*
     4381LIBS="$ac_save_LIBS"
     4382
     4383fi
     4384if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
     4385  echo "$ac_t""yes" 1>&6
     4386    ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
     4387    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
     4388  cat >> confdefs.h <<EOF
     4389#define $ac_tr_lib 1
     4390EOF
     4391
     4392  LIBS="-ldl $LIBS"
     4393
     4394else
     4395  echo "$ac_t""no" 1>&6
     4396fi
     4397
     4398  if test "$ac_cv_lib_dl_dlopen" = yes; then
     4399    NEED_LIBS="-ldl ${NEED_LIBS}"
     4400    LD_DYN_FLAGS="-Xlinker -E"
     4401    LD_LIBC="-lc"
     4402   
     4403    cat >> confdefs.h <<\EOF
     4404#define HAVE_DL 1
     4405EOF
     4406
     4407  fi
     4408fi
     4409
    44874410echo $ac_n "checking whether to have MP""... $ac_c" 1>&6
    4488 echo "configure:4489: checking whether to have MP" >&5
     4411echo "configure:4412: checking whether to have MP" >&5
    44894412if test "${with_MP}" != yes && test "${with_MP}" != no; then
    44904413  if (test "${will_have_gmp}" = yes) && \
     
    45174440
    45184441echo $ac_n "checking whether to have factory""... $ac_c" 1>&6
    4519 echo "configure:4520: checking whether to have factory" >&5
     4442echo "configure:4443: checking whether to have factory" >&5
    45204443if test "${with_factory}" != yes && test "${with_factory}" != no; then
    45214444  if test "$ac_factory_ok" =  yes || test "$enable_factory" = yes; then
     
    45484471     
    45494472echo $ac_n "checking whether to have libfac""... $ac_c" 1>&6
    4550 echo "configure:4551: checking whether to have libfac" >&5
     4473echo "configure:4474: checking whether to have libfac" >&5
    45514474if test "${with_libfac}" != yes && test "${with_libfac}" != no; then
    45524475  if (test "${will_have_factory}" = yes) && \
     
    45804503
    45814504echo $ac_n "checking whether to have dbm links""... $ac_c" 1>&6
    4582 echo "configure:4583: checking whether to have dbm links" >&5
     4505echo "configure:4506: checking whether to have dbm links" >&5
    45834506if test "$with_dbm" != no; then
    45844507  cat >> confdefs.h <<\EOF
     
    45924515
    45934516echo $ac_n "checking whether to have namespaces""... $ac_c" 1>&6
    4594 echo "configure:4595: checking whether to have namespaces" >&5
     4517echo "configure:4518: checking whether to have namespaces" >&5
    45954518if test "$with_namespaces" != yes; then
    45964519  echo "$ac_t""no" 1>&6
     
    46044527
    46054528echo $ac_n "checking whether to have dynamic loading""... $ac_c" 1>&6
    4606 echo "configure:4607: checking whether to have dynamic loading" >&5
     4529echo "configure:4530: checking whether to have dynamic loading" >&5
    46074530if test "$with_dl" != yes; then
    46084531  echo "$ac_t""no" 1>&6
     
    46174540        HPUX-9)
    46184541          echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
    4619 echo "configure:4620: checking for shl_load in -ldld" >&5
     4542echo "configure:4543: checking for shl_load in -ldld" >&5
    46204543ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
    46214544if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     
    46254548LIBS="-ldld  $LIBS"
    46264549cat > conftest.$ac_ext <<EOF
    4627 #line 4628 "configure"
     4550#line 4551 "configure"
    46284551#include "confdefs.h"
    46294552/* Override any gcc2 internal prototype to avoid an error.  */
     
    46364559; return 0; }
    46374560EOF
    4638 if { (eval echo configure:4639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     4561if { (eval echo configure:4562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    46394562  rm -rf conftest*
    46404563  eval "ac_cv_lib_$ac_lib_var=yes"
     
    46684591        HPUX-10)
    46694592          echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
    4670 echo "configure:4671: checking for shl_load in -ldld" >&5
     4593echo "configure:4594: checking for shl_load in -ldld" >&5
    46714594ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
    46724595if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     
    46764599LIBS="-ldld  $LIBS"
    46774600cat > conftest.$ac_ext <<EOF
    4678 #line 4679 "configure"
     4601#line 4602 "configure"
    46794602#include "confdefs.h"
    46804603/* Override any gcc2 internal prototype to avoid an error.  */
     
    46874610; return 0; }
    46884611EOF
    4689 if { (eval echo configure:4690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     4612if { (eval echo configure:4613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    46904613  rm -rf conftest*
    46914614  eval "ac_cv_lib_$ac_lib_var=yes"
     
    47264649
    47274650echo $ac_n "checking whether to use mtrack""... $ac_c" 1>&6
    4728 echo "configure:4729: checking whether to use mtrack" >&5
     4651echo "configure:4652: checking whether to use mtrack" >&5
    47294652if test "$with_mtrack" = yes && test "$ac_cv_singuname" = ix86-Linux; then
    47304653  echo "$ac_t""yes" 1>&6
     
    47404663
    47414664echo $ac_n "checking which exponent type to use""... $ac_c" 1>&6
    4742 echo "configure:4743: checking which exponent type to use" >&5
     4665echo "configure:4666: checking which exponent type to use" >&5
    47434666if test "$with_exp_type" = "char"; then
    47444667  echo "$ac_t""char" 1>&6
     
    47964719# and sets the high bit in the cache file unless we assign to the vars.
    47974720(set) 2>&1 |
    4798   case `(ac_space=' '; set | grep ac_space) 2>&1` in
     4721  case `(ac_space=' '; set) 2>&1` in
    47994722  *ac_space=\ *)
    48004723    # `set' does not quote correctly, so add quotes (double-quote substitution
     
    48634786    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
    48644787  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
    4865     echo "$CONFIG_STATUS generated by autoconf version 2.13"
     4788    echo "$CONFIG_STATUS generated by autoconf version 2.12"
    48664789    exit 0 ;;
    48674790  -help | --help | --hel | --he | --h)
     
    48824805$ac_vpsub
    48834806$extrasub
    4884 s%@SHELL@%$SHELL%g
    48854807s%@CFLAGS@%$CFLAGS%g
    48864808s%@CPPFLAGS@%$CPPFLAGS%g
    48874809s%@CXXFLAGS@%$CXXFLAGS%g
    4888 s%@FFLAGS@%$FFLAGS%g
    48894810s%@DEFS@%$DEFS%g
    48904811s%@LDFLAGS@%$LDFLAGS%g
     
    49224843s%@ALLOCA@%$ALLOCA%g
    49234844s%@PERL5@%$PERL5%g
     4845s%@LD_LIBC@%$LD_LIBC%g
    49244846s%@NEED_LIBS@%$NEED_LIBS%g
    49254847s%@LD_DYN_FLAGS@%$LD_DYN_FLAGS%g
  • Singular/configure.in

    rabcc453 rf413ec5  
    498498AC_ARG_WITH(
    499499  dl,
    500   [  --with-dl               do use dl (no dynamic linking)])
     500  [  --with-dl               do use dl (dynamic linking)])
    501501AC_ARG_WITH(apint,
    502502  [  --with-apint=PACKAGE    use PACKAGE for arbitary integer arithmetic])
     
    648648fi
    649649
    650 #   
    651 # dl
    652 if test "$with_dl" = yes; then
    653   AC_CHECK_LIB(dl, dl_init,\
    654    AC_MSG_WARN(building without dl: disabling dynamic linking))
    655 fi
    656 
    657650NEED_LIBS=$LIBS
    658651
     
    730723    AC_MSG_RESULT(none)
    731724    AC_MSG_ERROR(can not build with smallgmp)
     725  fi
     726fi
     727
     728#   
     729# dl
     730if test "$with_dl" != no; then
     731  AC_CHECK_LIB(dl, dlopen)
     732  if test "$ac_cv_lib_dl_dlopen" = yes; then
     733    NEED_LIBS="-ldl ${NEED_LIBS}"
     734    LD_DYN_FLAGS="-Xlinker -E"
     735    LD_LIBC="-lc"
     736    AC_SUBST(LD_LIBC)
     737    AC_DEFINE(HAVE_DL)
    732738  fi
    733739fi
  • Singular/feResource.cc

    rabcc453 rf413ec5  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: feResource.cc,v 1.9 1999-08-25 15:55:32 obachman Exp $ */
     4/* $Id: feResource.cc,v 1.10 1999-08-25 16:02:46 Singular Exp $ */
    55/*
    66* ABSTRACT: management of resources
     
    99#include <unistd.h>
    1010
     11#include "version.h"
    1112#include "mod2.h"
    1213#include "version.h"
  • Singular/febase.cc

    rabcc453 rf413ec5  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: febase.cc,v 1.80 1999-08-20 16:07:19 Singular Exp $ */
     4/* $Id: febase.cc,v 1.81 1999-08-25 16:02:46 Singular Exp $ */
    55/*
    66* ABSTRACT: i/o system
    77*/
    88
     9#include "version.h"
    910#include "mod2.h"
    1011
     
    2526#include "subexpr.h"
    2627#include "ipshell.h"
    27 #include "version.h"
    2828
    2929
  • Singular/febase.h

    rabcc453 rf413ec5  
    44*  Computer Algebra System SINGULAR     *
    55****************************************/
    6 /* $Id: febase.h,v 1.35 1999-08-13 11:21:43 Singular Exp $ */
     6/* $Id: febase.h,v 1.36 1999-08-25 16:02:46 Singular Exp $ */
    77/*
    88* ABSTRACT: basic i/o
     
    257257void SPrintStart();
    258258char* SPrintEnd();
     259
     260
     261#ifdef HAVE_DYN_RL
     262#undef HAVE_READLINE
     263#define HAVE_FEREAD 1
     264#endif
     265
    259266#endif /* ifndef FEBASE_H */
  • Singular/febase.inc

    rabcc453 rf413ec5  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: febase.inc,v 1.24 1999-05-06 16:53:22 Singular Exp $ */
     4/* $Id: febase.inc,v 1.25 1999-08-25 16:02:47 Singular Exp $ */
    55/*
    66* ABSTRACT: handling of 'voices'
     
    523523      feShowPrompt();
    524524      s=fe_fgets_stdin(fe_promptstr,
    525                        currentVoice->buffer+offset,
     525                       &(currentVoice->buffer[offset]),
    526526                       (4096-1-sizeof(ADDRESS))-offset);
    527527    }
  • Singular/feread.cc

    rabcc453 rf413ec5  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: feread.cc,v 1.21 1999-08-13 11:21:43 Singular Exp $ */
     4/* $Id: feread.cc,v 1.22 1999-08-25 16:02:47 Singular Exp $ */
    55/*
    66* ABSTRACT: input from ttys, simulating fgets
     
    88
    99
     10#include "version.h"
    1011#include "mod2.h"
    1112#include "tok.h"
     
    1617#endif
    1718
    18 
    1919static char * fe_fgets_stdin_init(char *pr,char *s, int size);
    2020char * (*fe_fgets_stdin)(char *pr,char *s, int size)
    2121 = fe_fgets_stdin_init;
     22
     23/* ===================================================================*/
     24/* =                   static/dymanic readline                      = */
     25/* ===================================================================*/
     26#if defined(HAVE_READLINE) || defined(HAVE_DYN_RL)
     27
     28#include "ipshell.h"
     29
     30#ifndef STDOUT_FILENO
     31#define STDOUT_FILENO 1
     32#endif
     33
     34/* Generator function for command completion.  STATE lets us know whether
     35*   to start from scratch; without any state (i.e. STATE == 0), then we
     36*   start at the top of the list.
     37*/
     38char *command_generator (char *text, int state)
     39{
     40  static int list_index, len;
     41  char *name;
     42
     43  /* If this is a new word to complete, initialize now.  This includes
     44     saving the length of TEXT for efficiency, and initializing the index
     45     variable to 0. */
     46  if (state==0)
     47  {
     48    list_index = 1;
     49    len = strlen (text);
     50  }
     51
     52  /* Return the next name which partially matches from the command list. */
     53  while ((name = cmds[list_index].name)!=NULL)
     54  {
     55    list_index++;
     56
     57    if (strncmp (name, text, len) == 0)
     58      return (strdup(name));
     59  }
     60
     61  /* If no names matched, then return NULL. */
     62  return ((char *)NULL);
     63}
     64
     65
     66#endif
     67/* ===================================================================*/
     68/* =                      static readline                           = */
     69/* ===================================================================*/
     70/* some procedure are shared with "dynamic readline" */
    2271#if defined(HAVE_READLINE) && !defined(HAVE_FEREAD)
    2372#include <unistd.h>
     
    4998}
    5099
    51 #ifndef STDOUT_FILENO
    52 #define STDOUT_FILENO 1
    53 #endif
    54 
    55 #include "ipshell.h"
    56100
    57101char * fe_fgets_stdin_rl(char *pr,char *s, int size);
    58 
    59102
    60103/* Tell the GNU Readline library how to complete.  We want to try to complete
    61104   on command names  or on filenames if it is preceded by " */
    62 
    63 /* Generator function for command completion.  STATE lets us know whether
    64 *   to start from scratch; without any state (i.e. STATE == 0), then we
    65 *   start at the top of the list.
    66 */
    67 char *command_generator (char *text, int state)
    68 {
    69   static int list_index, len;
    70   char *name;
    71 
    72   /* If this is a new word to complete, initialize now.  This includes
    73      saving the length of TEXT for efficiency, and initializing the index
    74      variable to 0. */
    75   if (state==0)
    76   {
    77     list_index = 1;
    78     len = strlen (text);
    79   }
    80 
    81   /* Return the next name which partially matches from the command list. */
    82   while ((name = cmds[list_index].name)!=NULL)
    83   {
    84     list_index++;
    85 
    86     if (strncmp (name, text, len) == 0)
    87       return (strdup(name));
    88   }
    89 
    90   /* If no names matched, then return NULL. */
    91   return ((char *)NULL);
    92 }
    93105
    94106/* Attempt to complete on the contents of TEXT.  START and END show the
     
    159171}
    160172#endif
    161 /*--------------------------------------------------------------*/
     173
     174/* ===================================================================*/
     175/* =                    emulated readline                           = */
     176/* ===================================================================*/
    162177#if !defined(HAVE_READLINE) && defined(HAVE_FEREAD)
    163178extern "C" {
     
    175190#endif
    176191
     192
     193/* ===================================================================*/
     194/* =                     dynamic readline                           = */
     195/* ===================================================================*/
     196/* some procedure are shared with "static readline" */
     197
     198#if defined(HAVE_DYN_RL)
     199#include <unistd.h>
     200#include <stdio.h>
     201#include <stdlib.h>
     202#include <sys/types.h>
     203#include <sys/file.h>
     204#include <sys/stat.h>
     205#include <sys/errno.h>
     206#include <dlfcn.h>
     207
     208extern "C" {
     209  char *(*fe_filename_completion_function)(); /* 3 */
     210  char *(* fe_readline) ();                   /* 4 */
     211  void (*fe_add_history) ();                  /* 5 */
     212  char ** fe_rl_readline_name;                /* 6 */
     213  char **fe_rl_line_buffer;                   /* 7 */
     214  char **(*fe_completion_matches)();          /* 8 */
     215  typedef char **CPPFunction ();
     216  CPPFunction **fe_rl_attempted_completion_function; /* 9 */
     217  FILE ** fe_rl_outstream;                    /* 10 */
     218  int (*fe_write_history) ();                 /* 11 */
     219  int (*fe_history_total_bytes) ();           /* 12 */
     220  void (*fe_using_history) ();                /* 13 */
     221  int (*fe_read_history) ();                  /* 14 */
     222}
     223
     224void * fe_rl_hdl=NULL;
     225
     226char * fe_fgets_stdin_rl(char *pr,char *s, int size);
     227static int fe_init_dyn_rl()
     228{
     229  int res=0;
     230  loop
     231  {
     232    fe_rl_hdl=dlopen("libreadline.so",RTLD_LAZY|RTLD_GLOBAL);
     233    if (fe_rl_hdl==NULL) { res=1; break;}
     234
     235    fe_readline=dlsym(fe_rl_hdl,"readline");
     236    if (fe_readline==NULL) { res=4; break; }
     237    fe_add_history=dlsym(fe_rl_hdl,"add_history");
     238    if (fe_add_history==NULL) { res=5; break; }
     239    fe_rl_readline_name=dlsym(fe_rl_hdl,"rl_readline_name");
     240    if (fe_rl_readline_name==NULL) { res=6; break; }
     241    fe_rl_line_buffer=dlsym(fe_rl_hdl,"rl_line_buffer");
     242    if (fe_rl_line_buffer==NULL) { res=7; break; }
     243    fe_rl_line_buffer=dlsym(fe_rl_hdl,"rl_line_buffer");
     244    if (fe_rl_line_buffer==NULL) { res=7; break; }
     245    fe_completion_matches=dlsym(fe_rl_hdl,"completion_matches");
     246    if (fe_completion_matches==NULL) { res=8; break; }
     247    fe_rl_attempted_completion_function=
     248      dlsym(fe_rl_hdl,"rl_attempted_completion_function");
     249    if (fe_rl_attempted_completion_function==NULL) { res=9; break; }
     250    fe_rl_outstream=dlsym(fe_rl_hdl,"rl_outstream");
     251    if (fe_rl_outstream==NULL) { res=10; break; }
     252    fe_write_history=dlsym(fe_rl_hdl,"write_history");
     253    if (fe_write_history==NULL) { res=11; break; }
     254    fe_history_total_bytes=dlsym(fe_rl_hdl,"history_total_bytes");
     255    if (fe_history_total_bytes==NULL) { res=12; break; }
     256    fe_using_history=dlsym(fe_rl_hdl,"using_history");
     257    if (fe_using_history==NULL) { res=13; break; }
     258    fe_read_history=dlsym(fe_rl_hdl,"read_history");
     259    if (fe_read_history==NULL) { res=14; break; }
     260    return 0;
     261  }
     262  dlclose(fe_rl_hdl);
     263  return res;
     264}
     265
     266
     267/* Attempt to complete on the contents of TEXT.  START and END show the
     268*   region of TEXT that contains the word to complete.  We can use the
     269*   entire line in case we want to do some simple parsing.  Return the
     270*   array of matches, or NULL if there aren't any.
     271*/
     272char ** singular_completion (char *text, int start, int end)
     273{
     274  /* If this word is not in a string, then it may be a command
     275     to complete.  Otherwise it may be the name of a file in the current
     276     directory. */
     277  if ((*fe_rl_line_buffer)[start-1]=='"')
     278    return (*fe_completion_matches) (text, *fe_filename_completion_function);
     279  char **m=(*fe_completion_matches) (text, command_generator);
     280  if (m==NULL)
     281  {
     282    m=(char **)malloc(2*sizeof(char*));
     283    m[0]=(char *)malloc(end-start+2);
     284    strncpy(m[0],text,end-start+1);
     285    m[1]=NULL;
     286  }
     287  return m;
     288}
     289
     290void fe_reset_input_mode (void)
     291{
     292  char *p = getenv("SINGULARHIST");
     293  if (p != NULL)
     294  {
     295    if((*fe_history_total_bytes)()!=0)
     296      (*fe_write_history) (p);
     297  }
     298}
     299
     300char * fe_fgets_stdin_drl(char *pr,char *s, int size)
     301{
     302  if (!BVERBOSE(V_PROMPT))
     303  {
     304    pr="";
     305  }
     306  mflush();
     307
     308  char *line;
     309  line = (*fe_readline) (pr);
     310
     311  if (line==NULL)
     312    return NULL;
     313
     314  if (*line!='\0')
     315  {
     316    (*fe_add_history) (line);
     317  }
     318  int l=strlen(line);
     319  if (l>=size-1)
     320  {
     321    strncpy(s,line,size);
     322  }
     323  else
     324  {
     325    strncpy(s,line,l);
     326    s[l]='\n';
     327    s[l+1]='\0';
     328  }
     329  free (line);
     330
     331  return s;
     332}
     333#endif
     334
     335/* ===================================================================*/
     336/* =                        fgets                                   = */
     337/* ===================================================================*/
     338char * fe_fgets(char *pr,char *s, int size)
     339{
     340  if (BVERBOSE(V_PROMPT))
     341  {
     342    fprintf(stdout,pr);
     343  }
     344  mflush();
     345  return fgets(s,size,stdin);
     346}
     347
     348/* ===================================================================*/
     349/* =       init for static rl, dyn. rl, emu. rl                     = */
     350/* ===================================================================*/
    177351static char * fe_fgets_stdin_init(char *pr,char *s, int size)
    178352{
     
    203377  return(fe_fgets_stdin_rl(pr,s,size));
    204378#endif
    205 #if !defined(HAVE_READLINE) && defined(HAVE_FEREAD)
    206   fe_fgets_stdin=fe_fgets_stdin_emu;
    207   return(fe_fgets_stdin_emu(pr,s,size));
    208 #endif
    209 }
    210 
    211 /* fgets: */
    212 char * fe_fgets(char *pr,char *s, int size)
    213 {
    214   if (BVERBOSE(V_PROMPT))
    215   {
    216     fprintf(stdout,pr);
    217   }
    218   mflush();
    219   return fgets(s,size,stdin);
    220 }
    221 
     379#ifdef HAVE_DYN_RL
     380  /* do dynamic loading */
     381  int res=fe_init_dyn_rl();
     382  if (res!=0)
     383  {
     384    Warn("dynamic loading failed: %d\n",res);
     385    fe_fgets_stdin=fe_fgets_stdin_emu;
     386    return fe_fgets_stdin_emu(pr,s,size);
     387  }
     388  /* Allow conditional parsing of the ~/.inputrc file. */
     389  (*fe_rl_readline_name) = "Singular";
     390  /* Tell the completer that we want a crack first. */
     391  (*fe_rl_attempted_completion_function) = (CPPFunction *)singular_completion;
     392
     393  /* set the output stream */
     394  if(!isatty(STDOUT_FILENO))
     395  {
     396    #ifdef atarist
     397      *fe_rl_outstream = fopen( "/dev/tty", "w" );
     398    #else
     399      *fe_rl_outstream = fopen( ttyname(fileno(stdin)), "w" );
     400    #endif
     401  }
     402
     403  /* try to read a history */
     404  (*fe_using_history)();
     405  char *p = getenv("SINGULARHIST");
     406  if (p != NULL)
     407  {
     408    (*fe_read_history) (p);
     409  }
     410  fe_fgets_stdin=fe_fgets_stdin_drl;
     411  return fe_fgets_stdin_drl(pr,s,size);
     412#else
     413  #if !defined(HAVE_READLINE) && defined(HAVE_FEREAD)
     414    fe_fgets_stdin=fe_fgets_stdin_emu;
     415    return(fe_fgets_stdin_emu(pr,s,size));
     416  #endif
     417#endif
     418}
     419
     420/* ===================================================================*/
     421/* =                          TCL                                   = */
     422/* ===================================================================*/
    222423#ifdef HAVE_TCL
    223424/* tcl: */
     
    231432#endif
    232433
     434/* ===================================================================*/
     435/* =                      batch mode                                = */
     436/* ===================================================================*/
    233437/* dummy (for batch mode): */
    234438char * fe_fgets_dummy(char *pr,char *s, int size)
  • Singular/misc.cc

    rabcc453 rf413ec5  
    1414#include <limits.h>
    1515
     16#include "version.h"
    1617#include "mod2.h"
    1718#include "tok.h"
     
    534535              StringAppend("MP(%s),",MP_VERSION);
    535536#endif
    536 #if defined(HAVE_READLINE) && !defined(FEREAD)
     537#if defined(HAVE_DYN_RL)
     538              StringAppendS("d-readline,"
     539#else
     540  #if defined(HAVE_READLINE) && !defined(FEREAD)
    537541              StringAppendS("libreadline,");
    538 #else
    539 #ifdef HAVE_FEREAD
     542  #else
     543    #ifdef HAVE_FEREAD
    540544              StringAppendS("emulated libreadline,");
    541 #endif
     545    #endif
     546  #endif
    542547#endif
    543548#ifdef SRING
  • Singular/mod2.h.in

    rabcc453 rf413ec5  
    55 *          DO NOT EDIT!
    66 *
    7  *  Version: $Id: mod2.h.in,v 1.65 1999-08-25 10:23:42 obachman Exp $
     7 *  Version: $Id: mod2.h.in,v 1.66 1999-08-25 16:02:48 Singular Exp $
    88 *******************************************************************/
    99#ifndef MOD2_H
     
    1313 * Defines which are set by configure
    1414 ******************************************************************/
     15/* Define to use dynamic linking */
     16#undef HAVE_DL
    1517/* Define to use readline lib for fancy display */
    1618#undef HAVE_READLINE
     
    143145 * Defines which are not set by configure
    144146 ******************************************************************/
     147/* define to use the dynamic linking of readline in non-distributions builds */
     148/* #undef USE_DYN_RL */
     149
    145150/* Default value for timer resolution in ticks per second */
    146151/* set to 10 for resolution of tenth of a second, etc */
    147152#define TIMER_RESOLUTION 1
     153
    148154/* Undefine to disable the quote/eval of expressions */
    149155#define SIQ 1
     156
    150157/* Define to enable TCL interface */
    151158#undef HAVE_TCL
     
    154161/* Define to enable working in exterior algebras */
    155162#undef SRING
     163
    156164/* Undefine to disable Gerhard's and Wilfried's fast and dirty std computations */
    157165#define FAST_AND_DIRTY
     
    194202 * Evaluate the set defines
    195203 ******************************************************************/
     204/* dynamic readline or readline ? */
     205#ifdef HAVE_DL
     206  #if defined(MAKE_DISTRIBUTION) || defined(USE_DYN_RL)
     207    #define HAVE_DYN_RL
     208  #endif
     209#endif
     210
    196211/* FGLM needs factory */
    197212#ifdef HAVE_FACTORY
Note: See TracChangeset for help on using the changeset viewer.