#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by Autoconf 2.52.
#
# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
# Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.

# Avoid depending upon Character Ranges.
as_cr_letters='abcdefghijklmnopqrstuvwxyz'
as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
as_cr_Letters=$as_cr_letters$as_cr_LETTERS
as_cr_digits='0123456789'
as_cr_alnum=$as_cr_Letters$as_cr_digits

# Sed expression to map a string onto a valid variable name.
as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"

# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"

# Be Bourne compatible
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
  emulate sh
  NULLCMD=:
elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
  set -o posix
fi

# Name of the executable.
as_me=`echo "$0" |sed 's,.*[\\/],,'`

if expr a : '\(a\)' >/dev/null 2>&1; then
  as_expr=expr
else
  as_expr=false
fi

rm -f conf$$ conf$$.exe conf$$.file
echo >conf$$.file
if ln -s conf$$.file conf$$ 2>/dev/null; then
  # We could just check for DJGPP; but this test a) works b) is more generic
  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
  if test -f conf$$.exe; then
    # Don't use ln at all; we don't have any links
    as_ln_s='cp -p'
  else
    as_ln_s='ln -s'
  fi
elif ln conf$$.file conf$$ 2>/dev/null; then
  as_ln_s=ln
else
  as_ln_s='cp -p'
fi
rm -f conf$$ conf$$.exe conf$$.file

as_executable_p="test -f"

# Support unset when possible.
if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
  as_unset=unset
else
  as_unset=false
fi

# NLS nuisances.
$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }

# IFS
# We need space, tab and new line, in precisely that order.
as_nl='
'
IFS=" 	$as_nl"

# CDPATH.
$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }

