#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by Autoconf 2.49b.
#
# Copyright (C) 1992, 93, 94, 95, 96, 98, 99, 2000
# Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.

#
# 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}
# Sed expression to map a string onto a valid sh and CPP variable names.
ac_tr_sh='sed y%*+%pp%;s%[^a-zA-Z0-9_]%_%g'
ac_tr_cpp='sed y%*abcdefghijklmnopqrstuvwxyz%PABCDEFGHIJKLMNOPQRSTUVWXYZ%;s%[^A-Z0-9_]%_%g'

# By default always use an empty string as the executable extension.
# Only change it if the script calls AC_EXEEXT.
ac_exeext=
# By default assume that objects files use an extension of .o.  Only
# change it if the script calls AC_OBJEXT.
ac_objext=o
# Factoring default headers for most tests.
ac_includes_default="\
#include <stdio.h>
#include <sys/types.h>
#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>
#else
# if HAVE_STRINGS_H
#  include <strings.h>
# endif
#endif
#if HAVE_INTTYPES_H
# include <inttypes.h>
#endif
#if HAVE_UNISTD_H
# include <unistd.h>
#endif"
ac_unique_file="magick/magick.h"
ac_subdirs_all="$ac_subdirs_all ltdl"

# 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
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'

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" : ".*[^-a-zA-Z0-9_]" >/dev/null &&
      { echo "configure: error: invalid feature name: $ac_feature" >&2; 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" : ".*[^-a-zA-Z0-9_]" >/dev/null &&
      { echo "configure: error: invalid feature name: $ac_feature" >&2; 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" : ".*[^-a-zA-Z0-9_]" >/dev/null &&
      { echo "configure: error: invalid package name: $ac_package" >&2; 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" : ".*[^-a-zA-Z0-9_]" >/dev/null &&
      { echo "configure: error: invalid package name: $ac_package" >&2; 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 "configure: error: unrecognized option: $ac_option
Try \`configure --help' for more information." >&2; exit 1; }
    ;;

  *=*)
    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
    # Reject names that are not valid shell variable names.
    expr "x$ac_envvar" : ".*[^a-zA-Z0-9_]" >/dev/null &&
      { echo "configure: error: invalid variable name: $ac_envvar" >&2; 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 "configure: WARNING: you should use --build, --host, --target" >&2
    expr "x$ac_option" : ".*[^a-zA-Z0-9.]" >/dev/null &&
      echo "configure: 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 "configure: error: missing argument to $ac_option" >&2; exit 1; }
fi

# Be sure to have absolute paths.
for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
              localstatedir libdir includedir oldincludedir infodir mandir \
              exec_prefix prefix
do
  eval ac_val=$`echo $ac_var`
  case $ac_val in
    [\\/$]* | ?:[\\/]* ) ;;
    NONE ) ;;
    *)  { echo "configure: error: expected an absolute path for --$ac_var: $ac_val" >&2; 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 "configure: 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-

# 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 "configure: error: cannot find sources in $ac_confdir or .." >&2; exit 1; }
  else
    { echo "configure: error: cannot find sources in $srcdir" >&2; 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_CXX_set=${CXX+set}
ac_env_CXX_value=$CXX
ac_cv_env_CXX_set=${CXX+set}
ac_cv_env_CXX_value=$CXX
ac_env_CXXFLAGS_set=${CXXFLAGS+set}
ac_env_CXXFLAGS_value=$CXXFLAGS
ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
ac_cv_env_CXXFLAGS_value=$CXXFLAGS
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

#
# 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-shared=PKGS  build shared libraries default=no
  --enable-static=PKGS  build static libraries default=yes
  --enable-fast-install=PKGS  optimize for fast installation default=yes
  --disable-libtool-lock  avoid locking (might break parallel builds)
  --enable-maintainer-mode enable make rules and dependencies not useful
                          (and sometimes confusing) to the casual installer
  --enable-prof           enable prof source profiling support (default is no)
  --enable-gprof          enable gprof source profiling support (default is no)
  --enable-gcov           enable gcov source profiling support (default is no)
  --enable-lzw            enable LZW support (default is no)
  --enable-16bit-pixel    enable 16 bit/quantum pixels (default is no)
  --enable-sfio           enable sfio-based stdio support (default is no)

Optional Packages:
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  --with-gnu-ld           assume the C compiler uses GNU ld default=no
  --with-pic              try to use only PIC/non-PIC objects default=use both
  --with-modules          enable support for dynamically loadable modules
  --with-dmalloc          use dmalloc, as in
                          http://www.dmalloc.com/dmalloc.tar.gz
  --with-cache            set pixel cache threshhold (default 2047MB)
  --with-threads          enable threads support
  --without-frozenpaths   disable frozen delegate paths
  --without-largefiles    disable support for large (64 bit) file offsets
  --with-magick_plus_plus enable build/install of Magick++
  --without-perl          disable build/install of PerlMagick
  --with-perl-options=OPTIONS  options to pass on command-line when
                          generating PerlMagick's Makefile from Makefile.PL
  --without-bzlib         disable BZLIB support
  --without-dps           disable Display Postscript support
  --without-fpx           disable FlashPIX support
  --without-hdf           disable HDF support
  --without-jbig          disable JBIG support
  --without-jpeg          disable JPEG support
  --without-lcms          disable LCMS support
  --without-png           disable PNG support
  --without-tiff          disable TIFF support
  --without-ttf           disable TrueType support
  --with-ttf-fontpath     set default TrueType font path (default none)
  --without-xml           disable XML support
  --without-zlib          disable ZLIB support
  --with-x                use the X Window System
  --with-libstdc=DIR      use libstdc++ in DIR

Some influential environment variables:
  CC          C compiler command
  CFLAGS      C compiler flags
  CXX         C++ compiler command
  CXXFLAGS    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>

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; then
      echo
      $SHELL $ac_sub_srcdir/configure  --help=recursive
    elif test -f $ac_sub_srcdir/configure.in; then
      echo
      $ac_configure --help
    else
      echo "configure: 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 (C) 1992, 93, 94, 95, 96, 98, 99, 2000
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
# 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

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

# NLS nuisances.
$ac_unset LANG || test "${LANG+set}" != set || LANG=C && export LANG
$ac_unset LC_ALL || test "${LC_ALL+set}" != set || LC_ALL=C && export LC_ALL
$ac_unset LC_TIME || test "${LC_TIME+set}" != set || LC_TIME=C && export LC_TIME
$ac_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || LC_CTYPE=C && export LC_CTYPE
$ac_unset LANGUAGE || test "${LANGUAGE+set}" != set || LANGUAGE=C && export LANGUAGE
$ac_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || LC_COLLATE=C && export LC_COLLATE
$ac_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || LC_NUMERIC=C && export LC_NUMERIC
$ac_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.
ac_nl='
'
IFS=" 	$ac_nl"

# CDPATH.
$ac_unset CDPATH || test "${CDPATH+set}" != set || CDPATH=: && export CDPATH

trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15

# 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

# File descriptor usage:
# 0 standard input
# 1 file creation
# 2 errors and warnings
# 3 some systems may open it to /dev/tty
# 4 used on the Kubota Titan
# 6 checking for... messages and results
# 5 compiler messages saved in config.log
if test "$silent" = yes; then
  exec 6>/dev/null
else
  exec 6>&1
fi
exec 5>./config.log

echo "\
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by configure  2.49b, executed with
 > $0 $ac_configure_args
" >&5

# 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 "loading site script $ac_site_file"
    . "$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 "loading cache $cache_file"
    case $cache_file in
      [\\/]* | ?:[\\/]* ) . $cache_file;;
      *)                      . ./$cache_file;;
    esac
  fi
else
  echo "creating cache $cache_file"
  >$cache_file
fi

# Check that the precious variables saved in the cache have kept the same
# value.
ac_suggest_removing_cache=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 "configure: WARNING: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2
      ac_suggest_removing_cache=: ;;
    ,set)
      echo "configure: WARNING: \`$ac_var' was not set in the previous run" >&2
      ac_suggest_removing_cache=: ;;
    ,);;
    *)
      if test "x$ac_old_val" != "x$ac_new_val"; then
        echo "configure: WARNING: \`$ac_var' has changed since the previous run:" >&2
        echo "configure: WARNING:   former value:  $ac_old_val" >&2
        echo "configure: WARNING:   current value: $ac_new_val" >&2
        ac_suggest_removing_cache=:
      fi;;
  esac
done
if $ac_suggest_removing_cache; then
  echo "configure: WARNING: changes in the environment can compromise the build" >&2
  echo "configure: WARNING: consider removing $cache_file and starting over" >&2
fi

ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='${CC-cc} -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_gnu_compiler=$ac_cv_prog_gcc

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

# Set version
MAJOR_VERSION=5
MINOR_VERSION=2
MICRO_VERSION=5
echo "configuring ImageMagick $MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION"
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 "configure: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2; 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 "configure: error: cannot run $ac_config_sub" >&2; exit 1; }

echo "configure:867: 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 "configure: error: cannot guess build type; you must specify one" >&2; exit 1; }
ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || exit 1

fi
echo "configure:880: 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 "configure:887: 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` || exit 1

fi
echo "configure:898: 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 "configure:905: 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` || exit 1

fi
echo "configure:916: 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}-

# Ensure that make can run correctly
echo "configure:931: 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 > conftestfile
# 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 conftestfile 2> /dev/null`
   if test "$*" = "X"; then
      # -L didn't work.
      set X `ls -t $srcdir/configure conftestfile`
   fi
   if test "$*" != "X $srcdir/configure conftestfile" \
      && test "$*" != "X conftestfile $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 "configure: error: ls -t appears to fail.  Make sure there is not a broken
alias in your environment" >&2; exit 1; }
   fi

   test "$2" = conftestfile
   )
then
   # Ok.
   :
else
   { echo "configure: error: newly created file is older than distributed files!
Check your system clock" >&2; exit 1; }
fi
rm -f conftest*
echo "configure:968: result: yes" >&5
echo "${ECHO_T}yes" >&6

# Generate configure header.
ac_config_headers="$ac_config_headers magick/config.h"

  ac_config_commands="$ac_config_commands default-1"

# 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 "configure:988: 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=':'
  for ac_dir in $PATH; do
    # 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 test -f $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
  IFS=$ac_save_IFS

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 "configure:1037: 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 "$program_transform_name" = s,x,x,; then
  program_transform_name=
else
  # Double any \ or $.  echo might interpret backslashes.
  cat <<\EOF >conftestsed
s,\\,\\\\,g; s,\$,$$,g
EOF
  program_transform_name=`echo $program_transform_name | sed -f conftestsed`
  rm -f conftestsed
fi
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"

# sed with no file args requires a program.
test -z "$program_transform_name" && program_transform_name="s,x,x,"

test x"${MISSING+set}" = xset || \
  MISSING="\${SHELL} `CDPATH=: && cd $ac_aux_dir && pwd`/missing"
# Use eval to expand $SHELL
if eval "$MISSING --run :"; then
  am_missing_run="$MISSING --run "
else
  am_missing_run=
  am_backtick='`'
  echo "configure: 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 "configure:1082: 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_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  test -f $ac_dir/$ac_word || continue

ac_cv_prog_AWK="$ac_prog"
break
done

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

test -n "$AWK" && break
done

echo "configure:1116: 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 >conftestmake <<\EOF
all:
	@echo 'ac_maketemp="${MAKE}"'
EOF
# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
eval `${MAKE-make} -f conftestmake 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 conftestmake
fi
if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
  echo "configure:1136: result: yes" >&5
echo "${ECHO_T}yes" >&6
  SET_MAKE=
else
  echo "configure:1140: 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
  AMDEP="#"
else
  am_depcomp="$ac_aux_dir/depcomp"
  if test ! -f "$am_depcomp"; then
    AMDEP="#"
  else
    AMDEP=
  fi
fi

if test -z "$AMDEP"; then
  AMDEPBACKSLASH='\'
else
  AMDEPBACKSLASH=
fi

if test -d .deps || mkdir .deps 2> /dev/null || test -d .deps; then
  DEPDIR=.deps
else
  DEPDIR=_deps
fi

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

# Define the identity of the package.
PACKAGE=ImageMagick

VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION

# 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"}

if test -z "$install_sh"; then
   install_sh="$ac_aux_dir/install-sh"
   test -f "$install_sh" || install_sh="$ac_aux_dir/install.sh"
   test -f "$install_sh" || install_sh="${am_missing_run}${ac_auxdir}/install-sh"
         install_sh="`echo $install_sh | sed -e 's/\${SHELL}//'`"
fi

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

#
# The following is extracted from AC_OUTPUT since we need the values of
# prefix and exec_prefix earlier.
# Reportedly fixed in autoconf 1.13 by the addition of AC_DEFINE_DIR but
# does not seem to appear anywhere.
#
test "x$prefix" = xNONE && prefix=$ac_default_prefix
# Let make expand exec_prefix.
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'

# Check for programs

ac_config_commands="$ac_config_commands default-2"

echo "configure:1222: checking how to run the C preprocessor" >&5
echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='${CC-cc} -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_gnu_compiler=$ac_cv_prog_gcc
# 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-cc} -E" "${CC-cc} -E -traditional-cpp" "/lib/cpp"
    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 1245 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax error
_ACEOF
ac_c_preproc_warn_flag=maybe
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.err"
if { (eval echo configure:1252: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }; then
  if egrep -v '^ *\+' conftest.err | grep . >/dev/null
  then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi

# Now check whether non-existent headers can be detected and how
# Skip if ac_cpp_err is not empty - ac_cpp is broken
if test -z "$ac_cpp_err"; then
  cat >conftest.$ac_ext <<_ACEOF
#line 1267 "configure"
#include "confdefs.h"
#include <ac_nonexistent.h>
_ACEOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.err"
if { (eval echo configure:1272: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }; then
  if egrep -v '^ *\+' conftest.err | grep . >/dev/null
  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
    # cannot detect missing includes at all
    ac_cpp_err=yes
  else
    if test "x$ac_cpp_err" = xmaybe; then
      ac_c_preproc_warn_flag=yes
    else
      ac_c_preproc_warn_flag=
    fi
    ac_cpp_err=
  fi
fi
rm -f conftest*

      if test -z "$ac_cpp_err"; then
        break
      fi
    done
    ac_cv_prog_CPP=$CPP

fi
  CPP=$ac_cv_prog_CPP
else
  # 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 1311 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax error
_ACEOF
ac_c_preproc_warn_flag=maybe
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.err"
if { (eval echo configure:1318: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }; then
  if egrep -v '^ *\+' conftest.err | grep . >/dev/null
  then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi

# Now check whether non-existent headers can be detected and how
# Skip if ac_cpp_err is not empty - ac_cpp is broken
if test -z "$ac_cpp_err"; then
  cat >conftest.$ac_ext <<_ACEOF
#line 1333 "configure"
#include "confdefs.h"
#include <ac_nonexistent.h>
_ACEOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.err"
if { (eval echo configure:1338: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }; then
  if egrep -v '^ *\+' conftest.err | grep . >/dev/null
  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
    # cannot detect missing includes at all
    ac_cpp_err=yes
  else
    if test "x$ac_cpp_err" = xmaybe; then
      ac_c_preproc_warn_flag=yes
    else
      ac_c_preproc_warn_flag=
    fi
    ac_cpp_err=
  fi
fi
rm -f conftest*

  ac_cv_prog_CPP=$CPP
fi
echo "configure:1365: result: $CPP" >&5
echo "${ECHO_T}$CPP" >&6
if test -n "$ac_cpp_err"; then
  { echo "configure: error: C preprocessor \"$CPP\" fails sanity check" >&2; exit 1; }
fi

ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='${CC-cc} -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_gnu_compiler=$ac_cv_prog_gcc

ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='${CC-cc} -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_gnu_compiler=$ac_cv_prog_gcc

# 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 "configure:1385: 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_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  test -f $ac_dir/$ac_word || continue

ac_cv_prog_CC="${ac_tool_prefix}gcc"
break
done

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

if test -z "$ac_cv_prog_CC"; then
  if test -n "$ac_tool_prefix"; then
    # Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo "configure:1420: 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_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  test -f $ac_dir/$ac_word || continue

ac_cv_prog_ac_ct_CC="gcc"
break
done

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

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

if test -z "$CC"; 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 "configure:1460: 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_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  test -f $ac_dir/$ac_word || continue

ac_cv_prog_CC="${ac_tool_prefix}cc"
break
done

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

if test -z "$ac_cv_prog_CC"; then
  if test -n "$ac_tool_prefix"; then
    # Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo "configure:1495: 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_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  test -f $ac_dir/$ac_word || continue

ac_cv_prog_ac_ct_CC="cc"
break
done

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

    CC="$ac_ct_CC"
  else
    CC=""
  fi
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 "configure:1536: 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_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  test -f $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"
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 "configure:1578: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
  echo "configure:1581: result: no" >&5
echo "${ECHO_T}no" >&6
fi

fi
if test -z "$CC"; 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 "configure:1591: 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_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  test -f $ac_dir/$ac_word || continue

ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
break
done

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

  test "$CC" != "" && break
done
if test "$CC" = ""; then
  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 "configure:1629: 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_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  test -f $ac_dir/$ac_word || continue

ac_cv_prog_CC="$ac_prog"
break
done

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

test -n "$CC" && break
done

fi

fi

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

echo "configure:1669: checking whether the C compiler works" >&5
echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line 1672 "configure"
#include "confdefs.h"

int
main ()
{

  ;
  return 0;
}
_ACEOF
if { (eval echo configure:1683: \"$ac_link\") >&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
  # 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='./conftest'; { (eval echo configure:1687: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }; }; then
    cross_compiling=no
  else
    if test "$cross_compiling" = maybe; then
      cross_compiling=yes
    else
      { echo "configure: error: cannot run C compiled programs.
To enable cross compilation, use \`--host'." >&2; exit 1; }
    fi
  fi
fi
echo "configure:1698: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  echo "configure:1703: result: no" >&5
echo "${ECHO_T}no" >&6
{ echo "configure: error: C compiler cannot create executables" >&2; exit 77; }
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_extecho "configure:1707: checking whether we are cross compiling" >&5
echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
echo "configure:1709: result: $cross_compiling" >&5
echo "${ECHO_T}$cross_compiling" >&6

echo "configure:1712: checking whether we are using GNU C" >&5
echo $ECHO_N "checking whether we are using GNU C... $ECHO_C" >&6
if test "${ac_cv_prog_gcc+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  # The semicolon is to pacify NeXT's syntax-checking cpp.
cat >conftest.$ac_ext <<_ACEOF
#ifdef __GNUC__
  yes;
#endif
_ACEOF
if { ac_try='${CC-cc} -E conftest.$ac_ext'; { (eval echo configure:1723: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }; } | grep yes >/dev/null; then
  ac_cv_prog_gcc=yes
else
  ac_cv_prog_gcc=no
fi
fi
echo "configure:1729: result: $ac_cv_prog_gcc" >&5
echo "${ECHO_T}$ac_cv_prog_gcc" >&6
ac_gnu_compiler=$ac_cv_prog_gcc
if test $ac_gnu_compiler = yes; then
  GCC=yes
else
  GCC=
fi
ac_test_CFLAGS=${CFLAGS+set}
ac_save_CFLAGS=$CFLAGS
CFLAGS=
echo "configure:1740: checking whether ${CC-cc} accepts -g" >&5
echo $ECHO_N "checking whether ${CC-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 1746 "configure"
#include "confdefs.h"

int
main ()
{

  ;
  return 0;
}
_ACEOF
if ${CC-cc} -g -c conftest.$ac_ext 2>&1 | grep . >/dev/null; then
  ac_cv_prog_cc_g=no
else
  ac_cv_prog_cc_g=yes
fi
rm -f conftest*

fi
echo "configure:1765: 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
echo "configure:1782: 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 1788 "configure"
#include "confdefs.h"

int
main ()
{

  ;
  return 0;
}
_ACEOF
 if { (eval echo configure:1799: \"$ac_compile\") >&5; (eval $ac_compile) 2>&5; }; then
   for ac_file in conftest.*; do
   case $ac_file in
     *.$ac_ext) ;;
     *) ac_cv_objext=`echo $ac_file | sed s/conftest.//` ;;
   esac
   done
 else
   rm -f conftest.$ac_ext
   { echo "configure: error: cannot compile" >&2; exit 1; }
 fi

fi
echo "configure:1812: result: $ac_cv_objext" >&5
echo "${ECHO_T}$ac_cv_objext" >&6
OBJEXT=$ac_cv_objext
ac_objext=$ac_cv_objext
rm -f conftest.$ac_objext conftest.$ac_ext

echo "configure:1818: checking for Cygwin environment" >&5
echo $ECHO_N "checking for Cygwin environment... $ECHO_C" >&6
if test "${ac_cv_cygwin+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 1824 "configure"
#include "confdefs.h"

int
main ()
{
#ifndef __CYGWIN__
# define __CYGWIN__ __CYGWIN32__
#endif
return __CYGWIN__;
  ;
  return 0;
}
_ACEOF
if { (eval echo configure:1838: \"$ac_compile\") >&5; (eval $ac_compile) 2>&5; } && test -s conftest.$ac_objext; then
  ac_cv_cygwin=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_cygwin=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "configure:1847: result: $ac_cv_cygwin" >&5
echo "${ECHO_T}$ac_cv_cygwin" >&6
test "$ac_cv_cygwin" = yes && CYGWIN=yes
echo "configure:1850: checking for mingw32 environment" >&5
echo $ECHO_N "checking for mingw32 environment... $ECHO_C" >&6
if test "${ac_cv_mingw32+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 1856 "configure"
#include "confdefs.h"

int
main ()
{
return __MINGW32__;
  ;
  return 0;
}
_ACEOF
if { (eval echo configure:1867: \"$ac_compile\") >&5; (eval $ac_compile) 2>&5; } && test -s conftest.$ac_objext; then
  ac_cv_mingw32=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_mingw32=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "configure:1876: result: $ac_cv_mingw32" >&5
echo "${ECHO_T}$ac_cv_mingw32" >&6
test "$ac_cv_mingw32" = yes && MINGW32=yes
echo "configure:1879: checking for EMX OS/2 environment" >&5
echo $ECHO_N "checking for EMX OS/2 environment... $ECHO_C" >&6
if test "${ac_cv_emxos2+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 1885 "configure"
#include "confdefs.h"

int
main ()
{
return __EMX__;
  ;
  return 0;
}
_ACEOF
if { (eval echo configure:1896: \"$ac_compile\") >&5; (eval $ac_compile) 2>&5; } && test -s conftest.$ac_objext; then
  ac_cv_emxos2=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_emxos2=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "configure:1905: result: $ac_cv_emxos2" >&5
echo "${ECHO_T}$ac_cv_emxos2" >&6
test "$ac_cv_emxos2" = yes && EMXOS2=yes
echo "configure:1908: checking for executable suffix" >&5
echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
if test "${ac_cv_exeext+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case "$CYGWIN $MINGW32 $EMXOS2" in
  *yes*) ac_cv_exeext=.exe ;;
  *)
  cat >conftest.$ac_ext <<_ACEOF
#line 1917 "configure"
#include "confdefs.h"

int
main ()
{

  ;
  return 0;
}
_ACEOF
if { (eval echo configure:1928: \"$ac_link\") >&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
  if test ! -f conftest; then
    for ac_file in conftest.*; do
       case $ac_file in
         *.$ac_ext | *.o | *.obj | *.xcoff) ;;
         *) ac_cv_exeext=`expr "$ac_file" : 'conftest\(.*\)'`;;
       esac
     done
   fi
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  { echo "configure: error: cannot compile and link" >&2; exit 1; }
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
  test -n "$ac_cv_exeext" && ac_cv_exeext=no;;
esac
fi
echo "configure:1946: result: $ac_cv_exeext" >&5
echo "${ECHO_T}$ac_cv_exeext" >&6
EXEEXT=
test "$ac_cv_exeext" != no && EXEEXT=$ac_cv_exeext
ac_exeext=$EXEEXT

ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='${CC-cc} -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_gnu_compiler=$ac_cv_prog_gcc

depcc="$CC"
depcpp="$CPP"
echo "configure:1960: 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"; then
  echo '#include "conftest.h"' > conftest.c
  echo 'int i;' > conftest.h

  am_cv_CC_dependencies_compiler_type=none
  for depmode in `sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < "$am_depcomp"`; do
    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 $am_depcomp $depcc -c conftest.c -o conftest.o 2>/dev/null &&
       grep conftest.h conftest.Po > /dev/null 2>&1; then
      am_cv_CC_dependencies_compiler_type="$depmode"
      break
    fi
  done

  rm -f conftest.*
else
  am_cv_CC_dependencies_compiler_type=none
fi

fi

echo "configure:2004: 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"

ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='${CC-cc} -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_gnu_compiler=$ac_cv_prog_gcc

# 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 "configure:2016: 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_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  test -f $ac_dir/$ac_word || continue

ac_cv_prog_CC="${ac_tool_prefix}gcc"
break
done

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

if test -z "$ac_cv_prog_CC"; then
  if test -n "$ac_tool_prefix"; then
    # Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo "configure:2051: 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_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  test -f $ac_dir/$ac_word || continue

ac_cv_prog_ac_ct_CC="gcc"
break
done

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

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

if test -z "$CC"; 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 "configure:2091: 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_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  test -f $ac_dir/$ac_word || continue

ac_cv_prog_CC="${ac_tool_prefix}cc"
break
done

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

if test -z "$ac_cv_prog_CC"; then
  if test -n "$ac_tool_prefix"; then
    # Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo "configure:2126: 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_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  test -f $ac_dir/$ac_word || continue

ac_cv_prog_ac_ct_CC="cc"
break
done

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

    CC="$ac_ct_CC"
  else
    CC=""
  fi
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 "configure:2167: 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_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  test -f $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"
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 "configure:2209: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
  echo "configure:2212: result: no" >&5
echo "${ECHO_T}no" >&6
fi

fi
if test -z "$CC"; 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 "configure:2222: 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_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  test -f $ac_dir/$ac_word || continue

ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
break
done

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

  test "$CC" != "" && break
done
if test "$CC" = ""; then
  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 "configure:2260: 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_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  test -f $ac_dir/$ac_word || continue

ac_cv_prog_CC="$ac_prog"
break
done

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

test -n "$CC" && break
done

fi

fi

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

echo "configure:2300: checking whether the C compiler works" >&5
echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line 2303 "configure"
#include "confdefs.h"

int
main ()
{

  ;
  return 0;
}
_ACEOF
if { (eval echo configure:2314: \"$ac_link\") >&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
  # 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='./conftest'; { (eval echo configure:2318: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }; }; then
    cross_compiling=no
  else
    if test "$cross_compiling" = maybe; then
      cross_compiling=yes
    else
      { echo "configure: error: cannot run C compiled programs.
To enable cross compilation, use \`--host'." >&2; exit 1; }
    fi
  fi
fi
echo "configure:2329: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  echo "configure:2334: result: no" >&5
echo "${ECHO_T}no" >&6
{ echo "configure: error: C compiler cannot create executables" >&2; exit 77; }
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_extecho "configure:2338: checking whether we are cross compiling" >&5
echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
echo "configure:2340: result: $cross_compiling" >&5
echo "${ECHO_T}$cross_compiling" >&6

echo "configure:2343: checking whether we are using GNU C" >&5
echo $ECHO_N "checking whether we are using GNU C... $ECHO_C" >&6
if test "${ac_cv_prog_gcc+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  # The semicolon is to pacify NeXT's syntax-checking cpp.
cat >conftest.$ac_ext <<_ACEOF
#ifdef __GNUC__
  yes;
#endif
_ACEOF
if { ac_try='${CC-cc} -E conftest.$ac_ext'; { (eval echo configure:2354: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }; } | grep yes >/dev/null; then
  ac_cv_prog_gcc=yes
else
  ac_cv_prog_gcc=no
fi
fi
echo "configure:2360: result: $ac_cv_prog_gcc" >&5
echo "${ECHO_T}$ac_cv_prog_gcc" >&6
ac_gnu_compiler=$ac_cv_prog_gcc
if test $ac_gnu_compiler = yes; then
  GCC=yes
else
  GCC=
fi
ac_test_CFLAGS=${CFLAGS+set}
ac_save_CFLAGS=$CFLAGS
CFLAGS=
echo "configure:2371: checking whether ${CC-cc} accepts -g" >&5
echo $ECHO_N "checking whether ${CC-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 2377 "configure"
#include "confdefs.h"

int
main ()
{

  ;
  return 0;
}
_ACEOF
if ${CC-cc} -g -c conftest.$ac_ext 2>&1 | grep . >/dev/null; then
  ac_cv_prog_cc_g=no
else
  ac_cv_prog_cc_g=yes
fi
rm -f conftest*

fi
echo "configure:2396: 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

ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='${CC-cc} -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_gnu_compiler=$ac_cv_prog_gcc

depcc="$CC"
depcpp="$CPP"
echo "configure:2422: 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"; then
  echo '#include "conftest.h"' > conftest.c
  echo 'int i;' > conftest.h

  am_cv_CC_dependencies_compiler_type=none
  for depmode in `sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < "$am_depcomp"`; do
    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 $am_depcomp $depcc -c conftest.c -o conftest.o 2>/dev/null &&
       grep conftest.h conftest.Po > /dev/null 2>&1; then
      am_cv_CC_dependencies_compiler_type="$depmode"
      break
    fi
  done

  rm -f conftest.*
else
  am_cv_CC_dependencies_compiler_type=none
fi

fi

echo "configure:2466: 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"

echo "configure:2470: checking how to run the C preprocessor" >&5
echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='${CC-cc} -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_gnu_compiler=$ac_cv_prog_gcc
# 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-cc} -E" "${CC-cc} -E -traditional-cpp" "/lib/cpp"
    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 2493 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax error
_ACEOF
ac_c_preproc_warn_flag=maybe
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.err"
if { (eval echo configure:2500: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }; then
  if egrep -v '^ *\+' conftest.err | grep . >/dev/null
  then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi

# Now check whether non-existent headers can be detected and how
# Skip if ac_cpp_err is not empty - ac_cpp is broken
if test -z "$ac_cpp_err"; then
  cat >conftest.$ac_ext <<_ACEOF
#line 2515 "configure"
#include "confdefs.h"
#include <ac_nonexistent.h>
_ACEOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.err"
if { (eval echo configure:2520: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }; then
  if egrep -v '^ *\+' conftest.err | grep . >/dev/null
  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
    # cannot detect missing includes at all
    ac_cpp_err=yes
  else
    if test "x$ac_cpp_err" = xmaybe; then
      ac_c_preproc_warn_flag=yes
    else
      ac_c_preproc_warn_flag=
    fi
    ac_cpp_err=
  fi
fi
rm -f conftest*

      if test -z "$ac_cpp_err"; then
        break
      fi
    done
    ac_cv_prog_CPP=$CPP

fi
  CPP=$ac_cv_prog_CPP
else
  # 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 2559 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax error
_ACEOF
ac_c_preproc_warn_flag=maybe
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.err"
if { (eval echo configure:2566: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }; then
  if egrep -v '^ *\+' conftest.err | grep . >/dev/null
  then
    ac_cpp_err=$ac_c_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi

# Now check whether non-existent headers can be detected and how
# Skip if ac_cpp_err is not empty - ac_cpp is broken
if test -z "$ac_cpp_err"; then
  cat >conftest.$ac_ext <<_ACEOF
#line 2581 "configure"
#include "confdefs.h"
#include <ac_nonexistent.h>
_ACEOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.err"
if { (eval echo configure:2586: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }; then
  if egrep -v '^ *\+' conftest.err | grep . >/dev/null
  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
    # cannot detect missing includes at all
    ac_cpp_err=yes
  else
    if test "x$ac_cpp_err" = xmaybe; then
      ac_c_preproc_warn_flag=yes
    else
      ac_c_preproc_warn_flag=
    fi
    ac_cpp_err=
  fi
fi
rm -f conftest*

  ac_cv_prog_CPP=$CPP
fi
echo "configure:2613: result: $CPP" >&5
echo "${ECHO_T}$CPP" >&6
if test -n "$ac_cpp_err"; then
  { echo "configure: error: C preprocessor \"$CPP\" fails sanity check" >&2; exit 1; }
fi

ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='${CC-cc} -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_gnu_compiler=$ac_cv_prog_gcc

# Check whether --with-gnu-ld or --without-gnu-ld was given.
if test "${with_gnu_ld+set}" = set; then
  withval="$with_gnu_ld"
  test "$withval" = no || with_gnu_ld=yes
else
  with_gnu_ld=no
fi;
ac_prog=ld
if test "$ac_cv_prog_gcc" = yes; then
  # Check if gcc -print-prog-name=ld gives a path.
  echo "configure:2635: checking for ld used by GCC" >&5
echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
  case $host in
  *-*-mingw*)
    # gcc leaves a trailing carriage return which upsets mingw
    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
  *)
    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
  esac
  case "$ac_prog" in
    # Accept absolute paths.
    [\\/]* | [A-Za-z]:[\\/]*)
      re_direlt='/[^/][^/]*/\.\./'
      # Canonicalize the path of ld
      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
	ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
      done
      test -z "$LD" && LD="$ac_prog"
      ;;
  "")
    # If it fails, then pretend we aren't using GCC.
    ac_prog=ld
    ;;
  *)
    # If it is relative, then search for the first ld in PATH.
    with_gnu_ld=unknown
    ;;
  esac
elif test "$with_gnu_ld" = yes; then
  echo "configure:2665: checking for GNU ld" >&5
echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
else
  echo "configure:2668: checking for non-GNU ld" >&5
echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
fi
if test "${ac_cv_path_LD+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -z "$LD"; then
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
      ac_cv_path_LD="$ac_dir/$ac_prog"
      # Check to see if the program is GNU ld.  I'd rather use --version,
      # but apparently some GNU ld's only accept -v.
      # Break only if it was the GNU/non-GNU ld that we prefer.
      if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
	test "$with_gnu_ld" != no && break
      else
	test "$with_gnu_ld" != yes && break
      fi
    fi
  done
  IFS="$ac_save_ifs"
else
  ac_cv_path_LD="$LD" # Let the user override the test with a path.
fi
fi

LD="$ac_cv_path_LD"
if test -n "$LD"; then
  echo "configure:2698: result: $LD" >&5
echo "${ECHO_T}$LD" >&6
else
  echo "configure:2701: result: no" >&5
echo "${ECHO_T}no" >&6
fi
test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" >&2; exit 1; }
echo "configure:2705: checking if the linker ($LD) is GNU ld" >&5
echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
if test "${ac_cv_prog_gnu_ld+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  # I'd rather use --version here, but apparently some GNU ld's only accept -v.
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
  ac_cv_prog_gnu_ld=yes
else
  ac_cv_prog_gnu_ld=no
fi
fi
echo "configure:2717: result: $ac_cv_prog_gnu_ld" >&5
echo "${ECHO_T}$ac_cv_prog_gnu_ld" >&6
with_gnu_ld=$ac_cv_prog_gnu_ld

# 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 "configure:2733: 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=':'
  for ac_dir in $PATH; do
    # 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 test -f $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
  IFS=$ac_save_IFS

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 "configure:2782: 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 "configure:2793: 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 >conftestmake <<\EOF
all:
	@echo 'ac_maketemp="${MAKE}"'
EOF
# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
eval `${MAKE-make} -f conftestmake 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 conftestmake
fi
if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
  echo "configure:2813: result: yes" >&5
echo "${ECHO_T}yes" >&6
  SET_MAKE=
else
  echo "configure:2817: result: no" >&5
echo "${ECHO_T}no" >&6
  SET_MAKE="MAKE=${MAKE-make}"
fi

echo "configure:2822: checking whether ln -s works" >&5
echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
if test "${ac_cv_prog_LN_S+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  rm -f conftest.sym conftest.file
echo >conftest.file
if ln -s conftest.file conftest.sym 2>/dev/null; then
  ac_cv_prog_LN_S="ln -s"
else
  ac_cv_prog_LN_S=ln
fi
fi
LN_S=$ac_cv_prog_LN_S
if test "$ac_cv_prog_LN_S" = "ln -s"; then
  echo "configure:2837: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
  echo "configure:2840: result: no" >&5
echo "${ECHO_T}no" >&6
fi

#
# Tests for Windows
#

if test "${CC}" != "gcc" ; then
    case "${host}" in
          *-*-hpux* )
               CFLAGS="${CFLAGS} -Wp,-H30000 -Ae"
               ;;
    esac
fi

#
# Configure libtool and ltdl
#
# Check whether --enable-shared or --disable-shared was given.
if test "${enable_shared+set}" = set; then
  enableval="$enable_shared"
  p=${PACKAGE-default}
case "$enableval" in
yes) enable_shared=yes ;;
no) enable_shared=no ;;
*)
  enable_shared=no
  # Look at the argument we got.  We use all the common list separators.
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
  for pkg in $enableval; do
    if test "X$pkg" = "X$p"; then
      enable_shared=yes
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
else
  enable_shared=no
fi;
# Check whether --enable-static or --disable-static was given.
if test "${enable_static+set}" = set; then
  enableval="$enable_static"
  p=${PACKAGE-default}
case "$enableval" in
yes) enable_static=yes ;;
no) enable_static=no ;;
*)
  enable_static=no
  # Look at the argument we got.  We use all the common list separators.
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
  for pkg in $enableval; do
    if test "X$pkg" = "X$p"; then
      enable_static=yes
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
else
  enable_static=yes
fi;
  case "$enable_ltdl_convenience" in
  no) { echo "configure: error: this package needs a convenience libltdl" >&2; exit 1; } ;;
  "") enable_ltdl_convenience=yes
      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
  esac
  LIBLTDL='${top_builddir}/''libltdl'/libltdlc.la
  INCLTDL='-I${top_srcdir}/''libltdl'

# Substitute INCLTDL and LIBLTDL in the Makefiles

# Check for dlopen support

# Check whether --enable-fast-install or --disable-fast-install was given.
if test "${enable_fast_install+set}" = set; then
  enableval="$enable_fast_install"
  p=${PACKAGE-default}
case "$enableval" in
yes) enable_fast_install=yes ;;
no) enable_fast_install=no ;;
*)
  enable_fast_install=no
  # Look at the argument we got.  We use all the common list separators.
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
  for pkg in $enableval; do
    if test "X$pkg" = "X$p"; then
      enable_fast_install=yes
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
else
  enable_fast_install=yes
