Changes in / [20:30]


Ignore:
Location:
/trunk/gsdl
Files:
5 added
1 deleted
23 edited

Legend:

Unmodified
Added
Removed
  • /trunk/gsdl/packages/mg-1.3d/config.h.in

    r20 r30  
    5252   direction of stack growth for your system; otherwise it will be
    5353   automatically deduced at run-time.
    54     STACK_DIRECTION > 0 => grows toward higher addresses
    55     STACK_DIRECTION < 0 => grows toward lower addresses
    56     STACK_DIRECTION = 0 => direction of growth unknown
     54 STACK_DIRECTION > 0 => grows toward higher addresses
     55 STACK_DIRECTION < 0 => grows toward lower addresses
     56 STACK_DIRECTION = 0 => direction of growth unknown
    5757 */
    5858#undef STACK_DIRECTION
     
    9999#undef HAVE_FTIME
    100100
     101/* Define if you have the ftruncate function.  */
     102#undef HAVE_FTRUNCATE
     103
    101104/* Define if you have the getpagesize function.  */
    102105#undef HAVE_GETPAGESIZE
     
    114117#undef HAVE_SETBUFFER
    115118
     119/* Define if you have the strcasecmp function.  */
     120#undef HAVE_STRCASECMP
     121
    116122/* Define if you have the strftime function.  */
    117123#undef HAVE_STRFTIME
     124
     125/* Define if you have the strstr function.  */
     126#undef HAVE_STRSTR
    118127
    119128/* Define if you have the strtol function.  */
  • /trunk/gsdl/packages/mg-1.3d/configure

    r20 r30  
    22
    33# Guess values for system-dependent variables and create Makefiles.
    4 # Generated automatically using autoconf version 2.4
    5 # Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
     4# Generated automatically using autoconf version 2.12
     5# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
    66#
    77# This configure script is free software; the Free Software Foundation
     
    3939x_includes=NONE
    4040x_libraries=NONE
     41bindir='${exec_prefix}/bin'
     42sbindir='${exec_prefix}/sbin'
     43libexecdir='${exec_prefix}/libexec'
     44datadir='${prefix}/share'
     45sysconfdir='${prefix}/etc'
     46sharedstatedir='${prefix}/com'
     47localstatedir='${prefix}/var'
     48libdir='${exec_prefix}/lib'
     49includedir='${prefix}/include'
     50oldincludedir='/usr/include'
     51infodir='${prefix}/info'
     52mandir='${prefix}/man'
    4153
    4254# Initialize some other variables.
    4355subdirs=
     56MFLAGS= MAKEFLAGS=
     57# Maximum number of lines to put in a shell here document.
     58ac_max_here_lines=12
    4459
    4560ac_prev=
     
    6378  case "$ac_option" in
    6479
    65   -build | --build | --buil | --bui | --bu | --b)
     80  -bindir | --bindir | --bindi | --bind | --bin | --bi)
     81    ac_prev=bindir ;;
     82  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
     83    bindir="$ac_optarg" ;;
     84
     85  -build | --build | --buil | --bui | --bu)
    6686    ac_prev=build ;;
    67   -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
     87  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
    6888    build="$ac_optarg" ;;
    6989
     
    7494  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
    7595    cache_file="$ac_optarg" ;;
     96
     97  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
     98    ac_prev=datadir ;;
     99  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
     100  | --da=*)
     101    datadir="$ac_optarg" ;;
    76102
    77103  -disable-* | --disable-*)
     
    125151  --prefix=PREFIX         install architecture-independent files in PREFIX
    126152                          [$ac_default_prefix]
    127   --exec-prefix=PREFIX    install architecture-dependent files in PREFIX
     153  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
    128154                          [same as prefix]
     155  --bindir=DIR            user executables in DIR [EPREFIX/bin]
     156  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
     157  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
     158  --datadir=DIR           read-only architecture-independent data in DIR
     159                          [PREFIX/share]
     160  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
     161  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
     162                          [PREFIX/com]
     163  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
     164  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
     165  --includedir=DIR        C header files in DIR [PREFIX/include]
     166  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
     167  --infodir=DIR           info documentation in DIR [PREFIX/info]
     168  --mandir=DIR            man documentation in DIR [PREFIX/man]
    129169  --srcdir=DIR            find the sources in DIR [configure dir or ..]
    130170  --program-prefix=PREFIX prepend PREFIX to installed program names
    131171  --program-suffix=SUFFIX append SUFFIX to installed program names
    132   --program-transform-name=PROGRAM run sed PROGRAM on installed program names
     172  --program-transform-name=PROGRAM
     173                          run sed PROGRAM on installed program names
     174EOF
     175    cat << EOF
    133176Host type:
    134177  --build=BUILD           configure for building on BUILD [BUILD=HOST]
     
    142185  --x-includes=DIR        X include files are in DIR
    143186  --x-libraries=DIR       X library files are in DIR
    144 --enable and --with options recognized:$ac_help
    145 EOF
     187EOF
     188    if test -n "$ac_help"; then
     189      echo "--enable and --with options recognized:$ac_help"
     190    fi
    146191    exit 0 ;;
    147192
     
    151196    host="$ac_optarg" ;;
    152197
     198  -includedir | --includedir | --includedi | --included | --include \
     199  | --includ | --inclu | --incl | --inc)
     200    ac_prev=includedir ;;
     201  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
     202  | --includ=* | --inclu=* | --incl=* | --inc=*)
     203    includedir="$ac_optarg" ;;
     204
     205  -infodir | --infodir | --infodi | --infod | --info | --inf)
     206    ac_prev=infodir ;;
     207  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
     208    infodir="$ac_optarg" ;;
     209
     210  -libdir | --libdir | --libdi | --libd)
     211    ac_prev=libdir ;;
     212  -libdir=* | --libdir=* | --libdi=* | --libd=*)
     213    libdir="$ac_optarg" ;;
     214
     215  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
     216  | --libexe | --libex | --libe)
     217    ac_prev=libexecdir ;;
     218  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
     219  | --libexe=* | --libex=* | --libe=*)
     220    libexecdir="$ac_optarg" ;;
     221
     222  -localstatedir | --localstatedir | --localstatedi | --localstated \
     223  | --localstate | --localstat | --localsta | --localst \
     224  | --locals | --local | --loca | --loc | --lo)
     225    ac_prev=localstatedir ;;
     226  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
     227  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
     228  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
     229    localstatedir="$ac_optarg" ;;
     230
     231  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
     232    ac_prev=mandir ;;
     233  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
     234    mandir="$ac_optarg" ;;
     235
    153236  -nfp | --nfp | --nf)
    154237    # Obsolete; use --without-fp.
     
    162245  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
    163246    no_recursion=yes ;;
     247
     248  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
     249  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
     250  | --oldin | --oldi | --old | --ol | --o)
     251    ac_prev=oldincludedir ;;
     252  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
     253  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
     254  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
     255    oldincludedir="$ac_optarg" ;;
    164256
    165257  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
     
    203295    silent=yes ;;
    204296
     297  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
     298    ac_prev=sbindir ;;
     299  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
     300  | --sbi=* | --sb=*)
     301    sbindir="$ac_optarg" ;;
     302
     303  -sharedstatedir | --sharedstatedir | --sharedstatedi \
     304  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
     305  | --sharedst | --shareds | --shared | --share | --shar \
     306  | --sha | --sh)
     307    ac_prev=sharedstatedir ;;
     308  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
     309  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
     310  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
     311  | --sha=* | --sh=*)
     312    sharedstatedir="$ac_optarg" ;;
     313
    205314  -site | --site | --sit)
    206315    ac_prev=site ;;
     
    213322    srcdir="$ac_optarg" ;;
    214323
     324  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
     325  | --syscon | --sysco | --sysc | --sys | --sy)
     326    ac_prev=sysconfdir ;;
     327  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
     328  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
     329    sysconfdir="$ac_optarg" ;;
     330
    215331  -target | --target | --targe | --targ | --tar | --ta | --t)
    216332    ac_prev=target ;;
     
    222338
    223339  -version | --version | --versio | --versi | --vers)
    224     echo "configure generated by autoconf version 2.4"
     340    echo "configure generated by autoconf version 2.12"
    225341    exit 0 ;;
    226342
     
    268384    ;;
    269385
    270   *) 
     386  *)
    271387    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
    272388      echo "configure: warning: $ac_option: invalid host type" 1>&2
     
    324440
    325441# NLS nuisances.
    326 # Only set LANG and LC_ALL to C if already set.
    327 # These must not be set unconditionally because not all systems understand
    328 # e.g. LANG=C (notably SCO).
     442# Only set these to C if already set.  These must not be set unconditionally
     443# because not all systems understand e.g. LANG=C (notably SCO).
     444# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
     445# Non-C LC_CTYPE values break the ctype check.
     446if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
    329447if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
    330 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
     448if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
     449if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
    331450
    332451# confdefs.h avoids OS command line length limits that DEFS can exceed.
     
    388507# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
    389508ac_cpp='$CPP $CPPFLAGS'
    390 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
    391 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
     509ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
     510ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
     511cross_compiling=$ac_cv_prog_cc_cross
    392512
    393513if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
     
    408528  program_transform_name=
    409529else
    410   # Double any \ or $.
    411   echo 's,\\,\\\\,g; s,\$,$$,g' > conftestsed
     530  # Double any \ or $.  echo might interpret backslashes.
     531  cat <<\EOF_SED > conftestsed
     532s,\\,\\\\,g; s,\$,$$,g
     533EOF_SED
    412534  program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
    413535  rm -f conftestsed
     
    437559
    438560
    439 for ac_prog in $CCC c++ g++ gcc CC cxx
     561for ac_prog in $CCC c++ g++ gcc CC cxx cc++
    440562do
    441563# Extract the first word of "$ac_prog", so it can be a program name with args.
    442564set dummy $ac_prog; ac_word=$2
    443565echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
     566echo "configure:567: checking for $ac_word" >&5
    444567if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
    445568  echo $ac_n "(cached) $ac_c" 1>&6
     
    471594
    472595
     596echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
     597echo "configure:598: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
     598
     599ac_ext=C
     600# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
     601ac_cpp='$CXXCPP $CPPFLAGS'
     602ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
     603ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
     604cross_compiling=$ac_cv_prog_cxx_cross
     605
     606cat > conftest.$ac_ext <<EOF
     607#line 608 "configure"
     608#include "confdefs.h"
     609main(){return(0);}
     610EOF
     611if { (eval echo configure:612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
     612  ac_cv_prog_cxx_works=yes
     613  # If we can't run a trivial program, we are probably using a cross compiler.
     614  if (./conftest; exit) 2>/dev/null; then
     615    ac_cv_prog_cxx_cross=no
     616  else
     617    ac_cv_prog_cxx_cross=yes
     618  fi
     619else
     620  echo "configure: failed program was:" >&5
     621  cat conftest.$ac_ext >&5
     622  ac_cv_prog_cxx_works=no
     623fi
     624rm -fr conftest*
     625ac_ext=c
     626# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
     627ac_cpp='$CPP $CPPFLAGS'
     628ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
     629ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
     630cross_compiling=$ac_cv_prog_cc_cross
     631
     632echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
     633if test $ac_cv_prog_cxx_works = no; then
     634  { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
     635fi
     636echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
     637echo "configure:638: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
     638echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
     639cross_compiling=$ac_cv_prog_cxx_cross
     640
    473641echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
     642echo "configure:643: checking whether we are using GNU C++" >&5
    474643if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
    475644  echo $ac_n "(cached) $ac_c" 1>&6
     
    480649#endif
    481650EOF
    482 if ${CXX-g++} -E conftest.C 2>&5 | egrep yes >/dev/null 2>&1; then
     651if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:652: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
    483652  ac_cv_prog_gxx=yes
    484653else
     
    486655fi
    487656fi
     657
    488658echo "$ac_t""$ac_cv_prog_gxx" 1>&6
     659
    489660if test $ac_cv_prog_gxx = yes; then
    490661  GXX=yes
    491   if test "${CXXFLAGS+set}" != set; then
    492     echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
    493 if eval "test \"`echo '$''{'ac_cv_prog_gxx_g'+set}'`\" = set"; then
     662  ac_test_CXXFLAGS="${CXXFLAGS+set}"
     663  ac_save_CXXFLAGS="$CXXFLAGS"
     664  CXXFLAGS=
     665  echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
     666echo "configure:667: checking whether ${CXX-g++} accepts -g" >&5
     667if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
    494668  echo $ac_n "(cached) $ac_c" 1>&6
    495669else
    496670  echo 'void f(){}' > conftest.cc
    497671if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
    498   ac_cv_prog_gxx_g=yes
    499 else
    500   ac_cv_prog_gxx_g=no
    501 fi
    502 rm -f conftest*
    503 
    504 fi
    505     echo "$ac_t""$ac_cv_prog_gxx_g" 1>&6
    506     if test $ac_cv_prog_gxx_g = yes; then
    507       CXXFLAGS="-g -O"
    508     else
    509       CXXFLAGS="-O"
    510     fi
     672  ac_cv_prog_cxx_g=yes
     673else
     674  ac_cv_prog_cxx_g=no
     675fi
     676rm -f conftest*
     677
     678fi
     679
     680echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
     681  if test "$ac_test_CXXFLAGS" = set; then
     682    CXXFLAGS="$ac_save_CXXFLAGS"
     683  elif test $ac_cv_prog_cxx_g = yes; then
     684    CXXFLAGS="-g -O2"
     685  else
     686    CXXFLAGS="-O2"
    511687  fi
    512688else
     
    520696set dummy $ac_prog; ac_word=$2
    521697echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
     698echo "configure:699: checking for $ac_word" >&5
    522699if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
    523700  echo $ac_n "(cached) $ac_c" 1>&6
     
    552729set dummy $ac_prog; ac_word=$2
    553730echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
     731echo "configure:732: checking for $ac_word" >&5
    554732if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
    555733  echo $ac_n "(cached) $ac_c" 1>&6
     
    583761set dummy gcc; ac_word=$2
    584762echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
     763echo "configure:764: checking for $ac_word" >&5
    585764if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
    586765  echo $ac_n "(cached) $ac_c" 1>&6
     
    598777  done
    599778  IFS="$ac_save_ifs"
    600   test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc"
    601779fi
    602780fi
     
    608786fi
    609787
     788if test -z "$CC"; then
     789  # Extract the first word of "cc", so it can be a program name with args.
     790set dummy cc; ac_word=$2
     791echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
     792echo "configure:793: checking for $ac_word" >&5
     793if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
     794  echo $ac_n "(cached) $ac_c" 1>&6
     795else
     796  if test -n "$CC"; then
     797  ac_cv_prog_CC="$CC" # Let the user override the test.
     798else
     799  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
     800  ac_prog_rejected=no
     801  for ac_dir in $PATH; do
     802    test -z "$ac_dir" && ac_dir=.
     803    if test -f $ac_dir/$ac_word; then
     804      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
     805        ac_prog_rejected=yes
     806    continue
     807      fi
     808      ac_cv_prog_CC="cc"
     809      break
     810    fi
     811  done
     812  IFS="$ac_save_ifs"
     813if test $ac_prog_rejected = yes; then
     814  # We found a bogon in the path, so make sure we never use it.
     815  set dummy $ac_cv_prog_CC
     816  shift
     817  if test $# -gt 0; then
     818    # We chose a different compiler from the bogus one.
     819    # However, it has the same basename, so the bogon will be chosen
     820    # first if we set CC to just the basename; use the full file name.
     821    shift
     822    set dummy "$ac_dir/$ac_word" "$@"
     823    shift
     824    ac_cv_prog_CC="$@"
     825  fi
     826fi
     827fi
     828fi
     829CC="$ac_cv_prog_CC"
     830if test -n "$CC"; then
     831  echo "$ac_t""$CC" 1>&6
     832else
     833  echo "$ac_t""no" 1>&6
     834fi
     835
     836  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
     837fi
     838
     839echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
     840echo "configure:841: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
     841
     842ac_ext=c
     843# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
     844ac_cpp='$CPP $CPPFLAGS'
     845ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
     846ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
     847cross_compiling=$ac_cv_prog_cc_cross
     848
     849cat > conftest.$ac_ext <<EOF
     850#line 851 "configure"
     851#include "confdefs.h"
     852main(){return(0);}
     853EOF
     854if { (eval echo configure:855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
     855  ac_cv_prog_cc_works=yes
     856  # If we can't run a trivial program, we are probably using a cross compiler.
     857  if (./conftest; exit) 2>/dev/null; then
     858    ac_cv_prog_cc_cross=no
     859  else
     860    ac_cv_prog_cc_cross=yes
     861  fi
     862else
     863  echo "configure: failed program was:" >&5
     864  cat conftest.$ac_ext >&5
     865  ac_cv_prog_cc_works=no
     866fi
     867rm -fr conftest*
     868
     869echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
     870if test $ac_cv_prog_cc_works = no; then
     871  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
     872fi
     873echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
     874echo "configure:875: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
     875echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
     876cross_compiling=$ac_cv_prog_cc_cross
    610877
    611878echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
     879echo "configure:880: checking whether we are using GNU C" >&5
    612880if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
    613881  echo $ac_n "(cached) $ac_c" 1>&6
     
    618886#endif
    619887EOF
    620 if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then
     888if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:889: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
    621889  ac_cv_prog_gcc=yes
    622890else
     
    624892fi
    625893fi
     894
    626895echo "$ac_t""$ac_cv_prog_gcc" 1>&6
     896
    627897if test $ac_cv_prog_gcc = yes; then
    628898  GCC=yes
    629   if test "${CFLAGS+set}" != set; then
    630     echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
    631 if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
     899  ac_test_CFLAGS="${CFLAGS+set}"
     900  ac_save_CFLAGS="$CFLAGS"
     901  CFLAGS=
     902  echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
     903echo "configure:904: checking whether ${CC-cc} accepts -g" >&5
     904if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
    632905  echo $ac_n "(cached) $ac_c" 1>&6
    633906else
    634907  echo 'void f(){}' > conftest.c
    635908if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
    636   ac_cv_prog_gcc_g=yes
    637 else
    638   ac_cv_prog_gcc_g=no
    639 fi
    640 rm -f conftest*
    641 
    642 fi
    643     echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
    644     if test $ac_cv_prog_gcc_g = yes; then
    645       CFLAGS="-g -O"
    646     else
    647       CFLAGS="-O"
    648     fi
     909  ac_cv_prog_cc_g=yes
     910else
     911  ac_cv_prog_cc_g=no
     912fi
     913rm -f conftest*
     914
     915fi
     916
     917echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
     918  if test "$ac_test_CFLAGS" = set; then
     919    CFLAGS="$ac_save_CFLAGS"
     920  elif test $ac_cv_prog_cc_g = yes; then
     921    CFLAGS="-g -O2"
     922  else
     923    CFLAGS="-O2"
    649924  fi
    650925else
     
    683958# ./install, which can be erroneously created by make from ./install.sh.
    684959echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
     960echo "configure:961: checking for a BSD compatible install" >&5
    685961if test -z "$INSTALL"; then
    686962if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
    687963  echo $ac_n "(cached) $ac_c" 1>&6
    688964else
    689     IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
     965    IFS="${IFS=     }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
    690966  for ac_dir in $PATH; do
    691967    # Account for people who put trailing slashes in PATH elements.
     
    710986    esac
    711987  done
    712   IFS="$ac_save_ifs"
    713   # As a last resort, use the slow shell script.
    714   test -z "$ac_cv_path_install" && ac_cv_path_install="$ac_install_sh"
    715 fi
    716   INSTALL="$ac_cv_path_install"
     988  IFS="$ac_save_IFS"
     989
     990fi
     991  if test "${ac_cv_path_install+set}" = set; then
     992    INSTALL="$ac_cv_path_install"
     993  else
     994    # As a last resort, use the slow shell script.  We don't cache a
     995    # path for INSTALL within a source directory, because that will
     996    # break other packages using the cache if that directory is
     997    # removed, or if the path is relative.
     998    INSTALL="$ac_install_sh"
     999  fi
    7171000fi
    7181001echo "$ac_t""$INSTALL" 1>&6
     
    7251008
    7261009echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
     1010echo "configure:1011: checking whether ln -s works" >&5
    7271011if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
    7281012  echo $ac_n "(cached) $ac_c" 1>&6
     
    7451029
    7461030echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
    747 set dummy ${MAKE-make}; ac_make=$2
     1031echo "configure:1032: checking whether ${MAKE-make} sets \${MAKE}" >&5
     1032set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
    7481033if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
    7491034  echo $ac_n "(cached) $ac_c" 1>&6
     
    7731058set dummy ranlib; ac_word=$2
    7741059echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
     1060echo "configure:1061: checking for $ac_word" >&5
    7751061if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
    7761062  echo $ac_n "(cached) $ac_c" 1>&6
     
    8001086
    8011087echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
     1088echo "configure:1089: checking how to run the C preprocessor" >&5
    8021089# On Suns, sometimes $CPP names a directory.
    8031090if test -n "$CPP" && test -d "$CPP"; then
     
    8141101  # not just through cpp.
    8151102  cat > conftest.$ac_ext <<EOF
    816 #line 817 "configure"
     1103#line 1104 "configure"
    8171104#include "confdefs.h"
    8181105#include <assert.h>
    8191106Syntax Error
    8201107EOF
    821 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
     1108ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
     1109{ (eval echo configure:1110: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    8221110ac_err=`grep -v '^ *+' conftest.out`
    8231111if test -z "$ac_err"; then
     
    8251113else
    8261114  echo "$ac_err" >&5
     1115  echo "configure: failed program was:" >&5
     1116  cat conftest.$ac_ext >&5
    8271117  rm -rf conftest*
    8281118  CPP="${CC-cc} -E -traditional-cpp"
    8291119  cat > conftest.$ac_ext <<EOF
    830 #line 831 "configure"
     1120#line 1121 "configure"
    8311121#include "confdefs.h"
    8321122#include <assert.h>
    8331123Syntax Error
    8341124EOF
    835 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
     1125ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
     1126{ (eval echo configure:1127: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    8361127ac_err=`grep -v '^ *+' conftest.out`
    8371128if test -z "$ac_err"; then
     
    8391130else
    8401131  echo "$ac_err" >&5
     1132  echo "configure: failed program was:" >&5
     1133  cat conftest.$ac_ext >&5
    8411134  rm -rf conftest*
    8421135  CPP=/lib/cpp
     
    8541147
    8551148echo $ac_n "checking for AIX""... $ac_c" 1>&6
     1149echo "configure:1150: checking for AIX" >&5
    8561150cat > conftest.$ac_ext <<EOF
    857 #line 858 "configure"
     1151#line 1152 "configure"
    8581152#include "confdefs.h"
    8591153#ifdef _AIX
     
    8771171
    8781172echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
     1173echo "configure:1174: checking for POSIXized ISC" >&5
    8791174if test -d /etc/conf/kconfig.d &&
    8801175  grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
     
    8961191fi
    8971192
    898 ac_safe=`echo "minix/config.h" | tr './\055' '___'`
     1193ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
    8991194echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
     1195echo "configure:1196: checking for minix/config.h" >&5
    9001196if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    9011197  echo $ac_n "(cached) $ac_c" 1>&6
    9021198else
    9031199  cat > conftest.$ac_ext <<EOF
    904 #line 905 "configure"
     1200#line 1201 "configure"
    9051201#include "confdefs.h"
    9061202#include <minix/config.h>
    9071203EOF
    908 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
     1204ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
     1205{ (eval echo configure:1206: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    9091206ac_err=`grep -v '^ *+' conftest.out`
    9101207if test -z "$ac_err"; then
     
    9131210else
    9141211  echo "$ac_err" >&5
     1212  echo "configure: failed program was:" >&5
     1213  cat conftest.$ac_ext >&5
    9151214  rm -rf conftest*
    9161215  eval "ac_cv_header_$ac_safe=no"
     
    9421241
    9431242echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
     1243echo "configure:1244: checking for ${CC-cc} option to accept ANSI C" >&5
    9441244if eval "test \"`echo '$''{'ac_cv_prog_cc_stdc'+set}'`\" = set"; then
    9451245  echo $ac_n "(cached) $ac_c" 1>&6
     
    9571257  CFLAGS="$ac_save_CFLAGS $ac_arg"
    9581258  cat > conftest.$ac_ext <<EOF
    959 #line 960 "configure"
     1259#line 1260 "configure"
    9601260#include "confdefs.h"
    9611261#if !defined(__STDC__) || __STDC__ != 1
     
    9631263#endif 
    9641264
    965 int main() { return 0; }
    966 int t() {
     1265int main() {
    9671266int test (int i, double x);
    9681267struct s1 {int (*f) (int a);};
     
    9701269; return 0; }
    9711270EOF
    972 if eval $ac_compile; then
     1271if { (eval echo configure:1272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    9731272  rm -rf conftest*
    9741273  ac_cv_prog_cc_stdc="$ac_arg"; break
    975 fi
    976 rm -f conftest*
    977 
     1274else
     1275  echo "configure: failed program was:" >&5
     1276  cat conftest.$ac_ext >&5
     1277fi
     1278rm -f conftest*
    9781279done
    9791280CFLAGS="$ac_save_CFLAGS"
     
    9891290
    9901291echo $ac_n "checking for function prototypes""... $ac_c" 1>&6
     1292echo "configure:1293: checking for function prototypes" >&5
    9911293if test "$ac_cv_prog_cc_stdc" != no; then
    9921294  echo "$ac_t""yes" 1>&6
     
    10021304
    10031305echo $ac_n "checking for working const""... $ac_c" 1>&6
     1306echo "configure:1307: checking for working const" >&5
    10041307if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
    10051308  echo $ac_n "(cached) $ac_c" 1>&6
    10061309else
    10071310  cat > conftest.$ac_ext <<EOF
    1008 #line 1009 "configure"
    1009 #include "confdefs.h"
    1010 
    1011 int main() { return 0; }
    1012 int t() {
     1311#line 1312 "configure"
     1312#include "confdefs.h"
     1313
     1314int main() {
    10131315
    10141316/* Ultrix mips cc rejects this.  */
     
    10191321/* NEC SVR4.0.2 mips cc rejects this.  */
    10201322struct point {int x, y;};
    1021 static struct point const zero;
     1323static struct point const zero = {0,0};
    10221324/* AIX XL C 1.02.0.0 rejects this.
    10231325   It does not let you subtract one const X* pointer from another in an arm
     
    10561358; return 0; }
    10571359EOF
    1058 if eval $ac_compile; then
     1360if { (eval echo configure:1361: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    10591361  rm -rf conftest*
    10601362  ac_cv_c_const=yes
    10611363else
     1364  echo "configure: failed program was:" >&5
     1365  cat conftest.$ac_ext >&5
    10621366  rm -rf conftest*
    10631367  ac_cv_c_const=no
    10641368fi
    10651369rm -f conftest*
    1066 
    1067 fi
     1370fi
     1371
    10681372echo "$ac_t""$ac_cv_c_const" 1>&6
    10691373if test $ac_cv_c_const = no; then
     
    10741378fi
    10751379
    1076 # If we cannot run a trivial program, we must be cross compiling.
    1077 echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
    1078 if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
    1079   echo $ac_n "(cached) $ac_c" 1>&6
    1080 else
    1081   if test "$cross_compiling" = yes; then
    1082   ac_cv_c_cross=yes
    1083 else
    1084 cat > conftest.$ac_ext <<EOF
    1085 #line 1086 "configure"
    1086 #include "confdefs.h"
    1087 main(){return(0);}
    1088 EOF
    1089 eval $ac_link
    1090 if test -s conftest && (./conftest; exit) 2>/dev/null; then
    1091   ac_cv_c_cross=no
    1092 else
    1093   ac_cv_c_cross=yes
    1094 fi
    1095 fi
    1096 rm -fr conftest*
    1097 fi
    1098 cross_compiling=$ac_cv_c_cross
    1099 echo "$ac_t""$ac_cv_c_cross" 1>&6
    1100 
    11011380echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
     1381echo "configure:1382: checking for ANSI C header files" >&5
    11021382if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
    11031383  echo $ac_n "(cached) $ac_c" 1>&6
    11041384else
    11051385  cat > conftest.$ac_ext <<EOF
    1106 #line 1107 "configure"
     1386#line 1387 "configure"
    11071387#include "confdefs.h"
    11081388#include <stdlib.h>
     
    11111391#include <float.h>
    11121392EOF
    1113 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
     1393ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
     1394{ (eval echo configure:1395: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    11141395ac_err=`grep -v '^ *+' conftest.out`
    11151396if test -z "$ac_err"; then
     
    11181399else
    11191400  echo "$ac_err" >&5
     1401  echo "configure: failed program was:" >&5
     1402  cat conftest.$ac_ext >&5
    11201403  rm -rf conftest*
    11211404  ac_cv_header_stdc=no
     
    11261409  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
    11271410cat > conftest.$ac_ext <<EOF
    1128 #line 1129 "configure"
     1411#line 1412 "configure"
    11291412#include "confdefs.h"
    11301413#include <string.h>
     
    11441427  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
    11451428cat > conftest.$ac_ext <<EOF
    1146 #line 1147 "configure"
     1429#line 1430 "configure"
    11471430#include "confdefs.h"
    11481431#include <stdlib.h>
     
    11621445  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
    11631446if test "$cross_compiling" = yes; then
    1164   ac_cv_header_stdc=no
    1165 else
    1166 cat > conftest.$ac_ext <<EOF
    1167 #line 1168 "configure"
     1447  :
     1448else
     1449  cat > conftest.$ac_ext <<EOF
     1450#line 1451 "configure"
    11681451#include "confdefs.h"
    11691452#include <ctype.h>
     
    11761459
    11771460EOF
    1178 eval $ac_link
    1179 if test -s conftest && (./conftest; exit) 2>/dev/null; then
     1461if { (eval echo configure:1462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
     1462then
    11801463  :
    11811464else
     1465  echo "configure: failed program was:" >&5
     1466  cat conftest.$ac_ext >&5
     1467  rm -fr conftest*
    11821468  ac_cv_header_stdc=no
    11831469fi
    1184 fi
    11851470rm -fr conftest*
    11861471fi
    1187 fi
     1472
     1473fi
     1474fi
     1475
    11881476echo "$ac_t""$ac_cv_header_stdc" 1>&6
    11891477if test $ac_cv_header_stdc = yes; then
     
    11951483
    11961484echo $ac_n "checking for off_t""... $ac_c" 1>&6
     1485echo "configure:1486: checking for off_t" >&5
    11971486if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
    11981487  echo $ac_n "(cached) $ac_c" 1>&6
    11991488else
    12001489  cat > conftest.$ac_ext <<EOF
    1201 #line 1202 "configure"
     1490#line 1491 "configure"
    12021491#include "confdefs.h"
    12031492#include <sys/types.h>
    12041493#if STDC_HEADERS
    12051494#include <stdlib.h>
     1495#include <stddef.h>
    12061496#endif
    12071497EOF
    12081498if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
    1209   egrep "off_t" >/dev/null 2>&1; then
     1499  egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
    12101500  rm -rf conftest*
    12111501  ac_cv_type_off_t=yes
     
    12261516
    12271517echo $ac_n "checking for size_t""... $ac_c" 1>&6
     1518echo "configure:1519: checking for size_t" >&5
    12281519if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
    12291520  echo $ac_n "(cached) $ac_c" 1>&6
    12301521else
    12311522  cat > conftest.$ac_ext <<EOF
    1232 #line 1233 "configure"
     1523#line 1524 "configure"
    12331524#include "confdefs.h"
    12341525#include <sys/types.h>
    12351526#if STDC_HEADERS
    12361527#include <stdlib.h>
     1528#include <stddef.h>
    12371529#endif
    12381530EOF
    12391531if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
    1240   egrep "size_t" >/dev/null 2>&1; then
     1532  egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
    12411533  rm -rf conftest*
    12421534  ac_cv_type_size_t=yes
     
    12571549
    12581550echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
     1551echo "configure:1552: checking whether time.h and sys/time.h may both be included" >&5
    12591552if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
    12601553  echo $ac_n "(cached) $ac_c" 1>&6
    12611554else
    12621555  cat > conftest.$ac_ext <<EOF
    1263 #line 1264 "configure"
     1556#line 1557 "configure"
    12641557#include "confdefs.h"
    12651558#include <sys/types.h>
    12661559#include <sys/time.h>
    12671560#include <time.h>
    1268 int main() { return 0; }
    1269 int t() {
     1561int main() {
    12701562struct tm *tp;
    12711563; return 0; }
    12721564EOF
    1273 if eval $ac_compile; then
     1565if { (eval echo configure:1566: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    12741566  rm -rf conftest*
    12751567  ac_cv_header_time=yes
    12761568else
     1569  echo "configure: failed program was:" >&5
     1570  cat conftest.$ac_ext >&5
    12771571  rm -rf conftest*
    12781572  ac_cv_header_time=no
    12791573fi
    12801574rm -f conftest*
    1281 
    1282 fi
     1575fi
     1576
    12831577echo "$ac_t""$ac_cv_header_time" 1>&6
    12841578if test $ac_cv_header_time = yes; then
     
    12901584
    12911585echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
     1586echo "configure:1587: checking whether struct tm is in sys/time.h or time.h" >&5
    12921587if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
    12931588  echo $ac_n "(cached) $ac_c" 1>&6
    12941589else
    12951590  cat > conftest.$ac_ext <<EOF
    1296 #line 1297 "configure"
     1591#line 1592 "configure"
    12971592#include "confdefs.h"
    12981593#include <sys/types.h>
    12991594#include <time.h>
    1300 int main() { return 0; }
    1301 int t() {
     1595int main() {
    13021596struct tm *tp; tp->tm_sec;
    13031597; return 0; }
    13041598EOF
    1305 if eval $ac_compile; then
     1599if { (eval echo configure:1600: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    13061600  rm -rf conftest*
    13071601  ac_cv_struct_tm=time.h
    13081602else
     1603  echo "configure: failed program was:" >&5
     1604  cat conftest.$ac_ext >&5
    13091605  rm -rf conftest*
    13101606  ac_cv_struct_tm=sys/time.h
    13111607fi
    13121608rm -f conftest*
    1313 
    1314 fi
     1609fi
     1610
    13151611echo "$ac_t""$ac_cv_struct_tm" 1>&6
    13161612if test $ac_cv_struct_tm = sys/time.h; then
     
    13241620if test "$ac_cv_prog_cc_stdc" = '-Xc'; then
    13251621cat > conftest.$ac_ext <<EOF
    1326 #line 1327 "configure"
     1622#line 1623 "configure"
    13271623#include "confdefs.h"
    13281624#include <stdio.h>
    13291625
    1330 int main() { return 0; }
    1331 int t() {
     1626int main() {
    13321627 FILE *rubbish = popen("yes", "r");
    13331628; return 0; }
    13341629EOF
    1335 if eval $ac_compile; then
     1630if { (eval echo configure:1631: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    13361631  :
    13371632else
     1633  echo "configure: failed program was:" >&5
     1634  cat conftest.$ac_ext >&5
    13381635  rm -rf conftest*
    13391636  CC="`echo $CC | sed 's/-Xc/-Xa/'`"    ac_cv_prog_cc_stdc='-Xa'
    13401637fi
    13411638rm -f conftest*
    1342 
    1343 fi
    1344 
    1345 
    1346 echo $ac_n "checking for -lm""... $ac_c" 1>&6
    1347 if eval "test \"`echo '$''{'ac_cv_lib_m'+set}'`\" = set"; then
     1639fi
     1640
     1641
     1642echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
     1643echo "configure:1644: checking for main in -lm" >&5
     1644ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
     1645if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    13481646  echo $ac_n "(cached) $ac_c" 1>&6
    13491647else
     
    13511649LIBS="-lm  $LIBS"
    13521650cat > conftest.$ac_ext <<EOF
    1353 #line 1354 "configure"
    1354 #include "confdefs.h"
    1355 
    1356 int main() { return 0; }
    1357 int t() {
     1651#line 1652 "configure"
     1652#include "confdefs.h"
     1653
     1654int main() {
    13581655main()
    13591656; return 0; }
    13601657EOF
    1361 if eval $ac_link; then
    1362   rm -rf conftest*
    1363   eval "ac_cv_lib_m=yes"
    1364 else
    1365   rm -rf conftest*
    1366   eval "ac_cv_lib_m=no"
     1658if { (eval echo configure:1659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
     1659  rm -rf conftest*
     1660  eval "ac_cv_lib_$ac_lib_var=yes"
     1661else
     1662  echo "configure: failed program was:" >&5
     1663  cat conftest.$ac_ext >&5
     1664  rm -rf conftest*
     1665  eval "ac_cv_lib_$ac_lib_var=no"
    13671666fi
    13681667rm -f conftest*
     
    13701669
    13711670fi
    1372 if eval "test \"`echo '$ac_cv_lib_'m`\" = yes"; then
     1671if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
    13731672  echo "$ac_t""yes" 1>&6
    1374     ac_tr_lib=HAVE_LIB`echo m | tr '[a-z]' '[A-Z]'`
     1673    ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
     1674    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
    13751675  cat >> confdefs.h <<EOF
    13761676#define $ac_tr_lib 1
     
    13871687for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
    13881688do
    1389 ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
     1689ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
    13901690echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
     1691echo "configure:1692: checking for $ac_hdr that defines DIR" >&5
    13911692if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
    13921693  echo $ac_n "(cached) $ac_c" 1>&6
    13931694else
    13941695  cat > conftest.$ac_ext <<EOF
    1395 #line 1396 "configure"
     1696#line 1697 "configure"
    13961697#include "confdefs.h"
    13971698#include <sys/types.h>
    13981699#include <$ac_hdr>
    1399 int main() { return 0; }
    1400 int t() {
     1700int main() {
    14011701DIR *dirp = 0;
    14021702; return 0; }
    14031703EOF
    1404 if eval $ac_compile; then
     1704if { (eval echo configure:1705: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    14051705  rm -rf conftest*
    14061706  eval "ac_cv_header_dirent_$ac_safe=yes"
    14071707else
     1708  echo "configure: failed program was:" >&5
     1709  cat conftest.$ac_ext >&5
    14081710  rm -rf conftest*
    14091711  eval "ac_cv_header_dirent_$ac_safe=no"
    14101712fi
    14111713rm -f conftest*
    1412 
    14131714fi
    14141715if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
    14151716  echo "$ac_t""yes" 1>&6
    1416     ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'`
     1717    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
    14171718  cat >> confdefs.h <<EOF
    14181719#define $ac_tr_hdr 1
     
    14251726# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
    14261727if test $ac_header_dirent = dirent.h; then
    1427 echo $ac_n "checking for -ldir""... $ac_c" 1>&6
    1428 if eval "test \"`echo '$''{'ac_cv_lib_dir'+set}'`\" = set"; then
     1728echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
     1729echo "configure:1730: checking for opendir in -ldir" >&5
     1730ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
     1731if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    14291732  echo $ac_n "(cached) $ac_c" 1>&6
    14301733else
     
    14321735LIBS="-ldir  $LIBS"
    14331736cat > conftest.$ac_ext <<EOF
    1434 #line 1435 "configure"
    1435 #include "confdefs.h"
    1436 
    1437 int main() { return 0; }
    1438 int t() {
     1737#line 1738 "configure"
     1738#include "confdefs.h"
     1739/* Override any gcc2 internal prototype to avoid an error.  */
     1740/* We use char because int might match the return type of a gcc2
     1741    builtin and then its argument prototype would still apply.  */
     1742char opendir();
     1743
     1744int main() {
    14391745opendir()
    14401746; return 0; }
    14411747EOF
    1442 if eval $ac_link; then
    1443   rm -rf conftest*
    1444   eval "ac_cv_lib_dir=yes"
    1445 else
    1446   rm -rf conftest*
    1447   eval "ac_cv_lib_dir=no"
     1748if { (eval echo configure:1749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
     1749  rm -rf conftest*
     1750  eval "ac_cv_lib_$ac_lib_var=yes"
     1751else
     1752  echo "configure: failed program was:" >&5
     1753  cat conftest.$ac_ext >&5
     1754  rm -rf conftest*
     1755  eval "ac_cv_lib_$ac_lib_var=no"
    14481756fi
    14491757rm -f conftest*
     
    14511759
    14521760fi
    1453 if eval "test \"`echo '$ac_cv_lib_'dir`\" = yes"; then
     1761if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
    14541762  echo "$ac_t""yes" 1>&6
    14551763  LIBS="$LIBS -ldir"
     
    14591767
    14601768else
    1461 echo $ac_n "checking for -lx""... $ac_c" 1>&6
    1462 if eval "test \"`echo '$''{'ac_cv_lib_x'+set}'`\" = set"; then
     1769echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
     1770echo "configure:1771: checking for opendir in -lx" >&5
     1771ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
     1772if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    14631773  echo $ac_n "(cached) $ac_c" 1>&6
    14641774else
     
    14661776LIBS="-lx  $LIBS"
    14671777cat > conftest.$ac_ext <<EOF
    1468 #line 1469 "configure"
    1469 #include "confdefs.h"
    1470 
    1471 int main() { return 0; }
    1472 int t() {
     1778#line 1779 "configure"
     1779#include "confdefs.h"
     1780/* Override any gcc2 internal prototype to avoid an error.  */
     1781/* We use char because int might match the return type of a gcc2
     1782    builtin and then its argument prototype would still apply.  */
     1783char opendir();
     1784
     1785int main() {
    14731786opendir()
    14741787; return 0; }
    14751788EOF
    1476 if eval $ac_link; then
    1477   rm -rf conftest*
    1478   eval "ac_cv_lib_x=yes"
    1479 else
    1480   rm -rf conftest*
    1481   eval "ac_cv_lib_x=no"
     1789if { (eval echo configure:1790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
     1790  rm -rf conftest*
     1791  eval "ac_cv_lib_$ac_lib_var=yes"
     1792else
     1793  echo "configure: failed program was:" >&5
     1794  cat conftest.$ac_ext >&5
     1795  rm -rf conftest*
     1796  eval "ac_cv_lib_$ac_lib_var=no"
    14821797fi
    14831798rm -f conftest*
     
    14851800
    14861801fi
    1487 if eval "test \"`echo '$ac_cv_lib_'x`\" = yes"; then
     1802if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
    14881803  echo "$ac_t""yes" 1>&6
    14891804  LIBS="$LIBS -lx"
     
    14951810
    14961811echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
     1812echo "configure:1813: checking for ANSI C header files" >&5
    14971813if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
    14981814  echo $ac_n "(cached) $ac_c" 1>&6
    14991815else
    15001816  cat > conftest.$ac_ext <<EOF
    1501 #line 1502 "configure"
     1817#line 1818 "configure"
    15021818#include "confdefs.h"
    15031819#include <stdlib.h>
     
    15061822#include <float.h>
    15071823EOF
    1508 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
     1824ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
     1825{ (eval echo configure:1826: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    15091826ac_err=`grep -v '^ *+' conftest.out`
    15101827if test -z "$ac_err"; then
     
    15131830else
    15141831  echo "$ac_err" >&5
     1832  echo "configure: failed program was:" >&5
     1833  cat conftest.$ac_ext >&5
    15151834  rm -rf conftest*
    15161835  ac_cv_header_stdc=no
     
    15211840  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
    15221841cat > conftest.$ac_ext <<EOF
    1523 #line 1524 "configure"
     1842#line 1843 "configure"
    15241843#include "confdefs.h"
    15251844#include <string.h>
     
    15391858  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
    15401859cat > conftest.$ac_ext <<EOF
    1541 #line 1542 "configure"
     1860#line 1861 "configure"
    15421861#include "confdefs.h"
    15431862#include <stdlib.h>
     
    15571876  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
    15581877if test "$cross_compiling" = yes; then
    1559   ac_cv_header_stdc=no
    1560 else
    1561 cat > conftest.$ac_ext <<EOF
    1562 #line 1563 "configure"
     1878  :
     1879else
     1880  cat > conftest.$ac_ext <<EOF
     1881#line 1882 "configure"
    15631882#include "confdefs.h"
    15641883#include <ctype.h>
     
    15711890
    15721891EOF
    1573 eval $ac_link
    1574 if test -s conftest && (./conftest; exit) 2>/dev/null; then
     1892if { (eval echo configure:1893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
     1893then
    15751894  :
    15761895else
     1896  echo "configure: failed program was:" >&5
     1897  cat conftest.$ac_ext >&5
     1898  rm -fr conftest*
    15771899  ac_cv_header_stdc=no
    15781900fi
    1579 fi
    15801901rm -fr conftest*
    15811902fi
    1582 fi
     1903
     1904fi
     1905fi
     1906
    15831907echo "$ac_t""$ac_cv_header_stdc" 1>&6
    15841908if test $ac_cv_header_stdc = yes; then
     
    15911915for ac_hdr in fcntl.h limits.h sys/time.h unistd.h string.h memory.h sys/procfs.h
    15921916do
    1593 ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
     1917ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
    15941918echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
     1919echo "configure:1920: checking for $ac_hdr" >&5
    15951920if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    15961921  echo $ac_n "(cached) $ac_c" 1>&6
    15971922else
    15981923  cat > conftest.$ac_ext <<EOF
    1599 #line 1600 "configure"
     1924#line 1925 "configure"
    16001925#include "confdefs.h"
    16011926#include <$ac_hdr>
    16021927EOF
    1603 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
     1928ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
     1929{ (eval echo configure:1930: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    16041930ac_err=`grep -v '^ *+' conftest.out`
    16051931if test -z "$ac_err"; then
     
    16081934else
    16091935  echo "$ac_err" >&5
     1936  echo "configure: failed program was:" >&5
     1937  cat conftest.$ac_ext >&5
    16101938  rm -rf conftest*
    16111939  eval "ac_cv_header_$ac_safe=no"
     
    16151943if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
    16161944  echo "$ac_t""yes" 1>&6
    1617     ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'`
     1945    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
    16181946  cat >> confdefs.h <<EOF
    16191947#define $ac_tr_hdr 1
     
    16261954
    16271955cat > conftest.$ac_ext <<EOF
    1628 #line 1629 "configure"
     1956#line 1957 "configure"
    16291957#include "confdefs.h"
    16301958#include <stdio.h>
     
    16411969
    16421970cat > conftest.$ac_ext <<EOF
    1643 #line 1644 "configure"
     1971#line 1972 "configure"
    16441972#include "confdefs.h"
    16451973#include <stdio.h>
     
    16561984
    16571985cat > conftest.$ac_ext <<EOF
    1658 #line 1659 "configure"
     1986#line 1987 "configure"
    16591987#include "confdefs.h"
    16601988#include <sys/procfs.h>
     
    16742002# for constant arguments.  Useless!
    16752003echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
     2004echo "configure:2005: checking for working alloca.h" >&5
    16762005if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
    16772006  echo $ac_n "(cached) $ac_c" 1>&6
    16782007else
    16792008  cat > conftest.$ac_ext <<EOF
    1680 #line 1681 "configure"
     2009#line 2010 "configure"
    16812010#include "confdefs.h"
    16822011#include <alloca.h>
    1683 int main() { return 0; }
    1684 int t() {
     2012int main() {
    16852013char *p = alloca(2 * sizeof(int));
    16862014; return 0; }
    16872015EOF
    1688 if eval $ac_link; then
     2016if { (eval echo configure:2017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    16892017  rm -rf conftest*
    16902018  ac_cv_header_alloca_h=yes
    16912019else
     2020  echo "configure: failed program was:" >&5
     2021  cat conftest.$ac_ext >&5
    16922022  rm -rf conftest*
    16932023  ac_cv_header_alloca_h=no
    16942024fi
    16952025rm -f conftest*
    1696 
    1697 fi
     2026fi
     2027
    16982028echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
    16992029if test $ac_cv_header_alloca_h = yes; then
     
    17052035
    17062036echo $ac_n "checking for alloca""... $ac_c" 1>&6
    1707 if eval "test \"`echo '$''{'ac_cv_func_alloca'+set}'`\" = set"; then
     2037echo "configure:2038: checking for alloca" >&5
     2038if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
    17082039  echo $ac_n "(cached) $ac_c" 1>&6
    17092040else
    17102041  cat > conftest.$ac_ext <<EOF
    1711 #line 1712 "configure"
     2042#line 2043 "configure"
    17122043#include "confdefs.h"
    17132044
     
    17282059#endif
    17292060
    1730 int main() { return 0; }
    1731 int t() {
     2061int main() {
    17322062char *p = (char *) alloca(1);
    17332063; return 0; }
    17342064EOF
    1735 if eval $ac_link; then
    1736   rm -rf conftest*
    1737   ac_cv_func_alloca=yes
    1738 else
    1739   rm -rf conftest*
    1740   ac_cv_func_alloca=no
    1741 fi
    1742 rm -f conftest*
    1743 
    1744 fi
    1745 echo "$ac_t""$ac_cv_func_alloca" 1>&6
    1746 if test $ac_cv_func_alloca = yes; then
     2065if { (eval echo configure:2066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
     2066  rm -rf conftest*
     2067  ac_cv_func_alloca_works=yes
     2068else
     2069  echo "configure: failed program was:" >&5
     2070  cat conftest.$ac_ext >&5
     2071  rm -rf conftest*
     2072  ac_cv_func_alloca_works=no
     2073fi
     2074rm -f conftest*
     2075fi
     2076
     2077echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
     2078if test $ac_cv_func_alloca_works = yes; then
    17472079  cat >> confdefs.h <<\EOF
    17482080#define HAVE_ALLOCA 1
     
    17512083fi
    17522084
    1753 if test $ac_cv_func_alloca = no; then
     2085if test $ac_cv_func_alloca_works = no; then
    17542086  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
    17552087  # that cause trouble.  Some versions do not even contain alloca or
     
    17632095
    17642096echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
     2097echo "configure:2098: checking whether alloca needs Cray hooks" >&5
    17652098if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
    17662099  echo $ac_n "(cached) $ac_c" 1>&6
    17672100else
    17682101  cat > conftest.$ac_ext <<EOF
    1769 #line 1770 "configure"
     2102#line 2103 "configure"
    17702103#include "confdefs.h"
    17712104#if defined(CRAY) && ! defined(CRAY2)
     
    17872120
    17882121fi
     2122
    17892123echo "$ac_t""$ac_cv_os_cray" 1>&6
    17902124if test $ac_cv_os_cray = yes; then
    17912125for ac_func in _getb67 GETB67 getb67; do
    17922126  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
     2127echo "configure:2128: checking for $ac_func" >&5
    17932128if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    17942129  echo $ac_n "(cached) $ac_c" 1>&6
    17952130else
    17962131  cat > conftest.$ac_ext <<EOF
    1797 #line 1798 "configure"
     2132#line 2133 "configure"
    17982133#include "confdefs.h"
    17992134/* System header to define __stub macros and hopefully few prototypes,
     
    18012136#include <assert.h>
    18022137/* Override any gcc2 internal prototype to avoid an error.  */
    1803 char $ac_func();
    1804 
    1805 int main() { return 0; }
    1806 int t() {
     2138/* We use char because int might match the return type of a gcc2
     2139    builtin and then its argument prototype would still apply.  */
     2140char $ac_func();
     2141
     2142int main() {
    18072143
    18082144/* The GNU C library defines this for functions which it implements
     
    18172153; return 0; }
    18182154EOF
    1819 if eval $ac_link; then
     2155if { (eval echo configure:2156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    18202156  rm -rf conftest*
    18212157  eval "ac_cv_func_$ac_func=yes"
    18222158else
     2159  echo "configure: failed program was:" >&5
     2160  cat conftest.$ac_ext >&5
    18232161  rm -rf conftest*
    18242162  eval "ac_cv_func_$ac_func=no"
    18252163fi
    18262164rm -f conftest*
    1827 
    1828 fi
     2165fi
     2166
    18292167if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
    18302168  echo "$ac_t""yes" 1>&6
     
    18422180
    18432181echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
     2182echo "configure:2183: checking stack direction for C alloca" >&5
    18442183if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
    18452184  echo $ac_n "(cached) $ac_c" 1>&6
     
    18482187  ac_cv_c_stack_direction=0
    18492188else
    1850 cat > conftest.$ac_ext <<EOF
    1851 #line 1852 "configure"
     2189  cat > conftest.$ac_ext <<EOF
     2190#line 2191 "configure"
    18522191#include "confdefs.h"
    18532192find_stack_direction ()
     
    18682207}
    18692208EOF
    1870 eval $ac_link
    1871 if test -s conftest && (./conftest; exit) 2>/dev/null; then
     2209if { (eval echo configure:2210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
     2210then
    18722211  ac_cv_c_stack_direction=1
    18732212else
     2213  echo "configure: failed program was:" >&5
     2214  cat conftest.$ac_ext >&5
     2215  rm -fr conftest*
    18742216  ac_cv_c_stack_direction=-1
    18752217fi
    1876 fi
    18772218rm -fr conftest*
    18782219fi
     2220
     2221fi
     2222
    18792223echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
    18802224cat >> confdefs.h <<EOF
     
    18852229
    18862230if test $ac_cv_prog_gcc = yes; then
    1887   echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
     2231    echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
     2232echo "configure:2233: checking whether ${CC-cc} needs -traditional" >&5
    18882233if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
    18892234  echo $ac_n "(cached) $ac_c" 1>&6
     
    18912236    ac_pattern="Autoconf.*'x'"
    18922237  cat > conftest.$ac_ext <<EOF
    1893 #line 1894 "configure"
     2238#line 2239 "configure"
    18942239#include "confdefs.h"
    18952240#include <sgtty.h>
     
    19092254  if test $ac_cv_prog_gcc_traditional = no; then
    19102255    cat > conftest.$ac_ext <<EOF
    1911 #line 1912 "configure"
     2256#line 2257 "configure"
    19122257#include "confdefs.h"
    19132258#include <termio.h>
     
    19232268  fi
    19242269fi
    1925   echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
     2270
     2271echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
    19262272  if test $ac_cv_prog_gcc_traditional = yes; then
    19272273    CC="$CC -traditional"
     
    19302276
    19312277echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
     2278echo "configure:2279: checking return type of signal handlers" >&5
    19322279if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
    19332280  echo $ac_n "(cached) $ac_c" 1>&6
    19342281else
    19352282  cat > conftest.$ac_ext <<EOF
    1936 #line 1937 "configure"
     2283#line 2284 "configure"
    19372284#include "confdefs.h"
    19382285#include <sys/types.h>
     
    19422289#endif
    19432290#ifdef __cplusplus
    1944 extern "C"
     2291extern "C" void (*signal (int, void (*)(int)))(int);
     2292#else
     2293void (*signal ()) ();
    19452294#endif
    1946 void (*signal ()) ();
    1947 int main() { return 0; }
    1948 int t() {
     2295
     2296int main() {
    19492297int i;
    19502298; return 0; }
    19512299EOF
    1952 if eval $ac_compile; then
     2300if { (eval echo configure:2301: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    19532301  rm -rf conftest*
    19542302  ac_cv_type_signal=void
    19552303else
     2304  echo "configure: failed program was:" >&5
     2305  cat conftest.$ac_ext >&5
    19562306  rm -rf conftest*
    19572307  ac_cv_type_signal=int
    19582308fi
    19592309rm -f conftest*
    1960 
    1961 fi
     2310fi
     2311
    19622312echo "$ac_t""$ac_cv_type_signal" 1>&6
    19632313cat >> confdefs.h <<EOF
     
    19672317
    19682318echo $ac_n "checking for vprintf""... $ac_c" 1>&6
     2319echo "configure:2320: checking for vprintf" >&5
    19692320if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
    19702321  echo $ac_n "(cached) $ac_c" 1>&6
    19712322else
    19722323  cat > conftest.$ac_ext <<EOF
    1973 #line 1974 "configure"
     2324#line 2325 "configure"
    19742325#include "confdefs.h"
    19752326/* System header to define __stub macros and hopefully few prototypes,
     
    19772328#include <assert.h>
    19782329/* Override any gcc2 internal prototype to avoid an error.  */
    1979 char vprintf();
    1980 
    1981 int main() { return 0; }
    1982 int t() {
     2330/* We use char because int might match the return type of a gcc2
     2331    builtin and then its argument prototype would still apply.  */
     2332char vprintf();
     2333
     2334int main() {
    19832335
    19842336/* The GNU C library defines this for functions which it implements
     
    19932345; return 0; }
    19942346EOF
    1995 if eval $ac_link; then
     2347if { (eval echo configure:2348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    19962348  rm -rf conftest*
    19972349  eval "ac_cv_func_vprintf=yes"
    19982350else
     2351  echo "configure: failed program was:" >&5
     2352  cat conftest.$ac_ext >&5
    19992353  rm -rf conftest*
    20002354  eval "ac_cv_func_vprintf=no"
    20012355fi
    20022356rm -f conftest*
    2003 
    2004 fi
     2357fi
     2358
    20052359if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
    20062360  echo "$ac_t""yes" 1>&6
     
    20152369if test "$ac_cv_func_vprintf" != yes; then
    20162370echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
     2371echo "configure:2372: checking for _doprnt" >&5
    20172372if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
    20182373  echo $ac_n "(cached) $ac_c" 1>&6
    20192374else
    20202375  cat > conftest.$ac_ext <<EOF
    2021 #line 2022 "configure"
     2376#line 2377 "configure"
    20222377#include "confdefs.h"
    20232378/* System header to define __stub macros and hopefully few prototypes,
     
    20252380#include <assert.h>
    20262381/* Override any gcc2 internal prototype to avoid an error.  */
    2027 char _doprnt();
    2028 
    2029 int main() { return 0; }
    2030 int t() {
     2382/* We use char because int might match the return type of a gcc2
     2383    builtin and then its argument prototype would still apply.  */
     2384char _doprnt();
     2385
     2386int main() {
    20312387
    20322388/* The GNU C library defines this for functions which it implements
     
    20412397; return 0; }
    20422398EOF
    2043 if eval $ac_link; then
     2399if { (eval echo configure:2400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    20442400  rm -rf conftest*
    20452401  eval "ac_cv_func__doprnt=yes"
    20462402else
     2403  echo "configure: failed program was:" >&5
     2404  cat conftest.$ac_ext >&5
    20472405  rm -rf conftest*
    20482406  eval "ac_cv_func__doprnt=no"
    20492407fi
    20502408rm -f conftest*
    2051 
    2052 fi
     2409fi
     2410
    20532411if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
    20542412  echo "$ac_t""yes" 1>&6
     
    20662424do
    20672425echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
     2426echo "configure:2427: checking for $ac_func" >&5
    20682427if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    20692428  echo $ac_n "(cached) $ac_c" 1>&6
    20702429else
    20712430  cat > conftest.$ac_ext <<EOF
    2072 #line 2073 "configure"
     2431#line 2432 "configure"
    20732432#include "confdefs.h"
    20742433/* System header to define __stub macros and hopefully few prototypes,
     
    20762435#include <assert.h>
    20772436/* Override any gcc2 internal prototype to avoid an error.  */
    2078 char $ac_func();
    2079 
    2080 int main() { return 0; }
    2081 int t() {
     2437/* We use char because int might match the return type of a gcc2
     2438    builtin and then its argument prototype would still apply.  */
     2439char $ac_func();
     2440
     2441int main() {
    20822442
    20832443/* The GNU C library defines this for functions which it implements
     
    20922452; return 0; }
    20932453EOF
    2094 if eval $ac_link; then
     2454if { (eval echo configure:2455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    20952455  rm -rf conftest*
    20962456  eval "ac_cv_func_$ac_func=yes"
    20972457else
     2458  echo "configure: failed program was:" >&5
     2459  cat conftest.$ac_ext >&5
    20982460  rm -rf conftest*
    20992461  eval "ac_cv_func_$ac_func=no"
    21002462fi
    21012463rm -f conftest*
    2102 
    2103 fi
     2464fi
     2465
    21042466if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
    21052467  echo "$ac_t""yes" 1>&6
    2106     ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
     2468    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
    21072469  cat >> confdefs.h <<EOF
    21082470#define $ac_tr_func 1
     
    21172479do
    21182480echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
     2481echo "configure:2482: checking for $ac_func" >&5
    21192482if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    21202483  echo $ac_n "(cached) $ac_c" 1>&6
    21212484else
    21222485  cat > conftest.$ac_ext <<EOF
    2123 #line 2124 "configure"
     2486#line 2487 "configure"
    21242487#include "confdefs.h"
    21252488/* System header to define __stub macros and hopefully few prototypes,
     
    21272490#include <assert.h>
    21282491/* Override any gcc2 internal prototype to avoid an error.  */
    2129 char $ac_func();
    2130 
    2131 int main() { return 0; }
    2132 int t() {
     2492/* We use char because int might match the return type of a gcc2
     2493    builtin and then its argument prototype would still apply.  */
     2494char $ac_func();
     2495
     2496int main() {
    21332497
    21342498/* The GNU C library defines this for functions which it implements
     
    21432507; return 0; }
    21442508EOF
    2145 if eval $ac_link; then
     2509if { (eval echo configure:2510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    21462510  rm -rf conftest*
    21472511  eval "ac_cv_func_$ac_func=yes"
    21482512else
     2513  echo "configure: failed program was:" >&5
     2514  cat conftest.$ac_ext >&5
    21492515  rm -rf conftest*
    21502516  eval "ac_cv_func_$ac_func=no"
    21512517fi
    21522518rm -f conftest*
    2153 
    2154 fi
     2519fi
     2520
    21552521if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
    21562522  echo "$ac_t""yes" 1>&6
    2157   :
     2523    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
     2524  cat >> confdefs.h <<EOF
     2525#define $ac_tr_func 1
     2526EOF
     2527 
    21582528else
    21592529  echo "$ac_t""no" 1>&6
    21602530LIBOBJS="$LIBOBJS ${ac_func}.o"
    21612531fi
    2162 
    21632532done
     2533
    21642534
    21652535
     
    21682538# ---------------------------------------------------------------------------
    21692539echo $ac_n "checking for HP-UX needing gmalloc""... $ac_c" 1>&6
     2540echo "configure:2541: checking for HP-UX needing gmalloc" >&5
    21702541if test "`(uname -s) 2> /dev/null`" = 'HP-UX'; then
    21712542  echo "$ac_t""yes" 1>&6
     
    21802551do
    21812552echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
     2553echo "configure:2554: checking for $ac_func" >&5
    21822554if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    21832555  echo $ac_n "(cached) $ac_c" 1>&6
    21842556else
    21852557  cat > conftest.$ac_ext <<EOF
    2186 #line 2187 "configure"
     2558#line 2559 "configure"
    21872559#include "confdefs.h"
    21882560/* System header to define __stub macros and hopefully few prototypes,
     
    21902562#include <assert.h>
    21912563/* Override any gcc2 internal prototype to avoid an error.  */
    2192 char $ac_func();
    2193 
    2194 int main() { return 0; }
    2195 int t() {
     2564/* We use char because int might match the return type of a gcc2
     2565    builtin and then its argument prototype would still apply.  */
     2566char $ac_func();
     2567
     2568int main() {
    21962569
    21972570/* The GNU C library defines this for functions which it implements
     
    22062579; return 0; }
    22072580EOF
    2208 if eval $ac_link; then
     2581if { (eval echo configure:2582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    22092582  rm -rf conftest*
    22102583  eval "ac_cv_func_$ac_func=yes"
    22112584else
     2585  echo "configure: failed program was:" >&5
     2586  cat conftest.$ac_ext >&5
    22122587  rm -rf conftest*
    22132588  eval "ac_cv_func_$ac_func=no"
    22142589fi
    22152590rm -f conftest*
    2216 
    2217 fi
     2591fi
     2592
    22182593if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
    22192594  echo "$ac_t""yes" 1>&6
    2220     ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
     2595    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
    22212596  cat >> confdefs.h <<EOF
    22222597#define $ac_tr_func 1
     
    22312606
    22322607echo $ac_n "checking if malloc debugging is wanted""... $ac_c" 1>&6
     2608echo "configure:2609: checking if malloc debugging is wanted" >&5
    22332609# Check whether --with-dmalloc or --without-dmalloc was given.
    2234 withval="$with_dmalloc"
    2235 if test -n "$withval"; then
     2610if test "${with_dmalloc+set}" = set; then
     2611  withval="$with_dmalloc"
    22362612  if test "$withval" = yes; then
    22372613  echo "$ac_t""yes" 1>&6
     
    22512627
    22522628echo $ac_n "checking which of rx or regex is wanted""... $ac_c" 1>&6
     2629echo "configure:2630: checking which of rx or regex is wanted" >&5
    22532630# Check whether --with-regex or --without-regex was given.
    2254 withval="$with_regex"
    2255 if test -n "$withval"; then
     2631if test "${with_regex+set}" = set; then
     2632  withval="$with_regex"
    22562633  if test "$withval" = yes; then
    22572634  ac_with_regex=1
     
    22682645  echo "$ac_t""rx" 1>&6
    22692646  echo $ac_n "checking for re_rx_search""... $ac_c" 1>&6
     2647echo "configure:2648: checking for re_rx_search" >&5
    22702648if eval "test \"`echo '$''{'ac_cv_func_re_rx_search'+set}'`\" = set"; then
    22712649  echo $ac_n "(cached) $ac_c" 1>&6
    22722650else
    22732651  cat > conftest.$ac_ext <<EOF
    2274 #line 2275 "configure"
     2652#line 2653 "configure"
    22752653#include "confdefs.h"
    22762654/* System header to define __stub macros and hopefully few prototypes,
     
    22782656#include <assert.h>
    22792657/* Override any gcc2 internal prototype to avoid an error.  */
    2280 char re_rx_search();
    2281 
    2282 int main() { return 0; }
    2283 int t() {
     2658/* We use char because int might match the return type of a gcc2
     2659    builtin and then its argument prototype would still apply.  */
     2660char re_rx_search();
     2661
     2662int main() {
    22842663
    22852664/* The GNU C library defines this for functions which it implements
     
    22942673; return 0; }
    22952674EOF
    2296 if eval $ac_link; then
     2675if { (eval echo configure:2676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    22972676  rm -rf conftest*
    22982677  eval "ac_cv_func_re_rx_search=yes"
    22992678else
     2679  echo "configure: failed program was:" >&5
     2680  cat conftest.$ac_ext >&5
    23002681  rm -rf conftest*
    23012682  eval "ac_cv_func_re_rx_search=no"
    23022683fi
    23032684rm -f conftest*
    2304 
    2305 fi
     2685fi
     2686
    23062687if eval "test \"`echo '$ac_cv_func_'re_rx_search`\" = yes"; then
    23072688  echo "$ac_t""yes" 1>&6
     
    23402721#
    23412722EOF
     2723# The following way of writing the cache mishandles newlines in values,
     2724# but we know of no workaround that is simple, portable, and efficient.
     2725# So, don't put newlines in cache variables' values.
    23422726# Ultrix sh set writes to stderr and can't be redirected directly,
    23432727# and sets the high bit in the cache file unless we assign to the vars.
    23442728(set) 2>&1 |
    2345   sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
    2346   >> confcache
     2729  case `(ac_space=' '; set) 2>&1` in
     2730  *ac_space=\ *)
     2731    # `set' does not quote correctly, so add quotes (double-quote substitution
     2732    # turns \\\\ into \\, and sed turns \\ into \).
     2733    sed -n \
     2734      -e "s/'/'\\\\''/g" \
     2735      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
     2736    ;;
     2737  *)
     2738    # `set' quotes correctly as required by POSIX, so do not add quotes.
     2739    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
     2740    ;;
     2741  esac >> confcache
    23472742if cmp -s $cache_file confcache; then
    23482743  :
     
    23992794    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
    24002795  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
    2401     echo "$CONFIG_STATUS generated by autoconf version 2.4"
     2796    echo "$CONFIG_STATUS generated by autoconf version 2.12"
    24022797    exit 0 ;;
    24032798  -help | --help | --hel | --he | --h)
     
    24122807trap 'rm -fr `echo "Makefile src/text/Makefile src/images/Makefile
    24132808          src/scripts/Makefile lib/Makefile  config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
    2414 
    2415 # Protect against being on the right side of a sed subst in config.status.
    2416 sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g;
    2417  s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
     2809EOF
     2810cat >> $CONFIG_STATUS <<EOF
     2811
     2812# Protect against being on the right side of a sed subst in config.status.
     2813sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
     2814 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
    24182815$ac_vpsub
    24192816$extrasub
     
    24272824s%@prefix@%$prefix%g
    24282825s%@program_transform_name@%$program_transform_name%g
     2826s%@bindir@%$bindir%g
     2827s%@sbindir@%$sbindir%g
     2828s%@libexecdir@%$libexecdir%g
     2829s%@datadir@%$datadir%g
     2830s%@sysconfdir@%$sysconfdir%g
     2831s%@sharedstatedir@%$sharedstatedir%g
     2832s%@localstatedir@%$localstatedir%g
     2833s%@libdir@%$libdir%g
     2834s%@includedir@%$includedir%g
     2835s%@oldincludedir@%$oldincludedir%g
     2836s%@infodir@%$infodir%g
     2837s%@mandir@%$mandir%g
    24292838s%@PACKAGE@%$PACKAGE%g
    24302839s%@VERSION@%$VERSION%g
     
    24462855CEOF
    24472856EOF
     2857
     2858cat >> $CONFIG_STATUS <<\EOF
     2859
     2860# Split the substitutions into bite-sized pieces for seds with
     2861# small command number limits, like on Digital OSF/1 and HP-UX.
     2862ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
     2863ac_file=1 # Number of current file.
     2864ac_beg=1 # First line for current file.
     2865ac_end=$ac_max_sed_cmds # Line after last line for current file.
     2866ac_more_lines=:
     2867ac_sed_cmds=""
     2868while $ac_more_lines; do
     2869  if test $ac_beg -gt 1; then
     2870    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
     2871  else
     2872    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
     2873  fi
     2874  if test ! -s conftest.s$ac_file; then
     2875    ac_more_lines=false
     2876    rm -f conftest.s$ac_file
     2877  else
     2878    if test -z "$ac_sed_cmds"; then
     2879      ac_sed_cmds="sed -f conftest.s$ac_file"
     2880    else
     2881      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
     2882    fi
     2883    ac_file=`expr $ac_file + 1`
     2884    ac_beg=$ac_end
     2885    ac_end=`expr $ac_end + $ac_max_sed_cmds`
     2886  fi
     2887done
     2888if test -z "$ac_sed_cmds"; then
     2889  ac_sed_cmds=cat
     2890fi
     2891EOF
     2892
    24482893cat >> $CONFIG_STATUS <<EOF
    24492894
     
    24532898cat >> $CONFIG_STATUS <<\EOF
    24542899for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
    2455   # Support "outfile[:infile]", defaulting infile="outfile.in".
     2900  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
    24562901  case "$ac_file" in
    2457   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
     2902  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
    24582903       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
    24592904  *) ac_file_in="${ac_file}.in" ;;
    24602905  esac
    24612906
    2462   # Adjust relative srcdir, etc. for subdirectories.
     2907  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
    24632908
    24642909  # Remove last slash and all that follows it.  Not all systems have dirname.
     
    24882933  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
    24892934  esac
     2935
    24902936  echo creating "$ac_file"
    24912937  rm -f "$ac_file"
     
    24962942  *) ac_comsub= ;;
    24972943  esac
     2944
     2945  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
    24982946  sed -e "$ac_comsub
    24992947s%@configure_input@%$configure_input%g
     
    25012949s%@top_srcdir@%$top_srcdir%g
    25022950s%@INSTALL@%$INSTALL%g
    2503 " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
     2951" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
    25042952fi; done
    2505 rm -f conftest.subs
     2953rm -f conftest.s*
    25062954
    25072955# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
     
    25242972ac_eD='%g'
    25252973
    2526 CONFIG_HEADERS=${CONFIG_HEADERS-"config.h"}
     2974if test "${CONFIG_HEADERS+set}" != set; then
     2975EOF
     2976cat >> $CONFIG_STATUS <<EOF
     2977  CONFIG_HEADERS="config.h"
     2978EOF
     2979cat >> $CONFIG_STATUS <<\EOF
     2980fi
    25272981for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
    2528   # Support "outfile[:infile]", defaulting infile="outfile.in".
     2982  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
    25292983  case "$ac_file" in
    2530   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
     2984  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
    25312985       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
    25322986  *) ac_file_in="${ac_file}.in" ;;
     
    25362990
    25372991  rm -f conftest.frag conftest.in conftest.out
    2538   cp $ac_given_srcdir/$ac_file_in conftest.in
     2992  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
     2993  cat $ac_file_inputs > conftest.in
    25392994
    25402995EOF
     
    25422997# Transform confdefs.h into a sed script conftest.vals that substitutes
    25432998# the proper values into config.h.in to produce config.h.  And first:
    2544 # Protect against being on the right side of a sed subst in config.status. 
     2999# Protect against being on the right side of a sed subst in config.status.
    25453000# Protect against being in an unquoted here document in config.status.
    25463001rm -f conftest.vals
     
    25483003s/[\\&%]/\\&/g
    25493004s%[\\$`]%\\&%g
    2550 s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
     3005s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
    25513006s%ac_d%ac_u%gp
    25523007s%ac_u%ac_e%gp
     
    25643019# Break up conftest.vals because some shells have a limit on
    25653020# the size of here documents, and old seds have small limits too.
    2566 # Maximum number of lines to put in a single here document.
    2567 ac_max_here_lines=12
    25683021
    25693022rm -f conftest.tail
     
    25963049    rm -f conftest.h
    25973050  else
     3051    # Remove last slash and all that follows it.  Not all systems have dirname.
     3052      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
     3053      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
     3054      # The file is in a subdirectory.
     3055      test ! -d "$ac_dir" && mkdir "$ac_dir"
     3056    fi
    25983057    rm -f $ac_file
    25993058    mv conftest.h $ac_file
     
    26013060fi; done
    26023061
    2603 
     3062EOF
     3063cat >> $CONFIG_STATUS <<EOF
     3064
     3065EOF
     3066cat >> $CONFIG_STATUS <<\EOF
    26043067test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
    26053068exit 0
  • /trunk/gsdl/packages/mg-1.3d/lib/Makefile.in

    r20 r30  
    3737DEFS = @DEFS@
    3838RANLIB = @RANLIB@
     39
     40##########################################
     41# Uncomment for compiling for the nzdl project
     42#
     43CFLAGS = @CFLAGS@ -DQUIET
     44##########################################
     45
    3946 
    4047prefix = @prefix@
     
    7683    bitio_m_mems.h     bitio_stdio.h      huffman_stdio.h    sptree.h \
    7784    regex.h            rx.h               pathmax.h          getpagesize.h \
    78     random.h
     85    random.h           frenchstem.h
    7986
    8087SOURCES = \
     
    8693    timing.c          regex.c           rx.c              \
    8794    alloca.c          error.c           xmalloc.c         strstr.c \
    88     gmalloc.c         ftruncate.c       strcasecmp.c      random.c         
     95    gmalloc.c         ftruncate.c       strcasecmp.c      random.c \
     96    frenchstem.c
    8997
    9098OBJECTS = @ALLOCA@ @LIBOBJS@ \
     
    96104    timing$o          regex$o       rx$o \
    97105    error$o           xmalloc$o \
    98     gmalloc$o         random$o
     106    gmalloc$o         random$o          frenchstem$o
    99107 
    100108DISTFILES = Makefile.in $(HEADERS) $(SOURCES)
  • /trunk/gsdl/packages/mg-1.3d/lib/WIN32.MAK

    r20 r30  
    3131#CFLAGS = -g -O
    3232CPPFLAGS =
    33 DEFS = -DHAVE_CONFIG_H -D__WIN32__ -D_LITTLE_ENDIAN
     33DEFS = -DQUIET -DHAVE_CONFIG_H -D__WIN32__ -D_LITTLE_ENDIAN
    3434 
    3535COMPILE = $(CC) -c $(DEFS) -I. -I..
     
    5353    bitio_m_mem.h      bitio_random.h     huffman_mem.h      perf_hash.h \
    5454    bitio_m_mems.h     bitio_stdio.h      huffman_stdio.h    sptree.h \
    55     regex.h            rx.h               pathmax.h          getpagesize.h \
    56     random.h
     55                       rx.h               pathmax.h          getpagesize.h \
     56    random.h           win32in.h          frenchstem.h
    5757
    5858SOURCES = \
     
    6262    bitio_mem.c       getopt.c          huffman_stdio.c   sptree.c \
    6363    bitio_mems.c      getopt1.c         local_strings.c   stem.c \
    64     timing.c          regex.c           rx.c              \
     64    timing.c                            rx.c              \
    6565    alloca.c          error.c           xmalloc.c         strstr.c \
    66     ftruncate.c       strcasecmp.c      random.c         
     66    ftruncate.c       strcasecmp.c      random.c          win32in.c \
     67    frenchstem.c
    6768
    68 OBJECTS =   rx.obj \
     69OBJECTS =   rx$o \
    6970    bitio_random$o    heap$o            memlib$o \
    7071    bitio_stdio$o     huffman$o         messages$o \
     
    7273    bitio_mem$o       getopt$o          huffman_stdio$o   sptree$o \
    7374    bitio_mems$o      getopt1$o         local_strings$o   stem$o \
    74     timing$o          regex$o \
     75    timing$o          \
    7576    error$o           xmalloc$o \
    76     random$o
     77    random$o          win32in$o         frenchstem$o
    7778 
    7879DISTFILES = Makefile.in $(HEADERS) $(SOURCES)
     
    101102
    102103mostlyclean:
    103     rm -f *.o *_.o
     104    del *.obj
    104105 
    105106clean: mostlyclean
    106     rm -f libmg.lib
     107    del libmg.lib
    107108 
    108109distclean: clean
  • /trunk/gsdl/packages/mg-1.3d/lib/alloca.c

    r20 r30  
    2626#  include <win32cfg.h>
    2727# else
    28 #  include <config.h>
     28#  include <sysfuncs.h>
    2929# endif
    3030#endif
  • /trunk/gsdl/packages/mg-1.3d/lib/error.c

    r20 r30  
    2222#  include <win32cfg.h>
    2323# else
    24 #  include <config.h>
     24#  include <sysfuncs.h>
    2525# endif
    2626#endif
  • /trunk/gsdl/packages/mg-1.3d/lib/frenchstem.c

    r20 r30  
     1/**************************************************************************
     2 *
     3 * frenchstem.c -- a simple french stemmer
     4 *
     5 * This program is free software; you can redistribute it and/or modify
     6 * it under the terms of the GNU General Public License as published by
     7 * the Free Software Foundation; either version 2 of the License, or
     8 * (at your option) any later version.
     9 *
     10 * This program is distributed in the hope that it will be useful,
     11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     13 * GNU General Public License for more details.
     14 *
     15 * You should have received a copy of the GNU General Public License
     16 * along with this program; if not, write to the Free Software
     17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
     18 *
     19 * $Id$
     20 *
     21 **************************************************************************/
    122
    2 static char * frenchstem (word)
    3 char *word;
    4 {     
    5   int len = strlen(word)-1;
    6   if (len > 4) {
    7     if (word[len]=='x') {
    8       if (word[len-1]=='u' && word[len-2]=='a') {
    9     word[len-1]='l';
     23#include "frenchstem.h"
     24
     25
     26
     27/* =========================================================================
     28 * Function: frenchstem
     29 * Description: a simple french stemmer
     30 * Input: a word string with the length in the first byte
     31 * Output: the stemmed word
     32 * ========================================================================= */
     33
     34void frenchstem (unsigned char *word) {     
     35  unsigned char *wordstart = word + 1; /* points to first letter of word */
     36  int last = (int)word[0]-1;           /* last points to the last character */
     37
     38  if (last > 4) {
     39    if (wordstart[last]=='x') {
     40      if (wordstart[last-1]=='u' && wordstart[last-2]=='a') {
     41    wordstart[last-1]='l';
    1042      }
    11       word[len]='\0';
    12       return(word);
    13     }
    14     else {
    15       if (word[len]=='s')
    16     {word[len]='\0';len--;}
    17       if (word[len]=='r')
    18     {word[len]='\0';len--;}
    19       if (word[len]=='e')
    20     {word[len]='\0';len--;}
    21       if (word[len]=='é')    /* letter with accent e + ' */
    22     {word[len]='\0';len--;}
    23       if (word[len] == word[len-1])
    24     word[len]='\0';
     43      wordstart[last]='\0';
     44      last--;
     45
     46    } else {
     47      if (wordstart[last]=='s' && last>=0)
     48    {wordstart[last]='\0'; last--;}
     49      if (wordstart[last]=='r' && last>=0)
     50    {wordstart[last]='\0'; last--;}
     51      if (wordstart[last]=='e' && last>=0)
     52    {wordstart[last]='\0'; last--;}
     53      if (wordstart[last]=='é' && last>=0) /* letter with accent e + ' */
     54    {wordstart[last]='\0'; last--;}
     55      if (wordstart[last]==wordstart[last-1] && last>=1)
     56    {wordstart[last]='\0'; last--;}
    2557    }  /* end else */
     58
     59    word[0] = (unsigned char)(last+1);
    2660  } /* end if (len > 4) */
    27   return(word);
    2861}
  • /trunk/gsdl/packages/mg-1.3d/lib/ftruncate.c

    r20 r30  
    66#  include <win32cfg.h>
    77# else
    8 #  include <config.h>
     8#  include <sysfuncs.h>
    99# endif
    1010#endif
  • /trunk/gsdl/packages/mg-1.3d/lib/getopt.c

    r20 r30  
    2323
    2424#ifdef HAVE_CONFIG_H
    25 #include "config.h"
     25#include "sysfuncs.h"
    2626#endif
    2727
  • /trunk/gsdl/packages/mg-1.3d/lib/getopt1.c

    r20 r30  
    1919
    2020#ifdef HAVE_CONFIG_H
    21 #include "config.h"
     21#include "sysfuncs.h"
    2222#endif
    2323
  • /trunk/gsdl/packages/mg-1.3d/lib/gmalloc.c

    r20 r30  
    3434
    3535#ifdef  HAVE_CONFIG_H
    36 #include <config.h>
     36#include <sysfuncs.h>
    3737#endif
    3838
  • /trunk/gsdl/packages/mg-1.3d/lib/messages.c

    r20 r30  
    2424/*
    2525   $Log$
    26    Revision 1.1  1998/11/17 09:32:14  rjmcnab
    27    *** empty log message ***
     26   Revision 1.2  1998/11/23 03:38:06  rjmcnab
     27
     28   combined unix and windows versions of mg
     29
     30   Revision 1.1  1998/11/19 03:00:32  sjboddie
     31   Added windows gdbm and mg versions
    2832
    2933   * Revision 1.1  1994/08/22  00:24:48  tes
     
    7276  char *s, *pfx;
    7377  va_list args;
     78
     79#ifdef QUIET
     80  return; /* stop those messages!!!! */
     81#endif 
     82
    7483  va_start (args, fmt);
    7584  vsprintf (buf, fmt, args);
  • /trunk/gsdl/packages/mg-1.3d/lib/regex.c

    r20 r30  
    3131#  include <win32cfg.h>
    3232# else
    33 #  include <config.h>
     33#  include <sysfuncs.h>
    3434# endif
    3535#endif
     
    5757/* If we are not linking with Emacs proper,
    5858   we can't use the relocating allocator
    59    even if config.h says that we can.  */
     59   even if sysfuncs.h says that we can.  */
    6060#undef REL_ALLOC
    6161
     
    160160   eliminate the && through constant folding."  */
    161161
    162 #if defined (STDC_HEADERS) || (!defined (isascii) && !defined (HAVE_ISASCII))
    163 #define ISASCII(c) 1
    164 #else
    165 #define ISASCII(c) isascii(c)
     162#ifndef ISASCII
     163#  if defined (STDC_HEADERS) || (!defined (isascii) && !defined (HAVE_ISASCII))
     164#    define ISASCII(c) 1
     165#  else
     166#    define ISASCII(c) isascii(c)
     167#  endif
    166168#endif
    167169
     
    966968
    967969/* When using GNU C, we are not REALLY using the C alloca, no matter
    968    what config.h may say.  So don't take precautions for it.  */
     970   what sysfuncs.h may say.  So don't take precautions for it.  */
    969971#ifdef __GNUC__
    970972#undef C_ALLOCA
  • /trunk/gsdl/packages/mg-1.3d/lib/rx.c

    r20 r30  
    3636#  include <malloc.h>
    3737# else
    38 #  include <config.h>
     38#  include <sysfuncs.h>
    3939# endif
    4040#endif
  • /trunk/gsdl/packages/mg-1.3d/lib/rx.h

    r20 r30  
    21852185 * that make sense only in Emacs.
    21862186 */
    2187 #include "config.h"
     2187#include "sysfuncs.h"
    21882188#include "lisp.h"
    21892189#include "buffer.h"
  • /trunk/gsdl/packages/mg-1.3d/lib/xmalloc.c

    r20 r30  
    2020#  include <win32cfg.h>
    2121# else
    22 #  include <config.h>
     22#  include <sysfuncs.h>
    2323# endif
    2424#endif
  • /trunk/gsdl/packages/mg-1.3d/src/text/MGPASS.C

    r20 r30  
    4949/*
    5050   $Log$
     51   Revision 1.3  1998/11/24 03:39:23  rjmcnab
     52
     53   Fixed a small error in the windows compilation
     54
     55   Revision 1.2  1998/11/24 01:29:39  rjmcnab
     56
     57   Fixed a few problems with the windows build
     58
    5159   Revision 1.1  1998/11/17 09:34:12  rjmcnab
    5260   *** empty log message ***
     
    8290FILE *Comp_Stats = NULL;
    8391int comp_stat_point = 0;
    84 u_long bytes_processed = 0;
     92double bytes_processed = 0;
    8593int num_docs = 0;
    86 u_long bytes_received = 0;
     94double bytes_received = 0;
    8795int stem_method = 0;
    8896
  • /trunk/gsdl/packages/mg-1.3d/src/text/WIN32.MAK

    r20 r30  
    1414#CFLAGS = -g -O
    1515CPPFLAGS =
    16 DEFS = -DHAVE_CONFIG_H -D__WIN32__ -D_LITTLE_ENDIAN
     16DEFS = -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM -DHAVE_CONFIG_H -D__WIN32__ -D_LITTLE_ENDIAN
    1717#INSTALL = /usr/local/gnu/bin/install -c
    1818#INSTALL_DATA = ${INSTALL} -m 644
     
    7878  ivf.pass2.c             mg_text_estimate.c      text_get.c           \
    7979  lists.c                 mg_text_merge.c         weights.c            \
    80   query_term_list.c       mgpass.c                builder.cpp
     80  mgpass.c                query_term_list.c       
    8181
    8282HEADERS = \
     
    105105        mg_hilite_words$e     mg_invf_merge$e \
    106106        mg_text_merge$e     bool_tester$e  mgpass$e \
    107         mg_stem_idx$e  mgstemidxlist$e  mg_decompress_text$e \
    108         builder$e
     107        mg_stem_idx$e  mgstemidxlist$e \
     108                mg_decompress_text$e
    109109
    110110MAN           = mgquery.1 mg_weights_build.1 mgstat.1 mg_invf_dump.1 mg_invf_dict.1 \
     
    117117
    118118
    119 all:    $(EXEC)
     119all:    $(EXEC) libtextin.lib
    120120
    121121
     
    253253    $(LINK) $(PERF_HASH_OBJS) $(LIBS)
    254254
    255 STEM_IDX_OBJS = \
    256                 mg_stem_idx$o mg_files$o stemmer$o locallib$o \
     255STEM_IDX_OBJS = mg_stem_idx$o mg_files$o stemmer$o locallib$o \
    257256                mg_errors$o term_lists$o
    258257
     
    265264    $(LINK) $(STEM_IDX_LIST_OBJS) $(LIBS)
    266265
    267 DECOMPRESS_TEXT_OBJS = \
    268                 mg_decompress_text$o mg_files$o mg_errors$o \
    269                 text_get$o locallib$o backend$o stem_search$o \
    270                 term_lists$o stemmer$o weights$o invf_get$o lists$o
     266DECOMPRESS_TEXT_OBJS = mg_decompress_text$o query_term_list$o mg_files$o mg_errors$o \
     267                       text_get$o locallib$o backend$o stem_search$o \
     268                       term_lists$o stemmer$o weights$o invf_get$o lists$o
    271269
    272270mg_decompress_text$e: $(DECOMPRESS_TEXT_OBJS)
     
    317315
    318316
     317LIB_OBJS = \
     318    query_term_list$o \
     319    locallib$o lists$o \
     320    query.ranked$o query.docnums$o stem_search$o \
     321    environment$o commands$o weights$o text_get$o stemmer$o \
     322    read_line$o mg_errors$o backend$o invf_get$o \
     323    term_lists$o bool_tree$o bool_parser$o bool_optimiser$o bool_query$o
     324
     325libtextin.lib: $(LIB_OBJS)
     326    del libtextin.lib
     327    lib /out:libtextin.lib $(LIB_OBJS)
     328
     329
    319330mostlyclean:
    320331    rm -f *$o _*.c _*.o *._c *._o core core.*
  • /trunk/gsdl/packages/mg-1.3d/src/text/bool_parser.c

    r20 r30  
    11#ifndef lint
    2 static char yysccsid[] = "@(#)yaccpar   1.8 (Berkeley) 01/20/90";
     2static char yysccsid[] = "@(#)yaccpar   1.9 (Berkeley) 02/21/93";
    33#endif
    44#define YYBYACC 1
     5#define YYMAJOR 1
     6#define YYMINOR 9
     7#define yyclearin (yychar=(-1))
     8#define yyerrok (yyerrflag=0)
     9#define YYRECOVERING (yyerrflag!=0)
     10#define YYPREFIX "yy"
    511#line 25 "bool_parser.y"
    612 
     
    4652  bool_tree_node *node;
    4753} YYSTYPE;
    48 #line 49 "y.tab.c"
     54#line 55 "y.tab.c"
    4955#define TERM 257
    5056#define YYERRCODE 256
     
    158164};
    159165#endif
    160 #define yyclearin (yychar=(-1))
    161 #define yyerrok (yyerrflag=0)
    162166#ifdef YYSTACKSIZE
    163 #ifndef YYMAXDEPTH
     167#undef YYMAXDEPTH
    164168#define YYMAXDEPTH YYSTACKSIZE
    165 #endif
    166169#else
    167170#ifdef YYMAXDEPTH
     
    401404 
    402405
    403 #line 404 "y.tab.c"
     406#line 407 "y.tab.c"
    404407#define YYABORT goto yyabort
     408#define YYREJECT goto yyabort
    405409#define YYACCEPT goto yyaccept
    406410#define YYERROR goto yyerrlab
     
    440444            if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
    441445            if (!yys) yys = "illegal-symbol";
    442             printf("yydebug: state %d, reading %d (%s)\n", yystate,
    443                     yychar, yys);
     446            printf("%sdebug: state %d, reading %d (%s)\n",
     447                    YYPREFIX, yystate, yychar, yys);
    444448        }
    445449#endif
     
    450454#if YYDEBUG
    451455        if (yydebug)
    452             printf("yydebug: state %d, shifting to state %d\n",
    453                     yystate, yytable[yyn]);
     456            printf("%sdebug: state %d, shifting to state %d\n",
     457                    YYPREFIX, yystate, yytable[yyn]);
    454458#endif
    455459        if (yyssp >= yyss + yystacksize - 1)
     
    491495#if YYDEBUG
    492496                if (yydebug)
    493                     printf("yydebug: state %d, error recovery shifting\
    494  to state %d\n", *yyssp, yytable[yyn]);
     497                    printf("%sdebug: state %d, error recovery shifting\
     498 to state %d\n", YYPREFIX, *yyssp, yytable[yyn]);
    495499#endif
    496500                if (yyssp >= yyss + yystacksize - 1)
     
    506510#if YYDEBUG
    507511                if (yydebug)
    508                     printf("yydebug: error recovery discarding state %d\n",
    509                             *yyssp);
     512                    printf("%sdebug: error recovery discarding state %d\n",
     513                            YYPREFIX, *yyssp);
    510514#endif
    511515                if (yyssp <= yyss) goto yyabort;
     
    524528            if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
    525529            if (!yys) yys = "illegal-symbol";
    526             printf("yydebug: state %d, error recovery discards token %d (%s)\n",
    527                     yystate, yychar, yys);
     530            printf("%sdebug: state %d, error recovery discards token %d (%s)\n",
     531                    YYPREFIX, yystate, yychar, yys);
    528532        }
    529533#endif
     
    534538#if YYDEBUG
    535539    if (yydebug)
    536         printf("yydebug: state %d, reducing by rule %d (%s)\n",
    537                 yystate, yyn, yyrule[yyn]);
     540        printf("%sdebug: state %d, reducing by rule %d (%s)\n",
     541                YYPREFIX, yystate, yyn, yyrule[yyn]);
    538542#endif
    539543    yym = yylen[yyn];
     
    577581{ yyval.node = CreateBoolTreeNode(N_or, yyvsp[-2].node, yyvsp[0].node); }
    578582break;
    579 #line 580 "y.tab.c"
     583#line 584 "y.tab.c"
    580584    }
    581585    yyssp -= yym;
     
    587591#if YYDEBUG
    588592        if (yydebug)
    589             printf("yydebug: after reduction, shifting from state 0 to\
    590  state %d\n", YYFINAL);
     593            printf("%sdebug: after reduction, shifting from state 0 to\
     594 state %d\n", YYPREFIX, YYFINAL);
    591595#endif
    592596        yystate = YYFINAL;
     
    602606                if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
    603607                if (!yys) yys = "illegal-symbol";
    604                 printf("yydebug: state %d, reading %d (%s)\n",
    605                         YYFINAL, yychar, yys);
     608                printf("%sdebug: state %d, reading %d (%s)\n",
     609                        YYPREFIX, YYFINAL, yychar, yys);
    606610            }
    607611#endif
     
    617621#if YYDEBUG
    618622    if (yydebug)
    619         printf("yydebug: after reduction, shifting from state %d \
    620 to state %d\n", *yyssp, yystate);
     623        printf("%sdebug: after reduction, shifting from state %d \
     624to state %d\n", YYPREFIX, *yyssp, yystate);
    621625#endif
    622626    if (yyssp >= yyss + yystacksize - 1)
  • /trunk/gsdl/packages/mg-1.3d/src/text/mg_hilite_words.c

    r20 r30  
    628628 * ========================================================================= */
    629629
    630 void
     630int
    631631main (int argc, char *argv[])
    632632{
     
    684684#endif
    685685
    686 }
     686  return 0;
     687}
  • /trunk/gsdl/packages/mg-1.3d/src/text/stemmer.h

    r20 r30  
    4444
    4545#endif
    46 
    47 
    48 
    49 
    50 
  • /trunk/gsdl/src/library/gdbmclass.cpp

    r20 r30  
    574574  return 1;
    575575}
     576
     577// functions related to sorting
     578
     579// returns whatever comes after ':#:' in str
     580// -- this is a nasty hack that I'm sure Rodger will want to change ;-)
     581text_t get_section_str(const text_t &str) {
     582
     583  text_t ret;
     584  int found = 0;
     585
     586  text_t::const_iterator here = str.begin();
     587  text_t::const_iterator end = str.end();
     588
     589  while (here != end) {
     590    if (found) {
     591      ret.push_back(*here);
     592    } else {
     593      here = findchar (here, end, ':');
     594      if ((*(here+1) == '#') && (*(here+2) == ':')) {
     595    found = 1;
     596    here = here+2;
     597      }
     598    }
     599    here ++;
     600  }
     601  return ret;
     602}
     603
     604// removes leading spaces and leading 'the' 'a' and 'an'
     605// from string
     606void alphabetize_string_english (text_t &text) {
     607 
     608  if (text.empty()) return;
     609
     610  text_t firstword;
     611  char *word;
     612
     613  text_t::iterator here = text.begin();
     614  text_t::const_iterator end = text.end();
     615
     616  if ((*here != ' ') && (*here != 'a') && (*here != 'A') &&
     617      (*here != 't') && (*here != 'T')) return;
     618
     619  int foundchar = 0;
     620  while (here != end) {
     621    if (*here == ' ' && !foundchar) {here ++; continue;}
     622    if (*here == ' ' && foundchar) {
     623      text.erase(text.begin(), (here+1));
     624      break;
     625    }
     626    foundchar ++;
     627    if (foundchar == 1) {
     628      getdelimitstr (here, end, ' ', firstword);
     629      word = firstword.getcstr();
     630      if ((_stricmp(word, "the") != 0) && (_stricmp(word, "a") != 0) &&
     631      (_stricmp(word, "an") != 0)) break;
     632    }
     633    here ++;
     634  }
     635  delete word;
     636}
     637
     638// removes leading space, puts last name before
     639// any preceeding names
     640void alphabetize_string_name (text_t &text) {
     641 
     642  if (text.empty()) return;
     643 
     644  text_t lastname;
     645  char *lname;
     646  vector<text_t> words;
     647  splitchar (text.begin(), text.end(), ' ', words);
     648  lastname = words.back();
     649  words.pop_back();
     650  lname = lastname.getcstr();
     651 
     652  while ((_stricmp(lname, "jnr") == 0) || (_stricmp(lname, "snr") == 0) ||
     653     (_stricmp(lname, "esq") == 0)) {
     654    lastname = words.back();
     655    words.pop_back();
     656    lname = lastname.getcstr();
     657  }
     658
     659  text.clear();
     660  joinchar (words, ' ', text);
     661  text = lastname + text;
     662}
     663
     664char ** string_add (char **array, int *len, char *str) {
     665  char **ret;
     666
     667  ret = (char**)realloc(array, (*len+1)*sizeof(char*));
     668  ret[*len] = (char*)strdup(str);
     669  (*len) ++;
     670
     671  return ret;
     672}
     673
     674void string_sort (char **array, int len) {
     675  qsort((void*)array, (unsigned int)(len), sizeof(char*), compare_str);
     676}
     677
     678static int compare_str (const void *e1, const void *e2) {
     679  return _stricmp(*((char**)e1), *((char**)e2));
     680}
     681
     682void string_free(char **array, int len) {
     683  for (int i = 0; i < len; i++)
     684    free (array[i]);
     685  free (array);
     686}
  • /trunk/gsdl/src/library/gdbmclass.h

    r20 r30  
    8282void get_first_section(const text_t &instring, text_t &returnstring);
    8383int is_number (text_t &text);
     84text_t get_section_str(const text_t &str);
     85void alphabetize_string_english (text_t &text);
     86void alphabetize_string_name (text_t &text);
     87char ** string_add (char **array, int *len, char *str);
     88void string_sort (char **array, int len);
     89static int compare_str (const void *e1, const void *e2);
     90void string_free(char **array, int len);
    8491#endif
Note: See TracChangeset for help on using the changeset viewer.