# Name of the host.
# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
# so uname gets run too.
ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`

exec 6>&1

#
# Initializations.
#
ac_default_prefix=/usr/local
cross_compiling=no
subdirs=
MFLAGS= MAKEFLAGS=
SHELL=${CONFIG_SHELL-/bin/sh}

# Maximum number of lines to put in a shell here document.
# This variable seems obsolete.  It should probably be removed, and
# only ac_max_sed_lines should be used.
: ${ac_max_here_lines=38}

ac_unique_file="timidity/timidity.c"
# Factoring default headers for most tests.
ac_includes_default="\
#include <stdio.h>
#if HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#if HAVE_SYS_STAT_H
# include <sys/stat.h>
#endif
#if STDC_HEADERS
# include <stdlib.h>
# include <stddef.h>
#else
# if HAVE_STDLIB_H
#  include <stdlib.h>
# endif
#endif
#if HAVE_STRING_H
# if !STDC_HEADERS && HAVE_MEMORY_H
#  include <memory.h>
# endif
# include <string.h>
#endif
#if HAVE_STRINGS_H
# include <strings.h>
#endif
#if HAVE_INTTYPES_H
# include <inttypes.h>
#else
# if HAVE_STDINT_H
#  include <stdint.h>
# endif
#endif
#if HAVE_UNISTD_H
# include <unistd.h>
#endif"

# Initialize some variables set by options.
ac_init_help=
ac_init_version=false
# The variables have the same names as the options, with
# dashes changed to underlines.
cache_file=/dev/null
exec_prefix=NONE
no_create=
no_recursion=
prefix=NONE
program_prefix=NONE
program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
srcdir=
verbose=
x_includes=NONE
x_libraries=NONE

# Installation directory options.
# These are left unexpanded so users can "make install exec_prefix=/foo"
# and all the variables that are supposed to be based on exec_prefix
# by default will actually change.
# Use braces instead of parens because sh, perl, etc. also accept them.
bindir='${exec_prefix}/bin'
sbindir='${exec_prefix}/sbin'
libexecdir='${exec_prefix}/libexec'
datadir='${prefix}/share'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
libdir='${exec_prefix}/lib'
includedir='${prefix}/include'
oldincludedir='/usr/include'
infodir='${prefix}/info'
mandir='${prefix}/man'

# Identity of this package.
PACKAGE_NAME=
PACKAGE_TARNAME=
PACKAGE_VERSION=
PACKAGE_STRING=
PACKAGE_BUGREPORT=

ac_prev=
for ac_option
do
  # If the previous option needs an argument, assign it.
  if test -n "$ac_prev"; then
    eval "$ac_prev=\$ac_option"
    ac_prev=
    continue
  fi

  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`

  # Accept the important Cygnus configure options, so we can diagnose typos.

  case $ac_option in

  -bindir | --bindir | --bindi | --bind | --bin | --bi)
    ac_prev=bindir ;;
  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
    bindir=$ac_optarg ;;

  -build | --build | --buil | --bui | --bu)
    ac_prev=build_alias ;;
  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
    build_alias=$ac_optarg ;;

  -cache-file | --cache-file | --cache-fil | --cache-fi \
  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
    ac_prev=cache_file ;;
  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
    cache_file=$ac_optarg ;;

  --config-cache | -C)
    cache_file=config.cache ;;

  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
    ac_prev=datadir ;;
  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
  | --da=*)
    datadir=$ac_optarg ;;

  -disable-* | --disable-*)
    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
    # Reject names that are not valid shell variable names.
    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
   { (exit 1); exit 1; }; }
    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
    eval "enable_$ac_feature=no" ;;

  -enable-* | --enable-*)
    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
    # Reject names that are not valid shell variable names.
    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
   { (exit 1); exit 1; }; }
    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
    case $ac_option in
      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
      *) ac_optarg=yes ;;
    esac
    eval "enable_$ac_feature='$ac_optarg'" ;;

  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  | --exec | --exe | --ex)
    ac_prev=exec_prefix ;;
  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  | --exec=* | --exe=* | --ex=*)
    exec_prefix=$ac_optarg ;;

  -gas | --gas | --ga | --g)
    # Obsolete; use --with-gas.
    with_gas=yes ;;

  -help | --help | --hel | --he | -h)
    ac_init_help=long ;;
  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
    ac_init_help=recursive ;;
  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
    ac_init_help=short ;;

  -host | --host | --hos | --ho)
    ac_prev=host_alias ;;
  -host=* | --host=* | --hos=* | --ho=*)
    host_alias=$ac_optarg ;;

  -includedir | --includedir | --includedi | --included | --include \
  | --includ | --inclu | --incl | --inc)
    ac_prev=includedir ;;
  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  | --includ=* | --inclu=* | --incl=* | --inc=*)
    includedir=$ac_optarg ;;

  -infodir | --infodir | --infodi | --infod | --info | --inf)
    ac_prev=infodir ;;
  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
    infodir=$ac_optarg ;;

  -libdir | --libdir | --libdi | --libd)
    ac_prev=libdir ;;
  -libdir=* | --libdir=* | --libdi=* | --libd=*)
    libdir=$ac_optarg ;;

  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  | --libexe | --libex | --libe)
    ac_prev=libexecdir ;;
  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  | --libexe=* | --libex=* | --libe=*)
    libexecdir=$ac_optarg ;;

  -localstatedir | --localstatedir | --localstatedi | --localstated \
  | --localstate | --localstat | --localsta | --localst \
  | --locals | --local | --loca | --loc | --lo)
    ac_prev=localstatedir ;;
  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
    localstatedir=$ac_optarg ;;

  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
    ac_prev=mandir ;;
  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
    mandir=$ac_optarg ;;

  -nfp | --nfp | --nf)
    # Obsolete; use --without-fp.
    with_fp=no ;;

  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  | --no-cr | --no-c)
    no_create=yes ;;

  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
    no_recursion=yes ;;

  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
  | --oldin | --oldi | --old | --ol | --o)
    ac_prev=oldincludedir ;;
  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
    oldincludedir=$ac_optarg ;;

  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
    ac_prev=prefix ;;
  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
    prefix=$ac_optarg ;;

  -program-prefix | --program-prefix | --program-prefi | --program-pref \
  | --program-pre | --program-pr | --program-p)
    ac_prev=program_prefix ;;
  -program-prefix=* | --program-prefix=* | --program-prefi=* \
  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
    program_prefix=$ac_optarg ;;

  -program-suffix | --program-suffix | --program-suffi | --program-suff \
  | --program-suf | --program-su | --program-s)
    ac_prev=program_suffix ;;
  -program-suffix=* | --program-suffix=* | --program-suffi=* \
  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
    program_suffix=$ac_optarg ;;

  -program-transform-name | --program-transform-name \
  | --program-transform-nam | --program-transform-na \
  | --program-transform-n | --program-transform- \
  | --program-transform | --program-transfor \
  | --program-transfo | --program-transf \
  | --program-trans | --program-tran \
  | --progr-tra | --program-tr | --program-t)
    ac_prev=program_transform_name ;;
  -program-transform-name=* | --program-transform-name=* \
  | --program-transform-nam=* | --program-transform-na=* \
  | --program-transform-n=* | --program-transform-=* \
  | --program-transform=* | --program-transfor=* \
  | --program-transfo=* | --program-transf=* \
  | --program-trans=* | --program-tran=* \
  | --progr-tra=* | --program-tr=* | --program-t=*)
    program_transform_name=$ac_optarg ;;

  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  | -silent | --silent | --silen | --sile | --sil)
    silent=yes ;;

  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
    ac_prev=sbindir ;;
  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
  | --sbi=* | --sb=*)
    sbindir=$ac_optarg ;;

  -sharedstatedir | --sharedstatedir | --sharedstatedi \
  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
  | --sharedst | --shareds | --shared | --share | --shar \
  | --sha | --sh)
    ac_prev=sharedstatedir ;;
  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
  | --sha=* | --sh=*)
    sharedstatedir=$ac_optarg ;;

  -site | --site | --sit)
    ac_prev=site ;;
  -site=* | --site=* | --sit=*)
    site=$ac_optarg ;;

  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
    ac_prev=srcdir ;;
  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
    srcdir=$ac_optarg ;;

  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
  | --syscon | --sysco | --sysc | --sys | --sy)
    ac_prev=sysconfdir ;;
  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
    sysconfdir=$ac_optarg ;;

  -target | --target | --targe | --targ | --tar | --ta | --t)
    ac_prev=target_alias ;;
  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
    target_alias=$ac_optarg ;;

  -v | -verbose | --verbose | --verbos | --verbo | --verb)
    verbose=yes ;;

  -version | --version | --versio | --versi | --vers | -V)
    ac_init_version=: ;;

  -with-* | --with-*)
    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
    # Reject names that are not valid shell variable names.
    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
      { echo "$as_me: error: invalid package name: $ac_package" >&2
   { (exit 1); exit 1; }; }
    ac_package=`echo $ac_package| sed 's/-/_/g'`
    case $ac_option in
      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
      *) ac_optarg=yes ;;
    esac
    eval "with_$ac_package='$ac_optarg'" ;;

  -without-* | --without-*)
    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
    # Reject names that are not valid shell variable names.
    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
      { echo "$as_me: error: invalid package name: $ac_package" >&2
   { (exit 1); exit 1; }; }
    ac_package=`echo $ac_package | sed 's/-/_/g'`
    eval "with_$ac_package=no" ;;

  --x)
    # Obsolete; use --with-x.
    with_x=yes ;;

  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  | --x-incl | --x-inc | --x-in | --x-i)
    ac_prev=x_includes ;;
  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
    x_includes=$ac_optarg ;;

  -x-libraries | --x-libraries | --x-librarie | --x-librari \
  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
    ac_prev=x_libraries ;;
  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
    x_libraries=$ac_optarg ;;

  -*) { echo "$as_me: error: unrecognized option: $ac_option
Try \`$0 --help' for more information." >&2
   { (exit 1); exit 1; }; }
    ;;

  *=*)
    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
    # Reject names that are not valid shell variable names.
    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
   { (exit 1); exit 1; }; }
    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
    eval "$ac_envvar='$ac_optarg'"
    export $ac_envvar ;;

  *)
    # FIXME: should be removed in autoconf 3.0.
    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
    ;;

  esac
done

if test -n "$ac_prev"; then
  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
  { echo "$as_me: error: missing argument to $ac_option" >&2
   { (exit 1); exit 1; }; }
fi

# Be sure to have absolute paths.
for ac_var in exec_prefix prefix
do
  eval ac_val=$`echo $ac_var`
  case $ac_val in
    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
    *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
   { (exit 1); exit 1; }; };;
  esac
done

# Be sure to have absolute paths.
for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
              localstatedir libdir includedir oldincludedir infodir mandir
do
  eval ac_val=$`echo $ac_var`
  case $ac_val in
    [\\/$]* | ?:[\\/]* ) ;;
    *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
   { (exit 1); exit 1; }; };;
  esac
done

# There might be people who depend on the old broken behavior: `$host'
# used to hold the argument of --host etc.
build=$build_alias
host=$host_alias
target=$target_alias

# FIXME: should be removed in autoconf 3.0.
if test "x$host_alias" != x; then
  if test "x$build_alias" = x; then
    cross_compiling=maybe
    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
    If a cross compiler is detected then cross compile mode will be used." >&2
  elif test "x$build_alias" != "x$host_alias"; then
    cross_compiling=yes
  fi
fi

ac_tool_prefix=
test -n "$host_alias" && ac_tool_prefix=$host_alias-

test "$silent" = yes && exec 6>/dev/null

# Find the source files, if location was not specified.
if test -z "$srcdir"; then
  ac_srcdir_defaulted=yes
  # Try the directory containing this script, then its parent.
  ac_prog=$0
  ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  srcdir=$ac_confdir
  if test ! -r $srcdir/$ac_unique_file; then
    srcdir=..
  fi
else
  ac_srcdir_defaulted=no
fi
if test ! -r $srcdir/$ac_unique_file; then
  if test "$ac_srcdir_defaulted" = yes; then
    { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
   { (exit 1); exit 1; }; }
  else
    { echo "$as_me: error: cannot find sources in $srcdir" >&2
   { (exit 1); exit 1; }; }
  fi
fi
srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
ac_env_build_alias_set=${build_alias+set}
ac_env_build_alias_value=$build_alias
ac_cv_env_build_alias_set=${build_alias+set}
ac_cv_env_build_alias_value=$build_alias
ac_env_host_alias_set=${host_alias+set}
ac_env_host_alias_value=$host_alias
ac_cv_env_host_alias_set=${host_alias+set}
ac_cv_env_host_alias_value=$host_alias
ac_env_target_alias_set=${target_alias+set}
ac_env_target_alias_value=$target_alias
ac_cv_env_target_alias_set=${target_alias+set}
ac_cv_env_target_alias_value=$target_alias
ac_env_CC_set=${CC+set}
ac_env_CC_value=$CC
ac_cv_env_CC_set=${CC+set}
ac_cv_env_CC_value=$CC
ac_env_CFLAGS_set=${CFLAGS+set}
ac_env_CFLAGS_value=$CFLAGS
ac_cv_env_CFLAGS_set=${CFLAGS+set}
ac_cv_env_CFLAGS_value=$CFLAGS
ac_env_LDFLAGS_set=${LDFLAGS+set}
ac_env_LDFLAGS_value=$LDFLAGS
ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
ac_cv_env_LDFLAGS_value=$LDFLAGS
ac_env_CPPFLAGS_set=${CPPFLAGS+set}
ac_env_CPPFLAGS_value=$CPPFLAGS
ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
ac_cv_env_CPPFLAGS_value=$CPPFLAGS
ac_env_CPP_set=${CPP+set}
ac_env_CPP_value=$CPP
ac_cv_env_CPP_set=${CPP+set}
ac_cv_env_CPP_value=$CPP

#
# Report the --help message.
#
if test "$ac_init_help" = "long"; then
  # Omit some internal or obsolete options to make the list less imposing.
  # This message is too long to be a string in the A/UX 3.1 sh.
  cat <<EOF
\`configure' configures this package to adapt to many kinds of systems.

Usage: $0 [OPTION]... [VAR=VALUE]...

To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE.  See below for descriptions of some of the useful variables.

Defaults for the options are specified in brackets.

Configuration:
  -h, --help              display this help and exit
      --help=short        display options specific to this package
      --help=recursive    display the short help of all the included packages
  -V, --version           display version information and exit
  -q, --quiet, --silent   do not print \`checking...' messages
      --cache-file=FILE   cache test results in FILE [disabled]
  -C, --config-cache      alias for \`--cache-file=config.cache'
  -n, --no-create         do not create output files
      --srcdir=DIR        find the sources in DIR [configure dir or \`..']

EOF

  cat <<EOF
Installation directories:
  --prefix=PREFIX         install architecture-independent files in PREFIX
                          [$ac_default_prefix]
  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
                          [PREFIX]

By default, \`make install' will install all the files in
\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
an installation prefix other than \`$ac_default_prefix' using \`--prefix',
for instance \`--prefix=\$HOME'.

For better control, use the options below.

Fine tuning of the installation directories:
  --bindir=DIR           user executables [EPREFIX/bin]
  --sbindir=DIR          system admin executables [EPREFIX/sbin]
  --libexecdir=DIR       program executables [EPREFIX/libexec]
  --datadir=DIR          read-only architecture-independent data [PREFIX/share]
  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
  --libdir=DIR           object code libraries [EPREFIX/lib]
  --includedir=DIR       C header files [PREFIX/include]
  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
  --infodir=DIR          info documentation [PREFIX/info]
  --mandir=DIR           man documentation [PREFIX/man]
EOF

  cat <<\EOF

Program names:
  --program-prefix=PREFIX            prepend PREFIX to installed program names
  --program-suffix=SUFFIX            append SUFFIX to installed program names
  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names

X features:
  --x-includes=DIR    X include files are in DIR
  --x-libraries=DIR   X library files are in DIR

System types:
  --build=BUILD     configure for building on BUILD [guessed]
  --host=HOST       build programs to run on HOST [BUILD]
  --target=TARGET   configure for building compilers for TARGET [HOST]
EOF
fi

if test -n "$ac_init_help"; then

  cat <<\EOF

Optional Features:
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  --disable-dependency-tracking Speeds up one-time builds
  --enable-dependency-tracking  Do not reject slow dependency extractors
  --enable-debug          Build a debugging version.
  --enable-audio=mode_list  Enable audio (Specify comma separated mode list):
                              default:  Automatically select audio device.
                              oss:  OSS /dev/dsp
                              sun:  SunOS /dev/audio
                              hpux: HPUX /dev/audio
                              irix: IRIX audio library
                              mme:  OSF/1 MME
                              sb_dsp: BSD/OS 2.0 /dev/sb_dsp
                              w32:  Windows MMS
                              alsa: ALSA pcm device
                              alib: HPUX network audio (Alib)
                              nas:  NAS - Network Audio System
                              esd:  EsounD
                              vorbis: Ogg Vorbis
                              gogo: MP3 GOGO (Only Windows is supported)
  --enable-esd            EsounD (Obsoleted.  Use --enable-audio=esd)
  --enable-nas            NAS    (Obsoleted.  Use --enable-audio=nas)
  --enable-alsa           ALSA   (Obsoleted.  Use --enable-audio=alsa)
  --disable-alsatest      Do not try to compile and run a test Alsa program
  --disable-esdtest       Do not try to compile and run a test ESD program
  --disable-oggtest       Do not try to compile and run a test Ogg program
  --disable-vorbistest       Do not try to compile and run a test Vorbis program
  --enable-interface=interface_list  Comma separated interface list
  --enable-dynamic        Enable dynamic link interface   (default is no)
  --enable-dynamic=dynamic_list  Comma separated dynamic interface list
  --enable-ncurses        Enable ncurses interface        (default is no)
  --enable-slang          Enable slang interface          (default is no)
  --enable-motif          Enable motif interface          (default is no)
  --enable-tcltk          Enable tcltk interface          (default is no)
  --enable-emacs          Enable emacs interface          (default is no)
  --enable-vt100          Enable VT100 interface          (default is no)
  --enable-xaw            Enable athena interface         (default is no)
  --enable-xskin          Enable X skin interface         (default is no)
  --enable-gtk            Enable GTK+ interface           (default is no)
  --disable-gtktest       Do not try to compile and run a test GTK program
  --enable-server         Enable server interface         (default is no)
  --enable-alsaseq        Enable ALSA sequencer server interface (default is no)
  --enable-w32gui         Enable Windows GUI interface    (default is no)
  --enable-ump            UMP configuration               (default is no)
  --enable-offix          Enable offix support            (default is no)
  --enable-network        Enable network support          (default is no)
  --enable-spectrogram    Enable Sound Spectrogram Viewer (default is no)
  --enable-spline=method  Specify spline method: no|linear|cubic|lagrange
                                                          (default is linear)
  --enable-wrd            Enable WRD interface for X      (default is no)

Optional Packages:
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
   --with-lispdir            Override the default lisp directory
  --with-includes=DIR     Specify include directories (colon separated)
  --with-libraries=DIR    Specify library directories (colon separated)
  --with-elf              create ELF shared object instead of AOUT
  --with-x                use the X Window System
  --with-tcl-includes=DIR Tcl include file path
  --with-tcl-libs=DIR     Tcl library file path
  --with-tk-includes=DIR  Tk include file path
  --with-tk-libs=DIR      Tk library file path
  --with-offix-includes=DIR  Offix include file path
  --with-offix-libs=DIR      Offix include file path
  --with-nas-library=library  NAS absolute library path (Don't use -laudio)
  --with-nas-includes=DIR     NAS include files are in dir
  --with-default-output=<mode>  Specify default output mode (optional):
                       default|alsa|alib|nas|esd|wav|au|aiff|list|vorbis|gogo
  --with-alsa-prefix=PFX  Prefix where Alsa library is installed(optional)
  --with-alsa-inc-prefix=PFX  Prefix where include libraries are (optional)
  --with-esd-prefix=PFX   Prefix where ESD is installed (optional)
  --with-esd-exec-prefix=PFX Exec prefix where ESD is installed (optional)
  --with-ogg-prefix=PFX   Prefix where libogg is installed (optional)
  --with-vorbis-prefix=PFX   Prefix where libvorbis is installed (optional)
  --with-gtk-prefix=PFX   Prefix where GTK is installed (optional)
  --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)

Some influential environment variables:
  CC          C compiler command
  CFLAGS      C compiler flags
  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
              nonstandard directory <lib dir>
  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
              headers in a nonstandard directory <include dir>
  CPP         C preprocessor

Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.

EOF
fi

if test "$ac_init_help" = "recursive"; then
  # If there are subdirs, report their specific --help.
  ac_popdir=`pwd`
  for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
    cd $ac_subdir
    # A "../" for each directory in /$ac_subdir.
    ac_dots=`echo $ac_subdir |
             sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`

    case $srcdir in
    .) # No --srcdir option.  We are building in place.
      ac_sub_srcdir=$srcdir ;;
    [\\/]* | ?:[\\/]* ) # Absolute path.
      ac_sub_srcdir=$srcdir/$ac_subdir ;;
    *) # Relative path.
      ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
    esac

    # Check for guested configure; otherwise get Cygnus style configure.
    if test -f $ac_sub_srcdir/configure.gnu; then
      echo
      $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
    elif test -f $ac_sub_srcdir/configure; then
      echo
      $SHELL $ac_sub_srcdir/configure  --help=recursive
    elif test -f $ac_sub_srcdir/configure.ac ||
           test -f $ac_sub_srcdir/configure.in; then
      echo
      $ac_configure --help
    else
      echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
    fi
    cd $ac_popdir
  done
fi

test -n "$ac_init_help" && exit 0
if $ac_init_version; then
  cat <<\EOF

Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
EOF
  exit 0
fi
exec 5>config.log
cat >&5 <<EOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by $as_me, which was
generated by GNU Autoconf 2.52.  Invocation command line was

  $ $0 $@

EOF
{
cat <<_ASUNAME
## ---------- ##
## Platform.  ##
## ---------- ##

hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
uname -m = `(uname -m) 2>/dev/null || echo unknown`
uname -r = `(uname -r) 2>/dev/null || echo unknown`
uname -s = `(uname -s) 2>/dev/null || echo unknown`
uname -v = `(uname -v) 2>/dev/null || echo unknown`

/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`

/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`

PATH = $PATH

_ASUNAME
} >&5

cat >&5 <<EOF
## ------------ ##
## Core tests.  ##
## ------------ ##

EOF

# Keep a trace of the command line.
# Strip out --no-create and --no-recursion so they do not pile up.
# Also quote any args containing shell meta-characters.
ac_configure_args=
ac_sep=
for ac_arg
do
  case $ac_arg in
  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  | --no-cr | --no-c) ;;
  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
    ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
    ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
    ac_sep=" " ;;
  *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
     ac_sep=" " ;;
  esac
  # Get rid of the leading space.
done

# When interrupted or exit'd, cleanup temporary files, and complete
# config.log.  We remove comments because anyway the quotes in there
# would cause problems or look ugly.
trap 'exit_status=$?
  # Save into config.log some information that might help in debugging.
  echo >&5
  echo "## ----------------- ##" >&5
  echo "## Cache variables.  ##" >&5
  echo "## ----------------- ##" >&5
  echo >&5
  # The following way of writing the cache mishandles newlines in values,
{
  (set) 2>&1 |
    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
    *ac_space=\ *)
      sed -n \
        "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
      ;;
    *)
      sed -n \
        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
      ;;
    esac;
} >&5
  sed "/^$/d" confdefs.h >conftest.log
  if test -s conftest.log; then
    echo >&5
    echo "## ------------ ##" >&5
    echo "## confdefs.h.  ##" >&5
    echo "## ------------ ##" >&5
    echo >&5
    cat conftest.log >&5
  fi
  (echo; echo) >&5
  test "$ac_signal" != 0 &&
    echo "$as_me: caught signal $ac_signal" >&5
  echo "$as_me: exit $exit_status" >&5
  rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
    exit $exit_status
     ' 0
for ac_signal in 1 2 13 15; do
  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
done
ac_signal=0

# confdefs.h avoids OS command line length limits that DEFS can exceed.
rm -rf conftest* confdefs.h
# AIX cpp loses on an empty file, so make sure it contains at least a newline.
echo >confdefs.h

# Let the site file select an alternate cache file if it wants to.
# Prefer explicitly selected file to automatically selected ones.
if test -z "$CONFIG_SITE"; then
  if test "x$prefix" != xNONE; then
    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  else
    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  fi
fi
for ac_site_file in $CONFIG_SITE; do
  if test -r "$ac_site_file"; then
    { echo "$as_me:948: loading site script $ac_site_file" >&5
echo "$as_me: loading site script $ac_site_file" >&6;}
    cat "$ac_site_file" >&5
    . "$ac_site_file"
  fi
done

if test -r "$cache_file"; then
  # Some versions of bash will fail to source /dev/null (special
  # files actually), so we avoid doing that.
  if test -f "$cache_file"; then
    { echo "$as_me:959: loading cache $cache_file" >&5
echo "$as_me: loading cache $cache_file" >&6;}
    case $cache_file in
      [\\/]* | ?:[\\/]* ) . $cache_file;;
      *)                      . ./$cache_file;;
    esac
  fi
else
  { echo "$as_me:967: creating cache $cache_file" >&5
echo "$as_me: creating cache $cache_file" >&6;}
  >$cache_file
fi

# Check that the precious variables saved in the cache have kept the same
# value.
ac_cache_corrupted=false
for ac_var in `(set) 2>&1 |
               sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
  eval ac_old_set=\$ac_cv_env_${ac_var}_set
  eval ac_new_set=\$ac_env_${ac_var}_set
  eval ac_old_val="\$ac_cv_env_${ac_var}_value"
  eval ac_new_val="\$ac_env_${ac_var}_value"
  case $ac_old_set,$ac_new_set in
    set,)
      { echo "$as_me:983: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
      ac_cache_corrupted=: ;;
    ,set)
      { echo "$as_me:987: error: \`$ac_var' was not set in the previous run" >&5
echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
      ac_cache_corrupted=: ;;
    ,);;
    *)
      if test "x$ac_old_val" != "x$ac_new_val"; then
        { echo "$as_me:993: error: \`$ac_var' has changed since the previous run:" >&5
echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
        { echo "$as_me:995:   former value:  $ac_old_val" >&5
echo "$as_me:   former value:  $ac_old_val" >&2;}
        { echo "$as_me:997:   current value: $ac_new_val" >&5
echo "$as_me:   current value: $ac_new_val" >&2;}
        ac_cache_corrupted=:
      fi;;
  esac
  # Pass precious variables to config.status.  It doesn't matter if
  # we pass some twice (in addition to the command line arguments).
  if test "$ac_new_set" = set; then
    case $ac_new_val in
    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
      ac_configure_args="$ac_configure_args '$ac_arg'"
      ;;
    *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
       ;;
    esac
  fi
done
if $ac_cache_corrupted; then
  { echo "$as_me:1016: error: changes in the environment can compromise the build" >&5
echo "$as_me: error: changes in the environment can compromise the build" >&2;}
  { { echo "$as_me:1018: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
   { (exit 1); exit 1; }; }
fi

ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
  *c*,-n*) ECHO_N= ECHO_C='
' ECHO_T='	' ;;
  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
  *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
esac
echo "#! $SHELL" >conftest.sh
echo  "exit 0"   >>conftest.sh
chmod +x conftest.sh
if { (echo "$as_me:1038: PATH=\".;.\"; conftest.sh") >&5
  (PATH=".;."; conftest.sh) 2>&5
  ac_status=$?
  echo "$as_me:1041: \$? = $ac_status" >&5
  (exit $ac_status); }; then
  ac_path_separator=';'
else
  ac_path_separator=:
fi
PATH_SEPARATOR="$ac_path_separator"
rm -f conftest.sh

SHELL=${CONFIG_SHELL-/bin/sh}
ac_aux_dir=
for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
  if test -f $ac_dir/install-sh; then
    ac_aux_dir=$ac_dir
    ac_install_sh="$ac_aux_dir/install-sh -c"
    break
  elif test -f $ac_dir/install.sh; then
    ac_aux_dir=$ac_dir
    ac_install_sh="$ac_aux_dir/install.sh -c"
    break
  elif test -f $ac_dir/shtool; then
    ac_aux_dir=$ac_dir
    ac_install_sh="$ac_aux_dir/shtool install -c"
    break
  fi
done
if test -z "$ac_aux_dir"; then
  { { echo "$as_me:1068: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
   { (exit 1); exit 1; }; }
fi
ac_config_guess="$SHELL $ac_aux_dir/config.guess"
ac_config_sub="$SHELL $ac_aux_dir/config.sub"
ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.

# Make sure we can run config.sub.
$ac_config_sub sun4 >/dev/null 2>&1 ||
  { { echo "$as_me:1078: error: cannot run $ac_config_sub" >&5
echo "$as_me: error: cannot run $ac_config_sub" >&2;}
   { (exit 1); exit 1; }; }

echo "$as_me:1082: checking build system type" >&5
echo $ECHO_N "checking build system type... $ECHO_C" >&6
if test "${ac_cv_build+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_cv_build_alias=$build_alias
test -z "$ac_cv_build_alias" &&
  ac_cv_build_alias=`$ac_config_guess`
test -z "$ac_cv_build_alias" &&
  { { echo "$as_me:1091: error: cannot guess build type; you must specify one" >&5
echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
   { (exit 1); exit 1; }; }
ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
  { { echo "$as_me:1095: error: $ac_config_sub $ac_cv_build_alias failed." >&5
echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
   { (exit 1); exit 1; }; }

fi
echo "$as_me:1100: result: $ac_cv_build" >&5
echo "${ECHO_T}$ac_cv_build" >&6
build=$ac_cv_build
build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`

echo "$as_me:1107: checking host system type" >&5
echo $ECHO_N "checking host system type... $ECHO_C" >&6
if test "${ac_cv_host+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_cv_host_alias=$host_alias
test -z "$ac_cv_host_alias" &&
  ac_cv_host_alias=$ac_cv_build_alias
ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
  { { echo "$as_me:1116: error: $ac_config_sub $ac_cv_host_alias failed" >&5
echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
   { (exit 1); exit 1; }; }

fi
echo "$as_me:1121: result: $ac_cv_host" >&5
echo "${ECHO_T}$ac_cv_host" >&6
host=$ac_cv_host
host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`

echo "$as_me:1128: checking target system type" >&5
echo $ECHO_N "checking target system type... $ECHO_C" >&6
if test "${ac_cv_target+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_cv_target_alias=$target_alias
test "x$ac_cv_target_alias" = "x" &&
  ac_cv_target_alias=$ac_cv_host_alias
ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
  { { echo "$as_me:1137: error: $ac_config_sub $ac_cv_target_alias failed" >&5
echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
   { (exit 1); exit 1; }; }

fi
echo "$as_me:1142: result: $ac_cv_target" >&5
echo "${ECHO_T}$ac_cv_target" >&6
target=$ac_cv_target
target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`

# The aliases save the names the user supplied, while $host etc.
# will get canonicalized.
test -n "$target_alias" &&
  test "$program_prefix$program_suffix$program_transform_name" = \
    NONENONEs,x,x, &&
  program_prefix=${target_alias}-
# Find a good install program.  We prefer a C program (faster),
# so one script is as good as another.  But avoid the broken or
# incompatible versions:
# SysV /etc/install, /usr/sbin/install
# SunOS /usr/etc/install
# IRIX /sbin/install
# AIX /bin/install
# AmigaOS /C/install, which installs bootblocks on floppy discs
# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
# AFS /usr/afsws/bin/install, which mishandles nonexistent args
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo "$as_me:1167: checking for a BSD compatible install" >&5
echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
if test -z "$INSTALL"; then
if test "${ac_cv_path_install+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
    ac_save_IFS=$IFS; IFS=$ac_path_separator
  for ac_dir in $PATH; do
    IFS=$ac_save_IFS
    # Account for people who put trailing slashes in PATH elements.
    case $ac_dir/ in
    / | ./ | .// | /cC/* \
    | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
    | /usr/ucb/* ) ;;
    *)
      # OSF1 and SCO ODT 3.0 have their own names for install.
      # Don't use installbsd from OSF since it installs stuff as root
      # by default.
      for ac_prog in ginstall scoinst install; do
        if $as_executable_p "$ac_dir/$ac_prog"; then
	  if test $ac_prog = install &&
            grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
	    # AIX install.  It has an incompatible calling convention.
	    :
	  elif test $ac_prog = install &&
	    grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
	    # program-specific install script used by HP pwplus--don't use.
	    :
	  else
	    ac_cv_path_install="$ac_dir/$ac_prog -c"
	    break 2
	  fi
	fi
      done
      ;;
    esac
  done

fi
  if test "${ac_cv_path_install+set}" = set; then
    INSTALL=$ac_cv_path_install
  else
    # As a last resort, use the slow shell script.  We don't cache a
    # path for INSTALL within a source directory, because that will
    # break other packages using the cache if that directory is
    # removed, or if the path is relative.
    INSTALL=$ac_install_sh
  fi
fi
echo "$as_me:1216: result: $INSTALL" >&5
echo "${ECHO_T}$INSTALL" >&6

# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
# It thinks the first close brace ends the variable substitution.
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'

test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'

test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'

echo "$as_me:1227: checking whether build environment is sane" >&5
echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
# Just in case
sleep 1
echo timestamp > conftest.file
# Do `set' in a subshell so we don't clobber the current shell's
# arguments.  Must try -L first in case configure is actually a
# symlink; some systems play weird games with the mod time of symlinks
# (eg FreeBSD returns the mod time of the symlink's containing
# directory).
if (
   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
   if test "$*" = "X"; then
      # -L didn't work.
      set X `ls -t $srcdir/configure conftest.file`
   fi
   rm -f conftest.file
   if test "$*" != "X $srcdir/configure conftest.file" \
      && test "$*" != "X conftest.file $srcdir/configure"; then

      # If neither matched, then we have a broken ls.  This can happen
      # if, for instance, CONFIG_SHELL is bash and it inherits a
      # broken ls alias from the environment.  This has actually
      # happened.  Such a system could not be considered "sane".
      { { echo "$as_me:1251: error: ls -t appears to fail.  Make sure there is not a broken
alias in your environment" >&5
echo "$as_me: error: ls -t appears to fail.  Make sure there is not a broken
alias in your environment" >&2;}
   { (exit 1); exit 1; }; }
   fi

   test "$2" = conftest.file
   )
then
   # Ok.
   :
else
   { { echo "$as_me:1264: error: newly created file is older than distributed files!
Check your system clock" >&5
echo "$as_me: error: newly created file is older than distributed files!
Check your system clock" >&2;}
   { (exit 1); exit 1; }; }
fi
echo "$as_me:1270: result: yes" >&5
echo "${ECHO_T}yes" >&6
test "$program_prefix" != NONE &&
  program_transform_name="s,^,$program_prefix,;$program_transform_name"
# Use a double $ so make ignores it.
test "$program_suffix" != NONE &&
  program_transform_name="s,\$,$program_suffix,;$program_transform_name"
# Double any \ or $.  echo might interpret backslashes.
# By default was `s,x,x', remove it if useless.
cat <<\_ACEOF >conftest.sed
s/[\\$]/&&/g;s/;s,x,x,$//
_ACEOF
program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
rm conftest.sed

# expand $ac_aux_dir to an absolute path
am_aux_dir=`CDPATH=:; cd $ac_aux_dir && pwd`

test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
# Use eval to expand $SHELL
if eval "$MISSING --run true"; then
  am_missing_run="$MISSING --run "
else
  am_missing_run=
  am_backtick='`'
  { echo "$as_me:1295: WARNING: ${am_backtick}missing' script is too old or missing" >&5
echo "$as_me: WARNING: ${am_backtick}missing' script is too old or missing" >&2;}
fi

for ac_prog in mawk gawk nawk awk
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo "$as_me:1303: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_AWK+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$AWK"; then
  ac_cv_prog_AWK="$AWK" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_AWK="$ac_prog"
echo "$as_me:1318: found $ac_dir/$ac_word" >&5
break
done

fi
fi
AWK=$ac_cv_prog_AWK
if test -n "$AWK"; then
  echo "$as_me:1326: result: $AWK" >&5
echo "${ECHO_T}$AWK" >&6
else
  echo "$as_me:1329: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  test -n "$AWK" && break
done

echo "$as_me:1336: checking whether ${MAKE-make} sets \${MAKE}" >&5
echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.make <<\EOF
all:
	@echo 'ac_maketemp="${MAKE}"'
EOF
# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
if test -n "$ac_maketemp"; then
  eval ac_cv_prog_make_${ac_make}_set=yes
else
  eval ac_cv_prog_make_${ac_make}_set=no
fi
rm -f conftest.make
fi
if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
  echo "$as_me:1356: result: yes" >&5
echo "${ECHO_T}yes" >&6
  SET_MAKE=
else
  echo "$as_me:1360: result: no" >&5
echo "${ECHO_T}no" >&6
  SET_MAKE="MAKE=${MAKE-make}"
fi

# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given.
if test "${enable_dependency_tracking+set}" = set; then
  enableval="$enable_dependency_tracking"

fi;
if test "x$enable_dependency_tracking" != xno; then
  am_depcomp="$ac_aux_dir/depcomp"
  AMDEPBACKSLASH='\'
fi

if test "x$enable_dependency_tracking" != xno; then
  AMDEP_TRUE=
  AMDEP_FALSE='#'
else
  AMDEP_TRUE='#'
  AMDEP_FALSE=
fi

rm -f .deps 2>/dev/null
mkdir .deps 2>/dev/null
if test -d .deps; then
  DEPDIR=.deps
else
  # MS-DOS does not allow filenames that begin with a dot.
  DEPDIR=_deps
fi
rmdir .deps 2>/dev/null

# test to see if srcdir already configured
if test "`CDPATH=:; cd $srcdir && pwd`" != "`pwd`" &&
   test -f $srcdir/config.status; then
  { { echo "$as_me:1396: error: source directory already configured; run \"make distclean\" there first" >&5
echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
   { (exit 1); exit 1; }; }
fi

# Define the identity of the package.
PACKAGE=TiMidity++
VERSION=2.11.3

cat >>confdefs.h <<EOF
#define PACKAGE "$PACKAGE"
EOF

cat >>confdefs.h <<EOF
#define VERSION "$VERSION"
EOF

# Autoconf 2.50 wants to disallow AM_ names.  We explicitly allow
# the ones we care about.

# Autoconf 2.50 always computes EXEEXT.  However we need to be
# compatible with 2.13, for now.  So we always define EXEEXT, but we
# don't compute it.

# Similar for OBJEXT -- only we only use OBJEXT if the user actually
# requests that it be used.  This is a bit dumb.
: ${OBJEXT=o}

# Some tools Automake needs.

ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal"}

AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}

AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake"}

AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}

MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}

AMTAR=${AMTAR-"${am_missing_run}tar"}

install_sh=${install_sh-"$am_aux_dir/install-sh"}

INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"

# We need awk for the "check" target.  The system "awk" is bad on
# some platforms.

echo "$as_me:1445: checking whether grep returns status" >&5
echo $ECHO_N "checking whether grep returns status... $ECHO_C" >&6
echo "grimblepritz" >grimble
if grep blurfldyick grimble >/dev/null 2>&1 ; then
	contains="./contains"
elif grep grimblepritz grimble >/dev/null 2>&1 ; then
	contains=grep
else
	contains="./contains"
fi
rm -f grimble
case "$contains" in
grep)	echo "$as_me:1457: result: yes" >&5
echo "${ECHO_T}yes" >&6
	;;
./contains)
	echo "$as_me:1461: result: AGH!  Grep doesn't return a status.  Attempting remedial action." >&5
echo "${ECHO_T}AGH!  Grep doesn't return a status.  Attempting remedial action." >&6
	cat >./contains <<'EOSS'
grep "$1" "$2" >.greptmp && cat .greptmp && test -s .greptmp
EOSS
	chmod +x "./contains"
	;;
esac

		    		    		    ac_config_headers="$ac_config_headers config.h"

		    		    		    ac_config_headers="$ac_config_headers interface.h"

# Check whether --with-lispdir or --without-lispdir was given.
if test "${with_lispdir+set}" = set; then
  withval="$with_lispdir"
   lispdir="$withval"
    echo "$as_me:1478: checking where .elc files should go" >&5
echo $ECHO_N "checking where .elc files should go... $ECHO_C" >&6
    echo "$as_me:1480: result: $lispdir" >&5
echo "${ECHO_T}$lispdir" >&6
else

  # If set to t, that means we are running in a shell under Emacs.
  # If you have an Emacs named "t", then use the full path.
  test x"$EMACS" = xt && EMACS=
  for ac_prog in emacs xemacs
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo "$as_me:1491: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_EMACS+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$EMACS"; then
  ac_cv_prog_EMACS="$EMACS" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_EMACS="$ac_prog"
echo "$as_me:1506: found $ac_dir/$ac_word" >&5
break
done

fi
fi
EMACS=$ac_cv_prog_EMACS
if test -n "$EMACS"; then
  echo "$as_me:1514: result: $EMACS" >&5
echo "${ECHO_T}$EMACS" >&6
else
  echo "$as_me:1517: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  test -n "$EMACS" && break
done
test -n "$EMACS" || EMACS="no"

  if test $EMACS != "no"; then
    if test x${lispdir+set} != xset; then
      echo "$as_me:1527: checking where .elc files should go" >&5
echo $ECHO_N "checking where .elc files should go... $ECHO_C" >&6
if test "${am_cv_lispdir+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  	am_cv_lispdir=`$EMACS -batch -q -eval '(while load-path (princ (concat (car load-path) "\n")) (setq load-path (cdr load-path)))' | sed -n -e 's,/$,,' -e '/.*\/lib\/\(x\?emacs\/site-lisp\)$/{s,,${libdir}/\1,;p;q;}' -e '/.*\/share\/\(x\?emacs\/site-lisp\)$/{s,,${datadir}/\1,;p;q;}'`
	if test -z "$am_cv_lispdir"; then
	  am_cv_lispdir='${datadir}/emacs/site-lisp'
	fi

fi
echo "$as_me:1538: result: $am_cv_lispdir" >&5
echo "${ECHO_T}$am_cv_lispdir" >&6
      lispdir="$am_cv_lispdir"
    fi
  fi

fi;

# Check whether --enable-debug or --disable-debug was given.
if test "${enable_debug+set}" = set; then
  enableval="$enable_debug"
   if test "$enableval" = "yes"; then
      CFLAGS="$CFLAGS -g"
    fi
else
   CFLAGS=${CFLAGS--O2}
fi;

EXTRACFLAGS=
EXTRADEFS=
EXTRALIBS=
SYSEXTRAS=
timidity_LDFLAGS=
oss_device=

lib_xm_opt=
lib_xaw_opt=
lib_xmu_opt=
lib_xt_opt=
lib_xprelibs_opt=
lib_xext_opt=
lib_dl_opt=
lib_zip_opt=
lib_png_opt=
lib_offix_opt=
lib_w32gui_opt=
lib_curses_opt=
lib_user32_opt=
lib_user32_test=

WISH=${WISH-wish}
tcltk_dep=

if test "x$with_x" = x; then
    with_x=yes
else
    x_config_flag=yes
fi

for i in `echo $LIBRARY_PATH|sed -e 's,:, ,g'`; do
    LDFLAGS="$LDFLAGS -L${i}"
done
for i in `echo $C_INCLUDE_PATH|sed -e 's,:, ,g'`; do
    CPPFLAGS="$CPPFLAGS -I${i}"
done

LDFLAGS="$LDFLAGS -L${PREFIX-/usr/local}/lib"
CPPFLAGS="$CPPFLAGS -I${PREFIX-/usr/local}/include"
SHLDFLAGS=${SHLDFLAGS-$LDFLAGS}

if test "x$prefix" != xNONE -a "x$prefix" != "x$ac_default_prefix" -a "x$prefix" != "x/usr"; then
  LDFLAGS="-L$prefix/lib $LDFLAGS"
  SHLDFLAGS="-L$prefix/lib $SHLDFLAGS"
  CPPFLAGS="-I$prefix/include $CPPFLAGS"
fi

# Check whether --with-includes or --without-includes was given.
if test "${with_includes+set}" = set; then
  withval="$with_includes"
   j=' '
    for i in `echo "$withval"|sed -e 's,:, ,g'`; do
	j="${j}-I${i} "
    done
    CPPFLAGS="$j$CPPFLAGS"

fi;

# Check whether --with-libraries or --without-libraries was given.
if test "${with_libraries+set}" = set; then
  withval="$with_libraries"
   j=' '
    for i in `echo "$withval"|sed -e 's,:, ,g'`; do
	j="${j}-L${i} "
    done
    LDFLAGS="$j$LDFLAGS"

fi;

ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
set dummy ${ac_tool_prefix}gcc; ac_word=$2
echo "$as_me:1634: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_CC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_CC="${ac_tool_prefix}gcc"
echo "$as_me:1649: found $ac_dir/$ac_word" >&5
break
done

fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
  echo "$as_me:1657: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
  echo "$as_me:1660: result: no" >&5
echo "${ECHO_T}no" >&6
fi

fi
if test -z "$ac_cv_prog_CC"; then
  ac_ct_CC=$CC
  # Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo "$as_me:1669: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CC"; then
  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_ac_ct_CC="gcc"
echo "$as_me:1684: found $ac_dir/$ac_word" >&5
break
done

fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
  echo "$as_me:1692: result: $ac_ct_CC" >&5
echo "${ECHO_T}$ac_ct_CC" >&6
else
  echo "$as_me:1695: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  CC=$ac_ct_CC
else
  CC="$ac_cv_prog_CC"
fi

if test -z "$CC"; then
  if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
set dummy ${ac_tool_prefix}cc; ac_word=$2
echo "$as_me:1708: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_CC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_CC="${ac_tool_prefix}cc"
echo "$as_me:1723: found $ac_dir/$ac_word" >&5
break
done

fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
  echo "$as_me:1731: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
  echo "$as_me:1734: result: no" >&5
echo "${ECHO_T}no" >&6
fi

fi
if test -z "$ac_cv_prog_CC"; then
  ac_ct_CC=$CC
  # Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo "$as_me:1743: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CC"; then
  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_ac_ct_CC="cc"
echo "$as_me:1758: found $ac_dir/$ac_word" >&5
break
done

fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
  echo "$as_me:1766: result: $ac_ct_CC" >&5
echo "${ECHO_T}$ac_ct_CC" >&6
else
  echo "$as_me:1769: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  CC=$ac_ct_CC
else
  CC="$ac_cv_prog_CC"
fi

fi
if test -z "$CC"; then
  # Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo "$as_me:1782: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_CC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  ac_prog_rejected=no
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
  ac_prog_rejected=yes
  continue
fi
ac_cv_prog_CC="cc"
echo "$as_me:1802: found $ac_dir/$ac_word" >&5
break
done

if test $ac_prog_rejected = yes; then
  # We found a bogon in the path, so make sure we never use it.
  set dummy $ac_cv_prog_CC
  shift
  if test $# != 0; then
    # We chose a different compiler from the bogus one.
    # However, it has the same basename, so the bogon will be chosen
    # first if we set CC to just the basename; use the full file name.
    shift
    set dummy "$ac_dir/$ac_word" ${1+"$@"}
    shift
    ac_cv_prog_CC="$@"
  fi
fi
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
  echo "$as_me:1824: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
  echo "$as_me:1827: result: no" >&5
echo "${ECHO_T}no" >&6
fi

fi
if test -z "$CC"; then
  if test -n "$ac_tool_prefix"; then
  for ac_prog in cl
  do
    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
echo "$as_me:1838: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_CC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
echo "$as_me:1853: found $ac_dir/$ac_word" >&5
break
done

fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
  echo "$as_me:1861: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
  echo "$as_me:1864: result: no" >&5
echo "${ECHO_T}no" >&6
fi

    test -n "$CC" && break
  done
fi
if test -z "$CC"; then
  ac_ct_CC=$CC
  for ac_prog in cl
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo "$as_me:1877: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CC"; then
  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_ac_ct_CC="$ac_prog"
echo "$as_me:1892: found $ac_dir/$ac_word" >&5
break
done

fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
  echo "$as_me:1900: result: $ac_ct_CC" >&5
echo "${ECHO_T}$ac_ct_CC" >&6
else
  echo "$as_me:1903: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  test -n "$ac_ct_CC" && break
done

  CC=$ac_ct_CC
fi

fi

test -z "$CC" && { { echo "$as_me:1915: error: no acceptable cc found in \$PATH" >&5
echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
   { (exit 1); exit 1; }; }

# Provide some information about the compiler.
echo "$as_me:1920:" \
     "checking for C compiler version" >&5
ac_compiler=`set X $ac_compile; echo $2`
{ (eval echo "$as_me:1923: \"$ac_compiler --version </dev/null >&5\"") >&5
  (eval $ac_compiler --version </dev/null >&5) 2>&5
  ac_status=$?
  echo "$as_me:1926: \$? = $ac_status" >&5
  (exit $ac_status); }
{ (eval echo "$as_me:1928: \"$ac_compiler -v </dev/null >&5\"") >&5
  (eval $ac_compiler -v </dev/null >&5) 2>&5
  ac_status=$?
  echo "$as_me:1931: \$? = $ac_status" >&5
  (exit $ac_status); }
{ (eval echo "$as_me:1933: \"$ac_compiler -V </dev/null >&5\"") >&5
  (eval $ac_compiler -V </dev/null >&5) 2>&5
  ac_status=$?
  echo "$as_me:1936: \$? = $ac_status" >&5
  (exit $ac_status); }

cat >conftest.$ac_ext <<_ACEOF
#line 1940 "configure"
#include "confdefs.h"

int
main ()
{

  ;
  return 0;
}
_ACEOF
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files a.out a.exe"
# Try to create an executable without -o first, disregard a.out.
# It will help us diagnose broken compilers, and finding out an intuition
# of exeext.
echo "$as_me:1956: checking for C compiler default output" >&5
echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
if { (eval echo "$as_me:1959: \"$ac_link_default\"") >&5
  (eval $ac_link_default) 2>&5
  ac_status=$?
  echo "$as_me:1962: \$? = $ac_status" >&5
  (exit $ac_status); }; then
  # Find the output, starting from the most likely.  This scheme is
# not robust to junk in `.', hence go to wildcards (a.*) only as a last
# resort.
for ac_file in `ls a.exe conftest.exe 2>/dev/null;
                ls a.out conftest 2>/dev/null;
                ls a.* conftest.* 2>/dev/null`; do
  case $ac_file in
    *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
    a.out ) # We found the default executable, but exeext='' is most
            # certainly right.
            break;;
    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
          # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
          export ac_cv_exeext
          break;;
    * ) break;;
  esac
done
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
{ { echo "$as_me:1985: error: C compiler cannot create executables" >&5
echo "$as_me: error: C compiler cannot create executables" >&2;}
   { (exit 77); exit 77; }; }
fi

ac_exeext=$ac_cv_exeext
echo "$as_me:1991: result: $ac_file" >&5
echo "${ECHO_T}$ac_file" >&6

# Check the compiler produces executables we can run.  If not, either
# the compiler is broken, or we cross compile.
echo "$as_me:1996: checking whether the C compiler works" >&5
echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
# If not cross compiling, check that we can run a simple program.
if test "$cross_compiling" != yes; then
  if { ac_try='./$ac_file'
  { (eval echo "$as_me:2002: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:2005: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
    cross_compiling=no
  else
    if test "$cross_compiling" = maybe; then
	cross_compiling=yes
    else
	{ { echo "$as_me:2012: error: cannot run C compiled programs.
If you meant to cross compile, use \`--host'." >&5
echo "$as_me: error: cannot run C compiled programs.
If you meant to cross compile, use \`--host'." >&2;}
   { (exit 1); exit 1; }; }
    fi
  fi
fi
echo "$as_me:2020: result: yes" >&5
echo "${ECHO_T}yes" >&6

rm -f a.out a.exe conftest$ac_cv_exeext
ac_clean_files=$ac_clean_files_save
# Check the compiler produces executables we can run.  If not, either
# the compiler is broken, or we cross compile.
echo "$as_me:2027: checking whether we are cross compiling" >&5
echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
echo "$as_me:2029: result: $cross_compiling" >&5
echo "${ECHO_T}$cross_compiling" >&6

echo "$as_me:2032: checking for executable suffix" >&5
echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
if { (eval echo "$as_me:2034: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:2037: \$? = $ac_status" >&5
  (exit $ac_status); }; then
  # If both `conftest.exe' and `conftest' are `present' (well, observable)
# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
# work properly (i.e., refer to `conftest.exe'), while it won't with
# `rm'.
for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
  case $ac_file in
    *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
          export ac_cv_exeext
          break;;
    * ) break;;
  esac
done
else
  { { echo "$as_me:2053: error: cannot compute EXEEXT: cannot compile and link" >&5
echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
   { (exit 1); exit 1; }; }
fi

rm -f conftest$ac_cv_exeext
echo "$as_me:2059: result: $ac_cv_exeext" >&5
echo "${ECHO_T}$ac_cv_exeext" >&6

rm -f conftest.$ac_ext
EXEEXT=$ac_cv_exeext
ac_exeext=$EXEEXT
echo "$as_me:2065: checking for object suffix" >&5
echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
if test "${ac_cv_objext+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 2071 "configure"
#include "confdefs.h"

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.o conftest.obj
if { (eval echo "$as_me:2083: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:2086: \$? = $ac_status" >&5
  (exit $ac_status); }; then
  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
  case $ac_file in
    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
       break;;
  esac
done
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
{ { echo "$as_me:2098: error: cannot compute OBJEXT: cannot compile" >&5
echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
   { (exit 1); exit 1; }; }
fi

rm -f conftest.$ac_cv_objext conftest.$ac_ext
fi
echo "$as_me:2105: result: $ac_cv_objext" >&5
echo "${ECHO_T}$ac_cv_objext" >&6
OBJEXT=$ac_cv_objext
ac_objext=$OBJEXT
echo "$as_me:2109: checking whether we are using the GNU C compiler" >&5
echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
if test "${ac_cv_c_compiler_gnu+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 2115 "configure"
#include "confdefs.h"

int
main ()
{
#ifndef __GNUC__
       choke me
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:2130: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:2133: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:2136: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:2139: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_compiler_gnu=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_compiler_gnu=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
ac_cv_c_compiler_gnu=$ac_compiler_gnu

fi
echo "$as_me:2151: result: $ac_cv_c_compiler_gnu" >&5
echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
GCC=`test $ac_compiler_gnu = yes && echo yes`
ac_test_CFLAGS=${CFLAGS+set}
ac_save_CFLAGS=$CFLAGS
CFLAGS="-g"
echo "$as_me:2157: checking whether $CC accepts -g" >&5
echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
if test "${ac_cv_prog_cc_g+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 2163 "configure"
#include "confdefs.h"

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:2175: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:2178: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:2181: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:2184: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_prog_cc_g=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_prog_cc_g=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:2194: result: $ac_cv_prog_cc_g" >&5
echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
if test "$ac_test_CFLAGS" = set; then
  CFLAGS=$ac_save_CFLAGS
elif test $ac_cv_prog_cc_g = yes; then
  if test "$GCC" = yes; then
    CFLAGS="-g -O2"
  else
    CFLAGS="-g"
  fi
else
  if test "$GCC" = yes; then
    CFLAGS="-O2"
  else
    CFLAGS=
  fi
fi
# Some people use a C++ compiler to compile C.  Since we use `exit',
# in C++ we need to declare it.  In case someone uses the same compiler
# for both compiling C and C++ we need to have the C++ compiler decide
# the declaration of exit, since it's the most demanding environment.
cat >conftest.$ac_ext <<_ACEOF
#ifndef __cplusplus
  choke me
#endif
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:2221: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:2224: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:2227: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:2230: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  for ac_declaration in \
   ''\
   '#include <stdlib.h>' \
   'extern "C" void std::exit (int) throw (); using std::exit;' \
   'extern "C" void std::exit (int); using std::exit;' \
   'extern "C" void exit (int) throw ();' \
   'extern "C" void exit (int);' \
   'void exit (int);'
do
  cat >conftest.$ac_ext <<_ACEOF
#line 2242 "configure"
#include "confdefs.h"
#include <stdlib.h>
$ac_declaration
int
main ()
{
exit (42);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:2255: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:2258: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:2261: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:2264: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  :
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
continue
fi
rm -f conftest.$ac_objext conftest.$ac_ext
  cat >conftest.$ac_ext <<_ACEOF
#line 2274 "configure"
#include "confdefs.h"
$ac_declaration
int
main ()
{
exit (42);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:2286: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:2289: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:2292: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:2295: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  break
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
done
rm -f conftest*
if test -n "$ac_declaration"; then
  echo '#ifdef __cplusplus' >>confdefs.h
  echo $ac_declaration      >>confdefs.h
  echo '#endif'             >>confdefs.h
fi

else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

ac_config_commands="$ac_config_commands default-1"

am_make=${MAKE-make}
cat > confinc << 'END'
doit:
	@echo done
END
# If we don't find an include directive, just comment out the code.
echo "$as_me:2330: checking for style of include used by $am_make" >&5
echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6
am__include='#'
am__quote=
_am_result=none
# First try GNU make style include.
echo "include confinc" > confmf
# We grep out `Entering directory' and `Leaving directory'
# messages which can occur if `w' ends up in MAKEFLAGS.
# In particular we don't look at `^make:' because GNU make might
# be invoked under some other name (usually "gmake"), in which
# case it prints its new name instead of `make'.
if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
   am__include=include
   am__quote=
   _am_result=GNU
fi
# Now try BSD make style include.
if test "$am__include" = "#"; then
   echo '.include "confinc"' > confmf
   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
      am__include=.include
      am__quote='"'
      _am_result=BSD
   fi
fi

echo "$as_me:2357: result: $_am_result" >&5
echo "${ECHO_T}$_am_result" >&6
rm -f confinc confmf

depcc="$CC"   am_compiler_list=

echo "$as_me:2363: checking dependency style of $depcc" >&5
echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
  # We make a subdir and do the tests there.  Otherwise we can end up
  # making bogus files that we don't know about and never remove.  For
  # instance it was reported that on HP-UX the gcc test will end up
  # making a dummy file named `D' -- because `-MD' means `put the output
  # in D'.
  mkdir conftest.dir
  # Copy depcomp to subdir because otherwise we won't find it if we're
  # using a relative directory.
  cp "$am_depcomp" conftest.dir
  cd conftest.dir

  am_cv_CC_dependencies_compiler_type=none
  if test "$am_compiler_list" = ""; then
     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
  fi
  for depmode in $am_compiler_list; do
    # We need to recreate these files for each test, as the compiler may
    # overwrite some of them when testing with obscure command lines.
    # This happens at least with the AIX C compiler.
    echo '#include "conftest.h"' > conftest.c
    echo 'int i;' > conftest.h
    echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf

    case $depmode in
    nosideeffect)
      # after this tag, mechanisms are not by side-effect, so they'll
      # only be used when explicitly requested
      if test "x$enable_dependency_tracking" = xyes; then
	continue
      else
	break
      fi
      ;;
    none) break ;;
    esac
    # We check with `-c' and `-o' for the sake of the "dashmstdout"
    # mode.  It turns out that the SunPro C++ compiler does not properly
    # handle `-M -o', and we need to detect this.
    if depmode=$depmode \
       source=conftest.c object=conftest.o \
       depfile=conftest.Po tmpdepfile=conftest.TPo \
       $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
       grep conftest.h conftest.Po > /dev/null 2>&1 &&
       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
      am_cv_CC_dependencies_compiler_type=$depmode
      break
    fi
  done

  cd ..
  rm -rf conftest.dir
else
  am_cv_CC_dependencies_compiler_type=none
fi

fi
echo "$as_me:2425: result: $am_cv_CC_dependencies_compiler_type" >&5
echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
CCDEPMODE="depmode=$am_cv_CC_dependencies_compiler_type"

# Find a good install program.  We prefer a C program (faster),
# so one script is as good as another.  But avoid the broken or
# incompatible versions:
# SysV /etc/install, /usr/sbin/install
# SunOS /usr/etc/install
# IRIX /sbin/install
# AIX /bin/install
# AmigaOS /C/install, which installs bootblocks on floppy discs
# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
# AFS /usr/afsws/bin/install, which mishandles nonexistent args
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo "$as_me:2441: checking for a BSD compatible install" >&5
echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
if test -z "$INSTALL"; then
if test "${ac_cv_path_install+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
    ac_save_IFS=$IFS; IFS=$ac_path_separator
  for ac_dir in $PATH; do
    IFS=$ac_save_IFS
    # Account for people who put trailing slashes in PATH elements.
    case $ac_dir/ in
    / | ./ | .// | /cC/* \
    | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
    | /usr/ucb/* ) ;;
    *)
      # OSF1 and SCO ODT 3.0 have their own names for install.
      # Don't use installbsd from OSF since it installs stuff as root
      # by default.
      for ac_prog in ginstall scoinst install; do
        if $as_executable_p "$ac_dir/$ac_prog"; then
	  if test $ac_prog = install &&
            grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
	    # AIX install.  It has an incompatible calling convention.
	    :
	  elif test $ac_prog = install &&
	    grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
	    # program-specific install script used by HP pwplus--don't use.
	    :
	  else
	    ac_cv_path_install="$ac_dir/$ac_prog -c"
	    break 2
	  fi
	fi
      done
      ;;
    esac
  done

fi
  if test "${ac_cv_path_install+set}" = set; then
    INSTALL=$ac_cv_path_install
  else
    # As a last resort, use the slow shell script.  We don't cache a
    # path for INSTALL within a source directory, because that will
    # break other packages using the cache if that directory is
    # removed, or if the path is relative.
    INSTALL=$ac_install_sh
  fi
fi
echo "$as_me:2490: result: $INSTALL" >&5
echo "${ECHO_T}$INSTALL" >&6

# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
# It thinks the first close brace ends the variable substitution.
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'

test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'

test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'

if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
echo "$as_me:2504: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_RANLIB+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$RANLIB"; then
  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
echo "$as_me:2519: found $ac_dir/$ac_word" >&5
break
done

fi
fi
RANLIB=$ac_cv_prog_RANLIB
if test -n "$RANLIB"; then
  echo "$as_me:2527: result: $RANLIB" >&5
echo "${ECHO_T}$RANLIB" >&6
else
  echo "$as_me:2530: result: no" >&5
echo "${ECHO_T}no" >&6
fi

fi
if test -z "$ac_cv_prog_RANLIB"; then
  ac_ct_RANLIB=$RANLIB
  # Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo "$as_me:2539: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_RANLIB"; then
  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
else
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  $as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_ac_ct_RANLIB="ranlib"
echo "$as_me:2554: found $ac_dir/$ac_word" >&5
break
done

  test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
fi
fi
ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
if test -n "$ac_ct_RANLIB"; then
  echo "$as_me:2563: result: $ac_ct_RANLIB" >&5
echo "${ECHO_T}$ac_ct_RANLIB" >&6
else
  echo "$as_me:2566: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  RANLIB=$ac_ct_RANLIB
else
  RANLIB="$ac_cv_prog_RANLIB"
fi

echo "$as_me:2575: checking whether ln -s works" >&5
echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
LN_S=$as_ln_s
if test "$LN_S" = "ln -s"; then
  echo "$as_me:2579: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
  echo "$as_me:2582: result: no, using $LN_S" >&5
echo "${ECHO_T}no, using $LN_S" >&6
fi

echo "$as_me:2586: checking whether -rdynamic option is recognized" >&5
echo $ECHO_N "checking whether -rdynamic option is recognized... $ECHO_C" >&6
ac_ccoption=`echo rdynamic | sed 'y%./+-%__p_%'`
if eval "test \"\${timidity_cv_ccoption_$ac_ccoption+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat > conftest.$ac_ext <<EOF
int main() {return 0;}
EOF
if ${CC-cc} $LDFLAGS $CFLAGS -o conftest${ac_exeext} -rdynamic conftest.$ac_ext > conftest.out 2>&1; then
    if test -s conftest.out; then
	eval "timidity_cv_ccoption_$ac_ccoption=no"
    else
	eval "timidity_cv_ccoption_$ac_ccoption=yes"
    fi
else
    eval "timidity_cv_ccoption_$ac_ccoption=no"
fi

fi

if eval "test \"`echo '$timidity_cv_ccoption_'$ac_ccoption`\" = yes"; then
  echo "$as_me:2608: result: yes" >&5
echo "${ECHO_T}yes" >&6

else
  echo "$as_me:2612: result: no" >&5
echo "${ECHO_T}no" >&6

fi

# Check whether --with-elf or --without-elf was given.
if test "${with_elf+set}" = set; then
  withval="$with_elf"
   ELFFORMAT=$withval
else
   ELFFORMAT="yes"
fi;

case "$target" in
  *-*-hpux*)
    EXTRADEFS="-DHPUX"
    test -n "$SHLD" || SHLD="ld -b"
    so="sl"
    ;;
  *-sgi-irix*)
        case ".$CC" in .cc*) EXTRACFLAGS="-signed";; esac
    test -n "$SHLD" || SHLD="cc -shared -all"
    so="so"
    ;;
  *-*-netbsd*)
    test -n "$SHLD" || SHLD="$CC -shared -nostartfiles"
    so="so"
    ;;

  *-*-freebsd2*)
    EXTRALIBS="$EXTRALIBS -lxpg4"
    test -n "$SHLD" || SHLD="ld -Bshareable"
    so="so"
    ;;
  *-*-freebsd*)
    if test "$ELFFORMAT" = yes; then
        test -n "$SHLD" || SHLD="ld -Bshareable"
    else
        SHCFLAGS=-aout
        SHLDFLAGS="-L/usr/X11R6/lib/aout $SHLDFLAGS"
        test -n "$SHLD" || SHLD="env OBJFORMAT=aout ld -shared"
    fi
    EXTRALIBS="$EXTRALIBS -lxpg4"
    so="so"
    ;;

#  *-*-freebsd*)
#    EXTRALIBS="$EXTRALIBS -lxpg4"
#    test -n "$SHLD" || SHLD="ld -Bshareable"
#    so="so"
#    ;;

  *-*-cygwin*)
    EXTRADEFS="-D__W32__"
    # ??
    case "x${CC} " in
      "xbcc32 "*) test -n "$SHLD" || SHLD="tlink32 -Tpd" ;;
      "xcl "*) test -n "$SHLD" || SHLD="link -dll" ;;
      "xgcc "*) test -n "$SHLD" || SHLD="gcc -mdll" ;;
      *) test -n "$SHLD" || SHLD="unknown" ;;
    esac
    so="dll"
    CYGNUS=yes
    lib_user32_test=-luser32
    ;;
  *-dec-*)
    EXTRADEFS="-DDEC"
    test -n "$SHLD" || SHLD="ld -Bdynamic -G"
    so="so"
    ;;
  *-*-solaris*)
    EXTRADEFS="-DSOLARIS"
    test -n "$SHLD" || SHLD="/usr/ccs/bin/ld -G"
    so="so"
    ;;
  *-*-nextstep*)
    test -n "$SHLD" || SHLD="/usr/ccs/bin/ld -G"
    so="so"
    ;;
  *)
    test -n "$SHLD" || \
      if test "x$GCC" = xyes; then
        SHLD="$CC -shared"
      else
        SHLD="ld -Bdynamic -G"
      fi
    so="so"
    ;;
esac

echo "$as_me:2702: checking for sqrt in -lm" >&5
echo $ECHO_N "checking for sqrt in -lm... $ECHO_C" >&6
if test "${ac_cv_lib_m_sqrt+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lm  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 2710 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char sqrt ();
int
main ()
{
sqrt ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:2729: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:2732: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:2735: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:2738: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_m_sqrt=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_m_sqrt=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:2749: result: $ac_cv_lib_m_sqrt" >&5
echo "${ECHO_T}$ac_cv_lib_m_sqrt" >&6
if test $ac_cv_lib_m_sqrt = yes; then
  cat >>confdefs.h <<EOF
#define HAVE_LIBM 1
EOF

  LIBS="-lm $LIBS"

fi

echo "$as_me:2760: checking for socket in -lsocket" >&5
echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
if test "${ac_cv_lib_socket_socket+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lsocket  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 2768 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char socket ();
int
main ()
{
socket ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:2787: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:2790: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:2793: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:2796: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_socket_socket=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_socket_socket=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:2807: result: $ac_cv_lib_socket_socket" >&5
echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
if test $ac_cv_lib_socket_socket = yes; then
  cat >>confdefs.h <<EOF
#define HAVE_LIBSOCKET 1
EOF

  LIBS="-lsocket $LIBS"

fi

echo "$as_me:2818: checking for dlopen in -ldl" >&5
echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
if test "${ac_cv_lib_dl_dlopen+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-ldl  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 2826 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char dlopen ();
int
main ()
{
dlopen ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:2845: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:2848: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:2851: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:2854: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_dl_dlopen=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_dl_dlopen=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:2865: result: $ac_cv_lib_dl_dlopen" >&5
echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
if test $ac_cv_lib_dl_dlopen = yes; then
  lib_dl_opt=-ldl
fi

for ac_func in gethostbyname
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:2874: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 2880 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

int
main ()
{
/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
f = $ac_func;
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:2911: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:2914: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:2917: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:2920: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:2930: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

else

echo "$as_me:2939: checking for gethostbyname in -lnsl" >&5
echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lnsl  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 2947 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char gethostbyname ();
int
main ()
{
gethostbyname ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:2966: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:2969: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:2972: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:2975: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_nsl_gethostbyname=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_nsl_gethostbyname=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:2986: result: $ac_cv_lib_nsl_gethostbyname" >&5
echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
if test $ac_cv_lib_nsl_gethostbyname = yes; then
  cat >>confdefs.h <<EOF
#define HAVE_LIBNSL 1
EOF

  LIBS="-lnsl $LIBS"

fi

fi
done

ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
echo "$as_me:3005: checking how to run the C preprocessor" >&5
echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
  CPP=
fi
if test -z "$CPP"; then
  if test "${ac_cv_prog_CPP+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
      # Double quotes because CPP needs to be expanded
    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
    do
      ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
do
  # Use a header file that comes with gcc, so configuring glibc
  # with a fresh cross-compiler works.
  # On the NeXT, cc -E runs the code through the compiler's parser,
  # not just through cpp. "Syntax error" is here to catch this case.
  cat >conftest.$ac_ext <<_ACEOF
#line 3026 "configure"
#include "confdefs.h"
#include <assert.h>
                     Syntax error
_ACEOF
if { (eval echo "$as_me:3031: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:3037: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  :
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  # Broken: fails on valid input.
continue
fi
rm -f conftest.err conftest.$ac_ext

  # OK, works on sane cases.  Now check whether non-existent headers
  # can be detected and how.
  cat >conftest.$ac_ext <<_ACEOF
#line 3060 "configure"
#include "confdefs.h"
#include <ac_nonexistent.h>
_ACEOF
if { (eval echo "$as_me:3064: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:3070: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  # Broken: success on invalid input.
continue
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  # Passes both tests.
ac_preproc_ok=:
break
fi
rm -f conftest.err conftest.$ac_ext

done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.err conftest.$ac_ext
if $ac_preproc_ok; then
  break
fi

    done
    ac_cv_prog_CPP=$CPP

fi
  CPP=$ac_cv_prog_CPP
else
  ac_cv_prog_CPP=$CPP
fi
echo "$as_me:3107: result: $CPP" >&5
echo "${ECHO_T}$CPP" >&6
ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
do
  # Use a header file that comes with gcc, so configuring glibc
  # with a fresh cross-compiler works.
  # On the NeXT, cc -E runs the code through the compiler's parser,
  # not just through cpp. "Syntax error" is here to catch this case.
  cat >conftest.$ac_ext <<_ACEOF
#line 3117 "configure"
#include "confdefs.h"
#include <assert.h>
                     Syntax error
_ACEOF
if { (eval echo "$as_me:3122: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:3128: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  :
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  # Broken: fails on valid input.
continue
fi
rm -f conftest.err conftest.$ac_ext

  # OK, works on sane cases.  Now check whether non-existent headers
  # can be detected and how.
  cat >conftest.$ac_ext <<_ACEOF
#line 3151 "configure"
#include "confdefs.h"
#include <ac_nonexistent.h>
_ACEOF
if { (eval echo "$as_me:3155: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:3161: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  # Broken: success on invalid input.
continue
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  # Passes both tests.
ac_preproc_ok=:
break
fi
rm -f conftest.err conftest.$ac_ext

done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.err conftest.$ac_ext
if $ac_preproc_ok; then
  :
else
  { { echo "$as_me:3189: error: C preprocessor \"$CPP\" fails sanity check" >&5
echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
   { (exit 1); exit 1; }; }
fi

ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

echo "$as_me:3200: checking for X" >&5
echo $ECHO_N "checking for X... $ECHO_C" >&6

# Check whether --with-x or --without-x was given.
if test "${with_x+set}" = set; then
  withval="$with_x"

fi;
# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
if test "x$with_x" = xno; then
  # The user explicitly disabled X.
  have_x=disabled
else
  if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
    # Both variables are already set.
    have_x=yes
  else
    if test "${ac_cv_have_x+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  # One or both of the vars are not set, and there is no cached value.
ac_x_includes=no ac_x_libraries=no
rm -fr conftest.dir
if mkdir conftest.dir; then
  cd conftest.dir
  # Make sure to not put "make" in the Imakefile rules, since we grep it out.
  cat >Imakefile <<'EOF'
acfindx:
	@echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
EOF
  if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
    eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
    for ac_extension in a so sl; do
      if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
         test -f $ac_im_libdir/libX11.$ac_extension; then
        ac_im_usrlibdir=$ac_im_libdir; break
      fi
    done
    # Screen out bogus values from the imake configuration.  They are
    # bogus both because they are the default anyway, and because
    # using them would break gcc on systems where it needs fixed includes.
    case $ac_im_incroot in
	/usr/include) ;;
	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
    esac
    case $ac_im_usrlibdir in
	/usr/lib | /lib) ;;
	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
    esac
  fi
  cd ..
  rm -fr conftest.dir
fi

# Standard set of common directories for X headers.
# Check X11 before X11Rn because it is often a symlink to the current release.
ac_x_header_dirs='
/usr/X11/include
/usr/X11R6/include
/usr/X11R5/include
/usr/X11R4/include

/usr/include/X11
/usr/include/X11R6
/usr/include/X11R5
/usr/include/X11R4

/usr/local/X11/include
/usr/local/X11R6/include
/usr/local/X11R5/include
/usr/local/X11R4/include

/usr/local/include/X11
/usr/local/include/X11R6
/usr/local/include/X11R5
/usr/local/include/X11R4

/usr/X386/include
/usr/x386/include
/usr/XFree86/include/X11

/usr/include
/usr/local/include
/usr/unsupported/include
/usr/athena/include
/usr/local/x11r5/include
/usr/lpp/Xamples/include

/usr/openwin/include
/usr/openwin/share/include'

if test "$ac_x_includes" = no; then
  # Guess where to find include files, by looking for Intrinsic.h.
  # First, try using that file with no special directory specified.
  cat >conftest.$ac_ext <<_ACEOF
#line 3297 "configure"
#include "confdefs.h"
#include <X11/Intrinsic.h>
_ACEOF
if { (eval echo "$as_me:3301: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:3307: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  # We can compile using X headers with no special include directory.
ac_x_includes=
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  for ac_dir in $ac_x_header_dirs; do
  if test -r "$ac_dir/X11/Intrinsic.h"; then
    ac_x_includes=$ac_dir
    break
  fi
done
fi
rm -f conftest.err conftest.$ac_ext
fi # $ac_x_includes = no

if test "$ac_x_libraries" = no; then
  # Check for the libraries.
  # See if we find them without any special options.
  # Don't add to $LIBS permanently.
  ac_save_LIBS=$LIBS
  LIBS="-lXt $LIBS"
  cat >conftest.$ac_ext <<_ACEOF
#line 3340 "configure"
#include "confdefs.h"
#include <X11/Intrinsic.h>
int
main ()
{
XtMalloc (0)
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:3352: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:3355: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:3358: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:3361: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  LIBS=$ac_save_LIBS
# We can link X programs with no special library path.
ac_x_libraries=
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
LIBS=$ac_save_LIBS
for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
do
  # Don't even attempt the hair of trying to link an X program!
  for ac_extension in a so sl; do
    if test -r $ac_dir/libXt.$ac_extension; then
      ac_x_libraries=$ac_dir
      break 2
    fi
  done
done
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi # $ac_x_libraries = no

if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
  # Didn't find X anywhere.  Cache the known absence of X.
  ac_cv_have_x="have_x=no"
else
  # Record where we found X for the cache.
  ac_cv_have_x="have_x=yes \
	        ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
fi
fi

  fi
  eval "$ac_cv_have_x"
fi # $with_x != no

if test "$have_x" != yes; then
  echo "$as_me:3399: result: $have_x" >&5
echo "${ECHO_T}$have_x" >&6
  no_x=yes
else
  # If each of the values was on the command line, it overrides each guess.
  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
  # Update the cache value to reflect the command line values.
  ac_cv_have_x="have_x=yes \
		ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
  echo "$as_me:3409: result: libraries $x_libraries, headers $x_includes" >&5
echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
fi

if test "$no_x" = yes; then
  # Not all programs may use this symbol, but it does not hurt to define it.

cat >>confdefs.h <<\EOF
#define X_DISPLAY_MISSING 1
EOF

  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
else
  if test -n "$x_includes"; then
    X_CFLAGS="$X_CFLAGS -I$x_includes"
  fi

  # It would also be nice to do this for all -L options, not just this one.
  if test -n "$x_libraries"; then
    X_LIBS="$X_LIBS -L$x_libraries"
    # For Solaris; some versions of Sun CC require a space after -R and
    # others require no space.  Words are not sufficient . . . .
    case `(uname -sr) 2>/dev/null` in
    "SunOS 5"*)
      echo "$as_me:3433: checking whether -R must be followed by a space" >&5
echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
      ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
      cat >conftest.$ac_ext <<_ACEOF
#line 3437 "configure"
#include "confdefs.h"

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:3449: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:3452: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:3455: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:3458: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_R_nospace=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_R_nospace=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
      if test $ac_R_nospace = yes; then
	echo "$as_me:3468: result: no" >&5
echo "${ECHO_T}no" >&6
	X_LIBS="$X_LIBS -R$x_libraries"
      else
	LIBS="$ac_xsave_LIBS -R $x_libraries"
	cat >conftest.$ac_ext <<_ACEOF
#line 3474 "configure"
#include "confdefs.h"

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:3486: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:3489: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:3492: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:3495: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_R_space=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_R_space=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
	if test $ac_R_space = yes; then
	  echo "$as_me:3505: result: yes" >&5
echo "${ECHO_T}yes" >&6
	  X_LIBS="$X_LIBS -R $x_libraries"
	else
	  echo "$as_me:3509: result: neither works" >&5
echo "${ECHO_T}neither works" >&6
	fi
      fi
      LIBS=$ac_xsave_LIBS
    esac
  fi

  # Check for system-dependent libraries X programs must link with.
  # Do this before checking for the system-independent R6 libraries
  # (-lICE), since we may need -lsocket or whatever for X linking.

  if test "$ISC" = yes; then
    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
  else
    # Martyn Johnson says this is needed for Ultrix, if the X
    # libraries were built with DECnet support.  And Karl Berry says
    # the Alpha needs dnet_stub (dnet does not exist).
    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
    cat >conftest.$ac_ext <<_ACEOF
#line 3529 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char XOpenDisplay ();
int
main ()
{
XOpenDisplay ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:3548: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:3551: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:3554: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:3557: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  :
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
echo "$as_me:3563: checking for dnet_ntoa in -ldnet" >&5
echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-ldnet  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 3571 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char dnet_ntoa ();
int
main ()
{
dnet_ntoa ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:3590: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:3593: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:3596: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:3599: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_dnet_dnet_ntoa=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_dnet_dnet_ntoa=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:3610: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
fi

    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
      echo "$as_me:3617: checking for dnet_ntoa in -ldnet_stub" >&5
echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-ldnet_stub  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 3625 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char dnet_ntoa ();
int
main ()
{
dnet_ntoa ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:3644: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:3647: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:3650: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:3653: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_dnet_stub_dnet_ntoa=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_dnet_stub_dnet_ntoa=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:3664: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
fi

    fi
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
    LIBS="$ac_xsave_LIBS"

    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
    # to get the SysV transport functions.
    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
    # needs -lnsl.
    # The nsl library prevents programs from opening the X display
    # on Irix 5.2, according to T.E. Dickey.
    # The functions gethostbyname, getservbyname, and inet_addr are
    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
    echo "$as_me:3683: checking for gethostbyname" >&5
echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
if test "${ac_cv_func_gethostbyname+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 3689 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char gethostbyname (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char gethostbyname ();
char (*f) ();

int
main ()
{
/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
choke me
#else
f = gethostbyname;
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:3720: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:3723: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:3726: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:3729: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func_gethostbyname=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_func_gethostbyname=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:3739: result: $ac_cv_func_gethostbyname" >&5
echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6

    if test $ac_cv_func_gethostbyname = no; then
      echo "$as_me:3743: checking for gethostbyname in -lnsl" >&5
echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lnsl  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 3751 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char gethostbyname ();
int
main ()
{
gethostbyname ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:3770: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:3773: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:3776: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:3779: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_nsl_gethostbyname=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_nsl_gethostbyname=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:3790: result: $ac_cv_lib_nsl_gethostbyname" >&5
echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
if test $ac_cv_lib_nsl_gethostbyname = yes; then
  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
fi

      if test $ac_cv_lib_nsl_gethostbyname = no; then
        echo "$as_me:3797: checking for gethostbyname in -lbsd" >&5
echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lbsd  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 3805 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char gethostbyname ();
int
main ()
{
gethostbyname ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:3824: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:3827: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:3830: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:3833: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_bsd_gethostbyname=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_bsd_gethostbyname=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:3844: result: $ac_cv_lib_bsd_gethostbyname" >&5
echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
if test $ac_cv_lib_bsd_gethostbyname = yes; then
  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
fi

      fi
    fi

    # lieder@skyler.mavd.honeywell.com says without -lsocket,
    # socket/setsockopt and other routines are undefined under SCO ODT
    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
    # on later versions), says Simon Leinen: it contains gethostby*
    # variants that don't use the nameserver (or something).  -lsocket
    # must be given before -lnsl if both are needed.  We assume that
    # if connect needs -lnsl, so does gethostbyname.
    echo "$as_me:3860: checking for connect" >&5
echo $ECHO_N "checking for connect... $ECHO_C" >&6
if test "${ac_cv_func_connect+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 3866 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char connect (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char connect ();
char (*f) ();

int
main ()
{
/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_connect) || defined (__stub___connect)
choke me
#else
f = connect;
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:3897: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:3900: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:3903: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:3906: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func_connect=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_func_connect=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:3916: result: $ac_cv_func_connect" >&5
echo "${ECHO_T}$ac_cv_func_connect" >&6

    if test $ac_cv_func_connect = no; then
      echo "$as_me:3920: checking for connect in -lsocket" >&5
echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
if test "${ac_cv_lib_socket_connect+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 3928 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char connect ();
int
main ()
{
connect ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:3947: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:3950: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:3953: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:3956: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_socket_connect=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_socket_connect=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:3967: result: $ac_cv_lib_socket_connect" >&5
echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
if test $ac_cv_lib_socket_connect = yes; then
  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
fi

    fi

    # Guillermo Gomez says -lposix is necessary on A/UX.
    echo "$as_me:3976: checking for remove" >&5
echo $ECHO_N "checking for remove... $ECHO_C" >&6
if test "${ac_cv_func_remove+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 3982 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char remove (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char remove ();
char (*f) ();

int
main ()
{
/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_remove) || defined (__stub___remove)
choke me
#else
f = remove;
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:4013: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:4016: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:4019: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:4022: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func_remove=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_func_remove=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:4032: result: $ac_cv_func_remove" >&5
echo "${ECHO_T}$ac_cv_func_remove" >&6

    if test $ac_cv_func_remove = no; then
      echo "$as_me:4036: checking for remove in -lposix" >&5
echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
if test "${ac_cv_lib_posix_remove+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lposix  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 4044 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char remove ();
int
main ()
{
remove ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:4063: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:4066: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:4069: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:4072: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_posix_remove=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_posix_remove=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:4083: result: $ac_cv_lib_posix_remove" >&5
echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
if test $ac_cv_lib_posix_remove = yes; then
  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
fi

    fi

    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
    echo "$as_me:4092: checking for shmat" >&5
echo $ECHO_N "checking for shmat... $ECHO_C" >&6
if test "${ac_cv_func_shmat+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 4098 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char shmat (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char shmat ();
char (*f) ();

int
main ()
{
/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_shmat) || defined (__stub___shmat)
choke me
#else
f = shmat;
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:4129: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:4132: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:4135: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:4138: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func_shmat=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_func_shmat=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:4148: result: $ac_cv_func_shmat" >&5
echo "${ECHO_T}$ac_cv_func_shmat" >&6

    if test $ac_cv_func_shmat = no; then
      echo "$as_me:4152: checking for shmat in -lipc" >&5
echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
if test "${ac_cv_lib_ipc_shmat+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lipc  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 4160 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char shmat ();
int
main ()
{
shmat ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:4179: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:4182: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:4185: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:4188: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_ipc_shmat=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_ipc_shmat=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:4199: result: $ac_cv_lib_ipc_shmat" >&5
echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
if test $ac_cv_lib_ipc_shmat = yes; then
  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
fi

    fi
  fi

  # Check for libraries that X11R6 Xt/Xaw programs need.
  ac_save_LDFLAGS=$LDFLAGS
  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
  # check for ICE first), but we must link in the order -lSM -lICE or
  # we get undefined symbols.  So assume we have SM if we have ICE.
  # These have to be linked with before -lX11, unlike the other
  # libraries we check for below, so use a different variable.
  # John Interrante, Karl Berry
  echo "$as_me:4217: checking for IceConnectionNumber in -lICE" >&5
echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lICE $X_EXTRA_LIBS $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 4225 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char IceConnectionNumber ();
int
main ()
{
IceConnectionNumber ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:4244: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:4247: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:4250: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:4253: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_ICE_IceConnectionNumber=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_ICE_IceConnectionNumber=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:4264: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
fi

  LDFLAGS=$ac_save_LDFLAGS

fi

if test "x$with_x" = xyes; then
  if test "x$have_x" = xno; then
    if test "x$x_config_flag" = xyes; then
      { { echo "$as_me:4277: error: Could not configure X" >&5
echo "$as_me: error: Could not configure X" >&2;}
   { (exit 1); exit 1; }; }
    else
      { echo "$as_me:4281: WARNING: Could not configure X" >&5
echo "$as_me: WARNING: Could not configure X" >&2;}
    fi
  fi
fi
if test "x$with_x" = xyes -a "x$have_x" = xyes; then
  if test "x$x_libraries" != x; then
    ldflags_x_opt="-L$x_libraries"
    LDFLAGS="$LDFLAGS $ldflags_x_opt"
    SHLDFLAGS="$SHLDFLAGS $ldflags_x_opt"
  else
    ldflags_x_opt=
  fi
  if test "x$x_includes" != x; then
    CPPFLAGS="$CPPFLAGS -I$x_includes"
  fi

echo "$as_me:4298: checking for XOpenDisplay in -lX11" >&5
echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lX11  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 4306 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char XOpenDisplay ();
int
main ()
{
XOpenDisplay ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:4325: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:4328: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:4331: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:4334: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_X11_XOpenDisplay=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_X11_XOpenDisplay=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:4345: result: $ac_cv_lib_X11_XOpenDisplay" >&5
echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
if test $ac_cv_lib_X11_XOpenDisplay = yes; then
  cat >>confdefs.h <<EOF
#define HAVE_LIBX11 1
EOF

  LIBS="-lX11 $LIBS"

fi

  echo "$as_me:4356: checking X11 version 6" >&5
echo $ECHO_N "checking X11 version 6... $ECHO_C" >&6
  if test "${timidity_cv_x11_version_6+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 4362 "configure"
#include "confdefs.h"
#include <X11/Xlib.h>
int
main ()
{
#if XlibSpecificationRelease < 6
fail;
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:4377: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:4380: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:4383: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:4386: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  timidity_cv_x11_version_6=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
timidity_cv_x11_version_6=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi

  if test "$timidity_cv_x11_version_6" = "yes"; then
    echo "$as_me:4398: result: 6 or newer" >&5
echo "${ECHO_T}6 or newer" >&6
      else
    echo "$as_me:4401: result: before 6" >&5
echo "${ECHO_T}before 6" >&6
  fi

    KEEPLIBS=$LIBS
  echo "$as_me:4406: checking for XShapeCombineMask in -lXext" >&5
echo $ECHO_N "checking for XShapeCombineMask in -lXext... $ECHO_C" >&6
if test "${ac_cv_lib_Xext_XShapeCombineMask+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lXext  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 4414 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char XShapeCombineMask ();
int
main ()
{
XShapeCombineMask ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:4433: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:4436: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:4439: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:4442: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_Xext_XShapeCombineMask=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_Xext_XShapeCombineMask=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:4453: result: $ac_cv_lib_Xext_XShapeCombineMask" >&5
echo "${ECHO_T}$ac_cv_lib_Xext_XShapeCombineMask" >&6
if test $ac_cv_lib_Xext_XShapeCombineMask = yes; then
  have_xext=yes; LIBS="-lXext $LIBS"
else
  have_xext=no
fi

echo "$as_me:4461: checking for IceConnectionNumber in -lICE" >&5
echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lICE  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 4469 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char IceConnectionNumber ();
int
main ()
{
IceConnectionNumber ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:4488: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:4491: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:4494: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:4497: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_ICE_IceConnectionNumber=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_ICE_IceConnectionNumber=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:4508: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
  cat >>confdefs.h <<EOF
#define HAVE_LIBICE 1
EOF

  LIBS="-lICE $LIBS"

fi

  echo "$as_me:4519: checking for SmcOpenConnection in -lSM" >&5
echo $ECHO_N "checking for SmcOpenConnection in -lSM... $ECHO_C" >&6
if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lSM  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 4527 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char SmcOpenConnection ();
int
main ()
{
SmcOpenConnection ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:4546: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:4549: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:4552: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:4555: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_SM_SmcOpenConnection=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_SM_SmcOpenConnection=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:4566: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
echo "${ECHO_T}$ac_cv_lib_SM_SmcOpenConnection" >&6
if test $ac_cv_lib_SM_SmcOpenConnection = yes; then
  have_xprelibs=yes; LIBS="-lSM $LIBS"
else
  have_xprelibs=no
fi

  echo "$as_me:4574: checking for XtVaAppInitialize in -lXt" >&5
echo $ECHO_N "checking for XtVaAppInitialize in -lXt... $ECHO_C" >&6
if test "${ac_cv_lib_Xt_XtVaAppInitialize+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lXt  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 4582 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char XtVaAppInitialize ();
int
main ()
{
XtVaAppInitialize ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:4601: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:4604: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:4607: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:4610: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_Xt_XtVaAppInitialize=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_Xt_XtVaAppInitialize=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:4621: result: $ac_cv_lib_Xt_XtVaAppInitialize" >&5
echo "${ECHO_T}$ac_cv_lib_Xt_XtVaAppInitialize" >&6
if test $ac_cv_lib_Xt_XtVaAppInitialize = yes; then
  have_xt=yes; LIBS="-lXt $LIBS"
else
  have_xt=no
fi

  echo "$as_me:4629: checking for XmuInternAtom in -lXmu" >&5
echo $ECHO_N "checking for XmuInternAtom in -lXmu... $ECHO_C" >&6
if test "${ac_cv_lib_Xmu_XmuInternAtom+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lXmu  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 4637 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char XmuInternAtom ();
int
main ()
{
XmuInternAtom ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:4656: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:4659: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:4662: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:4665: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_Xmu_XmuInternAtom=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_Xmu_XmuInternAtom=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:4676: result: $ac_cv_lib_Xmu_XmuInternAtom" >&5
echo "${ECHO_T}$ac_cv_lib_Xmu_XmuInternAtom" >&6
if test $ac_cv_lib_Xmu_XmuInternAtom = yes; then
  LIBS="-lXmu $LIBS"
fi

for ac_func in XmuRegisterExternalAgent
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:4685: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 4691 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

int
main ()
{
/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
f = $ac_func;
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:4722: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:4725: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:4728: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:4731: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:4741: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

  echo "$as_me:4751: checking for XawInitializeWidgetSet in -lXaw3d" >&5
echo $ECHO_N "checking for XawInitializeWidgetSet in -lXaw3d... $ECHO_C" >&6
if test "${ac_cv_lib_Xaw3d_XawInitializeWidgetSet+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lXaw3d  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 4759 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char XawInitializeWidgetSet ();
int
main ()
{
XawInitializeWidgetSet ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:4778: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:4781: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:4784: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:4787: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_Xaw3d_XawInitializeWidgetSet=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_Xaw3d_XawInitializeWidgetSet=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:4798: result: $ac_cv_lib_Xaw3d_XawInitializeWidgetSet" >&5
echo "${ECHO_T}$ac_cv_lib_Xaw3d_XawInitializeWidgetSet" >&6
if test $ac_cv_lib_Xaw3d_XawInitializeWidgetSet = yes; then
  have_xaw=3d
else
   echo "$as_me:4803: checking for XawInitializeWidgetSet in -lXaw" >&5
echo $ECHO_N "checking for XawInitializeWidgetSet in -lXaw... $ECHO_C" >&6
if test "${ac_cv_lib_Xaw_XawInitializeWidgetSet+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lXaw  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 4811 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char XawInitializeWidgetSet ();
int
main ()
{
XawInitializeWidgetSet ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:4830: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:4833: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:4836: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:4839: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_Xaw_XawInitializeWidgetSet=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_Xaw_XawInitializeWidgetSet=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:4850: result: $ac_cv_lib_Xaw_XawInitializeWidgetSet" >&5
echo "${ECHO_T}$ac_cv_lib_Xaw_XawInitializeWidgetSet" >&6
if test $ac_cv_lib_Xaw_XawInitializeWidgetSet = yes; then
  have_xaw=yes
else
  have_xaw=no
fi

fi

  echo "$as_me:4860: checking for XmCreateForm in -lXm" >&5
echo $ECHO_N "checking for XmCreateForm in -lXm... $ECHO_C" >&6
if test "${ac_cv_lib_Xm_XmCreateForm+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lXm  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 4868 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char XmCreateForm ();
int
main ()
{
XmCreateForm ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:4887: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:4890: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:4893: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:4896: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_Xm_XmCreateForm=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_Xm_XmCreateForm=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:4907: result: $ac_cv_lib_Xm_XmCreateForm" >&5
echo "${ECHO_T}$ac_cv_lib_Xm_XmCreateForm" >&6
if test $ac_cv_lib_Xm_XmCreateForm = yes; then
  have_xm=yes
else
  have_xm=no
fi

for ac_func in XShmCreatePixmap
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:4918: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 4924 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

int
main ()
{
/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
f = $ac_func;
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:4955: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:4958: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:4961: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:4964: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:4974: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

  LIBS=$KEEPLIBS
fi

ac_header_dirent=no
for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
  as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
echo "$as_me:4990: checking for $ac_hdr that defines DIR" >&5
echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 4996 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>

int
main ()
{
if ((DIR *) 0)
return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:5011: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:5014: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:5017: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:5020: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_Header=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_Header=no"
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:5030: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
EOF

ac_header_dirent=$ac_hdr; break
fi

done
# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
if test $ac_header_dirent = dirent.h; then
  echo "$as_me:5043: checking for opendir in -ldir" >&5
echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
if test "${ac_cv_lib_dir_opendir+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-ldir  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 5051 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char opendir ();
int
main ()
{
opendir ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:5070: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:5073: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:5076: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:5079: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_dir_opendir=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_dir_opendir=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:5090: result: $ac_cv_lib_dir_opendir" >&5
echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
if test $ac_cv_lib_dir_opendir = yes; then
  LIBS="$LIBS -ldir"
fi

else
  echo "$as_me:5097: checking for opendir in -lx" >&5
echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
if test "${ac_cv_lib_x_opendir+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lx  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 5105 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char opendir ();
int
main ()
{
opendir ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:5124: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:5127: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:5130: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:5133: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_x_opendir=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_x_opendir=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:5144: result: $ac_cv_lib_x_opendir" >&5
echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
if test $ac_cv_lib_x_opendir = yes; then
  LIBS="$LIBS -lx"
fi

fi

echo "$as_me:5152: checking for ANSI C header files" >&5
echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
if test "${ac_cv_header_stdc+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 5158 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <float.h>

_ACEOF
if { (eval echo "$as_me:5166: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:5172: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  ac_cv_header_stdc=yes
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_header_stdc=no
fi
rm -f conftest.err conftest.$ac_ext

if test $ac_cv_header_stdc = yes; then
  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  cat >conftest.$ac_ext <<_ACEOF
#line 5194 "configure"
#include "confdefs.h"
#include <string.h>

_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "memchr" >/dev/null 2>&1; then
  :
else
  ac_cv_header_stdc=no
fi
rm -f conftest*

fi

if test $ac_cv_header_stdc = yes; then
  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  cat >conftest.$ac_ext <<_ACEOF
#line 5212 "configure"
#include "confdefs.h"
#include <stdlib.h>

_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "free" >/dev/null 2>&1; then
  :
else
  ac_cv_header_stdc=no
fi
rm -f conftest*

fi

if test $ac_cv_header_stdc = yes; then
  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  if test "$cross_compiling" = yes; then
  :
else
  cat >conftest.$ac_ext <<_ACEOF
#line 5233 "configure"
#include "confdefs.h"
#include <ctype.h>
#if ((' ' & 0x0FF) == 0x020)
# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
#else
# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
                     || ('j' <= (c) && (c) <= 'r') \
                     || ('s' <= (c) && (c) <= 'z'))
# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
#endif

#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
int
main ()
{
  int i;
  for (i = 0; i < 256; i++)
    if (XOR (islower (i), ISLOWER (i))
        || toupper (i) != TOUPPER (i))
      exit(2);
  exit (0);
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:5259: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:5262: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:5264: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:5267: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  :
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_header_stdc=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
fi
echo "$as_me:5280: result: $ac_cv_header_stdc" >&5
echo "${ECHO_T}$ac_cv_header_stdc" >&6
if test $ac_cv_header_stdc = yes; then

cat >>confdefs.h <<\EOF
#define STDC_HEADERS 1
EOF

fi

echo "$as_me:5290: checking for sys/wait.h that is POSIX.1 compatible" >&5
echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
if test "${ac_cv_header_sys_wait_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 5296 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/wait.h>
#ifndef WEXITSTATUS
# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
#endif
#ifndef WIFEXITED
# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
#endif

int
main ()
{
  int s;
  wait (&s);
  s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:5318: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:5321: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:5324: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:5327: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_header_sys_wait_h=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_header_sys_wait_h=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:5337: result: $ac_cv_header_sys_wait_h" >&5
echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
if test $ac_cv_header_sys_wait_h = yes; then

cat >>confdefs.h <<\EOF
#define HAVE_SYS_WAIT_H 1
EOF

fi

for ac_header in fcntl.h limits.h malloc.h strings.h sys/ioctl.h sys/time.h \
	unistd.h dlfcn.h glob.h getopt.h errno.h machine/endian.h \
	stropts.h sys/audioio.h sun/audioio.h sys/types.h \
	sys/ipc.h sys/shm.h sys/param.h X11/extensions/XShm.h \
	X11/Xmu/ExtAgent.h sys/soundcard.h soundcard.h sys/awe_voice.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:5354: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 5360 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:5364: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:5370: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  eval "$as_ac_Header=yes"
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$as_ac_Header=no"
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:5389: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF

fi
done

echo "$as_me:5399: checking for string.h" >&5
echo $ECHO_N "checking for string.h... $ECHO_C" >&6
if test "${ac_cv_header_string_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 5405 "configure"
#include "confdefs.h"
#include <string.h>
_ACEOF
if { (eval echo "$as_me:5409: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:5415: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  ac_cv_header_string_h=yes
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_header_string_h=no
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:5434: result: $ac_cv_header_string_h" >&5
echo "${ECHO_T}$ac_cv_header_string_h" >&6
if test $ac_cv_header_string_h = yes; then
  :
else
   EXTRADEFS="$EXTRADEFS -DNO_STRING_H "
fi

echo "$as_me:5442: checking for $CC option to accept ANSI C" >&5
echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
if test "${ac_cv_prog_cc_stdc+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_cv_prog_cc_stdc=no
ac_save_CC=$CC
cat >conftest.$ac_ext <<_ACEOF
#line 5450 "configure"
#include "confdefs.h"
#include <stdarg.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
struct buf { int x; };
FILE * (*rcsopen) (struct buf *, struct stat *, int);
static char *e (p, i)
     char **p;
     int i;
{
  return p[i];
}
static char *f (char * (*g) (char **, int), char **p, ...)
{
  char *s;
  va_list v;
  va_start (v,p);
  s = g (p, va_arg (v,int));
  va_end (v);
  return s;
}
int test (int i, double x);
struct s1 {int (*f) (int a);};
struct s2 {int (*f) (double a);};
int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
int argc;
char **argv;
int
main ()
{
return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
  ;
  return 0;
}
_ACEOF
# Don't try gcc -ansi; that turns off useful extensions and
# breaks some systems' header files.
# AIX			-qlanglvl=ansi
# Ultrix and OSF/1	-std1
# HP-UX 10.20 and later	-Ae
# HP-UX older versions	-Aa -D_HPUX_SOURCE
# SVR4			-Xc -D__EXTENSIONS__
for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
do
  CC="$ac_save_CC $ac_arg"
  rm -f conftest.$ac_objext
if { (eval echo "$as_me:5499: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:5502: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:5505: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:5508: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_prog_cc_stdc=$ac_arg
break
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext
done
rm -f conftest.$ac_ext conftest.$ac_objext
CC=$ac_save_CC

fi

case "x$ac_cv_prog_cc_stdc" in
  x|xno)
    echo "$as_me:5525: result: none needed" >&5
echo "${ECHO_T}none needed" >&6 ;;
  *)
    echo "$as_me:5528: result: $ac_cv_prog_cc_stdc" >&5
echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
    CC="$CC $ac_cv_prog_cc_stdc" ;;
esac

echo "$as_me:5533: checking for an ANSI C-conforming const" >&5
echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
if test "${ac_cv_c_const+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 5539 "configure"
#include "confdefs.h"

int
main ()
{
/* FIXME: Include the comments suggested by Paul. */
#ifndef __cplusplus
  /* Ultrix mips cc rejects this.  */
  typedef int charset[2];
  const charset x;
  /* SunOS 4.1.1 cc rejects this.  */
  char const *const *ccp;
  char **p;
  /* NEC SVR4.0.2 mips cc rejects this.  */
  struct point {int x, y;};
  static struct point const zero = {0,0};
  /* AIX XL C 1.02.0.0 rejects this.
     It does not let you subtract one const X* pointer from another in
     an arm of an if-expression whose if-part is not a constant
     expression */
  const char *g = "string";
  ccp = &g + (g ? g-g : 0);
  /* HPUX 7.0 cc rejects these. */
  ++ccp;
  p = (char**) ccp;
  ccp = (char const *const *) p;
  { /* SCO 3.2v4 cc rejects this.  */
    char *t;
    char const *s = 0 ? (char *) 0 : (char const *) 0;

    *t++ = 0;
  }
  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
    int x[] = {25, 17};
    const int *foo = &x[0];
    ++foo;
  }
  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
    typedef const int *iptr;
    iptr p = 0;
    ++p;
  }
  { /* AIX XL C 1.02.0.0 rejects this saying
       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
    struct s { int j; const int *ap[3]; };
    struct s *b; b->j = 5;
  }
  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
    const int foo = 10;
  }
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:5597: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:5600: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:5603: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:5606: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_c_const=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_c_const=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:5616: result: $ac_cv_c_const" >&5
echo "${ECHO_T}$ac_cv_c_const" >&6
if test $ac_cv_c_const = no; then

cat >>confdefs.h <<\EOF
#define const
EOF

fi

# On IRIX 5.3, sys/types and inttypes.h are conflicting.

for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
                  inttypes.h stdint.h unistd.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:5632: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 5638 "configure"
#include "confdefs.h"
$ac_includes_default
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:5644: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:5647: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:5650: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:5653: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_Header=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_Header=no"
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:5663: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF

fi
done

echo "$as_me:5673: checking whether char is unsigned" >&5
echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
if test "${ac_cv_c_char_unsigned+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 5679 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
int _array_ [1 - 2 * !(((char) -1) < 0)]
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:5691: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:5694: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:5697: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:5700: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_c_char_unsigned=no
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_c_char_unsigned=yes
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:5710: result: $ac_cv_c_char_unsigned" >&5
echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
  cat >>confdefs.h <<\EOF
#define __CHAR_UNSIGNED__ 1
EOF

fi

echo "$as_me:5719: checking whether byte ordering is bigendian" >&5
echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
if test "${ac_cv_c_bigendian+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_cv_c_bigendian=unknown
# See if sys/param.h defines the BYTE_ORDER macro.
cat >conftest.$ac_ext <<_ACEOF
#line 5727 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>

int
main ()
{
#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
 bogus endian macros
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:5744: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:5747: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:5750: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:5753: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  # It does; now see whether it defined to BIG_ENDIAN or not.
cat >conftest.$ac_ext <<_ACEOF
#line 5757 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>

int
main ()
{
#if BYTE_ORDER != BIG_ENDIAN
 not big endian
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:5774: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:5777: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:5780: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:5783: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_c_bigendian=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_c_bigendian=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
if test $ac_cv_c_bigendian = unknown; then
if test "$cross_compiling" = yes; then
  { { echo "$as_me:5799: error: cannot run test program while cross compiling" >&5
echo "$as_me: error: cannot run test program while cross compiling" >&2;}
   { (exit 1); exit 1; }; }
else
  cat >conftest.$ac_ext <<_ACEOF
#line 5804 "configure"
#include "confdefs.h"
int
main ()
{
  /* Are we little or big endian?  From Harbison&Steele.  */
  union
  {
    long l;
    char c[sizeof (long)];
  } u;
  u.l = 1;
  exit (u.c[sizeof (long) - 1] == 1);
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:5820: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:5823: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:5825: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:5828: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_c_bigendian=no
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_c_bigendian=yes
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
fi
echo "$as_me:5841: result: $ac_cv_c_bigendian" >&5
echo "${ECHO_T}$ac_cv_c_bigendian" >&6
if test $ac_cv_c_bigendian = yes; then

cat >>confdefs.h <<\EOF
#define WORDS_BIGENDIAN 1
EOF

fi

echo "$as_me:5851: checking for inline" >&5
echo $ECHO_N "checking for inline... $ECHO_C" >&6
if test "${ac_cv_c_inline+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
  cat >conftest.$ac_ext <<_ACEOF
#line 5859 "configure"
#include "confdefs.h"
#ifndef __cplusplus
static $ac_kw int static_foo () {return 0; }
$ac_kw int foo () {return 0; }
#endif

_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:5868: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:5871: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:5874: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:5877: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_c_inline=$ac_kw; break
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
done

fi
echo "$as_me:5888: result: $ac_cv_c_inline" >&5
echo "${ECHO_T}$ac_cv_c_inline" >&6
case $ac_cv_c_inline in
  inline | yes) ;;
  no)
cat >>confdefs.h <<\EOF
#define inline
EOF
 ;;
  *)  cat >>confdefs.h <<EOF
#define inline $ac_cv_c_inline
EOF
 ;;
esac

echo "$as_me:5903: checking for off_t" >&5
echo $ECHO_N "checking for off_t... $ECHO_C" >&6
if test "${ac_cv_type_off_t+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 5909 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
if ((off_t *) 0)
  return 0;
if (sizeof (off_t))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:5924: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:5927: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:5930: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:5933: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_off_t=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_type_off_t=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:5943: result: $ac_cv_type_off_t" >&5
echo "${ECHO_T}$ac_cv_type_off_t" >&6
if test $ac_cv_type_off_t = yes; then
  :
else

cat >>confdefs.h <<EOF
#define off_t long
EOF

fi

echo "$as_me:5955: checking for pid_t" >&5
echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
if test "${ac_cv_type_pid_t+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 5961 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
if ((pid_t *) 0)
  return 0;
if (sizeof (pid_t))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:5976: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:5979: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:5982: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:5985: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_pid_t=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_type_pid_t=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:5995: result: $ac_cv_type_pid_t" >&5
echo "${ECHO_T}$ac_cv_type_pid_t" >&6
if test $ac_cv_type_pid_t = yes; then
  :
else

cat >>confdefs.h <<EOF
#define pid_t int
EOF

fi

echo "$as_me:6007: checking for size_t" >&5
echo $ECHO_N "checking for size_t... $ECHO_C" >&6
if test "${ac_cv_type_size_t+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 6013 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
if ((size_t *) 0)
  return 0;
if (sizeof (size_t))
  return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:6028: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:6031: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:6034: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:6037: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_size_t=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_type_size_t=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:6047: result: $ac_cv_type_size_t" >&5
echo "${ECHO_T}$ac_cv_type_size_t" >&6
if test $ac_cv_type_size_t = yes; then
  :
else

cat >>confdefs.h <<EOF
#define size_t unsigned
EOF

fi

echo "$as_me:6059: checking whether time.h and sys/time.h may both be included" >&5
echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
if test "${ac_cv_header_time+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 6065 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
#include <time.h>

int
main ()
{
if ((struct tm *) 0)
return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:6081: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:6084: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:6087: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:6090: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_header_time=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_header_time=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:6100: result: $ac_cv_header_time" >&5
echo "${ECHO_T}$ac_cv_header_time" >&6
if test $ac_cv_header_time = yes; then

cat >>confdefs.h <<\EOF
#define TIME_WITH_SYS_TIME 1
EOF

fi

echo "$as_me:6110: checking volatile declaration" >&5
echo $ECHO_N "checking volatile declaration... $ECHO_C" >&6
if test "${timidity_cv_type_volatile+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 6116 "configure"
#include "confdefs.h"

int
main ()
{
volatile int x
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:6128: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:6131: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:6134: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:6137: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  timidity_cv_type_volatile=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
timidity_cv_type_volatile=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:6147: result: $timidity_cv_type_volatile" >&5
echo "${ECHO_T}$timidity_cv_type_volatile" >&6
if test $timidity_cv_type_volatile = no; then
  EXTRADEFS="$EXTRADEFS -DNO_VOLATILE"
fi

echo "$as_me:6153: checking union semun declaration" >&5
echo $ECHO_N "checking union semun declaration... $ECHO_C" >&6
if test "${timidity_cv_type_union_semun+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 6159 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/sem.h>
int
main ()
{
union semun x
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:6173: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:6176: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:6179: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:6182: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  timidity_cv_type_union_semun=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
timidity_cv_type_union_semun=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:6192: result: $timidity_cv_type_union_semun" >&5
echo "${ECHO_T}$timidity_cv_type_union_semun" >&6
if test $timidity_cv_type_union_semun = yes; then
  EXTRADEFS="$EXTRADEFS -DHAVE_UNION_SEMUN"
fi

if test "x$CYGNUS" = xyes; then
  echo "$as_me:6199: checking Cygwin new mmsystem" >&5
echo $ECHO_N "checking Cygwin new mmsystem... $ECHO_C" >&6
if test "${timidity_cv_header_new_mmsystem+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 6205 "configure"
#include "confdefs.h"
#include <windows.h>
  #include <mmsystem.h>
int
main ()
{
return WOM_OPEN != 0x3BB
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:6218: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:6221: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:6224: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:6227: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  timidity_cv_header_new_mmsystem=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
timidity_cv_header_new_mmsystem=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:6237: result: $timidity_cv_header_new_mmsystem" >&5
echo "${ECHO_T}$timidity_cv_header_new_mmsystem" >&6
  if test $timidity_cv_header_new_mmsystem = yes; then
    EXTRADEFS="$EXTRADEFS -DHAVE_NEW_MMSYSTEM=1"
  fi
fi

if test $ac_cv_c_compiler_gnu = yes; then
    echo "$as_me:6245: checking whether $CC needs -traditional" >&5
echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
if test "${ac_cv_prog_gcc_traditional+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
    ac_pattern="Autoconf.*'x'"
  cat >conftest.$ac_ext <<_ACEOF
#line 6252 "configure"
#include "confdefs.h"
#include <sgtty.h>
Autoconf TIOCGETP
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "$ac_pattern" >/dev/null 2>&1; then
  ac_cv_prog_gcc_traditional=yes
else
  ac_cv_prog_gcc_traditional=no
fi
rm -f conftest*

  if test $ac_cv_prog_gcc_traditional = no; then
    cat >conftest.$ac_ext <<_ACEOF
#line 6267 "configure"
#include "confdefs.h"
#include <termio.h>
Autoconf TCGETA
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "$ac_pattern" >/dev/null 2>&1; then
  ac_cv_prog_gcc_traditional=yes
fi
rm -f conftest*

  fi
fi
echo "$as_me:6280: result: $ac_cv_prog_gcc_traditional" >&5
echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
  if test $ac_cv_prog_gcc_traditional = yes; then
    CC="$CC -traditional"
  fi
fi

echo "$as_me:6287: checking for working memcmp" >&5
echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6
if test "${ac_cv_func_memcmp_working+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_func_memcmp_working=no
else
  cat >conftest.$ac_ext <<_ACEOF
#line 6296 "configure"
#include "confdefs.h"

int
main ()
{

  /* Some versions of memcmp are not 8-bit clean.  */
  char c0 = 0x40, c1 = 0x80, c2 = 0x81;
  if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
    exit (1);

  /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
     or more and with at least one buffer not starting on a 4-byte boundary.
     William Lewis provided this test program.   */
  {
    char foo[21];
    char bar[21];
    int i;
    for (i = 0; i < 4; i++)
      {
        char *a = foo + i;
        char *b = bar + i;
        strcpy (a, "--------01111111");
        strcpy (b, "--------10000000");
        if (memcmp (a, b, 16) >= 0)
          exit (1);
      }
    exit (0);
  }

  ;
  return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:6332: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:6335: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:6337: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:6340: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func_memcmp_working=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_func_memcmp_working=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:6352: result: $ac_cv_func_memcmp_working" >&5
echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6
test $ac_cv_func_memcmp_working = no && LIBOBJS="$LIBOBJS memcmp.$ac_objext"

for ac_header in stdlib.h unistd.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:6359: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 6365 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:6369: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:6375: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  eval "$as_ac_Header=yes"
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$as_ac_Header=no"
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:6394: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF

fi
done

for ac_func in getpagesize
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:6407: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 6413 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

int
main ()
{
/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
f = $ac_func;
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:6444: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:6447: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:6450: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:6453: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:6463: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

echo "$as_me:6473: checking for working mmap" >&5
echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_func_mmap_fixed_mapped=no
else
  cat >conftest.$ac_ext <<_ACEOF
#line 6482 "configure"
#include "confdefs.h"
$ac_includes_default
/* Thanks to Mike Haertel and Jim Avera for this test.
   Here is a matrix of mmap possibilities:
	mmap private not fixed
	mmap private fixed at somewhere currently unmapped
	mmap private fixed at somewhere already mapped
	mmap shared not fixed
	mmap shared fixed at somewhere currently unmapped
	mmap shared fixed at somewhere already mapped
   For private mappings, we should verify that changes cannot be read()
   back from the file, nor mmap's back from the file at a different
   address.  (There have been systems where private was not correctly
   implemented like the infamous i386 svr4.0, and systems where the
   VM page cache was not coherent with the file system buffer cache
   like early versions of FreeBSD and possibly contemporary NetBSD.)
   For shared mappings, we should conversely verify that changes get
   propogated back to all the places they're supposed to be.

   Grep wants private fixed already mapped.
   The main things grep needs to know about mmap are:
   * does it exist and is it safe to write into the mmap'd area
   * how to use it (BSD variants)  */

#include <fcntl.h>
#include <sys/mman.h>

#if !STDC_HEADERS && !HAVE_STDLIB_H
char *malloc ();
#endif

/* This mess was copied from the GNU getpagesize.h.  */
#if !HAVE_GETPAGESIZE
/* Assume that all systems that can run configure have sys/param.h.  */
# if !HAVE_SYS_PARAM_H
#  define HAVE_SYS_PARAM_H 1
# endif

# ifdef _SC_PAGESIZE
#  define getpagesize() sysconf(_SC_PAGESIZE)
# else /* no _SC_PAGESIZE */
#  if HAVE_SYS_PARAM_H
#   include <sys/param.h>
#   ifdef EXEC_PAGESIZE
#    define getpagesize() EXEC_PAGESIZE
#   else /* no EXEC_PAGESIZE */
#    ifdef NBPG
#     define getpagesize() NBPG * CLSIZE
#     ifndef CLSIZE
#      define CLSIZE 1
#     endif /* no CLSIZE */
#    else /* no NBPG */
#     ifdef NBPC
#      define getpagesize() NBPC
#     else /* no NBPC */
#      ifdef PAGESIZE
#       define getpagesize() PAGESIZE
#      endif /* PAGESIZE */
#     endif /* no NBPC */
#    endif /* no NBPG */
#   endif /* no EXEC_PAGESIZE */
#  else /* no HAVE_SYS_PARAM_H */
#   define getpagesize() 8192	/* punt totally */
#  endif /* no HAVE_SYS_PARAM_H */
# endif /* no _SC_PAGESIZE */

#endif /* no HAVE_GETPAGESIZE */

int
main ()
{
  char *data, *data2, *data3;
  int i, pagesize;
  int fd;

  pagesize = getpagesize ();

  /* First, make a file with some known garbage in it. */
  data = (char *) malloc (pagesize);
  if (!data)
    exit (1);
  for (i = 0; i < pagesize; ++i)
    *(data + i) = rand ();
  umask (0);
  fd = creat ("conftest.mmap", 0600);
  if (fd < 0)
    exit (1);
  if (write (fd, data, pagesize) != pagesize)
    exit (1);
  close (fd);

  /* Next, try to mmap the file at a fixed address which already has
     something else allocated at it.  If we can, also make sure that
     we see the same garbage.  */
  fd = open ("conftest.mmap", O_RDWR);
  if (fd < 0)
    exit (1);
  data2 = (char *) malloc (2 * pagesize);
  if (!data2)
    exit (1);
  data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
  if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
                     MAP_PRIVATE | MAP_FIXED, fd, 0L))
    exit (1);
  for (i = 0; i < pagesize; ++i)
    if (*(data + i) != *(data2 + i))
      exit (1);

  /* Finally, make sure that changes to the mapped area do not
     percolate back to the file as seen by read().  (This is a bug on
     some variants of i386 svr4.0.)  */
  for (i = 0; i < pagesize; ++i)
    *(data2 + i) = *(data2 + i) + 1;
  data3 = (char *) malloc (pagesize);
  if (!data3)
    exit (1);
  if (read (fd, data3, pagesize) != pagesize)
    exit (1);
  for (i = 0; i < pagesize; ++i)
    if (*(data + i) != *(data3 + i))
      exit (1);
  close (fd);
  exit (0);
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:6609: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:6612: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:6614: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:6617: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func_mmap_fixed_mapped=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_func_mmap_fixed_mapped=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:6629: result: $ac_cv_func_mmap_fixed_mapped" >&5
echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
if test $ac_cv_func_mmap_fixed_mapped = yes; then

cat >>confdefs.h <<\EOF
#define HAVE_MMAP 1
EOF

fi
rm -f conftest.mmap

echo "$as_me:6640: checking whether setvbuf arguments are reversed" >&5
echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$cross_compiling" = yes; then
  { { echo "$as_me:6646: error: cannot run test program while cross compiling" >&5
echo "$as_me: error: cannot run test program while cross compiling" >&2;}
   { (exit 1); exit 1; }; }
else
  cat >conftest.$ac_ext <<_ACEOF
#line 6651 "configure"
#include "confdefs.h"
#include <stdio.h>
/* If setvbuf has the reversed format, exit 0. */
int
main ()
{
  /* This call has the arguments reversed.
     A reversed system may check and see that the address of main
     is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
  if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
    exit(1);
  putc('\r', stdout);
  exit(0);			/* Non-reversed systems segv here.  */
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:6668: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:6671: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:6673: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:6676: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func_setvbuf_reversed=yes
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_func_setvbuf_reversed=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
rm -f core core.* *.core
fi
echo "$as_me:6689: result: $ac_cv_func_setvbuf_reversed" >&5
echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
if test $ac_cv_func_setvbuf_reversed = yes; then

cat >>confdefs.h <<\EOF
#define SETVBUF_REVERSED 1
EOF

fi

echo "$as_me:6699: checking return type of signal handlers" >&5
echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
if test "${ac_cv_type_signal+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 6705 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
#ifdef signal
# undef signal
#endif
#ifdef __cplusplus
extern "C" void (*signal (int, void (*)(int)))(int);
#else
void (*signal ()) ();
#endif

int
main ()
{
int i;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:6727: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:6730: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:6733: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:6736: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_type_signal=void
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_type_signal=int
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:6746: result: $ac_cv_type_signal" >&5
echo "${ECHO_T}$ac_cv_type_signal" >&6

cat >>confdefs.h <<EOF
#define RETSIGTYPE $ac_cv_type_signal
EOF

for ac_func in vprintf
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:6756: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 6762 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

int
main ()
{
/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
f = $ac_func;
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:6793: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:6796: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:6799: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:6802: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:6812: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

echo "$as_me:6819: checking for _doprnt" >&5
echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6
if test "${ac_cv_func__doprnt+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 6825 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char _doprnt (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char _doprnt ();
char (*f) ();

int
main ()
{
/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub__doprnt) || defined (__stub____doprnt)
choke me
#else
f = _doprnt;
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:6856: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:6859: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:6862: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:6865: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func__doprnt=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_func__doprnt=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:6875: result: $ac_cv_func__doprnt" >&5
echo "${ECHO_T}$ac_cv_func__doprnt" >&6
if test $ac_cv_func__doprnt = yes; then

cat >>confdefs.h <<\EOF
#define HAVE_DOPRNT 1
EOF

fi

fi
done

for ac_func in gettimeofday select socket strdup strstr vsnprintf snprintf \
	sleep usleep strncasecmp strerror getopt getcwd popen signal isatty
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:6892: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 6898 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
char (*f) ();

int
main ()
{
/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
f = $ac_func;
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:6929: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:6932: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:6935: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:6938: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:6948: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
EOF

fi
done

if test "x$CYGNUS" = xyes; then
  case "$ac_cv_header_dirent_dirent_h$ac_cv_header_dirent_sys_ndir_h$ac_cv_header_dirent_sys_dir_h$ac_cv_header_dirent_ndir_h" in
  *yes*)
    echo "$as_me:6961: checking for opendir" >&5
echo $ECHO_N "checking for opendir... $ECHO_C" >&6
if test "${ac_cv_func_opendir+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 6967 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char opendir (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char opendir ();
char (*f) ();

int
main ()
{
/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_opendir) || defined (__stub___opendir)
choke me
#else
f = opendir;
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:6998: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:7001: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:7004: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:7007: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func_opendir=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_func_opendir=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:7017: result: $ac_cv_func_opendir" >&5
echo "${ECHO_T}$ac_cv_func_opendir" >&6
if test $ac_cv_func_opendir = yes; then
  :
else
   EXTRADEFS="$EXTRADEFS -D__W32READDIR__"
	  W32READDIR=yes
fi

    ;;
  *)EXTRADEFS="$EXTRADEFS -D__W32READDIR__"
    W32READDIR=yes
    ;;
  esac
  if test "x$enable_network" = "xyes"; then
    echo "$as_me:7032: checking for socket" >&5
echo $ECHO_N "checking for socket... $ECHO_C" >&6
if test "${ac_cv_func_socket+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 7038 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char socket (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char socket ();
char (*f) ();

int
main ()
{
/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_socket) || defined (__stub___socket)
choke me
#else
f = socket;
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:7069: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:7072: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:7075: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:7078: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func_socket=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_func_socket=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:7088: result: $ac_cv_func_socket" >&5
echo "${ECHO_T}$ac_cv_func_socket" >&6
if test $ac_cv_func_socket = yes; then
  :
else
  echo "$as_me:7093: checking for WSAStartup in -lwsock32" >&5
echo $ECHO_N "checking for WSAStartup in -lwsock32... $ECHO_C" >&6
ac_lib_var=`echo wsock32'_'WSAStartup | sed 'y%./+-%__p_%'`
if eval "test \"\${wapi_cv_lib_$ac_lib_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lwsock32  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 7102 "configure"
#include "confdefs.h"
#include <windows.h>
#include <winsock.h>

int
main ()
{
WSAStartup(0,0);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:7116: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:7119: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:7122: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:7125: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "wapi_cv_lib_$ac_lib_var=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "wapi_cv_lib_$ac_lib_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$wapi_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$as_me:7138: result: yes" >&5
echo "${ECHO_T}yes" >&6
   EXTRALIBS="$EXTRALIBS -lwsock32"
	  EXTRADEFS="$EXTRADEFS -DWINSOCK"
else
  echo "$as_me:7143: result: no" >&5
echo "${ECHO_T}no" >&6
fi

fi

  fi
fi

# Check whether --with-tcl-includes or --without-tcl-includes was given.
if test "${with_tcl_includes+set}" = set; then
  withval="$with_tcl_includes"
   if test ! -d $withval; then
      { echo "$as_me:7156: WARNING: $withval is not found." >&5
echo "$as_me: WARNING: $withval is not found." >&2;}
    fi
    tcl_include_dir="-I$withval"

fi;

# Check whether --with-tcl-libs or --without-tcl-libs was given.
if test "${with_tcl_libs+set}" = set; then
  withval="$with_tcl_libs"
   if test ! -d $withval; then
      { echo "$as_me:7167: WARNING: $withval is not found." >&5
echo "$as_me: WARNING: $withval is not found." >&2;}
    fi
    tcl_libdir="-L$withval"
fi;

# Check whether --with-tk-includes or --without-tk-includes was given.
if test "${with_tk_includes+set}" = set; then
  withval="$with_tk_includes"
   if test ! -d $withval; then
      { echo "$as_me:7177: WARNING: $withval is not found." >&5
echo "$as_me: WARNING: $withval is not found." >&2;}
    fi
    tk_includes="-I$withval"
fi;

# Check whether --with-tk-libs or --without-tk-libs was given.
if test "${with_tk_libs+set}" = set; then
  withval="$with_tk_libs"
   if test ! -d $withval; then
      { echo "$as_me:7187: WARNING: $withval is not found." >&5
echo "$as_me: WARNING: $withval is not found." >&2;}
    fi
    tk_libdir="-L$withval"
fi;

# Check whether --with-offix-includes or --without-offix-includes was given.
if test "${with_offix_includes+set}" = set; then
  withval="$with_offix_includes"
   if test ! -d $withval; then
      { echo "$as_me:7197: WARNING: $withval is not found." >&5
echo "$as_me: WARNING: $withval is not found." >&2;}
    fi
    offix_include_dir="-I$withval"
fi;

# Check whether --with-offix-libs or --without-offix-libs was given.
if test "${with_offix_libs+set}" = set; then
  withval="$with_offix_libs"
   if test ! -d $withval; then
      { echo "$as_me:7207: WARNING: $withval is not found." >&5
echo "$as_me: WARNING: $withval is not found." >&2;}
    fi
    offix_lib_dir="-L$withval"
fi;

audio_targets='default oss alsa sun hpux irix mme sb_dsp w32 alib nas esd vorbis gogo'

# Check whether --with-nas-library or --without-nas-library was given.
if test "${with_nas_library+set}" = set; then
  withval="$with_nas_library"

fi;

# Check whether --with-nas-includes or --without-nas-includes was given.
if test "${with_nas_includes+set}" = set; then
  withval="$with_nas_includes"

fi;

# Check whether --enable-audio or --disable-audio was given.
if test "${enable_audio+set}" = set; then
  enableval="$enable_audio"
   enable_audio=$enableval
    have_audio_opt=yes
else
   enable_audio=yes
    have_audio_opt=no
fi;

test "x$enable_audio" = xyes && enable_audio=default

if test "x$enable_audio" != xno; then
  for i in `echo $enable_audio | sed 's/,/ /g'`; do
    eval "au_enable_$i=yes"
  done
fi

DEFAULT_PLAYMODE=

# Check whether --with-default-output or --without-default-output was given.
if test "${with_default_output+set}" = set; then
  withval="$with_default_output"
   if test "$enable_audio" != no; then
      DEFAULT_PLAYMODE=$withval
      eval "au_enable_$DEFAULT_PLAYMODE=yes"
    else
      { echo "$as_me:7254: WARNING: --with-default-output=$withval: audio is not enabled" >&5
echo "$as_me: WARNING: --with-default-output=$withval: audio is not enabled" >&2;}
    fi
fi;

# Check whether --enable-esd or --disable-esd was given.
if test "${enable_esd+set}" = set; then
  enableval="$enable_esd"
   au_enable_esd=$enableval
fi;
# Check whether --enable-nas or --disable-nas was given.
if test "${enable_nas+set}" = set; then
  enableval="$enable_nas"
   au_enable_nas=$enableval
fi;
# Check whether --enable-alsa or --disable-alsa was given.
if test "${enable_alsa+set}" = set; then
  enableval="$enable_alsa"
   au_enable_alsa=$enableval
fi;

if test "x$au_enable_default" = xyes; then
  case "$target" in
    *-*-linux*|*-*-freebsd*)
      au_enable_oss=yes
      ;;
    *-*-bsdi2.0)
      au_enable_sb_dsp=yes
      ;;
    *-*-bsdi2.1|*-*-bsdi3.?|*-*-bsdi4.?)
      au_enable_oss=yes
      ;;
    *-*-hpux*)
      au_enable_hpux=yes
      ;;
    *-dec-*)
      au_enable_mme=yes
      ;;
    *irix*)
      au_enable_irix=yes
      ;;
    *-*-sunos4*)
      au_enable_sun=yes
      ;;
    *-*-solaris*)
      au_enable_sun=yes
      ;;
    *-*-netbsd*)
      au_enable_sun=yes
      ;;
    *-*-cygwin*)
      au_enable_w32=yes
      ;;
    *)
      { echo "$as_me:7308: WARNING: No --enable-audio=default audio for $target" >&5
echo "$as_me: WARNING: No --enable-audio=default audio for $target" >&2;}
      ;;
  esac
fi

echo "$as_me:7314: checking enable_audio=oss" >&5
echo $ECHO_N "checking enable_audio=oss... $ECHO_C" >&6
if test "x$au_enable_oss" = xyes; then
  EXTRADEFS="$EXTRADEFS -DAU_OSS"
  SYSEXTRAS="$SYSEXTRAS oss_a.c"
  if test "x$ac_cv_header_sys_soundcard_h" = xyes; then
    echo "$as_me:7320: result: yes - <sys/soundcard.h>" >&5
echo "${ECHO_T}yes - <sys/soundcard.h>" >&6
  else
    case "$target" in
      *linux*|*freebsd*)
		echo "$as_me:7325: result: yes" >&5
echo "${ECHO_T}yes" >&6
	;;
      *)
	if test "x$ac_cv_header_soundcard_h" = xyes; then
	  echo "$as_me:7330: result: yes - <soundcard.h>" >&5
echo "${ECHO_T}yes - <soundcard.h>" >&6
	else
	  { echo "$as_me:7333: WARNING: <sys/soundcard.h> is not found" >&5
echo "$as_me: WARNING: <sys/soundcard.h> is not found" >&2;}
	fi
	;;
    esac
  fi

echo "$as_me:7340: checking for open in -lossaudio" >&5
echo $ECHO_N "checking for open in -lossaudio... $ECHO_C" >&6
if test "${ac_cv_lib_ossaudio_open+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lossaudio  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 7348 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char open ();
int
main ()
{
open ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:7367: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:7370: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:7373: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:7376: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_ossaudio_open=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_ossaudio_open=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:7387: result: $ac_cv_lib_ossaudio_open" >&5
echo "${ECHO_T}$ac_cv_lib_ossaudio_open" >&6
if test $ac_cv_lib_ossaudio_open = yes; then
  cat >>confdefs.h <<EOF
#define HAVE_LIBOSSAUDIO 1
EOF

  LIBS="-lossaudio $LIBS"

fi

    case "$target" in
    *openbsd*)
      if test ! -e "/dev/dsp"; then
	oss_device=/dev/audio
      fi
      ;;
  esac
else
  echo "$as_me:7406: result: no" >&5
echo "${ECHO_T}no" >&6
fi

echo "$as_me:7410: checking enable_audio=sun" >&5
echo $ECHO_N "checking enable_audio=sun... $ECHO_C" >&6
if test "x$au_enable_sun" = xyes; then
  case "$target" in
    *-*-sunos4*)
      if test -f /usr/demo/SOUND/libaudio.a; then
	EXTRALIBS="$EXTRALIBS /usr/demo/SOUND/libaudio.a"
	echo "$as_me:7417: result: yes" >&5
