home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 9 / FreshFishVol9-CD2.bin / bbs / gnu / unixtex-6.1b-src.lha / unixtex-6.1b / dvipsk / configure < prev    next >
Encoding:
Text File  |  1995-04-03  |  44.2 KB  |  1,545 lines

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