home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD1.iso / Emulatoren / UAE061.LZH / uae-0.6.1 / configure < prev    next >
Encoding:
Text File  |  1996-08-28  |  80.0 KB  |  2,962 lines

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