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