echo "${ECHO_T}yes" >&6
      else
	echo "$as_me:7420: result: Notice: libaudio.a is not found (ignore)" >&5
echo "${ECHO_T}Notice: libaudio.a is not found (ignore)" >&6
      fi
      ;;
    *-*-solaris*)
      if test -f /usr/demo/SOUND/lib/libaudio.a; then
	EXTRALIBS="$EXTRALIBS /usr/demo/SOUND/lib/libaudio.a"
	echo "$as_me:7427: result: yes" >&5
echo "${ECHO_T}yes" >&6
      else
	echo "$as_me:7430: result: Notice: libaudio.a is not found (ignore)" >&5
echo "${ECHO_T}Notice: libaudio.a is not found (ignore)" >&6
      fi
      ;;
    *) 	echo "$as_me:7434: result: yes" >&5
echo "${ECHO_T}yes" >&6
      ;;
  esac
  EXTRADEFS="$EXTRADEFS -DAU_SUN"
  SYSEXTRAS="$SYSEXTRAS sun_a.c"
else
  echo "$as_me:7441: result: no" >&5
echo "${ECHO_T}no" >&6
fi

echo "$as_me:7445: checking enable_audio=hpux" >&5
echo $ECHO_N "checking enable_audio=hpux... $ECHO_C" >&6
if test "x$au_enable_hpux" = xyes; then
  case "$target" in
    *-*-hpux*) echo "$as_me:7449: result: yes" >&5