fi;
echo "configure:2937: checking for $LD option to reload object files" >&5
echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6
if test "${lt_cv_ld_reload_flag+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  lt_cv_ld_reload_flag='-r'
fi
echo "configure:2944: result: $lt_cv_ld_reload_flag" >&5
echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6
reload_flag=$lt_cv_ld_reload_flag
test -n "$reload_flag" && reload_flag=" $reload_flag"

echo "configure:2949: checking for BSD-compatible nm" >&5
echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6
if test "${ac_cv_path_NM+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$NM"; then
  # Let the user override the test.
  ac_cv_path_NM="$NM"
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
    test -z "$ac_dir" && ac_dir=.
    tmp_nm=$ac_dir/${ac_tool_prefix}nm
    if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
      # Check to see if the nm accepts a BSD-compat flag.
      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
      #   nm: unknown option "B" ignored
      # Tru64's nm complains that /dev/null is an invalid object file
      if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
	ac_cv_path_NM="$tmp_nm -B"
	break
      elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
	ac_cv_path_NM="$tmp_nm -p"
	break
      else
	ac_cv_path_NM=${ac_cv_path_NM="$tmp_nm"} # keep the first match, but
	continue # so that we can try to find one that supports BSD flags
      fi
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
fi
fi

NM="$ac_cv_path_NM"
echo "configure:2985: result: $NM" >&5
echo "${ECHO_T}$NM" >&6

echo "configure:2988: checking how to recognise dependant libraries" >&5
echo $ECHO_N "checking how to recognise dependant libraries... $ECHO_C" >&6
if test "${lt_cv_deplibs_check_method+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  lt_cv_file_magic_cmd='${MAGIC}'
lt_cv_file_magic_test_file=
lt_cv_deplibs_check_method='unknown'
# Need to set the preceding variable on all platforms that support
# interlibrary dependencies.
# 'none' -- dependencies not supported.
# `unknown' -- same as none, but documents that we really don't know.
# 'pass_all' -- all dependencies passed with no checks.
# 'test_compile' -- check by making test program.
# 'file_magic [regex]' -- check by looking for files in library path
# which responds to the $file_magic_cmd with a given egrep regex.
# If you have `file' or equivalent on your system and you're not sure
# whether `pass_all' will *always* work, you probably want this one.

case "$host_os" in
aix4*)
  lt_cv_deplibs_check_method=pass_all
  ;;

beos*)
  lt_cv_deplibs_check_method=pass_all
  ;;

bsdi4*)
    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
    lt_cv_file_magic_cmd='/usr/bin/file -L'
  lt_cv_file_magic_test_file=/shlib/libc.so
  ;;

cygwin* | mingw* |pw32*)
  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
  lt_cv_file_magic_cmd='${OBJDUMP} -f'
  ;;

freebsd* )
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
    case "$host_cpu" in
    i*86 )
      # Not sure whether the presence of OpenBSD here was a mistake.
      # Let's accept both of them until this is cleared up.
            lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
            lt_cv_file_magic_cmd=/usr/bin/file
      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
      ;;
    esac
  else
    lt_cv_deplibs_check_method=pass_all
  fi
  ;;

gnu*)
  lt_cv_deplibs_check_method=pass_all
  ;;

hpux10.20*)
  # TODO:  Does this work for hpux-11 too?
  lt_cv_deplibs_check_method='file_magic (s0-90-90-9|PA-RISC0-9.0-9) shared library'
  lt_cv_file_magic_cmd=/usr/bin/file
  lt_cv_file_magic_test_file=/usr/lib/libc.sl
  ;;

irix5* | irix6*)
  case "$host_os" in
  irix5*)
    # this will be overridden with pass_all, but let us keep it just in case
    lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
    ;;
  *)
    case "$LD" in
    *-32|*"-32 ") libmagic=32-bit;;
    *-n32|*"-n32 ") libmagic=N32;;
    *-64|*"-64 ") libmagic=64-bit;;
    *) libmagic=never-match;;
    esac
    # this will be overridden with pass_all, but let us keep it just in case
        lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
        ;;
  esac
  lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
  lt_cv_deplibs_check_method=pass_all
  ;;

# This must be Linux ELF.
linux-gnu*)
  case "$host_cpu" in
  alpha* | i*86 | powerpc* | sparc* | ia64* )
    lt_cv_deplibs_check_method=pass_all ;;
  *)
    # glibc up to 2.1.1 does not perform some relocations on ARM
        lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
      esac
  lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
  ;;

netbsd*)
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then :
  else
        lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
        lt_cv_file_magic_cmd='/usr/bin/file -L'
    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
  fi
  ;;

osf3* | osf4* | osf5*)
  # this will be overridden with pass_all, but let us keep it just in case
  lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
  lt_cv_file_magic_test_file=/shlib/libc.so
  lt_cv_deplibs_check_method=pass_all
  ;;

sco3.2v5*)
  lt_cv_deplibs_check_method=pass_all
  ;;

solaris*)
  lt_cv_deplibs_check_method=pass_all
  lt_cv_file_magic_test_file=/lib/libc.so
  ;;

sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
  case "$host_vendor" in
  ncr)
    lt_cv_deplibs_check_method=pass_all
    ;;
  motorola)
        lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
        lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
    ;;
  esac
  ;;
esac

fi
echo "configure:3126: result: $lt_cv_deplibs_check_method" >&5
echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6
file_magic_cmd=$lt_cv_file_magic_cmd
deplibs_check_method=$lt_cv_deplibs_check_method

# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!

# Only perform the check for file, if the check method requires it
case "$deplibs_check_method" in
file_magic*)
  if test "$file_magic_cmd" = '${MAGIC}'; then
    echo "configure:3137: checking for ${ac_tool_prefix}file" >&5
echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6
if test "${lt_cv_path_MAGIC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case "$MAGIC" in
  /*)
  lt_cv_path_MAGIC="$MAGIC" # Let the user override the test with a path.
  ;;
  ?:/*)
  ac_cv_path_MAGIC="$MAGIC" # Let the user override the test with a dos path.
  ;;
  *)
  ac_save_MAGIC="$MAGIC"
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="/usr/bin:$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/${ac_tool_prefix}file; then
      lt_cv_path_MAGIC="$ac_dir/${ac_tool_prefix}file"
      if test -n "$file_magic_test_file"; then
	case "$deplibs_check_method" in
	"file_magic "*)
	  file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
	  MAGIC="$lt_cv_path_MAGIC"
	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
	    egrep "$file_magic_regex" > /dev/null; then
	    :
	  else
	    cat <<EOF 1>&2

*** Warning: the command libtool uses to detect shared libraries,
*** $file_magic_cmd, produces output that libtool cannot recognize.
*** The result is that libtool may fail to recognize shared libraries
*** as such.  This will affect the creation of libtool libraries that
*** depend on shared libraries, but programs linked with such libtool
*** libraries will work regardless of this problem.  Nevertheless, you
*** may want to report the problem to your system manager and/or to
*** bug-libtool@gnu.org

EOF
	  fi ;;
	esac
      fi
      break
    fi
  done
  IFS="$ac_save_ifs"
  MAGIC="$ac_save_MAGIC"
  ;;
esac
fi

MAGIC="$lt_cv_path_MAGIC"
if test -n "$MAGIC"; then
  echo "configure:3192: result: $MAGIC" >&5
echo "${ECHO_T}$MAGIC" >&6
else
  echo "configure:3195: result: no" >&5
echo "${ECHO_T}no" >&6
fi

if test -z "$lt_cv_path_MAGIC"; then
  if test -n "$ac_tool_prefix"; then
    echo "configure:3201: checking for file" >&5
echo $ECHO_N "checking for file... $ECHO_C" >&6
if test "${lt_cv_path_MAGIC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case "$MAGIC" in
  /*)
  lt_cv_path_MAGIC="$MAGIC" # Let the user override the test with a path.
  ;;
  ?:/*)
  ac_cv_path_MAGIC="$MAGIC" # Let the user override the test with a dos path.
  ;;
  *)
  ac_save_MAGIC="$MAGIC"
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="/usr/bin:$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/file; then
      lt_cv_path_MAGIC="$ac_dir/file"
      if test -n "$file_magic_test_file"; then
	case "$deplibs_check_method" in
	"file_magic "*)
	  file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
	  MAGIC="$lt_cv_path_MAGIC"
	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
	    egrep "$file_magic_regex" > /dev/null; then
	    :
	  else
	    cat <<EOF 1>&2

*** Warning: the command libtool uses to detect shared libraries,
*** $file_magic_cmd, produces output that libtool cannot recognize.
*** The result is that libtool may fail to recognize shared libraries
*** as such.  This will affect the creation of libtool libraries that
*** depend on shared libraries, but programs linked with such libtool
*** libraries will work regardless of this problem.  Nevertheless, you
*** may want to report the problem to your system manager and/or to
*** bug-libtool@gnu.org

EOF
	  fi ;;
	esac
      fi
      break
    fi
  done
  IFS="$ac_save_ifs"
  MAGIC="$ac_save_MAGIC"
  ;;
esac
fi

MAGIC="$lt_cv_path_MAGIC"
if test -n "$MAGIC"; then
  echo "configure:3256: result: $MAGIC" >&5
echo "${ECHO_T}$MAGIC" >&6
else
  echo "configure:3259: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  else
    MAGIC=:
  fi
fi

  fi
  ;;
esac

# 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 "configure:3274: 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_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  test -f $ac_dir/$ac_word || continue

ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
break
done

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

if test -z "$ac_cv_prog_RANLIB"; then
  if test -n "$ac_tool_prefix"; then
    # Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo "configure:3309: 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_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  test -f $ac_dir/$ac_word || continue

ac_cv_prog_ac_ct_RANLIB="ranlib"
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 "configure:3334: result: $ac_ct_RANLIB" >&5
echo "${ECHO_T}$ac_ct_RANLIB" >&6
else
  echo "configure:3337: result: no" >&5
echo "${ECHO_T}no" >&6
fi

    RANLIB="$ac_ct_RANLIB"
  else
    RANLIB=":"
  fi
fi

# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
set dummy ${ac_tool_prefix}strip; ac_word=$2
echo "configure:3349: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_STRIP+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$STRIP"; then
  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
else

  ac_save_IFS=$IFS; IFS=':'
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  test -f $ac_dir/$ac_word || continue

ac_cv_prog_STRIP="${ac_tool_prefix}strip"
break
done

fi
fi
STRIP=$ac_cv_prog_STRIP
if test -n "$STRIP"; then
  echo "configure:3373: result: $STRIP" >&5
echo "${ECHO_T}$STRIP" >&6
else
  echo "configure:3376: result: no" >&5
echo "${ECHO_T}no" >&6
fi

if test -z "$ac_cv_prog_STRIP"; then
  if test -n "$ac_tool_prefix"; then
    # Extract the first word of "strip", so it can be a program name with args.
set dummy strip; ac_word=$2
echo "configure:3384: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_STRIP"; then
  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
else

  ac_save_IFS=$IFS; IFS=':'
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  test -f $ac_dir/$ac_word || continue

ac_cv_prog_ac_ct_STRIP="strip"
break
done

  test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
fi
fi
ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
if test -n "$ac_ct_STRIP"; then
  echo "configure:3409: result: $ac_ct_STRIP" >&5
echo "${ECHO_T}$ac_ct_STRIP" >&6
else
  echo "configure:3412: result: no" >&5
echo "${ECHO_T}no" >&6
fi

    STRIP="$ac_ct_STRIP"
  else
    STRIP=":"
  fi
fi

# Check for any special flags to pass to ltconfig.
libtool_flags="--cache-file=$cache_file"
test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
libtool_flags="$libtool_flags --enable-dlopen"

# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
if test "${enable_libtool_lock+set}" = set; then
  enableval="$enable_libtool_lock"

fi;
test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"

# Check whether --with-pic or --without-pic was given.
if test "${with_pic+set}" = set; then
  withval="$with_pic"
  pic_mode="$withval"
else
  pic_mode=default
fi;
test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"

# Some flags need to be propagated to the compiler or linker for good
# libtool support.
case "$host" in
*-*-irix6*)
  # Find out which ABI we are using.
  echo '#line 3454 "configure"' > conftest.$ac_ext
  if { (eval echo configure:3455: \"$ac_compile\") >&5; (eval $ac_compile) 2>&5; }; then
    case "`/usr/bin/file conftest.o`" in
    *32-bit*)
      LD="${LD-ld} -32"
      ;;
    *N32*)
      LD="${LD-ld} -n32"
      ;;
    *64-bit*)
      LD="${LD-ld} -64"
      ;;
    esac
  fi
  rm -rf conftest*
  ;;

*-*-sco3.2v5*)
  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
  SAVE_CFLAGS="$CFLAGS"
  CFLAGS="$CFLAGS -belf"
  echo "configure:3475: checking whether the C compiler needs -belf" >&5
echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6
if test "${lt_cv_cc_needs_belf+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

     ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='${CC-cc} -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_gnu_compiler=$ac_cv_prog_gcc

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

int
main ()
{

  ;
  return 0;
}
_ACEOF
if { (eval echo configure:3499: \"$ac_link\") >&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
  lt_cv_cc_needs_belf=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  lt_cv_cc_needs_belf=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
     ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='${CC-cc} -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_gnu_compiler=$ac_cv_prog_gcc

fi
echo "configure:3514: result: $lt_cv_cc_needs_belf" >&5
echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6
  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
    CFLAGS="$SAVE_CFLAGS"
  fi
  ;;

esac

# Configure libtool

# Save cache, so that ltconfig can load it
cat >confcache <<\EOF
# 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.

EOF
# 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 \
    	-e "s/'/'\\\\''/g" \
    	-e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1='\\2'/p"
      ;;
    *)
      # `set' quotes correctly as required by POSIX, so do not add quotes.
      sed -n 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\2/p'
      ;;
    esac;
} |
  sed '/^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/' >>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

# Actually configure libtool.  ac_aux_dir is where install-sh is found.
AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
MAGIC="$MAGIC" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
|| { echo "configure: error: libtool configure failed" >&2; exit 1; }

# Reload cache, that may have been modified by ltconfig
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 "loading cache $cache_file"
    case $cache_file in
      [\\/]* | ?:[\\/]* ) . $cache_file;;
      *)                      . ./$cache_file;;
    esac
  fi
else
  echo "creating cache $cache_file"
  >$cache_file
fi

# This can be used to rebuild libtool when needed
LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh"

# Always use our own libtool.
LIBTOOL='$(SHELL) $(top_builddir)/libtool'

# Redirect the config.log output again, so that the ltconfig log is not
# clobbered by the next message.
exec 5>>./config.log

	
	

if test "$with_magick_plus_plus" = 'yes'
then
 echo "configure:3616: checking how to run the C++ preprocessor" >&5
echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='${CXX-g++} -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_gnu_compiler=$ac_cv_prog_gxx
if test -z "$CXXCPP"; then
  if test "${ac_cv_prog_CXXCPP+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
      # Double quotes because CXXCPP needs to be expanded
    for CXXCPP in "${CXX-g++} -E" "/lib/cpp"
    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 3635 "configure"
#include "confdefs.h"
#ifdef __cplusplus
extern "C" void exit (int);
#endif
#include <assert.h>
Syntax error
_ACEOF
ac_cxx_preproc_warn_flag=maybe
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.err"
if { (eval echo configure:3645: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }; then
  if egrep -v '^ *\+' conftest.err | grep . >/dev/null
  then
    ac_cpp_err=$ac_cxx_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi

# Now check whether non-existent headers can be detected and how
# Skip if ac_cpp_err is not empty - ac_cpp is broken
if test -z "$ac_cpp_err"; then
  cat >conftest.$ac_ext <<_ACEOF
#line 3660 "configure"
#include "confdefs.h"
#ifdef __cplusplus
extern "C" void exit (int);
#endif
#include <ac_nonexistent.h>
_ACEOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.err"
if { (eval echo configure:3668: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }; then
  if egrep -v '^ *\+' conftest.err | grep . >/dev/null
  then
    ac_cpp_err=$ac_cxx_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi

  if test -z "$ac_cpp_err"; then
    # cannot detect missing includes at all
    ac_cpp_err=yes
  else
    if test "x$ac_cpp_err" = xmaybe; then
      ac_cxx_preproc_warn_flag=yes
    else
      ac_cxx_preproc_warn_flag=
    fi
    ac_cpp_err=
  fi
fi
rm -f conftest*

      if test -z "$ac_cpp_err"; then
        break
      fi
    done
    ac_cv_prog_CXXCPP=$CXXCPP

fi
  CXXCPP=$ac_cv_prog_CXXCPP
else
  # 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 3707 "configure"
#include "confdefs.h"
#ifdef __cplusplus
extern "C" void exit (int);
#endif
#include <assert.h>
Syntax error
_ACEOF
ac_cxx_preproc_warn_flag=maybe
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.err"
if { (eval echo configure:3717: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }; then
  if egrep -v '^ *\+' conftest.err | grep . >/dev/null
  then
    ac_cpp_err=$ac_cxx_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi

# Now check whether non-existent headers can be detected and how
# Skip if ac_cpp_err is not empty - ac_cpp is broken
if test -z "$ac_cpp_err"; then
  cat >conftest.$ac_ext <<_ACEOF
#line 3732 "configure"
#include "confdefs.h"
#ifdef __cplusplus
extern "C" void exit (int);
#endif
#include <ac_nonexistent.h>
_ACEOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.err"
if { (eval echo configure:3740: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }; then
  if egrep -v '^ *\+' conftest.err | grep . >/dev/null
  then
    ac_cpp_err=$ac_cxx_preproc_warn_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi

  if test -z "$ac_cpp_err"; then
    # cannot detect missing includes at all
    ac_cpp_err=yes
  else
    if test "x$ac_cpp_err" = xmaybe; then
      ac_cxx_preproc_warn_flag=yes
    else
      ac_cxx_preproc_warn_flag=
    fi
    ac_cpp_err=
  fi
fi
rm -f conftest*

  ac_cv_prog_CXXCPP=$CXXCPP
fi
echo "configure:3767: result: $CXXCPP" >&5
echo "${ECHO_T}$CXXCPP" >&6
if test -n "$ac_cpp_err"; then
  { echo "configure: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2; exit 1; }
fi

ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='${CXX-g++} -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_gnu_compiler=$ac_cv_prog_gxx

ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='${CXX-g++} -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_gnu_compiler=$ac_cv_prog_gxx

for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl KCC RCC xlC_r xlC
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 "configure:3789: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_CXX+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CXX"; then
  ac_cv_prog_CXX="$CXX" # Let the user override the test.
else

  ac_save_IFS=$IFS; IFS=':'
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  test -f $ac_dir/$ac_word || continue

ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
break
done

fi
fi
CXX=$ac_cv_prog_CXX
if test -n "$CXX"; then
  echo "configure:3813: result: $CXX" >&5
echo "${ECHO_T}$CXX" >&6
else
  echo "configure:3816: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  test "$CXX" != "" && break
done
if test "$CXX" = ""; then
  for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl KCC RCC xlC_r xlC
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 "configure:3827: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_CXX+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CXX"; then
  ac_cv_prog_CXX="$CXX" # Let the user override the test.
else

  ac_save_IFS=$IFS; IFS=':'
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  test -f $ac_dir/$ac_word || continue

ac_cv_prog_CXX="$ac_prog"
break
done

fi
fi
CXX=$ac_cv_prog_CXX
if test -n "$CXX"; then
  echo "configure:3851: result: $CXX" >&5
echo "${ECHO_T}$CXX" >&6
else
  echo "configure:3854: result: no" >&5
echo "${ECHO_T}no" >&6
fi

test -n "$CXX" && break
done
test -n "$CXX" || CXX="g++"

fi

echo "configure:3864: checking whether the C++ compiler works" >&5
echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line 3867 "configure"
#include "confdefs.h"
#ifdef __cplusplus
extern "C" void exit (int);
#endif

int
main ()
{

  ;
  return 0;
}
_ACEOF
if { (eval echo configure:3881: \"$ac_link\") >&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
  # 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='./conftest'; { (eval echo configure:3885: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }; }; then
    cross_compiling=no
  else
    if test "$cross_compiling" = maybe; then
      cross_compiling=yes
    else
      { echo "configure: error: cannot run C++ compiled programs.
To enable cross compilation, use \`--host'." >&2; exit 1; }
    fi
  fi
fi
echo "configure:3896: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  echo "configure:3901: result: no" >&5
echo "${ECHO_T}no" >&6
{ echo "configure: error: C++ compiler cannot create executables" >&2; exit 77; }
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_extecho "configure:3905: checking whether we are cross compiling" >&5
echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
echo "configure:3907: result: $cross_compiling" >&5
echo "${ECHO_T}$cross_compiling" >&6

echo "configure:3910: checking whether we are using GNU C++" >&5
echo $ECHO_N "checking whether we are using GNU C++... $ECHO_C" >&6
if test "${ac_cv_prog_gxx+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  # The semicolon is to pacify NeXT's syntax-checking cpp.
cat >conftest.$ac_ext <<_ACEOF
#ifdef __GNUC__
  yes;
#endif
_ACEOF
if { ac_try='${CXX-g++} -E conftest.$ac_ext'; { (eval echo configure:3921: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }; } | grep yes >/dev/null; then
  ac_cv_prog_gxx=yes
else
  ac_cv_prog_gxx=no
fi
fi
echo "configure:3927: result: $ac_cv_prog_gxx" >&5
echo "${ECHO_T}$ac_cv_prog_gxx" >&6
ac_gnu_compiler=$ac_cv_prog_gxx
if test $ac_gnu_compiler = yes; then
  GXX=yes
else
  GXX=
fi
ac_test_CXXFLAGS=${CXXFLAGS+set}
ac_save_CXXFLAGS=$CXXFLAGS
CXXFLAGS=
echo "configure:3938: checking whether ${CXX-g++} accepts -g" >&5
echo $ECHO_N "checking whether ${CXX-g++} accepts -g... $ECHO_C" >&6
if test "${ac_cv_prog_cxx_g+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 3944 "configure"
#include "confdefs.h"
#ifdef __cplusplus
extern "C" void exit (int);
#endif

int
main ()
{

  ;
  return 0;
}
_ACEOF
if ${CXX-g++} -g -c conftest.$ac_ext 2>&1 | grep . >/dev/null; then
  ac_cv_prog_cxx_g=no
else
  ac_cv_prog_cxx_g=yes
fi
rm -f conftest*

fi
echo "configure:3966: result: $ac_cv_prog_cxx_g" >&5
echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
if test "$ac_test_CXXFLAGS" = set; then
  CXXFLAGS=$ac_save_CXXFLAGS
elif test $ac_cv_prog_cxx_g = yes; then
  if test "$GXX" = yes; then
    CXXFLAGS="-g -O2"
  else
    CXXFLAGS="-g"
  fi
else
  if test "$GXX" = yes; then
    CXXFLAGS="-O2"
  else
    CXXFLAGS=
  fi
fi

ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='${CXX-g++} -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_gnu_compiler=$ac_cv_prog_gxx

depcc="$CXX"
depcpp="$CXXCPP"
echo "configure:3992: checking dependency style of $depcc" >&5
echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

if test -z "$AMDEP"; then
  echo '#include "conftest.h"' > conftest.c
  echo 'int i;' > conftest.h

  am_cv_CXX_dependencies_compiler_type=none
  for depmode in `sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < "$am_depcomp"`; do
    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 $am_depcomp $depcc -c conftest.c -o conftest.o 2>/dev/null &&
       grep conftest.h conftest.Po > /dev/null 2>&1; then
      am_cv_CXX_dependencies_compiler_type="$depmode"
      break
    fi
  done

  rm -f conftest.*
else
  am_cv_CXX_dependencies_compiler_type=none
fi

fi

echo "configure:4036: result: $am_cv_CXX_dependencies_compiler_type" >&5
echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6
CXXDEPMODE="depmode=$am_cv_CXX_dependencies_compiler_type"

ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='${CXX-g++} -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_gnu_compiler=$ac_cv_prog_gxx

for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl KCC RCC xlC_r xlC
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 "configure:4050: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_CXX+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CXX"; then
  ac_cv_prog_CXX="$CXX" # Let the user override the test.
else

  ac_save_IFS=$IFS; IFS=':'
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  test -f $ac_dir/$ac_word || continue

ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
break
done

fi
fi
CXX=$ac_cv_prog_CXX
if test -n "$CXX"; then
  echo "configure:4074: result: $CXX" >&5
echo "${ECHO_T}$CXX" >&6
else
  echo "configure:4077: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  test "$CXX" != "" && break
done
if test "$CXX" = ""; then
  for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl KCC RCC xlC_r xlC
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 "configure:4088: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_CXX+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CXX"; then
  ac_cv_prog_CXX="$CXX" # Let the user override the test.
else

  ac_save_IFS=$IFS; IFS=':'
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  test -f $ac_dir/$ac_word || continue

ac_cv_prog_CXX="$ac_prog"
break
done

fi
fi
CXX=$ac_cv_prog_CXX
if test -n "$CXX"; then
  echo "configure:4112: result: $CXX" >&5
echo "${ECHO_T}$CXX" >&6
else
  echo "configure:4115: result: no" >&5
echo "${ECHO_T}no" >&6
fi

test -n "$CXX" && break
done
test -n "$CXX" || CXX="g++"

fi

echo "configure:4125: checking whether the C++ compiler works" >&5
echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line 4128 "configure"
#include "confdefs.h"
#ifdef __cplusplus
extern "C" void exit (int);
#endif

int
main ()
{

  ;
  return 0;
}
_ACEOF
if { (eval echo configure:4142: \"$ac_link\") >&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
  # 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='./conftest'; { (eval echo configure:4146: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }; }; then
    cross_compiling=no
  else
    if test "$cross_compiling" = maybe; then
      cross_compiling=yes
    else
      { echo "configure: error: cannot run C++ compiled programs.
To enable cross compilation, use \`--host'." >&2; exit 1; }
    fi
  fi
fi
echo "configure:4157: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  echo "configure:4162: result: no" >&5
echo "${ECHO_T}no" >&6
{ echo "configure: error: C++ compiler cannot create executables" >&2; exit 77; }
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_extecho "configure:4166: checking whether we are cross compiling" >&5
echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
echo "configure:4168: result: $cross_compiling" >&5
echo "${ECHO_T}$cross_compiling" >&6

echo "configure:4171: checking whether we are using GNU C++" >&5
echo $ECHO_N "checking whether we are using GNU C++... $ECHO_C" >&6
if test "${ac_cv_prog_gxx+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  # The semicolon is to pacify NeXT's syntax-checking cpp.
cat >conftest.$ac_ext <<_ACEOF
#ifdef __GNUC__
  yes;
#endif
_ACEOF
if { ac_try='${CXX-g++} -E conftest.$ac_ext'; { (eval echo configure:4182: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }; } | grep yes >/dev/null; then
  ac_cv_prog_gxx=yes
else
  ac_cv_prog_gxx=no
fi
fi
echo "configure:4188: result: $ac_cv_prog_gxx" >&5
echo "${ECHO_T}$ac_cv_prog_gxx" >&6
ac_gnu_compiler=$ac_cv_prog_gxx
if test $ac_gnu_compiler = yes; then
  GXX=yes
else
  GXX=
fi
ac_test_CXXFLAGS=${CXXFLAGS+set}
ac_save_CXXFLAGS=$CXXFLAGS
CXXFLAGS=
echo "configure:4199: checking whether ${CXX-g++} accepts -g" >&5
echo $ECHO_N "checking whether ${CXX-g++} accepts -g... $ECHO_C" >&6
if test "${ac_cv_prog_cxx_g+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 4205 "configure"
#include "confdefs.h"
#ifdef __cplusplus
extern "C" void exit (int);
#endif

int
main ()
{

  ;
  return 0;
}
_ACEOF
if ${CXX-g++} -g -c conftest.$ac_ext 2>&1 | grep . >/dev/null; then
  ac_cv_prog_cxx_g=no
else
  ac_cv_prog_cxx_g=yes
fi
rm -f conftest*

fi
echo "configure:4227: result: $ac_cv_prog_cxx_g" >&5
echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
if test "$ac_test_CXXFLAGS" = set; then
  CXXFLAGS=$ac_save_CXXFLAGS
elif test $ac_cv_prog_cxx_g = yes; then
  if test "$GXX" = yes; then
    CXXFLAGS="-g -O2"
  else
    CXXFLAGS="-g"
  fi
else
  if test "$GXX" = yes; then
    CXXFLAGS="-O2"
  else
    CXXFLAGS=
  fi
fi

ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='${CC-cc} -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_gnu_compiler=$ac_cv_prog_gcc

depcc="$CXX"
depcpp="$CXXCPP"
echo "configure:4253: checking dependency style of $depcc" >&5
echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

if test -z "$AMDEP"; then
  echo '#include "conftest.h"' > conftest.c
  echo 'int i;' > conftest.h

  am_cv_CXX_dependencies_compiler_type=none
  for depmode in `sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < "$am_depcomp"`; do
    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 $am_depcomp $depcc -c conftest.c -o conftest.o 2>/dev/null &&
       grep conftest.h conftest.Po > /dev/null 2>&1; then
      am_cv_CXX_dependencies_compiler_type="$depmode"
      break
    fi
  done

  rm -f conftest.*
else
  am_cv_CXX_dependencies_compiler_type=none
fi

fi

echo "configure:4297: result: $am_cv_CXX_dependencies_compiler_type" >&5
echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6
CXXDEPMODE="depmode=$am_cv_CXX_dependencies_compiler_type"

LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-cxx.sh"
lt_save_CC="$CC"
lt_save_CFLAGS="$CFLAGS"
AR="$AR" LTCC="$CC" CC="$CXX" CXX="$CXX" CFLAGS="$CXXFLAGS" CPPFLAGS="$CPPFLAGS" \
MAGIC="$MAGIC" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
deplibs_check_method="$deplibs_check_method" \
file_magic_cmd="$file_magic_cmd" \
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
--build="$build" --add-tag=CXX $ac_aux_dir/ltcf-cxx.sh $host \
|| { echo "configure: error: libtool tag configuration failed" >&2; exit 1; }
CC="$lt_save_CC"
CFLAGS="$lt_save_CFLAGS"

# Redirect the config.log output again, so that the ltconfig log is not
# clobbered by the next message.
exec 5>>./config.log

fi

# Check to see if building shared libraries
libtool_build_shared_libs='no'
if ./libtool --config | grep 'build_libtool_libs=yes' > /dev/null
then
  libtool_build_shared_libs='yes'
fi

# Check to see if building static libraries
libtool_build_static_libs='no'
if ./libtool --config | grep 'build_old_libs=yes' > /dev/null
then
  libtool_build_static_libs='yes'
fi

#
# Enable support for modules
# Only support modules if we are building shared libraries

# Check whether --with-modules or --without-modules was given.
if test "${with_modules+set}" = set; then
  withval="$with_modules"
  with_modules=$withval
else
  with_modules='no'
fi;
if test "$with_modules" != 'no' && test "$libtool_build_shared_libs" = 'no'
then
  with_modules='no'
fi

if test "$with_modules" != 'no'; then
  WITH_MODULES_TRUE=
  WITH_MODULES_FALSE='#'
else
  WITH_MODULES_TRUE='#'
  WITH_MODULES_FALSE=
fi
# Configure libltdl

subdirs="$subdirs ltdl"

if test "$with_modules" != 'no'
then

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

  # Set DLLDFLAGS
  if test X"$enable_shared" = Xyes; then
    DLLDFLAGS=-export-dynamic

  fi
   eval "eval im_cv_x_coder_modules=${libdir}/ImageMagick/modules/coders/"

cat >>confdefs.h <<EOF
#define MagickModulesPath "$im_cv_x_coder_modules"
EOF

fi

# Add configure option --enable-maintainer-mode which enables dependency
# checking and generation useful to package maintainers.  This is made an
# option to avoid confusing end users.
echo "configure:4387: checking whether to enable maintainer-specific portions of Makefiles" >&5
echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
    # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
if test "${enable_maintainer_mode+set}" = set; then
  enableval="$enable_maintainer_mode"
  USE_MAINTAINER_MODE=$enableval
else
  USE_MAINTAINER_MODE=no
fi;
  echo "configure:4396: result: $USE_MAINTAINER_MODE" >&5
echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6

if test $USE_MAINTAINER_MODE = yes; then
  MAINTAINER_MODE_TRUE=
  MAINTAINER_MODE_FALSE='#'
else
  MAINTAINER_MODE_TRUE='#'
  MAINTAINER_MODE_FALSE=
fi
  MAINT=$MAINTAINER_MODE_TRUE

# Add configure option --with-dmalloc to enable malloc debugging.
# dmalloc is available at ftp://ftp.letters.com/src/dmalloc/dmalloc.tar.gz
echo "configure:4410: checking if malloc debugging is wanted" >&5
echo $ECHO_N "checking if malloc debugging is wanted... $ECHO_C" >&6

# Check whether --with-dmalloc or --without-dmalloc was given.
if test "${with_dmalloc+set}" = set; then
  withval="$with_dmalloc"
  if test "$withval" = yes; then
  echo "configure:4417: result: yes" >&5
echo "${ECHO_T}yes" >&6

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

  LIBS="$LIBS -ldmalloc"
  LDFLAGS="$LDFLAGS -g"
else
  echo "configure:4427: result: no" >&5
echo "${ECHO_T}no" >&6
fi
else
  echo "configure:4431: result: no" >&5
echo "${ECHO_T}no" >&6
fi;

# Enable prof-based profiling support
# Check whether --enable-prof or --disable-prof was given.
if test "${enable_prof+set}" = set; then
  enableval="$enable_prof"
  with_prof=$enableval
else
  with_prof='no'
fi;

# Enable gprof-based profiling support
# Check whether --enable-gprof or --disable-gprof was given.
if test "${enable_gprof+set}" = set; then
  enableval="$enable_gprof"
  with_gprof=$enableval
else
  with_gprof='no'
fi;

# Enable gcov-based profiling support
# Check whether --enable-gcov or --disable-gcov was given.
if test "${enable_gcov+set}" = set; then
  enableval="$enable_gcov"
  with_gcov=$enableval
else
  with_gcov='no'
fi;

with_profiling='no'
if test "$with_prof" = 'yes' || test "$with_gprof" = 'yes' || test "$with_gcov" = 'yes'
then
  with_profiling='yes'

  if test "$libtool_build_shared_libs" = 'yes'
  then
    echo "Warning: Can not profile code using shared libraries"
  fi
fi

# Enable LZW compression.
# Check whether --enable-lzw or --disable-lzw was given.
if test "${enable_lzw+set}" = set; then
  enableval="$enable_lzw"
  with_lzw=$enableval
else
  with_lzw='no'
fi;
test "$with_lzw" = 'yes' &&
cat >>confdefs.h <<\EOF
#define HasLZW 1
EOF

if test "$have_lzw" != 'no'; then
  HasLZW_TRUE=
  HasLZW_FALSE='#'
else
  HasLZW_TRUE='#'
  HasLZW_FALSE=
fi

# Enable 16-bit pixels.
# Check whether --enable-16bit-pixel or --disable-16bit-pixel was given.
if test "${enable_16bit_pixel+set}" = set; then
  enableval="$enable_16bit_pixel"
  with_16_bit_pixel=$enableval
else
  with_16_bit_pixel='no'
fi;
test "$with_16_bit_pixel" = 'yes' &&
cat >>confdefs.h <<\EOF
#define QuantumLeap
EOF

# Enable sfio stdio support
# Check whether --enable-sfio or --disable-sfio was given.
if test "${enable_sfio+set}" = set; then
  enableval="$enable_sfio"
  with_sfio=$enableval
else
  with_sfio='no'
fi;

# Set pixel cache threshold

# Check whether --with-cache or --without-cache was given.
if test "${with_cache+set}" = set; then
  withval="$with_cache"
  with_cache=$withval
else
  with_cache=2047
fi;

cat >>confdefs.h <<EOF
#define PixelCacheThreshold $with_cache
EOF

# Enable support for threads

# Check whether --with-threads or --without-threads was given.
if test "${with_threads+set}" = set; then
  withval="$with_threads"
  with_threads=$withval
else
  with_threads='no'
fi;

# Disable support for full delegate paths

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

# Disable support for largefiles

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

# Enable build/install of Magick++

# Check whether --with-magick_plus_plus or --without-magick_plus_plus was given.
if test "${with_magick_plus_plus+set}" = set; then
  withval="$with_magick_plus_plus"
  with_magick_plus_plus=$withval
else
  with_magick_plus_plus='no'
fi;

# Disable build/install of PerlMagick.

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

# Options to pass when configuring PerlMagick

# Check whether --with-perl-options or --without-perl-options was given.
if test "${with_perl_options+set}" = set; then
  withval="$with_perl_options"
  PERL_MAKE_OPTIONS=$withval

fi;

if test "$with_perl" != 'no'; then
  WITH_PERL_TRUE=
  WITH_PERL_FALSE='#'
else
  WITH_PERL_TRUE='#'
  WITH_PERL_FALSE=
fi
with_perl_static='no'
if test "$with_perl" != 'no' && test "$libtool_build_shared_libs" = 'no'
then
  with_perl_static='yes'
fi
with_perl_dynamic='no'
if test "$with_perl" != 'no' && test "$libtool_build_shared_libs" = 'yes'
then
  with_perl_dynamic='yes'
fi

if test $with_perl_static = 'yes'; then
  WITH_PERL_STATIC_TRUE=
  WITH_PERL_STATIC_FALSE='#'
else
  WITH_PERL_STATIC_TRUE='#'
  WITH_PERL_STATIC_FALSE=
fi

if test $with_perl_dynamic = 'yes'; then
  WITH_PERL_DYNAMIC_TRUE=
  WITH_PERL_DYNAMIC_FALSE='#'
else
  WITH_PERL_DYNAMIC_TRUE='#'
  WITH_PERL_DYNAMIC_FALSE=
fi

# Disable BZLIB (bzip2 library)

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

# Disable Display Postscript.

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

# Disable FlashPIX.

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

# Disable HDF.

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

# Disable JBIG.

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

# Disable JPEG.

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

# Disable LCMS.

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

# Disable PNG.

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

# Disable TIFF.

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

# Disable TTF.

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

# Set default TrueType font path

# Check whether --with-ttf-fontpath or --without-ttf-fontpath was given.
if test "${with_ttf_fontpath+set}" = set; then
  withval="$with_ttf_fontpath"
  with_ttf_fontpath=$withval
else
  with_ttf_fontpath=''
fi;
if test "$with_ttf_fontpath" != "yes" && test -z "$with_ttf_fontpath"
then
  with_ttf_fontpath=''
else

cat >>confdefs.h <<EOF
#define TT_FONT_PATH "$with_ttf_fontpath"
EOF

fi

# Disable XML.

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

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

# Does gcc required -traditional?
if test $ac_cv_prog_gcc = yes; then
    echo "configure:4763: checking whether ${CC-cc} needs -traditional" >&5
echo $ECHO_N "checking whether ${CC-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 4770 "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 4785 "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 "configure:4799: 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

#
# Check for large file support
#
LIB_LF=''
if test "$with_largefiles" = 'yes'
then
#  AC_SYS_LARGEFILE

  echo "configure:4814: checking whether large file support needs explicit enabling" >&5
echo $ECHO_N "checking whether large file support needs explicit enabling... $ECHO_C" >&6
  result='no'
  getconf='getconf LFS_CFLAGS'
  if ($getconf) >/dev/null 2>&1
  then
    CPPFLAGS="$CPPFLAGS "`$getconf`
    result='yes'
  fi
  getconf='getconf LFS_LDFLAGS'
  if ($getconf) >/dev/null 2>&1
  then
    LDFLAGS="$LDFLAGS "`$getconf`
    result='yes'
  fi
  getconf='getconf LFS_LIBS'
  if ($getconf) >/dev/null 2>&1
  then
    LIB_LF=`$getconf`
    LIBS="$LIB_LF $LIBS"
    result='yes'
  fi
  echo "configure:4836: result: $result" >&5
echo "${ECHO_T}$result" >&6
fi

# Check for delegate sub-directories and add -I & -L options as required.
# This presumes that delegates are installed as detailed in the ImageMagick
# README. If delegates are installed in a standard location where the
# compiler will automatically find them then these options should not be
# required.

srcdirfull=`cd $srcdir && pwd`
builddir=`pwd`

#
# Sfio has a different structure than most delegates
#
if test "$with_sfio" != 'no'
then
  if test -d "$builddir/sfio/include" && test -d "$builddir/sfio/lib"
  then
    CPPFLAGS="$CPPFLAGS -I$builddir/sfio/include"
    LDFLAGS="$LDFLAGS -L$builddir/sfio/lib"
  else
    if test -d "$srcdirfull/sfio/include" && test -d "$srcdirfull/sfio/lib"
    then
      CPPFLAGS="$CPPFLAGS -I$srcdirfull/sfio/include"
      LDFLAGS="$LDFLAGS -L$srcdirfull/sfio/lib"
    fi
  fi
fi

#
# Most delegates have includes in the same directory as the library
#
for dir in bzlib hdf/hdf/src jbig/libjbig jpeg lcms/source  png tiff/libtiff ttf ttf/include ttf/lib/.libs ttf/obj/.libs xml xml/.libs zlib
do
  if test -d "$builddir/$dir"
  then
    CPPFLAGS="$CPPFLAGS -I$builddir/$dir"
    LDFLAGS="$LDFLAGS -L$builddir/$dir"
  else
    if test -d "$srcdirfull/$dir"
    then
      CPPFLAGS="$CPPFLAGS -I$srcdirfull/$dir"
      LDFLAGS="$LDFLAGS -L$srcdirfull/$dir"
    fi
  fi
done

# Evaluate shell variable equivalents to Makefile directory variables
eval "eval BIN_DIR=$bindir"
eval "eval SBIN_DIR=$sbindir"
eval "eval LIBEXEC_DIR=$libexecdir"
eval "eval DATA_DIR=$datadir"
eval "eval SYSCONF_DIR=$sysconfdir"
eval "eval SHAREDSTATE_DIR=$sharedstatedir"
eval "eval LOCALSTATE_DIR=$localstatedir"
eval "eval LIB_DIR=$libdir"
eval "eval INCLUDE_DIR=$includedir"
eval "eval OLDINCLUDE_DIR=$oldincludedir"
eval "eval INFO_DIR=$infodir"
eval "eval MAN_DIR=$mandir"

LDFLAGS="$LDFLAGS -L$LIB_DIR"
CPPFLAGS="$CPPFLAGS -I$INCLUDE_DIR"

# Extend includedir to include magick subdirectory offset
includedir="$includedir/magick"

#
# Find the X11 RGB database
#
echo "configure:4908: checking for X11 configure files" >&5
echo $ECHO_N "checking for X11 configure files... $ECHO_C" >&6
if test "${im_cv_x_configure+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  # Look for the header file in a standard set of common directories.
# Check X11 before X11Rn because it is often a symlink to the current release.
  for ac_dir in               \
    /lib/usr/lib/X11	  \
    /usr/X11/lib          \
    /usr/X11R4/lib        \
    /usr/X11R5/lib        \
    /usr/X11R6/lib        \
    /usr/X386/lib         \
    /usr/XFree86/lib/X11  \
    /usr/athena/lib       \
    /usr/lib              \
    /usr/lib/X11          \
    /usr/lib/X11R4        \
    /usr/lib/X11R5        \
    /usr/lib/X11R6        \
    /usr/local/X11/lib    \
    /usr/local/X11R4/lib  \
    /usr/local/X11R5/lib  \
    /usr/local/X11R6/lib  \
    /usr/local/lib        \
    /usr/local/lib/X11    \
    /usr/local/lib/X11R4  \
    /usr/local/lib/X11R5  \
    /usr/local/lib/X11R6  \
    /usr/local/x11r5/lib  \
    /usr/lpp/Xamples/lib  \
    /usr/openwin/lib      \
    /usr/openwin/share/lib \
    /usr/unsupported/lib  \
    /usr/x386/lib         \
    ; \
  do
    if test -f "$ac_dir/X11/rgb.txt"
    then
        im_cv_x_configure="$ac_dir/X11/"
	break
    elif test -f "$ac_dir/rgb.txt"
    then
        im_cv_x_configure="$ac_dir/"
        break
    fi

  done
fi
echo "configure:4958: result: $im_cv_x_configure" >&5
echo "${ECHO_T}$im_cv_x_configure" >&6

cat >>confdefs.h <<EOF
#define X11ConfigurePath "$im_cv_x_configure"
EOF

#
# Save initial user-tunable values
#
CC_INITIAL=$CC
CFLAGS_INITIAL=$CFLAGS
CPPFLAGS_INITIAL=$CPPFLAGS
LDFLAGS_INITIAL=$LDFLAGS
LIBS_INITIAL=$LIBS

#
# Find math library
#
LIB_MATH=''

echo "configure:4979: 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 4987 "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
if { (eval echo configure:5005: \"$ac_link\") >&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
  ac_cv_lib_m_sqrt=yes
else
  echo "configure: 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 "configure:5015: 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
  LIB_MATH="-lm"

fi

LIBS="$LIB_MATH $LIBS"

#
# Find Posix threads library
#
LIB_THREAD=''
if test "$with_threads" != 'no'
then

echo "configure:5031: checking for pthread_attr_init in -lpthread" >&5
echo $ECHO_N "checking for pthread_attr_init in -lpthread... $ECHO_C" >&6
if test "${ac_cv_lib_pthread_pthread_attr_init+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lpthread  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 5039 "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 pthread_attr_init ();
int
main ()
{
pthread_attr_init ();
  ;
  return 0;
}
_ACEOF
if { (eval echo configure:5057: \"$ac_link\") >&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
  ac_cv_lib_pthread_pthread_attr_init=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_lib_pthread_pthread_attr_init=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "configure:5067: result: $ac_cv_lib_pthread_pthread_attr_init" >&5
echo "${ECHO_T}$ac_cv_lib_pthread_pthread_attr_init" >&6
if test $ac_cv_lib_pthread_pthread_attr_init = yes; then

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

     LIB_THREAD="-lpthread"
     DEF_THREAD="-D_REENTRANT"

fi

  LIBS="$LIB_THREAD $LIBS"
  CPPFLAGS="$DEF_THREAD $CPPFLAGS"
fi

#
# Check for Sfio
#
have_sfio='no'
LIB_SFIO=''
if test "$with_sfio" != 'no'
then

    failed=0;
    passed=0;

echo "configure:5095: checking for stdio.h" >&5
echo $ECHO_N "checking for stdio.h... $ECHO_C" >&6
if test "${ac_cv_header_stdio_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 5101 "configure"
#include "confdefs.h"
#include <stdio.h>

_ACEOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.err"
if { (eval echo configure:5107: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }; then
  if egrep -v '^ *\+' conftest.err | grep . >/dev/null
  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_stdio_h=yes
else
  cat conftest.err >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_header_stdio_h=no
fi
rm -f conftest*

fi
echo "configure:5129: result: $ac_cv_header_stdio_h" >&5
echo "${ECHO_T}$ac_cv_header_stdio_h" >&6
if test $ac_cv_header_stdio_h = yes; then
  passed=`expr $passed + 1`
else
  failed=`expr $failed + 1`
fi

echo "configure:5137: checking for _stdopen in -lsfio" >&5
echo $ECHO_N "checking for _stdopen in -lsfio... $ECHO_C" >&6
if test "${ac_cv_lib_sfio__stdopen+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lsfio  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 5145 "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 _stdopen ();
int
main ()
{
_stdopen ();
  ;
  return 0;
}
_ACEOF
if { (eval echo configure:5163: \"$ac_link\") >&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
  ac_cv_lib_sfio__stdopen=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_lib_sfio__stdopen=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "configure:5173: result: $ac_cv_lib_sfio__stdopen" >&5
echo "${ECHO_T}$ac_cv_lib_sfio__stdopen" >&6
if test $ac_cv_lib_sfio__stdopen = yes; then
  passed=`expr $passed + 1`
else
  failed=`expr $failed + 1`
fi

echo "configure:5181: checking for vprintf in -lstdio" >&5
echo $ECHO_N "checking for vprintf in -lstdio... $ECHO_C" >&6
if test "${ac_cv_lib_stdio_vprintf+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lstdio -lsfio $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 5189 "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 vprintf ();
int
main ()
{
vprintf ();
  ;
  return 0;
}
_ACEOF
if { (eval echo configure:5207: \"$ac_link\") >&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
  ac_cv_lib_stdio_vprintf=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_lib_stdio_vprintf=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "configure:5217: result: $ac_cv_lib_stdio_vprintf" >&5
echo "${ECHO_T}$ac_cv_lib_stdio_vprintf" >&6
if test $ac_cv_lib_stdio_vprintf = yes; then
  passed=`expr $passed + 1`
else
  failed=`expr $failed + 1`
fi

    echo "configure:5225: checking if SFIO package is complete" >&5
echo $ECHO_N "checking if SFIO package is complete... $ECHO_C" >&6
    if test $passed -gt 0
    then
	if test $failed -gt 0
	then
	    echo "configure:5231: result: no -- some components failed test" >&5
echo "${ECHO_T}no -- some components failed test" >&6
	    have_sfio='no (failed tests)'
	else
	    LIB_SFIO='-lstdio -lsfio'
	    LIBS="$LIB_SFIO $LIBS"
	
cat >>confdefs.h <<\EOF
#define HasSFIO
EOF

	    echo "configure:5242: result: yes" >&5
echo "${ECHO_T}yes" >&6
	    have_sfio='yes'
	fi
    else
	echo "configure:5247: result: no" >&5
echo "${ECHO_T}no" >&6
    fi
fi

if test "$have_sfio" != 'no'; then
  HasSFIO_TRUE=
  HasSFIO_FALSE='#'
else
  HasSFIO_TRUE='#'
  HasSFIO_FALSE=
fi

#
# Check for ZLIB
#
have_zlib='no'
if test "$with_zlib" != 'no' || test "$with_png" != 'no'
then
  LIB_ZLIB=''

  failed=0;
  passed=0;

echo "configure:5271: checking for zconf.h" >&5
echo $ECHO_N "checking for zconf.h... $ECHO_C" >&6
if test "${ac_cv_header_zconf_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 5277 "configure"
#include "confdefs.h"
#include <zconf.h>

_ACEOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.err"
if { (eval echo configure:5283: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }; then
  if egrep -v '^ *\+' conftest.err | grep . >/dev/null
  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_zconf_h=yes
else
  cat conftest.err >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_header_zconf_h=no
fi
rm -f conftest*

fi
echo "configure:5305: result: $ac_cv_header_zconf_h" >&5
echo "${ECHO_T}$ac_cv_header_zconf_h" >&6
if test $ac_cv_header_zconf_h = yes; then
  passed=`expr $passed + 1`
else
  failed=`expr $failed + 1`
fi

echo "configure:5313: checking for zlib.h" >&5
echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6
if test "${ac_cv_header_zlib_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 5319 "configure"
#include "confdefs.h"
#include <zlib.h>

_ACEOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.err"
if { (eval echo configure:5325: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }; then
  if egrep -v '^ *\+' conftest.err | grep . >/dev/null
  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_zlib_h=yes
else
  cat conftest.err >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_header_zlib_h=no
fi
rm -f conftest*

fi
echo "configure:5347: result: $ac_cv_header_zlib_h" >&5
echo "${ECHO_T}$ac_cv_header_zlib_h" >&6
if test $ac_cv_header_zlib_h = yes; then
  passed=`expr $passed + 1`
else
  failed=`expr $failed + 1`
fi

echo "configure:5355: checking for compress in -lz" >&5
echo $ECHO_N "checking for compress in -lz... $ECHO_C" >&6
if test "${ac_cv_lib_z_compress+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 5363 "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 compress ();
int
main ()
{
compress ();
  ;
  return 0;
}
_ACEOF
if { (eval echo configure:5381: \"$ac_link\") >&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
  ac_cv_lib_z_compress=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_lib_z_compress=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "configure:5391: result: $ac_cv_lib_z_compress" >&5
echo "${ECHO_T}$ac_cv_lib_z_compress" >&6
if test $ac_cv_lib_z_compress = yes; then
  passed=`expr $passed + 1`
else
  failed=`expr $failed + 1`
fi

echo "configure:5399: checking for uncompress in -lz" >&5
echo $ECHO_N "checking for uncompress in -lz... $ECHO_C" >&6
if test "${ac_cv_lib_z_uncompress+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 5407 "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 uncompress ();
int
main ()
{
uncompress ();
  ;
  return 0;
}
_ACEOF
if { (eval echo configure:5425: \"$ac_link\") >&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
  ac_cv_lib_z_uncompress=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_lib_z_uncompress=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "configure:5435: result: $ac_cv_lib_z_uncompress" >&5
echo "${ECHO_T}$ac_cv_lib_z_uncompress" >&6
if test $ac_cv_lib_z_uncompress = yes; then
  passed=`expr $passed + 1`
else
  failed=`expr $failed + 1`
fi

echo "configure:5443: checking for deflate in -lz" >&5
echo $ECHO_N "checking for deflate in -lz... $ECHO_C" >&6
if test "${ac_cv_lib_z_deflate+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 5451 "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 deflate ();
int
main ()
{
deflate ();
  ;
  return 0;
}
_ACEOF
if { (eval echo configure:5469: \"$ac_link\") >&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
  ac_cv_lib_z_deflate=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_lib_z_deflate=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "configure:5479: result: $ac_cv_lib_z_deflate" >&5
echo "${ECHO_T}$ac_cv_lib_z_deflate" >&6
if test $ac_cv_lib_z_deflate = yes; then
  passed=`expr $passed + 1`
else
  failed=`expr $failed + 1`
fi

echo "configure:5487: checking for inflate in -lz" >&5
echo $ECHO_N "checking for inflate in -lz... $ECHO_C" >&6
if test "${ac_cv_lib_z_inflate+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 5495 "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 inflate ();
int
main ()
{
inflate ();
  ;
  return 0;
}
_ACEOF
if { (eval echo configure:5513: \"$ac_link\") >&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
  ac_cv_lib_z_inflate=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_lib_z_inflate=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "configure:5523: result: $ac_cv_lib_z_inflate" >&5
echo "${ECHO_T}$ac_cv_lib_z_inflate" >&6
if test $ac_cv_lib_z_inflate = yes; then
  passed=`expr $passed + 1`
else
  failed=`expr $failed + 1`
fi

  echo "configure:5531: checking if ZLIB package is complete" >&5
echo $ECHO_N "checking if ZLIB package is complete... $ECHO_C" >&6
  if test $passed -gt 0
  then
    if test $failed -gt 0
    then
      echo "configure:5537: result: no -- some components failed test" >&5
echo "${ECHO_T}no -- some components failed test" >&6
      have_zlib='no (failed tests)'
    else
      LIB_ZLIB='-lz'
      LIBS="$LIB_ZLIB $LIBS"

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

      echo "configure:5548: result: yes" >&5
echo "${ECHO_T}yes" >&6
      have_zlib='yes'
    fi
  else
    echo "configure:5553: result: no" >&5
echo "${ECHO_T}no" >&6
  fi
fi

if test "$have_zlib" != 'no'; then
  HasZLIB_TRUE=
  HasZLIB_FALSE='#'
else
  HasZLIB_TRUE='#'
  HasZLIB_FALSE=
fi

#
# Check for BZLIB
#
have_bzlib='no'
if test "$with_bzlib" != 'no'
then
  LIB_BZLIB=''

  failed=0;
  passed=0;

echo "configure:5577: checking for bzlib.h" >&5
echo $ECHO_N "checking for bzlib.h... $ECHO_C" >&6
if test "${ac_cv_header_bzlib_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 5583 "configure"
#include "confdefs.h"
#include <bzlib.h>

_ACEOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.err"
if { (eval echo configure:5589: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }; then
  if egrep -v '^ *\+' conftest.err | grep . >/dev/null
  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_bzlib_h=yes
else
  cat conftest.err >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_header_bzlib_h=no
fi
rm -f conftest*

fi
echo "configure:5611: result: $ac_cv_header_bzlib_h" >&5
echo "${ECHO_T}$ac_cv_header_bzlib_h" >&6
if test $ac_cv_header_bzlib_h = yes; then
  passed=`expr $passed + 1`
else
  failed=`expr $failed + 1`
fi

echo "configure:5619: checking for BZ2_bzCompress in -lbz2" >&5
echo $ECHO_N "checking for BZ2_bzCompress in -lbz2... $ECHO_C" >&6
if test "${ac_cv_lib_bz2_BZ2_bzCompress+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lbz2  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 5627 "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 BZ2_bzCompress ();
int
main ()
{
BZ2_bzCompress ();
  ;
  return 0;
}
_ACEOF
if { (eval echo configure:5645: \"$ac_link\") >&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
  ac_cv_lib_bz2_BZ2_bzCompress=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_lib_bz2_BZ2_bzCompress=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "configure:5655: result: $ac_cv_lib_bz2_BZ2_bzCompress" >&5
echo "${ECHO_T}$ac_cv_lib_bz2_BZ2_bzCompress" >&6
if test $ac_cv_lib_bz2_BZ2_bzCompress = yes; then
  passed=`expr $passed + 1`
else
  failed=`expr $failed + 1`
fi

echo "configure:5663: checking for BZ2_bzDecompress in -lbz2" >&5
echo $ECHO_N "checking for BZ2_bzDecompress in -lbz2... $ECHO_C" >&6
if test "${ac_cv_lib_bz2_BZ2_bzDecompress+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lbz2  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 5671 "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 BZ2_bzDecompress ();
int
main ()
{
BZ2_bzDecompress ();
  ;
  return 0;
}
_ACEOF
if { (eval echo configure:5689: \"$ac_link\") >&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
  ac_cv_lib_bz2_BZ2_bzDecompress=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_lib_bz2_BZ2_bzDecompress=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "configure:5699: result: $ac_cv_lib_bz2_BZ2_bzDecompress" >&5
echo "${ECHO_T}$ac_cv_lib_bz2_BZ2_bzDecompress" >&6
if test $ac_cv_lib_bz2_BZ2_bzDecompress = yes; then
  passed=`expr $passed + 1`
else
  failed=`expr $failed + 1`
fi

  echo "configure:5707: checking if BZLIB package is complete" >&5
echo $ECHO_N "checking if BZLIB package is complete... $ECHO_C" >&6
  if test $passed -gt 0
  then
    if test $failed -gt 0
    then
      echo "configure:5713: result: no -- some components failed test" >&5
echo "${ECHO_T}no -- some components failed test" >&6
      have_bzlib='no (failed tests)'
    else
      LIB_BZLIB='-lbz2'
      LIBS="$LIB_BZLIB $LIBS"

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

      echo "configure:5724: result: yes" >&5
echo "${ECHO_T}yes" >&6
      have_bzlib='yes'
    fi
  else
    echo "configure:5729: result: no" >&5
echo "${ECHO_T}no" >&6
  fi
fi

if test "$have_bzlib" != 'no'; then
  HasBZLIB_TRUE=
  HasBZLIB_FALSE='#'
else
  HasBZLIB_TRUE='#'
  HasBZLIB_FALSE=
fi

#
# Find the X11 include and library directories.
#
LIB_X11=''
LIB_XEXT=''
LIB_XT=''
echo "configure:5748: 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 conftestdir
if mkdir conftestdir; then
  cd conftestdir
  # 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 conftestdir
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 5845 "configure"
#include "confdefs.h"
#include <X11/Intrinsic.h>
_ACEOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.err"
if { (eval echo configure:5850: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }; then
  if egrep -v '^ *\+' conftest.err | grep . >/dev/null
  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
  cat conftest.err >&5
  echo "configure: 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*

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 5886 "configure"
#include "confdefs.h"
#include <X11/Intrinsic.h>
int
main ()
{
XtMalloc (0)
  ;
  return 0;
}
_ACEOF
if { (eval echo configure:5897: \"$ac_link\") >&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
  LIBS=$ac_save_LIBS
# We can link X programs with no special library path.
ac_x_libraries=
else
  echo "configure: 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 "configure:5933: 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 "configure:5943: 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 "configure:5967: 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 5971 "configure"
#include "confdefs.h"

int
main ()
{

  ;
  return 0;
}
_ACEOF
if { (eval echo configure:5982: \"$ac_link\") >&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
  ac_R_nospace=yes
else
  echo "configure: 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 "configure:5991: 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 5997 "configure"
#include "confdefs.h"

int
main ()
{

  ;
  return 0;
}
_ACEOF
if { (eval echo configure:6008: \"$ac_link\") >&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
  ac_R_space=yes
else
  echo "configure: 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 "configure:6017: result: yes" >&5
echo "${ECHO_T}yes" >&6
	  X_LIBS="$X_LIBS -R $x_libraries"
	else
	  echo "configure:6021: 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).

echo "configure:6040: 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 6048 "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
if { (eval echo configure:6066: \"$ac_link\") >&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
  ac_cv_lib_dnet_dnet_ntoa=yes
else
  echo "configure: 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 "configure:6076: 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 "configure:6085: 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 6093 "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
if { (eval echo configure:6111: \"$ac_link\") >&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
  ac_cv_lib_dnet_stub_dnet_ntoa=yes
else
  echo "configure: 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 "configure:6121: 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

    # 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 "configure:6138: 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 6144 "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
if { (eval echo configure:6174: \"$ac_link\") >&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
  ac_cv_func_gethostbyname=yes
else
  echo "configure: 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 "configure:6183: result: $ac_cv_func_gethostbyname" >&5
echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6

    if test $ac_cv_func_gethostbyname = no; then

echo "configure:6188: 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 6196 "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
if { (eval echo configure:6214: \"$ac_link\") >&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
  ac_cv_lib_nsl_gethostbyname=yes
else
  echo "configure: 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 "configure:6224: 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 "configure:6233: 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 6241 "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
if { (eval echo configure:6259: \"$ac_link\") >&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
  ac_cv_lib_bsd_gethostbyname=yes
else
  echo "configure: 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 "configure:6269: 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 "configure:6286: 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 6292 "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
if { (eval echo configure:6322: \"$ac_link\") >&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
  ac_cv_func_connect=yes
else
  echo "configure: 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 "configure:6331: result: $ac_cv_func_connect" >&5
echo "${ECHO_T}$ac_cv_func_connect" >&6

    if test $ac_cv_func_connect = no; then

echo "configure:6336: 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 6344 "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
if { (eval echo configure:6362: \"$ac_link\") >&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
  ac_cv_lib_socket_connect=yes
else
  echo "configure: 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 "configure:6372: 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 "configure:6382: 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 6388 "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
if { (eval echo configure:6418: \"$ac_link\") >&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
  ac_cv_func_remove=yes
else
  echo "configure: 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 "configure:6427: result: $ac_cv_func_remove" >&5
echo "${ECHO_T}$ac_cv_func_remove" >&6

    if test $ac_cv_func_remove = no; then

echo "configure:6432: 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 6440 "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
if { (eval echo configure:6458: \"$ac_link\") >&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
  ac_cv_lib_posix_remove=yes
else
  echo "configure: 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 "configure:6468: 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 "configure:6478: 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 6484 "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
if { (eval echo configure:6514: \"$ac_link\") >&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
  ac_cv_func_shmat=yes
else
  echo "configure: 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 "configure:6523: result: $ac_cv_func_shmat" >&5
echo "${ECHO_T}$ac_cv_func_shmat" >&6

    if test $ac_cv_func_shmat = no; then

echo "configure:6528: 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 6536 "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
if { (eval echo configure:6554: \"$ac_link\") >&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
  ac_cv_lib_ipc_shmat=yes
else
  echo "configure: 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 "configure:6564: 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 "configure:6584: 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 6592 "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
if { (eval echo configure:6610: \"$ac_link\") >&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
  ac_cv_lib_ICE_IceConnectionNumber=yes
else
  echo "configure: 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 "configure:6620: 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 "$no_x" != 'yes'
then
  LDFLAGS="$LDFLAGS $X_LIBS"
  LIB_X11="$X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
  LIBS="$LIB_X11 $LIBS"
  CPPFLAGS="$CPPFLAGS $X_CFLAGS"

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

echo "configure:6642: checking for XShmAttach in -lXext" >&5
echo $ECHO_N "checking for XShmAttach in -lXext... $ECHO_C" >&6
if test "${ac_cv_lib_Xext_XShmAttach+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 6650 "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 XShmAttach ();
int
main ()
{
XShmAttach ();
  ;
  return 0;
}
_ACEOF
if { (eval echo configure:6668: \"$ac_link\") >&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
  ac_cv_lib_Xext_XShmAttach=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_lib_Xext_XShmAttach=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "configure:6678: result: $ac_cv_lib_Xext_XShmAttach" >&5
echo "${ECHO_T}$ac_cv_lib_Xext_XShmAttach" >&6
if test $ac_cv_lib_Xext_XShmAttach = yes; then
  LIB_XEXT='-lXext'

fi

echo "configure:6685: checking for XShmAttach in -lXext" >&5
echo $ECHO_N "checking for XShmAttach in -lXext... $ECHO_C" >&6
if test "${ac_cv_lib_Xext_XShmAttach+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 6693 "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 XShmAttach ();
int
main ()
{
XShmAttach ();
  ;
  return 0;
}
_ACEOF
if { (eval echo configure:6711: \"$ac_link\") >&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
  ac_cv_lib_Xext_XShmAttach=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_lib_Xext_XShmAttach=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "configure:6721: result: $ac_cv_lib_Xext_XShmAttach" >&5
echo "${ECHO_T}$ac_cv_lib_Xext_XShmAttach" >&6
if test $ac_cv_lib_Xext_XShmAttach = yes; then

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

fi

echo "configure:6731: 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 6739 "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
if { (eval echo configure:6757: \"$ac_link\") >&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
  ac_cv_lib_Xext_XShapeCombineMask=yes
else
  echo "configure: 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 "configure:6767: 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
  LIB_XEXT='-lXext'

fi

echo "configure:6774: 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 6782 "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
if { (eval echo configure:6800: \"$ac_link\") >&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
  ac_cv_lib_Xext_XShapeCombineMask=yes
else
  echo "configure: 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 "configure:6810: 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

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

fi

echo "configure:6820: checking for XtSetEventDispatcher in -lXt" >&5
echo $ECHO_N "checking for XtSetEventDispatcher in -lXt... $ECHO_C" >&6
if test "${ac_cv_lib_Xt_XtSetEventDispatcher+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 6828 "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 XtSetEventDispatcher ();
int
main ()
{
XtSetEventDispatcher ();
  ;
  return 0;
}
_ACEOF
if { (eval echo configure:6846: \"$ac_link\") >&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
  ac_cv_lib_Xt_XtSetEventDispatcher=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_lib_Xt_XtSetEventDispatcher=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "configure:6856: result: $ac_cv_lib_Xt_XtSetEventDispatcher" >&5
echo "${ECHO_T}$ac_cv_lib_Xt_XtSetEventDispatcher" >&6
if test $ac_cv_lib_Xt_XtSetEventDispatcher = yes; then
  LIB_XT='-lXt'

fi

  LIBS="$LIB_XEXT $LIB_XT $LIBS"
fi
if test "$no_x" != 'yes'
then
  have_x='yes'
else
  have_x='no'
fi

if test "$have_x" != 'no'; then
  HasX11_TRUE=
  HasX11_FALSE='#'
else
  HasX11_TRUE='#'
  HasX11_FALSE=
fi

#
# If profiling, then check for -ldl and dlopen (required for Solaris & gcc)
#
LIB_DL=''
if test "$with_profiling" = 'yes'
then

echo "configure:6887: 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 6895 "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
if { (eval echo configure:6913: \"$ac_link\") >&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
  ac_cv_lib_dl_dlopen=yes
else
  echo "configure: 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 "configure:6923: 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='-ldl'

fi

  LIBS="$LIB_DL $LIBS"
fi

#
# Check for Display Postscript
#
have_dps='no'
LIB_DPS=''
if test "$with_dps" != 'no' && test "$with_x" != 'no'
then

    failed=0;
    passed=0;
    O_CPPFLAGS="$CPPFLAGS"
    CPPFLAGS="$CPPFLAGS -I${ac_x_includes}/X11"

echo "configure:6946: checking for DPS/dpsXclient.h" >&5
echo $ECHO_N "checking for DPS/dpsXclient.h... $ECHO_C" >&6
if test "${ac_cv_header_DPS_dpsXclient_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 6952 "configure"
#include "confdefs.h"
#include <DPS/dpsXclient.h>

_ACEOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.err"
if { (eval echo configure:6958: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }; then
  if egrep -v '^ *\+' conftest.err | grep . >/dev/null
  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_DPS_dpsXclient_h=yes
else
  cat conftest.err >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_header_DPS_dpsXclient_h=no
fi
rm -f conftest*

fi
echo "configure:6980: result: $ac_cv_header_DPS_dpsXclient_h" >&5
echo "${ECHO_T}$ac_cv_header_DPS_dpsXclient_h" >&6
if test $ac_cv_header_DPS_dpsXclient_h = yes; then
  passed=`expr $passed + 1`
else
  failed=`expr $failed + 1`
fi

echo "configure:6988: checking for DPS/dpsXpreview.h" >&5
echo $ECHO_N "checking for DPS/dpsXpreview.h... $ECHO_C" >&6
if test "${ac_cv_header_DPS_dpsXpreview_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 6994 "configure"
#include "confdefs.h"
#include <DPS/dpsXpreview.h>

_ACEOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.err"
if { (eval echo configure:7000: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }; then
  if egrep -v '^ *\+' conftest.err | grep . >/dev/null
  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_DPS_dpsXpreview_h=yes
else
  cat conftest.err >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_header_DPS_dpsXpreview_h=no
fi
rm -f conftest*

fi
echo "configure:7022: result: $ac_cv_header_DPS_dpsXpreview_h" >&5
echo "${ECHO_T}$ac_cv_header_DPS_dpsXpreview_h" >&6
if test $ac_cv_header_DPS_dpsXpreview_h = yes; then
  passed=`expr $passed + 1`
else
  failed=`expr $failed + 1`
fi

echo "configure:7030: checking for DPSInitialize in -ldps" >&5
echo $ECHO_N "checking for DPSInitialize in -ldps... $ECHO_C" >&6
if test "${ac_cv_lib_dps_DPSInitialize+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-ldps  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 7038 "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 DPSInitialize ();
int
main ()
{
DPSInitialize ();
  ;
  return 0;
}
_ACEOF
if { (eval echo configure:7056: \"$ac_link\") >&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
  ac_cv_lib_dps_DPSInitialize=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_lib_dps_DPSInitialize=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "configure:7066: result: $ac_cv_lib_dps_DPSInitialize" >&5
echo "${ECHO_T}$ac_cv_lib_dps_DPSInitialize" >&6
if test $ac_cv_lib_dps_DPSInitialize = yes; then
  passed=`expr $passed + 1`
else
  failed=`expr $failed + 1`
fi

echo "configure:7074: checking for XDPSPixelsPerPoint in -ldpstk" >&5
echo $ECHO_N "checking for XDPSPixelsPerPoint in -ldpstk... $ECHO_C" >&6
if test "${ac_cv_lib_dpstk_XDPSPixelsPerPoint+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-ldpstk -ldps $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 7082 "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 XDPSPixelsPerPoint ();
int
main ()
{
XDPSPixelsPerPoint ();
  ;
  return 0;
}
_ACEOF
if { (eval echo configure:7100: \"$ac_link\") >&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
  ac_cv_lib_dpstk_XDPSPixelsPerPoint=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_lib_dpstk_XDPSPixelsPerPoint=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "configure:7110: result: $ac_cv_lib_dpstk_XDPSPixelsPerPoint" >&5
echo "${ECHO_T}$ac_cv_lib_dpstk_XDPSPixelsPerPoint" >&6
if test $ac_cv_lib_dpstk_XDPSPixelsPerPoint = yes; then
  passed=`expr $passed + 1`
else
  failed=`expr $failed + 1`
fi

    echo "configure:7118: checking if DPS package is complete" >&5
echo $ECHO_N "checking if DPS package is complete... $ECHO_C" >&6
    if test $passed -gt 0
    then
    if test $failed -gt 0
    then
	echo "configure:7124: result: no -- some components failed test" >&5
echo "${ECHO_T}no -- some components failed test" >&6
        have_dps='no (failed tests)'
	CPPFLAGS="$O_CPPFLAGS"
    else
	LIB_DPS='-ldpstk -ldps'
	LIBS="$LIB_DPS $LIBS"
	
cat >>confdefs.h <<\EOF
#define HasDPS
EOF

	echo "configure:7136: result: yes" >&5
echo "${ECHO_T}yes" >&6
	have_dps='yes'
    fi
    else
    echo "configure:7141: result: no" >&5
echo "${ECHO_T}no" >&6
    CPPFLAGS=$O_CPPFLAGS
    fi
fi

if test "$have_dps" != 'no'; then
  HasDPS_TRUE=
  HasDPS_FALSE='#'
else
  HasDPS_TRUE='#'
  HasDPS_FALSE=
fi

#
# Check for FlashPIX
#
have_fpx='no'
LIB_FPX=''
if test "$with_fpx" != 'no'
then

    failed=0;
    passed=0;

echo "configure:7166: checking for fpx.h" >&5
echo $ECHO_N "checking for fpx.h... $ECHO_C" >&6
if test "${ac_cv_header_fpx_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 7172 "configure"
#include "confdefs.h"
#include <fpx.h>

_ACEOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.err"
if { (eval echo configure:7178: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }; then
  if egrep -v '^ *\+' conftest.err | grep . >/dev/null
  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_fpx_h=yes
else
  cat conftest.err >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_header_fpx_h=no
fi
rm -f conftest*

fi
echo "configure:7200: result: $ac_cv_header_fpx_h" >&5
echo "${ECHO_T}$ac_cv_header_fpx_h" >&6
if test $ac_cv_header_fpx_h = yes; then
  passed=`expr $passed + 1`
else
  failed=`expr $failed + 1`
fi

echo "configure:7208: checking for FPX_OpenImageByFilename in -lfpx" >&5
echo $ECHO_N "checking for FPX_OpenImageByFilename in -lfpx... $ECHO_C" >&6
if test "${ac_cv_lib_fpx_FPX_OpenImageByFilename+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lfpx  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 7216 "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 FPX_OpenImageByFilename ();
int
main ()
{
FPX_OpenImageByFilename ();
  ;
  return 0;
}
_ACEOF
if { (eval echo configure:7234: \"$ac_link\") >&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
  ac_cv_lib_fpx_FPX_OpenImageByFilename=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_lib_fpx_FPX_OpenImageByFilename=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "configure:7244: result: $ac_cv_lib_fpx_FPX_OpenImageByFilename" >&5
echo "${ECHO_T}$ac_cv_lib_fpx_FPX_OpenImageByFilename" >&6
if test $ac_cv_lib_fpx_FPX_OpenImageByFilename = yes; then
  passed=`expr $passed + 1`
else
  failed=`expr $failed + 1`
fi

    echo "configure:7252: checking if FlashPIX package is complete" >&5
echo $ECHO_N "checking if FlashPIX package is complete... $ECHO_C" >&6
    if test $passed -gt 0
    then
    if test $failed -gt 0
    then
	echo "configure:7258: result: no -- some components failed test" >&5
echo "${ECHO_T}no -- some components failed test" >&6
	have_fpx='no (failed tests)'
    else
	LIB_FPX='-lfpx'
	LIBS="$LIB_FPX $LIBS"
	
cat >>confdefs.h <<\EOF
#define HasFPX
EOF

	echo "configure:7269: result: yes" >&5
echo "${ECHO_T}yes" >&6
        have_fpx='yes'
    fi
    else
        echo "configure:7274: result: no" >&5
echo "${ECHO_T}no" >&6
    fi
fi

if test "$have_fpx" != 'no'; then
  HasFPX_TRUE=
  HasFPX_FALSE='#'
else
  HasFPX_TRUE='#'
  HasFPX_FALSE=
fi

#
# Check for LCMS
#
have_lcms='no'
LIB_LCMS=''
if test "$with_lcms" != 'no'
then

    failed=0;
    passed=0;

echo "configure:7298: checking for lcms.h" >&5
echo $ECHO_N "checking for lcms.h... $ECHO_C" >&6
if test "${ac_cv_header_lcms_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 7304 "configure"
#include "confdefs.h"
#include <lcms.h>

_ACEOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.err"
if { (eval echo configure:7310: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }; then
  if egrep -v '^ *\+' conftest.err | grep . >/dev/null
  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_lcms_h=yes
else
  cat conftest.err >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_header_lcms_h=no
fi
rm -f conftest*

fi
echo "configure:7332: result: $ac_cv_header_lcms_h" >&5
echo "${ECHO_T}$ac_cv_header_lcms_h" >&6
if test $ac_cv_header_lcms_h = yes; then
  passed=`expr $passed + 1`
else
  failed=`expr $failed + 1`
fi

echo "configure:7340: checking for cmsOpenProfileFromMem in -llcms" >&5
echo $ECHO_N "checking for cmsOpenProfileFromMem in -llcms... $ECHO_C" >&6
if test "${ac_cv_lib_lcms_cmsOpenProfileFromMem+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-llcms  $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 cmsOpenProfileFromMem ();
int
main ()
{
cmsOpenProfileFromMem ();
  ;
  return 0;
}
_ACEOF
if { (eval echo configure:7366: \"$ac_link\") >&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
  ac_cv_lib_lcms_cmsOpenProfileFromMem=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_lib_lcms_cmsOpenProfileFromMem=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "configure:7376: result: $ac_cv_lib_lcms_cmsOpenProfileFromMem" >&5
echo "${ECHO_T}$ac_cv_lib_lcms_cmsOpenProfileFromMem" >&6
if test $ac_cv_lib_lcms_cmsOpenProfileFromMem = yes; then
  passed=`expr $passed + 1`
else
  failed=`expr $failed + 1`
fi

    echo "configure:7384: checking if LCMS package is complete" >&5
echo $ECHO_N "checking if LCMS package is complete... $ECHO_C" >&6
    if test $passed -gt 0
    then
    if test $failed -gt 0
    then
	echo "configure:7390: result: no -- some components failed test" >&5
echo "${ECHO_T}no -- some components failed test" >&6
	have_lcms='no (failed tests)'
    else
	LIB_LCMS='-llcms'
	LIBS="$LIB_LCMS $LIBS"
	
cat >>confdefs.h <<\EOF
#define HasLCMS
EOF

	echo "configure:7401: result: yes" >&5
echo "${ECHO_T}yes" >&6
	have_lcms='yes'
    fi
    else
    echo "configure:7406: result: no" >&5
echo "${ECHO_T}no" >&6
    fi
fi

if test "$have_lcms" != 'no'; then
  HasLCMS_TRUE=
  HasLCMS_FALSE='#'
else
  HasLCMS_TRUE='#'
  HasLCMS_FALSE=
fi

#
# Check for PNG
#
have_png='no'
LIB_PNG=''
if test "$with_png" != 'no'
then

    failed=0;
    passed=0;

echo "configure:7430: 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 7436 "configure"
#include "confdefs.h"
#include <png.h>

_ACEOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.err"
if { (eval echo configure:7442: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }; then
  if egrep -v '^ *\+' conftest.err | grep . >/dev/null
  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
  cat conftest.err >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_header_png_h=no
fi
rm -f conftest*

fi
echo "configure:7464: 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
  passed=`expr $passed + 1`
else
  failed=`expr $failed + 1`
fi

echo "configure:7472: checking for pngconf.h" >&5
echo $ECHO_N "checking for pngconf.h... $ECHO_C" >&6
if test "${ac_cv_header_pngconf_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 7478 "configure"
#include "confdefs.h"
#include <pngconf.h>

_ACEOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.err"
if { (eval echo configure:7484: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }; then
  if egrep -v '^ *\+' conftest.err | grep . >/dev/null
  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_pngconf_h=yes
else
  cat conftest.err >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_header_pngconf_h=no
fi
rm -f conftest*

fi
echo "configure:7506: result: $ac_cv_header_pngconf_h" >&5
echo "${ECHO_T}$ac_cv_header_pngconf_h" >&6
if test $ac_cv_header_pngconf_h = yes; then
  passed=`expr $passed + 1`
else
  failed=`expr $failed + 1`
fi

echo "configure:7514: checking for png_info_init in -lpng" >&5
echo $ECHO_N "checking for png_info_init in -lpng... $ECHO_C" >&6
if test "${ac_cv_lib_png_png_info_init+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lpng  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 7522 "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_info_init ();
int
main ()
{
png_info_init ();
  ;
  return 0;
}
_ACEOF
if { (eval echo configure:7540: \"$ac_link\") >&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
  ac_cv_lib_png_png_info_init=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_lib_png_png_info_init=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "configure:7550: result: $ac_cv_lib_png_png_info_init" >&5
echo "${ECHO_T}$ac_cv_lib_png_png_info_init" >&6
if test $ac_cv_lib_png_png_info_init = yes; then
  passed=`expr $passed + 1`
else
  failed=`expr $failed + 1`
fi

    echo "configure:7558: checking if PNG package is complete" >&5
echo $ECHO_N "checking if PNG package is complete... $ECHO_C" >&6
    if test $passed -gt 0
    then
    if test $failed -gt 0
    then
	echo "configure:7564: result: no -- some components failed test" >&5
echo "${ECHO_T}no -- some components failed test" >&6
	have_png='no (failed tests)'
    else
	LIB_PNG='-lpng'
	LIBS="$LIB_PNG $LIBS"
	
cat >>confdefs.h <<\EOF
#define HasPNG
EOF

	echo "configure:7575: result: yes" >&5
echo "${ECHO_T}yes" >&6
	have_png='yes'
    fi
    else
    echo "configure:7580: result: no" >&5
echo "${ECHO_T}no" >&6
    fi
fi

if test "$have_png" != 'no'; then
  HasPNG_TRUE=
  HasPNG_FALSE='#'
else
  HasPNG_TRUE='#'
  HasPNG_FALSE=
fi

#
# Check for JPEG
#
have_jpeg='no'
LIB_JPEG=''
if test "$with_jpeg" != 'no'
then

    failed=0;
    passed=0;

echo "configure:7604: checking for jconfig.h" >&5
echo $ECHO_N "checking for jconfig.h... $ECHO_C" >&6
if test "${ac_cv_header_jconfig_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 7610 "configure"
#include "confdefs.h"
#include <jconfig.h>

_ACEOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.err"
if { (eval echo configure:7616: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }; then
  if egrep -v '^ *\+' conftest.err | grep . >/dev/null
  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_jconfig_h=yes
else
  cat conftest.err >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_header_jconfig_h=no
fi
rm -f conftest*

fi
echo "configure:7638: result: $ac_cv_header_jconfig_h" >&5
echo "${ECHO_T}$ac_cv_header_jconfig_h" >&6
if test $ac_cv_header_jconfig_h = yes; then
  passed=`expr $passed + 1`
else
  failed=`expr $failed + 1`
fi

echo "configure:7646: checking for jerror.h" >&5
echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6
if test "${ac_cv_header_jerror_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 7652 "configure"
#include "confdefs.h"
#include <jerror.h>

_ACEOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.err"
if { (eval echo configure:7658: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }; then
  if egrep -v '^ *\+' conftest.err | grep . >/dev/null
  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_jerror_h=yes
else
  cat conftest.err >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_header_jerror_h=no
fi
rm -f conftest*

fi
echo "configure:7680: result: $ac_cv_header_jerror_h" >&5
echo "${ECHO_T}$ac_cv_header_jerror_h" >&6
if test $ac_cv_header_jerror_h = yes; then
  passed=`expr $passed + 1`
else
  failed=`expr $failed + 1`
fi

echo "configure:7688: checking for jmorecfg.h" >&5
echo $ECHO_N "checking for jmorecfg.h... $ECHO_C" >&6
if test "${ac_cv_header_jmorecfg_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 7694 "configure"
#include "confdefs.h"
#include <jmorecfg.h>

_ACEOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.err"
if { (eval echo configure:7700: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }; then
  if egrep -v '^ *\+' conftest.err | grep . >/dev/null
  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_jmorecfg_h=yes
else
  cat conftest.err >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_header_jmorecfg_h=no
fi
rm -f conftest*

fi
echo "configure:7722: result: $ac_cv_header_jmorecfg_h" >&5
echo "${ECHO_T}$ac_cv_header_jmorecfg_h" >&6
if test $ac_cv_header_jmorecfg_h = yes; then
  passed=`expr $passed + 1`
else
  failed=`expr $failed + 1`
fi

echo "configure:7730: checking for jpeglib.h" >&5
echo $ECHO_N "checking for jpeglib.h... $ECHO_C" >&6
if test "${ac_cv_header_jpeglib_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 7736 "configure"
#include "confdefs.h"
#include <jpeglib.h>

_ACEOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.err"
if { (eval echo configure:7742: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }; then
  if egrep -v '^ *\+' conftest.err | grep . >/dev/null
  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_jpeglib_h=yes
else
  cat conftest.err >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_header_jpeglib_h=no
fi
rm -f conftest*

fi
echo "configure:7764: result: $ac_cv_header_jpeglib_h" >&5
echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6
if test $ac_cv_header_jpeglib_h = yes; then
  passed=`expr $passed + 1`
else
  failed=`expr $failed + 1`
fi

echo "configure:7772: checking for jpeg_read_header in -ljpeg" >&5
echo $ECHO_N "checking for jpeg_read_header in -ljpeg... $ECHO_C" >&6
if test "${ac_cv_lib_jpeg_jpeg_read_header+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-ljpeg  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 7780 "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 jpeg_read_header ();
int
main ()
{
jpeg_read_header ();
  ;
  return 0;
}
_ACEOF
if { (eval echo configure:7798: \"$ac_link\") >&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
  ac_cv_lib_jpeg_jpeg_read_header=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_lib_jpeg_jpeg_read_header=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "configure:7808: result: $ac_cv_lib_jpeg_jpeg_read_header" >&5
echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_read_header" >&6
if test $ac_cv_lib_jpeg_jpeg_read_header = yes; then
  passed=`expr $passed + 1`
else
  failed=`expr $failed + 1`
fi

# Test for compatable JPEG library
if test "$ac_cv_jpeg_version_ok" != 'yes' ; then
echo "configure:7818: checking for JPEG library is version 6b or later" >&5
echo $ECHO_N "checking for JPEG library is version 6b or later... $ECHO_C" >&6
if test "${ac_cv_jpeg_version_ok+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$cross_compiling" = yes; then
  { echo "configure: error: cannot run test program while cross compiling" >&2; exit 1; }
else
  cat >conftest.$ac_ext <<_ACEOF
#line 7827 "configure"
#include "confdefs.h"

#include <stdio.h>
#include <jpeglib.h>
int
main ()
{
if ( JPEG_LIB_VERSION >= 62 ) exit(0);
exit(1);
}

_ACEOF
if { (eval echo configure:7840: \"$ac_link\") >&5; (eval $ac_link) 2>&5; } &&
   test -s conftest$ac_exeext && (./conftest; exit) 2>/dev/null; then
  ac_cv_jpeg_version_ok='yes'
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_jpeg_version_ok='no'
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi

fi
echo "configure:7852: result: $ac_cv_jpeg_version_ok" >&5
echo "${ECHO_T}$ac_cv_jpeg_version_ok" >&6
if test "$ac_cv_jpeg_version_ok" = 'yes' ; then
 echo "configure:7855: result: yes" >&5
echo "${ECHO_T}yes" >&6
 passed=`expr $passed + 1`
else
 echo "configure:7859: result: no" >&5
echo "${ECHO_T}no" >&6
 failed=`expr $failed + 1`
fi
fi
    echo "configure:7864: checking if JPEG package is complete" >&5
echo $ECHO_N "checking if JPEG package is complete... $ECHO_C" >&6
    if test $passed -gt 0
    then
    if test $failed -gt 0
    then
	echo "configure:7870: result: no -- some components failed test" >&5
echo "${ECHO_T}no -- some components failed test" >&6
        have_jpeg='no (failed tests)'
    else
	LIB_JPEG='-ljpeg'
	LIBS="$LIB_JPEG $LIBS"
	
cat >>confdefs.h <<\EOF
#define HasJPEG
EOF

	echo "configure:7881: result: yes" >&5
echo "${ECHO_T}yes" >&6
        have_jpeg='yes'
    fi
    else
        echo "configure:7886: result: no" >&5
echo "${ECHO_T}no" >&6
    fi
fi

if test "$have_jpeg" != 'no'; then
  HasJPEG_TRUE=
  HasJPEG_FALSE='#'
else
  HasJPEG_TRUE='#'
  HasJPEG_FALSE=
fi

#
# Check for TTF
#
have_ttf='no'
LIB_TTF=''
if test "$with_ttf" != 'no'
then

    failed=0;
    passed=0;

for ac_header in freetype.h freetype/freetype.h
do
ac_ac_Header=`echo "ac_cv_header_$ac_header" | $ac_tr_sh`

echo "configure:7914: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$ac_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 7920 "configure"
#include "confdefs.h"
#include <$ac_header>

_ACEOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.err"
if { (eval echo configure:7926: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }; then
  if egrep -v '^ *\+' conftest.err | grep . >/dev/null
  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 "$ac_ac_Header=yes"
else
  cat conftest.err >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_Header=no"
fi
rm -f conftest*

fi
echo "configure:7948: result: `eval echo '${'$ac_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$ac_ac_Header'}'`" >&6
if test `eval echo '${'$ac_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $ac_tr_cpp` 1
EOF

fi
done

    if test "$ac_cv_header_freetype_h" = 'yes' -o "$ac_cv_header_freetype_freetype_h" = 'yes'
    then
	passed=`expr $passed + 1`
    else
	failed=`expr $failed + 1`
    fi
    if test "$LIB_TTF" = ''
    then

echo "configure:7967: checking for FT_Init_FreeType in -lfreetype" >&5
echo $ECHO_N "checking for FT_Init_FreeType in -lfreetype... $ECHO_C" >&6
if test "${ac_cv_lib_freetype_FT_Init_FreeType+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lfreetype  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 7975 "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 FT_Init_FreeType ();
int
main ()
{
FT_Init_FreeType ();
  ;
  return 0;
}
_ACEOF
if { (eval echo configure:7993: \"$ac_link\") >&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
  ac_cv_lib_freetype_FT_Init_FreeType=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_lib_freetype_FT_Init_FreeType=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "configure:8003: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
echo "${ECHO_T}$ac_cv_lib_freetype_FT_Init_FreeType" >&6
if test $ac_cv_lib_freetype_FT_Init_FreeType = yes; then
  LIB_TTF='-lfreetype'

fi

      if test "$LIB_TTF" != ''
      then
         passed=`expr $passed + 1`
      fi
    fi
    if test "$LIB_TTF" = ''
    then

echo "configure:8018: checking for TT_Init_FreeType in -lttf" >&5
echo $ECHO_N "checking for TT_Init_FreeType in -lttf... $ECHO_C" >&6
if test "${ac_cv_lib_ttf_TT_Init_FreeType+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lttf  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 8026 "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 TT_Init_FreeType ();
int
main ()
{
TT_Init_FreeType ();
  ;
  return 0;
}
_ACEOF
if { (eval echo configure:8044: \"$ac_link\") >&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
  ac_cv_lib_ttf_TT_Init_FreeType=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_lib_ttf_TT_Init_FreeType=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "configure:8054: result: $ac_cv_lib_ttf_TT_Init_FreeType" >&5
echo "${ECHO_T}$ac_cv_lib_ttf_TT_Init_FreeType" >&6
if test $ac_cv_lib_ttf_TT_Init_FreeType = yes; then
  LIB_TTF='-lttf'

fi

      if test "$LIB_TTF" != ''
      then
         passed=`expr $passed + 1`
      else
         failed=`expr $failed + 1`
      fi
    fi
    echo "configure:8068: checking if FreeType package is complete" >&5
echo $ECHO_N "checking if FreeType package is complete... $ECHO_C" >&6
    if test $passed -gt 0
    then
	if test $failed -gt 0
	then
            LIB_TTF=''
	    echo "configure:8075: result: no -- some components failed test" >&5
echo "${ECHO_T}no -- some components failed test" >&6
	    have_ttf='no (failed tests)'
	else
	    LIBS="$LIB_TTF $LIBS"
	
cat >>confdefs.h <<\EOF
#define HasTTF
EOF

	    echo "configure:8085: result: yes" >&5
echo "${ECHO_T}yes" >&6
	    have_ttf='yes'
	fi
    else
	echo "configure:8090: result: no" >&5
echo "${ECHO_T}no" >&6
    fi
fi

if test "$have_ttf" != 'no'; then
  HasTTF_TRUE=
  HasTTF_FALSE='#'
else
  HasTTF_TRUE='#'
  HasTTF_FALSE=
fi

#
# Check for TIFF
#
have_tiff='no'
LIB_TIFF=''
if test "$with_tiff" != 'no'
then

    failed=0;
    passed=0;

echo "configure:8114: checking for tiff.h" >&5
echo $ECHO_N "checking for tiff.h... $ECHO_C" >&6
if test "${ac_cv_header_tiff_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 8120 "configure"
#include "confdefs.h"
#include <tiff.h>

_ACEOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.err"
if { (eval echo configure:8126: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }; then
  if egrep -v '^ *\+' conftest.err | grep . >/dev/null
  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_tiff_h=yes
else
  cat conftest.err >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_header_tiff_h=no
fi
rm -f conftest*

fi
echo "configure:8148: result: $ac_cv_header_tiff_h" >&5
echo "${ECHO_T}$ac_cv_header_tiff_h" >&6
if test $ac_cv_header_tiff_h = yes; then
  passed=`expr $passed + 1`
else
  failed=`expr $failed + 1`
fi

echo "configure:8156: checking for tiffio.h" >&5
echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6
if test "${ac_cv_header_tiffio_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 8162 "configure"
#include "confdefs.h"
#include <tiffio.h>

_ACEOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.err"
if { (eval echo configure:8168: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }; then
  if egrep -v '^ *\+' conftest.err | grep . >/dev/null
  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_tiffio_h=yes
else
  cat conftest.err >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_header_tiffio_h=no
fi
rm -f conftest*

fi
echo "configure:8190: result: $ac_cv_header_tiffio_h" >&5
echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6
if test $ac_cv_header_tiffio_h = yes; then
  passed=`expr $passed + 1`
else
  failed=`expr $failed + 1`
fi

echo "configure:8198: checking for TIFFOpen in -ltiff" >&5
echo $ECHO_N "checking for TIFFOpen in -ltiff... $ECHO_C" >&6
if test "${ac_cv_lib_tiff_TIFFOpen+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-ltiff  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 8206 "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 TIFFOpen ();
int
main ()
{
TIFFOpen ();
  ;
  return 0;
}
_ACEOF
if { (eval echo configure:8224: \"$ac_link\") >&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
  ac_cv_lib_tiff_TIFFOpen=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_lib_tiff_TIFFOpen=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "configure:8234: result: $ac_cv_lib_tiff_TIFFOpen" >&5
echo "${ECHO_T}$ac_cv_lib_tiff_TIFFOpen" >&6
if test $ac_cv_lib_tiff_TIFFOpen = yes; then
  passed=`expr $passed + 1`
else
  failed=`expr $failed + 1`
fi

    echo "configure:8242: checking if TIFF package is complete" >&5
echo $ECHO_N "checking if TIFF package is complete... $ECHO_C" >&6
    if test $passed -gt 0
    then
    if test $failed -gt 0
    then
	echo "configure:8248: result: no -- some components failed test" >&5
echo "${ECHO_T}no -- some components failed test" >&6
	have_tiff='no (failed tests)'
    else
	LIB_TIFF='-ltiff'
	LIBS="$LIB_TIFF $LIBS"
	
cat >>confdefs.h <<\EOF
#define HasTIFF
EOF

	echo "configure:8259: result: yes" >&5
echo "${ECHO_T}yes" >&6
	have_tiff='yes'
	
for ac_header in tiffconf.h
do
ac_ac_Header=`echo "ac_cv_header_$ac_header" | $ac_tr_sh`

echo "configure:8267: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$ac_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 8273 "configure"
#include "confdefs.h"
#include <$ac_header>

_ACEOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.err"
if { (eval echo configure:8279: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }; then
  if egrep -v '^ *\+' conftest.err | grep . >/dev/null
  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 "$ac_ac_Header=yes"
else
  cat conftest.err >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_Header=no"
fi
rm -f conftest*

fi
echo "configure:8301: result: `eval echo '${'$ac_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$ac_ac_Header'}'`" >&6
if test `eval echo '${'$ac_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $ac_tr_cpp` 1
EOF

fi
done

    fi
    else
    echo "configure:8313: result: no" >&5
echo "${ECHO_T}no" >&6
    fi
fi

if test "$have_tiff" != 'no'; then
  HasTIFF_TRUE=
  HasTIFF_FALSE='#'
else
  HasTIFF_TRUE='#'
  HasTIFF_FALSE=
fi

#
# Check for HDF
#
have_hdf='no'
LIB_HDF=''
if test "$with_hdf" != 'no'
then

    failed=0;
    passed=0;

for ac_header in hdf.h hdf/hdf.h
do
ac_ac_Header=`echo "ac_cv_header_$ac_header" | $ac_tr_sh`

echo "configure:8341: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$ac_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 8347 "configure"
#include "confdefs.h"
#include <$ac_header>

_ACEOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.err"
if { (eval echo configure:8353: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }; then
  if egrep -v '^ *\+' conftest.err | grep . >/dev/null
  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 "$ac_ac_Header=yes"
else
  cat conftest.err >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_Header=no"
fi
rm -f conftest*

fi
echo "configure:8375: result: `eval echo '${'$ac_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$ac_ac_Header'}'`" >&6
if test `eval echo '${'$ac_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $ac_tr_cpp` 1
EOF

fi
done

    if test "$ac_cv_header_hdf_h" = 'yes' -o "$ac_cv_header_hdf_hdf_h" = 'yes'
    then
	passed=`expr $passed + 1`
    else
	failed=`expr $failed + 1`
    fi

echo "configure:8392: checking for DFANputlabel in -ldf" >&5
echo $ECHO_N "checking for DFANputlabel in -ldf... $ECHO_C" >&6
if test "${ac_cv_lib_df_DFANputlabel+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-ldf  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 8400 "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 DFANputlabel ();
int
main ()
{
DFANputlabel ();
  ;
  return 0;
}
_ACEOF
if { (eval echo configure:8418: \"$ac_link\") >&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
  ac_cv_lib_df_DFANputlabel=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_lib_df_DFANputlabel=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "configure:8428: result: $ac_cv_lib_df_DFANputlabel" >&5
echo "${ECHO_T}$ac_cv_lib_df_DFANputlabel" >&6
if test $ac_cv_lib_df_DFANputlabel = yes; then
  passed=`expr $passed + 1`
else
  failed=`expr $failed + 1`
fi

    echo "configure:8436: checking if HDF package is complete" >&5
echo $ECHO_N "checking if HDF package is complete... $ECHO_C" >&6
    if test $passed -gt 0
    then
    if test $failed -gt 0
    then
	echo "configure:8442: result: no -- some components failed test" >&5
echo "${ECHO_T}no -- some components failed test" >&6
        have_hdf='no (failed tests)'
    else
	LIB_HDF='-ldf'
	LIBS="$LIB_HDF $LIBS"
	
cat >>confdefs.h <<\EOF
#define HasHDF
EOF

	echo "configure:8453: result: yes" >&5
echo "${ECHO_T}yes" >&6
	have_hdf='yes'
    fi
    else
    echo "configure:8458: result: no" >&5
echo "${ECHO_T}no" >&6
    fi
fi

if test "$have_hdf" != 'no'; then
  HasHDF_TRUE=
  HasHDF_FALSE='#'
else
  HasHDF_TRUE='#'
  HasHDF_FALSE=
fi

#
# Check for JBIG
#
have_jbig='no'
LIB_JBIG=''
if test "$with_jbig" != 'no'
then

    failed=0;
    passed=0;

echo "configure:8482: checking for jbig.h" >&5
echo $ECHO_N "checking for jbig.h... $ECHO_C" >&6
if test "${ac_cv_header_jbig_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 8488 "configure"
#include "confdefs.h"
#include <jbig.h>

_ACEOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.err"
if { (eval echo configure:8494: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }; then
  if egrep -v '^ *\+' conftest.err | grep . >/dev/null
  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_jbig_h=yes
else
  cat conftest.err >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_header_jbig_h=no
fi
rm -f conftest*

fi
echo "configure:8516: result: $ac_cv_header_jbig_h" >&5
echo "${ECHO_T}$ac_cv_header_jbig_h" >&6
if test $ac_cv_header_jbig_h = yes; then
  passed=`expr $passed + 1`
else
  failed=`expr $failed + 1`
fi

echo "configure:8524: checking for jbg_dec_init in -ljbig" >&5
echo $ECHO_N "checking for jbg_dec_init in -ljbig... $ECHO_C" >&6
if test "${ac_cv_lib_jbig_jbg_dec_init+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-ljbig  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 8532 "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 jbg_dec_init ();
int
main ()
{
jbg_dec_init ();
  ;
  return 0;
}
_ACEOF
if { (eval echo configure:8550: \"$ac_link\") >&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
  ac_cv_lib_jbig_jbg_dec_init=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_lib_jbig_jbg_dec_init=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "configure:8560: result: $ac_cv_lib_jbig_jbg_dec_init" >&5
echo "${ECHO_T}$ac_cv_lib_jbig_jbg_dec_init" >&6
if test $ac_cv_lib_jbig_jbg_dec_init = yes; then
  passed=`expr $passed + 1`
else
  failed=`expr $failed + 1`
fi

    echo "configure:8568: checking if JBIG package is complete" >&5
echo $ECHO_N "checking if JBIG package is complete... $ECHO_C" >&6
    if test $passed -gt 0
    then
    if test $failed -gt 0
    then
	echo "configure:8574: result: no -- some components failed test" >&5
echo "${ECHO_T}no -- some components failed test" >&6
        have_jbig='no (failed tests)'
    else
	LIB_JBIG='-ljbig'
	LIBS="$LIB_JBIG $LIBS"
	
cat >>confdefs.h <<\EOF
#define HasJBIG
EOF

	echo "configure:8585: result: yes" >&5
echo "${ECHO_T}yes" >&6
        have_jbig='yes'
    fi
    else
        echo "configure:8590: result: no" >&5
echo "${ECHO_T}no" >&6
    fi
fi

if test "$have_jbig" != 'no'; then
  HasJBIG_TRUE=
  HasJBIG_FALSE='#'
else
  HasJBIG_TRUE='#'
  HasJBIG_FALSE=
fi

#
# Check for XML
#
have_xml='no'
LIB_XML=''
if test "$with_xml" != 'no'
then

    failed=0;
    passed=0;

echo "configure:8614: checking for libxml/parser.h" >&5
echo $ECHO_N "checking for libxml/parser.h... $ECHO_C" >&6
if test "${ac_cv_header_libxml_parser_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 8620 "configure"
#include "confdefs.h"
#include <libxml/parser.h>

_ACEOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.err"
if { (eval echo configure:8626: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }; then
  if egrep -v '^ *\+' conftest.err | grep . >/dev/null
  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_libxml_parser_h=yes
else
  cat conftest.err >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_header_libxml_parser_h=no
fi
rm -f conftest*

fi
echo "configure:8648: result: $ac_cv_header_libxml_parser_h" >&5
echo "${ECHO_T}$ac_cv_header_libxml_parser_h" >&6
if test $ac_cv_header_libxml_parser_h = yes; then
  passed=`expr $passed + 1`
else
  failed=`expr $failed + 1`
fi

echo "configure:8656: checking for xmlParseExternalEntity in -lxml" >&5
echo $ECHO_N "checking for xmlParseExternalEntity in -lxml... $ECHO_C" >&6
if test "${ac_cv_lib_xml_xmlParseExternalEntity+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lxml  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line 8664 "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 xmlParseExternalEntity ();
int
main ()
{
xmlParseExternalEntity ();
  ;
  return 0;
}
_ACEOF
if { (eval echo configure:8682: \"$ac_link\") >&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
  ac_cv_lib_xml_xmlParseExternalEntity=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_lib_xml_xmlParseExternalEntity=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "configure:8692: result: $ac_cv_lib_xml_xmlParseExternalEntity" >&5
echo "${ECHO_T}$ac_cv_lib_xml_xmlParseExternalEntity" >&6
if test $ac_cv_lib_xml_xmlParseExternalEntity = yes; then
  passed=`expr $passed + 1`
else
  failed=`expr $failed + 1`
fi

    echo "configure:8700: checking if XML package is complete" >&5
echo $ECHO_N "checking if XML package is complete... $ECHO_C" >&6
    if test $passed -gt 0
    then
    if test $failed -gt 0
    then
	echo "configure:8706: result: no -- some components failed test" >&5
echo "${ECHO_T}no -- some components failed test" >&6
        have_xml='no (failed tests)'
    else
	LIB_XML='-lxml'
	LIBS="$LIB_XML $LIBS"
	
cat >>confdefs.h <<\EOF
#define HasXML
EOF

	echo "configure:8717: result: yes" >&5
echo "${ECHO_T}yes" >&6
        have_xml='yes'

	# check which xml error header file to use

for ac_header in libxml/xml-error.h libxml/xmlerror.h
do
ac_ac_Header=`echo "ac_cv_header_$ac_header" | $ac_tr_sh`

echo "configure:8727: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$ac_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 8733 "configure"
#include "confdefs.h"
#include <$ac_header>

_ACEOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.err"
if { (eval echo configure:8739: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }; then
  if egrep -v '^ *\+' conftest.err | grep . >/dev/null
  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 "$ac_ac_Header=yes"
else
  cat conftest.err >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_Header=no"
fi
rm -f conftest*

fi
echo "configure:8761: result: `eval echo '${'$ac_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$ac_ac_Header'}'`" >&6
if test `eval echo '${'$ac_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $ac_tr_cpp` 1
EOF

fi
done

    fi
    else
        echo "configure:8773: result: no" >&5
echo "${ECHO_T}no" >&6
    fi
fi

if test "$have_xml" != 'no'; then
  HasXML_TRUE=
  HasXML_FALSE='#'
else
  HasXML_TRUE='#'
  HasXML_FALSE=
fi

# Check standard headers
echo "configure:8787: 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 8793 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <float.h>

_ACEOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.err"
if { (eval echo configure:8802: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }; then
  if egrep -v '^ *\+' conftest.err | grep . >/dev/null
  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
  cat conftest.err >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_header_stdc=no
fi
rm -f conftest*

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 8826 "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 8844 "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 8865 "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
if { (eval echo configure:8890: \"$ac_link\") >&5; (eval $ac_link) 2>&5; } &&
   test -s conftest$ac_exeext && (./conftest; exit) 2>/dev/null; then
  :
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_header_stdc=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi

fi
fi
echo "configure:8903: 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 "configure:8913: checking whether stat file-mode macros are broken" >&5
echo $ECHO_N "checking whether stat file-mode macros are broken... $ECHO_C" >&6
if test "${ac_cv_header_stat_broken+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 8919 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>

#if defined(S_ISBLK) && defined(S_IFDIR)
# if S_ISBLK (S_IFDIR)
You lose.
# endif
#endif

#if defined(S_ISBLK) && defined(S_IFCHR)
# if S_ISBLK (S_IFCHR)
You lose.
# endif
#endif

#if defined(S_ISLNK) && defined(S_IFREG)
# if S_ISLNK (S_IFREG)
You lose.
# endif
#endif

#if defined(S_ISSOCK) && defined(S_IFREG)
# if S_ISSOCK (S_IFREG)
You lose.
# endif
#endif

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

fi
echo "configure:8958: result: $ac_cv_header_stat_broken" >&5
echo "${ECHO_T}$ac_cv_header_stat_broken" >&6
if test $ac_cv_header_stat_broken = yes; then

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

fi

echo "configure:8968: 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 8974 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
#include <time.h>

int
main ()
{
struct tm *tp;
  ;
  return 0;
}
_ACEOF
if { (eval echo configure:8988: \"$ac_compile\") >&5; (eval $ac_compile) 2>&5; } && test -s conftest.$ac_objext; then
  ac_cv_header_time=yes
else
  echo "configure: 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 "configure:8997: 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

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

int
main ()
{
DIR *dirp = 0;
  ;
  return 0;
}
_ACEOF
if { (eval echo configure:9029: \"$ac_compile\") >&5; (eval $ac_compile) 2>&5; } && test -s conftest.$ac_objext; then
  eval "$ac_ac_Header=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_Header=no"
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "configure:9038: result: `eval echo '${'$ac_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$ac_ac_Header'}'`" >&6
if test `eval echo '${'$ac_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_hdr" | $ac_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 "configure:9053: 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 9061 "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
if { (eval echo configure:9079: \"$ac_link\") >&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
  ac_cv_lib_dir_opendir=yes
else
  echo "configure: 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 "configure:9089: 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 "configure:9098: 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 9106 "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
if { (eval echo configure:9124: \"$ac_link\") >&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
  ac_cv_lib_x_opendir=yes
else
  echo "configure: 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 "configure:9134: 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

for ac_header in sys/select.h sys/time.h sys/stat.h sys/types.h
do
ac_ac_Header=`echo "ac_cv_header_$ac_header" | $ac_tr_sh`

echo "configure:9147: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$ac_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 9153 "configure"
#include "confdefs.h"
#include <$ac_header>

_ACEOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.err"
if { (eval echo configure:9159: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }; then
  if egrep -v '^ *\+' conftest.err | grep . >/dev/null
  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 "$ac_ac_Header=yes"
else
  cat conftest.err >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_Header=no"
fi
rm -f conftest*

fi
echo "configure:9181: result: `eval echo '${'$ac_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$ac_ac_Header'}'`" >&6
if test `eval echo '${'$ac_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $ac_tr_cpp` 1
EOF

fi
done

for ac_header in math.h string.h stdarg.h varargs.h pwd.h malloc.h
do
ac_ac_Header=`echo "ac_cv_header_$ac_header" | $ac_tr_sh`

echo "configure:9195: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$ac_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 9201 "configure"
#include "confdefs.h"
#include <$ac_header>

_ACEOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.err"
if { (eval echo configure:9207: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }; then
  if egrep -v '^ *\+' conftest.err | grep . >/dev/null
  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 "$ac_ac_Header=yes"
else
  cat conftest.err >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_Header=no"
fi
rm -f conftest*

fi
echo "configure:9229: result: `eval echo '${'$ac_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$ac_ac_Header'}'`" >&6
if test `eval echo '${'$ac_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $ac_tr_cpp` 1
EOF

fi
done

for ac_header in memory.h errno.h fcntl.h
do
ac_ac_Header=`echo "ac_cv_header_$ac_header" | $ac_tr_sh`

echo "configure:9243: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$ac_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 9249 "configure"
#include "confdefs.h"
#include <$ac_header>

_ACEOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.err"
if { (eval echo configure:9255: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }; then
  if egrep -v '^ *\+' conftest.err | grep . >/dev/null
  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 "$ac_ac_Header=yes"
else
  cat conftest.err >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_Header=no"
fi
rm -f conftest*

fi
echo "configure:9277: result: `eval echo '${'$ac_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$ac_ac_Header'}'`" >&6
if test `eval echo '${'$ac_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $ac_tr_cpp` 1
EOF

fi
done

# Checks for typedefs, structures, and compiler characteristics.
echo "configure:9288: checking for ${CC-cc} option to accept ANSI C" >&5
echo $ECHO_N "checking for ${CC-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
# 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"
  cat >conftest.$ac_ext <<_ACEOF
#line 9306 "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
if { (eval echo configure:9344: \"$ac_compile\") >&5; (eval $ac_compile) 2>&5; } && test -s conftest.$ac_objext; then
  ac_cv_prog_cc_stdc=$ac_arg; break
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5

fi
rm -f conftest.$ac_objext conftest.$ac_ext
done
CC=$ac_save_CC

fi

case "x$ac_cv_prog_cc_stdc" in
  x|xno)
    echo "configure:9359: result: none needed" >&5
echo "${ECHO_T}none needed" >&6 ;;
  *)
    echo "configure:9362: 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 "configure:9367: 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 9373 "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
if { (eval echo configure:9430: \"$ac_compile\") >&5; (eval $ac_compile) 2>&5; } && test -s conftest.$ac_objext; then
  ac_cv_c_const=yes
else
  echo "configure: 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 "configure:9439: 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

echo "configure:9449: 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 9457 "configure"
#include "confdefs.h"
#ifndef __cplusplus
$ac_kw int foo () {return 0; }
#endif

_ACEOF
if { (eval echo configure:9464: \"$ac_compile\") >&5; (eval $ac_compile) 2>&5; } && test -s conftest.$ac_objext; then
  ac_cv_c_inline=$ac_kw; break
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5

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

fi
echo "configure:9475: 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 "configure:9490: 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 9498 "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
if { (eval echo configure:9514: \"$ac_compile\") >&5; (eval $ac_compile) 2>&5; } && test -s conftest.$ac_objext; then
  # It does; now see whether it defined to BIG_ENDIAN or not.
cat >conftest.$ac_ext <<_ACEOF
#line 9517 "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
if { (eval echo configure:9533: \"$ac_compile\") >&5; (eval $ac_compile) 2>&5; } && test -s conftest.$ac_objext; then
  ac_cv_c_bigendian=yes
else
  echo "configure: 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 "configure: 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 "configure: error: cannot run test program while cross compiling" >&2; exit 1; }
else
  cat >conftest.$ac_ext <<_ACEOF
#line 9552 "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
if { (eval echo configure:9567: \"$ac_link\") >&5; (eval $ac_link) 2>&5; } &&
   test -s conftest$ac_exeext && (./conftest; exit) 2>/dev/null; then
  ac_cv_c_bigendian=no
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_c_bigendian=yes
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi

fi
fi
echo "configure:9580: 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 "configure:9590: checking for mode_t" >&5
echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
if test "${ac_cv_type_mode_t+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 9596 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
if ((mode_t *) 0)
  return 0;
if (sizeof (mode_t))
  return 0;
  ;
  return 0;
}
_ACEOF
if { (eval echo configure:9610: \"$ac_compile\") >&5; (eval $ac_compile) 2>&5; } && test -s conftest.$ac_objext; then
  ac_cv_type_mode_t=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_type_mode_t=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "configure:9619: result: $ac_cv_type_mode_t" >&5
echo "${ECHO_T}$ac_cv_type_mode_t" >&6
if test $ac_cv_type_mode_t = yes; then
  :
else

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

fi

echo "configure:9631: 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 9637 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
if ((off_t *) 0)
  return 0;
if (sizeof (off_t))
  return 0;
  ;
  return 0;
}
_ACEOF
if { (eval echo configure:9651: \"$ac_compile\") >&5; (eval $ac_compile) 2>&5; } && test -s conftest.$ac_objext; then
  ac_cv_type_off_t=yes
else
  echo "configure: 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 "configure:9660: 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 "configure:9672: 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 9678 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
if ((pid_t *) 0)
  return 0;
if (sizeof (pid_t))
  return 0;
  ;
  return 0;
}
_ACEOF
if { (eval echo configure:9692: \"$ac_compile\") >&5; (eval $ac_compile) 2>&5; } && test -s conftest.$ac_objext; then
  ac_cv_type_pid_t=yes
else
  echo "configure: 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 "configure:9701: 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 "configure:9713: 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 9719 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
if ((size_t *) 0)
  return 0;
if (sizeof (size_t))
  return 0;
  ;
  return 0;
}
_ACEOF
if { (eval echo configure:9733: \"$ac_compile\") >&5; (eval $ac_compile) 2>&5; } && test -s conftest.$ac_objext; then
  ac_cv_type_size_t=yes
else
  echo "configure: 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 "configure:9742: 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 "configure:9754: checking for int" >&5
echo $ECHO_N "checking for int... $ECHO_C" >&6
if test "${ac_cv_type_int+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 9760 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
if ((int *) 0)
  return 0;
if (sizeof (int))
  return 0;
  ;
  return 0;
}
_ACEOF
if { (eval echo configure:9774: \"$ac_compile\") >&5; (eval $ac_compile) 2>&5; } && test -s conftest.$ac_objext; then
  ac_cv_type_int=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_type_int=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "configure:9783: result: $ac_cv_type_int" >&5
echo "${ECHO_T}$ac_cv_type_int" >&6

echo "configure:9786: checking size of int" >&5
echo $ECHO_N "checking size of int... $ECHO_C" >&6
if test "${ac_cv_sizeof_int+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$ac_cv_type_int" = yes; then
  if test "$cross_compiling" = yes; then
  # Depending upon the size, compute the lo and hi bounds.
cat >conftest.$ac_ext <<_ACEOF
#line 9795 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
int _array_ [1 - 2 * !((sizeof (int)) >= 0)]
  ;
  return 0;
}
_ACEOF
if { (eval echo configure:9806: \"$ac_compile\") >&5; (eval $ac_compile) 2>&5; } && test -s conftest.$ac_objext; then
  ac_lo=0 ac_try=0
  while true; do
    cat >conftest.$ac_ext <<_ACEOF
#line 9810 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
int _array_ [1 - 2 * !((sizeof (int)) <= $ac_try)]
  ;
  return 0;
}
_ACEOF
if { (eval echo configure:9821: \"$ac_compile\") >&5; (eval $ac_compile) 2>&5; } && test -s conftest.$ac_objext; then
  ac_hi=$ac_try; break
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_lo=`expr $ac_try + 1`; ac_try=`expr 2 '*' $ac_try + 1`
fi
rm -f conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_hi=-1 ac_try=-1
  while true; do
    cat >conftest.$ac_ext <<_ACEOF
#line 9836 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
int _array_ [1 - 2 * !((sizeof (int)) >= $ac_try)]
  ;
  return 0;
}
_ACEOF
if { (eval echo configure:9847: \"$ac_compile\") >&5; (eval $ac_compile) 2>&5; } && test -s conftest.$ac_objext; then
  ac_lo=$ac_try; break
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_hi=`expr $ac_try - 1`; ac_try=`expr 2 '*' $ac_try`
fi
rm -f conftest.$ac_objext conftest.$ac_ext
  done
fi
rm -f conftest.$ac_objext conftest.$ac_ext
# Binary search between lo and hi bounds.
while test "x$ac_lo" != "x$ac_hi"; do
  ac_try=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
  cat >conftest.$ac_ext <<_ACEOF
#line 9862 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
int _array_ [1 - 2 * !((sizeof (int)) <= $ac_try)]
  ;
  return 0;
}
_ACEOF
if { (eval echo configure:9873: \"$ac_compile\") >&5; (eval $ac_compile) 2>&5; } && test -s conftest.$ac_objext; then
  ac_hi=$ac_try
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_lo=`expr $ac_try + 1`
fi
rm -f conftest.$ac_objext conftest.$ac_ext
done
ac_cv_sizeof_int=$ac_lo
else
 cat >conftest.$ac_ext <<_ACEOF
#line 9885 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
FILE *f = fopen ("conftestval", "w");
if (!f)
  exit (1);
fprintf (f, "%d\n", (sizeof (int)));
  ;
  return 0;
}
_ACEOF
if { (eval echo configure:9899: \"$ac_link\") >&5; (eval $ac_link) 2>&5; } &&
   test -s conftest$ac_exeext && (./conftest; exit) 2>/dev/null; then
  ac_cv_sizeof_int=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5

fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
else
  ac_cv_sizeof_int=0
fi
fi
echo "configure:9913: result: $ac_cv_sizeof_int" >&5
echo "${ECHO_T}$ac_cv_sizeof_int" >&6
cat >>confdefs.h <<EOF
#define SIZEOF_INT $ac_cv_sizeof_int
EOF

echo "configure:9919: checking for long long" >&5
echo $ECHO_N "checking for long long... $ECHO_C" >&6
if test "${ac_cv_type_long_long+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 9925 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
if ((long long *) 0)
  return 0;
if (sizeof (long long))
  return 0;
  ;
  return 0;
}
_ACEOF
if { (eval echo configure:9939: \"$ac_compile\") >&5; (eval $ac_compile) 2>&5; } && test -s conftest.$ac_objext; then
  ac_cv_type_long_long=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_type_long_long=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "configure:9948: result: $ac_cv_type_long_long" >&5
echo "${ECHO_T}$ac_cv_type_long_long" >&6

echo "configure:9951: checking size of long long" >&5
echo $ECHO_N "checking size of long long... $ECHO_C" >&6
if test "${ac_cv_sizeof_long_long+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$ac_cv_type_long_long" = yes; then
  if test "$cross_compiling" = yes; then
  # Depending upon the size, compute the lo and hi bounds.
cat >conftest.$ac_ext <<_ACEOF
#line 9960 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
int _array_ [1 - 2 * !((sizeof (long long)) >= 0)]
  ;
  return 0;
}
_ACEOF
if { (eval echo configure:9971: \"$ac_compile\") >&5; (eval $ac_compile) 2>&5; } && test -s conftest.$ac_objext; then
  ac_lo=0 ac_try=0
  while true; do
    cat >conftest.$ac_ext <<_ACEOF
#line 9975 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
int _array_ [1 - 2 * !((sizeof (long long)) <= $ac_try)]
  ;
  return 0;
}
_ACEOF
if { (eval echo configure:9986: \"$ac_compile\") >&5; (eval $ac_compile) 2>&5; } && test -s conftest.$ac_objext; then
  ac_hi=$ac_try; break
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_lo=`expr $ac_try + 1`; ac_try=`expr 2 '*' $ac_try + 1`
fi
rm -f conftest.$ac_objext conftest.$ac_ext
  done
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_hi=-1 ac_try=-1
  while true; do
    cat >conftest.$ac_ext <<_ACEOF
#line 10001 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
int _array_ [1 - 2 * !((sizeof (long long)) >= $ac_try)]
  ;
  return 0;
}
_ACEOF
if { (eval echo configure:10012: \"$ac_compile\") >&5; (eval $ac_compile) 2>&5; } && test -s conftest.$ac_objext; then
  ac_lo=$ac_try; break
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_hi=`expr $ac_try - 1`; ac_try=`expr 2 '*' $ac_try`
fi
rm -f conftest.$ac_objext conftest.$ac_ext
  done
fi
rm -f conftest.$ac_objext conftest.$ac_ext
# Binary search between lo and hi bounds.
while test "x$ac_lo" != "x$ac_hi"; do
  ac_try=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
  cat >conftest.$ac_ext <<_ACEOF
#line 10027 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
int _array_ [1 - 2 * !((sizeof (long long)) <= $ac_try)]
  ;
  return 0;
}
_ACEOF
if { (eval echo configure:10038: \"$ac_compile\") >&5; (eval $ac_compile) 2>&5; } && test -s conftest.$ac_objext; then
  ac_hi=$ac_try
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_lo=`expr $ac_try + 1`
fi
rm -f conftest.$ac_objext conftest.$ac_ext
done
ac_cv_sizeof_long_long=$ac_lo
else
 cat >conftest.$ac_ext <<_ACEOF
#line 10050 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
FILE *f = fopen ("conftestval", "w");
if (!f)
  exit (1);
fprintf (f, "%d\n", (sizeof (long long)));
  ;
  return 0;
}
_ACEOF
if { (eval echo configure:10064: \"$ac_link\") >&5; (eval $ac_link) 2>&5; } &&
   test -s conftest$ac_exeext && (./conftest; exit) 2>/dev/null; then
  ac_cv_sizeof_long_long=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5

fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
else
  ac_cv_sizeof_long_long=0
fi
fi
echo "configure:10078: result: $ac_cv_sizeof_long_long" >&5
echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
cat >>confdefs.h <<EOF
#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
EOF

#
# Check for functions
#
echo "configure:10087: 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
  { echo "configure: error: cannot run test program while cross compiling" >&2; exit 1; }
else
  cat >conftest.$ac_ext <<_ACEOF
#line 10096 "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);
  }
}
   ac_cv_func_memcmp_working=yes
_ACEOF
if { (eval echo configure:10128: \"$ac_link\") >&5; (eval $ac_link) 2>&5; } &&
   test -s conftest$ac_exeext && (./conftest; exit) 2>/dev/null; then
  ac_cv_func_memcmp_working=no
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_func_memcmp_working=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi

fi
echo "configure:10140: 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"

echo "configure:10145: 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 10151 "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
if { (eval echo configure:10172: \"$ac_compile\") >&5; (eval $ac_compile) 2>&5; } && test -s conftest.$ac_objext; then
  ac_cv_type_signal=void
else
  echo "configure: 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 "configure:10181: 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
ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
echo "configure:10191: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 10197 "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
if { (eval echo configure:10227: \"$ac_link\") >&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "configure:10236: result: `eval echo '${'$ac_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$ac_ac_var'}'`" >&6
if test `eval echo '${'$ac_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $ac_tr_cpp` 1
EOF

echo "configure:10243: 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 10249 "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
if { (eval echo configure:10279: \"$ac_link\") >&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
  ac_cv_func__doprnt=yes
else
  echo "configure: 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 "configure:10288: 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_header in stdlib.h unistd.h sys/stat.h
do
ac_ac_Header=`echo "ac_cv_header_$ac_header" | $ac_tr_sh`

echo "configure:10305: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$ac_ac_Header+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 10311 "configure"
#include "confdefs.h"
#include <$ac_header>

_ACEOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.err"
if { (eval echo configure:10317: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }; then
  if egrep -v '^ *\+' conftest.err | grep . >/dev/null
  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 "$ac_ac_Header=yes"
else
  cat conftest.err >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_Header=no"
fi
rm -f conftest*

fi
echo "configure:10339: result: `eval echo '${'$ac_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$ac_ac_Header'}'`" >&6
if test `eval echo '${'$ac_ac_Header'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_header" | $ac_tr_cpp` 1
EOF

fi
done

for ac_func in getpagesize
do
ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
echo "configure:10352: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 10358 "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
if { (eval echo configure:10388: \"$ac_link\") >&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "configure:10397: result: `eval echo '${'$ac_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$ac_ac_var'}'`" >&6
if test `eval echo '${'$ac_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $ac_tr_cpp` 1
EOF

fi
done

echo "configure:10407: 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 10416 "configure"
#include "confdefs.h"
/* 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 <sys/types.h>
#include <fcntl.h>
#include <sys/mman.h>

#if STDC_HEADERS || HAVE_STDLIB_H
# include <stdlib.h>
#else
char *malloc ();
#endif
#if HAVE_UNISTD_H
# include <unistd.h>
#endif
#if HAVE_SYS_STAT_H
# include <sys/stat.h>
#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 ("conftestmmap", 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 ("conftestmmap", 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);
  unlink ("conftestmmap");
  exit (0);
}
_ACEOF
if { (eval echo configure:10550: \"$ac_link\") >&5; (eval $ac_link) 2>&5; } &&
   test -s conftest$ac_exeext && (./conftest; exit) 2>/dev/null; then
  ac_cv_func_mmap_fixed_mapped=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_func_mmap_fixed_mapped=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi

fi
echo "configure:10562: 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

for ac_func in getcwd gettimeofday mkdir select snprintf strchr strerror strtol sysconf tempnam vsnprintf
do
ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
echo "configure:10575: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 10581 "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
if { (eval echo configure:10611: \"$ac_link\") >&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "configure:10620: result: `eval echo '${'$ac_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$ac_ac_var'}'`" >&6
if test `eval echo '${'$ac_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $ac_tr_cpp` 1
EOF

fi
done

# Check for getexecname() under Solaris
case "${host_os}" in
  solaris* )

for ac_func in getexecname
do
ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
echo "configure:10637: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$ac_ac_var+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 10643 "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
if { (eval echo configure:10673: \"$ac_link\") >&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
  eval "$ac_ac_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "$ac_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "configure:10682: result: `eval echo '${'$ac_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$ac_ac_var'}'`" >&6
if test `eval echo '${'$ac_ac_var'}'` = yes; then
  cat >>confdefs.h <<EOF
#define `echo "HAVE_$ac_func" | $ac_tr_cpp` 1
EOF

fi
done

  ;;
esac

# Test for sys_errlist array if strerror() not supported.
if test "$ac_cv_func_strerror" != 'yes' ; then
echo "configure:10697: checking for sys_errlist array" >&5
echo $ECHO_N "checking for sys_errlist array... $ECHO_C" >&6
if test "${ac_cv_sys_errlist+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 10703 "configure"
#include "confdefs.h"

extern char** sys_errlist;

int
main ()
{

char** p = sys_errlist;

  ;
  return 0;
}
_ACEOF
if { (eval echo configure:10718: \"$ac_link\") >&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
  ac_cv_sys_errlist='yes'
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_sys_errlist='no'
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "configure:10727: result: $ac_cv_sys_errlist" >&5
echo "${ECHO_T}$ac_cv_sys_errlist" >&6
if test "$ac_cv_sys_errlist" = 'yes' ; then

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

 echo "configure:10735: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
 echo "configure:10738: result: no" >&5
echo "${ECHO_T}no" >&6
fi
fi

#
# Configure Delegates
#

# Define directory where ImageMagick/delegates.mgk lives. (default /usr/local/share)
eval MagickConfigurePath="${DATA_DIR}/ImageMagick/"

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

# Locate delegates
# Extract the first word of "bzip2", so it can be a program name with args.
set dummy bzip2; ac_word=$2
echo "configure:10757: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_BZIPDelegate+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $BZIPDelegate in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_BZIPDelegate="$BZIPDelegate" # Let the user override the test with a path.
  ;;
  *)
  ac_save_IFS=$IFS; IFS=':'
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  if test -f "$ac_dir/$ac_word"; then
   ac_cv_path_BZIPDelegate=$ac_dir/$ac_word
   break
fi
done

  test -z "$ac_cv_path_BZIPDelegate" && ac_cv_path_BZIPDelegate="bzip2"
  ;;
esac
fi
BZIPDelegate=$ac_cv_path_BZIPDelegate
if test -n "$BZIPDelegate"; then
  echo "configure:10784: result: $BZIPDelegate" >&5
echo "${ECHO_T}$BZIPDelegate" >&6
else
  echo "configure:10787: result: no" >&5
echo "${ECHO_T}no" >&6
fi

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

  test -z "$ac_cv_path_BrowseDelegate" && ac_cv_path_BrowseDelegate="netscape"
  ;;
esac
fi
BrowseDelegate=$ac_cv_path_BrowseDelegate
if test -n "$BrowseDelegate"; then
  echo "configure:10820: result: $BrowseDelegate" >&5
echo "${ECHO_T}$BrowseDelegate" >&6
else
  echo "configure:10823: result: no" >&5
echo "${ECHO_T}no" >&6
fi

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

  test -z "$ac_cv_path_CGMDecodeDelegate" && ac_cv_path_CGMDecodeDelegate="ralcgm"
  ;;
esac
fi
CGMDecodeDelegate=$ac_cv_path_CGMDecodeDelegate
if test -n "$CGMDecodeDelegate"; then
  echo "configure:10856: result: $CGMDecodeDelegate" >&5
echo "${ECHO_T}$CGMDecodeDelegate" >&6
else
  echo "configure:10859: result: no" >&5
echo "${ECHO_T}no" >&6
fi

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

  test -z "$ac_cv_path_CatDelegate" && ac_cv_path_CatDelegate="cat"
  ;;
esac
fi
CatDelegate=$ac_cv_path_CatDelegate
if test -n "$CatDelegate"; then
  echo "configure:10892: result: $CatDelegate" >&5
echo "${ECHO_T}$CatDelegate" >&6
else
  echo "configure:10895: result: no" >&5
echo "${ECHO_T}no" >&6
fi

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

  test -z "$ac_cv_path_DOTDecodeDelegate" && ac_cv_path_DOTDecodeDelegate="dot"
  ;;
esac
fi
DOTDecodeDelegate=$ac_cv_path_DOTDecodeDelegate
if test -n "$DOTDecodeDelegate"; then
  echo "configure:10928: result: $DOTDecodeDelegate" >&5
echo "${ECHO_T}$DOTDecodeDelegate" >&6
else
  echo "configure:10931: result: no" >&5
echo "${ECHO_T}no" >&6
fi

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

  test -z "$ac_cv_path_DVIDecodeDelegate" && ac_cv_path_DVIDecodeDelegate="dvips"
  ;;
esac
fi
DVIDecodeDelegate=$ac_cv_path_DVIDecodeDelegate
if test -n "$DVIDecodeDelegate"; then
  echo "configure:10964: result: $DVIDecodeDelegate" >&5
echo "${ECHO_T}$DVIDecodeDelegate" >&6
else
  echo "configure:10967: result: no" >&5
echo "${ECHO_T}no" >&6
fi

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

  test -z "$ac_cv_path_EchoDelegate" && ac_cv_path_EchoDelegate="echo"
  ;;
esac
fi
EchoDelegate=$ac_cv_path_EchoDelegate
if test -n "$EchoDelegate"; then
  echo "configure:11000: result: $EchoDelegate" >&5
echo "${ECHO_T}$EchoDelegate" >&6
else
  echo "configure:11003: result: no" >&5
echo "${ECHO_T}no" >&6
fi

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

  test -z "$ac_cv_path_EditorDelegate" && ac_cv_path_EditorDelegate="xterm"
  ;;
esac
fi
EditorDelegate=$ac_cv_path_EditorDelegate
if test -n "$EditorDelegate"; then
  echo "configure:11036: result: $EditorDelegate" >&5
echo "${ECHO_T}$EditorDelegate" >&6
else
  echo "configure:11039: result: no" >&5
echo "${ECHO_T}no" >&6
fi

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

  test -z "$ac_cv_path_FIGDecodeDelegate" && ac_cv_path_FIGDecodeDelegate="fig2dev"
  ;;
esac
fi
FIGDecodeDelegate=$ac_cv_path_FIGDecodeDelegate
if test -n "$FIGDecodeDelegate"; then
  echo "configure:11072: result: $FIGDecodeDelegate" >&5
echo "${ECHO_T}$FIGDecodeDelegate" >&6
else
  echo "configure:11075: result: no" >&5
echo "${ECHO_T}no" >&6
fi

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

  test -z "$ac_cv_path_GnuplotDecodeDelegate" && ac_cv_path_GnuplotDecodeDelegate="gnuplot"
  ;;
esac
fi
GnuplotDecodeDelegate=$ac_cv_path_GnuplotDecodeDelegate
if test -n "$GnuplotDecodeDelegate"; then
  echo "configure:11108: result: $GnuplotDecodeDelegate" >&5
echo "${ECHO_T}$GnuplotDecodeDelegate" >&6
else
  echo "configure:11111: result: no" >&5
echo "${ECHO_T}no" >&6
fi

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

  test -z "$ac_cv_path_HPGLDecodeDelegate" && ac_cv_path_HPGLDecodeDelegate="hp2xx"
  ;;
esac
fi
HPGLDecodeDelegate=$ac_cv_path_HPGLDecodeDelegate
if test -n "$HPGLDecodeDelegate"; then
  echo "configure:11144: result: $HPGLDecodeDelegate" >&5
echo "${ECHO_T}$HPGLDecodeDelegate" >&6
else
  echo "configure:11147: result: no" >&5
echo "${ECHO_T}no" >&6
fi

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

  test -z "$ac_cv_path_HTMLDecodeDelegate" && ac_cv_path_HTMLDecodeDelegate="html2ps"
  ;;
esac
fi
HTMLDecodeDelegate=$ac_cv_path_HTMLDecodeDelegate
if test -n "$HTMLDecodeDelegate"; then
  echo "configure:11180: result: $HTMLDecodeDelegate" >&5
echo "${ECHO_T}$HTMLDecodeDelegate" >&6
else
  echo "configure:11183: result: no" >&5
echo "${ECHO_T}no" >&6
fi

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

  test -z "$ac_cv_path_ILBMDecodeDelegate" && ac_cv_path_ILBMDecodeDelegate="ilbmtoppm"
  ;;
esac
fi
ILBMDecodeDelegate=$ac_cv_path_ILBMDecodeDelegate
if test -n "$ILBMDecodeDelegate"; then
  echo "configure:11216: result: $ILBMDecodeDelegate" >&5
echo "${ECHO_T}$ILBMDecodeDelegate" >&6
else
  echo "configure:11219: result: no" >&5
echo "${ECHO_T}no" >&6
fi

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

  test -z "$ac_cv_path_ILBMEncodeDelegate" && ac_cv_path_ILBMEncodeDelegate="ppmtoilbm"
  ;;
esac
fi
ILBMEncodeDelegate=$ac_cv_path_ILBMEncodeDelegate
if test -n "$ILBMEncodeDelegate"; then
  echo "configure:11252: result: $ILBMEncodeDelegate" >&5
echo "${ECHO_T}$ILBMEncodeDelegate" >&6
else
  echo "configure:11255: result: no" >&5
echo "${ECHO_T}no" >&6
fi

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

  test -z "$ac_cv_path_LPDelegate" && ac_cv_path_LPDelegate="no"
  ;;
esac
fi
LPDelegate=$ac_cv_path_LPDelegate
if test -n "$LPDelegate"; then
  echo "configure:11288: result: $LPDelegate" >&5
echo "${ECHO_T}$LPDelegate" >&6
else
  echo "configure:11291: result: no" >&5
echo "${ECHO_T}no" >&6
fi

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

  test -z "$ac_cv_path_LPRDelegate" && ac_cv_path_LPRDelegate="no"
  ;;
esac
fi
LPRDelegate=$ac_cv_path_LPRDelegate
if test -n "$LPRDelegate"; then
  echo "configure:11324: result: $LPRDelegate" >&5
echo "${ECHO_T}$LPRDelegate" >&6
else
  echo "configure:11327: result: no" >&5
echo "${ECHO_T}no" >&6
fi

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

  test -z "$ac_cv_path_LZWDecodeDelegate" && ac_cv_path_LZWDecodeDelegate="uncompress"
  ;;
esac
fi
LZWDecodeDelegate=$ac_cv_path_LZWDecodeDelegate
if test -n "$LZWDecodeDelegate"; then
  echo "configure:11360: result: $LZWDecodeDelegate" >&5
echo "${ECHO_T}$LZWDecodeDelegate" >&6
else
  echo "configure:11363: result: no" >&5
echo "${ECHO_T}no" >&6
fi

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

  test -z "$ac_cv_path_LZWEncodeDelegate" && ac_cv_path_LZWEncodeDelegate="compress"
  ;;
esac
fi
LZWEncodeDelegate=$ac_cv_path_LZWEncodeDelegate
if test -n "$LZWEncodeDelegate"; then
  echo "configure:11396: result: $LZWEncodeDelegate" >&5
echo "${ECHO_T}$LZWEncodeDelegate" >&6
else
  echo "configure:11399: result: no" >&5
echo "${ECHO_T}no" >&6
fi

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

  test -z "$ac_cv_path_LaunchDelegate" && ac_cv_path_LaunchDelegate="gimp"
  ;;
esac
fi
LaunchDelegate=$ac_cv_path_LaunchDelegate
if test -n "$LaunchDelegate"; then
  echo "configure:11432: result: $LaunchDelegate" >&5
echo "${ECHO_T}$LaunchDelegate" >&6
else
  echo "configure:11435: result: no" >&5
echo "${ECHO_T}no" >&6
fi

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

  test -z "$ac_cv_path_MANDelegate" && ac_cv_path_MANDelegate="groff"
  ;;
esac
fi
MANDelegate=$ac_cv_path_MANDelegate
if test -n "$MANDelegate"; then
  echo "configure:11468: result: $MANDelegate" >&5
echo "${ECHO_T}$MANDelegate" >&6
else
  echo "configure:11471: result: no" >&5
echo "${ECHO_T}no" >&6
fi

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

  test -z "$ac_cv_path_MPEGDecodeDelegate" && ac_cv_path_MPEGDecodeDelegate="mpeg2decode"
  ;;
esac
fi
MPEGDecodeDelegate=$ac_cv_path_MPEGDecodeDelegate
if test -n "$MPEGDecodeDelegate"; then
  echo "configure:11504: result: $MPEGDecodeDelegate" >&5
echo "${ECHO_T}$MPEGDecodeDelegate" >&6
else
  echo "configure:11507: result: no" >&5
echo "${ECHO_T}no" >&6
fi

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

  test -z "$ac_cv_path_MPEGEncodeDelegate" && ac_cv_path_MPEGEncodeDelegate="mpeg2encode"
  ;;
esac
fi
MPEGEncodeDelegate=$ac_cv_path_MPEGEncodeDelegate
if test -n "$MPEGEncodeDelegate"; then
  echo "configure:11540: result: $MPEGEncodeDelegate" >&5
echo "${ECHO_T}$MPEGEncodeDelegate" >&6
else
  echo "configure:11543: result: no" >&5
echo "${ECHO_T}no" >&6
fi

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

  test -z "$ac_cv_path_MVDelegate" && ac_cv_path_MVDelegate="mv"
  ;;
esac
fi
MVDelegate=$ac_cv_path_MVDelegate
if test -n "$MVDelegate"; then
  echo "configure:11576: result: $MVDelegate" >&5
echo "${ECHO_T}$MVDelegate" >&6
else
  echo "configure:11579: result: no" >&5
echo "${ECHO_T}no" >&6
fi

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

  test -z "$ac_cv_path_PGPDecodeDelegate" && ac_cv_path_PGPDecodeDelegate="pgpv"
  ;;
esac
fi
PGPDecodeDelegate=$ac_cv_path_PGPDecodeDelegate
if test -n "$PGPDecodeDelegate"; then
  echo "configure:11612: result: $PGPDecodeDelegate" >&5
echo "${ECHO_T}$PGPDecodeDelegate" >&6
else
  echo "configure:11615: result: no" >&5
echo "${ECHO_T}no" >&6
fi

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

  test -z "$ac_cv_path_POVDelegate" && ac_cv_path_POVDelegate="povray"
  ;;
esac
fi
POVDelegate=$ac_cv_path_POVDelegate
if test -n "$POVDelegate"; then
  echo "configure:11648: result: $POVDelegate" >&5
echo "${ECHO_T}$POVDelegate" >&6
else
  echo "configure:11651: result: no" >&5
echo "${ECHO_T}no" >&6
fi

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

  test -z "$ac_cv_path_PSDelegate" && ac_cv_path_PSDelegate="gs"
  ;;
esac
fi
PSDelegate=$ac_cv_path_PSDelegate
if test -n "$PSDelegate"; then
  echo "configure:11684: result: $PSDelegate" >&5
echo "${ECHO_T}$PSDelegate" >&6
else
  echo "configure:11687: result: no" >&5
echo "${ECHO_T}no" >&6
fi

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

  test -z "$ac_cv_path_RADDecodeDelegate" && ac_cv_path_RADDecodeDelegate="ra_ppm"
  ;;
esac
fi
RADDecodeDelegate=$ac_cv_path_RADDecodeDelegate
if test -n "$RADDecodeDelegate"; then
  echo "configure:11720: result: $RADDecodeDelegate" >&5
echo "${ECHO_T}$RADDecodeDelegate" >&6
else
  echo "configure:11723: result: no" >&5
echo "${ECHO_T}no" >&6
fi

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

  test -z "$ac_cv_path_RLEEncodeDelegate" && ac_cv_path_RLEEncodeDelegate="rawtorle"
  ;;
esac
fi
RLEEncodeDelegate=$ac_cv_path_RLEEncodeDelegate
if test -n "$RLEEncodeDelegate"; then
  echo "configure:11756: result: $RLEEncodeDelegate" >&5
echo "${ECHO_T}$RLEEncodeDelegate" >&6
else
  echo "configure:11759: result: no" >&5
echo "${ECHO_T}no" >&6
fi

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

  test -z "$ac_cv_path_RMDelegate" && ac_cv_path_RMDelegate="rm"
  ;;
esac
fi
RMDelegate=$ac_cv_path_RMDelegate
if test -n "$RMDelegate"; then
  echo "configure:11792: result: $RMDelegate" >&5
echo "${ECHO_T}$RMDelegate" >&6
else
  echo "configure:11795: result: no" >&5
echo "${ECHO_T}no" >&6
fi

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

  test -z "$ac_cv_path_SCANDecodeDelegate" && ac_cv_path_SCANDecodeDelegate="scanimage"
  ;;
esac
fi
SCANDecodeDelegate=$ac_cv_path_SCANDecodeDelegate
if test -n "$SCANDecodeDelegate"; then
  echo "configure:11828: result: $SCANDecodeDelegate" >&5
echo "${ECHO_T}$SCANDecodeDelegate" >&6
else
  echo "configure:11831: result: no" >&5
echo "${ECHO_T}no" >&6
fi

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

  test -z "$ac_cv_path_TXTDelegate" && ac_cv_path_TXTDelegate="enscript"
  ;;
esac
fi
TXTDelegate=$ac_cv_path_TXTDelegate
if test -n "$TXTDelegate"; then
  echo "configure:11864: result: $TXTDelegate" >&5
echo "${ECHO_T}$TXTDelegate" >&6
else
  echo "configure:11867: result: no" >&5
echo "${ECHO_T}no" >&6
fi

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

  test -z "$ac_cv_path_WMFDecodeDelegate" && ac_cv_path_WMFDecodeDelegate="wmftopng"
  ;;
esac
fi
WMFDecodeDelegate=$ac_cv_path_WMFDecodeDelegate
if test -n "$WMFDecodeDelegate"; then
  echo "configure:11900: result: $WMFDecodeDelegate" >&5
echo "${ECHO_T}$WMFDecodeDelegate" >&6
else
  echo "configure:11903: result: no" >&5
echo "${ECHO_T}no" >&6
fi

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

  test -z "$ac_cv_path_WWWDecodeDelegate" && ac_cv_path_WWWDecodeDelegate="wget"
  ;;
esac
fi
WWWDecodeDelegate=$ac_cv_path_WWWDecodeDelegate
if test -n "$WWWDecodeDelegate"; then
  echo "configure:11936: result: $WWWDecodeDelegate" >&5
echo "${ECHO_T}$WWWDecodeDelegate" >&6
else
  echo "configure:11939: result: no" >&5
echo "${ECHO_T}no" >&6
fi

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

  test -z "$ac_cv_path_XCFDecodeDelegate" && ac_cv_path_XCFDecodeDelegate="xcftopnm"
  ;;
esac
fi
XCFDecodeDelegate=$ac_cv_path_XCFDecodeDelegate
if test -n "$XCFDecodeDelegate"; then
  echo "configure:11972: result: $XCFDecodeDelegate" >&5
echo "${ECHO_T}$XCFDecodeDelegate" >&6
else
  echo "configure:11975: result: no" >&5
echo "${ECHO_T}no" >&6
fi

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

  test -z "$ac_cv_path_ZipDelegate" && ac_cv_path_ZipDelegate="gzip"
  ;;
esac
fi
ZipDelegate=$ac_cv_path_ZipDelegate
if test -n "$ZipDelegate"; then
  echo "configure:12008: result: $ZipDelegate" >&5
echo "${ECHO_T}$ZipDelegate" >&6
else
  echo "configure:12011: result: no" >&5
echo "${ECHO_T}no" >&6
fi

# Prefer lpr to lp; lp needs options tacked on.
if test "$LPRDelegate" != no
then	PrintDelegate="$LPRDelegate"
else	PrintDelegate="$LPDelegate -c -s"
fi

# Installed ImageMagick utiltity paths
ConvertDelegate=$BIN_DIR/convert
ShowImageDelegate=$BIN_DIR/display
MogrifyDelegate=$BIN_DIR/mogrify

# Set delegate booleans
have_fig2dev='no' ; if test "$FIGDecodeDelegate" != 'fig2dev' ; then have_fig2dev='yes' ; fi
have_gs='no'      ; if test "$PSDelegate" != 'gs' ; then have_gs='yes' ; fi
have_hp2xx='no'   ; if test "$HPGLDecodeDelegate" != 'hp2xx' ; then have_hp2xx='yes' ; fi
have_ilbmtoppm='no' ; if test "$ILBMDecodeDelegate" != 'ilbmtoppm' ; then have_ilbmtoppm='yes' ; fi
have_ppmtoilbm='no' ; if test "$ILBMEncodeDelegate" != 'ppmtoilbm' ; then have_ppmtoilbm='yes' ; fi
have_mpeg2decode='no' ; if test "$MPEGDecodeDelegate" != 'mpeg2decode' ; then have_mpeg2decode='yes' ; fi
have_mpeg2encode='no' ; if test "$MPEGEncodeDelegate" != 'mpeg2encode' ; then have_mpeg2encode='yes' ; fi
have_ra_ppm='no'  ; if test "$RADDecodeDelegate" != 'ra_ppm' ; then have_ra_ppm='yes' ; fi
have_ralcgm='no'  ; if test "$CGMDecodeDelegate" != 'ralcgm' ; then have_ralcgm='yes' ; fi
have_xcftopnm='no'  ; if test "$XCFDecodeDelegate" != 'xcftopnm' ; then have_xcftopnm='yes' ; fi

if test "$with_frozenpaths" != 'yes'
then
  # Re-set delegate definitions to default (no paths)
  BZIPDelegate='bzip2'
  BrowseDelegate='netscape'
  CGMDecodeDelegate='ralcgm'
  CatDelegate='cat'
  ConvertDelegate='convert'
  DOTDecodeDelegate='dot'
  DVIDecodeDelegate='dvips'
  EchoDelegate='echo'
  EditorDelegate='xterm'
  FIGDecodeDelegate='fig2dev'
  GnuplotDecodeDelegate='gnuplot'
  HPGLDecodeDelegate='hp2xx'
  HTMLDecodeDelegate='html2ps'
  ILBMDecodeDelegate='ilbmtoppm'
  ILBMEncodeDelegate='ppmtoilbm'
  LPDelegate='lp'
  LZWDecodeDelegate='uncompress'
  LZWEncodeDelegate='compress'
  LaunchDelegate='gimp'
  MANDelegate='groff'
  MPEGDecodeDelegate='mpeg2decode'
  MPEGEncodeDelegate='mpeg2encode'
  MVDelegate='mv'
  MogrifyDelegate='mogrify'
  PGPDecodeDelegate='pgpv'
  POVDelegate='povray'
  PSDelegate='gs'
  RADDecodeDelegate='ra_ppm'
  RLEEncodeDelegate='rawtorle'
  RMDelegate='rm'
  SCANDecodeDelegate='scanimage'
  ShowImageDelegate='display'
  TXTDelegate='enscript'
  WMFDecodeDelegate='wmftopng'
  WWWDecodeDelegate='wget'
  XCFDecodeDelegate='xcftopnm'
  ZipDelegate='gzip'
fi

# Delegate substitutions

# Figure out what drivers Ghostscript supports (if available)
GSColorDevice=ppmraw
GSMonoDevice=pbmraw
GSPDFDevice=pdfwrite
GSPSDevice=pswrite
GSEPSDevice=epswrite
if test $have_gs = 'yes'
then

  # GSColorDevice
  echo "configure:12092: checking for gs color device" >&5
echo $ECHO_N "checking for gs color device... $ECHO_C" >&6
  if $PSDelegate -q -dBATCH -sDEVICE=pnmraw -sOutputFile=/dev/null < /dev/null 2> /dev/null
  then
    GSColorDevice=pnmraw
  else
    if $PSDelegate -q -dBATCH -sDEVICE=ppmraw -sOutputFile=/dev/null < /dev/null 2> /dev/null
    then
      GSColorDevice=ppmraw
    else
      GSColorDevice=ppmraw
    fi
  fi
  echo "configure:12105: result: $GSColorDevice" >&5
echo "${ECHO_T}$GSColorDevice" >&6

  # GSMonoDevice
  echo "configure:12109: checking for gs mono device" >&5
echo $ECHO_N "checking for gs mono device... $ECHO_C" >&6
  if $PSDelegate -q -dBATCH -sDEVICE=pbmraw -sOutputFile=/dev/null < /dev/null 2> /dev/null
  then
    GSMonoDevice=pbmraw
  else
    GSMonoDevice=ppmraw
  fi
  echo "configure:12117: result: $GSMonoDevice" >&5
echo "${ECHO_T}$GSMonoDevice" >&6

  # GSPDFDevice
  echo "configure:12121: checking for gs PDF writing device" >&5
echo $ECHO_N "checking for gs PDF writing device... $ECHO_C" >&6
  if $PSDelegate -q -dBATCH -sDEVICE=pdfwrite -sOutputFile=/dev/null < /dev/null 2> /dev/null
  then
    GSPDFDevice=pdfwrite
  else
    GSPDFDevice=nodevice
  fi
  echo "configure:12129: result: $GSPDFDevice" >&5
echo "${ECHO_T}$GSPDFDevice" >&6

  # GSPSDevice
  echo "configure:12133: checking for gs PS writing device" >&5
echo $ECHO_N "checking for gs PS writing device... $ECHO_C" >&6
  if $PSDelegate -q -dBATCH -sDEVICE=pswrite -sOutputFile=/dev/null < /dev/null 2> /dev/null
  then
    GSPSDevice=pswrite
  else
    GSPSDevice=nodevice
  fi
  echo "configure:12141: result: $GSPSDevice" >&5
echo "${ECHO_T}$GSPSDevice" >&6

  # GSEPSDevice
  echo "configure:12145: checking for gs EPS writing device" >&5
echo $ECHO_N "checking for gs EPS writing device... $ECHO_C" >&6
  if $PSDelegate -q -dBATCH -sDEVICE=epswrite -sOutputFile=/dev/null < /dev/null 2> /dev/null
  then
    GSEPSDevice=epswrite
  else
    GSEPSDevice=nodevice
  fi
  echo "configure:12153: result: $GSEPSDevice" >&5
echo "${ECHO_T}$GSEPSDevice" >&6

fi

#
# PerlMagick-related configuration
#

# Look for PERL if PerlMagick requested
# If name/path of desired PERL interpreter is specified, look for that one first
have_perl='no'
if test "$with_perl" != 'no'
then
    if test "$with_perl" != 'yes'
    then
	echo "configure:12169: checking for perl" >&5
echo $ECHO_N "checking for perl... $ECHO_C" >&6
if test "${ac_cv_path_PERL+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_cv_path_PERL="$with_perl"
fi
echo "configure:12176: result: $ac_cv_path_PERL" >&5
echo "${ECHO_T}$ac_cv_path_PERL" >&6;
	PERL=$ac_cv_path_PERL
	
	have_perl="$ac_cv_path_PERL"
    else
	for ac_prog in perl perl5
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 "configure:12186: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_PERL+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $PERL in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
  ;;
  *)
  ac_save_IFS=$IFS; IFS=':'
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  if test -f "$ac_dir/$ac_word"; then
   ac_cv_path_PERL=$ac_dir/$ac_word
   break
fi
done

  ;;
esac
fi
PERL=$ac_cv_path_PERL
if test -n "$PERL"; then
  echo "configure:12212: result: $PERL" >&5
echo "${ECHO_T}$PERL" >&6
else
  echo "configure:12215: result: no" >&5
echo "${ECHO_T}no" >&6
fi

test -n "$PERL" && break
done

	if test "$ac_cv_path_PERL"
        then
	  have_perl="$ac_cv_path_PERL"
        fi
    fi
fi

# Determine path to pick up ImageMagick library from for use with building PerlMagick
MAGICKLIB="-L${LIB_DIR} -lMagick"
if test $with_perl_static = 'yes'
then
  MAGICKLIB="-L${builddir}/magick -lMagick"
fi

# Create a simple string containing format names for all delegate libraries
DELEGATES=''
if test "$have_bzlib"  = 'yes' ; then DELEGATES="$DELEGATES bzlib"  ; fi
if test "$have_ralcgm" = 'yes' ; then DELEGATES="$DELEGATES cgm"  ; fi
if test "$have_fpx"    = 'yes' ; then DELEGATES="$DELEGATES fpx"  ; fi
if test "$have_hp2xx"  = 'yes' ; then DELEGATES="$DELEGATES hpgl"  ; fi
if test "$have_hdf"    = 'yes' ; then DELEGATES="$DELEGATES hdf"  ; fi
if test "$have_jbig"   = 'yes' ; then DELEGATES="$DELEGATES jbig" ; fi
if test "$have_jpeg"   = 'yes' ; then DELEGATES="$DELEGATES jpeg" ; fi
if test "$have_lcms"    = 'yes' ; then DELEGATES="$DELEGATES lcms"  ; fi
if test "$have_mpeg2decode" = 'yes' && test "$have_mpeg2encode"  = 'yes' ; then DELEGATES="$DELEGATES mpeg" ; fi
if test "$have_png"    = 'yes' ; then DELEGATES="$DELEGATES png"  ; fi

have_ps='no'
if test "$have_dps"    = 'yes' || test "$have_gs" = 'yes' ; then have_ps='yes'  ; fi
if test "$have_ps"     = 'yes' ; then DELEGATES="$DELEGATES ps"  ; fi

if test "$have_ra_ppm" = 'yes' ; then DELEGATES="$DELEGATES rad" ; fi
if test "$have_tiff"   = 'yes' ; then DELEGATES="$DELEGATES tiff" ; fi
if test "$have_ttf"    = 'yes' ; then DELEGATES="$DELEGATES ttf"  ; fi
if test "$have_x"      = 'yes' ; then DELEGATES="$DELEGATES x"    ; fi
if test "$have_fig2dev" = 'yes' && test "$have_ps" = 'yes'  ; then DELEGATES="$DELEGATES xfig"    ; fi
if test "$have_zlib"   = 'yes' ; then DELEGATES="$DELEGATES zlib" ; fi

#
# Handle special compiler flags
#

# Add '-p' if prof source profiling support enabled
if test "$with_prof" = 'yes'
then
  CFLAGS="-p $CFLAGS"
  LDFLAGS="-p $LDFLAGS"
fi

# Add '-pg' if gprof source profiling support enabled
if test "$with_gprof" = 'yes'
then
  CFLAGS="-pg $CFLAGS"
  LDFLAGS="-pg $LDFLAGS"
fi

# Add '-ftest-coverage -fprofile-arcs' if gcov source profiling support enabled
# This is a gcc-specific feature
if test "$with_gcov" = 'yes'
then
  CFLAGS="-ftest-coverage -fprofile-arcs  $CFLAGS"
  LDFLAGS="-ftest-coverage -fprofile-arcs $LDFLAGS"
fi

#
# Specify path to shared libstdc++ if not in normal location
#

# Check whether --with-libstdc or --without-libstdc was given.
if test "${with_libstdc+set}" = set; then
  withval="$with_libstdc"
  if test "$withval" != no -a "$withval" != yes; then
    if test -d "$withval"; then
      LIBSTDC_LDFLAGS="-L$withval"
    fi
  fi

fi;

#
# C++ Support Tests (For Magick++)
#
if test "$with_magick_plus_plus" = 'yes'
then
 with_magick_plus_plus='no'
 ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='${CXX-g++} -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_gnu_compiler=$ac_cv_prog_gxx

for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl KCC RCC xlC_r xlC
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 "configure:12317: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_CXX+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CXX"; then
  ac_cv_prog_CXX="$CXX" # Let the user override the test.
else

  ac_save_IFS=$IFS; IFS=':'
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  test -f $ac_dir/$ac_word || continue

ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
break
done

fi
fi
CXX=$ac_cv_prog_CXX
if test -n "$CXX"; then
  echo "configure:12341: result: $CXX" >&5
echo "${ECHO_T}$CXX" >&6
else
  echo "configure:12344: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  test "$CXX" != "" && break
done
if test "$CXX" = ""; then
  for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl KCC RCC xlC_r xlC
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 "configure:12355: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_CXX+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CXX"; then
  ac_cv_prog_CXX="$CXX" # Let the user override the test.
else

  ac_save_IFS=$IFS; IFS=':'
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  IFS=$ac_save_IFS
  test -z "$ac_dir" && ac_dir=.
  test -f $ac_dir/$ac_word || continue

ac_cv_prog_CXX="$ac_prog"
break
done

fi
fi
CXX=$ac_cv_prog_CXX
if test -n "$CXX"; then
  echo "configure:12379: result: $CXX" >&5
echo "${ECHO_T}$CXX" >&6
else
  echo "configure:12382: result: no" >&5
echo "${ECHO_T}no" >&6
fi

test -n "$CXX" && break
done
test -n "$CXX" || CXX="g++"

fi

echo "configure:12392: checking whether the C++ compiler works" >&5
echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line 12395 "configure"
#include "confdefs.h"
#ifdef __cplusplus
extern "C" void exit (int);
#endif

int
main ()
{

  ;
  return 0;
}
_ACEOF
if { (eval echo configure:12409: \"$ac_link\") >&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
  # 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='./conftest'; { (eval echo configure:12413: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }; }; then
    cross_compiling=no
  else
    if test "$cross_compiling" = maybe; then
      cross_compiling=yes
    else
      { echo "configure: error: cannot run C++ compiled programs.
To enable cross compilation, use \`--host'." >&2; exit 1; }
    fi
  fi
fi
echo "configure:12424: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  echo "configure:12429: result: no" >&5
echo "${ECHO_T}no" >&6
{ echo "configure: error: C++ compiler cannot create executables" >&2; exit 77; }
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_extecho "configure:12433: checking whether we are cross compiling" >&5
echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
echo "configure:12435: result: $cross_compiling" >&5
echo "${ECHO_T}$cross_compiling" >&6

echo "configure:12438: checking whether we are using GNU C++" >&5
echo $ECHO_N "checking whether we are using GNU C++... $ECHO_C" >&6
if test "${ac_cv_prog_gxx+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  # The semicolon is to pacify NeXT's syntax-checking cpp.
cat >conftest.$ac_ext <<_ACEOF
#ifdef __GNUC__
  yes;
#endif
_ACEOF
if { ac_try='${CXX-g++} -E conftest.$ac_ext'; { (eval echo configure:12449: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }; } | grep yes >/dev/null; then
  ac_cv_prog_gxx=yes
else
  ac_cv_prog_gxx=no
fi
fi
echo "configure:12455: result: $ac_cv_prog_gxx" >&5
echo "${ECHO_T}$ac_cv_prog_gxx" >&6
ac_gnu_compiler=$ac_cv_prog_gxx
if test $ac_gnu_compiler = yes; then
  GXX=yes
else
  GXX=
fi
ac_test_CXXFLAGS=${CXXFLAGS+set}
ac_save_CXXFLAGS=$CXXFLAGS
CXXFLAGS=
echo "configure:12466: checking whether ${CXX-g++} accepts -g" >&5
echo $ECHO_N "checking whether ${CXX-g++} accepts -g... $ECHO_C" >&6
if test "${ac_cv_prog_cxx_g+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line 12472 "configure"
#include "confdefs.h"
#ifdef __cplusplus
extern "C" void exit (int);
#endif

int
main ()
{

  ;
  return 0;
}
_ACEOF
if ${CXX-g++} -g -c conftest.$ac_ext 2>&1 | grep . >/dev/null; then
  ac_cv_prog_cxx_g=no
else
  ac_cv_prog_cxx_g=yes
fi
rm -f conftest*

fi
echo "configure:12494: result: $ac_cv_prog_cxx_g" >&5
echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
if test "$ac_test_CXXFLAGS" = set; then
  CXXFLAGS=$ac_save_CXXFLAGS
elif test $ac_cv_prog_cxx_g = yes; then
  if test "$GXX" = yes; then
    CXXFLAGS="-g -O2"
  else
    CXXFLAGS="-g"
  fi
else
  if test "$GXX" = yes; then
    CXXFLAGS="-O2"
  else
    CXXFLAGS=
  fi
fi

ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='${CC-cc} -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_gnu_compiler=$ac_cv_prog_gcc

depcc="$CXX"
depcpp="$CXXCPP"
echo "configure:12520: checking dependency style of $depcc" >&5
echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

if test -z "$AMDEP"; then
  echo '#include "conftest.h"' > conftest.c
  echo 'int i;' > conftest.h

  am_cv_CXX_dependencies_compiler_type=none
  for depmode in `sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < "$am_depcomp"`; do
    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 $am_depcomp $depcc -c conftest.c -o conftest.o 2>/dev/null &&
       grep conftest.h conftest.Po > /dev/null 2>&1; then
      am_cv_CXX_dependencies_compiler_type="$depmode"
      break
    fi
  done

  rm -f conftest.*
else
  am_cv_CXX_dependencies_compiler_type=none
fi

fi

echo "configure:12564: result: $am_cv_CXX_dependencies_compiler_type" >&5
echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6
CXXDEPMODE="depmode=$am_cv_CXX_dependencies_compiler_type"

 ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='${CXX-g++} -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_gnu_compiler=$ac_cv_prog_gxx

 echo "configure:12574: checking whether the compiler recognizes bool as a built-in type" >&5
echo $ECHO_N "checking whether the compiler recognizes bool as a built-in type... $ECHO_C" >&6
if test "${ac_cv_cxx_bool+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

 ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='${CXX-g++} -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_gnu_compiler=$ac_cv_prog_gxx

 cat >conftest.$ac_ext <<_ACEOF
#line 12587 "configure"
#include "confdefs.h"
#ifdef __cplusplus
extern "C" void exit (int);
#endif

int f(int  x){return 1;}
int f(char x){return 1;}
int f(bool x){return 1;}

int
main ()
{
bool b = true; return f(b);
  ;
  return 0;
}
_ACEOF
if { (eval echo configure:12605: \"$ac_compile\") >&5; (eval $ac_compile) 2>&5; } && test -s conftest.$ac_objext; then
  ac_cv_cxx_bool=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_cxx_bool=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
 ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='${CXX-g++} -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_gnu_compiler=$ac_cv_prog_gxx

fi
echo "configure:12620: result: $ac_cv_cxx_bool" >&5
echo "${ECHO_T}$ac_cv_cxx_bool" >&6
if test "$ac_cv_cxx_bool" = yes; then

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

fi

 echo "configure:12630: checking whether the compiler supports const_cast<>" >&5
echo $ECHO_N "checking whether the compiler supports const_cast<>... $ECHO_C" >&6
if test "${ac_cv_cxx_const_cast+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

 ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='${CXX-g++} -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_gnu_compiler=$ac_cv_prog_gxx

 cat >conftest.$ac_ext <<_ACEOF
#line 12643 "configure"
#include "confdefs.h"
#ifdef __cplusplus
extern "C" void exit (int);
#endif

int
main ()
{
int x = 0;const int& y = x;int& z = const_cast<int&>(y);return z;
  ;
  return 0;
}
_ACEOF
if { (eval echo configure:12657: \"$ac_compile\") >&5; (eval $ac_compile) 2>&5; } && test -s conftest.$ac_objext; then
  ac_cv_cxx_const_cast=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_cxx_const_cast=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
 ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='${CXX-g++} -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_gnu_compiler=$ac_cv_prog_gxx

fi
echo "configure:12672: result: $ac_cv_cxx_const_cast" >&5
echo "${ECHO_T}$ac_cv_cxx_const_cast" >&6
if test "$ac_cv_cxx_const_cast" = yes; then

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

fi

 echo "configure:12682: checking whether the compiler supports default template parameters" >&5
echo $ECHO_N "checking whether the compiler supports default template parameters... $ECHO_C" >&6
if test "${ac_cv_cxx_default_template_parameters+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

 ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='${CXX-g++} -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_gnu_compiler=$ac_cv_prog_gxx

 cat >conftest.$ac_ext <<_ACEOF
#line 12695 "configure"
#include "confdefs.h"
#ifdef __cplusplus
extern "C" void exit (int);
#endif

template<class T = double, int N = 10> class A {public: int f() {return 0;}};

int
main ()
{
A<float> a; return a.f();
  ;
  return 0;
}
_ACEOF
if { (eval echo configure:12711: \"$ac_compile\") >&5; (eval $ac_compile) 2>&5; } && test -s conftest.$ac_objext; then
  ac_cv_cxx_default_template_parameters=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_cxx_default_template_parameters=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
 ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='${CXX-g++} -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_gnu_compiler=$ac_cv_prog_gxx

fi
echo "configure:12726: result: $ac_cv_cxx_default_template_parameters" >&5
echo "${ECHO_T}$ac_cv_cxx_default_template_parameters" >&6
if test "$ac_cv_cxx_default_template_parameters" = yes; then

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

fi

 echo "configure:12736: checking whether the compiler supports exceptions" >&5
echo $ECHO_N "checking whether the compiler supports exceptions... $ECHO_C" >&6
if test "${ac_cv_cxx_exceptions+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

 ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='${CXX-g++} -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_gnu_compiler=$ac_cv_prog_gxx

 cat >conftest.$ac_ext <<_ACEOF
#line 12749 "configure"
#include "confdefs.h"
#ifdef __cplusplus
extern "C" void exit (int);
#endif

int
main ()
{
try { throw  1; } catch (int i) { return i; }
  ;
  return 0;
}
_ACEOF
if { (eval echo configure:12763: \"$ac_compile\") >&5; (eval $ac_compile) 2>&5; } && test -s conftest.$ac_objext; then
  ac_cv_cxx_exceptions=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_cxx_exceptions=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
 ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='${CXX-g++} -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_gnu_compiler=$ac_cv_prog_gxx

fi
echo "configure:12778: result: $ac_cv_cxx_exceptions" >&5
echo "${ECHO_T}$ac_cv_cxx_exceptions" >&6
if test "$ac_cv_cxx_exceptions" = yes; then

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

fi

 echo "configure:12788: checking whether the compiler supports the explicit keyword" >&5
echo $ECHO_N "checking whether the compiler supports the explicit keyword... $ECHO_C" >&6
if test "${ac_cv_cxx_explicit+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

 ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='${CXX-g++} -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_gnu_compiler=$ac_cv_prog_gxx

 cat >conftest.$ac_ext <<_ACEOF
#line 12801 "configure"
#include "confdefs.h"
#ifdef __cplusplus
extern "C" void exit (int);
#endif
class A{public:explicit A(double){}};
int
main ()
{
double c = 5.0;A x(c);return 0;
  ;
  return 0;
}
_ACEOF
if { (eval echo configure:12815: \"$ac_compile\") >&5; (eval $ac_compile) 2>&5; } && test -s conftest.$ac_objext; then
  ac_cv_cxx_explicit=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_cxx_explicit=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
 ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='${CXX-g++} -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_gnu_compiler=$ac_cv_prog_gxx

fi
echo "configure:12830: result: $ac_cv_cxx_explicit" >&5
echo "${ECHO_T}$ac_cv_cxx_explicit" >&6
if test "$ac_cv_cxx_explicit" = yes; then

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

fi

 echo "configure:12840: checking whether the compiler implements namespaces" >&5
echo $ECHO_N "checking whether the compiler implements namespaces... $ECHO_C" >&6
if test "${ac_cv_cxx_namespaces+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

 ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='${CXX-g++} -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_gnu_compiler=$ac_cv_prog_gxx

 cat >conftest.$ac_ext <<_ACEOF
#line 12853 "configure"
#include "confdefs.h"
#ifdef __cplusplus
extern "C" void exit (int);
#endif
namespace Outer { namespace Inner { int i = 0; }}
int
main ()
{
using namespace Outer::Inner; return i;
  ;
  return 0;
}
_ACEOF
if { (eval echo configure:12867: \"$ac_compile\") >&5; (eval $ac_compile) 2>&5; } && test -s conftest.$ac_objext; then
  ac_cv_cxx_namespaces=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_cxx_namespaces=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
 ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='${CXX-g++} -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_gnu_compiler=$ac_cv_prog_gxx

fi
echo "configure:12882: result: $ac_cv_cxx_namespaces" >&5
echo "${ECHO_T}$ac_cv_cxx_namespaces" >&6
if test "$ac_cv_cxx_namespaces" = yes; then

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

fi

echo "configure:12892: checking whether the compiler supports ISO C++ standard library" >&5
echo $ECHO_N "checking whether the compiler supports ISO C++ standard library... $ECHO_C" >&6
if test "${ac_cv_cxx_have_std+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

 ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='${CXX-g++} -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_gnu_compiler=$ac_cv_prog_gxx

 cat >conftest.$ac_ext <<_ACEOF
#line 12905 "configure"
#include "confdefs.h"
#ifdef __cplusplus
extern "C" void exit (int);
#endif
#include <iostream>
#include <map>
#include <iomanip>
#ifdef HAVE_NAMESPACES
using namespace std;
#endif
int
main ()
{
return 0;
  ;
  return 0;
}
_ACEOF
if { (eval echo configure:12924: \"$ac_compile\") >&5; (eval $ac_compile) 2>&5; } && test -s conftest.$ac_objext; then
  ac_cv_cxx_have_std=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_cxx_have_std=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
 ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='${CXX-g++} -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_gnu_compiler=$ac_cv_prog_gxx

fi
echo "configure:12939: result: $ac_cv_cxx_have_std" >&5
echo "${ECHO_T}$ac_cv_cxx_have_std" >&6
if test "$ac_cv_cxx_have_std" = yes; then

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

fi

 echo "configure:12949: checking whether the compiler supports Standard Template Library" >&5
echo $ECHO_N "checking whether the compiler supports Standard Template Library... $ECHO_C" >&6
if test "${ac_cv_cxx_have_stl+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

 ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='${CXX-g++} -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_gnu_compiler=$ac_cv_prog_gxx

 cat >conftest.$ac_ext <<_ACEOF
#line 12962 "configure"
#include "confdefs.h"
#ifdef __cplusplus
extern "C" void exit (int);
#endif
#include <list>
#include <deque>
#ifdef HAVE_NAMESPACES
using namespace std;
#endif
int
main ()
{
list<int> x; x.push_back(5);
list<int>::iterator iter = x.begin(); if (iter != x.end()) ++iter; return 0;
  ;
  return 0;
}
_ACEOF
if { (eval echo configure:12981: \"$ac_compile\") >&5; (eval $ac_compile) 2>&5; } && test -s conftest.$ac_objext; then
  ac_cv_cxx_have_stl=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_cxx_have_stl=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
 ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='${CXX-g++} -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_gnu_compiler=$ac_cv_prog_gxx

fi
echo "configure:12996: result: $ac_cv_cxx_have_stl" >&5
echo "${ECHO_T}$ac_cv_cxx_have_stl" >&6
if test "$ac_cv_cxx_have_stl" = yes; then

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

fi

 echo "configure:13006: checking whether the compiler supports the mutable keyword" >&5
echo $ECHO_N "checking whether the compiler supports the mutable keyword... $ECHO_C" >&6
if test "${ac_cv_cxx_mutable+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

 ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='${CXX-g++} -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_gnu_compiler=$ac_cv_prog_gxx

 cat >conftest.$ac_ext <<_ACEOF
#line 13019 "configure"
#include "confdefs.h"
#ifdef __cplusplus
extern "C" void exit (int);
#endif

class A { mutable int i;
          public:
          int f (int n) const { i = n; return i; }
        };

int
main ()
{
A a; return a.f (1);
  ;
  return 0;
}
_ACEOF
if { (eval echo configure:13038: \"$ac_compile\") >&5; (eval $ac_compile) 2>&5; } && test -s conftest.$ac_objext; then
  ac_cv_cxx_mutable=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_cxx_mutable=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
 ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='${CXX-g++} -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_gnu_compiler=$ac_cv_prog_gxx

fi
echo "configure:13053: result: $ac_cv_cxx_mutable" >&5
echo "${ECHO_T}$ac_cv_cxx_mutable" >&6
if test "$ac_cv_cxx_mutable" = yes; then

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

fi

 echo "configure:13063: checking whether the compiler implements namespaces" >&5
echo $ECHO_N "checking whether the compiler implements namespaces... $ECHO_C" >&6
if test "${ac_cv_cxx_namespaces+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

 ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='${CXX-g++} -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_gnu_compiler=$ac_cv_prog_gxx

 cat >conftest.$ac_ext <<_ACEOF
#line 13076 "configure"
#include "confdefs.h"
#ifdef __cplusplus
extern "C" void exit (int);
#endif
namespace Outer { namespace Inner { int i = 0; }}
int
main ()
{
using namespace Outer::Inner; return i;
  ;
  return 0;
}
_ACEOF
if { (eval echo configure:13090: \"$ac_compile\") >&5; (eval $ac_compile) 2>&5; } && test -s conftest.$ac_objext; then
  ac_cv_cxx_namespaces=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_cxx_namespaces=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
 ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='${CXX-g++} -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_gnu_compiler=$ac_cv_prog_gxx

fi
echo "configure:13105: result: $ac_cv_cxx_namespaces" >&5
echo "${ECHO_T}$ac_cv_cxx_namespaces" >&6
if test "$ac_cv_cxx_namespaces" = yes; then

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

fi

 echo "configure:13115: checking whether the compiler accepts the new for scoping rules" >&5
echo $ECHO_N "checking whether the compiler accepts the new for scoping rules... $ECHO_C" >&6
if test "${ac_cv_cxx_new_for_scoping+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

 ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='${CXX-g++} -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_gnu_compiler=$ac_cv_prog_gxx

 cat >conftest.$ac_ext <<_ACEOF
#line 13128 "configure"
#include "confdefs.h"
#ifdef __cplusplus
extern "C" void exit (int);
#endif

int
main ()
{

  int z = 0;
  for (int i = 0; i < 10; ++i)
    z = z + i;
  for (int i = 0; i < 10; ++i)
    z = z - i;
  return z;
  ;
  return 0;
}
_ACEOF
if { (eval echo configure:13148: \"$ac_compile\") >&5; (eval $ac_compile) 2>&5; } && test -s conftest.$ac_objext; then
  ac_cv_cxx_new_for_scoping=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_cxx_new_for_scoping=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
 ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='${CXX-g++} -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_gnu_compiler=$ac_cv_prog_gxx

fi
echo "configure:13163: result: $ac_cv_cxx_new_for_scoping" >&5
echo "${ECHO_T}$ac_cv_cxx_new_for_scoping" >&6
if test "$ac_cv_cxx_new_for_scoping" = yes; then

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

fi

 echo "configure:13173: checking whether the compiler supports static_cast<>" >&5
echo $ECHO_N "checking whether the compiler supports static_cast<>... $ECHO_C" >&6
if test "${ac_cv_cxx_static_cast+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

 ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='${CXX-g++} -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_gnu_compiler=$ac_cv_prog_gxx

 cat >conftest.$ac_ext <<_ACEOF
#line 13186 "configure"
#include "confdefs.h"
#ifdef __cplusplus
extern "C" void exit (int);
#endif
#include <typeinfo>
class Base { public : Base () {} virtual void f () = 0; };
class Derived : public Base { public : Derived () {} virtual void f () {} };
int g (Derived&) { return 0; }
int
main ()
{

Derived d; Base& b = d; Derived& s = static_cast<Derived&> (b); return g (s);
  ;
  return 0;
}
_ACEOF
if { (eval echo configure:13204: \"$ac_compile\") >&5; (eval $ac_compile) 2>&5; } && test -s conftest.$ac_objext; then
  ac_cv_cxx_static_cast=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_cxx_static_cast=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
 ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='${CXX-g++} -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_gnu_compiler=$ac_cv_prog_gxx

fi
echo "configure:13219: result: $ac_cv_cxx_static_cast" >&5
echo "${ECHO_T}$ac_cv_cxx_static_cast" >&6
if test "$ac_cv_cxx_static_cast" = yes; then

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

fi

 echo "configure:13229: checking whether the compiler supports basic templates" >&5
echo $ECHO_N "checking whether the compiler supports basic templates... $ECHO_C" >&6
if test "${ac_cv_cxx_templates+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

 ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='${CXX-g++} -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_gnu_compiler=$ac_cv_prog_gxx

 cat >conftest.$ac_ext <<_ACEOF
#line 13242 "configure"
#include "confdefs.h"
#ifdef __cplusplus
extern "C" void exit (int);
#endif
template<class T> class A {public:A(){}};
template<class T> void f(const A<T>& ){}
int
main ()
{

A<double> d; A<int> i; f(d); f(i); return 0;
  ;
  return 0;
}
_ACEOF
if { (eval echo configure:13258: \"$ac_compile\") >&5; (eval $ac_compile) 2>&5; } && test -s conftest.$ac_objext; then
  ac_cv_cxx_templates=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_cxx_templates=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
 ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='${CXX-g++} -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_gnu_compiler=$ac_cv_prog_gxx

fi
echo "configure:13273: result: $ac_cv_cxx_templates" >&5
echo "${ECHO_T}$ac_cv_cxx_templates" >&6
if test "$ac_cv_cxx_templates" = yes; then

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

fi

 echo "configure:13283: checking whether using Sun Workshop C++ compiler" >&5
echo $ECHO_N "checking whether using Sun Workshop C++ compiler... $ECHO_C" >&6
if test "${rssh_cv_check_sunpro_cc+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

 ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='${CXX-g++} -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_gnu_compiler=$ac_cv_prog_gxx

 cat >conftest.$ac_ext <<_ACEOF
#line 13296 "configure"
#include "confdefs.h"
#ifdef __cplusplus
extern "C" void exit (int);
#endif

int
main ()
{
#ifndef __SUNPRO_CC
# include "error: this is not Sun Workshop."
#endif

  ;
  return 0;
}
_ACEOF
if { (eval echo configure:13313: \"$ac_compile\") >&5; (eval $ac_compile) 2>&5; } && test -s conftest.$ac_objext; then
  rssh_cv_check_sunpro_cc=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rssh_cv_check_sunpro_cc=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='${CXX-g++} -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_gnu_compiler=$ac_cv_prog_gxx

fi
echo "configure:13328: result: $rssh_cv_check_sunpro_cc" >&5
echo "${ECHO_T}$rssh_cv_check_sunpro_cc" >&6
if test ${rssh_cv_check_sunpro_cc} = yes
then

  :
else

  :
fi

 echo "configure:13339: checking whether C++ compiler is sufficient for Magick++" >&5
echo $ECHO_N "checking whether C++ compiler is sufficient for Magick++... $ECHO_C" >&6
 if test \
  $ac_cv_cxx_bool = 'yes' -a \
  $ac_cv_cxx_const_cast = 'yes' -a \
  $ac_cv_cxx_default_template_parameters = 'yes' -a \
  $ac_cv_cxx_exceptions = 'yes' -a \
  $ac_cv_cxx_explicit = 'yes' -a \
  $ac_cv_cxx_have_std = 'yes' -a \
  $ac_cv_cxx_have_stl = 'yes' -a \
  $ac_cv_cxx_mutable = 'yes' -a \
  $ac_cv_cxx_namespaces = 'yes' -a \
  $ac_cv_cxx_new_for_scoping = 'yes' -a \
  $ac_cv_cxx_static_cast = 'yes' -a \
  $ac_cv_cxx_templates = 'yes'
 then
  with_magick_plus_plus='yes'
 fi
 echo "configure:13357: result: $with_magick_plus_plus" >&5
echo "${ECHO_T}$with_magick_plus_plus" >&6
fi

if test "$with_magick_plus_plus" != 'no'; then
  WITH_MAGICK_PLUS_PLUS_TRUE=
  WITH_MAGICK_PLUS_PLUS_FALSE='#'
else
  WITH_MAGICK_PLUS_PLUS_TRUE='#'
  WITH_MAGICK_PLUS_PLUS_FALSE=
fi

#
# Remove extraneous spaces from output variables (asthetic)
#
X_CFLAGS=`echo $X_CFLAGS | sed -e 's/  */ /g'`
X_PRE_LIBS=`echo $X_PRE_LIBS | sed -e 's/  */ /g'`
X_LIBS=`echo $X_LIBS | sed -e 's/  */ /g'`
X_EXTRA_LIBS=`echo $X_EXTRA_LIBS | sed -e 's/  */ /g'`

