#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by Autoconf 2.14a.
#
# 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
subdirs=
MFLAGS= MAKEFLAGS=
SHELL=${CONFIG_SHELL-/bin/sh}
# Maximum number of lines to put in a shell here document.
: ${ac_max_here_lines=48}
# Sed expression to map a string onto a valid sh and CPP variable names.
ac_tr_sh='sed -e y%*+%pp%;s%[^a-zA-Z0-9_]%_%g'
ac_tr_cpp='sed -e 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"

# 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.
build=NONE
cache_file=/dev/null
exec_prefix=NONE
host=NONE
no_create=
nonopt=NONE
no_recursion=
prefix=NONE
program_prefix=NONE
program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
srcdir=
target=NONE
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=`echo "$ac_option" | sed -n 's/^[^=]*=//p'`

  # 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 ;;
  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
    build=$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 ;;

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

  -disable-* | --disable-*)
    ac_feature=`echo "$ac_option"|sed -e 's/-*disable-//'`
    # Reject names that are not valid shell variable names.
    if echo "$ac_feature" | grep '[^-a-zA-Z0-9_]' >/dev/null 2>&1; then
      { echo "configure: error: invalid feature: $ac_feature" >&2; exit 1; }
    fi
    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
    eval "enable_${ac_feature}=no" ;;

  -enable-* | --enable-*)
    ac_feature=`echo "$ac_option"|sed -e 's/-*enable-//' -e 's/=.*//'`
    # Reject names that are not valid shell variable names.
    if echo "$ac_feature" | grep '[^-a-zA-Z0-9_]' >/dev/null 2>&1; then
      { echo "configure: error: invalid feature: $ac_feature" >&2; exit 1; }
    fi
    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 ;;
  -host=* | --host=* | --hos=* | --ho=*)
    host=$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 ;;
  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
    target=$ac_optarg ;;

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

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

  -with-* | --with-*)
    ac_package=`echo "$ac_option"|sed -e 's/-*with-//' -e 's/=.*//'`
    # Reject names that are not valid shell variable names.
    if echo "$ac_package" | grep '[^-a-zA-Z0-9_]' >/dev/null 2>&1; then
      { echo "configure: error: invalid package: $ac_package" >&2; exit 1; }
    fi
    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=`echo "$ac_option"|sed -e 's/-*without-//'`
    # Reject names that are not valid shell variable names.
    if echo "$ac_package" | grep '[^-a-zA-Z0-9_]' >/dev/null 2>&1; then
      { echo "configure: error: invalid package: $ac_package" >&2; exit 1; }
    fi
    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=`echo "$ac_option" | sed -e 's/=.*//'`
    # Reject names that are not valid shell variable names.
    if echo "$ac_envvar" | grep '[^a-zA-Z0-9_]' >/dev/null 2>&1; then
      { echo "configure: error: invalid variable name: $ac_envvar" >&2; exit 1; }
    fi
    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
    eval "$ac_envvar='$ac_optarg'"
    export $ac_envvar ;;

  *)
    if echo "$ac_option" | grep '[^-a-zA-Z0-9.]' >/dev/null 2>&1; then
      echo "configure: warning: invalid host type: $ac_option" >&2
    fi
    if test "x$nonopt" != xNONE; then
      { echo "configure: error: can only configure for one host and one target at a time" >&2; exit 1; }
    fi
    nonopt=$ac_option
    ;;

  esac
done

if test -n "$ac_prev"; then
  { echo "configure: error: missing argument to --\`echo $ac_prev | sed 's/_/-/g'\`" >&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

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

#
# 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]... [HOST]

To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE.

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]
  -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

Host type:
  --host=HOST        configure for HOST [guessed]
  --build=BUILD      configure for building on BUILD [BUILD=HOST]
  --target=TARGET    configure for TARGET [TARGET=HOST]
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
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
  --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

Some influent environment variables:
  CFLAGS      Extra flags for the C compiler
EOF
fi

if test "$ac_init_help" = "recursive"; then
  # If there are subdirs, report their specific --help.
  ac_popdir=`pwd`
  for ac_subdir in : $subdirs; do test "x$ac_subdir" = x: && continue
    cd $ac_subdir
    # A "../" for each directory in /$ac_subdir.
    ac_dots=`echo $ac_subdir |
             sed -e '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
# NLS nuisances.
# Only set these to C if already set.  These must not be set unconditionally
# because not all systems understand e.g. LANG=C (notably SCO).
# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
# Non-C LC_CTYPE values break the ctype check.
if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi

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

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=
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_arg'" ;;
  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  esac
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.14a, 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

# 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
  test "x$cache_file" != "x/dev/null" && echo "loading cache $cache_file"
      test -f "$cache_file" && . $cache_file
else
  echo "creating cache $cache_file"
  >$cache_file
fi

ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
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'
cross_compiling=$ac_cv_prog_cc_cross

if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  # Stardent Vistra SVR4 grep lacks -e, says Kaveh R. Ghazi.
  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
    ECHO_N= ECHO_C='
' ECHO_T='	'
  else
    ECHO_N=-n ECHO_C= ECHO_T=
  fi
else
  ECHO_N= ECHO_C='\c' ECHO_T=
fi

# Set version
MAJOR_VERSION=5
MINOR_VERSION=2
MICRO_VERSION=2
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.

echo "configure:654: checking host system type" >&5
echo $ECHO_N "checking host system type... $ECHO_C" >&6
if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then

  # Make sure we can run config.sub.
  if $ac_config_sub sun4 >/dev/null 2>&1; then :; else
    { echo "configure: error: cannot run $ac_config_sub" >&2; exit 1; }
  fi

  ac_cv_host_alias=$host
  case "$ac_cv_host_alias" in
  NONE)
    case $nonopt in
    NONE)
      if ac_cv_host_alias=`$ac_config_guess`; then :
      else { echo "configure: error: cannot guess host type; you must specify one" >&2; exit 1; }
      fi ;;    *) ac_cv_host_alias=$nonopt ;;
    esac ;;
  esac

  ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || exit 1
  ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
  ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
  ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
else
  echo $ECHO_N "(cached) $ECHO_C" >&6
fi

echo "configure:678: result: $ac_cv_host" >&5
echo "$ECHO_T""$ac_cv_host" >&6

host=$ac_cv_host
host_alias=$ac_cv_host_alias
host_cpu=$ac_cv_host_cpu
host_vendor=$ac_cv_host_vendor
host_os=$ac_cv_host_os

echo "configure:685: checking target system type" >&5
echo $ECHO_N "checking target system type... $ECHO_C" >&6
if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then

  # Make sure we can run config.sub.
  if $ac_config_sub sun4 >/dev/null 2>&1; then :; else
    { echo "configure: error: cannot run $ac_config_sub" >&2; exit 1; }
  fi

  ac_cv_target_alias=$target
  case "$ac_cv_target_alias" in
  NONE)
    case $nonopt in
    NONE)
      ac_cv_target_alias=$host_alias ;;
    *) ac_cv_target_alias=$nonopt ;;
    esac ;;
  esac

  ac_cv_target=`$ac_config_sub $ac_cv_target_alias` || exit 1
  ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
  ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
  ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
else
  echo $ECHO_N "(cached) $ECHO_C" >&6
fi

echo "configure:708: result: $ac_cv_target" >&5
echo "$ECHO_T""$ac_cv_target" >&6

target=$ac_cv_target
target_alias=$ac_cv_target_alias
target_cpu=$ac_cv_target_cpu
target_vendor=$ac_cv_target_vendor
target_os=$ac_cv_target_os

echo "configure:715: checking build system type" >&5
echo $ECHO_N "checking build system type... $ECHO_C" >&6
if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then

  # Make sure we can run config.sub.
  if $ac_config_sub sun4 >/dev/null 2>&1; then :; else
    { echo "configure: error: cannot run $ac_config_sub" >&2; exit 1; }
  fi

  ac_cv_build_alias=$build
  case "$ac_cv_build_alias" in
  NONE)
    case $nonopt in
    NONE)
      ac_cv_build_alias=$host_alias ;;
    *) ac_cv_build_alias=$nonopt ;;
    esac ;;
  esac

  ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || exit 1
  ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
  ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
  ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
else
  echo $ECHO_N "(cached) $ECHO_C" >&6
fi

echo "configure:738: result: $ac_cv_build" >&5
echo "$ECHO_T""$ac_cv_build" >&6

build=$ac_cv_build
build_alias=$ac_cv_build_alias
build_cpu=$ac_cv_build_cpu
build_vendor=$ac_cv_build_vendor
build_os=$ac_cv_build_os

# Do some error checking and defaulting for the host and target type.
# The inputs are:
#    configure --host=HOST --target=TARGET --build=BUILD NONOPT
#
# The rules are:
# 1. You are not allowed to specify --host, --target, and nonopt at the
#    same time.
# 2. Host defaults to nonopt.
# 3. If nonopt is not specified, then host defaults to the current host,
#    as determined by config.guess.
# 4. Target and build default to nonopt.
# 5. If nonopt is not specified, then target and build default to host.

# The aliases save the names the user supplied, while $host etc.
# will get canonicalized.
case $host---$target---$nonopt in
NONE---*---* | *---NONE---* | *---*---NONE) ;;
*) { echo "configure: error: can only configure for one host and one target at a time" >&2; exit 1; } ;;
esac

test "$host_alias" != "$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:768: 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:803: result: yes" >&5
echo "$ECHO_T""yes" >&6

# Generate configure header.

# 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
# 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:817: 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
    /|./|.//|/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:863: 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 "$program_transform_name" = "" && program_transform_name="s,x,x,"

test x"${MISSING+set}" = xset || \
  MISSING="\${SHELL} `CDPATH=: && cd $ac_aux_dir && pwd`/missing"
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:900: 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
  for ac_path in `ac_save_ifs=$IFS; IFS=':'
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  test -z "$ac_dir" && ac_dir=.
  if test -f $ac_dir/$ac_word; then
    echo "$ac_dir/$ac_word"
  fi