echo "${ECHO_T}yes" >&6 ;;
    *) { echo "$as_me:7451: WARNING: may not work on $target" >&5
echo "$as_me: WARNING: may not work on $target" >&2;} ;;
  esac
  EXTRADEFS="$EXTRADEFS -DAU_HPUX_AUDIO"
  SYSEXTRAS="$SYSEXTRAS hpux_d_a.c"
else
  echo "$as_me:7457: result: no" >&5
echo "${ECHO_T}no" >&6
fi

echo "$as_me:7461: checking enable_audio=irix" >&5
echo $ECHO_N "checking enable_audio=irix... $ECHO_C" >&6
if test "x$au_enable_irix" = xyes; then
  case "$target" in
    *-sgi-irix5*|*-sgi-irix6.2)
      EXTRADEFS="$EXTRADEFS -DAU_AUDRIV -DSGI_OLDAL"
      echo "$as_me:7467: result: yes" >&5
echo "${ECHO_T}yes" >&6
      ;;
    *-sgi-irix6*)
      EXTRADEFS="$EXTRADEFS -DAU_AUDRIV -DSGI_NEWAL"
      echo "$as_me:7472: result: yes" >&5
echo "${ECHO_T}yes" >&6
      ;;
    *) { echo "$as_me:7475: WARNING: may not work on $target" >&5
echo "$as_me: WARNING: may not work on $target" >&2;} ;;
  esac
  SYSEXTRAS="$SYSEXTRAS audriv_a.c audriv_al.c"
  EXTRALIBS="$EXTRASLIBS -laudio"