CC=`echo $CC | sed -e 's/  */ /g'`
CFLAGS=`echo $CFLAGS | sed -e 's/  */ /g'`
CPPFLAGS=`echo $CPPFLAGS | sed -e 's/  */ /g'`
CXXFLAGS=`echo $CXXFLAGS | sed -e 's/  */ /g'`
LDFLAGS=`echo $LDFLAGS | sed -e 's/  */ /g'`
#LIBS=`echo $LIBS | sed -e 's/  */ /g'`
if test "$with_modules" = 'no'
then
#  LIBS=`echo "$LIB_JBIG $LIB_HDF $LIB_TIFF $LIB_TTF $LIB_JPEG $LIB_PNG $LIB_FPX $LIB_DPS $LIB_XEXT $LIB_XT $LIB_X11 $LIB_BZLIB $LIB_ZLIB $LIB_SFIO $LIB_THREAD $LIB_LF $LIB_MATH" | sed -e 's/  */ /g'`
  LIBS=`echo "" | sed -e 's/  */ /g'`
else
#  LIBS=`echo "$LIB_SFIO $LIB_THREAD $LIB_LF $LIB_MATH" | sed -e 's/  */ /g'`
  LIBS=`echo "" | sed -e 's/  */ /g'`
fi

#AC_SUBST(CPPFLAGS)

