home *** CD-ROM | disk | FTP | other *** search
/ ftp.whtech.com / ftp.whtech.com.7z / ftp.whtech.com / emulators / v9t9 / linux / sources / V9t9 / source / configure < prev    next >
Encoding:
Text File  |  2006-10-19  |  93.3 KB  |  3,342 lines

  1. #! /bin/sh
  2.  
  3. # Guess values for system-dependent variables and create Makefiles.
  4. # Generated automatically using autoconf version 2.13 
  5. # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
  6. #
  7. # This configure script is free software; the Free Software Foundation
  8. # gives unlimited permission to copy, distribute and modify it.
  9.  
  10. # Defaults:
  11. ac_help=
  12. ac_default_prefix=/usr/local
  13. # Any additions from configure.in:
  14. ac_help="$ac_help
  15. "
  16. ac_help="$ac_help
  17.   --with-x                use the X Window System"
  18. ac_help="$ac_help
  19.   --with-gtk[=ARG]        use the GTK interface (ARG=yes)"
  20.  
  21. # Initialize some variables set by options.
  22. # The variables have the same names as the options, with
  23. # dashes changed to underlines.
  24. build=NONE
  25. cache_file=./config.cache
  26. exec_prefix=NONE
  27. host=NONE
  28. no_create=
  29. nonopt=NONE
  30. no_recursion=
  31. prefix=NONE
  32. program_prefix=NONE
  33. program_suffix=NONE
  34. program_transform_name=s,x,x,
  35. silent=
  36. site=
  37. srcdir=
  38. target=NONE
  39. verbose=
  40. x_includes=NONE
  41. x_libraries=NONE
  42. bindir='${exec_prefix}/bin'
  43. sbindir='${exec_prefix}/sbin'
  44. libexecdir='${exec_prefix}/libexec'
  45. datadir='${prefix}/share'
  46. sysconfdir='${prefix}/etc'
  47. sharedstatedir='${prefix}/com'
  48. localstatedir='${prefix}/var'
  49. libdir='${exec_prefix}/lib'
  50. includedir='${prefix}/include'
  51. oldincludedir='/usr/include'
  52. infodir='${prefix}/info'
  53. mandir='${prefix}/man'
  54.  
  55. # Initialize some other variables.
  56. subdirs=
  57. MFLAGS= MAKEFLAGS=
  58. SHELL=${CONFIG_SHELL-/bin/sh}
  59. # Maximum number of lines to put in a shell here document.
  60. ac_max_here_lines=12
  61.  
  62. ac_prev=
  63. for ac_option
  64. do
  65.  
  66.   # If the previous option needs an argument, assign it.
  67.   if test -n "$ac_prev"; then
  68.     eval "$ac_prev=\$ac_option"
  69.     ac_prev=
  70.     continue
  71.   fi
  72.  
  73.   case "$ac_option" in
  74.   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  75.   *) ac_optarg= ;;
  76.   esac
  77.  
  78.   # Accept the important Cygnus configure options, so we can diagnose typos.
  79.  
  80.   case "$ac_option" in
  81.  
  82.   -bindir | --bindir | --bindi | --bind | --bin | --bi)
  83.     ac_prev=bindir ;;
  84.   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
  85.     bindir="$ac_optarg" ;;
  86.  
  87.   -build | --build | --buil | --bui | --bu)
  88.     ac_prev=build ;;
  89.   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
  90.     build="$ac_optarg" ;;
  91.  
  92.   -cache-file | --cache-file | --cache-fil | --cache-fi \
  93.   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  94.     ac_prev=cache_file ;;
  95.   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  96.   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  97.     cache_file="$ac_optarg" ;;
  98.  
  99.   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
  100.     ac_prev=datadir ;;
  101.   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
  102.   | --da=*)
  103.     datadir="$ac_optarg" ;;
  104.  
  105.   -disable-* | --disable-*)
  106.     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
  107.     # Reject names that are not valid shell variable names.
  108.     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  109.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  110.     fi
  111.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  112.     eval "enable_${ac_feature}=no" ;;
  113.  
  114.   -enable-* | --enable-*)
  115.     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  116.     # Reject names that are not valid shell variable names.
  117.     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  118.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  119.     fi
  120.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  121.     case "$ac_option" in
  122.       *=*) ;;
  123.       *) ac_optarg=yes ;;
  124.     esac
  125.     eval "enable_${ac_feature}='$ac_optarg'" ;;
  126.  
  127.   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  128.   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  129.   | --exec | --exe | --ex)
  130.     ac_prev=exec_prefix ;;
  131.   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  132.   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  133.   | --exec=* | --exe=* | --ex=*)
  134.     exec_prefix="$ac_optarg" ;;
  135.  
  136.   -gas | --gas | --ga | --g)
  137.     # Obsolete; use --with-gas.
  138.     with_gas=yes ;;
  139.  
  140.   -help | --help | --hel | --he)
  141.     # Omit some internal or obsolete options to make the list less imposing.
  142.     # This message is too long to be a string in the A/UX 3.1 sh.
  143.     cat << EOF
  144. Usage: configure [options] [host]
  145. Options: [defaults in brackets after descriptions]
  146. Configuration:
  147.   --cache-file=FILE       cache test results in FILE
  148.   --help                  print this message
  149.   --no-create             do not create output files
  150.   --quiet, --silent       do not print \`checking...' messages
  151.   --version               print the version of autoconf that created configure
  152. Directory and file names:
  153.   --prefix=PREFIX         install architecture-independent files in PREFIX
  154.                           [$ac_default_prefix]
  155.   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
  156.                           [same as prefix]
  157.   --bindir=DIR            user executables in DIR [EPREFIX/bin]
  158.   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
  159.   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
  160.   --datadir=DIR           read-only architecture-independent data in DIR
  161.                           [PREFIX/share]
  162.   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
  163.   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
  164.                           [PREFIX/com]
  165.   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
  166.   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
  167.   --includedir=DIR        C header files in DIR [PREFIX/include]
  168.   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
  169.   --infodir=DIR           info documentation in DIR [PREFIX/info]
  170.   --mandir=DIR            man documentation in DIR [PREFIX/man]
  171.   --srcdir=DIR            find the sources in DIR [configure dir or ..]
  172.   --program-prefix=PREFIX prepend PREFIX to installed program names
  173.   --program-suffix=SUFFIX append SUFFIX to installed program names
  174.   --program-transform-name=PROGRAM
  175.                           run sed PROGRAM on installed program names
  176. EOF
  177.     cat << EOF
  178. Host type:
  179.   --build=BUILD           configure for building on BUILD [BUILD=HOST]
  180.   --host=HOST             configure for HOST [guessed]
  181.   --target=TARGET         configure for TARGET [TARGET=HOST]
  182. Features and packages:
  183.   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  184.   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  185.   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  186.   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  187.   --x-includes=DIR        X include files are in DIR
  188.   --x-libraries=DIR       X library files are in DIR
  189. EOF
  190.     if test -n "$ac_help"; then
  191.       echo "--enable and --with options recognized:$ac_help"
  192.     fi
  193.     exit 0 ;;
  194.  
  195.   -host | --host | --hos | --ho)
  196.     ac_prev=host ;;
  197.   -host=* | --host=* | --hos=* | --ho=*)
  198.     host="$ac_optarg" ;;
  199.  
  200.   -includedir | --includedir | --includedi | --included | --include \
  201.   | --includ | --inclu | --incl | --inc)
  202.     ac_prev=includedir ;;
  203.   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  204.   | --includ=* | --inclu=* | --incl=* | --inc=*)
  205.     includedir="$ac_optarg" ;;
  206.  
  207.   -infodir | --infodir | --infodi | --infod | --info | --inf)
  208.     ac_prev=infodir ;;
  209.   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
  210.     infodir="$ac_optarg" ;;
  211.  
  212.   -libdir | --libdir | --libdi | --libd)
  213.     ac_prev=libdir ;;
  214.   -libdir=* | --libdir=* | --libdi=* | --libd=*)
  215.     libdir="$ac_optarg" ;;
  216.  
  217.   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  218.   | --libexe | --libex | --libe)
  219.     ac_prev=libexecdir ;;
  220.   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  221.   | --libexe=* | --libex=* | --libe=*)
  222.     libexecdir="$ac_optarg" ;;
  223.  
  224.   -localstatedir | --localstatedir | --localstatedi | --localstated \
  225.   | --localstate | --localstat | --localsta | --localst \
  226.   | --locals | --local | --loca | --loc | --lo)
  227.     ac_prev=localstatedir ;;
  228.   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  229.   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
  230.   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
  231.     localstatedir="$ac_optarg" ;;
  232.  
  233.   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
  234.     ac_prev=mandir ;;
  235.   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
  236.     mandir="$ac_optarg" ;;
  237.  
  238.   -nfp | --nfp | --nf)
  239.     # Obsolete; use --without-fp.
  240.     with_fp=no ;;
  241.  
  242.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  243.   | --no-cr | --no-c)
  244.     no_create=yes ;;
  245.  
  246.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  247.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
  248.     no_recursion=yes ;;
  249.  
  250.   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
  251.   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
  252.   | --oldin | --oldi | --old | --ol | --o)
  253.     ac_prev=oldincludedir ;;
  254.   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
  255.   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
  256.   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
  257.     oldincludedir="$ac_optarg" ;;
  258.  
  259.   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  260.     ac_prev=prefix ;;
  261.   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  262.     prefix="$ac_optarg" ;;
  263.  
  264.   -program-prefix | --program-prefix | --program-prefi | --program-pref \
  265.   | --program-pre | --program-pr | --program-p)
  266.     ac_prev=program_prefix ;;
  267.   -program-prefix=* | --program-prefix=* | --program-prefi=* \
  268.   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  269.     program_prefix="$ac_optarg" ;;
  270.  
  271.   -program-suffix | --program-suffix | --program-suffi | --program-suff \
  272.   | --program-suf | --program-su | --program-s)
  273.     ac_prev=program_suffix ;;
  274.   -program-suffix=* | --program-suffix=* | --program-suffi=* \
  275.   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  276.     program_suffix="$ac_optarg" ;;
  277.  
  278.   -program-transform-name | --program-transform-name \
  279.   | --program-transform-nam | --program-transform-na \
  280.   | --program-transform-n | --program-transform- \
  281.   | --program-transform | --program-transfor \
  282.   | --program-transfo | --program-transf \
  283.   | --program-trans | --program-tran \
  284.   | --progr-tra | --program-tr | --program-t)
  285.     ac_prev=program_transform_name ;;
  286.   -program-transform-name=* | --program-transform-name=* \
  287.   | --program-transform-nam=* | --program-transform-na=* \
  288.   | --program-transform-n=* | --program-transform-=* \
  289.   | --program-transform=* | --program-transfor=* \
  290.   | --program-transfo=* | --program-transf=* \
  291.   | --program-trans=* | --program-tran=* \
  292.   | --progr-tra=* | --program-tr=* | --program-t=*)
  293.     program_transform_name="$ac_optarg" ;;
  294.  
  295.   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  296.   | -silent | --silent | --silen | --sile | --sil)
  297.     silent=yes ;;
  298.  
  299.   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
  300.     ac_prev=sbindir ;;
  301.   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
  302.   | --sbi=* | --sb=*)
  303.     sbindir="$ac_optarg" ;;
  304.  
  305.   -sharedstatedir | --sharedstatedir | --sharedstatedi \
  306.   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
  307.   | --sharedst | --shareds | --shared | --share | --shar \
  308.   | --sha | --sh)
  309.     ac_prev=sharedstatedir ;;
  310.   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
  311.   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
  312.   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
  313.   | --sha=* | --sh=*)
  314.     sharedstatedir="$ac_optarg" ;;
  315.  
  316.   -site | --site | --sit)
  317.     ac_prev=site ;;
  318.   -site=* | --site=* | --sit=*)
  319.     site="$ac_optarg" ;;
  320.  
  321.   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  322.     ac_prev=srcdir ;;
  323.   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  324.     srcdir="$ac_optarg" ;;
  325.  
  326.   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
  327.   | --syscon | --sysco | --sysc | --sys | --sy)
  328.     ac_prev=sysconfdir ;;
  329.   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
  330.   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
  331.     sysconfdir="$ac_optarg" ;;
  332.  
  333.   -target | --target | --targe | --targ | --tar | --ta | --t)
  334.     ac_prev=target ;;
  335.   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  336.     target="$ac_optarg" ;;
  337.  
  338.   -v | -verbose | --verbose | --verbos | --verbo | --verb)
  339.     verbose=yes ;;
  340.  
  341.   -version | --version | --versio | --versi | --vers)
  342.     echo "configure generated by autoconf version 2.13"
  343.     exit 0 ;;
  344.  
  345.   -with-* | --with-*)
  346.     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  347.     # Reject names that are not valid shell variable names.
  348.     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  349.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  350.     fi
  351.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  352.     case "$ac_option" in
  353.       *=*) ;;
  354.       *) ac_optarg=yes ;;
  355.     esac
  356.     eval "with_${ac_package}='$ac_optarg'" ;;
  357.  
  358.   -without-* | --without-*)
  359.     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
  360.     # Reject names that are not valid shell variable names.
  361.     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  362.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  363.     fi
  364.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  365.     eval "with_${ac_package}=no" ;;
  366.  
  367.   --x)
  368.     # Obsolete; use --with-x.
  369.     with_x=yes ;;
  370.  
  371.   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  372.   | --x-incl | --x-inc | --x-in | --x-i)
  373.     ac_prev=x_includes ;;
  374.   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  375.   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  376.     x_includes="$ac_optarg" ;;
  377.  
  378.   -x-libraries | --x-libraries | --x-librarie | --x-librari \
  379.   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  380.     ac_prev=x_libraries ;;
  381.   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  382.   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  383.     x_libraries="$ac_optarg" ;;
  384.  
  385.   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
  386.     ;;
  387.  
  388.   *)
  389.     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  390.       echo "configure: warning: $ac_option: invalid host type" 1>&2
  391.     fi
  392.     if test "x$nonopt" != xNONE; then
  393.       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
  394.     fi
  395.     nonopt="$ac_option"
  396.     ;;
  397.  
  398.   esac
  399. done
  400.  
  401. if test -n "$ac_prev"; then
  402.   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
  403. fi
  404.  
  405. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  406.  
  407. # File descriptor usage:
  408. # 0 standard input
  409. # 1 file creation
  410. # 2 errors and warnings
  411. # 3 some systems may open it to /dev/tty
  412. # 4 used on the Kubota Titan
  413. # 6 checking for... messages and results
  414. # 5 compiler messages saved in config.log
  415. if test "$silent" = yes; then
  416.   exec 6>/dev/null
  417. else
  418.   exec 6>&1
  419. fi
  420. exec 5>./config.log
  421.  
  422. echo "\
  423. This file contains any messages produced by compilers while
  424. running configure, to aid debugging if configure makes a mistake.
  425. " 1>&5
  426.  
  427. # Strip out --no-create and --no-recursion so they do not pile up.
  428. # Also quote any args containing shell metacharacters.
  429. ac_configure_args=
  430. for ac_arg
  431. do
  432.   case "$ac_arg" in
  433.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  434.   | --no-cr | --no-c) ;;
  435.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  436.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  437.   *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  438.   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  439.   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  440.   esac
  441. done
  442.  
  443. # NLS nuisances.
  444. # Only set these to C if already set.  These must not be set unconditionally
  445. # because not all systems understand e.g. LANG=C (notably SCO).
  446. # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
  447. # Non-C LC_CTYPE values break the ctype check.
  448. if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
  449. if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
  450. if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
  451. if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
  452.  
  453. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  454. rm -rf conftest* confdefs.h
  455. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  456. echo > confdefs.h
  457.  
  458. # A filename unique to this package, relative to the directory that
  459. # configure is in, which we can look for to find out if srcdir is correct.
  460. ac_unique_file=16bit.h
  461.  
  462. # Find the source files, if location was not specified.
  463. if test -z "$srcdir"; then
  464.   ac_srcdir_defaulted=yes
  465.   # Try the directory containing this script, then its parent.
  466.   ac_prog=$0
  467.   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  468.   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  469.   srcdir=$ac_confdir
  470.   if test ! -r $srcdir/$ac_unique_file; then
  471.     srcdir=..
  472.   fi
  473. else
  474.   ac_srcdir_defaulted=no
  475. fi
  476. if test ! -r $srcdir/$ac_unique_file; then
  477.   if test "$ac_srcdir_defaulted" = yes; then
  478.     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  479.   else
  480.     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  481.   fi
  482. fi
  483. srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
  484.  
  485. # Prefer explicitly selected file to automatically selected ones.
  486. if test -z "$CONFIG_SITE"; then
  487.   if test "x$prefix" != xNONE; then
  488.     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  489.   else
  490.     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  491.   fi
  492. fi
  493. for ac_site_file in $CONFIG_SITE; do
  494.   if test -r "$ac_site_file"; then
  495.     echo "loading site script $ac_site_file"
  496.     . "$ac_site_file"
  497.   fi
  498. done
  499.  
  500. if test -r "$cache_file"; then
  501.   echo "loading cache $cache_file"
  502.   . $cache_file
  503. else
  504.   echo "creating cache $cache_file"
  505.   > $cache_file
  506. fi
  507.  
  508. ac_ext=c
  509. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  510. ac_cpp='$CPP $CPPFLAGS'
  511. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  512. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  513. cross_compiling=$ac_cv_prog_cc_cross
  514.  
  515. ac_exeext=
  516. ac_objext=o
  517. if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  518.   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  519.   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
  520.     ac_n= ac_c='
  521. ' ac_t='    '
  522.   else
  523.     ac_n=-n ac_c= ac_t=
  524.   fi
  525. else
  526.   ac_n= ac_c='\c' ac_t=
  527. fi
  528.  
  529.  
  530.  
  531.  
  532.  
  533.  
  534. # Check whether --with-mwcc or --without-mwcc was given.
  535. if test "${with_mwcc+set}" = set; then
  536.   withval="$with_mwcc"
  537.   if test "$withval" != "yes"; then
  538. CC="$withval";
  539. else
  540. CC="nmwccx86 --gcc-compat"
  541. fi
  542. CFLAGS="-inline all -g $CFLAGS"
  543. if test "$LD" = ""; then
  544. LD="gcc";
  545. fi
  546. LIBS="$LIBS /mnt/zip/libmwcc-2.4.a"
  547.  
  548. fi
  549.  
  550.  
  551.  
  552. MAPFLAGS="-Wl,-cref -Wl,-Map -Wl,@OUTFILE@.map"
  553. ARFLAGS="rcsu"
  554. DEPFLAGS="-MD"
  555.  
  556. # Extract the first word of "gcc", so it can be a program name with args.
  557. set dummy gcc; ac_word=$2
  558. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  559. echo "configure:560: checking for $ac_word" >&5
  560. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  561.   echo $ac_n "(cached) $ac_c" 1>&6
  562. else
  563.   if test -n "$CC"; then
  564.   ac_cv_prog_CC="$CC" # Let the user override the test.
  565. else
  566.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  567.   ac_dummy="$PATH"
  568.   for ac_dir in $ac_dummy; do
  569.     test -z "$ac_dir" && ac_dir=.
  570.     if test -f $ac_dir/$ac_word; then
  571.       ac_cv_prog_CC="gcc"
  572.       break
  573.     fi
  574.   done
  575.   IFS="$ac_save_ifs"
  576. fi
  577. fi
  578. CC="$ac_cv_prog_CC"
  579. if test -n "$CC"; then
  580.   echo "$ac_t""$CC" 1>&6
  581. else
  582.   echo "$ac_t""no" 1>&6
  583. fi
  584.  
  585. if test -z "$CC"; then
  586.   # Extract the first word of "cc", so it can be a program name with args.
  587. set dummy cc; ac_word=$2
  588. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  589. echo "configure:590: checking for $ac_word" >&5
  590. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  591.   echo $ac_n "(cached) $ac_c" 1>&6
  592. else
  593.   if test -n "$CC"; then
  594.   ac_cv_prog_CC="$CC" # Let the user override the test.
  595. else
  596.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  597.   ac_prog_rejected=no
  598.   ac_dummy="$PATH"
  599.   for ac_dir in $ac_dummy; do
  600.     test -z "$ac_dir" && ac_dir=.
  601.     if test -f $ac_dir/$ac_word; then
  602.       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
  603.         ac_prog_rejected=yes
  604.     continue
  605.       fi
  606.       ac_cv_prog_CC="cc"
  607.       break
  608.     fi
  609.   done
  610.   IFS="$ac_save_ifs"
  611. if test $ac_prog_rejected = yes; then
  612.   # We found a bogon in the path, so make sure we never use it.
  613.   set dummy $ac_cv_prog_CC
  614.   shift
  615.   if test $# -gt 0; then
  616.     # We chose a different compiler from the bogus one.
  617.     # However, it has the same basename, so the bogon will be chosen
  618.     # first if we set CC to just the basename; use the full file name.
  619.     shift
  620.     set dummy "$ac_dir/$ac_word" "$@"
  621.     shift
  622.     ac_cv_prog_CC="$@"
  623.   fi
  624. fi
  625. fi
  626. fi
  627. CC="$ac_cv_prog_CC"
  628. if test -n "$CC"; then
  629.   echo "$ac_t""$CC" 1>&6
  630. else
  631.   echo "$ac_t""no" 1>&6
  632. fi
  633.  
  634.   if test -z "$CC"; then
  635.     case "`uname -s`" in
  636.     *win32* | *WIN32*)
  637.       # Extract the first word of "cl", so it can be a program name with args.
  638. set dummy cl; ac_word=$2
  639. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  640. echo "configure:641: checking for $ac_word" >&5
  641. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  642.   echo $ac_n "(cached) $ac_c" 1>&6
  643. else
  644.   if test -n "$CC"; then
  645.   ac_cv_prog_CC="$CC" # Let the user override the test.
  646. else
  647.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  648.   ac_dummy="$PATH"
  649.   for ac_dir in $ac_dummy; do
  650.     test -z "$ac_dir" && ac_dir=.
  651.     if test -f $ac_dir/$ac_word; then
  652.       ac_cv_prog_CC="cl"
  653.       break
  654.     fi
  655.   done
  656.   IFS="$ac_save_ifs"
  657. fi
  658. fi
  659. CC="$ac_cv_prog_CC"
  660. if test -n "$CC"; then
  661.   echo "$ac_t""$CC" 1>&6
  662. else
  663.   echo "$ac_t""no" 1>&6
  664. fi
  665.  ;;
  666.     esac
  667.   fi
  668.   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
  669. fi
  670.  
  671. echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
  672. echo "configure:673: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
  673.  
  674. ac_ext=c
  675. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  676. ac_cpp='$CPP $CPPFLAGS'
  677. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  678. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  679. cross_compiling=$ac_cv_prog_cc_cross
  680.  
  681. cat > conftest.$ac_ext << EOF
  682.  
  683. #line 684 "configure"
  684. #include "confdefs.h"
  685.  
  686. main(){return(0);}
  687. EOF
  688. if { (eval echo configure:689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  689.   ac_cv_prog_cc_works=yes
  690.   # If we can't run a trivial program, we are probably using a cross compiler.
  691.   if (./conftest; exit) 2>/dev/null; then
  692.     ac_cv_prog_cc_cross=no
  693.   else
  694.     ac_cv_prog_cc_cross=yes
  695.   fi
  696. else
  697.   echo "configure: failed program was:" >&5
  698.   cat conftest.$ac_ext >&5
  699.   ac_cv_prog_cc_works=no
  700. fi
  701. rm -fr conftest*
  702. ac_ext=c
  703. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  704. ac_cpp='$CPP $CPPFLAGS'
  705. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  706. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  707. cross_compiling=$ac_cv_prog_cc_cross
  708.  
  709. echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
  710. if test $ac_cv_prog_cc_works = no; then
  711.   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
  712. fi
  713. echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
  714. echo "configure:715: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
  715. echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
  716. cross_compiling=$ac_cv_prog_cc_cross
  717.  
  718. echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
  719. echo "configure:720: checking whether we are using GNU C" >&5
  720. if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
  721.   echo $ac_n "(cached) $ac_c" 1>&6
  722. else
  723.   cat > conftest.c <<EOF
  724. #ifdef __GNUC__
  725.   yes;
  726. #endif
  727. EOF
  728. if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:729: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  729.   ac_cv_prog_gcc=yes
  730. else
  731.   ac_cv_prog_gcc=no
  732. fi
  733. fi
  734.  
  735. echo "$ac_t""$ac_cv_prog_gcc" 1>&6
  736.  
  737. if test $ac_cv_prog_gcc = yes; then
  738.   GCC=yes
  739. else
  740.   GCC=
  741. fi
  742.  
  743. ac_test_CFLAGS="${CFLAGS+set}"
  744. ac_save_CFLAGS="$CFLAGS"
  745. CFLAGS=
  746. echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
  747. echo "configure:748: checking whether ${CC-cc} accepts -g" >&5
  748. if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
  749.   echo $ac_n "(cached) $ac_c" 1>&6
  750. else
  751.   echo 'void f(){}' > conftest.c
  752. if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  753.   ac_cv_prog_cc_g=yes
  754. else
  755.   ac_cv_prog_cc_g=no
  756. fi
  757. rm -f conftest*
  758.  
  759. fi
  760.  
  761. echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
  762. if test "$ac_test_CFLAGS" = set; then
  763.   CFLAGS="$ac_save_CFLAGS"
  764. elif test $ac_cv_prog_cc_g = yes; then
  765.   if test "$GCC" = yes; then
  766.     CFLAGS="-g -O2"
  767.   else
  768.     CFLAGS="-g"
  769.   fi
  770. else
  771.   if test "$GCC" = yes; then
  772.     CFLAGS="-O2"
  773.   else
  774.     CFLAGS=
  775.   fi
  776. fi
  777.  
  778. if test "$LD" = ""; then
  779. LD=$CC
  780. fi
  781. for ac_prog in 'bison -y' byacc
  782. do
  783. # Extract the first word of "$ac_prog", so it can be a program name with args.
  784. set dummy $ac_prog; ac_word=$2
  785. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  786. echo "configure:787: checking for $ac_word" >&5
  787. if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
  788.   echo $ac_n "(cached) $ac_c" 1>&6
  789. else
  790.   if test -n "$YACC"; then
  791.   ac_cv_prog_YACC="$YACC" # Let the user override the test.
  792. else
  793.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  794.   ac_dummy="$PATH"
  795.   for ac_dir in $ac_dummy; do
  796.     test -z "$ac_dir" && ac_dir=.
  797.     if test -f $ac_dir/$ac_word; then
  798.       ac_cv_prog_YACC="$ac_prog"
  799.       break
  800.     fi
  801.   done
  802.   IFS="$ac_save_ifs"
  803. fi
  804. fi
  805. YACC="$ac_cv_prog_YACC"
  806. if test -n "$YACC"; then
  807.   echo "$ac_t""$YACC" 1>&6
  808. else
  809.   echo "$ac_t""no" 1>&6
  810. fi
  811.  
  812. test -n "$YACC" && break
  813. done
  814. test -n "$YACC" || YACC="yacc"
  815.  
  816. # Extract the first word of "flex", so it can be a program name with args.
  817. set dummy flex; ac_word=$2
  818. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  819. echo "configure:820: checking for $ac_word" >&5
  820. if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
  821.   echo $ac_n "(cached) $ac_c" 1>&6
  822. else
  823.   if test -n "$LEX"; then
  824.   ac_cv_prog_LEX="$LEX" # Let the user override the test.
  825. else
  826.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  827.   ac_dummy="$PATH"
  828.   for ac_dir in $ac_dummy; do
  829.     test -z "$ac_dir" && ac_dir=.
  830.     if test -f $ac_dir/$ac_word; then
  831.       ac_cv_prog_LEX="flex"
  832.       break
  833.     fi
  834.   done
  835.   IFS="$ac_save_ifs"
  836.   test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
  837. fi
  838. fi
  839. LEX="$ac_cv_prog_LEX"
  840. if test -n "$LEX"; then
  841.   echo "$ac_t""$LEX" 1>&6
  842. else
  843.   echo "$ac_t""no" 1>&6
  844. fi
  845.  
  846. if test -z "$LEXLIB"
  847. then
  848.   case "$LEX" in
  849.   flex*) ac_lib=fl ;;
  850.   *) ac_lib=l ;;
  851.   esac
  852.   echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
  853. echo "configure:854: checking for yywrap in -l$ac_lib" >&5
  854. ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
  855. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  856.   echo $ac_n "(cached) $ac_c" 1>&6
  857. else
  858.   ac_save_LIBS="$LIBS"
  859. LIBS="-l$ac_lib  $LIBS"
  860. cat > conftest.$ac_ext <<EOF
  861. #line 862 "configure"
  862. #include "confdefs.h"
  863. /* Override any gcc2 internal prototype to avoid an error.  */
  864. /* We use char because int might match the return type of a gcc2
  865.     builtin and then its argument prototype would still apply.  */
  866. char yywrap();
  867.  
  868. int main() {
  869. yywrap()
  870. ; return 0; }
  871. EOF
  872. if { (eval echo configure:873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  873.   rm -rf conftest*
  874.   eval "ac_cv_lib_$ac_lib_var=yes"
  875. else
  876.   echo "configure: failed program was:" >&5
  877.   cat conftest.$ac_ext >&5
  878.   rm -rf conftest*
  879.   eval "ac_cv_lib_$ac_lib_var=no"
  880. fi
  881. rm -f conftest*
  882. LIBS="$ac_save_LIBS"
  883.  
  884. fi
  885. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  886.   echo "$ac_t""yes" 1>&6
  887.   LEXLIB="-l$ac_lib"
  888. else
  889.   echo "$ac_t""no" 1>&6
  890. fi
  891.  
  892. fi
  893.  
  894. echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
  895. echo "configure:896: checking whether ${MAKE-make} sets \${MAKE}" >&5
  896. set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
  897. if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
  898.   echo $ac_n "(cached) $ac_c" 1>&6
  899. else
  900.   cat > conftestmake <<\EOF
  901. all:
  902.     @echo 'ac_maketemp="${MAKE}"'
  903. EOF
  904. # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
  905. eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
  906. if test -n "$ac_maketemp"; then
  907.   eval ac_cv_prog_make_${ac_make}_set=yes
  908. else
  909.   eval ac_cv_prog_make_${ac_make}_set=no
  910. fi
  911. rm -f conftestmake
  912. fi
  913. if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
  914.   echo "$ac_t""yes" 1>&6
  915.   SET_MAKE=
  916. else
  917.   echo "$ac_t""no" 1>&6
  918.   SET_MAKE="MAKE=${MAKE-make}"
  919. fi
  920.  
  921. echo $ac_n "checking perl""... $ac_c" 1>&6
  922. echo "configure:923: checking perl" >&5
  923. if perl -e print; then PERL=perl;
  924. elif /usr/bin/perl -e print; then PERL=/usr/bin/perl;
  925. elif /usr/local/bin/perl -e print; then PERL=/usr/local/bin/perl;
  926. else { echo "configure: error: not found" 1>&2; exit 1; }
  927. PERL=true
  928. fi
  929. if test "$PERL" != ""; then
  930. echo "$ac_t""$PERL" 1>&6
  931. fi
  932.  
  933.  
  934. TOP=`pwd`
  935.  
  936.  
  937. MODSRCS="$MODSRCS video_null.c keyboard_null.c sound_null.c"
  938. MODSRCS="$MODSRCS dsr_emudisk.c dsr_realdisk.c dsr_rs232.c"
  939. cat >> confdefs.h <<\EOF
  940. #define NULL_VIDEO 1
  941. EOF
  942.  
  943. cat >> confdefs.h <<\EOF
  944. #define NULL_KEYBOARD 1
  945. EOF
  946.  
  947. cat >> confdefs.h <<\EOF
  948. #define NULL_SOUND 1
  949. EOF
  950.  
  951. cat >> confdefs.h <<\EOF
  952. #define EMU_DISK_DSR 1
  953. EOF
  954.  
  955. cat >> confdefs.h <<\EOF
  956. #define REAL_DISK_DSR 1
  957. EOF
  958.  
  959. cat >> confdefs.h <<\EOF
  960. #define REAL_RS232_DSR 1
  961. EOF
  962.  
  963.  
  964. echo $ac_n "checking host operating system""... $ac_c" 1>&6
  965. echo "configure:966: checking host operating system" >&5
  966. HOSTOS=
  967.  
  968. cat > conftest.$ac_ext <<EOF
  969. #line 970 "configure"
  970. #include "confdefs.h"
  971.  
  972. int main() {
  973. #if !defined(__unix__) && !defined(__unix)
  974. #error not unix
  975. #endif
  976. ; return 0; }
  977. EOF
  978. if { (eval echo configure:979: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  979.   rm -rf conftest*
  980.   cat >> confdefs.h <<\EOF
  981. #define UNDER_UNIX 1
  982. EOF
  983.  
  984. HOSTOS="Unix"
  985. SRCS="$SRCS unixmain.c"
  986. INCDIRS="$INCDIRS $TOP/Modules/Unix"
  987. OSLIBSRCS="$OSLIBSRCS Posix.c"
  988. LIBS="$LIBS -lpthread"
  989. UNIXMODSRCS="$UNIXMODSRCS dsr_rs232_unix.c"
  990.  
  991. else
  992.   echo "configure: failed program was:" >&5
  993.   cat conftest.$ac_ext >&5
  994. fi
  995. rm -f conftest*
  996.  
  997. if test "$HOSTOS" = ""; then
  998. cat > conftest.$ac_ext <<EOF
  999. #line 1000 "configure"
  1000. #include "confdefs.h"
  1001.  
  1002. int main() {
  1003. #if !defined(_WIN32)
  1004. #error not _WIN32
  1005. #endif
  1006. ; return 0; }
  1007. EOF
  1008. if { (eval echo configure:1009: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1009.   rm -rf conftest*
  1010.   cat >> confdefs.h <<\EOF
  1011. #define UNDER_WIN32 1
  1012. EOF
  1013.  
  1014. cat >> confdefs.h <<\EOF
  1015. #define USE_MM_TIMER 1
  1016. EOF
  1017.  
  1018. cat >> confdefs.h <<\EOF
  1019. #define WIN32_VIDEO 1
  1020. EOF
  1021.  cat >> confdefs.h <<\EOF
  1022. #define WIN32_KEYBOARD 1
  1023. EOF
  1024.  
  1025. cat >> confdefs.h <<\EOF
  1026. #define WIN32_SOUND 1
  1027. EOF
  1028.  cat >> confdefs.h <<\EOF
  1029. #define USE_MM_TIMER 1
  1030. EOF
  1031.  
  1032. HOSTOS="Win32"
  1033. SRCS="$SRCS winmain.c"
  1034. INCDIRS="$INCDIRS $TOP/source/Modules/Win32"
  1035. OSLIBSRCS="$OSLIBSRCS Win32.c"
  1036. UNIXMODSRCS="$UNIXMODSRCS dsr_rs232_win32.c"
  1037.  
  1038. else
  1039.   echo "configure: failed program was:" >&5
  1040.   cat conftest.$ac_ext >&5
  1041. fi
  1042. rm -f conftest*
  1043. fi
  1044.  
  1045. if test "$HOSTOS" = ""; then
  1046. cat > conftest.$ac_ext <<EOF
  1047. #line 1048 "configure"
  1048. #include "confdefs.h"
  1049.  
  1050. int main() {
  1051. #if !defined(macintosh)
  1052. #error not macintosh
  1053. #endif
  1054. ; return 0; }
  1055. EOF
  1056. if { (eval echo configure:1057: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1057.   rm -rf conftest*
  1058.   cat >> confdefs.h <<\EOF
  1059. #define UNDER_MACOS 1
  1060. EOF
  1061.  
  1062. HOSTOS="MacOs"
  1063. SRCS="$SRCS macosmain.c"
  1064. INCDIRS="$INCDIRS $TOP/source/Modules/MacOS"
  1065. OSLIBSRCS="$OSLIBSRCS MacOS.c"
  1066.  
  1067. else
  1068.   echo "configure: failed program was:" >&5
  1069.   cat conftest.$ac_ext >&5
  1070. fi
  1071. rm -f conftest*
  1072. { echo "configure: error: nothing is ported to MacOS yet" 1>&2; exit 1; }
  1073. fi
  1074.  
  1075. if test "$HOSTOS" = ""; then
  1076. { echo "configure: error: could not determine host operating system" 1>&2; exit 1; }
  1077. fi
  1078.  
  1079.  
  1080. echo "$ac_t""$HOSTOS" 1>&6
  1081.  
  1082. echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
  1083. echo "configure:1084: checking for Cygwin environment" >&5
  1084. if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
  1085.   echo $ac_n "(cached) $ac_c" 1>&6
  1086. else
  1087.   cat > conftest.$ac_ext <<EOF
  1088. #line 1089 "configure"
  1089. #include "confdefs.h"
  1090.  
  1091. int main() {
  1092.  
  1093. #ifndef __CYGWIN__
  1094. #define __CYGWIN__ __CYGWIN32__
  1095. #endif
  1096. return __CYGWIN__;
  1097. ; return 0; }
  1098. EOF
  1099. if { (eval echo configure:1100: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1100.   rm -rf conftest*
  1101.   ac_cv_cygwin=yes
  1102. else
  1103.   echo "configure: failed program was:" >&5
  1104.   cat conftest.$ac_ext >&5
  1105.   rm -rf conftest*
  1106.   ac_cv_cygwin=no
  1107. fi
  1108. rm -f conftest*
  1109. rm -f conftest*
  1110. fi
  1111.  
  1112. echo "$ac_t""$ac_cv_cygwin" 1>&6
  1113. CYGWIN=
  1114. test "$ac_cv_cygwin" = yes && CYGWIN=yes
  1115. echo $ac_n "checking for object suffix""... $ac_c" 1>&6
  1116. echo "configure:1117: checking for object suffix" >&5
  1117. if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
  1118.   echo $ac_n "(cached) $ac_c" 1>&6
  1119. else
  1120.   rm -f conftest*
  1121. echo 'int i = 1;' > conftest.$ac_ext
  1122. if { (eval echo configure:1123: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1123.   for ac_file in conftest.*; do
  1124.     case $ac_file in
  1125.     *.c) ;;
  1126.     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
  1127.     esac
  1128.   done
  1129. else
  1130.   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
  1131. fi
  1132. rm -f conftest*
  1133. fi
  1134.  
  1135. echo "$ac_t""$ac_cv_objext" 1>&6
  1136. OBJEXT=$ac_cv_objext
  1137. ac_objext=$ac_cv_objext
  1138.  
  1139. echo $ac_n "checking for long file names""... $ac_c" 1>&6
  1140. echo "configure:1141: checking for long file names" >&5
  1141. if eval "test \"`echo '$''{'ac_cv_sys_long_file_names'+set}'`\" = set"; then
  1142.   echo $ac_n "(cached) $ac_c" 1>&6
  1143. else
  1144.   ac_cv_sys_long_file_names=yes
  1145. # Test for long file names in all the places we know might matter:
  1146. #      .        the current directory, where building will happen
  1147. #      $prefix/lib    where we will be installing things
  1148. #      $exec_prefix/lib    likewise
  1149. # eval it to expand exec_prefix.
  1150. #      $TMPDIR        if set, where it might want to write temporary files
  1151. # if $TMPDIR is not set:
  1152. #      /tmp        where it might want to write temporary files
  1153. #      /var/tmp        likewise
  1154. #      /usr/tmp        likewise
  1155. if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
  1156.   ac_tmpdirs="$TMPDIR"
  1157. else
  1158.   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
  1159. fi
  1160. for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
  1161.   test -d $ac_dir || continue
  1162.   test -w $ac_dir || continue # It is less confusing to not echo anything here.
  1163.   (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
  1164.   (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
  1165.   val=`cat $ac_dir/conftest9012345 2>/dev/null`
  1166.   if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
  1167.     ac_cv_sys_long_file_names=no
  1168.     rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
  1169.     break
  1170.   fi
  1171.   rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
  1172. done
  1173. fi
  1174.  
  1175. echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
  1176. if test $ac_cv_sys_long_file_names = yes; then
  1177.   cat >> confdefs.h <<\EOF
  1178. #define HAVE_LONG_FILE_NAMES 1
  1179. EOF
  1180.  
  1181. fi
  1182.  
  1183.  
  1184. #AC_CHECK_LIB(readline, readline,
  1185. #    [LIBS="$LIBS -lreadline -ltermcap"; AC_DEFINE(HAVE_READLINE)],,-ltermcap)
  1186. echo $ac_n "checking for png_create_write_struct in -lpng""... $ac_c" 1>&6
  1187. echo "configure:1188: checking for png_create_write_struct in -lpng" >&5
  1188. ac_lib_var=`echo png'_'png_create_write_struct | sed 'y%./+-%__p_%'`
  1189. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1190.   echo $ac_n "(cached) $ac_c" 1>&6
  1191. else
  1192.   ac_save_LIBS="$LIBS"
  1193. LIBS="-lpng -lz $LIBS"
  1194. cat > conftest.$ac_ext <<EOF
  1195. #line 1196 "configure"
  1196. #include "confdefs.h"
  1197. /* Override any gcc2 internal prototype to avoid an error.  */
  1198. /* We use char because int might match the return type of a gcc2
  1199.     builtin and then its argument prototype would still apply.  */
  1200. char png_create_write_struct();
  1201.  
  1202. int main() {
  1203. png_create_write_struct()
  1204. ; return 0; }
  1205. EOF
  1206. if { (eval echo configure:1207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1207.   rm -rf conftest*
  1208.   eval "ac_cv_lib_$ac_lib_var=yes"
  1209. else
  1210.   echo "configure: failed program was:" >&5
  1211.   cat conftest.$ac_ext >&5
  1212.   rm -rf conftest*
  1213.   eval "ac_cv_lib_$ac_lib_var=no"
  1214. fi
  1215. rm -f conftest*
  1216. LIBS="$ac_save_LIBS"
  1217.  
  1218. fi
  1219. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1220.   echo "$ac_t""yes" 1>&6
  1221.   LIBS="$LIBS -lpng -lz"; cat >> confdefs.h <<\EOF
  1222. #define WITH_LIB_PNG 1
  1223. EOF
  1224.  
  1225. else
  1226.   echo "$ac_t""no" 1>&6
  1227. fi
  1228.  
  1229.  
  1230. echo $ac_n "checking for vga_init in -lvga""... $ac_c" 1>&6
  1231. echo "configure:1232: checking for vga_init in -lvga" >&5
  1232. ac_lib_var=`echo vga'_'vga_init | sed 'y%./+-%__p_%'`
  1233. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1234.   echo $ac_n "(cached) $ac_c" 1>&6
  1235. else
  1236.   ac_save_LIBS="$LIBS"
  1237. LIBS="-lvga  $LIBS"
  1238. cat > conftest.$ac_ext <<EOF
  1239. #line 1240 "configure"
  1240. #include "confdefs.h"
  1241. /* Override any gcc2 internal prototype to avoid an error.  */
  1242. /* We use char because int might match the return type of a gcc2
  1243.     builtin and then its argument prototype would still apply.  */
  1244. char vga_init();
  1245.  
  1246. int main() {
  1247. vga_init()
  1248. ; return 0; }
  1249. EOF
  1250. if { (eval echo configure:1251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1251.   rm -rf conftest*
  1252.   eval "ac_cv_lib_$ac_lib_var=yes"
  1253. else
  1254.   echo "configure: failed program was:" >&5
  1255.   cat conftest.$ac_ext >&5
  1256.   rm -rf conftest*
  1257.   eval "ac_cv_lib_$ac_lib_var=no"
  1258. fi
  1259. rm -f conftest*
  1260. LIBS="$ac_save_LIBS"
  1261.  
  1262. fi
  1263. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1264.   echo "$ac_t""yes" 1>&6
  1265.   cat >> confdefs.h <<\EOF
  1266. #define LINUX_SVGA_VIDEO 1
  1267. EOF
  1268.  cat >> confdefs.h <<\EOF
  1269. #define LINUX_SVGA_KEYBOARD 1
  1270. EOF
  1271.  
  1272.     LIBS="$LIBS -lvga"
  1273.     SRCS="$SRCS svgaloop.c"
  1274.     UNIXMODSRCS="$UNIXMODSRCS keyboard_svgalib.c video_svgalib.c"
  1275. else
  1276.   echo "$ac_t""no" 1>&6
  1277. fi
  1278.  
  1279. echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
  1280. echo "configure:1281: checking how to run the C preprocessor" >&5
  1281. # On Suns, sometimes $CPP names a directory.
  1282. if test -n "$CPP" && test -d "$CPP"; then
  1283.   CPP=
  1284. fi
  1285. if test -z "$CPP"; then
  1286. if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
  1287.   echo $ac_n "(cached) $ac_c" 1>&6
  1288. else
  1289.     # This must be in double quotes, not single quotes, because CPP may get
  1290.   # substituted into the Makefile and "${CC-cc}" will confuse make.
  1291.   CPP="${CC-cc} -E"
  1292.   # On the NeXT, cc -E runs the code through the compiler's parser,
  1293.   # not just through cpp.
  1294.   cat > conftest.$ac_ext <<EOF
  1295. #line 1296 "configure"
  1296. #include "confdefs.h"
  1297. #include <assert.h>
  1298. Syntax Error
  1299. EOF
  1300. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1301. { (eval echo configure:1302: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1302. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1303. if test -z "$ac_err"; then
  1304.   :
  1305. else
  1306.   echo "$ac_err" >&5
  1307.   echo "configure: failed program was:" >&5
  1308.   cat conftest.$ac_ext >&5
  1309.   rm -rf conftest*
  1310.   CPP="${CC-cc} -E -traditional-cpp"
  1311.   cat > conftest.$ac_ext <<EOF
  1312. #line 1313 "configure"
  1313. #include "confdefs.h"
  1314. #include <assert.h>
  1315. Syntax Error
  1316. EOF
  1317. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1318. { (eval echo configure:1319: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1319. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1320. if test -z "$ac_err"; then
  1321.   :
  1322. else
  1323.   echo "$ac_err" >&5
  1324.   echo "configure: failed program was:" >&5
  1325.   cat conftest.$ac_ext >&5
  1326.   rm -rf conftest*
  1327.   CPP="${CC-cc} -nologo -E"
  1328.   cat > conftest.$ac_ext <<EOF
  1329. #line 1330 "configure"
  1330. #include "confdefs.h"
  1331. #include <assert.h>
  1332. Syntax Error
  1333. EOF
  1334. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1335. { (eval echo configure:1336: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1336. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1337. if test -z "$ac_err"; then
  1338.   :
  1339. else
  1340.   echo "$ac_err" >&5
  1341.   echo "configure: failed program was:" >&5
  1342.   cat conftest.$ac_ext >&5
  1343.   rm -rf conftest*
  1344.   CPP=/lib/cpp
  1345. fi
  1346. rm -f conftest*
  1347. fi
  1348. rm -f conftest*
  1349. fi
  1350. rm -f conftest*
  1351.   ac_cv_prog_CPP="$CPP"
  1352. fi
  1353.   CPP="$ac_cv_prog_CPP"
  1354. else
  1355.   ac_cv_prog_CPP="$CPP"
  1356. fi
  1357. echo "$ac_t""$CPP" 1>&6
  1358.  
  1359. for ac_hdr in linux/soundcard.h
  1360. do
  1361. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  1362. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  1363. echo "configure:1364: checking for $ac_hdr" >&5
  1364. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1365.   echo $ac_n "(cached) $ac_c" 1>&6
  1366. else
  1367.   cat > conftest.$ac_ext <<EOF
  1368. #line 1369 "configure"
  1369. #include "confdefs.h"
  1370. #include <$ac_hdr>
  1371. EOF
  1372. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1373. { (eval echo configure:1374: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1374. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1375. if test -z "$ac_err"; then
  1376.   rm -rf conftest*
  1377.   eval "ac_cv_header_$ac_safe=yes"
  1378. else
  1379.   echo "$ac_err" >&5
  1380.   echo "configure: failed program was:" >&5
  1381.   cat conftest.$ac_ext >&5
  1382.   rm -rf conftest*
  1383.   eval "ac_cv_header_$ac_safe=no"
  1384. fi
  1385. rm -f conftest*
  1386. fi
  1387. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1388.   echo "$ac_t""yes" 1>&6
  1389.     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  1390.   cat >> confdefs.h <<EOF
  1391. #define $ac_tr_hdr 1
  1392. EOF
  1393.  cat >> confdefs.h <<\EOF
  1394. #define OSS_SOUND 1
  1395. EOF
  1396.  
  1397.     UNIXMODSRCS="$UNIXMODSRCS sound_oss.c"
  1398. else
  1399.   echo "$ac_t""no" 1>&6
  1400. fi
  1401. done
  1402.  
  1403. for ac_hdr in sys/kd.h
  1404. do
  1405. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  1406. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  1407. echo "configure:1408: checking for $ac_hdr" >&5
  1408. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1409.   echo $ac_n "(cached) $ac_c" 1>&6
  1410. else
  1411.   cat > conftest.$ac_ext <<EOF
  1412. #line 1413 "configure"
  1413. #include "confdefs.h"
  1414. #include <$ac_hdr>
  1415. EOF
  1416. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1417. { (eval echo configure:1418: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1418. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1419. if test -z "$ac_err"; then
  1420.   rm -rf conftest*
  1421.   eval "ac_cv_header_$ac_safe=yes"
  1422. else
  1423.   echo "$ac_err" >&5
  1424.   echo "configure: failed program was:" >&5
  1425.   cat conftest.$ac_ext >&5
  1426.   rm -rf conftest*
  1427.   eval "ac_cv_header_$ac_safe=no"
  1428. fi
  1429. rm -f conftest*
  1430. fi
  1431. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1432.   echo "$ac_t""yes" 1>&6
  1433.     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  1434.   cat >> confdefs.h <<EOF
  1435. #define $ac_tr_hdr 1
  1436. EOF
  1437.  cat >> confdefs.h <<\EOF
  1438. #define LINUX_SPEAKER_SOUND 1
  1439. EOF
  1440.  
  1441.     UNIXMODSRCS="$UNIXMODSRCS sound_speaker.c"
  1442. else
  1443.   echo "$ac_t""no" 1>&6
  1444. fi
  1445. done
  1446.  
  1447. for ac_hdr in esd.h
  1448. do
  1449. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  1450. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  1451. echo "configure:1452: checking for $ac_hdr" >&5
  1452. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1453.   echo $ac_n "(cached) $ac_c" 1>&6
  1454. else
  1455.   cat > conftest.$ac_ext <<EOF
  1456. #line 1457 "configure"
  1457. #include "confdefs.h"
  1458. #include <$ac_hdr>
  1459. EOF
  1460. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1461. { (eval echo configure:1462: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1462. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1463. if test -z "$ac_err"; then
  1464.   rm -rf conftest*
  1465.   eval "ac_cv_header_$ac_safe=yes"
  1466. else
  1467.   echo "$ac_err" >&5
  1468.   echo "configure: failed program was:" >&5
  1469.   cat conftest.$ac_ext >&5
  1470.   rm -rf conftest*
  1471.   eval "ac_cv_header_$ac_safe=no"
  1472. fi
  1473. rm -f conftest*
  1474. fi
  1475. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1476.   echo "$ac_t""yes" 1>&6
  1477.     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  1478.   cat >> confdefs.h <<EOF
  1479. #define $ac_tr_hdr 1
  1480. EOF
  1481.  cat >> confdefs.h <<\EOF
  1482. #define ESD_SOUND 1
  1483. EOF
  1484.  
  1485.     UNIXMODSRCS="$UNIXMODSRCS sound_esd.c"
  1486.     LIBS="$LIBS -lesd"
  1487. else
  1488.   echo "$ac_t""no" 1>&6
  1489. fi
  1490. done
  1491.  
  1492.  
  1493. # If we find X, set shell vars x_includes and x_libraries to the
  1494. # paths, otherwise set no_x=yes.
  1495. # Uses ac_ vars as temps to allow command line to override cache and checks.
  1496. # --without-x overrides everything else, but does not touch the cache.
  1497. echo $ac_n "checking for X""... $ac_c" 1>&6
  1498. echo "configure:1499: checking for X" >&5
  1499.  
  1500. # Check whether --with-x or --without-x was given.
  1501. if test "${with_x+set}" = set; then
  1502.   withval="$with_x"
  1503.   :
  1504. fi
  1505.  
  1506. # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
  1507. if test "x$with_x" = xno; then
  1508.   # The user explicitly disabled X.
  1509.   have_x=disabled
  1510. else
  1511.   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
  1512.     # Both variables are already set.
  1513.     have_x=yes
  1514.   else
  1515. if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
  1516.   echo $ac_n "(cached) $ac_c" 1>&6
  1517. else
  1518.   # One or both of the vars are not set, and there is no cached value.
  1519. ac_x_includes=NO ac_x_libraries=NO
  1520. rm -fr conftestdir
  1521. if mkdir conftestdir; then
  1522.   cd conftestdir
  1523.   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
  1524.   cat > Imakefile <<'EOF'
  1525. acfindx:
  1526.     @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
  1527. EOF
  1528.   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
  1529.     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
  1530.     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
  1531.     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
  1532.     for ac_extension in a so sl; do
  1533.       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
  1534.         test -f $ac_im_libdir/libX11.$ac_extension; then
  1535.         ac_im_usrlibdir=$ac_im_libdir; break
  1536.       fi
  1537.     done
  1538.     # Screen out bogus values from the imake configuration.  They are
  1539.     # bogus both because they are the default anyway, and because
  1540.     # using them would break gcc on systems where it needs fixed includes.
  1541.     case "$ac_im_incroot" in
  1542.     /usr/include) ;;
  1543.     *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
  1544.     esac
  1545.     case "$ac_im_usrlibdir" in
  1546.     /usr/lib | /lib) ;;
  1547.     *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
  1548.     esac
  1549.   fi
  1550.   cd ..
  1551.   rm -fr conftestdir
  1552. fi
  1553.  
  1554. if test "$ac_x_includes" = NO; then
  1555.   # Guess where to find include files, by looking for this one X11 .h file.
  1556.   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
  1557.  
  1558.   # First, try using that file with no special directory specified.
  1559. cat > conftest.$ac_ext <<EOF
  1560. #line 1561 "configure"
  1561. #include "confdefs.h"
  1562. #include <$x_direct_test_include>
  1563. EOF
  1564. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1565. { (eval echo configure:1566: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1566. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1567. if test -z "$ac_err"; then
  1568.   rm -rf conftest*
  1569.   # We can compile using X headers with no special include directory.
  1570. ac_x_includes=
  1571. else
  1572.   echo "$ac_err" >&5
  1573.   echo "configure: failed program was:" >&5
  1574.   cat conftest.$ac_ext >&5
  1575.   rm -rf conftest*
  1576.   # Look for the header file in a standard set of common directories.
  1577. # Check X11 before X11Rn because it is often a symlink to the current release.
  1578.   for ac_dir in               \
  1579.     /usr/X11/include          \
  1580.     /usr/X11R6/include        \
  1581.     /usr/X11R5/include        \
  1582.     /usr/X11R4/include        \
  1583.                               \
  1584.     /usr/include/X11          \
  1585.     /usr/include/X11R6        \
  1586.     /usr/include/X11R5        \
  1587.     /usr/include/X11R4        \
  1588.                               \
  1589.     /usr/local/X11/include    \
  1590.     /usr/local/X11R6/include  \
  1591.     /usr/local/X11R5/include  \
  1592.     /usr/local/X11R4/include  \
  1593.                               \
  1594.     /usr/local/include/X11    \
  1595.     /usr/local/include/X11R6  \
  1596.     /usr/local/include/X11R5  \
  1597.     /usr/local/include/X11R4  \
  1598.                               \
  1599.     /usr/X386/include         \
  1600.     /usr/x386/include         \
  1601.     /usr/XFree86/include/X11  \
  1602.                               \
  1603.     /usr/include              \
  1604.     /usr/local/include        \
  1605.     /usr/unsupported/include  \
  1606.     /usr/athena/include       \
  1607.     /usr/local/x11r5/include  \
  1608.     /usr/lpp/Xamples/include  \
  1609.                               \
  1610.     /usr/openwin/include      \
  1611.     /usr/openwin/share/include \
  1612.     ; \
  1613.   do
  1614.     if test -r "$ac_dir/$x_direct_test_include"; then
  1615.       ac_x_includes=$ac_dir
  1616.       break
  1617.     fi
  1618.   done
  1619. fi
  1620. rm -f conftest*
  1621. fi # $ac_x_includes = NO
  1622.  
  1623. if test "$ac_x_libraries" = NO; then
  1624.   # Check for the libraries.
  1625.  
  1626.   test -z "$x_direct_test_library" && x_direct_test_library=Xt
  1627.   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
  1628.  
  1629.   # See if we find them without any special options.
  1630.   # Don't add to $LIBS permanently.
  1631.   ac_save_LIBS="$LIBS"
  1632.   LIBS="-l$x_direct_test_library $LIBS"
  1633. cat > conftest.$ac_ext <<EOF
  1634. #line 1635 "configure"
  1635. #include "confdefs.h"
  1636.  
  1637. int main() {
  1638. ${x_direct_test_function}()
  1639. ; return 0; }
  1640. EOF
  1641. if { (eval echo configure:1642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1642.   rm -rf conftest*
  1643.   LIBS="$ac_save_LIBS"
  1644. # We can link X programs with no special library path.
  1645. ac_x_libraries=
  1646. else
  1647.   echo "configure: failed program was:" >&5
  1648.   cat conftest.$ac_ext >&5
  1649.   rm -rf conftest*
  1650.   LIBS="$ac_save_LIBS"
  1651. # First see if replacing the include by lib works.
  1652. # Check X11 before X11Rn because it is often a symlink to the current release.
  1653. for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
  1654.     /usr/X11/lib          \
  1655.     /usr/X11R6/lib        \
  1656.     /usr/X11R5/lib        \
  1657.     /usr/X11R4/lib        \
  1658.                           \
  1659.     /usr/lib/X11          \
  1660.     /usr/lib/X11R6        \
  1661.     /usr/lib/X11R5        \
  1662.     /usr/lib/X11R4        \
  1663.                           \
  1664.     /usr/local/X11/lib    \
  1665.     /usr/local/X11R6/lib  \
  1666.     /usr/local/X11R5/lib  \
  1667.     /usr/local/X11R4/lib  \
  1668.                           \
  1669.     /usr/local/lib/X11    \
  1670.     /usr/local/lib/X11R6  \
  1671.     /usr/local/lib/X11R5  \
  1672.     /usr/local/lib/X11R4  \
  1673.                           \
  1674.     /usr/X386/lib         \
  1675.     /usr/x386/lib         \
  1676.     /usr/XFree86/lib/X11  \
  1677.                           \
  1678.     /usr/lib              \
  1679.     /usr/local/lib        \
  1680.     /usr/unsupported/lib  \
  1681.     /usr/athena/lib       \
  1682.     /usr/local/x11r5/lib  \
  1683.     /usr/lpp/Xamples/lib  \
  1684.     /lib/usr/lib/X11      \
  1685.                           \
  1686.     /usr/openwin/lib      \
  1687.     /usr/openwin/share/lib \
  1688.     ; \
  1689. do
  1690.   for ac_extension in a so sl; do
  1691.     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
  1692.       ac_x_libraries=$ac_dir
  1693.       break 2
  1694.     fi
  1695.   done
  1696. done
  1697. fi
  1698. rm -f conftest*
  1699. fi # $ac_x_libraries = NO
  1700.  
  1701. if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
  1702.   # Didn't find X anywhere.  Cache the known absence of X.
  1703.   ac_cv_have_x="have_x=no"
  1704. else
  1705.   # Record where we found X for the cache.
  1706.   ac_cv_have_x="have_x=yes \
  1707.             ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
  1708. fi
  1709. fi
  1710.   fi
  1711.   eval "$ac_cv_have_x"
  1712. fi # $with_x != no
  1713.  
  1714. if test "$have_x" != yes; then
  1715.   echo "$ac_t""$have_x" 1>&6
  1716.   no_x=yes
  1717. else
  1718.   # If each of the values was on the command line, it overrides each guess.
  1719.   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
  1720.   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
  1721.   # Update the cache value to reflect the command line values.
  1722.   ac_cv_have_x="have_x=yes \
  1723.         ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
  1724.   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
  1725. fi
  1726.  
  1727. if test "$no_x" = ""; then
  1728. cat >> confdefs.h <<\EOF
  1729. #define X_WIN_VIDEO 1
  1730. EOF
  1731.  
  1732. cat >> confdefs.h <<\EOF
  1733. #define X_WIN_KEYBOARD 1
  1734. EOF
  1735.  
  1736. SRCS="$SRCS xlibloop.c"
  1737. UNIXMODSRCS="$UNIXMODSRCS video_X.c keyboard_X.c"
  1738. INCS="$INCS $x_includes"
  1739. LIBS="$LIBS -L$x_libraries -lX11 -lXext -lXi"
  1740. fi
  1741.  
  1742. if test '( "$HOSTOS" = "Unix" && "$no_x" = "" )' || test "$HOSTOS" = "Win32" ; then
  1743. echo $ac_n "checking for gtk_init in -lgtk""... $ac_c" 1>&6
  1744. echo "configure:1745: checking for gtk_init in -lgtk" >&5
  1745. ac_lib_var=`echo gtk'_'gtk_init | sed 'y%./+-%__p_%'`
  1746. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1747.   echo $ac_n "(cached) $ac_c" 1>&6
  1748. else
  1749.   ac_save_LIBS="$LIBS"
  1750. LIBS="-lgtk -lgdk -lglib $LIBS"
  1751. cat > conftest.$ac_ext <<EOF
  1752. #line 1753 "configure"
  1753. #include "confdefs.h"
  1754. /* Override any gcc2 internal prototype to avoid an error.  */
  1755. /* We use char because int might match the return type of a gcc2
  1756.     builtin and then its argument prototype would still apply.  */
  1757. char gtk_init();
  1758.  
  1759. int main() {
  1760. gtk_init()
  1761. ; return 0; }
  1762. EOF
  1763. if { (eval echo configure:1764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1764.   rm -rf conftest*
  1765.   eval "ac_cv_lib_$ac_lib_var=yes"
  1766. else
  1767.   echo "configure: failed program was:" >&5
  1768.   cat conftest.$ac_ext >&5
  1769.   rm -rf conftest*
  1770.   eval "ac_cv_lib_$ac_lib_var=no"
  1771. fi
  1772. rm -f conftest*
  1773. LIBS="$ac_save_LIBS"
  1774.  
  1775. fi
  1776. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1777.   echo "$ac_t""yes" 1>&6
  1778.   has_gtk=yes
  1779. GTKSRCS="gtkloop.c gtkinterface.c gtksupport.c gtkcallbacks.c gtk_v99filesel.c"
  1780. GTKMODSRCS="video_gtk.c keyboard_gtk.c"
  1781. GTKLIBS="-lgtk -lgdk -lglib -lgmodule -ldl"
  1782.  
  1783. else
  1784.   echo "$ac_t""no" 1>&6
  1785. fi
  1786.  
  1787.  
  1788. # Check whether --with-gtk or --without-gtk was given.
  1789. if test "${with_gtk+set}" = set; then
  1790.   withval="$with_gtk"
  1791.   if test "$withval" = "yes"; then
  1792. if test "$has_gtk" = "yes"; then
  1793. cat >> confdefs.h <<\EOF
  1794. #define GTK_KEYBOARD 1
  1795. EOF
  1796.  cat >> confdefs.h <<\EOF
  1797. #define GTK_VIDEO 1
  1798. EOF
  1799.  
  1800. SRCS="$SRCS $GTKSRCS" MODSRCS="$MODSRCS $GTKMODSRCS" LIBS="$LIBS $GTKLIBS"
  1801. else
  1802. { echo "configure: error: GTK not found or not installed." 1>&2; exit 1; }
  1803. fi
  1804. fi
  1805. else
  1806.   
  1807. cat >> confdefs.h <<\EOF
  1808. #define GTK_KEYBOARD 1
  1809. EOF
  1810.  cat >> confdefs.h <<\EOF
  1811. #define GTK_VIDEO 1
  1812. EOF
  1813.  
  1814. SRCS="$SRCS $GTKSRCS" MODSRCS="$MODSRCS $GTKMODSRCS" LIBS="$LIBS $GTKLIBS"
  1815.  
  1816. fi
  1817.  
  1818.  
  1819. fi  # hostos==unix, hostos==win32
  1820.  
  1821. ac_header_dirent=no
  1822. for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
  1823. do
  1824. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  1825. echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
  1826. echo "configure:1827: checking for $ac_hdr that defines DIR" >&5
  1827. if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
  1828.   echo $ac_n "(cached) $ac_c" 1>&6
  1829. else
  1830.   cat > conftest.$ac_ext <<EOF
  1831. #line 1832 "configure"
  1832. #include "confdefs.h"
  1833. #include <sys/types.h>
  1834. #include <$ac_hdr>
  1835. int main() {
  1836. DIR *dirp = 0;
  1837. ; return 0; }
  1838. EOF
  1839. if { (eval echo configure:1840: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1840.   rm -rf conftest*
  1841.   eval "ac_cv_header_dirent_$ac_safe=yes"
  1842. else
  1843.   echo "configure: failed program was:" >&5
  1844.   cat conftest.$ac_ext >&5
  1845.   rm -rf conftest*
  1846.   eval "ac_cv_header_dirent_$ac_safe=no"
  1847. fi
  1848. rm -f conftest*
  1849. fi
  1850. if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
  1851.   echo "$ac_t""yes" 1>&6
  1852.     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  1853.   cat >> confdefs.h <<EOF
  1854. #define $ac_tr_hdr 1
  1855. EOF
  1856.  ac_header_dirent=$ac_hdr; break
  1857. else
  1858.   echo "$ac_t""no" 1>&6
  1859. fi
  1860. done
  1861. # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
  1862. if test $ac_header_dirent = dirent.h; then
  1863. echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
  1864. echo "configure:1865: checking for opendir in -ldir" >&5
  1865. ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
  1866. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1867.   echo $ac_n "(cached) $ac_c" 1>&6
  1868. else
  1869.   ac_save_LIBS="$LIBS"
  1870. LIBS="-ldir  $LIBS"
  1871. cat > conftest.$ac_ext <<EOF
  1872. #line 1873 "configure"
  1873. #include "confdefs.h"
  1874. /* Override any gcc2 internal prototype to avoid an error.  */
  1875. /* We use char because int might match the return type of a gcc2
  1876.     builtin and then its argument prototype would still apply.  */
  1877. char opendir();
  1878.  
  1879. int main() {
  1880. opendir()
  1881. ; return 0; }
  1882. EOF
  1883. if { (eval echo configure:1884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1884.   rm -rf conftest*
  1885.   eval "ac_cv_lib_$ac_lib_var=yes"
  1886. else
  1887.   echo "configure: failed program was:" >&5
  1888.   cat conftest.$ac_ext >&5
  1889.   rm -rf conftest*
  1890.   eval "ac_cv_lib_$ac_lib_var=no"
  1891. fi
  1892. rm -f conftest*
  1893. LIBS="$ac_save_LIBS"
  1894.  
  1895. fi
  1896. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1897.   echo "$ac_t""yes" 1>&6
  1898.   LIBS="$LIBS -ldir"
  1899. else
  1900.   echo "$ac_t""no" 1>&6
  1901. fi
  1902.  
  1903. else
  1904. echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
  1905. echo "configure:1906: checking for opendir in -lx" >&5
  1906. ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
  1907. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1908.   echo $ac_n "(cached) $ac_c" 1>&6
  1909. else
  1910.   ac_save_LIBS="$LIBS"
  1911. LIBS="-lx  $LIBS"
  1912. cat > conftest.$ac_ext <<EOF
  1913. #line 1914 "configure"
  1914. #include "confdefs.h"
  1915. /* Override any gcc2 internal prototype to avoid an error.  */
  1916. /* We use char because int might match the return type of a gcc2
  1917.     builtin and then its argument prototype would still apply.  */
  1918. char opendir();
  1919.  
  1920. int main() {
  1921. opendir()
  1922. ; return 0; }
  1923. EOF
  1924. if { (eval echo configure:1925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1925.   rm -rf conftest*
  1926.   eval "ac_cv_lib_$ac_lib_var=yes"
  1927. else
  1928.   echo "configure: failed program was:" >&5
  1929.   cat conftest.$ac_ext >&5
  1930.   rm -rf conftest*
  1931.   eval "ac_cv_lib_$ac_lib_var=no"
  1932. fi
  1933. rm -f conftest*
  1934. LIBS="$ac_save_LIBS"
  1935.  
  1936. fi
  1937. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1938.   echo "$ac_t""yes" 1>&6
  1939.   LIBS="$LIBS -lx"
  1940. else
  1941.   echo "$ac_t""no" 1>&6
  1942. fi
  1943.  
  1944. fi
  1945.  
  1946. echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
  1947. echo "configure:1948: checking for ANSI C header files" >&5
  1948. if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
  1949.   echo $ac_n "(cached) $ac_c" 1>&6
  1950. else
  1951.   cat > conftest.$ac_ext <<EOF
  1952. #line 1953 "configure"
  1953. #include "confdefs.h"
  1954. #include <stdlib.h>
  1955. #include <stdarg.h>
  1956. #include <string.h>
  1957. #include <float.h>
  1958. EOF
  1959. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1960. { (eval echo configure:1961: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1961. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1962. if test -z "$ac_err"; then
  1963.   rm -rf conftest*
  1964.   ac_cv_header_stdc=yes
  1965. else
  1966.   echo "$ac_err" >&5
  1967.   echo "configure: failed program was:" >&5
  1968.   cat conftest.$ac_ext >&5
  1969.   rm -rf conftest*
  1970.   ac_cv_header_stdc=no
  1971. fi
  1972. rm -f conftest*
  1973.  
  1974. if test $ac_cv_header_stdc = yes; then
  1975.   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  1976. cat > conftest.$ac_ext <<EOF
  1977. #line 1978 "configure"
  1978. #include "confdefs.h"
  1979. #include <string.h>
  1980. EOF
  1981. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1982.   egrep "memchr" >/dev/null 2>&1; then
  1983.   :
  1984. else
  1985.   rm -rf conftest*
  1986.   ac_cv_header_stdc=no
  1987. fi
  1988. rm -f conftest*
  1989.  
  1990. fi
  1991.  
  1992. if test $ac_cv_header_stdc = yes; then
  1993.   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  1994. cat > conftest.$ac_ext <<EOF
  1995. #line 1996 "configure"
  1996. #include "confdefs.h"
  1997. #include <stdlib.h>
  1998. EOF
  1999. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2000.   egrep "free" >/dev/null 2>&1; then
  2001.   :
  2002. else
  2003.   rm -rf conftest*
  2004.   ac_cv_header_stdc=no
  2005. fi
  2006. rm -f conftest*
  2007.  
  2008. fi
  2009.  
  2010. if test $ac_cv_header_stdc = yes; then
  2011.   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  2012. if test "$cross_compiling" = yes; then
  2013.   :
  2014. else
  2015.   cat > conftest.$ac_ext <<EOF
  2016. #line 2017 "configure"
  2017. #include "confdefs.h"
  2018. #include <ctype.h>
  2019. #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  2020. #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  2021. #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
  2022. int main () { int i; for (i = 0; i < 256; i++)
  2023. if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  2024. exit (0); }
  2025.  
  2026. EOF
  2027. if { (eval echo configure:2028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  2028. then
  2029.   :
  2030. else
  2031.   echo "configure: failed program was:" >&5
  2032.   cat conftest.$ac_ext >&5
  2033.   rm -fr conftest*
  2034.   ac_cv_header_stdc=no
  2035. fi
  2036. rm -fr conftest*
  2037. fi
  2038.  
  2039. fi
  2040. fi
  2041.  
  2042. echo "$ac_t""$ac_cv_header_stdc" 1>&6
  2043. if test $ac_cv_header_stdc = yes; then
  2044.   cat >> confdefs.h <<\EOF
  2045. #define STDC_HEADERS 1
  2046. EOF
  2047.  
  2048. fi
  2049.  
  2050. echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
  2051. echo "configure:2052: checking for sys/wait.h that is POSIX.1 compatible" >&5
  2052. if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
  2053.   echo $ac_n "(cached) $ac_c" 1>&6
  2054. else
  2055.   cat > conftest.$ac_ext <<EOF
  2056. #line 2057 "configure"
  2057. #include "confdefs.h"
  2058. #include <sys/types.h>
  2059. #include <sys/wait.h>
  2060. #ifndef WEXITSTATUS
  2061. #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
  2062. #endif
  2063. #ifndef WIFEXITED
  2064. #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
  2065. #endif
  2066. int main() {
  2067. int s;
  2068. wait (&s);
  2069. s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
  2070. ; return 0; }
  2071. EOF
  2072. if { (eval echo configure:2073: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2073.   rm -rf conftest*
  2074.   ac_cv_header_sys_wait_h=yes
  2075. else
  2076.   echo "configure: failed program was:" >&5
  2077.   cat conftest.$ac_ext >&5
  2078.   rm -rf conftest*
  2079.   ac_cv_header_sys_wait_h=no
  2080. fi
  2081. rm -f conftest*
  2082. fi
  2083.  
  2084. echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
  2085. if test $ac_cv_header_sys_wait_h = yes; then
  2086.   cat >> confdefs.h <<\EOF
  2087. #define HAVE_SYS_WAIT_H 1
  2088. EOF
  2089.  
  2090. fi
  2091.  
  2092. for ac_hdr in fcntl.h limits.h malloc.h sys/ioctl.h sys/time.h unistd.h
  2093. do
  2094. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  2095. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  2096. echo "configure:2097: checking for $ac_hdr" >&5
  2097. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  2098.   echo $ac_n "(cached) $ac_c" 1>&6
  2099. else
  2100.   cat > conftest.$ac_ext <<EOF
  2101. #line 2102 "configure"
  2102. #include "confdefs.h"
  2103. #include <$ac_hdr>
  2104. EOF
  2105. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2106. { (eval echo configure:2107: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2107. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2108. if test -z "$ac_err"; then
  2109.   rm -rf conftest*
  2110.   eval "ac_cv_header_$ac_safe=yes"
  2111. else
  2112.   echo "$ac_err" >&5
  2113.   echo "configure: failed program was:" >&5
  2114.   cat conftest.$ac_ext >&5
  2115.   rm -rf conftest*
  2116.   eval "ac_cv_header_$ac_safe=no"
  2117. fi
  2118. rm -f conftest*
  2119. fi
  2120. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2121.   echo "$ac_t""yes" 1>&6
  2122.     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  2123.   cat >> confdefs.h <<EOF
  2124. #define $ac_tr_hdr 1
  2125. EOF
  2126.  
  2127. else
  2128.   echo "$ac_t""no" 1>&6
  2129. fi
  2130. done
  2131.  
  2132. echo $ac_n "checking for working const""... $ac_c" 1>&6
  2133. echo "configure:2134: checking for working const" >&5
  2134. if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
  2135.   echo $ac_n "(cached) $ac_c" 1>&6
  2136. else
  2137.   cat > conftest.$ac_ext <<EOF
  2138. #line 2139 "configure"
  2139. #include "confdefs.h"
  2140.  
  2141. int main() {
  2142.  
  2143. /* Ultrix mips cc rejects this.  */
  2144. typedef int charset[2]; const charset x;
  2145. /* SunOS 4.1.1 cc rejects this.  */
  2146. char const *const *ccp;
  2147. char **p;
  2148. /* NEC SVR4.0.2 mips cc rejects this.  */
  2149. struct point {int x, y;};
  2150. static struct point const zero = {0,0};
  2151. /* AIX XL C 1.02.0.0 rejects this.
  2152.    It does not let you subtract one const X* pointer from another in an arm
  2153.    of an if-expression whose if-part is not a constant expression */
  2154. const char *g = "string";
  2155. ccp = &g + (g ? g-g : 0);
  2156. /* HPUX 7.0 cc rejects these. */
  2157. ++ccp;
  2158. p = (char**) ccp;
  2159. ccp = (char const *const *) p;
  2160. { /* SCO 3.2v4 cc rejects this.  */
  2161.   char *t;
  2162.   char const *s = 0 ? (char *) 0 : (char const *) 0;
  2163.  
  2164.   *t++ = 0;
  2165. }
  2166. { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
  2167.   int x[] = {25, 17};
  2168.   const int *foo = &x[0];
  2169.   ++foo;
  2170. }
  2171. { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
  2172.   typedef const int *iptr;
  2173.   iptr p = 0;
  2174.   ++p;
  2175. }
  2176. { /* AIX XL C 1.02.0.0 rejects this saying
  2177.      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
  2178.   struct s { int j; const int *ap[3]; };
  2179.   struct s *b; b->j = 5;
  2180. }
  2181. { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
  2182.   const int foo = 10;
  2183. }
  2184.  
  2185. ; return 0; }
  2186. EOF
  2187. if { (eval echo configure:2188: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2188.   rm -rf conftest*
  2189.   ac_cv_c_const=yes
  2190. else
  2191.   echo "configure: failed program was:" >&5
  2192.   cat conftest.$ac_ext >&5
  2193.   rm -rf conftest*
  2194.   ac_cv_c_const=no
  2195. fi
  2196. rm -f conftest*
  2197. fi
  2198.  
  2199. echo "$ac_t""$ac_cv_c_const" 1>&6
  2200. if test $ac_cv_c_const = no; then
  2201.   cat >> confdefs.h <<\EOF
  2202. #define const 
  2203. EOF
  2204.  
  2205. fi
  2206.  
  2207. echo $ac_n "checking for pid_t""... $ac_c" 1>&6
  2208. echo "configure:2209: checking for pid_t" >&5
  2209. if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
  2210.   echo $ac_n "(cached) $ac_c" 1>&6
  2211. else
  2212.   cat > conftest.$ac_ext <<EOF
  2213. #line 2214 "configure"
  2214. #include "confdefs.h"
  2215. #include <sys/types.h>
  2216. #if STDC_HEADERS
  2217. #include <stdlib.h>
  2218. #include <stddef.h>
  2219. #endif
  2220. EOF
  2221. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2222.   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  2223.   rm -rf conftest*
  2224.   ac_cv_type_pid_t=yes
  2225. else
  2226.   rm -rf conftest*
  2227.   ac_cv_type_pid_t=no
  2228. fi
  2229. rm -f conftest*
  2230.  
  2231. fi
  2232. echo "$ac_t""$ac_cv_type_pid_t" 1>&6
  2233. if test $ac_cv_type_pid_t = no; then
  2234.   cat >> confdefs.h <<\EOF
  2235. #define pid_t int
  2236. EOF
  2237.  
  2238. fi
  2239.  
  2240. echo $ac_n "checking for size_t""... $ac_c" 1>&6
  2241. echo "configure:2242: checking for size_t" >&5
  2242. if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
  2243.   echo $ac_n "(cached) $ac_c" 1>&6
  2244. else
  2245.   cat > conftest.$ac_ext <<EOF
  2246. #line 2247 "configure"
  2247. #include "confdefs.h"
  2248. #include <sys/types.h>
  2249. #if STDC_HEADERS
  2250. #include <stdlib.h>
  2251. #include <stddef.h>
  2252. #endif
  2253. EOF
  2254. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2255.   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  2256.   rm -rf conftest*
  2257.   ac_cv_type_size_t=yes
  2258. else
  2259.   rm -rf conftest*
  2260.   ac_cv_type_size_t=no
  2261. fi
  2262. rm -f conftest*
  2263.  
  2264. fi
  2265. echo "$ac_t""$ac_cv_type_size_t" 1>&6
  2266. if test $ac_cv_type_size_t = no; then
  2267.   cat >> confdefs.h <<\EOF
  2268. #define size_t unsigned
  2269. EOF
  2270.  
  2271. fi
  2272.  
  2273. echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
  2274. echo "configure:2275: checking whether time.h and sys/time.h may both be included" >&5
  2275. if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
  2276.   echo $ac_n "(cached) $ac_c" 1>&6
  2277. else
  2278.   cat > conftest.$ac_ext <<EOF
  2279. #line 2280 "configure"
  2280. #include "confdefs.h"
  2281. #include <sys/types.h>
  2282. #include <sys/time.h>
  2283. #include <time.h>
  2284. int main() {
  2285. struct tm *tp;
  2286. ; return 0; }
  2287. EOF
  2288. if { (eval echo configure:2289: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2289.   rm -rf conftest*
  2290.   ac_cv_header_time=yes
  2291. else
  2292.   echo "configure: failed program was:" >&5
  2293.   cat conftest.$ac_ext >&5
  2294.   rm -rf conftest*
  2295.   ac_cv_header_time=no
  2296. fi
  2297. rm -f conftest*
  2298. fi
  2299.  
  2300. echo "$ac_t""$ac_cv_header_time" 1>&6
  2301. if test $ac_cv_header_time = yes; then
  2302.   cat >> confdefs.h <<\EOF
  2303. #define TIME_WITH_SYS_TIME 1
  2304. EOF
  2305.  
  2306. fi
  2307.  
  2308. echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
  2309. echo "configure:2310: checking whether struct tm is in sys/time.h or time.h" >&5
  2310. if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
  2311.   echo $ac_n "(cached) $ac_c" 1>&6
  2312. else
  2313.   cat > conftest.$ac_ext <<EOF
  2314. #line 2315 "configure"
  2315. #include "confdefs.h"
  2316. #include <sys/types.h>
  2317. #include <time.h>
  2318. int main() {
  2319. struct tm *tp; tp->tm_sec;
  2320. ; return 0; }
  2321. EOF
  2322. if { (eval echo configure:2323: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2323.   rm -rf conftest*
  2324.   ac_cv_struct_tm=time.h
  2325. else
  2326.   echo "configure: failed program was:" >&5
  2327.   cat conftest.$ac_ext >&5
  2328.   rm -rf conftest*
  2329.   ac_cv_struct_tm=sys/time.h
  2330. fi
  2331. rm -f conftest*
  2332. fi
  2333.  
  2334. echo "$ac_t""$ac_cv_struct_tm" 1>&6
  2335. if test $ac_cv_struct_tm = sys/time.h; then
  2336.   cat >> confdefs.h <<\EOF
  2337. #define TM_IN_SYS_TIME 1
  2338. EOF
  2339.  
  2340. fi
  2341.  
  2342.  
  2343. # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
  2344. # for constant arguments.  Useless!
  2345. echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
  2346. echo "configure:2347: checking for working alloca.h" >&5
  2347. if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
  2348.   echo $ac_n "(cached) $ac_c" 1>&6
  2349. else
  2350.   cat > conftest.$ac_ext <<EOF
  2351. #line 2352 "configure"
  2352. #include "confdefs.h"
  2353. #include <alloca.h>
  2354. int main() {
  2355. char *p = alloca(2 * sizeof(int));
  2356. ; return 0; }
  2357. EOF
  2358. if { (eval echo configure:2359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2359.   rm -rf conftest*
  2360.   ac_cv_header_alloca_h=yes
  2361. else
  2362.   echo "configure: failed program was:" >&5
  2363.   cat conftest.$ac_ext >&5
  2364.   rm -rf conftest*
  2365.   ac_cv_header_alloca_h=no
  2366. fi
  2367. rm -f conftest*
  2368. fi
  2369.  
  2370. echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
  2371. if test $ac_cv_header_alloca_h = yes; then
  2372.   cat >> confdefs.h <<\EOF
  2373. #define HAVE_ALLOCA_H 1
  2374. EOF
  2375.  
  2376. fi
  2377.  
  2378. echo $ac_n "checking for alloca""... $ac_c" 1>&6
  2379. echo "configure:2380: checking for alloca" >&5
  2380. if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
  2381.   echo $ac_n "(cached) $ac_c" 1>&6
  2382. else
  2383.   cat > conftest.$ac_ext <<EOF
  2384. #line 2385 "configure"
  2385. #include "confdefs.h"
  2386.  
  2387. #ifdef __GNUC__
  2388. # define alloca __builtin_alloca
  2389. #else
  2390. # ifdef _MSC_VER
  2391. #  include <malloc.h>
  2392. #  define alloca _alloca
  2393. # else
  2394. #  if HAVE_ALLOCA_H
  2395. #   include <alloca.h>
  2396. #  else
  2397. #   ifdef _AIX
  2398.  #pragma alloca
  2399. #   else
  2400. #    ifndef alloca /* predefined by HP cc +Olibcalls */
  2401. char *alloca ();
  2402. #    endif
  2403. #   endif
  2404. #  endif
  2405. # endif
  2406. #endif
  2407.  
  2408. int main() {
  2409. char *p = (char *) alloca(1);
  2410. ; return 0; }
  2411. EOF
  2412. if { (eval echo configure:2413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2413.   rm -rf conftest*
  2414.   ac_cv_func_alloca_works=yes
  2415. else
  2416.   echo "configure: failed program was:" >&5
  2417.   cat conftest.$ac_ext >&5
  2418.   rm -rf conftest*
  2419.   ac_cv_func_alloca_works=no
  2420. fi
  2421. rm -f conftest*
  2422. fi
  2423.  
  2424. echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
  2425. if test $ac_cv_func_alloca_works = yes; then
  2426.   cat >> confdefs.h <<\EOF
  2427. #define HAVE_ALLOCA 1
  2428. EOF
  2429.  
  2430. fi
  2431.  
  2432. if test $ac_cv_func_alloca_works = no; then
  2433.   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
  2434.   # that cause trouble.  Some versions do not even contain alloca or
  2435.   # contain a buggy version.  If you still want to use their alloca,
  2436.   # use ar to extract alloca.o from them instead of compiling alloca.c.
  2437.   ALLOCA=alloca.${ac_objext}
  2438.   cat >> confdefs.h <<\EOF
  2439. #define C_ALLOCA 1
  2440. EOF
  2441.  
  2442.  
  2443. echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
  2444. echo "configure:2445: checking whether alloca needs Cray hooks" >&5
  2445. if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
  2446.   echo $ac_n "(cached) $ac_c" 1>&6
  2447. else
  2448.   cat > conftest.$ac_ext <<EOF
  2449. #line 2450 "configure"
  2450. #include "confdefs.h"
  2451. #if defined(CRAY) && ! defined(CRAY2)
  2452. webecray
  2453. #else
  2454. wenotbecray
  2455. #endif
  2456.  
  2457. EOF
  2458. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2459.   egrep "webecray" >/dev/null 2>&1; then
  2460.   rm -rf conftest*
  2461.   ac_cv_os_cray=yes
  2462. else
  2463.   rm -rf conftest*
  2464.   ac_cv_os_cray=no
  2465. fi
  2466. rm -f conftest*
  2467.  
  2468. fi
  2469.  
  2470. echo "$ac_t""$ac_cv_os_cray" 1>&6
  2471. if test $ac_cv_os_cray = yes; then
  2472. for ac_func in _getb67 GETB67 getb67; do
  2473.   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2474. echo "configure:2475: checking for $ac_func" >&5
  2475. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2476.   echo $ac_n "(cached) $ac_c" 1>&6
  2477. else
  2478.   cat > conftest.$ac_ext <<EOF
  2479. #line 2480 "configure"
  2480. #include "confdefs.h"
  2481. /* System header to define __stub macros and hopefully few prototypes,
  2482.     which can conflict with char $ac_func(); below.  */
  2483. #include <assert.h>
  2484. /* Override any gcc2 internal prototype to avoid an error.  */
  2485. /* We use char because int might match the return type of a gcc2
  2486.     builtin and then its argument prototype would still apply.  */
  2487. char $ac_func();
  2488.  
  2489. int main() {
  2490.  
  2491. /* The GNU C library defines this for functions which it implements
  2492.     to always fail with ENOSYS.  Some functions are actually named
  2493.     something starting with __ and the normal name is an alias.  */
  2494. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2495. choke me
  2496. #else
  2497. $ac_func();
  2498. #endif
  2499.  
  2500. ; return 0; }
  2501. EOF
  2502. if { (eval echo configure:2503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2503.   rm -rf conftest*
  2504.   eval "ac_cv_func_$ac_func=yes"
  2505. else
  2506.   echo "configure: failed program was:" >&5
  2507.   cat conftest.$ac_ext >&5
  2508.   rm -rf conftest*
  2509.   eval "ac_cv_func_$ac_func=no"
  2510. fi
  2511. rm -f conftest*
  2512. fi
  2513.  
  2514. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2515.   echo "$ac_t""yes" 1>&6
  2516.   cat >> confdefs.h <<EOF
  2517. #define CRAY_STACKSEG_END $ac_func
  2518. EOF
  2519.  
  2520.   break
  2521. else
  2522.   echo "$ac_t""no" 1>&6
  2523. fi
  2524.  
  2525. done
  2526. fi
  2527.  
  2528. echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
  2529. echo "configure:2530: checking stack direction for C alloca" >&5
  2530. if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
  2531.   echo $ac_n "(cached) $ac_c" 1>&6
  2532. else
  2533.   if test "$cross_compiling" = yes; then
  2534.   ac_cv_c_stack_direction=0
  2535. else
  2536.   cat > conftest.$ac_ext <<EOF
  2537. #line 2538 "configure"
  2538. #include "confdefs.h"
  2539. find_stack_direction ()
  2540. {
  2541.   static char *addr = 0;
  2542.   auto char dummy;
  2543.   if (addr == 0)
  2544.     {
  2545.       addr = &dummy;
  2546.       return find_stack_direction ();
  2547.     }
  2548.   else
  2549.     return (&dummy > addr) ? 1 : -1;
  2550. }
  2551. main ()
  2552. {
  2553.   exit (find_stack_direction() < 0);
  2554. }
  2555. EOF
  2556. if { (eval echo configure:2557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  2557. then
  2558.   ac_cv_c_stack_direction=1
  2559. else
  2560.   echo "configure: failed program was:" >&5
  2561.   cat conftest.$ac_ext >&5
  2562.   rm -fr conftest*
  2563.   ac_cv_c_stack_direction=-1
  2564. fi
  2565. rm -fr conftest*
  2566. fi
  2567.  
  2568. fi
  2569.  
  2570. echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
  2571. cat >> confdefs.h <<EOF
  2572. #define STACK_DIRECTION $ac_cv_c_stack_direction
  2573. EOF
  2574.  
  2575. fi
  2576.  
  2577. echo $ac_n "checking for working fnmatch""... $ac_c" 1>&6
  2578. echo "configure:2579: checking for working fnmatch" >&5
  2579. if eval "test \"`echo '$''{'ac_cv_func_fnmatch_works'+set}'`\" = set"; then
  2580.   echo $ac_n "(cached) $ac_c" 1>&6
  2581. else
  2582.   # Some versions of Solaris or SCO have a broken fnmatch function.
  2583. # So we run a test program.  If we are cross-compiling, take no chance.
  2584. # Thanks to John Oleynick and Franc,ois Pinard for this test.
  2585. if test "$cross_compiling" = yes; then
  2586.   ac_cv_func_fnmatch_works=no
  2587. else
  2588.   cat > conftest.$ac_ext <<EOF
  2589. #line 2590 "configure"
  2590. #include "confdefs.h"
  2591. main() { exit (fnmatch ("a*", "abc", 0) != 0); }
  2592. EOF
  2593. if { (eval echo configure:2594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  2594. then
  2595.   ac_cv_func_fnmatch_works=yes
  2596. else
  2597.   echo "configure: failed program was:" >&5
  2598.   cat conftest.$ac_ext >&5
  2599.   rm -fr conftest*
  2600.   ac_cv_func_fnmatch_works=no
  2601. fi
  2602. rm -fr conftest*
  2603. fi
  2604.  
  2605. fi
  2606.  
  2607. echo "$ac_t""$ac_cv_func_fnmatch_works" 1>&6
  2608. if test $ac_cv_func_fnmatch_works = yes; then
  2609.   cat >> confdefs.h <<\EOF
  2610. #define HAVE_FNMATCH 1
  2611. EOF
  2612.  
  2613. fi
  2614.  
  2615. if test $ac_cv_prog_gcc = yes; then
  2616.     echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
  2617. echo "configure:2618: checking whether ${CC-cc} needs -traditional" >&5
  2618. if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
  2619.   echo $ac_n "(cached) $ac_c" 1>&6
  2620. else
  2621.     ac_pattern="Autoconf.*'x'"
  2622.   cat > conftest.$ac_ext <<EOF
  2623. #line 2624 "configure"
  2624. #include "confdefs.h"
  2625. #include <sgtty.h>
  2626. Autoconf TIOCGETP
  2627. EOF
  2628. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2629.   egrep "$ac_pattern" >/dev/null 2>&1; then
  2630.   rm -rf conftest*
  2631.   ac_cv_prog_gcc_traditional=yes
  2632. else
  2633.   rm -rf conftest*
  2634.   ac_cv_prog_gcc_traditional=no
  2635. fi
  2636. rm -f conftest*
  2637.  
  2638.  
  2639.   if test $ac_cv_prog_gcc_traditional = no; then
  2640.     cat > conftest.$ac_ext <<EOF
  2641. #line 2642 "configure"
  2642. #include "confdefs.h"
  2643. #include <termio.h>
  2644. Autoconf TCGETA
  2645. EOF
  2646. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2647.   egrep "$ac_pattern" >/dev/null 2>&1; then
  2648.   rm -rf conftest*
  2649.   ac_cv_prog_gcc_traditional=yes
  2650. fi
  2651. rm -f conftest*
  2652.  
  2653.   fi
  2654. fi
  2655.  
  2656. echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
  2657.   if test $ac_cv_prog_gcc_traditional = yes; then
  2658.     CC="$CC -traditional"
  2659.   fi
  2660. fi
  2661.  
  2662. echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
  2663. echo "configure:2664: checking for 8-bit clean memcmp" >&5
  2664. if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
  2665.   echo $ac_n "(cached) $ac_c" 1>&6
  2666. else
  2667.   if test "$cross_compiling" = yes; then
  2668.   ac_cv_func_memcmp_clean=no
  2669. else
  2670.   cat > conftest.$ac_ext <<EOF
  2671. #line 2672 "configure"
  2672. #include "confdefs.h"
  2673.  
  2674. main()
  2675. {
  2676.   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
  2677.   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
  2678. }
  2679.  
  2680. EOF
  2681. if { (eval echo configure:2682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  2682. then
  2683.   ac_cv_func_memcmp_clean=yes
  2684. else
  2685.   echo "configure: failed program was:" >&5
  2686.   cat conftest.$ac_ext >&5
  2687.   rm -fr conftest*
  2688.   ac_cv_func_memcmp_clean=no
  2689. fi
  2690. rm -fr conftest*
  2691. fi
  2692.  
  2693. fi
  2694.  
  2695. echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
  2696. test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
  2697.  
  2698. echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
  2699. echo "configure:2700: checking return type of signal handlers" >&5
  2700. if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
  2701.   echo $ac_n "(cached) $ac_c" 1>&6
  2702. else
  2703.   cat > conftest.$ac_ext <<EOF
  2704. #line 2705 "configure"
  2705. #include "confdefs.h"
  2706. #include <sys/types.h>
  2707. #include <signal.h>
  2708. #ifdef signal
  2709. #undef signal
  2710. #endif
  2711. #ifdef __cplusplus
  2712. extern "C" void (*signal (int, void (*)(int)))(int);
  2713. #else
  2714. void (*signal ()) ();
  2715. #endif
  2716.  
  2717. int main() {
  2718. int i;
  2719. ; return 0; }
  2720. EOF
  2721. if { (eval echo configure:2722: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2722.   rm -rf conftest*
  2723.   ac_cv_type_signal=void
  2724. else
  2725.   echo "configure: failed program was:" >&5
  2726.   cat conftest.$ac_ext >&5
  2727.   rm -rf conftest*
  2728.   ac_cv_type_signal=int
  2729. fi
  2730. rm -f conftest*
  2731. fi
  2732.  
  2733. echo "$ac_t""$ac_cv_type_signal" 1>&6
  2734. cat >> confdefs.h <<EOF
  2735. #define RETSIGTYPE $ac_cv_type_signal
  2736. EOF
  2737.  
  2738.  
  2739. echo $ac_n "checking whether utime accepts a null argument""... $ac_c" 1>&6
  2740. echo "configure:2741: checking whether utime accepts a null argument" >&5
  2741. if eval "test \"`echo '$''{'ac_cv_func_utime_null'+set}'`\" = set"; then
  2742.   echo $ac_n "(cached) $ac_c" 1>&6
  2743. else
  2744.   rm -f conftestdata; > conftestdata
  2745. # Sequent interprets utime(file, 0) to mean use start of epoch.  Wrong.
  2746. if test "$cross_compiling" = yes; then
  2747.   ac_cv_func_utime_null=no
  2748. else
  2749.   cat > conftest.$ac_ext <<EOF
  2750. #line 2751 "configure"
  2751. #include "confdefs.h"
  2752. #include <sys/types.h>
  2753. #include <sys/stat.h>
  2754. main() {
  2755. struct stat s, t;
  2756. exit(!(stat ("conftestdata", &s) == 0 && utime("conftestdata", (long *)0) == 0
  2757. && stat("conftestdata", &t) == 0 && t.st_mtime >= s.st_mtime
  2758. && t.st_mtime - s.st_mtime < 120));
  2759. }
  2760. EOF
  2761. if { (eval echo configure:2762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  2762. then
  2763.   ac_cv_func_utime_null=yes
  2764. else
  2765.   echo "configure: failed program was:" >&5
  2766.   cat conftest.$ac_ext >&5
  2767.   rm -fr conftest*
  2768.   ac_cv_func_utime_null=no
  2769. fi
  2770. rm -fr conftest*
  2771. fi
  2772.  
  2773. rm -f core core.* *.core
  2774. fi
  2775.  
  2776. echo "$ac_t""$ac_cv_func_utime_null" 1>&6
  2777. if test $ac_cv_func_utime_null = yes; then
  2778.   cat >> confdefs.h <<\EOF
  2779. #define HAVE_UTIME_NULL 1
  2780. EOF
  2781.  
  2782. fi
  2783.  
  2784. echo $ac_n "checking for vprintf""... $ac_c" 1>&6
  2785. echo "configure:2786: checking for vprintf" >&5
  2786. if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
  2787.   echo $ac_n "(cached) $ac_c" 1>&6
  2788. else
  2789.   cat > conftest.$ac_ext <<EOF
  2790. #line 2791 "configure"
  2791. #include "confdefs.h"
  2792. /* System header to define __stub macros and hopefully few prototypes,
  2793.     which can conflict with char vprintf(); below.  */
  2794. #include <assert.h>
  2795. /* Override any gcc2 internal prototype to avoid an error.  */
  2796. /* We use char because int might match the return type of a gcc2
  2797.     builtin and then its argument prototype would still apply.  */
  2798. char vprintf();
  2799.  
  2800. int main() {
  2801.  
  2802. /* The GNU C library defines this for functions which it implements
  2803.     to always fail with ENOSYS.  Some functions are actually named
  2804.     something starting with __ and the normal name is an alias.  */
  2805. #if defined (__stub_vprintf) || defined (__stub___vprintf)
  2806. choke me
  2807. #else
  2808. vprintf();
  2809. #endif
  2810.  
  2811. ; return 0; }
  2812. EOF
  2813. if { (eval echo configure:2814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2814.   rm -rf conftest*
  2815.   eval "ac_cv_func_vprintf=yes"
  2816. else
  2817.   echo "configure: failed program was:" >&5
  2818.   cat conftest.$ac_ext >&5
  2819.   rm -rf conftest*
  2820.   eval "ac_cv_func_vprintf=no"
  2821. fi
  2822. rm -f conftest*
  2823. fi
  2824.  
  2825. if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
  2826.   echo "$ac_t""yes" 1>&6
  2827.   cat >> confdefs.h <<\EOF
  2828. #define HAVE_VPRINTF 1
  2829. EOF
  2830.  
  2831. else
  2832.   echo "$ac_t""no" 1>&6
  2833. fi
  2834.  
  2835. if test "$ac_cv_func_vprintf" != yes; then
  2836. echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
  2837. echo "configure:2838: checking for _doprnt" >&5
  2838. if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
  2839.   echo $ac_n "(cached) $ac_c" 1>&6
  2840. else
  2841.   cat > conftest.$ac_ext <<EOF
  2842. #line 2843 "configure"
  2843. #include "confdefs.h"
  2844. /* System header to define __stub macros and hopefully few prototypes,
  2845.     which can conflict with char _doprnt(); below.  */
  2846. #include <assert.h>
  2847. /* Override any gcc2 internal prototype to avoid an error.  */
  2848. /* We use char because int might match the return type of a gcc2
  2849.     builtin and then its argument prototype would still apply.  */
  2850. char _doprnt();
  2851.  
  2852. int main() {
  2853.  
  2854. /* The GNU C library defines this for functions which it implements
  2855.     to always fail with ENOSYS.  Some functions are actually named
  2856.     something starting with __ and the normal name is an alias.  */
  2857. #if defined (__stub__doprnt) || defined (__stub____doprnt)
  2858. choke me
  2859. #else
  2860. _doprnt();
  2861. #endif
  2862.  
  2863. ; return 0; }
  2864. EOF
  2865. if { (eval echo configure:2866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2866.   rm -rf conftest*
  2867.   eval "ac_cv_func__doprnt=yes"
  2868. else
  2869.   echo "configure: failed program was:" >&5
  2870.   cat conftest.$ac_ext >&5
  2871.   rm -rf conftest*
  2872.   eval "ac_cv_func__doprnt=no"
  2873. fi
  2874. rm -f conftest*
  2875. fi
  2876.  
  2877. if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
  2878.   echo "$ac_t""yes" 1>&6
  2879.   cat >> confdefs.h <<\EOF
  2880. #define HAVE_DOPRNT 1
  2881. EOF
  2882.  
  2883. else
  2884.   echo "$ac_t""no" 1>&6
  2885. fi
  2886.  
  2887. fi
  2888.  
  2889. for ac_func in getcwd gethostname mkdir rmdir select strcspn strdup strerror strstr strtol strcasecmp strncasecmp strupr swab
  2890. do
  2891. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2892. echo "configure:2893: checking for $ac_func" >&5
  2893. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2894.   echo $ac_n "(cached) $ac_c" 1>&6
  2895. else
  2896.   cat > conftest.$ac_ext <<EOF
  2897. #line 2898 "configure"
  2898. #include "confdefs.h"
  2899. /* System header to define __stub macros and hopefully few prototypes,
  2900.     which can conflict with char $ac_func(); below.  */
  2901. #include <assert.h>
  2902. /* Override any gcc2 internal prototype to avoid an error.  */
  2903. /* We use char because int might match the return type of a gcc2
  2904.     builtin and then its argument prototype would still apply.  */
  2905. char $ac_func();
  2906.  
  2907. int main() {
  2908.  
  2909. /* The GNU C library defines this for functions which it implements
  2910.     to always fail with ENOSYS.  Some functions are actually named
  2911.     something starting with __ and the normal name is an alias.  */
  2912. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2913. choke me
  2914. #else
  2915. $ac_func();
  2916. #endif
  2917.  
  2918. ; return 0; }
  2919. EOF
  2920. if { (eval echo configure:2921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2921.   rm -rf conftest*
  2922.   eval "ac_cv_func_$ac_func=yes"
  2923. else
  2924.   echo "configure: failed program was:" >&5
  2925.   cat conftest.$ac_ext >&5
  2926.   rm -rf conftest*
  2927.   eval "ac_cv_func_$ac_func=no"
  2928. fi
  2929. rm -f conftest*
  2930. fi
  2931.  
  2932. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2933.   echo "$ac_t""yes" 1>&6
  2934.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2935.   cat >> confdefs.h <<EOF
  2936. #define $ac_tr_func 1
  2937. EOF
  2938.  
  2939. else
  2940.   echo "$ac_t""no" 1>&6
  2941. fi
  2942. done
  2943.  
  2944.  
  2945.  
  2946.  
  2947.  
  2948.  
  2949.  
  2950.  
  2951.  
  2952.  
  2953.  
  2954. ################
  2955.  
  2956.  
  2957.  
  2958.  
  2959.  
  2960.  
  2961.  
  2962.  
  2963.  
  2964.  
  2965. ################
  2966.  
  2967. OUTFILE="$TOP/../bin/v9t9"
  2968.  
  2969.  
  2970. trap '' 1 2 15
  2971. cat > confcache <<\EOF
  2972. # This file is a shell script that caches the results of configure
  2973. # tests run on this system so they can be shared between configure
  2974. # scripts and configure runs.  It is not useful on other systems.
  2975. # If it contains results you don't want to keep, you may remove or edit it.
  2976. #
  2977. # By default, configure uses ./config.cache as the cache file,
  2978. # creating it if it does not exist already.  You can give configure
  2979. # the --cache-file=FILE option to use a different cache file; that is
  2980. # what configure does when it calls configure scripts in
  2981. # subdirectories, so they share the cache.
  2982. # Giving --cache-file=/dev/null disables caching, for debugging configure.
  2983. # config.status only pays attention to the cache file if you give it the
  2984. # --recheck option to rerun configure.
  2985. #
  2986. EOF
  2987. # The following way of writing the cache mishandles newlines in values,
  2988. # but we know of no workaround that is simple, portable, and efficient.
  2989. # So, don't put newlines in cache variables' values.
  2990. # Ultrix sh set writes to stderr and can't be redirected directly,
  2991. # and sets the high bit in the cache file unless we assign to the vars.
  2992. (set) 2>&1 |
  2993.   case `(ac_space=' '; set | grep ac_space) 2>&1` in
  2994.   *ac_space=\ *)
  2995.     # `set' does not quote correctly, so add quotes (double-quote substitution
  2996.     # turns \\\\ into \\, and sed turns \\ into \).
  2997.     sed -n \
  2998.       -e "s/'/'\\\\''/g" \
  2999.       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
  3000.     ;;
  3001.   *)
  3002.     # `set' quotes correctly as required by POSIX, so do not add quotes.
  3003.     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
  3004.     ;;
  3005.   esac >> confcache
  3006. if cmp -s $cache_file confcache; then
  3007.   :
  3008. else
  3009.   if test -w $cache_file; then
  3010.     echo "updating cache $cache_file"
  3011.     cat confcache > $cache_file
  3012.   else
  3013.     echo "not updating unwritable cache $cache_file"
  3014.   fi
  3015. fi
  3016. rm -f confcache
  3017.  
  3018. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  3019.  
  3020. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  3021. # Let make expand exec_prefix.
  3022. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  3023.  
  3024. # Any assignment to VPATH causes Sun make to only execute
  3025. # the first set of double-colon rules, so remove it if not needed.
  3026. # If there is a colon in the path, we need to keep it.
  3027. if test "x$srcdir" = x.; then
  3028.   ac_vpsub='/^[     ]*VPATH[     ]*=[^:]*$/d'
  3029. fi
  3030.  
  3031. trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  3032.  
  3033. DEFS=-DHAVE_CONFIG_H
  3034.  
  3035. # Without the "./", some shells look in PATH for config.status.
  3036. : ${CONFIG_STATUS=./config.status}
  3037.  
  3038. echo creating $CONFIG_STATUS
  3039. rm -f $CONFIG_STATUS
  3040. cat > $CONFIG_STATUS <<EOF
  3041. #! /bin/sh
  3042. # Generated automatically by configure.
  3043. # Run this file to recreate the current configuration.
  3044. # This directory was configured as follows,
  3045. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  3046. #
  3047. # $0 $ac_configure_args
  3048. #
  3049. # Compiler output produced by configure, useful for debugging
  3050. # configure, is in ./config.log if it exists.
  3051.  
  3052. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  3053. for ac_option
  3054. do
  3055.   case "\$ac_option" in
  3056.   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  3057.     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  3058.     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  3059.   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  3060.     echo "$CONFIG_STATUS generated by autoconf version 2.13"
  3061.     exit 0 ;;
  3062.   -help | --help | --hel | --he | --h)
  3063.     echo "\$ac_cs_usage"; exit 0 ;;
  3064.   *) echo "\$ac_cs_usage"; exit 1 ;;
  3065.   esac
  3066. done
  3067.  
  3068. ac_given_srcdir=$srcdir
  3069.  
  3070. trap 'rm -fr `echo "Generate/Makefile OSLib/Makefile Modules/Makefile 
  3071.     Modules/Unix/Makefile Modules/Win32/Makefile Makefile conf.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
  3072. EOF
  3073. cat >> $CONFIG_STATUS <<EOF
  3074.  
  3075. # Protect against being on the right side of a sed subst in config.status.
  3076. sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
  3077.  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
  3078. $ac_vpsub
  3079. $extrasub
  3080. s%@SHELL@%$SHELL%g
  3081. s%@CFLAGS@%$CFLAGS%g
  3082. s%@CPPFLAGS@%$CPPFLAGS%g
  3083. s%@CXXFLAGS@%$CXXFLAGS%g
  3084. s%@FFLAGS@%$FFLAGS%g
  3085. s%@DEFS@%$DEFS%g
  3086. s%@LDFLAGS@%$LDFLAGS%g
  3087. s%@LIBS@%$LIBS%g
  3088. s%@exec_prefix@%$exec_prefix%g
  3089. s%@prefix@%$prefix%g
  3090. s%@program_transform_name@%$program_transform_name%g
  3091. s%@bindir@%$bindir%g
  3092. s%@sbindir@%$sbindir%g
  3093. s%@libexecdir@%$libexecdir%g
  3094. s%@datadir@%$datadir%g
  3095. s%@sysconfdir@%$sysconfdir%g
  3096. s%@sharedstatedir@%$sharedstatedir%g
  3097. s%@localstatedir@%$localstatedir%g
  3098. s%@libdir@%$libdir%g
  3099. s%@includedir@%$includedir%g
  3100. s%@oldincludedir@%$oldincludedir%g
  3101. s%@infodir@%$infodir%g
  3102. s%@mandir@%$mandir%g
  3103. s%@CC@%$CC%g
  3104. s%@YACC@%$YACC%g
  3105. s%@LEX@%$LEX%g
  3106. s%@LEXLIB@%$LEXLIB%g
  3107. s%@SET_MAKE@%$SET_MAKE%g
  3108. s%@PERL@%$PERL%g
  3109. s%@TOP@%$TOP%g
  3110. s%@HOSTOS@%$HOSTOS%g
  3111. s%@OBJEXT@%$OBJEXT%g
  3112. s%@CPP@%$CPP%g
  3113. s%@ALLOCA@%$ALLOCA%g
  3114. s%@LIBOBJS@%$LIBOBJS%g
  3115. s%@SRCS@%$SRCS%g
  3116. s%@INCDIRS@%$INCDIRS%g
  3117. s%@MODSRCS@%$MODSRCS%g
  3118. s%@UNIXMODSRCS@%$UNIXMODSRCS%g
  3119. s%@WINMODSRCS@%$WINMODSRCS%g
  3120. s%@MACMODSRCS@%$MACMODSRCS%g
  3121. s%@OSLIBSRCS@%$OSLIBSRCS%g
  3122. s%@LD@%$LD%g
  3123. s%@DEPFLAGS@%$DEPFLAGS%g
  3124. s%@MAPFLAGS@%$MAPFLAGS%g
  3125. s%@ARFLAGS@%$ARFLAGS%g
  3126. s%@OUTFILE@%$OUTFILE%g
  3127.  
  3128. CEOF
  3129. EOF
  3130.  
  3131. cat >> $CONFIG_STATUS <<\EOF
  3132.  
  3133. # Split the substitutions into bite-sized pieces for seds with
  3134. # small command number limits, like on Digital OSF/1 and HP-UX.
  3135. ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
  3136. ac_file=1 # Number of current file.
  3137. ac_beg=1 # First line for current file.
  3138. ac_end=$ac_max_sed_cmds # Line after last line for current file.
  3139. ac_more_lines=:
  3140. ac_sed_cmds=""
  3141. while $ac_more_lines; do
  3142.   if test $ac_beg -gt 1; then
  3143.     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
  3144.   else
  3145.     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
  3146.   fi
  3147.   if test ! -s conftest.s$ac_file; then
  3148.     ac_more_lines=false
  3149.     rm -f conftest.s$ac_file
  3150.   else
  3151.     if test -z "$ac_sed_cmds"; then
  3152.       ac_sed_cmds="sed -f conftest.s$ac_file"
  3153.     else
  3154.       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
  3155.     fi
  3156.     ac_file=`expr $ac_file + 1`
  3157.     ac_beg=$ac_end
  3158.     ac_end=`expr $ac_end + $ac_max_sed_cmds`
  3159.   fi
  3160. done
  3161. if test -z "$ac_sed_cmds"; then
  3162.   ac_sed_cmds=cat
  3163. fi
  3164. EOF
  3165.  
  3166. cat >> $CONFIG_STATUS <<EOF
  3167.  
  3168. CONFIG_FILES=\${CONFIG_FILES-"Generate/Makefile OSLib/Makefile Modules/Makefile 
  3169.     Modules/Unix/Makefile Modules/Win32/Makefile Makefile"}
  3170. EOF
  3171. cat >> $CONFIG_STATUS <<\EOF
  3172. for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  3173.   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  3174.   case "$ac_file" in
  3175.   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
  3176.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  3177.   *) ac_file_in="${ac_file}.in" ;;
  3178.   esac
  3179.  
  3180.   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
  3181.  
  3182.   # Remove last slash and all that follows it.  Not all systems have dirname.
  3183.   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  3184.   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  3185.     # The file is in a subdirectory.
  3186.     test ! -d "$ac_dir" && mkdir "$ac_dir"
  3187.     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
  3188.     # A "../" for each directory in $ac_dir_suffix.
  3189.     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  3190.   else
  3191.     ac_dir_suffix= ac_dots=
  3192.   fi
  3193.  
  3194.   case "$ac_given_srcdir" in
  3195.   .)  srcdir=.
  3196.       if test -z "$ac_dots"; then top_srcdir=.
  3197.       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  3198.   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  3199.   *) # Relative path.
  3200.     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  3201.     top_srcdir="$ac_dots$ac_given_srcdir" ;;
  3202.   esac
  3203.  
  3204.  
  3205.   echo creating "$ac_file"
  3206.   rm -f "$ac_file"
  3207.   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  3208.   case "$ac_file" in
  3209.   *Makefile*) ac_comsub="1i\\
  3210. # $configure_input" ;;
  3211.   *) ac_comsub= ;;
  3212.   esac
  3213.  
  3214.   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  3215.   sed -e "$ac_comsub
  3216. s%@configure_input@%$configure_input%g
  3217. s%@srcdir@%$srcdir%g
  3218. s%@top_srcdir@%$top_srcdir%g
  3219. " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
  3220. fi; done
  3221. rm -f conftest.s*
  3222.  
  3223. # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
  3224. # NAME is the cpp macro being defined and VALUE is the value it is being given.
  3225. #
  3226. # ac_d sets the value in "#define NAME VALUE" lines.
  3227. ac_dA='s%^\([     ]*\)#\([     ]*define[     ][     ]*\)'
  3228. ac_dB='\([     ][     ]*\)[^     ]*%\1#\2'
  3229. ac_dC='\3'
  3230. ac_dD='%g'
  3231. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  3232. ac_uA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  3233. ac_uB='\([     ]\)%\1#\2define\3'
  3234. ac_uC=' '
  3235. ac_uD='\4%g'
  3236. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  3237. ac_eA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  3238. ac_eB='$%\1#\2define\3'
  3239. ac_eC=' '
  3240. ac_eD='%g'
  3241.  
  3242. if test "${CONFIG_HEADERS+set}" != set; then
  3243. EOF
  3244. cat >> $CONFIG_STATUS <<EOF
  3245.   CONFIG_HEADERS="conf.h"
  3246. EOF
  3247. cat >> $CONFIG_STATUS <<\EOF
  3248. fi
  3249. for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  3250.   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  3251.   case "$ac_file" in
  3252.   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
  3253.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  3254.   *) ac_file_in="${ac_file}.in" ;;
  3255.   esac
  3256.  
  3257.   echo creating $ac_file
  3258.  
  3259.   rm -f conftest.frag conftest.in conftest.out
  3260.   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  3261.   cat $ac_file_inputs > conftest.in
  3262.  
  3263. EOF
  3264.  
  3265. # Transform confdefs.h into a sed script conftest.vals that substitutes
  3266. # the proper values into config.h.in to produce config.h.  And first:
  3267. # Protect against being on the right side of a sed subst in config.status.
  3268. # Protect against being in an unquoted here document in config.status.
  3269. rm -f conftest.vals
  3270. cat > conftest.hdr <<\EOF
  3271. s/[\\&%]/\\&/g
  3272. s%[\\$`]%\\&%g
  3273. s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
  3274. s%ac_d%ac_u%gp
  3275. s%ac_u%ac_e%gp
  3276. EOF
  3277. sed -n -f conftest.hdr confdefs.h > conftest.vals
  3278. rm -f conftest.hdr
  3279.  
  3280. # This sed command replaces #undef with comments.  This is necessary, for
  3281. # example, in the case of _POSIX_SOURCE, which is predefined and required
  3282. # on some systems where configure will not decide to define it.
  3283. cat >> conftest.vals <<\EOF
  3284. s%^[     ]*#[     ]*undef[     ][     ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
  3285. EOF
  3286.  
  3287. # Break up conftest.vals because some shells have a limit on
  3288. # the size of here documents, and old seds have small limits too.
  3289.  
  3290. rm -f conftest.tail
  3291. while :
  3292. do
  3293.   ac_lines=`grep -c . conftest.vals`
  3294.   # grep -c gives empty output for an empty file on some AIX systems.
  3295.   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  3296.   # Write a limited-size here document to conftest.frag.
  3297.   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
  3298.   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
  3299.   echo 'CEOF
  3300.   sed -f conftest.frag conftest.in > conftest.out
  3301.   rm -f conftest.in
  3302.   mv conftest.out conftest.in
  3303. ' >> $CONFIG_STATUS
  3304.   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
  3305.   rm -f conftest.vals
  3306.   mv conftest.tail conftest.vals
  3307. done
  3308. rm -f conftest.vals
  3309.  
  3310. cat >> $CONFIG_STATUS <<\EOF
  3311.   rm -f conftest.frag conftest.h
  3312.   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  3313.   cat conftest.in >> conftest.h
  3314.   rm -f conftest.in
  3315.   if cmp -s $ac_file conftest.h 2>/dev/null; then
  3316.     echo "$ac_file is unchanged"
  3317.     rm -f conftest.h
  3318.   else
  3319.     # Remove last slash and all that follows it.  Not all systems have dirname.
  3320.       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  3321.       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  3322.       # The file is in a subdirectory.
  3323.       test ! -d "$ac_dir" && mkdir "$ac_dir"
  3324.     fi
  3325.     rm -f $ac_file
  3326.     mv conftest.h $ac_file
  3327.   fi
  3328. fi; done
  3329.  
  3330. EOF
  3331. cat >> $CONFIG_STATUS <<EOF
  3332.  
  3333. EOF
  3334. cat >> $CONFIG_STATUS <<\EOF
  3335.  
  3336. exit 0
  3337. EOF
  3338. chmod +x $CONFIG_STATUS
  3339. rm -fr confdefs* $ac_clean_files
  3340. test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
  3341.  
  3342.