else
  echo "$as_me:7481: result: no" >&5
echo "${ECHO_T}no" >&6
fi

echo "$as_me:7485: checking enable_audio=mme" >&5
echo $ECHO_N "checking enable_audio=mme... $ECHO_C" >&6
if test "x$au_enable_mme" = xyes; then
  case "$target" in
    *-dec-*) echo "$as_me:7489: result: yes" >&5
echo "${ECHO_T}yes" >&6 ;;
    *) { echo "$as_me:7491: WARNING: may not work on $target" >&5
echo "$as_me: WARNING: may not work on $target" >&2;} ;;
  esac
  EXTRADEFS="$EXTRADEFS -DAU_DEC -DAU_AUDRIV"
  SYSEXTRAS="$SYSEXTRAS audriv_a.c audriv_mme.c"
  CPPFLAGS="$CPPFLAGS -I/usr/opt/MME210/include"
  EXTRALIBS="$EXTRALIBS /usr/opt/MME220/lib/libmme.a"
else
  echo "$as_me:7499: result: no" >&5
echo "${ECHO_T}no" >&6
fi

echo "$as_me:7503: checking enable_audio=sb_dsp" >&5
echo $ECHO_N "checking enable_audio=sb_dsp... $ECHO_C" >&6
if test "x$au_enable_sb_dsp" = xyes; then
  case "$target" in
    *-*-bsdi2.0) echo "$as_me:7507: result: yes" >&5
echo "${ECHO_T}yes" >&6 ;;
    *) { echo "$as_me:7509: WARNING: may not work on $target" >&5
echo "$as_me: WARNING: may not work on $target" >&2;} ;;
  esac
  EXTRADEFS="$EXTRADEFS -DAU_BSDI -DDEFAULT_RATE=22500"
  SYSEXTRAS="$SYSEXTRAS bsd20_a.c"
else
  echo "$as_me:7515: result: no" >&5
echo "${ECHO_T}no" >&6
fi

echo "$as_me:7519: checking enable_audio=w32" >&5
echo $ECHO_N "checking enable_audio=w32... $ECHO_C" >&6
if test "x$au_enable_w32" = xyes; then
  case "$target" in
    *-*-cygwin*)
     echo "$as_me:7524: result: yes" >&5
echo "${ECHO_T}yes" >&6
     ;;
    *)
     { echo "$as_me:7528: WARNING: may not work on $target" >&5
echo "$as_me: WARNING: may not work on $target" >&2;}
     ;;
  esac
  SYSEXTRAS="$SYSEXTRAS w32_a.c"
  EXTRALIBS="$EXTRALIBS -lwinmm"
  EXTRADEFS="$EXTRADEFS -DAU_W32"
else
  echo "$as_me:7536: result: no" >&5
echo "${ECHO_T}no" >&6
fi

echo "$as_me:7540: checking enable_audio=alsa" >&5
echo $ECHO_N "checking enable_audio=alsa... $ECHO_C" >&6
if test "x$au_enable_alsa" = xyes; then
  echo "$as_me:7543: result: " >&5
echo "${ECHO_T}" >&6
  KEEPCFLAGS=$CFLAGS
  KEEPLIBS=$LIBS
  KEEPLDFLAGS=$LDFLAGS
  have_alsa=no

# Check whether --with-alsa-prefix or --without-alsa-prefix was given.
if test "${with_alsa_prefix+set}" = set; then
  withval="$with_alsa_prefix"
  alsa_prefix="$withval"
else
  alsa_prefix=""
fi;

# Check whether --with-alsa-inc-prefix or --without-alsa-inc-prefix was given.
if test "${with_alsa_inc_prefix+set}" = set; then
  withval="$with_alsa_inc_prefix"
  alsa_inc_prefix="$withval"
else
  alsa_inc_prefix=""
fi;
# Check whether --enable-alsatest or --disable-alsatest was given.
if test "${enable_alsatest+set}" = set; then
  enableval="$enable_alsatest"
  enable_alsatest=no
else
  enable_alsatest=yes
fi;

echo "$as_me:7573: checking for ALSA CFLAGS" >&5
echo $ECHO_N "checking for ALSA CFLAGS... $ECHO_C" >&6
if test "$alsa_inc_prefix" != "" ; then
	ALSA_CFLAGS="$ALSA_CFLAGS -I$alsa_inc_prefix"
        CFLAGS="$CFLAGS -I$alsa_inc_prefix"
fi
echo "$as_me:7579: result: $ALSA_CFLAGS" >&5
echo "${ECHO_T}$ALSA_CFLAGS" >&6

echo "$as_me:7582: checking for ALSA LDFLAGS" >&5
echo $ECHO_N "checking for ALSA LDFLAGS... $ECHO_C" >&6
if test "$alsa_prefix" != "" ; then
	ALSA_LIBS="$ALSA_LIBS -L$alsa_prefix"
	LIBS="-L$alsa_prefix"
fi

ALSA_LIBS="$ALSA_LIBS -lasound"
echo "$as_me:7590: result: $ALSA_LIBS" >&5
echo "${ECHO_T}$ALSA_LIBS" >&6

min_alsa_version=0.1.1
echo "$as_me:7594: checking for libasound headers version >= $min_alsa_version" >&5
echo $ECHO_N "checking for libasound headers version >= $min_alsa_version... $ECHO_C" >&6
no_alsa=""
    alsa_min_major_version=`echo $min_alsa_version | \
           sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
    alsa_min_minor_version=`echo $min_alsa_version | \
           sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
    alsa_min_micro_version=`echo $min_alsa_version | \
           sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`

cat >conftest.$ac_ext <<_ACEOF
#line 7605 "configure"
#include "confdefs.h"

#include <sys/asoundlib.h>

int
main ()
{

/* ensure backward compatibility */
#if !defined(SND_LIB_MAJOR) && defined(SOUNDLIB_VERSION_MAJOR)
#define SND_LIB_MAJOR SOUNDLIB_VERSION_MAJOR
#endif
#if !defined(SND_LIB_MINOR) && defined(SOUNDLIB_VERSION_MINOR)
#define SND_LIB_MINOR SOUNDLIB_VERSION_MINOR
#endif
#if !defined(SND_LIB_SUBMINOR) && defined(SOUNDLIB_VERSION_SUBMINOR)
#define SND_LIB_SUBMINOR SOUNDLIB_VERSION_SUBMINOR
#endif

#  if(SND_LIB_MAJOR > $alsa_min_major_version)
  exit(0);
#  else
#    if(SND_LIB_MAJOR < $alsa_min_major_version)
#       error not present
#    endif

#   if(SND_LIB_MINOR > $alsa_min_minor_version)
  exit(0);
#   else
#     if(SND_LIB_MINOR < $alsa_min_minor_version)
#          error not present
#      endif

#      if(SND_LIB_SUBMINOR < $alsa_min_micro_version)
#        error not present
#      endif
#    endif
#  endif
exit(0);

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:7651: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=$?
  echo "$as_me:7654: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest.$ac_objext'
  { (eval echo "$as_me:7657: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:7660: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  echo "$as_me:7662: result: found." >&5
echo "${ECHO_T}found." >&6
   have_alsa=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
echo "$as_me:7668: result: not present." >&5
echo "${ECHO_T}not present." >&6

fi
rm -f conftest.$ac_objext conftest.$ac_ext

echo "$as_me:7674: checking for snd_cards in -lasound" >&5
echo $ECHO_N "checking for snd_cards in -lasound... $ECHO_C" >&6
if test "${ac_cv_lib_asound_snd_cards+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lasound  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 7682 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char snd_cards ();
int
main ()
{
snd_cards ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:7701: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:7704: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:7707: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:7710: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_asound_snd_cards=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_asound_snd_cards=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:7721: result: $ac_cv_lib_asound_snd_cards" >&5
echo "${ECHO_T}$ac_cv_lib_asound_snd_cards" >&6
if test $ac_cv_lib_asound_snd_cards = yes; then
  cat >>confdefs.h <<EOF
#define HAVE_LIBASOUND 1
EOF

  LIBS="-lasound $LIBS"

else
  echo "$as_me:7731: result: No linkable libasound was found." >&5
echo "${ECHO_T}No linkable libasound was found." >&6

fi

  if test have_alsa = no; then
    { echo "$as_me:7737: WARNING: ALSA: Couldn't configure" >&5
echo "$as_me: WARNING: ALSA: Couldn't configure" >&2;}
    CFLAGS=$KEEPCFLAGS
    LIBS=$KEEPLIBS
    LDFLAGS=$KEEPLDFLAGS
  else
    echo "$as_me:7743: result: ALSA: Enabled" >&5
echo "${ECHO_T}ALSA: Enabled" >&6
    EXTRADEFS="$EXTRADEFS -DAU_ALSA"
    SYSEXTRAS="$SYSEXTRAS alsa_a.c"
    for f in $ALSA_CFLAGS; do
    case ".$f" in
	.-I?*|.-D?*)	CPPFLAGS="$CPPFLAGS $f" ;;
	*)		CFLAGS="$CPPFLAGS $f" ;;
    esac
done

    LIBS="$KEEPLIBS $ALSA_LIBS"
  fi
else
  echo "$as_me:7757: result: no" >&5
echo "${ECHO_T}no" >&6
fi

echo "$as_me:7761: checking enable_audio=alib" >&5
echo $ECHO_N "checking enable_audio=alib... $ECHO_C" >&6
if test "x$au_enable_alib" = xyes; then
  case "$target" in
    *-*-hpux*) echo "$as_me:7765: result: yes" >&5
echo "${ECHO_T}yes" >&6 ;;
    *) { echo "$as_me:7767: WARNING: may not work on $target" >&5
echo "$as_me: WARNING: may not work on $target" >&2;} ;;
  esac
  SYSEXTRAS="$SYSEXTRAS hpux_a.c"
  EXTRADEFS="$EXTRADEFS -DAU_HPUX_ALIB"
  if test -d /opt/audio/include; then
    CPPFLAGS="$CPPFLAGS -I/opt/audio/include"
  fi
  if test -d /opt/audio/lib; then
    EXTRALIBS="$EXTRALIBS -L/opt/audio/lib"
  fi
  EXTRALIBS="$EXTRALIBS -lAlib"
else
  echo "$as_me:7780: result: no" >&5
echo "${ECHO_T}no" >&6
fi

echo "$as_me:7784: checking enable_audio=nas" >&5
echo $ECHO_N "checking enable_audio=nas... $ECHO_C" >&6
if test "x$au_enable_nas" = xyes; then
  if test "x$with_x" != xyes; then
    { { echo "$as_me:7788: error: nas: --with-x option must be specified" >&5
echo "$as_me: error: nas: --with-x option must be specified" >&2;}
   { (exit 1); exit 1; }; }
  fi
  EXTRADEFS="$EXTRADEFS -DAU_NAS"
  SYSEXTRAS="$SYSEXTRAS nas_a.c"

  if test "x$with_nas_library" != x; then
    echo "$as_me:7796: result: $with_nas_library" >&5
echo "${ECHO_T}$with_nas_library" >&6;
    EXTRALIBS="$EXTRALIBS $with_nas_library"
  else
    echo "$as_me:7800: result: " >&5
echo "${ECHO_T}" >&6
    echo "$as_me:7802: checking for library containing AuOpenServer" >&5
echo $ECHO_N "checking for library containing AuOpenServer... $ECHO_C" >&6
if test "${timidity_cv_search_AuOpenServer+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_func_search_save_LIBS="$LIBS"
timidity_cv_search_AuOpenServer="no"
for i in $x_libraries/libaudio.a \
	/usr/lib/libaudio.so \
	/usr/lib/libaudio.a ; do
  LIBS="$i  $ac_func_search_save_LIBS"
  cat >conftest.$ac_ext <<_ACEOF
#line 7814 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char AuOpenServer ();
int
main ()
{
AuOpenServer ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:7833: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:7836: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:7839: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:7842: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  timidity_cv_search_AuOpenServer="$i"; break
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
done
LIBS="$ac_func_search_save_LIBS"
fi
echo "$as_me:7853: result: $timidity_cv_search_AuOpenServer" >&5
echo "${ECHO_T}$timidity_cv_search_AuOpenServer" >&6
if test "$timidity_cv_search_AuOpenServer" != "no"; then
   echo "$as_me:7856: result: NAS: $timidity_cv_search_AuOpenServer" >&5
echo "${ECHO_T}NAS: $timidity_cv_search_AuOpenServer" >&6
	  EXTRALIBS="$EXTRALIBS $timidity_cv_search_AuOpenServer"
else :
  { echo "$as_me:7860: WARNING: NAS library is not found." >&5
echo "$as_me: WARNING: NAS library is not found." >&2;}
fi
  fi
  test "x$with_nas_includes" != x && CPPFLAGS="$CPPFLAGS -I$with_nas_includes"
  lib_xt_opt=-lXt
  if test "x$have_xext" = xyes; then
    lib_xext_opt=-lXext
  fi
  if test "x$have_xprelibs" = xyes; then
    lib_xprelibs_opt='-lSM -lICE'
  fi
else
  echo "$as_me:7873: result: no" >&5
echo "${ECHO_T}no" >&6
fi

echo "$as_me:7877: checking enable_audio=esd" >&5
echo $ECHO_N "checking enable_audio=esd... $ECHO_C" >&6
if test "x$au_enable_esd" = xyes; then
  echo "$as_me:7880: result: " >&5
echo "${ECHO_T}" >&6
  KEEPCFLAGS=$CFLAGS
  KEEPLIBS=$LIBS
  KEEPLDFLAGS=$LDFLAGS

# Check whether --with-esd-prefix or --without-esd-prefix was given.
if test "${with_esd_prefix+set}" = set; then
  withval="$with_esd_prefix"
  esd_prefix="$withval"
else
  esd_prefix=""
fi;

# Check whether --with-esd-exec-prefix or --without-esd-exec-prefix was given.
if test "${with_esd_exec_prefix+set}" = set; then
  withval="$with_esd_exec_prefix"
  esd_exec_prefix="$withval"
else
  esd_exec_prefix=""
fi;
# Check whether --enable-esdtest or --disable-esdtest was given.
if test "${enable_esdtest+set}" = set; then
  enableval="$enable_esdtest"

else
  enable_esdtest=yes
fi;

  if test x$esd_exec_prefix != x ; then
     esd_args="$esd_args --exec-prefix=$esd_exec_prefix"
     if test x${ESD_CONFIG+set} != xset ; then
        ESD_CONFIG=$esd_exec_prefix/bin/esd-config
     fi
  fi
  if test x$esd_prefix != x ; then
     esd_args="$esd_args --prefix=$esd_prefix"
     if test x${ESD_CONFIG+set} != xset ; then
        ESD_CONFIG=$esd_prefix/bin/esd-config
     fi
  fi

  # Extract the first word of "esd-config", so it can be a program name with args.
set dummy esd-config; ac_word=$2
echo "$as_me:7924: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_ESD_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $ESD_CONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ESD_CONFIG="$ESD_CONFIG" # Let the user override the test with a path.
  ;;
  *)
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  if $as_executable_p "$ac_dir/$ac_word"; then
   ac_cv_path_ESD_CONFIG="$ac_dir/$ac_word"
   echo "$as_me:7941: found $ac_dir/$ac_word" >&5
   break
fi
done

  test -z "$ac_cv_path_ESD_CONFIG" && ac_cv_path_ESD_CONFIG="no"
  ;;
esac
fi
ESD_CONFIG=$ac_cv_path_ESD_CONFIG

if test -n "$ESD_CONFIG"; then
  echo "$as_me:7953: result: $ESD_CONFIG" >&5
echo "${ECHO_T}$ESD_CONFIG" >&6
else
  echo "$as_me:7956: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  min_esd_version=0.2.7
  echo "$as_me:7961: checking for ESD - version >= $min_esd_version" >&5