#AC_SUBST(LDFLAGS)
#AC_SUBST(X_PRE_LIBS)
#AC_SUBST(X_LIBS)
#AC_SUBST(X_EXTRA_LIBS)

ac_config_files="$ac_config_files Makefile delegates/delegates.mgk delegates/Makefile magick/Makefile \
  coders/Makefile utilities/Makefile tests/Makefile magick/Magick-config \
  Magick++/bin/Makefile Magick++/bin/Magick++-config Magick++/Makefile \
  Magick++/lib/Makefile Magick++/lib/Magick++/Makefile \
  Magick++/demo/Makefile Magick++/tests/Makefile \
  PerlMagick/Makefile.PL"
trap '' 1 2 15
cat >confcache <<\EOF
# 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.

EOF
# 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 \
    	-e "s/'/'\\\\''/g" \
    	-e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1='\\2'/p"
      ;;
    *)
      # `set' quotes correctly as required by POSIX, so do not add quotes.
      sed -n 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\2/p'
      ;;
    esac;
} |
  sed '/^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/' >>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
trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15

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

# Any assignment to VPATH causes Sun make to only execute
# the first set of double-colon rules, so remove it if not needed.
# If there is a colon in the path, we need to keep it.
if test "x$srcdir" = x.; then
  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
fi