done
IFS=$ac_save_ifs
`; do
    ac_cv_prog_AWK="$ac_prog"
    break
  done
fi
fi
AWK=$ac_cv_prog_AWK
if test -n "$AWK"; then
  echo "configure:925: result: $AWK" >&5
echo "$ECHO_T""$AWK" >&6
else
  echo "configure:928: result: no" >&5
echo "$ECHO_T""no" >&6
fi

test -n "$AWK" && break
done

echo "configure:933: 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:953: result: yes" >&5
echo "$ECHO_T""yes" >&6
  SET_MAKE=
else
  echo "configure:957: 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

PACKAGE=ImageMagick

VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION

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

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

#
# 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
case "${CFLAGS+set} $ac_configure_args" in
 *" CFLAGS="* );;
 "set "*) ac_configure_args="CFLAGS='$CFLAGS' $ac_configure_args";;
esac

  # Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo "configure:1019: 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
  for ac_path in `ac_save_ifs=$IFS; IFS=':'
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  test -z "$ac_dir" && ac_dir=.
  if test -f $ac_dir/$ac_word; then
    echo "$ac_dir/$ac_word"
  fi
done
IFS=$ac_save_ifs
`; do
    ac_cv_prog_CC="gcc"
    break
  done
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
  echo "configure:1044: result: $CC" >&5
echo "$ECHO_T""$CC" >&6
else
  echo "configure:1047: result: no" >&5
echo "$ECHO_T""no" >&6
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:1053: 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
  for ac_path in `ac_save_ifs=$IFS; IFS=':'
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  test -z "$ac_dir" && ac_dir=.
  if test -f $ac_dir/$ac_word; then
    echo "$ac_dir/$ac_word"
  fi
done
IFS=$ac_save_ifs
`; do
    if test "$ac_path" = "/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 $# -gt 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_path" "$@"
    shift
    ac_cv_prog_CC="$@"
  fi
fi
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
  echo "configure:1097: result: $CC" >&5
echo "$ECHO_T""$CC" >&6
else
  echo "configure:1100: result: no" >&5
echo "$ECHO_T""no" >&6
fi

    if test -z "$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:1108: 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
  for ac_path in `ac_save_ifs=$IFS; IFS=':'
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  test -z "$ac_dir" && ac_dir=.
  if test -f $ac_dir/$ac_word; then
    echo "$ac_dir/$ac_word"
  fi
done
IFS=$ac_save_ifs
`; do
    ac_cv_prog_CC="$ac_prog"
    break
  done
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
  echo "configure:1133: result: $CC" >&5
echo "$ECHO_T""$CC" >&6
else
  echo "configure:1136: 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:1144: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
echo $ECHO_N "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works... $ECHO_C" >&6
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
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'
cross_compiling=$ac_cv_prog_cc_cross

cat >conftest.$ac_ext <<EOF
#line 1153 "configure"
#include "confdefs.h"
int main(){return(0);}
EOF
if { (eval echo configure:1157: \"$ac_link\") >&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  ac_cv_prog_cc_works=yes
  # If we can't run a trivial program, we are probably using a cross compiler.
  if (./conftest; exit) 2>/dev/null; then
    ac_cv_prog_cc_cross=no
  else
    ac_cv_prog_cc_cross=yes
  fi
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_prog_cc_works=no
fi
rm -f conftest*
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
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'
cross_compiling=$ac_cv_prog_cc_cross
echo "configure:1177: result: $ac_cv_prog_cc_works" >&5
echo "$ECHO_T""$ac_cv_prog_cc_works" >&6
if test $ac_cv_prog_cc_works = no; then
  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." >&2; exit 77; }
fi
echo "configure:1182: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
echo $ECHO_N "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler... $ECHO_C" >&6
echo "configure:1184: result: $ac_cv_prog_cc_cross" >&5
echo "$ECHO_T""$ac_cv_prog_cc_cross" >&6
cross_compiling=$ac_cv_prog_cc_cross

echo "configure:1187: 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
  cat >conftest.c <<EOF
#ifdef __GNUC__
  yes;
#endif
EOF
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1197: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  ac_cv_prog_gcc=yes
else
  ac_cv_prog_gcc=no
fi
fi
echo "configure:1203: result: $ac_cv_prog_gcc" >&5
echo "$ECHO_T""$ac_cv_prog_gcc" >&6

if test $ac_cv_prog_gcc = yes; then
  GCC=yes
else
  GCC=
fi

ac_test_CFLAGS=${CFLAGS+set}
ac_save_CFLAGS=$CFLAGS
CFLAGS=
echo "configure:1213: 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
  echo 'void f(){}' >conftest.c
if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  ac_cv_prog_cc_g=yes
else
  ac_cv_prog_cc_g=no
fi
rm -f conftest*

fi
echo "configure:1226: 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:1243: checking how to run the C preprocessor" >&5
echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
  CPP=
fi
if test -z "$CPP"; then
if test "${ac_cv_prog_CPP+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
    # This must be in double quotes, not single quotes, because CPP may get
  # substituted into the Makefile and "${CC-cc}" will confuse make.
  CPP="${CC-cc} -E"
  # On the NeXT, cc -E runs the code through the compiler's parser,
  # not just through cpp.

cat >conftest.$ac_ext <<EOF
#line 1259 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1265: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  :
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  CPP="${CC-cc} -E -traditional-cpp"

cat >conftest.$ac_ext <<EOF
#line 1275 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1281: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  :
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  CPP="${CC-cc} -nologo -E"

cat >conftest.$ac_ext <<EOF
#line 1291 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1297: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  :
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  CPP=/lib/cpp
fi
rm -f conftest*
fi
rm -f conftest*
fi
rm -f conftest*
  ac_cv_prog_CPP=$CPP
fi
  CPP=$ac_cv_prog_CPP
else
  ac_cv_prog_CPP=$CPP
fi
echo "configure:1318: result: $CPP" >&5
echo "$ECHO_T""$CPP" >&6

depcc="$CC"
depcpp="$CPP"
echo "configure:1322: 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
    if depmode="$depmode" \
       source=conftest.c object=conftest.o \
       depfile=conftest.Po tmpdepfile=conftest.TPo \
       $SHELL $am_depcomp $depcc -c conftest.c 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:1358: 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"

# 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:1371: 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:1401: checking for GNU ld" >&5
echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
else
  echo "configure:1404: 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:1433: result: $LD" >&5
echo "$ECHO_T""$LD" >&6
else
  echo "configure:1436: 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:1440: 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:1452: result: $ac_cv_prog_gnu_ld" >&5
echo "$ECHO_T""$ac_cv_prog_gnu_ld" >&6
with_gnu_ld=$ac_cv_prog_gnu_ld

echo "configure:1455: checking how to run the C preprocessor" >&5
echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
  CPP=
fi
if test -z "$CPP"; then
if test "${ac_cv_prog_CPP+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
    # This must be in double quotes, not single quotes, because CPP may get
  # substituted into the Makefile and "${CC-cc}" will confuse make.
  CPP="${CC-cc} -E"
  # On the NeXT, cc -E runs the code through the compiler's parser,
  # not just through cpp.

cat >conftest.$ac_ext <<EOF
#line 1471 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1477: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  :
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  CPP="${CC-cc} -E -traditional-cpp"

cat >conftest.$ac_ext <<EOF
#line 1487 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1493: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  :
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  CPP="${CC-cc} -nologo -E"

cat >conftest.$ac_ext <<EOF
#line 1503 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1509: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  :
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  CPP=/lib/cpp
fi
rm -f conftest*
fi
rm -f conftest*
fi
rm -f conftest*
  ac_cv_prog_CPP=$CPP
fi
  CPP=$ac_cv_prog_CPP
else
  ac_cv_prog_CPP=$CPP
fi
echo "configure:1530: result: $CPP" >&5
echo "$ECHO_T""$CPP" >&6

# 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
# 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:1543: 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
    /|./|.//|/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:1589: 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:1596: 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:1616: result: yes" >&5
echo "$ECHO_T""yes" >&6
  SET_MAKE=
else
  echo "configure:1620: result: no" >&5
echo "$ECHO_T""no" >&6
  SET_MAKE="MAKE=${MAKE-make}"
fi

echo "configure:1624: 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 conftestdata
if ln -s X conftestdata 2>/dev/null
then
  rm -f conftestdata
  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:1640: result: yes" >&5
echo "$ECHO_T""yes" >&6
else
  echo "configure:1643: result: no" >&5
echo "$ECHO_T""no" >&6
fi

#
# Tests for Windows
#
echo "configure:1649: 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 <<EOF
#line 1655 "configure"
#include "confdefs.h"

int
main ()
{
#ifndef __CYGWIN__
# define __CYGWIN__ __CYGWIN32__
#endif
return __CYGWIN__;
  ;
  return 0;
}
EOF
if { (eval echo configure:1668: \"$ac_compile\") >&5; (eval $ac_compile) 2>&5; }; 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*
fi
echo "configure:1677: result: $ac_cv_cygwin" >&5
echo "$ECHO_T""$ac_cv_cygwin" >&6
CYGWIN=
test "$ac_cv_cygwin" = yes && CYGWIN=yes
echo "configure:1681: 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 <<EOF
#line 1687 "configure"
#include "confdefs.h"

int
main ()
{
return __MINGW32__;
  ;
  return 0;
}
EOF
if { (eval echo configure:1697: \"$ac_compile\") >&5; (eval $ac_compile) 2>&5; }; 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*
fi
echo "configure:1706: result: $ac_cv_mingw32" >&5
echo "$ECHO_T""$ac_cv_mingw32" >&6
MINGW32=
test "$ac_cv_mingw32" = yes && MINGW32=yes
echo "configure:1710: 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 <<EOF
#line 1716 "configure"
#include "confdefs.h"

int
main ()
{
return __EMX__;
  ;
  return 0;
}
EOF
if { (eval echo configure:1726: \"$ac_compile\") >&5; (eval $ac_compile) 2>&5; }; 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*
fi
echo "configure:1735: result: $ac_cv_emxos2" >&5
echo "$ECHO_T""$ac_cv_emxos2" >&6
EMXOS2=
test "$ac_cv_emxos2" = yes && EMXOS2=yes

echo "configure:1739: 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
  if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
  ac_cv_exeext=.exe
else
  rm -f conftest*
  echo 'int main () { return 0; }' >conftest.$ac_ext
  ac_cv_exeext=
  if { (eval echo configure:1750: \"$ac_link\") >&5; (eval $ac_link) 2>&5; }; then
    for ac_file in conftest.*; do
      case $ac_file in
      *.c | *.C | *.o | *.obj | *.xcoff) ;;
      *) ac_cv_exeext=`echo $ac_file | sed -e s/conftest//` ;;
      esac
    done
  else
    { echo "configure: error: installation or configuration problem: compiler cannot create executables." >&2; exit 1; }
  fi
  rm -f conftest*
  test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