echo $ECHO_N "checking for ESD - version >= $min_esd_version... $ECHO_C" >&6
  no_esd=""
  if test "$ESD_CONFIG" = "no" ; then
    no_esd=yes
  else
    ESD_CFLAGS=`$ESD_CONFIG $esdconf_args --cflags`
    ESD_LIBS=`$ESD_CONFIG $esdconf_args --libs`

    esd_major_version=`$ESD_CONFIG $esd_args --version | \
           sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
    esd_minor_version=`$ESD_CONFIG $esd_args --version | \
           sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
    esd_micro_version=`$ESD_CONFIG $esd_config_args --version | \
           sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
    if test "x$enable_esdtest" = "xyes" ; then
      ac_save_CFLAGS="$CFLAGS"
      ac_save_LIBS="$LIBS"
      CFLAGS="$CFLAGS $ESD_CFLAGS"
      LIBS="$LIBS $ESD_LIBS"
      rm -f conf.esdtest
      if test "$cross_compiling" = yes; then
  echo $ac_n "cross compiling; assumed OK... $ac_c"
else
  cat >conftest.$ac_ext <<_ACEOF
#line 7986 "configure"
#include "confdefs.h"

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <esd.h>

char*
my_strdup (char *str)
{
  char *new_str;

  if (str)
    {
      new_str = malloc ((strlen (str) + 1) * sizeof(char));
      strcpy (new_str, str);
    }
  else
    new_str = NULL;

  return new_str;
}

int main ()
{
  int major, minor, micro;
  char *tmp_version;

  system ("touch conf.esdtest");

  /* HP/UX 9 (%@#!) writes to sscanf strings */
  tmp_version = my_strdup("$min_esd_version");
  if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
     printf("%s, bad version string\n", "$min_esd_version");
     exit(1);
   }

   if (($esd_major_version > major) ||
      (($esd_major_version == major) && ($esd_minor_version > minor)) ||
      (($esd_major_version == major) && ($esd_minor_version == minor) && ($esd_micro_version >= micro)))
    {
      return 0;
    }
  else
    {
      printf("\n*** 'esd-config --version' returned %d.%d.%d, but the minimum version\n", $esd_major_version, $esd_minor_version, $esd_micro_version);
      printf("*** of ESD required is %d.%d.%d. If esd-config is correct, then it is\n", major, minor, micro);
      printf("*** best to upgrade to the required version.\n");
      printf("*** If esd-config was wrong, set the environment variable ESD_CONFIG\n");
      printf("*** to point to the correct copy of esd-config, and remove the file\n");
      printf("*** config.cache before re-running configure\n");
      return 1;
    }
}

_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:8044: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:8047: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:8049: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8052: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  :
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
no_esd=yes
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
       CFLAGS="$ac_save_CFLAGS"
       LIBS="$ac_save_LIBS"
     fi
  fi
  if test "x$no_esd" = x ; then
     echo "$as_me:8068: result: yes" >&5
echo "${ECHO_T}yes" >&6
     :
  else
     echo "$as_me:8072: result: no" >&5
echo "${ECHO_T}no" >&6
     if test "$ESD_CONFIG" = "no" ; then
       echo "*** The esd-config script installed by ESD could not be found"
       echo "*** If ESD was installed in PREFIX, make sure PREFIX/bin is in"
       echo "*** your path, or set the ESD_CONFIG environment variable to the"
       echo "*** full path to esd-config."
     else
       if test -f conf.esdtest ; then
        :
       else
          echo "*** Could not run ESD test program, checking why..."
          CFLAGS="$CFLAGS $ESD_CFLAGS"
          LIBS="$LIBS $ESD_LIBS"
          cat >conftest.$ac_ext <<_ACEOF
#line 8087 "configure"
#include "confdefs.h"

#include <stdio.h>
#include <esd.h>

int
main ()
{
 return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:8102: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:8105: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:8108: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8111: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
   echo "*** The test program compiled, but did not run. This usually means"
          echo "*** that the run-time linker is not finding ESD or finding the wrong"
          echo "*** version of ESD. If it is not finding ESD, you'll need to set your"
          echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
          echo "*** to the installed location  Also, make sure you have run ldconfig if that"
          echo "*** is required on your system"
	  echo "***"
          echo "*** If you have an old version installed, it is best to remove it, although"
          echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
 echo "*** The test program failed to compile or link. See the file config.log for the"
          echo "*** exact error that occured. This usually means ESD was incorrectly installed"
          echo "*** or that you have moved ESD since it was installed. In the latter case, you"
          echo "*** may want to edit the esd-config script: $ESD_CONFIG"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
          CFLAGS="$ac_save_CFLAGS"
          LIBS="$ac_save_LIBS"
       fi
     fi
     ESD_CFLAGS=""
     ESD_LIBS=""
     :
  fi

  rm -f conf.esdtest

  CFLAGS=$KEEPCFLAGS
  LIBS=$KEEPLIBS
  LDFLAGS=$KEEPLDFLAGS
  if test "x$no_esd" = x; then
    echo "$as_me:8146: result: EsounD: Enabled" >&5
echo "${ECHO_T}EsounD: Enabled" >&6
    EXTRADEFS="$EXTRADEFS -DAU_ESD"
    SYSEXTRAS="$SYSEXTRAS esd_a.c"
    for f in $ESD_CFLAGS; do
    case ".$f" in
	.-I?*|.-D?*)	CPPFLAGS="$CPPFLAGS $f" ;;
	*)		CFLAGS="$CPPFLAGS $f" ;;
    esac
done

    LIBS="$LIBS $ESD_LIBS"
  else
    { echo "$as_me:8159: WARNING: EsounD: Couldn't configure" >&5
echo "$as_me: WARNING: EsounD: Couldn't configure" >&2;}
  fi
else
  echo "$as_me:8163: result: no" >&5
echo "${ECHO_T}no" >&6
fi

echo "$as_me:8167: checking enable_audio=vorbis" >&5
echo $ECHO_N "checking enable_audio=vorbis... $ECHO_C" >&6
if test "x$au_enable_vorbis" = xyes; then
  echo "$as_me:8170: result: yes" >&5
echo "${ECHO_T}yes" >&6

# Check whether --with-ogg-prefix or --without-ogg-prefix was given.
if test "${with_ogg_prefix+set}" = set; then
  withval="$with_ogg_prefix"
  ogg_prefix="$withval"
else
  ogg_prefix=""
fi;
# Check whether --enable-oggtest or --disable-oggtest was given.
if test "${enable_oggtest+set}" = set; then
  enableval="$enable_oggtest"

else
  enable_oggtest=yes
fi;

  if test "x$ogg_prefix" != "x"; then
    ogg_args="$ogg_args --prefix=$ogg_prefix"
    OGG_CFLAGS="-I$ogg_prefix/include"
    OGG_LIBS="-L$ogg_prefix/lib"
  elif test "x$prefix" != "xNONE"; then
    ogg_args="$ogg_args --prefix=$prefix"
    OGG_CFLAGS="-I$prefix/include"
    OGG_LIBS="-L$prefix/lib"
  fi

  OGG_LIBS="$OGG_LIBS -logg"

  echo "$as_me:8200: checking for Ogg" >&5
echo $ECHO_N "checking for Ogg... $ECHO_C" >&6
  no_ogg=""

  if test "x$enable_oggtest" = "xyes" ; then
    ac_save_CFLAGS="$CFLAGS"
    ac_save_LIBS="$LIBS"
    CFLAGS="$CFLAGS $OGG_CFLAGS"
    LIBS="$LIBS $OGG_LIBS"
      rm -f conf.oggtest
      if test "$cross_compiling" = yes; then
  echo $ac_n "cross compiling; assumed OK... $ac_c"
else
  cat >conftest.$ac_ext <<_ACEOF
#line 8214 "configure"
#include "confdefs.h"

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ogg/ogg.h>

int main ()
{
  system("touch conf.oggtest");
  return 0;
}

_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:8230: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:8233: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:8235: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8238: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  :
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
no_ogg=yes
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
       CFLAGS="$ac_save_CFLAGS"
       LIBS="$ac_save_LIBS"
  fi

  if test "x$no_ogg" = "x" ; then
     echo "$as_me:8254: result: yes" >&5
echo "${ECHO_T}yes" >&6

# Check whether --with-vorbis-prefix or --without-vorbis-prefix was given.
if test "${with_vorbis_prefix+set}" = set; then
  withval="$with_vorbis_prefix"
  vorbis_prefix="$withval"
else
  vorbis_prefix=""
fi;
# Check whether --enable-vorbistest or --disable-vorbistest was given.
if test "${enable_vorbistest+set}" = set; then
  enableval="$enable_vorbistest"

else
  enable_vorbistest=yes
fi;

  if test "x$vorbis_prefix" != "x" ; then
    vorbis_args="$vorbis_args --prefix=$vorbis_prefix"
    VORBIS_CFLAGS="-I$vorbis_prefix/include"
    VORBIS_LIBDIR="-L$vorbis_prefix/lib"
  elif test "x$prefix" != "xNONE"; then
    vorbis_args="$vorbis_args --prefix=$prefix"
    VORBIS_CFLAGS="-I$prefix/include"
    VORBIS_LIBDIR="-L$prefix/lib"
  fi

  VORBIS_LIBS="$VORBIS_LIBDIR -lvorbis -lm"
  VORBISFILE_LIBS="-lvorbisfile"
  VORBISENC_LIBS="-lvorbisenc"

  echo "$as_me:8286: checking for Vorbis" >&5
echo $ECHO_N "checking for Vorbis... $ECHO_C" >&6
  no_vorbis=""

  if test "x$enable_vorbistest" = "xyes" ; then
    ac_save_CFLAGS="$CFLAGS"
    ac_save_LIBS="$LIBS"
    CFLAGS="$CFLAGS $VORBIS_CFLAGS"
    LIBS="$LIBS $VORBIS_LIBS $OGG_LIBS"
      rm -f conf.vorbistest
      if test "$cross_compiling" = yes; then
  echo $ac_n "cross compiling; assumed OK... $ac_c"
else
  cat >conftest.$ac_ext <<_ACEOF
#line 8300 "configure"
#include "confdefs.h"

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <vorbis/codec.h>

int main ()
{
  system("touch conf.vorbistest");
  return 0;
}

_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:8316: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:8319: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:8321: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8324: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  :
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
no_vorbis=yes
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
       CFLAGS="$ac_save_CFLAGS"
       LIBS="$ac_save_LIBS"
  fi

  if test "x$no_vorbis" = "x" ; then
     echo "$as_me:8340: result: yes" >&5
echo "${ECHO_T}yes" >&6

      have_vorbis=yes
      SYSEXTRAS="$SYSEXTRAS vorbis_a.c"
      EXTRADEFS="$EXTRADEFS -DAU_VORBIS $OGG_CFLAGS $VORBIS_CFLAGS"
      EXTRALIBS="$EXTRALIBS $VORBIS_LIBS $VORBISENC_LIBS $OGG_LIBS"
      if test "x$CYGNUS" = "xyes"; then
 	SYSEXTRAS="$SYSEXTRAS w32g_vorbisenc_dll.c w32g_vorbis_dll.c w32g_ogg_dll.c"
      fi

  else
     echo "$as_me:8352: result: no" >&5
echo "${ECHO_T}no" >&6
     if test -f conf.vorbistest ; then
       :
     else
       echo "*** Could not run Vorbis test program, checking why..."
       CFLAGS="$CFLAGS $VORBIS_CFLAGS"
       LIBS="$LIBS $VORBIS_LIBS $OGG_LIBS"
       cat >conftest.$ac_ext <<_ACEOF
#line 8361 "configure"
#include "confdefs.h"

#include <stdio.h>
#include <vorbis/codec.h>

int
main ()
{
 return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:8376: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:8379: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:8382: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8385: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
   echo "*** The test program compiled, but did not run. This usually means"
       echo "*** that the run-time linker is not finding Vorbis or finding the wrong"
       echo "*** version of Vorbis. If it is not finding Vorbis, you'll need to set your"
       echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
       echo "*** to the installed location  Also, make sure you have run ldconfig if that"
       echo "*** is required on your system"
       echo "***"
       echo "*** If you have an old version installed, it is best to remove it, although"
       echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
 echo "*** The test program failed to compile or link. See the file config.log for the"
       echo "*** exact error that occured. This usually means Vorbis was incorrectly installed"
       echo "*** or that you have moved Vorbis since it was installed."
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
       CFLAGS="$ac_save_CFLAGS"
       LIBS="$ac_save_LIBS"
     fi
     VORBIS_CFLAGS=""
     VORBIS_LIBS=""
     VORBISFILE_LIBS=""
     VORBISENC_LIBS=""

      { echo "$as_me:8412: WARNING: Unable to configure vorbis, but ogg is there (???)" >&5
echo "$as_me: WARNING: Unable to configure vorbis, but ogg is there (???)" >&2;}

  fi

  rm -f conf.vorbistest

  else
     echo "$as_me:8420: result: no" >&5
echo "${ECHO_T}no" >&6
     if test -f conf.oggtest ; then
       :
     else
       echo "*** Could not run Ogg test program, checking why..."
       CFLAGS="$CFLAGS $OGG_CFLAGS"
       LIBS="$LIBS $OGG_LIBS"
       cat >conftest.$ac_ext <<_ACEOF
#line 8429 "configure"
#include "confdefs.h"

#include <stdio.h>
#include <ogg/ogg.h>

int
main ()
{
 return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:8444: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:8447: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:8450: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8453: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
   echo "*** The test program compiled, but did not run. This usually means"
       echo "*** that the run-time linker is not finding Ogg or finding the wrong"
       echo "*** version of Ogg. If it is not finding Ogg, you'll need to set your"
       echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
       echo "*** to the installed location  Also, make sure you have run ldconfig if that"
       echo "*** is required on your system"
       echo "***"
       echo "*** If you have an old version installed, it is best to remove it, although"
       echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
 echo "*** The test program failed to compile or link. See the file config.log for the"
       echo "*** exact error that occured. This usually means Ogg was incorrectly installed"
       echo "*** or that you have moved Ogg since it was installed. In the latter case, you"
       echo "*** may want to edit the ogg-config script: $OGG_CONFIG"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
       CFLAGS="$ac_save_CFLAGS"
       LIBS="$ac_save_LIBS"
     fi
     OGG_CFLAGS=""
     OGG_LIBS=""

    { echo "$as_me:8479: WARNING: Unable to configure vorbis!" >&5
echo "$as_me: WARNING: Unable to configure vorbis!" >&2;}
    have_vorbis=no

  fi

  rm -f conf.oggtest

else
  echo "$as_me:8488: result: no" >&5
echo "${ECHO_T}no" >&6
fi

echo "$as_me:8492: checking enable_audio=gogo" >&5
echo $ECHO_N "checking enable_audio=gogo... $ECHO_C" >&6
if test "x$au_enable_gogo" = xyes; then
  if test "x$CYGNUS" = "xyes"; then
    echo "$as_me:8496: result: yes" >&5
echo "${ECHO_T}yes" >&6
  else
    { echo "$as_me:8499: WARNING: May be gogo is not supported.  You need hack the gogo_a.c" >&5
echo "$as_me: WARNING: May be gogo is not supported.  You need hack the gogo_a.c" >&2;}
  fi
  have_gogo=yes
  SYSEXTRAS="$SYSEXTRAS gogo_a.c w32_gogo.c"
  EXTRADEFS="$EXTRADEFS -DAU_GOGO -DAU_GOGO_DLL"
  EXTRALIBS="$EXTRALIBS -lgogo"
else
  echo "$as_me:8507: result: no" >&5
echo "${ECHO_T}no" >&6
fi

if test "x$au_enable_none" = xyes; then
    EXTRADEFS="$EXTRADEFS -DAU_NONE -DAU_AUDRIV"
    SYSEXTRAS="$SYSEXTRAS audriv_a.c audriv_none.c"
fi

echo "$as_me:8516: checking default output mode" >&5
echo $ECHO_N "checking default output mode... $ECHO_C" >&6
if test "x$DEFAULT_PLAYMODE" = x; then
  DEFAULT_PLAYMODE=`echo $enable_audio | sed 's/,.*//'`
fi
case ".$DEFAULT_PLAYMODE" in
  .default)  TIMIDITY_OUTPUT_ID=d ;;
  .oss)  TIMIDITY_OUTPUT_ID=d ;;
  .alsa) TIMIDITY_OUTPUT_ID=s ;;
  .sun)  TIMIDITY_OUTPUT_ID=d ;;
  .hpux)  TIMIDITY_OUTPUT_ID=d ;;
  .irix)  TIMIDITY_OUTPUT_ID=d ;;
  .mme)  TIMIDITY_OUTPUT_ID=d ;;
  .sb_dsp)  TIMIDITY_OUTPUT_ID=d ;;
  .w32)  TIMIDITY_OUTPUT_ID=d ;;
  .alib) TIMIDITY_OUTPUT_ID=A ;;
  .nas)  TIMIDITY_OUTPUT_ID=n ;;
  .esd)  TIMIDITY_OUTPUT_ID=e ;;
  .wav)  TIMIDITY_OUTPUT_ID=w ;;
  .au)   TIMIDITY_OUTPUT_ID=u ;;
  .aiff) TIMIDITY_OUTPUT_ID=a ;;
  .list) TIMIDITY_OUTPUT_ID=l ;;
  .vorbis) TIMIDITY_OUTPUT_ID=v ;;
  .gogo) TIMIDITY_OUTPUT_ID=g ;;
  *)     TIMIDITY_OUTPUT_ID= ;;
esac
echo "$as_me:8542: result: $DEFAULT_PLAYMODE/$TIMIDITY_OUTPUT_ID" >&5
echo "${ECHO_T}$DEFAULT_PLAYMODE/$TIMIDITY_OUTPUT_ID" >&6

interface_targets='dynamic ncurses slang motif tcltk emacs vt100 xaw xskin gtk alsaseq'

# Check whether --enable-interface or --disable-interface was given.
if test "${enable_interface+set}" = set; then
  enableval="$enable_interface"
   for i in `echo $enableval | sed 's/,/ /g'`; do
      eval "enable_$i=yes"
    done
fi;

# Check whether --enable-dynamic or --disable-dynamic was given.
if test "${enable_dynamic+set}" = set; then
  enableval="$enable_dynamic"
       if test "x$enable_dynamic" = xyes; then
      enable_dynamic=dynamic
    elif test "x$enable_dynamic" != xno; then
      for i in `echo $enableval | sed 's/,/ /g'`; do
	eval "enable_$i=dynamic"
      done
    fi
fi;

join_targets=
for i in $interface_targets; do
  eval "join_targets=$join_targets\$enable_$i"
done

case ".$join_targets" in
.*dynamic*) NEEDDLOPEN=yes;;
*)          NEEDDLOPEN=no;;
esac

if test "x$GCC" = xyes; then SHCFLAGS="$SHCFLAGS -fPIC"; fi
case "x$enable_ump" in xyes|xdynamic) EXTRACFLAGS="$EXTRACFLAGS -DXP_UNIX $SHCFLAGS";; esac

if test "$NEEDDLOPEN" = "yes"; then
  have_dl=no

  echo "$as_me:8583: checking for LoadLibrary" >&5
echo $ECHO_N "checking for LoadLibrary... $ECHO_C" >&6
if test "${wapi_cv_func_LoadLibrary+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 8589 "configure"
#include "confdefs.h"
#include <windows.h>

int
main ()
{
LoadLibrary(0);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:8602: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:8605: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:8608: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8611: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  wapi_cv_func_LoadLibrary=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
wapi_cv_func_LoadLibrary=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi

if eval "test \"`echo '$wapi_cv_func_'LoadLibrary`\" = yes"; then
  echo "$as_me:8623: result: yes" >&5
echo "${ECHO_T}yes" >&6
  have_dl=w32
else
  echo "$as_me:8627: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  test $wapi_cv_func_LoadLibrary = yes && have_dl=w32

  if test "$have_dl" = "no"; then
    echo "$as_me:8634: checking for shl_load" >&5
echo $ECHO_N "checking for shl_load... $ECHO_C" >&6
if test "${ac_cv_func_shl_load+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 8640 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char shl_load (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char shl_load ();
char (*f) ();

int
main ()
{
/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_shl_load) || defined (__stub___shl_load)
choke me
#else
f = shl_load;
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:8671: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:8674: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:8677: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8680: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func_shl_load=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_func_shl_load=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:8690: result: $ac_cv_func_shl_load" >&5
echo "${ECHO_T}$ac_cv_func_shl_load" >&6
if test $ac_cv_func_shl_load = yes; then
  have_dl=hpux
fi

  fi
  if test "$have_dl" = "no" -a "x$ac_cv_lib_dl_dlopen" = xyes; then
    have_dl=dlopen
  fi
  if test "$have_dl" = "no"; then
    echo "$as_me:8701: checking for dlopen" >&5
echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
if test "${ac_cv_func_dlopen+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 8707 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char dlopen (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char dlopen ();
char (*f) ();

int
main ()
{
/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_dlopen) || defined (__stub___dlopen)
choke me
#else
f = dlopen;
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:8738: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:8741: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:8744: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8747: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func_dlopen=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_func_dlopen=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:8757: result: $ac_cv_func_dlopen" >&5
echo "${ECHO_T}$ac_cv_func_dlopen" >&6
if test $ac_cv_func_dlopen = yes; then
  have_dl=dlopen
fi

  fi
  if test "$have_dl" = "no"; then
    echo "$as_me:8765: checking for dld_init" >&5
echo $ECHO_N "checking for dld_init... $ECHO_C" >&6
if test "${ac_cv_func_dld_init+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 8771 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char dld_init (); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char dld_init ();
char (*f) ();

int
main ()
{
/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_dld_init) || defined (__stub___dld_init)
choke me
#else
f = dld_init;
#endif

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:8802: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:8805: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:8808: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8811: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func_dld_init=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_func_dld_init=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:8821: result: $ac_cv_func_dld_init" >&5
echo "${ECHO_T}$ac_cv_func_dld_init" >&6
if test $ac_cv_func_dld_init = yes; then
  have_dl=dld
fi

  fi
  if test "$have_dl" = "no"; then
    echo "$as_me:8829: checking for dld_init in -ldld" >&5
echo $ECHO_N "checking for dld_init in -ldld... $ECHO_C" >&6
if test "${ac_cv_lib_dld_dld_init+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-ldld  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 8837 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char dld_init ();
int
main ()
{
dld_init ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:8856: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:8859: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:8862: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:8865: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_dld_dld_init=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_dld_dld_init=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:8876: result: $ac_cv_lib_dld_dld_init" >&5
echo "${ECHO_T}$ac_cv_lib_dld_dld_init" >&6
if test $ac_cv_lib_dld_dld_init = yes; then
  have_dl=dld;lib_dl_opt=-ldld
fi

  fi

  echo "$as_me:8884: checking dynamic link method" >&5
echo $ECHO_N "checking dynamic link method... $ECHO_C" >&6
  case "$have_dl" in
    dlopen)
      echo "$as_me:8888: result: use dl_dlopen.c" >&5
echo "${ECHO_T}use dl_dlopen.c" >&6
      SYSEXTRAS="$SYSEXTRAS dl_dlopen.c"
      echo "$as_me:8891: checking whether your dlsym() needs a leading underscore" >&5
echo $ECHO_N "checking whether your dlsym() needs a leading underscore... $ECHO_C" >&6
if test "${timidity_cv_func_dlsym_underscore+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case "$ac_cv_header_dlfcn_h" in
yes) i_dlfcn=define;;
*)   i_dlfcn=undef;;
esac
cat > dyna.c <<EOM
fred () { }
EOM

cat > fred.c <<EOM
#include <stdio.h>
#$i_dlfcn I_DLFCN
#ifdef I_DLFCN
#include <dlfcn.h>      /* the dynamic linker include file for Sunos/Solaris */
#else
#include <sys/types.h>
#include <nlist.h>
#include <link.h>
#endif

extern int fred() ;

main()
{
    void * handle ;
    void * symbol ;
#ifndef RTLD_LAZY
    int mode = 1 ;
#else
    int mode = RTLD_LAZY ;
#endif
    handle = dlopen("./dyna.$so", mode) ;
    if (handle == NULL) {
	printf ("1\n") ;
	fflush (stdout) ;
	exit(0);
    }
    symbol = dlsym(handle, "fred") ;
    if (symbol == NULL) {
	/* try putting a leading underscore */
	symbol = dlsym(handle, "_fred") ;
	if (symbol == NULL) {
	    printf ("2\n") ;
	    fflush (stdout) ;
	    exit(0);
	}
	printf ("3\n") ;
    }
    else
	printf ("4\n") ;
    fflush (stdout) ;
    exit(0);
}
EOM
: Call the object file tmp-dyna.o in case dlext=o.
if ${CC-cc} $CFLAGS $SHCFLAGS $CPPFLAGS -c dyna.c > /dev/null 2>&1 &&
	mv dyna.o tmp-dyna.o > /dev/null 2>&1 &&
	$SHLD $SHLDFLAGS -o dyna.$so tmp-dyna.o > /dev/null 2>&1 &&
	${CC-cc} -o fred $CFLAGS $CPPFLAGS $LDFLAGS fred.c $LIBS $lib_dl_opt > /dev/null 2>&1; then
	xxx=`./fred`
	case $xxx in
	1)	{ echo "$as_me:8956: WARNING: Test program failed using dlopen.  Perhaps you should not use dynamic loading." >&5
echo "$as_me: WARNING: Test program failed using dlopen.  Perhaps you should not use dynamic loading." >&2;}
		;;
	2)	{ echo "$as_me:8959: WARNING: Test program failed using dlsym.  Perhaps you should not use dynamic loading." >&5
echo "$as_me: WARNING: Test program failed using dlsym.  Perhaps you should not use dynamic loading." >&2;}
		;;
	3)	timidity_cv_func_dlsym_underscore=yes
		;;
	4)	timidity_cv_func_dlsym_underscore=no
		;;
	esac
else
	{ echo "$as_me:8968: WARNING: I can't compile and run the test program." >&5
echo "$as_me: WARNING: I can't compile and run the test program." >&2;}
fi
rm -f dyna.c dyna.o dyna.$so tmp-dyna.o fred.c fred.o fred

fi

case "x$timidity_cv_func_dlsym_underscore" in
xyes)	EXTRADEFS="$EXTRADEFS -DDLSYM_NEEDS_UNDERSCORE"
	echo "$as_me:8977: result: yes" >&5
echo "${ECHO_T}yes" >&6
	;;
xno)
	echo "$as_me:8981: result: no" >&5
echo "${ECHO_T}no" >&6
	;;
esac

      ;;
    dld)
      echo "$as_me:8988: result: use dl_dld.c" >&5
echo "${ECHO_T}use dl_dld.c" >&6
      SYSEXTRAS="$SYSEXTRAS dl_dld.c"
      ;;
    hpux)
      echo "$as_me:8993: result: use dl_hpux.c" >&5
echo "${ECHO_T}use dl_hpux.c" >&6
      SYSEXTRAS="$SYSEXTRAS dl_hpux.c"
      LDFLAGS="$LDFLAGS -Wl,-E $LDFLAGS"
      ;;
    w32)
      echo "$as_me:8999: result: use dl_w32.c" >&5
echo "${ECHO_T}use dl_w32.c" >&6
      SYSEXTRAS="$SYSEXTRAS dl_w32.c"
      ;;
    *)
      NEEDDLOPEN="no"
      { echo "$as_me:9005: WARNING: no method to open a shared object" >&5
echo "$as_me: WARNING: no method to open a shared object" >&2;}
      ;;
  esac
fi

if test "$NEEDDLOPEN" = "yes"; then
  cat >> confdefs.h <<EOF
#define IA_DYNAMIC 1
EOF

  EXTRADEFS="$EXTRADEFS -DSHARED_LIB_EXT=\\\".$so\\\""
  EXTRADEFS="$EXTRADEFS \$(DEF_SHLIB_DIR)"
  test "x$GCC" = xyes -a "x$timidity_cv_ccoption_rdynamic" = xyes  && timidity_LDFLAGS="-rdynamic"
fi

if test "$NEEDDLOPEN" = "yes"; then
  NEEDDLOPEN_TRUE=
  NEEDDLOPEN_FALSE='#'
else
  NEEDDLOPEN_TRUE='#'
  NEEDDLOPEN_FALSE=
fi

if false; then
  ENABLE_NCURSES_TRUE=
  ENABLE_NCURSES_FALSE='#'
else
  ENABLE_NCURSES_TRUE='#'
  ENABLE_NCURSES_FALSE=
fi
# Check whether --enable-ncurses or --disable-ncurses was given.
if test "${enable_ncurses+set}" = set; then
  enableval="$enable_ncurses"
  case "x$enable_ncurses" in xyes|xdynamic)

for ac_header in ncurses.h ncurses/curses.h curses.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:9044: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 9050 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:9054: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:9060: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  eval "$as_ac_Header=yes"
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$as_ac_Header=no"
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:9079: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF

fi
done

    case "$ac_cv_header_curses_h$ac_cv_header_ncurses_curses_h$ac_cv_header_ncurses_h" in
    *yes*);;
    *)	for i in /usr/include /usr/local/include; do
	if test -f "$i/ncurses/curses.h" -a -f "$i/ncurses/unctrl.h"; then
	    { echo "$as_me:9093: WARNING: ncurses test is failure.  Please check config.h and common.makefile later" >&5
echo "$as_me: WARNING: ncurses test is failure.  Please check config.h and common.makefile later" >&2;}
	    CPPFLAGS="$CPPFLAGS -I$i/ncurses"
	    break
	fi
	done
	;;
    esac

    echo "$as_me:9102: checking for initscr in -lncurses" >&5
echo $ECHO_N "checking for initscr in -lncurses... $ECHO_C" >&6
if test "${ac_cv_lib_ncurses_initscr+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lncurses  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 9110 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char initscr ();
int
main ()
{
initscr ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:9129: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:9132: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:9135: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9138: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_ncurses_initscr=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_ncurses_initscr=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:9149: result: $ac_cv_lib_ncurses_initscr" >&5
echo "${ECHO_T}$ac_cv_lib_ncurses_initscr" >&6
if test $ac_cv_lib_ncurses_initscr = yes; then
  lib_curses_opt=-lncurses
else
   	  echo "$as_me:9154: checking for PDC_set_ctrl_break in -lcurses" >&5
echo $ECHO_N "checking for PDC_set_ctrl_break in -lcurses... $ECHO_C" >&6
if test "${ac_cv_lib_curses_PDC_set_ctrl_break+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lcurses $lib_user32_test $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 9162 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char PDC_set_ctrl_break ();
int
main ()
{
PDC_set_ctrl_break ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:9181: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:9184: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:9187: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9190: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_curses_PDC_set_ctrl_break=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_curses_PDC_set_ctrl_break=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:9201: result: $ac_cv_lib_curses_PDC_set_ctrl_break" >&5
echo "${ECHO_T}$ac_cv_lib_curses_PDC_set_ctrl_break" >&6
if test $ac_cv_lib_curses_PDC_set_ctrl_break = yes; then
   lib_curses_opt=-lcurses
		  CPPFLAGS="$CPPFLAGS -DUSE_PDCURSES=1"
		  lib_user32_opt="$lib_user32_test"

else
   		  echo "$as_me:9209: checking for PDC_set_ctrl_break in -lpdcurses" >&5
echo $ECHO_N "checking for PDC_set_ctrl_break in -lpdcurses... $ECHO_C" >&6
if test "${ac_cv_lib_pdcurses_PDC_set_ctrl_break+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lpdcurses  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 9217 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char PDC_set_ctrl_break ();
int
main ()
{
PDC_set_ctrl_break ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:9236: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:9239: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:9242: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9245: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_pdcurses_PDC_set_ctrl_break=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_pdcurses_PDC_set_ctrl_break=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:9256: result: $ac_cv_lib_pdcurses_PDC_set_ctrl_break" >&5
echo "${ECHO_T}$ac_cv_lib_pdcurses_PDC_set_ctrl_break" >&6
if test $ac_cv_lib_pdcurses_PDC_set_ctrl_break = yes; then
   lib_curses_opt=-lpdcurses
			  CPPFLAGS="$CPPFLAGS -DUSE_PDCURSES=1"
			  lib_user32_opt="$lib_user32_test"

else
   			  case "$target" in
			    *openbsd*)
				echo "$as_me:9266: checking for initscr in -lcurses" >&5
echo $ECHO_N "checking for initscr in -lcurses... $ECHO_C" >&6
if test "${ac_cv_lib_curses_initscr+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lcurses  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 9274 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char initscr ();
int
main ()
{
initscr ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:9293: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:9296: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:9299: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9302: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_curses_initscr=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_curses_initscr=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:9313: result: $ac_cv_lib_curses_initscr" >&5
echo "${ECHO_T}$ac_cv_lib_curses_initscr" >&6
if test $ac_cv_lib_curses_initscr = yes; then
  lib_curses_opt=-lcurses
else
   { echo "$as_me:9318: WARNING: ncurses interface is not enabled" >&5
echo "$as_me: WARNING: ncurses interface is not enabled" >&2;}
					  enable_ncurses=no
fi

				;;
			    *)	{ echo "$as_me:9324: WARNING: ncurses interface is not enabled" >&5
echo "$as_me: WARNING: ncurses interface is not enabled" >&2;}
				enable_ncurses=no
				;;
			  esac

fi

fi

fi

   ;; esac
fi;
case "x$enable_ncurses" in
xyes)
  cat >> confdefs.h <<EOF
#define IA_NCURSES 1
EOF

if true; then
  ENABLE_NCURSES_TRUE=
  ENABLE_NCURSES_FALSE='#'
else
  ENABLE_NCURSES_TRUE='#'
  ENABLE_NCURSES_FALSE=
fi
   LIBS="$LIBS $lib_curses_opt"
    case "$target" in
      *-*-freebsd*)
        EXTRALIBS="$EXTRALIBS -lmytinfo"
        ;;
    esac
    INTERFACE_SRCS="$INTERFACE_SRCS ncurs_c.c"

  ;;
xdynamic)
  dynamic_targets="$dynamic_targets interface_n.\$(so)"
   n_so_libs="$lib_curses_opt"
    case "$target" in
      *-*-freebsd*)
        n_so_libs="$n_so_libs -lmytinfo"
        ;;
    esac
  ;;
*)

  ;;
esac

if false; then
  ENABLE_SLANG_TRUE=
  ENABLE_SLANG_FALSE='#'
else
  ENABLE_SLANG_TRUE='#'
  ENABLE_SLANG_FALSE=
fi
# Check whether --enable-slang or --disable-slang was given.
if test "${enable_slang+set}" = set; then
  enableval="$enable_slang"
  case "x$enable_slang" in xyes|xdynamic)  echo "$as_me:9384: checking for SLang_init_tty in -lslang" >&5
echo $ECHO_N "checking for SLang_init_tty in -lslang... $ECHO_C" >&6
if test "${ac_cv_lib_slang_SLang_init_tty+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lslang  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 9392 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char SLang_init_tty ();
int
main ()
{
SLang_init_tty ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:9411: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:9414: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:9417: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9420: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_slang_SLang_init_tty=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_slang_SLang_init_tty=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:9431: result: $ac_cv_lib_slang_SLang_init_tty" >&5
echo "${ECHO_T}$ac_cv_lib_slang_SLang_init_tty" >&6
if test $ac_cv_lib_slang_SLang_init_tty = yes; then
  :
else
   enable_slang=no
	  { echo "$as_me:9437: WARNING: slang interface is not enabled" >&5
echo "$as_me: WARNING: slang interface is not enabled" >&2;}
fi

for ac_header in slang/slang.h slang.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:9444: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 9450 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:9454: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:9460: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  eval "$as_ac_Header=yes"
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$as_ac_Header=no"
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:9479: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF

fi
done

   ;; esac
fi;
case "x$enable_slang" in
xyes)
  cat >> confdefs.h <<EOF
#define IA_SLANG 1
EOF

if true; then
  ENABLE_SLANG_TRUE=
  ENABLE_SLANG_FALSE='#'
else
  ENABLE_SLANG_TRUE='#'
  ENABLE_SLANG_FALSE=
fi
   LIBS="$LIBS -lslang"
    INTERFACE_SRCS="$INTERFACE_SRCS slang_c.c"

  ;;
xdynamic)
  dynamic_targets="$dynamic_targets interface_s.\$(so)"
   s_so_libs="-lslang"
    echo "$as_me:9511: checking for initscr in -ltermcap" >&5
echo $ECHO_N "checking for initscr in -ltermcap... $ECHO_C" >&6
if test "${ac_cv_lib_termcap_initscr+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-ltermcap  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 9519 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char initscr ();
int
main ()
{
initscr ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:9538: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:9541: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:9544: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9547: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_termcap_initscr=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_termcap_initscr=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:9558: result: $ac_cv_lib_termcap_initscr" >&5
echo "${ECHO_T}$ac_cv_lib_termcap_initscr" >&6
if test $ac_cv_lib_termcap_initscr = yes; then
  s_so_libs="$s_so_libs -ltermcap"
fi

  ;;
*)

  ;;
esac

if false; then
  ENABLE_MOTIF_TRUE=
  ENABLE_MOTIF_FALSE='#'
else
  ENABLE_MOTIF_TRUE='#'
  ENABLE_MOTIF_FALSE=
fi
# Check whether --enable-motif or --disable-motif was given.
if test "${enable_motif+set}" = set; then
  enableval="$enable_motif"
  case "x$enable_motif" in xyes|xdynamic)  if test "x$with_x" != xyes; then
        { { echo "$as_me:9581: error: motif: --with-x option must be specified" >&5
echo "$as_me: error: motif: --with-x option must be specified" >&2;}
   { (exit 1); exit 1; }; }
    fi
    if test "x$have_xm" != xyes; then
      { echo "$as_me:9586: WARNING: Motif library is not found." >&5
echo "$as_me: WARNING: Motif library is not found." >&2;}
      enable_motif=no
    fi  ;; esac
fi;
case "x$enable_motif" in
xyes)
  cat >> confdefs.h <<EOF
#define IA_MOTIF 1
EOF

if true; then
  ENABLE_MOTIF_TRUE=
  ENABLE_MOTIF_FALSE='#'
else
  ENABLE_MOTIF_TRUE='#'
  ENABLE_MOTIF_FALSE=
fi
   lib_xm_opt=-lXm
    lib_xt_opt=-lXt
    lib_xext_opt=-lXext
    if test "x$have_xprelibs" = xyes; then
	lib_xprelibs_opt='-lSM -lICE'
    fi
    INTERFACE_SRCS="$INTERFACE_SRCS motif_c.c motif_i.c motif_p.c"

  ;;
xdynamic)
  dynamic_targets="$dynamic_targets interface_m.\$(so)"
   if test x$have_xprelibs = xyes; then
      m_so_libs="-lXext -lSM -lICE"
    fi
    m_so_libs="$ldflags_x_opt -lXm -lXt $m_so_libs -lX11"

  ;;
*)

  ;;
esac

if false; then
  ENABLE_TCLTK_TRUE=
  ENABLE_TCLTK_FALSE='#'
else
  ENABLE_TCLTK_TRUE='#'
  ENABLE_TCLTK_FALSE=
fi
# Check whether --enable-tcltk or --disable-tcltk was given.
if test "${enable_tcltk+set}" = set; then
  enableval="$enable_tcltk"
  case "x$enable_tcltk" in xyes|xdynamic)  if test "x$with_x" != xyes; then
        { { echo "$as_me:9637: error: tcltk: --with-x option must be specified" >&5
echo "$as_me: error: tcltk: --with-x option must be specified" >&2;}
   { (exit 1); exit 1; }; }
    fi

        KEEPCPPFLAGS=$CPPFLAGS
    KEEPLDFLAGS=$LDFLAGS
    KEEPLIBS=$LIBS

    CPPFLAGS="$tcl_include_dir $tk_includes $CPPFLAGS"
    LDFLAGS="$tcl_libdir $tk_libdir $LDFLAGS"
    LIBS="$LIBS $lib_dl_opt"

    tcl_lib=
    tk_lib=
    for l in tcl tcl8.0jp tcl7.6jp tcl80jp tcl76jp tcl8.0 tcl7.6 tcl80 tcl76; do
      case "x$tcl_lib" in x) as_ac_Lib=`echo "ac_cv_lib_$l''_Tcl_Init" | $as_tr_sh`
echo "$as_me:9654: checking for Tcl_Init in -l$l" >&5
echo $ECHO_N "checking for Tcl_Init in -l$l... $ECHO_C" >&6
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-l$l  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 9662 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char Tcl_Init ();
int
main ()
{
Tcl_Init ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:9681: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:9684: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:9687: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9690: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_Lib=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_Lib=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:9701: result: `eval echo '${'$as_ac_Lib'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
  tcl_lib=-l$l
fi
;; esac
    done
    LIBS="$LIBS $tcl_lib"
    for l in tk tk8.0jp tk4.2jp tk80jp tk42jp tk8.0 tk4.2 tk80 tk42; do
      case "x$tk_lib" in x) as_ac_Lib=`echo "ac_cv_lib_$l''_Tk_Init" | $as_tr_sh`
echo "$as_me:9711: checking for Tk_Init in -l$l" >&5
echo $ECHO_N "checking for Tk_Init in -l$l... $ECHO_C" >&6
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-l$l  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 9719 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char Tk_Init ();
int
main ()
{
Tk_Init ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:9738: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:9741: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:9744: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:9747: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_Lib=yes"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_Lib=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:9758: result: `eval echo '${'$as_ac_Lib'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
  tk_lib=-l$l
fi
;; esac
    done

    LIBS=$KEEPLIBS
    if test "x$tcl_lib" = x -o "x$tk_lib" = x; then
      CPPFLAGS=$KEEPCPPFLAGS
      LDFLAGS=$KEEPLDFLAGS
      enable_tcltk=no
      { echo "$as_me:9771: WARNING: tcl/tk is not enable" >&5
echo "$as_me: WARNING: tcl/tk is not enable" >&2;}
    else
      tcltk_dep='tclIndex'
    fi
   ;; esac
fi;
case "x$enable_tcltk" in
xyes)
  cat >> confdefs.h <<EOF
#define IA_TCLTK 1
EOF

if true; then
  ENABLE_TCLTK_TRUE=
  ENABLE_TCLTK_FALSE='#'
else
  ENABLE_TCLTK_TRUE='#'
  ENABLE_TCLTK_FALSE=
fi
   LIBS=`echo $LIBS | sed "s/-lX11/$tk_lib $tcl_lib -lX11/"`
    case "$target" in
      *-*-bsdi*)
        EXTRALIBS="$EXTRALIBS -lipc"
        ;;
    esac
    INTERFACE_SRCS="$INTERFACE_SRCS tk_c.c"

  ;;
xdynamic)
  dynamic_targets="$dynamic_targets interface_k.\$(so)"
   k_so_libs="$tcl_libdir $tk_libdir $tcl_lib $tk_lib $lib_dl_opt"
    case "$target" in
      *-*-bsdi*)
        k_so_libs="$k_so_libs -lipc"
        ;;
    esac
    k_so_libs="$k_so_libs -lX11 -lm"

  ;;
*)

  ;;
esac

if test "x$enable_tcltk" = "xdynamic"; then
  ENABLE_DYNAMIC_TCLTK_TRUE=
  ENABLE_DYNAMIC_TCLTK_FALSE='#'
else
  ENABLE_DYNAMIC_TCLTK_TRUE='#'
  ENABLE_DYNAMIC_TCLTK_FALSE=
fi

if false; then
  ENABLE_EMACS_TRUE=
  ENABLE_EMACS_FALSE='#'
else
  ENABLE_EMACS_TRUE='#'
  ENABLE_EMACS_FALSE=
fi
# Check whether --enable-emacs or --disable-emacs was given.
if test "${enable_emacs+set}" = set; then
  enableval="$enable_emacs"
  case "x$enable_emacs" in xyes|xdynamic)  ;; esac
fi;
case "x$enable_emacs" in
xyes)
  cat >> confdefs.h <<EOF
#define IA_EMACS 1
EOF

if true; then
  ENABLE_EMACS_TRUE=
  ENABLE_EMACS_FALSE='#'
else
  ENABLE_EMACS_TRUE='#'
  ENABLE_EMACS_FALSE=
fi
   ELFILES="$ELFILES timidity.el"
    INTERFACE_SRCS="$INTERFACE_SRCS emacs_c.c"

  ;;
xdynamic)
  dynamic_targets="$dynamic_targets interface_e.\$(so)"
   ELFILES="$ELFILES timidity.el"
  ;;
*)

  ;;
esac

if false; then
  ENABLE_VT100_TRUE=
  ENABLE_VT100_FALSE='#'
else
  ENABLE_VT100_TRUE='#'
  ENABLE_VT100_FALSE=