DEFS=-DHAVE_CONFIG_H

# Save into config.log some information that might help in debugging.
echo >&5
echo "Cache variables:" >&5
# 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 \
    	-e "s/'/'\\\\''/g" \
    	-e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1='\\2'/p"
      ;;
    *)
      # `set' quotes correctly as required by POSIX, so do not add quotes.
      sed -n 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\2/p'
      ;;
    esac;
} | sed 's/^/| /' >&5
echo >&5
echo "confdefs.h:" >&5
cat confdefs.h | sed 's/^/| /' >&5

: ${CONFIG_STATUS=./config.status}
trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
echo creating $CONFIG_STATUS
cat >$CONFIG_STATUS <<\EOF
#! /bin/sh
# 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
me=`echo "$0" | sed 's,.*/,,'`
SHELL=${CONFIG_SHELL-/bin/sh}

EOF

# 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="\
\`$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 $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 generated by autoconf version 2.49b.
Configured on host `(hostname || uname -n) 2>/dev/null | sed 1q` by
  `echo "$0 $ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`"

ac_given_srcdir=$srcdir
ac_given_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 "$me: ambiguous option: $ac_option
Try \`$me --help' for more information."; 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;;

  # Handling of arguments.
  'Makefile' ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
  'delegates/delegates.mgk' ) CONFIG_FILES="$CONFIG_FILES delegates/delegates.mgk" ;;
  'delegates/Makefile' ) CONFIG_FILES="$CONFIG_FILES delegates/Makefile" ;;
  'magick/Makefile' ) CONFIG_FILES="$CONFIG_FILES magick/Makefile" ;;
  'coders/Makefile' ) CONFIG_FILES="$CONFIG_FILES coders/Makefile" ;;
  'utilities/Makefile' ) CONFIG_FILES="$CONFIG_FILES utilities/Makefile" ;;
  'tests/Makefile' ) CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
  'magick/Magick-config' ) CONFIG_FILES="$CONFIG_FILES magick/Magick-config" ;;
  'Magick++/bin/Makefile' ) CONFIG_FILES="$CONFIG_FILES Magick++/bin/Makefile" ;;
  'Magick++/bin/Magick++-config' ) CONFIG_FILES="$CONFIG_FILES Magick++/bin/Magick++-config" ;;
  'Magick++/Makefile' ) CONFIG_FILES="$CONFIG_FILES Magick++/Makefile" ;;
  'Magick++/lib/Makefile' ) CONFIG_FILES="$CONFIG_FILES Magick++/lib/Makefile" ;;
  'Magick++/lib/Magick++/Makefile' ) CONFIG_FILES="$CONFIG_FILES Magick++/lib/Magick++/Makefile" ;;
  'Magick++/demo/Makefile' ) CONFIG_FILES="$CONFIG_FILES Magick++/demo/Makefile" ;;
  'Magick++/tests/Makefile' ) CONFIG_FILES="$CONFIG_FILES Magick++/tests/Makefile" ;;
  'PerlMagick/Makefile.PL' ) CONFIG_FILES="$CONFIG_FILES PerlMagick/Makefile.PL" ;;
  'default-1' ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
  'default-2' ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-2" ;;
  'magick/config.h' ) CONFIG_HEADERS="$CONFIG_HEADERS magick/config.h" ;;

  # This is an error.
  -*) echo "$me: unrecognized option: $1
Try \`$me --help' for more information."; exit 1 ;;
  *) echo "$me: invalid argument: $1"; exit 1 ;;
  esac
  shift
done

EOF

cat >>$CONFIG_STATUS <<\EOF
# 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.
if $ac_need_defaults; then
  : ${CONFIG_FILES=$config_files}
  : ${CONFIG_HEADERS=$config_headers}
  : ${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 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;
}

EOF

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

am_indx=1
  for am_file in magick/config.h; do
    case " $CONFIG_HEADERS " in
    *" $am_file "*)
      echo timestamp > `echo $am_file | sed 's%:.*%%;s%[^/]*$%%'`stamp-h$am_indx
      ;;
    esac
    am_indx=\`expr \$am_indx + 1\`
  done
AMDEP="$AMDEP"
ac_aux_dir="$ac_aux_dir"

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,@ECHO_C@,$ECHO_C,;t t
s,@ECHO_N@,$ECHO_N,;t t
s,@ECHO_T@,$ECHO_T,;t t
s,@CFLAGS@,$CFLAGS,;t t
s,@CPPFLAGS@,$CPPFLAGS,;t t
s,@CXXFLAGS@,$CXXFLAGS,;t t
s,@FFLAGS@,$FFLAGS,;t t
s,@DEFS@,$DEFS,;t t
s,@LDFLAGS@,$LDFLAGS,;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,@MAJOR_VERSION@,$MAJOR_VERSION,;t t
s,@MINOR_VERSION@,$MINOR_VERSION,;t t
s,@MICRO_VERSION@,$MICRO_VERSION,;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,@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,@AWK@,$AWK,;t t
s,@SET_MAKE@,$SET_MAKE,;t t
s,@AMDEP@,$AMDEP,;t t
s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t
s,@DEPDIR@,$DEPDIR,;t t
s,@CC@,$CC,;t t
s,@ac_ct_CC@,$ac_ct_CC,;t t
s,@OBJEXT@,$OBJEXT,;t t
s,@EXEEXT@,$EXEEXT,;t t
s,@CPP@,$CPP,;t t
s,@CCDEPMODE@,$CCDEPMODE,;t t
s,@LD@,$LD,;t t
s,@LN_S@,$LN_S,;t t
s,@INCLTDL@,$INCLTDL,;t t
s,@LIBLTDL@,$LIBLTDL,;t t
s,@RANLIB@,$RANLIB,;t t
s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
s,@STRIP@,$STRIP,;t t
s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
s,@LIBTOOL@,$LIBTOOL,;t t
s,@CXX@,$CXX,;t t
s,@CXXCPP@,$CXXCPP,;t t
s,@CXXDEPMODE@,$CXXDEPMODE,;t t
s,@WITH_MODULES_TRUE@,$WITH_MODULES_TRUE,;t t
s,@WITH_MODULES_FALSE@,$WITH_MODULES_FALSE,;t t
s,@subdirs@,$subdirs,;t t
s,@DLLDFLAGS@,$DLLDFLAGS,;t t
s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t
s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t
s,@MAINT@,$MAINT,;t t
s,@HasLZW_TRUE@,$HasLZW_TRUE,;t t
s,@HasLZW_FALSE@,$HasLZW_FALSE,;t t
s,@PERL_MAKE_OPTIONS@,$PERL_MAKE_OPTIONS,;t t
s,@WITH_PERL_TRUE@,$WITH_PERL_TRUE,;t t
s,@WITH_PERL_FALSE@,$WITH_PERL_FALSE,;t t
s,@WITH_PERL_STATIC_TRUE@,$WITH_PERL_STATIC_TRUE,;t t
s,@WITH_PERL_STATIC_FALSE@,$WITH_PERL_STATIC_FALSE,;t t
s,@WITH_PERL_DYNAMIC_TRUE@,$WITH_PERL_DYNAMIC_TRUE,;t t
s,@WITH_PERL_DYNAMIC_FALSE@,$WITH_PERL_DYNAMIC_FALSE,;t t
s,@LIB_LF@,$LIB_LF,;t t
s,@LIB_MATH@,$LIB_MATH,;t t
s,@LIB_THREAD@,$LIB_THREAD,;t t
s,@HasSFIO_TRUE@,$HasSFIO_TRUE,;t t
s,@HasSFIO_FALSE@,$HasSFIO_FALSE,;t t
s,@LIB_SFIO@,$LIB_SFIO,;t t
s,@HasZLIB_TRUE@,$HasZLIB_TRUE,;t t
s,@HasZLIB_FALSE@,$HasZLIB_FALSE,;t t
s,@LIB_ZLIB@,$LIB_ZLIB,;t t
s,@HasBZLIB_TRUE@,$HasBZLIB_TRUE,;t t
s,@HasBZLIB_FALSE@,$HasBZLIB_FALSE,;t t
s,@LIB_BZLIB@,$LIB_BZLIB,;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,@HasX11_TRUE@,$HasX11_TRUE,;t t
s,@HasX11_FALSE@,$HasX11_FALSE,;t t
s,@LIB_X11@,$LIB_X11,;t t
s,@LIB_XEXT@,$LIB_XEXT,;t t
s,@LIB_XT@,$LIB_XT,;t t
s,@LIB_DL@,$LIB_DL,;t t
s,@HasDPS_TRUE@,$HasDPS_TRUE,;t t
s,@HasDPS_FALSE@,$HasDPS_FALSE,;t t
s,@LIB_DPS@,$LIB_DPS,;t t
s,@HasFPX_TRUE@,$HasFPX_TRUE,;t t
s,@HasFPX_FALSE@,$HasFPX_FALSE,;t t
s,@LIB_FPX@,$LIB_FPX,;t t
s,@HasLCMS_TRUE@,$HasLCMS_TRUE,;t t
s,@HasLCMS_FALSE@,$HasLCMS_FALSE,;t t
s,@LIB_LCMS@,$LIB_LCMS,;t t
s,@HasPNG_TRUE@,$HasPNG_TRUE,;t t
s,@HasPNG_FALSE@,$HasPNG_FALSE,;t t
s,@LIB_PNG@,$LIB_PNG,;t t
s,@HasJPEG_TRUE@,$HasJPEG_TRUE,;t t
s,@HasJPEG_FALSE@,$HasJPEG_FALSE,;t t
s,@LIB_JPEG@,$LIB_JPEG,;t t
s,@HasTTF_TRUE@,$HasTTF_TRUE,;t t
s,@HasTTF_FALSE@,$HasTTF_FALSE,;t t
s,@LIB_TTF@,$LIB_TTF,;t t
s,@HasTIFF_TRUE@,$HasTIFF_TRUE,;t t
s,@HasTIFF_FALSE@,$HasTIFF_FALSE,;t t
s,@LIB_TIFF@,$LIB_TIFF,;t t
s,@HasHDF_TRUE@,$HasHDF_TRUE,;t t
s,@HasHDF_FALSE@,$HasHDF_FALSE,;t t
s,@LIB_HDF@,$LIB_HDF,;t t
s,@HasJBIG_TRUE@,$HasJBIG_TRUE,;t t
s,@HasJBIG_FALSE@,$HasJBIG_FALSE,;t t
s,@LIB_JBIG@,$LIB_JBIG,;t t
s,@HasXML_TRUE@,$HasXML_TRUE,;t t
s,@HasXML_FALSE@,$HasXML_FALSE,;t t
s,@LIB_XML@,$LIB_XML,;t t
s,@LIBOBJS@,$LIBOBJS,;t t
s,@BZIPDelegate@,$BZIPDelegate,;t t
s,@BrowseDelegate@,$BrowseDelegate,;t t
s,@CGMDecodeDelegate@,$CGMDecodeDelegate,;t t
s,@CatDelegate@,$CatDelegate,;t t
s,@DOTDecodeDelegate@,$DOTDecodeDelegate,;t t
s,@DVIDecodeDelegate@,$DVIDecodeDelegate,;t t
s,@EchoDelegate@,$EchoDelegate,;t t
s,@EditorDelegate@,$EditorDelegate,;t t
s,@FIGDecodeDelegate@,$FIGDecodeDelegate,;t t
s,@GnuplotDecodeDelegate@,$GnuplotDecodeDelegate,;t t
s,@HPGLDecodeDelegate@,$HPGLDecodeDelegate,;t t
s,@HTMLDecodeDelegate@,$HTMLDecodeDelegate,;t t
s,@ILBMDecodeDelegate@,$ILBMDecodeDelegate,;t t
s,@ILBMEncodeDelegate@,$ILBMEncodeDelegate,;t t
s,@LPDelegate@,$LPDelegate,;t t
s,@LPRDelegate@,$LPRDelegate,;t t
s,@LZWDecodeDelegate@,$LZWDecodeDelegate,;t t
s,@LZWEncodeDelegate@,$LZWEncodeDelegate,;t t
s,@LaunchDelegate@,$LaunchDelegate,;t t
s,@MANDelegate@,$MANDelegate,;t t
s,@MPEGDecodeDelegate@,$MPEGDecodeDelegate,;t t
s,@MPEGEncodeDelegate@,$MPEGEncodeDelegate,;t t
s,@MVDelegate@,$MVDelegate,;t t
s,@PGPDecodeDelegate@,$PGPDecodeDelegate,;t t
s,@POVDelegate@,$POVDelegate,;t t
s,@PSDelegate@,$PSDelegate,;t t
s,@RADDecodeDelegate@,$RADDecodeDelegate,;t t
s,@RLEEncodeDelegate@,$RLEEncodeDelegate,;t t
s,@RMDelegate@,$RMDelegate,;t t
s,@SCANDecodeDelegate@,$SCANDecodeDelegate,;t t
s,@TXTDelegate@,$TXTDelegate,;t t
s,@WMFDecodeDelegate@,$WMFDecodeDelegate,;t t
s,@WWWDecodeDelegate@,$WWWDecodeDelegate,;t t
s,@XCFDecodeDelegate@,$XCFDecodeDelegate,;t t
s,@ZipDelegate@,$ZipDelegate,;t t
s,@PrintDelegate@,$PrintDelegate,;t t
s,@ConvertDelegate@,$ConvertDelegate,;t t
s,@MogrifyDelegate@,$MogrifyDelegate,;t t
s,@ShowImageDelegate@,$ShowImageDelegate,;t t
s,@GSMonoDevice@,$GSMonoDevice,;t t
s,@GSPDFDevice@,$GSPDFDevice,;t t
s,@GSPSDevice@,$GSPSDevice,;t t
s,@GSColorDevice@,$GSColorDevice,;t t
s,@GSEPSDevice@,$GSEPSDevice,;t t
s,@PERL@,$PERL,;t t
s,@MAGICKLIB@,$MAGICKLIB,;t t
s,@DELEGATES@,$DELEGATES,;t t
s,@LIBSTDC_LDFLAGS@,$LIBSTDC_LDFLAGS,;t t
s,@WITH_MAGICK_PLUS_PLUS_TRUE@,$WITH_MAGICK_PLUS_PLUS_TRUE,;t t
s,@WITH_MAGICK_PLUS_PLUS_FALSE@,$WITH_MAGICK_PLUS_PLUS_FALSE,;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

  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
  ac_dir=`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/p; q; }
	    /^X\(\/\/\)^/.*/{ s//\1/p; q; }
	    /^X\(\/\/\)$/{ s//\1/p; q; }
	    /^X\(\/\).*/{ s//\1/p; q; }
	    s/.*/./p; q'`
  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
    { case "$ac_dir" in
  [\\/]* | ?:[\\/]* ) ac_incr_dir=;;
  *)                      ac_incr_dir=.;;
esac
ac_dummy=""$ac_dir""
for ac_mkdir_dir in `IFS=/; set X $ac_dummy; shift; echo "$@"`; do
  ac_incr_dir=$ac_incr_dir/$ac_mkdir_dir
  test -d $ac_incr_dir || mkdir $ac_incr_dir
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 $ac_given_srcdir in
  .)  srcdir=.
      if test -z "$ac_dots"; then top_srcdir=.
      else top_srcdir=`echo $ac_dots | sed 's,/$,,'`; fi ;;
  [\\/]* | ?:[\\/]* )
      srcdir=$ac_given_srcdir$ac_dir_suffix;
      top_srcdir=$ac_given_srcdir ;;
  *) # Relative path.
    srcdir=$ac_dots$ac_given_srcdir$ac_dir_suffix
    top_srcdir=$ac_dots$ac_given_srcdir ;;
  esac

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

  if test x"$ac_file" != x-; then
    echo creating $ac_file
    rm -f "$ac_file"
  fi
  configure_input="Generated automatically from `echo $ac_file_in |
                                                 sed 's,.*/,,'` by configure."

  # Don't redirect the output to AC_FILE directly: use `mv' so that
  # updating is atomic, and doesn't need trapping.

  # 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
         test -f "$f" || { echo "configure: error: cannot find input file \\\`$f'" >&2; exit 1; }
         echo $f;;
      *) # Relative
         if test -f "$f"; then
           # Build tree
           echo $f
         elif test -f "$ac_given_srcdir/$f"; then
           # Source tree
           echo $ac_given_srcdir/$f
         else
           # /dev/null tree
           { echo "configure: error: cannot find input file \\\`$f'" >&2; exit 1; }
         fi;;
      esac
    done`
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@,$srcdir,;t t
s,@top_srcdir@,$top_srcdir,;t t
s,@INSTALL@,$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 creating $ac_file

  # 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
         test -f "$f" || { echo "configure: error: cannot find input file \\\`$f'" >&2; exit 1; }
         echo $f;;
      *) # Relative
         if test -f "$f"; then
           # Build tree
           echo $f
         elif test -f "$ac_given_srcdir/$f"; then
           # Source tree
           echo $ac_given_srcdir/$f
         else
           # /dev/null tree
           { echo "configure: error: cannot find input file \\\`$f'" >&2; exit 1; }
         fi;;
      esac
    done`
  # 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.
