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