fi
fi

EXEEXT=""
test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
echo "configure:1766: result: ${ac_cv_exeext}" >&5
echo "$ECHO_T""${ac_cv_exeext}" >&6
ac_exeext=$EXEEXT

echo "configure:1769: 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
  rm -f conftest*
echo 'int i = 1;' >conftest.$ac_ext
if { (eval echo configure:1776: \"$ac_compile\") >&5; (eval $ac_compile) 2>&5; }; then
  for ac_file in conftest.*; do
    case $ac_file in
    *.c) ;;
    *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
    esac
  done
else
  { echo "configure: error: installation or configuration problem; compiler does not work" >&2; exit 1; }
fi
rm -f conftest*
fi

echo "configure:1788: result: $ac_cv_objext" >&5
echo "$ECHO_T""$ac_cv_objext" >&6
OBJEXT=$ac_cv_objext
ac_objext=$ac_cv_objext

#
# 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:1870: 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:1877: 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:1881: 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
      if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/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:1915: result: $NM" >&5
echo "$ECHO_T""$NM" >&6

echo "configure:1917: 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*)
  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 )
            lt_cv_deplibs_check_method=='file_magic OpenBSD/i[3-9]86 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:2038: 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

if test $host != $build; then
  ac_tool_prefix=${host_alias}-
else
  ac_tool_prefix=
fi

# 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:2051: 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:2103: result: $MAGIC" >&5
echo "$ECHO_T""$MAGIC" >&6
else
  echo "configure:2106: 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:2111: 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:2163: result: $MAGIC" >&5
echo "$ECHO_T""$MAGIC" >&6
else
  echo "configure:2166: 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:2178: 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
  for ac_path in `ac_save_ifs=$IFS; IFS=':'
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  test -z "$ac_dir" && ac_dir=.
  if test -f $ac_dir/$ac_word; then
    echo "$ac_dir/$ac_word"
  fi
done
IFS=$ac_save_ifs
`; do
    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
    break
  done
fi
fi
RANLIB=$ac_cv_prog_RANLIB
if test -n "$RANLIB"; then
  echo "configure:2203: result: $RANLIB" >&5
echo "$ECHO_T""$RANLIB" >&6
else
  echo "configure:2206: 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:2213: 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
  for ac_path in `ac_save_ifs=$IFS; IFS=':'
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  test -z "$ac_dir" && ac_dir=.
  if test -f $ac_dir/$ac_word; then
    echo "$ac_dir/$ac_word"
  fi
done
IFS=$ac_save_ifs
`; do
    ac_cv_prog_RANLIB="ranlib"
    break
  done
  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
fi
fi
RANLIB=$ac_cv_prog_RANLIB
if test -n "$RANLIB"; then
  echo "configure:2239: result: $RANLIB" >&5
echo "$ECHO_T""$RANLIB" >&6
else
  echo "configure:2242: result: no" >&5
echo "$ECHO_T""no" >&6
fi

  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:2251: 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
  for ac_path in `ac_save_ifs=$IFS; IFS=':'
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  test -z "$ac_dir" && ac_dir=.
  if test -f $ac_dir/$ac_word; then
    echo "$ac_dir/$ac_word"
  fi
done
IFS=$ac_save_ifs
`; do
    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
    break
  done
fi
fi
STRIP=$ac_cv_prog_STRIP
if test -n "$STRIP"; then
  echo "configure:2276: result: $STRIP" >&5
echo "$ECHO_T""$STRIP" >&6
else
  echo "configure:2279: 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:2286: 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
  for ac_path in `ac_save_ifs=$IFS; IFS=':'
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
  test -z "$ac_dir" && ac_dir=.
  if test -f $ac_dir/$ac_word; then
    echo "$ac_dir/$ac_word"
  fi
done
IFS=$ac_save_ifs
`; do
    ac_cv_prog_STRIP="strip"
    break
  done
  test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
fi
fi
STRIP=$ac_cv_prog_STRIP
if test -n "$STRIP"; then
  echo "configure:2312: result: $STRIP" >&5
echo "$ECHO_T""$STRIP" >&6
else
  echo "configure:2315: result: no" >&5
echo "$ECHO_T""no" >&6
fi

  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 2350 "configure"' > conftest.$ac_ext
  if { (eval echo configure:2351: \"$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:2370: 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
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
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'
cross_compiling=$ac_cv_prog_cc_cross

     cat >conftest.$ac_ext <<EOF
#line 2382 "configure"
#include "confdefs.h"

int
main ()
{

  ;
  return 0;
}
EOF
if { (eval echo configure:2391: \"$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_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
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'
cross_compiling=$ac_cv_prog_cc_cross

fi
echo "configure:2406: 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.  It is not useful on other systems.
# If it contains results you don't want to keep, you may remove or edit it.
#
# By default, configure uses ./config.cache as the cache file,
# creating it if it does not exist already.  You can give configure
# the --cache-file=FILE option to use a different cache file; that is
# what configure does when it calls configure scripts in
# subdirectories, so they share the cache.
# Giving --cache-file=/dev/null disables caching, for debugging configure.
# config.status only pays attention to the cache file if you give it the
# --recheck option to rerun configure.
#
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 -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\2/p'
      ;;
    esac;
} |
  sed -e '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" 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
  test "x$cache_file" != "x/dev/null" && echo "loading cache $cache_file"
      test -f "$cache_file" && . $cache_file
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"

# 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

# 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
if test "$with_modules" != 'no'
then
  #

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

  # Configure libltdl

subdirs=" ltdl"

  # 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 CoderModuleDirectory "$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:2542: 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:2551: 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

echo "configure:2561: checking host system type" >&5
echo $ECHO_N "checking host system type... $ECHO_C" >&6
if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then

  # Make sure we can run config.sub.
  if $ac_config_sub sun4 >/dev/null 2>&1; then :; else
    { echo "configure: error: cannot run $ac_config_sub" >&2; exit 1; }
  fi

  ac_cv_host_alias=$host
  case "$ac_cv_host_alias" in
  NONE)
    case $nonopt in
    NONE)
      if ac_cv_host_alias=`$ac_config_guess`; then :
      else { echo "configure: error: cannot guess host type; you must specify one" >&2; exit 1; }
      fi ;;    *) ac_cv_host_alias=$nonopt ;;
    esac ;;
  esac

  ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || exit 1
  ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
  ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
  ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
else
  echo $ECHO_N "(cached) $ECHO_C" >&6
fi

echo "configure:2585: result: $ac_cv_host" >&5
echo "$ECHO_T""$ac_cv_host" >&6

host=$ac_cv_host
host_alias=$ac_cv_host_alias
host_cpu=$ac_cv_host_cpu
host_vendor=$ac_cv_host_vendor
host_os=$ac_cv_host_os

# Add configure option --with-dmalloc to enable malloc debugging.
# dmalloc is available at ftp://ftp.letters.com/src/dmalloc/dmalloc.tar.gz
echo "configure:2594: 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:2600: 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:2609: result: no" >&5
echo "$ECHO_T""no" >&6
fi
else
  echo "configure:2613: 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-with_threads or --without-with_threads was given.
if test "${with_with_threads+set}" = set; then
  withval="$with_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

# 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:2883: 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 <<EOF
#line 2890 "configure"
#include "confdefs.h"
#include <sgtty.h>
Autoconf TIOCGETP
EOF
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 <<EOF
#line 2904 "configure"
#include "confdefs.h"
#include <termio.h>
Autoconf TCGETA
EOF
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:2916: 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
  echo "configure:2928: 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:2950: 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:3014: checking for X11 RGB database" >&5
echo $ECHO_N "checking for X11 RGB database... $ECHO_C" >&6
if test "${im_cv_x_rgbdb+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_rgbdb="$ac_dir/X11/rgb.txt"
	break
    elif test -f "$ac_dir/rgb.txt"
    then
        im_cv_x_rgbdb="$ac_dir/rgb.txt"
        break
    fi

  done
fi
echo "configure:3063: result: $im_cv_x_rgbdb" >&5
echo "$ECHO_T""$im_cv_x_rgbdb" >&6
#