fi
# Check whether --enable-vt100 or --disable-vt100 was given.
if test "${enable_vt100+set}" = set; then
  enableval="$enable_vt100"
  case "x$enable_vt100" in xyes|xdynamic)  ;; esac
fi;
case "x$enable_vt100" in
xyes)
  cat >> confdefs.h <<EOF
#define IA_VT100 1
EOF

if true; then
  ENABLE_VT100_TRUE=
  ENABLE_VT100_FALSE='#'
else
  ENABLE_VT100_TRUE='#'
  ENABLE_VT100_FALSE=
fi
   INTERFACE_SRCS="$INTERFACE_SRCS vt100_c.c vt100.c"
  ;;
xdynamic)
  dynamic_targets="$dynamic_targets interface_T.\$(so)"

  ;;
*)

  ;;
esac

if false; then
  ENABLE_XAW_TRUE=
  ENABLE_XAW_FALSE='#'
else
  ENABLE_XAW_TRUE='#'
  ENABLE_XAW_FALSE=
fi
# Check whether --enable-xaw or --disable-xaw was given.
if test "${enable_xaw+set}" = set; then
  enableval="$enable_xaw"
  case "x$enable_xaw" in xyes|xdynamic)  if test "x$with_x" != xyes; then
        { { echo "$as_me:9909: error: xaw: --with-x option must be specified" >&5
echo "$as_me: error: xaw: --with-x option must be specified" >&2;}
   { (exit 1); exit 1; }; }
    fi
    if test "x$have_xaw" != "xyes" -a "x$have_xaw" != "x3d"; then
      { echo "$as_me:9914: WARNING: X Athena Widget library is not found." >&5
echo "$as_me: WARNING: X Athena Widget library is not found." >&2;}
      enable_xaw=no
    fi  ;; esac
fi;
case "x$enable_xaw" in
xyes)
  cat >> confdefs.h <<EOF
#define IA_XAW 1
EOF

if true; then
  ENABLE_XAW_TRUE=
  ENABLE_XAW_FALSE='#'
else
  ENABLE_XAW_TRUE='#'
  ENABLE_XAW_FALSE=
fi
       if test "x$have_xext" = xyes; then
      lib_xext_opt=-lXext
    fi
    if test "x$have_xprelibs" = xyes; then
      lib_xprelibs_opt='-lSM -lICE'
    fi
    lib_xmu_opt=-lXmu
    lib_xt_opt=-lXt
    if test "x$have_xaw" = x3d; then
      EXTRADEFS="$EXTRADEFS -DXAW3D"
      lib_xaw_opt=-lXaw3d
    else
      lib_xaw_opt=-lXaw
    fi
    INTERFACE_SRCS="$INTERFACE_SRCS xaw_c.c xaw_i.c"

  ;;
xdynamic)
  dynamic_targets="$dynamic_targets interface_a.\$(so)"
   if test "x$have_xext" = xyes; then
      a_so_libs="-lXext -lX11"
    else
      a_so_libs="-lX11"
    fi
    if test "x$have_xprelibs" = xyes; then
      a_so_libs="-lSM -lICE $a_so_libs"
    fi
    if test "x$have_xaw" = xyes; then
      a_so_libs="-lXaw -lXmu -lXt $a_so_libs"
    elif test "x$have_xaw" = x3d; then
      EXTRADEFS="$EXTRADEFS -DXAW3D"
      a_so_libs="-lXaw3d -lXmu -lXt $a_so_libs"
    fi
    a_so_libs="$ldflags_x_opt $a_so_libs"

  ;;
*)

  ;;
esac

if test "x$enable_xaw" = "xdynamic"; then
  ENABLE_DYNAMIC_XAW_TRUE=
  ENABLE_DYNAMIC_XAW_FALSE='#'
else
  ENABLE_DYNAMIC_XAW_TRUE='#'
  ENABLE_DYNAMIC_XAW_FALSE=
fi

if false; then
  ENABLE_XSKIN_TRUE=
  ENABLE_XSKIN_FALSE='#'
else
  ENABLE_XSKIN_TRUE='#'
  ENABLE_XSKIN_FALSE=
fi
# Check whether --enable-xskin or --disable-xskin was given.
if test "${enable_xskin+set}" = set; then
  enableval="$enable_xskin"
  case "x$enable_xskin" in xyes|xdynamic)  if test "x$with_x" != xyes; then
        { { echo "$as_me:9992: error: xskin: --with-x option must be specified" >&5
echo "$as_me: error: xskin: --with-x option must be specified" >&2;}
   { (exit 1); exit 1; }; }
    fi ;; esac
fi;
case "x$enable_xskin" in
xyes)
  cat >> confdefs.h <<EOF
#define IA_XSKIN 1
EOF

if true; then
  ENABLE_XSKIN_TRUE=
  ENABLE_XSKIN_FALSE='#'
else
  ENABLE_XSKIN_TRUE='#'
  ENABLE_XSKIN_FALSE=
fi
   INTERFACE_SRCS="$INTERFACE_SRCS xskin_c.c xskin_i.c xskin_loadBMP.c xskin_spectrum.c"
  ;;
xdynamic)
  dynamic_targets="$dynamic_targets interface_i.\$(so)"
   i_so_libs="$ldflags_x_opt -lX11"
  ;;
*)

  ;;
esac

if false; then
  ENABLE_GTK_TRUE=
  ENABLE_GTK_FALSE='#'
else
  ENABLE_GTK_TRUE='#'
  ENABLE_GTK_FALSE=
fi
# Check whether --enable-gtk or --disable-gtk was given.
if test "${enable_gtk+set}" = set; then
  enableval="$enable_gtk"
  case "x$enable_gtk" in xyes|xdynamic)
# Check whether --with-gtk-prefix or --without-gtk-prefix was given.
if test "${with_gtk_prefix+set}" = set; then
  withval="$with_gtk_prefix"
  gtk_config_prefix="$withval"
else
  gtk_config_prefix=""
fi;

# Check whether --with-gtk-exec-prefix or --without-gtk-exec-prefix was given.
if test "${with_gtk_exec_prefix+set}" = set; then
  withval="$with_gtk_exec_prefix"
  gtk_config_exec_prefix="$withval"
else
  gtk_config_exec_prefix=""
fi;
# Check whether --enable-gtktest or --disable-gtktest was given.
if test "${enable_gtktest+set}" = set; then
  enableval="$enable_gtktest"

else
  enable_gtktest=yes
fi;

  if test x$gtk_config_exec_prefix != x ; then
     gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix"
     if test x${GTK_CONFIG+set} != xset ; then
        GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config
     fi
  fi
  if test x$gtk_config_prefix != x ; then
     gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix"
     if test x${GTK_CONFIG+set} != xset ; then
        GTK_CONFIG=$gtk_config_prefix/bin/gtk-config
     fi
  fi

  # Extract the first word of "gtk-config", so it can be a program name with args.
set dummy gtk-config; ac_word=$2
echo "$as_me:10070: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_GTK_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $GTK_CONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a path.
  ;;
  *)
  ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  if $as_executable_p "$ac_dir/$ac_word"; then
   ac_cv_path_GTK_CONFIG="$ac_dir/$ac_word"
   echo "$as_me:10087: found $ac_dir/$ac_word" >&5
   break
fi
done

  test -z "$ac_cv_path_GTK_CONFIG" && ac_cv_path_GTK_CONFIG="no"
  ;;
esac
fi
GTK_CONFIG=$ac_cv_path_GTK_CONFIG

if test -n "$GTK_CONFIG"; then
  echo "$as_me:10099: result: $GTK_CONFIG" >&5
echo "${ECHO_T}$GTK_CONFIG" >&6
else
  echo "$as_me:10102: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  min_gtk_version=1.1.3
  echo "$as_me:10107: checking for GTK - version >= $min_gtk_version" >&5
echo $ECHO_N "checking for GTK - version >= $min_gtk_version... $ECHO_C" >&6
  no_gtk=""
  if test "$GTK_CONFIG" = "no" ; then
    no_gtk=yes
  else
    GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags`
    GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs`
    gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \
           sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
    gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \
           sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
    gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \
           sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
    if test "x$enable_gtktest" = "xyes" ; then
      ac_save_CFLAGS="$CFLAGS"
      ac_save_LIBS="$LIBS"
      CFLAGS="$CFLAGS $GTK_CFLAGS"
      LIBS="$LIBS $GTK_LIBS"
      rm -f conf.gtktest
      if test "$cross_compiling" = yes; then
  echo $ac_n "cross compiling; assumed OK... $ac_c"
else
  cat >conftest.$ac_ext <<_ACEOF
#line 10131 "configure"
#include "confdefs.h"

#include <gtk/gtk.h>
#include <stdio.h>

int
main ()
{
  int major, minor, micro;
  char *tmp_version;

  system ("touch conf.gtktest");

  /* HP/UX 9 (%@#!) writes to sscanf strings */
  tmp_version = g_strdup("$min_gtk_version");
  if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
     printf("%s, bad version string\n", "$min_gtk_version");
     exit(1);
   }

  if ((gtk_major_version != $gtk_config_major_version) ||
      (gtk_minor_version != $gtk_config_minor_version) ||
      (gtk_micro_version != $gtk_config_micro_version))
    {
      printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
             $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
             gtk_major_version, gtk_minor_version, gtk_micro_version);
      printf ("*** was found! If gtk-config was correct, then it is best\n");
      printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
      printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
      printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
      printf("*** required on your system.\n");
      printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n");
      printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n");
      printf("*** before re-running configure\n");
    }
  else
    {
      if ((gtk_major_version > major) ||
        ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
        ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
      {
        return 0;
       }
     else
      {
        printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
               gtk_major_version, gtk_minor_version, gtk_micro_version);
        printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
	       major, minor, micro);
        printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
        printf("***\n");
        printf("*** If you have already installed a sufficiently new version, this error\n");
        printf("*** probably means that the wrong copy of the gtk-config shell script is\n");
        printf("*** being found. The easiest way to fix this is to remove the old version\n");
        printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n");
        printf("*** correct copy of gtk-config. (In this case, you will have to\n");
        printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
        printf("*** so that the correct libraries are found at run-time))\n");
      }
    }
  return 1;
}

_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:10198: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:10201: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (eval echo "$as_me:10203: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:10206: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  :
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
no_gtk=yes
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
       CFLAGS="$ac_save_CFLAGS"
       LIBS="$ac_save_LIBS"
     fi
  fi
  if test "x$no_gtk" = x ; then
     echo "$as_me:10222: result: yes" >&5
echo "${ECHO_T}yes" >&6
     :
  else
     echo "$as_me:10226: result: no" >&5
echo "${ECHO_T}no" >&6
     if test "$GTK_CONFIG" = "no" ; then
       echo "*** The gtk-config script installed by GTK could not be found"
       echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in"
       echo "*** your path, or set the GTK_CONFIG environment variable to the"
       echo "*** full path to gtk-config."
     else
       if test -f conf.gtktest ; then
        :
       else
          echo "*** Could not run GTK test program, checking why..."
          CFLAGS="$CFLAGS $GTK_CFLAGS"
          LIBS="$LIBS $GTK_LIBS"
          cat >conftest.$ac_ext <<_ACEOF
#line 10241 "configure"
#include "confdefs.h"

#include <gtk/gtk.h>
#include <stdio.h>

int
main ()
{
 return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version));
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:10256: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:10259: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:10262: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:10265: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
   echo "*** The test program compiled, but did not run. This usually means"
          echo "*** that the run-time linker is not finding GTK or finding the wrong"
          echo "*** version of GTK. If it is not finding GTK, you'll need to set your"
          echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
          echo "*** to the installed location  Also, make sure you have run ldconfig if that"
          echo "*** is required on your system"
	  echo "***"
          echo "*** If you have an old version installed, it is best to remove it, although"
          echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
          echo "***"
          echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
          echo "*** came with the system with the command"
          echo "***"
          echo "***    rpm --erase --nodeps gtk gtk-devel"
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
 echo "*** The test program failed to compile or link. See the file config.log for the"
          echo "*** exact error that occured. This usually means GTK was incorrectly installed"
          echo "*** or that you have moved GTK since it was installed. In the latter case, you"
          echo "*** may want to edit the gtk-config script: $GTK_CONFIG"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
          CFLAGS="$ac_save_CFLAGS"
          LIBS="$ac_save_LIBS"
       fi
     fi
     GTK_CFLAGS=""
     GTK_LIBS=""
     enable_gtk=no
  fi

  rm -f conf.gtktest
  ;; esac
fi;
case "x$enable_gtk" in
xyes)
  cat >> confdefs.h <<EOF
#define IA_GTK 1
EOF

if true; then
  ENABLE_GTK_TRUE=
  ENABLE_GTK_FALSE='#'
else
  ENABLE_GTK_TRUE='#'
  ENABLE_GTK_FALSE=
fi
   LIBS="$LIBS $GTK_LIBS"
    for f in $GTK_CFLAGS; do
    case ".$f" in
	.-I?*|.-D?*)	CPPFLAGS="$CPPFLAGS $f" ;;
	*)		CFLAGS="$CPPFLAGS $f" ;;
    esac
done

    INTERFACE_SRCS="$INTERFACE_SRCS gtk_c.c gtk_i.c gtk_p.c"

  ;;
xdynamic)
  dynamic_targets="$dynamic_targets interface_g.\$(so)"
   if test "x$GCC" = xyes; then
		for i in $GTK_LIBS; do
	    case "x$i" in
		x-rdynamic) ;;
		*) g_so_libs="$g_so_libs $i" ;;
	    esac
	done
    else
	g_so_libs="$GTK_LIBS"
    fi
    for f in $GTK_CFLAGS; do
    case ".$f" in
	.-I?*|.-D?*)	CPPFLAGS="$CPPFLAGS $f" ;;
	*)		CFLAGS="$CPPFLAGS $f" ;;
    esac
done

  ;;
*)

  ;;
esac

if false; then
  ENABLE_SERVER_TRUE=
  ENABLE_SERVER_FALSE='#'
else
  ENABLE_SERVER_TRUE='#'
  ENABLE_SERVER_FALSE=
fi
# Check whether --enable-server or --disable-server was given.
if test "${enable_server+set}" = set; then
  enableval="$enable_server"
  case "x$enable_server" in xyes|xdynamic)  ;; esac
fi;
case "x$enable_server" in
xyes)
  cat >> confdefs.h <<EOF
#define IA_SERVER 1
EOF

if true; then
  ENABLE_SERVER_TRUE=
  ENABLE_SERVER_FALSE='#'
else
  ENABLE_SERVER_TRUE='#'
  ENABLE_SERVER_FALSE=
fi
   INTERFACE_SRCS="$INTERFACE_SRCS server_c.c"

for ac_header in sys/soundcard.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:10381: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 10387 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:10391: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:10397: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  eval "$as_ac_Header=yes"
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$as_ac_Header=no"
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:10416: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF

fi
done

  ;;
xdynamic)
  dynamic_targets="$dynamic_targets interface_r.\$(so)"

  ;;
*)

  ;;
esac

if false; then
  ENABLE_ALSASEQ_TRUE=
  ENABLE_ALSASEQ_FALSE='#'
else
  ENABLE_ALSASEQ_TRUE='#'
  ENABLE_ALSASEQ_FALSE=
fi
# Check whether --enable-alsaseq or --disable-alsaseq was given.
if test "${enable_alsaseq+set}" = set; then
  enableval="$enable_alsaseq"
  case "x$enable_alsaseq" in xyes|xdynamic)  ;; esac
fi;
case "x$enable_alsaseq" in
xyes)
  cat >> confdefs.h <<EOF
#define IA_ALSASEQ 1
EOF

if true; then
  ENABLE_ALSASEQ_TRUE=
  ENABLE_ALSASEQ_FALSE='#'
else
  ENABLE_ALSASEQ_TRUE='#'
  ENABLE_ALSASEQ_FALSE=
fi
   INTERFACE_SRCS="$INTERFACE_SRCS alsaseq_c.c"

for ac_header in sys/asoundlib.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:10466: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 10472 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:10476: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:10482: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  eval "$as_ac_Header=yes"
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$as_ac_Header=no"
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:10501: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
EOF

fi
done

  ;;
xdynamic)
  dynamic_targets="$dynamic_targets interface_A.\$(so)"

  ;;
*)

  ;;
esac

if false; then
  ENABLE_W32GUI_TRUE=
  ENABLE_W32GUI_FALSE='#'
else
  ENABLE_W32GUI_TRUE='#'
  ENABLE_W32GUI_FALSE=
fi
# Check whether --enable-w32gui or --disable-w32gui was given.
if test "${enable_w32gui+set}" = set; then
  enableval="$enable_w32gui"
  case "x$enable_w32gui" in xyes|xdynamic)  ;; esac
fi;
case "x$enable_w32gui" in
xyes)
  cat >> confdefs.h <<EOF
#define IA_W32GUI 1
EOF

if true; then
  ENABLE_W32GUI_TRUE=
  ENABLE_W32GUI_FALSE='#'
else
  ENABLE_W32GUI_TRUE='#'
  ENABLE_W32GUI_FALSE=
fi
   lib_w32gui_opt='-lgdi32 -lcomctl32 -lcomdlg32 -lole32'
    lib_user32_opt='-luser32'
    LDFLAGS="-mwindows $LDFLAGS"
    INTERFACE_SRCS="$INTERFACE_SRCS w32g_c.c w32g_ini.c w32g_i.c w32g_playlist.c w32g_utl.c w32g_pref.c w32g_subwin.c w32g_ut2.c"

  ;;
xdynamic)
  dynamic_targets="$dynamic_targets interface_w.\$(so)"

  ;;
*)

  ;;
esac

# Check whether --enable-ump or --disable-ump was given.
if test "${enable_ump+set}" = set; then
  enableval="$enable_ump"
  case "x$enable_ump" in xyes|xdynamic)  if test ! -d ump; then
	{ { echo "$as_me:10565: error: UMP Package is not exists.  Can't configure it." >&5
echo "$as_me: error: UMP Package is not exists.  Can't configure it." >&2;}
   { (exit 1); exit 1; }; }
    fi
    echo "$as_me:10569: checking for X11/xpm.h" >&5
echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6
if test "${ac_cv_header_X11_xpm_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 10575 "configure"
#include "confdefs.h"
#include <X11/xpm.h>
_ACEOF
if { (eval echo "$as_me:10579: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:10585: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  ac_cv_header_X11_xpm_h=yes
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_header_X11_xpm_h=no
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:10604: result: $ac_cv_header_X11_xpm_h" >&5
echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6
if test $ac_cv_header_X11_xpm_h = yes; then
  :
else
  { { echo "$as_me:10609: error: UMP Package needs xpm.h, but could not find it." >&5
echo "$as_me: error: UMP Package needs xpm.h, but could not find it." >&2;}
   { (exit 1); exit 1; }; }
fi

    echo "$as_me:10614: checking for XpmCreatePixmapFromData in -lXpm" >&5
echo $ECHO_N "checking for XpmCreatePixmapFromData in -lXpm... $ECHO_C" >&6
if test "${ac_cv_lib_Xpm_XpmCreatePixmapFromData+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lXpm  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 10622 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char XpmCreatePixmapFromData ();
int
main ()
{
XpmCreatePixmapFromData ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:10641: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:10644: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:10647: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:10650: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_Xpm_XpmCreatePixmapFromData=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_Xpm_XpmCreatePixmapFromData=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:10661: result: $ac_cv_lib_Xpm_XpmCreatePixmapFromData" >&5
echo "${ECHO_T}$ac_cv_lib_Xpm_XpmCreatePixmapFromData" >&6
if test $ac_cv_lib_Xpm_XpmCreatePixmapFromData = yes; then
  :
else
  { { echo "$as_me:10666: error: UMP Package needs libXpm.a, but could not find it." >&5
echo "$as_me: error: UMP Package needs libXpm.a, but could not find it." >&2;}
   { (exit 1); exit 1; }; }
fi

    if test "x$have_xext" = xyes; then
      lib_xext_opt=-lXext
    fi
    if test "x$have_xprelibs" = xyes; then
      lib_xprelibs_opt='-lSM -lICE'
    fi
    lib_xmu_opt=-lXmu
    lib_xt_opt=-lXt
   ;; esac
fi;
case "x$enable_ump" in
xyes)
  cat >> confdefs.h <<EOF
#define IA_PLUGIN 1
EOF

if true; then
  ENABLE_PLUGIN_TRUE=
  ENABLE_PLUGIN_FALSE='#'
else
  ENABLE_PLUGIN_TRUE='#'
  ENABLE_PLUGIN_FALSE=
fi

  ;;
xdynamic)
  dynamic_targets="$dynamic_targets interface_p.\$(so)"

  ;;
*)

  ;;
esac

# Check whether --enable-offix or --disable-offix was given.
if test "${enable_offix+set}" = set; then
  enableval="$enable_offix"
   if test "$enableval" = "yes"; then
      KEEPCPPFLAGS=$CPPFLAGS
      KEEPLIBS=$LIBS
      KEEPLDFLAGS=$LDFLAGS
      CPPFLAGS="$CPPFLAGS $offix_include_dir"
      LDFLAGS="$LDFLAGS $offix_lib_dir"
      LIBS="$LIBS $lib_xmu_opt $lib_xt_opt $lib_xprelibs_opt $lib_xext_opt -lX11"
      echo "$as_me:10715: checking for DndInitialize in -lDnd" >&5
echo $ECHO_N "checking for DndInitialize in -lDnd... $ECHO_C" >&6
if test "${ac_cv_lib_Dnd_DndInitialize+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lDnd  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 10723 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char DndInitialize ();
int
main ()
{
DndInitialize ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:10742: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:10745: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:10748: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:10751: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_Dnd_DndInitialize=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_Dnd_DndInitialize=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:10762: result: $ac_cv_lib_Dnd_DndInitialize" >&5
echo "${ECHO_T}$ac_cv_lib_Dnd_DndInitialize" >&6
if test $ac_cv_lib_Dnd_DndInitialize = yes; then

	LIBS=$KEEPLIBS
        lib_offix_opt="-lDnd"
        EXTRADEFS="$EXTRADEFS -DOFFIX"

else
   LDFLAGS=$KEEPLDFLAGS
        CPPFLAGS=$KEEPCPPFLAGS
	LIBS=$KEEPLIBS

fi

    fi

fi;

# Check whether --enable-network or --disable-network was given.
if test "${enable_network+set}" = set; then
  enableval="$enable_network"
   if test "$enableval" = "yes"; then
      EXTRADEFS="$EXTRADEFS -DSUPPORT_SOCKET"
    fi
fi;

if test "x$enable_network" = "xyes"; then
  ENABLE_NETWORK_TRUE=
  ENABLE_NETWORK_FALSE='#'
else
  ENABLE_NETWORK_TRUE='#'
  ENABLE_NETWORK_FALSE=
fi

# Check whether --enable-spectrogram or --disable-spectrogram was given.
if test "${enable_spectrogram+set}" = set; then
  enableval="$enable_spectrogram"
   if test "$enableval" = "yes"; then
      if test "x$with_x" != xyes; then
	{ { echo "$as_me:10802: error: spectrogram: --with-x option must be specified" >&5
echo "$as_me: error: spectrogram: --with-x option must be specified" >&2;}
   { (exit 1); exit 1; }; }
      fi
      EXTRADEFS="$EXTRADEFS -DSUPPORT_SOUNDSPEC"
    fi
fi;

if test "x$enable_spectrogram" = "xyes"; then
  ENABLE_SOUND_SPEC_TRUE=
  ENABLE_SOUND_SPEC_FALSE='#'
else
  ENABLE_SOUND_SPEC_TRUE='#'
  ENABLE_SOUND_SPEC_FALSE=
fi

# Check whether --enable-spline or --disable-spline was given.
if test "${enable_spline+set}" = set; then
  enableval="$enable_spline"
   case "x$enableval" in
      xlinear)
	EXTRADEFS="$EXTRADEFS -DLINEAR_INTERPOLATION"
	;;
      xcubic)
	EXTRADEFS="$EXTRADEFS -DCSPLINE_INTERPOLATION"
	;;
      xlagrange)
	EXTRADEFS="$EXTRADEFS -DLAGRANGE_INTERPOLATION"
	;;
      xno)
	EXTRADEFS="$EXTRADEFS -DNO_INTERPOLATION"
	;;
      *)
	{ { echo "$as_me:10835: error: Invalid method of --enable-spline" >&5
echo "$as_me: error: Invalid method of --enable-spline" >&2;}
   { (exit 1); exit 1; }; }
	;;
    esac
fi;

# Check whether --enable-wrd or --disable-wrd was given.
if test "${enable_wrd+set}" = set; then
  enableval="$enable_wrd"
   if test "$enableval" = "yes"; then
      if test "x$with_x" != xyes; then
	{ { echo "$as_me:10847: error: wrd: --with-x option must be specified" >&5
echo "$as_me: error: wrd: --with-x option must be specified" >&2;}
   { (exit 1); exit 1; }; }
      fi
      EXTRADEFS="$EXTRADEFS -DWRDT_X"
      enable_sherry_wrd=yes
      echo "$as_me:10853: checking for zlibVersion in -lz" >&5
echo $ECHO_N "checking for zlibVersion in -lz... $ECHO_C" >&6
if test "${ac_cv_lib_z_zlibVersion+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lz  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 10861 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char zlibVersion ();
int
main ()
{
zlibVersion ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:10880: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:10883: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:10886: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:10889: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_z_zlibVersion=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_z_zlibVersion=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:10900: result: $ac_cv_lib_z_zlibVersion" >&5
echo "${ECHO_T}$ac_cv_lib_z_zlibVersion" >&6
if test $ac_cv_lib_z_zlibVersion = yes; then
  :
else
  enable_sherry_wrd=no
fi

      echo "$as_me:10908: checking for png.h" >&5
echo $ECHO_N "checking for png.h... $ECHO_C" >&6
if test "${ac_cv_header_png_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 10914 "configure"
#include "confdefs.h"
#include <png.h>
_ACEOF
if { (eval echo "$as_me:10918: \"$ac_cpp conftest.$ac_ext\"") >&5
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
  ac_status=$?
  egrep -v '^ *\+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:10924: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  ac_cv_header_png_h=yes
else
  echo "$as_me: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_header_png_h=no
fi
rm -f conftest.err conftest.$ac_ext
fi
echo "$as_me:10943: result: $ac_cv_header_png_h" >&5
echo "${ECHO_T}$ac_cv_header_png_h" >&6
if test $ac_cv_header_png_h = yes; then
  :
else
  enable_sherry_wrd=no
fi

      echo "$as_me:10951: checking for png_init_io in -lpng" >&5
echo $ECHO_N "checking for png_init_io in -lpng... $ECHO_C" >&6
if test "${ac_cv_lib_png_png_init_io+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lpng -lz $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 10959 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char png_init_io ();
int
main ()
{
png_init_io ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:10978: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:10981: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:10984: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:10987: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_png_png_init_io=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_png_png_init_io=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:10998: result: $ac_cv_lib_png_png_init_io" >&5
echo "${ECHO_T}$ac_cv_lib_png_png_init_io" >&6
if test $ac_cv_lib_png_png_init_io = yes; then
  :
else
  enable_sherry_wrd=no
fi

      if test "$enable_sherry_wrd" = yes; then
	CPPFLAGS="$CPPFLAGS -DENABLE_SHERRY"
	lib_zip_opt=-lz
	lib_png_opt=-lpng
      else
	 { echo "$as_me:11011: WARNING: Sherry WRD is disabled: png.h, libpng.a, libz.a are required" >&5
echo "$as_me: WARNING: Sherry WRD is disabled: png.h, libpng.a, libz.a are required" >&2;}
      fi
      if test "x$have_xext" = xyes; then
	lib_xext_opt=-lXext
      fi
    fi
fi;

if test "x$enable_wrd" = "xyes"; then
  ENABLE_WRD_TRUE=
  ENABLE_WRD_FALSE='#'
else
  ENABLE_WRD_TRUE='#'
  ENABLE_WRD_FALSE=
fi

if test "x$CYGNUS" = xyes; then
  CYGNUS_TRUE=
  CYGNUS_FALSE='#'
else
  CYGNUS_TRUE='#'
  CYGNUS_FALSE=
fi

if test "x$W32READDIR" = "xyes"; then
  W32READDIR_TRUE=
  W32READDIR_FALSE='#'
else
  W32READDIR_TRUE='#'
  W32READDIR_FALSE=
fi

rm -f wordtmp >/dev/null 2>&1
val=''
for f in $LDFLAGS; do
  if $contains "^$f"'$' wordtmp >/dev/null 2>&1; then
  :
else
  echo $f >>wordtmp; val="$val $f"
fi

done
LDFLAGS="$val"
rm -f wordtmp >/dev/null 2>&1

rm -f wordtmp >/dev/null 2>&1
val=''
for f in $SHLDFLAGS; do
  if $contains "^$f"'$' wordtmp >/dev/null 2>&1; then
  :
else
  echo $f >>wordtmp; val="$val $f"
fi

done
SHLDFLAGS="$val"
rm -f wordtmp >/dev/null 2>&1

rm -f wordtmp >/dev/null 2>&1
val=''
for f in $EXTRACFLAGS $CFLAGS; do
  if $contains "^$f"'$' wordtmp >/dev/null 2>&1; then
  :
else
  echo $f >>wordtmp; val="$val $f"
fi

done
CFLAGS="$val"
rm -f wordtmp >/dev/null 2>&1

rm -f wordtmp >/dev/null 2>&1
val=''
for f in $CPPFLAGS $EXTRADEFS; do
  if $contains "^$f"'$' wordtmp >/dev/null 2>&1; then
  :
else
  echo $f >>wordtmp; val="$val $f"
fi

done
CPPFLAGS="$val"
rm -f wordtmp >/dev/null 2>&1

CPPFLAGS="$CPPFLAGS \$(DEF_PKGDATADIR) \$(DEF_PKGLIBDIR) \$(DEF_DEFAULT_PATH)"

if test "x$oss_device" != x; then
  CPPFLAGS="$CPPFLAGS -DOSS_DEVICE=\\\"$oss_device\\\""
fi

if test "x$TIMIDITY_OUTPUT_ID" != x; then
  CPPFLAGS="$CPPFLAGS -DTIMIDITY_OUTPUT_ID=\\\"$TIMIDITY_OUTPUT_ID\\\""
fi

if test "x$with_x" = xyes; then
    LIBS=`echo $LIBS | sed "s/-lX11/$lib_offix_opt $lib_xm_opt $lib_xaw_opt $lib_xmu_opt $lib_xt_opt $lib_xprelibs_opt $lib_xext_opt -lX11/"`
fi
LIBS="$LIBS $lib_dl_opt $lib_png_opt $lib_zip_opt $lib_user32_opt $lib_w32gui_opt $EXTRALIBS"
SHLD="$SHLD $SHLDFLAGS"

ac_config_files="$ac_config_files Makefile common.makefile interface/Makefile interface/motif_bitmaps/Makefile interface/bitmaps/Makefile interface/pixmaps/Makefile libarc/Makefile libunimod/Makefile timidity/Makefile utils/Makefile doc/Makefile doc/C/Makefile doc/ja_JP.ujis/Makefile script/Makefile"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
# scripts and configure runs, see configure's option --config-cache.
# It is not useful on other systems.  If it contains results you don't
# want to keep, you may remove or edit it.
#
# config.status only pays attention to the cache file if you give it
# the --recheck option to rerun configure.
#
# `ac_cv_env_foo' variables (set or unset) will be overriden when
# loading this file, other *unset* `ac_cv_foo' will be assigned the
# following values.

_ACEOF

# The following way of writing the cache mishandles newlines in values,
# but we know of no workaround that is simple, portable, and efficient.
# So, don't put newlines in cache variables' values.
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
{
  (set) 2>&1 |
    case `(ac_space=' '; set | grep ac_space) 2>&1` in
    *ac_space=\ *)
      # `set' does not quote correctly, so add quotes (double-quote
      # substitution turns \\\\ into \\, and sed turns \\ into \).
      sed -n \
        "s/'/'\\\\''/g;
    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
      ;;
    *)
      # `set' quotes correctly as required by POSIX, so do not add quotes.
      sed -n \
        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
      ;;
    esac;
} |
  sed '
     t clear
     : clear
     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
     t end
     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
     : end' >>confcache
if cmp -s $cache_file confcache; then :; else
  if test -w $cache_file; then
    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
    cat confcache >$cache_file
  else
    echo "not updating unwritable cache $cache_file"
  fi
fi
rm -f confcache

test "x$prefix" = xNONE && prefix=$ac_default_prefix
# Let make expand exec_prefix.
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'

# VPATH may cause trouble with some makes, so we remove $(srcdir),
# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
# trailing colons and then remove the whole line if VPATH becomes empty
# (actually we leave an empty line to preserve line numbers).
if test "x$srcdir" = x.; then
  ac_vpsub='/^[ 	]*VPATH[ 	]*=/{
s/:*\$(srcdir):*/:/;
s/:*\${srcdir}:*/:/;
s/:*@srcdir@:*/:/;
s/^\([^=]*=[ 	]*\):*/\1/;
s/:*$//;
s/^[^=]*=[ 	]*$//;
}'
fi

DEFS=-DHAVE_CONFIG_H

