home *** CD-ROM | disk | FTP | other *** search
/ Dream 52 / Amiga_Dream_52.iso / Linux / Divers / xgalaga-2_0_tar.gz / xgalaga-2_0_tar / xgalaga-2.0 / configure < prev    next >
Text File  |  1998-04-30  |  86KB  |  2,898 lines

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