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