home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 22 gnu / 22-gnu.zip / gnurecod.zip / configure < prev    next >
Text File  |  1994-11-06  |  45KB  |  1,626 lines

  1. #!/bin/sh
  2.  
  3. # Guess values for system-dependent variables and create Makefiles.
  4. # Generated automatically using autoconf version 2.1 
  5. # Copyright (C) 1992, 1993, 1994 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.   --with-dmalloc          use dmalloc, as in dmalloc.tar.gz from
  16.                           @/ftp.antaire.com:antaire/src/dmalloc."
  17.  
  18. # Initialize some variables set by options.
  19. # The variables have the same names as the options, with
  20. # dashes changed to underlines.
  21. build=NONE
  22. cache_file=./config.cache
  23. exec_prefix=NONE
  24. host=NONE
  25. no_create=
  26. nonopt=NONE
  27. no_recursion=
  28. prefix=NONE
  29. program_prefix=NONE
  30. program_suffix=NONE
  31. program_transform_name=s,x,x,
  32. silent=
  33. site=
  34. srcdir=
  35. target=NONE
  36. verbose=
  37. x_includes=NONE
  38. x_libraries=NONE
  39.  
  40. # Initialize some other variables.
  41. subdirs=
  42.  
  43. ac_prev=
  44. for ac_option
  45. do
  46.  
  47.   # If the previous option needs an argument, assign it.
  48.   if test -n "$ac_prev"; then
  49.     eval "$ac_prev=\$ac_option"
  50.     ac_prev=
  51.     continue
  52.   fi
  53.  
  54.   case "$ac_option" in
  55.   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  56.   *) ac_optarg= ;;
  57.   esac
  58.  
  59.   # Accept the important Cygnus configure options, so we can diagnose typos.
  60.  
  61.   case "$ac_option" in
  62.  
  63.   -build | --build | --buil | --bui | --bu | --b)
  64.     ac_prev=build ;;
  65.   -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
  66.     build="$ac_optarg" ;;
  67.  
  68.   -cache-file | --cache-file | --cache-fil | --cache-fi \
  69.   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  70.     ac_prev=cache_file ;;
  71.   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  72.   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  73.     cache_file="$ac_optarg" ;;
  74.  
  75.   -disable-* | --disable-*)
  76.     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
  77.     # Reject names that are not valid shell variable names.
  78.     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  79.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  80.     fi
  81.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  82.     eval "enable_${ac_feature}=no" ;;
  83.  
  84.   -enable-* | --enable-*)
  85.     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  86.     # Reject names that are not valid shell variable names.
  87.     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  88.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  89.     fi
  90.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  91.     case "$ac_option" in
  92.       *=*) ;;
  93.       *) ac_optarg=yes ;;
  94.     esac
  95.     eval "enable_${ac_feature}='$ac_optarg'" ;;
  96.  
  97.   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  98.   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  99.   | --exec | --exe | --ex)
  100.     ac_prev=exec_prefix ;;
  101.   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  102.   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  103.   | --exec=* | --exe=* | --ex=*)
  104.     exec_prefix="$ac_optarg" ;;
  105.  
  106.   -gas | --gas | --ga | --g)
  107.     # Obsolete; use --with-gas.
  108.     with_gas=yes ;;
  109.  
  110.   -help | --help | --hel | --he)
  111.     # Omit some internal or obsolete options to make the list less imposing.
  112.     # This message is too long to be a string in the A/UX 3.1 sh.
  113.     cat << EOF
  114. Usage: configure [options] [host]
  115. Options: [defaults in brackets after descriptions]
  116. Configuration:
  117.   --cache-file=FILE       cache test results in FILE
  118.   --help                  print this message
  119.   --no-create             do not create output files
  120.   --quiet, --silent       do not print \`checking...' messages
  121.   --version               print the version of autoconf that created configure
  122. Directory and file names:
  123.   --prefix=PREFIX         install architecture-independent files in PREFIX
  124.                           [$ac_default_prefix]
  125.   --exec-prefix=PREFIX    install architecture-dependent files in PREFIX
  126.                           [same as prefix]
  127.   --srcdir=DIR            find the sources in DIR [configure dir or ..]
  128.   --program-prefix=PREFIX prepend PREFIX to installed program names
  129.   --program-suffix=SUFFIX append SUFFIX to installed program names
  130.   --program-transform-name=PROGRAM run sed PROGRAM on installed program names
  131. Host type:
  132.   --build=BUILD           configure for building on BUILD [BUILD=HOST]
  133.   --host=HOST             configure for HOST [guessed]
  134.   --target=TARGET         configure for TARGET [TARGET=HOST]
  135. Features and packages:
  136.   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  137.   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  138.   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  139.   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  140.   --x-includes=DIR        X include files are in DIR
  141.   --x-libraries=DIR       X library files are in DIR
  142. --enable and --with options recognized:$ac_help
  143. EOF
  144.     exit 0 ;;
  145.  
  146.   -host | --host | --hos | --ho)
  147.     ac_prev=host ;;
  148.   -host=* | --host=* | --hos=* | --ho=*)
  149.     host="$ac_optarg" ;;
  150.  
  151.   -nfp | --nfp | --nf)
  152.     # Obsolete; use --without-fp.
  153.     with_fp=no ;;
  154.  
  155.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  156.   | --no-cr | --no-c)
  157.     no_create=yes ;;
  158.  
  159.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  160.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
  161.     no_recursion=yes ;;
  162.  
  163.   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  164.     ac_prev=prefix ;;
  165.   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  166.     prefix="$ac_optarg" ;;
  167.  
  168.   -program-prefix | --program-prefix | --program-prefi | --program-pref \
  169.   | --program-pre | --program-pr | --program-p)
  170.     ac_prev=program_prefix ;;
  171.   -program-prefix=* | --program-prefix=* | --program-prefi=* \
  172.   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  173.     program_prefix="$ac_optarg" ;;
  174.  
  175.   -program-suffix | --program-suffix | --program-suffi | --program-suff \
  176.   | --program-suf | --program-su | --program-s)
  177.     ac_prev=program_suffix ;;
  178.   -program-suffix=* | --program-suffix=* | --program-suffi=* \
  179.   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  180.     program_suffix="$ac_optarg" ;;
  181.  
  182.   -program-transform-name | --program-transform-name \
  183.   | --program-transform-nam | --program-transform-na \
  184.   | --program-transform-n | --program-transform- \
  185.   | --program-transform | --program-transfor \
  186.   | --program-transfo | --program-transf \
  187.   | --program-trans | --program-tran \
  188.   | --progr-tra | --program-tr | --program-t)
  189.     ac_prev=program_transform_name ;;
  190.   -program-transform-name=* | --program-transform-name=* \
  191.   | --program-transform-nam=* | --program-transform-na=* \
  192.   | --program-transform-n=* | --program-transform-=* \
  193.   | --program-transform=* | --program-transfor=* \
  194.   | --program-transfo=* | --program-transf=* \
  195.   | --program-trans=* | --program-tran=* \
  196.   | --progr-tra=* | --program-tr=* | --program-t=*)
  197.     program_transform_name="$ac_optarg" ;;
  198.  
  199.   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  200.   | -silent | --silent | --silen | --sile | --sil)
  201.     silent=yes ;;
  202.  
  203.   -site | --site | --sit)
  204.     ac_prev=site ;;
  205.   -site=* | --site=* | --sit=*)
  206.     site="$ac_optarg" ;;
  207.  
  208.   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  209.     ac_prev=srcdir ;;
  210.   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  211.     srcdir="$ac_optarg" ;;
  212.  
  213.   -target | --target | --targe | --targ | --tar | --ta | --t)
  214.     ac_prev=target ;;
  215.   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  216.     target="$ac_optarg" ;;
  217.  
  218.   -v | -verbose | --verbose | --verbos | --verbo | --verb)
  219.     verbose=yes ;;
  220.  
  221.   -version | --version | --versio | --versi | --vers)
  222.     echo "configure generated by autoconf version 2.1"
  223.     exit 0 ;;
  224.  
  225.   -with-* | --with-*)
  226.     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  227.     # Reject names that are not valid shell variable names.
  228.     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  229.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  230.     fi
  231.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  232.     case "$ac_option" in
  233.       *=*) ;;
  234.       *) ac_optarg=yes ;;
  235.     esac
  236.     eval "with_${ac_package}='$ac_optarg'" ;;
  237.  
  238.   -without-* | --without-*)
  239.     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
  240.     # Reject names that are not valid shell variable names.
  241.     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  242.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  243.     fi
  244.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  245.     eval "with_${ac_package}=no" ;;
  246.  
  247.   --x)
  248.     # Obsolete; use --with-x.
  249.     with_x=yes ;;
  250.  
  251.   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  252.   | --x-incl | --x-inc | --x-in | --x-i)
  253.     ac_prev=x_includes ;;
  254.   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  255.   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  256.     x_includes="$ac_optarg" ;;
  257.  
  258.   -x-libraries | --x-libraries | --x-librarie | --x-librari \
  259.   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  260.     ac_prev=x_libraries ;;
  261.   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  262.   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  263.     x_libraries="$ac_optarg" ;;
  264.  
  265.   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
  266.     ;;
  267.  
  268.   *) 
  269.     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  270.       echo "configure: warning: $ac_option: invalid host type" 1>&2
  271.     fi
  272.     if test "x$nonopt" != xNONE; then
  273.       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
  274.     fi
  275.     nonopt="$ac_option"
  276.     ;;
  277.  
  278.   esac
  279. done
  280.  
  281. if test -n "$ac_prev"; then
  282.   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
  283. fi
  284.  
  285. trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15
  286.  
  287. # File descriptor usage:
  288. # 0 unused; standard input
  289. # 1 file creation
  290. # 2 errors and warnings
  291. # 3 unused; some systems may open it to /dev/tty
  292. # 4 checking for... messages and results
  293. # 5 compiler messages saved in config.log
  294. if test "$silent" = yes; then
  295.   exec 4>/dev/null
  296. else
  297.   exec 4>&1
  298. fi
  299. exec 5>./config.log
  300.  
  301. echo "\
  302. This file contains any messages produced by compilers while
  303. running configure, to aid debugging if configure makes a mistake.
  304. " 1>&5
  305.  
  306. # Strip out --no-create and --no-recursion so they do not pile up.
  307. # Also quote any args containing shell metacharacters.
  308. ac_configure_args=
  309. for ac_arg
  310. do
  311.   case "$ac_arg" in
  312.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  313.   | --no-cr | --no-c) ;;
  314.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  315.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  316.   *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  317.   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  318.   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  319.   esac
  320. done
  321.  
  322. # NLS nuisances.
  323. # Only set LANG and LC_ALL to C if already set.
  324. # These must not be set unconditionally because not all systems understand
  325. # e.g. LANG=C (notably SCO).
  326. if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
  327. if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
  328.  
  329. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  330. rm -rf conftest* confdefs.h
  331. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  332. echo > confdefs.h
  333.  
  334. # A filename unique to this package, relative to the directory that
  335. # configure is in, which we can look for to find out if srcdir is correct.
  336. ac_unique_file=recode.c
  337.  
  338. # Find the source files, if location was not specified.
  339. if test -z "$srcdir"; then
  340.   ac_srcdir_defaulted=yes
  341.   # Try the directory containing this script, then its parent.
  342.   ac_prog=$0
  343.   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  344.   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  345.   srcdir=$ac_confdir
  346.   if test ! -r $srcdir/$ac_unique_file; then
  347.     srcdir=..
  348.   fi
  349. else
  350.   ac_srcdir_defaulted=no
  351. fi
  352. if test ! -r $srcdir/$ac_unique_file; then
  353.   if test "$ac_srcdir_defaulted" = yes; then
  354.     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  355.   else
  356.     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  357.   fi
  358. fi
  359. srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
  360.  
  361. # Prefer explicitly selected file to automatically selected ones.
  362. if test -z "$CONFIG_SITE"; then
  363.   if test "x$prefix" != xNONE; then
  364.     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  365.   else
  366.     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  367.   fi
  368. fi
  369. for ac_site_file in $CONFIG_SITE; do
  370.   if test -r "$ac_site_file"; then
  371.     echo "loading site script $ac_site_file"
  372.     . "$ac_site_file"
  373.   fi
  374. done
  375.  
  376. if test -r "$cache_file"; then
  377.   echo "loading cache $cache_file"
  378.   . $cache_file
  379. else
  380.   echo "creating cache $cache_file"
  381.   > $cache_file
  382. fi
  383.  
  384. ac_ext=c
  385. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  386. ac_cpp='$CPP $CPPFLAGS'
  387. ac_compile='${CC-cc} $CFLAGS $CPPFLAGS conftest.$ac_ext -c 1>&5 2>&5'
  388. ac_link='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext -o conftest $LIBS 1>&5 2>&5'
  389.  
  390. if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  391.   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  392.   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
  393.     ac_n= ac_c='
  394. ' ac_t='    '
  395.   else
  396.     ac_n=-n ac_c= ac_t=
  397.   fi
  398. else
  399.   ac_n= ac_c='\c' ac_t=
  400. fi
  401.  
  402.  
  403.  
  404. if test "$program_transform_name" = s,x,x,; then
  405.   program_transform_name=
  406. else
  407.   # Double any \ or $.
  408.   echo 's,\\,\\\\,g; s,\$,$$,g' > conftestsed
  409.   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
  410.   rm -f conftestsed
  411. fi
  412. test "$program_prefix" != NONE &&
  413.   program_transform_name="s,^,${program_prefix},; $program_transform_name"
  414. # Use a double $ so make ignores it.
  415. test "$program_suffix" != NONE &&
  416.   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
  417.  
  418. # sed with no file args requires a program.
  419. test "$program_transform_name" = "" && program_transform_name="s,x,x,"
  420.  
  421.  
  422. PRODUCT=recode
  423. VERSION=3.4
  424. cat >> confdefs.h <<EOF
  425. #define PRODUCT "$PRODUCT"
  426. EOF
  427.  
  428. cat >> confdefs.h <<EOF
  429. #define VERSION "$VERSION"
  430. EOF
  431.  
  432.  
  433.  
  434.  
  435. for ac_prog in mawk gawk nawk awk
  436. do
  437. # Extract the first word of "$ac_prog", so it can be a program name with args.
  438. set dummy $ac_prog; ac_word=$2
  439. echo $ac_n "checking for $ac_word""... $ac_c" 1>&4
  440. if eval "test \"`echo '${'ac_cv_prog_AWK'+set}'`\" = set"; then
  441.   echo $ac_n "(cached) $ac_c" 1>&4
  442. else
  443.   if test -n "$AWK"; then
  444.   ac_cv_prog_AWK="$AWK" # Let the user override the test.
  445. else
  446.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  447.   for ac_dir in $PATH; do
  448.     test -z "$ac_dir" && ac_dir=.
  449.     if test -f $ac_dir/$ac_word; then
  450.       ac_cv_prog_AWK="$ac_prog"
  451.       break
  452.     fi
  453.   done
  454.   IFS="$ac_save_ifs"
  455. fi
  456. fi
  457. AWK="$ac_cv_prog_AWK"
  458. if test -n "$AWK"; then
  459.   echo "$ac_t""$AWK" 1>&4
  460. else
  461.   echo "$ac_t""no" 1>&4
  462. fi
  463.  
  464. test -n "$AWK" && break
  465. done
  466.  
  467. # Extract the first word of "gcc", so it can be a program name with args.
  468. set dummy gcc; ac_word=$2
  469. echo $ac_n "checking for $ac_word""... $ac_c" 1>&4
  470. if eval "test \"`echo '${'ac_cv_prog_CC'+set}'`\" = set"; then
  471.   echo $ac_n "(cached) $ac_c" 1>&4
  472. else
  473.   if test -n "$CC"; then
  474.   ac_cv_prog_CC="$CC" # Let the user override the test.
  475. else
  476.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  477.   for ac_dir in $PATH; do
  478.     test -z "$ac_dir" && ac_dir=.
  479.     if test -f $ac_dir/$ac_word; then
  480.       ac_cv_prog_CC="gcc"
  481.       break
  482.     fi
  483.   done
  484.   IFS="$ac_save_ifs"
  485.   test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc"
  486. fi
  487. fi
  488. CC="$ac_cv_prog_CC"
  489. if test -n "$CC"; then
  490.   echo "$ac_t""$CC" 1>&4
  491. else
  492.   echo "$ac_t""no" 1>&4
  493. fi
  494.  
  495.  
  496. echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&4
  497. if eval "test \"`echo '${'ac_cv_prog_gcc'+set}'`\" = set"; then
  498.   echo $ac_n "(cached) $ac_c" 1>&4
  499. else
  500.   cat > conftest.c <<EOF
  501. #ifdef __GNUC__
  502.   yes;
  503. #endif
  504. EOF
  505. if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then
  506.   ac_cv_prog_gcc=yes
  507. else
  508.   ac_cv_prog_gcc=no
  509. fi
  510. fi
  511. echo "$ac_t""$ac_cv_prog_gcc" 1>&4
  512. if test $ac_cv_prog_gcc = yes; then
  513.   GCC=yes
  514.   if test "${CFLAGS+set}" != set; then
  515.     echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&4
  516. if eval "test \"`echo '${'ac_cv_prog_gcc_g'+set}'`\" = set"; then
  517.   echo $ac_n "(cached) $ac_c" 1>&4
  518. else
  519.   echo 'void f(){}' > conftest.c
  520. if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  521.   ac_cv_prog_gcc_g=yes
  522. else
  523.   ac_cv_prog_gcc_g=no
  524. fi
  525. rm -f conftest*
  526.  
  527. fi
  528.     echo "$ac_t""$ac_cv_prog_gcc_g" 1>&4
  529.     if test $ac_cv_prog_gcc_g = yes; then
  530.       CFLAGS="-g -O"
  531.     else
  532.       CFLAGS="-O"
  533.     fi
  534.   fi
  535. else
  536.   GCC=
  537.   test "${CFLAGS+set}" = set || CFLAGS="-g"
  538. fi
  539.  
  540. ac_aux_dir=
  541. for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
  542.   if 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.   elif test -f $ac_dir/install.sh; then
  547.     ac_aux_dir=$ac_dir
  548.     ac_install_sh="$ac_aux_dir/install.sh -c"
  549.     break
  550.   fi
  551. done
  552. if test -z "$ac_aux_dir"; then
  553.   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
  554. fi
  555. ac_config_guess=$ac_aux_dir/config.guess
  556. ac_config_sub=$ac_aux_dir/config.sub
  557. ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
  558.  
  559. # Find a good install program.  We prefer a C program (faster),
  560. # so one script is as good as another.  But avoid the broken or
  561. # incompatible versions:
  562. # SysV /etc/install, /usr/sbin/install
  563. # SunOS /usr/etc/install
  564. # IRIX /sbin/install
  565. # AIX /bin/install
  566. # AFS /usr/afsws/bin/install, which mishandles nonexistent args
  567. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  568. # ./install, which can be erroneously created by make from ./install.sh.
  569. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&4
  570. if test -z "$INSTALL"; then
  571. if eval "test \"`echo '${'ac_cv_path_install'+set}'`\" = set"; then
  572.   echo $ac_n "(cached) $ac_c" 1>&4
  573. else
  574.     IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  575.   for ac_dir in $PATH; do
  576.     case "$ac_dir" in
  577.     ''|.|/etc|/usr/sbin|/usr/etc|/sbin|/usr/afsws/bin|/usr/ucb) ;;
  578.     *)
  579.       # OSF1 and SCO ODT 3.0 have their own names for install.
  580.       for ac_prog in ginstall installbsd scoinst install; do
  581.         if test -f $ac_dir/$ac_prog; then
  582.       if test $ac_prog = install &&
  583.             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
  584.         # AIX install.  It has an incompatible calling convention.
  585.         # OSF/1 installbsd also uses dspmsg, but is usable.
  586.         :
  587.       else
  588.         ac_cv_path_install="$ac_dir/$ac_prog -c"
  589.         break 2
  590.       fi
  591.     fi
  592.       done
  593.       ;;
  594.     esac
  595.   done
  596.   IFS="$ac_save_ifs"
  597.   # As a last resort, use the slow shell script.
  598.   test -z "$ac_cv_path_install" && ac_cv_path_install="$ac_install_sh"
  599. fi
  600.   INSTALL="$ac_cv_path_install"
  601. fi
  602. echo "$ac_t""$INSTALL" 1>&4
  603.  
  604. # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
  605. # It thinks the first close brace ends the variable substitution.
  606. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  607.  
  608. test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  609.  
  610. # Extract the first word of "ranlib", so it can be a program name with args.
  611. set dummy ranlib; ac_word=$2
  612. echo $ac_n "checking for $ac_word""... $ac_c" 1>&4
  613. if eval "test \"`echo '${'ac_cv_prog_RANLIB'+set}'`\" = set"; then
  614.   echo $ac_n "(cached) $ac_c" 1>&4
  615. else
  616.   if test -n "$RANLIB"; then
  617.   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
  618. else
  619.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  620.   for ac_dir in $PATH; do
  621.     test -z "$ac_dir" && ac_dir=.
  622.     if test -f $ac_dir/$ac_word; then
  623.       ac_cv_prog_RANLIB="ranlib"
  624.       break
  625.     fi
  626.   done
  627.   IFS="$ac_save_ifs"
  628.   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
  629. fi
  630. fi
  631. RANLIB="$ac_cv_prog_RANLIB"
  632. if test -n "$RANLIB"; then
  633.   echo "$ac_t""$RANLIB" 1>&4
  634. else
  635.   echo "$ac_t""no" 1>&4
  636. fi
  637.  
  638.  
  639. echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&4
  640. # On Suns, sometimes $CPP names a directory.
  641. if test -n "$CPP" && test -d "$CPP"; then
  642.   CPP=
  643. fi
  644. if test -z "$CPP"; then
  645. if eval "test \"`echo '${'ac_cv_prog_CPP'+set}'`\" = set"; then
  646.   echo $ac_n "(cached) $ac_c" 1>&4
  647. else
  648.     # This must be in double quotes, not single quotes, because CPP may get
  649.   # substituted into the Makefile and "${CC-cc}" will confuse make.
  650.   CPP="${CC-cc} -E"
  651.   # On the NeXT, cc -E runs the code through the compiler's parser,
  652.   # not just through cpp.
  653.   cat > conftest.$ac_ext <<EOF
  654. #line 655 "configure"
  655. #include "confdefs.h"
  656. #include <assert.h>
  657. Syntax Error
  658. EOF
  659. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  660. ac_err=`grep -v '^ *+' conftest.out`
  661. if test -z "$ac_err"; then
  662.   :
  663. else
  664.   echo "$ac_err" >&5
  665.   rm -rf conftest*
  666.   CPP="${CC-cc} -E -traditional-cpp"
  667.   cat > conftest.$ac_ext <<EOF
  668. #line 669 "configure"
  669. #include "confdefs.h"
  670. #include <assert.h>
  671. Syntax Error
  672. EOF
  673. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  674. ac_err=`grep -v '^ *+' conftest.out`
  675. if test -z "$ac_err"; then
  676.   :
  677. else
  678.   echo "$ac_err" >&5
  679.   rm -rf conftest*
  680.   CPP=/lib/cpp
  681. fi
  682. rm -f conftest*
  683. fi
  684. rm -f conftest*
  685.   ac_cv_prog_CPP="$CPP"
  686. fi
  687. fi
  688. CPP="$ac_cv_prog_CPP"
  689. echo "$ac_t""$CPP" 1>&4
  690.  
  691. echo $ac_n "checking for AIX""... $ac_c" 1>&4
  692. cat > conftest.$ac_ext <<EOF
  693. #line 694 "configure"
  694. #include "confdefs.h"
  695. #ifdef _AIX
  696.   yes
  697. #endif
  698.  
  699. EOF
  700. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  701.   egrep "yes" >/dev/null 2>&1; then
  702.   rm -rf conftest*
  703.   echo "$ac_t""yes" 1>&4; cat >> confdefs.h <<\EOF
  704. #define _ALL_SOURCE 1
  705. EOF
  706.  
  707. else
  708.   rm -rf conftest*
  709.   echo "$ac_t""no" 1>&4
  710. fi
  711. rm -f conftest*
  712.  
  713.  
  714. echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&4
  715. if test -d /etc/conf/kconfig.d &&
  716.   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
  717. then
  718.   echo "$ac_t""yes" 1>&4
  719.   ISC=yes # If later tests want to check for ISC.
  720.   cat >> confdefs.h <<\EOF
  721. #define _POSIX_SOURCE 1
  722. EOF
  723.  
  724.   if test "$GCC" = yes; then
  725.     CC="$CC -posix"
  726.   else
  727.     CC="$CC -Xp"
  728.   fi
  729. else
  730.   echo "$ac_t""no" 1>&4
  731.   ISC=
  732. fi
  733.  
  734. ac_safe=`echo "minix/config.h" | tr './\055' '___'`
  735. echo $ac_n "checking for minix/config.h""... $ac_c" 1>&4
  736. if eval "test \"`echo '${'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  737.   echo $ac_n "(cached) $ac_c" 1>&4
  738. else
  739.   cat > conftest.$ac_ext <<EOF
  740. #line 741 "configure"
  741. #include "confdefs.h"
  742. #include <minix/config.h>
  743. EOF
  744. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  745. ac_err=`grep -v '^ *+' conftest.out`
  746. if test -z "$ac_err"; then
  747.   rm -rf conftest*
  748.   eval "ac_cv_header_$ac_safe=yes"
  749. else
  750.   echo "$ac_err" >&5
  751.   rm -rf conftest*
  752.   eval "ac_cv_header_$ac_safe=no"
  753. fi
  754. rm -f conftest*
  755. fi
  756. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  757.   echo "$ac_t""yes" 1>&4
  758.   MINIX=yes
  759. else
  760.   echo "$ac_t""no" 1>&4
  761. MINIX=
  762. fi
  763.  
  764. if test "$MINIX" = yes; then
  765.   cat >> confdefs.h <<\EOF
  766. #define _POSIX_SOURCE 1
  767. EOF
  768.  
  769.   cat >> confdefs.h <<\EOF
  770. #define _POSIX_1_SOURCE 2
  771. EOF
  772.  
  773.   cat >> confdefs.h <<\EOF
  774. #define _MINIX 1
  775. EOF
  776.  
  777. fi
  778.  
  779. echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&4
  780. if eval "test \"`echo '${'ac_cv_prog_cc_stdc'+set}'`\" = set"; then
  781.   echo $ac_n "(cached) $ac_c" 1>&4
  782. else
  783.   ac_cv_prog_cc_stdc=no
  784. ac_save_CFLAGS="$CFLAGS"
  785. # Don't try gcc -ansi; that turns off useful extensions and
  786. # breaks some systems' header files.
  787. # AIX            -qlanglvl=ansi
  788. # Ultrix and OSF/1    -std1
  789. # HP-UX            -Aa -D_HPUX_SOURCE
  790. # SVR4            -Xc
  791. for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" -Xc
  792. do
  793.   CFLAGS="$ac_save_CFLAGS $ac_arg"
  794.   cat > conftest.$ac_ext <<EOF
  795. #line 796 "configure"
  796. #include "confdefs.h"
  797. #if !defined(__STDC__) || __STDC__ != 1
  798. choke me
  799. #endif    
  800.  
  801. int main() { return 0; }
  802. int t() {
  803. int test (int i, double x);
  804. struct s1 {int (*f) (int a);};
  805. struct s2 {int (*f) (double a);};
  806. ; return 0; }
  807. EOF
  808. if eval $ac_compile; then
  809.   rm -rf conftest*
  810.   ac_cv_prog_cc_stdc="$ac_arg"; break
  811. fi
  812. rm -f conftest*
  813.  
  814. done
  815. CFLAGS="$ac_save_CFLAGS"
  816.  
  817. fi
  818.  
  819. echo "$ac_t""$ac_cv_prog_cc_stdc" 1>&4
  820. case "x$ac_cv_prog_cc_stdc" in
  821.   x|xno) ;;
  822.   *) CC="$CC $ac_cv_prog_cc_stdc" ;;
  823. esac
  824.  
  825.  
  826. echo $ac_n "checking for function prototypes""... $ac_c" 1>&4
  827. if test "$ac_cv_prog_cc_stdc" != no; then
  828.   echo "$ac_t""yes" 1>&4
  829.   cat >> confdefs.h <<\EOF
  830. #define PROTOTYPES 1
  831. EOF
  832.  
  833.   U= ANSI2KNR=
  834. else
  835.   echo "$ac_t""no" 1>&4
  836.   U=_ ANSI2KNR=ansi2knr
  837. fi
  838.  
  839. echo $ac_n "checking for working const""... $ac_c" 1>&4
  840. if eval "test \"`echo '${'ac_cv_c_const'+set}'`\" = set"; then
  841.   echo $ac_n "(cached) $ac_c" 1>&4
  842. else
  843.   cat > conftest.$ac_ext <<EOF
  844. #line 845 "configure"
  845. #include "confdefs.h"
  846.  
  847. int main() { return 0; }
  848. int t() {
  849.  
  850. /* Ultrix mips cc rejects this.  */
  851. typedef int charset[2]; const charset x;
  852. /* SunOS 4.1.1 cc rejects this.  */
  853. char const *const *ccp;
  854. char **p;
  855. /* NEC SVR4.0.2 mips cc rejects this.  */
  856. struct point {int x, y;};
  857. static struct point const zero;
  858. /* AIX XL C 1.02.0.0 rejects this.
  859.    It does not let you subtract one const X* pointer from another in an arm
  860.    of an if-expression whose if-part is not a constant expression */
  861. const char *g = "string";
  862. ccp = &g + (g ? g-g : 0);
  863. /* HPUX 7.0 cc rejects these. */
  864. ++ccp;
  865. p = (char**) ccp;
  866. ccp = (char const *const *) p;
  867. { /* SCO 3.2v4 cc rejects this.  */
  868.   char *t;
  869.   char const *s = 0 ? (char *) 0 : (char const *) 0;
  870.  
  871.   *t++ = 0;
  872. }
  873. { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
  874.   int x[] = {25, 17};
  875.   const int *foo = &x[0];
  876.   ++foo;
  877. }
  878. { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
  879.   typedef const int *iptr;
  880.   iptr p = 0;
  881.   ++p;
  882. }
  883. { /* AIX XL C 1.02.0.0 rejects this saying
  884.      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
  885.   struct s { int j; const int *ap[3]; };
  886.   struct s *b; b->j = 5;
  887. }
  888. { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
  889.   const int foo = 10;
  890. }
  891.  
  892. ; return 0; }
  893. EOF
  894. if eval $ac_compile; then
  895.   rm -rf conftest*
  896.   ac_cv_c_const=yes
  897. else
  898.   rm -rf conftest*
  899.   ac_cv_c_const=no
  900. fi
  901. rm -f conftest*
  902.  
  903. fi
  904. echo "$ac_t""$ac_cv_c_const" 1>&4
  905. if test $ac_cv_c_const = no; then
  906.   cat >> confdefs.h <<\EOF
  907. #define const 
  908. EOF
  909.  
  910. fi
  911.  
  912.  
  913. # Extract the first word of "flex", so it can be a program name with args.
  914. set dummy flex; ac_word=$2
  915. echo $ac_n "checking for $ac_word""... $ac_c" 1>&4
  916. if eval "test \"`echo '${'ac_cv_prog_LEX'+set}'`\" = set"; then
  917.   echo $ac_n "(cached) $ac_c" 1>&4
  918. else
  919.   if test -n "$LEX"; then
  920.   ac_cv_prog_LEX="$LEX" # Let the user override the test.
  921. else
  922.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  923.   for ac_dir in $PATH; do
  924.     test -z "$ac_dir" && ac_dir=.
  925.     if test -f $ac_dir/$ac_word; then
  926.       ac_cv_prog_LEX="flex"
  927.       break
  928.     fi
  929.   done
  930.   IFS="$ac_save_ifs"
  931.   test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
  932. fi
  933. fi
  934. LEX="$ac_cv_prog_LEX"
  935. if test -n "$LEX"; then
  936.   echo "$ac_t""$LEX" 1>&4
  937. else
  938.   echo "$ac_t""no" 1>&4
  939. fi
  940.  
  941. if test -z "$LEXLIB"
  942. then
  943.   case "$LEX" in
  944.   flex*) ac_lib=fl ;;
  945.   *) ac_lib=l ;;
  946.   esac
  947.   echo $ac_n "checking for -l$ac_lib""... $ac_c" 1>&4
  948. if eval "test \"`echo '${'ac_cv_lib_$ac_lib'+set}'`\" = set"; then
  949.   echo $ac_n "(cached) $ac_c" 1>&4
  950. else
  951.   ac_save_LIBS="$LIBS"
  952. LIBS="$LIBS -l$ac_lib "
  953. cat > conftest.$ac_ext <<EOF
  954. #line 955 "configure"
  955. #include "confdefs.h"
  956.  
  957. int main() { return 0; }
  958. int t() {
  959. main()
  960. ; return 0; }
  961. EOF
  962. if eval $ac_link; then
  963.   rm -rf conftest*
  964.   eval "ac_cv_lib_$ac_lib=yes"
  965. else
  966.   rm -rf conftest*
  967.   eval "ac_cv_lib_$ac_lib=no"
  968. fi
  969. rm -f conftest*
  970. LIBS="$ac_save_LIBS"
  971.  
  972. fi
  973. if eval "test \"`echo '$ac_cv_lib_'$ac_lib`\" = yes"; then
  974.   echo "$ac_t""yes" 1>&4
  975.   LEXLIB="-l$ac_lib"
  976. else
  977.   echo "$ac_t""no" 1>&4
  978. fi
  979.  
  980. fi
  981.  
  982. test "$LEX" = flex || echo "configure: warning: flex not found" 1>&2
  983.  
  984. # If we cannot run a trivial program, we must be cross compiling.
  985. echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&4
  986. if eval "test \"`echo '${'ac_cv_c_cross'+set}'`\" = set"; then
  987.   echo $ac_n "(cached) $ac_c" 1>&4
  988. else
  989.   if test "$cross_compiling" = yes; then
  990.   ac_cv_cross=yes
  991. else
  992. cat > conftest.$ac_ext <<EOF
  993. #line 994 "configure"
  994. #include "confdefs.h"
  995. main(){return(0);}
  996. EOF
  997. eval $ac_link
  998. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  999.   ac_cv_c_cross=no
  1000. else
  1001.   ac_cv_c_cross=yes
  1002. fi
  1003. fi
  1004. rm -fr conftest*
  1005. fi
  1006. cross_compiling=$ac_cv_c_cross
  1007. echo "$ac_t""$ac_cv_c_cross" 1>&4
  1008.  
  1009. echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&4
  1010. if eval "test \"`echo '${'ac_cv_header_stdc'+set}'`\" = set"; then
  1011.   echo $ac_n "(cached) $ac_c" 1>&4
  1012. else
  1013.   cat > conftest.$ac_ext <<EOF
  1014. #line 1015 "configure"
  1015. #include "confdefs.h"
  1016. #include <stdlib.h>
  1017. #include <stdarg.h>
  1018. #include <string.h>
  1019. #include <float.h>
  1020. EOF
  1021. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1022. ac_err=`grep -v '^ *+' conftest.out`
  1023. if test -z "$ac_err"; then
  1024.   rm -rf conftest*
  1025.   ac_cv_header_stdc=yes
  1026. else
  1027.   echo "$ac_err" >&5
  1028.   rm -rf conftest*
  1029.   ac_cv_header_stdc=no
  1030. fi
  1031. rm -f conftest*
  1032.  
  1033. if test $ac_cv_header_stdc = yes; then
  1034.   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  1035. cat > conftest.$ac_ext <<EOF
  1036. #line 1037 "configure"
  1037. #include "confdefs.h"
  1038. #include <string.h>
  1039. EOF
  1040. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1041.   egrep "memchr" >/dev/null 2>&1; then
  1042.   :
  1043. else
  1044.   rm -rf conftest*
  1045.   ac_cv_header_stdc=no
  1046. fi
  1047. rm -f conftest*
  1048.  
  1049. fi
  1050.  
  1051. if test $ac_cv_header_stdc = yes; then
  1052.   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  1053. cat > conftest.$ac_ext <<EOF
  1054. #line 1055 "configure"
  1055. #include "confdefs.h"
  1056. #include <stdlib.h>
  1057. EOF
  1058. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1059.   egrep "free" >/dev/null 2>&1; then
  1060.   :
  1061. else
  1062.   rm -rf conftest*
  1063.   ac_cv_header_stdc=no
  1064. fi
  1065. rm -f conftest*
  1066.  
  1067. fi
  1068.  
  1069. if test $ac_cv_header_stdc = yes; then
  1070.   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  1071. if test "$cross_compiling" = yes; then
  1072.   ac_cv_header_stdc=no
  1073. else
  1074. cat > conftest.$ac_ext <<EOF
  1075. #line 1076 "configure"
  1076. #include "confdefs.h"
  1077. #include <ctype.h>
  1078. #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  1079. #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  1080. #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
  1081. int main () { int i; for (i = 0; i < 256; i++)
  1082. if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  1083. exit (0); }
  1084.  
  1085. EOF
  1086. eval $ac_link
  1087. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1088.   :
  1089. else
  1090.   ac_cv_header_stdc=no
  1091. fi
  1092. fi
  1093. rm -fr conftest*
  1094. fi
  1095. fi
  1096. echo "$ac_t""$ac_cv_header_stdc" 1>&4
  1097. if test $ac_cv_header_stdc = yes; then
  1098.   cat >> confdefs.h <<\EOF
  1099. #define STDC_HEADERS 1
  1100. EOF
  1101.  
  1102. fi
  1103.  
  1104. for ac_hdr in limits.h string.h
  1105. do
  1106. ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
  1107. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&4
  1108. if eval "test \"`echo '${'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1109.   echo $ac_n "(cached) $ac_c" 1>&4
  1110. else
  1111.   cat > conftest.$ac_ext <<EOF
  1112. #line 1113 "configure"
  1113. #include "confdefs.h"
  1114. #include <$ac_hdr>
  1115. EOF
  1116. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1117. ac_err=`grep -v '^ *+' conftest.out`
  1118. if test -z "$ac_err"; then
  1119.   rm -rf conftest*
  1120.   eval "ac_cv_header_$ac_safe=yes"
  1121. else
  1122.   echo "$ac_err" >&5
  1123.   rm -rf conftest*
  1124.   eval "ac_cv_header_$ac_safe=no"
  1125. fi
  1126. rm -f conftest*
  1127. fi
  1128. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1129.   echo "$ac_t""yes" 1>&4
  1130.     ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'`
  1131.   cat >> confdefs.h <<EOF
  1132. #define $ac_tr_hdr 1
  1133. EOF
  1134.  
  1135. else
  1136.   echo "$ac_t""no" 1>&4
  1137. fi
  1138. done
  1139.  
  1140. echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&4
  1141. if eval "test \"`echo '${'ac_cv_type_signal'+set}'`\" = set"; then
  1142.   echo $ac_n "(cached) $ac_c" 1>&4
  1143. else
  1144.   cat > conftest.$ac_ext <<EOF
  1145. #line 1146 "configure"
  1146. #include "confdefs.h"
  1147. #include <sys/types.h>
  1148. #include <signal.h>
  1149. #ifdef signal
  1150. #undef signal
  1151. #endif
  1152. extern void (*signal ()) ();
  1153. int main() { return 0; }
  1154. int t() {
  1155. int i;
  1156. ; return 0; }
  1157. EOF
  1158. if eval $ac_compile; then
  1159.   rm -rf conftest*
  1160.   ac_cv_type_signal=void
  1161. else
  1162.   rm -rf conftest*
  1163.   ac_cv_type_signal=int
  1164. fi
  1165. rm -f conftest*
  1166.  
  1167. fi
  1168. echo "$ac_t""$ac_cv_type_signal" 1>&4
  1169. cat >> confdefs.h <<EOF
  1170. #define RETSIGTYPE $ac_cv_type_signal
  1171. EOF
  1172.  
  1173.  
  1174.  
  1175. for ac_func in dup2 pipe popen rename strerror
  1176. do
  1177. echo $ac_n "checking for $ac_func""... $ac_c" 1>&4
  1178. if eval "test \"`echo '${'ac_cv_func_$ac_func'+set}'`\" = set"; then
  1179.   echo $ac_n "(cached) $ac_c" 1>&4
  1180. else
  1181.   cat > conftest.$ac_ext <<EOF
  1182. #line 1183 "configure"
  1183. #include "confdefs.h"
  1184. #include <ctype.h> /* Arbitrary system header to define __stub macros. */
  1185. /* Override any gcc2 internal prototype to avoid an error.  */
  1186. char $ac_func(); 
  1187.  
  1188. int main() { return 0; }
  1189. int t() {
  1190.  
  1191. /* The GNU C library defines this for functions which it implements
  1192.     to always fail with ENOSYS.  Some functions are actually named
  1193.     something starting with __ and the normal name is an alias.  */
  1194. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  1195. choke me
  1196. #else
  1197. $ac_func();
  1198. #endif
  1199.  
  1200. ; return 0; }
  1201. EOF
  1202. if eval $ac_link; then
  1203.   rm -rf conftest*
  1204.   eval "ac_cv_func_$ac_func=yes"
  1205. else
  1206.   rm -rf conftest*
  1207.   eval "ac_cv_func_$ac_func=no"
  1208. fi
  1209. rm -f conftest*
  1210.  
  1211. fi
  1212. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  1213.   echo "$ac_t""yes" 1>&4
  1214.     ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
  1215.   cat >> confdefs.h <<EOF
  1216. #define $ac_tr_func 1
  1217. EOF
  1218.  
  1219. else
  1220.   echo "$ac_t""no" 1>&4
  1221. fi
  1222. done
  1223.  
  1224. echo $ac_n "checking for vprintf""... $ac_c" 1>&4
  1225. if eval "test \"`echo '${'ac_cv_func_vprintf'+set}'`\" = set"; then
  1226.   echo $ac_n "(cached) $ac_c" 1>&4
  1227. else
  1228.   cat > conftest.$ac_ext <<EOF
  1229. #line 1230 "configure"
  1230. #include "confdefs.h"
  1231. #include <ctype.h> /* Arbitrary system header to define __stub macros. */
  1232. /* Override any gcc2 internal prototype to avoid an error.  */
  1233. char vprintf(); 
  1234.  
  1235. int main() { return 0; }
  1236. int t() {
  1237.  
  1238. /* The GNU C library defines this for functions which it implements
  1239.     to always fail with ENOSYS.  Some functions are actually named
  1240.     something starting with __ and the normal name is an alias.  */
  1241. #if defined (__stub_vprintf) || defined (__stub___vprintf)
  1242. choke me
  1243. #else
  1244. vprintf();
  1245. #endif
  1246.  
  1247. ; return 0; }
  1248. EOF
  1249. if eval $ac_link; then
  1250.   rm -rf conftest*
  1251.   eval "ac_cv_func_vprintf=yes"
  1252. else
  1253.   rm -rf conftest*
  1254.   eval "ac_cv_func_vprintf=no"
  1255. fi
  1256. rm -f conftest*
  1257.  
  1258. fi
  1259. if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
  1260.   echo "$ac_t""yes" 1>&4
  1261.   cat >> confdefs.h <<\EOF
  1262. #define HAVE_VPRINTF 1
  1263. EOF
  1264.  
  1265. else
  1266.   echo "$ac_t""no" 1>&4
  1267. fi
  1268.  
  1269. if test "$ac_cv_func_vprintf" != yes; then
  1270. echo $ac_n "checking for _doprnt""... $ac_c" 1>&4
  1271. if eval "test \"`echo '${'ac_cv_func__doprnt'+set}'`\" = set"; then
  1272.   echo $ac_n "(cached) $ac_c" 1>&4
  1273. else
  1274.   cat > conftest.$ac_ext <<EOF
  1275. #line 1276 "configure"
  1276. #include "confdefs.h"
  1277. #include <ctype.h> /* Arbitrary system header to define __stub macros. */
  1278. /* Override any gcc2 internal prototype to avoid an error.  */
  1279. char _doprnt(); 
  1280.  
  1281. int main() { return 0; }
  1282. int t() {
  1283.  
  1284. /* The GNU C library defines this for functions which it implements
  1285.     to always fail with ENOSYS.  Some functions are actually named
  1286.     something starting with __ and the normal name is an alias.  */
  1287. #if defined (__stub__doprnt) || defined (__stub____doprnt)
  1288. choke me
  1289. #else
  1290. _doprnt();
  1291. #endif
  1292.  
  1293. ; return 0; }
  1294. EOF
  1295. if eval $ac_link; then
  1296.   rm -rf conftest*
  1297.   eval "ac_cv_func__doprnt=yes"
  1298. else
  1299.   rm -rf conftest*
  1300.   eval "ac_cv_func__doprnt=no"
  1301. fi
  1302. rm -f conftest*
  1303.  
  1304. fi
  1305. if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
  1306.   echo "$ac_t""yes" 1>&4
  1307.   cat >> confdefs.h <<\EOF
  1308. #define HAVE_DOPRNT 1
  1309. EOF
  1310.  
  1311. else
  1312.   echo "$ac_t""no" 1>&4
  1313. fi
  1314.  
  1315. fi
  1316.  
  1317.  
  1318. echo $ac_n "checking the default charset""... $ac_c" 1>&4
  1319. if test -n "$DEFAULT_CHARSET"; then
  1320.   echo "$ac_t""$DEFAULT_CHARSET" 1>&4
  1321.   cat >> confdefs.h <<EOF
  1322. #define DEFAULT_CHARSET "$DEFAULT_CHARSET"
  1323. EOF
  1324.  
  1325. else
  1326.   echo "$ac_t""Latin-1" 1>&4
  1327.   cat >> confdefs.h <<\EOF
  1328. #define DEFAULT_CHARSET "Latin-1"
  1329. EOF
  1330.  
  1331. fi
  1332.  
  1333. echo $ac_n "checking if malloc debugging is wanted""... $ac_c" 1>&4
  1334. # Check whether --with-dmalloc or --without-dmalloc was given.
  1335. withval="$with_dmalloc"
  1336. if test -n "$withval"; then
  1337.   if test "$withval" = yes; then
  1338.   echo "$ac_t""yes" 1>&4
  1339.   cat >> confdefs.h <<\EOF
  1340. #define WITH_DMALLOC 1
  1341. EOF
  1342.  
  1343.   LIBS="$LIBS -ldmalloc"
  1344.   LDFLAGS="$LDFLAGS -g"
  1345. else
  1346.   echo "$ac_t""no" 1>&4
  1347. fi
  1348. else
  1349.   echo "$ac_t""no" 1>&4
  1350. fi
  1351.  
  1352.  
  1353. trap '' 1 2 15
  1354. if test -w $cache_file; then
  1355. echo "updating cache $cache_file"
  1356. cat > $cache_file <<\EOF
  1357. # This file is a shell script that caches the results of configure
  1358. # tests run on this system so they can be shared between configure
  1359. # scripts and configure runs.  It is not useful on other systems.
  1360. # If it contains results you don't want to keep, you may remove or edit it.
  1361. #
  1362. # By default, configure uses ./config.cache as the cache file,
  1363. # creating it if it does not exist already.  You can give configure
  1364. # the --cache-file=FILE option to use a different cache file; that is
  1365. # what configure does when it calls configure scripts in
  1366. # subdirectories, so they share the cache.
  1367. # Giving --cache-file=/dev/null disables caching, for debugging configure.
  1368. # config.status only pays attention to the cache file if you give it the
  1369. # --recheck option to rerun configure.
  1370. #
  1371. EOF
  1372. # Ultrix sh set writes to stderr and can't be redirected directly.
  1373. (set) 2>&1 |
  1374.   sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/: \${\1='\2'}/p" \
  1375.   >> $cache_file
  1376. else
  1377. echo "not updating unwritable cache $cache_file"
  1378. fi
  1379.  
  1380. trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15
  1381.  
  1382. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  1383. # Let make expand exec_prefix.
  1384. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  1385.  
  1386. # Any assignment to VPATH causes Sun make to only execute
  1387. # the first set of double-colon rules, so remove it if not needed.
  1388. # If there is a colon in the path, we need to keep it.
  1389. if test "x$srcdir" = x.; then
  1390.   ac_vpsub='/^[     ]*VPATH[     ]*=[^:]*$/d'
  1391. fi
  1392.  
  1393. trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  1394.  
  1395. DEFS=-DHAVE_CONFIG_H
  1396.  
  1397. # Without the "./", some shells look in PATH for config.status.
  1398. : ${CONFIG_STATUS=./config.status}
  1399.  
  1400. echo creating $CONFIG_STATUS
  1401. rm -f $CONFIG_STATUS
  1402. cat > $CONFIG_STATUS <<EOF
  1403. #!/bin/sh
  1404. # Generated automatically by configure.
  1405. # Run this file to recreate the current configuration.
  1406. # This directory was configured as follows,
  1407. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  1408. #
  1409. # $0 $ac_configure_args
  1410. #
  1411. # Compiler output produced by configure, useful for debugging
  1412. # configure, is in ./config.log if it exists.
  1413.  
  1414. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  1415. for ac_option
  1416. do
  1417.   case "\$ac_option" in
  1418.   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  1419.     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  1420.     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  1421.   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  1422.     echo "$CONFIG_STATUS generated by autoconf version 2.1"
  1423.     exit 0 ;;
  1424.   -help | --help | --hel | --he | --h)
  1425.     echo "\$ac_cs_usage"; exit 0 ;;
  1426.   *) echo "\$ac_cs_usage"; exit 1 ;;
  1427.   esac
  1428. done
  1429.  
  1430. ac_given_srcdir=$srcdir
  1431. ac_given_INSTALL="$INSTALL"
  1432.  
  1433. trap 'rm -fr Makefile config.h conftest*; exit 1' 1 2 15
  1434.  
  1435. # Protect against being on the right side of a sed subst in config.status. 
  1436. sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g; 
  1437.  s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
  1438. $ac_vpsub
  1439. $extrasub
  1440. s%@CFLAGS@%$CFLAGS%g
  1441. s%@CPPFLAGS@%$CPPFLAGS%g
  1442. s%@CXXFLAGS@%$CXXFLAGS%g
  1443. s%@DEFS@%$DEFS%g
  1444. s%@LDFLAGS@%$LDFLAGS%g
  1445. s%@LIBS@%$LIBS%g
  1446. s%@exec_prefix@%$exec_prefix%g
  1447. s%@prefix@%$prefix%g
  1448. s%@program_transform_name@%$program_transform_name%g
  1449. s%@PRODUCT@%$PRODUCT%g
  1450. s%@VERSION@%$VERSION%g
  1451. s%@AWK@%$AWK%g
  1452. s%@CC@%$CC%g
  1453. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  1454. s%@INSTALL_DATA@%$INSTALL_DATA%g
  1455. s%@RANLIB@%$RANLIB%g
  1456. s%@CPP@%$CPP%g
  1457. s%@U@%$U%g
  1458. s%@ANSI2KNR@%$ANSI2KNR%g
  1459. s%@LEX@%$LEX%g
  1460. s%@LEXLIB@%$LEXLIB%g
  1461.  
  1462. CEOF
  1463. EOF
  1464. cat >> $CONFIG_STATUS <<EOF
  1465.  
  1466. CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
  1467. EOF
  1468. cat >> $CONFIG_STATUS <<\EOF
  1469. for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  1470.   # Support "outfile[:infile]", defaulting infile="outfile.in".
  1471.   case "$ac_file" in
  1472.   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
  1473.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  1474.   *) ac_file_in="${ac_file}.in" ;;
  1475.   esac
  1476.  
  1477.   # Adjust relative srcdir, etc. for subdirectories.
  1478.  
  1479.   # Remove last slash and all that follows it.  Not all systems have dirname.
  1480.   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  1481.   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  1482.     # The file is in a subdirectory.
  1483.     test ! -d "$ac_dir" && mkdir "$ac_dir"
  1484.     ac_dir_suffix="/$ac_dir"
  1485.     # A "../" for each directory in $ac_dir_suffix.
  1486.     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  1487.   else
  1488.     ac_dir_suffix= ac_dots=
  1489.   fi
  1490.  
  1491.   case "$ac_given_srcdir" in
  1492.   .)  srcdir=.
  1493.       if test -z "$ac_dots"; then top_srcdir=.
  1494.       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  1495.   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  1496.   *) # Relative path.
  1497.     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  1498.     top_srcdir="$ac_dots$ac_given_srcdir" ;;
  1499.   esac
  1500.  
  1501.   case "$ac_given_INSTALL" in
  1502.   [/$]*) INSTALL="$ac_given_INSTALL" ;;
  1503.   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  1504.   esac
  1505.   echo creating "$ac_file"
  1506.   rm -f "$ac_file"
  1507.   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  1508.   case "$ac_file" in
  1509.   *Makefile*) ac_comsub="1i\\
  1510. # $configure_input" ;;
  1511.   *) ac_comsub= ;;
  1512.   esac
  1513.   sed -e "$ac_comsub
  1514. s%@configure_input@%$configure_input%g
  1515. s%@srcdir@%$srcdir%g
  1516. s%@top_srcdir@%$top_srcdir%g
  1517. s%@INSTALL@%$INSTALL%g
  1518. " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
  1519. fi; done
  1520. rm -f conftest.subs
  1521.  
  1522. # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
  1523. # NAME is the cpp macro being defined and VALUE is the value it is being given.
  1524. #
  1525. # ac_d sets the value in "#define NAME VALUE" lines.
  1526. ac_dA='s%^\([     ]*\)#\([     ]*define[     ][     ]*\)'
  1527. ac_dB='\([     ][     ]*\)[^     ]*%\1#\2'
  1528. ac_dC='\3'
  1529. ac_dD='%g'
  1530. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  1531. ac_uA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  1532. ac_uB='\([     ]\)%\1#\2define\3'
  1533. ac_uC=' '
  1534. ac_uD='\4%g'
  1535. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  1536. ac_eA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  1537. ac_eB='$%\1#\2define\3'
  1538. ac_eC=' '
  1539. ac_eD='%g'
  1540.  
  1541. CONFIG_HEADERS=${CONFIG_HEADERS-"config.h"}
  1542. for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  1543.   # Support "outfile[:infile]", defaulting infile="outfile.in".
  1544.   case "$ac_file" in
  1545.   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
  1546.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  1547.   *) ac_file_in="${ac_file}.in" ;;
  1548.   esac
  1549.  
  1550.   echo creating $ac_file
  1551.  
  1552.   rm -f conftest.frag conftest.in conftest.out
  1553.   cp $ac_given_srcdir/$ac_file_in conftest.in
  1554.  
  1555. EOF
  1556.  
  1557. # Transform confdefs.h into a sed script conftest.vals that substitutes
  1558. # the proper values into config.h.in to produce config.h.  And first:
  1559. # Protect against being on the right side of a sed subst in config.status. 
  1560. # Protect against being in an unquoted here document in config.status.
  1561. rm -f conftest.vals
  1562. cat > conftest.hdr <<\EOF
  1563. s/[\\&%]/\\&/g
  1564. s%[\\$`]%\\&%g
  1565. s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
  1566. s%ac_d%ac_u%gp
  1567. s%ac_u%ac_e%gp
  1568. EOF
  1569. sed -n -f conftest.hdr confdefs.h > conftest.vals
  1570. rm -f conftest.hdr
  1571.  
  1572. # This sed command replaces #undef with comments.  This is necessary, for
  1573. # example, in the case of _POSIX_SOURCE, which is predefined and required
  1574. # on some systems where configure will not decide to define it.
  1575. cat >> conftest.vals <<\EOF
  1576. s%^[     ]*#[     ]*undef[     ][     ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
  1577. EOF
  1578.  
  1579. # Break up conftest.vals because some shells have a limit on
  1580. # the size of here documents, and old seds have small limits too.
  1581. # Maximum number of lines to put in a single here document.
  1582. ac_max_here_lines=12
  1583.  
  1584. rm -f conftest.tail
  1585. while :
  1586. do
  1587.   ac_lines=`grep -c . conftest.vals`
  1588.   # grep -c gives empty output for an empty file on some AIX systems.
  1589.   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  1590.   # Write a limited-size here document to conftest.frag.
  1591.   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
  1592.   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
  1593.   echo 'CEOF
  1594.   sed -f conftest.frag conftest.in > conftest.out
  1595.   rm -f conftest.in
  1596.   mv conftest.out conftest.in
  1597. ' >> $CONFIG_STATUS
  1598.   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
  1599.   rm -f conftest.vals
  1600.   mv conftest.tail conftest.vals
  1601. done
  1602. rm -f conftest.vals
  1603.  
  1604. cat >> $CONFIG_STATUS <<\EOF
  1605.   rm -f conftest.frag conftest.h
  1606.   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  1607.   cat conftest.in >> conftest.h
  1608.   rm -f conftest.in
  1609.   if cmp -s $ac_file conftest.h 2>/dev/null; then
  1610.     echo "$ac_file is unchanged"
  1611.     rm -f conftest.h
  1612.   else
  1613.     rm -f $ac_file
  1614.     mv conftest.h $ac_file
  1615.   fi
  1616. fi; done
  1617.  
  1618.  
  1619. test -z "$CONFIG_HEADERS" || date > stamp-h
  1620. exit 0
  1621. EOF
  1622. chmod +x $CONFIG_STATUS
  1623. rm -fr confdefs* $ac_clean_files
  1624. test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS
  1625.  
  1626.