#
# `cleanup' is used to avoid that the second main sed command (meant for
# 0-ary CPP macros) applies to n-ary macro definitions.  So we use
# `t cleanup' to jump over the second main sed command when it succeeded.
# 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 cleanup
s,^[ 	]*#[ 	]*define[ 	][ 	]*\([^ 	][^ 	]*\)[ 	]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
: cleanup
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
  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 "$ac_file is unchanged"
    else
      ac_dir=`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/p; q; }
	    /^X\(\/\/\)^/.*/{ s//\1/p; q; }
	    /^X\(\/\/\)$/{ s//\1/p; q; }
	    /^X\(\/\).*/{ s//\1/p; q; }
	    s/.*/./p; q'`
      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
        { case "$ac_dir" in
  [\\/]* | ?:[\\/]* ) ac_incr_dir=;;
  *)                      ac_incr_dir=.;;
esac
ac_dummy=""$ac_dir""
for ac_mkdir_dir in `IFS=/; set X $ac_dummy; shift; echo "$@"`; do
  ac_incr_dir=$ac_incr_dir/$ac_mkdir_dir
  test -d $ac_incr_dir || mkdir $ac_incr_dir
done; }

      fi
      rm -f $ac_file
      mv $tmp/config.h $ac_file
    fi
  else
    cat $tmp/config.h
    rm -f $tmp/config.h
  fi
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 -z "$CONFIG_HEADERS" || echo timestamp >	   magick/stamp-h ;;
    default-2 )