: ${CONFIG_STATUS=./config.status}
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files $CONFIG_STATUS"
{ echo "$as_me:11192: creating $CONFIG_STATUS" >&5
echo "$as_me: creating $CONFIG_STATUS" >&6;}
cat >$CONFIG_STATUS <<_ACEOF
#! $SHELL
# Generated automatically by configure.
# Run this file to recreate the current configuration.
# Compiler output produced by configure, useful for debugging
# configure, is in config.log if it exists.

debug=false
SHELL=\${CONFIG_SHELL-$SHELL}
ac_cs_invocation="\$0 \$@"

_ACEOF

cat >>$CONFIG_STATUS <<\_ACEOF
# Be Bourne compatible
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
  emulate sh
  NULLCMD=:
elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
  set -o posix
fi

# Name of the executable.
as_me=`echo "$0" |sed 's,.*[\\/],,'`

if expr a : '\(a\)' >/dev/null 2>&1; then
  as_expr=expr
else
  as_expr=false
fi

rm -f conf$$ conf$$.exe conf$$.file
echo >conf$$.file
if ln -s conf$$.file conf$$ 2>/dev/null; then
  # We could just check for DJGPP; but this test a) works b) is more generic
  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
  if test -f conf$$.exe; then
    # Don't use ln at all; we don't have any links
    as_ln_s='cp -p'
  else
    as_ln_s='ln -s'
  fi
elif ln conf$$.file conf$$ 2>/dev/null; then
  as_ln_s=ln
else
  as_ln_s='cp -p'
fi
rm -f conf$$ conf$$.exe conf$$.file

as_executable_p="test -f"

# Support unset when possible.
if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
  as_unset=unset
else
  as_unset=false
fi

# NLS nuisances.
$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }

# IFS
# We need space, tab and new line, in precisely that order.
as_nl='
'
IFS=" 	$as_nl"

# CDPATH.
$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }

exec 6>&1

_ACEOF

# Files that config.status was made for.
if test -n "$ac_config_files"; then
  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
fi

if test -n "$ac_config_headers"; then
  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
fi

if test -n "$ac_config_links"; then
  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
fi

if test -n "$ac_config_commands"; then
  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
fi

cat >>$CONFIG_STATUS <<\EOF

ac_cs_usage="\
\`$as_me' instantiates files from templates according to the
current configuration.

Usage: $0 [OPTIONS] [FILE]...

  -h, --help       print this help, then exit
  -V, --version    print version number, then exit
  -d, --debug      don't remove temporary files
      --recheck    update $as_me by reconfiguring in the same conditions
  --file=FILE[:TEMPLATE]
                   instantiate the configuration file FILE
  --header=FILE[:TEMPLATE]
                   instantiate the configuration header FILE

Configuration files:
$config_files

Configuration headers:
$config_headers

Configuration commands:
$config_commands

Report bugs to <bug-autoconf@gnu.org>."
EOF

cat >>$CONFIG_STATUS <<EOF
ac_cs_version="\\
config.status
configured by $0, generated by GNU Autoconf 2.52,
  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"

Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
srcdir=$srcdir
INSTALL="$INSTALL"
EOF

cat >>$CONFIG_STATUS <<\EOF
# If no file are specified by the user, then we need to provide default
# value.  By we need to know if files were specified by the user.
ac_need_defaults=:
while test $# != 0
do
  case $1 in
  --*=*)
    ac_option=`expr "x$1" : 'x\([^=]*\)='`
    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
    shift
    set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
    shift
    ;;
  -*);;
  *) # This is not an option, so the user has probably given explicit
     # arguments.
     ac_need_defaults=false;;
  esac

  case $1 in
  # Handling of the options.
EOF
cat >>$CONFIG_STATUS <<EOF
  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
    echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
    exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
EOF
cat >>$CONFIG_STATUS <<\EOF
  --version | --vers* | -V )
    echo "$ac_cs_version"; exit 0 ;;
  --he | --h)
    # Conflict between --help and --header
    { { echo "$as_me:11368: error: ambiguous option: $1
Try \`$0 --help' for more information." >&5
echo "$as_me: error: ambiguous option: $1
Try \`$0 --help' for more information." >&2;}
   { (exit 1); exit 1; }; };;
  --help | --hel | -h )
    echo "$ac_cs_usage"; exit 0 ;;
  --debug | --d* | -d )
    debug=: ;;
  --file | --fil | --fi | --f )
    shift
    CONFIG_FILES="$CONFIG_FILES $1"
    ac_need_defaults=false;;
  --header | --heade | --head | --hea )
    shift
    CONFIG_HEADERS="$CONFIG_HEADERS $1"
    ac_need_defaults=false;;

  # This is an error.
  -*) { { echo "$as_me:11387: error: unrecognized option: $1
Try \`$0 --help' for more information." >&5
echo "$as_me: error: unrecognized option: $1
Try \`$0 --help' for more information." >&2;}
   { (exit 1); exit 1; }; } ;;

  *) ac_config_targets="$ac_config_targets $1" ;;

  esac
  shift
done

exec 5>>config.log
cat >&5 << _ACEOF

## ----------------------- ##
## Running config.status.  ##
## ----------------------- ##

This file was extended by $as_me 2.52, executed with
  CONFIG_FILES    = $CONFIG_FILES
  CONFIG_HEADERS  = $CONFIG_HEADERS
  CONFIG_LINKS    = $CONFIG_LINKS
  CONFIG_COMMANDS = $CONFIG_COMMANDS
  > $ac_cs_invocation
on `(hostname || uname -n) 2>/dev/null | sed 1q`

_ACEOF
EOF

cat >>$CONFIG_STATUS <<EOF
#
# INIT-COMMANDS section.
#

AMDEP_TRUE="$AMDEP_TRUE"
ac_aux_dir="$ac_aux_dir"

EOF

cat >>$CONFIG_STATUS <<\EOF
for ac_config_target in $ac_config_targets
do
  case "$ac_config_target" in
  # Handling of arguments.
  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
  "common.makefile" ) CONFIG_FILES="$CONFIG_FILES common.makefile" ;;
  "interface/Makefile" ) CONFIG_FILES="$CONFIG_FILES interface/Makefile" ;;
  "interface/motif_bitmaps/Makefile" ) CONFIG_FILES="$CONFIG_FILES interface/motif_bitmaps/Makefile" ;;
  "interface/bitmaps/Makefile" ) CONFIG_FILES="$CONFIG_FILES interface/bitmaps/Makefile" ;;
  "interface/pixmaps/Makefile" ) CONFIG_FILES="$CONFIG_FILES interface/pixmaps/Makefile" ;;
  "libarc/Makefile" ) CONFIG_FILES="$CONFIG_FILES libarc/Makefile" ;;
  "libunimod/Makefile" ) CONFIG_FILES="$CONFIG_FILES libunimod/Makefile" ;;
  "timidity/Makefile" ) CONFIG_FILES="$CONFIG_FILES timidity/Makefile" ;;
  "utils/Makefile" ) CONFIG_FILES="$CONFIG_FILES utils/Makefile" ;;
  "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
  "doc/C/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/C/Makefile" ;;
  "doc/ja_JP.ujis/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/ja_JP.ujis/Makefile" ;;
  "script/Makefile" ) CONFIG_FILES="$CONFIG_FILES script/Makefile" ;;
  "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
  "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
  "interface.h" ) CONFIG_HEADERS="$CONFIG_HEADERS interface.h" ;;
  *) { { echo "$as_me:11449: error: invalid argument: $ac_config_target" >&5
echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
   { (exit 1); exit 1; }; };;
  esac
done

# If the user did not use the arguments to specify the items to instantiate,
# then the envvar interface is used.  Set only those that are not.
# We use the long form for the default assignment because of an extremely
# bizarre bug on SunOS 4.1.3.
if $ac_need_defaults; then
  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
fi

# Create a temporary directory, and hook for its removal unless debugging.
$debug ||
{
  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
  trap '{ (exit 1); exit 1; }' 1 2 13 15
}

# Create a (secure) tmp directory for tmp files.
: ${TMPDIR=/tmp}
{
  tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
  test -n "$tmp" && test -d "$tmp"
}  ||
{
  tmp=$TMPDIR/cs$$-$RANDOM
  (umask 077 && mkdir $tmp)
} ||
{
   echo "$me: cannot create a temporary directory in $TMPDIR" >&2
   { (exit 1); exit 1; }
}

EOF

cat >>$CONFIG_STATUS <<EOF

#
# CONFIG_FILES section.
#

# No need to generate the scripts if there are no CONFIG_FILES.
# This happens for instance when ./config.status config.h
if test -n "\$CONFIG_FILES"; then
  # Protect against being on the right side of a sed subst in config.status.
  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
s,@SHELL@,$SHELL,;t t
s,@exec_prefix@,$exec_prefix,;t t
s,@prefix@,$prefix,;t t
s,@program_transform_name@,$program_transform_name,;t t
s,@bindir@,$bindir,;t t
s,@sbindir@,$sbindir,;t t
s,@libexecdir@,$libexecdir,;t t
s,@datadir@,$datadir,;t t
s,@sysconfdir@,$sysconfdir,;t t
s,@sharedstatedir@,$sharedstatedir,;t t
s,@localstatedir@,$localstatedir,;t t
s,@libdir@,$libdir,;t t
s,@includedir@,$includedir,;t t
s,@oldincludedir@,$oldincludedir,;t t
s,@infodir@,$infodir,;t t
s,@mandir@,$mandir,;t t
s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
s,@build_alias@,$build_alias,;t t
s,@host_alias@,$host_alias,;t t
s,@target_alias@,$target_alias,;t t
s,@ECHO_C@,$ECHO_C,;t t
s,@ECHO_N@,$ECHO_N,;t t
s,@ECHO_T@,$ECHO_T,;t t
s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
s,@DEFS@,$DEFS,;t t
s,@LIBS@,$LIBS,;t t
s,@build@,$build,;t t
s,@build_cpu@,$build_cpu,;t t
s,@build_vendor@,$build_vendor,;t t
s,@build_os@,$build_os,;t t
s,@host@,$host,;t t
s,@host_cpu@,$host_cpu,;t t
s,@host_vendor@,$host_vendor,;t t
s,@host_os@,$host_os,;t t
s,@target@,$target,;t t
s,@target_cpu@,$target_cpu,;t t
s,@target_vendor@,$target_vendor,;t t
s,@target_os@,$target_os,;t t
s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
s,@INSTALL_DATA@,$INSTALL_DATA,;t t
s,@PACKAGE@,$PACKAGE,;t t
s,@VERSION@,$VERSION,;t t
s,@EXEEXT@,$EXEEXT,;t t
s,@OBJEXT@,$OBJEXT,;t t
s,@ACLOCAL@,$ACLOCAL,;t t
s,@AUTOCONF@,$AUTOCONF,;t t
s,@AUTOMAKE@,$AUTOMAKE,;t t
s,@AUTOHEADER@,$AUTOHEADER,;t t
s,@MAKEINFO@,$MAKEINFO,;t t
s,@AMTAR@,$AMTAR,;t t
s,@install_sh@,$install_sh,;t t
s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
s,@AWK@,$AWK,;t t
s,@SET_MAKE@,$SET_MAKE,;t t
s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t
s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t
s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t
s,@DEPDIR@,$DEPDIR,;t t
s,@EMACS@,$EMACS,;t t
s,@lispdir@,$lispdir,;t t
s,@CC@,$CC,;t t
s,@CFLAGS@,$CFLAGS,;t t
s,@LDFLAGS@,$LDFLAGS,;t t
s,@CPPFLAGS@,$CPPFLAGS,;t t
s,@ac_ct_CC@,$ac_ct_CC,;t t
s,@am__include@,$am__include,;t t
s,@am__quote@,$am__quote,;t t
s,@CCDEPMODE@,$CCDEPMODE,;t t
s,@RANLIB@,$RANLIB,;t t
s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
s,@LN_S@,$LN_S,;t t
s,@CPP@,$CPP,;t t
s,@X_CFLAGS@,$X_CFLAGS,;t t
s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
s,@X_LIBS@,$X_LIBS,;t t
s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
s,@LIBOBJS@,$LIBOBJS,;t t
s,@ALSA_CFLAGS@,$ALSA_CFLAGS,;t t
s,@ALSA_LIBS@,$ALSA_LIBS,;t t
s,@ESD_CONFIG@,$ESD_CONFIG,;t t
s,@ESD_CFLAGS@,$ESD_CFLAGS,;t t
s,@ESD_LIBS@,$ESD_LIBS,;t t
s,@VORBIS_CFLAGS@,$VORBIS_CFLAGS,;t t
s,@VORBIS_LIBS@,$VORBIS_LIBS,;t t
s,@VORBISFILE_LIBS@,$VORBISFILE_LIBS,;t t
s,@VORBISENC_LIBS@,$VORBISENC_LIBS,;t t
s,@OGG_CFLAGS@,$OGG_CFLAGS,;t t
s,@OGG_LIBS@,$OGG_LIBS,;t t
s,@NEEDDLOPEN_TRUE@,$NEEDDLOPEN_TRUE,;t t
s,@NEEDDLOPEN_FALSE@,$NEEDDLOPEN_FALSE,;t t
s,@ENABLE_NCURSES_TRUE@,$ENABLE_NCURSES_TRUE,;t t
s,@ENABLE_NCURSES_FALSE@,$ENABLE_NCURSES_FALSE,;t t
s,@n_so_libs@,$n_so_libs,;t t
s,@ENABLE_SLANG_TRUE@,$ENABLE_SLANG_TRUE,;t t
s,@ENABLE_SLANG_FALSE@,$ENABLE_SLANG_FALSE,;t t
s,@s_so_libs@,$s_so_libs,;t t
s,@ENABLE_MOTIF_TRUE@,$ENABLE_MOTIF_TRUE,;t t
s,@ENABLE_MOTIF_FALSE@,$ENABLE_MOTIF_FALSE,;t t
s,@m_so_libs@,$m_so_libs,;t t
s,@ENABLE_TCLTK_TRUE@,$ENABLE_TCLTK_TRUE,;t t
s,@ENABLE_TCLTK_FALSE@,$ENABLE_TCLTK_FALSE,;t t
s,@k_so_libs@,$k_so_libs,;t t
s,@ENABLE_DYNAMIC_TCLTK_TRUE@,$ENABLE_DYNAMIC_TCLTK_TRUE,;t t
s,@ENABLE_DYNAMIC_TCLTK_FALSE@,$ENABLE_DYNAMIC_TCLTK_FALSE,;t t
s,@ENABLE_EMACS_TRUE@,$ENABLE_EMACS_TRUE,;t t
s,@ENABLE_EMACS_FALSE@,$ENABLE_EMACS_FALSE,;t t
s,@e_so_libs@,$e_so_libs,;t t
s,@ENABLE_VT100_TRUE@,$ENABLE_VT100_TRUE,;t t
s,@ENABLE_VT100_FALSE@,$ENABLE_VT100_FALSE,;t t
s,@T_so_libs@,$T_so_libs,;t t
s,@ENABLE_XAW_TRUE@,$ENABLE_XAW_TRUE,;t t
s,@ENABLE_XAW_FALSE@,$ENABLE_XAW_FALSE,;t t
s,@a_so_libs@,$a_so_libs,;t t
s,@ENABLE_DYNAMIC_XAW_TRUE@,$ENABLE_DYNAMIC_XAW_TRUE,;t t
s,@ENABLE_DYNAMIC_XAW_FALSE@,$ENABLE_DYNAMIC_XAW_FALSE,;t t
s,@ENABLE_XSKIN_TRUE@,$ENABLE_XSKIN_TRUE,;t t
s,@ENABLE_XSKIN_FALSE@,$ENABLE_XSKIN_FALSE,;t t
s,@i_so_libs@,$i_so_libs,;t t
s,@ENABLE_GTK_TRUE@,$ENABLE_GTK_TRUE,;t t
s,@ENABLE_GTK_FALSE@,$ENABLE_GTK_FALSE,;t t
s,@GTK_CONFIG@,$GTK_CONFIG,;t t
s,@GTK_CFLAGS@,$GTK_CFLAGS,;t t
s,@GTK_LIBS@,$GTK_LIBS,;t t
s,@g_so_libs@,$g_so_libs,;t t
s,@ENABLE_SERVER_TRUE@,$ENABLE_SERVER_TRUE,;t t
s,@ENABLE_SERVER_FALSE@,$ENABLE_SERVER_FALSE,;t t
s,@r_so_libs@,$r_so_libs,;t t
s,@ENABLE_ALSASEQ_TRUE@,$ENABLE_ALSASEQ_TRUE,;t t
s,@ENABLE_ALSASEQ_FALSE@,$ENABLE_ALSASEQ_FALSE,;t t
s,@A_so_libs@,$A_so_libs,;t t
s,@ENABLE_W32GUI_TRUE@,$ENABLE_W32GUI_TRUE,;t t
s,@ENABLE_W32GUI_FALSE@,$ENABLE_W32GUI_FALSE,;t t
s,@w_so_libs@,$w_so_libs,;t t
s,@ENABLE_PLUGIN_TRUE@,$ENABLE_PLUGIN_TRUE,;t t
s,@ENABLE_PLUGIN_FALSE@,$ENABLE_PLUGIN_FALSE,;t t
s,@p_so_libs@,$p_so_libs,;t t
s,@ENABLE_NETWORK_TRUE@,$ENABLE_NETWORK_TRUE,;t t
s,@ENABLE_NETWORK_FALSE@,$ENABLE_NETWORK_FALSE,;t t
s,@ENABLE_SOUND_SPEC_TRUE@,$ENABLE_SOUND_SPEC_TRUE,;t t
s,@ENABLE_SOUND_SPEC_FALSE@,$ENABLE_SOUND_SPEC_FALSE,;t t
s,@ENABLE_WRD_TRUE@,$ENABLE_WRD_TRUE,;t t
s,@ENABLE_WRD_FALSE@,$ENABLE_WRD_FALSE,;t t
s,@CYGNUS_TRUE@,$CYGNUS_TRUE,;t t
s,@CYGNUS_FALSE@,$CYGNUS_FALSE,;t t
s,@W32READDIR_TRUE@,$W32READDIR_TRUE,;t t
s,@W32READDIR_FALSE@,$W32READDIR_FALSE,;t t
s,@timidity_LDFLAGS@,$timidity_LDFLAGS,;t t
s,@SYSEXTRAS@,$SYSEXTRAS,;t t
s,@EXTRALIBS@,$EXTRALIBS,;t t
s,@NETSRCS@,$NETSRCS,;t t
s,@ELFILES@,$ELFILES,;t t
s,@SHLD@,$SHLD,;t t
s,@SHCFLAGS@,$SHCFLAGS,;t t
s,@dynamic_targets@,$dynamic_targets,;t t
s,@so@,$so,;t t
s,@WISH@,$WISH,;t t
s,@tcltk_dep@,$tcltk_dep,;t t
s,@INTERFACE_SRCS@,$INTERFACE_SRCS,;t t
CEOF

EOF

  cat >>$CONFIG_STATUS <<\EOF
  # Split the substitutions into bite-sized pieces for seds with
  # small command number limits, like on Digital OSF/1 and HP-UX.
  ac_max_sed_lines=48
  ac_sed_frag=1 # Number of current file.
  ac_beg=1 # First line for current file.
  ac_end=$ac_max_sed_lines # Line after last line for current file.
  ac_more_lines=:
  ac_sed_cmds=
  while $ac_more_lines; do
    if test $ac_beg -gt 1; then
      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
    else
      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
    fi
    if test ! -s $tmp/subs.frag; then
      ac_more_lines=false
    else
      # The purpose of the label and of the branching condition is to
      # speed up the sed processing (if there are no `@' at all, there
      # is no need to browse any of the substitutions).
      # These are the two extra sed commands mentioned above.
      (echo ':t
  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
      if test -z "$ac_sed_cmds"; then
  	ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
      else
  	ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
      fi
      ac_sed_frag=`expr $ac_sed_frag + 1`
      ac_beg=$ac_end
      ac_end=`expr $ac_end + $ac_max_sed_lines`
    fi
  done
  if test -z "$ac_sed_cmds"; then
    ac_sed_cmds=cat
  fi
fi # test -n "$CONFIG_FILES"

EOF
cat >>$CONFIG_STATUS <<\EOF
for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  case $ac_file in
  - | *:- | *:-:* ) # input from stdin
        cat >$tmp/stdin
        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
  * )   ac_file_in=$ac_file.in ;;
  esac

  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
  ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
         X"$ac_file" : 'X\(//\)[^/]' \| \
         X"$ac_file" : 'X\(//\)$' \| \
         X"$ac_file" : 'X\(/\)' \| \
         .     : '\(.\)' 2>/dev/null ||
echo X"$ac_file" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
  	  /^X\(\/\/\)$/{ s//\1/; q; }
  	  /^X\(\/\).*/{ s//\1/; q; }
  	  s/.*/./; q'`
  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
    { case "$ac_dir" in
  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
  *)                      as_incr_dir=.;;
esac
as_dummy="$ac_dir"
for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
  case $as_mkdir_dir in
    # Skip DOS drivespec
    ?:) as_incr_dir=$as_mkdir_dir ;;
    *)
      as_incr_dir=$as_incr_dir/$as_mkdir_dir
      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
    ;;
  esac
done; }

    ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
    # A "../" for each directory in $ac_dir_suffix.
    ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
  else
    ac_dir_suffix= ac_dots=
  fi

  case $srcdir in
  .)  ac_srcdir=.
      if test -z "$ac_dots"; then
         ac_top_srcdir=.
      else
         ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
      fi ;;
  [\\/]* | ?:[\\/]* )
      ac_srcdir=$srcdir$ac_dir_suffix;
      ac_top_srcdir=$srcdir ;;
  *) # Relative path.
    ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
    ac_top_srcdir=$ac_dots$srcdir ;;
  esac

  case $INSTALL in
  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
  *) ac_INSTALL=$ac_dots$INSTALL ;;
  esac

  if test x"$ac_file" != x-; then
    { echo "$as_me:11778: creating $ac_file" >&5
echo "$as_me: creating $ac_file" >&6;}
    rm -f "$ac_file"
  fi
  # Let's still pretend it is `configure' which instantiates (i.e., don't
  # use $as_me), people would be surprised to read:
  #    /* config.h.  Generated automatically by config.status.  */
  configure_input="Generated automatically from `echo $ac_file_in |
                                                 sed 's,.*/,,'` by configure."

  # First look for the input files in the build tree, otherwise in the
  # src tree.
  ac_file_inputs=`IFS=:
    for f in $ac_file_in; do
      case $f in
      -) echo $tmp/stdin ;;
      [\\/$]*)
         # Absolute (can't be DOS-style, as IFS=:)
         test -f "$f" || { { echo "$as_me:11796: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
   { (exit 1); exit 1; }; }
         echo $f;;
      *) # Relative
         if test -f "$f"; then
           # Build tree
           echo $f
         elif test -f "$srcdir/$f"; then
           # Source tree
           echo $srcdir/$f
         else
           # /dev/null tree
           { { echo "$as_me:11809: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
   { (exit 1); exit 1; }; }
         fi;;
      esac
    done` || { (exit 1); exit 1; }
EOF
cat >>$CONFIG_STATUS <<EOF
  sed "$ac_vpsub
$extrasub
EOF
cat >>$CONFIG_STATUS <<\EOF
:t
/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
s,@configure_input@,$configure_input,;t t
s,@srcdir@,$ac_srcdir,;t t
s,@top_srcdir@,$ac_top_srcdir,;t t
s,@INSTALL@,$ac_INSTALL,;t t
" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
  rm -f $tmp/stdin
  if test x"$ac_file" != x-; then
    mv $tmp/out $ac_file
  else
    cat $tmp/out
    rm -f $tmp/out
  fi

done
EOF
cat >>$CONFIG_STATUS <<\EOF

#
# CONFIG_HEADER section.
#

# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
# NAME is the cpp macro being defined and VALUE is the value it is being given.
#
# ac_d sets the value in "#define NAME VALUE" lines.
ac_dA='s,^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
ac_dB='[ 	].*$,\1#\2'
ac_dC=' '
ac_dD=',;t'
# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
ac_uA='s,^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
ac_uB='$,\1#\2define\3'
ac_uC=' '
ac_uD=',;t'

for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  case $ac_file in
  - | *:- | *:-:* ) # input from stdin
        cat >$tmp/stdin
        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
  * )   ac_file_in=$ac_file.in ;;
  esac

  test x"$ac_file" != x- && { echo "$as_me:11870: creating $ac_file" >&5
echo "$as_me: creating $ac_file" >&6;}

  # First look for the input files in the build tree, otherwise in the
  # src tree.
  ac_file_inputs=`IFS=:
    for f in $ac_file_in; do
      case $f in
      -) echo $tmp/stdin ;;
      [\\/$]*)
         # Absolute (can't be DOS-style, as IFS=:)
         test -f "$f" || { { echo "$as_me:11881: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
   { (exit 1); exit 1; }; }
         echo $f;;
      *) # Relative
         if test -f "$f"; then
           # Build tree
           echo $f
         elif test -f "$srcdir/$f"; then
           # Source tree
           echo $srcdir/$f
         else
           # /dev/null tree
           { { echo "$as_me:11894: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
   { (exit 1); exit 1; }; }
         fi;;
      esac
    done` || { (exit 1); exit 1; }
  # Remove the trailing spaces.
  sed 's/[ 	]*$//' $ac_file_inputs >$tmp/in

EOF

# Transform confdefs.h into two sed scripts, `conftest.defines' and
# `conftest.undefs', that substitutes the proper values into
# config.h.in to produce config.h.  The first handles `#define'
# templates, and the second `#undef' templates.
# And first: Protect against being on the right side of a sed subst in
# config.status.  Protect against being in an unquoted here document
# in config.status.
rm -f conftest.defines conftest.undefs
# Using a here document instead of a string reduces the quoting nightmare.
# Putting comments in sed scripts is not portable.
#
# `end' is used to avoid that the second main sed command (meant for
# 0-ary CPP macros) applies to n-ary macro definitions.
# See the Autoconf documentation for `clear'.
cat >confdef2sed.sed <<\EOF
s/[\\&,]/\\&/g
s,[\\$`],\\&,g
t clear
: clear
s,^[ 	]*#[ 	]*define[ 	][ 	]*\(\([^ 	(][^ 	(]*\)([^)]*)\)[ 	]*\(.*\)$,${ac_dA}\2${ac_dB}\1${ac_dC}\3${ac_dD},gp
t end
s,^[ 	]*#[ 	]*define[ 	][ 	]*\([^ 	][^ 	]*\)[ 	]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
: end
EOF
# If some macros were called several times there might be several times
# the same #defines, which is useless.  Nevertheless, we may not want to
# sort them, since we want the *last* AC-DEFINE to be honored.
uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
rm -f confdef2sed.sed

# This sed command replaces #undef with comments.  This is necessary, for
# example, in the case of _POSIX_SOURCE, which is predefined and required
# on some systems where configure will not decide to define it.
cat >>conftest.undefs <<\EOF
s,^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
EOF

# Break up conftest.defines because some shells have a limit on the size
# of here documents, and old seds have small limits too (100 cmds).
echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
echo '  if egrep "^[ 	]*#[ 	]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
echo '  :' >>$CONFIG_STATUS
rm -f conftest.tail
while grep . conftest.defines >/dev/null
do
  # Write a limited-size here document to $tmp/defines.sed.
  echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
  # Speed up: don't consider the non `#define' lines.
  echo '/^[ 	]*#[ 	]*define/!b' >>$CONFIG_STATUS
  # Work around the forget-to-reset-the-flag bug.
  echo 't clr' >>$CONFIG_STATUS
  echo ': clr' >>$CONFIG_STATUS
  sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
  echo 'CEOF
  sed -f $tmp/defines.sed $tmp/in >$tmp/out
  rm -f $tmp/in
  mv $tmp/out $tmp/in
' >>$CONFIG_STATUS
  sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
  rm -f conftest.defines
  mv conftest.tail conftest.defines
done
rm -f conftest.defines
echo '  fi # egrep' >>$CONFIG_STATUS
echo >>$CONFIG_STATUS

# Break up conftest.undefs because some shells have a limit on the size
# of here documents, and old seds have small limits too (100 cmds).
echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
rm -f conftest.tail
while grep . conftest.undefs >/dev/null
do
  # Write a limited-size here document to $tmp/undefs.sed.
  echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
  # Speed up: don't consider the non `#undef'
  echo '/^[ 	]*#[ 	]*undef/!b' >>$CONFIG_STATUS
  # Work around the forget-to-reset-the-flag bug.
  echo 't clr' >>$CONFIG_STATUS
  echo ': clr' >>$CONFIG_STATUS
  sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
  echo 'CEOF
  sed -f $tmp/undefs.sed $tmp/in >$tmp/out
  rm -f $tmp/in
  mv $tmp/out $tmp/in
' >>$CONFIG_STATUS
  sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
  rm -f conftest.undefs
  mv conftest.tail conftest.undefs
done
rm -f conftest.undefs

cat >>$CONFIG_STATUS <<\EOF
  # Let's still pretend it is `configure' which instantiates (i.e., don't
  # use $as_me), people would be surprised to read:
  #    /* config.h.  Generated automatically by config.status.  */
  if test x"$ac_file" = x-; then
    echo "/* Generated automatically by configure.  */" >$tmp/config.h
  else
    echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
  fi
  cat $tmp/in >>$tmp/config.h
  rm -f $tmp/in
  if test x"$ac_file" != x-; then
    if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
      { echo "$as_me:12011: $ac_file is unchanged" >&5
echo "$as_me: $ac_file is unchanged" >&6;}
    else
      ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
         X"$ac_file" : 'X\(//\)[^/]' \| \
         X"$ac_file" : 'X\(//\)$' \| \
         X"$ac_file" : 'X\(/\)' \| \
         .     : '\(.\)' 2>/dev/null ||
echo X"$ac_file" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
  	  /^X\(\/\/\)$/{ s//\1/; q; }
  	  /^X\(\/\).*/{ s//\1/; q; }
  	  s/.*/./; q'`
      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
        { case "$ac_dir" in
  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
  *)                      as_incr_dir=.;;
esac
as_dummy="$ac_dir"
for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
  case $as_mkdir_dir in
    # Skip DOS drivespec
    ?:) as_incr_dir=$as_mkdir_dir ;;
    *)
      as_incr_dir=$as_incr_dir/$as_mkdir_dir
      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
    ;;
  esac
done; }

      fi
      rm -f $ac_file
      mv $tmp/config.h $ac_file
    fi
  else
    cat $tmp/config.h
    rm -f $tmp/config.h
  fi
  # Run the commands associated with the file.
  case $ac_file in
    config.h ) # update the timestamp
echo timestamp >"./stamp-h1"
 ;;
    interface.h ) # update the timestamp
echo timestamp >"./stamp-h2"
 ;;
  esac
done
EOF
cat >>$CONFIG_STATUS <<\EOF

#
# CONFIG_COMMANDS section.
#
for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
  ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
  ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`

  case $ac_dest in
    default-1 )
test x"$AMDEP_TRUE" != x"" ||
for mf in $CONFIG_FILES; do
  case "$mf" in
  Makefile) dirpart=.;;
  */Makefile) dirpart=`echo "$mf" | sed -e 's|/[^/]*$||'`;;
  *) continue;;
  esac
  grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue
  # Extract the definition of DEP_FILES from the Makefile without
  # running `make'.
  DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
  test -z "$DEPDIR" && continue
  # When using ansi2knr, U may be empty or an underscore; expand it
  U=`sed -n -e '/^U = / s///p' < "$mf"`
  test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
  # We invoke sed twice because it is the simplest approach to
  # changing $(DEPDIR) to its actual value in the expansion.
  for file in `sed -n -e '
    /^DEP_FILES = .*\\\\$/ {
      s/^DEP_FILES = //
      :loop
	s/\\\\$//
	p
	n
	/\\\\$/ b loop
      p
    }
    /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
    # Make sure the directory exists.
    test -f "$dirpart/$file" && continue
    fdir=`echo "$file" | sed -e 's|/[^/]*$||'`
    $ac_aux_dir/mkinstalldirs "$dirpart/$fdir" > /dev/null 2>&1
    # echo "creating $dirpart/$file"
    echo '# dummy' > "$dirpart/$file"
  done
done
 ;;
  esac
done
EOF

cat >>$CONFIG_STATUS <<\EOF

{ (exit 0); exit 0; }
EOF
chmod +x $CONFIG_STATUS
ac_clean_files=$ac_clean_files_save

# configure is writing to config.log, and then calls config.status.
# config.status does its own redirection, appending to config.log.
# Unfortunately, on DOS this fails, as config.log is still kept open
# by configure, so config.status won't be able to write to it; its
# output is simply discarded.  So we exec the FD to /dev/null,
# effectively closing config.log, so it can be properly (re)opened and
# appended to by config.status.  When coming back to configure, we
# need to make the FD available again.
if test "$no_create" != yes; then
  ac_cs_success=:
  exec 5>/dev/null
  $SHELL $CONFIG_STATUS || ac_cs_success=false
  exec 5>>config.log
  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
  # would make configure fail if this is the last instruction.
  $ac_cs_success || { (exit 1); exit 1; }
fi

