home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / octave-1.1.1p1-base.tgz / octave-1.1.1p1-base.tar / fsf / octave / configure < prev    next >
Text File  |  1995-02-22  |  104KB  |  4,061 lines

  1. #!/bin/sh
  2.  
  3. # From configure.in Revision: 1.92 
  4.  
  5. # Guess values for system-dependent variables and create Makefiles.
  6. # Generated automatically using autoconf version 2.1 
  7. # Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
  8. #
  9. # This configure script is free software; the Free Software Foundation
  10. # gives unlimited permission to copy, distribute and modify it.
  11.  
  12. # Defaults:
  13. ac_help=
  14. ac_default_prefix=/usr/local
  15. # Any additions from configure.in:
  16. ac_help="$ac_help
  17.   --with-f2c              use f2c even if Fortran compiler is available"
  18. ac_help="$ac_help
  19.   --enable-dld            use DLD for dynamic linking (not all systems)"
  20. ac_help="$ac_help
  21.   --enable-lite-kernel    compile smaller kernel (requires DLD)"
  22. ac_default_prefix=/usr/local
  23.  
  24. # Initialize some variables set by options.
  25. # The variables have the same names as the options, with
  26. # dashes changed to underlines.
  27. build=NONE
  28. cache_file=./config.cache
  29. exec_prefix=NONE
  30. host=NONE
  31. no_create=
  32. nonopt=NONE
  33. no_recursion=
  34. prefix=NONE
  35. program_prefix=NONE
  36. program_suffix=NONE
  37. program_transform_name=s,x,x,
  38. silent=
  39. site=
  40. srcdir=
  41. target=NONE
  42. verbose=
  43. x_includes=NONE
  44. x_libraries=NONE
  45.  
  46. # Initialize some other variables.
  47. subdirs=
  48.  
  49. ac_prev=
  50. for ac_option
  51. do
  52.  
  53.   # If the previous option needs an argument, assign it.
  54.   if test -n "$ac_prev"; then
  55.     eval "$ac_prev=\$ac_option"
  56.     ac_prev=
  57.     continue
  58.   fi
  59.  
  60.   case "$ac_option" in
  61.   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  62.   *) ac_optarg= ;;
  63.   esac
  64.  
  65.   # Accept the important Cygnus configure options, so we can diagnose typos.
  66.  
  67.   case "$ac_option" in
  68.  
  69.   -build | --build | --buil | --bui | --bu | --b)
  70.     ac_prev=build ;;
  71.   -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
  72.     build="$ac_optarg" ;;
  73.  
  74.   -cache-file | --cache-file | --cache-fil | --cache-fi \
  75.   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  76.     ac_prev=cache_file ;;
  77.   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  78.   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  79.     cache_file="$ac_optarg" ;;
  80.  
  81.   -disable-* | --disable-*)
  82.     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
  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.     eval "enable_${ac_feature}=no" ;;
  89.  
  90.   -enable-* | --enable-*)
  91.     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  92.     # Reject names that are not valid shell variable names.
  93.     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  94.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  95.     fi
  96.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  97.     case "$ac_option" in
  98.       *=*) ;;
  99.       *) ac_optarg=yes ;;
  100.     esac
  101.     eval "enable_${ac_feature}='$ac_optarg'" ;;
  102.  
  103.   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  104.   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  105.   | --exec | --exe | --ex)
  106.     ac_prev=exec_prefix ;;
  107.   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  108.   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  109.   | --exec=* | --exe=* | --ex=*)
  110.     exec_prefix="$ac_optarg" ;;
  111.  
  112.   -gas | --gas | --ga | --g)
  113.     # Obsolete; use --with-gas.
  114.     with_gas=yes ;;
  115.  
  116.   -help | --help | --hel | --he)
  117.     # Omit some internal or obsolete options to make the list less imposing.
  118.     # This message is too long to be a string in the A/UX 3.1 sh.
  119.     cat << EOF
  120. Usage: configure [options] [host]
  121. Options: [defaults in brackets after descriptions]
  122. Configuration:
  123.   --cache-file=FILE       cache test results in FILE
  124.   --help                  print this message
  125.   --no-create             do not create output files
  126.   --quiet, --silent       do not print \`checking...' messages
  127.   --version               print the version of autoconf that created configure
  128. Directory and file names:
  129.   --prefix=PREFIX         install architecture-independent files in PREFIX
  130.                           [$ac_default_prefix]
  131.   --exec-prefix=PREFIX    install architecture-dependent files in PREFIX
  132.                           [same as prefix]
  133.   --srcdir=DIR            find the sources in DIR [configure dir or ..]
  134.   --program-prefix=PREFIX prepend PREFIX to installed program names
  135.   --program-suffix=SUFFIX append SUFFIX to installed program names
  136.   --program-transform-name=PROGRAM run sed PROGRAM on installed program names
  137. Host type:
  138.   --build=BUILD           configure for building on BUILD [BUILD=HOST]
  139.   --host=HOST             configure for HOST [guessed]
  140.   --target=TARGET         configure for TARGET [TARGET=HOST]
  141. Features and packages:
  142.   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  143.   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  144.   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  145.   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  146.   --x-includes=DIR        X include files are in DIR
  147.   --x-libraries=DIR       X library files are in DIR
  148. --enable and --with options recognized:$ac_help
  149. EOF
  150.     exit 0 ;;
  151.  
  152.   -host | --host | --hos | --ho)
  153.     ac_prev=host ;;
  154.   -host=* | --host=* | --hos=* | --ho=*)
  155.     host="$ac_optarg" ;;
  156.  
  157.   -nfp | --nfp | --nf)
  158.     # Obsolete; use --without-fp.
  159.     with_fp=no ;;
  160.  
  161.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  162.   | --no-cr | --no-c)
  163.     no_create=yes ;;
  164.  
  165.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  166.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
  167.     no_recursion=yes ;;
  168.  
  169.   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  170.     ac_prev=prefix ;;
  171.   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  172.     prefix="$ac_optarg" ;;
  173.  
  174.   -program-prefix | --program-prefix | --program-prefi | --program-pref \
  175.   | --program-pre | --program-pr | --program-p)
  176.     ac_prev=program_prefix ;;
  177.   -program-prefix=* | --program-prefix=* | --program-prefi=* \
  178.   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  179.     program_prefix="$ac_optarg" ;;
  180.  
  181.   -program-suffix | --program-suffix | --program-suffi | --program-suff \
  182.   | --program-suf | --program-su | --program-s)
  183.     ac_prev=program_suffix ;;
  184.   -program-suffix=* | --program-suffix=* | --program-suffi=* \
  185.   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  186.     program_suffix="$ac_optarg" ;;
  187.  
  188.   -program-transform-name | --program-transform-name \
  189.   | --program-transform-nam | --program-transform-na \
  190.   | --program-transform-n | --program-transform- \
  191.   | --program-transform | --program-transfor \
  192.   | --program-transfo | --program-transf \
  193.   | --program-trans | --program-tran \
  194.   | --progr-tra | --program-tr | --program-t)
  195.     ac_prev=program_transform_name ;;
  196.   -program-transform-name=* | --program-transform-name=* \
  197.   | --program-transform-nam=* | --program-transform-na=* \
  198.   | --program-transform-n=* | --program-transform-=* \
  199.   | --program-transform=* | --program-transfor=* \
  200.   | --program-transfo=* | --program-transf=* \
  201.   | --program-trans=* | --program-tran=* \
  202.   | --progr-tra=* | --program-tr=* | --program-t=*)
  203.     program_transform_name="$ac_optarg" ;;
  204.  
  205.   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  206.   | -silent | --silent | --silen | --sile | --sil)
  207.     silent=yes ;;
  208.  
  209.   -site | --site | --sit)
  210.     ac_prev=site ;;
  211.   -site=* | --site=* | --sit=*)
  212.     site="$ac_optarg" ;;
  213.  
  214.   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  215.     ac_prev=srcdir ;;
  216.   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  217.     srcdir="$ac_optarg" ;;
  218.  
  219.   -target | --target | --targe | --targ | --tar | --ta | --t)
  220.     ac_prev=target ;;
  221.   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  222.     target="$ac_optarg" ;;
  223.  
  224.   -v | -verbose | --verbose | --verbos | --verbo | --verb)
  225.     verbose=yes ;;
  226.  
  227.   -version | --version | --versio | --versi | --vers)
  228.     echo "configure generated by autoconf version 2.1"
  229.     exit 0 ;;
  230.  
  231.   -with-* | --with-*)
  232.     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  233.     # Reject names that are not valid shell variable names.
  234.     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  235.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  236.     fi
  237.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  238.     case "$ac_option" in
  239.       *=*) ;;
  240.       *) ac_optarg=yes ;;
  241.     esac
  242.     eval "with_${ac_package}='$ac_optarg'" ;;
  243.  
  244.   -without-* | --without-*)
  245.     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
  246.     # Reject names that are not valid shell variable names.
  247.     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  248.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  249.     fi
  250.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  251.     eval "with_${ac_package}=no" ;;
  252.  
  253.   --x)
  254.     # Obsolete; use --with-x.
  255.     with_x=yes ;;
  256.  
  257.   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  258.   | --x-incl | --x-inc | --x-in | --x-i)
  259.     ac_prev=x_includes ;;
  260.   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  261.   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  262.     x_includes="$ac_optarg" ;;
  263.  
  264.   -x-libraries | --x-libraries | --x-librarie | --x-librari \
  265.   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  266.     ac_prev=x_libraries ;;
  267.   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  268.   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  269.     x_libraries="$ac_optarg" ;;
  270.  
  271.   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
  272.     ;;
  273.  
  274.   *) 
  275.     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  276.       echo "configure: warning: $ac_option: invalid host type" 1>&2
  277.     fi
  278.     if test "x$nonopt" != xNONE; then
  279.       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
  280.     fi
  281.     nonopt="$ac_option"
  282.     ;;
  283.  
  284.   esac
  285. done
  286.  
  287. if test -n "$ac_prev"; then
  288.   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
  289. fi
  290.  
  291. trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15
  292.  
  293. # File descriptor usage:
  294. # 0 unused; standard input
  295. # 1 file creation
  296. # 2 errors and warnings
  297. # 3 unused; some systems may open it to /dev/tty
  298. # 4 checking for... messages and results
  299. # 5 compiler messages saved in config.log
  300. if test "$silent" = yes; then
  301.   exec 4>/dev/null
  302. else
  303.   exec 4>&1
  304. fi
  305. exec 5>./config.log
  306.  
  307. echo "\
  308. This file contains any messages produced by compilers while
  309. running configure, to aid debugging if configure makes a mistake.
  310. " 1>&5
  311.  
  312. # Strip out --no-create and --no-recursion so they do not pile up.
  313. # Also quote any args containing shell metacharacters.
  314. ac_configure_args=
  315. for ac_arg
  316. do
  317.   case "$ac_arg" in
  318.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  319.   | --no-cr | --no-c) ;;
  320.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  321.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  322.   *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  323.   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  324.   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  325.   esac
  326. done
  327.  
  328. # NLS nuisances.
  329. # Only set LANG and LC_ALL to C if already set.
  330. # These must not be set unconditionally because not all systems understand
  331. # e.g. LANG=C (notably SCO).
  332. if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
  333. if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
  334.  
  335. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  336. rm -rf conftest* confdefs.h
  337. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  338. echo > confdefs.h
  339.  
  340. # A filename unique to this package, relative to the directory that
  341. # configure is in, which we can look for to find out if srcdir is correct.
  342. ac_unique_file=src/octave.cc
  343.  
  344. # Find the source files, if location was not specified.
  345. if test -z "$srcdir"; then
  346.   ac_srcdir_defaulted=yes
  347.   # Try the directory containing this script, then its parent.
  348.   ac_prog=$0
  349.   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  350.   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  351.   srcdir=$ac_confdir
  352.   if test ! -r $srcdir/$ac_unique_file; then
  353.     srcdir=..
  354.   fi
  355. else
  356.   ac_srcdir_defaulted=no
  357. fi
  358. if test ! -r $srcdir/$ac_unique_file; then
  359.   if test "$ac_srcdir_defaulted" = yes; then
  360.     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  361.   else
  362.     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  363.   fi
  364. fi
  365. srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
  366.  
  367. # Prefer explicitly selected file to automatically selected ones.
  368. if test -z "$CONFIG_SITE"; then
  369.   if test "x$prefix" != xNONE; then
  370.     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  371.   else
  372.     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  373.   fi
  374. fi
  375. for ac_site_file in $CONFIG_SITE; do
  376.   if test -r "$ac_site_file"; then
  377.     echo "loading site script $ac_site_file"
  378.     . "$ac_site_file"
  379.   fi
  380. done
  381.  
  382. if test -r "$cache_file"; then
  383.   echo "loading cache $cache_file"
  384.   . $cache_file
  385. else
  386.   echo "creating cache $cache_file"
  387.   > $cache_file
  388. fi
  389.  
  390. ac_ext=c
  391. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  392. ac_cpp='$CPP $CPPFLAGS'
  393. ac_compile='${CC-cc} $CFLAGS $CPPFLAGS conftest.$ac_ext -c 1>&5 2>&5'
  394. ac_link='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext -o conftest $LIBS 1>&5 2>&5'
  395.  
  396. if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  397.   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  398.   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
  399.     ac_n= ac_c='
  400. ' ac_t='    '
  401.   else
  402.     ac_n=-n ac_c= ac_t=
  403.   fi
  404. else
  405.   ac_n= ac_c='\c' ac_t=
  406. fi
  407.  
  408.  
  409.  
  410.  
  411. cat >> confdefs.h <<\EOF
  412. #define OCTAVE_SOURCE 1
  413. EOF
  414.  
  415.  
  416. ac_aux_dir=
  417. for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
  418.   if test -f $ac_dir/install-sh; then
  419.     ac_aux_dir=$ac_dir
  420.     ac_install_sh="$ac_aux_dir/install-sh -c"
  421.     break
  422.   elif test -f $ac_dir/install.sh; then
  423.     ac_aux_dir=$ac_dir
  424.     ac_install_sh="$ac_aux_dir/install.sh -c"
  425.     break
  426.   fi
  427. done
  428. if test -z "$ac_aux_dir"; then
  429.   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
  430. fi
  431. ac_config_guess=$ac_aux_dir/config.guess
  432. ac_config_sub=$ac_aux_dir/config.sub
  433. ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
  434.  
  435.  
  436. # Make sure we can run config.sub.
  437. if $ac_config_sub sun4 >/dev/null 2>&1; then :
  438. else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
  439. fi
  440.  
  441. echo $ac_n "checking host system type""... $ac_c" 1>&4
  442.  
  443. host_alias=$host
  444. case "$host_alias" in
  445. NONE)
  446.   case $nonopt in
  447.   NONE)
  448.     if host_alias=`$ac_config_guess`; then :
  449.     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
  450.     fi ;;
  451.   *) host_alias=$nonopt ;;
  452.   esac ;;
  453. esac
  454.  
  455. host=`$ac_config_sub $host_alias`
  456. host_cpu=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
  457. host_vendor=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
  458. host_os=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
  459. echo "$ac_t""$host" 1>&4
  460.  
  461. if test -z "$host"; then
  462.   host=unknown
  463. fi
  464. target_host_type=$host
  465. canonical_host_type=$host
  466. if test "$host" = unknown; then
  467.   echo "configure: warning: configuring Octave for unknown system type
  468. " 1>&2
  469. fi
  470.  
  471.  
  472. ### Allow the user to force us to use f2c.
  473.  
  474. # Check whether --with-f2c or --without-f2c was given.
  475. withval="$with_f2c"
  476. if test -n "$withval"; then
  477.   use_f2c=true
  478. else
  479.   use_f2c=false
  480. fi
  481.  
  482.  
  483. ### Allow the user to experiment with dynamic linking using GNU dld.
  484.  
  485. # Check whether --enable-dld or --disable-dld was given.
  486. enableval="$enable_dld"
  487. if test -n "$enableval"; then
  488.   use_dld=true
  489. else
  490.   use_dld=false
  491. fi
  492.  
  493.  
  494.  
  495. ### Allow compilation of smaller kernel.  This only works if some form
  496. ### of dynamic linking is also supported and used.
  497.  
  498. # Check whether --enable-lite-kernel or --disable-lite-kernel was given.
  499. enableval="$enable_lite_kernel"
  500. if test -n "$enableval"; then
  501.   lite_kernel=true
  502. else
  503.   lite_kernel=false
  504. fi
  505.  
  506. if $lite_kernel; then
  507.   cat >> confdefs.h <<\EOF
  508. #define OCTAVE_LITE 1
  509. EOF
  510.  
  511. fi
  512.  
  513.  
  514. ### some defaults
  515.  
  516.  
  517.  
  518. exec_prefix='$(prefix)'
  519. bindir='$(exec_prefix)/bin'
  520. datadir='$(prefix)/lib'
  521. libdir='$(exec_prefix)/lib'
  522. includedir='$(prefix)/include/octave'
  523. mandir='$(prefix)/man/man1'
  524. infodir='$(prefix)/info'
  525. fcnfiledir='$(datadir)/octave/$(version)/m'
  526. localfcnfiledir='$(datadir)/octave/site/m'
  527. localfcnfilepath='$(localfcnfiledir)//'
  528. archlibdir='$(libdir)/octave/$(version)/exec/$(target_host_type)'
  529. octfiledir='$(libdir)/octave/$(version)/oct/$(target_host_type)'
  530. localoctfiledir='$(datadir)/octave/site/oct/$(target_host_type)'
  531. localoctfilepath='$(localoctfiledir)//'
  532. fcnfilepath='.:$(localoctfilepath):$(localfcnfilepath):$(octfiledir)//:$(fcnfiledir)//'
  533. imagedir='$(datadir)/octave/$(version)/imagelib'
  534. imagepath='.:$(imagedir)//'
  535.  
  536. echo "$ac_t""defining prefix to be $prefix" 1>&4
  537. echo "$ac_t""defining exec_prefix to be $exec_prefix" 1>&4
  538. echo "$ac_t""defining bindir to be $bindir" 1>&4
  539. echo "$ac_t""defining datadir to be $datadir" 1>&4
  540. echo "$ac_t""defining libdir to be $libdir" 1>&4
  541. echo "$ac_t""defining includedir to be $includedir" 1>&4
  542. echo "$ac_t""defining mandir to be $mandir" 1>&4
  543. echo "$ac_t""defining infodir to be $infodir" 1>&4
  544. echo "$ac_t""defining fcnfiledir to be $fcnfiledir" 1>&4
  545. echo "$ac_t""defining localfcnfiledir to be $localfcnfiledir" 1>&4
  546. echo "$ac_t""defining localfcnfilepath to be $localfcnfilepath" 1>&4
  547. echo "$ac_t""defining archlibdir to be $archlibdir" 1>&4
  548. echo "$ac_t""defining octfiledir to be $octfiledir" 1>&4
  549. echo "$ac_t""defining localoctfiledir to be $localoctfiledir" 1>&4
  550. echo "$ac_t""defining localoctfilepath to be $localoctfilepath" 1>&4
  551. echo "$ac_t""defining fcnfilepath to be $fcnfilepath" 1>&4
  552. echo "$ac_t""defining imagedir to be $imagedir" 1>&4
  553. echo "$ac_t""defining imagepath to be $imagepath" 1>&4
  554.  
  555.  
  556.  
  557.  
  558.  
  559.  
  560.  
  561.  
  562.  
  563.  
  564.  
  565.  
  566.  
  567.  
  568.  
  569.  
  570.  
  571.  
  572. ### Path separator.
  573.  
  574. cat >> confdefs.h <<\EOF
  575. #define SEPCHAR ':'
  576. EOF
  577.  
  578. cat >> confdefs.h <<\EOF
  579. #define SEPCHAR_STR ":"
  580. EOF
  581.  
  582.  
  583. ### Do special stuff if using dld.
  584.  
  585. DLD_DIR=
  586. LIBDLD=
  587. LIBOCTDLD='liboctdld.a'
  588. LD_STATIC_FLAG=
  589. if $use_dld; then
  590.   DLD_DIR=dld
  591.   LIBDLD='../dld/libdld.a'
  592. # don't link them in only if doing dynamic linking and small kernel
  593. # requested.
  594.   if $lite_kernel; then
  595.     LIBOCTDLD=
  596.   fi
  597.   LD_STATIC_FLAG=-static
  598.   cat >> confdefs.h <<\EOF
  599. #define WITH_DLD 1
  600. EOF
  601.  
  602. fi
  603.  
  604. ### Also use -static if compiling on Alpha OSF/1 1.3 systems.
  605.  
  606. case "$canonical_host_type" in
  607.   alpha-dec-osf1.3)
  608.     LD_STATIC_FLAG=-static
  609.   ;;
  610. esac
  611.  
  612. if test -n "$DLD_DIR"; then
  613.   echo "$ac_t""defining DLD_DIR to be $DLD_DIR" 1>&4
  614. fi
  615. if test -n "$LIBDLD"; then
  616.   echo "$ac_t""defining LIBDLD to be $LIBDLD" 1>&4
  617. fi
  618. if test -n "$LIBOCTDLD"; then
  619.   echo "$ac_t""defining LIBOCTDLD to be $LIBOCTDLD" 1>&4
  620. fi
  621. if test -n "$LD_STATIC_FLAG"; then
  622.   echo "$ac_t""defining LD_STATIC_FLAG to be $LD_STATIC_FLAG" 1>&4
  623. fi
  624.  
  625.  
  626.  
  627.  
  628.  
  629. ### See if the optional nonlinear programming code is present.
  630.  
  631. echo $ac_n "checking for npsol""... $ac_c" 1>&4
  632. if test -f $srcdir/libcruft/npsol/npsol.f; then
  633.   echo "$ac_t""yes" 1>&4
  634. else
  635.   echo "$ac_t""no" 1>&4
  636.   cat >> confdefs.h <<\EOF
  637. #define NPSOL_MISSING 1
  638. EOF
  639.  
  640. fi
  641.  
  642. echo $ac_n "checking for qpsol""... $ac_c" 1>&4
  643. if test -f $srcdir/libcruft/qpsol/qpsol.f; then
  644.   echo "$ac_t""yes" 1>&4
  645. else
  646.   echo "$ac_t""no" 1>&4
  647.   cat >> confdefs.h <<\EOF
  648. #define QPSOL_MISSING 1
  649. EOF
  650.  
  651. fi
  652.  
  653. echo $ac_n "checking for fsqp""... $ac_c" 1>&4
  654. if test -f $srcdir/libcruft/fsqp/fsqpd.f; then
  655.   echo "$ac_t""yes" 1>&4
  656. else
  657.   echo "$ac_t""no" 1>&4
  658.   cat >> confdefs.h <<\EOF
  659. #define FSQP_MISSING 1
  660. EOF
  661.  
  662. fi
  663.  
  664. ### See which C++ compiler to use (we expect to find g++).
  665.  
  666. for ac_prog in $CCC c++ g++ gcc CC cxx
  667. do
  668. # Extract the first word of "$ac_prog", so it can be a program name with args.
  669. set dummy $ac_prog; ac_word=$2
  670. echo $ac_n "checking for $ac_word""... $ac_c" 1>&4
  671. if eval "test \"`echo '${'ac_cv_prog_CXX'+set}'`\" = set"; then
  672.   echo $ac_n "(cached) $ac_c" 1>&4
  673. else
  674.   if test -n "$CXX"; then
  675.   ac_cv_prog_CXX="$CXX" # Let the user override the test.
  676. else
  677.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  678.   for ac_dir in $PATH; do
  679.     test -z "$ac_dir" && ac_dir=.
  680.     if test -f $ac_dir/$ac_word; then
  681.       ac_cv_prog_CXX="$ac_prog"
  682.       break
  683.     fi
  684.   done
  685.   IFS="$ac_save_ifs"
  686. fi
  687. fi
  688. CXX="$ac_cv_prog_CXX"
  689. if test -n "$CXX"; then
  690.   echo "$ac_t""$CXX" 1>&4
  691. else
  692.   echo "$ac_t""no" 1>&4
  693. fi
  694.  
  695. test -n "$CXX" && break
  696. done
  697. test -n "$CXX" || CXX="gcc"
  698.  
  699.  
  700. echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&4
  701. if eval "test \"`echo '${'ac_cv_prog_gxx'+set}'`\" = set"; then
  702.   echo $ac_n "(cached) $ac_c" 1>&4
  703. else
  704.   cat > conftest.C <<EOF
  705. #ifdef __GNUC__
  706.   yes;
  707. #endif
  708. EOF
  709. if ${CXX-g++} -E conftest.C 2>&5 | egrep yes >/dev/null 2>&1; then
  710.   ac_cv_prog_gxx=yes
  711. else
  712.   ac_cv_prog_gxx=no
  713. fi
  714. fi
  715. echo "$ac_t""$ac_cv_prog_gxx" 1>&4
  716. if test $ac_cv_prog_gxx = yes; then
  717.   GXX=yes
  718.   if test "${CXXFLAGS+set}" != set; then
  719.     echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&4
  720. if eval "test \"`echo '${'ac_cv_prog_gxx_g'+set}'`\" = set"; then
  721.   echo $ac_n "(cached) $ac_c" 1>&4
  722. else
  723.   echo 'void f(){}' > conftest.cc
  724. if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
  725.   ac_cv_prog_gxx_g=yes
  726. else
  727.   ac_cv_prog_gxx_g=no
  728. fi
  729. rm -f conftest*
  730.  
  731. fi
  732.     echo "$ac_t""$ac_cv_prog_gxx_g" 1>&4
  733.     if test $ac_cv_prog_gxx_g = yes; then
  734.       CXXFLAGS="-g -O"
  735.     else
  736.       CXXFLAGS="-O"
  737.     fi
  738.   fi
  739. else
  740.   GXX=
  741.   test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
  742. fi
  743.  
  744. echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&4
  745. if test -z "$CXXCPP"; then
  746. if eval "test \"`echo '${'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
  747.   echo $ac_n "(cached) $ac_c" 1>&4
  748. else
  749.   ac_ext=C
  750. # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  751. ac_cpp='$CXXCPP $CPPFLAGS'
  752. ac_compile='${CXX-g++} $CXXFLAGS $CPPFLAGS conftest.$ac_ext -c 1>&5 2>&5'
  753. ac_link='${CXX-g++} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext -o conftest $LIBS 1>&5 2>&5'
  754.   CXXCPP="${CXX-g++} -E"
  755.   cat > conftest.$ac_ext <<EOF
  756. #line 757 "configure"
  757. #include "confdefs.h"
  758. #include <stdlib.h>
  759. EOF
  760. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  761. ac_err=`grep -v '^ *+' conftest.out`
  762. if test -z "$ac_err"; then
  763.   :
  764. else
  765.   echo "$ac_err" >&5
  766.   rm -rf conftest*
  767.   CXXCPP=/lib/cpp
  768. fi
  769. rm -f conftest*
  770.   ac_cv_prog_CXXCPP="$CXXCPP"
  771. ac_ext=c
  772. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  773. ac_cpp='$CPP $CPPFLAGS'
  774. ac_compile='${CC-cc} $CFLAGS $CPPFLAGS conftest.$ac_ext -c 1>&5 2>&5'
  775. ac_link='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext -o conftest $LIBS 1>&5 2>&5'
  776. fi
  777. fi
  778. CXXCPP="$ac_cv_prog_CXXCPP"
  779. echo "$ac_t""$CXXCPP" 1>&4
  780.  
  781.  
  782. ### Do special things for g++.
  783.  
  784. ADD_CXX_WALL=false
  785. NO_IMPLICIT_TEMPLATES=
  786. gxx_version=`$CXX -v 2>&1 | grep "^g.. version" | sed 's/^g.. version *//'`
  787. case "$gxx_version" in
  788.   2.[6789].*|2.[123456789][0123456789].*)
  789.     if test -z "$CXXFLAGS"; then
  790.       CXXFLAGS="-g -O"
  791.       echo "$ac_t""defining CXXFLAGS to be $CXXFLAGS" 1>&4
  792.       ADD_CXX_WALL=true
  793.     fi
  794.     NO_IMPLICIT_TEMPLATES="-fno-implicit-templates"
  795.     echo "$ac_t""defining NO_IMPLICIT_TEMPLATES to be $NO_IMPLICIT_TEMPLATES" 1>&4
  796.   ;;
  797.   1.*|2.[012345].*)
  798.     echo "configure: warning: g++ version $gxx_version will not work to compile Octave" 1>&2
  799.   ;;
  800.   *)
  801.     echo "configure: warning: Octave has only been tested with g++, and I can't find it" 1>&2
  802.   ;;
  803. esac
  804.  
  805. HOST_CXXFLAGS=
  806. case "$gxx_version" in
  807.   2.6.*)
  808.     case "$canonical_host_type" in
  809.       rs6000-ibm-aix*)
  810.         HOST_CXXFLAGS="-Wa,-u"
  811.         echo "$ac_t""defining HOST_CXXFLAGS to be $HOST_CXXFLAGS" 1>&4
  812.       ;;
  813.     esac
  814.   ;;
  815. esac
  816.  
  817.  
  818.  
  819. ### See what libraries are used by the C++ compiler.  Need this for
  820. ### dynamic linking.
  821.  
  822. CXXLIBS=`sh $srcdir/cxxlibs.sh`
  823. echo "$ac_t""defining CXXLIBS to be $CXXLIBS" 1>&4
  824.  
  825.  
  826.  
  827.  
  828.  
  829. ### See which C compiler to use (we expect to find gcc).
  830.  
  831. # Extract the first word of "gcc", so it can be a program name with args.
  832. set dummy gcc; ac_word=$2
  833. echo $ac_n "checking for $ac_word""... $ac_c" 1>&4
  834. if eval "test \"`echo '${'ac_cv_prog_CC'+set}'`\" = set"; then
  835.   echo $ac_n "(cached) $ac_c" 1>&4
  836. else
  837.   if test -n "$CC"; then
  838.   ac_cv_prog_CC="$CC" # Let the user override the test.
  839. else
  840.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  841.   for ac_dir in $PATH; do
  842.     test -z "$ac_dir" && ac_dir=.
  843.     if test -f $ac_dir/$ac_word; then
  844.       ac_cv_prog_CC="gcc"
  845.       break
  846.     fi
  847.   done
  848.   IFS="$ac_save_ifs"
  849.   test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc"
  850. fi
  851. fi
  852. CC="$ac_cv_prog_CC"
  853. if test -n "$CC"; then
  854.   echo "$ac_t""$CC" 1>&4
  855. else
  856.   echo "$ac_t""no" 1>&4
  857. fi
  858.  
  859.  
  860. echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&4
  861. if eval "test \"`echo '${'ac_cv_prog_gcc'+set}'`\" = set"; then
  862.   echo $ac_n "(cached) $ac_c" 1>&4
  863. else
  864.   cat > conftest.c <<EOF
  865. #ifdef __GNUC__
  866.   yes;
  867. #endif
  868. EOF
  869. if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then
  870.   ac_cv_prog_gcc=yes
  871. else
  872.   ac_cv_prog_gcc=no
  873. fi
  874. fi
  875. echo "$ac_t""$ac_cv_prog_gcc" 1>&4
  876. if test $ac_cv_prog_gcc = yes; then
  877.   GCC=yes
  878.   if test "${CFLAGS+set}" != set; then
  879.     echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&4
  880. if eval "test \"`echo '${'ac_cv_prog_gcc_g'+set}'`\" = set"; then
  881.   echo $ac_n "(cached) $ac_c" 1>&4
  882. else
  883.   echo 'void f(){}' > conftest.c
  884. if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  885.   ac_cv_prog_gcc_g=yes
  886. else
  887.   ac_cv_prog_gcc_g=no
  888. fi
  889. rm -f conftest*
  890.  
  891. fi
  892.     echo "$ac_t""$ac_cv_prog_gcc_g" 1>&4
  893.     if test $ac_cv_prog_gcc_g = yes; then
  894.       CFLAGS="-g -O"
  895.     else
  896.       CFLAGS="-O"
  897.     fi
  898.   fi
  899. else
  900.   GCC=
  901.   test "${CFLAGS+set}" = set || CFLAGS="-g"
  902. fi
  903.  
  904. echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&4
  905. # On Suns, sometimes $CPP names a directory.
  906. if test -n "$CPP" && test -d "$CPP"; then
  907.   CPP=
  908. fi
  909. if test -z "$CPP"; then
  910. if eval "test \"`echo '${'ac_cv_prog_CPP'+set}'`\" = set"; then
  911.   echo $ac_n "(cached) $ac_c" 1>&4
  912. else
  913.     # This must be in double quotes, not single quotes, because CPP may get
  914.   # substituted into the Makefile and "${CC-cc}" will confuse make.
  915.   CPP="${CC-cc} -E"
  916.   # On the NeXT, cc -E runs the code through the compiler's parser,
  917.   # not just through cpp.
  918.   cat > conftest.$ac_ext <<EOF
  919. #line 920 "configure"
  920. #include "confdefs.h"
  921. #include <assert.h>
  922. Syntax Error
  923. EOF
  924. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  925. ac_err=`grep -v '^ *+' conftest.out`
  926. if test -z "$ac_err"; then
  927.   :
  928. else
  929.   echo "$ac_err" >&5
  930.   rm -rf conftest*
  931.   CPP="${CC-cc} -E -traditional-cpp"
  932.   cat > conftest.$ac_ext <<EOF
  933. #line 934 "configure"
  934. #include "confdefs.h"
  935. #include <assert.h>
  936. Syntax Error
  937. EOF
  938. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  939. ac_err=`grep -v '^ *+' conftest.out`
  940. if test -z "$ac_err"; then
  941.   :
  942. else
  943.   echo "$ac_err" >&5
  944.   rm -rf conftest*
  945.   CPP=/lib/cpp
  946. fi
  947. rm -f conftest*
  948. fi
  949. rm -f conftest*
  950.   ac_cv_prog_CPP="$CPP"
  951. fi
  952. fi
  953. CPP="$ac_cv_prog_CPP"
  954. echo "$ac_t""$CPP" 1>&4
  955.  
  956. if test $ac_cv_prog_gcc = yes; then
  957.   echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&4
  958. if eval "test \"`echo '${'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
  959.   echo $ac_n "(cached) $ac_c" 1>&4
  960. else
  961.     ac_pattern="Autoconf.*'x'"
  962.   cat > conftest.$ac_ext <<EOF
  963. #line 964 "configure"
  964. #include "confdefs.h"
  965. #include <sgtty.h>
  966. Autoconf TIOCGETP
  967. EOF
  968. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  969.   egrep "$ac_pattern" >/dev/null 2>&1; then
  970.   rm -rf conftest*
  971.   ac_cv_prog_gcc_traditional=yes
  972. else
  973.   rm -rf conftest*
  974.   ac_cv_prog_gcc_traditional=no
  975. fi
  976. rm -f conftest*
  977.  
  978.  
  979.   if test $ac_cv_prog_gcc_traditional = no; then
  980.     cat > conftest.$ac_ext <<EOF
  981. #line 982 "configure"
  982. #include "confdefs.h"
  983. #include <termio.h>
  984. Autoconf TCGETA
  985. EOF
  986. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  987.   egrep "$ac_pattern" >/dev/null 2>&1; then
  988.   rm -rf conftest*
  989.   ac_cv_prog_gcc_traditional=yes
  990. fi
  991. rm -f conftest*
  992.  
  993.   fi
  994. fi
  995.   echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&4
  996.   if test $ac_cv_prog_gcc_traditional = yes; then
  997.     CC="$CC -traditional"
  998.   fi
  999. fi
  1000.  
  1001.  
  1002. ### Do special things for gcc.
  1003.  
  1004. ADD_CC_WALL=false
  1005. gcc_version=`$CC -v 2>&1 | grep "^gcc version" | sed 's/^gcc version *//'`
  1006. case "$gcc_version" in
  1007.   2.*)
  1008.     if test -z "$CFLAGS"; then
  1009.       CFLAGS="-g -O"
  1010.       echo "$ac_t""defining CFLAGS to be $CFLAGS" 1>&4
  1011.       ADD_CC_WALL=true
  1012.     fi
  1013.     if test -z "$LDFLAGS"; then
  1014.       LDFLAGS="-g"
  1015.       echo "$ac_t""defining LDFLAGS to be $LDFLAGS" 1>&4
  1016.     fi
  1017.   ;;
  1018.   1.*)
  1019.     echo "configure: warning: gcc version $gcc_version is likely to cause problems" 1>&2
  1020.   ;;
  1021.   *)
  1022.     echo "configure: warning: Octave has only been tested with gcc, and I can't find it" 1>&2
  1023.   ;;
  1024. esac
  1025.  
  1026.  
  1027.  
  1028.  
  1029. ### On Linux systems we need to compile with -mieee-fp to get full
  1030. ### support for IEEE floating point.
  1031.  
  1032. case "$canonical_host_type" in
  1033.   i386-*-linux | i486-*-linux | i586-*-linux)
  1034.     GCC_IEEE_FP_FLAG="-mieee-fp"
  1035.     echo "$ac_t""defining GCC_IEEE_FP_FLAG to be $GCC_IEEE_FP_FLAG" 1>&4
  1036.   ;;
  1037. esac
  1038.  
  1039.  
  1040.  
  1041. ### Special checks for odd OS specific things.
  1042.  
  1043. echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&4
  1044. if test -d /etc/conf/kconfig.d &&
  1045.   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
  1046. then
  1047.   echo "$ac_t""yes" 1>&4
  1048.   ISC=yes # If later tests want to check for ISC.
  1049.   cat >> confdefs.h <<\EOF
  1050. #define _POSIX_SOURCE 1
  1051. EOF
  1052.  
  1053.   if test "$GCC" = yes; then
  1054.     CC="$CC -posix"
  1055.   else
  1056.     CC="$CC -Xp"
  1057.   fi
  1058. else
  1059.   echo "$ac_t""no" 1>&4
  1060.   ISC=
  1061. fi
  1062.  
  1063. ac_safe=`echo "minix/config.h" | tr './\055' '___'`
  1064. echo $ac_n "checking for minix/config.h""... $ac_c" 1>&4
  1065. if eval "test \"`echo '${'ac_cv_header_$ac_safe'+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 <minix/config.h>
  1072. EOF
  1073. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1074. ac_err=`grep -v '^ *+' conftest.out`
  1075. if test -z "$ac_err"; then
  1076.   rm -rf conftest*
  1077.   eval "ac_cv_header_$ac_safe=yes"
  1078. else
  1079.   echo "$ac_err" >&5
  1080.   rm -rf conftest*
  1081.   eval "ac_cv_header_$ac_safe=no"
  1082. fi
  1083. rm -f conftest*
  1084. fi
  1085. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1086.   echo "$ac_t""yes" 1>&4
  1087.   MINIX=yes
  1088. else
  1089.   echo "$ac_t""no" 1>&4
  1090. MINIX=
  1091. fi
  1092.  
  1093. if test "$MINIX" = yes; then
  1094.   cat >> confdefs.h <<\EOF
  1095. #define _POSIX_SOURCE 1
  1096. EOF
  1097.  
  1098.   cat >> confdefs.h <<\EOF
  1099. #define _POSIX_1_SOURCE 2
  1100. EOF
  1101.  
  1102.   cat >> confdefs.h <<\EOF
  1103. #define _MINIX 1
  1104. EOF
  1105.  
  1106. fi
  1107.  
  1108. echo $ac_n "checking for AIX""... $ac_c" 1>&4
  1109. cat > conftest.$ac_ext <<EOF
  1110. #line 1111 "configure"
  1111. #include "confdefs.h"
  1112. #ifdef _AIX
  1113.   yes
  1114. #endif
  1115.  
  1116. EOF
  1117. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1118.   egrep "yes" >/dev/null 2>&1; then
  1119.   rm -rf conftest*
  1120.   echo "$ac_t""yes" 1>&4; cat >> confdefs.h <<\EOF
  1121. #define _ALL_SOURCE 1
  1122. EOF
  1123.  
  1124. else
  1125.   rm -rf conftest*
  1126.   echo "$ac_t""no" 1>&4
  1127. fi
  1128. rm -f conftest*
  1129.  
  1130.  
  1131. # strftime is in -lintl on SCO UNIX.
  1132. echo $ac_n "checking for -lintl""... $ac_c" 1>&4
  1133. if eval "test \"`echo '${'ac_cv_lib_intl'+set}'`\" = set"; then
  1134.   echo $ac_n "(cached) $ac_c" 1>&4
  1135. else
  1136.   ac_save_LIBS="$LIBS"
  1137. LIBS="$LIBS -lintl "
  1138. cat > conftest.$ac_ext <<EOF
  1139. #line 1140 "configure"
  1140. #include "confdefs.h"
  1141.  
  1142. int main() { return 0; }
  1143. int t() {
  1144. strftime()
  1145. ; return 0; }
  1146. EOF
  1147. if eval $ac_link; then
  1148.   rm -rf conftest*
  1149.   eval "ac_cv_lib_intl=yes"
  1150. else
  1151.   rm -rf conftest*
  1152.   eval "ac_cv_lib_intl=no"
  1153. fi
  1154. rm -f conftest*
  1155. LIBS="$ac_save_LIBS"
  1156.  
  1157. fi
  1158. if eval "test \"`echo '$ac_cv_lib_'intl`\" = yes"; then
  1159.   echo "$ac_t""yes" 1>&4
  1160.   LIBS="$LIBS -lintl"
  1161. else
  1162.   echo "$ac_t""no" 1>&4
  1163. fi
  1164.  
  1165. echo $ac_n "checking for strftime""... $ac_c" 1>&4
  1166. if eval "test \"`echo '${'ac_cv_func_strftime'+set}'`\" = set"; then
  1167.   echo $ac_n "(cached) $ac_c" 1>&4
  1168. else
  1169.   cat > conftest.$ac_ext <<EOF
  1170. #line 1171 "configure"
  1171. #include "confdefs.h"
  1172. #include <ctype.h> /* Arbitrary system header to define __stub macros. */
  1173. /* Override any gcc2 internal prototype to avoid an error.  */
  1174. char strftime(); 
  1175.  
  1176. int main() { return 0; }
  1177. int t() {
  1178.  
  1179. /* The GNU C library defines this for functions which it implements
  1180.     to always fail with ENOSYS.  Some functions are actually named
  1181.     something starting with __ and the normal name is an alias.  */
  1182. #if defined (__stub_strftime) || defined (__stub___strftime)
  1183. choke me
  1184. #else
  1185. strftime();
  1186. #endif
  1187.  
  1188. ; return 0; }
  1189. EOF
  1190. if eval $ac_link; then
  1191.   rm -rf conftest*
  1192.   eval "ac_cv_func_strftime=yes"
  1193. else
  1194.   rm -rf conftest*
  1195.   eval "ac_cv_func_strftime=no"
  1196. fi
  1197. rm -f conftest*
  1198.  
  1199. fi
  1200. if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
  1201.   echo "$ac_t""yes" 1>&4
  1202.   cat >> confdefs.h <<\EOF
  1203. #define HAVE_STRFTIME 1
  1204. EOF
  1205.  
  1206. else
  1207.   echo "$ac_t""no" 1>&4
  1208. fi
  1209.  
  1210. echo $ac_n "checking for -lsun""... $ac_c" 1>&4
  1211. if eval "test \"`echo '${'ac_cv_lib_sun'+set}'`\" = set"; then
  1212.   echo $ac_n "(cached) $ac_c" 1>&4
  1213. else
  1214.   ac_save_LIBS="$LIBS"
  1215. LIBS="$LIBS -lsun "
  1216. cat > conftest.$ac_ext <<EOF
  1217. #line 1218 "configure"
  1218. #include "confdefs.h"
  1219.  
  1220. int main() { return 0; }
  1221. int t() {
  1222. getpwnam()
  1223. ; return 0; }
  1224. EOF
  1225. if eval $ac_link; then
  1226.   rm -rf conftest*
  1227.   eval "ac_cv_lib_sun=yes"
  1228. else
  1229.   rm -rf conftest*
  1230.   eval "ac_cv_lib_sun=no"
  1231. fi
  1232. rm -f conftest*
  1233. LIBS="$ac_save_LIBS"
  1234.  
  1235. fi
  1236. if eval "test \"`echo '$ac_cv_lib_'sun`\" = yes"; then
  1237.   echo "$ac_t""yes" 1>&4
  1238.     ac_tr_lib=HAVE_LIB`echo sun | tr '[a-z]' '[A-Z]'`
  1239.   cat >> confdefs.h <<EOF
  1240. #define $ac_tr_lib 1
  1241. EOF
  1242.  
  1243.   LIBS="$LIBS -lsun"
  1244.  
  1245. else
  1246.   echo "$ac_t""no" 1>&4
  1247. fi
  1248.  
  1249.  
  1250. ### How big are ints and how are they oriented?  These could probably
  1251. ### be eliminated in favor of run-time checks.
  1252.  
  1253. # If we cannot run a trivial program, we must be cross compiling.
  1254. echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&4
  1255. if eval "test \"`echo '${'ac_cv_c_cross'+set}'`\" = set"; then
  1256.   echo $ac_n "(cached) $ac_c" 1>&4
  1257. else
  1258.   if test "$cross_compiling" = yes; then
  1259.   ac_cv_cross=yes
  1260. else
  1261. cat > conftest.$ac_ext <<EOF
  1262. #line 1263 "configure"
  1263. #include "confdefs.h"
  1264. main(){return(0);}
  1265. EOF
  1266. eval $ac_link
  1267. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1268.   ac_cv_c_cross=no
  1269. else
  1270.   ac_cv_c_cross=yes
  1271. fi
  1272. fi
  1273. rm -fr conftest*
  1274. fi
  1275. cross_compiling=$ac_cv_c_cross
  1276. echo "$ac_t""$ac_cv_c_cross" 1>&4
  1277.  
  1278. echo $ac_n "checking size of short""... $ac_c" 1>&4
  1279. if eval "test \"`echo '${'ac_cv_sizeof_short'+set}'`\" = set"; then
  1280.   echo $ac_n "(cached) $ac_c" 1>&4
  1281. else
  1282.   if test "$cross_compiling" = yes; then
  1283.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  1284. else
  1285. cat > conftest.$ac_ext <<EOF
  1286. #line 1287 "configure"
  1287. #include "confdefs.h"
  1288. #include <stdio.h>
  1289. main()
  1290. {
  1291.   FILE *f=fopen("conftestval", "w");
  1292.   if (!f) exit(1);
  1293.   fprintf(f, "%d\n", sizeof(short));
  1294.   exit(0);
  1295. }
  1296. EOF
  1297. eval $ac_link
  1298. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1299.   ac_cv_sizeof_short=`cat conftestval`
  1300. fi
  1301. fi
  1302. rm -fr conftest*
  1303. fi
  1304. echo "$ac_t""$ac_cv_sizeof_short" 1>&4
  1305. cat >> confdefs.h <<EOF
  1306. #define SIZEOF_SHORT $ac_cv_sizeof_short
  1307. EOF
  1308.  
  1309.  
  1310. echo $ac_n "checking size of int""... $ac_c" 1>&4
  1311. if eval "test \"`echo '${'ac_cv_sizeof_int'+set}'`\" = set"; then
  1312.   echo $ac_n "(cached) $ac_c" 1>&4
  1313. else
  1314.   if test "$cross_compiling" = yes; then
  1315.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  1316. else
  1317. cat > conftest.$ac_ext <<EOF
  1318. #line 1319 "configure"
  1319. #include "confdefs.h"
  1320. #include <stdio.h>
  1321. main()
  1322. {
  1323.   FILE *f=fopen("conftestval", "w");
  1324.   if (!f) exit(1);
  1325.   fprintf(f, "%d\n", sizeof(int));
  1326.   exit(0);
  1327. }
  1328. EOF
  1329. eval $ac_link
  1330. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1331.   ac_cv_sizeof_int=`cat conftestval`
  1332. fi
  1333. fi
  1334. rm -fr conftest*
  1335. fi
  1336. echo "$ac_t""$ac_cv_sizeof_int" 1>&4
  1337. cat >> confdefs.h <<EOF
  1338. #define SIZEOF_INT $ac_cv_sizeof_int
  1339. EOF
  1340.  
  1341.  
  1342. echo $ac_n "checking size of long""... $ac_c" 1>&4
  1343. if eval "test \"`echo '${'ac_cv_sizeof_long'+set}'`\" = set"; then
  1344.   echo $ac_n "(cached) $ac_c" 1>&4
  1345. else
  1346.   if test "$cross_compiling" = yes; then
  1347.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  1348. else
  1349. cat > conftest.$ac_ext <<EOF
  1350. #line 1351 "configure"
  1351. #include "confdefs.h"
  1352. #include <stdio.h>
  1353. main()
  1354. {
  1355.   FILE *f=fopen("conftestval", "w");
  1356.   if (!f) exit(1);
  1357.   fprintf(f, "%d\n", sizeof(long));
  1358.   exit(0);
  1359. }
  1360. EOF
  1361. eval $ac_link
  1362. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1363.   ac_cv_sizeof_long=`cat conftestval`
  1364. fi
  1365. fi
  1366. rm -fr conftest*
  1367. fi
  1368. echo "$ac_t""$ac_cv_sizeof_long" 1>&4
  1369. cat >> confdefs.h <<EOF
  1370. #define SIZEOF_LONG $ac_cv_sizeof_long
  1371. EOF
  1372.  
  1373.  
  1374. echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&4
  1375. if eval "test \"`echo '${'ac_cv_c_bigendian'+set}'`\" = set"; then
  1376.   echo $ac_n "(cached) $ac_c" 1>&4
  1377. else
  1378.   if test "$cross_compiling" = yes; then
  1379.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  1380. else
  1381. cat > conftest.$ac_ext <<EOF
  1382. #line 1383 "configure"
  1383. #include "confdefs.h"
  1384. main () {
  1385.   /* Are we little or big endian?  From Harbison&Steele.  */
  1386.   union
  1387.   {
  1388.     long l;
  1389.     char c[sizeof (long)];
  1390.   } u;
  1391.   u.l = 1;
  1392.   exit (u.c[sizeof (long) - 1] == 1);
  1393. }
  1394. EOF
  1395. eval $ac_link
  1396. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1397.   ac_cv_c_bigendian=no
  1398. else
  1399.   ac_cv_c_bigendian=yes
  1400. fi
  1401. fi
  1402. rm -fr conftest*
  1403. fi
  1404. echo "$ac_t""$ac_cv_c_bigendian" 1>&4
  1405. if test $ac_cv_c_bigendian = yes; then
  1406.   cat >> confdefs.h <<\EOF
  1407. #define WORDS_BIGENDIAN 1
  1408. EOF
  1409.  
  1410. fi
  1411.  
  1412.  
  1413. ### Try to determine the floating point format.  This could probably
  1414. ### be eliminated in favor of run-time checks.
  1415.  
  1416. echo $ac_n "checking floating point format""... $ac_c" 1>&4
  1417. XCFLAGS=`echo $CFLAGS | sed 's/-O[^ \t]*//'`
  1418. ${CC-cc} -DDP $XCFLAGS $LDFLAGS $srcdir/float-type.c -o conftest >/dev/null 2>&1
  1419. FLOAT_FORMAT=`./conftest`
  1420. case "$FLOAT_FORMAT" in
  1421.   IEEE_BIG_ENDIAN)
  1422.     echo "$ac_t""IEEE big endian" 1>&4
  1423.     cat >> confdefs.h <<\EOF
  1424. #define IEEE_BIG_ENDIAN 1
  1425. EOF
  1426.  
  1427.   ;;
  1428.   IEEE_LITTLE_ENDIAN)
  1429.     echo "$ac_t""IEEE little endian" 1>&4
  1430.     cat >> confdefs.h <<\EOF
  1431. #define IEEE_LITTLE_ENDIAN 1
  1432. EOF
  1433.  
  1434.   ;;
  1435.   VAX_D_FLOAT)
  1436.     echo "$ac_t""VAX D floating" 1>&4
  1437.     cat >> confdefs.h <<\EOF
  1438. #define VAX_D_FLOAT 1
  1439. EOF
  1440.  
  1441.   ;;
  1442.   VAX_G_FLOAT)
  1443.     echo "$ac_t""VAX G floating" 1>&4
  1444.     cat >> confdefs.h <<\EOF
  1445. #define VAX_G_FLOAT 1
  1446. EOF
  1447.  
  1448.   ;;
  1449.   *)
  1450.     echo "$ac_t""" 1>&4
  1451.     echo "configure: warning: "unrecognized floating point format!"" 1>&2
  1452.   ;;
  1453. esac
  1454.  
  1455. ### Does the C compiler handle alloca() and const correctly?
  1456.  
  1457. # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
  1458. # for constant arguments.  Useless!
  1459. echo $ac_n "checking for working alloca.h""... $ac_c" 1>&4
  1460. if eval "test \"`echo '${'ac_cv_header_alloca_h'+set}'`\" = set"; then
  1461.   echo $ac_n "(cached) $ac_c" 1>&4
  1462. else
  1463.   cat > conftest.$ac_ext <<EOF
  1464. #line 1465 "configure"
  1465. #include "confdefs.h"
  1466. #include <alloca.h>
  1467. int main() { return 0; }
  1468. int t() {
  1469. char *p = alloca(2 * sizeof(int));
  1470. ; return 0; }
  1471. EOF
  1472. if eval $ac_link; then
  1473.   rm -rf conftest*
  1474.   ac_cv_header_alloca_h=yes
  1475. else
  1476.   rm -rf conftest*
  1477.   ac_cv_header_alloca_h=no
  1478. fi
  1479. rm -f conftest*
  1480.  
  1481. fi
  1482. echo "$ac_t""$ac_cv_header_alloca_h" 1>&4
  1483. if test $ac_cv_header_alloca_h = yes; then
  1484.   cat >> confdefs.h <<\EOF
  1485. #define HAVE_ALLOCA_H 1
  1486. EOF
  1487.  
  1488. fi
  1489.  
  1490. echo $ac_n "checking for alloca""... $ac_c" 1>&4
  1491. if eval "test \"`echo '${'ac_cv_func_alloca'+set}'`\" = set"; then
  1492.   echo $ac_n "(cached) $ac_c" 1>&4
  1493. else
  1494.   cat > conftest.$ac_ext <<EOF
  1495. #line 1496 "configure"
  1496. #include "confdefs.h"
  1497.  
  1498. #ifdef __GNUC__
  1499. # define alloca __builtin_alloca
  1500. #else
  1501. # if HAVE_ALLOCA_H
  1502. #  include <alloca.h>
  1503. # else
  1504. #  ifdef _AIX
  1505.  #pragma alloca
  1506. #  else
  1507. #   ifndef alloca /* predefined by HP cc +Olibcalls */
  1508. char *alloca ();
  1509. #   endif
  1510. #  endif
  1511. # endif
  1512. #endif
  1513.  
  1514. int main() { return 0; }
  1515. int t() {
  1516. char *p = (char *) alloca(1);
  1517. ; return 0; }
  1518. EOF
  1519. if eval $ac_link; then
  1520.   rm -rf conftest*
  1521.   ac_cv_func_alloca=yes
  1522. else
  1523.   rm -rf conftest*
  1524.   ac_cv_func_alloca=no
  1525. fi
  1526. rm -f conftest*
  1527.  
  1528. fi
  1529. echo "$ac_t""$ac_cv_func_alloca" 1>&4
  1530. if test $ac_cv_func_alloca = yes; then
  1531.   cat >> confdefs.h <<\EOF
  1532. #define HAVE_ALLOCA 1
  1533. EOF
  1534.  
  1535. fi
  1536.  
  1537. if test $ac_cv_func_alloca = no; then
  1538.   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
  1539.   # that cause trouble.  Some versions do not even contain alloca or
  1540.   # contain a buggy version.  If you still want to use their alloca,
  1541.   # use ar to extract alloca.o from them instead of compiling alloca.c.
  1542.   ALLOCA=alloca.o
  1543.   cat >> confdefs.h <<\EOF
  1544. #define C_ALLOCA 1
  1545. EOF
  1546.  
  1547.  
  1548. echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&4
  1549. if eval "test \"`echo '${'ac_cv_os_cray'+set}'`\" = set"; then
  1550.   echo $ac_n "(cached) $ac_c" 1>&4
  1551. else
  1552.   cat > conftest.$ac_ext <<EOF
  1553. #line 1554 "configure"
  1554. #include "confdefs.h"
  1555. #if defined(CRAY) && ! defined(CRAY2)
  1556. webecray
  1557. #else
  1558. wenotbecray
  1559. #endif
  1560.  
  1561. EOF
  1562. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1563.   egrep "webecray" >/dev/null 2>&1; then
  1564.   rm -rf conftest*
  1565.   ac_cv_os_cray=yes
  1566. else
  1567.   rm -rf conftest*
  1568.   ac_cv_os_cray=no
  1569. fi
  1570. rm -f conftest*
  1571.  
  1572. fi
  1573. echo "$ac_t""$ac_cv_os_cray" 1>&4
  1574. if test $ac_cv_os_cray = yes; then
  1575. echo $ac_n "checking for _getb67""... $ac_c" 1>&4
  1576. if eval "test \"`echo '${'ac_cv_func__getb67'+set}'`\" = set"; then
  1577.   echo $ac_n "(cached) $ac_c" 1>&4
  1578. else
  1579.   cat > conftest.$ac_ext <<EOF
  1580. #line 1581 "configure"
  1581. #include "confdefs.h"
  1582. #include <ctype.h> /* Arbitrary system header to define __stub macros. */
  1583. /* Override any gcc2 internal prototype to avoid an error.  */
  1584. char _getb67(); 
  1585.  
  1586. int main() { return 0; }
  1587. int t() {
  1588.  
  1589. /* The GNU C library defines this for functions which it implements
  1590.     to always fail with ENOSYS.  Some functions are actually named
  1591.     something starting with __ and the normal name is an alias.  */
  1592. #if defined (__stub__getb67) || defined (__stub____getb67)
  1593. choke me
  1594. #else
  1595. _getb67();
  1596. #endif
  1597.  
  1598. ; return 0; }
  1599. EOF
  1600. if eval $ac_link; then
  1601.   rm -rf conftest*
  1602.   eval "ac_cv_func__getb67=yes"
  1603. else
  1604.   rm -rf conftest*
  1605.   eval "ac_cv_func__getb67=no"
  1606. fi
  1607. rm -f conftest*
  1608.  
  1609. fi
  1610. if eval "test \"`echo '$ac_cv_func_'_getb67`\" = yes"; then
  1611.   echo "$ac_t""yes" 1>&4
  1612.   cat >> confdefs.h <<\EOF
  1613. #define CRAY_STACKSEG_END _getb67
  1614. EOF
  1615.  
  1616. else
  1617.   echo "$ac_t""no" 1>&4
  1618. echo $ac_n "checking for GETB67""... $ac_c" 1>&4
  1619. if eval "test \"`echo '${'ac_cv_func_GETB67'+set}'`\" = set"; then
  1620.   echo $ac_n "(cached) $ac_c" 1>&4
  1621. else
  1622.   cat > conftest.$ac_ext <<EOF
  1623. #line 1624 "configure"
  1624. #include "confdefs.h"
  1625. #include <ctype.h> /* Arbitrary system header to define __stub macros. */
  1626. /* Override any gcc2 internal prototype to avoid an error.  */
  1627. char GETB67(); 
  1628.  
  1629. int main() { return 0; }
  1630. int t() {
  1631.  
  1632. /* The GNU C library defines this for functions which it implements
  1633.     to always fail with ENOSYS.  Some functions are actually named
  1634.     something starting with __ and the normal name is an alias.  */
  1635. #if defined (__stub_GETB67) || defined (__stub___GETB67)
  1636. choke me
  1637. #else
  1638. GETB67();
  1639. #endif
  1640.  
  1641. ; return 0; }
  1642. EOF
  1643. if eval $ac_link; then
  1644.   rm -rf conftest*
  1645.   eval "ac_cv_func_GETB67=yes"
  1646. else
  1647.   rm -rf conftest*
  1648.   eval "ac_cv_func_GETB67=no"
  1649. fi
  1650. rm -f conftest*
  1651.  
  1652. fi
  1653. if eval "test \"`echo '$ac_cv_func_'GETB67`\" = yes"; then
  1654.   echo "$ac_t""yes" 1>&4
  1655.   cat >> confdefs.h <<\EOF
  1656. #define CRAY_STACKSEG_END GETB67
  1657. EOF
  1658.  
  1659. else
  1660.   echo "$ac_t""no" 1>&4
  1661. echo $ac_n "checking for getb67""... $ac_c" 1>&4
  1662. if eval "test \"`echo '${'ac_cv_func_getb67'+set}'`\" = set"; then
  1663.   echo $ac_n "(cached) $ac_c" 1>&4
  1664. else
  1665.   cat > conftest.$ac_ext <<EOF
  1666. #line 1667 "configure"
  1667. #include "confdefs.h"
  1668. #include <ctype.h> /* Arbitrary system header to define __stub macros. */
  1669. /* Override any gcc2 internal prototype to avoid an error.  */
  1670. char getb67(); 
  1671.  
  1672. int main() { return 0; }
  1673. int t() {
  1674.  
  1675. /* The GNU C library defines this for functions which it implements
  1676.     to always fail with ENOSYS.  Some functions are actually named
  1677.     something starting with __ and the normal name is an alias.  */
  1678. #if defined (__stub_getb67) || defined (__stub___getb67)
  1679. choke me
  1680. #else
  1681. getb67();
  1682. #endif
  1683.  
  1684. ; return 0; }
  1685. EOF
  1686. if eval $ac_link; then
  1687.   rm -rf conftest*
  1688.   eval "ac_cv_func_getb67=yes"
  1689. else
  1690.   rm -rf conftest*
  1691.   eval "ac_cv_func_getb67=no"
  1692. fi
  1693. rm -f conftest*
  1694.  
  1695. fi
  1696. if eval "test \"`echo '$ac_cv_func_'getb67`\" = yes"; then
  1697.   echo "$ac_t""yes" 1>&4
  1698.   cat >> confdefs.h <<\EOF
  1699. #define CRAY_STACKSEG_END getb67
  1700. EOF
  1701.  
  1702. else
  1703.   echo "$ac_t""no" 1>&4
  1704. fi
  1705.  
  1706. fi
  1707.  
  1708. fi
  1709.  
  1710. fi
  1711.  
  1712. echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&4
  1713. if eval "test \"`echo '${'ac_cv_c_stack_direction'+set}'`\" = set"; then
  1714.   echo $ac_n "(cached) $ac_c" 1>&4
  1715. else
  1716.   if test "$cross_compiling" = yes; then
  1717.   ac_cv_c_stack_direction=0
  1718. else
  1719. cat > conftest.$ac_ext <<EOF
  1720. #line 1721 "configure"
  1721. #include "confdefs.h"
  1722. find_stack_direction ()
  1723. {
  1724.   static char *addr = 0;
  1725.   auto char dummy;
  1726.   if (addr == 0)
  1727.     {
  1728.       addr = &dummy;
  1729.       return find_stack_direction ();
  1730.     }
  1731.   else
  1732.     return (&dummy > addr) ? 1 : -1;
  1733. }
  1734. main ()
  1735. {
  1736.   exit (find_stack_direction() < 0);
  1737. }
  1738. EOF
  1739. eval $ac_link
  1740. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1741.   ac_cv_c_stack_direction=1
  1742. else
  1743.   ac_cv_c_stack_direction=-1
  1744. fi
  1745. fi
  1746. rm -fr conftest*
  1747. fi
  1748. echo "$ac_t""$ac_cv_c_stack_direction" 1>&4
  1749. cat >> confdefs.h <<EOF
  1750. #define STACK_DIRECTION $ac_cv_c_stack_direction
  1751. EOF
  1752.  
  1753. fi
  1754.  
  1755.  
  1756. ### This one is for kpathsea.
  1757. ###
  1758. ### It would be nicer to test for the requisite putenv features directly,
  1759. ### but can't figure out how to do that.
  1760.  
  1761. if test "`(uname) 2>/dev/null`" = NetBSD \
  1762.    || test "`(uname) 2>/dev/null`" = FreeBSD; then
  1763.   cat >> confdefs.h <<\EOF
  1764. #define SMART_PUTENV 1
  1765. EOF
  1766.  
  1767. fi
  1768.  
  1769. echo $ac_n "checking for working const""... $ac_c" 1>&4
  1770. if eval "test \"`echo '${'ac_cv_c_const'+set}'`\" = set"; then
  1771.   echo $ac_n "(cached) $ac_c" 1>&4
  1772. else
  1773.   cat > conftest.$ac_ext <<EOF
  1774. #line 1775 "configure"
  1775. #include "confdefs.h"
  1776.  
  1777. int main() { return 0; }
  1778. int t() {
  1779.  
  1780. /* Ultrix mips cc rejects this.  */
  1781. typedef int charset[2]; const charset x;
  1782. /* SunOS 4.1.1 cc rejects this.  */
  1783. char const *const *ccp;
  1784. char **p;
  1785. /* NEC SVR4.0.2 mips cc rejects this.  */
  1786. struct point {int x, y;};
  1787. static struct point const zero;
  1788. /* AIX XL C 1.02.0.0 rejects this.
  1789.    It does not let you subtract one const X* pointer from another in an arm
  1790.    of an if-expression whose if-part is not a constant expression */
  1791. const char *g = "string";
  1792. ccp = &g + (g ? g-g : 0);
  1793. /* HPUX 7.0 cc rejects these. */
  1794. ++ccp;
  1795. p = (char**) ccp;
  1796. ccp = (char const *const *) p;
  1797. { /* SCO 3.2v4 cc rejects this.  */
  1798.   char *t;
  1799.   char const *s = 0 ? (char *) 0 : (char const *) 0;
  1800.  
  1801.   *t++ = 0;
  1802. }
  1803. { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
  1804.   int x[] = {25, 17};
  1805.   const int *foo = &x[0];
  1806.   ++foo;
  1807. }
  1808. { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
  1809.   typedef const int *iptr;
  1810.   iptr p = 0;
  1811.   ++p;
  1812. }
  1813. { /* AIX XL C 1.02.0.0 rejects this saying
  1814.      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
  1815.   struct s { int j; const int *ap[3]; };
  1816.   struct s *b; b->j = 5;
  1817. }
  1818. { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
  1819.   const int foo = 10;
  1820. }
  1821.  
  1822. ; return 0; }
  1823. EOF
  1824. if eval $ac_compile; then
  1825.   rm -rf conftest*
  1826.   ac_cv_c_const=yes
  1827. else
  1828.   rm -rf conftest*
  1829.   ac_cv_c_const=no
  1830. fi
  1831. rm -f conftest*
  1832.  
  1833. fi
  1834. echo "$ac_t""$ac_cv_c_const" 1>&4
  1835. if test $ac_cv_c_const = no; then
  1836.   cat >> confdefs.h <<\EOF
  1837. #define const 
  1838. EOF
  1839.  
  1840. fi
  1841.  
  1842.  
  1843. ### If we haven't been forced to use f2c, try to find a Fortran compiler
  1844. ### under any one of several common Un*x Fortran compiler names. 
  1845. ### Put fc last to avoid confusion with some vendor's /bin/sh fc
  1846. ### builtin.
  1847. ###
  1848. ###    xlf : IBM / AIX
  1849. ###   cf77 : Cray / Unicos
  1850. ###    g77 : GNU Fortran (someday...)
  1851. ###     fc : Convex
  1852. ###
  1853. ### I don't think the Cray compiler will ever work like f2c...
  1854.  
  1855. if $use_f2c; then
  1856.   true
  1857. else
  1858.   for ac_prog in xlf cf77 f77 g77 fc
  1859. do
  1860. # Extract the first word of "$ac_prog", so it can be a program name with args.
  1861. set dummy $ac_prog; ac_word=$2
  1862. echo $ac_n "checking for $ac_word""... $ac_c" 1>&4
  1863. if eval "test \"`echo '${'ac_cv_prog_F77'+set}'`\" = set"; then
  1864.   echo $ac_n "(cached) $ac_c" 1>&4
  1865. else
  1866.   if test -n "$F77"; then
  1867.   ac_cv_prog_F77="$F77" # Let the user override the test.
  1868. else
  1869.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  1870.   for ac_dir in $PATH; do
  1871.     test -z "$ac_dir" && ac_dir=.
  1872.     if test -f $ac_dir/$ac_word; then
  1873.       ac_cv_prog_F77="$ac_prog"
  1874.       break
  1875.     fi
  1876.   done
  1877.   IFS="$ac_save_ifs"
  1878. fi
  1879. fi
  1880. F77="$ac_cv_prog_F77"
  1881. if test -n "$F77"; then
  1882.   echo "$ac_t""$F77" 1>&4
  1883. else
  1884.   echo "$ac_t""no" 1>&4
  1885. fi
  1886.  
  1887. test -n "$F77" && break
  1888. done
  1889.  
  1890.  
  1891.   # If it looks like we have a Fortran compiler, try to determine
  1892.   # whether it might be compatible with f2c.
  1893.  
  1894.   if test -n "$F77"; then
  1895.     echo $ac_n "checking $F77/f2c compatibility""... $ac_c" 1>&4
  1896.     export F77
  1897.     export CC
  1898.     tmpdef=`sh $srcdir/f2c-compat.sh $srcdir/flibs.sh`
  1899.     status=$?
  1900.     if test $status -eq 0; then
  1901.       echo "$ac_t""yes" 1>&4
  1902.       if test "$tmpdef" = '-DF77_APPEND_UNDERSCORE=1'; then
  1903.         cat >> confdefs.h <<\EOF
  1904. #define F77_APPEND_UNDERSCORE 1
  1905. EOF
  1906.  
  1907.       fi
  1908.     else
  1909.       echo "$ac_t""no" 1>&4
  1910.       F77=
  1911.     fi
  1912.   fi
  1913. fi
  1914.  
  1915. ### If we can't find a Fortran compiler, or if it looks like it isn't
  1916. ### compatible with f2c, try to find f2c.
  1917.  
  1918. if test -z "$F77"; then
  1919.   # Extract the first word of "f2c", so it can be a program name with args.
  1920. set dummy f2c; ac_word=$2
  1921. echo $ac_n "checking for $ac_word""... $ac_c" 1>&4
  1922. if eval "test \"`echo '${'ac_cv_prog_F2C'+set}'`\" = set"; then
  1923.   echo $ac_n "(cached) $ac_c" 1>&4
  1924. else
  1925.   if test -n "$F2C"; then
  1926.   ac_cv_prog_F2C="$F2C" # Let the user override the test.
  1927. else
  1928.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  1929.   for ac_dir in $PATH; do
  1930.     test -z "$ac_dir" && ac_dir=.
  1931.     if test -f $ac_dir/$ac_word; then
  1932.       ac_cv_prog_F2C="f2c"
  1933.       break
  1934.     fi
  1935.   done
  1936.   IFS="$ac_save_ifs"
  1937. fi
  1938. fi
  1939. F2C="$ac_cv_prog_F2C"
  1940. if test -n "$F2C"; then
  1941.   echo "$ac_t""$F2C" 1>&4
  1942. else
  1943.   echo "$ac_t""no" 1>&4
  1944. fi
  1945.  
  1946. fi
  1947.  
  1948. if test -z "$F2CFLAGS"; then
  1949.   F2CFLAGS=
  1950. fi
  1951.  
  1952. if test -z "$FFLAGS"; then
  1953.   FFLAGS="-O"
  1954.   echo "$ac_t""defining FFLAGS to be $FFLAGS" 1>&4
  1955. fi
  1956.  
  1957. if test -n "$F77"; then
  1958.   export F77
  1959.   FLIBS=`sh $srcdir/flibs.sh`
  1960.   echo "$ac_t""defining FLIBS to be $FLIBS" 1>&4
  1961.   DOT_C_FROM_DOT_F_CMD=
  1962.   DOT_O_FROM_DOT_F_PAT=
  1963. elif test -n "$F2C" || $use_f2c; then
  1964.   echo $ac_n "checking for -lf2c""... $ac_c" 1>&4
  1965. if eval "test \"`echo '${'ac_cv_lib_f2c'+set}'`\" = set"; then
  1966.   echo $ac_n "(cached) $ac_c" 1>&4
  1967. else
  1968.   ac_save_LIBS="$LIBS"
  1969. LIBS="$LIBS -lf2c "
  1970. cat > conftest.$ac_ext <<EOF
  1971. #line 1972 "configure"
  1972. #include "confdefs.h"
  1973.  
  1974. int main() { return 0; }
  1975. int t() {
  1976. main()
  1977. ; return 0; }
  1978. EOF
  1979. if eval $ac_link; then
  1980.   rm -rf conftest*
  1981.   eval "ac_cv_lib_f2c=yes"
  1982. else
  1983.   rm -rf conftest*
  1984.   eval "ac_cv_lib_f2c=no"
  1985. fi
  1986. rm -f conftest*
  1987. LIBS="$ac_save_LIBS"
  1988.  
  1989. fi
  1990. if eval "test \"`echo '$ac_cv_lib_'f2c`\" = yes"; then
  1991.   echo "$ac_t""yes" 1>&4
  1992.   FLIBS=-lf2c
  1993. else
  1994.   echo "$ac_t""no" 1>&4
  1995. fi
  1996.  
  1997.   if test -z "$FLIBS" ; then
  1998.     echo $ac_n "checking for -lF77""... $ac_c" 1>&4
  1999. if eval "test \"`echo '${'ac_cv_lib_F77'+set}'`\" = set"; then
  2000.   echo $ac_n "(cached) $ac_c" 1>&4
  2001. else
  2002.   ac_save_LIBS="$LIBS"
  2003. LIBS="$LIBS -lF77 "
  2004. cat > conftest.$ac_ext <<EOF
  2005. #line 2006 "configure"
  2006. #include "confdefs.h"
  2007.  
  2008. int main() { return 0; }
  2009. int t() {
  2010. main()
  2011. ; return 0; }
  2012. EOF
  2013. if eval $ac_link; then
  2014.   rm -rf conftest*
  2015.   eval "ac_cv_lib_F77=yes"
  2016. else
  2017.   rm -rf conftest*
  2018.   eval "ac_cv_lib_F77=no"
  2019. fi
  2020. rm -f conftest*
  2021. LIBS="$ac_save_LIBS"
  2022.  
  2023. fi
  2024. if eval "test \"`echo '$ac_cv_lib_'F77`\" = yes"; then
  2025.   echo "$ac_t""yes" 1>&4
  2026.   FLIBS=-lF77
  2027. else
  2028.   echo "$ac_t""no" 1>&4
  2029. fi
  2030.  
  2031.     if test -n "$FLIBS" ; then
  2032.       echo $ac_n "checking for -lI77""... $ac_c" 1>&4
  2033. if eval "test \"`echo '${'ac_cv_lib_I77'+set}'`\" = set"; then
  2034.   echo $ac_n "(cached) $ac_c" 1>&4
  2035. else
  2036.   ac_save_LIBS="$LIBS"
  2037. LIBS="$LIBS -lI77 "
  2038. cat > conftest.$ac_ext <<EOF
  2039. #line 2040 "configure"
  2040. #include "confdefs.h"
  2041.  
  2042. int main() { return 0; }
  2043. int t() {
  2044. main()
  2045. ; return 0; }
  2046. EOF
  2047. if eval $ac_link; then
  2048.   rm -rf conftest*
  2049.   eval "ac_cv_lib_I77=yes"
  2050. else
  2051.   rm -rf conftest*
  2052.   eval "ac_cv_lib_I77=no"
  2053. fi
  2054. rm -f conftest*
  2055. LIBS="$ac_save_LIBS"
  2056.  
  2057. fi
  2058. if eval "test \"`echo '$ac_cv_lib_'I77`\" = yes"; then
  2059.   echo "$ac_t""yes" 1>&4
  2060.   FLIBS="$FLIBS -lI77"
  2061. else
  2062.   echo "$ac_t""no" 1>&4
  2063. fi
  2064.  
  2065.     fi
  2066.   fi
  2067.   if test -z "$FLIBS" ; then
  2068.     echo "configure: warning: I found f2c but not libf2c.a, or libF77.a and libI77.a" 1>&2
  2069.   fi
  2070.   DOT_C_FROM_DOT_F_CMD='    cat $< | $(F2C) $(F2CFLAGS) > $(@F)'
  2071.   echo "$ac_t""defining DOT_C_FROM_DOT_F_CMD to be $DOT_C_FROM_DOT_F_CMD" 1>&4
  2072.   DOT_O_FROM_DOT_F_PAT='%.o : %.f'
  2073.   echo "$ac_t""defining DOT_O_FROM_DOT_F_PAT to be $DOT_O_FROM_DOT_F_PAT" 1>&4
  2074.   cat >> confdefs.h <<\EOF
  2075. #define F77_APPEND_UNDERSCORE 1
  2076. EOF
  2077.  
  2078. else
  2079.   echo "configure: warning: in order to build octave, you must have a compatible" 1>&2
  2080.   echo "configure: warning: Fortran compiler or f2c installed and in your path." 1>&2
  2081.   echo "configure: warning: See the file INSTALL for more information." 1>&2
  2082.   echo "configure: warning: Continuing anyway..." 1>&2
  2083. fi
  2084.  
  2085.  
  2086.  
  2087.  
  2088.  
  2089.  
  2090.  
  2091.  
  2092.  
  2093. ### Extract libraries and directories from FLIBS and CXXLIBS.
  2094. ###
  2095. ### Leave only libraries, with -lfoo converted to libfoo.a:
  2096.  
  2097. FLIB_LIST=`echo " $FLIBS " | sed -e 's/ -Xlinker *[^ ]*/ /g' \
  2098.     -e 's/ -L *[^ ]*/ /g' \
  2099.     -e 's/ -l *\([^ ]*\)/ lib\1.a/g' -e 's/ -u *[^ ]*/ /g' \
  2100.     -e 's/ [^ ]*\.o//g' \
  2101.     -e 's/^ *//' -e 's/ *$//' -e 's/  */:/g'`
  2102.  
  2103. CXXLIB_LIST=`echo " $CXXLIBS " | sed -e 's/ -Xlinker *[^ ]*/ /g' \
  2104.     -e 's/ -L *[^ ]*/ /g' \
  2105.     -e 's/ -l *\([^ ]*\)/ lib\1.a/g' -e 's/ -u *[^ ]*/ /g' \
  2106.     -e 's/ [^ ]*\.o//g' \
  2107.     -e 's/^ *//' -e 's/ *$//' -e 's/  */:/g'`
  2108.  
  2109. ### Leave only directories where libraries might be found:
  2110.  
  2111. FLIB_PATH=`echo " $FLIBS " | sed \
  2112.     -e 's/ /  /g' -e 's/ -Xlinker *[^ ]*/ /g' \
  2113.     -e 's/ -L *\([^ ]*\)/ \1/g' -e 's, /[^ ]*\.a , ,g' \
  2114.     -e 's/ -l *[^ ]*/ /g' -e 's/ -u *[^ ]*/ /g' \
  2115.     -e 's/ [^ ]*\.o//g' \
  2116.     -e 's/^ *//' -e 's/ *$//' -e 's/  */:/g'`
  2117.  
  2118. CXXLIB_PATH=`echo " $CXXLIBS " | sed -e 's/ -Xlinker *[^ ]*/ /g' \
  2119.     -e 's/ -L *\([^ ]*\)/ \1/g' -e 's, /[^ ]*\.a , ,g' \
  2120.     -e 's/ /  /g' -e 's/ -Xlinker *[^ ]*/ /g' \
  2121.     -e 's/ -l *[^ ]*/ /g' -e 's/ -u *[^ ]*/ /g' \
  2122.     -e 's/ [^ ]*\.o//g' \
  2123.     -e 's/^ *//' -e 's/ *$//' -e 's/  */:/g'`
  2124.  
  2125. echo "$ac_t""defining FLIB_LIST to be $FLIB_LIST" 1>&4
  2126. echo "$ac_t""defining FLIB_PATH to be $FLIB_PATH" 1>&4
  2127.  
  2128. echo "$ac_t""defining CXXLIB_LIST to be $CXXLIB_LIST" 1>&4
  2129. echo "$ac_t""defining CXXLIB_PATH to be $CXXLIB_PATH" 1>&4
  2130.  
  2131.  
  2132.  
  2133.  
  2134.  
  2135.  
  2136.  
  2137. ### Checks for header files.
  2138.  
  2139. echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&4
  2140. if eval "test \"`echo '${'ac_cv_header_stdc'+set}'`\" = set"; then
  2141.   echo $ac_n "(cached) $ac_c" 1>&4
  2142. else
  2143.   cat > conftest.$ac_ext <<EOF
  2144. #line 2145 "configure"
  2145. #include "confdefs.h"
  2146. #include <stdlib.h>
  2147. #include <stdarg.h>
  2148. #include <string.h>
  2149. #include <float.h>
  2150. EOF
  2151. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2152. ac_err=`grep -v '^ *+' conftest.out`
  2153. if test -z "$ac_err"; then
  2154.   rm -rf conftest*
  2155.   ac_cv_header_stdc=yes
  2156. else
  2157.   echo "$ac_err" >&5
  2158.   rm -rf conftest*
  2159.   ac_cv_header_stdc=no
  2160. fi
  2161. rm -f conftest*
  2162.  
  2163. if test $ac_cv_header_stdc = yes; then
  2164.   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  2165. cat > conftest.$ac_ext <<EOF
  2166. #line 2167 "configure"
  2167. #include "confdefs.h"
  2168. #include <string.h>
  2169. EOF
  2170. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2171.   egrep "memchr" >/dev/null 2>&1; then
  2172.   :
  2173. else
  2174.   rm -rf conftest*
  2175.   ac_cv_header_stdc=no
  2176. fi
  2177. rm -f conftest*
  2178.  
  2179. fi
  2180.  
  2181. if test $ac_cv_header_stdc = yes; then
  2182.   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  2183. cat > conftest.$ac_ext <<EOF
  2184. #line 2185 "configure"
  2185. #include "confdefs.h"
  2186. #include <stdlib.h>
  2187. EOF
  2188. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2189.   egrep "free" >/dev/null 2>&1; then
  2190.   :
  2191. else
  2192.   rm -rf conftest*
  2193.   ac_cv_header_stdc=no
  2194. fi
  2195. rm -f conftest*
  2196.  
  2197. fi
  2198.  
  2199. if test $ac_cv_header_stdc = yes; then
  2200.   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  2201. if test "$cross_compiling" = yes; then
  2202.   ac_cv_header_stdc=no
  2203. else
  2204. cat > conftest.$ac_ext <<EOF
  2205. #line 2206 "configure"
  2206. #include "confdefs.h"
  2207. #include <ctype.h>
  2208. #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  2209. #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  2210. #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
  2211. int main () { int i; for (i = 0; i < 256; i++)
  2212. if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  2213. exit (0); }
  2214.  
  2215. EOF
  2216. eval $ac_link
  2217. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  2218.   :
  2219. else
  2220.   ac_cv_header_stdc=no
  2221. fi
  2222. fi
  2223. rm -fr conftest*
  2224. fi
  2225. fi
  2226. echo "$ac_t""$ac_cv_header_stdc" 1>&4
  2227. if test $ac_cv_header_stdc = yes; then
  2228.   cat >> confdefs.h <<\EOF
  2229. #define STDC_HEADERS 1
  2230. EOF
  2231.  
  2232. fi
  2233.  
  2234. for ac_hdr in assert.h float.h limits.h memory.h pwd.h stdlib.h
  2235. do
  2236. ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
  2237. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&4
  2238. if eval "test \"`echo '${'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  2239.   echo $ac_n "(cached) $ac_c" 1>&4
  2240. else
  2241.   cat > conftest.$ac_ext <<EOF
  2242. #line 2243 "configure"
  2243. #include "confdefs.h"
  2244. #include <$ac_hdr>
  2245. EOF
  2246. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2247. ac_err=`grep -v '^ *+' conftest.out`
  2248. if test -z "$ac_err"; then
  2249.   rm -rf conftest*
  2250.   eval "ac_cv_header_$ac_safe=yes"
  2251. else
  2252.   echo "$ac_err" >&5
  2253.   rm -rf conftest*
  2254.   eval "ac_cv_header_$ac_safe=no"
  2255. fi
  2256. rm -f conftest*
  2257. fi
  2258. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2259.   echo "$ac_t""yes" 1>&4
  2260.     ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'`
  2261.   cat >> confdefs.h <<EOF
  2262. #define $ac_tr_hdr 1
  2263. EOF
  2264.  
  2265. else
  2266.   echo "$ac_t""no" 1>&4
  2267. fi
  2268. done
  2269.  
  2270. for ac_hdr in string.h varargs.h unistd.h floatingpoint.h
  2271. do
  2272. ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
  2273. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&4
  2274. if eval "test \"`echo '${'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  2275.   echo $ac_n "(cached) $ac_c" 1>&4
  2276. else
  2277.   cat > conftest.$ac_ext <<EOF
  2278. #line 2279 "configure"
  2279. #include "confdefs.h"
  2280. #include <$ac_hdr>
  2281. EOF
  2282. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2283. ac_err=`grep -v '^ *+' conftest.out`
  2284. if test -z "$ac_err"; then
  2285.   rm -rf conftest*
  2286.   eval "ac_cv_header_$ac_safe=yes"
  2287. else
  2288.   echo "$ac_err" >&5
  2289.   rm -rf conftest*
  2290.   eval "ac_cv_header_$ac_safe=no"
  2291. fi
  2292. rm -f conftest*
  2293. fi
  2294. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2295.   echo "$ac_t""yes" 1>&4
  2296.     ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'`
  2297.   cat >> confdefs.h <<EOF
  2298. #define $ac_tr_hdr 1
  2299. EOF
  2300.  
  2301. else
  2302.   echo "$ac_t""no" 1>&4
  2303. fi
  2304. done
  2305.  
  2306. for ac_hdr in sys/utsname.h sys/time.h sys/fcntl.h
  2307. do
  2308. ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
  2309. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&4
  2310. if eval "test \"`echo '${'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  2311.   echo $ac_n "(cached) $ac_c" 1>&4
  2312. else
  2313.   cat > conftest.$ac_ext <<EOF
  2314. #line 2315 "configure"
  2315. #include "confdefs.h"
  2316. #include <$ac_hdr>
  2317. EOF
  2318. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2319. ac_err=`grep -v '^ *+' conftest.out`
  2320. if test -z "$ac_err"; then
  2321.   rm -rf conftest*
  2322.   eval "ac_cv_header_$ac_safe=yes"
  2323. else
  2324.   echo "$ac_err" >&5
  2325.   rm -rf conftest*
  2326.   eval "ac_cv_header_$ac_safe=no"
  2327. fi
  2328. rm -f conftest*
  2329. fi
  2330. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2331.   echo "$ac_t""yes" 1>&4
  2332.     ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'`
  2333.   cat >> confdefs.h <<EOF
  2334. #define $ac_tr_hdr 1
  2335. EOF
  2336.  
  2337. else
  2338.   echo "$ac_t""no" 1>&4
  2339. fi
  2340. done
  2341.  
  2342. for ac_hdr in sys/ttold.h sys/ptem.h sys/select.h sys/resource.h
  2343. do
  2344. ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
  2345. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&4
  2346. if eval "test \"`echo '${'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  2347.   echo $ac_n "(cached) $ac_c" 1>&4
  2348. else
  2349.   cat > conftest.$ac_ext <<EOF
  2350. #line 2351 "configure"
  2351. #include "confdefs.h"
  2352. #include <$ac_hdr>
  2353. EOF
  2354. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2355. ac_err=`grep -v '^ *+' conftest.out`
  2356. if test -z "$ac_err"; then
  2357.   rm -rf conftest*
  2358.   eval "ac_cv_header_$ac_safe=yes"
  2359. else
  2360.   echo "$ac_err" >&5
  2361.   rm -rf conftest*
  2362.   eval "ac_cv_header_$ac_safe=no"
  2363. fi
  2364. rm -f conftest*
  2365. fi
  2366. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2367.   echo "$ac_t""yes" 1>&4
  2368.     ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'`
  2369.   cat >> confdefs.h <<EOF
  2370. #define $ac_tr_hdr 1
  2371. EOF
  2372.  
  2373. else
  2374.   echo "$ac_t""no" 1>&4
  2375. fi
  2376. done
  2377.  
  2378. ac_header_dirent=no
  2379. for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
  2380. do
  2381. ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
  2382. echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&4
  2383. if eval "test \"`echo '${'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
  2384.   echo $ac_n "(cached) $ac_c" 1>&4
  2385. else
  2386.   cat > conftest.$ac_ext <<EOF
  2387. #line 2388 "configure"
  2388. #include "confdefs.h"
  2389. #include <sys/types.h>
  2390. #include <$ac_hdr>
  2391. int main() { return 0; }
  2392. int t() {
  2393. DIR *dirp = 0;
  2394. ; return 0; }
  2395. EOF
  2396. if eval $ac_compile; then
  2397.   rm -rf conftest*
  2398.   eval "ac_cv_header_dirent_$ac_safe=yes"
  2399. else
  2400.   rm -rf conftest*
  2401.   eval "ac_cv_header_dirent_$ac_safe=no"
  2402. fi
  2403. rm -f conftest*
  2404.  
  2405. fi
  2406. if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
  2407.   echo "$ac_t""yes" 1>&4
  2408.     ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'`
  2409.   cat >> confdefs.h <<EOF
  2410. #define $ac_tr_hdr 1
  2411. EOF
  2412.  ac_header_dirent=$ac_hdr; break
  2413. else
  2414.   echo "$ac_t""no" 1>&4
  2415. fi
  2416. done
  2417. # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
  2418. if test $ac_header_dirent = dirent.h; then
  2419. echo $ac_n "checking for -ldir""... $ac_c" 1>&4
  2420. if eval "test \"`echo '${'ac_cv_lib_dir'+set}'`\" = set"; then
  2421.   echo $ac_n "(cached) $ac_c" 1>&4
  2422. else
  2423.   ac_save_LIBS="$LIBS"
  2424. LIBS="$LIBS -ldir "
  2425. cat > conftest.$ac_ext <<EOF
  2426. #line 2427 "configure"
  2427. #include "confdefs.h"
  2428.  
  2429. int main() { return 0; }
  2430. int t() {
  2431. opendir()
  2432. ; return 0; }
  2433. EOF
  2434. if eval $ac_link; then
  2435.   rm -rf conftest*
  2436.   eval "ac_cv_lib_dir=yes"
  2437. else
  2438.   rm -rf conftest*
  2439.   eval "ac_cv_lib_dir=no"
  2440. fi
  2441. rm -f conftest*
  2442. LIBS="$ac_save_LIBS"
  2443.  
  2444. fi
  2445. if eval "test \"`echo '$ac_cv_lib_'dir`\" = yes"; then
  2446.   echo "$ac_t""yes" 1>&4
  2447.   LIBS="$LIBS -ldir"
  2448. else
  2449.   echo "$ac_t""no" 1>&4
  2450. fi
  2451.  
  2452. else
  2453. echo $ac_n "checking for -lx""... $ac_c" 1>&4
  2454. if eval "test \"`echo '${'ac_cv_lib_x'+set}'`\" = set"; then
  2455.   echo $ac_n "(cached) $ac_c" 1>&4
  2456. else
  2457.   ac_save_LIBS="$LIBS"
  2458. LIBS="$LIBS -lx "
  2459. cat > conftest.$ac_ext <<EOF
  2460. #line 2461 "configure"
  2461. #include "confdefs.h"
  2462.  
  2463. int main() { return 0; }
  2464. int t() {
  2465. opendir()
  2466. ; return 0; }
  2467. EOF
  2468. if eval $ac_link; then
  2469.   rm -rf conftest*
  2470.   eval "ac_cv_lib_x=yes"
  2471. else
  2472.   rm -rf conftest*
  2473.   eval "ac_cv_lib_x=no"
  2474. fi
  2475. rm -f conftest*
  2476. LIBS="$ac_save_LIBS"
  2477.  
  2478. fi
  2479. if eval "test \"`echo '$ac_cv_lib_'x`\" = yes"; then
  2480.   echo "$ac_t""yes" 1>&4
  2481.   LIBS="$LIBS -lx"
  2482. else
  2483.   echo "$ac_t""no" 1>&4
  2484. fi
  2485.  
  2486. fi
  2487.  
  2488. echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&4
  2489. if eval "test \"`echo '${'ac_cv_header_time'+set}'`\" = set"; then
  2490.   echo $ac_n "(cached) $ac_c" 1>&4
  2491. else
  2492.   cat > conftest.$ac_ext <<EOF
  2493. #line 2494 "configure"
  2494. #include "confdefs.h"
  2495. #include <sys/types.h>
  2496. #include <sys/time.h>
  2497. #include <time.h>
  2498. int main() { return 0; }
  2499. int t() {
  2500. struct tm *tp;
  2501. ; return 0; }
  2502. EOF
  2503. if eval $ac_compile; then
  2504.   rm -rf conftest*
  2505.   ac_cv_header_time=yes
  2506. else
  2507.   rm -rf conftest*
  2508.   ac_cv_header_time=no
  2509. fi
  2510. rm -f conftest*
  2511.  
  2512. fi
  2513. echo "$ac_t""$ac_cv_header_time" 1>&4
  2514. if test $ac_cv_header_time = yes; then
  2515.   cat >> confdefs.h <<\EOF
  2516. #define TIME_WITH_SYS_TIME 1
  2517. EOF
  2518.  
  2519. fi
  2520.  
  2521.  
  2522. ### Use sgtty on Ultrix so that using DEC Migrate to convert a Mips
  2523. ### binary to an Alpha binary will work.  Also on Alpha/OSF to avoid
  2524. ### a readline bug.
  2525.  
  2526. case "$canonical_host_type" in
  2527.   mips-dec-ultrix* | alpha-dec-osf*)
  2528.     ac_safe=`echo "sgtty.h" | tr './\055' '___'`
  2529. echo $ac_n "checking for sgtty.h""... $ac_c" 1>&4
  2530. if eval "test \"`echo '${'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  2531.   echo $ac_n "(cached) $ac_c" 1>&4
  2532. else
  2533.   cat > conftest.$ac_ext <<EOF
  2534. #line 2535 "configure"
  2535. #include "confdefs.h"
  2536. #include <sgtty.h>
  2537. EOF
  2538. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2539. ac_err=`grep -v '^ *+' conftest.out`
  2540. if test -z "$ac_err"; then
  2541.   rm -rf conftest*
  2542.   eval "ac_cv_header_$ac_safe=yes"
  2543. else
  2544.   echo "$ac_err" >&5
  2545.   rm -rf conftest*
  2546.   eval "ac_cv_header_$ac_safe=no"
  2547. fi
  2548. rm -f conftest*
  2549. fi
  2550. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2551.   echo "$ac_t""yes" 1>&4
  2552.   cat >> confdefs.h <<\EOF
  2553. #define HAVE_SGTTY_H 1
  2554. EOF
  2555.  
  2556. else
  2557.   echo "$ac_t""no" 1>&4
  2558. fi
  2559.  
  2560.  
  2561.     if test "$ac_cv_header_sgtty_h" = no; then
  2562.       for ac_hdr in termios.h termio.h sgtty.h
  2563. do
  2564. ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
  2565. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&4
  2566. if eval "test \"`echo '${'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  2567.   echo $ac_n "(cached) $ac_c" 1>&4
  2568. else
  2569.   cat > conftest.$ac_ext <<EOF
  2570. #line 2571 "configure"
  2571. #include "confdefs.h"
  2572. #include <$ac_hdr>
  2573. EOF
  2574. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2575. ac_err=`grep -v '^ *+' conftest.out`
  2576. if test -z "$ac_err"; then
  2577.   rm -rf conftest*
  2578.   eval "ac_cv_header_$ac_safe=yes"
  2579. else
  2580.   echo "$ac_err" >&5
  2581.   rm -rf conftest*
  2582.   eval "ac_cv_header_$ac_safe=no"
  2583. fi
  2584. rm -f conftest*
  2585. fi
  2586. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2587.   echo "$ac_t""yes" 1>&4
  2588.     ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'`
  2589.   cat >> confdefs.h <<EOF
  2590. #define $ac_tr_hdr 1
  2591. EOF
  2592.  break
  2593. else
  2594.   echo "$ac_t""no" 1>&4
  2595. fi
  2596. done
  2597.  
  2598.     fi
  2599.   ;;
  2600.   *)
  2601.     for ac_hdr in termios.h termio.h sgtty.h
  2602. do
  2603. ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
  2604. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&4
  2605. if eval "test \"`echo '${'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  2606.   echo $ac_n "(cached) $ac_c" 1>&4
  2607. else
  2608.   cat > conftest.$ac_ext <<EOF
  2609. #line 2610 "configure"
  2610. #include "confdefs.h"
  2611. #include <$ac_hdr>
  2612. EOF
  2613. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2614. ac_err=`grep -v '^ *+' conftest.out`
  2615. if test -z "$ac_err"; then
  2616.   rm -rf conftest*
  2617.   eval "ac_cv_header_$ac_safe=yes"
  2618. else
  2619.   echo "$ac_err" >&5
  2620.   rm -rf conftest*
  2621.   eval "ac_cv_header_$ac_safe=no"
  2622. fi
  2623. rm -f conftest*
  2624. fi
  2625. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2626.   echo "$ac_t""yes" 1>&4
  2627.     ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'`
  2628.   cat >> confdefs.h <<EOF
  2629. #define $ac_tr_hdr 1
  2630. EOF
  2631.  break
  2632. else
  2633.   echo "$ac_t""no" 1>&4
  2634. fi
  2635. done
  2636.  
  2637.   ;;
  2638. esac
  2639.  
  2640. if test "$ac_cv_header_termios_h" = yes \
  2641.     || test "$ac_cv_header_termio_h" = yes \
  2642.     || test "$ac_cv_header_sgtty_h" = yes; then
  2643.   true
  2644. else
  2645.   { echo "configure: error: I couldn't find termios.h, termio.h, or sgtty.h!" 1>&2; exit 1; }
  2646. fi
  2647.  
  2648. ### Checks for functions.
  2649.  
  2650. for ac_func in setvbuf getcwd gethostname bzero bcopy rindex vfprintf vsprintf
  2651. do
  2652. echo $ac_n "checking for $ac_func""... $ac_c" 1>&4
  2653. if eval "test \"`echo '${'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2654.   echo $ac_n "(cached) $ac_c" 1>&4
  2655. else
  2656.   cat > conftest.$ac_ext <<EOF
  2657. #line 2658 "configure"
  2658. #include "confdefs.h"
  2659. #include <ctype.h> /* Arbitrary system header to define __stub macros. */
  2660. /* Override any gcc2 internal prototype to avoid an error.  */
  2661. char $ac_func(); 
  2662.  
  2663. int main() { return 0; }
  2664. int t() {
  2665.  
  2666. /* The GNU C library defines this for functions which it implements
  2667.     to always fail with ENOSYS.  Some functions are actually named
  2668.     something starting with __ and the normal name is an alias.  */
  2669. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2670. choke me
  2671. #else
  2672. $ac_func();
  2673. #endif
  2674.  
  2675. ; return 0; }
  2676. EOF
  2677. if eval $ac_link; then
  2678.   rm -rf conftest*
  2679.   eval "ac_cv_func_$ac_func=yes"
  2680. else
  2681.   rm -rf conftest*
  2682.   eval "ac_cv_func_$ac_func=no"
  2683. fi
  2684. rm -f conftest*
  2685.  
  2686. fi
  2687. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2688.   echo "$ac_t""yes" 1>&4
  2689.     ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
  2690.   cat >> confdefs.h <<EOF
  2691. #define $ac_tr_func 1
  2692. EOF
  2693.  
  2694. else
  2695.   echo "$ac_t""no" 1>&4
  2696. fi
  2697. done
  2698.  
  2699. for ac_func in stricmp strnicmp strcasecmp strncasecmp strerror atexit
  2700. do
  2701. echo $ac_n "checking for $ac_func""... $ac_c" 1>&4
  2702. if eval "test \"`echo '${'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2703.   echo $ac_n "(cached) $ac_c" 1>&4
  2704. else
  2705.   cat > conftest.$ac_ext <<EOF
  2706. #line 2707 "configure"
  2707. #include "confdefs.h"
  2708. #include <ctype.h> /* Arbitrary system header to define __stub macros. */
  2709. /* Override any gcc2 internal prototype to avoid an error.  */
  2710. char $ac_func(); 
  2711.  
  2712. int main() { return 0; }
  2713. int t() {
  2714.  
  2715. /* The GNU C library defines this for functions which it implements
  2716.     to always fail with ENOSYS.  Some functions are actually named
  2717.     something starting with __ and the normal name is an alias.  */
  2718. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2719. choke me
  2720. #else
  2721. $ac_func();
  2722. #endif
  2723.  
  2724. ; return 0; }
  2725. EOF
  2726. if eval $ac_link; then
  2727.   rm -rf conftest*
  2728.   eval "ac_cv_func_$ac_func=yes"
  2729. else
  2730.   rm -rf conftest*
  2731.   eval "ac_cv_func_$ac_func=no"
  2732. fi
  2733. rm -f conftest*
  2734.  
  2735. fi
  2736. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2737.   echo "$ac_t""yes" 1>&4
  2738.     ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
  2739.   cat >> confdefs.h <<EOF
  2740. #define $ac_tr_func 1
  2741. EOF
  2742.  
  2743. else
  2744.   echo "$ac_t""no" 1>&4
  2745. fi
  2746. done
  2747.  
  2748. for ac_func in on_exit tempnam memmove putenv gettimeofday getrusage
  2749. do
  2750. echo $ac_n "checking for $ac_func""... $ac_c" 1>&4
  2751. if eval "test \"`echo '${'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2752.   echo $ac_n "(cached) $ac_c" 1>&4
  2753. else
  2754.   cat > conftest.$ac_ext <<EOF
  2755. #line 2756 "configure"
  2756. #include "confdefs.h"
  2757. #include <ctype.h> /* Arbitrary system header to define __stub macros. */
  2758. /* Override any gcc2 internal prototype to avoid an error.  */
  2759. char $ac_func(); 
  2760.  
  2761. int main() { return 0; }
  2762. int t() {
  2763.  
  2764. /* The GNU C library defines this for functions which it implements
  2765.     to always fail with ENOSYS.  Some functions are actually named
  2766.     something starting with __ and the normal name is an alias.  */
  2767. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2768. choke me
  2769. #else
  2770. $ac_func();
  2771. #endif
  2772.  
  2773. ; return 0; }
  2774. EOF
  2775. if eval $ac_link; then
  2776.   rm -rf conftest*
  2777.   eval "ac_cv_func_$ac_func=yes"
  2778. else
  2779.   rm -rf conftest*
  2780.   eval "ac_cv_func_$ac_func=no"
  2781. fi
  2782. rm -f conftest*
  2783.  
  2784. fi
  2785. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2786.   echo "$ac_t""yes" 1>&4
  2787.     ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
  2788.   cat >> confdefs.h <<EOF
  2789. #define $ac_tr_func 1
  2790. EOF
  2791.  
  2792. else
  2793.   echo "$ac_t""no" 1>&4
  2794. fi
  2795. done
  2796.  
  2797.  
  2798.  
  2799. ### Check to see if we have IEEE math functions, and if so, which ones.
  2800. ###
  2801. ### For Linux: add -mieee-fp flag to CFLAGS when checking for IEEE FP
  2802. ### functions, otherwise we may not find them.
  2803. ###
  2804. ### Also check for some additional trig functions that aren't ANSI but
  2805. ### are often available.  If they are missing, we try to replace them
  2806. ### with functions from the BSD/NET2 math library.
  2807.  
  2808. echo $ac_n "checking for -lsunmath""... $ac_c" 1>&4
  2809. if eval "test \"`echo '${'ac_cv_lib_sunmath'+set}'`\" = set"; then
  2810.   echo $ac_n "(cached) $ac_c" 1>&4
  2811. else
  2812.   ac_save_LIBS="$LIBS"
  2813. LIBS="$LIBS -lsunmath "
  2814. cat > conftest.$ac_ext <<EOF
  2815. #line 2816 "configure"
  2816. #include "confdefs.h"
  2817.  
  2818. int main() { return 0; }
  2819. int t() {
  2820. main()
  2821. ; return 0; }
  2822. EOF
  2823. if eval $ac_link; then
  2824.   rm -rf conftest*
  2825.   eval "ac_cv_lib_sunmath=yes"
  2826. else
  2827.   rm -rf conftest*
  2828.   eval "ac_cv_lib_sunmath=no"
  2829. fi
  2830. rm -f conftest*
  2831. LIBS="$ac_save_LIBS"
  2832.  
  2833. fi
  2834. if eval "test \"`echo '$ac_cv_lib_'sunmath`\" = yes"; then
  2835.   echo "$ac_t""yes" 1>&4
  2836.     ac_tr_lib=HAVE_LIB`echo sunmath | tr '[a-z]' '[A-Z]'`
  2837.   cat >> confdefs.h <<EOF
  2838. #define $ac_tr_lib 1
  2839. EOF
  2840.  
  2841.   LIBS="$LIBS -lsunmath"
  2842.  
  2843. else
  2844.   echo "$ac_t""no" 1>&4
  2845. fi
  2846.  
  2847.  
  2848.  
  2849. case "$canonical_host_type" in
  2850.   *-*-linux*)
  2851.     echo $ac_n "checking for -lm""... $ac_c" 1>&4
  2852. if eval "test \"`echo '${'ac_cv_lib_m'+set}'`\" = set"; then
  2853.   echo $ac_n "(cached) $ac_c" 1>&4
  2854. else
  2855.   ac_save_LIBS="$LIBS"
  2856. LIBS="$LIBS -lm -lc"
  2857. cat > conftest.$ac_ext <<EOF
  2858. #line 2859 "configure"
  2859. #include "confdefs.h"
  2860.  
  2861. int main() { return 0; }
  2862. int t() {
  2863. main()
  2864. ; return 0; }
  2865. EOF
  2866. if eval $ac_link; then
  2867.   rm -rf conftest*
  2868.   eval "ac_cv_lib_m=yes"
  2869. else
  2870.   rm -rf conftest*
  2871.   eval "ac_cv_lib_m=no"
  2872. fi
  2873. rm -f conftest*
  2874. LIBS="$ac_save_LIBS"
  2875.  
  2876. fi
  2877. if eval "test \"`echo '$ac_cv_lib_'m`\" = yes"; then
  2878.   echo "$ac_t""yes" 1>&4
  2879.     ac_tr_lib=HAVE_LIB`echo m | tr '[a-z]' '[A-Z]'`
  2880.   cat >> confdefs.h <<EOF
  2881. #define $ac_tr_lib 1
  2882. EOF
  2883.  
  2884.   LIBS="$LIBS -lm"
  2885.  
  2886. else
  2887.   echo "$ac_t""no" 1>&4
  2888. fi
  2889.  
  2890.   ;;
  2891.   *)
  2892.     echo $ac_n "checking for -lm""... $ac_c" 1>&4
  2893. if eval "test \"`echo '${'ac_cv_lib_m'+set}'`\" = set"; then
  2894.   echo $ac_n "(cached) $ac_c" 1>&4
  2895. else
  2896.   ac_save_LIBS="$LIBS"
  2897. LIBS="$LIBS -lm "
  2898. cat > conftest.$ac_ext <<EOF
  2899. #line 2900 "configure"
  2900. #include "confdefs.h"
  2901.  
  2902. int main() { return 0; }
  2903. int t() {
  2904. main()
  2905. ; return 0; }
  2906. EOF
  2907. if eval $ac_link; then
  2908.   rm -rf conftest*
  2909.   eval "ac_cv_lib_m=yes"
  2910. else
  2911.   rm -rf conftest*
  2912.   eval "ac_cv_lib_m=no"
  2913. fi
  2914. rm -f conftest*
  2915. LIBS="$ac_save_LIBS"
  2916.  
  2917. fi
  2918. if eval "test \"`echo '$ac_cv_lib_'m`\" = yes"; then
  2919.   echo "$ac_t""yes" 1>&4
  2920.     ac_tr_lib=HAVE_LIB`echo m | tr '[a-z]' '[A-Z]'`
  2921.   cat >> confdefs.h <<EOF
  2922. #define $ac_tr_lib 1
  2923. EOF
  2924.  
  2925.   LIBS="$LIBS -lm"
  2926.  
  2927. else
  2928.   echo "$ac_t""no" 1>&4
  2929. fi
  2930.  
  2931.   ;;
  2932. esac
  2933.  
  2934. XCFLAGS="$CFLAGS"
  2935. CFLAGS="$CFLAGS $GCC_IEEE_FP_FLAG"
  2936.  
  2937. ### Inf and NaN don't work with gcc on the Alpha yet.  I am also told
  2938. ### that they don't work on m68k HP sytems either.
  2939.  
  2940. case "$canonical_host_type" in
  2941.   alpha-dec-osf* | m68k-hp-hpux*)
  2942.   ;;
  2943.   *)
  2944.     for ac_func in finite isnan isinf infinity quiet_nan
  2945. do
  2946. echo $ac_n "checking for $ac_func""... $ac_c" 1>&4
  2947. if eval "test \"`echo '${'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2948.   echo $ac_n "(cached) $ac_c" 1>&4
  2949. else
  2950.   cat > conftest.$ac_ext <<EOF
  2951. #line 2952 "configure"
  2952. #include "confdefs.h"
  2953. #include <ctype.h> /* Arbitrary system header to define __stub macros. */
  2954. /* Override any gcc2 internal prototype to avoid an error.  */
  2955. char $ac_func(); 
  2956.  
  2957. int main() { return 0; }
  2958. int t() {
  2959.  
  2960. /* The GNU C library defines this for functions which it implements
  2961.     to always fail with ENOSYS.  Some functions are actually named
  2962.     something starting with __ and the normal name is an alias.  */
  2963. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2964. choke me
  2965. #else
  2966. $ac_func();
  2967. #endif
  2968.  
  2969. ; return 0; }
  2970. EOF
  2971. if eval $ac_link; then
  2972.   rm -rf conftest*
  2973.   eval "ac_cv_func_$ac_func=yes"
  2974. else
  2975.   rm -rf conftest*
  2976.   eval "ac_cv_func_$ac_func=no"
  2977. fi
  2978. rm -f conftest*
  2979.  
  2980. fi
  2981. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2982.   echo "$ac_t""yes" 1>&4
  2983.     ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
  2984.   cat >> confdefs.h <<EOF
  2985. #define $ac_tr_func 1
  2986. EOF
  2987.  
  2988. else
  2989.   echo "$ac_t""no" 1>&4
  2990. fi
  2991. done
  2992.  
  2993.   ;;
  2994. esac
  2995.  
  2996. ### Check for nonstandard but common math functions that we need.
  2997.  
  2998. for ac_func in acosh asinh atanh erf erfc lgamma
  2999. do
  3000. echo $ac_n "checking for $ac_func""... $ac_c" 1>&4
  3001. if eval "test \"`echo '${'ac_cv_func_$ac_func'+set}'`\" = set"; then
  3002.   echo $ac_n "(cached) $ac_c" 1>&4
  3003. else
  3004.   cat > conftest.$ac_ext <<EOF
  3005. #line 3006 "configure"
  3006. #include "confdefs.h"
  3007. #include <ctype.h> /* Arbitrary system header to define __stub macros. */
  3008. /* Override any gcc2 internal prototype to avoid an error.  */
  3009. char $ac_func(); 
  3010.  
  3011. int main() { return 0; }
  3012. int t() {
  3013.  
  3014. /* The GNU C library defines this for functions which it implements
  3015.     to always fail with ENOSYS.  Some functions are actually named
  3016.     something starting with __ and the normal name is an alias.  */
  3017. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  3018. choke me
  3019. #else
  3020. $ac_func();
  3021. #endif
  3022.  
  3023. ; return 0; }
  3024. EOF
  3025. if eval $ac_link; then
  3026.   rm -rf conftest*
  3027.   eval "ac_cv_func_$ac_func=yes"
  3028. else
  3029.   rm -rf conftest*
  3030.   eval "ac_cv_func_$ac_func=no"
  3031. fi
  3032. rm -f conftest*
  3033.  
  3034. fi
  3035. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  3036.   echo "$ac_t""yes" 1>&4
  3037.     ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
  3038.   cat >> confdefs.h <<EOF
  3039. #define $ac_tr_func 1
  3040. EOF
  3041.  
  3042. else
  3043.   echo "$ac_t""no" 1>&4
  3044. fi
  3045. done
  3046.  
  3047.  
  3048. echo $ac_n "checking for signgam declaration in math.h""... $ac_c" 1>&4
  3049. cat > conftest.$ac_ext <<EOF
  3050. #line 3051 "configure"
  3051. #include "confdefs.h"
  3052. #include <math.h>
  3053. int main() { return 0; }
  3054. int t() {
  3055. int foo = signgam + 1;
  3056. ; return 0; }
  3057. EOF
  3058. if eval $ac_link; then
  3059.   rm -rf conftest*
  3060.   echo "$ac_t""yes" 1>&4
  3061.   cat >> confdefs.h <<\EOF
  3062. #define SIGNGAM_DECLARED 1
  3063. EOF
  3064.  
  3065. else
  3066.   rm -rf conftest*
  3067.   echo "$ac_t""no" 1>&4
  3068. fi
  3069. rm -f conftest*
  3070.  
  3071.  
  3072. CFLAGS="$XCFLAGS"
  3073.  
  3074. ### Checks for OS specific cruft.
  3075.  
  3076. echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&4
  3077. if eval "test \"`echo '${'ac_cv_struct_tm'+set}'`\" = set"; then
  3078.   echo $ac_n "(cached) $ac_c" 1>&4
  3079. else
  3080.   cat > conftest.$ac_ext <<EOF
  3081. #line 3082 "configure"
  3082. #include "confdefs.h"
  3083. #include <sys/types.h>
  3084. #include <time.h>
  3085. int main() { return 0; }
  3086. int t() {
  3087. struct tm *tp; tp->tm_sec;
  3088. ; return 0; }
  3089. EOF
  3090. if eval $ac_compile; then
  3091.   rm -rf conftest*
  3092.   ac_cv_struct_tm=time.h
  3093. else
  3094.   rm -rf conftest*
  3095.   ac_cv_struct_tm=sys/time.h
  3096. fi
  3097. rm -f conftest*
  3098.  
  3099. fi
  3100. echo "$ac_t""$ac_cv_struct_tm" 1>&4
  3101. if test $ac_cv_struct_tm = sys/time.h; then
  3102.   cat >> confdefs.h <<\EOF
  3103. #define TM_IN_SYS_TIME 1
  3104. EOF
  3105.  
  3106. fi
  3107.  
  3108. echo $ac_n "checking whether setvbuf arguments are reversed""... $ac_c" 1>&4
  3109. if eval "test \"`echo '${'ac_cv_func_setvbuf_reversed'+set}'`\" = set"; then
  3110.   echo $ac_n "(cached) $ac_c" 1>&4
  3111. else
  3112.   if test "$cross_compiling" = yes; then
  3113.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  3114. else
  3115. cat > conftest.$ac_ext <<EOF
  3116. #line 3117 "configure"
  3117. #include "confdefs.h"
  3118. #include <stdio.h>
  3119. /* If setvbuf has the reversed format, exit 0. */
  3120. main () {
  3121.   /* This call has the arguments reversed.
  3122.      A reversed system may check and see that the address of main
  3123.      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
  3124.   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
  3125.     exit(1);
  3126.   putc('\r', stdout);
  3127.   exit(0);            /* Non-reversed systems segv here.  */
  3128. }
  3129. EOF
  3130. eval $ac_link
  3131. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  3132.   ac_cv_func_setvbuf_reversed=yes
  3133. else
  3134.   ac_cv_func_setvbuf_reversed=no
  3135. fi
  3136. fi
  3137. rm -fr conftest*
  3138. rm -f core
  3139. fi
  3140. echo "$ac_t""$ac_cv_func_setvbuf_reversed" 1>&4
  3141. if test $ac_cv_func_setvbuf_reversed = yes; then
  3142.   cat >> confdefs.h <<\EOF
  3143. #define SETVBUF_REVERSED 1
  3144. EOF
  3145.  
  3146. fi
  3147.  
  3148. TERMLIBS=""
  3149. for termlib in termcap terminfo curses termlib ; do
  3150.   echo $ac_n "checking for -l${termlib}""... $ac_c" 1>&4
  3151. if eval "test \"`echo '${'ac_cv_lib_${termlib}'+set}'`\" = set"; then
  3152.   echo $ac_n "(cached) $ac_c" 1>&4
  3153. else
  3154.   ac_save_LIBS="$LIBS"
  3155. LIBS="$LIBS -l${termlib} "
  3156. cat > conftest.$ac_ext <<EOF
  3157. #line 3158 "configure"
  3158. #include "confdefs.h"
  3159.  
  3160. int main() { return 0; }
  3161. int t() {
  3162. main()
  3163. ; return 0; }
  3164. EOF
  3165. if eval $ac_link; then
  3166.   rm -rf conftest*
  3167.   eval "ac_cv_lib_${termlib}=yes"
  3168. else
  3169.   rm -rf conftest*
  3170.   eval "ac_cv_lib_${termlib}=no"
  3171. fi
  3172. rm -f conftest*
  3173. LIBS="$ac_save_LIBS"
  3174.  
  3175. fi
  3176. if eval "test \"`echo '$ac_cv_lib_'${termlib}`\" = yes"; then
  3177.   echo "$ac_t""yes" 1>&4
  3178.   TERMLIBS="${TERMLIBS} -l${termlib}"
  3179. else
  3180.   echo "$ac_t""no" 1>&4
  3181. fi
  3182.  
  3183.   case "${TERMLIBS}" in
  3184.     *-l${termlib}*)
  3185.       echo "$ac_t""defining TERMLIBS to be $TERMLIBS" 1>&4
  3186.       break
  3187.     ;;
  3188.   esac
  3189. done
  3190.  
  3191. echo $ac_n "checking for struct exception in math.h""... $ac_c" 1>&4
  3192. cat > conftest.$ac_ext <<EOF
  3193. #line 3194 "configure"
  3194. #include "confdefs.h"
  3195. #include <math.h>
  3196. int main() { return 0; }
  3197. int t() {
  3198. struct exception *x; x->type; x->name;
  3199. ; return 0; }
  3200. EOF
  3201. if eval $ac_link; then
  3202.   rm -rf conftest*
  3203.   echo "$ac_t""yes" 1>&4
  3204.   cat >> confdefs.h <<\EOF
  3205. #define EXCEPTION_IN_MATH 1
  3206. EOF
  3207.  
  3208. else
  3209.   rm -rf conftest*
  3210.   echo "$ac_t""no" 1>&4
  3211. fi
  3212. rm -f conftest*
  3213.  
  3214.  
  3215.  
  3216.  
  3217. ### Signal stuff.
  3218.  
  3219. echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&4
  3220. if eval "test \"`echo '${'ac_cv_type_signal'+set}'`\" = set"; then
  3221.   echo $ac_n "(cached) $ac_c" 1>&4
  3222. else
  3223.   cat > conftest.$ac_ext <<EOF
  3224. #line 3225 "configure"
  3225. #include "confdefs.h"
  3226. #include <sys/types.h>
  3227. #include <signal.h>
  3228. #ifdef signal
  3229. #undef signal
  3230. #endif
  3231. extern void (*signal ()) ();
  3232. int main() { return 0; }
  3233. int t() {
  3234. int i;
  3235. ; return 0; }
  3236. EOF
  3237. if eval $ac_compile; then
  3238.   rm -rf conftest*
  3239.   ac_cv_type_signal=void
  3240. else
  3241.   rm -rf conftest*
  3242.   ac_cv_type_signal=int
  3243. fi
  3244. rm -f conftest*
  3245.  
  3246. fi
  3247. echo "$ac_t""$ac_cv_type_signal" 1>&4
  3248. cat >> confdefs.h <<EOF
  3249. #define RETSIGTYPE $ac_cv_type_signal
  3250. EOF
  3251.  
  3252.  
  3253. echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&4
  3254. if eval "test \"`echo '${'ac_cv_decl_sys_siglist'+set}'`\" = set"; then
  3255.   echo $ac_n "(cached) $ac_c" 1>&4
  3256. else
  3257.   cat > conftest.$ac_ext <<EOF
  3258. #line 3259 "configure"
  3259. #include "confdefs.h"
  3260. #include <sys/types.h>
  3261. #include <signal.h>
  3262. /* NetBSD declares sys_siglist in unistd.h.  */
  3263. #ifdef HAVE_UNISTD_H
  3264. #include <unistd.h>
  3265. #endif
  3266. int main() { return 0; }
  3267. int t() {
  3268. char *msg = *(sys_siglist + 1);
  3269. ; return 0; }
  3270. EOF
  3271. if eval $ac_compile; then
  3272.   rm -rf conftest*
  3273.   ac_cv_decl_sys_siglist=yes
  3274. else
  3275.   rm -rf conftest*
  3276.   ac_cv_decl_sys_siglist=no
  3277. fi
  3278. rm -f conftest*
  3279.  
  3280. fi
  3281. echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&4
  3282. if test $ac_cv_decl_sys_siglist = yes; then
  3283.   cat >> confdefs.h <<\EOF
  3284. #define SYS_SIGLIST_DECLARED 1
  3285. EOF
  3286.  
  3287. fi
  3288.  
  3289. echo $ac_n "checking for sys_siglist variable""... $ac_c" 1>&4
  3290. cat > conftest.$ac_ext <<EOF
  3291. #line 3292 "configure"
  3292. #include "confdefs.h"
  3293. #include <stdio.h>
  3294. int main() { return 0; }
  3295. int t() {
  3296. extern char *sys_siglist[]; printf ("%s\n", sys_siglist[1]);
  3297. ; return 0; }
  3298. EOF
  3299. if eval $ac_link; then
  3300.   rm -rf conftest*
  3301.   echo "$ac_t""yes" 1>&4
  3302.   cat >> confdefs.h <<\EOF
  3303. #define HAVE_SYS_SIGLIST 1
  3304. EOF
  3305.  
  3306. else
  3307.   rm -rf conftest*
  3308.   echo "$ac_t""no" 1>&4
  3309. fi
  3310. rm -f conftest*
  3311.  
  3312.  
  3313. ### Define VOID_SIGHANDLER for readline.
  3314.  
  3315. case "$RETSIGTYPE" in
  3316.   int)
  3317.   ;;
  3318.   *)
  3319.     VOID_SIGHANDLER="-DVOID_SIGHANDLER=1"
  3320.     echo "$ac_t""defining VOID_SIGHANDLER to be 1" 1>&4
  3321.   ;;
  3322. esac
  3323.  
  3324.  
  3325. ### Checks for other programs used for building, testing, installing,
  3326. ### and running Octave.
  3327. ###
  3328. ### For now, don't define LEXLIB to be -lfl -- we don't use anything in
  3329. ### it, and it might not be installed.
  3330. ###
  3331. ### Also make sure that we generate an interactive scanner if we are
  3332. ### using flex.
  3333.  
  3334. # Extract the first word of "flex", so it can be a program name with args.
  3335. set dummy flex; ac_word=$2
  3336. echo $ac_n "checking for $ac_word""... $ac_c" 1>&4
  3337. if eval "test \"`echo '${'ac_cv_prog_LEX'+set}'`\" = set"; then
  3338.   echo $ac_n "(cached) $ac_c" 1>&4
  3339. else
  3340.   if test -n "$LEX"; then
  3341.   ac_cv_prog_LEX="$LEX" # Let the user override the test.
  3342. else
  3343.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  3344.   for ac_dir in $PATH; do
  3345.     test -z "$ac_dir" && ac_dir=.
  3346.     if test -f $ac_dir/$ac_word; then
  3347.       ac_cv_prog_LEX="flex"
  3348.       break
  3349.     fi
  3350.   done
  3351.   IFS="$ac_save_ifs"
  3352.   test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
  3353. fi
  3354. fi
  3355. LEX="$ac_cv_prog_LEX"
  3356. if test -n "$LEX"; then
  3357.   echo "$ac_t""$LEX" 1>&4
  3358. else
  3359.   echo "$ac_t""no" 1>&4
  3360. fi
  3361.  
  3362. if test -z "$LEXLIB"
  3363. then
  3364.   case "$LEX" in
  3365.   flex*) ac_lib=fl ;;
  3366.   *) ac_lib=l ;;
  3367.   esac
  3368.   echo $ac_n "checking for -l$ac_lib""... $ac_c" 1>&4
  3369. if eval "test \"`echo '${'ac_cv_lib_$ac_lib'+set}'`\" = set"; then
  3370.   echo $ac_n "(cached) $ac_c" 1>&4
  3371. else
  3372.   ac_save_LIBS="$LIBS"
  3373. LIBS="$LIBS -l$ac_lib "
  3374. cat > conftest.$ac_ext <<EOF
  3375. #line 3376 "configure"
  3376. #include "confdefs.h"
  3377.  
  3378. int main() { return 0; }
  3379. int t() {
  3380. main()
  3381. ; return 0; }
  3382. EOF
  3383. if eval $ac_link; then
  3384.   rm -rf conftest*
  3385.   eval "ac_cv_lib_$ac_lib=yes"
  3386. else
  3387.   rm -rf conftest*
  3388.   eval "ac_cv_lib_$ac_lib=no"
  3389. fi
  3390. rm -f conftest*
  3391. LIBS="$ac_save_LIBS"
  3392.  
  3393. fi
  3394. if eval "test \"`echo '$ac_cv_lib_'$ac_lib`\" = yes"; then
  3395.   echo "$ac_t""yes" 1>&4
  3396.   LEXLIB="-l$ac_lib"
  3397. else
  3398.   echo "$ac_t""no" 1>&4
  3399. fi
  3400.  
  3401. fi
  3402.  
  3403. case "$LEX" in
  3404.   flex*)
  3405.     LFLAGS="-t -I"
  3406.     echo "$ac_t""defining LFLAGS to be $LFLAGS" 1>&4
  3407.     LEXLIB=
  3408.   ;;
  3409.   *)
  3410.     LFLAGS="-t"
  3411.     echo "$ac_t""defining LFLAGS to be $LFLAGS" 1>&4
  3412.     echo "configure: warning: I didn't find flex, but that's only a problem" 1>&2
  3413.     echo "configure: warning: if you need to reconstruct lex.cc" 1>&2
  3414.   ;;
  3415. esac
  3416.  
  3417.  
  3418. for ac_prog in 'bison -y' byacc
  3419. do
  3420. # Extract the first word of "$ac_prog", so it can be a program name with args.
  3421. set dummy $ac_prog; ac_word=$2
  3422. echo $ac_n "checking for $ac_word""... $ac_c" 1>&4
  3423. if eval "test \"`echo '${'ac_cv_prog_YACC'+set}'`\" = set"; then
  3424.   echo $ac_n "(cached) $ac_c" 1>&4
  3425. else
  3426.   if test -n "$YACC"; then
  3427.   ac_cv_prog_YACC="$YACC" # Let the user override the test.
  3428. else
  3429.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  3430.   for ac_dir in $PATH; do
  3431.     test -z "$ac_dir" && ac_dir=.
  3432.     if test -f $ac_dir/$ac_word; then
  3433.       ac_cv_prog_YACC="$ac_prog"
  3434.       break
  3435.     fi
  3436.   done
  3437.   IFS="$ac_save_ifs"
  3438. fi
  3439. fi
  3440. YACC="$ac_cv_prog_YACC"
  3441. if test -n "$YACC"; then
  3442.   echo "$ac_t""$YACC" 1>&4
  3443. else
  3444.   echo "$ac_t""no" 1>&4
  3445. fi
  3446.  
  3447. test -n "$YACC" && break
  3448. done
  3449. test -n "$YACC" || YACC="yacc"
  3450.  
  3451. case "$YACC" in
  3452.   bison*)
  3453.   ;;
  3454.   *)
  3455.     echo "configure: warning: I didn't find bison, but that's only a problem" 1>&2
  3456.     echo "configure: warning: if you need to reconstruct parse.cc" 1>&2
  3457.   ;;
  3458. esac
  3459.  
  3460. # Extract the first word of "ranlib", so it can be a program name with args.
  3461. set dummy ranlib; ac_word=$2
  3462. echo $ac_n "checking for $ac_word""... $ac_c" 1>&4
  3463. if eval "test \"`echo '${'ac_cv_prog_RANLIB'+set}'`\" = set"; then
  3464.   echo $ac_n "(cached) $ac_c" 1>&4
  3465. else
  3466.   if test -n "$RANLIB"; then
  3467.   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
  3468. else
  3469.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  3470.   for ac_dir in $PATH; do
  3471.     test -z "$ac_dir" && ac_dir=.
  3472.     if test -f $ac_dir/$ac_word; then
  3473.       ac_cv_prog_RANLIB="ranlib"
  3474.       break
  3475.     fi
  3476.   done
  3477.   IFS="$ac_save_ifs"
  3478.   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
  3479. fi
  3480. fi
  3481. RANLIB="$ac_cv_prog_RANLIB"
  3482. if test -n "$RANLIB"; then
  3483.   echo "$ac_t""$RANLIB" 1>&4
  3484. else
  3485.   echo "$ac_t""no" 1>&4
  3486. fi
  3487.  
  3488.  
  3489. # Extract the first word of "runtest", so it can be a program name with args.
  3490. set dummy runtest; ac_word=$2
  3491. echo $ac_n "checking for $ac_word""... $ac_c" 1>&4
  3492. if eval "test \"`echo '${'ac_cv_prog_RUNTEST'+set}'`\" = set"; then
  3493.   echo $ac_n "(cached) $ac_c" 1>&4
  3494. else
  3495.   if test -n "$RUNTEST"; then
  3496.   ac_cv_prog_RUNTEST="$RUNTEST" # Let the user override the test.
  3497. else
  3498.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  3499.   for ac_dir in $PATH; do
  3500.     test -z "$ac_dir" && ac_dir=.
  3501.     if test -f $ac_dir/$ac_word; then
  3502.       ac_cv_prog_RUNTEST="runtest"
  3503.       break
  3504.     fi
  3505.   done
  3506.   IFS="$ac_save_ifs"
  3507. fi
  3508. fi
  3509. RUNTEST="$ac_cv_prog_RUNTEST"
  3510. if test -n "$RUNTEST"; then
  3511.   echo "$ac_t""$RUNTEST" 1>&4
  3512. else
  3513.   echo "$ac_t""no" 1>&4
  3514. fi
  3515.  
  3516. # Extract the first word of "expect", so it can be a program name with args.
  3517. set dummy expect; ac_word=$2
  3518. echo $ac_n "checking for $ac_word""... $ac_c" 1>&4
  3519. if eval "test \"`echo '${'ac_cv_prog_EXPECT'+set}'`\" = set"; then
  3520.   echo $ac_n "(cached) $ac_c" 1>&4
  3521. else
  3522.   if test -n "$EXPECT"; then
  3523.   ac_cv_prog_EXPECT="$EXPECT" # Let the user override the test.
  3524. else
  3525.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  3526.   for ac_dir in $PATH; do
  3527.     test -z "$ac_dir" && ac_dir=.
  3528.     if test -f $ac_dir/$ac_word; then
  3529.       ac_cv_prog_EXPECT="expect"
  3530.       break
  3531.     fi
  3532.   done
  3533.   IFS="$ac_save_ifs"
  3534. fi
  3535. fi
  3536. EXPECT="$ac_cv_prog_EXPECT"
  3537. if test -n "$EXPECT"; then
  3538.   echo "$ac_t""$EXPECT" 1>&4
  3539. else
  3540.   echo "$ac_t""no" 1>&4
  3541. fi
  3542.  
  3543. if test -z "$EXPECT" ; then
  3544.   RUNTEST=
  3545. fi
  3546.  
  3547.  
  3548. # Find a good install program.  We prefer a C program (faster),
  3549. # so one script is as good as another.  But avoid the broken or
  3550. # incompatible versions:
  3551. # SysV /etc/install, /usr/sbin/install
  3552. # SunOS /usr/etc/install
  3553. # IRIX /sbin/install
  3554. # AIX /bin/install
  3555. # AFS /usr/afsws/bin/install, which mishandles nonexistent args
  3556. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  3557. # ./install, which can be erroneously created by make from ./install.sh.
  3558. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&4
  3559. if test -z "$INSTALL"; then
  3560. if eval "test \"`echo '${'ac_cv_path_install'+set}'`\" = set"; then
  3561.   echo $ac_n "(cached) $ac_c" 1>&4
  3562. else
  3563.     IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  3564.   for ac_dir in $PATH; do
  3565.     case "$ac_dir" in
  3566.     ''|.|/etc|/usr/sbin|/usr/etc|/sbin|/usr/afsws/bin|/usr/ucb) ;;
  3567.     *)
  3568.       # OSF1 and SCO ODT 3.0 have their own names for install.
  3569.       for ac_prog in ginstall installbsd scoinst install; do
  3570.         if test -f $ac_dir/$ac_prog; then
  3571.       if test $ac_prog = install &&
  3572.             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
  3573.         # AIX install.  It has an incompatible calling convention.
  3574.         # OSF/1 installbsd also uses dspmsg, but is usable.
  3575.         :
  3576.       else
  3577.         ac_cv_path_install="$ac_dir/$ac_prog -c"
  3578.         break 2
  3579.       fi
  3580.     fi
  3581.       done
  3582.       ;;
  3583.     esac
  3584.   done
  3585.   IFS="$ac_save_ifs"
  3586.   # As a last resort, use the slow shell script.
  3587.   test -z "$ac_cv_path_install" && ac_cv_path_install="$ac_install_sh"
  3588. fi
  3589.   INSTALL="$ac_cv_path_install"
  3590. fi
  3591. echo "$ac_t""$INSTALL" 1>&4
  3592.  
  3593. # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
  3594. # It thinks the first close brace ends the variable substitution.
  3595. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  3596.  
  3597. test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  3598.  
  3599.  
  3600. # Extract the first word of "gnuplot", so it can be a program name with args.
  3601. set dummy gnuplot; ac_word=$2
  3602. echo $ac_n "checking for $ac_word""... $ac_c" 1>&4
  3603. if eval "test \"`echo '${'ac_cv_prog_GNUPLOT_BINARY'+set}'`\" = set"; then
  3604.   echo $ac_n "(cached) $ac_c" 1>&4
  3605. else
  3606.   if test -n "$GNUPLOT_BINARY"; then
  3607.   ac_cv_prog_GNUPLOT_BINARY="$GNUPLOT_BINARY" # Let the user override the test.
  3608. else
  3609.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  3610.   for ac_dir in $PATH; do
  3611.     test -z "$ac_dir" && ac_dir=.
  3612.     if test -f $ac_dir/$ac_word; then
  3613.       ac_cv_prog_GNUPLOT_BINARY="gnuplot"
  3614.       break
  3615.     fi
  3616.   done
  3617.   IFS="$ac_save_ifs"
  3618. fi
  3619. fi
  3620. GNUPLOT_BINARY="$ac_cv_prog_GNUPLOT_BINARY"
  3621. if test -n "$GNUPLOT_BINARY"; then
  3622.   echo "$ac_t""$GNUPLOT_BINARY" 1>&4
  3623. else
  3624.   echo "$ac_t""no" 1>&4
  3625. fi
  3626.  
  3627. if test -z "$GNUPLOT_BINARY"; then
  3628.   echo "configure: warning: I didn't find gnuplot.  It isn't necessary to have gnuplot" 1>&2
  3629.   echo "configure: warning: installed, but you won't be able to use any of Octave's" 1>&2
  3630.   echo "configure: warning: plotting commands without it." 1>&2
  3631.   echo "configure: warning: " 1>&2
  3632.   echo "configure: warning: If gnuplot is installed but it isn't in your path, you can" 1>&2
  3633.   echo "configure: warning: tell Octave where to find it by typing the command" 1>&2
  3634.   echo "configure: warning: " 1>&2
  3635.   echo "configure: warning: gnuplot_binary = "/full/path/to/gnuplot/binary"" 1>&2
  3636.   echo "configure: warning: " 1>&2
  3637.   echo "configure: warning: at the Octave prompt." 1>&2
  3638. fi
  3639.  
  3640. for ac_prog in less more page pg
  3641. do
  3642. # Extract the first word of "$ac_prog", so it can be a program name with args.
  3643. set dummy $ac_prog; ac_word=$2
  3644. echo $ac_n "checking for $ac_word""... $ac_c" 1>&4
  3645. if eval "test \"`echo '${'ac_cv_prog_DEFAULT_PAGER'+set}'`\" = set"; then
  3646.   echo $ac_n "(cached) $ac_c" 1>&4
  3647. else
  3648.   if test -n "$DEFAULT_PAGER"; then
  3649.   ac_cv_prog_DEFAULT_PAGER="$DEFAULT_PAGER" # Let the user override the test.
  3650. else
  3651.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  3652.   for ac_dir in $PATH; do
  3653.     test -z "$ac_dir" && ac_dir=.
  3654.     if test -f $ac_dir/$ac_word; then
  3655.       ac_cv_prog_DEFAULT_PAGER="$ac_prog"
  3656.       break
  3657.     fi
  3658.   done
  3659.   IFS="$ac_save_ifs"
  3660. fi
  3661. fi
  3662. DEFAULT_PAGER="$ac_cv_prog_DEFAULT_PAGER"
  3663. if test -n "$DEFAULT_PAGER"; then
  3664.   echo "$ac_t""$DEFAULT_PAGER" 1>&4
  3665. else
  3666.   echo "$ac_t""no" 1>&4
  3667. fi
  3668.  
  3669. test -n "$DEFAULT_PAGER" && break
  3670. done
  3671.  
  3672. if test -z "$DEFAULT_PAGER"; then
  3673.   echo "configure: warning: I couldn't find `less', `more', `page', or `pg'" 1>&2
  3674. elif test "$DEFAULT_PAGER" = less; then
  3675.   DEFAULT_PAGER="less -e"
  3676.   echo "$ac_t""defining DEFAULT_PAGER to be $DEFAULT_PAGER" 1>&4
  3677. fi
  3678.  
  3679. ### Even though we include config.h in most files, some need to be
  3680. ### compiled with the -D options on the compiler command line.  Use
  3681. ### UGLY_DEFS for that.
  3682.  
  3683. # Transform confdefs.h into DEFS.
  3684. # Protect against shell expansion while executing Makefile rules.
  3685. # Protect against Makefile macro expansion.
  3686. cat > conftest.defs <<\EOF
  3687. s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%-D\1=\2%g
  3688. s%[     `~#$^&*(){}\\|;'"<>?]%\\&%g
  3689. s%\[%\\&%g
  3690. s%\]%\\&%g
  3691. s%\$%$$%g
  3692. EOF
  3693. DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
  3694. rm -f conftest.defs
  3695.  
  3696. UGLY_DEFS="$DEFS"
  3697. echo "$ac_t""defining UGLY_DEFS to be $UGLY_DEFS" 1>&4
  3698.  
  3699.  
  3700. ### Maybe add -Wall to compiler flags now that we're done feature
  3701. ### testing. 
  3702. ###
  3703. ### To get gcc and g++ to be really picky, try these adding these
  3704. ### options to CFLAGS and CXXFLAGS along with -Wall:
  3705. ###
  3706. ###   -ansi
  3707. ###   -pedantic
  3708. ###   -Wwrite-strings
  3709. ###   -Wid-clash-31
  3710. ###   -Wpointer-arith
  3711. ###   -Wcast-qual
  3712. ###   -Wenum-clash
  3713. ###   -Wcast-align
  3714. ###   -Wtraditional
  3715. ###   -Wstrict-prototypes
  3716. ###   -Wmissing-prototypes
  3717. ###   -Wnested-externs
  3718. ###   -Woverloaded-virtual
  3719. ###   -Winline
  3720. ###   -felide-constructors
  3721. ###   -fnonnull-objects
  3722.  
  3723. if $ADD_CXX_WALL; then
  3724.   CXXFLAGS="$CXXFLAGS -Wall"
  3725.   echo "$ac_t""adding -Wall to CXXFLAGS" 1>&4
  3726. fi
  3727. if $ADD_CC_WALL; then
  3728.   CFLAGS="$CFLAGS -Wall"
  3729.   echo "$ac_t""adding -Wall to CFLAGS" 1>&4
  3730. fi
  3731.  
  3732. ### Do the substitutions in all the Makefiles.
  3733.  
  3734.  
  3735.  
  3736.  
  3737.  
  3738. trap '' 1 2 15
  3739. if test -w $cache_file; then
  3740. echo "updating cache $cache_file"
  3741. cat > $cache_file <<\EOF
  3742. # This file is a shell script that caches the results of configure
  3743. # tests run on this system so they can be shared between configure
  3744. # scripts and configure runs.  It is not useful on other systems.
  3745. # If it contains results you don't want to keep, you may remove or edit it.
  3746. #
  3747. # By default, configure uses ./config.cache as the cache file,
  3748. # creating it if it does not exist already.  You can give configure
  3749. # the --cache-file=FILE option to use a different cache file; that is
  3750. # what configure does when it calls configure scripts in
  3751. # subdirectories, so they share the cache.
  3752. # Giving --cache-file=/dev/null disables caching, for debugging configure.
  3753. # config.status only pays attention to the cache file if you give it the
  3754. # --recheck option to rerun configure.
  3755. #
  3756. EOF
  3757. # Ultrix sh set writes to stderr and can't be redirected directly.
  3758. (set) 2>&1 |
  3759.   sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/: \${\1='\2'}/p" \
  3760.   >> $cache_file
  3761. else
  3762. echo "not updating unwritable cache $cache_file"
  3763. fi
  3764.  
  3765. trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15
  3766.  
  3767. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  3768. # Let make expand exec_prefix.
  3769. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  3770.  
  3771. # Any assignment to VPATH causes Sun make to only execute
  3772. # the first set of double-colon rules, so remove it if not needed.
  3773. # If there is a colon in the path, we need to keep it.
  3774. if test "x$srcdir" = x.; then
  3775.   ac_vpsub='/^[     ]*VPATH[     ]*=[^:]*$/d'
  3776. fi
  3777.  
  3778. trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  3779.  
  3780. DEFS=-DHAVE_CONFIG_H
  3781.  
  3782. # Without the "./", some shells look in PATH for config.status.
  3783. : ${CONFIG_STATUS=./config.status}
  3784.  
  3785. echo creating $CONFIG_STATUS
  3786. rm -f $CONFIG_STATUS
  3787. cat > $CONFIG_STATUS <<EOF
  3788. #!/bin/sh
  3789. # Generated automatically by configure.
  3790. # Run this file to recreate the current configuration.
  3791. # This directory was configured as follows,
  3792. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  3793. #
  3794. # $0 $ac_configure_args
  3795. #
  3796. # Compiler output produced by configure, useful for debugging
  3797. # configure, is in ./config.log if it exists.
  3798.  
  3799. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  3800. for ac_option
  3801. do
  3802.   case "\$ac_option" in
  3803.   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  3804.     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  3805.     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  3806.   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  3807.     echo "$CONFIG_STATUS generated by autoconf version 2.1"
  3808.     exit 0 ;;
  3809.   -help | --help | --hel | --he | --h)
  3810.     echo "\$ac_cs_usage"; exit 0 ;;
  3811.   *) echo "\$ac_cs_usage"; exit 1 ;;
  3812.   esac
  3813. done
  3814.  
  3815. ac_given_srcdir=$srcdir
  3816. ac_given_INSTALL="$INSTALL"
  3817.  
  3818. trap 'rm -fr Makefile octMakefile Makeconf libcruft/Makefile libcruft/Makerules liboctave/Makefile src/Makefile dld/Makefile info/Makefile readline/Makefile readline/doc/Makefile readline/examples/Makefile doc/Makefile test/Makefile kpathsea/Makefile libcruft/blas/Makefile libcruft/balgen/Makefile libcruft/dassl/Makefile libcruft/eispack/Makefile libcruft/fftpack/Makefile libcruft/fsqp/Makefile libcruft/lapack/Makefile libcruft/linpack/Makefile libcruft/minpack/Makefile libcruft/misc/Makefile libcruft/npsol/Makefile libcruft/odepack/Makefile libcruft/qpsol/Makefile libcruft/quadpack/Makefile libcruft/ranlib/Makefile libcruft/slatec-fn/Makefile libcruft/villad/Makefile scripts/Makefile scripts/control/Makefile scripts/general/Makefile scripts/image/Makefile scripts/linear-algebra/Makefile scripts/miscellaneous/Makefile scripts/plot/Makefile scripts/polynomial/Makefile scripts/set/Makefile scripts/signal/Makefile scripts/special-matrix/Makefile scripts/startup/Makefile scripts/statistics/Makefile scripts/elfun/Makefile scripts/specfun/Makefile scripts/strings/Makefile config.h kpathsea/c-auto.h conftest*; exit 1' 1 2 15
  3819.  
  3820. # Protect against being on the right side of a sed subst in config.status. 
  3821. sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g; 
  3822.  s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
  3823. $ac_vpsub
  3824. $extrasub
  3825. s%@CFLAGS@%$CFLAGS%g
  3826. s%@CPPFLAGS@%$CPPFLAGS%g
  3827. s%@CXXFLAGS@%$CXXFLAGS%g
  3828. s%@DEFS@%$DEFS%g
  3829. s%@LDFLAGS@%$LDFLAGS%g
  3830. s%@LIBS@%$LIBS%g
  3831. s%@exec_prefix@%$exec_prefix%g
  3832. s%@prefix@%$prefix%g
  3833. s%@program_transform_name@%$program_transform_name%g
  3834. s%@host@%$host%g
  3835. s%@host_alias@%$host_alias%g
  3836. s%@host_cpu@%$host_cpu%g
  3837. s%@host_vendor@%$host_vendor%g
  3838. s%@host_os@%$host_os%g
  3839. s%@target_host_type@%$target_host_type%g
  3840. s%@use_dld@%$use_dld%g
  3841. s%@lite_kernel@%$lite_kernel%g
  3842. s%@bindir@%$bindir%g
  3843. s%@datadir@%$datadir%g
  3844. s%@libdir@%$libdir%g
  3845. s%@includedir@%$includedir%g
  3846. s%@mandir@%$mandir%g
  3847. s%@infodir@%$infodir%g
  3848. s%@fcnfiledir@%$fcnfiledir%g
  3849. s%@localfcnfiledir@%$localfcnfiledir%g
  3850. s%@localfcnfilepath@%$localfcnfilepath%g
  3851. s%@archlibdir@%$archlibdir%g
  3852. s%@octfiledir@%$octfiledir%g
  3853. s%@localoctfiledir@%$localoctfiledir%g
  3854. s%@localoctfilepath@%$localoctfilepath%g
  3855. s%@fcnfilepath@%$fcnfilepath%g
  3856. s%@imagedir@%$imagedir%g
  3857. s%@imagepath@%$imagepath%g
  3858. s%@DLD_DIR@%$DLD_DIR%g
  3859. s%@LIBDLD@%$LIBDLD%g
  3860. s%@LIBOCTDLD@%$LIBOCTDLD%g
  3861. s%@LD_STATIC_FLAG@%$LD_STATIC_FLAG%g
  3862. s%@CXX@%$CXX%g
  3863. s%@CXXCPP@%$CXXCPP%g
  3864. s%@HOST_CXXFLAGS@%$HOST_CXXFLAGS%g
  3865. s%@NO_IMPLICIT_TEMPLATES@%$NO_IMPLICIT_TEMPLATES%g
  3866. s%@CXXLIBS@%$CXXLIBS%g
  3867. s%@CC@%$CC%g
  3868. s%@CPP@%$CPP%g
  3869. s%@GCC_IEEE_FP_FLAG@%$GCC_IEEE_FP_FLAG%g
  3870. s%@ALLOCA@%$ALLOCA%g
  3871. s%@F77@%$F77%g
  3872. s%@F2C@%$F2C%g
  3873. s%@FFLAGS@%$FFLAGS%g
  3874. s%@FLIBS@%$FLIBS%g
  3875. s%@F2CFLAGS@%$F2CFLAGS%g
  3876. s%@DOT_C_FROM_DOT_F_CMD@%$DOT_C_FROM_DOT_F_CMD%g
  3877. s%@DOT_O_FROM_DOT_F_PAT@%$DOT_O_FROM_DOT_F_PAT%g
  3878. s%@FLIB_LIST@%$FLIB_LIST%g
  3879. s%@FLIB_PATH@%$FLIB_PATH%g
  3880. s%@CXXLIB_LIST@%$CXXLIB_LIST%g
  3881. s%@CXXLIB_PATH@%$CXXLIB_PATH%g
  3882. s%@TERMLIBS@%$TERMLIBS%g
  3883. s%@VOID_SIGHANDLER@%$VOID_SIGHANDLER%g
  3884. s%@LEX@%$LEX%g
  3885. s%@LEXLIB@%$LEXLIB%g
  3886. s%@LFLAGS@%$LFLAGS%g
  3887. s%@YACC@%$YACC%g
  3888. s%@RANLIB@%$RANLIB%g
  3889. s%@RUNTEST@%$RUNTEST%g
  3890. s%@EXPECT@%$EXPECT%g
  3891. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  3892. s%@INSTALL_DATA@%$INSTALL_DATA%g
  3893. s%@GNUPLOT_BINARY@%$GNUPLOT_BINARY%g
  3894. s%@DEFAULT_PAGER@%$DEFAULT_PAGER%g
  3895. s%@UGLY_DEFS@%$UGLY_DEFS%g
  3896.  
  3897. CEOF
  3898. EOF
  3899. cat >> $CONFIG_STATUS <<EOF
  3900.  
  3901. CONFIG_FILES=\${CONFIG_FILES-"Makefile octMakefile Makeconf libcruft/Makefile libcruft/Makerules liboctave/Makefile src/Makefile dld/Makefile info/Makefile readline/Makefile readline/doc/Makefile readline/examples/Makefile doc/Makefile test/Makefile kpathsea/Makefile libcruft/blas/Makefile libcruft/balgen/Makefile libcruft/dassl/Makefile libcruft/eispack/Makefile libcruft/fftpack/Makefile libcruft/fsqp/Makefile libcruft/lapack/Makefile libcruft/linpack/Makefile libcruft/minpack/Makefile libcruft/misc/Makefile libcruft/npsol/Makefile libcruft/odepack/Makefile libcruft/qpsol/Makefile libcruft/quadpack/Makefile libcruft/ranlib/Makefile libcruft/slatec-fn/Makefile libcruft/villad/Makefile scripts/Makefile scripts/control/Makefile scripts/general/Makefile scripts/image/Makefile scripts/linear-algebra/Makefile scripts/miscellaneous/Makefile scripts/plot/Makefile scripts/polynomial/Makefile scripts/set/Makefile scripts/signal/Makefile scripts/special-matrix/Makefile scripts/startup/Makefile scripts/statistics/Makefile scripts/elfun/Makefile scripts/specfun/Makefile scripts/strings/Makefile"}
  3902. EOF
  3903. cat >> $CONFIG_STATUS <<\EOF
  3904. for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  3905.   # Support "outfile[:infile]", defaulting infile="outfile.in".
  3906.   case "$ac_file" in
  3907.   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
  3908.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  3909.   *) ac_file_in="${ac_file}.in" ;;
  3910.   esac
  3911.  
  3912.   # Adjust relative srcdir, etc. for subdirectories.
  3913.  
  3914.   # Remove last slash and all that follows it.  Not all systems have dirname.
  3915.   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  3916.   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  3917.     # The file is in a subdirectory.
  3918.     test ! -d "$ac_dir" && mkdir "$ac_dir"
  3919.     ac_dir_suffix="/$ac_dir"
  3920.     # A "../" for each directory in $ac_dir_suffix.
  3921.     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  3922.   else
  3923.     ac_dir_suffix= ac_dots=
  3924.   fi
  3925.  
  3926.   case "$ac_given_srcdir" in
  3927.   .)  srcdir=.
  3928.       if test -z "$ac_dots"; then top_srcdir=.
  3929.       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  3930.   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  3931.   *) # Relative path.
  3932.     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  3933.     top_srcdir="$ac_dots$ac_given_srcdir" ;;
  3934.   esac
  3935.  
  3936.   case "$ac_given_INSTALL" in
  3937.   [/$]*) INSTALL="$ac_given_INSTALL" ;;
  3938.   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  3939.   esac
  3940.   echo creating "$ac_file"
  3941.   rm -f "$ac_file"
  3942.   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  3943.   case "$ac_file" in
  3944.   *Makefile*) ac_comsub="1i\\
  3945. # $configure_input" ;;
  3946.   *) ac_comsub= ;;
  3947.   esac
  3948.   sed -e "$ac_comsub
  3949. s%@configure_input@%$configure_input%g
  3950. s%@srcdir@%$srcdir%g
  3951. s%@top_srcdir@%$top_srcdir%g
  3952. s%@INSTALL@%$INSTALL%g
  3953. " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
  3954. fi; done
  3955. rm -f conftest.subs
  3956.  
  3957. # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
  3958. # NAME is the cpp macro being defined and VALUE is the value it is being given.
  3959. #
  3960. # ac_d sets the value in "#define NAME VALUE" lines.
  3961. ac_dA='s%^\([     ]*\)#\([     ]*define[     ][     ]*\)'
  3962. ac_dB='\([     ][     ]*\)[^     ]*%\1#\2'
  3963. ac_dC='\3'
  3964. ac_dD='%g'
  3965. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  3966. ac_uA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  3967. ac_uB='\([     ]\)%\1#\2define\3'
  3968. ac_uC=' '
  3969. ac_uD='\4%g'
  3970. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  3971. ac_eA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  3972. ac_eB='$%\1#\2define\3'
  3973. ac_eC=' '
  3974. ac_eD='%g'
  3975.  
  3976. CONFIG_HEADERS=${CONFIG_HEADERS-"config.h kpathsea/c-auto.h"}
  3977. for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  3978.   # Support "outfile[:infile]", defaulting infile="outfile.in".
  3979.   case "$ac_file" in
  3980.   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
  3981.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  3982.   *) ac_file_in="${ac_file}.in" ;;
  3983.   esac
  3984.  
  3985.   echo creating $ac_file
  3986.  
  3987.   rm -f conftest.frag conftest.in conftest.out
  3988.   cp $ac_given_srcdir/$ac_file_in conftest.in
  3989.  
  3990. EOF
  3991.  
  3992. # Transform confdefs.h into a sed script conftest.vals that substitutes
  3993. # the proper values into config.h.in to produce config.h.  And first:
  3994. # Protect against being on the right side of a sed subst in config.status. 
  3995. # Protect against being in an unquoted here document in config.status.
  3996. rm -f conftest.vals
  3997. cat > conftest.hdr <<\EOF
  3998. s/[\\&%]/\\&/g
  3999. s%[\\$`]%\\&%g
  4000. s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
  4001. s%ac_d%ac_u%gp
  4002. s%ac_u%ac_e%gp
  4003. EOF
  4004. sed -n -f conftest.hdr confdefs.h > conftest.vals
  4005. rm -f conftest.hdr
  4006.  
  4007. # This sed command replaces #undef with comments.  This is necessary, for
  4008. # example, in the case of _POSIX_SOURCE, which is predefined and required
  4009. # on some systems where configure will not decide to define it.
  4010. cat >> conftest.vals <<\EOF
  4011. s%^[     ]*#[     ]*undef[     ][     ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
  4012. EOF
  4013.  
  4014. # Break up conftest.vals because some shells have a limit on
  4015. # the size of here documents, and old seds have small limits too.
  4016. # Maximum number of lines to put in a single here document.
  4017. ac_max_here_lines=12
  4018.  
  4019. rm -f conftest.tail
  4020. while :
  4021. do
  4022.   ac_lines=`grep -c . conftest.vals`
  4023.   # grep -c gives empty output for an empty file on some AIX systems.
  4024.   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  4025.   # Write a limited-size here document to conftest.frag.
  4026.   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
  4027.   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
  4028.   echo 'CEOF
  4029.   sed -f conftest.frag conftest.in > conftest.out
  4030.   rm -f conftest.in
  4031.   mv conftest.out conftest.in
  4032. ' >> $CONFIG_STATUS
  4033.   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
  4034.   rm -f conftest.vals
  4035.   mv conftest.tail conftest.vals
  4036. done
  4037. rm -f conftest.vals
  4038.  
  4039. cat >> $CONFIG_STATUS <<\EOF
  4040.   rm -f conftest.frag conftest.h
  4041.   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  4042.   cat conftest.in >> conftest.h
  4043.   rm -f conftest.in
  4044.   if cmp -s $ac_file conftest.h 2>/dev/null; then
  4045.     echo "$ac_file is unchanged"
  4046.     rm -f conftest.h
  4047.   else
  4048.     rm -f $ac_file
  4049.     mv conftest.h $ac_file
  4050.   fi
  4051. fi; done
  4052.  
  4053.  
  4054.  
  4055. exit 0
  4056. EOF
  4057. chmod +x $CONFIG_STATUS
  4058. rm -fr confdefs* $ac_clean_files
  4059. test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS
  4060.  
  4061.