test x"$AMDEP" != 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
EOF
chmod +x $CONFIG_STATUS
rm -fr confdefs* $ac_clean_files
trap 'exit 1' 1 2 15

test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1

#
# CONFIG_SUBDIRS section.
#
if test "$no_recursion" != yes; then

  # Remove --cache-file and --srcdir arguments so they do not pile up.
  ac_sub_configure_args=
  ac_prev=
  for ac_arg in $ac_configure_args; do
    if test -n "$ac_prev"; then
      ac_prev=
      continue
    fi
    case $ac_arg in
    -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=*)
      ;;
    --config-cache | -C)
      ;;
    -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
      ac_prev=srcdir ;;
    -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
      ;;
    *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
    esac
  done

  ac_given_INSTALL=$INSTALL

  for ac_subdir in : $subdirs; do test "x$ac_subdir" = x: && continue

    # Do not complain, so a configure script can configure whichever
    # parts of a large source tree are present.
    test -d $srcdir/$ac_subdir || continue

    echo configuring in $ac_subdir
    case $srcdir in
    .) ;;
    *) { case ./$ac_subdir in
  [\\/]* | ?:[\\/]* ) ac_incr_dir=;;
  *)                      ac_incr_dir=.;;
esac
ac_dummy="./$ac_subdir"
for ac_mkdir_dir in `IFS=/; set X $ac_dummy; shift; echo "$@"`; do
  ac_incr_dir=$ac_incr_dir/$ac_mkdir_dir
  test -d $ac_incr_dir || mkdir $ac_incr_dir
done; }

       if test -d ./$ac_subdir; then :;
       else
         { echo "configure: error: cannot create \`pwd\`/$ac_subdir" >&2; exit 1; }
       fi
       ;;
    esac

    ac_popdir=`pwd`
    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; then
      ac_sub_configure="$SHELL $ac_sub_srcdir/configure"
    elif test -f $ac_sub_srcdir/configure.in; then
      ac_sub_configure=$ac_configure
    else
      echo "configure: WARNING: no configuration information is in $ac_subdir" >&2
      ac_sub_configure=
    fi

    # The recursion is here.
    if test -n "$ac_sub_configure"; then
      # Make the cache file name correct relative to the subdirectory.
      case $cache_file in
      [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
      *) # Relative path.
        ac_sub_cache_file=$ac_dots$cache_file ;;
      esac
      case $ac_given_INSTALL in
        [\\/$]* | ?:[\\/]*) INSTALL=$ac_given_INSTALL ;;
        *) INSTALL=$ac_dots$ac_given_INSTALL ;;
      esac

      echo "running $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
      # The eval makes quoting arguments work.
      if eval $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
      then :
      else
        { echo "configure: error: $ac_sub_configure failed for $ac_subdir" >&2; exit 1; }
      fi
    fi

    cd $ac_popdir
  done
fi

echo ""

echo "ImageMagick is configured as follows. Please verify that this"
echo "configuration matches your expectations."
echo ""
echo "Host system type : $host"
echo ""
echo "Option            Configure option        Configured value"
echo "----------------------------------------------------------"
echo "Shared libraries  --enable-shared=$enable_shared		$libtool_build_shared_libs"
echo "Static libraries  --enable-static=$enable_static		$libtool_build_static_libs"
echo "GNU ld            --with-gnu-ld=$with_gnu_ld		$ac_cv_prog_gnu_ld"
echo "Ghostscript       None                          $have_gs"
echo "LZW support       --enable-lzw=$with_lzw		$with_lzw"
echo "16 bit pixels     --enable-16bit-pixel=$with_16_bit_pixel	$with_16_bit_pixel"
echo "SFIO              --enable-sfio=$with_sfio		$have_sfio"
echo "PERL              --with-perl=$with_perl		$have_perl"
echo "BZLIB             --with-bzlib=$with_bzlib		$with_bzlib"
echo "DPS               --with-dps=$with_dps		$have_dps"
echo "FlashPIX          --with-fpx=$with_fpx		$have_fpx"
echo "HDF               --with-hdf=$with_hdf		$have_hdf"
echo "JBIG              --with-jbig=$with_jbig		$have_jbig"
echo "JPEG              --with-jpeg=$with_jpeg		$have_jpeg"
echo "LCMS              --with-lcms=$with_lcms		$have_lcms"
echo "PNG               --with-png=$with_png		$have_png"
echo "TIFF              --with-tiff=$with_tiff		$have_tiff"
echo "TrueType (TTF)    --with-ttf=$with_ttf		$have_ttf"
echo "TTF Path          --with-ttf-fontpath=          \"$with_ttf_fontpath\""
echo "XML               --with-xml=$with_xml		$have_xml"
echo "ZLIB              --with-zlib=$with_zlib		$have_zlib"
echo "X11               --with-x=$with_x			$have_x"
echo ""
echo "X11 Configuration:"
if test "$have_x" != 'no'
then
  echo "  X_CFLAGS     = $X_CFLAGS"
  echo "  X_PRE_LIBS   = $X_PRE_LIBS"
  echo "  X_LIBS       = $X_LIBS"
  echo "  X_EXTRA_LIBS = $X_EXTRA_LIBS"
else
  echo ""
  echo "  Not using X11."
fi
echo ""
echo "Final Compilation Flags:"
echo "  CC       = $CC"
echo "  CFLAGS   = $CFLAGS"
echo "  CPPFLAGS = $CPPFLAGS"
echo "  CXXFLAGS = $CXXFLAGS"
echo "  LDFLAGS  = $LDFLAGS"
#echo "  LIBS     = $LIBS"
echo ""