cat >>confdefs.h <<EOF
#define RGBColorDatabase "$im_cv_x_rgbdb"
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:3082: 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_save_LIBS=$LIBS
LIBS="-lm  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 3090 "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;
}
EOF
if { (eval echo configure:3107: \"$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*
LIBS=$ac_save_LIBS
fi
echo "configure:3117: 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:3130: 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_save_LIBS=$LIBS
LIBS="-lpthread  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 3138 "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;
}
EOF
if { (eval echo configure:3155: \"$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*
LIBS=$ac_save_LIBS
fi
echo "configure:3165: 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
    echo "configure:3185: checking for SFIO support ..." >&5
echo $ECHO_N "checking for SFIO support ...... $ECHO_C" >&6
    failed=0;
    passed=0;
    echo "configure:3189: 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 <<EOF
#line 3195 "configure"
#include "confdefs.h"
#include <stdio.h>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3200: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  ac_cv_header_stdio_h=yes
else
  echo "$ac_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:3212: 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:3220: 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_save_LIBS=$LIBS
LIBS="-lsfio  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 3228 "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;
}
EOF
if { (eval echo configure:3245: \"$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*
LIBS=$ac_save_LIBS
fi
echo "configure:3255: 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:3263: 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_save_LIBS=$LIBS
LIBS="-lstdio -lsfio $LIBS"
cat >conftest.$ac_ext <<EOF
#line 3271 "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;
}
EOF
if { (eval echo configure:3288: \"$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*
LIBS=$ac_save_LIBS
fi
echo "configure:3298: 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:3305: 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:3311: 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:3321: result: yes" >&5
echo "$ECHO_T""yes" >&6
	    have_sfio='yes'
	fi
    else
	echo "configure:3326: 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=''
  echo "configure:3344: checking for ZLIB support ..." >&5
echo $ECHO_N "checking for ZLIB support ...... $ECHO_C" >&6
  failed=0;
  passed=0;
  echo "configure:3348: 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 <<EOF
#line 3354 "configure"
#include "confdefs.h"
#include <zconf.h>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3359: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  ac_cv_header_zconf_h=yes
else
  echo "$ac_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:3371: 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:3378: 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 <<EOF
#line 3384 "configure"
#include "confdefs.h"
#include <zlib.h>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3389: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  ac_cv_header_zlib_h=yes
else
  echo "$ac_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:3401: 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:3409: 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_save_LIBS=$LIBS
LIBS="-lz  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 3417 "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;
}
EOF
if { (eval echo configure:3434: \"$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*
LIBS=$ac_save_LIBS
fi
echo "configure:3444: 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:3452: 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_save_LIBS=$LIBS
LIBS="-lz  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 3460 "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;
}
EOF
if { (eval echo configure:3477: \"$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*
LIBS=$ac_save_LIBS
fi
echo "configure:3487: 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:3495: 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_save_LIBS=$LIBS
LIBS="-lz  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 3503 "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;
}
EOF
if { (eval echo configure:3520: \"$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*
LIBS=$ac_save_LIBS
fi
echo "configure:3530: 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:3538: 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_save_LIBS=$LIBS
LIBS="-lz  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 3546 "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;
}
EOF
if { (eval echo configure:3563: \"$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*
LIBS=$ac_save_LIBS
fi
echo "configure:3573: 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:3580: 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:3586: 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:3596: result: yes" >&5
echo "$ECHO_T""yes" >&6
      have_zlib='yes'
    fi
  else
    echo "configure:3601: 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=''
  echo "configure:3619: checking for BZLIB support ..." >&5
echo $ECHO_N "checking for BZLIB support ...... $ECHO_C" >&6
  failed=0;
  passed=0;
  echo "configure:3623: 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 <<EOF
#line 3629 "configure"
#include "confdefs.h"
#include <bzlib.h>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3634: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  ac_cv_header_bzlib_h=yes
else
  echo "$ac_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:3646: 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:3654: 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_save_LIBS=$LIBS
LIBS="-lbz2  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 3662 "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;
}
EOF
if { (eval echo configure:3679: \"$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*
LIBS=$ac_save_LIBS
fi
echo "configure:3689: 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:3697: 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_save_LIBS=$LIBS
LIBS="-lbz2  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 3705 "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;
}
EOF
if { (eval echo configure:3722: \"$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*
LIBS=$ac_save_LIBS
fi
echo "configure:3732: 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:3739: 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:3745: 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:3755: result: yes" >&5
echo "$ECHO_T""yes" >&6
      have_bzlib='yes'
    fi
  else
    echo "configure:3760: 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:3777: 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

if test "$ac_x_includes" = NO; then
  # Guess where to find include files, by looking for this one X11 .h file.
  test -z "$ac_x_direct_test_include" &&
    ac_x_direct_test_include=X11/Intrinsic.h

  # First, try using that file with no special directory specified.

cat >conftest.$ac_ext <<EOF
#line 3836 "configure"
#include "confdefs.h"
#include <$ac_x_direct_test_include>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3841: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  # We can compile using X headers with no special include directory.
ac_x_includes=
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  # 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               \
    /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 \
    ; \
  do
    if test -r "$ac_dir/$ac_x_direct_test_include"; 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.

  test -z "$ac_x_direct_test_library" && ac_x_direct_test_library=Xt
  test -z "$ac_x_direct_test_function" && ac_x_direct_test_function=XtMalloc

  # See if we find them without any special options.
  # Don't add to $LIBS permanently.
  ac_save_LIBS=$LIBS
  LIBS="-l$ac_x_direct_test_library $LIBS"
cat >conftest.$ac_ext <<EOF
#line 3905 "configure"
#include "confdefs.h"

int
main ()
{
${ac_x_direct_test_function}()
  ;
  return 0;
}
EOF
if { (eval echo configure:3915: \"$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
# First see if replacing the include by lib works.
# Check X11 before X11Rn because it is often a symlink to the current release.
for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
    /usr/X11/lib          \
    /usr/X11R6/lib        \
    /usr/X11R5/lib        \
    /usr/X11R4/lib        \
                          \
    /usr/lib/X11          \
    /usr/lib/X11R6        \
    /usr/lib/X11R5        \
    /usr/lib/X11R4        \
                          \
    /usr/local/X11/lib    \
    /usr/local/X11R6/lib  \
    /usr/local/X11R5/lib  \
    /usr/local/X11R4/lib  \
                          \
    /usr/local/lib/X11    \
    /usr/local/lib/X11R6  \
    /usr/local/lib/X11R5  \
    /usr/local/lib/X11R4  \
                          \
    /usr/X386/lib         \
    /usr/x386/lib         \
    /usr/XFree86/lib/X11  \
                          \
    /usr/lib              \
    /usr/local/lib        \
    /usr/unsupported/lib  \
    /usr/athena/lib       \
    /usr/local/x11r5/lib  \
    /usr/lpp/Xamples/lib  \
    /lib/usr/lib/X11	  \
                          \
    /usr/openwin/lib      \
    /usr/openwin/share/lib \
    ; \
do
  for ac_extension in a so sl; do
    if test -r $ac_dir/lib${ac_x_direct_test_library}.$ac_extension; then
      ac_x_libraries=$ac_dir
      break 2
    fi
  done
done
fi
rm -f conftest*
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:3985: 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:3995: 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:4016: 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 <<EOF

EOF
if { (eval echo configure:4021: \"$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*
      if test $ac_R_nospace = yes; then
	echo "configure:4030: result: no" >&5
echo "$ECHO_T""no" >&6
	X_LIBS="$X_LIBS -R$x_libraries"
      else
	X_LIBS="$X_LIBS -R$x_libraries"
#	LIBS="$ac_xsave_LIBS -R $x_libraries"
	cat >conftest.$ac_ext <<EOF

EOF
if { (eval echo configure:4037: \"$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*
	if test $ac_R_space = yes; then
	  echo "configure:4046: result: yes" >&5
echo "$ECHO_T""yes" >&6
	  X_LIBS="$X_LIBS -R $x_libraries"
	else
	  echo "configure:4050: 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:4067: 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_save_LIBS=$LIBS
LIBS="-ldnet  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 4075 "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;
}
EOF
if { (eval echo configure:4092: \"$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*
LIBS=$ac_save_LIBS
fi
echo "configure:4102: 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:4109: 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_save_LIBS=$LIBS
LIBS="-ldnet_stub  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 4117 "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;
}
EOF
if { (eval echo configure:4134: \"$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*
LIBS=$ac_save_LIBS
fi
echo "configure:4144: 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:4158: 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 <<EOF
#line 4164 "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;
}
EOF
if { (eval echo configure:4192: \"$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*
fi
echo "configure:4201: result: $ac_cv_func_gethostbyname" >&5
echo "$ECHO_T""$ac_cv_func_gethostbyname" >&6

    if test $ac_cv_func_gethostbyname = no; then
      #

echo "configure:4205: 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_save_LIBS=$LIBS
LIBS="-lnsl  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 4213 "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;
}
EOF
if { (eval echo configure:4230: \"$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*
LIBS=$ac_save_LIBS
fi
echo "configure:4240: 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:4247: 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_save_LIBS=$LIBS
LIBS="-lbsd  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 4255 "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;
}
EOF
if { (eval echo configure:4272: \"$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*
LIBS=$ac_save_LIBS
fi
echo "configure:4282: 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:4296: 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 <<EOF
#line 4302 "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;
}
EOF
if { (eval echo configure:4330: \"$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*
fi
echo "configure:4339: result: $ac_cv_func_connect" >&5
echo "$ECHO_T""$ac_cv_func_connect" >&6

    if test $ac_cv_func_connect = no; then
      #

echo "configure:4343: 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_save_LIBS=$LIBS
LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
cat >conftest.$ac_ext <<EOF
#line 4351 "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;
}
EOF
if { (eval echo configure:4368: \"$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*
LIBS=$ac_save_LIBS
fi
echo "configure:4378: 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:4385: 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 <<EOF
#line 4391 "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;
}
EOF
if { (eval echo configure:4419: \"$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*
fi
echo "configure:4428: result: $ac_cv_func_remove" >&5
echo "$ECHO_T""$ac_cv_func_remove" >&6

    if test $ac_cv_func_remove = no; then
      #

echo "configure:4432: 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_save_LIBS=$LIBS
LIBS="-lposix  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 4440 "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;
}
EOF
if { (eval echo configure:4457: \"$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*
LIBS=$ac_save_LIBS
fi
echo "configure:4467: 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:4474: 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 <<EOF
#line 4480 "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;
}
EOF
if { (eval echo configure:4508: \"$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*
fi
echo "configure:4517: result: $ac_cv_func_shmat" >&5
echo "$ECHO_T""$ac_cv_func_shmat" >&6

    if test $ac_cv_func_shmat = no; then
      #

echo "configure:4521: 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_save_LIBS=$LIBS
LIBS="-lipc  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 4529 "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;
}
EOF
if { (eval echo configure:4546: \"$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*
LIBS=$ac_save_LIBS
fi
echo "configure:4556: 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:4573: 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_save_LIBS=$LIBS
LIBS="-lICE $X_EXTRA_LIBS $LIBS"
cat >conftest.$ac_ext <<EOF
#line 4581 "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;
}
EOF
if { (eval echo configure:4598: \"$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*
LIBS=$ac_save_LIBS
fi
echo "configure:4608: 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:4626: 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_save_LIBS=$LIBS
LIBS="-lXext  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 4634 "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;
}
EOF
if { (eval echo configure:4651: \"$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*
LIBS=$ac_save_LIBS
fi
echo "configure:4661: 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:4667: 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_save_LIBS=$LIBS
LIBS="-lXext  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 4675 "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;
}
EOF
if { (eval echo configure:4692: \"$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*
LIBS=$ac_save_LIBS
fi
echo "configure:4702: 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:4711: 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_save_LIBS=$LIBS
LIBS="-lXext  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 4719 "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;
}
EOF
if { (eval echo configure:4736: \"$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*
LIBS=$ac_save_LIBS
fi
echo "configure:4746: 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:4752: 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_save_LIBS=$LIBS
LIBS="-lXext  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 4760 "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;
}
EOF
if { (eval echo configure:4777: \"$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*
LIBS=$ac_save_LIBS
fi
echo "configure:4787: 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:4796: 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_save_LIBS=$LIBS
LIBS="-lXt  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 4804 "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;
}
EOF
if { (eval echo configure:4821: \"$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*
LIBS=$ac_save_LIBS
fi
echo "configure:4831: 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:4858: 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_save_LIBS=$LIBS
LIBS="-ldl  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 4866 "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;
}
EOF
if { (eval echo configure:4883: \"$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*
LIBS=$ac_save_LIBS
fi
echo "configure:4893: 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
    echo "configure:4907: checking for Display Postscript support ..." >&5
echo $ECHO_N "checking for Display Postscript support ...... $ECHO_C" >&6
    failed=0;
    passed=0;
    O_CPPFLAGS="$CPPFLAGS"
    CPPFLAGS="$CPPFLAGS -I${ac_x_includes}/X11"
    echo "configure:4913: 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 <<EOF
#line 4919 "configure"
#include "confdefs.h"
#include <DPS/dpsXclient.h>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4924: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  ac_cv_header_DPS_dpsXclient_h=yes
else
  echo "$ac_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:4936: 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:4943: 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 <<EOF
#line 4949 "configure"
#include "confdefs.h"
#include <DPS/dpsXpreview.h>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4954: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  ac_cv_header_DPS_dpsXpreview_h=yes
else
  echo "$ac_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:4966: 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:4974: 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_save_LIBS=$LIBS
LIBS="-ldps  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 4982 "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;
}
EOF
if { (eval echo configure:4999: \"$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*
LIBS=$ac_save_LIBS
fi
echo "configure:5009: 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:5017: 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_save_LIBS=$LIBS
LIBS="-ldpstk -ldps $LIBS"
cat >conftest.$ac_ext <<EOF
#line 5025 "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;
}
EOF
if { (eval echo configure:5042: \"$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*
LIBS=$ac_save_LIBS
fi
echo "configure:5052: 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:5059: 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:5065: 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:5076: result: yes" >&5
echo "$ECHO_T""yes" >&6
	have_dps='yes'
    fi
    else
    echo "configure:5081: 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
    echo "configure:5100: checking for FlashPIX components ..." >&5
echo $ECHO_N "checking for FlashPIX components ...... $ECHO_C" >&6
    failed=0;
    passed=0;
    echo "configure:5104: 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 <<EOF
#line 5110 "configure"
#include "confdefs.h"
#include <fpx.h>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:5115: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  ac_cv_header_fpx_h=yes
else
  echo "$ac_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:5127: 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:5135: 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_save_LIBS=$LIBS
LIBS="-lfpx  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 5143 "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;
}
EOF
if { (eval echo configure:5160: \"$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*
LIBS=$ac_save_LIBS
fi
echo "configure:5170: 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:5177: 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:5183: 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:5193: result: yes" >&5
echo "$ECHO_T""yes" >&6
        have_fpx='yes'
    fi
    else
        echo "configure:5198: 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
    echo "configure:5216: checking for LCMS support ..." >&5
echo $ECHO_N "checking for LCMS support ...... $ECHO_C" >&6
    failed=0;
    passed=0;
    echo "configure:5220: 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 <<EOF
#line 5226 "configure"
#include "confdefs.h"
#include <lcms.h>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:5231: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  ac_cv_header_lcms_h=yes
else
  echo "$ac_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:5243: 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:5251: 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_save_LIBS=$LIBS
LIBS="-llcms  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 5259 "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;
}
EOF
if { (eval echo configure:5276: \"$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*
LIBS=$ac_save_LIBS
fi
echo "configure:5286: 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:5293: 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:5299: 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:5309: result: yes" >&5
echo "$ECHO_T""yes" >&6
	have_lcms='yes'
    fi
    else
    echo "configure:5314: 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
    echo "configure:5332: checking for PNG support ..." >&5
echo $ECHO_N "checking for PNG support ...... $ECHO_C" >&6
    failed=0;
    passed=0;
    echo "configure:5336: 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 <<EOF
#line 5342 "configure"
#include "confdefs.h"
#include <png.h>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:5347: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  ac_cv_header_png_h=yes
else
  echo "$ac_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:5359: 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:5366: 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 <<EOF
#line 5372 "configure"
#include "confdefs.h"
#include <pngconf.h>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:5377: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  ac_cv_header_pngconf_h=yes
else
  echo "$ac_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:5389: 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:5397: 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_save_LIBS=$LIBS
LIBS="-lpng  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 5405 "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;
}
EOF
if { (eval echo configure:5422: \"$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*
LIBS=$ac_save_LIBS
fi
echo "configure:5432: 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:5439: 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:5445: 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:5455: result: yes" >&5
echo "$ECHO_T""yes" >&6
	have_png='yes'
    fi
    else
    echo "configure:5460: 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
    echo "configure:5478: checking for JPEG support ..." >&5
echo $ECHO_N "checking for JPEG support ...... $ECHO_C" >&6
    failed=0;
    passed=0;
    echo "configure:5482: 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 <<EOF
#line 5488 "configure"
#include "confdefs.h"
#include <jconfig.h>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:5493: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  ac_cv_header_jconfig_h=yes
else
  echo "$ac_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:5505: 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:5512: 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 <<EOF
#line 5518 "configure"
#include "confdefs.h"
#include <jerror.h>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:5523: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  ac_cv_header_jerror_h=yes
else
  echo "$ac_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:5535: 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:5542: 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 <<EOF
#line 5548 "configure"
#include "confdefs.h"
#include <jmorecfg.h>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:5553: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  ac_cv_header_jmorecfg_h=yes
else
  echo "$ac_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:5565: 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:5572: 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 <<EOF
#line 5578 "configure"
#include "confdefs.h"
#include <jpeglib.h>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:5583: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  ac_cv_header_jpeglib_h=yes
else
  echo "$ac_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:5595: 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:5603: 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_save_LIBS=$LIBS
LIBS="-ljpeg  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 5611 "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;
}
EOF
if { (eval echo configure:5628: \"$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*
LIBS=$ac_save_LIBS
fi
echo "configure:5638: 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:5647: 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 <<EOF
#line 5656 "configure"
#include "confdefs.h"

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

EOF
if { (eval echo configure:5667: \"$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*
fi

fi
echo "configure:5678: 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:5681: result: yes" >&5
echo "$ECHO_T""yes" >&6
 passed=`expr $passed + 1`
else
 echo "configure:5685: result: no" >&5
echo "$ECHO_T""no" >&6
 failed=`expr $failed + 1`
fi
fi
    echo "configure:5690: 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:5696: 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:5706: result: yes" >&5
echo "$ECHO_T""yes" >&6
        have_jpeg='yes'
    fi
    else
        echo "configure:5711: 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
    echo "configure:5729: checking for TrueType Font support ..." >&5
echo $ECHO_N "checking for TrueType Font support ...... $ECHO_C" >&6
    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:5738: 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 <<EOF
#line 5744 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:5749: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  eval "$ac_ac_Header=yes"
else
  echo "$ac_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:5761: 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:5778: 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_save_LIBS=$LIBS
LIBS="-lfreetype  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 5786 "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;
}
EOF
if { (eval echo configure:5803: \"$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*
LIBS=$ac_save_LIBS
fi
echo "configure:5813: 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:5826: 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_save_LIBS=$LIBS
LIBS="-lttf  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 5834 "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;
}
EOF
if { (eval echo configure:5851: \"$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*
LIBS=$ac_save_LIBS
fi
echo "configure:5861: 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:5873: 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:5880: 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:5889: result: yes" >&5
echo "$ECHO_T""yes" >&6
	    have_ttf='yes'
	fi
    else
	echo "configure:5894: 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
    echo "configure:5912: checking for TIFF support ..." >&5
echo $ECHO_N "checking for TIFF support ...... $ECHO_C" >&6
    failed=0;
    passed=0;
    echo "configure:5916: 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 <<EOF
#line 5922 "configure"
#include "confdefs.h"
#include <tiff.h>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:5927: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  ac_cv_header_tiff_h=yes
else
  echo "$ac_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:5939: 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:5946: 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 <<EOF
#line 5952 "configure"
#include "confdefs.h"
#include <tiffio.h>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:5957: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  ac_cv_header_tiffio_h=yes
else
  echo "$ac_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:5969: 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:5977: 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_save_LIBS=$LIBS
LIBS="-ltiff  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 5985 "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;
}
EOF
if { (eval echo configure:6002: \"$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*
LIBS=$ac_save_LIBS
fi
echo "configure:6012: 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:6019: 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:6025: 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:6035: 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:6042: 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 <<EOF
#line 6048 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:6053: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  eval "$ac_ac_Header=yes"
else
  echo "$ac_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:6065: 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:6075: 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
    echo "configure:6093: checking for HDF components ..." >&5
echo $ECHO_N "checking for HDF components ...... $ECHO_C" >&6
    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:6102: 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 <<EOF
#line 6108 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:6113: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  eval "$ac_ac_Header=yes"
else
  echo "$ac_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:6125: 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:6140: 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_save_LIBS=$LIBS
LIBS="-ldf  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 6148 "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;
}
EOF
if { (eval echo configure:6165: \"$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*
LIBS=$ac_save_LIBS
fi
echo "configure:6175: 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:6182: 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:6188: 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:6198: result: yes" >&5
echo "$ECHO_T""yes" >&6
	have_hdf='yes'
    fi
    else
    echo "configure:6203: 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
    echo "configure:6221: checking for JBIG support ..." >&5
echo $ECHO_N "checking for JBIG support ...... $ECHO_C" >&6
    failed=0;
    passed=0;
    echo "configure:6225: 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 <<EOF
#line 6231 "configure"
#include "confdefs.h"
#include <jbig.h>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:6236: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  ac_cv_header_jbig_h=yes
else
  echo "$ac_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:6248: 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:6256: 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_save_LIBS=$LIBS
LIBS="-ljbig  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 6264 "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;
}
EOF
if { (eval echo configure:6281: \"$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*
LIBS=$ac_save_LIBS
fi
echo "configure:6291: 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:6298: 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:6304: 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:6314: result: yes" >&5
echo "$ECHO_T""yes" >&6
        have_jbig='yes'
    fi
    else
        echo "configure:6319: 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
    echo "configure:6337: checking for XML support ..." >&5
echo $ECHO_N "checking for XML support ...... $ECHO_C" >&6
    failed=0;
    passed=0;
    echo "configure:6341: 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 <<EOF
#line 6347 "configure"
#include "confdefs.h"
#include <libxml/parser.h>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:6352: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  ac_cv_header_libxml_parser_h=yes
else
  echo "$ac_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:6364: 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:6372: 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_save_LIBS=$LIBS
LIBS="-lxml  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 6380 "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;
}
EOF
if { (eval echo configure:6397: \"$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*
LIBS=$ac_save_LIBS
fi
echo "configure:6407: 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:6414: 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:6420: 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:6430: result: yes" >&5
echo "$ECHO_T""yes" >&6
        have_xml='yes'
    fi
    else
        echo "configure:6435: 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:6447: 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 <<EOF
#line 6453 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <float.h>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:6461: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  ac_cv_header_stdc=yes
else
  echo "$ac_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 <<EOF
#line 6475 "configure"
#include "confdefs.h"
#include <string.h>

EOF
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 <<EOF
#line 6490 "configure"
#include "confdefs.h"
#include <stdlib.h>

EOF
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 <<EOF
#line 6508 "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);
}
EOF
if { (eval echo configure:6532: \"$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*
fi

fi
fi
echo "configure:6544: 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:6552: 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 <<EOF
#line 6558 "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

EOF
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:6591: 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:6599: 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 <<EOF
#line 6605 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
#include <time.h>

int
main ()
{
struct tm *tp;
  ;
  return 0;
}
EOF
if { (eval echo configure:6618: \"$ac_compile\") >&5; (eval $ac_compile) 2>&5; }; 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*
fi
echo "configure:6627: 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_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo "configure:6643: 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_cv_header_dirent_$ac_safe+set}\" = set"; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<EOF
#line 6649 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>

int
main ()
{
DIR *dirp = 0;
  ;
  return 0;
}
EOF
if { (eval echo configure:6661: \"$ac_compile\") >&5; (eval $ac_compile) 2>&5; }; then
  eval "ac_cv_header_dirent_$ac_safe=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  eval "ac_cv_header_dirent_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
  echo "configure:6671: result: yes" >&5
echo "$ECHO_T""yes" >&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >>confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 ac_header_dirent=$ac_hdr; break
else
  echo "configure:6679: result: no" >&5
echo "$ECHO_T""no" >&6
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:6686: 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_save_LIBS=$LIBS
LIBS="-ldir  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 6694 "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;
}
EOF
if { (eval echo configure:6711: \"$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*
LIBS=$ac_save_LIBS
fi
echo "configure:6721: 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:6728: 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_save_LIBS=$LIBS
LIBS="-lx  $LIBS"
cat >conftest.$ac_ext <<EOF
#line 6736 "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;
}
EOF
if { (eval echo configure:6753: \"$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*
LIBS=$ac_save_LIBS
fi
echo "configure:6763: 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:6776: 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 <<EOF
#line 6782 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:6787: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  eval "$ac_ac_Header=yes"
else
  echo "$ac_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:6799: 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 pwd.h malloc.h
do
ac_ac_Header=`echo "ac_cv_header_$ac_header" | $ac_tr_sh`
echo "configure:6815: 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 <<EOF
#line 6821 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:6826: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  eval "$ac_ac_Header=yes"
else
  echo "$ac_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:6838: 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:6852: 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 <<EOF
#line 6858 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:6863: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  eval "$ac_ac_Header=yes"
else
  echo "$ac_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:6875: 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:6884: 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 <<EOF
#line 6902 "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;
}
EOF
if { (eval echo configure:6940: \"$ac_compile\") >&5; (eval $ac_compile) 2>&5; }; 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*
done
CC=$ac_save_CC

fi

case "x$ac_cv_prog_cc_stdc" in
  x|xno)
    echo "configure:6952: result: none needed" >&5
echo "$ECHO_T""none needed" >&6 ;;
  *)
    echo "configure:6955: 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:6959: 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 <<EOF
#line 6965 "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;
}
EOF
if { (eval echo configure:7019: \"$ac_compile\") >&5; (eval $ac_compile) 2>&5; }; 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*
fi
echo "configure:7028: 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:7036: 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 <<EOF
#line 7044 "configure"
#include "confdefs.h"

int
main ()
{
#ifndef __cplusplus
  } $ac_kw int foo() {
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:7056: \"$ac_compile\") >&5; (eval $ac_compile) 2>&5; }; then
  ac_cv_c_inline=$ac_kw; break
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
done

fi
echo "configure:7065: 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:7079: 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 <<EOF
#line 7087 "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;
}
EOF
if { (eval echo configure:7101: \"$ac_compile\") >&5; (eval $ac_compile) 2>&5; }; then
  # It does; now see whether it defined to BIG_ENDIAN or not.
cat >conftest.$ac_ext <<EOF
#line 7104 "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;
}
EOF
if { (eval echo configure:7118: \"$ac_compile\") >&5; (eval $ac_compile) 2>&5; }; 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*
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
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 <<EOF
#line 7136 "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);
}
EOF
if { (eval echo configure:7151: \"$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*
fi

fi
fi
echo "configure:7163: 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:7171: 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 <<EOF
#line 7177 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
if ((mode_t *) 0)
  return 0;
if (sizeof (mode_t))
  return 0;
  ;
  return 0;
}
EOF
if { (eval echo configure:7191: \"$ac_compile\") >&5; (eval $ac_compile) 2>&5; }; 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*
fi
echo "configure:7200: 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:7210: 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 <<EOF
#line 7216 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
if ((off_t *) 0)
  return 0;
if (sizeof (off_t))
  return 0;
  ;
  return 0;
}
EOF
if { (eval echo configure:7230: \"$ac_compile\") >&5; (eval $ac_compile) 2>&5; }; 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*
fi
echo "configure:7239: 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:7249: 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 <<EOF
#line 7255 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
if ((pid_t *) 0)
  return 0;
if (sizeof (pid_t))
  return 0;
  ;
  return 0;
}
EOF
if { (eval echo configure:7269: \"$ac_compile\") >&5; (eval $ac_compile) 2>&5; }; 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*
fi
echo "configure:7278: 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:7288: 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 <<EOF
#line 7294 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
if ((size_t *) 0)
  return 0;
if (sizeof (size_t))
  return 0;
  ;
  return 0;
}
EOF
if { (eval echo configure:7308: \"$ac_compile\") >&5; (eval $ac_compile) 2>&5; }; 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*
fi
echo "configure:7317: 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:7327: 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 "$cross_compiling" = yes; then
  ac_cv_sizeof_int=0
else
  cat >conftest.$ac_ext <<EOF
#line 7336 "configure"
#include "confdefs.h"
$ac_includes_default
int
main ()
{
  FILE *f = fopen ("conftestval", "w");
  if (!f)
    exit (1);
  fprintf (f, "%d\n", sizeof (int));
  exit (0);
}
EOF
if { (eval echo configure:7349: \"$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
  ac_cv_sizeof_int=0
fi
rm -f conftest*
fi

fi
echo "configure:7360: 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:7366: 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 "$cross_compiling" = yes; then
  ac_cv_sizeof_long_long=0
else
  cat >conftest.$ac_ext <<EOF
#line 7375 "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));
  exit (0);
}
EOF
if { (eval echo configure:7388: \"$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
  ac_cv_sizeof_long_long=0
fi
rm -f conftest*
fi

fi
echo "configure:7399: 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:7408: checking for 8-bit clean memcmp" >&5
echo $ECHO_N "checking for 8-bit clean memcmp... $ECHO_C" >&6
if test "${ac_cv_func_memcmp_clean+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_func_memcmp_clean=no
else
  cat >conftest.$ac_ext <<EOF
#line 7417 "configure"
#include "confdefs.h"
int
main()
{
  char c0 = 0x40, c1 = 0x80, c2 = 0x81;
  exit (memcmp(&c0, &c2, 1) < 0
        && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
}
EOF
if { (eval echo configure:7427: \"$ac_link\") >&5; (eval $ac_link) 2>&5; } &&
   test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null; then
  ac_cv_func_memcmp_clean=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_func_memcmp_clean=no
fi
rm -f conftest*
fi

fi
echo "configure:7438: result: $ac_cv_func_memcmp_clean" >&5
echo "$ECHO_T""$ac_cv_func_memcmp_clean" >&6
test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"

echo "configure:7441: 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 <<EOF
#line 7447 "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;
}
EOF
if { (eval echo configure:7467: \"$ac_compile\") >&5; (eval $ac_compile) 2>&5; }; 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*
fi
echo "configure:7476: 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

echo "configure:7482: checking for vprintf" >&5
echo $ECHO_N "checking for vprintf... $ECHO_C" >&6
if test "${ac_cv_func_vprintf+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<EOF
#line 7488 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char vprintf(); 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 vprintf();
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_vprintf) || defined (__stub___vprintf)
choke me
#else
f = vprintf;
#endif

  ;
  return 0;
}
EOF
if { (eval echo configure:7516: \"$ac_link\") >&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  ac_cv_func_vprintf=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_func_vprintf=no
fi
rm -f conftest*
fi
echo "configure:7525: result: $ac_cv_func_vprintf" >&5
echo "$ECHO_T""$ac_cv_func_vprintf" >&6
if test $ac_cv_func_vprintf = yes; then
  #

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

fi

if test "$ac_cv_func_vprintf" != yes; then
echo "configure:7534: 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 <<EOF
#line 7540 "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;
}
EOF
if { (eval echo configure:7568: \"$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*
fi
echo "configure:7577: 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

#

#

#

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:7592: 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 <<EOF
#line 7598 "configure"
#include "confdefs.h"
#include <$ac_header>

EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:7603: \"$ac_try\") >&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  eval "$ac_ac_Header=yes"
else
  echo "$ac_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:7615: 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:7627: 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 <<EOF
#line 7633 "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;
}
EOF
if { (eval echo configure:7661: \"$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*
fi
echo "configure:7670: 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:7678: 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 <<EOF
#line 7687 "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 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);
}
EOF
if { (eval echo configure:7811: \"$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*
fi

fi
echo "configure:7822: 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:7844: 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 <<EOF
#line 7850 "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;
}
EOF
if { (eval echo configure:7878: \"$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*
fi
echo "configure:7887: 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

# Test for sys_errlist array if strerror() not supported.
if test "$ac_cv_func_strerror" != 'yes' ; then
echo "configure:7897: 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 <<EOF
#line 7903 "configure"
#include "confdefs.h"

extern char** sys_errlist;

int
main ()
{

char** p = sys_errlist;

  ;
  return 0;
}
EOF
if { (eval echo configure:7914: \"$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*
fi
echo "configure:7923: 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:7930: result: yes" >&5
echo "$ECHO_T""yes" >&6
else
 echo "configure:7933: result: no" >&5
echo "$ECHO_T""no" >&6
fi
fi

#
# Configure Delegates
#

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

cat >>confdefs.h <<EOF
#define DelegatePath "$DelegatePath"
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:7949: 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
    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
  IFS=$ac_save_ifs
  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:7975: result: $BZIPDelegate" >&5
echo "$ECHO_T""$BZIPDelegate" >&6
else
  echo "configure:7978: 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:7983: 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
    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
  IFS=$ac_save_ifs
  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:8009: result: $BrowseDelegate" >&5
echo "$ECHO_T""$BrowseDelegate" >&6
else
  echo "configure:8012: 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:8017: 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
    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
  IFS=$ac_save_ifs
  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:8043: result: $CGMDecodeDelegate" >&5
echo "$ECHO_T""$CGMDecodeDelegate" >&6
else
  echo "configure:8046: 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:8051: 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
    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
  IFS=$ac_save_ifs
  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:8077: result: $CatDelegate" >&5
echo "$ECHO_T""$CatDelegate" >&6
else
  echo "configure:8080: 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:8085: 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
    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
  IFS=$ac_save_ifs
  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:8111: result: $DOTDecodeDelegate" >&5
echo "$ECHO_T""$DOTDecodeDelegate" >&6
else
  echo "configure:8114: 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:8119: 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
    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
  IFS=$ac_save_ifs
  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:8145: result: $DVIDecodeDelegate" >&5
echo "$ECHO_T""$DVIDecodeDelegate" >&6
else
  echo "configure:8148: 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:8153: 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
    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
  IFS=$ac_save_ifs
  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:8179: result: $EchoDelegate" >&5
echo "$ECHO_T""$EchoDelegate" >&6
else
  echo "configure:8182: 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:8187: 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
    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
  IFS=$ac_save_ifs
  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:8213: result: $EditorDelegate" >&5
echo "$ECHO_T""$EditorDelegate" >&6
else
  echo "configure:8216: 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:8221: 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
    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
  IFS=$ac_save_ifs
  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:8247: result: $FIGDecodeDelegate" >&5
echo "$ECHO_T""$FIGDecodeDelegate" >&6
else
  echo "configure:8250: 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:8255: 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
    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
  IFS=$ac_save_ifs
  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:8281: result: $GnuplotDecodeDelegate" >&5
echo "$ECHO_T""$GnuplotDecodeDelegate" >&6
else
  echo "configure:8284: 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:8289: 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
    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
  IFS=$ac_save_ifs
  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:8315: result: $HPGLDecodeDelegate" >&5
echo "$ECHO_T""$HPGLDecodeDelegate" >&6
else
  echo "configure:8318: 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:8323: 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
    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
  IFS=$ac_save_ifs
  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:8349: result: $HTMLDecodeDelegate" >&5
echo "$ECHO_T""$HTMLDecodeDelegate" >&6
else
  echo "configure:8352: 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:8357: 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
    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
  IFS=$ac_save_ifs
  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:8383: result: $ILBMDecodeDelegate" >&5
echo "$ECHO_T""$ILBMDecodeDelegate" >&6
else
  echo "configure:8386: 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:8391: 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
    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
  IFS=$ac_save_ifs
  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:8417: result: $ILBMEncodeDelegate" >&5
echo "$ECHO_T""$ILBMEncodeDelegate" >&6
else
  echo "configure:8420: 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:8425: 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
    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
  IFS=$ac_save_ifs
  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:8451: result: $LPDelegate" >&5
echo "$ECHO_T""$LPDelegate" >&6
else
  echo "configure:8454: 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:8459: 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
    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
  IFS=$ac_save_ifs
  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:8485: result: $LPRDelegate" >&5
echo "$ECHO_T""$LPRDelegate" >&6
else
  echo "configure:8488: 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:8493: 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
    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
  IFS=$ac_save_ifs
  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:8519: result: $LZWDecodeDelegate" >&5
echo "$ECHO_T""$LZWDecodeDelegate" >&6
else
  echo "configure:8522: 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:8527: 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
    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
  IFS=$ac_save_ifs
  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:8553: result: $LZWEncodeDelegate" >&5
echo "$ECHO_T""$LZWEncodeDelegate" >&6
else
  echo "configure:8556: 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:8561: 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
    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
  IFS=$ac_save_ifs
  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:8587: result: $LaunchDelegate" >&5
echo "$ECHO_T""$LaunchDelegate" >&6
else
  echo "configure:8590: 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:8595: 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
    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
  IFS=$ac_save_ifs
  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:8621: result: $MANDelegate" >&5
echo "$ECHO_T""$MANDelegate" >&6
else
  echo "configure:8624: 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:8629: 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
    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
  IFS=$ac_save_ifs
  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:8655: result: $MPEGDecodeDelegate" >&5
echo "$ECHO_T""$MPEGDecodeDelegate" >&6
else
  echo "configure:8658: 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:8663: 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
    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
  IFS=$ac_save_ifs
  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:8689: result: $MPEGEncodeDelegate" >&5
echo "$ECHO_T""$MPEGEncodeDelegate" >&6
else
  echo "configure:8692: 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:8697: 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
    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
  IFS=$ac_save_ifs
  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:8723: result: $MVDelegate" >&5
echo "$ECHO_T""$MVDelegate" >&6
else
  echo "configure:8726: 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:8731: 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
    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
  IFS=$ac_save_ifs
  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:8757: result: $PGPDecodeDelegate" >&5
echo "$ECHO_T""$PGPDecodeDelegate" >&6
else
  echo "configure:8760: 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:8765: 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
    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
  IFS=$ac_save_ifs
  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:8791: result: $POVDelegate" >&5
echo "$ECHO_T""$POVDelegate" >&6
else
  echo "configure:8794: 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:8799: 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
    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
  IFS=$ac_save_ifs
  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:8825: result: $PSDelegate" >&5
echo "$ECHO_T""$PSDelegate" >&6
else
  echo "configure:8828: 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:8833: 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
    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
  IFS=$ac_save_ifs
  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:8859: result: $RADDecodeDelegate" >&5
echo "$ECHO_T""$RADDecodeDelegate" >&6
else
  echo "configure:8862: 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:8867: 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
    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
  IFS=$ac_save_ifs
  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:8893: result: $RLEEncodeDelegate" >&5
echo "$ECHO_T""$RLEEncodeDelegate" >&6
else
  echo "configure:8896: 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:8901: 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
    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
  IFS=$ac_save_ifs
  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:8927: result: $RMDelegate" >&5
echo "$ECHO_T""$RMDelegate" >&6
else
  echo "configure:8930: 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:8935: 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
    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
  IFS=$ac_save_ifs
  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:8961: result: $SCANDecodeDelegate" >&5
echo "$ECHO_T""$SCANDecodeDelegate" >&6
else
  echo "configure:8964: 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:8969: 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
    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
  IFS=$ac_save_ifs
  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:8995: result: $TXTDelegate" >&5
echo "$ECHO_T""$TXTDelegate" >&6
else
  echo "configure:8998: 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:9003: 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
    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
  IFS=$ac_save_ifs
  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:9029: result: $WMFDecodeDelegate" >&5
echo "$ECHO_T""$WMFDecodeDelegate" >&6
else
  echo "configure:9032: 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:9037: 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
    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
  IFS=$ac_save_ifs
  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:9063: result: $WWWDecodeDelegate" >&5
echo "$ECHO_T""$WWWDecodeDelegate" >&6
else
  echo "configure:9066: 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:9071: 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
    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
  IFS=$ac_save_ifs
  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:9097: result: $XCFDecodeDelegate" >&5
echo "$ECHO_T""$XCFDecodeDelegate" >&6
else
  echo "configure:9100: 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:9105: 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
    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
  IFS=$ac_save_ifs
  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:9131: result: $ZipDelegate" >&5
echo "$ECHO_T""$ZipDelegate" >&6
else
  echo "configure:9134: 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:9208: 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:9221: result: $GSColorDevice" >&5
echo "$ECHO_T""$GSColorDevice" >&6

  # GSMonoDevice
  echo "configure:9224: 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:9232: result: $GSMonoDevice" >&5
echo "$ECHO_T""$GSMonoDevice" >&6

  # GSPDFDevice
  echo "configure:9235: 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:9243: result: $GSPDFDevice" >&5
echo "$ECHO_T""$GSPDFDevice" >&6

  # GSPSDevice
  echo "configure:9246: 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:9254: result: $GSPSDevice" >&5
echo "$ECHO_T""$GSPSDevice" >&6

  # GSEPSDevice
  echo "configure:9257: 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:9265: 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:9278: 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:9285: 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:9294: 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
    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
  IFS=$ac_save_ifs
  ;;
esac
fi
PERL=$ac_cv_path_PERL
if test -n "$PERL"; then
  echo "configure:9319: result: $PERL" >&5
echo "$ECHO_T""$PERL" >&6
else
  echo "configure:9322: 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

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

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.  It is not useful on other systems.
# If it contains results you don't want to keep, you may remove or edit it.
#
# By default, configure uses ./config.cache as the cache file,
# creating it if it does not exist already.  You can give configure
# the --cache-file=FILE option to use a different cache file; that is
# what configure does when it calls configure scripts in
# subdirectories, so they share the cache.
# Giving --cache-file=/dev/null disables caching, for debugging configure.
# config.status only pays attention to the cache file if you give it the
# --recheck option to rerun configure.
#
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 -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\2/p'
      ;;
    esac;
} |
  sed -e '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 -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\2/p'
      ;;
    esac;
} | sed -e 's/^/| /' >&5
echo >&5
echo "confdefs.h:" >&5
cat confdefs.h | sed -e '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.
# This directory was configured as follows,
# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
#
# $0 $ac_configure_args
#
# Compiler output produced by configure, useful for debugging
# configure, is in ./config.log if it exists.

# Files that config.status was made for.
config_files="\\
  Makefile delegates/delegates.mgk delegates/Makefile magick/Makefile
  coders/Makefile utilities/Makefile tests/Makefile magick/Magick-config
  PerlMagick/Makefile.PL"
config_headers="\\
  magick/config.h"
config_commands="\\
  default-1 default-2"

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

Usage: $CONFIG_STATUS [OPTIONS] FILE...

  --recheck    Update $CONFIG_STATUS by reconfiguring in the same conditions
  --version    Print the version of Autoconf and exit
  --help       Display this help and exit
  --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>."

ac_cs_version="\\
$CONFIG_STATUS generated by autoconf version 2.14a.
Configured on host `(hostname || uname -n) 2>/dev/null | sed 1q` by
  `echo "$0 $ac_configure_args" | sed 's/[\\"\`\$]/\\\\&/g'`"

# Root of the tmp file names.  Use pid to allow concurrent executions.
ac_cs_root=cs\$\$
ac_given_srcdir=$srcdir
ac_given_INSTALL="$INSTALL"

# 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=\`echo "\$1" | sed -e 's/=.*//'\`
    ac_optarg=\`echo "\$1" | sed -e 's/[^=]*=//'\`
    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.
  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
    echo "running \${CONFIG_SHELL-/bin/sh} $0 `echo "$ac_configure_args" | sed 's/[\\"\`\$]/\\\\&/g'` --no-create --no-recursion"
    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
    echo "\$ac_cs_version"; exit 0 ;;
  --he | --h)
    # Conflict between --help and --header
    echo "$CONFIG_STATUS: ambiguous option: \$ac_option
Try \\\`$CONFIG_STATUS --help' for more information."; exit 1 ;;
  -help | --help | --hel )
    echo "\$ac_cs_usage"; exit 0 ;;
  --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" ;;
  '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 "$CONFIG_STATUS: unrecognized option: \$1
Try \\\`$CONFIG_STATUS --help' for more information."; exit 1 ;;
  *) echo "$CONFIG_STATUS: 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

# Trap to remove the temp files.
trap 'rm -fr $ac_cs_root*; exit 1' 1 2 15

EOF

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

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/' >\$ac_cs_root.subs <<\\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%@host@%$host%;t t
s%@host_alias@%$host_alias%;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_alias@%$target_alias%;t t
s%@target_cpu@%$target_cpu%;t t
s%@target_vendor@%$target_vendor%;t t
s%@target_os@%$target_os%;t t
s%@build@%$build%;t t
s%@build_alias@%$build_alias%;t t
s%@build_cpu@%$build_cpu%;t t
s%@build_vendor@%$build_vendor%;t t
s%@build_os@%$build_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%@CPP@%$CPP%;t t
s%@CCDEPMODE@%$CCDEPMODE%;t t
s%@LD@%$LD%;t t
s%@LN_S@%$LN_S%;t t
s%@EXEEXT@%$EXEEXT%;t t
s%@OBJEXT@%$OBJEXT%;t t
s%@INCLTDL@%$INCLTDL%;t t
s%@LIBLTDL@%$LIBLTDL%;t t
s%@RANLIB@%$RANLIB%;t t
s%@STRIP@%$STRIP%;t t
s%@LIBTOOL@%$LIBTOOL%;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
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" $ac_cs_root.subs >$ac_cs_root.sfrag
    else
      sed "${ac_end}q" $ac_cs_root.subs >$ac_cs_root.sfrag
    fi
    if test ! -s $ac_cs_root.sfrag; then
      ac_more_lines=false
      rm -f $ac_cs_root.sfrag
    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 $ac_cs_root.sfrag) >$ac_cs_root.s$ac_sed_frag
      if test -z "$ac_sed_cmds"; then
  	ac_sed_cmds="sed -f $ac_cs_root.s$ac_sed_frag"
      else
  	ac_sed_cmds="$ac_sed_cmds | sed -f $ac_cs_root.s$ac_sed_frag"
      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
  *:*) 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.

  # Remove last slash and all that follows it.  Not all systems have dirname.
  ac_dir=`echo "$ac_file" | sed 's%/[^/][^/]*$%%'`
  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
    # The file is in a subdirectory.
    test ! -d "$ac_dir" && mkdir "$ac_dir"
    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

  echo creating "$ac_file"
  rm -f "$ac_file"
  configure_input="Generated automatically from `echo $ac_file_in |
                                                 sed 's%.*/%%'` by configure."
  case "$ac_file" in
  *[Mm]akefile*) ac_comsub="1i\\
# $configure_input" ;;
  *) ac_comsub= ;;
  esac

  # Don't redirect the output to AC_FILE directly: use `mv' so that updating
  # is atomic, and doesn't need trapping.
  ac_file_inputs=`echo "$ac_file_in" |
                  sed -e "s%^%$ac_given_srcdir/%;s%:% $ac_given_srcdir/%g"`
  for ac_file_input in $ac_file_inputs;
  do
    test -f "$ac_file_input" ||
        { echo "configure: error: cannot find input file \`$ac_file_input'" >&2; exit 1; }
  done
EOF
cat >>$CONFIG_STATUS <<EOF
  sed -e "$ac_comsub
$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") >$ac_cs_root.out
  mv $ac_cs_root.out $ac_file

done
rm -f $ac_cs_root.s*
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
  *:*) ac_file_in=`echo "$ac_file" | sed 's%[^:]*:%%'`
       ac_file=`echo "$ac_file" | sed 's%:.*%%'` ;;
  *) ac_file_in=$ac_file.in ;;
  esac

  echo creating $ac_file

  rm -f $ac_cs_root.frag $ac_cs_root.in $ac_cs_root.out
  ac_file_inputs=`echo "$ac_file_in" |
                  sed -e "s%^%$ac_given_srcdir/%;s%:% $ac_given_srcdir/%g"`
    for ac_file_input in $ac_file_inputs;
  do
    test -f "$ac_file_input" ||
        { echo "configure: error: cannot find input file \`$ac_file_input'" >&2; exit 1; }
  done
  # Remove the trailing spaces.
  sed -e 's/[ 	]*$//' $ac_file_inputs >$ac_cs_root.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
cat >$ac_cs_root.hdr <<\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 $ac_cs_root.hdr >conftest.defines
sed -e 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
rm -f $ac_cs_root.hdr

# 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" $ac_cs_root.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 $ac_cs_root.frag.
  echo '  cat >$ac_cs_root.frag <<CEOF' >>$CONFIG_STATUS
  echo '/^[ 	]*#[ 	]*define/!b' >>$CONFIG_STATUS
  sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
  echo 'CEOF
  sed -f $ac_cs_root.frag $ac_cs_root.in >$ac_cs_root.out
  rm -f $ac_cs_root.in
  mv $ac_cs_root.out $ac_cs_root.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 $ac_cs_root.frag.
  echo '  cat >$ac_cs_root.frag <<CEOF' >>$CONFIG_STATUS
  echo '/^[ 	]*#[ 	]*undef/!b' >>$CONFIG_STATUS
  sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
  echo 'CEOF
  sed -f $ac_cs_root.frag $ac_cs_root.in >$ac_cs_root.out
  rm -f $ac_cs_root.in
  mv $ac_cs_root.out $ac_cs_root.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
  rm -f $ac_cs_root.frag $ac_cs_root.h
  echo "/* $ac_file.  Generated automatically by configure.  */" >$ac_cs_root.h
  cat $ac_cs_root.in >>$ac_cs_root.h
  rm -f $ac_cs_root.in
  if cmp -s $ac_file $ac_cs_root.h 2>/dev/null; then
    echo "$ac_file is unchanged"
    rm -f $ac_cs_root.h
  else
    # Remove last slash and all that follows it.  Not all systems have dirname.
    ac_dir=`echo "$ac_file" | sed 's%/[^/][^/]*$%%'`
    if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
      # The file is in a subdirectory.
      test ! -d "$ac_dir" && mkdir "$ac_dir"
    fi
    rm -f $ac_file
    mv $ac_cs_root.h $ac_file
  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=*)
      ;;
    -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  ltdl; do

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

    echo configuring in $ac_subdir

    case "$srcdir" in
    .) ;;
    *)
      if test -d ./$ac_subdir || mkdir ./$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 -e '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 "  LDFLAGS  = $LDFLAGS"
#echo "  LIBS     = $LIBS"
echo ""

