home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 11 Util / 11-Util.zip / txtut122.zip / textutil / configure < prev    next >
Text File  |  1998-04-05  |  139KB  |  4,778 lines

  1. #! /bin/sh
  2.  
  3. # Guess values for system-dependent variables and create Makefiles.
  4. # Generated automatically using autoconf version 2.12 
  5. # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
  6. #
  7. # This configure script is free software; the Free Software Foundation
  8. # gives unlimited permission to copy, distribute and modify it.
  9.  
  10. # Defaults:
  11. ac_help=
  12. ac_default_prefix=/usr/local
  13. # Any additions from configure.in:
  14. ac_help="$ac_help
  15.   --enable-maintainer-mode enable make rules and dependencies not useful
  16.                           (and sometimes confusing) to the casual installer"
  17. ac_help="$ac_help
  18.   --without-regex         use GNU rx in lieu of gawk's regex for matching"
  19. ac_help="$ac_help
  20.   --disable-nls           do not use Native Language Support"
  21. ac_help="$ac_help
  22.   --with-included-gettext use the GNU gettext library included here"
  23. ac_help="$ac_help
  24.   --with-catgets          use catgets functions if available"
  25.  
  26. # Initialize some variables set by options.
  27. # The variables have the same names as the options, with
  28. # dashes changed to underlines.
  29. build=NONE
  30. cache_file=./config.cache
  31. exec_prefix=NONE
  32. host=NONE
  33. no_create=
  34. nonopt=NONE
  35. no_recursion=
  36. prefix=NONE
  37. program_prefix=NONE
  38. program_suffix=NONE
  39. program_transform_name=s,x,x,
  40. silent=
  41. site=
  42. srcdir=
  43. target=NONE
  44. verbose=
  45. x_includes=NONE
  46. x_libraries=NONE
  47. bindir='${exec_prefix}/bin'
  48. sbindir='${exec_prefix}/sbin'
  49. libexecdir='${exec_prefix}/libexec'
  50. datadir='${prefix}/share'
  51. sysconfdir='${prefix}/etc'
  52. sharedstatedir='${prefix}/com'
  53. localstatedir='${prefix}/var'
  54. libdir='${exec_prefix}/lib'
  55. includedir='${prefix}/include'
  56. oldincludedir='/usr/include'
  57. infodir='${prefix}/info'
  58. mandir='${prefix}/man'
  59.  
  60. # Initialize some other variables.
  61. subdirs=
  62. MFLAGS= MAKEFLAGS=
  63. # Maximum number of lines to put in a shell here document.
  64. ac_max_here_lines=12
  65.  
  66. ac_prev=
  67. for ac_option
  68. do
  69.  
  70.   # If the previous option needs an argument, assign it.
  71.   if test -n "$ac_prev"; then
  72.     eval "$ac_prev=\$ac_option"
  73.     ac_prev=
  74.     continue
  75.   fi
  76.  
  77.   case "$ac_option" in
  78.   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  79.   *) ac_optarg= ;;
  80.   esac
  81.  
  82.   # Accept the important Cygnus configure options, so we can diagnose typos.
  83.  
  84.   case "$ac_option" in
  85.  
  86.   -bindir | --bindir | --bindi | --bind | --bin | --bi)
  87.     ac_prev=bindir ;;
  88.   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
  89.     bindir="$ac_optarg" ;;
  90.  
  91.   -build | --build | --buil | --bui | --bu)
  92.     ac_prev=build ;;
  93.   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
  94.     build="$ac_optarg" ;;
  95.  
  96.   -cache-file | --cache-file | --cache-fil | --cache-fi \
  97.   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  98.     ac_prev=cache_file ;;
  99.   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  100.   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  101.     cache_file="$ac_optarg" ;;
  102.  
  103.   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
  104.     ac_prev=datadir ;;
  105.   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
  106.   | --da=*)
  107.     datadir="$ac_optarg" ;;
  108.  
  109.   -disable-* | --disable-*)
  110.     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
  111.     # Reject names that are not valid shell variable names.
  112.     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  113.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  114.     fi
  115.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  116.     eval "enable_${ac_feature}=no" ;;
  117.  
  118.   -enable-* | --enable-*)
  119.     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  120.     # Reject names that are not valid shell variable names.
  121.     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  122.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  123.     fi
  124.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  125.     case "$ac_option" in
  126.       *=*) ;;
  127.       *) ac_optarg=yes ;;
  128.     esac
  129.     eval "enable_${ac_feature}='$ac_optarg'" ;;
  130.  
  131.   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  132.   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  133.   | --exec | --exe | --ex)
  134.     ac_prev=exec_prefix ;;
  135.   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  136.   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  137.   | --exec=* | --exe=* | --ex=*)
  138.     exec_prefix="$ac_optarg" ;;
  139.  
  140.   -gas | --gas | --ga | --g)
  141.     # Obsolete; use --with-gas.
  142.     with_gas=yes ;;
  143.  
  144.   -help | --help | --hel | --he)
  145.     # Omit some internal or obsolete options to make the list less imposing.
  146.     # This message is too long to be a string in the A/UX 3.1 sh.
  147.     cat << EOF
  148. Usage: configure [options] [host]
  149. Options: [defaults in brackets after descriptions]
  150. Configuration:
  151.   --cache-file=FILE       cache test results in FILE
  152.   --help                  print this message
  153.   --no-create             do not create output files
  154.   --quiet, --silent       do not print \`checking...' messages
  155.   --version               print the version of autoconf that created configure
  156. Directory and file names:
  157.   --prefix=PREFIX         install architecture-independent files in PREFIX
  158.                           [$ac_default_prefix]
  159.   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
  160.                           [same as prefix]
  161.   --bindir=DIR            user executables in DIR [EPREFIX/bin]
  162.   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
  163.   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
  164.   --datadir=DIR           read-only architecture-independent data in DIR
  165.                           [PREFIX/share]
  166.   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
  167.   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
  168.                           [PREFIX/com]
  169.   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
  170.   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
  171.   --includedir=DIR        C header files in DIR [PREFIX/include]
  172.   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
  173.   --infodir=DIR           info documentation in DIR [PREFIX/info]
  174.   --mandir=DIR            man documentation in DIR [PREFIX/man]
  175.   --srcdir=DIR            find the sources in DIR [configure dir or ..]
  176.   --program-prefix=PREFIX prepend PREFIX to installed program names
  177.   --program-suffix=SUFFIX append SUFFIX to installed program names
  178.   --program-transform-name=PROGRAM
  179.                           run sed PROGRAM on installed program names
  180. EOF
  181.     cat << EOF
  182. Host type:
  183.   --build=BUILD           configure for building on BUILD [BUILD=HOST]
  184.   --host=HOST             configure for HOST [guessed]
  185.   --target=TARGET         configure for TARGET [TARGET=HOST]
  186. Features and packages:
  187.   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  188.   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  189.   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  190.   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  191.   --x-includes=DIR        X include files are in DIR
  192.   --x-libraries=DIR       X library files are in DIR
  193. EOF
  194.     if test -n "$ac_help"; then
  195.       echo "--enable and --with options recognized:$ac_help"
  196.     fi
  197.     exit 0 ;;
  198.  
  199.   -host | --host | --hos | --ho)
  200.     ac_prev=host ;;
  201.   -host=* | --host=* | --hos=* | --ho=*)
  202.     host="$ac_optarg" ;;
  203.  
  204.   -includedir | --includedir | --includedi | --included | --include \
  205.   | --includ | --inclu | --incl | --inc)
  206.     ac_prev=includedir ;;
  207.   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  208.   | --includ=* | --inclu=* | --incl=* | --inc=*)
  209.     includedir="$ac_optarg" ;;
  210.  
  211.   -infodir | --infodir | --infodi | --infod | --info | --inf)
  212.     ac_prev=infodir ;;
  213.   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
  214.     infodir="$ac_optarg" ;;
  215.  
  216.   -libdir | --libdir | --libdi | --libd)
  217.     ac_prev=libdir ;;
  218.   -libdir=* | --libdir=* | --libdi=* | --libd=*)
  219.     libdir="$ac_optarg" ;;
  220.  
  221.   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  222.   | --libexe | --libex | --libe)
  223.     ac_prev=libexecdir ;;
  224.   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  225.   | --libexe=* | --libex=* | --libe=*)
  226.     libexecdir="$ac_optarg" ;;
  227.  
  228.   -localstatedir | --localstatedir | --localstatedi | --localstated \
  229.   | --localstate | --localstat | --localsta | --localst \
  230.   | --locals | --local | --loca | --loc | --lo)
  231.     ac_prev=localstatedir ;;
  232.   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  233.   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
  234.   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
  235.     localstatedir="$ac_optarg" ;;
  236.  
  237.   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
  238.     ac_prev=mandir ;;
  239.   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
  240.     mandir="$ac_optarg" ;;
  241.  
  242.   -nfp | --nfp | --nf)
  243.     # Obsolete; use --without-fp.
  244.     with_fp=no ;;
  245.  
  246.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  247.   | --no-cr | --no-c)
  248.     no_create=yes ;;
  249.  
  250.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  251.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
  252.     no_recursion=yes ;;
  253.  
  254.   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
  255.   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
  256.   | --oldin | --oldi | --old | --ol | --o)
  257.     ac_prev=oldincludedir ;;
  258.   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
  259.   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
  260.   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
  261.     oldincludedir="$ac_optarg" ;;
  262.  
  263.   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  264.     ac_prev=prefix ;;
  265.   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  266.     prefix="$ac_optarg" ;;
  267.  
  268.   -program-prefix | --program-prefix | --program-prefi | --program-pref \
  269.   | --program-pre | --program-pr | --program-p)
  270.     ac_prev=program_prefix ;;
  271.   -program-prefix=* | --program-prefix=* | --program-prefi=* \
  272.   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  273.     program_prefix="$ac_optarg" ;;
  274.  
  275.   -program-suffix | --program-suffix | --program-suffi | --program-suff \
  276.   | --program-suf | --program-su | --program-s)
  277.     ac_prev=program_suffix ;;
  278.   -program-suffix=* | --program-suffix=* | --program-suffi=* \
  279.   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  280.     program_suffix="$ac_optarg" ;;
  281.  
  282.   -program-transform-name | --program-transform-name \
  283.   | --program-transform-nam | --program-transform-na \
  284.   | --program-transform-n | --program-transform- \
  285.   | --program-transform | --program-transfor \
  286.   | --program-transfo | --program-transf \
  287.   | --program-trans | --program-tran \
  288.   | --progr-tra | --program-tr | --program-t)
  289.     ac_prev=program_transform_name ;;
  290.   -program-transform-name=* | --program-transform-name=* \
  291.   | --program-transform-nam=* | --program-transform-na=* \
  292.   | --program-transform-n=* | --program-transform-=* \
  293.   | --program-transform=* | --program-transfor=* \
  294.   | --program-transfo=* | --program-transf=* \
  295.   | --program-trans=* | --program-tran=* \
  296.   | --progr-tra=* | --program-tr=* | --program-t=*)
  297.     program_transform_name="$ac_optarg" ;;
  298.  
  299.   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  300.   | -silent | --silent | --silen | --sile | --sil)
  301.     silent=yes ;;
  302.  
  303.   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
  304.     ac_prev=sbindir ;;
  305.   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
  306.   | --sbi=* | --sb=*)
  307.     sbindir="$ac_optarg" ;;
  308.  
  309.   -sharedstatedir | --sharedstatedir | --sharedstatedi \
  310.   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
  311.   | --sharedst | --shareds | --shared | --share | --shar \
  312.   | --sha | --sh)
  313.     ac_prev=sharedstatedir ;;
  314.   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
  315.   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
  316.   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
  317.   | --sha=* | --sh=*)
  318.     sharedstatedir="$ac_optarg" ;;
  319.  
  320.   -site | --site | --sit)
  321.     ac_prev=site ;;
  322.   -site=* | --site=* | --sit=*)
  323.     site="$ac_optarg" ;;
  324.  
  325.   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  326.     ac_prev=srcdir ;;
  327.   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  328.     srcdir="$ac_optarg" ;;
  329.  
  330.   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
  331.   | --syscon | --sysco | --sysc | --sys | --sy)
  332.     ac_prev=sysconfdir ;;
  333.   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
  334.   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
  335.     sysconfdir="$ac_optarg" ;;
  336.  
  337.   -target | --target | --targe | --targ | --tar | --ta | --t)
  338.     ac_prev=target ;;
  339.   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  340.     target="$ac_optarg" ;;
  341.  
  342.   -v | -verbose | --verbose | --verbos | --verbo | --verb)
  343.     verbose=yes ;;
  344.  
  345.   -version | --version | --versio | --versi | --vers)
  346.     echo "configure generated by autoconf version 2.12"
  347.     exit 0 ;;
  348.  
  349.   -with-* | --with-*)
  350.     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  351.     # Reject names that are not valid shell variable names.
  352.     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  353.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  354.     fi
  355.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  356.     case "$ac_option" in
  357.       *=*) ;;
  358.       *) ac_optarg=yes ;;
  359.     esac
  360.     eval "with_${ac_package}='$ac_optarg'" ;;
  361.  
  362.   -without-* | --without-*)
  363.     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
  364.     # Reject names that are not valid shell variable names.
  365.     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  366.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  367.     fi
  368.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  369.     eval "with_${ac_package}=no" ;;
  370.  
  371.   --x)
  372.     # Obsolete; use --with-x.
  373.     with_x=yes ;;
  374.  
  375.   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  376.   | --x-incl | --x-inc | --x-in | --x-i)
  377.     ac_prev=x_includes ;;
  378.   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  379.   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  380.     x_includes="$ac_optarg" ;;
  381.  
  382.   -x-libraries | --x-libraries | --x-librarie | --x-librari \
  383.   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  384.     ac_prev=x_libraries ;;
  385.   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  386.   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  387.     x_libraries="$ac_optarg" ;;
  388.  
  389.   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
  390.     ;;
  391.  
  392.   *)
  393.     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  394.       echo "configure: warning: $ac_option: invalid host type" 1>&2
  395.     fi
  396.     if test "x$nonopt" != xNONE; then
  397.       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
  398.     fi
  399.     nonopt="$ac_option"
  400.     ;;
  401.  
  402.   esac
  403. done
  404.  
  405. if test -n "$ac_prev"; then
  406.   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
  407. fi
  408.  
  409. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  410.  
  411. # File descriptor usage:
  412. # 0 standard input
  413. # 1 file creation
  414. # 2 errors and warnings
  415. # 3 some systems may open it to /dev/tty
  416. # 4 used on the Kubota Titan
  417. # 6 checking for... messages and results
  418. # 5 compiler messages saved in config.log
  419. if test "$silent" = yes; then
  420.   exec 6>/dev/null
  421. else
  422.   exec 6>&1
  423. fi
  424. exec 5>./config.log
  425.  
  426. echo "\
  427. This file contains any messages produced by compilers while
  428. running configure, to aid debugging if configure makes a mistake.
  429. " 1>&5
  430.  
  431. # Strip out --no-create and --no-recursion so they do not pile up.
  432. # Also quote any args containing shell metacharacters.
  433. ac_configure_args=
  434. for ac_arg
  435. do
  436.   case "$ac_arg" in
  437.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  438.   | --no-cr | --no-c) ;;
  439.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  440.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  441.   *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  442.   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  443.   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  444.   esac
  445. done
  446.  
  447. # NLS nuisances.
  448. # Only set these to C if already set.  These must not be set unconditionally
  449. # because not all systems understand e.g. LANG=C (notably SCO).
  450. # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
  451. # Non-C LC_CTYPE values break the ctype check.
  452. if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
  453. if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
  454. if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
  455. if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
  456.  
  457. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  458. rm -rf conftest* confdefs.h
  459. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  460. echo > confdefs.h
  461.  
  462. # A filename unique to this package, relative to the directory that
  463. # configure is in, which we can look for to find out if srcdir is correct.
  464. ac_unique_file=src/fold.c
  465.  
  466. # Find the source files, if location was not specified.
  467. if test -z "$srcdir"; then
  468.   ac_srcdir_defaulted=yes
  469.   # Try the directory containing this script, then its parent.
  470.   ac_prog=$0
  471.   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  472.   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  473.   srcdir=$ac_confdir
  474.   if test ! -r $srcdir/$ac_unique_file; then
  475.     srcdir=..
  476.   fi
  477. else
  478.   ac_srcdir_defaulted=no
  479. fi
  480. if test ! -r $srcdir/$ac_unique_file; then
  481.   if test "$ac_srcdir_defaulted" = yes; then
  482.     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  483.   else
  484.     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  485.   fi
  486. fi
  487. srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
  488.  
  489. # Prefer explicitly selected file to automatically selected ones.
  490. if test -z "$CONFIG_SITE"; then
  491.   if test "x$prefix" != xNONE; then
  492.     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  493.   else
  494.     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  495.   fi
  496. fi
  497. for ac_site_file in $CONFIG_SITE; do
  498.   if test -r "$ac_site_file"; then
  499.     echo "loading site script $ac_site_file"
  500.     . "$ac_site_file"
  501.   fi
  502. done
  503.  
  504. if test -r "$cache_file"; then
  505.   echo "loading cache $cache_file"
  506.   . $cache_file
  507. else
  508.   echo "creating cache $cache_file"
  509.   > $cache_file
  510. fi
  511.  
  512. ac_ext=c
  513. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  514. ac_cpp='$CPP $CPPFLAGS'
  515. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  516. ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5; emxbind -o conftest conftest'
  517. cross_compiling=$ac_cv_prog_cc_cross
  518.  
  519. if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  520.   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  521.   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
  522.     ac_n= ac_c='
  523. ' ac_t='    '
  524.   else
  525.     ac_n=-n ac_c= ac_t=
  526.   fi
  527. else
  528.   ac_n= ac_c='\c' ac_t=
  529. fi
  530.  
  531.  
  532.  
  533.  
  534.  
  535.  
  536. ac_aux_dir=
  537. for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
  538.   if test -f $ac_dir/install-sh; then
  539.     ac_aux_dir=$ac_dir
  540.     ac_install_sh="$ac_aux_dir/install-sh -c"
  541.     break
  542.   elif test -f $ac_dir/install.sh; then
  543.     ac_aux_dir=$ac_dir
  544.     ac_install_sh="$ac_aux_dir/install.sh -c"
  545.     break
  546.   fi
  547. done
  548. if test -z "$ac_aux_dir"; then
  549.   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
  550. fi
  551. ac_config_guess=$ac_aux_dir/config.guess
  552. ac_config_sub=$ac_aux_dir/config.sub
  553. ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
  554.  
  555. # Find a good install program.  We prefer a C program (faster),
  556. # so one script is as good as another.  But avoid the broken or
  557. # incompatible versions:
  558. # SysV /etc/install, /usr/sbin/install
  559. # SunOS /usr/etc/install
  560. # IRIX /sbin/install
  561. # AIX /bin/install
  562. # AFS /usr/afsws/bin/install, which mishandles nonexistent args
  563. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  564. # ./install, which can be erroneously created by make from ./install.sh.
  565. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
  566. echo "configure:567: checking for a BSD compatible install" >&5
  567. if test -z "$INSTALL"; then
  568. if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
  569.   echo $ac_n "(cached) $ac_c" 1>&6
  570. else
  571.     IFS="${IFS=     }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
  572.   for ac_dir in $PATH; do
  573.     # Account for people who put trailing slashes in PATH elements.
  574.     case "$ac_dir/" in
  575.     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
  576.     *)
  577.       # OSF1 and SCO ODT 3.0 have their own names for install.
  578.       for ac_prog in ginstall installbsd scoinst install; do
  579.         if test -f $ac_dir/$ac_prog; then
  580.       if test $ac_prog = install &&
  581.             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
  582.         # AIX install.  It has an incompatible calling convention.
  583.         # OSF/1 installbsd also uses dspmsg, but is usable.
  584.         :
  585.       else
  586.         ac_cv_path_install="$ac_dir/$ac_prog -c"
  587.         break 2
  588.       fi
  589.     fi
  590.       done
  591.       ;;
  592.     esac
  593.   done
  594.   IFS="$ac_save_IFS"
  595.  
  596. fi
  597.   if test "${ac_cv_path_install+set}" = set; then
  598.     INSTALL="$ac_cv_path_install"
  599.   else
  600.     # As a last resort, use the slow shell script.  We don't cache a
  601.     # path for INSTALL within a source directory, because that will
  602.     # break other packages using the cache if that directory is
  603.     # removed, or if the path is relative.
  604.     INSTALL="$ac_install_sh"
  605.   fi
  606. fi
  607. echo "$ac_t""$INSTALL" 1>&6
  608.  
  609. # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
  610. # It thinks the first close brace ends the variable substitution.
  611. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  612.  
  613. test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  614.  
  615.  
  616. test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
  617.  
  618.  
  619. PACKAGE=textutils
  620.  
  621. cat >> confdefs.h <<EOF
  622. #define PACKAGE "$PACKAGE"
  623. EOF
  624.  
  625. VERSION=1.22
  626.  
  627. cat >> confdefs.h <<EOF
  628. #define VERSION "$VERSION"
  629. EOF
  630.  
  631. echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
  632. echo "configure:633: checking whether build environment is sane" >&5
  633. echo timestamp > conftestfile
  634. # Do this in a subshell so we don't clobber the current shell's
  635. # arguments.  FIXME: maybe try `-L' hack like GETLOADAVG test?
  636. if (set X `ls -t $srcdir/configure conftestfile`; test "$2" = conftestfile)
  637. then
  638.    # Ok.
  639.    :
  640. else
  641.    { echo "configure: error: newly created file is older than distributed files!
  642. Check your system clock" 1>&2; exit 1; }
  643. fi
  644. rm -f conftest*
  645. echo "$ac_t""yes" 1>&6
  646. if test "$program_transform_name" = s,x,x,; then
  647.   program_transform_name=
  648. else
  649.   # Double any \ or $.  echo might interpret backslashes.
  650.   cat <<\EOF_SED > conftestsed
  651. s,\\,\\\\,g; s,\$,$$,g
  652. EOF_SED
  653.   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
  654.   rm -f conftestsed
  655. fi
  656. test "$program_prefix" != NONE &&
  657.   program_transform_name="s,^,${program_prefix},; $program_transform_name"
  658. # Use a double $ so make ignores it.
  659. test "$program_suffix" != NONE &&
  660.   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
  661.  
  662. # sed with no file args requires a program.
  663. test "$program_transform_name" = "" && program_transform_name="s,x,x,"
  664.  
  665. echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
  666. echo "configure:667: checking whether ${MAKE-make} sets \${MAKE}" >&5
  667. set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
  668. if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
  669.   echo $ac_n "(cached) $ac_c" 1>&6
  670. else
  671.   cat > conftestmake <<\EOF
  672. all:
  673.     @echo 'ac_maketemp="${MAKE}"'
  674. EOF
  675. # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
  676. eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
  677. if test -n "$ac_maketemp"; then
  678.   eval ac_cv_prog_make_${ac_make}_set=yes
  679. else
  680.   eval ac_cv_prog_make_${ac_make}_set=no
  681. fi
  682. rm -f conftestmake
  683. fi
  684. if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
  685.   echo "$ac_t""yes" 1>&6
  686.   SET_MAKE=
  687. else
  688.   echo "$ac_t""no" 1>&6
  689.   SET_MAKE="MAKE=${MAKE-make}"
  690. fi
  691.  
  692. GNU_PACKAGE="GNU $PACKAGE"
  693. cat >> confdefs.h <<EOF
  694. #define GNU_PACKAGE "$GNU_PACKAGE"
  695. EOF
  696.  
  697.  
  698. echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
  699. echo "configure:700: checking whether to enable maintainer-specific portions of Makefiles" >&5
  700.     # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
  701. if test "${enable_maintainer_mode+set}" = set; then
  702.   enableval="$enable_maintainer_mode"
  703.   USE_MAINTAINER_MODE=$enableval
  704. else
  705.   USE_MAINTAINER_MODE=no
  706. fi
  707.  
  708.   echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
  709.   if test $USE_MAINTAINER_MODE = yes; then
  710.     MAINT=
  711.   else
  712.     MAINT='#M#'
  713.   fi
  714.   
  715.  
  716.  
  717. ALL_LINGUAS="de es fr ko nl pl"
  718.  
  719. # Extract the first word of "perl", so it can be a program name with args.
  720. set dummy perl; ac_word=$2
  721. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  722. echo "configure:723: checking for $ac_word" >&5
  723. if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
  724.   echo $ac_n "(cached) $ac_c" 1>&6
  725. else
  726.   case "$PERL" in
  727.   /*)
  728.   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
  729.   ;;
  730.   *)
  731.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  732.   for ac_dir in $PATH; do
  733.     test -z "$ac_dir" && ac_dir=.
  734.     if test -f $ac_dir/$ac_word; then
  735.       ac_cv_path_PERL="$ac_dir/$ac_word"
  736.       break
  737.     fi
  738.   done
  739.   IFS="$ac_save_ifs"
  740.   ;;
  741. esac
  742. fi
  743. PERL="$ac_cv_path_PERL"
  744. if test -n "$PERL"; then
  745.   echo "$ac_t""$PERL" 1>&6
  746. else
  747.   echo "$ac_t""no" 1>&6
  748. fi
  749.  
  750. # Extract the first word of "gcc", so it can be a program name with args.
  751. set dummy gcc; ac_word=$2
  752. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  753. echo "configure:754: checking for $ac_word" >&5
  754. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  755.   echo $ac_n "(cached) $ac_c" 1>&6
  756. else
  757.   if test -n "$CC"; then
  758.   ac_cv_prog_CC="$CC" # Let the user override the test.
  759. else
  760.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  761.   for ac_dir in $PATH; do
  762.     test -z "$ac_dir" && ac_dir=.
  763.     if test -f $ac_dir/$ac_word; then
  764.       ac_cv_prog_CC="gcc"
  765.       break
  766.     fi
  767.   done
  768.   IFS="$ac_save_ifs"
  769. fi
  770. fi
  771. CC="$ac_cv_prog_CC"
  772. if test -n "$CC"; then
  773.   echo "$ac_t""$CC" 1>&6
  774. else
  775.   echo "$ac_t""no" 1>&6
  776. fi
  777.  
  778. if test -z "$CC"; then
  779.   # Extract the first word of "cc", so it can be a program name with args.
  780. set dummy cc; ac_word=$2
  781. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  782. echo "configure:783: checking for $ac_word" >&5
  783. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  784.   echo $ac_n "(cached) $ac_c" 1>&6
  785. else
  786.   if test -n "$CC"; then
  787.   ac_cv_prog_CC="$CC" # Let the user override the test.
  788. else
  789.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  790.   ac_prog_rejected=no
  791.   for ac_dir in $PATH; do
  792.     test -z "$ac_dir" && ac_dir=.
  793.     if test -f $ac_dir/$ac_word; then
  794.       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
  795.         ac_prog_rejected=yes
  796.     continue
  797.       fi
  798.       ac_cv_prog_CC="cc"
  799.       break
  800.     fi
  801.   done
  802.   IFS="$ac_save_ifs"
  803. if test $ac_prog_rejected = yes; then
  804.   # We found a bogon in the path, so make sure we never use it.
  805.   set dummy $ac_cv_prog_CC
  806.   shift
  807.   if test $# -gt 0; then
  808.     # We chose a different compiler from the bogus one.
  809.     # However, it has the same basename, so the bogon will be chosen
  810.     # first if we set CC to just the basename; use the full file name.
  811.     shift
  812.     set dummy "$ac_dir/$ac_word" "$@"
  813.     shift
  814.     ac_cv_prog_CC="$@"
  815.   fi
  816. fi
  817. fi
  818. fi
  819. CC="$ac_cv_prog_CC"
  820. if test -n "$CC"; then
  821.   echo "$ac_t""$CC" 1>&6
  822. else
  823.   echo "$ac_t""no" 1>&6
  824. fi
  825.  
  826.   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
  827. fi
  828.  
  829. echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
  830. echo "configure:831: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
  831.  
  832. ac_ext=c
  833. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  834. ac_cpp='$CPP $CPPFLAGS'
  835. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  836. ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5; emxbind -o conftest conftest'
  837. cross_compiling=$ac_cv_prog_cc_cross
  838.  
  839. cat > conftest.$ac_ext <<EOF
  840. #line 841 "configure"
  841. #include "confdefs.h"
  842. main(){return(0);}
  843. EOF
  844. if { (eval echo configure:845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  845.   ac_cv_prog_cc_works=yes
  846.   # If we can't run a trivial program, we are probably using a cross compiler.
  847.   if (./conftest; exit) 2>/dev/null; then
  848.     ac_cv_prog_cc_cross=no
  849.   else
  850.     ac_cv_prog_cc_cross=yes
  851.   fi
  852. else
  853.   echo "configure: failed program was:" >&5
  854.   cat conftest.$ac_ext >&5
  855.   ac_cv_prog_cc_works=no
  856. fi
  857. rm -fr conftest*
  858.  
  859. echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
  860. if test $ac_cv_prog_cc_works = no; then
  861.   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
  862. fi
  863. echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
  864. echo "configure:865: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
  865. echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
  866. cross_compiling=$ac_cv_prog_cc_cross
  867.  
  868. echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
  869. echo "configure:870: checking whether we are using GNU C" >&5
  870. if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
  871.   echo $ac_n "(cached) $ac_c" 1>&6
  872. else
  873.   cat > conftest.c <<EOF
  874. #ifdef __GNUC__
  875.   yes;
  876. #endif
  877. EOF
  878. if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:879: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  879.   ac_cv_prog_gcc=yes
  880. else
  881.   ac_cv_prog_gcc=no
  882. fi
  883. fi
  884.  
  885. echo "$ac_t""$ac_cv_prog_gcc" 1>&6
  886.  
  887. if test $ac_cv_prog_gcc = yes; then
  888.   GCC=yes
  889.   ac_test_CFLAGS="${CFLAGS+set}"
  890.   ac_save_CFLAGS="$CFLAGS"
  891.   CFLAGS=
  892.   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
  893. echo "configure:894: checking whether ${CC-cc} accepts -g" >&5
  894. if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
  895.   echo $ac_n "(cached) $ac_c" 1>&6
  896. else
  897.   echo 'void f(){}' > conftest.c
  898. if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  899.   ac_cv_prog_cc_g=yes
  900. else
  901.   ac_cv_prog_cc_g=no
  902. fi
  903. rm -f conftest*
  904.  
  905. fi
  906.  
  907. echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
  908.   if test "$ac_test_CFLAGS" = set; then
  909.     CFLAGS="$ac_save_CFLAGS"
  910.   elif test $ac_cv_prog_cc_g = yes; then
  911.     CFLAGS="-g -O2"
  912.   else
  913.     CFLAGS="-O2"
  914.   fi
  915. else
  916.   GCC=
  917.   test "${CFLAGS+set}" = set || CFLAGS="-g"
  918. fi
  919.  
  920. echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
  921. echo "configure:922: checking how to run the C preprocessor" >&5
  922. # On Suns, sometimes $CPP names a directory.
  923. if test -n "$CPP" && test -d "$CPP"; then
  924.   CPP=
  925. fi
  926. if test -z "$CPP"; then
  927. if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
  928.   echo $ac_n "(cached) $ac_c" 1>&6
  929. else
  930.     # This must be in double quotes, not single quotes, because CPP may get
  931.   # substituted into the Makefile and "${CC-cc}" will confuse make.
  932.   CPP="${CC-cc} -E"
  933.   # On the NeXT, cc -E runs the code through the compiler's parser,
  934.   # not just through cpp.
  935.   cat > conftest.$ac_ext <<EOF
  936. #line 937 "configure"
  937. #include "confdefs.h"
  938. #include <assert.h>
  939. Syntax Error
  940. EOF
  941. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  942. { (eval echo configure:943: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  943. ac_err=`grep -v '^ *+' conftest.out`
  944. if test -z "$ac_err"; then
  945.   :
  946. else
  947.   echo "$ac_err" >&5
  948.   echo "configure: failed program was:" >&5
  949.   cat conftest.$ac_ext >&5
  950.   rm -rf conftest*
  951.   CPP="${CC-cc} -E -traditional-cpp"
  952.   cat > conftest.$ac_ext <<EOF
  953. #line 954 "configure"
  954. #include "confdefs.h"
  955. #include <assert.h>
  956. Syntax Error
  957. EOF
  958. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  959. { (eval echo configure:960: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  960. ac_err=`grep -v '^ *+' conftest.out`
  961. if test -z "$ac_err"; then
  962.   :
  963. else
  964.   echo "$ac_err" >&5
  965.   echo "configure: failed program was:" >&5
  966.   cat conftest.$ac_ext >&5
  967.   rm -rf conftest*
  968.   CPP=/lib/cpp
  969. fi
  970. rm -f conftest*
  971. fi
  972. rm -f conftest*
  973.   ac_cv_prog_CPP="$CPP"
  974. fi
  975.   CPP="$ac_cv_prog_CPP"
  976. else
  977.   ac_cv_prog_CPP="$CPP"
  978. fi
  979. echo "$ac_t""$CPP" 1>&6
  980.  
  981. if test $ac_cv_prog_gcc = yes; then
  982.     echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
  983. echo "configure:984: checking whether ${CC-cc} needs -traditional" >&5
  984. if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
  985.   echo $ac_n "(cached) $ac_c" 1>&6
  986. else
  987.     ac_pattern="Autoconf.*'x'"
  988.   cat > conftest.$ac_ext <<EOF
  989. #line 990 "configure"
  990. #include "confdefs.h"
  991. #include <sgtty.h>
  992. Autoconf TIOCGETP
  993. EOF
  994. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  995.   egrep "$ac_pattern" >/dev/null 2>&1; then
  996.   rm -rf conftest*
  997.   ac_cv_prog_gcc_traditional=yes
  998. else
  999.   rm -rf conftest*
  1000.   ac_cv_prog_gcc_traditional=no
  1001. fi
  1002. rm -f conftest*
  1003.  
  1004.  
  1005.   if test $ac_cv_prog_gcc_traditional = no; then
  1006.     cat > conftest.$ac_ext <<EOF
  1007. #line 1008 "configure"
  1008. #include "confdefs.h"
  1009. #include <termio.h>
  1010. Autoconf TCGETA
  1011. EOF
  1012. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1013.   egrep "$ac_pattern" >/dev/null 2>&1; then
  1014.   rm -rf conftest*
  1015.   ac_cv_prog_gcc_traditional=yes
  1016. fi
  1017. rm -f conftest*
  1018.  
  1019.   fi
  1020. fi
  1021.  
  1022. echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
  1023.   if test $ac_cv_prog_gcc_traditional = yes; then
  1024.     CC="$CC -traditional"
  1025.   fi
  1026. fi
  1027.  
  1028. # Extract the first word of "ranlib", so it can be a program name with args.
  1029. set dummy ranlib; ac_word=$2
  1030. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1031. echo "configure:1032: checking for $ac_word" >&5
  1032. if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
  1033.   echo $ac_n "(cached) $ac_c" 1>&6
  1034. else
  1035.   if test -n "$RANLIB"; then
  1036.   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
  1037. else
  1038.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  1039.   for ac_dir in $PATH; do
  1040.     test -z "$ac_dir" && ac_dir=.
  1041.     if test -f $ac_dir/$ac_word; then
  1042.       ac_cv_prog_RANLIB="ranlib"
  1043.       break
  1044.     fi
  1045.   done
  1046.   IFS="$ac_save_ifs"
  1047.   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
  1048. fi
  1049. fi
  1050. RANLIB="$ac_cv_prog_RANLIB"
  1051. if test -n "$RANLIB"; then
  1052.   echo "$ac_t""$RANLIB" 1>&6
  1053. else
  1054.   echo "$ac_t""no" 1>&6
  1055. fi
  1056.  
  1057. echo $ac_n "checking for AIX""... $ac_c" 1>&6
  1058. echo "configure:1059: checking for AIX" >&5
  1059. cat > conftest.$ac_ext <<EOF
  1060. #line 1061 "configure"
  1061. #include "confdefs.h"
  1062. #ifdef _AIX
  1063.   yes
  1064. #endif
  1065.  
  1066. EOF
  1067. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1068.   egrep "yes" >/dev/null 2>&1; then
  1069.   rm -rf conftest*
  1070.   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
  1071. #define _ALL_SOURCE 1
  1072. EOF
  1073.  
  1074. else
  1075.   rm -rf conftest*
  1076.   echo "$ac_t""no" 1>&6
  1077. fi
  1078. rm -f conftest*
  1079.  
  1080.  
  1081. ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
  1082. echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
  1083. echo "configure:1084: checking for minix/config.h" >&5
  1084. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1085.   echo $ac_n "(cached) $ac_c" 1>&6
  1086. else
  1087.   cat > conftest.$ac_ext <<EOF
  1088. #line 1089 "configure"
  1089. #include "confdefs.h"
  1090. #include <minix/config.h>
  1091. EOF
  1092. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1093. { (eval echo configure:1094: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1094. ac_err=`grep -v '^ *+' conftest.out`
  1095. if test -z "$ac_err"; then
  1096.   rm -rf conftest*
  1097.   eval "ac_cv_header_$ac_safe=yes"
  1098. else
  1099.   echo "$ac_err" >&5
  1100.   echo "configure: failed program was:" >&5
  1101.   cat conftest.$ac_ext >&5
  1102.   rm -rf conftest*
  1103.   eval "ac_cv_header_$ac_safe=no"
  1104. fi
  1105. rm -f conftest*
  1106. fi
  1107. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1108.   echo "$ac_t""yes" 1>&6
  1109.   MINIX=yes
  1110. else
  1111.   echo "$ac_t""no" 1>&6
  1112. MINIX=
  1113. fi
  1114.  
  1115. if test "$MINIX" = yes; then
  1116.   cat >> confdefs.h <<\EOF
  1117. #define _POSIX_SOURCE 1
  1118. EOF
  1119.  
  1120.   cat >> confdefs.h <<\EOF
  1121. #define _POSIX_1_SOURCE 2
  1122. EOF
  1123.  
  1124.   cat >> confdefs.h <<\EOF
  1125. #define _MINIX 1
  1126. EOF
  1127.  
  1128. fi
  1129.  
  1130.  
  1131. echo $ac_n "checking which of GNU rx or gawk's regex is wanted""... $ac_c" 1>&6
  1132. echo "configure:1133: checking which of GNU rx or gawk's regex is wanted" >&5
  1133. # Check whether --with-regex or --without-regex was given.
  1134. if test "${with_regex+set}" = set; then
  1135.   withval="$with_regex"
  1136.   test "$withval" = yes && am_with_regex=1
  1137. else
  1138.   am_with_regex=1
  1139. fi
  1140.  
  1141. if test -n "$am_with_regex"; then
  1142.   echo "$ac_t""regex" 1>&6
  1143.   cat >> confdefs.h <<\EOF
  1144. #define WITH_REGEX 1
  1145. EOF
  1146.  
  1147.   echo $ac_n "checking for GNU regex in libc""... $ac_c" 1>&6
  1148. echo "configure:1149: checking for GNU regex in libc" >&5
  1149. if eval "test \"`echo '$''{'am_cv_gnu_regex'+set}'`\" = set"; then
  1150.   echo $ac_n "(cached) $ac_c" 1>&6
  1151. else
  1152.   cat > conftest.$ac_ext <<EOF
  1153. #line 1154 "configure"
  1154. #include "confdefs.h"
  1155.  
  1156. int main() {
  1157. extern int re_max_failures; re_max_failures = 1
  1158. ; return 0; }
  1159. EOF
  1160. if { (eval echo configure:1161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1161.   rm -rf conftest*
  1162.   am_cv_gnu_regex=yes
  1163. else
  1164.   echo "configure: failed program was:" >&5
  1165.   cat conftest.$ac_ext >&5
  1166.   rm -rf conftest*
  1167.   am_cv_gnu_regex=no
  1168. fi
  1169. rm -f conftest*
  1170. fi
  1171.  
  1172. echo "$ac_t""$am_cv_gnu_regex" 1>&6
  1173.   if test $am_cv_gnu_regex = no; then
  1174.     LIBOBJS="$LIBOBJS regex.o"
  1175.   fi
  1176. else
  1177.   echo "$ac_t""rx" 1>&6
  1178.   echo $ac_n "checking for re_rx_search""... $ac_c" 1>&6
  1179. echo "configure:1180: checking for re_rx_search" >&5
  1180. if eval "test \"`echo '$''{'ac_cv_func_re_rx_search'+set}'`\" = set"; then
  1181.   echo $ac_n "(cached) $ac_c" 1>&6
  1182. else
  1183.   cat > conftest.$ac_ext <<EOF
  1184. #line 1185 "configure"
  1185. #include "confdefs.h"
  1186. /* System header to define __stub macros and hopefully few prototypes,
  1187.     which can conflict with char re_rx_search(); below.  */
  1188. #include <assert.h>
  1189. /* Override any gcc2 internal prototype to avoid an error.  */
  1190. /* We use char because int might match the return type of a gcc2
  1191.     builtin and then its argument prototype would still apply.  */
  1192. char re_rx_search();
  1193.  
  1194. int main() {
  1195.  
  1196. /* The GNU C library defines this for functions which it implements
  1197.     to always fail with ENOSYS.  Some functions are actually named
  1198.     something starting with __ and the normal name is an alias.  */
  1199. #if defined (__stub_re_rx_search) || defined (__stub___re_rx_search)
  1200. choke me
  1201. #else
  1202. re_rx_search();
  1203. #endif
  1204.  
  1205. ; return 0; }
  1206. EOF
  1207. if { (eval echo configure:1208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1208.   rm -rf conftest*
  1209.   eval "ac_cv_func_re_rx_search=yes"
  1210. else
  1211.   echo "configure: failed program was:" >&5
  1212.   cat conftest.$ac_ext >&5
  1213.   rm -rf conftest*
  1214.   eval "ac_cv_func_re_rx_search=no"
  1215. fi
  1216. rm -f conftest*
  1217. fi
  1218.  
  1219. if eval "test \"`echo '$ac_cv_func_'re_rx_search`\" = yes"; then
  1220.   echo "$ac_t""yes" 1>&6
  1221.   :
  1222. else
  1223.   echo "$ac_t""no" 1>&6
  1224. LIBOBJS="$LIBOBJS rx.o"
  1225. fi
  1226.  
  1227. fi
  1228.  
  1229.  
  1230. for ac_hdr in limits.h string.h memory.h fcntl.h float.h unistd.h values.h
  1231. do
  1232. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  1233. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  1234. echo "configure:1235: checking for $ac_hdr" >&5
  1235. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1236.   echo $ac_n "(cached) $ac_c" 1>&6
  1237. else
  1238.   cat > conftest.$ac_ext <<EOF
  1239. #line 1240 "configure"
  1240. #include "confdefs.h"
  1241. #include <$ac_hdr>
  1242. EOF
  1243. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1244. { (eval echo configure:1245: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1245. ac_err=`grep -v '^ *+' conftest.out`
  1246. if test -z "$ac_err"; then
  1247.   rm -rf conftest*
  1248.   eval "ac_cv_header_$ac_safe=yes"
  1249. else
  1250.   echo "$ac_err" >&5
  1251.   echo "configure: failed program was:" >&5
  1252.   cat conftest.$ac_ext >&5
  1253.   rm -rf conftest*
  1254.   eval "ac_cv_header_$ac_safe=no"
  1255. fi
  1256. rm -f conftest*
  1257. fi
  1258. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1259.   echo "$ac_t""yes" 1>&6
  1260.     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  1261.   cat >> confdefs.h <<EOF
  1262. #define $ac_tr_hdr 1
  1263. EOF
  1264.  
  1265. else
  1266.   echo "$ac_t""no" 1>&6
  1267. fi
  1268. done
  1269.  
  1270. echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
  1271. echo "configure:1272: checking whether stat file-mode macros are broken" >&5
  1272. if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
  1273.   echo $ac_n "(cached) $ac_c" 1>&6
  1274. else
  1275.   cat > conftest.$ac_ext <<EOF
  1276. #line 1277 "configure"
  1277. #include "confdefs.h"
  1278. #include <sys/types.h>
  1279. #include <sys/stat.h>
  1280.  
  1281. #if defined(S_ISBLK) && defined(S_IFDIR)
  1282. # if S_ISBLK (S_IFDIR)
  1283. You lose.
  1284. # endif
  1285. #endif
  1286.  
  1287. #if defined(S_ISBLK) && defined(S_IFCHR)
  1288. # if S_ISBLK (S_IFCHR)
  1289. You lose.
  1290. # endif
  1291. #endif
  1292.  
  1293. #if defined(S_ISLNK) && defined(S_IFREG)
  1294. # if S_ISLNK (S_IFREG)
  1295. You lose.
  1296. # endif
  1297. #endif
  1298.  
  1299. #if defined(S_ISSOCK) && defined(S_IFREG)
  1300. # if S_ISSOCK (S_IFREG)
  1301. You lose.
  1302. # endif
  1303. #endif
  1304.  
  1305. EOF
  1306. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1307.   egrep "You lose" >/dev/null 2>&1; then
  1308.   rm -rf conftest*
  1309.   ac_cv_header_stat_broken=yes
  1310. else
  1311.   rm -rf conftest*
  1312.   ac_cv_header_stat_broken=no
  1313. fi
  1314. rm -f conftest*
  1315.  
  1316. fi
  1317.  
  1318. echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
  1319. if test $ac_cv_header_stat_broken = yes; then
  1320.   cat >> confdefs.h <<\EOF
  1321. #define STAT_MACROS_BROKEN 1
  1322. EOF
  1323.  
  1324. fi
  1325.  
  1326. echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
  1327. echo "configure:1328: checking for ANSI C header files" >&5
  1328. if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
  1329.   echo $ac_n "(cached) $ac_c" 1>&6
  1330. else
  1331.   cat > conftest.$ac_ext <<EOF
  1332. #line 1333 "configure"
  1333. #include "confdefs.h"
  1334. #include <stdlib.h>
  1335. #include <stdarg.h>
  1336. #include <string.h>
  1337. #include <float.h>
  1338. EOF
  1339. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1340. { (eval echo configure:1341: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1341. ac_err=`grep -v '^ *+' conftest.out`
  1342. if test -z "$ac_err"; then
  1343.   rm -rf conftest*
  1344.   ac_cv_header_stdc=yes
  1345. else
  1346.   echo "$ac_err" >&5
  1347.   echo "configure: failed program was:" >&5
  1348.   cat conftest.$ac_ext >&5
  1349.   rm -rf conftest*
  1350.   ac_cv_header_stdc=no
  1351. fi
  1352. rm -f conftest*
  1353.  
  1354. if test $ac_cv_header_stdc = yes; then
  1355.   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  1356. cat > conftest.$ac_ext <<EOF
  1357. #line 1358 "configure"
  1358. #include "confdefs.h"
  1359. #include <string.h>
  1360. EOF
  1361. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1362.   egrep "memchr" >/dev/null 2>&1; then
  1363.   :
  1364. else
  1365.   rm -rf conftest*
  1366.   ac_cv_header_stdc=no
  1367. fi
  1368. rm -f conftest*
  1369.  
  1370. fi
  1371.  
  1372. if test $ac_cv_header_stdc = yes; then
  1373.   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  1374. cat > conftest.$ac_ext <<EOF
  1375. #line 1376 "configure"
  1376. #include "confdefs.h"
  1377. #include <stdlib.h>
  1378. EOF
  1379. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1380.   egrep "free" >/dev/null 2>&1; then
  1381.   :
  1382. else
  1383.   rm -rf conftest*
  1384.   ac_cv_header_stdc=no
  1385. fi
  1386. rm -f conftest*
  1387.  
  1388. fi
  1389.  
  1390. if test $ac_cv_header_stdc = yes; then
  1391.   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  1392. if test "$cross_compiling" = yes; then
  1393.   :
  1394. else
  1395.   cat > conftest.$ac_ext <<EOF
  1396. #line 1397 "configure"
  1397. #include "confdefs.h"
  1398. #include <ctype.h>
  1399. #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  1400. #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  1401. #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
  1402. int main () { int i; for (i = 0; i < 256; i++)
  1403. if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  1404. exit (0); }
  1405.  
  1406. EOF
  1407. if { (eval echo configure:1408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  1408. then
  1409.   :
  1410. else
  1411.   echo "configure: failed program was:" >&5
  1412.   cat conftest.$ac_ext >&5
  1413.   rm -fr conftest*
  1414.   ac_cv_header_stdc=no
  1415. fi
  1416. rm -fr conftest*
  1417. fi
  1418.  
  1419. fi
  1420. fi
  1421.  
  1422. echo "$ac_t""$ac_cv_header_stdc" 1>&6
  1423. if test $ac_cv_header_stdc = yes; then
  1424.   cat >> confdefs.h <<\EOF
  1425. #define STDC_HEADERS 1
  1426. EOF
  1427.  
  1428. fi
  1429.  
  1430.  
  1431.  
  1432. echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
  1433. echo "configure:1434: checking for ${CC-cc} option to accept ANSI C" >&5
  1434. if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
  1435.   echo $ac_n "(cached) $ac_c" 1>&6
  1436. else
  1437.   am_cv_prog_cc_stdc=no
  1438. ac_save_CC="$CC"
  1439. # Don't try gcc -ansi; that turns off useful extensions and
  1440. # breaks some systems' header files.
  1441. # AIX            -qlanglvl=ansi
  1442. # Ultrix and OSF/1    -std1
  1443. # HP-UX            -Aa -D_HPUX_SOURCE
  1444. # SVR4            -Xc -D__EXTENSIONS__
  1445. for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
  1446. do
  1447.   CC="$ac_save_CC $ac_arg"
  1448.   cat > conftest.$ac_ext <<EOF
  1449. #line 1450 "configure"
  1450. #include "confdefs.h"
  1451. #if !defined(__STDC__) || __STDC__ != 1
  1452. choke me
  1453. #endif
  1454. /* DYNIX/ptx V4.1.3 can't compile sys/stat.h with -Xc -D__EXTENSIONS__. */
  1455. #ifdef _SEQUENT_
  1456. # include <sys/types.h>
  1457. # include <sys/stat.h>
  1458. #endif
  1459.  
  1460. int main() {
  1461.  
  1462. int test (int i, double x);
  1463. struct s1 {int (*f) (int a);};
  1464. struct s2 {int (*f) (double a);};
  1465. ; return 0; }
  1466. EOF
  1467. if { (eval echo configure:1468: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1468.   rm -rf conftest*
  1469.   am_cv_prog_cc_stdc="$ac_arg"; break
  1470. else
  1471.   echo "configure: failed program was:" >&5
  1472.   cat conftest.$ac_ext >&5
  1473. fi
  1474. rm -f conftest*
  1475. done
  1476. CC="$ac_save_CC"
  1477.  
  1478. fi
  1479.  
  1480. echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
  1481. case "x$am_cv_prog_cc_stdc" in
  1482.   x|xno) ;;
  1483.   *) CC="$CC $am_cv_prog_cc_stdc" ;;
  1484. esac
  1485.  
  1486.  
  1487.  
  1488. echo $ac_n "checking for function prototypes""... $ac_c" 1>&6
  1489. echo "configure:1490: checking for function prototypes" >&5
  1490. if test "$am_cv_prog_cc_stdc" != no; then
  1491.   echo "$ac_t""yes" 1>&6
  1492.   cat >> confdefs.h <<\EOF
  1493. #define PROTOTYPES 1
  1494. EOF
  1495.  
  1496.   U= ANSI2KNR=
  1497. else
  1498.   echo "$ac_t""no" 1>&6
  1499.   U=_ ANSI2KNR=./ansi2knr
  1500.   # Ensure some checks needed by ansi2knr itself.
  1501.   echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
  1502. echo "configure:1503: checking for ANSI C header files" >&5
  1503. if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
  1504.   echo $ac_n "(cached) $ac_c" 1>&6
  1505. else
  1506.   cat > conftest.$ac_ext <<EOF
  1507. #line 1508 "configure"
  1508. #include "confdefs.h"
  1509. #include <stdlib.h>
  1510. #include <stdarg.h>
  1511. #include <string.h>
  1512. #include <float.h>
  1513. EOF
  1514. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1515. { (eval echo configure:1516: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1516. ac_err=`grep -v '^ *+' conftest.out`
  1517. if test -z "$ac_err"; then
  1518.   rm -rf conftest*
  1519.   ac_cv_header_stdc=yes
  1520. else
  1521.   echo "$ac_err" >&5
  1522.   echo "configure: failed program was:" >&5
  1523.   cat conftest.$ac_ext >&5
  1524.   rm -rf conftest*
  1525.   ac_cv_header_stdc=no
  1526. fi
  1527. rm -f conftest*
  1528.  
  1529. if test $ac_cv_header_stdc = yes; then
  1530.   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  1531. cat > conftest.$ac_ext <<EOF
  1532. #line 1533 "configure"
  1533. #include "confdefs.h"
  1534. #include <string.h>
  1535. EOF
  1536. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1537.   egrep "memchr" >/dev/null 2>&1; then
  1538.   :
  1539. else
  1540.   rm -rf conftest*
  1541.   ac_cv_header_stdc=no
  1542. fi
  1543. rm -f conftest*
  1544.  
  1545. fi
  1546.  
  1547. if test $ac_cv_header_stdc = yes; then
  1548.   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  1549. cat > conftest.$ac_ext <<EOF
  1550. #line 1551 "configure"
  1551. #include "confdefs.h"
  1552. #include <stdlib.h>
  1553. EOF
  1554. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1555.   egrep "free" >/dev/null 2>&1; then
  1556.   :
  1557. else
  1558.   rm -rf conftest*
  1559.   ac_cv_header_stdc=no
  1560. fi
  1561. rm -f conftest*
  1562.  
  1563. fi
  1564.  
  1565. if test $ac_cv_header_stdc = yes; then
  1566.   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  1567. if test "$cross_compiling" = yes; then
  1568.   :
  1569. else
  1570.   cat > conftest.$ac_ext <<EOF
  1571. #line 1572 "configure"
  1572. #include "confdefs.h"
  1573. #include <ctype.h>
  1574. #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  1575. #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  1576. #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
  1577. int main () { int i; for (i = 0; i < 256; i++)
  1578. if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  1579. exit (0); }
  1580.  
  1581. EOF
  1582. if { (eval echo configure:1583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  1583. then
  1584.   :
  1585. else
  1586.   echo "configure: failed program was:" >&5
  1587.   cat conftest.$ac_ext >&5
  1588.   rm -fr conftest*
  1589.   ac_cv_header_stdc=no
  1590. fi
  1591. rm -fr conftest*
  1592. fi
  1593.  
  1594. fi
  1595. fi
  1596.  
  1597. echo "$ac_t""$ac_cv_header_stdc" 1>&6
  1598. if test $ac_cv_header_stdc = yes; then
  1599.   cat >> confdefs.h <<\EOF
  1600. #define STDC_HEADERS 1
  1601. EOF
  1602.  
  1603. fi
  1604.  
  1605.   for ac_hdr in string.h
  1606. do
  1607. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  1608. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  1609. echo "configure:1610: checking for $ac_hdr" >&5
  1610. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1611.   echo $ac_n "(cached) $ac_c" 1>&6
  1612. else
  1613.   cat > conftest.$ac_ext <<EOF
  1614. #line 1615 "configure"
  1615. #include "confdefs.h"
  1616. #include <$ac_hdr>
  1617. EOF
  1618. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1619. { (eval echo configure:1620: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1620. ac_err=`grep -v '^ *+' conftest.out`
  1621. if test -z "$ac_err"; then
  1622.   rm -rf conftest*
  1623.   eval "ac_cv_header_$ac_safe=yes"
  1624. else
  1625.   echo "$ac_err" >&5
  1626.   echo "configure: failed program was:" >&5
  1627.   cat conftest.$ac_ext >&5
  1628.   rm -rf conftest*
  1629.   eval "ac_cv_header_$ac_safe=no"
  1630. fi
  1631. rm -f conftest*
  1632. fi
  1633. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1634.   echo "$ac_t""yes" 1>&6
  1635.     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  1636.   cat >> confdefs.h <<EOF
  1637. #define $ac_tr_hdr 1
  1638. EOF
  1639.  
  1640. else
  1641.   echo "$ac_t""no" 1>&6
  1642. fi
  1643. done
  1644.  
  1645. fi
  1646.  
  1647.  
  1648. echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
  1649. echo "configure:1650: checking whether byte ordering is bigendian" >&5
  1650. if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
  1651.   echo $ac_n "(cached) $ac_c" 1>&6
  1652. else
  1653.   ac_cv_c_bigendian=unknown
  1654. # See if sys/param.h defines the BYTE_ORDER macro.
  1655. cat > conftest.$ac_ext <<EOF
  1656. #line 1657 "configure"
  1657. #include "confdefs.h"
  1658. #include <sys/types.h>
  1659. #include <sys/param.h>
  1660. int main() {
  1661.  
  1662. #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
  1663.  bogus endian macros
  1664. #endif
  1665. ; return 0; }
  1666. EOF
  1667. if { (eval echo configure:1668: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1668.   rm -rf conftest*
  1669.   # It does; now see whether it defined to BIG_ENDIAN or not.
  1670. cat > conftest.$ac_ext <<EOF
  1671. #line 1672 "configure"
  1672. #include "confdefs.h"
  1673. #include <sys/types.h>
  1674. #include <sys/param.h>
  1675. int main() {
  1676.  
  1677. #if BYTE_ORDER != BIG_ENDIAN
  1678.  not big endian
  1679. #endif
  1680. ; return 0; }
  1681. EOF
  1682. if { (eval echo configure:1683: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1683.   rm -rf conftest*
  1684.   ac_cv_c_bigendian=yes
  1685. else
  1686.   echo "configure: failed program was:" >&5
  1687.   cat conftest.$ac_ext >&5
  1688.   rm -rf conftest*
  1689.   ac_cv_c_bigendian=no
  1690. fi
  1691. rm -f conftest*
  1692. else
  1693.   echo "configure: failed program was:" >&5
  1694.   cat conftest.$ac_ext >&5
  1695. fi
  1696. rm -f conftest*
  1697. if test $ac_cv_c_bigendian = unknown; then
  1698. if test "$cross_compiling" = yes; then
  1699.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  1700. else
  1701.   cat > conftest.$ac_ext <<EOF
  1702. #line 1703 "configure"
  1703. #include "confdefs.h"
  1704. main () {
  1705.   /* Are we little or big endian?  From Harbison&Steele.  */
  1706.   union
  1707.   {
  1708.     long l;
  1709.     char c[sizeof (long)];
  1710.   } u;
  1711.   u.l = 1;
  1712.   exit (u.c[sizeof (long) - 1] == 1);
  1713. }
  1714. EOF
  1715. if { (eval echo configure:1716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  1716. then
  1717.   ac_cv_c_bigendian=no
  1718. else
  1719.   echo "configure: failed program was:" >&5
  1720.   cat conftest.$ac_ext >&5
  1721.   rm -fr conftest*
  1722.   ac_cv_c_bigendian=yes
  1723. fi
  1724. rm -fr conftest*
  1725. fi
  1726.  
  1727. fi
  1728. fi
  1729.  
  1730. echo "$ac_t""$ac_cv_c_bigendian" 1>&6
  1731. if test $ac_cv_c_bigendian = yes; then
  1732.   cat >> confdefs.h <<\EOF
  1733. #define WORDS_BIGENDIAN 1
  1734. EOF
  1735.  
  1736. fi
  1737.  
  1738. echo $ac_n "checking for working const""... $ac_c" 1>&6
  1739. echo "configure:1740: checking for working const" >&5
  1740. if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
  1741.   echo $ac_n "(cached) $ac_c" 1>&6
  1742. else
  1743.   cat > conftest.$ac_ext <<EOF
  1744. #line 1745 "configure"
  1745. #include "confdefs.h"
  1746.  
  1747. int main() {
  1748.  
  1749. /* Ultrix mips cc rejects this.  */
  1750. typedef int charset[2]; const charset x;
  1751. /* SunOS 4.1.1 cc rejects this.  */
  1752. char const *const *ccp;
  1753. char **p;
  1754. /* NEC SVR4.0.2 mips cc rejects this.  */
  1755. struct point {int x, y;};
  1756. static struct point const zero = {0,0};
  1757. /* AIX XL C 1.02.0.0 rejects this.
  1758.    It does not let you subtract one const X* pointer from another in an arm
  1759.    of an if-expression whose if-part is not a constant expression */
  1760. const char *g = "string";
  1761. ccp = &g + (g ? g-g : 0);
  1762. /* HPUX 7.0 cc rejects these. */
  1763. ++ccp;
  1764. p = (char**) ccp;
  1765. ccp = (char const *const *) p;
  1766. { /* SCO 3.2v4 cc rejects this.  */
  1767.   char *t;
  1768.   char const *s = 0 ? (char *) 0 : (char const *) 0;
  1769.  
  1770.   *t++ = 0;
  1771. }
  1772. { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
  1773.   int x[] = {25, 17};
  1774.   const int *foo = &x[0];
  1775.   ++foo;
  1776. }
  1777. { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
  1778.   typedef const int *iptr;
  1779.   iptr p = 0;
  1780.   ++p;
  1781. }
  1782. { /* AIX XL C 1.02.0.0 rejects this saying
  1783.      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
  1784.   struct s { int j; const int *ap[3]; };
  1785.   struct s *b; b->j = 5;
  1786. }
  1787. { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
  1788.   const int foo = 10;
  1789. }
  1790.  
  1791. ; return 0; }
  1792. EOF
  1793. if { (eval echo configure:1794: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1794.   rm -rf conftest*
  1795.   ac_cv_c_const=yes
  1796. else
  1797.   echo "configure: failed program was:" >&5
  1798.   cat conftest.$ac_ext >&5
  1799.   rm -rf conftest*
  1800.   ac_cv_c_const=no
  1801. fi
  1802. rm -f conftest*
  1803. fi
  1804.  
  1805. echo "$ac_t""$ac_cv_c_const" 1>&6
  1806. if test $ac_cv_c_const = no; then
  1807.   cat >> confdefs.h <<\EOF
  1808. #define const 
  1809. EOF
  1810.  
  1811. fi
  1812.  
  1813. echo $ac_n "checking for inline""... $ac_c" 1>&6
  1814. echo "configure:1815: checking for inline" >&5
  1815. if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
  1816.   echo $ac_n "(cached) $ac_c" 1>&6
  1817. else
  1818.   ac_cv_c_inline=no
  1819. for ac_kw in inline __inline__ __inline; do
  1820.   cat > conftest.$ac_ext <<EOF
  1821. #line 1822 "configure"
  1822. #include "confdefs.h"
  1823.  
  1824. int main() {
  1825. } $ac_kw foo() {
  1826. ; return 0; }
  1827. EOF
  1828. if { (eval echo configure:1829: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1829.   rm -rf conftest*
  1830.   ac_cv_c_inline=$ac_kw; break
  1831. else
  1832.   echo "configure: failed program was:" >&5
  1833.   cat conftest.$ac_ext >&5
  1834. fi
  1835. rm -f conftest*
  1836. done
  1837.  
  1838. fi
  1839.  
  1840. echo "$ac_t""$ac_cv_c_inline" 1>&6
  1841. case "$ac_cv_c_inline" in
  1842.   inline | yes) ;;
  1843.   no) cat >> confdefs.h <<\EOF
  1844. #define inline 
  1845. EOF
  1846.  ;;
  1847.   *)  cat >> confdefs.h <<EOF
  1848. #define inline $ac_cv_c_inline
  1849. EOF
  1850.  ;;
  1851. esac
  1852.  
  1853. echo $ac_n "checking for long double""... $ac_c" 1>&6
  1854. echo "configure:1855: checking for long double" >&5
  1855. if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then
  1856.   echo $ac_n "(cached) $ac_c" 1>&6
  1857. else
  1858.   if test "$GCC" = yes; then
  1859.   ac_cv_c_long_double=yes
  1860. else
  1861. if test "$cross_compiling" = yes; then
  1862.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  1863. else
  1864.   cat > conftest.$ac_ext <<EOF
  1865. #line 1866 "configure"
  1866. #include "confdefs.h"
  1867. int main() {
  1868. /* The Stardent Vistra knows sizeof(long double), but does not support it.  */
  1869. long double foo = 0.0;
  1870. /* On Ultrix 4.3 cc, long double is 4 and double is 8.  */
  1871. exit(sizeof(long double) < sizeof(double)); }
  1872. EOF
  1873. if { (eval echo configure:1874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  1874. then
  1875.   ac_cv_c_long_double=yes
  1876. else
  1877.   echo "configure: failed program was:" >&5
  1878.   cat conftest.$ac_ext >&5
  1879.   rm -fr conftest*
  1880.   ac_cv_c_long_double=no
  1881. fi
  1882. rm -fr conftest*
  1883. fi
  1884.  
  1885. fi
  1886. fi
  1887.  
  1888. echo "$ac_t""$ac_cv_c_long_double" 1>&6
  1889. if test $ac_cv_c_long_double = yes; then
  1890.   cat >> confdefs.h <<\EOF
  1891. #define HAVE_LONG_DOUBLE 1
  1892. EOF
  1893.  
  1894. fi
  1895.  
  1896.  
  1897. ac_header_dirent=no
  1898. for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
  1899. do
  1900. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  1901. echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
  1902. echo "configure:1903: checking for $ac_hdr that defines DIR" >&5
  1903. if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
  1904.   echo $ac_n "(cached) $ac_c" 1>&6
  1905. else
  1906.   cat > conftest.$ac_ext <<EOF
  1907. #line 1908 "configure"
  1908. #include "confdefs.h"
  1909. #include <sys/types.h>
  1910. #include <$ac_hdr>
  1911. int main() {
  1912. DIR *dirp = 0;
  1913. ; return 0; }
  1914. EOF
  1915. if { (eval echo configure:1916: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1916.   rm -rf conftest*
  1917.   eval "ac_cv_header_dirent_$ac_safe=yes"
  1918. else
  1919.   echo "configure: failed program was:" >&5
  1920.   cat conftest.$ac_ext >&5
  1921.   rm -rf conftest*
  1922.   eval "ac_cv_header_dirent_$ac_safe=no"
  1923. fi
  1924. rm -f conftest*
  1925. fi
  1926. if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
  1927.   echo "$ac_t""yes" 1>&6
  1928.     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  1929.   cat >> confdefs.h <<EOF
  1930. #define $ac_tr_hdr 1
  1931. EOF
  1932.  ac_header_dirent=$ac_hdr; break
  1933. else
  1934.   echo "$ac_t""no" 1>&6
  1935. fi
  1936. done
  1937. # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
  1938. if test $ac_header_dirent = dirent.h; then
  1939. echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
  1940. echo "configure:1941: checking for opendir in -ldir" >&5
  1941. ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
  1942. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1943.   echo $ac_n "(cached) $ac_c" 1>&6
  1944. else
  1945.   ac_save_LIBS="$LIBS"
  1946. LIBS="-ldir  $LIBS"
  1947. cat > conftest.$ac_ext <<EOF
  1948. #line 1949 "configure"
  1949. #include "confdefs.h"
  1950. /* Override any gcc2 internal prototype to avoid an error.  */
  1951. /* We use char because int might match the return type of a gcc2
  1952.     builtin and then its argument prototype would still apply.  */
  1953. char opendir();
  1954.  
  1955. int main() {
  1956. opendir()
  1957. ; return 0; }
  1958. EOF
  1959. if { (eval echo configure:1960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1960.   rm -rf conftest*
  1961.   eval "ac_cv_lib_$ac_lib_var=yes"
  1962. else
  1963.   echo "configure: failed program was:" >&5
  1964.   cat conftest.$ac_ext >&5
  1965.   rm -rf conftest*
  1966.   eval "ac_cv_lib_$ac_lib_var=no"
  1967. fi
  1968. rm -f conftest*
  1969. LIBS="$ac_save_LIBS"
  1970.  
  1971. fi
  1972. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1973.   echo "$ac_t""yes" 1>&6
  1974.   LIBS="$LIBS -ldir"
  1975. else
  1976.   echo "$ac_t""no" 1>&6
  1977. fi
  1978.  
  1979. else
  1980. echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
  1981. echo "configure:1982: checking for opendir in -lx" >&5
  1982. ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
  1983. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1984.   echo $ac_n "(cached) $ac_c" 1>&6
  1985. else
  1986.   ac_save_LIBS="$LIBS"
  1987. LIBS="-lx  $LIBS"
  1988. cat > conftest.$ac_ext <<EOF
  1989. #line 1990 "configure"
  1990. #include "confdefs.h"
  1991. /* Override any gcc2 internal prototype to avoid an error.  */
  1992. /* We use char because int might match the return type of a gcc2
  1993.     builtin and then its argument prototype would still apply.  */
  1994. char opendir();
  1995.  
  1996. int main() {
  1997. opendir()
  1998. ; return 0; }
  1999. EOF
  2000. if { (eval echo configure:2001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2001.   rm -rf conftest*
  2002.   eval "ac_cv_lib_$ac_lib_var=yes"
  2003. else
  2004.   echo "configure: failed program was:" >&5
  2005.   cat conftest.$ac_ext >&5
  2006.   rm -rf conftest*
  2007.   eval "ac_cv_lib_$ac_lib_var=no"
  2008. fi
  2009. rm -f conftest*
  2010. LIBS="$ac_save_LIBS"
  2011.  
  2012. fi
  2013. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2014.   echo "$ac_t""yes" 1>&6
  2015.   LIBS="$LIBS -lx"
  2016. else
  2017.   echo "$ac_t""no" 1>&6
  2018. fi
  2019.  
  2020. fi
  2021.  
  2022. echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
  2023. echo "configure:2024: checking for st_blksize in struct stat" >&5
  2024. if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
  2025.   echo $ac_n "(cached) $ac_c" 1>&6
  2026. else
  2027.   cat > conftest.$ac_ext <<EOF
  2028. #line 2029 "configure"
  2029. #include "confdefs.h"
  2030. #include <sys/types.h>
  2031. #include <sys/stat.h>
  2032. int main() {
  2033. struct stat s; s.st_blksize;
  2034. ; return 0; }
  2035. EOF
  2036. if { (eval echo configure:2037: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2037.   rm -rf conftest*
  2038.   ac_cv_struct_st_blksize=yes
  2039. else
  2040.   echo "configure: failed program was:" >&5
  2041.   cat conftest.$ac_ext >&5
  2042.   rm -rf conftest*
  2043.   ac_cv_struct_st_blksize=no
  2044. fi
  2045. rm -f conftest*
  2046. fi
  2047.  
  2048. echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
  2049. if test $ac_cv_struct_st_blksize = yes; then
  2050.   cat >> confdefs.h <<\EOF
  2051. #define HAVE_ST_BLKSIZE 1
  2052. EOF
  2053.  
  2054. fi
  2055.  
  2056. echo $ac_n "checking for off_t""... $ac_c" 1>&6
  2057. echo "configure:2058: checking for off_t" >&5
  2058. if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
  2059.   echo $ac_n "(cached) $ac_c" 1>&6
  2060. else
  2061.   cat > conftest.$ac_ext <<EOF
  2062. #line 2063 "configure"
  2063. #include "confdefs.h"
  2064. #include <sys/types.h>
  2065. #if STDC_HEADERS
  2066. #include <stdlib.h>
  2067. #include <stddef.h>
  2068. #endif
  2069. EOF
  2070. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2071.   egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  2072.   rm -rf conftest*
  2073.   ac_cv_type_off_t=yes
  2074. else
  2075.   rm -rf conftest*
  2076.   ac_cv_type_off_t=no
  2077. fi
  2078. rm -f conftest*
  2079.  
  2080. fi
  2081. echo "$ac_t""$ac_cv_type_off_t" 1>&6
  2082. if test $ac_cv_type_off_t = no; then
  2083.   cat >> confdefs.h <<\EOF
  2084. #define off_t long
  2085. EOF
  2086.  
  2087. fi
  2088.  
  2089. echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
  2090. echo "configure:2091: checking return type of signal handlers" >&5
  2091. if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
  2092.   echo $ac_n "(cached) $ac_c" 1>&6
  2093. else
  2094.   cat > conftest.$ac_ext <<EOF
  2095. #line 2096 "configure"
  2096. #include "confdefs.h"
  2097. #include <sys/types.h>
  2098. #include <signal.h>
  2099. #ifdef signal
  2100. #undef signal
  2101. #endif
  2102. #ifdef __cplusplus
  2103. extern "C" void (*signal (int, void (*)(int)))(int);
  2104. #else
  2105. void (*signal ()) ();
  2106. #endif
  2107.  
  2108. int main() {
  2109. int i;
  2110. ; return 0; }
  2111. EOF
  2112. if { (eval echo configure:2113: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2113.   rm -rf conftest*
  2114.   ac_cv_type_signal=void
  2115. else
  2116.   echo "configure: failed program was:" >&5
  2117.   cat conftest.$ac_ext >&5
  2118.   rm -rf conftest*
  2119.   ac_cv_type_signal=int
  2120. fi
  2121. rm -f conftest*
  2122. fi
  2123.  
  2124. echo "$ac_t""$ac_cv_type_signal" 1>&6
  2125. cat >> confdefs.h <<EOF
  2126. #define RETSIGTYPE $ac_cv_type_signal
  2127. EOF
  2128.  
  2129.  
  2130. echo $ac_n "checking for size_t""... $ac_c" 1>&6
  2131. echo "configure:2132: checking for size_t" >&5
  2132. if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
  2133.   echo $ac_n "(cached) $ac_c" 1>&6
  2134. else
  2135.   cat > conftest.$ac_ext <<EOF
  2136. #line 2137 "configure"
  2137. #include "confdefs.h"
  2138. #include <sys/types.h>
  2139. #if STDC_HEADERS
  2140. #include <stdlib.h>
  2141. #include <stddef.h>
  2142. #endif
  2143. EOF
  2144. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2145.   egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  2146.   rm -rf conftest*
  2147.   ac_cv_type_size_t=yes
  2148. else
  2149.   rm -rf conftest*
  2150.   ac_cv_type_size_t=no
  2151. fi
  2152. rm -f conftest*
  2153.  
  2154. fi
  2155. echo "$ac_t""$ac_cv_type_size_t" 1>&6
  2156. if test $ac_cv_type_size_t = no; then
  2157.   cat >> confdefs.h <<\EOF
  2158. #define size_t unsigned
  2159. EOF
  2160.  
  2161. fi
  2162.  
  2163.  
  2164. echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6
  2165. echo "configure:2166: checking for strerror in -lcposix" >&5
  2166. ac_lib_var=`echo cposix'_'strerror | sed 'y%./+-%__p_%'`
  2167. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2168.   echo $ac_n "(cached) $ac_c" 1>&6
  2169. else
  2170.   ac_save_LIBS="$LIBS"
  2171. LIBS="-lcposix  $LIBS"
  2172. cat > conftest.$ac_ext <<EOF
  2173. #line 2174 "configure"
  2174. #include "confdefs.h"
  2175. /* Override any gcc2 internal prototype to avoid an error.  */
  2176. /* We use char because int might match the return type of a gcc2
  2177.     builtin and then its argument prototype would still apply.  */
  2178. char strerror();
  2179.  
  2180. int main() {
  2181. strerror()
  2182. ; return 0; }
  2183. EOF
  2184. if { (eval echo configure:2185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2185.   rm -rf conftest*
  2186.   eval "ac_cv_lib_$ac_lib_var=yes"
  2187. else
  2188.   echo "configure: failed program was:" >&5
  2189.   cat conftest.$ac_ext >&5
  2190.   rm -rf conftest*
  2191.   eval "ac_cv_lib_$ac_lib_var=no"
  2192. fi
  2193. rm -f conftest*
  2194. LIBS="$ac_save_LIBS"
  2195.  
  2196. fi
  2197. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2198.   echo "$ac_t""yes" 1>&6
  2199.   LIBS="$LIBS -lcposix"
  2200. else
  2201.   echo "$ac_t""no" 1>&6
  2202. fi
  2203.  
  2204.  
  2205. for ac_func in strerror isascii strchr strrchr
  2206. do
  2207. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2208. echo "configure:2209: checking for $ac_func" >&5
  2209. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2210.   echo $ac_n "(cached) $ac_c" 1>&6
  2211. else
  2212.   cat > conftest.$ac_ext <<EOF
  2213. #line 2214 "configure"
  2214. #include "confdefs.h"
  2215. /* System header to define __stub macros and hopefully few prototypes,
  2216.     which can conflict with char $ac_func(); below.  */
  2217. #include <assert.h>
  2218. /* Override any gcc2 internal prototype to avoid an error.  */
  2219. /* We use char because int might match the return type of a gcc2
  2220.     builtin and then its argument prototype would still apply.  */
  2221. char $ac_func();
  2222.  
  2223. int main() {
  2224.  
  2225. /* The GNU C library defines this for functions which it implements
  2226.     to always fail with ENOSYS.  Some functions are actually named
  2227.     something starting with __ and the normal name is an alias.  */
  2228. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2229. choke me
  2230. #else
  2231. $ac_func();
  2232. #endif
  2233.  
  2234. ; return 0; }
  2235. EOF
  2236. if { (eval echo configure:2237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2237.   rm -rf conftest*
  2238.   eval "ac_cv_func_$ac_func=yes"
  2239. else
  2240.   echo "configure: failed program was:" >&5
  2241.   cat conftest.$ac_ext >&5
  2242.   rm -rf conftest*
  2243.   eval "ac_cv_func_$ac_func=no"
  2244. fi
  2245. rm -f conftest*
  2246. fi
  2247.  
  2248. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2249.   echo "$ac_t""yes" 1>&6
  2250.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2251.   cat >> confdefs.h <<EOF
  2252. #define $ac_tr_func 1
  2253. EOF
  2254.  
  2255. else
  2256.   echo "$ac_t""no" 1>&6
  2257. fi
  2258. done
  2259.  
  2260. # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
  2261. # for constant arguments.  Useless!
  2262. echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
  2263. echo "configure:2264: checking for working alloca.h" >&5
  2264. if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
  2265.   echo $ac_n "(cached) $ac_c" 1>&6
  2266. else
  2267.   cat > conftest.$ac_ext <<EOF
  2268. #line 2269 "configure"
  2269. #include "confdefs.h"
  2270. #include <alloca.h>
  2271. int main() {
  2272. char *p = alloca(2 * sizeof(int));
  2273. ; return 0; }
  2274. EOF
  2275. if { (eval echo configure:2276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2276.   rm -rf conftest*
  2277.   ac_cv_header_alloca_h=yes
  2278. else
  2279.   echo "configure: failed program was:" >&5
  2280.   cat conftest.$ac_ext >&5
  2281.   rm -rf conftest*
  2282.   ac_cv_header_alloca_h=no
  2283. fi
  2284. rm -f conftest*
  2285. fi
  2286.  
  2287. echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
  2288. if test $ac_cv_header_alloca_h = yes; then
  2289.   cat >> confdefs.h <<\EOF
  2290. #define HAVE_ALLOCA_H 1
  2291. EOF
  2292.  
  2293. fi
  2294.  
  2295. echo $ac_n "checking for alloca""... $ac_c" 1>&6
  2296. echo "configure:2297: checking for alloca" >&5
  2297. if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
  2298.   echo $ac_n "(cached) $ac_c" 1>&6
  2299. else
  2300.   cat > conftest.$ac_ext <<EOF
  2301. #line 2302 "configure"
  2302. #include "confdefs.h"
  2303.  
  2304. #ifdef __GNUC__
  2305. # define alloca __builtin_alloca
  2306. #else
  2307. # if HAVE_ALLOCA_H
  2308. #  include <alloca.h>
  2309. # else
  2310. #  ifdef _AIX
  2311.  #pragma alloca
  2312. #  else
  2313. #   ifndef alloca /* predefined by HP cc +Olibcalls */
  2314. char *alloca ();
  2315. #   endif
  2316. #  endif
  2317. # endif
  2318. #endif
  2319.  
  2320. int main() {
  2321. char *p = (char *) alloca(1);
  2322. ; return 0; }
  2323. EOF
  2324. if { (eval echo configure:2325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2325.   rm -rf conftest*
  2326.   ac_cv_func_alloca_works=yes
  2327. else
  2328.   echo "configure: failed program was:" >&5
  2329.   cat conftest.$ac_ext >&5
  2330.   rm -rf conftest*
  2331.   ac_cv_func_alloca_works=no
  2332. fi
  2333. rm -f conftest*
  2334. fi
  2335.  
  2336. echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
  2337. if test $ac_cv_func_alloca_works = yes; then
  2338.   cat >> confdefs.h <<\EOF
  2339. #define HAVE_ALLOCA 1
  2340. EOF
  2341.  
  2342. fi
  2343.  
  2344. if test $ac_cv_func_alloca_works = no; then
  2345.   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
  2346.   # that cause trouble.  Some versions do not even contain alloca or
  2347.   # contain a buggy version.  If you still want to use their alloca,
  2348.   # use ar to extract alloca.o from them instead of compiling alloca.c.
  2349.   ALLOCA=alloca.o
  2350.   cat >> confdefs.h <<\EOF
  2351. #define C_ALLOCA 1
  2352. EOF
  2353.  
  2354.  
  2355. echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
  2356. echo "configure:2357: checking whether alloca needs Cray hooks" >&5
  2357. if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
  2358.   echo $ac_n "(cached) $ac_c" 1>&6
  2359. else
  2360.   cat > conftest.$ac_ext <<EOF
  2361. #line 2362 "configure"
  2362. #include "confdefs.h"
  2363. #if defined(CRAY) && ! defined(CRAY2)
  2364. webecray
  2365. #else
  2366. wenotbecray
  2367. #endif
  2368.  
  2369. EOF
  2370. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2371.   egrep "webecray" >/dev/null 2>&1; then
  2372.   rm -rf conftest*
  2373.   ac_cv_os_cray=yes
  2374. else
  2375.   rm -rf conftest*
  2376.   ac_cv_os_cray=no
  2377. fi
  2378. rm -f conftest*
  2379.  
  2380. fi
  2381.  
  2382. echo "$ac_t""$ac_cv_os_cray" 1>&6
  2383. if test $ac_cv_os_cray = yes; then
  2384. for ac_func in _getb67 GETB67 getb67; do
  2385.   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2386. echo "configure:2387: checking for $ac_func" >&5
  2387. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2388.   echo $ac_n "(cached) $ac_c" 1>&6
  2389. else
  2390.   cat > conftest.$ac_ext <<EOF
  2391. #line 2392 "configure"
  2392. #include "confdefs.h"
  2393. /* System header to define __stub macros and hopefully few prototypes,
  2394.     which can conflict with char $ac_func(); below.  */
  2395. #include <assert.h>
  2396. /* Override any gcc2 internal prototype to avoid an error.  */
  2397. /* We use char because int might match the return type of a gcc2
  2398.     builtin and then its argument prototype would still apply.  */
  2399. char $ac_func();
  2400.  
  2401. int main() {
  2402.  
  2403. /* The GNU C library defines this for functions which it implements
  2404.     to always fail with ENOSYS.  Some functions are actually named
  2405.     something starting with __ and the normal name is an alias.  */
  2406. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2407. choke me
  2408. #else
  2409. $ac_func();
  2410. #endif
  2411.  
  2412. ; return 0; }
  2413. EOF
  2414. if { (eval echo configure:2415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2415.   rm -rf conftest*
  2416.   eval "ac_cv_func_$ac_func=yes"
  2417. else
  2418.   echo "configure: failed program was:" >&5
  2419.   cat conftest.$ac_ext >&5
  2420.   rm -rf conftest*
  2421.   eval "ac_cv_func_$ac_func=no"
  2422. fi
  2423. rm -f conftest*
  2424. fi
  2425.  
  2426. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2427.   echo "$ac_t""yes" 1>&6
  2428.   cat >> confdefs.h <<EOF
  2429. #define CRAY_STACKSEG_END $ac_func
  2430. EOF
  2431.  
  2432.   break
  2433. else
  2434.   echo "$ac_t""no" 1>&6
  2435. fi
  2436.  
  2437. done
  2438. fi
  2439.  
  2440. echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
  2441. echo "configure:2442: checking stack direction for C alloca" >&5
  2442. if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
  2443.   echo $ac_n "(cached) $ac_c" 1>&6
  2444. else
  2445.   if test "$cross_compiling" = yes; then
  2446.   ac_cv_c_stack_direction=0
  2447. else
  2448.   cat > conftest.$ac_ext <<EOF
  2449. #line 2450 "configure"
  2450. #include "confdefs.h"
  2451. find_stack_direction ()
  2452. {
  2453.   static char *addr = 0;
  2454.   auto char dummy;
  2455.   if (addr == 0)
  2456.     {
  2457.       addr = &dummy;
  2458.       return find_stack_direction ();
  2459.     }
  2460.   else
  2461.     return (&dummy > addr) ? 1 : -1;
  2462. }
  2463. main ()
  2464. {
  2465.   exit (find_stack_direction() < 0);
  2466. }
  2467. EOF
  2468. if { (eval echo configure:2469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  2469. then
  2470.   ac_cv_c_stack_direction=1
  2471. else
  2472.   echo "configure: failed program was:" >&5
  2473.   cat conftest.$ac_ext >&5
  2474.   rm -fr conftest*
  2475.   ac_cv_c_stack_direction=-1
  2476. fi
  2477. rm -fr conftest*
  2478. fi
  2479.  
  2480. fi
  2481.  
  2482. echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
  2483. cat >> confdefs.h <<EOF
  2484. #define STACK_DIRECTION $ac_cv_c_stack_direction
  2485. EOF
  2486.  
  2487. fi
  2488.  
  2489. echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
  2490. echo "configure:2491: checking for 8-bit clean memcmp" >&5
  2491. if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
  2492.   echo $ac_n "(cached) $ac_c" 1>&6
  2493. else
  2494.   if test "$cross_compiling" = yes; then
  2495.   ac_cv_func_memcmp_clean=no
  2496. else
  2497.   cat > conftest.$ac_ext <<EOF
  2498. #line 2499 "configure"
  2499. #include "confdefs.h"
  2500.  
  2501. main()
  2502. {
  2503.   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
  2504.   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
  2505. }
  2506.  
  2507. EOF
  2508. if { (eval echo configure:2509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  2509. then
  2510.   ac_cv_func_memcmp_clean=yes
  2511. else
  2512.   echo "configure: failed program was:" >&5
  2513.   cat conftest.$ac_ext >&5
  2514.   rm -fr conftest*
  2515.   ac_cv_func_memcmp_clean=no
  2516. fi
  2517. rm -fr conftest*
  2518. fi
  2519.  
  2520. fi
  2521.  
  2522. echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
  2523. test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o"
  2524.  
  2525.  if test $ac_cv_func_memcmp_clean = no; then
  2526.    cat >> confdefs.h <<EOF
  2527. #define memcmp rpl_memcmp
  2528. EOF
  2529.  
  2530.  fi
  2531.  
  2532. echo $ac_n "checking for vprintf""... $ac_c" 1>&6
  2533. echo "configure:2534: checking for vprintf" >&5
  2534. if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
  2535.   echo $ac_n "(cached) $ac_c" 1>&6
  2536. else
  2537.   cat > conftest.$ac_ext <<EOF
  2538. #line 2539 "configure"
  2539. #include "confdefs.h"
  2540. /* System header to define __stub macros and hopefully few prototypes,
  2541.     which can conflict with char vprintf(); below.  */
  2542. #include <assert.h>
  2543. /* Override any gcc2 internal prototype to avoid an error.  */
  2544. /* We use char because int might match the return type of a gcc2
  2545.     builtin and then its argument prototype would still apply.  */
  2546. char vprintf();
  2547.  
  2548. int main() {
  2549.  
  2550. /* The GNU C library defines this for functions which it implements
  2551.     to always fail with ENOSYS.  Some functions are actually named
  2552.     something starting with __ and the normal name is an alias.  */
  2553. #if defined (__stub_vprintf) || defined (__stub___vprintf)
  2554. choke me
  2555. #else
  2556. vprintf();
  2557. #endif
  2558.  
  2559. ; return 0; }
  2560. EOF
  2561. if { (eval echo configure:2562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2562.   rm -rf conftest*
  2563.   eval "ac_cv_func_vprintf=yes"
  2564. else
  2565.   echo "configure: failed program was:" >&5
  2566.   cat conftest.$ac_ext >&5
  2567.   rm -rf conftest*
  2568.   eval "ac_cv_func_vprintf=no"
  2569. fi
  2570. rm -f conftest*
  2571. fi
  2572.  
  2573. if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
  2574.   echo "$ac_t""yes" 1>&6
  2575.   cat >> confdefs.h <<\EOF
  2576. #define HAVE_VPRINTF 1
  2577. EOF
  2578.  
  2579. else
  2580.   echo "$ac_t""no" 1>&6
  2581. fi
  2582.  
  2583. if test "$ac_cv_func_vprintf" != yes; then
  2584. echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
  2585. echo "configure:2586: checking for _doprnt" >&5
  2586. if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
  2587.   echo $ac_n "(cached) $ac_c" 1>&6
  2588. else
  2589.   cat > conftest.$ac_ext <<EOF
  2590. #line 2591 "configure"
  2591. #include "confdefs.h"
  2592. /* System header to define __stub macros and hopefully few prototypes,
  2593.     which can conflict with char _doprnt(); below.  */
  2594. #include <assert.h>
  2595. /* Override any gcc2 internal prototype to avoid an error.  */
  2596. /* We use char because int might match the return type of a gcc2
  2597.     builtin and then its argument prototype would still apply.  */
  2598. char _doprnt();
  2599.  
  2600. int main() {
  2601.  
  2602. /* The GNU C library defines this for functions which it implements
  2603.     to always fail with ENOSYS.  Some functions are actually named
  2604.     something starting with __ and the normal name is an alias.  */
  2605. #if defined (__stub__doprnt) || defined (__stub____doprnt)
  2606. choke me
  2607. #else
  2608. _doprnt();
  2609. #endif
  2610.  
  2611. ; return 0; }
  2612. EOF
  2613. if { (eval echo configure:2614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2614.   rm -rf conftest*
  2615.   eval "ac_cv_func__doprnt=yes"
  2616. else
  2617.   echo "configure: failed program was:" >&5
  2618.   cat conftest.$ac_ext >&5
  2619.   rm -rf conftest*
  2620.   eval "ac_cv_func__doprnt=no"
  2621. fi
  2622. rm -f conftest*
  2623. fi
  2624.  
  2625. if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
  2626.   echo "$ac_t""yes" 1>&6
  2627.   cat >> confdefs.h <<\EOF
  2628. #define HAVE_DOPRNT 1
  2629. EOF
  2630.  
  2631. else
  2632.   echo "$ac_t""no" 1>&6
  2633. fi
  2634.  
  2635. fi
  2636.  
  2637. for ac_func in memcpy memmove memset stpcpy strpbrk strtol strtoul
  2638. do
  2639. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2640. echo "configure:2641: checking for $ac_func" >&5
  2641. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2642.   echo $ac_n "(cached) $ac_c" 1>&6
  2643. else
  2644.   cat > conftest.$ac_ext <<EOF
  2645. #line 2646 "configure"
  2646. #include "confdefs.h"
  2647. /* System header to define __stub macros and hopefully few prototypes,
  2648.     which can conflict with char $ac_func(); below.  */
  2649. #include <assert.h>
  2650. /* Override any gcc2 internal prototype to avoid an error.  */
  2651. /* We use char because int might match the return type of a gcc2
  2652.     builtin and then its argument prototype would still apply.  */
  2653. char $ac_func();
  2654.  
  2655. int main() {
  2656.  
  2657. /* The GNU C library defines this for functions which it implements
  2658.     to always fail with ENOSYS.  Some functions are actually named
  2659.     something starting with __ and the normal name is an alias.  */
  2660. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2661. choke me
  2662. #else
  2663. $ac_func();
  2664. #endif
  2665.  
  2666. ; return 0; }
  2667. EOF
  2668. if { (eval echo configure:2669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2669.   rm -rf conftest*
  2670.   eval "ac_cv_func_$ac_func=yes"
  2671. else
  2672.   echo "configure: failed program was:" >&5
  2673.   cat conftest.$ac_ext >&5
  2674.   rm -rf conftest*
  2675.   eval "ac_cv_func_$ac_func=no"
  2676. fi
  2677. rm -f conftest*
  2678. fi
  2679.  
  2680. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2681.   echo "$ac_t""yes" 1>&6
  2682.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2683.   cat >> confdefs.h <<EOF
  2684. #define $ac_tr_func 1
  2685. EOF
  2686.  
  2687. else
  2688.   echo "$ac_t""no" 1>&6
  2689. LIBOBJS="$LIBOBJS ${ac_func}.o"
  2690. fi
  2691. done
  2692.  
  2693.  
  2694.  
  2695. echo $ac_n "checking for working strtod""... $ac_c" 1>&6
  2696. echo "configure:2697: checking for working strtod" >&5
  2697. if eval "test \"`echo '$''{'am_cv_func_strtod'+set}'`\" = set"; then
  2698.   echo $ac_n "(cached) $ac_c" 1>&6
  2699. else
  2700.   if test "$cross_compiling" = yes; then
  2701.   am_cv_func_strtod=no
  2702. else
  2703.   cat > conftest.$ac_ext <<EOF
  2704. #line 2705 "configure"
  2705. #include "confdefs.h"
  2706.  
  2707. double strtod ();
  2708. int
  2709. main()
  2710. {
  2711.   {
  2712.     /* Some versions of Linux strtod mis-parse strings with leading '+'.  */
  2713.     char *string = " +69";
  2714.     char *term;
  2715.     double value;
  2716.     value = strtod (string, &term);
  2717.     if (value != 69 || term != (string + 4))
  2718.       exit (1);
  2719.   }
  2720.  
  2721.   {
  2722.     /* Under Solaris 2.4, strtod returns the wrong value for the
  2723.        terminating character under some conditions.  */
  2724.     char *string = "NaN";
  2725.     char *term;
  2726.     strtod (string, &term);
  2727.     if (term != string && *(term - 1) == 0)
  2728.       exit (1);
  2729.   }
  2730.   exit (0);
  2731. }
  2732.  
  2733. EOF
  2734. if { (eval echo configure:2735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  2735. then
  2736.   am_cv_func_strtod=yes
  2737. else
  2738.   echo "configure: failed program was:" >&5
  2739.   cat conftest.$ac_ext >&5
  2740.   rm -fr conftest*
  2741.   am_cv_func_strtod=no
  2742. fi
  2743. rm -fr conftest*
  2744. fi
  2745.  
  2746. fi
  2747.  
  2748. echo "$ac_t""$am_cv_func_strtod" 1>&6
  2749. test $am_cv_func_strtod = no && LIBOBJS="$LIBOBJS strtod.o"
  2750. am_cv_func_strtod_needs_libm=no
  2751. if test $am_cv_func_strtod = no; then
  2752.   for ac_func in pow
  2753. do
  2754. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2755. echo "configure:2756: checking for $ac_func" >&5
  2756. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2757.   echo $ac_n "(cached) $ac_c" 1>&6
  2758. else
  2759.   cat > conftest.$ac_ext <<EOF
  2760. #line 2761 "configure"
  2761. #include "confdefs.h"
  2762. /* System header to define __stub macros and hopefully few prototypes,
  2763.     which can conflict with char $ac_func(); below.  */
  2764. #include <assert.h>
  2765. /* Override any gcc2 internal prototype to avoid an error.  */
  2766. /* We use char because int might match the return type of a gcc2
  2767.     builtin and then its argument prototype would still apply.  */
  2768. char $ac_func();
  2769.  
  2770. int main() {
  2771.  
  2772. /* The GNU C library defines this for functions which it implements
  2773.     to always fail with ENOSYS.  Some functions are actually named
  2774.     something starting with __ and the normal name is an alias.  */
  2775. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2776. choke me
  2777. #else
  2778. $ac_func();
  2779. #endif
  2780.  
  2781. ; return 0; }
  2782. EOF
  2783. if { (eval echo configure:2784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2784.   rm -rf conftest*
  2785.   eval "ac_cv_func_$ac_func=yes"
  2786. else
  2787.   echo "configure: failed program was:" >&5
  2788.   cat conftest.$ac_ext >&5
  2789.   rm -rf conftest*
  2790.   eval "ac_cv_func_$ac_func=no"
  2791. fi
  2792. rm -f conftest*
  2793. fi
  2794.  
  2795. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2796.   echo "$ac_t""yes" 1>&6
  2797.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2798.   cat >> confdefs.h <<EOF
  2799. #define $ac_tr_func 1
  2800. EOF
  2801.  
  2802. else
  2803.   echo "$ac_t""no" 1>&6
  2804. fi
  2805. done
  2806.  
  2807.   if test $ac_cv_func_pow = no; then
  2808.     echo $ac_n "checking for pow in -lm""... $ac_c" 1>&6
  2809. echo "configure:2810: checking for pow in -lm" >&5
  2810. ac_lib_var=`echo m'_'pow | sed 'y%./+-%__p_%'`
  2811. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2812.   echo $ac_n "(cached) $ac_c" 1>&6
  2813. else
  2814.   ac_save_LIBS="$LIBS"
  2815. LIBS="-lm  $LIBS"
  2816. cat > conftest.$ac_ext <<EOF
  2817. #line 2818 "configure"
  2818. #include "confdefs.h"
  2819. /* Override any gcc2 internal prototype to avoid an error.  */
  2820. /* We use char because int might match the return type of a gcc2
  2821.     builtin and then its argument prototype would still apply.  */
  2822. char pow();
  2823.  
  2824. int main() {
  2825. pow()
  2826. ; return 0; }
  2827. EOF
  2828. if { (eval echo configure:2829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2829.   rm -rf conftest*
  2830.   eval "ac_cv_lib_$ac_lib_var=yes"
  2831. else
  2832.   echo "configure: failed program was:" >&5
  2833.   cat conftest.$ac_ext >&5
  2834.   rm -rf conftest*
  2835.   eval "ac_cv_lib_$ac_lib_var=no"
  2836. fi
  2837. rm -f conftest*
  2838. LIBS="$ac_save_LIBS"
  2839.  
  2840. fi
  2841. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2842.   echo "$ac_t""yes" 1>&6
  2843.   am_cv_func_strtod_needs_libm=yes
  2844. else
  2845.   echo "$ac_t""no" 1>&6
  2846. echo "configure: warning: can't find library containing definition of pow" 1>&2
  2847. fi
  2848.  
  2849.   fi
  2850. fi
  2851.  
  2852.  
  2853. test $am_cv_func_strtod_needs_libm = yes && POW_LIBM=-lm
  2854.  
  2855. echo $ac_n "checking for error_at_line""... $ac_c" 1>&6
  2856. echo "configure:2857: checking for error_at_line" >&5
  2857. if eval "test \"`echo '$''{'am_cv_lib_error_at_line'+set}'`\" = set"; then
  2858.   echo $ac_n "(cached) $ac_c" 1>&6
  2859. else
  2860.   cat > conftest.$ac_ext <<EOF
  2861. #line 2862 "configure"
  2862. #include "confdefs.h"
  2863.  
  2864. int main() {
  2865. error_at_line(0, 0, "", 0, "");
  2866. ; return 0; }
  2867. EOF
  2868. if { (eval echo configure:2869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2869.   rm -rf conftest*
  2870.   am_cv_lib_error_at_line=yes
  2871. else
  2872.   echo "configure: failed program was:" >&5
  2873.   cat conftest.$ac_ext >&5
  2874.   rm -rf conftest*
  2875.   am_cv_lib_error_at_line=no
  2876. fi
  2877. rm -f conftest*
  2878. fi
  2879.  
  2880. echo "$ac_t""$am_cv_lib_error_at_line" 1>&6
  2881.  if test $am_cv_lib_error_at_line = no; then
  2882.    LIBOBJS="$LIBOBJS error.o"
  2883.  fi
  2884.  
  2885.  
  2886. for ac_func in getline
  2887. do
  2888. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2889. echo "configure:2890: checking for $ac_func" >&5
  2890. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2891.   echo $ac_n "(cached) $ac_c" 1>&6
  2892. else
  2893.   cat > conftest.$ac_ext <<EOF
  2894. #line 2895 "configure"
  2895. #include "confdefs.h"
  2896. /* System header to define __stub macros and hopefully few prototypes,
  2897.     which can conflict with char $ac_func(); below.  */
  2898. #include <assert.h>
  2899. /* Override any gcc2 internal prototype to avoid an error.  */
  2900. /* We use char because int might match the return type of a gcc2
  2901.     builtin and then its argument prototype would still apply.  */
  2902. char $ac_func();
  2903.  
  2904. int main() {
  2905.  
  2906. /* The GNU C library defines this for functions which it implements
  2907.     to always fail with ENOSYS.  Some functions are actually named
  2908.     something starting with __ and the normal name is an alias.  */
  2909. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2910. choke me
  2911. #else
  2912. $ac_func();
  2913. #endif
  2914.  
  2915. ; return 0; }
  2916. EOF
  2917. if { (eval echo configure:2918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2918.   rm -rf conftest*
  2919.   eval "ac_cv_func_$ac_func=yes"
  2920. else
  2921.   echo "configure: failed program was:" >&5
  2922.   cat conftest.$ac_ext >&5
  2923.   rm -rf conftest*
  2924.   eval "ac_cv_func_$ac_func=no"
  2925. fi
  2926. rm -f conftest*
  2927. fi
  2928.  
  2929. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2930.   echo "$ac_t""yes" 1>&6
  2931.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2932.   cat >> confdefs.h <<EOF
  2933. #define $ac_tr_func 1
  2934. EOF
  2935.  
  2936. else
  2937.   echo "$ac_t""no" 1>&6
  2938. LIBOBJS="$LIBOBJS ${ac_func}.o"
  2939. fi
  2940. done
  2941.  
  2942.  
  2943. if test $ac_cv_func_getline != yes; then
  2944.   for ac_func in getdelim
  2945. do
  2946. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2947. echo "configure:2948: checking for $ac_func" >&5
  2948. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2949.   echo $ac_n "(cached) $ac_c" 1>&6
  2950. else
  2951.   cat > conftest.$ac_ext <<EOF
  2952. #line 2953 "configure"
  2953. #include "confdefs.h"
  2954. /* System header to define __stub macros and hopefully few prototypes,
  2955.     which can conflict with char $ac_func(); below.  */
  2956. #include <assert.h>
  2957. /* Override any gcc2 internal prototype to avoid an error.  */
  2958. /* We use char because int might match the return type of a gcc2
  2959.     builtin and then its argument prototype would still apply.  */
  2960. char $ac_func();
  2961.  
  2962. int main() {
  2963.  
  2964. /* The GNU C library defines this for functions which it implements
  2965.     to always fail with ENOSYS.  Some functions are actually named
  2966.     something starting with __ and the normal name is an alias.  */
  2967. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2968. choke me
  2969. #else
  2970. $ac_func();
  2971. #endif
  2972.  
  2973. ; return 0; }
  2974. EOF
  2975. if { (eval echo configure:2976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2976.   rm -rf conftest*
  2977.   eval "ac_cv_func_$ac_func=yes"
  2978. else
  2979.   echo "configure: failed program was:" >&5
  2980.   cat conftest.$ac_ext >&5
  2981.   rm -rf conftest*
  2982.   eval "ac_cv_func_$ac_func=no"
  2983. fi
  2984. rm -f conftest*
  2985. fi
  2986.  
  2987. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2988.   echo "$ac_t""yes" 1>&6
  2989.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2990.   cat >> confdefs.h <<EOF
  2991. #define $ac_tr_func 1
  2992. EOF
  2993.  
  2994. else
  2995.   echo "$ac_t""no" 1>&6
  2996. fi
  2997. done
  2998.  
  2999. fi
  3000.  
  3001. for ac_hdr in unistd.h
  3002. do
  3003. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  3004. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  3005. echo "configure:3006: checking for $ac_hdr" >&5
  3006. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  3007.   echo $ac_n "(cached) $ac_c" 1>&6
  3008. else
  3009.   cat > conftest.$ac_ext <<EOF
  3010. #line 3011 "configure"
  3011. #include "confdefs.h"
  3012. #include <$ac_hdr>
  3013. EOF
  3014. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  3015. { (eval echo configure:3016: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  3016. ac_err=`grep -v '^ *+' conftest.out`
  3017. if test -z "$ac_err"; then
  3018.   rm -rf conftest*
  3019.   eval "ac_cv_header_$ac_safe=yes"
  3020. else
  3021.   echo "$ac_err" >&5
  3022.   echo "configure: failed program was:" >&5
  3023.   cat conftest.$ac_ext >&5
  3024.   rm -rf conftest*
  3025.   eval "ac_cv_header_$ac_safe=no"
  3026. fi
  3027. rm -f conftest*
  3028. fi
  3029. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  3030.   echo "$ac_t""yes" 1>&6
  3031.     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  3032.   cat >> confdefs.h <<EOF
  3033. #define $ac_tr_hdr 1
  3034. EOF
  3035.  
  3036. else
  3037.   echo "$ac_t""no" 1>&6
  3038. fi
  3039. done
  3040.  
  3041. for ac_func in getpagesize
  3042. do
  3043. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  3044. echo "configure:3045: checking for $ac_func" >&5
  3045. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  3046.   echo $ac_n "(cached) $ac_c" 1>&6
  3047. else
  3048.   cat > conftest.$ac_ext <<EOF
  3049. #line 3050 "configure"
  3050. #include "confdefs.h"
  3051. /* System header to define __stub macros and hopefully few prototypes,
  3052.     which can conflict with char $ac_func(); below.  */
  3053. #include <assert.h>
  3054. /* Override any gcc2 internal prototype to avoid an error.  */
  3055. /* We use char because int might match the return type of a gcc2
  3056.     builtin and then its argument prototype would still apply.  */
  3057. char $ac_func();
  3058.  
  3059. int main() {
  3060.  
  3061. /* The GNU C library defines this for functions which it implements
  3062.     to always fail with ENOSYS.  Some functions are actually named
  3063.     something starting with __ and the normal name is an alias.  */
  3064. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  3065. choke me
  3066. #else
  3067. $ac_func();
  3068. #endif
  3069.  
  3070. ; return 0; }
  3071. EOF
  3072. if { (eval echo configure:3073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3073.   rm -rf conftest*
  3074.   eval "ac_cv_func_$ac_func=yes"
  3075. else
  3076.   echo "configure: failed program was:" >&5
  3077.   cat conftest.$ac_ext >&5
  3078.   rm -rf conftest*
  3079.   eval "ac_cv_func_$ac_func=no"
  3080. fi
  3081. rm -f conftest*
  3082. fi
  3083.  
  3084. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  3085.   echo "$ac_t""yes" 1>&6
  3086.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  3087.   cat >> confdefs.h <<EOF
  3088. #define $ac_tr_func 1
  3089. EOF
  3090.  
  3091. else
  3092.   echo "$ac_t""no" 1>&6
  3093. fi
  3094. done
  3095.  
  3096. echo $ac_n "checking for working mmap""... $ac_c" 1>&6
  3097. echo "configure:3098: checking for working mmap" >&5
  3098. if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
  3099.   echo $ac_n "(cached) $ac_c" 1>&6
  3100. else
  3101.   if test "$cross_compiling" = yes; then
  3102.   ac_cv_func_mmap_fixed_mapped=no
  3103. else
  3104.   cat > conftest.$ac_ext <<EOF
  3105. #line 3106 "configure"
  3106. #include "confdefs.h"
  3107.  
  3108. /* Thanks to Mike Haertel and Jim Avera for this test.
  3109.    Here is a matrix of mmap possibilities:
  3110.     mmap private not fixed
  3111.     mmap private fixed at somewhere currently unmapped
  3112.     mmap private fixed at somewhere already mapped
  3113.     mmap shared not fixed
  3114.     mmap shared fixed at somewhere currently unmapped
  3115.     mmap shared fixed at somewhere already mapped
  3116.    For private mappings, we should verify that changes cannot be read()
  3117.    back from the file, nor mmap's back from the file at a different
  3118.    address.  (There have been systems where private was not correctly
  3119.    implemented like the infamous i386 svr4.0, and systems where the
  3120.    VM page cache was not coherent with the filesystem buffer cache
  3121.    like early versions of FreeBSD and possibly contemporary NetBSD.)
  3122.    For shared mappings, we should conversely verify that changes get
  3123.    propogated back to all the places they're supposed to be.
  3124.  
  3125.    Grep wants private fixed already mapped.
  3126.    The main things grep needs to know about mmap are:
  3127.    * does it exist and is it safe to write into the mmap'd area
  3128.    * how to use it (BSD variants)  */
  3129. #include <sys/types.h>
  3130. #include <fcntl.h>
  3131. #include <sys/mman.h>
  3132.  
  3133. /* This mess was copied from the GNU getpagesize.h.  */
  3134. #ifndef HAVE_GETPAGESIZE
  3135. # ifdef HAVE_UNISTD_H
  3136. #  include <unistd.h>
  3137. # endif
  3138.  
  3139. /* Assume that all systems that can run configure have sys/param.h.  */
  3140. # ifndef HAVE_SYS_PARAM_H
  3141. #  define HAVE_SYS_PARAM_H 1
  3142. # endif
  3143.  
  3144. # ifdef _SC_PAGESIZE
  3145. #  define getpagesize() sysconf(_SC_PAGESIZE)
  3146. # else /* no _SC_PAGESIZE */
  3147. #  ifdef HAVE_SYS_PARAM_H
  3148. #   include <sys/param.h>
  3149. #   ifdef EXEC_PAGESIZE
  3150. #    define getpagesize() EXEC_PAGESIZE
  3151. #   else /* no EXEC_PAGESIZE */
  3152. #    ifdef NBPG
  3153. #     define getpagesize() NBPG * CLSIZE
  3154. #     ifndef CLSIZE
  3155. #      define CLSIZE 1
  3156. #     endif /* no CLSIZE */
  3157. #    else /* no NBPG */
  3158. #     ifdef NBPC
  3159. #      define getpagesize() NBPC
  3160. #     else /* no NBPC */
  3161. #      ifdef PAGESIZE
  3162. #       define getpagesize() PAGESIZE
  3163. #      endif /* PAGESIZE */
  3164. #     endif /* no NBPC */
  3165. #    endif /* no NBPG */
  3166. #   endif /* no EXEC_PAGESIZE */
  3167. #  else /* no HAVE_SYS_PARAM_H */
  3168. #   define getpagesize() 8192    /* punt totally */
  3169. #  endif /* no HAVE_SYS_PARAM_H */
  3170. # endif /* no _SC_PAGESIZE */
  3171.  
  3172. #endif /* no HAVE_GETPAGESIZE */
  3173.  
  3174. #ifdef __cplusplus
  3175. extern "C" { void *malloc(unsigned); }
  3176. #else
  3177. char *malloc();
  3178. #endif
  3179.  
  3180. int
  3181. main()
  3182. {
  3183.     char *data, *data2, *data3;
  3184.     int i, pagesize;
  3185.     int fd;
  3186.  
  3187.     pagesize = getpagesize();
  3188.  
  3189.     /*
  3190.      * First, make a file with some known garbage in it.
  3191.      */
  3192.     data = malloc(pagesize);
  3193.     if (!data)
  3194.         exit(1);
  3195.     for (i = 0; i < pagesize; ++i)
  3196.         *(data + i) = rand();
  3197.     umask(0);
  3198.     fd = creat("conftestmmap", 0600);
  3199.     if (fd < 0)
  3200.         exit(1);
  3201.     if (write(fd, data, pagesize) != pagesize)
  3202.         exit(1);
  3203.     close(fd);
  3204.  
  3205.     /*
  3206.      * Next, try to mmap the file at a fixed address which
  3207.      * already has something else allocated at it.  If we can,
  3208.      * also make sure that we see the same garbage.
  3209.      */
  3210.     fd = open("conftestmmap", O_RDWR);
  3211.     if (fd < 0)
  3212.         exit(1);
  3213.     data2 = malloc(2 * pagesize);
  3214.     if (!data2)
  3215.         exit(1);
  3216.     data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
  3217.     if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
  3218.         MAP_PRIVATE | MAP_FIXED, fd, 0L))
  3219.         exit(1);
  3220.     for (i = 0; i < pagesize; ++i)
  3221.         if (*(data + i) != *(data2 + i))
  3222.             exit(1);
  3223.  
  3224.     /*
  3225.      * Finally, make sure that changes to the mapped area
  3226.      * do not percolate back to the file as seen by read().
  3227.      * (This is a bug on some variants of i386 svr4.0.)
  3228.      */
  3229.     for (i = 0; i < pagesize; ++i)
  3230.         *(data2 + i) = *(data2 + i) + 1;
  3231.     data3 = malloc(pagesize);
  3232.     if (!data3)
  3233.         exit(1);
  3234.     if (read(fd, data3, pagesize) != pagesize)
  3235.         exit(1);
  3236.     for (i = 0; i < pagesize; ++i)
  3237.         if (*(data + i) != *(data3 + i))
  3238.             exit(1);
  3239.     close(fd);
  3240.     unlink("conftestmmap");
  3241.     exit(0);
  3242. }
  3243.  
  3244. EOF
  3245. if { (eval echo configure:3246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  3246. then
  3247.   ac_cv_func_mmap_fixed_mapped=yes
  3248. else
  3249.   echo "configure: failed program was:" >&5
  3250.   cat conftest.$ac_ext >&5
  3251.   rm -fr conftest*
  3252.   ac_cv_func_mmap_fixed_mapped=no
  3253. fi
  3254. rm -fr conftest*
  3255. fi
  3256.  
  3257. fi
  3258.  
  3259. echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
  3260. if test $ac_cv_func_mmap_fixed_mapped = yes; then
  3261.   cat >> confdefs.h <<\EOF
  3262. #define HAVE_MMAP 1
  3263. EOF
  3264.  
  3265. fi
  3266.  
  3267.                            
  3268.    for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
  3269. unistd.h values.h
  3270. do
  3271. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  3272. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  3273. echo "configure:3274: checking for $ac_hdr" >&5
  3274. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  3275.   echo $ac_n "(cached) $ac_c" 1>&6
  3276. else
  3277.   cat > conftest.$ac_ext <<EOF
  3278. #line 3279 "configure"
  3279. #include "confdefs.h"
  3280. #include <$ac_hdr>
  3281. EOF
  3282. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  3283. { (eval echo configure:3284: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  3284. ac_err=`grep -v '^ *+' conftest.out`
  3285. if test -z "$ac_err"; then
  3286.   rm -rf conftest*
  3287.   eval "ac_cv_header_$ac_safe=yes"
  3288. else
  3289.   echo "$ac_err" >&5
  3290.   echo "configure: failed program was:" >&5
  3291.   cat conftest.$ac_ext >&5
  3292.   rm -rf conftest*
  3293.   eval "ac_cv_header_$ac_safe=no"
  3294. fi
  3295. rm -f conftest*
  3296. fi
  3297. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  3298.   echo "$ac_t""yes" 1>&6
  3299.     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  3300.   cat >> confdefs.h <<EOF
  3301. #define $ac_tr_hdr 1
  3302. EOF
  3303.  
  3304. else
  3305.   echo "$ac_t""no" 1>&6
  3306. fi
  3307. done
  3308.  
  3309.    for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
  3310. __argz_count __argz_stringify __argz_next
  3311. do
  3312. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  3313. echo "configure:3314: checking for $ac_func" >&5
  3314. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  3315.   echo $ac_n "(cached) $ac_c" 1>&6
  3316. else
  3317.   cat > conftest.$ac_ext <<EOF
  3318. #line 3319 "configure"
  3319. #include "confdefs.h"
  3320. /* System header to define __stub macros and hopefully few prototypes,
  3321.     which can conflict with char $ac_func(); below.  */
  3322. #include <assert.h>
  3323. /* Override any gcc2 internal prototype to avoid an error.  */
  3324. /* We use char because int might match the return type of a gcc2
  3325.     builtin and then its argument prototype would still apply.  */
  3326. char $ac_func();
  3327.  
  3328. int main() {
  3329.  
  3330. /* The GNU C library defines this for functions which it implements
  3331.     to always fail with ENOSYS.  Some functions are actually named
  3332.     something starting with __ and the normal name is an alias.  */
  3333. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  3334. choke me
  3335. #else
  3336. $ac_func();
  3337. #endif
  3338.  
  3339. ; return 0; }
  3340. EOF
  3341. if { (eval echo configure:3342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3342.   rm -rf conftest*
  3343.   eval "ac_cv_func_$ac_func=yes"
  3344. else
  3345.   echo "configure: failed program was:" >&5
  3346.   cat conftest.$ac_ext >&5
  3347.   rm -rf conftest*
  3348.   eval "ac_cv_func_$ac_func=no"
  3349. fi
  3350. rm -f conftest*
  3351. fi
  3352.  
  3353. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  3354.   echo "$ac_t""yes" 1>&6
  3355.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  3356.   cat >> confdefs.h <<EOF
  3357. #define $ac_tr_func 1
  3358. EOF
  3359.  
  3360. else
  3361.   echo "$ac_t""no" 1>&6
  3362. fi
  3363. done
  3364.  
  3365.  
  3366.    if test "${ac_cv_func_stpcpy+set}" != "set"; then
  3367.      for ac_func in stpcpy
  3368. do
  3369. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  3370. echo "configure:3371: checking for $ac_func" >&5
  3371. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  3372.   echo $ac_n "(cached) $ac_c" 1>&6
  3373. else
  3374.   cat > conftest.$ac_ext <<EOF
  3375. #line 3376 "configure"
  3376. #include "confdefs.h"
  3377. /* System header to define __stub macros and hopefully few prototypes,
  3378.     which can conflict with char $ac_func(); below.  */
  3379. #include <assert.h>
  3380. /* Override any gcc2 internal prototype to avoid an error.  */
  3381. /* We use char because int might match the return type of a gcc2
  3382.     builtin and then its argument prototype would still apply.  */
  3383. char $ac_func();
  3384.  
  3385. int main() {
  3386.  
  3387. /* The GNU C library defines this for functions which it implements
  3388.     to always fail with ENOSYS.  Some functions are actually named
  3389.     something starting with __ and the normal name is an alias.  */
  3390. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  3391. choke me
  3392. #else
  3393. $ac_func();
  3394. #endif
  3395.  
  3396. ; return 0; }
  3397. EOF
  3398. if { (eval echo configure:3399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3399.   rm -rf conftest*
  3400.   eval "ac_cv_func_$ac_func=yes"
  3401. else
  3402.   echo "configure: failed program was:" >&5
  3403.   cat conftest.$ac_ext >&5
  3404.   rm -rf conftest*
  3405.   eval "ac_cv_func_$ac_func=no"
  3406. fi
  3407. rm -f conftest*
  3408. fi
  3409.  
  3410. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  3411.   echo "$ac_t""yes" 1>&6
  3412.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  3413.   cat >> confdefs.h <<EOF
  3414. #define $ac_tr_func 1
  3415. EOF
  3416.  
  3417. else
  3418.   echo "$ac_t""no" 1>&6
  3419. fi
  3420. done
  3421.  
  3422.    fi
  3423.    if test "${ac_cv_func_stpcpy}" = "yes"; then
  3424.      cat >> confdefs.h <<\EOF
  3425. #define HAVE_STPCPY 1
  3426. EOF
  3427.  
  3428.    fi
  3429.  
  3430.    if test $ac_cv_header_locale_h = yes; then
  3431.     echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
  3432. echo "configure:3433: checking for LC_MESSAGES" >&5
  3433. if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
  3434.   echo $ac_n "(cached) $ac_c" 1>&6
  3435. else
  3436.   cat > conftest.$ac_ext <<EOF
  3437. #line 3438 "configure"
  3438. #include "confdefs.h"
  3439. #include <locale.h>
  3440. int main() {
  3441. return LC_MESSAGES
  3442. ; return 0; }
  3443. EOF
  3444. if { (eval echo configure:3445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3445.   rm -rf conftest*
  3446.   am_cv_val_LC_MESSAGES=yes
  3447. else
  3448.   echo "configure: failed program was:" >&5
  3449.   cat conftest.$ac_ext >&5
  3450.   rm -rf conftest*
  3451.   am_cv_val_LC_MESSAGES=no
  3452. fi
  3453. rm -f conftest*
  3454. fi
  3455.  
  3456. echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
  3457.     if test $am_cv_val_LC_MESSAGES = yes; then
  3458.       cat >> confdefs.h <<\EOF
  3459. #define HAVE_LC_MESSAGES 1
  3460. EOF
  3461.  
  3462.     fi
  3463.   fi
  3464.    echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
  3465. echo "configure:3466: checking whether NLS is requested" >&5
  3466.         # Check whether --enable-nls or --disable-nls was given.
  3467. if test "${enable_nls+set}" = set; then
  3468.   enableval="$enable_nls"
  3469.   USE_NLS=$enableval
  3470. else
  3471.   USE_NLS=yes
  3472. fi
  3473.  
  3474.     echo "$ac_t""$USE_NLS" 1>&6
  3475.     
  3476.  
  3477.     USE_INCLUDED_LIBINTL=no
  3478.  
  3479.         if test "$USE_NLS" = "yes"; then
  3480.       cat >> confdefs.h <<\EOF
  3481. #define ENABLE_NLS 1
  3482. EOF
  3483.  
  3484.       echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
  3485. echo "configure:3486: checking whether included gettext is requested" >&5
  3486.       # Check whether --with-included-gettext or --without-included-gettext was given.
  3487. if test "${with_included_gettext+set}" = set; then
  3488.   withval="$with_included_gettext"
  3489.   nls_cv_force_use_gnu_gettext=$withval
  3490. else
  3491.   nls_cv_force_use_gnu_gettext=no
  3492. fi
  3493.  
  3494.       echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
  3495.  
  3496.       nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
  3497.       if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
  3498.                                 nls_cv_header_intl=
  3499.     nls_cv_header_libgt=
  3500.     CATOBJEXT=NONE
  3501.  
  3502.     ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
  3503. echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
  3504. echo "configure:3505: checking for libintl.h" >&5
  3505. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  3506.   echo $ac_n "(cached) $ac_c" 1>&6
  3507. else
  3508.   cat > conftest.$ac_ext <<EOF
  3509. #line 3510 "configure"
  3510. #include "confdefs.h"
  3511. #include <libintl.h>
  3512. EOF
  3513. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  3514. { (eval echo configure:3515: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  3515. ac_err=`grep -v '^ *+' conftest.out`
  3516. if test -z "$ac_err"; then
  3517.   rm -rf conftest*
  3518.   eval "ac_cv_header_$ac_safe=yes"
  3519. else
  3520.   echo "$ac_err" >&5
  3521.   echo "configure: failed program was:" >&5
  3522.   cat conftest.$ac_ext >&5
  3523.   rm -rf conftest*
  3524.   eval "ac_cv_header_$ac_safe=no"
  3525. fi
  3526. rm -f conftest*
  3527. fi
  3528. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  3529.   echo "$ac_t""yes" 1>&6
  3530.   echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
  3531. echo "configure:3532: checking for gettext in libc" >&5
  3532. if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
  3533.   echo $ac_n "(cached) $ac_c" 1>&6
  3534. else
  3535.   cat > conftest.$ac_ext <<EOF
  3536. #line 3537 "configure"
  3537. #include "confdefs.h"
  3538. #include <libintl.h>
  3539. int main() {
  3540. return (int) gettext ("")
  3541. ; return 0; }
  3542. EOF
  3543. if { (eval echo configure:3544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3544.   rm -rf conftest*
  3545.   gt_cv_func_gettext_libc=yes
  3546. else
  3547.   echo "configure: failed program was:" >&5
  3548.   cat conftest.$ac_ext >&5
  3549.   rm -rf conftest*
  3550.   gt_cv_func_gettext_libc=no
  3551. fi
  3552. rm -f conftest*
  3553. fi
  3554.  
  3555. echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
  3556.  
  3557.        if test "$gt_cv_func_gettext_libc" != "yes"; then
  3558.          echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
  3559. echo "configure:3560: checking for bindtextdomain in -lintl" >&5
  3560. ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
  3561. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  3562.   echo $ac_n "(cached) $ac_c" 1>&6
  3563. else
  3564.   ac_save_LIBS="$LIBS"
  3565. LIBS="-lintl  $LIBS"
  3566. cat > conftest.$ac_ext <<EOF
  3567. #line 3568 "configure"
  3568. #include "confdefs.h"
  3569. /* Override any gcc2 internal prototype to avoid an error.  */
  3570. /* We use char because int might match the return type of a gcc2
  3571.     builtin and then its argument prototype would still apply.  */
  3572. char bindtextdomain();
  3573.  
  3574. int main() {
  3575. bindtextdomain()
  3576. ; return 0; }
  3577. EOF
  3578. if { (eval echo configure:3579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3579.   rm -rf conftest*
  3580.   eval "ac_cv_lib_$ac_lib_var=yes"
  3581. else
  3582.   echo "configure: failed program was:" >&5
  3583.   cat conftest.$ac_ext >&5
  3584.   rm -rf conftest*
  3585.   eval "ac_cv_lib_$ac_lib_var=no"
  3586. fi
  3587. rm -f conftest*
  3588. LIBS="$ac_save_LIBS"
  3589.  
  3590. fi
  3591. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3592.   echo "$ac_t""yes" 1>&6
  3593.   echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
  3594. echo "configure:3595: checking for gettext in libintl" >&5
  3595. if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
  3596.   echo $ac_n "(cached) $ac_c" 1>&6
  3597. else
  3598.   cat > conftest.$ac_ext <<EOF
  3599. #line 3600 "configure"
  3600. #include "confdefs.h"
  3601.  
  3602. int main() {
  3603. return (int) gettext ("")
  3604. ; return 0; }
  3605. EOF
  3606. if { (eval echo configure:3607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3607.   rm -rf conftest*
  3608.   gt_cv_func_gettext_libintl=yes
  3609. else
  3610.   echo "configure: failed program was:" >&5
  3611.   cat conftest.$ac_ext >&5
  3612.   rm -rf conftest*
  3613.   gt_cv_func_gettext_libintl=no
  3614. fi
  3615. rm -f conftest*
  3616. fi
  3617.  
  3618. echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
  3619. else
  3620.   echo "$ac_t""no" 1>&6
  3621. fi
  3622.  
  3623.        fi
  3624.  
  3625.        if test "$gt_cv_func_gettext_libc" = "yes" \
  3626.           || test "$gt_cv_func_gettext_libintl" = "yes"; then
  3627.           cat >> confdefs.h <<\EOF
  3628. #define HAVE_GETTEXT 1
  3629. EOF
  3630.  
  3631.           # Extract the first word of "msgfmt", so it can be a program name with args.
  3632. set dummy msgfmt; ac_word=$2
  3633. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  3634. echo "configure:3635: checking for $ac_word" >&5
  3635. if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
  3636.   echo $ac_n "(cached) $ac_c" 1>&6
  3637. else
  3638.   case "$MSGFMT" in
  3639.   /*)
  3640.   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
  3641.   ;;
  3642.   *)
  3643.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  3644.   for ac_dir in $PATH; do
  3645.     test -z "$ac_dir" && ac_dir=.
  3646.     if test -f $ac_dir/$ac_word; then
  3647.       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
  3648.     ac_cv_path_MSGFMT="$ac_dir/$ac_word"
  3649.     break
  3650.       fi
  3651.     fi
  3652.   done
  3653.   IFS="$ac_save_ifs"
  3654.   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
  3655.   ;;
  3656. esac
  3657. fi
  3658. MSGFMT="$ac_cv_path_MSGFMT"
  3659. if test -n "$MSGFMT"; then
  3660.   echo "$ac_t""$MSGFMT" 1>&6
  3661. else
  3662.   echo "$ac_t""no" 1>&6
  3663. fi
  3664.           if test "$MSGFMT" != "no"; then
  3665.         for ac_func in dcgettext
  3666. do
  3667. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  3668. echo "configure:3669: checking for $ac_func" >&5
  3669. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  3670.   echo $ac_n "(cached) $ac_c" 1>&6
  3671. else
  3672.   cat > conftest.$ac_ext <<EOF
  3673. #line 3674 "configure"
  3674. #include "confdefs.h"
  3675. /* System header to define __stub macros and hopefully few prototypes,
  3676.     which can conflict with char $ac_func(); below.  */
  3677. #include <assert.h>
  3678. /* Override any gcc2 internal prototype to avoid an error.  */
  3679. /* We use char because int might match the return type of a gcc2
  3680.     builtin and then its argument prototype would still apply.  */
  3681. char $ac_func();
  3682.  
  3683. int main() {
  3684.  
  3685. /* The GNU C library defines this for functions which it implements
  3686.     to always fail with ENOSYS.  Some functions are actually named
  3687.     something starting with __ and the normal name is an alias.  */
  3688. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  3689. choke me
  3690. #else
  3691. $ac_func();
  3692. #endif
  3693.  
  3694. ; return 0; }
  3695. EOF
  3696. if { (eval echo configure:3697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3697.   rm -rf conftest*
  3698.   eval "ac_cv_func_$ac_func=yes"
  3699. else
  3700.   echo "configure: failed program was:" >&5
  3701.   cat conftest.$ac_ext >&5
  3702.   rm -rf conftest*
  3703.   eval "ac_cv_func_$ac_func=no"
  3704. fi
  3705. rm -f conftest*
  3706. fi
  3707.  
  3708. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  3709.   echo "$ac_t""yes" 1>&6
  3710.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  3711.   cat >> confdefs.h <<EOF
  3712. #define $ac_tr_func 1
  3713. EOF
  3714.  
  3715. else
  3716.   echo "$ac_t""no" 1>&6
  3717. fi
  3718. done
  3719.  
  3720.         # Extract the first word of "gmsgfmt", so it can be a program name with args.
  3721. set dummy gmsgfmt; ac_word=$2
  3722. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  3723. echo "configure:3724: checking for $ac_word" >&5
  3724. if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
  3725.   echo $ac_n "(cached) $ac_c" 1>&6
  3726. else
  3727.   case "$GMSGFMT" in
  3728.   /*)
  3729.   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
  3730.   ;;
  3731.   *)
  3732.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  3733.   for ac_dir in $PATH; do
  3734.     test -z "$ac_dir" && ac_dir=.
  3735.     if test -f $ac_dir/$ac_word; then
  3736.       ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
  3737.       break
  3738.     fi
  3739.   done
  3740.   IFS="$ac_save_ifs"
  3741.   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
  3742.   ;;
  3743. esac
  3744. fi
  3745. GMSGFMT="$ac_cv_path_GMSGFMT"
  3746. if test -n "$GMSGFMT"; then
  3747.   echo "$ac_t""$GMSGFMT" 1>&6
  3748. else
  3749.   echo "$ac_t""no" 1>&6
  3750. fi
  3751.  
  3752.         # Extract the first word of "xgettext", so it can be a program name with args.
  3753. set dummy xgettext; ac_word=$2
  3754. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  3755. echo "configure:3756: checking for $ac_word" >&5
  3756. if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
  3757.   echo $ac_n "(cached) $ac_c" 1>&6
  3758. else
  3759.   case "$XGETTEXT" in
  3760.   /*)
  3761.   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
  3762.   ;;
  3763.   *)
  3764.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  3765.   for ac_dir in $PATH; do
  3766.     test -z "$ac_dir" && ac_dir=.
  3767.     if test -f $ac_dir/$ac_word; then
  3768.       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
  3769.     ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
  3770.     break
  3771.       fi
  3772.     fi
  3773.   done
  3774.   IFS="$ac_save_ifs"
  3775.   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
  3776.   ;;
  3777. esac
  3778. fi
  3779. XGETTEXT="$ac_cv_path_XGETTEXT"
  3780. if test -n "$XGETTEXT"; then
  3781.   echo "$ac_t""$XGETTEXT" 1>&6
  3782. else
  3783.   echo "$ac_t""no" 1>&6
  3784. fi
  3785.  
  3786.         cat > conftest.$ac_ext <<EOF
  3787. #line 3788 "configure"
  3788. #include "confdefs.h"
  3789.  
  3790. int main() {
  3791. extern int _nl_msg_cat_cntr;
  3792.                    return _nl_msg_cat_cntr
  3793. ; return 0; }
  3794. EOF
  3795. if { (eval echo configure:3796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3796.   rm -rf conftest*
  3797.   CATOBJEXT=.gmo
  3798.            DATADIRNAME=share
  3799. else
  3800.   echo "configure: failed program was:" >&5
  3801.   cat conftest.$ac_ext >&5
  3802.   rm -rf conftest*
  3803.   CATOBJEXT=.mo
  3804.            DATADIRNAME=lib
  3805. fi
  3806. rm -f conftest*
  3807.         INSTOBJEXT=.mo
  3808.           fi
  3809.         fi
  3810.     
  3811. else
  3812.   echo "$ac_t""no" 1>&6
  3813. fi
  3814.  
  3815.  
  3816.         if test "$CATOBJEXT" = "NONE"; then
  3817.       echo $ac_n "checking whether catgets can be used""... $ac_c" 1>&6
  3818. echo "configure:3819: checking whether catgets can be used" >&5
  3819.       # Check whether --with-catgets or --without-catgets was given.
  3820. if test "${with_catgets+set}" = set; then
  3821.   withval="$with_catgets"
  3822.   nls_cv_use_catgets=$withval
  3823. else
  3824.   nls_cv_use_catgets=no
  3825. fi
  3826.  
  3827.       echo "$ac_t""$nls_cv_use_catgets" 1>&6
  3828.  
  3829.       if test "$nls_cv_use_catgets" = "yes"; then
  3830.                 echo $ac_n "checking for main in -li""... $ac_c" 1>&6
  3831. echo "configure:3832: checking for main in -li" >&5
  3832. ac_lib_var=`echo i'_'main | sed 'y%./+-%__p_%'`
  3833. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  3834.   echo $ac_n "(cached) $ac_c" 1>&6
  3835. else
  3836.   ac_save_LIBS="$LIBS"
  3837. LIBS="-li  $LIBS"
  3838. cat > conftest.$ac_ext <<EOF
  3839. #line 3840 "configure"
  3840. #include "confdefs.h"
  3841.  
  3842. int main() {
  3843. main()
  3844. ; return 0; }
  3845. EOF
  3846. if { (eval echo configure:3847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3847.   rm -rf conftest*
  3848.   eval "ac_cv_lib_$ac_lib_var=yes"
  3849. else
  3850.   echo "configure: failed program was:" >&5
  3851.   cat conftest.$ac_ext >&5
  3852.   rm -rf conftest*
  3853.   eval "ac_cv_lib_$ac_lib_var=no"
  3854. fi
  3855. rm -f conftest*
  3856. LIBS="$ac_save_LIBS"
  3857.  
  3858. fi
  3859. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3860.   echo "$ac_t""yes" 1>&6
  3861.     ac_tr_lib=HAVE_LIB`echo i | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  3862.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  3863.   cat >> confdefs.h <<EOF
  3864. #define $ac_tr_lib 1
  3865. EOF
  3866.  
  3867.   LIBS="-li $LIBS"
  3868.  
  3869. else
  3870.   echo "$ac_t""no" 1>&6
  3871. fi
  3872.  
  3873.         echo $ac_n "checking for catgets""... $ac_c" 1>&6
  3874. echo "configure:3875: checking for catgets" >&5
  3875. if eval "test \"`echo '$''{'ac_cv_func_catgets'+set}'`\" = set"; then
  3876.   echo $ac_n "(cached) $ac_c" 1>&6
  3877. else
  3878.   cat > conftest.$ac_ext <<EOF
  3879. #line 3880 "configure"
  3880. #include "confdefs.h"
  3881. /* System header to define __stub macros and hopefully few prototypes,
  3882.     which can conflict with char catgets(); below.  */
  3883. #include <assert.h>
  3884. /* Override any gcc2 internal prototype to avoid an error.  */
  3885. /* We use char because int might match the return type of a gcc2
  3886.     builtin and then its argument prototype would still apply.  */
  3887. char catgets();
  3888.  
  3889. int main() {
  3890.  
  3891. /* The GNU C library defines this for functions which it implements
  3892.     to always fail with ENOSYS.  Some functions are actually named
  3893.     something starting with __ and the normal name is an alias.  */
  3894. #if defined (__stub_catgets) || defined (__stub___catgets)
  3895. choke me
  3896. #else
  3897. catgets();
  3898. #endif
  3899.  
  3900. ; return 0; }
  3901. EOF
  3902. if { (eval echo configure:3903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  3903.   rm -rf conftest*
  3904.   eval "ac_cv_func_catgets=yes"
  3905. else
  3906.   echo "configure: failed program was:" >&5
  3907.   cat conftest.$ac_ext >&5
  3908.   rm -rf conftest*
  3909.   eval "ac_cv_func_catgets=no"
  3910. fi
  3911. rm -f conftest*
  3912. fi
  3913.  
  3914. if eval "test \"`echo '$ac_cv_func_'catgets`\" = yes"; then
  3915.   echo "$ac_t""yes" 1>&6
  3916.   cat >> confdefs.h <<\EOF
  3917. #define HAVE_CATGETS 1
  3918. EOF
  3919.  
  3920.            INTLOBJS="\$(CATOBJS)"
  3921.            # Extract the first word of "gencat", so it can be a program name with args.
  3922. set dummy gencat; ac_word=$2
  3923. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  3924. echo "configure:3925: checking for $ac_word" >&5
  3925. if eval "test \"`echo '$''{'ac_cv_path_GENCAT'+set}'`\" = set"; then
  3926.   echo $ac_n "(cached) $ac_c" 1>&6
  3927. else
  3928.   case "$GENCAT" in
  3929.   /*)
  3930.   ac_cv_path_GENCAT="$GENCAT" # Let the user override the test with a path.
  3931.   ;;
  3932.   *)
  3933.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  3934.   for ac_dir in $PATH; do
  3935.     test -z "$ac_dir" && ac_dir=.
  3936.     if test -f $ac_dir/$ac_word; then
  3937.       ac_cv_path_GENCAT="$ac_dir/$ac_word"
  3938.       break
  3939.     fi
  3940.   done
  3941.   IFS="$ac_save_ifs"
  3942.   test -z "$ac_cv_path_GENCAT" && ac_cv_path_GENCAT="no"
  3943.   ;;
  3944. esac
  3945. fi
  3946. GENCAT="$ac_cv_path_GENCAT"
  3947. if test -n "$GENCAT"; then
  3948.   echo "$ac_t""$GENCAT" 1>&6
  3949. else
  3950.   echo "$ac_t""no" 1>&6
  3951. fi
  3952.            if test "$GENCAT" != "no"; then
  3953.          # Extract the first word of "gmsgfmt", so it can be a program name with args.
  3954. set dummy gmsgfmt; ac_word=$2
  3955. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  3956. echo "configure:3957: checking for $ac_word" >&5
  3957. if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
  3958.   echo $ac_n "(cached) $ac_c" 1>&6
  3959. else
  3960.   case "$GMSGFMT" in
  3961.   /*)
  3962.   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
  3963.   ;;
  3964.   *)
  3965.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  3966.   for ac_dir in $PATH; do
  3967.     test -z "$ac_dir" && ac_dir=.
  3968.     if test -f $ac_dir/$ac_word; then
  3969.       ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
  3970.       break
  3971.     fi
  3972.   done
  3973.   IFS="$ac_save_ifs"
  3974.   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="no"
  3975.   ;;
  3976. esac
  3977. fi
  3978. GMSGFMT="$ac_cv_path_GMSGFMT"
  3979. if test -n "$GMSGFMT"; then
  3980.   echo "$ac_t""$GMSGFMT" 1>&6
  3981. else
  3982.   echo "$ac_t""no" 1>&6
  3983. fi
  3984.  
  3985.          if test "$GMSGFMT" = "no"; then
  3986.            # Extract the first word of "msgfmt", so it can be a program name with args.
  3987. set dummy msgfmt; ac_word=$2
  3988. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  3989. echo "configure:3990: checking for $ac_word" >&5
  3990. if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
  3991.   echo $ac_n "(cached) $ac_c" 1>&6
  3992. else
  3993.   case "$GMSGFMT" in
  3994.   /*)
  3995.   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
  3996.   ;;
  3997.   *)
  3998.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  3999.   for ac_dir in $PATH; do
  4000.     test -z "$ac_dir" && ac_dir=.
  4001.     if test -f $ac_dir/$ac_word; then
  4002.       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
  4003.     ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
  4004.     break
  4005.       fi
  4006.     fi
  4007.   done
  4008.   IFS="$ac_save_ifs"
  4009.   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="no"
  4010.   ;;
  4011. esac
  4012. fi
  4013. GMSGFMT="$ac_cv_path_GMSGFMT"
  4014. if test -n "$GMSGFMT"; then
  4015.   echo "$ac_t""$GMSGFMT" 1>&6
  4016. else
  4017.   echo "$ac_t""no" 1>&6
  4018. fi
  4019.  
  4020.          fi
  4021.          # Extract the first word of "xgettext", so it can be a program name with args.
  4022. set dummy xgettext; ac_word=$2
  4023. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  4024. echo "configure:4025: checking for $ac_word" >&5
  4025. if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
  4026.   echo $ac_n "(cached) $ac_c" 1>&6
  4027. else
  4028.   case "$XGETTEXT" in
  4029.   /*)
  4030.   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
  4031.   ;;
  4032.   *)
  4033.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  4034.   for ac_dir in $PATH; do
  4035.     test -z "$ac_dir" && ac_dir=.
  4036.     if test -f $ac_dir/$ac_word; then
  4037.       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
  4038.     ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
  4039.     break
  4040.       fi
  4041.     fi
  4042.   done
  4043.   IFS="$ac_save_ifs"
  4044.   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
  4045.   ;;
  4046. esac
  4047. fi
  4048. XGETTEXT="$ac_cv_path_XGETTEXT"
  4049. if test -n "$XGETTEXT"; then
  4050.   echo "$ac_t""$XGETTEXT" 1>&6
  4051. else
  4052.   echo "$ac_t""no" 1>&6
  4053. fi
  4054.  
  4055.          USE_INCLUDED_LIBINTL=yes
  4056.          CATOBJEXT=.cat
  4057.          INSTOBJEXT=.cat
  4058.          DATADIRNAME=lib
  4059.          INTLDEPS="../intl/libintl.a"
  4060.          INTLLIBS=$INTLDEPS
  4061.          LIBS=`echo $LIBS | sed -e 's/-lintl//'`
  4062.          nls_cv_header_intl=intl/libintl.h
  4063.          nls_cv_header_libgt=intl/libgettext.h
  4064.            fi
  4065. else
  4066.   echo "$ac_t""no" 1>&6
  4067. fi
  4068.  
  4069.       fi
  4070.         fi
  4071.  
  4072.         if test "$CATOBJEXT" = "NONE"; then
  4073.                   nls_cv_use_gnu_gettext=yes
  4074.         fi
  4075.       fi
  4076.  
  4077.       if test "$nls_cv_use_gnu_gettext" = "yes"; then
  4078.                 INTLOBJS="\$(GETTOBJS)"
  4079.         # Extract the first word of "msgfmt", so it can be a program name with args.
  4080. set dummy msgfmt; ac_word=$2
  4081. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  4082. echo "configure:4083: checking for $ac_word" >&5
  4083. if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
  4084.   echo $ac_n "(cached) $ac_c" 1>&6
  4085. else
  4086.   case "$MSGFMT" in
  4087.   /*)
  4088.   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
  4089.   ;;
  4090.   *)
  4091.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  4092.   for ac_dir in $PATH; do
  4093.     test -z "$ac_dir" && ac_dir=.
  4094.     if test -f $ac_dir/$ac_word; then
  4095.       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
  4096.     ac_cv_path_MSGFMT="$ac_dir/$ac_word"
  4097.     break
  4098.       fi
  4099.     fi
  4100.   done
  4101.   IFS="$ac_save_ifs"
  4102.   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
  4103.   ;;
  4104. esac
  4105. fi
  4106. MSGFMT="$ac_cv_path_MSGFMT"
  4107. if test -n "$MSGFMT"; then
  4108.   echo "$ac_t""$MSGFMT" 1>&6
  4109. else
  4110.   echo "$ac_t""no" 1>&6
  4111. fi
  4112.  
  4113.         # Extract the first word of "gmsgfmt", so it can be a program name with args.
  4114. set dummy gmsgfmt; ac_word=$2
  4115. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  4116. echo "configure:4117: checking for $ac_word" >&5
  4117. if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
  4118.   echo $ac_n "(cached) $ac_c" 1>&6
  4119. else
  4120.   case "$GMSGFMT" in
  4121.   /*)
  4122.   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
  4123.   ;;
  4124.   *)
  4125.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  4126.   for ac_dir in $PATH; do
  4127.     test -z "$ac_dir" && ac_dir=.
  4128.     if test -f $ac_dir/$ac_word; then
  4129.       ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
  4130.       break
  4131.     fi
  4132.   done
  4133.   IFS="$ac_save_ifs"
  4134.   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
  4135.   ;;
  4136. esac
  4137. fi
  4138. GMSGFMT="$ac_cv_path_GMSGFMT"
  4139. if test -n "$GMSGFMT"; then
  4140.   echo "$ac_t""$GMSGFMT" 1>&6
  4141. else
  4142.   echo "$ac_t""no" 1>&6
  4143. fi
  4144.  
  4145.         # Extract the first word of "xgettext", so it can be a program name with args.
  4146. set dummy xgettext; ac_word=$2
  4147. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  4148. echo "configure:4149: checking for $ac_word" >&5
  4149. if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
  4150.   echo $ac_n "(cached) $ac_c" 1>&6
  4151. else
  4152.   case "$XGETTEXT" in
  4153.   /*)
  4154.   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
  4155.   ;;
  4156.   *)
  4157.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  4158.   for ac_dir in $PATH; do
  4159.     test -z "$ac_dir" && ac_dir=.
  4160.     if test -f $ac_dir/$ac_word; then
  4161.       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
  4162.     ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
  4163.     break
  4164.       fi
  4165.     fi
  4166.   done
  4167.   IFS="$ac_save_ifs"
  4168.   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
  4169.   ;;
  4170. esac
  4171. fi
  4172. XGETTEXT="$ac_cv_path_XGETTEXT"
  4173. if test -n "$XGETTEXT"; then
  4174.   echo "$ac_t""$XGETTEXT" 1>&6
  4175. else
  4176.   echo "$ac_t""no" 1>&6
  4177. fi
  4178.  
  4179.         
  4180.     USE_INCLUDED_LIBINTL=yes
  4181.         CATOBJEXT=.gmo
  4182.         INSTOBJEXT=.mo
  4183.         DATADIRNAME=share
  4184.     INTLDEPS="../intl/libintl.a"
  4185.     INTLLIBS=$INTLDEPS
  4186.     LIBS=`echo $LIBS | sed -e 's/-lintl//'`
  4187.         nls_cv_header_intl=intl/libintl.h
  4188.         nls_cv_header_libgt=intl/libgettext.h
  4189.       fi
  4190.  
  4191.             if test "$XGETTEXT" != ":"; then
  4192.             if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
  4193.       : ;
  4194.     else
  4195.       echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
  4196.       XGETTEXT=":"
  4197.     fi
  4198.       fi
  4199.  
  4200.       # We need to process the po/ directory.
  4201.       POSUB=po
  4202.     else
  4203.       DATADIRNAME=share
  4204.       nls_cv_header_intl=intl/libintl.h
  4205.       nls_cv_header_libgt=intl/libgettext.h
  4206.     fi
  4207.  
  4208.     # If this is used in GNU gettext we have to set USE_NLS to `yes'
  4209.     # because some of the sources are only built for this goal.
  4210.     if test "$PACKAGE" = gettext; then
  4211.       USE_NLS=yes
  4212.       USE_INCLUDED_LIBINTL=yes
  4213.     fi
  4214.  
  4215.                 for lang in $ALL_LINGUAS; do
  4216.       GMOFILES="$GMOFILES $lang.gmo"
  4217.       POFILES="$POFILES $lang.po"
  4218.     done
  4219.  
  4220.         
  4221.     
  4222.     
  4223.     
  4224.     
  4225.     
  4226.     
  4227.     
  4228.     
  4229.     
  4230.     
  4231.   
  4232.  
  4233.    if test "x$CATOBJEXT" != "x"; then
  4234.      if test "x$ALL_LINGUAS" = "x"; then
  4235.        LINGUAS=
  4236.      else
  4237.        echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
  4238. echo "configure:4239: checking for catalogs to be installed" >&5
  4239.        NEW_LINGUAS=
  4240.        for lang in ${LINGUAS=$ALL_LINGUAS}; do
  4241.          case "$ALL_LINGUAS" in
  4242.           *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
  4243.          esac
  4244.        done
  4245.        LINGUAS=$NEW_LINGUAS
  4246.        echo "$ac_t""$LINGUAS" 1>&6
  4247.      fi
  4248.  
  4249.           if test -n "$LINGUAS"; then
  4250.        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
  4251.      fi
  4252.    fi
  4253.  
  4254.             test -d intl || mkdir intl
  4255.    if test "$CATOBJEXT" = ".cat"; then
  4256.      ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
  4257. echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
  4258. echo "configure:4259: checking for linux/version.h" >&5
  4259. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  4260.   echo $ac_n "(cached) $ac_c" 1>&6
  4261. else
  4262.   cat > conftest.$ac_ext <<EOF
  4263. #line 4264 "configure"
  4264. #include "confdefs.h"
  4265. #include <linux/version.h>
  4266. EOF
  4267. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  4268. { (eval echo configure:4269: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  4269. ac_err=`grep -v '^ *+' conftest.out`
  4270. if test -z "$ac_err"; then
  4271.   rm -rf conftest*
  4272.   eval "ac_cv_header_$ac_safe=yes"
  4273. else
  4274.   echo "$ac_err" >&5
  4275.   echo "configure: failed program was:" >&5
  4276.   cat conftest.$ac_ext >&5
  4277.   rm -rf conftest*
  4278.   eval "ac_cv_header_$ac_safe=no"
  4279. fi
  4280. rm -f conftest*
  4281. fi
  4282. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  4283.   echo "$ac_t""yes" 1>&6
  4284.   msgformat=linux
  4285. else
  4286.   echo "$ac_t""no" 1>&6
  4287. msgformat=xopen
  4288. fi
  4289.  
  4290.  
  4291.                sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed
  4292.    fi
  4293.       sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
  4294.      $srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed
  4295.  
  4296.             if test "$PACKAGE" = "gettext"; then
  4297.      GT_NO="#NO#"
  4298.      GT_YES=
  4299.    else
  4300.      GT_NO=
  4301.      GT_YES="#YES#"
  4302.    fi
  4303.    
  4304.    
  4305.  
  4306.             MKINSTALLDIRS=
  4307.    if test $ac_aux_dir; then
  4308.      MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
  4309.    fi
  4310.    if test -z $MKINSTALLDIRS; then
  4311.      MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
  4312.    fi
  4313.    
  4314.  
  4315.          test -d po || mkdir po
  4316.    if test "x$srcdir" != "x."; then
  4317.      if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
  4318.        posrcprefix="$srcdir/"
  4319.      else
  4320.        posrcprefix="../$srcdir/"
  4321.      fi
  4322.    else
  4323.      posrcprefix="../"
  4324.    fi
  4325.    sed -e "/^#/d" -e "/^\$/d" -e "s,.*,    $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
  4326.     < $srcdir/po/POTFILES.in > po/POTFILES
  4327.   
  4328.  
  4329.  
  4330. trap '' 1 2 15
  4331. cat > confcache <<\EOF
  4332. # This file is a shell script that caches the results of configure
  4333. # tests run on this system so they can be shared between configure
  4334. # scripts and configure runs.  It is not useful on other systems.
  4335. # If it contains results you don't want to keep, you may remove or edit it.
  4336. #
  4337. # By default, configure uses ./config.cache as the cache file,
  4338. # creating it if it does not exist already.  You can give configure
  4339. # the --cache-file=FILE option to use a different cache file; that is
  4340. # what configure does when it calls configure scripts in
  4341. # subdirectories, so they share the cache.
  4342. # Giving --cache-file=/dev/null disables caching, for debugging configure.
  4343. # config.status only pays attention to the cache file if you give it the
  4344. # --recheck option to rerun configure.
  4345. #
  4346. EOF
  4347. # The following way of writing the cache mishandles newlines in values,
  4348. # but we know of no workaround that is simple, portable, and efficient.
  4349. # So, don't put newlines in cache variables' values.
  4350. # Ultrix sh set writes to stderr and can't be redirected directly,
  4351. # and sets the high bit in the cache file unless we assign to the vars.
  4352. (set) 2>&1 |
  4353.   case `(ac_space=' '; set | grep ac_space) 2>&1` in
  4354.   *ac_space=\ *)
  4355.     # `set' does not quote correctly, so add quotes (double-quote substitution
  4356.     # turns \\\\ into \\, and sed turns \\ into \).
  4357.     sed -n \
  4358.       -e "s/'/'\\\\''/g" \
  4359.       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
  4360.     ;;
  4361.   *)
  4362.     # `set' quotes correctly as required by POSIX, so do not add quotes.
  4363.     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
  4364.     ;;
  4365.   esac >> confcache
  4366. if cmp -s $cache_file confcache; then
  4367.   :
  4368. else
  4369.   if test -w $cache_file; then
  4370.     echo "updating cache $cache_file"
  4371.     cat confcache > $cache_file
  4372.   else
  4373.     echo "not updating unwritable cache $cache_file"
  4374.   fi
  4375. fi
  4376. rm -f confcache
  4377.  
  4378. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  4379.  
  4380. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  4381. # Let make expand exec_prefix.
  4382. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  4383.  
  4384. # Any assignment to VPATH causes Sun make to only execute
  4385. # the first set of double-colon rules, so remove it if not needed.
  4386. # If there is a colon in the path, we need to keep it.
  4387. if test "x$srcdir" = x.; then
  4388.   ac_vpsub='/^[     ]*VPATH[     ]*=[^:]*$/d'
  4389. fi
  4390.  
  4391. trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  4392.  
  4393. DEFS=-DHAVE_CONFIG_H
  4394.  
  4395. # Without the "./", some shells look in PATH for config.status.
  4396. : ${CONFIG_STATUS=./config.status}
  4397.  
  4398. echo creating $CONFIG_STATUS
  4399. rm -f $CONFIG_STATUS
  4400. cat > $CONFIG_STATUS <<EOF
  4401. #! /bin/sh
  4402. # Generated automatically by configure.
  4403. # Run this file to recreate the current configuration.
  4404. # This directory was configured as follows,
  4405. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  4406. #
  4407. # $0 $ac_configure_args
  4408. #
  4409. # Compiler output produced by configure, useful for debugging
  4410. # configure, is in ./config.log if it exists.
  4411.  
  4412. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  4413. for ac_option
  4414. do
  4415.   case "\$ac_option" in
  4416.   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  4417.     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  4418.     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  4419.   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  4420.     echo "$CONFIG_STATUS generated by autoconf version 2.12"
  4421.     exit 0 ;;
  4422.   -help | --help | --hel | --he | --h)
  4423.     echo "\$ac_cs_usage"; exit 0 ;;
  4424.   *) echo "\$ac_cs_usage"; exit 1 ;;
  4425.   esac
  4426. done
  4427.  
  4428. ac_given_srcdir=$srcdir
  4429. ac_given_INSTALL="$INSTALL"
  4430.  
  4431. trap 'rm -fr `echo "Makefile doc/Makefile intl/Makefile lib/Makefile \
  4432. man/Makefile m4/Makefile po/Makefile.in src/Makefile tests/Makefile \
  4433. tests/cut-test/Makefile
  4434. tests/join-test/Makefile
  4435. tests/md5sum-test/Makefile
  4436. tests/pr-test/Makefile
  4437. tests/sort-test/Makefile
  4438. tests/tail/Makefile
  4439. tests/tr-test/Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
  4440. EOF
  4441. cat >> $CONFIG_STATUS <<EOF
  4442.  
  4443. # Protect against being on the right side of a sed subst in config.status.
  4444. sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
  4445.  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
  4446. $ac_vpsub
  4447. $extrasub
  4448. s%@CFLAGS@%$CFLAGS%g
  4449. s%@CPPFLAGS@%$CPPFLAGS%g
  4450. s%@CXXFLAGS@%$CXXFLAGS%g
  4451. s%@DEFS@%$DEFS%g
  4452. s%@LDFLAGS@%$LDFLAGS%g
  4453. s%@LIBS@%$LIBS%g
  4454. s%@exec_prefix@%$exec_prefix%g
  4455. s%@prefix@%$prefix%g
  4456. s%@program_transform_name@%$program_transform_name%g
  4457. s%@bindir@%$bindir%g
  4458. s%@sbindir@%$sbindir%g
  4459. s%@libexecdir@%$libexecdir%g
  4460. s%@datadir@%$datadir%g
  4461. s%@sysconfdir@%$sysconfdir%g
  4462. s%@sharedstatedir@%$sharedstatedir%g
  4463. s%@localstatedir@%$localstatedir%g
  4464. s%@libdir@%$libdir%g
  4465. s%@includedir@%$includedir%g
  4466. s%@oldincludedir@%$oldincludedir%g
  4467. s%@infodir@%$infodir%g
  4468. s%@mandir@%$mandir%g
  4469. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  4470. s%@INSTALL_DATA@%$INSTALL_DATA%g
  4471. s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
  4472. s%@PACKAGE@%$PACKAGE%g
  4473. s%@VERSION@%$VERSION%g
  4474. s%@SET_MAKE@%$SET_MAKE%g
  4475. s%@MAINT@%$MAINT%g
  4476. s%@PERL@%$PERL%g
  4477. s%@CC@%$CC%g
  4478. s%@CPP@%$CPP%g
  4479. s%@RANLIB@%$RANLIB%g
  4480. s%@LIBOBJS@%$LIBOBJS%g
  4481. s%@U@%$U%g
  4482. s%@ANSI2KNR@%$ANSI2KNR%g
  4483. s%@ALLOCA@%$ALLOCA%g
  4484. s%@POW_LIBM@%$POW_LIBM%g
  4485. s%@USE_NLS@%$USE_NLS%g
  4486. s%@MSGFMT@%$MSGFMT%g
  4487. s%@GMSGFMT@%$GMSGFMT%g
  4488. s%@XGETTEXT@%$XGETTEXT%g
  4489. s%@GENCAT@%$GENCAT%g
  4490. s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
  4491. s%@CATALOGS@%$CATALOGS%g
  4492. s%@CATOBJEXT@%$CATOBJEXT%g
  4493. s%@DATADIRNAME@%$DATADIRNAME%g
  4494. s%@GMOFILES@%$GMOFILES%g
  4495. s%@INSTOBJEXT@%$INSTOBJEXT%g
  4496. s%@INTLDEPS@%$INTLDEPS%g
  4497. s%@INTLLIBS@%$INTLLIBS%g
  4498. s%@INTLOBJS@%$INTLOBJS%g
  4499. s%@POFILES@%$POFILES%g
  4500. s%@POSUB@%$POSUB%g
  4501. s%@GT_NO@%$GT_NO%g
  4502. s%@GT_YES@%$GT_YES%g
  4503. s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
  4504.  
  4505. CEOF
  4506. EOF
  4507.  
  4508. cat >> $CONFIG_STATUS <<\EOF
  4509.  
  4510. # Split the substitutions into bite-sized pieces for seds with
  4511. # small command number limits, like on Digital OSF/1 and HP-UX.
  4512. ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
  4513. ac_file=1 # Number of current file.
  4514. ac_beg=1 # First line for current file.
  4515. ac_end=$ac_max_sed_cmds # Line after last line for current file.
  4516. ac_more_lines=:
  4517. ac_sed_cmds=""
  4518. while $ac_more_lines; do
  4519.   if test $ac_beg -gt 1; then
  4520.     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
  4521.   else
  4522.     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
  4523.   fi
  4524.   if test ! -s conftest.s$ac_file; then
  4525.     ac_more_lines=false
  4526.     rm -f conftest.s$ac_file
  4527.   else
  4528.     if test -z "$ac_sed_cmds"; then
  4529.       ac_sed_cmds="sed -f conftest.s$ac_file"
  4530.     else
  4531.       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
  4532.     fi
  4533.     ac_file=`expr $ac_file + 1`
  4534.     ac_beg=$ac_end
  4535.     ac_end=`expr $ac_end + $ac_max_sed_cmds`
  4536.   fi
  4537. done
  4538. if test -z "$ac_sed_cmds"; then
  4539.   ac_sed_cmds=cat
  4540. fi
  4541. EOF
  4542.  
  4543. cat >> $CONFIG_STATUS <<EOF
  4544.  
  4545. CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile intl/Makefile lib/Makefile \
  4546. man/Makefile m4/Makefile po/Makefile.in src/Makefile tests/Makefile \
  4547. tests/cut-test/Makefile
  4548. tests/join-test/Makefile
  4549. tests/md5sum-test/Makefile
  4550. tests/pr-test/Makefile
  4551. tests/sort-test/Makefile
  4552. tests/tail/Makefile
  4553. tests/tr-test/Makefile"}
  4554. EOF
  4555. cat >> $CONFIG_STATUS <<\EOF
  4556. for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  4557.   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  4558.   case "$ac_file" in
  4559.   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
  4560.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  4561.   *) ac_file_in="${ac_file}.in" ;;
  4562.   esac
  4563.  
  4564.   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
  4565.  
  4566.   # Remove last slash and all that follows it.  Not all systems have dirname.
  4567.   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  4568.   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  4569.     # The file is in a subdirectory.
  4570.     test ! -d "$ac_dir" && mkdir "$ac_dir"
  4571.     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
  4572.     # A "../" for each directory in $ac_dir_suffix.
  4573.     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  4574.   else
  4575.     ac_dir_suffix= ac_dots=
  4576.   fi
  4577.  
  4578.   case "$ac_given_srcdir" in
  4579.   .)  srcdir=.
  4580.       if test -z "$ac_dots"; then top_srcdir=.
  4581.       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  4582.   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  4583.   *) # Relative path.
  4584.     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  4585.     top_srcdir="$ac_dots$ac_given_srcdir" ;;
  4586.   esac
  4587.  
  4588.   case "$ac_given_INSTALL" in
  4589.   [/$]*) INSTALL="$ac_given_INSTALL" ;;
  4590.   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  4591.   esac
  4592.  
  4593.   echo creating "$ac_file"
  4594.   rm -f "$ac_file"
  4595.   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  4596.   case "$ac_file" in
  4597.   *Makefile*) ac_comsub="1i\\
  4598. # $configure_input" ;;
  4599.   *) ac_comsub= ;;
  4600.   esac
  4601.  
  4602.   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  4603.   sed -e "$ac_comsub
  4604. s%@configure_input@%$configure_input%g
  4605. s%@srcdir@%$srcdir%g
  4606. s%@top_srcdir@%$top_srcdir%g
  4607. s%@INSTALL@%$INSTALL%g
  4608. " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
  4609. fi; done
  4610. rm -f conftest.s*
  4611.  
  4612. # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
  4613. # NAME is the cpp macro being defined and VALUE is the value it is being given.
  4614. #
  4615. # ac_d sets the value in "#define NAME VALUE" lines.
  4616. ac_dA='s%^\([     ]*\)#\([     ]*define[     ][     ]*\)'
  4617. ac_dB='\([     ][     ]*\)[^     ]*%\1#\2'
  4618. ac_dC='\3'
  4619. ac_dD='%g'
  4620. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  4621. ac_uA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  4622. ac_uB='\([     ]\)%\1#\2define\3'
  4623. ac_uC=' '
  4624. ac_uD='\4%g'
  4625. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  4626. ac_eA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  4627. ac_eB='$%\1#\2define\3'
  4628. ac_eC=' '
  4629. ac_eD='%g'
  4630.  
  4631. if test "${CONFIG_HEADERS+set}" != set; then
  4632. EOF
  4633. cat >> $CONFIG_STATUS <<EOF
  4634.   CONFIG_HEADERS="config.h"
  4635. EOF
  4636. cat >> $CONFIG_STATUS <<\EOF
  4637. fi
  4638. for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  4639.   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  4640.   case "$ac_file" in
  4641.   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
  4642.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  4643.   *) ac_file_in="${ac_file}.in" ;;
  4644.   esac
  4645.  
  4646.   echo creating $ac_file
  4647.  
  4648.   rm -f conftest.frag conftest.in conftest.out
  4649.   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  4650.   cat $ac_file_inputs > conftest.in
  4651.  
  4652. EOF
  4653.  
  4654. # Transform confdefs.h into a sed script conftest.vals that substitutes
  4655. # the proper values into config.h.in to produce config.h.  And first:
  4656. # Protect against being on the right side of a sed subst in config.status.
  4657. # Protect against being in an unquoted here document in config.status.
  4658. rm -f conftest.vals
  4659. cat > conftest.hdr <<\EOF
  4660. s/[\\&%]/\\&/g
  4661. s%[\\$`]%\\&%g
  4662. s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
  4663. s%ac_d%ac_u%gp
  4664. s%ac_u%ac_e%gp
  4665. EOF
  4666. sed -n -f conftest.hdr confdefs.h > conftest.vals
  4667. rm -f conftest.hdr
  4668.  
  4669. # This sed command replaces #undef with comments.  This is necessary, for
  4670. # example, in the case of _POSIX_SOURCE, which is predefined and required
  4671. # on some systems where configure will not decide to define it.
  4672. cat >> conftest.vals <<\EOF
  4673. s%^[     ]*#[     ]*undef[     ][     ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
  4674. EOF
  4675.  
  4676. # Break up conftest.vals because some shells have a limit on
  4677. # the size of here documents, and old seds have small limits too.
  4678.  
  4679. rm -f conftest.tail
  4680. while :
  4681. do
  4682.   ac_lines=`grep -c . conftest.vals`
  4683.   # grep -c gives empty output for an empty file on some AIX systems.
  4684.   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  4685.   # Write a limited-size here document to conftest.frag.
  4686.   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
  4687.   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
  4688.   echo 'CEOF
  4689.   sed -f conftest.frag conftest.in > conftest.out
  4690.   rm -f conftest.in
  4691.   mv conftest.out conftest.in
  4692. ' >> $CONFIG_STATUS
  4693.   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
  4694.   rm -f conftest.vals
  4695.   mv conftest.tail conftest.vals
  4696. done
  4697. rm -f conftest.vals
  4698.  
  4699. cat >> $CONFIG_STATUS <<\EOF
  4700.   rm -f conftest.frag conftest.h
  4701.   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  4702.   cat conftest.in >> conftest.h
  4703.   rm -f conftest.in
  4704.   if cmp -s $ac_file conftest.h 2>/dev/null; then
  4705.     echo "$ac_file is unchanged"
  4706.     rm -f conftest.h
  4707.   else
  4708.     # Remove last slash and all that follows it.  Not all systems have dirname.
  4709.       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  4710.       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  4711.       # The file is in a subdirectory.
  4712.       test ! -d "$ac_dir" && mkdir "$ac_dir"
  4713.     fi
  4714.     rm -f $ac_file
  4715.     mv conftest.h $ac_file
  4716.   fi
  4717. fi; done
  4718.  
  4719. EOF
  4720.  
  4721. cat >> $CONFIG_STATUS <<EOF
  4722. ac_sources="$nls_cv_header_libgt"
  4723. ac_dests="$nls_cv_header_intl"
  4724. EOF
  4725.  
  4726. cat >> $CONFIG_STATUS <<\EOF
  4727. srcdir=$ac_given_srcdir
  4728. while test -n "$ac_sources"; do
  4729.   set $ac_dests; ac_dest=$1; shift; ac_dests=$*
  4730.   set $ac_sources; ac_source=$1; shift; ac_sources=$*
  4731.  
  4732.   echo "linking $srcdir/$ac_source to $ac_dest"
  4733.  
  4734.   if test ! -r $srcdir/$ac_source; then
  4735.     { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
  4736.   fi
  4737.   rm -f $ac_dest
  4738.  
  4739.   # Make relative symlinks.
  4740.   # Remove last slash and all that follows it.  Not all systems have dirname.
  4741.   ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
  4742.   if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
  4743.     # The dest file is in a subdirectory.
  4744.     test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
  4745.     ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
  4746.     # A "../" for each directory in $ac_dest_dir_suffix.
  4747.     ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
  4748.   else
  4749.     ac_dest_dir_suffix= ac_dots=
  4750.   fi
  4751.  
  4752.   case "$srcdir" in
  4753.   [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
  4754.   *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
  4755.   esac
  4756.  
  4757.   # Make a symlink if possible; otherwise try a hard link.
  4758.   if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
  4759.     ln $srcdir/$ac_source $ac_dest; then :
  4760.   else
  4761.     { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
  4762.   fi
  4763. done
  4764. EOF
  4765. cat >> $CONFIG_STATUS <<EOF
  4766.  
  4767.  
  4768. EOF
  4769. cat >> $CONFIG_STATUS <<\EOF
  4770. test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
  4771. sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
  4772. exit 0
  4773. EOF
  4774. chmod +x $CONFIG_STATUS
  4775. rm -fr confdefs* $ac_clean_files
  4776. test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
  4777.  
  4778.