home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 9 / FreshFishVol9-CD2.bin / bbs / gnu / perl-4.036-src.lha / perl-4.036 / Configure < prev    next >
Encoding:
Text File  |  1994-05-02  |  27.6 KB  |  901 lines

  1. #!/bin/sh
  2. # Guess values for system-dependent variables and create Makefiles.
  3. # Generated automatically using autoconf version 1.9 
  4. # Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
  5.  
  6. # This configure script is free software; you can redistribute it and/or
  7. # modify it under the terms of the GNU General Public License as published
  8. # by the Free Software Foundation; either version 2, or (at your option)
  9. # any later version.
  10.  
  11. # This script is distributed in the hope that it will be useful, but
  12. # WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
  14. # Public License for more details.
  15.  
  16. # You should have received a copy of the GNU General Public License
  17. # along with this program; if not, write to the Free Software
  18. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  19.  
  20. # Save the original args to write them into config.status later.
  21. configure_args="$*"
  22.  
  23. # Only options that might do something get documented.
  24. ac_usage="Usage: configure [options] [host]
  25. Options: [defaults in brackets after descriptions]
  26. --build=BUILD        configure for building on BUILD [BUILD=HOST]
  27. --disable-FEATURE    do not include FEATURE (same as --enable-FEATURE=no)
  28. --enable-FEATURE[=ARG]    include FEATURE [ARG=yes]
  29. --exec-prefix=PREFIX    install host dependent files in PREFIX [/usr/local]
  30. --help            print this message
  31. --host=HOST        configure for HOST [guessed]
  32. --prefix=PREFIX        install host independent files in PREFIX [/usr/local]
  33. --quiet, --silent    do not print \`checking for...' messages
  34. --srcdir=DIR        find the sources in DIR [configure dir or ..]
  35. --target=TARGET        configure for TARGET [TARGET=HOST]
  36. --verbose        print results of checks
  37. --version        print the version of autoconf that created configure
  38. --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  39. --without-PACKAGE    do not use PACKAGE (same as --with-PACKAGE=no)
  40. --x-includes=DIR    X include files are in DIR
  41. --x-libraries=DIR    X library files are in DIR"
  42.  
  43. # Initialize some variables set by options.
  44. # The variables have the same names as the options, with
  45. # dashes changed to underlines.
  46. build=NONE
  47. exec_prefix=
  48. host=NONE
  49. no_create=
  50. nonopt=NONE
  51. norecursion=
  52. prefix=
  53. program_prefix=
  54. program_suffix=
  55. program_transform_name=
  56. silent=
  57. srcdir=
  58. target=NONE
  59. verbose=
  60. x_includes=
  61. x_libraries=
  62.  
  63. ac_prev=
  64. for ac_option
  65. do
  66.  
  67.   # If the previous option needs an argument, assign it.
  68.   if test -n "$ac_prev"; then
  69.     eval "$ac_prev=\$ac_option"
  70.     ac_prev=
  71.     continue
  72.   fi
  73.  
  74.   # Accept (but ignore some of) the important Cygnus configure
  75.   # options, so we can diagnose typos.
  76.  
  77.   case "$ac_option" in
  78.   -*=*) ac_optarg=`/bin/echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  79.   *) ac_optarg= ;;
  80.   esac
  81.  
  82.   case "$ac_option" in
  83.  
  84.   -build | --build | --buil | --bui | --bu | --b)
  85.     ac_prev=build ;;
  86.   -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
  87.     build="$ac_optarg" ;;
  88.  
  89.   -disable-* | --disable-*)
  90.     ac_feature=`/bin/echo $ac_option|sed -e 's/-*disable-//'`
  91.     # Reject names that aren't valid shell variable names.
  92.     if test -n "`/bin/echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  93.       /bin/echo "configure: $ac_feature: invalid feature name" >&2; exit 1
  94.     fi
  95.     ac_feature=`/bin/echo $ac_feature| sed 's/-/_/g'`
  96.     eval "enable_${ac_feature}=no" ;;
  97.  
  98.   -enable-* | --enable-*)
  99.     ac_feature=`/bin/echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  100.     # Reject names that aren't valid shell variable names.
  101.     if test -n "`/bin/echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  102.       /bin/echo "configure: $ac_feature: invalid feature name" >&2; exit 1
  103.     fi
  104.     ac_feature=`/bin/echo $ac_feature| sed 's/-/_/g'`
  105.     case "$ac_option" in
  106.       *=*) ;;
  107.       *) ac_optarg=yes ;;
  108.     esac
  109.     eval "enable_${ac_feature}='$ac_optarg'" ;;
  110.  
  111.   # For backward compatibility, recognize -exec-prefix and --exec_prefix.
  112.   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  113.   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  114.   | --exec | --exe | --ex)
  115.     ac_prev=exec_prefix ;;
  116.   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  117.   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  118.   | --exec=* | --exe=* | --ex=*)
  119.     exec_prefix="$ac_optarg" ;;
  120.  
  121.   -gas | --gas | --ga | --g)
  122.     with_gas=yes ;; # Obsolete; use --with-gas.
  123.  
  124.   -help | --help | --hel | --he)
  125.     cat << EOF
  126. $ac_usage
  127. EOF
  128.     exit 0 ;;
  129.  
  130.   -host | --host | --hos | --ho)
  131.     ac_prev=host ;;
  132.   -host=* | --host=* | --hos=* | --ho=*)
  133.     host="$ac_optarg" ;;
  134.  
  135.   -nfp | --nfp | --nf)
  136.     with_fp=no ;; # Obsolete; use --without-fp.
  137.  
  138.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  139.   | --no-cr | --no-c)
  140.     no_create=yes ;;
  141.  
  142.   -norecursion | --norecursion | --norecursio | --norecursi \
  143.   | --norecurs | --norecur | --norecu | --norec | --nore | --nor)
  144.     norecursion=yes ;;
  145.  
  146.   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  147.     ac_prev=prefix ;;
  148.   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  149.     prefix="$ac_optarg" ;;
  150.  
  151.   -program-prefix | --program-prefix | --program-prefi | --program-pref \
  152.   | --program-pre | --program-pr | --program-p)
  153.     ac_prev=program_prefix ;;
  154.   -program-prefix=* | --program-prefix=* | --program-prefi=* \
  155.   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  156.     program_prefix="$ac_optarg" ;;
  157.  
  158.   -program-suffix | --program-suffix | --program-suffi | --program-suff \
  159.   | --program-suf | --program-su | --program-s)
  160.     ac_prev=program_suffix ;;
  161.   -program-suffix=* | --program-suffix=* | --program-suffi=* \
  162.   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  163.     program_suffix="$ac_optarg" ;;
  164.  
  165.   -program-transform-name | --program-transform-name \
  166.   | --program-transform-nam | --program-transform-na \
  167.   | --program-transform-n | --program-transform- \
  168.   | --program-transform | --program-transfor \
  169.   | --program-transfo | --program-transf \
  170.   | --program-trans | --program-tran \
  171.   | --progr-tra | --program-tr | --program-t)
  172.     ac_prev=program_transform_name ;;
  173.   -program-transform-name=* | --program-transform-name=* \
  174.   | --program-transform-nam=* | --program-transform-na=* \
  175.   | --program-transform-n=* | --program-transform-=* \
  176.   | --program-transform=* | --program-transfor=* \
  177.   | --program-transfo=* | --program-transf=* \
  178.   | --program-trans=* | --program-tran=* \
  179.   | --progr-tra=* | --program-tr=* | --program-t=*)
  180.     program_transform_name="$ac_optarg" ;;
  181.  
  182.   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  183.   | -silent | --silent | --silen | --sile | --sil)
  184.     silent=yes ;;
  185.  
  186.   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  187.     ac_prev=srcdir ;;
  188.   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  189.     srcdir="$ac_optarg" ;;
  190.  
  191.   -target | --target | --targe | --targ | --tar | --ta | --t)
  192.     ac_prev=target ;;
  193.   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  194.     target="$ac_optarg" ;;
  195.  
  196.   -v | -verbose | --verbose | --verbos | --verbo | --verb)
  197.     verbose=yes ;;
  198.  
  199.   -version | --version | --versio | --versi | --vers)
  200.     /bin/echo "configure generated by autoconf version 1.9"
  201.     exit 0 ;;
  202.  
  203.   -with-* | --with-*)
  204.     ac_package=`/bin/echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  205.     # Reject names that aren't valid shell variable names.
  206.     if test -n "`/bin/echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  207.       /bin/echo "configure: $ac_package: invalid package name" >&2; exit 1
  208.     fi
  209.     ac_package=`/bin/echo $ac_package| sed 's/-/_/g'`
  210.     case "$ac_option" in
  211.       *=*) ;;
  212.       *) ac_optarg=yes ;;
  213.     esac
  214.     eval "with_${ac_package}='$ac_optarg'" ;;
  215.  
  216.   -without-* | --without-*)
  217.     ac_package=`/bin/echo $ac_option|sed -e 's/-*without-//'`
  218.     # Reject names that aren't valid shell variable names.
  219.     if test -n "`/bin/echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  220.       /bin/echo "configure: $ac_package: invalid package name" >&2; exit 1
  221.     fi
  222.     ac_package=`/bin/echo $ac_package| sed 's/-/_/g'`
  223.     eval "with_${ac_package}=no" ;;
  224.  
  225.   --x) with_x=yes ;; # Obsolete; use --with-x.
  226.  
  227.   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  228.   | --x-incl | --x-inc | --x-in | --x-i)
  229.     ac_prev=x_includes ;;
  230.   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  231.   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  232.     x_includes="$ac_optarg" ;;
  233.  
  234.   -x-libraries | --x-libraries | --x-librarie | --x-librari \
  235.   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  236.     ac_prev=x_libraries ;;
  237.   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  238.   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  239.     x_libraries="$ac_optarg" ;;
  240.  
  241.   -*) /bin/echo "configure: $ac_option: invalid option; use --help to show usage" >&2; exit 1
  242.     ;;
  243.  
  244.   *) 
  245.     if test -n "`/bin/echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  246.       /bin/echo "configure: warning: $ac_option: invalid host type" >&2
  247.     fi
  248.     if test "x$nonopt" != xNONE; then
  249.       /bin/echo "configure: can only configure for one host and one target at a time" >&2; exit 1
  250.     fi
  251.     nonopt="$ac_option"
  252.     ;;
  253.  
  254.   esac
  255. done
  256.  
  257. if test -n "$ac_prev"; then
  258.   /bin/echo "configure: missing argument to --`/bin/echo $ac_prev | sed 's/_/-/g'`" >&2; exit 1
  259. fi
  260.  
  261. trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15
  262. trap 'rm -fr confdefs* $ac_clean_files' 0
  263.  
  264. # Save the original args if we used an alternate arg parser.
  265. ac_configure_temp="${configure_args-$*}"
  266. # Strip out --no-create and --norecursion so they don't pile up.
  267. configure_args=
  268. for ac_arg in $ac_configure_temp; do
  269.   case "$ac_arg" in
  270.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  271.   | --no-cr | --no-c) ;;
  272.   -norecursion | --norecursion | --norecursio | --norecursi \
  273.   | --norecurs | --norecur | --norecu | --norec | --nore | --nor) ;;
  274.   *) configure_args="$configure_args $ac_arg" ;;
  275.   esac
  276. done
  277.  
  278. # NLS nuisances.
  279. # These must not be set unconditionally because not all systems understand
  280. # e.g. LANG=C (notably SCO).
  281. if test "${LC_ALL+set}" = 'set'; then LC_ALL=C; export LC_ALL; fi
  282. if test "${LANG+set}"   = 'set'; then LANG=C;   export LANG;   fi
  283.  
  284. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  285. rm -rf conftest* confdefs.h
  286. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  287. /bin/echo > confdefs.h
  288.  
  289. # A filename unique to this package, relative to the directory that
  290. # configure is in, which we can look for to find out if srcdir is correct.
  291. ac_unique_file=perl.c
  292.  
  293. # Find the source files, if location was not specified.
  294. if test -z "$srcdir"; then
  295.   ac_srcdir_defaulted=yes
  296.   # Try the directory containing this script, then `..'.
  297.   ac_prog=$0
  298.   ac_confdir=`/bin/echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  299.   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  300.   srcdir=$ac_confdir
  301.   if test ! -r $srcdir/$ac_unique_file; then
  302.     srcdir=..
  303.   fi
  304. fi
  305. if test ! -r $srcdir/$ac_unique_file; then
  306.   if test x$ac_srcdir_defaulted = xyes; then
  307.     /bin/echo "configure: can not find sources in ${ac_confdir} or .." >&2; exit 1
  308.   else
  309.     /bin/echo "configure: can not find sources in ${srcdir}" >&2; exit 1
  310.   fi
  311. fi
  312. ac_ext=c
  313. ac_cpp='${CPP} $CFLAGS'
  314. ac_compile='${CC-cc} $CFLAGS $LDFLAGS conftest.${ac_ext} -o conftest $LIBS >/dev/null 2>&1'
  315.  
  316.  
  317.  
  318.  
  319. # We want these before the checks, so the checks can modify their values.
  320. test -z "$CFLAGS" && CFLAGS= auto_cflags=1
  321. test -z "$LDFLAGS" && LDFLAGS=
  322.  
  323. if test -z "$CC"; then
  324.   # Extract the first word of `gcc', so it can be a program name with args.
  325.   set ac_dummy gcc; ac_word=$2
  326.   test -n "$silent" || /bin/echo "checking for $ac_word"
  327.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  328.   for ac_dir in $PATH; do
  329.     test -z "$ac_dir" && ac_dir=.
  330.     if test -f $ac_dir/$ac_word; then
  331.       CC="gcc"
  332.       break
  333.     fi
  334.   done
  335.   IFS="$ac_save_ifs"
  336. fi
  337. test -z "$CC" && CC="cc"
  338. test -n "$CC" && test -n "$verbose" && /bin/echo "    setting CC to $CC"
  339.  
  340. # Find out if we are using GNU C, under whatever name.
  341. cat > conftest.c <<EOF
  342. #ifdef __GNUC__
  343.   yes
  344. #endif
  345. EOF
  346. ${CC-cc} -E conftest.c > conftest.out 2>&1
  347. if egrep yes conftest.out >/dev/null 2>&1; then
  348.   GCC=1 # For later tests.
  349. fi
  350. rm -f conftest*
  351.  
  352.  
  353. # If we're using gcc and the user hasn't specified CFLAGS, add -O to CFLAGS.
  354. test -n "$GCC" && test -n "$auto_cflags" && CFLAGS="$CFLAGS -O2"
  355.  
  356.  
  357. test -n "$silent" || /bin/echo "checking how to run the C preprocessor"
  358. if test -z "$CPP"; then
  359.   # This must be in double quotes, not single quotes, because CPP may get
  360.   # substituted into the Makefile and ``${CC-cc}'' will simply confuse
  361.   # make.  It must be expanded now.
  362.   CPP="${CC-cc} -E"
  363.   cat > conftest.${ac_ext} <<EOF
  364. #include "confdefs.h"
  365. #include <stdio.h>
  366. Syntax Error
  367. EOF
  368. # Some shells (Coherent) do redirections in the wrong order, so need
  369. # the parens.
  370. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  371. if test -z "$ac_err"; then
  372.   :
  373. else
  374.   rm -rf conftest*
  375.   CPP="${CC-cc} -E -traditional-cpp"
  376.   cat > conftest.${ac_ext} <<EOF
  377. #include "confdefs.h"
  378. #include <stdio.h>
  379. Syntax Error
  380. EOF
  381. # Some shells (Coherent) do redirections in the wrong order, so need
  382. # the parens.
  383. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  384. if test -z "$ac_err"; then
  385.   :
  386. else
  387.   rm -rf conftest*
  388.   CPP=/lib/cpp
  389. fi
  390. rm -f conftest*
  391. fi
  392. rm -f conftest*
  393. fi
  394. test -n "$verbose" && /bin/echo "    setting CPP to $CPP"
  395.  
  396. if test -n "$GCC"; then
  397.   test -n "$silent" || /bin/echo "checking whether -traditional is needed"
  398.   ac_pattern="Autoconf.*'x'"
  399.   ac_prog='#include <sgtty.h>
  400. Autoconf TIOCGETP'
  401.   cat > conftest.${ac_ext} <<EOF
  402. #include "confdefs.h"
  403. $ac_prog
  404. EOF
  405. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  406. if egrep "$ac_pattern" conftest.out >/dev/null 2>&1; then
  407.   rm -rf conftest*
  408.   ac_need_trad=1
  409.  
  410. fi
  411. rm -f conftest*
  412.  
  413.  
  414.   if test -z "$ac_need_trad"; then
  415.     ac_prog='#include <termio.h>
  416. Autoconf TCGETA'
  417.     cat > conftest.${ac_ext} <<EOF
  418. #include "confdefs.h"
  419. $ac_prog
  420. EOF
  421. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  422. if egrep "$ac_pattern" conftest.out >/dev/null 2>&1; then
  423.   rm -rf conftest*
  424.   ac_need_trad=1
  425.  
  426. fi
  427. rm -f conftest*
  428.  
  429.   fi
  430.   test -n "$ac_need_trad" && CC="$CC -traditional"
  431. fi
  432.  
  433. # Make sure to not get the incompatible SysV /etc/install and
  434. # /usr/sbin/install, which might be in PATH before a BSD-like install,
  435. # or the SunOS /usr/etc/install directory, or the AIX /bin/install,
  436. # or the AFS install, which mishandles nonexistent args, or
  437. # /usr/ucb/install on SVR4, which tries to use the nonexistent group
  438. # `staff', or /sbin/install on IRIX which has incompatible command-line
  439. # syntax.  Sigh.
  440. #
  441. #     On most BSDish systems install is in /usr/bin, not /usr/ucb
  442. #     anyway.
  443. # This turns out not to be true, so the mere pathname isn't an indication
  444. # of whether the program works.  What we really need is a set of tests for
  445. # the install program to see if it actually works in all the required ways.
  446. #
  447. # Avoid using ./install, which might have been erroneously created
  448. # by make from ./install.sh.
  449. if test "z${INSTALL}" = "z" ; then
  450.   test -n "$silent" || /bin/echo "checking for a BSD compatible install"
  451.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  452.   for ac_dir in $PATH; do
  453.     case "$ac_dir" in
  454.     ''|.|/gnu/etc|/sbin|/usr/sbin|/usr/etc|/usr/afsws/bin|/usr/ucb) ;;
  455.     *)
  456.       # OSF1 and SCO ODT 3.0 have their own names for install.
  457.       for ac_prog in installbsd scoinst install; do
  458.         if test -f $ac_dir/$ac_prog; then
  459.       if test $ac_prog = install &&
  460.             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
  461.         # AIX install.  It has an incompatible calling convention.
  462.         # OSF/1 installbsd also uses dspmsg, but is usable.
  463.         :
  464.       else
  465.         INSTALL="$ac_dir/$ac_prog -c"
  466.         INSTALL_PROGRAM='${INSTALL}'
  467.         INSTALL_DATA='${INSTALL} -m 644'
  468.         break 2
  469.       fi
  470.     fi
  471.       done
  472.       ;;
  473.     esac
  474.   done
  475.   IFS="$ac_save_ifs"
  476. fi
  477. if test -z "$INSTALL"; then
  478.   if test -f ${srcdir}/install.sh; then
  479.     # As a last resort, use the slow shell script.
  480.     INSTALL='@top_srcdir@/install.sh -c'
  481.   else
  482.     /bin/echo "configure: warning: ${srcdir}/install.sh not found; using cp" >&2
  483.     INSTALL=cp
  484.   fi
  485. fi
  486. test -n "$verbose" && /bin/echo "    setting INSTALL to $INSTALL"
  487. # Use test -z because SunOS4 sh mishandles ${INSTALL_PROGRAM-'${INSTALL}'}.
  488. # It thinks the first close brace ends the variable substitution.
  489. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  490. test -n "$verbose" && /bin/echo "    setting INSTALL_PROGRAM to $INSTALL_PROGRAM"
  491. test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL}'
  492. test -n "$verbose" && /bin/echo "    setting INSTALL_DATA to $INSTALL_DATA"
  493.  
  494. for ac_prog in 'bison -y' byacc
  495. do
  496. if test -z "$YACC"; then
  497.   # Extract the first word of `$ac_prog', so it can be a program name with args.
  498.   set ac_dummy $ac_prog; ac_word=$2
  499.   test -n "$silent" || /bin/echo "checking for $ac_word"
  500.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  501.   for ac_dir in $PATH; do
  502.     test -z "$ac_dir" && ac_dir=.
  503.     if test -f $ac_dir/$ac_word; then
  504.       YACC="$ac_prog"
  505.       break
  506.     fi
  507.   done
  508.   IFS="$ac_save_ifs"
  509. fi
  510.  
  511. test -n "$YACC" && test -n "$verbose" && /bin/echo "    setting YACC to $YACC"
  512.  
  513. test -n "$YACC" && break
  514. done
  515. test -n "$YACC" || YACC="yacc"
  516.  
  517. test -n "$silent" || /bin/echo "checking for return type of signal handlers"
  518. cat > conftest.${ac_ext} <<EOF
  519. #include "confdefs.h"
  520. #include <sys/types.h>
  521. #include <signal.h>
  522. #ifdef signal
  523. #undef signal
  524. #endif
  525. extern void (*signal ()) ();
  526. int main() { return 0; }
  527. int t() { int i;; return 0; }
  528. EOF
  529. if eval $ac_compile; then
  530.   rm -rf conftest*
  531.   
  532. {
  533. test -n "$verbose" && \
  534. /bin/echo "    defining" RETSIGTYPE to be "void"
  535. /bin/echo "#define" RETSIGTYPE "void" >> confdefs.h
  536. DEFS="$DEFS -DRETSIGTYPE=void"
  537. ac_sed_defs="${ac_sed_defs}\${ac_dA}RETSIGTYPE\${ac_dB}RETSIGTYPE\${ac_dC}void\${ac_dD}
  538. \${ac_uA}RETSIGTYPE\${ac_uB}RETSIGTYPE\${ac_uC}void\${ac_uD}
  539. \${ac_eA}RETSIGTYPE\${ac_eB}RETSIGTYPE\${ac_eC}void\${ac_eD}
  540. "
  541. }
  542.  
  543.  
  544. else
  545.   rm -rf conftest*
  546.   
  547. {
  548. test -n "$verbose" && \
  549. /bin/echo "    defining" RETSIGTYPE to be "int"
  550. /bin/echo "#define" RETSIGTYPE "int" >> confdefs.h
  551. DEFS="$DEFS -DRETSIGTYPE=int"
  552. ac_sed_defs="${ac_sed_defs}\${ac_dA}RETSIGTYPE\${ac_dB}RETSIGTYPE\${ac_dC}int\${ac_dD}
  553. \${ac_uA}RETSIGTYPE\${ac_uB}RETSIGTYPE\${ac_uC}int\${ac_uD}
  554. \${ac_eA}RETSIGTYPE\${ac_eB}RETSIGTYPE\${ac_eC}int\${ac_eD}
  555. "
  556. }
  557.  
  558. fi
  559. rm -f conftest*
  560.  
  561.  
  562. test -n "$silent" || /bin/echo "checking for ln -s"
  563. rm -f conftestdata
  564. if ln -s X conftestdata 2>/dev/null
  565. then
  566.   rm -f conftestdata
  567.   LN_S="ln -s"
  568. else
  569.   LN_S=ln
  570. fi
  571.  
  572.  
  573. ac_save_LIBS="${LIBS}"
  574. LIBS="${LIBS} -lm"
  575. ac_have_lib=""
  576. test -n "$silent" || /bin/echo "checking for -lm"
  577. cat > conftest.${ac_ext} <<EOF
  578. #include "confdefs.h"
  579.  
  580. int main() { return 0; }
  581. int t() { main();; return 0; }
  582. EOF
  583. if eval $ac_compile; then
  584.   rm -rf conftest*
  585.   ac_have_lib="1"
  586.  
  587. fi
  588. rm -f conftest*
  589. LIBS="${ac_save_LIBS}"
  590. if test -n "${ac_have_lib}"; then
  591.    
  592. {
  593. test -n "$verbose" && \
  594. /bin/echo "    defining HAVE_LIBM"
  595. /bin/echo "#define" HAVE_LIBM "1" >> confdefs.h
  596. DEFS="$DEFS -DHAVE_LIBM=1"
  597. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_LIBM\${ac_dB}HAVE_LIBM\${ac_dC}1\${ac_dD}
  598. \${ac_uA}HAVE_LIBM\${ac_uB}HAVE_LIBM\${ac_uC}1\${ac_uD}
  599. \${ac_eA}HAVE_LIBM\${ac_eB}HAVE_LIBM\${ac_eC}1\${ac_eD}
  600. "
  601. }
  602.  
  603.    LIBS="${LIBS} -lm"
  604. fi
  605.  
  606. for ac_hdr in gdbm.h ndbm.h dbz.h dbm.h
  607. do
  608. ac_tr_hdr=HAVE_`/bin/echo $ac_hdr | tr '[a-z]./' '[A-Z]__'`
  609. test -n "$silent" || /bin/echo "checking for ${ac_hdr}"
  610. cat > conftest.${ac_ext} <<EOF
  611. #include "confdefs.h"
  612. #include <${ac_hdr}>
  613. EOF
  614. # Some shells (Coherent) do redirections in the wrong order, so need
  615. # the parens.
  616. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  617. if test -z "$ac_err"; then
  618.   rm -rf conftest*
  619.   
  620. {
  621. test -n "$verbose" && \
  622. /bin/echo "    defining ${ac_tr_hdr}"
  623. /bin/echo "#define" ${ac_tr_hdr} "1" >> confdefs.h
  624. DEFS="$DEFS -D${ac_tr_hdr}=1"
  625. ac_sed_defs="${ac_sed_defs}\${ac_dA}${ac_tr_hdr}\${ac_dB}${ac_tr_hdr}\${ac_dC}1\${ac_dD}
  626. \${ac_uA}${ac_tr_hdr}\${ac_uB}${ac_tr_hdr}\${ac_uC}1\${ac_uD}
  627. \${ac_eA}${ac_tr_hdr}\${ac_eB}${ac_tr_hdr}\${ac_eC}1\${ac_eD}
  628. "
  629. }
  630.  
  631.  
  632. fi
  633. rm -f conftest*
  634. done
  635.  
  636. ac_save_LIBS="${LIBS}"
  637. LIBS="${LIBS} -lgdbm"
  638. ac_have_lib=""
  639. test -n "$silent" || /bin/echo "checking for -lgdbm"
  640. cat > conftest.${ac_ext} <<EOF
  641. #include "confdefs.h"
  642.  
  643. int main() { return 0; }
  644. int t() { main();; return 0; }
  645. EOF
  646. if eval $ac_compile; then
  647.   rm -rf conftest*
  648.   ac_have_lib="1"
  649.  
  650. fi
  651. rm -f conftest*
  652. LIBS="${ac_save_LIBS}"
  653. if test -n "${ac_have_lib}"; then
  654.    
  655. {
  656. test -n "$verbose" && \
  657. /bin/echo "    defining HAVE_LIBGDBM"
  658. /bin/echo "#define" HAVE_LIBGDBM "1" >> confdefs.h
  659. DEFS="$DEFS -DHAVE_LIBGDBM=1"
  660. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_LIBGDBM\${ac_dB}HAVE_LIBGDBM\${ac_dC}1\${ac_dD}
  661. \${ac_uA}HAVE_LIBGDBM\${ac_uB}HAVE_LIBGDBM\${ac_uC}1\${ac_uD}
  662. \${ac_eA}HAVE_LIBGDBM\${ac_eB}HAVE_LIBGDBM\${ac_eC}1\${ac_eD}
  663. "
  664. }
  665.  
  666.    LIBS="${LIBS} -lgdbm"
  667. fi
  668.  
  669.  
  670. # Set default prefixes.
  671. if test -n "$prefix"; then
  672.   test -z "$exec_prefix" && exec_prefix='${prefix}' # Let make expand it.
  673.   ac_prsub="s%^prefix\\([     ]*\\)=\\([     ]*\\).*$%prefix\\1=\\2$prefix%"
  674. fi
  675. if test -n "$exec_prefix"; then
  676.   ac_prsub="$ac_prsub
  677. s%^exec_prefix\\([     ]*\\)=\\([     ]*\\).*$%exec_prefix\\1=\\2$exec_prefix%"
  678. fi
  679. # Any assignment to VPATH causes Sun make to only execute
  680. # the first set of double-colon rules, so remove it if not needed.
  681. # If there is a colon in the path, we need to keep it.
  682. if test "x$srcdir" = x.; then
  683.   ac_vpsub='/^[     ]*VPATH[     ]*=[^:]*$/d'
  684. fi
  685.  
  686. # Quote sed substitution magic chars in DEFS.
  687. cat >conftest.def <<EOF
  688. $DEFS
  689. EOF
  690. ac_escape_ampersand_and_backslash='s%[&\\]%\\&%g'
  691. DEFS=`sed "$ac_escape_ampersand_and_backslash" <conftest.def`
  692. rm -f conftest.def
  693. # Substitute for predefined variables.
  694.  
  695. trap 'rm -f config.status; exit 1' 1 2 15
  696. /bin/echo creating config.status
  697. rm -f config.status
  698. cat > config.status <<EOF
  699. #!/bin/sh
  700. # Generated automatically by configure.
  701. # Run this file to recreate the current configuration.
  702. # This directory was configured as follows,
  703. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  704. #
  705. # $0 $configure_args
  706.  
  707. ac_cs_usage="Usage: config.status [--recheck] [--version] [--help]"
  708. for ac_option
  709. do
  710.   case "\$ac_option" in
  711.   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  712.     /bin/echo running \${CONFIG_SHELL-/bin/sh} $0 $configure_args --no-create
  713.     exec \${CONFIG_SHELL-/bin/sh} $0 $configure_args --no-create ;;
  714.   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  715.     /bin/echo "config.status generated by autoconf version 1.9"
  716.     exit 0 ;;
  717.   -help | --help | --hel | --he | --h)
  718.     /bin/echo "\$ac_cs_usage"; exit 0 ;;
  719.   *) /bin/echo "\$ac_cs_usage"; exit 1 ;;
  720.   esac
  721. done
  722.  
  723. trap 'rm -fr Makefile x2p/Makefile config.h conftest*; exit 1' 1 2 15
  724. CC='$CC'
  725. CFLAGS='$CFLAGS'
  726. LDFLAGS='$LDFLAGS'
  727. CPP='$CPP'
  728. INSTALL='$INSTALL'
  729. INSTALL_PROGRAM='$INSTALL_PROGRAM'
  730. INSTALL_DATA='$INSTALL_DATA'
  731. YACC='$YACC'
  732. LN_S='$LN_S'
  733. LIBS='$LIBS'
  734. srcdir='$srcdir'
  735. top_srcdir='$top_srcdir'
  736. prefix='$prefix'
  737. exec_prefix='$exec_prefix'
  738. ac_prsub='$ac_prsub'
  739. ac_vpsub='$ac_vpsub'
  740. extrasub='$extrasub'
  741. EOF
  742. cat >> config.status <<\EOF
  743.  
  744. ac_given_srcdir=$srcdir
  745.  
  746. CONFIG_FILES=${CONFIG_FILES-"Makefile x2p/Makefile"}
  747. for ac_file in .. ${CONFIG_FILES}; do if test "x$ac_file" != x..; then
  748.   # Remove last slash and all that follows it.  Not all systems have dirname.
  749.   ac_dir=`/bin/echo $ac_file|sed 's%/[^/][^/]*$%%'`
  750.   if test "$ac_dir" != "$ac_file"; then
  751.     # The file is in a subdirectory.
  752.     test ! -d "$ac_dir" && mkdir "$ac_dir"
  753.     ac_dir_suffix="/$ac_dir"
  754.   else
  755.     ac_dir_suffix=
  756.   fi
  757.  
  758.   # A "../" for each directory in $ac_dir_suffix.
  759.   ac_dots=`/bin/echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  760.   case "$ac_given_srcdir" in
  761.   .)  srcdir=.; top_srcdir="$ac_dots." ;;
  762.   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  763.   *) # Relative path.
  764.     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  765.     top_srcdir="$ac_dots$ac_given_srcdir" ;;
  766.   esac
  767.  
  768.   /bin/echo creating "$ac_file"
  769.   rm -f "$ac_file"
  770.   comment_str="Generated automatically from `/bin/echo $ac_file|sed 's|.*/||'`.in by configure."
  771.   case "$ac_file" in
  772.     *.c | *.h | *.C | *.cc | *.m )  /bin/echo "/* $comment_str */" > "$ac_file" ;;
  773.     * )          /bin/echo "# $comment_str"     > "$ac_file" ;;
  774.   esac
  775.   sed -e "
  776. $ac_prsub
  777. $ac_vpsub
  778. $extrasub
  779. s%@CC@%$CC%g
  780. s%@CFLAGS@%$CFLAGS%g
  781. s%@LDFLAGS@%$LDFLAGS%g
  782. s%@CPP@%$CPP%g
  783. s%@INSTALL@%$INSTALL%g
  784. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  785. s%@INSTALL_DATA@%$INSTALL_DATA%g
  786. s%@YACC@%$YACC%g
  787. s%@LN_S@%$LN_S%g
  788. s%@LIBS@%$LIBS%g
  789. s%@srcdir@%$srcdir%g
  790. s%@top_srcdir@%$top_srcdir%g
  791. s%@prefix@%$prefix%g
  792. s%@exec_prefix@%$exec_prefix%g
  793. s%@DEFS@%-DHAVE_CONFIG_H%" $ac_given_srcdir/${ac_file}.in >> $ac_file
  794. fi; done
  795.  
  796. # These sed commands are put into ac_sed_defs when defining a macro.
  797. # They are broken into pieces to make the sed script easier to manage.
  798. # They are passed to sed as "A NAME B NAME C VALUE D", where NAME
  799. # is the cpp macro being defined and VALUE is the value it is being given.
  800. # Each defining turns into a single global substitution command.
  801. # Hopefully no one uses "!" as a variable value.
  802. # Other candidates for the sed separators, like , and @, do get used.
  803. #
  804. # ac_d sets the value in "#define NAME VALUE" lines.
  805. ac_dA='s!^\([     ]*\)#\([     ]*define[     ][     ]*\)'
  806. ac_dB='\([     ][     ]*\)[^     ]*!\1#\2'
  807. ac_dC='\3'
  808. ac_dD='!g'
  809. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  810. ac_uA='s!^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  811. ac_uB='\([     ]\)!\1#\2define\3'
  812. ac_uC=' '
  813. ac_uD='\4!g'
  814. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  815. ac_eA='s!^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  816. ac_eB='$!\1#\2define\3'
  817. ac_eC=' '
  818. ac_eD='!g'
  819. rm -f conftest.sed
  820. EOF
  821. # Turn off quoting long enough to insert the sed commands.
  822. rm -f conftest.sh
  823. cat > conftest.sh <<EOF
  824. $ac_sed_defs
  825. EOF
  826.  
  827. # Break up $ac_sed_defs (now in conftest.sh) because some shells have a limit
  828. # on the size of here documents.
  829.  
  830. # Maximum number of lines to put in a single here document.
  831. ac_max_sh_lines=9
  832.  
  833. while :
  834. do
  835.   # wc gives bogus results for an empty file on some AIX systems.
  836.   ac_lines=`grep -c . conftest.sh`
  837.   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  838.   rm -f conftest.s1 conftest.s2
  839.   sed ${ac_max_sh_lines}q conftest.sh > conftest.s1 # Like head -20.
  840.   sed 1,${ac_max_sh_lines}d conftest.sh > conftest.s2 # Like tail +21.
  841.   # Write a limited-size here document to append to conftest.sed.
  842.   /bin/echo 'cat >> conftest.sed <<CONFEOF' >> config.status
  843.   cat conftest.s1 >> config.status
  844.   /bin/echo 'CONFEOF' >> config.status
  845.   rm -f conftest.s1 conftest.sh
  846.   mv conftest.s2 conftest.sh
  847. done
  848. rm -f conftest.sh
  849.  
  850. # Now back to your regularly scheduled config.status.
  851. cat >> config.status <<\EOF
  852. # This sed command replaces #undef's with comments.  This is necessary, for
  853. # example, in the case of _POSIX_SOURCE, which is predefined and required
  854. # on some systems where configure will not decide to define it in
  855. # config.h.
  856. cat >> conftest.sed <<\CONFEOF
  857. s,^[     ]*#[     ]*undef[     ][     ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
  858. CONFEOF
  859. rm -f conftest.h
  860. # Break up the sed commands because old seds have small limits.
  861. ac_max_sed_lines=20
  862.  
  863. CONFIG_HEADERS=${CONFIG_HEADERS-"config.h"}
  864. for ac_file in .. ${CONFIG_HEADERS}; do if test "x$ac_file" != x..; then
  865.   /bin/echo creating $ac_file
  866.  
  867.   cp $ac_given_srcdir/$ac_file.in conftest.h1
  868.   while :
  869.   do
  870.     ac_lines=`grep -c . conftest.sed`
  871.     if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  872.     rm -f conftest.s1 conftest.s2 conftest.h2
  873.     sed ${ac_max_sed_lines}q conftest.sed > conftest.s1 # Like head -20.
  874.     sed 1,${ac_max_sed_lines}d conftest.sed > conftest.s2 # Like tail +21.
  875.     sed -f conftest.s1 < conftest.h1 > conftest.h2
  876.     rm -f conftest.s1 conftest.h1 conftest.sed
  877.     mv conftest.h2 conftest.h1
  878.     mv conftest.s2 conftest.sed
  879.   done
  880.   rm -f conftest.sed conftest.h
  881.   /bin/echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  882.   cat conftest.h1 >> conftest.h
  883.   rm -f conftest.h1
  884.   if cmp -s $ac_file conftest.h 2>/dev/null; then
  885.     # The file exists and we would not be changing it.
  886.     /bin/echo "$ac_file is unchanged"
  887.     rm -f conftest.h
  888.   else
  889.     rm -f $ac_file
  890.     mv conftest.h $ac_file
  891.   fi
  892. fi; done
  893.  
  894.  
  895.  
  896. exit 0
  897. EOF
  898. chmod +x config.status
  899. test -n "$no_create" || ${CONFIG_SHELL-/bin/sh} config.status
  900.  
  901.