#! /bin/sh
# From configure.in Revision: 1.166.2.17  .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.60.
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
## --------------------- ##
## M4sh Initialization.  ##
## --------------------- ##

# Be Bourne compatible
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
  emulate sh
  NULLCMD=:
  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
  # is contrary to our usage.  Disable this feature.
  alias -g '${1+"$@"}'='"$@"'
  setopt NO_GLOB_SUBST
else
  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
fi
BIN_SH=xpg4; export BIN_SH # for Tru64
DUALCASE=1; export DUALCASE # for MKS sh


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

# The user is always right.
if test "${PATH_SEPARATOR+set}" != set; then
  echo "#! /bin/sh" >conf$$.sh
  echo  "exit 0"   >>conf$$.sh
  chmod +x conf$$.sh
  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
    PATH_SEPARATOR=';'
  else
    PATH_SEPARATOR=:
  fi
  rm -f conf$$.sh
fi

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


# IFS
# We need space, tab and new line, in precisely that order.  Quoting is
# there to prevent editors from complaining about space-tab.
# (If _AS_PATH_WALK were called with IFS unset, it would disable word
# splitting by setting IFS to empty value.)
as_nl='
'
IFS=" ""	$as_nl"

# Find who we are.  Look in the path if we contain no directory separator.
case $0 in
  *[\\/]* ) as_myself=$0 ;;
  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
done
IFS=$as_save_IFS

     ;;
esac
# We did not find ourselves, most probably we were run as `sh COMMAND'
# in which case we are not to be found in the path.
if test "x$as_myself" = x; then
  as_myself=$0
fi
if test ! -f "$as_myself"; then
  echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
  { (exit 1); exit 1; }
fi

# Work around bugs in pre-3.0 UWIN ksh.
for as_var in ENV MAIL MAILPATH
do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
done
PS1='$ '
PS2='> '
PS4='+ '

# NLS nuisances.
for as_var in \
  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
  LC_TELEPHONE LC_TIME
do
  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
    eval $as_var=C; export $as_var
  else
    ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
  fi
done

# Required to use basename.
if expr a : '\(a\)' >/dev/null 2>&1 &&
   test "X`expr 00001 : '.*\(...\)'`" = X001; then
  as_expr=expr
else
  as_expr=false
fi

if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
  as_basename=basename
else
  as_basename=false
fi


# Name of the executable.
as_me=`$as_basename -- "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
	 X"$0" : 'X\(//\)$' \| \
	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
echo X/"$0" |
    sed '/^.*\/\([^/][^/]*\)\/*$/{
	    s//\1/
	    q
	  }
	  /^X\/\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\/\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`

# CDPATH.
$as_unset CDPATH


if test "x$CONFIG_SHELL" = x; then
  if (eval ":") 2>/dev/null; then
  as_have_required=yes
else
  as_have_required=no
fi

  if test $as_have_required = yes && 	 (eval ":
(as_func_return () {
  (exit \$1)
}
as_func_success () {
  as_func_return 0
}
as_func_failure () {
  as_func_return 1
}
as_func_ret_success () {
  return 0
}
as_func_ret_failure () {
  return 1
}

exitcode=0
if as_func_success; then
  :
else
  exitcode=1
  echo as_func_success failed.
fi

if as_func_failure; then
  exitcode=1
  echo as_func_failure succeeded.
fi

if as_func_ret_success; then
  :
else
  exitcode=1
  echo as_func_ret_success failed.
fi

if as_func_ret_failure; then
  exitcode=1
  echo as_func_ret_failure succeeded.
fi

if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
  :
else
  exitcode=1
  echo positional parameters were not saved.
fi

test \$exitcode = 0) || { (exit 1); exit 1; }

(
  as_lineno_1=\$LINENO
  as_lineno_2=\$LINENO
  test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
  test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
") 2> /dev/null; then
  :
else
  as_candidate_shells=
    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in /usr/bin/posix$PATH_SEPARATOR/bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  case $as_dir in
	 /*)
	   for as_base in sh bash ksh sh5; do
	     as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
	   done;;
       esac
done
IFS=$as_save_IFS


      for as_shell in $as_candidate_shells $SHELL; do
	 # Try only shells that exist, to save several forks.
	 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
		{ ("$as_shell") 2> /dev/null <<\_ASEOF
# Be Bourne compatible
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
  emulate sh
  NULLCMD=:
  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
  # is contrary to our usage.  Disable this feature.
  alias -g '${1+"$@"}'='"$@"'
  setopt NO_GLOB_SUBST
else
  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
fi
BIN_SH=xpg4; export BIN_SH # for Tru64
DUALCASE=1; export DUALCASE # for MKS sh

:
_ASEOF
}; then
  CONFIG_SHELL=$as_shell
	       as_have_required=yes
	       if { "$as_shell" 2> /dev/null <<\_ASEOF
# Be Bourne compatible
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
  emulate sh
  NULLCMD=:
  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
  # is contrary to our usage.  Disable this feature.
  alias -g '${1+"$@"}'='"$@"'
  setopt NO_GLOB_SUBST
else
  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
fi
BIN_SH=xpg4; export BIN_SH # for Tru64
DUALCASE=1; export DUALCASE # for MKS sh

:
(as_func_return () {
  (exit $1)
}
as_func_success () {
  as_func_return 0
}
as_func_failure () {
  as_func_return 1
}
as_func_ret_success () {
  return 0
}
as_func_ret_failure () {
  return 1
}

exitcode=0
if as_func_success; then
  :
else
  exitcode=1
  echo as_func_success failed.
fi

if as_func_failure; then
  exitcode=1
  echo as_func_failure succeeded.
fi

if as_func_ret_success; then
  :
else
  exitcode=1
  echo as_func_ret_success failed.
fi

if as_func_ret_failure; then
  exitcode=1
  echo as_func_ret_failure succeeded.
fi

if ( set x; as_func_ret_success y && test x = "$1" ); then
  :
else
  exitcode=1
  echo positional parameters were not saved.
fi

test $exitcode = 0) || { (exit 1); exit 1; }

(
  as_lineno_1=$LINENO
  as_lineno_2=$LINENO
  test "x$as_lineno_1" != "x$as_lineno_2" &&
  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }

_ASEOF
}; then
  break
fi

fi

      done

      if test "x$CONFIG_SHELL" != x; then
  for as_var in BASH_ENV ENV
        do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
        done
        export CONFIG_SHELL
        exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
fi


    if test $as_have_required = no; then
  echo This script requires a shell more modern than all the
      echo shells that I found on your system.  Please install a
      echo modern shell, or manually run the script under such a
      echo shell if you do have one.
      { (exit 1); exit 1; }
fi


fi

fi



(eval "as_func_return () {
  (exit \$1)
}
as_func_success () {
  as_func_return 0
}
as_func_failure () {
  as_func_return 1
}
as_func_ret_success () {
  return 0
}
as_func_ret_failure () {
  return 1
}

exitcode=0
if as_func_success; then
  :
else
  exitcode=1
  echo as_func_success failed.
fi

if as_func_failure; then
  exitcode=1
  echo as_func_failure succeeded.
fi

if as_func_ret_success; then
  :
else
  exitcode=1
  echo as_func_ret_success failed.
fi

if as_func_ret_failure; then
  exitcode=1
  echo as_func_ret_failure succeeded.
fi

if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
  :
else
  exitcode=1
  echo positional parameters were not saved.
fi

test \$exitcode = 0") || {
  echo No shell found that supports shell functions.
  echo Please tell autoconf@gnu.org about your system,
  echo including any error possibly output before this
  echo message
}



  as_lineno_1=$LINENO
  as_lineno_2=$LINENO
  test "x$as_lineno_1" != "x$as_lineno_2" &&
  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {

  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
  # uniformly replaced by the line number.  The first 'sed' inserts a
  # line-number line after each line using $LINENO; the second 'sed'
  # does the real work.  The second script uses 'N' to pair each
  # line-number line with the line containing $LINENO, and appends
  # trailing '-' during substitution so that $LINENO is not a special
  # case at line end.
  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
  # scripts with optimization help from Paolo Bonzini.  Blame Lee
  # E. McMahon (1931-1989) for sed's syntax.  :-)
  sed -n '
    p
    /[$]LINENO/=
  ' <$as_myself |
    sed '
      s/[$]LINENO.*/&-/
      t lineno
      b
      :lineno
      N
      :loop
      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
      t loop
      s/-\n.*//
    ' >$as_me.lineno &&
  chmod +x "$as_me.lineno" ||
    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
   { (exit 1); exit 1; }; }

  # Don't try to exec as it changes $[0], causing all sort of problems
  # (the dirname of $[0] is not the place where we might find the
  # original and so on.  Autoconf is especially sensitive to this).
  . "./$as_me.lineno"
  # Exit status is that of the last command.
  exit
}


if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
  as_dirname=dirname
else
  as_dirname=false
fi

ECHO_C= ECHO_N= ECHO_T=
case `echo -n x` in
-n*)
  case `echo 'x\c'` in
  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
  *)   ECHO_C='\c';;
  esac;;
*)
  ECHO_N='-n';;
esac

if expr a : '\(a\)' >/dev/null 2>&1 &&
   test "X`expr 00001 : '.*\(...\)'`" = X001; then
  as_expr=expr
else
  as_expr=false
fi

rm -f conf$$ conf$$.exe conf$$.file
if test -d conf$$.dir; then
  rm -f conf$$.dir/conf$$.file
else
  rm -f conf$$.dir
  mkdir conf$$.dir
fi
echo >conf$$.file
if ln -s conf$$.file conf$$ 2>/dev/null; then
  as_ln_s='ln -s'
  # ... but there are two gotchas:
  # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
  # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
  # In both cases, we have to default to `cp -p'.
  ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
    as_ln_s='cp -p'
elif ln conf$$.file conf$$ 2>/dev/null; then
  as_ln_s=ln
else
  as_ln_s='cp -p'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null

if mkdir -p . 2>/dev/null; then
  as_mkdir_p=:
else
  test -d ./-p && rmdir ./-p
  as_mkdir_p=false
fi

# Find out whether ``test -x'' works.  Don't use a zero-byte file, as
# systems may use methods other than mode bits to determine executability.
cat >conf$$.file <<_ASEOF
#! /bin/sh
exit 0
_ASEOF
chmod +x conf$$.file
if test -x conf$$.file >/dev/null 2>&1; then
  as_executable_p="test -x"
else
  as_executable_p=:
fi
rm -f conf$$.file

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

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



exec 7<&0 </dev/null 6>&1

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

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

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

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

ac_subst_vars='SHELL
PATH_SEPARATOR
PACKAGE_NAME
PACKAGE_TARNAME
PACKAGE_VERSION
PACKAGE_STRING
PACKAGE_BUGREPORT
exec_prefix
prefix
program_transform_name
bindir
sbindir
libexecdir
datarootdir
datadir
sysconfdir
sharedstatedir
localstatedir
includedir
oldincludedir
docdir
infodir
htmldir
dvidir
pdfdir
psdir
libdir
localedir
mandir
DEFS
ECHO_C
ECHO_N
ECHO_T
LIBS
build_alias
host_alias
target_alias
AWK
SED
LOCAL_SOLENV
UPD
SOURCEVERSION
build
build_cpu
build_vendor
build_os
host
host_cpu
host_vendor
host_os
target
target_cpu
target_vendor
target_os
OSVERSION
PTHREAD_CFLAGS
PTHREAD_LIBS
ENABLE_CRASHDUMP
ENABLE_VCTK
VC_STANDARD
ENABLE_DEBUG
PRODUCT
PROFULLSWITCH
PROEXT
ENABLE_SYMBOLS
ENABLE_CUPS
ENABLE_FONTCONFIG
WITH_BINFILTER
ENABLE_DIRECTX
NETTOOLKIT
ENABLE_RPATH
WITH_MYSPELL_DICTS
USE_SHELL
WITH_MINGWIN
SHELLPATH
GCC_HOME
CC
CFLAGS
LDFLAGS
CPPFLAGS
ac_ct_CC
EXEEXT
OBJEXT
COMPATH
GCCVER
HAVE_GCC_VISIBILITY_FEATURE
GNUMAKE
_cc
PERL
MSPDB_PATH
COMEX
MIDL_PATH
CSC_PATH
NMAKE_PATH
FRAME_HOME
CPP
GREP
EGREP
PAM
NEW_SHADOW_API
PAM_LINK
CRYPT_LINK
CXX
CXXFLAGS
ac_ct_CXX
GXX_INCLUDE_PATH
EXCEPTIONS
CXXCPP
STLPORT4
USE_SYSTEM_STL
ALLOC
BUILD_VER_STRING
SOLAR_JAVA
LANG
JAVAINTERPRETER
JAVACOMPILER
JAVACISGCJ
JAVADOC
AWTLIB
JAVAAOTCOMPILER
JAVA_HOME
JDK
XSLTPROC
DMAKE
BUILD_DMAKE
EPM
DPKG
PKGMK
BUILD_EPM
PKGFORMAT
RPM
SYSTEM_STDLIBS
SYSTEM_ZLIB
SYSTEM_JPEG
SYSTEM_EXPAT
PKG_CONFIG
FREETYPE_CFLAGS
FREETYPE_LIBS
SYSTEM_FREETYPE
LIBWPD_CFLAGS
LIBWPD_LIBS
SYSTEM_LIBWPD
LIBXML_CFLAGS
LIBXML_LIBS
SYSTEM_LIBXML
PYTHON
PYTHON_VERSION
PYTHON_PREFIX
PYTHON_EXEC_PREFIX
PYTHON_PLATFORM
pythondir
pkgpythondir
pyexecdir
pkgpyexecdir
SYSTEM_PYTHON
PYTHON_CFLAGS
PYTHON_LIBS
SYSTEM_DB
DB_VERSION
DB_INCLUDES
DB_JAR
SYSTEM_HSQLDB
HSQLDB_JAR
SYSTEM_BSH
BSH_JAR
SYSTEM_XML_APIS
XML_APIS_JAR
SYSTEM_XERCES
XERCES_JAR
SYSTEM_XALAN
XALAN_JAR
SABLOTCONFIG
SYSTEM_SABLOT
SABLOT_LIBS
CURLCONFIG
SYSTEM_CURL
CURL_CFLAGS
CURL_LIBS
SYSTEM_BOOST
SYSTEM_ODBC_HEADERS
WITH_MOZILLA
WITH_LDAP
WITH_OPENLDAP
MOZILLAXPCOM_CFLAGS
MOZILLAXPCOM_LIBS
MOZ_NSPR_CFLAGS
MOZ_NSPR_LIBS
NSPR_LIB
MOZ_NSS_CFLAGS
MOZ_NSS_LIBS
NSS_LIB
MOZILLA_VERSION
MOZILLA_TOOLKIT
MOZLIBREQ_CFLAGS
MOZLIBREQ_LIBS
BUILD_MOZAB
SYSTEM_MOZILLA
MOZ_FLAVOUR
MOZ_INC
MOZ_LIB
MOZ_LIB_XPCOM
MOZ_LDAP_CFLAGS
SYSTEM_SANE_HEADER
XMKMF
X_CFLAGS
X_PRE_LIBS
X_LIBS
X_EXTRA_LIBS
XINC
XLIB
SYSTEM_XRENDER_HEADERS
XRENDER_LINK
SYSTEM_NAS
NAS_INCLUDES
ENABLE_NAS
ENABLE_PASF
SYSTEM_PORTAUDIO
SYSTEM_SNDFILE
BUILD_TYPE
DISABLE_NEON
NEON_CFLAGS
NEON_LIBS
SYSTEM_NEON
NEON_VERSION
AGG_CFLAGS
AGG_LIBS
SYSTEM_AGG
MYSPELL_CFLAGS
MYSPELL_LIBS
SYSTEM_MYSPELL
SYSTEM_HUNSPELL
HUNSPELL_CFLAGS
SYSTEM_HYPH
SYSTEM_MYTHES
PSDK_HOME
DIRECTXSDK_HOME
DIRECTXSDK_LIB
NSIS_PATH
EXTRA_DOTNET_FILES
BISON
FLEX
PATCH
GNUPATCH
GNUCP
CYGWIN_PATH
ML_EXE
ASM_HOME
ZIP
UNZIP
ZIP_HOME
WITH_GPC
ENABLE_GTK
ENABLE_KDE
GNOMEVFS_CFLAGS
GNOMEVFS_LIBS
GCONF_CFLAGS
GCONF_LIBS
ENABLE_GNOMEVFS
GTK_CFLAGS
GTK_LIBS
GDKPIXBUF_CFLAGS
GDKPIXBUF_LIBS
CAIRO_CFLAGS
CAIRO_LIBS
ENABLE_CAIRO
SYSTEM_CAIRO
MOC
KDE_CFLAGS
KDE_LIBS
ENABLE_LOCKDOWN
LIBSN_CFLAGS
LIBSN_LIBS
WITH_LIBSN
GOBJECT_CFLAGS
GOBJECT_LIBS
ENABLE_EVOAB2
ENABLE_KAB
WITH_FONTOOO
SYSTEM_MSPACK
WITH_FONTS
SCPDEFS
WITHOUT_PPDS
WITHOUT_AFMS
USE_XINERAMA
XINERAMA_LINK
ANT
ANT_HOME
ANT_LIB
WITH_LANG
WITH_DICT
ENABLE_STATIC_GTK
LOCAL_SOLVER
LIBOBJS
LTLIBOBJS'
ac_subst_files=''
      ac_precious_vars='build_alias
host_alias
target_alias
CC
CFLAGS
LDFLAGS
CPPFLAGS
CPP
CXX
CXXFLAGS
CCC
CXXCPP
XMKMF'


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

# Installation directory options.
# These are left unexpanded so users can "make install exec_prefix=/foo"
# and all the variables that are supposed to be based on exec_prefix
# by default will actually change.
# Use braces instead of parens because sh, perl, etc. also accept them.
# (The list follows the same order as the GNU Coding Standards.)
bindir='${exec_prefix}/bin'
sbindir='${exec_prefix}/sbin'
libexecdir='${exec_prefix}/libexec'
datarootdir='${prefix}/share'
datadir='${datarootdir}'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
includedir='${prefix}/include'
oldincludedir='/usr/include'
docdir='${datarootdir}/doc/${PACKAGE}'
infodir='${datarootdir}/info'
htmldir='${docdir}'
dvidir='${docdir}'
pdfdir='${docdir}'
psdir='${docdir}'
libdir='${exec_prefix}/lib'
localedir='${datarootdir}/locale'
mandir='${datarootdir}/man'

ac_prev=
ac_dashdash=
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

  case $ac_option in
  *=*)	ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
  *)	ac_optarg=yes ;;
  esac

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

  case $ac_dashdash$ac_option in
  --)
    ac_dashdash=yes ;;

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

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

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

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

  -datadir | --datadir | --datadi | --datad)
    ac_prev=datadir ;;
  -datadir=* | --datadir=* | --datadi=* | --datad=*)
    datadir=$ac_optarg ;;

  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
  | --dataroo | --dataro | --datar)
    ac_prev=datarootdir ;;
  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
    datarootdir=$ac_optarg ;;

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

  -docdir | --docdir | --docdi | --doc | --do)
    ac_prev=docdir ;;
  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
    docdir=$ac_optarg ;;

  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
    ac_prev=dvidir ;;
  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
    dvidir=$ac_optarg ;;

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

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

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

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

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

  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
    ac_prev=htmldir ;;
  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
  | --ht=*)
    htmldir=$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 ;;

  -localedir | --localedir | --localedi | --localed | --locale)
    ac_prev=localedir ;;
  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
    localedir=$ac_optarg ;;

  -localstatedir | --localstatedir | --localstatedi | --localstated \
  | --localstate | --localstat | --localsta | --localst | --locals)
    ac_prev=localstatedir ;;
  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
    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 | -n)
    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 ;;

  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
    ac_prev=pdfdir ;;
  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
    pdfdir=$ac_optarg ;;

  -psdir | --psdir | --psdi | --psd | --ps)
    ac_prev=psdir ;;
  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
    psdir=$ac_optarg ;;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  esac
done

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

# Be sure to have absolute directory names.
for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
		datadir sysconfdir sharedstatedir localstatedir includedir \
		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
		libdir localedir mandir
do
  eval ac_val=\$$ac_var
  case $ac_val in
    [\\/$]* | ?:[\\/]* )  continue;;
    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
  esac
  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
   { (exit 1); exit 1; }; }
done

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

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

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

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


ac_pwd=`pwd` && test -n "$ac_pwd" &&
ac_ls_di=`ls -di .` &&
ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
  { echo "$as_me: error: Working directory cannot be determined" >&2
   { (exit 1); exit 1; }; }
test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
  { echo "$as_me: error: pwd does not report name of working directory" >&2
   { (exit 1); exit 1; }; }


# 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 the parent directory.
  ac_confdir=`$as_dirname -- "$0" ||
$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"$0" : 'X\(//\)[^/]' \| \
	 X"$0" : 'X\(//\)$' \| \
	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
echo X"$0" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`
  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
  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
  { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
   { (exit 1); exit 1; }; }
fi
ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
ac_abs_confdir=`(
	cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
   { (exit 1); exit 1; }; }
	pwd)`
# When building in place, set srcdir=.
if test "$ac_abs_confdir" = "$ac_pwd"; then
  srcdir=.
fi
# Remove unnecessary trailing slashes from srcdir.
# Double slashes in file names in object file debugging info
# mess up M-x gdb in Emacs.
case $srcdir in
*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
esac
for ac_var in $ac_precious_vars; do
  eval ac_env_${ac_var}_set=\${${ac_var}+set}
  eval ac_env_${ac_var}_value=\$${ac_var}
  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
  eval ac_cv_env_${ac_var}_value=\$${ac_var}
done

#
# 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 <<_ACEOF
\`configure' configures this package to adapt to many kinds of systems.

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

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

Defaults for the options are specified in brackets.

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

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]
  --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]
  --datarootdir=DIR      read-only arch.-independent data root [PREFIX/share]
  --datadir=DIR          read-only architecture-independent data [DATAROOTDIR]
  --infodir=DIR          info documentation [DATAROOTDIR/info]
  --localedir=DIR        locale-dependent data [DATAROOTDIR/locale]
  --mandir=DIR           man documentation [DATAROOTDIR/man]
  --docdir=DIR           documentation root [DATAROOTDIR/doc/PACKAGE]
  --htmldir=DIR          html documentation [DOCDIR]
  --dvidir=DIR           dvi documentation [DOCDIR]
  --pdfdir=DIR           pdf documentation [DOCDIR]
  --psdir=DIR            ps documentation [DOCDIR]
_ACEOF

  cat <<\_ACEOF

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

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

if test -n "$ac_init_help"; then

  cat <<\_ACEOF

Optional Features:
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  --disable-ldap       Disables the use of LDAP backend via Netscape/Mozilla or
                          OpenLDAP LDAP SDK

  --enable-lockdown       Enables the gconf integration work in OOo

  --enable-libsn          Enables the use of libstartup-notification

  --disable-mozilla       OO.o usually includes a strangely hacked up mozilla
                          binary for your platform, to build without this
                          version, use this option.

  --disable-epm           OO.o includes self-packaging code, that requires
                          epm, however epm is useless for large scale
                          package building.

  --disable-odk           OO.o includes an ODK, office development kit
                          which some packagers may with to build without

  --disable-qadevooo      OO.o includes some qa testsuites which some
                          packagers may wish to build without

  --disable-fontooo       disable FontOOo
                          (useful for distributions using fontconfig for OOo)

  --disable-mathmldtd     disable mathmldtd
                          (useful for distributions that want to avoid packaging it)

  --enable-evolution2     Allows the built-in evolution 2 addressbook connectivity
			  build to be enabled.

  --disable-cups          disable cups support in the psprint project

  --disable-fontconfig    disable support for the fontconfig library

  --disable-directx       Remove DirectX implementation for the new XCanvas
                          interface. The DirectX support requires more stuff installed on
                          Windows to compile.  (DirectX SDK, GDI+ libs)

  --disable-atlmfc        Disable the use of ATL/MFC for windows build.

  --enable-symbols        Include debugging symbols in output.
                          Implicitly activated by --enable-crashdump (see below)
                          WARNING - a complete build needs 8 Gb of space and
                          takes much longer. (enables -g compiler flag)

                          --enable-symbols=SMALL sets the gcc -g1 setting
                          which is smaller.

  --enable-debug:         Include debugging symbols from --enable-symbols
                          plus extra debugging code.  Extra large build!
                          (enables -g compiler flag and dmake debug=true)

  --enable-dbgutil:       Include additional debugging utilities, such as
                          assertions, object counting, etc. Larger build.
                          Independent from --enable-debug

  --enable-xsltproc:      Use xsltproc at buildtime, even when java is available

  --enable-crashdump[=yes|TRUE|STATIC|no]
                          Enable (disable) the crashdump feature code. [default=no]
                          When enabled, this option implicitly
                          activates --enable-symbols (see above).

  --enable-cl-standard    For Microsoft C/C++ compiler users, use non-optimizing
                          standard compiler. ( This just disavles optimization
                          options and therefore removes a lot of warnings when
                          using the cheaper standard compiler. )

  --enable-vctk           Tell configure to check for the MS VC Toolkit 2003.
                          ( This is experimental! )

  --disable-gtk           Determines whether to use Gtk+ vclplug on platforms
                          where Gtk+ is available.

  --enable-cairo         Determines whether to use Cairo canvas backend on platforms
                          where Cairo is available.

  --disable-gnome-vfs     Determines whether to use the Gnome Virtual Filing
                          System on platforms where that VFS is available

  --enable-static-gtk:    Modules that are linked against gtk libraries use
                          the static libraries instead of the dynamic ones.
                          (enables -Bstatic linker flag for gtk libraries)

  --enable-build-mozilla  Use this option if you want to build the mozilla
                          components from the mozilla source code.

  --enable-kde            Determines whether to use Qt/KDE vclplug on platforms
                          where Qt and KDE are available.

  --disable-kdeab         Disable the KDE address book support

  --disable-binfilter:    Disable legacy binary file formats filters

  --disable-rpath:        Disable the use of relative paths in shared libraries

  --disable-pasf          disable support for sound using portaudio/sndfile

  --disable-pam           Disable pam support.

  --enable-pam-link       link with libpam instead of dynamically open it

  --disable-crypt-link    disable linking with libcrypt instead of dynamically open it
                          (needed for ancient GNU/Linux distributions without crypt()/libcrypt)

  --enable-xrender-link   link with libXrender instead of dynamically open it

  --disable-neon          Disable neon and the compilation of webdav binding

  --enable-gcjaot        Build with[out] using Ahead of Time java compilation support.
                          If you have gcj installed then --enable-gcjaot will enable gcj ahead of time
                          support for a (hopefully) faster build. This is an additional step taken
                          to compile to native binaries the java helper programs used during
                          buildtime which have already been built to bytecode from the compiler
                          used in --with-java. --enable-gcjaot is only known to work with bytecode
                          created with gcj or ecj

  --enable-check-only     Use this option option if you just want to check your
                          environment.  This option stops the generation of an
                          ????env.set

                          Usage: --enable-check-only=yes

  --enable-sgistl         for IRIX users, use this option option to build
                          OpenOffice.org using SGI's STL.

                          Usage: --enable-sgistl=yes


Optional Packages:
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  --with-gnu-patch        Specify location of GNU patch on Solaris or FreeBSD

  --with-gnu-cp           Specify location of GNU cp on Solaris or FreeBSD

  --without-gpc           Use the internal polygon clipping code instead of
                          the external GPC polygon clipping library.

  --with-openldap       Enables the use of the OpenLDAP LDAP SDK instead
                          of the Netscape/Mozilla one

  --with-firefox          Use Firefox instead of Mozilla Suite for building.
                          Only honoured with --with-system-mozilla

  --with-xulrunner        Use XULRunner instead of Mozilla Suite for building.
                          Only honoured with --with-system-mozilla

  --without-fonts         Removes Bitstream Vera fonts from
                          openoffice.org installation set, for people building
                          for specific distributions where the fonts are known
                          to be already available

  --without-ppds          Removes Postscript Printer definition files from
                          openoffice.org installation set, for people building
                          for specific distributions where PPDs are known to be
                          already available (every recent distro with CUPS backend)

  --without-afms          Removes bitmap font files from openoffice.org
                          installation set, for people building for specific
                          distributions where AFM files or TrueType Fonts
                          are known to be available.

  --with-package-format   specify package format(s) for OOo installsets.
                          Default is "normal" one of the OS/Distribution.

                          Usage: --with-package-format="foo bar"

  --with-system-stdlibs   use libstdc++/libgcc_s already on system

  --with-system-mspack    use libmspack already installed on system

  --with-mozilla-version  Choose which version of mozilla to use while building
                          mozilla. Default: 1.7.5.
                          Note that not all versions are supported.

  --with-mozilla-toolkit  Choose which GUI toolkit to use while building mozilla
                          components. Default: gtk2

  --without-myspell-dicts Removes myspell dictionaries from openoffice.org
                          installation set, for people building for specific
                          distributions where the myspell dictionaries are
                          installed from other sources

  --without-nas           Removes nas support

  --with-system-libs      Use libs already on system -- enables all
                          --with-system-* flags except mozilla, python and
                          odbc/sane/xrender-header(s)

  --with-system-zlib      Use zlib already on system

  --with-system-jpeg      Use jpeg already on system

  --with-system-expat     Use expat already on system

  --with-system-freetype  Use freetype already on system

  --with-system-libwpd    Use libwpd already on system

  --with-system-libxml    Use libxml already on system

  --with-system-python    Use python already on system

  --with-system-db        Use berkeley db already on system

  --with-db-jar=JARFILE   Specify path to jarfile manually
  --with-system-hsqldb    Use hsqldb already on system

  --with-hsqldb-jar=JARFILE   Specify path to jarfile manually
  --with-system-beanshell Use beanshell already on system

  --with-beanshell-jar=JARFILE   Specify path to jarfile manually
  --with-system-xml-apis  Use xml-apis already on system

  --with-xml-apis-jar=JARFILE   Specify path to jarfile manually
  --with-system-xerces    Use xerces already on system

  --with-xerces-jar=JARFILE   Specify path to jarfile manually
  --with-system-xalan     Use xalan already on system

  --with-xalan-jar=JARFILE   Specify path to jarfile manually
  --with-system-sablot    Use sablot already on system

  --with-system-odbc-headers     Use the odbc headers already on system

  --with-system-sane-header      Use sane.h already on system

  --with-system-xrender-headers  Use XRender headers already on system

  --with-system-curl      Use curl already on system

  --with-system-boost     Use boost already on system

  --with-system-nas       Use nas already on system

  --with-system-sndfile   Use sndfile already on system

  --with-system-portaudio Use portaudio already on system

  --with-system-neon      Use neon already on system

  --with-system-agg       Use AGG already on system

  --with-system-myspell   Use myspell already on system

  --with-system-hunspell   Use libhunspell already on system

  --with-system-mythes    Use mythes already on system

  --with-system-altlinuxhyph    Use ALTLinuxhyph already on system

  --with-system-mozilla   Use mozilla already on system. Note that some
                          components cannot be built against a contemporary
                          mozilla

  --with-stlport4         The location that STLport4 is installed in. The STL
                          header files are assumed to be in
                          stlport4-home/stlport and the STLPort4 library in
                          stlport4-home/lib.

                          Usage: --with-stlport4=<absolute path to stlport4 home>

                          Warning!!, --without-stlport4 is possible with
                          gcc >= 3.3.3, but will break ABI compatability

  --with-jdk-home         if you have installed JDK 1.3, on your system,
                          please supply the path here.
                          Note that this is not the location of the Java binary
                          but the location of the entire distribution.

                          Usage: --with-jdk-home=<absolute path to JDK 1.3 home>

  --with-gxx-include-path if you want to override the autodetected g++ include
                          path.

                          Usage: --with-gxx-include-path=<absolute path to g++ include dir>

  --with-java             Build with[out] Java support.  If you use
                          --without-java/--with-java=no then the build will have
                          no support for Java components, applets, accessibility
                          or XML filters. Use --with-java=gij to enable gij/gcj
                          as java/javac replacements

  --with-ant-home         If you have installed Jakarta Ant on your system,
                          please supply the path here.
                          Note that this is not the location of the Ant binary
                          but the location of the entire distribution.

                          Usage: --with-ant-home=<absolute path to Ant home>

  --with-perl-home        If you have installed the Perl 5 Distribution, on your
                          system, please supply the path here.
                          Note that this is not the location of the Perl binary
                          but the location of the entire distribution.

                          Usage: --with-perl-home=<absolute path to Perl 5 home>

  --with-cl-home          For Windows NT users, please supply the path
                          for the Microsoft C/C++ compiler.
                          Note that this is not the location of the compiler
                          binary but the location of the entire distribution.

                          Usage: --with-cl-home=<absolute path to Microsoft C/C++ compiler home>

  --with-mspdb-path       For Microsoft C/C++ compiler users, please supply the
                          path pointing to the mspdb71.dll (.NET 2003).

                          Usage: --with-mspdb-path=<absolute path to mspdb71.dll>

  --with-midl-path        For Microsoft C/C++ .NET compiler users, please supply
                          the path pointing to the midl.exe.

                          Usage: --with-midl-path=<absolute path to midl.exe>

  --with-csc-path         For Microsoft C/C++ .NET compiler users, please supply
                          the path pointing to the csc.exe.

                          Usage: --with-csc-path=<absolute path to csc.exe>

  --with-nmake-path       For MS Visual Toolkit compiler users, please supply
                          the path pointing to the nmake.exe. The Platform SDK
                          provides one in the Win64 directory, usually something
                          like: "/cygdrive/c/Programme/Microsoft SDK/Bin/Win64"

                          Usage: --with-nmake-path=<absolute path to nmake.exe>

  --with-nsis-path        For Windows users, please supply the path to the
                          "Nullsoft Scriptable Install System" (NSIS). If NSIS is
                          found in the path or this option is supplied a self
                          contained executable installer for OpenOffice.org will
                          be created.

                          Usage: --with-nsis-path=<absolute path to nsis.exe>

  --with-frame-home       For Microsoft C/C++ .NET compiler users, please supply
                          the path pointing to lib/mscoree.lib, usually
                          something like:
                          "/cygdrive/c/Program Files/Microsoft Visual Studio .NET/FrameworkSDK"

                          MS Visual Toolkit compiler users, please supply the
                          path pointing to lib/msvcrt.lib, usually something
                          like:
                          "/cygdrive/c/Program Files/Microsoft Visual Studio .NET 2003/Vc7"

                          Usage: --with-frame-home=<absolute path to Framework SDK [home]>

  --with-psdk-home        For Windows users, please supply the path to the
                          Microsoft Platform SDK.

                          Usage: --with-psdk-home=<absolute path to Microsoft Platform SDK>

  --with-directx-home     For Windows users, please supply the path to the
                          Microsoft DirectX SDK.

                          Usage: --with-directx-home=<absolute path to Microsoft DirectX SDK>

  --with-extra-dotnet-files  For MS Visual Toolkit compiler, please supply the
                          path to additional library/include files that are
                          otherwise missing.
                          (This is a cludge until MS Visual Toolkit is usable
                          without extra files.)

                          Usage: --with-extra-dotnet-files=<absolute path to extra files>

  --with-local-solenv     If you have solenv in a location other than ../solenv,
                          please supply the path here.

                          Usage: --with-local-solenv=<absolute path to solenv>

  --with-local-solver     if you have solver in a location other than ../solver,
                          please supply the path here.

                          Usage: --with-local-solver=<absolute path to solver>

  --with-lang             Use this option to build OpenOffice.org with
                          additional language support. English (US) is always
                          included by default. Separate multiple languages with
                          space. For all languages, use --with-lang=ALL.

                          Usage: --with-lang="es sw tu cs sk"

  --with-dict             Use this option to build OpenOffice.org with
                          dictionary support. ALL dictionaries are always
                          included by default unless overridden with
                          this option. Separate multiple dictionaries with
                          commas. For all dictionaries, use --with-dict=ALL.

                          Usage: --with-dict=ENGB,ENUS,ITIT

  --with-asm-home         For Windows users, please supply the path for the
                          ml.exe assembler.

                          Usage: --with-asm-home=<path to ml.exe directory>

  --with-os-version       For FreeBSD users, use this option option to override
                          the detected OSVERSION.

                          Usage: --with-os-version=<OSVERSION>

  --with-unzip-home       Deprecated: use --with-zip-home instead
  --with-zip-home         If you use a non standard zip, for example windows
                          please supply the path for zip

                          Usage: --with-zip-home=<path to zip executable>

  --with-mingwin          For Windows users, use the mingwin32 compiler within
                          cygwin environment, this implies --with-use-shell=tcsh

                          Usage: --with-mingwin=yes

  --with-use-shell        Use this option to override the default shell to be
                          used for the build environment.
                          Supported options:
                            tcsh (default)
                            bash
                            4nt (windows only)

                          Usage: --with-use-shell=tcsh|bash|4nt

  --with-build-version    Allows the builder to add a custom version tag
                          that will appear in the Help/About box for QA
                          purposes.

                          Usage: --with-build-version="Built by Jim"

  --with-alloc       Define which allocator to build with
			  choices are oo, system, tcmalloc

  --with-x                use the X Window System

Some influential environment variables:
  CC          C compiler command
  CFLAGS      C compiler flags
  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
              nonstandard directory <lib dir>
  CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
              you have headers in a nonstandard directory <include dir>
  CPP         C preprocessor
  CXX         C++ compiler command
  CXXFLAGS    C++ compiler flags
  CXXCPP      C++ preprocessor
  XMKMF       Path to xmkmf, Makefile generator for X Window System

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

_ACEOF
ac_status=$?
fi

if test "$ac_init_help" = "recursive"; then
  # If there are subdirs, report their specific --help.
  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
    test -d "$ac_dir" || continue
    ac_builddir=.

case "$ac_dir" in
.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
*)
  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
  # A ".." for each directory in $ac_dir_suffix.
  ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
  case $ac_top_builddir_sub in
  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
  esac ;;
esac
ac_abs_top_builddir=$ac_pwd
ac_abs_builddir=$ac_pwd$ac_dir_suffix
# for backward compatibility:
ac_top_builddir=$ac_top_build_prefix

case $srcdir in
  .)  # We are building in place.
    ac_srcdir=.
    ac_top_srcdir=$ac_top_builddir_sub
    ac_abs_top_srcdir=$ac_pwd ;;
  [\\/]* | ?:[\\/]* )  # Absolute name.
    ac_srcdir=$srcdir$ac_dir_suffix;
    ac_top_srcdir=$srcdir
    ac_abs_top_srcdir=$srcdir ;;
  *) # Relative name.
    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
    ac_top_srcdir=$ac_top_build_prefix$srcdir
    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
esac
ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix

    cd "$ac_dir" || { ac_status=$?; continue; }
    # Check for guested configure.
    if test -f "$ac_srcdir/configure.gnu"; then
      echo &&
      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
    elif test -f "$ac_srcdir/configure"; then
      echo &&
      $SHELL "$ac_srcdir/configure" --help=recursive
    else
      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
    fi || ac_status=$?
    cd "$ac_pwd" || { ac_status=$?; break; }
  done
fi

test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
  cat <<\_ACEOF
configure
generated by GNU Autoconf 2.60

Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
  exit
fi
cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

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

  $ $0 $@

_ACEOF
exec 5>>config.log
{
cat <<_ASUNAME
## --------- ##
## Platform. ##
## --------- ##

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

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

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

_ASUNAME

as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  echo "PATH: $as_dir"
done
IFS=$as_save_IFS

} >&5

cat >&5 <<_ACEOF


## ----------- ##
## Core tests. ##
## ----------- ##

_ACEOF


# Keep a trace of the command line.
# Strip out --no-create and --no-recursion so they do not pile up.
# Strip out --silent because we don't want to record it for future runs.
# Also quote any args containing shell meta-characters.
# Make two passes to allow for proper duplicate-argument suppression.
ac_configure_args=
ac_configure_args0=
ac_configure_args1=
ac_must_keep_next=false
for ac_pass in 1 2
do
  for ac_arg
  do
    case $ac_arg in
    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
    | -silent | --silent | --silen | --sile | --sil)
      continue ;;
    *\'*)
      ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
    esac
    case $ac_pass in
    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
    2)
      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
      if test $ac_must_keep_next = true; then
	ac_must_keep_next=false # Got value, back to normal.
      else
	case $ac_arg in
	  *=* | --config-cache | -C | -disable-* | --disable-* \
	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
	  | -with-* | --with-* | -without-* | --without-* | --x)
	    case "$ac_configure_args0 " in
	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
	    esac
	    ;;
	  -* ) ac_must_keep_next=true ;;
	esac
      fi
      ac_configure_args="$ac_configure_args '$ac_arg'"
      ;;
    esac
  done
done
$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }

# When interrupted or exit'd, cleanup temporary files, and complete
# config.log.  We remove comments because anyway the quotes in there
# would cause problems or look ugly.
# WARNING: Use '\'' to represent an apostrophe within the trap.
# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
trap 'exit_status=$?
  # Save into config.log some information that might help in debugging.
  {
    echo

    cat <<\_ASBOX
## ---------------- ##
## Cache variables. ##
## ---------------- ##
_ASBOX
    echo
    # The following way of writing the cache mishandles newlines in values,
(
  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
    eval ac_val=\$$ac_var
    case $ac_val in #(
    *${as_nl}*)
      case $ac_var in #(
      *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
      esac
      case $ac_var in #(
      _ | IFS | as_nl) ;; #(
      *) $as_unset $ac_var ;;
      esac ;;
    esac
  done
  (set) 2>&1 |
    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
    *${as_nl}ac_space=\ *)
      sed -n \
	"s/'\''/'\''\\\\'\'''\''/g;
	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
      ;; #(
    *)
      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
      ;;
    esac |
    sort
)
    echo

    cat <<\_ASBOX
## ----------------- ##
## Output variables. ##
## ----------------- ##
_ASBOX
    echo
    for ac_var in $ac_subst_vars
    do
      eval ac_val=\$$ac_var
      case $ac_val in
      *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
      esac
      echo "$ac_var='\''$ac_val'\''"
    done | sort
    echo

    if test -n "$ac_subst_files"; then
      cat <<\_ASBOX
## ------------------- ##
## File substitutions. ##
## ------------------- ##
_ASBOX
      echo
      for ac_var in $ac_subst_files
      do
	eval ac_val=\$$ac_var
	case $ac_val in
	*\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
	esac
	echo "$ac_var='\''$ac_val'\''"
      done | sort
      echo
    fi

    if test -s confdefs.h; then
      cat <<\_ASBOX
## ----------- ##
## confdefs.h. ##
## ----------- ##
_ASBOX
      echo
      cat confdefs.h
      echo
    fi
    test "$ac_signal" != 0 &&
      echo "$as_me: caught signal $ac_signal"
    echo "$as_me: exit $exit_status"
  } >&5
  rm -f core *.core core.conftest.* &&
    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
    exit $exit_status
' 0
for ac_signal in 1 2 13 15; do
  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
done
ac_signal=0

# confdefs.h avoids OS command line length limits that DEFS can exceed.
rm -f -r conftest* confdefs.h

# Predefined preprocessor variables.

cat >>confdefs.h <<_ACEOF
#define PACKAGE_NAME "$PACKAGE_NAME"
_ACEOF


cat >>confdefs.h <<_ACEOF
#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
_ACEOF


cat >>confdefs.h <<_ACEOF
#define PACKAGE_VERSION "$PACKAGE_VERSION"
_ACEOF


cat >>confdefs.h <<_ACEOF
#define PACKAGE_STRING "$PACKAGE_STRING"
_ACEOF


cat >>confdefs.h <<_ACEOF
#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
_ACEOF


# Let the site file select an alternate cache file if it wants to.
# Prefer explicitly selected file to automatically selected ones.
if test -n "$CONFIG_SITE"; then
  set x "$CONFIG_SITE"
elif test "x$prefix" != xNONE; then
  set x "$prefix/share/config.site" "$prefix/etc/config.site"
else
  set x "$ac_default_prefix/share/config.site" \
	"$ac_default_prefix/etc/config.site"
fi
shift
for ac_site_file
do
  if test -r "$ac_site_file"; then
    { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
echo "$as_me: loading site script $ac_site_file" >&6;}
    sed 's/^/| /' "$ac_site_file" >&5
    . "$ac_site_file"
  fi
done

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

# Check that the precious variables saved in the cache have kept the same
# value.
ac_cache_corrupted=false
for ac_var in $ac_precious_vars; do
  eval ac_old_set=\$ac_cv_env_${ac_var}_set
  eval ac_new_set=\$ac_env_${ac_var}_set
  eval ac_old_val=\$ac_cv_env_${ac_var}_value
  eval ac_new_val=\$ac_env_${ac_var}_value
  case $ac_old_set,$ac_new_set in
    set,)
      { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
      ac_cache_corrupted=: ;;
    ,set)
      { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
      ac_cache_corrupted=: ;;
    ,);;
    *)
      if test "x$ac_old_val" != "x$ac_new_val"; then
	{ echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
	{ echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
echo "$as_me:   former value:  $ac_old_val" >&2;}
	{ echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
echo "$as_me:   current value: $ac_new_val" >&2;}
	ac_cache_corrupted=:
      fi;;
  esac
  # Pass precious variables to config.status.
  if test "$ac_new_set" = set; then
    case $ac_new_val in
    *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
    *) ac_arg=$ac_var=$ac_new_val ;;
    esac
    case " $ac_configure_args " in
      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
    esac
  fi
done
if $ac_cache_corrupted; then
  { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
echo "$as_me: error: changes in the environment can compromise the build" >&2;}
  { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
   { (exit 1); exit 1; }; }
fi

















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


echo "$@" >config.parms

# Check whether --with-gnu-patch was given.
if test "${with_gnu_patch+set}" = set; then
  withval=$with_gnu_patch;
fi


# Check whether --with-gnu-cp was given.
if test "${with_gnu_cp+set}" = set; then
  withval=$with_gnu_cp;
fi


# Check whether --with-gpc was given.
if test "${with_gpc+set}" = set; then
  withval=$with_gpc;
else
  if test ! -e ../external/gpc/gpc.c && test ! -e ../external/gpc/gpc.h; then without_gpc=yes; fi
fi

# Check whether --enable-ldap was given.
if test "${enable_ldap+set}" = set; then
  enableval=$enable_ldap;
fi


# Check whether --with-openldap was given.
if test "${with_openldap+set}" = set; then
  withval=$with_openldap;
fi

# Check whether --enable-lockdown was given.
if test "${enable_lockdown+set}" = set; then
  enableval=$enable_lockdown;
fi

# Check whether --enable-libsn was given.
if test "${enable_libsn+set}" = set; then
  enableval=$enable_libsn;
fi

# Check whether --enable-mozilla was given.
if test "${enable_mozilla+set}" = set; then
  enableval=$enable_mozilla;
else
  enable_mozilla="yes"
fi


# Check whether --with-firefox was given.
if test "${with_firefox+set}" = set; then
  withval=$with_firefox;
fi


# Check whether --with-xulrunner was given.
if test "${with_xulrunner+set}" = set; then
  withval=$with_xulrunner;
fi


# Check whether --with-fonts was given.
if test "${with_fonts+set}" = set; then
  withval=$with_fonts;
fi


# Check whether --with-ppds was given.
if test "${with_ppds+set}" = set; then
  withval=$with_ppds;
fi


# Check whether --with-afms was given.
if test "${with_afms+set}" = set; then
  withval=$with_afms;
fi

# Check whether --enable-epm was given.
if test "${enable_epm+set}" = set; then
  enableval=$enable_epm;
else
  enable_epm="yes"
fi


# Check whether --with-package-format was given.
if test "${with_package_format+set}" = set; then
  withval=$with_package_format;
fi

# Check whether --enable-odk was given.
if test "${enable_odk+set}" = set; then
  enableval=$enable_odk;
else
  enable_odk="yes"
fi

# Check whether --enable-qadevooo was given.
if test "${enable_qadevooo+set}" = set; then
  enableval=$enable_qadevooo;
else
  enable_qadevooo="yes"
fi

# Check whether --enable-fontooo was given.
if test "${enable_fontooo+set}" = set; then
  enableval=$enable_fontooo;
else
  enable_fontooo="yes"
fi

# Check whether --enable-mathmldtd was given.
if test "${enable_mathmldtd+set}" = set; then
  enableval=$enable_mathmldtd;
else
  enable_mathmldtd="yes"
fi

# Check whether --enable-evolution2 was given.
if test "${enable_evolution2+set}" = set; then
  enableval=$enable_evolution2;
fi


# Check whether --with-system-stdlibs was given.
if test "${with_system_stdlibs+set}" = set; then
  withval=$with_system_stdlibs;
else
  checkforprelink=yes
fi


# Check whether --with-system-mspack was given.
if test "${with_system_mspack+set}" = set; then
  withval=$with_system_mspack;
fi

# Check whether --enable-cups was given.
if test "${enable_cups+set}" = set; then
  enableval=$enable_cups;
else
  enable_cups=yes
fi

# Check whether --enable-fontconfig was given.
if test "${enable_fontconfig+set}" = set; then
  enableval=$enable_fontconfig;
else
  enable_fontconfig=yes
fi

# Check whether --enable-directx was given.
if test "${enable_directx+set}" = set; then
  enableval=$enable_directx;
else
  enable_directx=yes
fi

# Check whether --enable-atlmfc was given.
if test "${enable_atlmfc+set}" = set; then
  enableval=$enable_atlmfc;
fi


# Check whether --enable-symbols was given.
if test "${enable_symbols+set}" = set; then
  enableval=$enable_symbols;
fi

# Check whether --enable-debug was given.
if test "${enable_debug+set}" = set; then
  enableval=$enable_debug;
fi

# Check whether --enable-dbgutil was given.
if test "${enable_dbgutil+set}" = set; then
  enableval=$enable_dbgutil;
fi

# Check whether --enable-xsltproc was given.
if test "${enable_xsltproc+set}" = set; then
  enableval=$enable_xsltproc;
fi

# Check whether --enable-crashdump was given.
if test "${enable_crashdump+set}" = set; then
  enableval=$enable_crashdump;
else
  enable_crashdump=no
fi

# Check whether --enable-cl-standard was given.
if test "${enable_cl_standard+set}" = set; then
  enableval=$enable_cl_standard;
fi

# Check whether --enable-vctk was given.
if test "${enable_vctk+set}" = set; then
  enableval=$enable_vctk;
fi

# Check whether --enable-gtk was given.
if test "${enable_gtk+set}" = set; then
  enableval=$enable_gtk;
else
  enable_gtk=yes
fi

# Check whether --enable-cairo was given.
if test "${enable_cairo+set}" = set; then
  enableval=$enable_cairo;
else
  enable_cairo=no
fi

# Check whether --enable-gnome-vfs was given.
if test "${enable_gnome_vfs+set}" = set; then
  enableval=$enable_gnome_vfs;
else
  enable_gnome_vfs=yes
fi

# Check whether --enable-static-gtk was given.
if test "${enable_static_gtk+set}" = set; then
  enableval=$enable_static_gtk;
fi

# Check whether --enable-build-mozilla was given.
if test "${enable_build_mozilla+set}" = set; then
  enableval=$enable_build_mozilla;
fi


# Check whether --with-mozilla-version was given.
if test "${with_mozilla_version+set}" = set; then
  withval=$with_mozilla_version;
fi


# Check whether --with-mozilla-toolkit was given.
if test "${with_mozilla_toolkit+set}" = set; then
  withval=$with_mozilla_toolkit;
fi

# Check whether --enable-kde was given.
if test "${enable_kde+set}" = set; then
  enableval=$enable_kde;
fi

# Check whether --enable-kdeab was given.
if test "${enable_kdeab+set}" = set; then
  enableval=$enable_kdeab;
else
  if test "$enable_kde" = "yes"; then enable_kdeab=yes; fi
fi

# Check whether --enable-binfilter was given.
if test "${enable_binfilter+set}" = set; then
  enableval=$enable_binfilter;
else
  if ! test -d ../binfilter; then enable_binfilter=no; fi
fi

# Check whether --enable-rpath was given.
if test "${enable_rpath+set}" = set; then
  enableval=$enable_rpath;
fi

# Check whether --enable-pasf was given.
if test "${enable_pasf+set}" = set; then
  enableval=$enable_pasf;
else
  enable_pasf=yes
fi

# Check whether --enable-pam was given.
if test "${enable_pam+set}" = set; then
  enableval=$enable_pam;
fi

# Check whether --enable-pam-link was given.
if test "${enable_pam_link+set}" = set; then
  enableval=$enable_pam_link;
fi

# Check whether --enable-crypt-link was given.
if test "${enable_crypt_link+set}" = set; then
  enableval=$enable_crypt_link;
else
  enable_crypt_link=yes
fi

# Check whether --enable-xrender-link was given.
if test "${enable_xrender_link+set}" = set; then
  enableval=$enable_xrender_link;
fi


# Check whether --with-myspell-dicts was given.
if test "${with_myspell_dicts+set}" = set; then
  withval=$with_myspell_dicts;
fi


# Check whether --with-nas was given.
if test "${with_nas+set}" = set; then
  withval=$with_nas;
fi


# Check whether --with-system-libs was given.
if test "${with_system_libs+set}" = set; then
  withval=$with_system_libs;
fi


# Check whether --with-system-zlib was given.
if test "${with_system_zlib+set}" = set; then
  withval=$with_system_zlib;
fi


# Check whether --with-system-jpeg was given.
if test "${with_system_jpeg+set}" = set; then
  withval=$with_system_jpeg;
fi


# Check whether --with-system-expat was given.
if test "${with_system_expat+set}" = set; then
  withval=$with_system_expat;
fi


# Check whether --with-system-freetype was given.
if test "${with_system_freetype+set}" = set; then
  withval=$with_system_freetype;
fi


# Check whether --with-system-libwpd was given.
if test "${with_system_libwpd+set}" = set; then
  withval=$with_system_libwpd;
fi


# Check whether --with-system-libxml was given.
if test "${with_system_libxml+set}" = set; then
  withval=$with_system_libxml;
fi


# Check whether --with-system-python was given.
if test "${with_system_python+set}" = set; then
  withval=$with_system_python;
fi

#AC_ARG_WITH(system-icu,
#[  --with-system-icu       Use icu already on system
#],,)

# Check whether --with-system-db was given.
if test "${with_system_db+set}" = set; then
  withval=$with_system_db;
fi


# Check whether --with-db-jar was given.
if test "${with_db_jar+set}" = set; then
  withval=$with_db_jar;  DB_JAR="$withval"

fi


# Check whether --with-system-hsqldb was given.
if test "${with_system_hsqldb+set}" = set; then
  withval=$with_system_hsqldb;
fi


# Check whether --with-hsqldb-jar was given.
if test "${with_hsqldb_jar+set}" = set; then
  withval=$with_hsqldb_jar;  HSQLDB_JAR="$withval"

fi


# Check whether --with-system-beanshell was given.
if test "${with_system_beanshell+set}" = set; then
  withval=$with_system_beanshell;
fi


# Check whether --with-beanshell-jar was given.
if test "${with_beanshell_jar+set}" = set; then
  withval=$with_beanshell_jar;  BSH_JAR="$withval"

fi


# Check whether --with-system-xml-apis was given.
if test "${with_system_xml_apis+set}" = set; then
  withval=$with_system_xml_apis;
fi


# Check whether --with-xml-apis-jar was given.
if test "${with_xml_apis_jar+set}" = set; then
  withval=$with_xml_apis_jar;  XML_APIS_JAR="$withval"

fi


# Check whether --with-system-xerces was given.
if test "${with_system_xerces+set}" = set; then
  withval=$with_system_xerces;
fi


# Check whether --with-xerces-jar was given.
if test "${with_xerces_jar+set}" = set; then
  withval=$with_xerces_jar;  XERCES_JAR="$withval"

fi


# Check whether --with-system-xalan was given.
if test "${with_system_xalan+set}" = set; then
  withval=$with_system_xalan;
fi


# Check whether --with-xalan-jar was given.
if test "${with_xalan_jar+set}" = set; then
  withval=$with_xalan_jar;  XALAN_JAR="$withval"

fi


# Check whether --with-system-sablot was given.
if test "${with_system_sablot+set}" = set; then
  withval=$with_system_sablot;
fi


# Check whether --with-system-odbc was given.
if test "${with_system_odbc+set}" = set; then
  withval=$with_system_odbc;
fi


# Check whether --with-system-sane was given.
if test "${with_system_sane+set}" = set; then
  withval=$with_system_sane;
fi


# Check whether --with-system-xrender was given.
if test "${with_system_xrender+set}" = set; then
  withval=$with_system_xrender;
fi


# Check whether --with-system-curl was given.
if test "${with_system_curl+set}" = set; then
  withval=$with_system_curl;
fi


# Check whether --with-system-boost was given.
if test "${with_system_boost+set}" = set; then
  withval=$with_system_boost;
fi


# Check whether --with-system-nas was given.
if test "${with_system_nas+set}" = set; then
  withval=$with_system_nas;
fi


# Check whether --with-system-sndfile was given.
if test "${with_system_sndfile+set}" = set; then
  withval=$with_system_sndfile;
fi


# Check whether --with-system-portaudio was given.
if test "${with_system_portaudio+set}" = set; then
  withval=$with_system_portaudio;
fi

# Check whether --enable-neon was given.
if test "${enable_neon+set}" = set; then
  enableval=$enable_neon;
fi


# Check whether --with-system-neon was given.
if test "${with_system_neon+set}" = set; then
  withval=$with_system_neon;
fi


# Check whether --with-system-agg was given.
if test "${with_system_agg+set}" = set; then
  withval=$with_system_agg;
fi


# Check whether --with-system-myspell was given.
if test "${with_system_myspell+set}" = set; then
  withval=$with_system_myspell;
fi


# Check whether --with-system-hunspell was given.
if test "${with_system_hunspell+set}" = set; then
  withval=$with_system_hunspell;
fi


# Check whether --with-system-mythes was given.
if test "${with_system_mythes+set}" = set; then
  withval=$with_system_mythes;
fi


# Check whether --with-system-altlinuxhyph was given.
if test "${with_system_altlinuxhyph+set}" = set; then
  withval=$with_system_altlinuxhyph;
fi


# Check whether --with-system-mozilla was given.
if test "${with_system_mozilla+set}" = set; then
  withval=$with_system_mozilla;
fi


# Check whether --with-stlport4 was given.
if test "${with_stlport4+set}" = set; then
  withval=$with_stlport4; WITH_STLPORT=$withval
else
  WITH_STLPORT=yes
fi


# Check whether --with-jdk-home was given.
if test "${with_jdk_home+set}" = set; then
  withval=$with_jdk_home;
fi


# Check whether --with-gxx_include_path was given.
if test "${with_gxx_include_path+set}" = set; then
  withval=$with_gxx_include_path;
fi


# Check whether --with-java was given.
if test "${with_java+set}" = set; then
  withval=$with_java; if test "$withval" = "yes"; then WITH_JAVA=java; else WITH_JAVA=$withval; fi
else
  WITH_JAVA=java
fi

# Check whether --enable-gcjaot was given.
if test "${enable_gcjaot+set}" = set; then
  enableval=$enable_gcjaot;
fi


# Check whether --with-ant-home was given.
if test "${with_ant_home+set}" = set; then
  withval=$with_ant_home;
fi


# Check whether --with-perl-home was given.
if test "${with_perl_home+set}" = set; then
  withval=$with_perl_home;
fi


# Check whether --with-cl-home was given.
if test "${with_cl_home+set}" = set; then
  withval=$with_cl_home;
fi


# Check whether --with-mspdb-path was given.
if test "${with_mspdb_path+set}" = set; then
  withval=$with_mspdb_path;
fi


# Check whether --with-midl-path was given.
if test "${with_midl_path+set}" = set; then
  withval=$with_midl_path;
fi


# Check whether --with-csc-path was given.
if test "${with_csc_path+set}" = set; then
  withval=$with_csc_path;
fi


# Check whether --with-nmake-path was given.
if test "${with_nmake_path+set}" = set; then
  withval=$with_nmake_path;
fi


# Check whether --with-nsis-path was given.
if test "${with_nsis_path+set}" = set; then
  withval=$with_nsis_path;
fi


# Check whether --with-frame-home was given.
if test "${with_frame_home+set}" = set; then
  withval=$with_frame_home;
fi


# Check whether --with-psdk-home was given.
if test "${with_psdk_home+set}" = set; then
  withval=$with_psdk_home;
fi


# Check whether --with-directx-home was given.
if test "${with_directx_home+set}" = set; then
  withval=$with_directx_home;
fi


# Check whether --with-extra-dotnet-files was given.
if test "${with_extra_dotnet_files+set}" = set; then
  withval=$with_extra_dotnet_files;
fi


# Check whether --with-local-solenv was given.
if test "${with_local_solenv+set}" = set; then
  withval=$with_local_solenv;
fi


# Check whether --with-local-solver was given.
if test "${with_local_solver+set}" = set; then
  withval=$with_local_solver;
fi

# Check whether --enable-check-only was given.
if test "${enable_check_only+set}" = set; then
  enableval=$enable_check_only;
fi


# Check whether --with-lang was given.
if test "${with_lang+set}" = set; then
  withval=$with_lang;
fi


# Check whether --with-dict was given.
if test "${with_dict+set}" = set; then
  withval=$with_dict;
fi


# Check whether --with-asm-home was given.
if test "${with_asm_home+set}" = set; then
  withval=$with_asm_home;
fi


# Check whether --with-os-version was given.
if test "${with_os_version+set}" = set; then
  withval=$with_os_version;
fi


# Check whether --with-unzip-home was given.
if test "${with_unzip_home+set}" = set; then
  withval=$with_unzip_home;
fi


# Check whether --with-zip-home was given.
if test "${with_zip_home+set}" = set; then
  withval=$with_zip_home;
fi


# Check whether --with-mingwin was given.
if test "${with_mingwin+set}" = set; then
  withval=$with_mingwin; WITH_MINGWIN=$withval
else
  WITH_MINGWIN=0
fi


# Check whether --with-use-shell was given.
if test "${with_use_shell+set}" = set; then
  withval=$with_use_shell; with_use_shell=$withval
else
  with_use_shell="tcsh"
fi


# Check whether --with-build-version was given.
if test "${with_build_version+set}" = set; then
  withval=$with_build_version; with_build_version=$withval
fi

# Check whether --enable-sgistl was given.
if test "${enable_sgistl+set}" = set; then
  enableval=$enable_sgistl;
fi


# Check whether --with-alloc was given.
if test "${with_alloc+set}" = set; then
  withval=$with_alloc;
fi


BUILD_TYPE="OOo EXT"

echo "********************************************************************"
echo "*                                                                  *"
echo "*   OpenOffice.org build configuration.                            *"
echo "*                                                                  *"
echo "*   The configure process checks your platform to see whether      *"
echo "*   you can build OpenOffice.org on it.                            *"
echo "*   This process checks all pre-requisites and generates a file    *"
echo "*   containing the necessary environment variables.                *"
echo "*   Source this file after configure has ended successfully.       *"
echo "*                                                                  *"
echo "*   Any warning that is generated during the configure process     *"
echo "*   must be taken into account since it can be a reason for        *"
echo "*   an unsuccessful build of OpenOffice.org                        *"
echo "*                                                                  *"
echo "********************************************************************"
echo ""
echo "********************************************************************"
echo "*                                                                  *"
echo "*   Checking the platform pre-requisites.                          *"
echo "*                                                                  *"
echo "********************************************************************"
echo ""
cat /dev/null > warn
for ac_prog in gawk mawk nawk awk
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ echo "$as_me:$LINENO: 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
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_AWK="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

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


  test -n "$AWK" && break
done

# Extract the first word of "$AWK", so it can be a program name with args.
set dummy $AWK; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path_AWK+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $AWK in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

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


if test -z "$AWK"; then
   { { echo "$as_me:$LINENO: error: install awk to run this script" >&5
echo "$as_me: error: install awk to run this script" >&2;}
   { (exit 1); exit 1; }; }
fi

for ac_prog in sed
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path_SED+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $SED in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_SED="$SED" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
SED=$ac_cv_path_SED
if test -n "$SED"; then
  { echo "$as_me:$LINENO: result: $SED" >&5
echo "${ECHO_T}$SED" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$SED" && break
done

if test -z "$SED"; then
   { { echo "$as_me:$LINENO: error: install sed to run this script" >&5
echo "$as_me: error: install sed to run this script" >&2;}
   { (exit 1); exit 1; }; }
fi

{ echo "$as_me:$LINENO: checking for solenv environment" >&5
echo $ECHO_N "checking for solenv environment... $ECHO_C" >&6; }
if test -z "$with_local_solenv"; then
   LOCAL_SOLENV="DEFAULT"
   { echo "$as_me:$LINENO: result: default" >&5
echo "${ECHO_T}default" >&6; }
else
   LOCAL_SOLENV=$with_local_solenv
   { echo "$as_me:$LINENO: result: $with_local_solenv" >&5
echo "${ECHO_T}$with_local_solenv" >&6; }
fi


if test "$LOCAL_SOLENV" = "DEFAULT"; then
  _solenv="../solenv"
else
  _solenv="$LOCAL_SOLENV"
fi

if test -e $_solenv/inc/minor.mk; then
   # Get UPD number from ../solenv/inc/minor.mk
   UPD="`grep RSCVERSION= ../solenv/inc/minor.mk | $AWK -F"=" '{ print $2 }'`"

   SOURCEVERSION="`grep SOURCEVERSION= ../solenv/inc/minor.mk | $AWK -F"=" '{ print $2 }'`"

else
   { { echo "$as_me:$LINENO: error: $_solenv/inc/minor.mk missing but needed for architecture/os detecion and proper environment script generation..." >&5
echo "$as_me: error: $_solenv/inc/minor.mk missing but needed for architecture/os detecion and proper environment script generation..." >&2;}
   { (exit 1); exit 1; }; }
fi

ac_aux_dir=
for ac_dir in $_solenv/bin; do
  if test -f "$ac_dir/install-sh"; then
    ac_aux_dir=$ac_dir
    ac_install_sh="$ac_aux_dir/install-sh -c"
    break
  elif test -f "$ac_dir/install.sh"; then
    ac_aux_dir=$ac_dir
    ac_install_sh="$ac_aux_dir/install.sh -c"
    break
  elif test -f "$ac_dir/shtool"; then
    ac_aux_dir=$ac_dir
    ac_install_sh="$ac_aux_dir/shtool install -c"
    break
  fi
done
if test -z "$ac_aux_dir"; then
  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $_solenv/bin" >&5
echo "$as_me: error: cannot find install-sh or install.sh in $_solenv/bin" >&2;}
   { (exit 1); exit 1; }; }
fi

# These three variables are undocumented and unsupported,
# and are intended to be withdrawn in a future Autoconf release.
# They can cause serious problems if a builder's source tree is in a directory
# whose full name contains unusual characters.
ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.


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

{ echo "$as_me:$LINENO: checking build system type" >&5
echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
if test "${ac_cv_build+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_build_alias=$build_alias
test "x$ac_build_alias" = x &&
  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
test "x$ac_build_alias" = x &&
  { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
   { (exit 1); exit 1; }; }
ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
  { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
   { (exit 1); exit 1; }; }

fi
{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5
echo "${ECHO_T}$ac_cv_build" >&6; }
case $ac_cv_build in
*-*-*) ;;
*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
echo "$as_me: error: invalid value of canonical build" >&2;}
   { (exit 1); exit 1; }; };;
esac
build=$ac_cv_build
ac_save_IFS=$IFS; IFS='-'
set x $ac_cv_build
shift
build_cpu=$1
build_vendor=$2
shift; shift
# Remember, the first character of IFS is used to create $*,
# except with old shells:
build_os=$*
IFS=$ac_save_IFS
case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac


{ echo "$as_me:$LINENO: checking host system type" >&5
echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
if test "${ac_cv_host+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "x$host_alias" = x; then
  ac_cv_host=$ac_cv_build
else
  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
    { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
   { (exit 1); exit 1; }; }
fi

fi
{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5
echo "${ECHO_T}$ac_cv_host" >&6; }
case $ac_cv_host in
*-*-*) ;;
*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
echo "$as_me: error: invalid value of canonical host" >&2;}
   { (exit 1); exit 1; }; };;
esac
host=$ac_cv_host
ac_save_IFS=$IFS; IFS='-'
set x $ac_cv_host
shift
host_cpu=$1
host_vendor=$2
shift; shift
# Remember, the first character of IFS is used to create $*,
# except with old shells:
host_os=$*
IFS=$ac_save_IFS
case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac


{ echo "$as_me:$LINENO: checking target system type" >&5
echo $ECHO_N "checking target system type... $ECHO_C" >&6; }
if test "${ac_cv_target+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "x$target_alias" = x; then
  ac_cv_target=$ac_cv_host
else
  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
    { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5
echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;}
   { (exit 1); exit 1; }; }
fi

fi
{ echo "$as_me:$LINENO: result: $ac_cv_target" >&5
echo "${ECHO_T}$ac_cv_target" >&6; }
case $ac_cv_target in
*-*-*) ;;
*) { { echo "$as_me:$LINENO: error: invalid value of canonical target" >&5
echo "$as_me: error: invalid value of canonical target" >&2;}
   { (exit 1); exit 1; }; };;
esac
target=$ac_cv_target
ac_save_IFS=$IFS; IFS='-'
set x $ac_cv_target
shift
target_cpu=$1
target_vendor=$2
shift; shift
# Remember, the first character of IFS is used to create $*,
# except with old shells:
target_os=$*
IFS=$ac_save_IFS
case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac


# The aliases save the names the user supplied, while $host etc.
# will get canonicalized.
test -n "$target_alias" &&
  test "$program_prefix$program_suffix$program_transform_name" = \
    NONENONEs,x,x, &&
  program_prefix=${target_alias}-
if test "$build" != "$host" -o "$build" != "$target" \
  -o "$host" != "$target"; then
	{ echo "$as_me:$LINENO: WARNING: cross-compiling by any means is not supported (yet)!" >&5
echo "$as_me: WARNING: cross-compiling by any means is not supported (yet)!" >&2;}
	echo "cross-compiling by any means is not supported (yet)!" >> warn
fi

if echo "$build_os" | grep cygwin; then
   { echo "$as_me:$LINENO: checking Cygwin version" >&5
echo $ECHO_N "checking Cygwin version... $ECHO_C" >&6; }
   CygwinVer=`uname -r`
   { echo "$as_me:$LINENO: result: $CygwinVer" >&5
echo "${ECHO_T}$CygwinVer" >&6; }
   if test "`echo $CygwinVer | $AWK -F . '{ print $1$2 }'`" -lt "15"; then
      { { echo "$as_me:$LINENO: error: You need at least Cygwin V1.5.x" >&5
echo "$as_me: error: You need at least Cygwin V1.5.x" >&2;}
   { (exit 1); exit 1; }; }
   fi
else
   CygwinVer="false"
fi

case "$build_os" in
	solaris*)
		test_x=yes
		test_gtk=yes
		build_cairo=yes
		test_kde=yes
		test_cups=yes
		_os=SunOS

						   		{ echo "$as_me:$LINENO: checking the Solaris operating system release" >&5
echo $ECHO_N "checking the Solaris operating system release... $ECHO_C" >&6; }
   		_os_release=`echo $build_os | $SED -e s/solaris2\.//`
		if test "$_os_release" -lt "6"; then
      			{ { echo "$as_me:$LINENO: error: use solaris >= 6 to build OpenOffice.org" >&5
echo "$as_me: error: use solaris >= 6 to build OpenOffice.org" >&2;}
   { (exit 1); exit 1; }; }
   		else
      			{ echo "$as_me:$LINENO: result: ok ($_os_release)" >&5
echo "${ECHO_T}ok ($_os_release)" >&6; }
   		fi

   		   		{ echo "$as_me:$LINENO: checking the processor type" >&5
echo $ECHO_N "checking the processor type... $ECHO_C" >&6; }
   		if test "$build_cpu" = "sparc" -o "$build_cpu" = "i386"; then
      			{ echo "$as_me:$LINENO: result: ok ($build_cpu)" >&5
echo "${ECHO_T}ok ($build_cpu)" >&6; }
   		else
      			{ { echo "$as_me:$LINENO: error: only sparc and i386 processors are supported" >&5
echo "$as_me: error: only sparc and i386 processors are supported" >&2;}
   { (exit 1); exit 1; }; }
   		fi
		;;
	linux-gnu)
		test_x=yes
		test_gtk=yes
		build_cairo=yes
		test_kde=yes
		test_cups=yes
		if getconf GNU_LIBPTHREAD_VERSION |grep -q NPTL; then
			PTHREAD_CFLAGS="-DNPTL"
		fi
		_os=Linux
		;;
	gnu)
		test_x=yes
		test_cups=no
		_os=GNU
		;;
	cygwin*) # Windows
		test_x=no
		test_cups=no
		_os=WINNT
		;;
	darwin*) # Mac OS X
		test_x=no
		test_cups=yes
		test_gtk=no
		build_cairo=no
		_os=Darwin
		;;
	freebsd*)
		test_x=yes
		test_gtk=yes
		build_cairo=yes
		test_kde=yes
		test_cups=yes
		{ echo "$as_me:$LINENO: checking the FreeBSD operating system release" >&5
echo $ECHO_N "checking the FreeBSD operating system release... $ECHO_C" >&6; }
		if test -n "$with_os_version"; then
			OSVERSION="$with_os_version"
		else
			OSVERSION=`/sbin/sysctl -n kern.osreldate`
		fi
		{ echo "$as_me:$LINENO: result: found OSVERSION=$OSVERSION" >&5
echo "${ECHO_T}found OSVERSION=$OSVERSION" >&6; }
		{ echo "$as_me:$LINENO: checking which thread library to use" >&5
echo $ECHO_N "checking which thread library to use... $ECHO_C" >&6; }
		if test "$OSVERSION" -lt "500016"; then
			PTHREAD_CFLAGS="-D_THREAD_SAFE"
			PTHREAD_LIBS="-pthread"
		elif test "$OSVERSION" -lt "502102"; then
			PTHREAD_CFLAGS="-D_THREAD_SAFE"
			PTHREAD_LIBS="-lc_r"
		else
			PTHREAD_CFLAGS=""
			PTHREAD_LIBS="-pthread"
		fi
		{ echo "$as_me:$LINENO: result: $PTHREAD_LIBS" >&5
echo "${ECHO_T}$PTHREAD_LIBS" >&6; }
		_os=FreeBSD
		;;
	osf)
		test_x=dontknow
		test_cups=no
		_os=OSF1
		;;
	netbsd)
		test_x=yes
		test_gtk=yes
		build_cairo=yes
		test_kde=yes
		test_cups=no
		PTHREAD_CFLAGS="-pthread"
		PTHREAD_LIBS="-pthread -lpthread"
		_os=NetBSD
		;;
	irix*)
		test_x=yes
		test_cups=no
		_os=IRIX
		;;
	aix*)
		test_x=yes
		test_cups=no
	   PTHREAD_LIBS=-pthread
		echo "AIX is an alpha port --- Use at own risk" >> warn
		_os=AIX
		;;
   *)
   { { echo "$as_me:$LINENO: error: $_os operating system is not suitable to build OpenOffice.org!" >&5
echo "$as_me: error: $_os operating system is not suitable to build OpenOffice.org!" >&2;}
   { (exit 1); exit 1; }; }
   ;;
esac





{ echo "$as_me:$LINENO: checking whether to enable crashdump feature" >&5
echo $ECHO_N "checking whether to enable crashdump feature... $ECHO_C" >&6; }
if test "$enable_crashdump" = "yes" -o "$enable_crashdump" = "TRUE"; then
   ENABLE_CRASHDUMP="TRUE"
   if test -z "$enable_symbols"; then
      enable_symbols="yes"
   fi
   { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
   BUILD_TYPE="$BUILD_TYPE CRASHREP"
else
   if test "$enable_crashdump" = "STATIC"; then
      ENABLE_CRASHDUMP="STATIC"
      if test -z "$enable_symbols"; then
         enable_symbols="yes"
      fi
      { echo "$as_me:$LINENO: result: yes, STATIC" >&5
echo "${ECHO_T}yes, STATIC" >&6; }
      BUILD_TYPE="$BUILD_TYPE CRASHREP"
   else
      if test "$enable_crashdump" = "" -o "$enable_crashdump" = "no"; then
         ENABLE_CRASHDUMP=""
	 { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
      else
         { { echo "$as_me:$LINENO: error: --enable-crashdump only accepts yes, no, TRUE or STATIC as parameter." >&5
echo "$as_me: error: --enable-crashdump only accepts yes, no, TRUE or STATIC as parameter." >&2;}
   { (exit 1); exit 1; }; }
      fi
   fi
fi


if test "$_os" = "WINNT"; then
   BUILD_TYPE="$BUILD_TYPE TWAIN"
fi

if test "$_os" = "WINNT"; then
            { echo "$as_me:$LINENO: checking whether to check for the MS VC Toolkit 2003" >&5
echo $ECHO_N "checking whether to check for the MS VC Toolkit 2003... $ECHO_C" >&6; }
   if test "$enable_vctk" = "" -o "$enable_vctk" = "no"; then
      ENABLE_VCTK=""
      { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
   else
      ENABLE_VCTK="TRUE"
      { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
   fi


            { echo "$as_me:$LINENO: checking whether to use the standard non-optimizing compiler" >&5
echo $ECHO_N "checking whether to use the standard non-optimizing compiler... $ECHO_C" >&6; }
   if test "$enable_cl_standard" = "" -o "$enable_cl_standard" = "no"; then
      VC_STANDARD=""
      { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
   else
      VC_STANDARD="TRUE"
      { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
   fi

fi

{ echo "$as_me:$LINENO: checking whether to do a debug build" >&5
echo $ECHO_N "checking whether to do a debug build... $ECHO_C" >&6; }
if test -n "$enable_debug" && test "$enable_debug" != "no"; then
   ENABLE_DEBUG="TRUE"
   if test -z "$enable_symbols"; then
      enable_symbols="yes"
   fi
   { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
else
   ENABLE_DEBUG="FALSE"
   { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


{ echo "$as_me:$LINENO: checking whether to build with additional debug utilities" >&5
echo $ECHO_N "checking whether to build with additional debug utilities... $ECHO_C" >&6; }
if test -n "$enable_dbgutil" && test "$enable_dbgutil" != "no"; then
   PROEXT=""
   PRODUCT=""
   PROFULLSWITCH=""
   { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
else
   PRODUCT="full"
   PROFULLSWITCH="product=full"
   PROEXT=".pro"
   { echo "$as_me:$LINENO: result: no, full product build" >&5
echo "${ECHO_T}no, full product build" >&6; }
fi




{ echo "$as_me:$LINENO: checking whether to include symbols into final build" >&5
echo $ECHO_N "checking whether to include symbols into final build... $ECHO_C" >&6; }
if test -n "$enable_symbols" && test "$enable_symbols" != "no"; then
	if test "$enable_symbols" = "yes" -o "$enable_symbols" = "TRUE"; then
		ENABLE_SYMBOLS="TRUE"
		{ echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
	else
		if test "$enable_symbols" = "SMALL" -o "$enable_symbols" = "small"; then
			ENABLE_SYMBOLS="SMALL"
		else if test "$enable_symbols" != "no" ; then
			     echo enable symbols is: $enable_symbols
			     { { echo "$as_me:$LINENO: error: --enable-symbols only accepts yes, TRUE or SMALL as parameter." >&5
echo "$as_me: error: --enable-symbols only accepts yes, TRUE or SMALL as parameter." >&2;}
   { (exit 1); exit 1; }; }
           	     else
              		     ENABLE_SYMBOLS=
		     fi
		fi
	fi
else
   ENABLE_SYMBOLS=
   { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi



{ echo "$as_me:$LINENO: checking whether to enable native CUPS support" >&5
echo $ECHO_N "checking whether to enable native CUPS support... $ECHO_C" >&6; }
if test "$test_cups" = "yes" -a \( "$enable_cups" = "yes" -o "$enable_cups" = "TRUE" \) ; then
   ENABLE_CUPS="TRUE"
   { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
else
   ENABLE_CUPS=""
   { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


{ echo "$as_me:$LINENO: checking whether to enable fontconfig support" >&5
echo $ECHO_N "checking whether to enable fontconfig support... $ECHO_C" >&6; }
if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a \( "$enable_fontconfig" = "yes" -o "$enable_fontconfig" = "TRUE" \); then
   ENABLE_FONTCONFIG="TRUE"
   { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
else
   ENABLE_FONTCONFIG=""
   { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


{ echo "$as_me:$LINENO: checking whether to enable filters for legacy binary file formats (StarOffice 5.2)" >&5
echo $ECHO_N "checking whether to enable filters for legacy binary file formats (StarOffice 5.2)... $ECHO_C" >&6; }
if test "$enable_binfilter" = "no"; then
   WITH_BINFILTER="NO"
   { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
else
   WITH_BINFILTER="YES"
   BUILD_TYPE="$BUILD_TYPE BINFILTER"
   { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
fi


if test "$_os" = "WINNT"; then
   { echo "$as_me:$LINENO: checking whether to use DirectX" >&5
echo $ECHO_N "checking whether to use DirectX... $ECHO_C" >&6; }
   if test "$enable_directx" = "yes" -o "$enable_directx" = "TRUE" -o "$enable_directx" = ""; then
      ENABLE_DIRECTX="TRUE"
      { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
   else
      ENABLE_DIRECTX=""
      { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
   fi


   { echo "$as_me:$LINENO: checking whether to use ATL/MFC" >&5
echo $ECHO_N "checking whether to use ATL/MFC... $ECHO_C" >&6; }
   if test "$enable_atlmfc" = "yes" -o "$enable_atlmfc" = "TRUE" -o "$enable_atlmfc" = ""; then
         NETTOOLKIT=""
      { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
   else
      NETTOOLKIT="TRUE"
      { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
   fi

fi

{ echo "$as_me:$LINENO: checking whether to use RPATH in shared libraries" >&5
echo $ECHO_N "checking whether to use RPATH in shared libraries... $ECHO_C" >&6; }
if test "$enable_rpath" = "no"; then
   ENABLE_RPATH="no"
else
   ENABLE_RPATH="yes"
fi
{ echo "$as_me:$LINENO: result: $ENABLE_RPATH" >&5
echo "${ECHO_T}$ENABLE_RPATH" >&6; }


{ echo "$as_me:$LINENO: checking whether to include MySpell dictionaries" >&5
echo $ECHO_N "checking whether to include MySpell dictionaries... $ECHO_C" >&6; }
if test -z "$with_myspell_dicts" || test "$with_myspell_dicts" = "yes"; then
  { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
  WITH_MYSPELL_DICTS=YES
  BUILD_TYPE="$BUILD_TYPE DICTIONARIES"
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
  WITH_MYSPELL_DICTS=NO
fi


{ echo "$as_me:$LINENO: checking which shell to use" >&5
echo $ECHO_N "checking which shell to use... $ECHO_C" >&6; }
if test $_os = "WINNT"; then
   if test "$with_use_shell" != "tcsh" -a "$with_use_shell" != "bash" -a "$with_use_shell" != "4nt"; then
      { { echo "$as_me:$LINENO: error: only \"tcsh\",\"bash\" or \"4nt\" are supported options" >&5
echo "$as_me: error: only \"tcsh\",\"bash\" or \"4nt\" are supported options" >&2;}
   { (exit 1); exit 1; }; }
   fi
                     if test -L $AWK -o -L `which awk` -o -L `which tar` -o -L `which gunzip` ; then
         { { echo "$as_me:$LINENO: error: $AWK, awk, tar or gunzip is a cygwin symlink!
Native windows programs cannot use cygwin symlinks. Remove the symbolic
link, and copy the program to the name of the link." >&5
echo "$as_me: error: $AWK, awk, tar or gunzip is a cygwin symlink!
Native windows programs cannot use cygwin symlinks. Remove the symbolic
link, and copy the program to the name of the link." >&2;}
   { (exit 1); exit 1; }; }
      fi
                  CC=`echo $CC | $SED -n "s/^guw.pl //p"`
   CXX=`echo $CXX | $SED -n "s/^guw.pl //p"`
                  if test -n "$CC";then
         if test "`$CC -dumpmachine 2>/dev/null | $AWK -F- '{ print $3 }'`" = "mingw32"; then
            WITH_MINGWIN="yes"
         fi
      fi
            if test "$WITH_MINGWIN" = "yes" ; then
      if test "$with_use_shell" = "4nt" -o "x$with_use_shell" = "x"; then
         with_use_shell="tcsh"
      fi
      if test -z "$CC"; then
         CC="gcc -mno-cygwin"
         CXX="g++ -mno-cygwin"
      fi
   fi
else
            if test "$with_use_shell" != "tcsh" -a "$with_use_shell" != "bash"; then
      { { echo "$as_me:$LINENO: error: only \"tcsh\" or \"bash\" are supported options" >&5
echo "$as_me: error: only \"tcsh\" or \"bash\" are supported options" >&2;}
   { (exit 1); exit 1; }; }
   fi
fi
USE_SHELL="$with_use_shell"
{ echo "$as_me:$LINENO: result: $USE_SHELL" >&5
echo "${ECHO_T}$USE_SHELL" >&6; }



if test "$with_use_shell" = "tcsh"; then
   # Extract the first word of "tcsh", so it can be a program name with args.
set dummy tcsh; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path_SHELLPATH+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $SHELLPATH in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_SHELLPATH="$SHELLPATH" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_SHELLPATH="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
SHELLPATH=$ac_cv_path_SHELLPATH
if test -n "$SHELLPATH"; then
  { echo "$as_me:$LINENO: result: $SHELLPATH" >&5
echo "${ECHO_T}$SHELLPATH" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


   if test -z "$SHELLPATH"; then
      { { echo "$as_me:$LINENO: error: tcsh not found in \$PATH" >&5
echo "$as_me: error: tcsh not found in \$PATH" >&2;}
   { (exit 1); exit 1; }; }
   else
      SHELLPATH=`echo $SHELLPATH | $SED -n "s/\/tcsh$//p"`
   fi
elif test "$with_use_shell" = "bash"; then
   # Extract the first word of "bash", so it can be a program name with args.
set dummy bash; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path_SHELLPATH+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $SHELLPATH in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_SHELLPATH="$SHELLPATH" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_SHELLPATH="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
SHELLPATH=$ac_cv_path_SHELLPATH
if test -n "$SHELLPATH"; then
  { echo "$as_me:$LINENO: result: $SHELLPATH" >&5
echo "${ECHO_T}$SHELLPATH" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


   if test -z "$SHELLPATH"; then
      { { echo "$as_me:$LINENO: error: bash not found in \$PATH" >&5
echo "$as_me: error: bash not found in \$PATH" >&2;}
   { (exit 1); exit 1; }; }
   else
      SHELLPATH=`echo $SHELLPATH | $SED -n "s/\/bash$//p"`
   fi
else
   { echo "$as_me:$LINENO: WARNING: Windows 4NT builds don't test for the shell" >&5
echo "$as_me: WARNING: Windows 4NT builds don't test for the shell" >&2;}
   SHELLPATH="NO_SHELLPATH_NEEDED"
fi


{ echo "$as_me:$LINENO: checking gcc home" >&5
echo $ECHO_N "checking gcc home... $ECHO_C" >&6; }
if test -z "$with_gcc_home"; then
	GCC_HOME=`which gcc | $SED -e s,/bin/gcc,,`
else
	GCC_HOME="$with_gcc_home"
fi
{ echo "$as_me:$LINENO: result: $GCC_HOME" >&5
echo "${ECHO_T}$GCC_HOME" >&6; }


if test -n "$with_gcc_home"; then
   if test -z "$CC"; then
      CC="$with_gcc_home/bin/gcc"
   fi
fi

if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then
   ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
set dummy ${ac_tool_prefix}gcc; ac_word=$2
{ echo "$as_me:$LINENO: 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
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_CC="${ac_tool_prefix}gcc"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

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


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

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

  if test "x$ac_ct_CC" = x; then
    CC=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    CC=$ac_ct_CC
  fi
else
  CC="$ac_cv_prog_CC"
fi

if test -z "$CC"; then
          if test -n "$ac_tool_prefix"; then
    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
set dummy ${ac_tool_prefix}cc; ac_word=$2
{ echo "$as_me:$LINENO: 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
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_CC="${ac_tool_prefix}cc"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

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


  fi
fi
if test -z "$CC"; then
  # Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
{ echo "$as_me:$LINENO: 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
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
       ac_prog_rejected=yes
       continue
     fi
    ac_cv_prog_CC="cc"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

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


fi
if test -z "$CC"; then
  if test -n "$ac_tool_prefix"; then
  for ac_prog in cl.exe
  do
    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
{ echo "$as_me:$LINENO: 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
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

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


    test -n "$CC" && break
  done
fi
if test -z "$CC"; then
  ac_ct_CC=$CC
  for ac_prog in cl.exe
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CC"; then
  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_CC="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

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


  test -n "$ac_ct_CC" && break
done

  if test "x$ac_ct_CC" = x; then
    CC=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    CC=$ac_ct_CC
  fi
fi

fi


test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
See \`config.log' for more details." >&5
echo "$as_me: error: no acceptable C compiler found in \$PATH
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; }

# Provide some information about the compiler.
echo "$as_me:$LINENO: checking for C compiler version" >&5
ac_compiler=`set X $ac_compile; echo $2`
{ (ac_try="$ac_compiler --version >&5"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compiler --version >&5") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }
{ (ac_try="$ac_compiler -v >&5"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compiler -v >&5") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }
{ (ac_try="$ac_compiler -V >&5"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compiler -V >&5") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }

cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files a.out a.exe b.out"
# Try to create an executable without -o first, disregard a.out.
# It will help us diagnose broken compilers, and finding out an intuition
# of exeext.
{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
#
# List of possible output files, starting from the most likely.
# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
# only as a last resort.  b.out is created by i960 compilers.
ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
#
# The IRIX 6 linker writes into existing files which may not be
# executable, retaining their permissions.  Remove them first so a
# subsequent execution test works.
ac_rmfiles=
for ac_file in $ac_files
do
  case $ac_file in
    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
  esac
done
rm -f $ac_rmfiles

if { (ac_try="$ac_link_default"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link_default") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; then
  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
# in a Makefile.  We should not override ac_cv_exeext if it was cached,
# so that the user can short-circuit this test for compilers unknown to
# Autoconf.
for ac_file in $ac_files
do
  test -f "$ac_file" || continue
  case $ac_file in
    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
	;;
    [ab].out )
	# We found the default executable, but exeext='' is most
	# certainly right.
	break;;
    *.* )
        if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
	then :; else
	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
	fi
	# We set ac_cv_exeext here because the later test for it is not
	# safe: cross compilers may not add the suffix if given an `-o'
	# argument, so we may need to know it at that point already.
	# Even if this section looks crufty: it has the advantage of
	# actually working.
	break;;
    * )
	break;;
  esac
done
test "$ac_cv_exeext" = no && ac_cv_exeext=

else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
See \`config.log' for more details." >&5
echo "$as_me: error: C compiler cannot create executables
See \`config.log' for more details." >&2;}
   { (exit 77); exit 77; }; }
fi

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

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

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

{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; then
  # If both `conftest.exe' and `conftest' are `present' (well, observable)
# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
# work properly (i.e., refer to `conftest.exe'), while it won't with
# `rm'.
for ac_file in conftest.exe conftest conftest.*; do
  test -f "$ac_file" || continue
  case $ac_file in
    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
	  break;;
    * ) break;;
  esac
done
else
  { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; }
fi

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

rm -f conftest.$ac_ext
EXEEXT=$ac_cv_exeext
ac_exeext=$EXEEXT
{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
if test "${ac_cv_objext+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.o conftest.obj
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; then
  for ac_file in conftest.o conftest.obj conftest.*; do
  test -f "$ac_file" || continue;
  case $ac_file in
    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
       break;;
  esac
done
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute suffix of object files: cannot compile
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; }
fi

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

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

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_compiler_gnu=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_compiler_gnu=no
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_cv_c_compiler_gnu=$ac_compiler_gnu

fi
{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
GCC=`test $ac_compiler_gnu = yes && echo yes`
ac_test_CFLAGS=${CFLAGS+set}
ac_save_CFLAGS=$CFLAGS
{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
if test "${ac_cv_prog_cc_g+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_save_c_werror_flag=$ac_c_werror_flag
   ac_c_werror_flag=yes
   ac_cv_prog_cc_g=no
   CFLAGS="-g"
   cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_prog_cc_g=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	CFLAGS=""
      cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  :
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_c_werror_flag=$ac_save_c_werror_flag
	 CFLAGS="-g"
	 cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_prog_cc_g=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

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

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

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
   ac_c_werror_flag=$ac_save_c_werror_flag
fi
{ echo "$as_me:$LINENO: 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 "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
if test "${ac_cv_prog_cc_c89+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_cv_prog_cc_c89=no
ac_save_CC=$CC
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end 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;
}

/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
   function prototypes and stuff, but not '\xHH' hex character constants.
   These don't provoke an error unfortunately, instead are silently treated
   as 'x'.  The following induces an error, until -std is added to get
   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
   array size at least.  It's necessary to write '\x00'==0 to get something
   that's true only with -std.  */
int osf4_cc_array ['\x00' == 0 ? 1 : -1];

/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
   inside strings and character constants.  */
#define FOO(x) 'x'
int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];

int test (int i, double x);
struct s1 {int (*f) (int a);};
struct s2 {int (*f) (double a);};
int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
int argc;
char **argv;
int
main ()
{
return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
  ;
  return 0;
}
_ACEOF
for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
do
  CC="$ac_save_CC $ac_arg"
  rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_prog_cc_c89=$ac_arg
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext
  test "x$ac_cv_prog_cc_c89" != "xno" && break
done
rm -f conftest.$ac_ext
CC=$ac_save_CC

fi
# AC_CACHE_VAL
case "x$ac_cv_prog_cc_c89" in
  x)
    { echo "$as_me:$LINENO: result: none needed" >&5
echo "${ECHO_T}none needed" >&6; } ;;
  xno)
    { echo "$as_me:$LINENO: result: unsupported" >&5
echo "${ECHO_T}unsupported" >&6; } ;;
  *)
    CC="$CC $ac_cv_prog_cc_c89"
    { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
esac


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

fi

COMPATH=`dirname "$CC"`
if test "$COMPATH" = "." ; then
    for ac_prog in $CC
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path_COMPATH+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $COMPATH in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_COMPATH="$COMPATH" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_COMPATH="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
COMPATH=$ac_cv_path_COMPATH
if test -n "$COMPATH"; then
  { echo "$as_me:$LINENO: result: $COMPATH" >&5
echo "${ECHO_T}$COMPATH" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$COMPATH" && break
done

        COMPATH=`echo $COMPATH | $SED "s@/[^/:]*\\\$@@"`;
fi

GCCVER=20995
if test \( "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes" \) -a "$GCC" = "yes"; then
    { echo "$as_me:$LINENO: checking the GNU gcc compiler version" >&5
echo $ECHO_N "checking the GNU gcc compiler version... $ECHO_C" >&6; }
   _gcc_version=`$CC -dumpversion`
   _gcc_major=`echo $_gcc_version | $AWK -F. '{ print \$1 }'`
   _gcc_longver=`echo $_gcc_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
   GCCVER=`echo $_gcc_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`

   if test "$_gcc_major" -lt "3"; then
      { { echo "$as_me:$LINENO: error: found version \"$_gcc_version\", use version 3+ of the gcc compiler" >&5
echo "$as_me: error: found version \"$_gcc_version\", use version 3+ of the gcc compiler" >&2;}
   { (exit 1); exit 1; }; }
   else
      if test "$GCCVER" -eq "030203"; then
	    if test "$ENABLE_SYMBOLS" = "SMALL"; then
           { { echo "$as_me:$LINENO: error: version \"$_gcc_version\" gives internal error with small." >&5
echo "$as_me: error: version \"$_gcc_version\" gives internal error with small." >&2;}
   { (exit 1); exit 1; }; }
	    fi
      fi
   fi
   { echo "$as_me:$LINENO: result: checked (gcc $_gcc_version)" >&5
echo "${ECHO_T}checked (gcc $_gcc_version)" >&6; }
   if test "$_os" = "SunOS"; then
      { echo "$as_me:$LINENO: checking gcc linker" >&5
echo $ECHO_N "checking gcc linker... $ECHO_C" >&6; }
      if $CC -Wl,--version 2>&1 |head -n 1| grep -v GNU > /dev/null;then
          { { echo "$as_me:$LINENO: error: failed (not GNU ld). Use GNU ld instead of Sun ld on Solaris" >&5
echo "$as_me: error: failed (not GNU ld). Use GNU ld instead of Sun ld on Solaris" >&2;}
   { (exit 1); exit 1; }; }
      fi
      { echo "$as_me:$LINENO: result: ok (GNU ld)" >&5
echo "${ECHO_T}ok (GNU ld)" >&6; }
   fi
fi


if test "$GCC" = "yes"; then
   { echo "$as_me:$LINENO: checking whether $CC supports -fvisibility=hidden" >&5
echo $ECHO_N "checking whether $CC supports -fvisibility=hidden... $ECHO_C" >&6; }
   save_CFLAGS=$CFLAGS
   CFLAGS="$CFLAGS -fvisibility=hidden"

cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{
 return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
   HAVE_GCC_VISIBILITY_FEATURE=TRUE
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
   CFLAGS=$save_CFLAGS
   if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then
      { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
   else
      { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
   fi
fi


{ echo "$as_me:$LINENO: checking for GNU make" >&5
echo $ECHO_N "checking for GNU make... $ECHO_C" >&6; }
for a in "$MAKE" $GNUMAKE make gmake gnumake; do
      $a --version 2> /dev/null | grep GNU  2>&1 > /dev/null
      if test $? -eq 0;  then
           GNUMAKE=$a
           break
      fi
done
{ echo "$as_me:$LINENO: result: $GNUMAKE" >&5
echo "${ECHO_T}$GNUMAKE" >&6; }

{ echo "$as_me:$LINENO: checking the GNU make version" >&5
echo $ECHO_N "checking the GNU make version... $ECHO_C" >&6; }
if test -z "$GNUMAKE"; then
    { echo "$as_me:$LINENO: WARNING: not found build may fail" >&5
echo "$as_me: WARNING: not found build may fail" >&2;}
    echo "GNU make not found build may fail" >> warn
else
    _make_version=`$GNUMAKE --version | grep GNU | $SED -e 's@^[^0-9]*@@' -e 's@ .*@@' -e 's@,.*@@'`;
    _make_longver=`echo $_make_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
    if test "$_make_longver" -ge "037901" ; then
       { echo "$as_me:$LINENO: result: $GNUMAKE $_make_version" >&5
echo "${ECHO_T}$GNUMAKE $_make_version" >&6; }
    else
       if test "$_os" = "Darwin"; then
           if test "$_make_longver" -ge "037900" ; then
			   { echo "$as_me:$LINENO: result: $GNUMAKE $_make_version" >&5
echo "${ECHO_T}$GNUMAKE $_make_version" >&6; }
           else
               { echo "$as_me:$LINENO: WARNING: failed ($GNUMAKE $_make_version need 3.79.0+)" >&5
echo "$as_me: WARNING: failed ($GNUMAKE $_make_version need 3.79.0+)" >&2;}
           fi
       else
           { { echo "$as_me:$LINENO: error: failed ($GNUMAKE $_make_version need 3.79.1+)" >&5
echo "$as_me: error: failed ($GNUMAKE $_make_version need 3.79.1+)" >&2;}
   { (exit 1); exit 1; }; }
       fi
    fi
fi


if test "$_os" = "SunOS"; then
   if test "$CC" = "cc"; then
      for ac_prog in cc
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path__cc+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $_cc in
  [\\/]* | ?:[\\/]*)
  ac_cv_path__cc="$_cc" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path__cc="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
_cc=$ac_cv_path__cc
if test -n "$_cc"; then
  { echo "$as_me:$LINENO: result: $_cc" >&5
echo "${ECHO_T}$_cc" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$_cc" && break
done

      COMPATH=`echo $_cc | $SED -n "s/\/cc//p"`
      { echo "$as_me:$LINENO: checking the SUN Workshop C compiler version" >&5
echo $ECHO_N "checking the SUN Workshop C compiler version... $ECHO_C" >&6; }
            _workshop_string=`$CC -V 2>&1 | grep '^cc' | sed -e 's/.* C //'`
      _workshop_version=`echo $_workshop_string | $AWK '{ print $1 }'`
      _workshop_major=`echo $_workshop_version | $AWK -F. '{ print $1 }'`
      if test "$_workshop_major" != "5"; then
         { { echo "$as_me:$LINENO: error: found version \"$_workshop_version\", use version 5.5, 5.7 or 5.8 of the Sun Workshop C compiler" >&5
echo "$as_me: error: found version \"$_workshop_version\", use version 5.5, 5.7 or 5.8 of the Sun Workshop C compiler" >&2;}
   { (exit 1); exit 1; }; }
      else
         _workshop_minor=`echo $_workshop_version | $AWK -F. '{ if ($2 == 5) print "true"; else if ($2 == 7) print "true"; else if ($2 == 8) print "true"; else print "false" }'`
         if test "$_workshop_minor" = "false"; then
            { { echo "$as_me:$LINENO: error: found version \"$_workshop_version\", use version 5.5, 5.7 or 5.8 of the Sun Workshop C compiler" >&5
echo "$as_me: error: found version \"$_workshop_version\", use version 5.5, 5.7 or 5.8 of the Sun Workshop C compiler" >&2;}
   { (exit 1); exit 1; }; }
         else
                        { echo "$as_me:$LINENO: result: checked" >&5
echo "${ECHO_T}checked" >&6; }
         fi
      fi
   fi
fi

if test "$_os" = "IRIX" -o "$_os" = "IRIX64"; then
   if test "$CC" = "cc"; then
      for ac_prog in cc
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path__cc+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $_cc in
  [\\/]* | ?:[\\/]*)
  ac_cv_path__cc="$_cc" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path__cc="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
_cc=$ac_cv_path__cc
if test -n "$_cc"; then
  { echo "$as_me:$LINENO: result: $_cc" >&5
echo "${ECHO_T}$_cc" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$_cc" && break
done

      COMPATH=`echo $_cc | $SED -n "s/\/cc//p"`
      { echo "$as_me:$LINENO: checking the SGI MIPSpro C compiler version" >&5
echo $ECHO_N "checking the SGI MIPSpro C compiler version... $ECHO_C" >&6; }
            _mipspro_version=`$CC -version 2>&1 | $AWK '{ print $4 }'`
      _mipspro_major=`echo $_mipspro_version | $AWK -F. '{ print $1 }'`
      if test "$_mipspro_major" != "7"; then
         { { echo "$as_me:$LINENO: error: found version \"$_mipspro_version\", use version 7.2+ of the SGI MIPSpro C compiler" >&5
echo "$as_me: error: found version \"$_mipspro_version\", use version 7.2+ of the SGI MIPSpro C compiler" >&2;}
   { (exit 1); exit 1; }; }
      else
         _mipspro_minor=`echo $_mipspro_version | $AWK -F. '{ if ($2 <= 1) print "false"; else print "true" }'`
         if test "$_mipspro_minor" = "false"; then
            { { echo "$as_me:$LINENO: error: found version \"$_mipspro_version\", use version 7.2+ of the SGI MIPSpro C compiler" >&5
echo "$as_me: error: found version \"$_mipspro_version\", use version 7.2+ of the SGI MIPSpro C compiler" >&2;}
   { (exit 1); exit 1; }; }
         else
                        { echo "$as_me:$LINENO: result: checked" >&5
echo "${ECHO_T}checked" >&6; }
         fi
      fi
   fi
fi

if test "$_os" = "OSF1"; then
   if test "$CC" = "cc"; then
      for ac_prog in cc
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path__cc+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $_cc in
  [\\/]* | ?:[\\/]*)
  ac_cv_path__cc="$_cc" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path__cc="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
_cc=$ac_cv_path__cc
if test -n "$_cc"; then
  { echo "$as_me:$LINENO: result: $_cc" >&5
echo "${ECHO_T}$_cc" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$_cc" && break
done

      COMPATH=`echo $_cc | $SED -n "s/\/cc//p"`
      { echo "$as_me:$LINENO: WARNING: ******* $_cc , $COMPATH" >&5
echo "$as_me: WARNING: ******* $_cc , $COMPATH" >&2;}
      { echo "$as_me:$LINENO: checking the Compaq C compiler version" >&5
echo $ECHO_N "checking the Compaq C compiler version... $ECHO_C" >&6; }
            _compaqc_version=`$CC -V 2>&1 | $AWK '{ print $3 }'`
      _compaqc_major=`echo $_compaqc_version | $AWK -F. '{ print $1 }'`
      if test "$_compaqc_major" != "T6"; then
         { { echo "$as_me:$LINENO: error: found version \"$_compaqc_version\", use version 6 of the Compaq C compiler" >&5
echo "$as_me: error: found version \"$_compaqc_version\", use version 6 of the Compaq C compiler" >&2;}
   { (exit 1); exit 1; }; }
      else
                  { echo "$as_me:$LINENO: result: checked" >&5
echo "${ECHO_T}checked" >&6; }
      fi
   fi
fi

if test -z "$with_perl_home"; then
   # Extract the first word of "perl", so it can be a program name with args.
set dummy perl; ac_word=$2
{ echo "$as_me:$LINENO: 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.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

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


else
   _perl_path="$with_perl_home/bin/perl"
   if test -x "$_perl_path"; then
      PERL=$_perl_path
   else
      { { echo "$as_me:$LINENO: error: $_perl_path not found" >&5
echo "$as_me: error: $_perl_path not found" >&2;}
   { (exit 1); exit 1; }; }
   fi
fi

if test "$PERL"; then
   { echo "$as_me:$LINENO: checking the Perl version" >&5
echo $ECHO_N "checking the Perl version... $ECHO_C" >&6; }
   ${PERL} -e "exit($]);"
   _perl_version=$?
   if test "$_perl_version" -lt 5; then
      { { echo "$as_me:$LINENO: error: found Perl version \"$_perl_version\", use version 5 of Perl" >&5
echo "$as_me: error: found Perl version \"$_perl_version\", use version 5 of Perl" >&2;}
   { (exit 1); exit 1; }; }
   fi
   { echo "$as_me:$LINENO: result: checked (perl $_perl_version)" >&5
echo "${ECHO_T}checked (perl $_perl_version)" >&6; }
else
   { { echo "$as_me:$LINENO: error: Perl not found, install version 5 of Perl" >&5
echo "$as_me: error: Perl not found, install version 5 of Perl" >&2;}
   { (exit 1); exit 1; }; }
fi


{ echo "$as_me:$LINENO: checking for required Perl modules" >&5
echo $ECHO_N "checking for required Perl modules... $ECHO_C" >&6; }
if `$PERL -e 'use Archive::Zip;'`; then
	{ echo "$as_me:$LINENO: result: all modules found" >&5
echo "${ECHO_T}all modules found" >&6; }
else
	{ { echo "$as_me:$LINENO: error: Failed to find some modules" >&5
echo "$as_me: error: Failed to find some modules" >&2;}
   { (exit 1); exit 1; }; }
fi

if test "$_os" = "WINNT"; then
	if test "$WITH_MINGWIN" != "yes"; then
		{ echo "$as_me:$LINENO: checking for friendly registry keys" >&5
echo $ECHO_N "checking for friendly registry keys... $ECHO_C" >&6; }
		# VS.Net 2003, VS.Net 2002, VC6
		if test -z "$with_cl_home"; then
			vctest=`./oowintool --msvc-productdir`;
			if test -x "$vctest/bin/cl.exe"; then
				with_cl_home=$vctest;
			fi
		fi
		{ echo "$as_me:$LINENO: result: done" >&5
echo "${ECHO_T}done" >&6; }

										if test -n "$MSPDB_PATH";then
			MSPDB_PATH=`dirname "$MSPDB_PATH"`
		fi
		if test -e "$with_mspdb_path/mspdb71.dll"; then
			MSPDB_PATH="$with_mspdb_path"
		fi
				if test -z "$MSPDB_PATH" -a -e "$with_cl_home/../Common7/IDE/mspdb71.dll"; then
			MSPDB_PATH="$with_cl_home/../Common7/IDE"
		fi
				if test -z "$MSPDB_PATH" -a -e "$with_cl_home/bin/mspdb71.dll"; then
			MSPDB_PATH="$with_cl_home/bin"
		fi

		if test -z "$MSPDB_PATH"; then
			{ { echo "$as_me:$LINENO: error: You need a mspdb71.dll, make sure it's in the path or use --with-mspdb-path" >&5
echo "$as_me: error: You need a mspdb71.dll, make sure it's in the path or use --with-mspdb-path" >&2;}
   { (exit 1); exit 1; }; }
		fi
		MSPDB_PATH=`cygpath -d "$MSPDB_PATH"`
		MSPDB_PATH=`cygpath -u "$MSPDB_PATH"`
		PATH="$MSPDB_PATH:$PATH"
		# Extract the first word of "mspdb71.dll", so it can be a program name with args.
set dummy mspdb71.dll; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path_MSPDB_PATH+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $MSPDB_PATH in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_MSPDB_PATH="$MSPDB_PATH" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_MSPDB_PATH="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
MSPDB_PATH=$ac_cv_path_MSPDB_PATH
if test -n "$MSPDB_PATH"; then
  { echo "$as_me:$LINENO: result: $MSPDB_PATH" >&5
echo "${ECHO_T}$MSPDB_PATH" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi



		{ echo "$as_me:$LINENO: checking the Microsoft C/C++ Compiler" >&5
echo $ECHO_N "checking the Microsoft C/C++ Compiler... $ECHO_C" >&6; }
   		if test -x "$with_cl_home/bin/cl.exe"; then
   			CC="$with_cl_home/bin/cl.exe"
   		else
   			# Extract the first word of "cl.exe", so it can be a program name with args.
set dummy cl.exe; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path_CC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $CC in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CC="$CC" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_CC="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

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


   		fi
  		if test -e "$CC"; then
			# This gives us a posix path with 8.3 filename restrictions
			CC=`cygpath -d "$CC"`
			CC=`cygpath -u "$CC"`
			# Remove /cl.exe from CC case insensitive
			{ echo "$as_me:$LINENO: result: found ($CC)" >&5
echo "${ECHO_T}found ($CC)" >&6; }
			COMPATH=`echo $CC | $SED 's@/[cC][lL]\.[eE][xX][eE]@@'`
			export INCLUDE=`cygpath -d "$COMPATH/../Include"`
						{ echo "$as_me:$LINENO: checking the Version of Microsoft C/C++ Compiler" >&5
echo $ECHO_N "checking the Version of Microsoft C/C++ Compiler... $ECHO_C" >&6; }
			CCNUMVER=`$CC 2>&1 | $AWK "/Microsoft/ && /..\\...\\...../ {
							x = match( \\\$0, /..\\...\\...../ )
							CCversion = substr( \\\$0, RSTART, RLENGTH)
							tokencount = split (CCversion,vertoken,\".\")
							for ( i = 1 ; i <= tokencount ; i++ ) {
								printf (\"%04d\",vertoken[i] )
							}
							}"`
			{ echo "$as_me:$LINENO: result: found Compiler version $CCNUMVER." >&5
echo "${ECHO_T}found Compiler version $CCNUMVER." >&6; }
			if test "$CCNUMVER" -ge "001300102240"; then
				COMEX=10
			else
				{ { echo "$as_me:$LINENO: error: Compiler too old. Use Microsoft C/C++ .NET 2003 compiler." >&5
echo "$as_me: error: Compiler too old. Use Microsoft C/C++ .NET 2003 compiler." >&2;}
   { (exit 1); exit 1; }; }
			fi
		else
			{ { echo "$as_me:$LINENO: error: Microsoft C/C++ Compiler not found. Use --with-cl-home or set path to cl.exe." >&5
echo "$as_me: error: Microsoft C/C++ Compiler not found. Use --with-cl-home or set path to cl.exe." >&2;}
   { (exit 1); exit 1; }; }
		fi
	else
		{ echo "$as_me:$LINENO: checking the Mingwin32 C++ Compiler" >&5
echo $ECHO_N "checking the Mingwin32 C++ Compiler... $ECHO_C" >&6; }
		if test `$CC -dumpmachine | $AWK -F- '{ print $3 }'` = "mingw32"; then
			{ echo "$as_me:$LINENO: result: found." >&5
echo "${ECHO_T}found." >&6; }
		else
			{ { echo "$as_me:$LINENO: error: Mingwin32 C++ Compiler not found." >&5
echo "$as_me: error: Mingwin32 C++ Compiler not found." >&2;}
   { (exit 1); exit 1; }; }
		fi
	fi
fi



if test "$COMEX" = "8" -o "$COMEX" = "10"; then
		if test -n "$MIDL_PATH";then
		MIDL_PATH=`dirname "$MIDL_PATH"`
	fi
	if test -x "$with_midl_path/midl.exe"; then
		MIDL_PATH="$with_midl_path"
	fi
	if test -z "$MIDL_PATH" -a -e "$with_cl_home/../Common7/Tools/Bin/midl.exe"; then
		MIDL_PATH="$with_cl_home/../Common7/Tools/Bin"
	fi
	if test -z "$MIDL_PATH" ; then
      vstest=`./oowintool --msvs-productdir`;
      if test -x "$vstest/Common7/Tools/Bin/midl.exe" ; then
		  MIDL_PATH="$vstest/Common7/Tools/Bin"
      fi
	fi
	if test ! -x "$MIDL_PATH/midl.exe"; then
		{ { echo "$as_me:$LINENO: error: midl.exe not found. Make sure it's in the path or use --with-midl-path" >&5
echo "$as_me: error: midl.exe not found. Make sure it's in the path or use --with-midl-path" >&2;}
   { (exit 1); exit 1; }; }
	fi
	# Convert to posix path with 8.3 filename restrictions ( No spaces )
	MIDL_PATH=`cygpath -d "$MIDL_PATH"`
	MIDL_PATH=`cygpath -u "$MIDL_PATH"`
	# Extract the first word of "midl.exe", so it can be a program name with args.
set dummy midl.exe; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path_MIDL_PATH+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $MIDL_PATH in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_MIDL_PATH="$MIDL_PATH" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_MIDL_PATH="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
MIDL_PATH=$ac_cv_path_MIDL_PATH
if test -n "$MIDL_PATH"; then
  { echo "$as_me:$LINENO: result: $MIDL_PATH" >&5
echo "${ECHO_T}$MIDL_PATH" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi



		if test -n "$CSC_PATH";then
		CSC_PATH=`dirname "$CSC_PATH"`
	fi
	if test -x "$with_csc_path/csc.exe"; then
		CSC_PATH="$with_csc_path"
	fi
	csctest=`./oowintool --csc-compilerdir`;
	if test -x "$csctest/csc.exe"; then
		CSC_PATH="$csctest"
	fi

	if test ! -x "$CSC_PATH/csc.exe"; then
		{ { echo "$as_me:$LINENO: error: csc.exe not found. Make sure it's in the path or use --with-csc-path" >&5
echo "$as_me: error: csc.exe not found. Make sure it's in the path or use --with-csc-path" >&2;}
   { (exit 1); exit 1; }; }
	fi
	# Convert to posix path with 8.3 filename restrictions ( No spaces )
	CSC_PATH=`cygpath -d "$CSC_PATH"`
	CSC_PATH=`cygpath -u "$CSC_PATH"`
	# Extract the first word of "csc.exe", so it can be a program name with args.
set dummy csc.exe; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path_CSC_PATH+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $CSC_PATH in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CSC_PATH="$CSC_PATH" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_CSC_PATH="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
CSC_PATH=$ac_cv_path_CSC_PATH
if test -n "$CSC_PATH"; then
  { echo "$as_me:$LINENO: result: $CSC_PATH" >&5
echo "${ECHO_T}$CSC_PATH" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi



        if test -n "$ENABLE_VCTK"; then
        # Extract the first word of "nmake.exe", so it can be a program name with args.
set dummy nmake.exe; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path_NMAKE_PATH+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $NMAKE_PATH in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_NMAKE_PATH="$NMAKE_PATH" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_NMAKE_PATH="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
NMAKE_PATH=$ac_cv_path_NMAKE_PATH
if test -n "$NMAKE_PATH"; then
  { echo "$as_me:$LINENO: result: $NMAKE_PATH" >&5
echo "${ECHO_T}$NMAKE_PATH" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


        if test -n "$NMAKE_PATH"; then
            NMAKE_PATH=`dirname "$NMAKE_PATH"`
        fi
        if test -x "$with_nmake_path/nmake.exe"; then
            NMAKE_PATH="$with_nmake_path"
        fi
        if test ! -x "$NMAKE_PATH/nmake.exe"; then
        { { echo "$as_me:$LINENO: error: nmake.exe not found. Make sure it's in the path or use --with-nmake-path" >&5
echo "$as_me: error: nmake.exe not found. Make sure it's in the path or use --with-nmake-path" >&2;}
   { (exit 1); exit 1; }; }
        fi
        # Convert to posix path with 8.3 filename restrictions ( No spaces )
        NMAKE_PATH=`cygpath -d "$NMAKE_PATH"`
        NMAKE_PATH=`cygpath -u "$NMAKE_PATH"`
    fi

                if test -z "$ENABLE_VCTK"; then
       { echo "$as_me:$LINENO: checking .NET Framework" >&5
echo $ECHO_N "checking .NET Framework... $ECHO_C" >&6; }
	    if test -f "$with_frame_home/lib/mscoree.lib"; then
		    FRAME_HOME="$with_frame_home"
	    fi
	    if test -z "$FRAME_HOME" -a -e "$with_cl_home/../SDK/v1.1/lib/mscoree.lib"; then
		    FRAME_HOME="$with_cl_home/../SDK/v1.1"
	    fi
	    if test -z "$FRAME_HOME" ; then
          frametest=`./oowintool --dotnetsdk-dir`
          if test -x "$frametest/lib/mscoree.lib"; then
             FRAME_HOME="$frametest"
          fi
	    fi
	    if test ! -f "$FRAME_HOME/lib/mscoree.lib"; then
		{ { echo "$as_me:$LINENO: error: mscoree.lib (.NET Framework) not found. Make sure you use --with-frame-home" >&5
echo "$as_me: error: mscoree.lib (.NET Framework) not found. Make sure you use --with-frame-home" >&2;}
   { (exit 1); exit 1; }; }
	    fi
	    { echo "$as_me:$LINENO: result: found" >&5
echo "${ECHO_T}found" >&6; }
    else
        if test ! -f "$COMPATH/../lib/mscoree.lib"; then
        { { echo "$as_me:$LINENO: error: mscoree.lib not found. Unexpected, ask dev@tools.openoffice.org for help." >&5
echo "$as_me: error: mscoree.lib not found. Unexpected, ask dev@tools.openoffice.org for help." >&2;}
   { (exit 1); exit 1; }; }
        fi
        if test -f "$with_frame_home/lib/msvcrt.lib"; then
            FRAME_HOME="$with_frame_home"
        fi
        if test -z "$FRAME_HOME" -a -e "$with_cl_home/../Microsoft Visual Studio .NET 2003/Vc7/lib/msvcrt.lib"; then
            FRAME_HOME="$with_cl_home/../Microsoft Visual Studio .NET 2003/Vc7"
        fi
        if test ! -f "$FRAME_HOME/lib/msvcrt.lib"; then
        { { echo "$as_me:$LINENO: error: msvcrt.lib (.NET Framework) not found. Make sure you use --with-frame-home" >&5
echo "$as_me: error: msvcrt.lib (.NET Framework) not found. Make sure you use --with-frame-home" >&2;}
   { (exit 1); exit 1; }; }
        fi
    fi
	# Convert to posix path with 8.3 filename restrictions ( No spaces )
	FRAME_HOME=`cygpath -d "$FRAME_HOME"`
	FRAME_HOME=`cygpath -u "$FRAME_HOME"`
fi





if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then
   ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
  CPP=
fi
if test -z "$CPP"; then
  if test "${ac_cv_prog_CPP+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
      # Double quotes because CPP needs to be expanded
    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
    do
      ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
do
  # Use a header file that comes with gcc, so configuring glibc
  # with a fresh cross-compiler works.
  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
  # <limits.h> exists even on freestanding compilers.
  # On the NeXT, cc -E runs the code through the compiler's parser,
  # not just through cpp. "Syntax error" is here to catch this case.
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
		     Syntax error
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  :
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  # Broken: fails on valid input.
continue
fi

rm -f conftest.err conftest.$ac_ext

  # OK, works on sane cases.  Now check whether nonexistent headers
  # can be detected and how.
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <ac_nonexistent.h>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  # Broken: success on invalid input.
continue
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  # Passes both tests.
ac_preproc_ok=:
break
fi

rm -f conftest.err conftest.$ac_ext

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

    done
    ac_cv_prog_CPP=$CPP

fi
  CPP=$ac_cv_prog_CPP
else
  ac_cv_prog_CPP=$CPP
fi
{ echo "$as_me:$LINENO: result: $CPP" >&5
echo "${ECHO_T}$CPP" >&6; }
ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
do
  # Use a header file that comes with gcc, so configuring glibc
  # with a fresh cross-compiler works.
  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
  # <limits.h> exists even on freestanding compilers.
  # On the NeXT, cc -E runs the code through the compiler's parser,
  # not just through cpp. "Syntax error" is here to catch this case.
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
		     Syntax error
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  :
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  # Broken: fails on valid input.
continue
fi

rm -f conftest.err conftest.$ac_ext

  # OK, works on sane cases.  Now check whether nonexistent headers
  # can be detected and how.
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <ac_nonexistent.h>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  # Broken: success on invalid input.
continue
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  # Passes both tests.
ac_preproc_ok=:
break
fi

rm -f conftest.err conftest.$ac_ext

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

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


{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
if test "${ac_cv_path_GREP+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  # Extract the first word of "grep ggrep" to use in msg output
if test -z "$GREP"; then
set dummy grep ggrep; ac_prog_name=$2
if test "${ac_cv_path_GREP+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_path_GREP_found=false
# Loop through the user's path and test for each of PROGNAME-LIST
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_prog in grep ggrep; do
  for ac_exec_ext in '' $ac_executable_extensions; do
    ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
    { test -f "$ac_path_GREP" && $as_executable_p "$ac_path_GREP"; } || continue
    # Check for GNU ac_path_GREP and select it if it is found.
  # Check for GNU $ac_path_GREP
case `"$ac_path_GREP" --version 2>&1` in
*GNU*)
  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
*)
  ac_count=0
  echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
  while :
  do
    cat "conftest.in" "conftest.in" >"conftest.tmp"
    mv "conftest.tmp" "conftest.in"
    cp "conftest.in" "conftest.nl"
    echo 'GREP' >> "conftest.nl"
    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
    ac_count=`expr $ac_count + 1`
    if test $ac_count -gt ${ac_path_GREP_max-0}; then
      # Best one so far, save it but keep looking for a better one
      ac_cv_path_GREP="$ac_path_GREP"
      ac_path_GREP_max=$ac_count
    fi
    # 10*(2^10) chars as input seems more than enough
    test $ac_count -gt 10 && break
  done
  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
esac


    $ac_path_GREP_found && break 3
  done
done

done
IFS=$as_save_IFS


fi

GREP="$ac_cv_path_GREP"
if test -z "$GREP"; then
  { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
   { (exit 1); exit 1; }; }
fi

else
  ac_cv_path_GREP=$GREP
fi


fi
{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
 GREP="$ac_cv_path_GREP"


{ echo "$as_me:$LINENO: checking for egrep" >&5
echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
if test "${ac_cv_path_EGREP+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
   then ac_cv_path_EGREP="$GREP -E"
   else
     # Extract the first word of "egrep" to use in msg output
if test -z "$EGREP"; then
set dummy egrep; ac_prog_name=$2
if test "${ac_cv_path_EGREP+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_path_EGREP_found=false
# Loop through the user's path and test for each of PROGNAME-LIST
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_prog in egrep; do
  for ac_exec_ext in '' $ac_executable_extensions; do
    ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
    { test -f "$ac_path_EGREP" && $as_executable_p "$ac_path_EGREP"; } || continue
    # Check for GNU ac_path_EGREP and select it if it is found.
  # Check for GNU $ac_path_EGREP
case `"$ac_path_EGREP" --version 2>&1` in
*GNU*)
  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
*)
  ac_count=0
  echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
  while :
  do
    cat "conftest.in" "conftest.in" >"conftest.tmp"
    mv "conftest.tmp" "conftest.in"
    cp "conftest.in" "conftest.nl"
    echo 'EGREP' >> "conftest.nl"
    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
    ac_count=`expr $ac_count + 1`
    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
      # Best one so far, save it but keep looking for a better one
      ac_cv_path_EGREP="$ac_path_EGREP"
      ac_path_EGREP_max=$ac_count
    fi
    # 10*(2^10) chars as input seems more than enough
    test $ac_count -gt 10 && break
  done
  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
esac


    $ac_path_EGREP_found && break 3
  done
done

done
IFS=$as_save_IFS


fi

EGREP="$ac_cv_path_EGREP"
if test -z "$EGREP"; then
  { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
   { (exit 1); exit 1; }; }
fi

else
  ac_cv_path_EGREP=$EGREP
fi


   fi
fi
{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
 EGREP="$ac_cv_path_EGREP"


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

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_header_stdc=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_header_stdc=no
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext

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

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

fi

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

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

fi

if test $ac_cv_header_stdc = yes; then
  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  if test "$cross_compiling" = yes; then
  :
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <ctype.h>
#include <stdlib.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))
      return 2;
  return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  :
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
ac_cv_header_stdc=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi


fi
fi
{ echo "$as_me:$LINENO: 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 <<\_ACEOF
#define STDC_HEADERS 1
_ACEOF

fi

fi

if test "$test_cups" = "yes" -a "$ENABLE_CUPS" = "TRUE" ; then
    # On IRIX 5.3, sys/types and inttypes.h are conflicting.









for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
		  inttypes.h stdint.h unistd.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
{ echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default

#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_Header=yes"
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	eval "$as_ac_Header=no"
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&6; }
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

fi

done


if test "${ac_cv_header_cups_cups_h+set}" = set; then
  { echo "$as_me:$LINENO: checking for cups/cups.h" >&5
echo $ECHO_N "checking for cups/cups.h... $ECHO_C" >&6; }
if test "${ac_cv_header_cups_cups_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
fi
{ echo "$as_me:$LINENO: result: $ac_cv_header_cups_cups_h" >&5
echo "${ECHO_T}$ac_cv_header_cups_cups_h" >&6; }
else
  # Is the header compilable?
{ echo "$as_me:$LINENO: checking cups/cups.h usability" >&5
echo $ECHO_N "checking cups/cups.h usability... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
#include <cups/cups.h>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_header_compiler=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_header_compiler=no
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6; }

# Is the header present?
{ echo "$as_me:$LINENO: checking cups/cups.h presence" >&5
echo $ECHO_N "checking cups/cups.h presence... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <cups/cups.h>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  ac_header_preproc=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  ac_header_preproc=no
fi

rm -f conftest.err conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6; }

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
  yes:no: )
    { echo "$as_me:$LINENO: WARNING: cups/cups.h: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: cups/cups.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { echo "$as_me:$LINENO: WARNING: cups/cups.h: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: cups/cups.h: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { echo "$as_me:$LINENO: WARNING: cups/cups.h: present but cannot be compiled" >&5
echo "$as_me: WARNING: cups/cups.h: present but cannot be compiled" >&2;}
    { echo "$as_me:$LINENO: WARNING: cups/cups.h:     check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: cups/cups.h:     check for missing prerequisite headers?" >&2;}
    { echo "$as_me:$LINENO: WARNING: cups/cups.h: see the Autoconf documentation" >&5
echo "$as_me: WARNING: cups/cups.h: see the Autoconf documentation" >&2;}
    { echo "$as_me:$LINENO: WARNING: cups/cups.h:     section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: cups/cups.h:     section \"Present But Cannot Be Compiled\"" >&2;}
    { echo "$as_me:$LINENO: WARNING: cups/cups.h: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: cups/cups.h: proceeding with the preprocessor's result" >&2;}
    { echo "$as_me:$LINENO: WARNING: cups/cups.h: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: cups/cups.h: in the future, the compiler will take precedence" >&2;}

    ;;
esac
{ echo "$as_me:$LINENO: checking for cups/cups.h" >&5
echo $ECHO_N "checking for cups/cups.h... $ECHO_C" >&6; }
if test "${ac_cv_header_cups_cups_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_cv_header_cups_cups_h=$ac_header_preproc
fi
{ echo "$as_me:$LINENO: result: $ac_cv_header_cups_cups_h" >&5
echo "${ECHO_T}$ac_cv_header_cups_cups_h" >&6; }

fi
if test $ac_cv_header_cups_cups_h = yes; then
  :
else
  { { echo "$as_me:$LINENO: error: cups/cups.h could not be found. libcupsys2-dev or cups???-devel missing?" >&5
echo "$as_me: error: cups/cups.h could not be found. libcupsys2-dev or cups???-devel missing?" >&2;}
   { (exit 1); exit 1; }; }
fi


fi

if test "$_os" = "Linux" -o "$_os" = "FreeBSD" -o "$_os" = "GNU"; then
  { echo "$as_me:$LINENO: checking whether to enable pam support" >&5
echo $ECHO_N "checking whether to enable pam support... $ECHO_C" >&6; }
  if test -z "$enable_pam" || test "$enable_pam" != "no"; then
    { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
    PAM=YES
    if test "${ac_cv_header_security_pam_appl_h+set}" = set; then
  { echo "$as_me:$LINENO: checking for security/pam_appl.h" >&5
echo $ECHO_N "checking for security/pam_appl.h... $ECHO_C" >&6; }
if test "${ac_cv_header_security_pam_appl_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
fi
{ echo "$as_me:$LINENO: result: $ac_cv_header_security_pam_appl_h" >&5
echo "${ECHO_T}$ac_cv_header_security_pam_appl_h" >&6; }
else
  # Is the header compilable?
{ echo "$as_me:$LINENO: checking security/pam_appl.h usability" >&5
echo $ECHO_N "checking security/pam_appl.h usability... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
#include <security/pam_appl.h>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_header_compiler=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_header_compiler=no
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6; }

# Is the header present?
{ echo "$as_me:$LINENO: checking security/pam_appl.h presence" >&5
echo $ECHO_N "checking security/pam_appl.h presence... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <security/pam_appl.h>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  ac_header_preproc=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  ac_header_preproc=no
fi

rm -f conftest.err conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6; }

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
  yes:no: )
    { echo "$as_me:$LINENO: WARNING: security/pam_appl.h: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: security/pam_appl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { echo "$as_me:$LINENO: WARNING: security/pam_appl.h: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: security/pam_appl.h: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { echo "$as_me:$LINENO: WARNING: security/pam_appl.h: present but cannot be compiled" >&5
echo "$as_me: WARNING: security/pam_appl.h: present but cannot be compiled" >&2;}
    { echo "$as_me:$LINENO: WARNING: security/pam_appl.h:     check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: security/pam_appl.h:     check for missing prerequisite headers?" >&2;}
    { echo "$as_me:$LINENO: WARNING: security/pam_appl.h: see the Autoconf documentation" >&5
echo "$as_me: WARNING: security/pam_appl.h: see the Autoconf documentation" >&2;}
    { echo "$as_me:$LINENO: WARNING: security/pam_appl.h:     section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: security/pam_appl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
    { echo "$as_me:$LINENO: WARNING: security/pam_appl.h: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: security/pam_appl.h: proceeding with the preprocessor's result" >&2;}
    { echo "$as_me:$LINENO: WARNING: security/pam_appl.h: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: security/pam_appl.h: in the future, the compiler will take precedence" >&2;}

    ;;
esac
{ echo "$as_me:$LINENO: checking for security/pam_appl.h" >&5
echo $ECHO_N "checking for security/pam_appl.h... $ECHO_C" >&6; }
if test "${ac_cv_header_security_pam_appl_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_cv_header_security_pam_appl_h=$ac_header_preproc
fi
{ echo "$as_me:$LINENO: result: $ac_cv_header_security_pam_appl_h" >&5
echo "${ECHO_T}$ac_cv_header_security_pam_appl_h" >&6; }

fi
if test $ac_cv_header_security_pam_appl_h = yes; then
  :
else
  { { echo "$as_me:$LINENO: error: pam_appl.h could not be found. libpam-dev or pam-devel missing?" >&5
echo "$as_me: error: pam_appl.h could not be found. libpam-dev or pam-devel missing?" >&2;}
   { (exit 1); exit 1; }; }
fi


    { echo "$as_me:$LINENO: checking whether to link to libpam" >&5
echo $ECHO_N "checking whether to link to libpam... $ECHO_C" >&6; }
    if test -n "$enable_pam_link"; then
      { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
      PAM_LINK=YES

{ echo "$as_me:$LINENO: checking for pam_start in -lpam" >&5
echo $ECHO_N "checking for pam_start in -lpam... $ECHO_C" >&6; }
if test "${ac_cv_lib_pam_pam_start+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lpam  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char pam_start ();
int
main ()
{
return pam_start ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_pam_pam_start=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_lib_pam_pam_start=no
fi

rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ echo "$as_me:$LINENO: result: $ac_cv_lib_pam_pam_start" >&5
echo "${ECHO_T}$ac_cv_lib_pam_pam_start" >&6; }
if test $ac_cv_lib_pam_pam_start = yes; then
  cat >>confdefs.h <<_ACEOF
#define HAVE_LIBPAM 1
_ACEOF

  LIBS="-lpam $LIBS"

else
  { { echo "$as_me:$LINENO: error: libpam not found or functional" >&5
echo "$as_me: error: libpam not found or functional" >&2;}
   { (exit 1); exit 1; }; }
fi

    else
      { echo "$as_me:$LINENO: result: no, dynamically open it" >&5
echo "${ECHO_T}no, dynamically open it" >&6; }
      PAM_LINK=NO
    fi
  else
    { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
    PAM=NO
    PAM_LINK=NO


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

    { echo "$as_me:$LINENO: checking how many arguments getspnam_r() takes" >&5
echo $ECHO_N "checking how many arguments getspnam_r() takes... $ECHO_C" >&6; }

    if test "${ac_cv_func_which_getspnam_r+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else


################################################################

ac_cv_func_which_getspnam_r=unknown

#
# ONE ARGUMENT (sanity check)
#

# This should fail, as there is no variant of getspnam_r() that takes
# a single argument. If it actually compiles, then we can assume that
# netdb.h is not declaring the function, and the compiler is thereby
# assuming an implicit prototype. In which case, we're out of luck.
#
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

	    #include <sys/types.h>
	    #include <shadow.h>

int
main ()
{

	    const char *name = "myname";
	    getspnam_r(name) /* ; */

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func_which_getspnam_r=no
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext

#
# FIVE ARGUMENTS
#

if test "$ac_cv_func_which_getspnam_r" = "unknown"; then

cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

	    #include <sys/types.h>
	    #include <shadow.h>

int
main ()
{

	    char buffer[] = { '\0' };
	    struct spwd spwdStruct;
	    const char *name = "myname";
	    getspnam_r(name, &spwdStruct, buffer, sizeof buffer, 0) /* ; */

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func_which_getspnam_r=five
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext

fi

#
# FOUR ARGUMENTS
#

if test "$ac_cv_func_which_getspnam_r" = "unknown"; then

cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

	    #include <sys/types.h>
	    #include <shadow.h>

int
main ()
{

	    char buffer[] = { '\0' };
	    struct spwd spwdStruct;
	    const char *name = "myname";
	    getspnam_r(name, &spwdStruct, buffer, sizeof buffer) /* ; */

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func_which_getspnam_r=four
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext

fi

################################################################


fi

case "$ac_cv_func_which_getspnam_r" in
    five)
    { echo "$as_me:$LINENO: result: five" >&5
echo "${ECHO_T}five" >&6; }
    NEW_SHADOW_API=YES
    ;;

    four)
    { echo "$as_me:$LINENO: result: four" >&5
echo "${ECHO_T}four" >&6; }
    ;;

    no)
    { echo "$as_me:$LINENO: result: cannot find function declaration in shadow.h" >&5
echo "${ECHO_T}cannot find function declaration in shadow.h" >&6; }
    ;;

    unknown)
    { echo "$as_me:$LINENO: result: can't tell" >&5
echo "${ECHO_T}can't tell" >&6; }
    ;;

    *)
    { { echo "$as_me:$LINENO: error: internal error" >&5
echo "$as_me: error: internal error" >&2;}
   { (exit 1); exit 1; }; }
    ;;
esac

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



  fi
fi




if test "$_os" = "Linux"; then
    { echo "$as_me:$LINENO: checking whether to link to libcrypt" >&5
echo $ECHO_N "checking whether to link to libcrypt... $ECHO_C" >&6; }
    if test -n "$enable_crypt_link"; then
        { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
        CRYPT_LINK=YES

{ echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6; }
if test "${ac_cv_lib_crypt_crypt+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lcrypt  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char crypt ();
int
main ()
{
return crypt ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_crypt_crypt=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_lib_crypt_crypt=no
fi

rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6; }
if test $ac_cv_lib_crypt_crypt = yes; then
  cat >>confdefs.h <<_ACEOF
#define HAVE_LIBCRYPT 1
_ACEOF

  LIBS="-lcrypt $LIBS"

else
  { { echo "$as_me:$LINENO: error: libcrypt not found or functional" >&5
echo "$as_me: error: libcrypt not found or functional" >&2;}
   { (exit 1); exit 1; }; }
fi

    else
        { echo "$as_me:$LINENO: result: no, dynamically open it" >&5
echo "${ECHO_T}no, dynamically open it" >&6; }
        CRYPT_LINK=NO
    fi
fi


if test -n "$with_gcc_home"; then
   if test -z "$CXX"; then
      CXX="$with_gcc_home/bin/g++"
   fi
fi

if test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then
   if test -e "$CC"; then
      CXX="$CC"
   fi
fi

if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then
   ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
if test -z "$CXX"; then
  if test -n "$CCC"; then
    CXX=$CCC
  else
    if test -n "$ac_tool_prefix"; then
  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
  do
    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_CXX+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$CXX"; then
  ac_cv_prog_CXX="$CXX" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

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


    test -n "$CXX" && break
  done
fi
if test -z "$CXX"; then
  ac_ct_CXX=$CXX
  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$ac_ct_CXX"; then
  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_CXX="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

fi
fi
ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
if test -n "$ac_ct_CXX"; then
  { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
echo "${ECHO_T}$ac_ct_CXX" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ac_ct_CXX" && break
done

  if test "x$ac_ct_CXX" = x; then
    CXX="g++"
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
ac_tool_warned=yes ;;
esac
    CXX=$ac_ct_CXX
  fi
fi

  fi
fi
# Provide some information about the compiler.
echo "$as_me:$LINENO: checking for C++ compiler version" >&5
ac_compiler=`set X $ac_compile; echo $2`
{ (ac_try="$ac_compiler --version >&5"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compiler --version >&5") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }
{ (ac_try="$ac_compiler -v >&5"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compiler -v >&5") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }
{ (ac_try="$ac_compiler -V >&5"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compiler -V >&5") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }

{ echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; }
if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

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

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_compiler_gnu=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_compiler_gnu=no
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_cv_cxx_compiler_gnu=$ac_compiler_gnu

fi
{ echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; }
GXX=`test $ac_compiler_gnu = yes && echo yes`
ac_test_CXXFLAGS=${CXXFLAGS+set}
ac_save_CXXFLAGS=$CXXFLAGS
{ echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; }
if test "${ac_cv_prog_cxx_g+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
   ac_cxx_werror_flag=yes
   ac_cv_prog_cxx_g=no
   CXXFLAGS="-g"
   cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_prog_cxx_g=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	CXXFLAGS=""
      cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  :
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cxx_werror_flag=$ac_save_cxx_werror_flag
	 CXXFLAGS="-g"
	 cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_prog_cxx_g=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

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

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

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
fi
{ echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6; }
if test "$ac_test_CXXFLAGS" = set; then
  CXXFLAGS=$ac_save_CXXFLAGS
elif test $ac_cv_prog_cxx_g = yes; then
  if test "$GXX" = yes; then
    CXXFLAGS="-g -O2"
  else
    CXXFLAGS="-g"
  fi
else
  if test "$GXX" = yes; then
    CXXFLAGS="-O2"
  else
    CXXFLAGS=
  fi
fi
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

fi

if test "$GXX" = "yes"; then
   { echo "$as_me:$LINENO: checking the GNU C++ compiler version" >&5
echo $ECHO_N "checking the GNU C++ compiler version... $ECHO_C" >&6; }

   _gpp_version=`$CXX -dumpversion`
   _gpp_major=`echo $_gpp_version | $AWK -F. '{ print \$1 }'`
   _gpp_minor=`echo $_gpp_version | $AWK -F. '{ print \$2 }'`

   { echo "$as_me:$LINENO: result: checked (g++ $_gpp_version)" >&5
echo "${ECHO_T}checked (g++ $_gpp_version)" >&6; }

   if test "$_gpp_major" = "3"; then
      if test "$_gpp_minor" = "4"; then
         { echo "$as_me:$LINENO: checking whether $CXX has the enum bug" >&5
echo $ECHO_N "checking whether $CXX has the enum bug... $ECHO_C" >&6; }
if test "$cross_compiling" = yes; then
  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
See \`config.log' for more details." >&5
echo "$as_me: error: cannot run test program while cross compiling
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; }
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

extern "C" void abort (void);
extern "C" void exit (int status);

enum E { E0, E1, E2, E3, E4, E5 };

void
test (enum E e)
{
  if (e == E2 || e == E3 || e == E1)
  exit (1);
}

int
main (void)
{
  test (E4);
  test (E5);
  test (E0);
  return 0;
}

_ACEOF
rm -f conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  { { echo "$as_me:$LINENO: error: your version of the GNU C++ compile has a bug which prevents OpenOffice.org from being compiled correctly - please check http://gcc.gnu.org/ml/gcc-patches/2004-07/msg00968.html for details." >&5
echo "$as_me: error: your version of the GNU C++ compile has a bug which prevents OpenOffice.org from being compiled correctly - please check http://gcc.gnu.org/ml/gcc-patches/2004-07/msg00968.html for details." >&2;}
   { (exit 1); exit 1; }; }
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
{ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi


      fi
   fi
fi

# Removed the special FreeBSD treatment. The problem was that with_gxx_include_path
# often contains an i386 which is expanded as a macro. Solved in stlport.
if test "$GXX" = "yes"; then
   { echo "$as_me:$LINENO: checking for g++ include path" >&5
echo $ECHO_N "checking for g++ include path... $ECHO_C" >&6; }
   if test -z "$with_gxx_include_path"; then
      with_gxx_include_path=`echo "#include <cstring>" | $CXX -E -xc++ - | $SED -n '/.*1*"\(.*\)\/cstring".*/s//\1/p' | head -n 1`
      if test "$with_gxx_include_path" = "/usr/libexec/(null)/include"; then
          with_gxx_include_path="/usr/include"
      fi
   fi
fi
if test -z "$with_gxx_include_path"; then
   with_gxx_include_path="NO_GXX_INCLUDE"
   { echo "$as_me:$LINENO: result: no g++ includes" >&5
echo "${ECHO_T}no g++ includes" >&6; }
else
   { echo "$as_me:$LINENO: result: $with_gxx_include_path" >&5
echo "${ECHO_T}$with_gxx_include_path" >&6; }
fi
GXX_INCLUDE_PATH="$with_gxx_include_path"


if test "$_os" = "SunOS"; then
      if test "$CC" = "cc"; then
   { echo "$as_me:$LINENO: checking Sun Workshop C++ Compiler" >&5
echo $ECHO_N "checking Sun Workshop C++ Compiler... $ECHO_C" >&6; }
      if test "$CXX" != "CC"; then
         { echo "$as_me:$LINENO: WARNING: Sun Workshop C++ was not found" >&5
echo "$as_me: WARNING: Sun Workshop C++ was not found" >&2;}
         echo "Sun Workshop C++ was not found" >> warn
      else
         { echo "$as_me:$LINENO: result: checked" >&5
echo "${ECHO_T}checked" >&6; }
      fi
   fi
fi
if test "$_os" = "Darwin"; then
      if test "$CC" = "cc"; then
      { echo "$as_me:$LINENO: checking Macosx c++ Compiler" >&5
echo $ECHO_N "checking Macosx c++ Compiler... $ECHO_C" >&6; }
      if test "$CXX" != "c++"; then
         { echo "$as_me:$LINENO: WARNING: Macosx C++ was not found" >&5
echo "$as_me: WARNING: Macosx C++ was not found" >&2;}
         echo "Macosx C++ was not found" >> warn
      else
         { echo "$as_me:$LINENO: result: checked" >&5
echo "${ECHO_T}checked" >&6; }
      fi
   fi
fi
if test "$_os" = "IRIX" -o "$_os" = "IRIX64"; then
      if test "$CC" = "cc"; then
      { echo "$as_me:$LINENO: checking SGI MIPSpro C++ Compiler" >&5
echo $ECHO_N "checking SGI MIPSpro C++ Compiler... $ECHO_C" >&6; }
      if test "$CXX" != "CC"; then
         { echo "$as_me:$LINENO: WARNING: SGI MIPSpro C++ was not found" >&5
echo "$as_me: WARNING: SGI MIPSpro C++ was not found" >&2;}
         echo "SGI MIPSpro C++ was not found" >> warn
      else
         { echo "$as_me:$LINENO: result: checked" >&5
echo "${ECHO_T}checked" >&6; }
      fi
   fi
fi
if test "$_os" = "OSF1"; then
   { echo "$as_me:$LINENO: checking Compaq C++ compiler version" >&5
echo $ECHO_N "checking Compaq C++ compiler version... $ECHO_C" >&6; }
      _compaqcxx_version=`$CXX -V 2>&1 | $AWK '{ print $3 }'`
   _compaqcxx_major=`echo $_compaqcxx_version | $AWK -F. '{ print $1 }'`
   if test "$_compaqcxx_major" != "V6"; then
      { echo "$as_me:$LINENO: WARNING: found version \"$_compaqc_version\", use version 6 of the Compaq C++ compiler" >&5
echo "$as_me: WARNING: found version \"$_compaqc_version\", use version 6 of the Compaq C++ compiler" >&2;}
      echo "found version $_compaqc_version, use version 6 of the Compaq C++ compiler" >> warn
   else
            { echo "$as_me:$LINENO: result: checked" >&5
echo "${ECHO_T}checked" >&6; }
   fi
fi

{ echo "$as_me:$LINENO: checking exception type" >&5
echo $ECHO_N "checking exception type... $ECHO_C" >&6; }

ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu


if test "${exceptions_type+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <iostream>

extern "C" void __sjthrow(void) __attribute__ ((__noreturn__));


int
main ()
{
__sjthrow()
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  exceptions_type="sjlj"
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	exceptions_type="dwarf2"
fi

rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext

fi


{ echo "$as_me:$LINENO: result: $exceptions_type" >&5
echo "${ECHO_T}$exceptions_type" >&6; }
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

EXCEPTIONS="$exceptions_type"


if test "$_os" = "SunOS"; then
   _temp=`showrev -p | $AWK -F" " '{ print $2 }'`
   if test "$_os_release" = "7"; then
                        { echo "$as_me:$LINENO: checking for patch 106327-06 or greater" >&5
echo $ECHO_N "checking for patch 106327-06 or greater... $ECHO_C" >&6; }
      _patch=`echo $_temp | $AWK '/106327-06/ { print "found" }'`
      _patch="false"
      for i in $_temp
      do
         _patch_major=`echo $i | $AWK -F"-" '{ print $1 }'`
         if test "$_patch_major" = "106327"; then
            _patch_rev=`echo $i | $AWK -F"-" '{ print $2 }'`
            if test "$_patch_rev" -ge "6"; then
               _patch="found"
            fi
        fi
      done
      if test "$_patch" = "found"; then
         { echo "$as_me:$LINENO: result: found" >&5
echo "${ECHO_T}found" >&6; }
      else
         { echo "$as_me:$LINENO: WARNING: patch 106327-06 not found, please install compiler patch 106327-06 or greater" >&5
echo "$as_me: WARNING: patch 106327-06 not found, please install compiler patch 106327-06 or greater" >&2;}
         echo "patch 106327-06 not found, please install compiler patch 106327-06 or greater" >> warn
      fi
                        { echo "$as_me:$LINENO: checking for patch 106950-11 or greater" >&5
echo $ECHO_N "checking for patch 106950-11 or greater... $ECHO_C" >&6; }
      _patch=`echo $_temp | $AWK '/106950-11/ { print "found" }'`
      _patch="false"
      for i in $_temp
      do
         _patch_major=`echo $i | $AWK -F"-" '{ print $1 }'`
         if test "$_patch_major" = "106950"; then
            _patch_rev=`echo $i | $AWK -F"-" '{ print $2 }'`
            if test "$_patch_rev" -ge "11"; then
               _patch="found"
            fi
         fi
      done
      if test "$_patch" = "found"; then
         { echo "$as_me:$LINENO: result: found" >&5
echo "${ECHO_T}found" >&6; }
      else
         { echo "$as_me:$LINENO: WARNING: patch 106950-11 not found, please install linker patch 106950-11 or greater" >&5
echo "$as_me: WARNING: patch 106950-11 not found, please install linker patch 106950-11 or greater" >&2;}
         echo "patch 106950-11 not found, please install linker patch 106950-11 or greater" >> warn
      fi
   else
      if test "$_os_release" = "6"; then
                                    { echo "$as_me:$LINENO: checking for patch 105591-09 or greater" >&5
echo $ECHO_N "checking for patch 105591-09 or greater... $ECHO_C" >&6; }
         _patch=`echo $_temp | $AWK '/105591-09/ { print "found" }'`
         _patch="false"
         for i in $_temp
         do
            _patch_major=`echo $i | $AWK -F"-" '{ print $1 }'`
            if test "$_patch_major" = "105591"; then
               _patch_rev=`echo $i | $AWK -F"-" '{ print $2 }'`
               if test "$_patch_rev" -ge "9"; then
                  _patch="found"
               fi
           fi
         done
         if test "$_patch" = "found"; then
            { echo "$as_me:$LINENO: result: found" >&5
echo "${ECHO_T}found" >&6; }
         else
            { echo "$as_me:$LINENO: WARNING: patch 105591-09 not found, please install compiler patch 105591-09 or greater" >&5
echo "$as_me: WARNING: patch 105591-09 not found, please install compiler patch 105591-09 or greater" >&2;}
            echo "patch 105591-09 not found, please install compiler patch 105591-09 or greater" >> warn
         fi
                                    { echo "$as_me:$LINENO: checking for patch 107733-08 or greater" >&5
echo $ECHO_N "checking for patch 107733-08 or greater... $ECHO_C" >&6; }
         _patch=`echo $_temp | $AWK '/107733-08/ { print "found" }'`
         _patch="false"
         for i in $_temp
         do
            _patch_major=`echo $i | $AWK -F"-" '{ print $1 }'`
            if test "$_patch_major" = "107733"; then
               _patch_rev=`echo $i | $AWK -F"-" '{ print $2 }'`
               if test "$_patch_rev" -ge "8"; then
                  _patch="found"
               fi
           fi
         done
         if test "$_patch" = "found"; then
            { echo "$as_me:$LINENO: result: found" >&5
echo "${ECHO_T}found" >&6; }
         else
            { echo "$as_me:$LINENO: WARNING: patch 107733-06 not found, please install linker patch 107733-08 or greater" >&5
echo "$as_me: WARNING: patch 107733-06 not found, please install linker patch 107733-08 or greater" >&2;}
            echo "patch 107733-06 not found, please install linker patch 107733-08 or greater" >> warn
         fi
      fi
   fi
fi

if test "$_os" = "SunOS"; then
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu

ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
{ echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5
echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6; }
if test -z "$CXXCPP"; then
  if test "${ac_cv_prog_CXXCPP+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
      # Double quotes because CXXCPP needs to be expanded
    for CXXCPP in "$CXX -E" "/lib/cpp"
    do
      ac_preproc_ok=false
for ac_cxx_preproc_warn_flag in '' yes
do
  # Use a header file that comes with gcc, so configuring glibc
  # with a fresh cross-compiler works.
  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
  # <limits.h> exists even on freestanding compilers.
  # On the NeXT, cc -E runs the code through the compiler's parser,
  # not just through cpp. "Syntax error" is here to catch this case.
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
		     Syntax error
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_cxx_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  :
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  # Broken: fails on valid input.
continue
fi

rm -f conftest.err conftest.$ac_ext

  # OK, works on sane cases.  Now check whether nonexistent headers
  # can be detected and how.
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <ac_nonexistent.h>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_cxx_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  # Broken: success on invalid input.
continue
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  # Passes both tests.
ac_preproc_ok=:
break
fi

rm -f conftest.err conftest.$ac_ext

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

    done
    ac_cv_prog_CXXCPP=$CXXCPP

fi
  CXXCPP=$ac_cv_prog_CXXCPP
else
  ac_cv_prog_CXXCPP=$CXXCPP
fi
{ echo "$as_me:$LINENO: result: $CXXCPP" >&5
echo "${ECHO_T}$CXXCPP" >&6; }
ac_preproc_ok=false
for ac_cxx_preproc_warn_flag in '' yes
do
  # Use a header file that comes with gcc, so configuring glibc
  # with a fresh cross-compiler works.
  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
  # <limits.h> exists even on freestanding compilers.
  # On the NeXT, cc -E runs the code through the compiler's parser,
  # not just through cpp. "Syntax error" is here to catch this case.
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
		     Syntax error
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_cxx_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  :
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  # Broken: fails on valid input.
continue
fi

rm -f conftest.err conftest.$ac_ext

  # OK, works on sane cases.  Now check whether nonexistent headers
  # can be detected and how.
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <ac_nonexistent.h>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_cxx_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  # Broken: success on invalid input.
continue
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  # Passes both tests.
ac_preproc_ok=:
break
fi

rm -f conftest.err conftest.$ac_ext

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

ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu


cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
""
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_cxx_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  :
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f conftest.err conftest.$ac_ext
fi

if test -n "$enable_sgistl" && "$enable_sgistl" != "no"; then
	if test "$_os" = "IRIX" -o "$_os" = "IRIX64"; then
		{ echo "$as_me:$LINENO: checking for SGI STL" >&5
echo $ECHO_N "checking for SGI STL... $ECHO_C" >&6; }
		if test -d /usr/include/CC ; then
			{ echo "$as_me:$LINENO: result: yes." >&5
echo "${ECHO_T}yes." >&6; }

		else
			{ echo "$as_me:$LINENO: result: not found." >&5
echo "${ECHO_T}not found." >&6; }
		fi
	else
		{ { echo "$as_me:$LINENO: error: Option --enable-sgistl is only valid for IRIX" >&5
echo "$as_me: error: Option --enable-sgistl is only valid for IRIX" >&2;}
   { (exit 1); exit 1; }; }
	fi
else

   { echo "$as_me:$LINENO: checking for STLport4 headers" >&5
echo $ECHO_N "checking for STLport4 headers... $ECHO_C" >&6; }
   STLPORT4=""
   USE_SYSTEM_STL=""
   if test "$WITH_STLPORT" = "yes"; then
      { echo "$as_me:$LINENO: result: using internal stlport." >&5
echo "${ECHO_T}using internal stlport." >&6; }
   elif test "$WITH_STLPORT" = "no"; then
      { echo "$as_me:$LINENO: result: use system STL instead, Warning breaks your ABI compatability!" >&5
echo "${ECHO_T}use system STL instead, Warning breaks your ABI compatability!" >&6; }
      USE_SYSTEM_STL="YES"
   else
      STLPORT4=$WITH_STLPORT
      if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then
         cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$STLPORT4/stlport/hash_map
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_cxx_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  { echo "$as_me:$LINENO: result: checked." >&5
echo "${ECHO_T}checked." >&6; }
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  { { echo "$as_me:$LINENO: error: STLport4 headers not found." >&5
echo "$as_me: error: STLport4 headers not found." >&2;}
   { (exit 1); exit 1; }; }
fi

rm -f conftest.err conftest.$ac_ext
      else
                  if test -f "$STLPORT4/stlport/hash_map"; then
            { echo "$as_me:$LINENO: result: checked." >&5
echo "${ECHO_T}checked." >&6; }
         else
            { { echo "$as_me:$LINENO: error: STLport4 headers not found." >&5
echo "$as_me: error: STLport4 headers not found." >&2;}
   { (exit 1); exit 1; }; }
         fi
      fi
      if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then
         { echo "$as_me:$LINENO: checking for STLport4 libraries" >&5
echo $ECHO_N "checking for STLport4 libraries... $ECHO_C" >&6; }
         if test "$_os" = "SunOS"; then
		      if test -f "$STLPORT4/lib/libstlport_sunpro.so"; then
			      { echo "$as_me:$LINENO: result: checked" >&5
echo "${ECHO_T}checked" >&6; }
		      else
			      { { echo "$as_me:$LINENO: error: STLport4 libraries not found" >&5
echo "$as_me: error: STLport4 libraries not found" >&2;}
   { (exit 1); exit 1; }; }
		      fi
	      elif test "$_os" = "Darwin"; then
		      if test -f "$STLPORT4/lib/libstlport_gcc.dylib"; then
			      { echo "$as_me:$LINENO: result: checked" >&5
echo "${ECHO_T}checked" >&6; }
		      else
			      { { echo "$as_me:$LINENO: error: STLport4 libraries not found" >&5
echo "$as_me: error: STLport4 libraries not found" >&2;}
   { (exit 1); exit 1; }; }
		      fi
	      elif test "$_os" = "IRIX" -o "$_os" = "IRIX64"; then
		      if test -f "$STLPORT4/lib/libstlport_mipspro_41.so"; then
			      { echo "$as_me:$LINENO: result: checked" >&5
echo "${ECHO_T}checked" >&6; }
			   else
				   if test -f "$STLPORT4/lib/libstlport_gcc.so"; then
					   { echo "$as_me:$LINENO: result: checked" >&5
echo "${ECHO_T}checked" >&6; }
				   else
					   { { echo "$as_me:$LINENO: error: STLport4 libraries not found" >&5
echo "$as_me: error: STLport4 libraries not found" >&2;}
   { (exit 1); exit 1; }; }
				   fi
			   fi
		   else
			   if test -f "$STLPORT4/lib/libstlport_gcc.so"; then
				   { echo "$as_me:$LINENO: result: checked" >&5
echo "${ECHO_T}checked" >&6; }
			   else
				   { { echo "$as_me:$LINENO: error: STLport4 libraries not found" >&5
echo "$as_me: error: STLport4 libraries not found" >&2;}
   { (exit 1); exit 1; }; }
			   fi
		   fi
	   fi
   fi
fi

if test -z "$STLPORT4"; then
  STLPORT4="NO_STLPORT4"
fi



{ echo "$as_me:$LINENO: checking which memory allocator to use" >&5
echo $ECHO_N "checking which memory allocator to use... $ECHO_C" >&6; }
if test "$with_alloc" = "system"; then
    { echo "$as_me:$LINENO: result: system" >&5
echo "${ECHO_T}system" >&6; }
    ALLOC="SYS_ALLOC";




for ac_func in malloc realloc calloc free
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
{ echo "$as_me:$LINENO: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
#define $ac_func innocuous_$ac_func

/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.
    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
    <limits.h> exists even on freestanding compilers.  */

#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif

#undef $ac_func

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char $ac_func ();
/* 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
#endif

int
main ()
{
return $ac_func ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  eval "$as_ac_var=yes"
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	eval "$as_ac_var=no"
fi

rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
ac_res=`eval echo '${'$as_ac_var'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&6; }
if test `eval echo '${'$as_ac_var'}'` = yes; then
  cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF

fi
done

fi
if test "$with_alloc" = "tcmalloc"; then
    { echo "$as_me:$LINENO: result: tcmalloc" >&5
echo "${ECHO_T}tcmalloc" >&6; }
    if ! echo $build_cpu | grep -E 'i[3456]86' 2>/dev/null >/dev/null; then
        { { echo "$as_me:$LINENO: error: tcmalloc only available/usable on ix86" >&5
echo "$as_me: error: tcmalloc only available/usable on ix86" >&2;}
   { (exit 1); exit 1; }; }
    fi

{ echo "$as_me:$LINENO: checking for malloc in -ltcmalloc" >&5
echo $ECHO_N "checking for malloc in -ltcmalloc... $ECHO_C" >&6; }
if test "${ac_cv_lib_tcmalloc_malloc+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-ltcmalloc  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char malloc ();
int
main ()
{
return malloc ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_tcmalloc_malloc=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_lib_tcmalloc_malloc=no
fi

rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ echo "$as_me:$LINENO: result: $ac_cv_lib_tcmalloc_malloc" >&5
echo "${ECHO_T}$ac_cv_lib_tcmalloc_malloc" >&6; }
if test $ac_cv_lib_tcmalloc_malloc = yes; then
  cat >>confdefs.h <<_ACEOF
#define HAVE_LIBTCMALLOC 1
_ACEOF

  LIBS="-ltcmalloc $LIBS"

else
  { { echo "$as_me:$LINENO: error: tcmalloc not found or functional. Install the Google Profiling Tools" >&5
echo "$as_me: error: tcmalloc not found or functional. Install the Google Profiling Tools" >&2;}
   { (exit 1); exit 1; }; }
fi

    ALLOC="TCMALLOC";
fi
if test "$with_alloc" = "internal" -o -z "$with_alloc"; then
   { echo "$as_me:$LINENO: result: internal" >&5
echo "${ECHO_T}internal" >&6; }
fi


if test "$USE_SYSTEM_STL" = "YES"; then
   { echo "$as_me:$LINENO: checking if hash_map will be in __gnu_cxx namespace" >&5
echo $ECHO_N "checking if hash_map will be in __gnu_cxx namespace... $ECHO_C" >&6; }

   ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu

   cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <ext/hash_map>
using namespace __gnu_cxx;

int
main ()
{
hash_map<int, int> t; return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_cxx_have_ext_hash_map=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_cxx_have_ext_hash_map=no
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
   ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu

   if test "$ac_cv_cxx_have_ext_hash_map" = "no"; then
      { { echo "$as_me:$LINENO: error: Can't find hash_map. Try with stlport enabled" >&5
echo "$as_me: error: Can't find hash_map. Try with stlport enabled" >&2;}
   { (exit 1); exit 1; }; }
   else
      { echo "$as_me:$LINENO: result: $ac_cv_cxx_have_ext_hash_map" >&5
echo "${ECHO_T}$ac_cv_cxx_have_ext_hash_map" >&6; }
   fi
fi


{ echo "$as_me:$LINENO: checking whether to add custom build version" >&5
echo $ECHO_N "checking whether to add custom build version... $ECHO_C" >&6; }
if test "z$with_build_version" != "z"; then
   BUILD_VER_STRING=$with_build_version
   { echo "$as_me:$LINENO: result: yes, $BUILD_VER_STRING" >&5
echo "${ECHO_T}yes, $BUILD_VER_STRING" >&6; }
else
   BUILD_VER_STRING=
   { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


{ echo "$as_me:$LINENO: checking whether to build with Java support" >&5
echo $ECHO_N "checking whether to build with Java support... $ECHO_C" >&6; }
if test "$WITH_JAVA" != "no"; then
   { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
   SOLAR_JAVA="TRUE"
   NEEDXSLTPROC="no"
else
   { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
   SOLAR_JAVA=""
   NEEDXSLTPROC="yes"

   { echo "$as_me:$LINENO: WARNING: building without java will mean some features will not be available" >&5
echo "$as_me: WARNING: building without java will mean some features will not be available" >&2;}
   echo "building without java will mean some features will not be available" >>warn
fi


if test "$_os" = "Linux" && test "$build_cpu" = "powerpc"; then
   # IBMs JDK needs this...
   JITC_PROCESSOR_TYPE=6
   export JITC_PROCESSOR_TYPE
fi

LANG=""
if test "$_os" = "Linux" && echo $build_cpu | grep -E 'i[3456]86' 2>/dev/null >/dev/null; then
   # avoid IBM JRE bailout when runnig in UTF-8 shells
   LANG="en_US"
   export LANG
fi


if test -z "$with_jdk_home"; then
    _jdk_home=`./oowintool --jdk-home`
    if test -d "$_jdk_home"; then
        with_jdk_home="$_jdk_home"
    fi
fi

if test "$SOLAR_JAVA" != ""; then
   JAVA_HOME=; export JAVA_HOME
   if test -z "$with_jdk_home"; then
      # Extract the first word of "$WITH_JAVA", so it can be a program name with args.
set dummy $WITH_JAVA; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path_JAVAINTERPRETER+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $JAVAINTERPRETER in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_JAVAINTERPRETER="$JAVAINTERPRETER" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_JAVAINTERPRETER="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
JAVAINTERPRETER=$ac_cv_path_JAVAINTERPRETER
if test -n "$JAVAINTERPRETER"; then
  { echo "$as_me:$LINENO: result: $JAVAINTERPRETER" >&5
echo "${ECHO_T}$JAVAINTERPRETER" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


   else
      _java_path="$with_jdk_home/bin/$WITH_JAVA"
            if test -x "$_java_path"; then
         JAVAINTERPRETER=$_java_path
      else
         { { echo "$as_me:$LINENO: error: $_java_path not found set with_jdk_home" >&5
echo "$as_me: error: $_java_path not found set with_jdk_home" >&2;}
   { (exit 1); exit 1; }; }
      fi
   fi
   if test "$_os" = "WINNT"; then
      if test x`echo "$JAVAINTERPRETER" | grep -i '\.exe$'` = x; then
          JAVAINTERPRETER="${JAVAINTERPRETER}.exe"
      fi
      JAVAINTERPRETER=`cygpath -d "$JAVAINTERPRETER"`
      JAVAINTERPRETER=`cygpath -u "$JAVAINTERPRETER"`
   fi
fi

if test "$SOLAR_JAVA" != ""; then
   { echo "$as_me:$LINENO: checking the installed JDK" >&5
echo $ECHO_N "checking the installed JDK... $ECHO_C" >&6; }
   if test "$JAVAINTERPRETER"; then
            if test `$JAVAINTERPRETER -version 2>&1 | grep -c "Kaffe"` -gt 0; then

                KAFFE_VER=`$JAVAINTERPRETER -version 2>&1 | $EGREP "  Version:" | $SED -r "s/.*  Version: ([0-9\.]*).*/\1/"`
        if test -z "$KAFFE_VER"; then
          { { echo "$as_me:$LINENO: error: looks like Kaffe but version detection failed" >&5
echo "$as_me: error: looks like Kaffe but version detection failed" >&2;}
   { (exit 1); exit 1; }; }
        fi
        _kaffe_ver=`echo "$KAFFE_VER" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'`
        if test "$_kaffe_ver" -lt 10100; then
           { { echo "$as_me:$LINENO: error: Kaffe is too old ($KAFFE_VER - $_kaffe_ver), you need at least 1.1.0" >&5
echo "$as_me: error: Kaffe is too old ($KAFFE_VER - $_kaffe_ver), you need at least 1.1.0" >&2;}
   { (exit 1); exit 1; }; }
        fi
        JDK=kaffe


        { echo "$as_me:$LINENO: result: checked (Kaffe $KAFFE_VER)" >&5
echo "${ECHO_T}checked (Kaffe $KAFFE_VER)" >&6; }
        { echo "$as_me:$LINENO: WARNING: EXPERIMENTAL: Kaffe is not a full JDK replacement - some projects will fail to compile" >&5
echo "$as_me: WARNING: EXPERIMENTAL: Kaffe is not a full JDK replacement - some projects will fail to compile" >&2;}
        echo "EXPERIMENTAL: Kaffe is not a full JDK replacement - some projects will fail to compile" >>warn
        JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*java,,p"`
      elif test `$JAVAINTERPRETER --version 2>&1 | grep -c "GNU libgcj"` -gt 0; then
        JDK=gcj
        { echo "$as_me:$LINENO: result: checked (gcj)" >&5
echo "${ECHO_T}checked (gcj)" >&6; }
        JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*$WITH_JAVA,,p"`
      elif test `$JAVAINTERPRETER -version 2>&1 | awk '{ print }' | grep -c "BEA"` -gt 0; then
        JDK=bea

                _jdk=`$JAVAINTERPRETER -version 2>&1 | $AWK -F'"' '{ print \$2 }' | $SED s/[-A-Za-z]*//`
        _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'`

	if test "$_jdk_ver" -lt 10402; then
	     { { echo "$as_me:$LINENO: error: JDK is too old, you need at least BEA JDK 1.4.2" >&5
echo "$as_me: error: JDK is too old, you need at least BEA JDK 1.4.2" >&2;}
   { (exit 1); exit 1; }; }
	fi

        { echo "$as_me:$LINENO: result: checked (BEA JDK $_jdk)" >&5
echo "${ECHO_T}checked (BEA JDK $_jdk)" >&6; }

        if test "$with_jdk_home" = ""; then
             { { echo "$as_me:$LINENO: error: In order to successfully build OpenOffice.org using the BEA JDK," >&5
echo "$as_me: error: In order to successfully build OpenOffice.org using the BEA JDK," >&2;}
   { (exit 1); exit 1; }; }
	     { { echo "$as_me:$LINENO: error: you must use the \"--with-jdk-home\" configure option explicitly" >&5
echo "$as_me: error: you must use the \"--with-jdk-home\" configure option explicitly" >&2;}
   { (exit 1); exit 1; }; }
        fi

	{ echo "$as_me:$LINENO: WARNING: A bug in certain BEA JREs can prevent you from successfully compiling some modules" >&5
echo "$as_me: WARNING: A bug in certain BEA JREs can prevent you from successfully compiling some modules" >&2;}
	echo "A bug in certain BEA JREs can prevent you from successfully compiling some modules" >>warn

        JAVA_HOME=$with_jdk_home

      elif test `$JAVAINTERPRETER -version 2>&1 | awk '{ print }' | grep -c "IBM"` -gt 0; then
        JDK=ibm

                _jdk=`$JAVAINTERPRETER -version 2>&1 | $AWK -F'"' '{ print \$2 }' | $SED s/[-A-Za-z]*//`
        _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'`

        if test "$_jdk_ver" -lt 10301; then
             { { echo "$as_me:$LINENO: error: IBM JDK is too old, you need at least 1.3.1" >&5
echo "$as_me: error: IBM JDK is too old, you need at least 1.3.1" >&2;}
   { (exit 1); exit 1; }; }
        fi

        { echo "$as_me:$LINENO: result: checked (IBM JDK $_jdk)" >&5
echo "${ECHO_T}checked (IBM JDK $_jdk)" >&6; }

        if test "$with_jdk_home" = ""; then
             { { echo "$as_me:$LINENO: error: In order to successfully build OpenOffice.org using the IBM JDK," >&5
echo "$as_me: error: In order to successfully build OpenOffice.org using the IBM JDK," >&2;}
   { (exit 1); exit 1; }; }
	     { { echo "$as_me:$LINENO: error: you must use the \"--with-jdk-home\" configure option explicitly" >&5
echo "$as_me: error: you must use the \"--with-jdk-home\" configure option explicitly" >&2;}
   { (exit 1); exit 1; }; }
        fi
        if test "$_jdk_ver" -gt 10402; then
             { echo "$as_me:$LINENO: WARNING: IBM JDK might be too recent, maximum version tested is 1.4.2" >&5
echo "$as_me: WARNING: IBM JDK might be too recent, maximum version tested is 1.4.2" >&2;}
             echo "IBM JDK might be too recent, maximum version tested is 1.4.2" >>warn
        fi

        JAVA_HOME=$with_jdk_home

      else
        JDK=sun

                _jdk=`$JAVAINTERPRETER -version 2>&1 | $AWK -F'"' '{ print \$2 }' | $SED s/[-A-Za-z]*//`
        _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'`

        if test "$_jdk_ver" -lt 10300; then
             { { echo "$as_me:$LINENO: error: JDK is too old, you need at least 1.3" >&5
echo "$as_me: error: JDK is too old, you need at least 1.3" >&2;}
   { (exit 1); exit 1; }; }
        fi
        { echo "$as_me:$LINENO: result: checked (JDK $_jdk)" >&5
echo "${ECHO_T}checked (JDK $_jdk)" >&6; }
        JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*java,,p"`
        if test "$_os" = "WINNT"; then
          JAVA_HOME=`echo $JAVA_HOME | $SED "s,\.[eE][xX][eE]$,,"`
        fi
      fi
   else
      { { echo "$as_me:$LINENO: error: JAVA not found. You need at least jdk-1.3, Kaffee 1.01, or gcj-4" >&5
echo "$as_me: error: JAVA not found. You need at least jdk-1.3, Kaffee 1.01, or gcj-4" >&2;}
   { (exit 1); exit 1; }; }
   fi
else
      JAVA_HOME=NO_JAVA_HOME ; export JAVA_HOME
fi

if test "$SOLAR_JAVA" != ""; then
    if test "$JDK" = "gcj"; then
        javacompiler=`echo $WITH_JAVA | $SED -e "s/gij/gcj/g" | $SED -e "s/java/javac/g"`
    else
        javacompiler="javac"
    fi
    if test -z "$with_jdk_home"; then
        # Extract the first word of "$javacompiler", so it can be a program name with args.
set dummy $javacompiler; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path_JAVACOMPILER+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $JAVACOMPILER in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_JAVACOMPILER="$JAVACOMPILER" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_JAVACOMPILER="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
JAVACOMPILER=$ac_cv_path_JAVACOMPILER
if test -n "$JAVACOMPILER"; then
  { echo "$as_me:$LINENO: result: $JAVACOMPILER" >&5
echo "${ECHO_T}$JAVACOMPILER" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


    else
        _javac_path="$with_jdk_home/bin/$javacompiler"
                if test -x "$_javac_path"; then
            JAVACOMPILER=$_javac_path
        fi
    fi
    if test -z "$JAVACOMPILER"; then
      { { echo "$as_me:$LINENO: error: $javacompiler not found set with_jdk_home" >&5
echo "$as_me: error: $javacompiler not found set with_jdk_home" >&2;}
   { (exit 1); exit 1; }; }
    fi
    if test "$_os" = "WINNT"; then
       if test x`echo "$JAVACOMPILER" | grep -i '\.exe$'` = x; then
          JAVACOMPILER="${JAVACOMPILER}.exe"
       fi
       JAVACOMPILER=`cygpath -d "$JAVACOMPILER"`
       JAVACOMPILER=`cygpath -u "$JAVACOMPILER"`
    fi
fi

JAVACISGCJ=""
if test "$SOLAR_JAVA" != ""; then
    if test `$JAVACOMPILER --version 2>&1 | grep -c "GCC"` -gt 0; then
        JAVACISGCJ="yes"
    fi
fi


if test "$SOLAR_JAVA" != ""; then
    if test -z "$with_jdk_home"; then
        # Extract the first word of "javadoc", so it can be a program name with args.
set dummy javadoc; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path_JAVADOC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $JAVADOC in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_JAVADOC="$JAVADOC" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_JAVADOC="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
JAVADOC=$ac_cv_path_JAVADOC
if test -n "$JAVADOC"; then
  { echo "$as_me:$LINENO: result: $JAVADOC" >&5
echo "${ECHO_T}$JAVADOC" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


    else
        _javadoc_path="$with_jdk_home/bin/javadoc"
                if test -x "$_javadoc_path"; then
            JAVADOC=$_javadoc_path
        else
            # Extract the first word of "javadoc", so it can be a program name with args.
set dummy javadoc; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path_JAVADOC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $JAVADOC in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_JAVADOC="$JAVADOC" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_JAVADOC="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
JAVADOC=$ac_cv_path_JAVADOC
if test -n "$JAVADOC"; then
  { echo "$as_me:$LINENO: result: $JAVADOC" >&5
echo "${ECHO_T}$JAVADOC" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


        fi
    fi
    if test -z "$JAVADOC"; then
      { { echo "$as_me:$LINENO: error: $_javadoc_path not found set with_jdk_home" >&5
echo "$as_me: error: $_javadoc_path not found set with_jdk_home" >&2;}
   { (exit 1); exit 1; }; }
    fi
    if test "$_os" = "WINNT"; then
        if test x`echo "$JAVADOC" | grep -i '\.exe$'` = x; then
            JAVADOC="${JAVADOC}.exe"
        fi
        JAVADOC=`cygpath -d "$JAVADOC"`
        JAVADOC=`cygpath -u "$JAVADOC"`
    fi
fi

if test "$SOLAR_JAVA" != ""; then
    if test "$JDK" != "gcj"; then
      # check if JAVA_HOME was (maybe incorrectly?) set automatically to /usr
      if test "$JAVA_HOME" = "/usr" -a "x$with_jdk_home" = "x"; then

         if basename $(readlink $(readlink $JAVACOMPILER)) >/dev/null 2>/dev/null; then
          # try to recover first by looking whether we have a alternatives
          # system as in Debian or newer SuSEs where following /usr/bin/javac
          # over /etc/alternatives/javac leads to the right bindir where we
          # just need to strip a bit away to get a valid JAVA_HOME
          JAVA_HOME=$(readlink $(readlink $JAVACOMPILER) | $SED -e s,/bin/javac$,,)
         else
          # else warn
          { echo "$as_me:$LINENO: WARNING: JAVA_HOME is set to /usr - this is very likely to be incorrect" >&5
echo "$as_me: WARNING: JAVA_HOME is set to /usr - this is very likely to be incorrect" >&2;}
          { echo "$as_me:$LINENO: WARNING: if this is the case, please inform the correct JAVA_HOME with --with-jdk-home" >&5
echo "$as_me: WARNING: if this is the case, please inform the correct JAVA_HOME with --with-jdk-home" >&2;}
          echo "JAVA_HOME is set to /usr - this is very likely to be incorrect" >> warn
          echo "if this is the case, please inform the correct JAVA_HOME with --with-jdk-home" >> warn
          fi
      fi
      # now check if $JAVA_HOME is really valid
      if test ! -d "$JAVA_HOME/jre" -a "x$with_jdk_home" = "x"; then
         { echo "$as_me:$LINENO: WARNING: JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script" >&5
echo "$as_me: WARNING: JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script" >&2;}
         { echo "$as_me:$LINENO: WARNING: attempted to find JAVA_HOME automatically, but apparently it failed" >&5
echo "$as_me: WARNING: attempted to find JAVA_HOME automatically, but apparently it failed" >&2;}
         { echo "$as_me:$LINENO: WARNING: in case JAVA_HOME is incorrectly set, some projects with not be built correctly" >&5
echo "$as_me: WARNING: in case JAVA_HOME is incorrectly set, some projects with not be built correctly" >&2;}
         echo "JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script" >> warn
         echo "attempted to find JAVA_HOME automatically, but apparently it failed" >> warn
         echo "in case JAVA_HOME is incorrectly set, some projects with not be built correctly" >> warn
      fi
    fi
fi

if test "$JDK" = "gcj"; then
   save_CFLAGS=$CFLAGS
   save_LDFLAGS=$LDFLAGS
   CFLAGS="$CFLAGS -I$JAVA_HOME/include"
   LDFLAGS="$LDFLAGS -L$JAVA_HOME/lib -lgcj"
   if test "${ac_cv_header_jni_h+set}" = set; then
  { echo "$as_me:$LINENO: checking for jni.h" >&5
echo $ECHO_N "checking for jni.h... $ECHO_C" >&6; }
if test "${ac_cv_header_jni_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
fi
{ echo "$as_me:$LINENO: result: $ac_cv_header_jni_h" >&5
echo "${ECHO_T}$ac_cv_header_jni_h" >&6; }
else
  # Is the header compilable?
{ echo "$as_me:$LINENO: checking jni.h usability" >&5
echo $ECHO_N "checking jni.h usability... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
#include <jni.h>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_header_compiler=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_header_compiler=no
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6; }

# Is the header present?
{ echo "$as_me:$LINENO: checking jni.h presence" >&5
echo $ECHO_N "checking jni.h presence... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <jni.h>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_cxx_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  ac_header_preproc=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  ac_header_preproc=no
fi

rm -f conftest.err conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6; }

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
  yes:no: )
    { echo "$as_me:$LINENO: WARNING: jni.h: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: jni.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { echo "$as_me:$LINENO: WARNING: jni.h: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: jni.h: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { echo "$as_me:$LINENO: WARNING: jni.h: present but cannot be compiled" >&5
echo "$as_me: WARNING: jni.h: present but cannot be compiled" >&2;}
    { echo "$as_me:$LINENO: WARNING: jni.h:     check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: jni.h:     check for missing prerequisite headers?" >&2;}
    { echo "$as_me:$LINENO: WARNING: jni.h: see the Autoconf documentation" >&5
echo "$as_me: WARNING: jni.h: see the Autoconf documentation" >&2;}
    { echo "$as_me:$LINENO: WARNING: jni.h:     section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: jni.h:     section \"Present But Cannot Be Compiled\"" >&2;}
    { echo "$as_me:$LINENO: WARNING: jni.h: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: jni.h: proceeding with the preprocessor's result" >&2;}
    { echo "$as_me:$LINENO: WARNING: jni.h: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: jni.h: in the future, the compiler will take precedence" >&2;}

    ;;
esac
{ echo "$as_me:$LINENO: checking for jni.h" >&5
echo $ECHO_N "checking for jni.h... $ECHO_C" >&6; }
if test "${ac_cv_header_jni_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_cv_header_jni_h=$ac_header_preproc
fi
{ echo "$as_me:$LINENO: result: $ac_cv_header_jni_h" >&5
echo "${ECHO_T}$ac_cv_header_jni_h" >&6; }

fi
if test $ac_cv_header_jni_h = yes; then
  :
else
  { { echo "$as_me:$LINENO: error: jni.h could not be found. Mismatch between gcc and libgcj or libgcj-devel missing?" >&5
echo "$as_me: error: jni.h could not be found. Mismatch between gcc and libgcj or libgcj-devel missing?" >&2;}
   { (exit 1); exit 1; }; }
fi



   { echo "$as_me:$LINENO: checking for JAWT_GetAWT in -lgcjawt" >&5
echo $ECHO_N "checking for JAWT_GetAWT in -lgcjawt... $ECHO_C" >&6; }
if test "${ac_cv_lib_gcjawt_JAWT_GetAWT+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lgcjawt  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char JAWT_GetAWT ();
int
main ()
{
return JAWT_GetAWT ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_gcjawt_JAWT_GetAWT=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_lib_gcjawt_JAWT_GetAWT=no
fi

rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ echo "$as_me:$LINENO: result: $ac_cv_lib_gcjawt_JAWT_GetAWT" >&5
echo "${ECHO_T}$ac_cv_lib_gcjawt_JAWT_GetAWT" >&6; }
if test $ac_cv_lib_gcjawt_JAWT_GetAWT = yes; then
   AWTLIB=-lgcjawt
fi

   if test -z "$AWTLIB"; then
      { echo "$as_me:$LINENO: checking for JAWT_GetAWT in -ljawt" >&5
echo $ECHO_N "checking for JAWT_GetAWT in -ljawt... $ECHO_C" >&6; }
if test "${ac_cv_lib_jawt_JAWT_GetAWT+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-ljawt  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char JAWT_GetAWT ();
int
main ()
{
return JAWT_GetAWT ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_jawt_JAWT_GetAWT=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_lib_jawt_JAWT_GetAWT=no
fi

rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ echo "$as_me:$LINENO: result: $ac_cv_lib_jawt_JAWT_GetAWT" >&5
echo "${ECHO_T}$ac_cv_lib_jawt_JAWT_GetAWT" >&6; }
if test $ac_cv_lib_jawt_JAWT_GetAWT = yes; then
   AWTLIB=-ljawt
fi

   fi
   if test -z "$AWTLIB"; then
      { { echo "$as_me:$LINENO: error: either -lgcjawt or -ljawt with JAWT_GetAWT is required to build wih gcj" >&5
echo "$as_me: error: either -lgcjawt or -ljawt with JAWT_GetAWT is required to build wih gcj" >&2;}
   { (exit 1); exit 1; }; }
   fi


   CFLAGS=$save_CFLAGS
   LDFLAGS=$save_LDFLAGS
fi

if test "$SOLAR_JAVA" != ""; then
  { echo "$as_me:$LINENO: checking whether to enable gcj aot compilation" >&5
echo $ECHO_N "checking whether to enable gcj aot compilation... $ECHO_C" >&6; }
  if test -n "$enable_gcjaot" && test "$enable_gcjaot" != "no"; then
     { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
     if test `echo $WITH_JAVA | grep -c "gij"` -eq 0; then
        gcjaot="gcj"
     else
        gcjaot=`echo $WITH_JAVA | $SED -e "s/gij/gcj/g"`
     fi
     { echo "$as_me:$LINENO: result: $gcjaot" >&5
echo "${ECHO_T}$gcjaot" >&6; }
     if test -n "$with_jdk_home"; then
        _javac_path="$with_jdk_home/bin/$gcjaot"
                if test -x "$_javac_path"; then
           JAVAAOTCOMPILER=$_javac_path
        fi
     fi
     if test -z "$JAVAAOTCOMPILER"; then
        # Extract the first word of "$gcjaot", so it can be a program name with args.
set dummy $gcjaot; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path_JAVAAOTCOMPILER+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $JAVAAOTCOMPILER in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_JAVAAOTCOMPILER="$JAVAAOTCOMPILER" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_JAVAAOTCOMPILER="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
JAVAAOTCOMPILER=$ac_cv_path_JAVAAOTCOMPILER
if test -n "$JAVAAOTCOMPILER"; then
  { echo "$as_me:$LINENO: result: $JAVAAOTCOMPILER" >&5
echo "${ECHO_T}$JAVAAOTCOMPILER" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


     fi
     if test -z "$JAVAAOTCOMPILER"; then
        { echo "$as_me:$LINENO: WARNING: $gcjaot not found, set with_jdk_home" >&5
echo "$as_me: WARNING: $gcjaot not found, set with_jdk_home" >&2;}
     fi
  else
     { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
  fi
fi








if test "$NEEDXSLTPROC" = "no" && test -z "$enable_xsltproc"; then
   XSLTPROC=NO_XSLTPROC
else
      # Extract the first word of "xsltproc", so it can be a program name with args.
set dummy xsltproc; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path_XSLTPROC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $XSLTPROC in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  test -z "$ac_cv_path_XSLTPROC" && ac_cv_path_XSLTPROC="no"
  ;;
esac
fi
XSLTPROC=$ac_cv_path_XSLTPROC
if test -n "$XSLTPROC"; then
  { echo "$as_me:$LINENO: result: $XSLTPROC" >&5
echo "${ECHO_T}$XSLTPROC" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


   if test "$XSLTPROC" = "no"; then
      { { echo "$as_me:$LINENO: error: xsltproc is required" >&5
echo "$as_me: error: xsltproc is required" >&2;}
   { (exit 1); exit 1; }; }
   fi
   # somehow AC_MSG_WARN won't work...
   echo "to prevent incompatibilities between internal libxml2 and xsltproc, the office will be build with system-libxml"
   echo "to prevent incompatibilities between internal libxml2 and xsltproc, the office will be build with system-libxml" >> warn
   with_system_libxml=yes
fi


if test "$_os" = "Linux" -o "$_os" = "FreeBSD" -o "$_os" = "NetBSD" ; then
   ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
  CPP=
fi
if test -z "$CPP"; then
  if test "${ac_cv_prog_CPP+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
      # Double quotes because CPP needs to be expanded
    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
    do
      ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
do
  # Use a header file that comes with gcc, so configuring glibc
  # with a fresh cross-compiler works.
  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
  # <limits.h> exists even on freestanding compilers.
  # On the NeXT, cc -E runs the code through the compiler's parser,
  # not just through cpp. "Syntax error" is here to catch this case.
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
		     Syntax error
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  :
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  # Broken: fails on valid input.
continue
fi

rm -f conftest.err conftest.$ac_ext

  # OK, works on sane cases.  Now check whether nonexistent headers
  # can be detected and how.
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <ac_nonexistent.h>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  # Broken: success on invalid input.
continue
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  # Passes both tests.
ac_preproc_ok=:
break
fi

rm -f conftest.err conftest.$ac_ext

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

    done
    ac_cv_prog_CPP=$CPP

fi
  CPP=$ac_cv_prog_CPP
else
  ac_cv_prog_CPP=$CPP
fi
{ echo "$as_me:$LINENO: result: $CPP" >&5
echo "${ECHO_T}$CPP" >&6; }
ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
do
  # Use a header file that comes with gcc, so configuring glibc
  # with a fresh cross-compiler works.
  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
  # <limits.h> exists even on freestanding compilers.
  # On the NeXT, cc -E runs the code through the compiler's parser,
  # not just through cpp. "Syntax error" is here to catch this case.
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
		     Syntax error
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  :
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  # Broken: fails on valid input.
continue
fi

rm -f conftest.err conftest.$ac_ext

  # OK, works on sane cases.  Now check whether nonexistent headers
  # can be detected and how.
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <ac_nonexistent.h>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_c_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  # Broken: success on invalid input.
continue
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  # Passes both tests.
ac_preproc_ok=:
break
fi

rm -f conftest.err conftest.$ac_ext

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

ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu

fi
if test "$_os" = "Linux" -o "$_os" = "FreeBSD" -o "$_os" = "NetBSD" ; then
   ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
{ echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5
echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6; }
if test -z "$CXXCPP"; then
  if test "${ac_cv_prog_CXXCPP+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
      # Double quotes because CXXCPP needs to be expanded
    for CXXCPP in "$CXX -E" "/lib/cpp"
    do
      ac_preproc_ok=false
for ac_cxx_preproc_warn_flag in '' yes
do
  # Use a header file that comes with gcc, so configuring glibc
  # with a fresh cross-compiler works.
  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
  # <limits.h> exists even on freestanding compilers.
  # On the NeXT, cc -E runs the code through the compiler's parser,
  # not just through cpp. "Syntax error" is here to catch this case.
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
		     Syntax error
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_cxx_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  :
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  # Broken: fails on valid input.
continue
fi

rm -f conftest.err conftest.$ac_ext

  # OK, works on sane cases.  Now check whether nonexistent headers
  # can be detected and how.
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <ac_nonexistent.h>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_cxx_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  # Broken: success on invalid input.
continue
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  # Passes both tests.
ac_preproc_ok=:
break
fi

rm -f conftest.err conftest.$ac_ext

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

    done
    ac_cv_prog_CXXCPP=$CXXCPP

fi
  CXXCPP=$ac_cv_prog_CXXCPP
else
  ac_cv_prog_CXXCPP=$CXXCPP
fi
{ echo "$as_me:$LINENO: result: $CXXCPP" >&5
echo "${ECHO_T}$CXXCPP" >&6; }
ac_preproc_ok=false
for ac_cxx_preproc_warn_flag in '' yes
do
  # Use a header file that comes with gcc, so configuring glibc
  # with a fresh cross-compiler works.
  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
  # <limits.h> exists even on freestanding compilers.
  # On the NeXT, cc -E runs the code through the compiler's parser,
  # not just through cpp. "Syntax error" is here to catch this case.
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
		     Syntax error
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_cxx_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  :
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  # Broken: fails on valid input.
continue
fi

rm -f conftest.err conftest.$ac_ext

  # OK, works on sane cases.  Now check whether nonexistent headers
  # can be detected and how.
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <ac_nonexistent.h>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_cxx_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  # Broken: success on invalid input.
continue
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  # Passes both tests.
ac_preproc_ok=:
break
fi

rm -f conftest.err conftest.$ac_ext

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

ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu

fi

# Extract the first word of "dmake", so it can be a program name with args.
set dummy dmake; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path_DMAKE+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $DMAKE in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_DMAKE="$DMAKE" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_DMAKE="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  test -z "$ac_cv_path_DMAKE" && ac_cv_path_DMAKE="no"
  ;;
esac
fi
DMAKE=$ac_cv_path_DMAKE
if test -n "$DMAKE"; then
  { echo "$as_me:$LINENO: result: $DMAKE" >&5
echo "${ECHO_T}$DMAKE" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


if test "$DMAKE" = "no"; then
    BUILD_DMAKE=YES
    echo "dmake will be built on ./bootstrap"
else
    { echo "$as_me:$LINENO: checking whether the found dmake is the right dmake" >&5
echo $ECHO_N "checking whether the found dmake is the right dmake... $ECHO_C" >&6; }
    # we need to find out whether that dmake we found is "our" dmake
    # or the dmake from Sun's Workshop Compiler which is something
    # different
    # This test _should_ work because the one accepts -V (ours) and one
    # (the other) not...
    $DMAKE -V 2>/dev/null | grep 'dmake .* Version .*' >/dev/null
    if test $? -eq 0; then
       BUILD_DMAKE=NO
       { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
       { echo "$as_me:$LINENO: checking the dmake version" >&5
echo $ECHO_N "checking the dmake version... $ECHO_C" >&6; }
       DMAKE_VERSION=`$DMAKE -V | $SED -n 's/.*Version \([0-9.]\+\).*/\1/p'`
       if test "$DMAKE_VERSION" = "4.10"; then
	 { echo "$as_me:$LINENO: result: too old. >= 4.3 is needed. (Your old 4.1 version identifies itself as 4.10, PL 0.)" >&5
echo "${ECHO_T}too old. >= 4.3 is needed. (Your old 4.1 version identifies itself as 4.10, PL 0.)" >&6; }
	 echo "A newer dmake will be built on ./bootstrap"
	 BUILD_DMAKE=YES
       elif test "`echo $DMAKE_VERSION | cut -d'.' -f1`" -gt "4"; then
	 { echo "$as_me:$LINENO: result: OK, >= 4.3" >&5
echo "${ECHO_T}OK, >= 4.3" >&6; }
       elif test "`echo $DMAKE_VERSION | cut -d'.' -f1`" = "4" && \
	    test "`echo $DMAKE_VERSION | cut -d'.' -f2`" -ge "3"; then
	 { echo "$as_me:$LINENO: result: OK, >= 4.3" >&5
echo "${ECHO_T}OK, >= 4.3" >&6; }
       else
	 { echo "$as_me:$LINENO: result: too old. >= 4.3 is needed" >&5
echo "${ECHO_T}too old. >= 4.3 is needed" >&6; }
	 echo "A newer dmake will be built on ./bootstrap"
	 BUILD_DMAKE=YES
       fi
    else
       { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
       echo "dmake will be built on ./bootstrap"
       BUILD_DMAKE=YES
    fi
fi


{ echo "$as_me:$LINENO: checking whether to enable EPM for packing" >&5
echo $ECHO_N "checking whether to enable EPM for packing... $ECHO_C" >&6; }
if test "$_os" != "WINNT" -a \( "z$enable_epm" = "z" -o "$enable_epm" != "no" \) ; then
   { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
            if test "$_os" != "WINNT"; then
      if test -n "$with_epm"; then
	      EPM=$with_epm
      else
         # Extract the first word of "epm", so it can be a program name with args.
set dummy epm; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path_EPM+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $EPM in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_EPM="$EPM" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_EPM="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  test -z "$ac_cv_path_EPM" && ac_cv_path_EPM="no"
  ;;
esac
fi
EPM=$ac_cv_path_EPM
if test -n "$EPM"; then
  { echo "$as_me:$LINENO: result: $EPM" >&5
echo "${ECHO_T}$EPM" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


      fi
      if test "$EPM" = "no" || test "$EPM" = "internal"; then
         echo "EPM will be built."
         BUILD_EPM=YES
         BUILD_TYPE="$BUILD_TYPE EPM"
      else
         # Gentoo has some epm which is something different...
         { echo "$as_me:$LINENO: checking whether the found epm is the right epm" >&5
echo $ECHO_N "checking whether the found epm is the right epm... $ECHO_C" >&6; }
         if $EPM | grep "ESP Package Manager" >/dev/null 2>/dev/null; then
            { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
         else
            { { echo "$as_me:$LINENO: error: no. Install ESP Package Manager (www.easysw.com/epm) and/or specify the path to the right epm" >&5
echo "$as_me: error: no. Install ESP Package Manager (www.easysw.com/epm) and/or specify the path to the right epm" >&2;}
   { (exit 1); exit 1; }; }
         fi
         { echo "$as_me:$LINENO: checking epm version" >&5
echo $ECHO_N "checking epm version... $ECHO_C" >&6; }
         EPM_VERSION=`$EPM | grep 'ESP Package Manager' | cut -d' ' -f4 | $SED -e s/v//`
	 if test "`echo $EPM_VERSION | cut -d'.' -f1`" -gt "3" || \
	       test "`echo $EPM_VERSION | cut -d'.' -f1`" -eq "3" -a "`echo $EPM_VERSION | cut -d'.' -f2`" -ge "7"; then
           { echo "$as_me:$LINENO: result: OK, >= 3.7" >&5
echo "${ECHO_T}OK, >= 3.7" >&6; }
           BUILD_EPM=NO
	        if test "$_os" = "Darwin"; then
               { echo "$as_me:$LINENO: checking which PackageMaker EPM thinks to use" >&5
echo $ECHO_N "checking which PackageMaker EPM thinks to use... $ECHO_C" >&6; }
        	      _pm=`strings $EPM | grep PackageMaker | cut -d" " -f1`
        	      if test "$_pm" = "/Developer/Applications/PackageMaker.app/Contents/MacOS/PackageMaker"; then
          		      { { echo "$as_me:$LINENO: error: $_pm; PackageMaker expected in wrong path. Either patch your epm with the right path (/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker) or use internal patched epm (--with-epm=internal)" >&5
echo "$as_me: error: $_pm; PackageMaker expected in wrong path. Either patch your epm with the right path (/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker) or use internal patched epm (--with-epm=internal)" >&2;}
   { (exit 1); exit 1; }; }
        	      elif test "$_pm" = "/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker"; then
          		    { echo "$as_me:$LINENO: result: $_pm, ok" >&5
echo "${ECHO_T}$_pm, ok" >&6; }
        	      else # we never should get here, but go safe
			          { { echo "$as_me:$LINENO: error: $_pm; PackageMaker expected in unknown path. Either patch your epm with the right path (/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker) or use internal patched epm (--with-epm=internal)" >&5
echo "$as_me: error: $_pm; PackageMaker expected in unknown path. Either patch your epm with the right path (/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker) or use internal patched epm (--with-epm=internal)" >&2;}
   { (exit 1); exit 1; }; }
		          fi
	       fi
	 else
           { echo "$as_me:$LINENO: result: too old. epm >= 3.7 is required." >&5
echo "${ECHO_T}too old. epm >= 3.7 is required." >&6; }
           echo "EPM will be built."
           BUILD_EPM=YES
           BUILD_TYPE="$BUILD_TYPE EPM"
	 fi
      fi
   fi

   # test which package format to use
   { echo "$as_me:$LINENO: checking which package format to use" >&5
echo $ECHO_N "checking which package format to use... $ECHO_C" >&6; }
   # epm supports the following formats:
   # aix - AIX software distribution
   # bsd - FreeBSD, NetBSD, or OpenBSD software distribution
   # depot or swinstall - HP-UX software distribution
   # deb - Debian software distribution
   # inst or tardist - IRIX software distribution
   # osx - MacOS X software distribution
   # pkg - Solaris software distribution
   # rpm - RedHat software distribution
   # setld - Tru64 (setld) software distribution
   # native - "Native" software distribution for the platform
   # portable - Portable software distribution

   # defaults
   case "$_os" in
	Darwin)
		PKGFORMAT=portable
		;;
	SunOS)
		PKGFORMAT=pkg
		;;
	Linux)
      # if building on Debian, default should be deb...
      if test -e /etc/debian_version; then
         PKGFORMAT=deb
      else
         PKGFORMAT=rpm
      fi
		;;
	AIX)
		PKGFORMAT=aix
		;;
	*BSD)
		PKGFORMAT=bsd
		;;
	OSF1)
		PKGFORMAT=setld
		;;
	IRIX)
		PKGFORMAT=tardist
		;;
	# we never should get here since we check the arciecture/os at the beginning,
	# but go sure...
	*)
		{ { echo "$as_me:$LINENO: error: unknown system" >&5
echo "$as_me: error: unknown system" >&2;}
   { (exit 1); exit 1; }; }
   esac
   if test -n "$with_package_format"; then
	for i in $with_package_format; do
		case "$i" in
			aix | bsd | deb | inst | tardist | osx | pkg | rpm | setld | native | portable)
			;;
		*)
			{ { echo "$as_me:$LINENO: error: unsupported format $i. Supported by EPM are:
aix - AIX software distribution
bsd - FreeBSD, NetBSD, or OpenBSD software distribution
depot or swinstall - HP-UX software distribution
deb - Debian software distribution
inst or tardist - IRIX software distribution
osx - MacOS X software distribution
pkg - Solaris software distribution
rpm - RedHat software distribution
setld - Tru64 (setld) software distribution
native - \"Native\" software distribution for the platform
portable - Portable software distribution
			" >&5
echo "$as_me: error: unsupported format $i. Supported by EPM are:
aix - AIX software distribution
bsd - FreeBSD, NetBSD, or OpenBSD software distribution
depot or swinstall - HP-UX software distribution
deb - Debian software distribution
inst or tardist - IRIX software distribution
osx - MacOS X software distribution
pkg - Solaris software distribution
rpm - RedHat software distribution
setld - Tru64 (setld) software distribution
native - \"Native\" software distribution for the platform
portable - Portable software distribution
			" >&2;}
   { (exit 1); exit 1; }; }
			;;
		esac
	done
	PKGFORMAT="$with_package_format"
   fi
   { echo "$as_me:$LINENO: result: $PKGFORMAT" >&5
echo "${ECHO_T}$PKGFORMAT" >&6; }
   if echo "$PKGFORMAT" | $EGREP rpm 2>&1 >/dev/null; then
      { echo "$as_me:$LINENO: checking for rpm" >&5
echo $ECHO_N "checking for rpm... $ECHO_C" >&6; }
      for a in "$RPM" rpmbuild rpm; do
         $a --usage >/dev/null 2> /dev/null
         if test $? -eq 0; then
            RPM=$a
            break
         else
            $a --version >/dev/null 2> /dev/null
            if test $? -eq 0; then
               RPM=$a
               break
            fi
         fi
       done
       if test -z "$RPM" ; then
          { { echo "$as_me:$LINENO: error: not found" >&5
echo "$as_me: error: not found" >&2;}
   { (exit 1); exit 1; }; }
       else
	  RPM_PATH=`which $RPM`
          { echo "$as_me:$LINENO: result: $RPM_PATH" >&5
echo "${ECHO_T}$RPM_PATH" >&6; }
       fi
   fi
   if echo "$PKGFORMAT" | $EGREP deb 2>&1 >/dev/null; then
      # Extract the first word of "dpkg", so it can be a program name with args.
set dummy dpkg; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path_DPKG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $DPKG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_DPKG="$DPKG" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_DPKG="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  test -z "$ac_cv_path_DPKG" && ac_cv_path_DPKG="no"
  ;;
esac
fi
DPKG=$ac_cv_path_DPKG
if test -n "$DPKG"; then
  { echo "$as_me:$LINENO: result: $DPKG" >&5
echo "${ECHO_T}$DPKG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


      if test "$DPKG" = "no"; then
         { { echo "$as_me:$LINENO: error: dpkg needed for deb creation. Install dpkg." >&5
echo "$as_me: error: dpkg needed for deb creation. Install dpkg." >&2;}
   { (exit 1); exit 1; }; }
      fi
   fi
   if echo "PKGFORMAT" | $EGREP osx 2>&1 >/dev/null; then
      if test "$_os" = "Darwin"; then
         { echo "$as_me:$LINENO: checking for PackageMaker availability" >&5
echo $ECHO_N "checking for PackageMaker availability... $ECHO_C" >&6; }
         if ! test -x /Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker; then
            { { echo "$as_me:$LINENO: error: not installed. Please install Apples Dev Tools" >&5
echo "$as_me: error: not installed. Please install Apples Dev Tools" >&2;}
   { (exit 1); exit 1; }; }
         else
            { echo "$as_me:$LINENO: result: ok" >&5
echo "${ECHO_T}ok" >&6; }
         fi
      else
         { { echo "$as_me:$LINENO: error: PackageMaker needed to build OSX packages and you are not on OSX..." >&5
echo "$as_me: error: PackageMaker needed to build OSX packages and you are not on OSX..." >&2;}
   { (exit 1); exit 1; }; }
       fi
   fi
   if echo "$PKGFORMAT" | $EGREP rpm 2>&1 >/dev/null || \
      echo "$PKGFORMAT" | $EGREP pkg 2>&1 >/dev/null; then
      	if test "$EPM" != "no" && test "$EPM" != "internal"; then
           if test "`echo $EPM_VERSION | cut -d'.' -f1`" -lt "4"; then
               { echo "$as_me:$LINENO: checking whether epm is patched for OOos needs" >&5
echo $ECHO_N "checking whether epm is patched for OOos needs... $ECHO_C" >&6; }
               if grep "Patched for OpenOffice.org" $EPM >/dev/null 2>/dev/null; then
                  { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
               else
                  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
                  if echo "$PKGFORMAT" | grep -q rpm; then
                      _pt="rpm"
                      { echo "$as_me:$LINENO: WARNING: the rpms will need to be installed with --nodeps" >&5
echo "$as_me: WARNING: the rpms will need to be installed with --nodeps" >&2;}
                      echo "the rpms will need to be installed with --nodeps" >> warn
                  else
                      _pt="pkg"
                  fi
                  { echo "$as_me:$LINENO: WARNING: the ${_pt}s will not be relocateable" >&5
echo "$as_me: WARNING: the ${_pt}s will not be relocateable" >&2;}
                  echo "the ${_pt}s will not be relocateable" >> warn
                  { echo "$as_me:$LINENO: WARNING: if you want to make sure installation without --nodeps and
                  relocation will work, you need to patch your epm with the
                  patch in epm/epm-3.7.patch or build with
                  --with-epm=internal which will build a suitable epm" >&5
echo "$as_me: WARNING: if you want to make sure installation without --nodeps and
                  relocation will work, you need to patch your epm with the
                  patch in epm/epm-3.7.patch or build with
                  --with-epm=internal which will build a suitable epm" >&2;}
               fi
           fi
        fi
   fi
   if echo "$PKGFORMAT" | $EGREP pkg 2>&1 >/dev/null; then
      # Extract the first word of "pkgmk", so it can be a program name with args.
set dummy pkgmk; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path_PKGMK+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $PKGMK in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PKGMK="$PKGMK" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_PKGMK="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  test -z "$ac_cv_path_PKGMK" && ac_cv_path_PKGMK="no"
  ;;
esac
fi
PKGMK=$ac_cv_path_PKGMK
if test -n "$PKGMK"; then
  { echo "$as_me:$LINENO: result: $PKGMK" >&5
echo "${ECHO_T}$PKGMK" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


      if test "$PKGMK" = "no"; then
         { { echo "$as_me:$LINENO: error: pkgmk needed for Solaris pkg creation. Install it." >&5
echo "$as_me: error: pkgmk needed for Solaris pkg creation. Install it." >&2;}
   { (exit 1); exit 1; }; }
      fi
   fi





else
   { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
   EPM=NO
fi


{ echo "$as_me:$LINENO: checking whether to build the ODK" >&5
echo $ECHO_N "checking whether to build the ODK... $ECHO_C" >&6; }
if test "z$enable_odk" = "z" -o "$enable_odk" != "no"; then
   { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
   BUILD_TYPE="$BUILD_TYPE ODK"
else
   { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi

{ echo "$as_me:$LINENO: checking whether to build qadevOOo" >&5
echo $ECHO_N "checking whether to build qadevOOo... $ECHO_C" >&6; }
if test "z$enable_qadevooo" = "z" -o "$enable_qadevooo" != "no"; then
   { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
   BUILD_TYPE="$BUILD_TYPE QADEVOOO"
else
   { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi

if test -n "$checkforprelink" -a -f /etc/rpm/macros.prelink; then
  with_system_stdlibs=yes
  { echo "$as_me:$LINENO: WARNING: prelinked libgcc_s.so.1, enabling --with-system-stdlibs, use --without-system-stdlibs to override" >&5
echo "$as_me: WARNING: prelinked libgcc_s.so.1, enabling --with-system-stdlibs, use --without-system-stdlibs to override" >&2;}
  echo "prelinked libgcc_s.so.1, enabling --with-system-stdlibs, use --without-system-stdlibs to override" >> warn
fi

{ echo "$as_me:$LINENO: checking whether to provide libstdc++/libgcc_s in the installset" >&5
echo $ECHO_N "checking whether to provide libstdc++/libgcc_s in the installset... $ECHO_C" >&6; }
if test -n "$with_system_stdlibs" -o -n "$with_system_libs" && \
   test "$with_system_stdlibs" != "no"; then
   { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
   SYSTEM_STDLIBS=YES
else
   { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
   SYSTEM_STDLIBS=NO
fi


if test "$_os" = "Darwin" && test "$with_system_zlib" != "no"; then
   with_system_zlib=yes
fi
{ echo "$as_me:$LINENO: checking which zlib to use" >&5
echo $ECHO_N "checking which zlib to use... $ECHO_C" >&6; }
if test -n "$with_system_zlib" -o -n "$with_system_libs" && \
	test "$with_system_zlib" != "no"; then
    { echo "$as_me:$LINENO: result: external" >&5
echo "${ECHO_T}external" >&6; }
    SYSTEM_ZLIB=YES
    if test "${ac_cv_header_zlib_h+set}" = set; then
  { echo "$as_me:$LINENO: 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
fi
{ echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; }
else
  # Is the header compilable?
{ echo "$as_me:$LINENO: checking zlib.h usability" >&5
echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
#include <zlib.h>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_header_compiler=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_header_compiler=no
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6; }

# Is the header present?
{ echo "$as_me:$LINENO: checking zlib.h presence" >&5
echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <zlib.h>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_cxx_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  ac_header_preproc=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  ac_header_preproc=no
fi

rm -f conftest.err conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6; }

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
  yes:no: )
    { echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: zlib.h: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5
echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;}
    { echo "$as_me:$LINENO: WARNING: zlib.h:     check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: zlib.h:     check for missing prerequisite headers?" >&2;}
    { echo "$as_me:$LINENO: WARNING: zlib.h: see the Autoconf documentation" >&5
echo "$as_me: WARNING: zlib.h: see the Autoconf documentation" >&2;}
    { echo "$as_me:$LINENO: WARNING: zlib.h:     section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: zlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
    { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;}
    { echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;}

    ;;
esac
{ echo "$as_me:$LINENO: 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
  ac_cv_header_zlib_h=$ac_header_preproc
fi
{ echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; }

fi
if test $ac_cv_header_zlib_h = yes; then
  :
else
  { { echo "$as_me:$LINENO: error: zlib.h not found. install zlib" >&5
echo "$as_me: error: zlib.h not found. install zlib" >&2;}
   { (exit 1); exit 1; }; }
fi


    { echo "$as_me:$LINENO: checking for deflate in -lz" >&5
echo $ECHO_N "checking for deflate in -lz... $ECHO_C" >&6; }
if test "${ac_cv_lib_z_deflate+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lz  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char deflate ();
int
main ()
{
return deflate ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_z_deflate=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_lib_z_deflate=no
fi

rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ echo "$as_me:$LINENO: 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
   ZLIB=-lz
else
  { { echo "$as_me:$LINENO: error: zlib not found or functional" >&5
echo "$as_me: error: zlib not found or functional" >&2;}
   { (exit 1); exit 1; }; }
fi

else
    { echo "$as_me:$LINENO: result: internal" >&5
echo "${ECHO_T}internal" >&6; }
    SYSTEM_ZLIB=NO
    BUILD_TYPE="$BUILD_TYPE ZLIB"
fi


{ echo "$as_me:$LINENO: checking which jpeg to use" >&5
echo $ECHO_N "checking which jpeg to use... $ECHO_C" >&6; }
if test -n "$with_system_jpeg" -o -n "$with_system_libs" && \
	test "$with_system_jpeg" != "no"; then
    { echo "$as_me:$LINENO: result: external" >&5
echo "${ECHO_T}external" >&6; }
    SYSTEM_JPEG=YES
    if test "${ac_cv_header_jpeglib_h+set}" = set; then
  { echo "$as_me:$LINENO: 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
fi
{ echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5
echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6; }
else
  # Is the header compilable?
{ echo "$as_me:$LINENO: checking jpeglib.h usability" >&5
echo $ECHO_N "checking jpeglib.h usability... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
#include <jpeglib.h>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_header_compiler=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_header_compiler=no
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6; }

# Is the header present?
{ echo "$as_me:$LINENO: checking jpeglib.h presence" >&5
echo $ECHO_N "checking jpeglib.h presence... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <jpeglib.h>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_cxx_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  ac_header_preproc=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  ac_header_preproc=no
fi

rm -f conftest.err conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6; }

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
  yes:no: )
    { echo "$as_me:$LINENO: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: jpeglib.h: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { echo "$as_me:$LINENO: WARNING: jpeglib.h: present but cannot be compiled" >&5
echo "$as_me: WARNING: jpeglib.h: present but cannot be compiled" >&2;}
    { echo "$as_me:$LINENO: WARNING: jpeglib.h:     check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: jpeglib.h:     check for missing prerequisite headers?" >&2;}
    { echo "$as_me:$LINENO: WARNING: jpeglib.h: see the Autoconf documentation" >&5
echo "$as_me: WARNING: jpeglib.h: see the Autoconf documentation" >&2;}
    { echo "$as_me:$LINENO: WARNING: jpeglib.h:     section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: jpeglib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
    { echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&2;}
    { echo "$as_me:$LINENO: WARNING: jpeglib.h: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: jpeglib.h: in the future, the compiler will take precedence" >&2;}

    ;;
esac
{ echo "$as_me:$LINENO: 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
  ac_cv_header_jpeglib_h=$ac_header_preproc
fi
{ echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5
echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6; }

fi
if test $ac_cv_header_jpeglib_h = yes; then
  :
else
  { { echo "$as_me:$LINENO: error: jpeg.h not found. install libjpeg" >&5
echo "$as_me: error: jpeg.h not found. install libjpeg" >&2;}
   { (exit 1); exit 1; }; }
fi


    { echo "$as_me:$LINENO: checking for jpeg_resync_to_restart in -ljpeg" >&5
echo $ECHO_N "checking for jpeg_resync_to_restart in -ljpeg... $ECHO_C" >&6; }
if test "${ac_cv_lib_jpeg_jpeg_resync_to_restart+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-ljpeg  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char jpeg_resync_to_restart ();
int
main ()
{
return jpeg_resync_to_restart ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_jpeg_jpeg_resync_to_restart=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_lib_jpeg_jpeg_resync_to_restart=no
fi

rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_resync_to_restart" >&5
echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_resync_to_restart" >&6; }
if test $ac_cv_lib_jpeg_jpeg_resync_to_restart = yes; then
   JPEG3RDLIB=-ljpeg
else
  { echo "$as_me:$LINENO: checking jpeg library not found or fuctional" >&5
echo $ECHO_N "checking jpeg library not found or fuctional... $ECHO_C" >&6; }
fi

else
    { echo "$as_me:$LINENO: result: internal" >&5
echo "${ECHO_T}internal" >&6; }
    SYSTEM_JPEG=NO
    BUILD_TYPE="$BUILD_TYPE JPEG"
fi


{ echo "$as_me:$LINENO: checking which expat to use" >&5
echo $ECHO_N "checking which expat to use... $ECHO_C" >&6; }
if test -n "$with_system_expat" -o -n "$with_system_libs" && \
	test "$with_system_expat" != "no"; then
    { echo "$as_me:$LINENO: result: external" >&5
echo "${ECHO_T}external" >&6; }
    SYSTEM_EXPAT=YES
    if test "${ac_cv_header_expat_h+set}" = set; then
  { echo "$as_me:$LINENO: checking for expat.h" >&5
echo $ECHO_N "checking for expat.h... $ECHO_C" >&6; }
if test "${ac_cv_header_expat_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
fi
{ echo "$as_me:$LINENO: result: $ac_cv_header_expat_h" >&5
echo "${ECHO_T}$ac_cv_header_expat_h" >&6; }
else
  # Is the header compilable?
{ echo "$as_me:$LINENO: checking expat.h usability" >&5
echo $ECHO_N "checking expat.h usability... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
#include <expat.h>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_header_compiler=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_header_compiler=no
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6; }

# Is the header present?
{ echo "$as_me:$LINENO: checking expat.h presence" >&5
echo $ECHO_N "checking expat.h presence... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <expat.h>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_cxx_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  ac_header_preproc=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  ac_header_preproc=no
fi

rm -f conftest.err conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6; }

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
  yes:no: )
    { echo "$as_me:$LINENO: WARNING: expat.h: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: expat.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { echo "$as_me:$LINENO: WARNING: expat.h: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: expat.h: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { echo "$as_me:$LINENO: WARNING: expat.h: present but cannot be compiled" >&5
echo "$as_me: WARNING: expat.h: present but cannot be compiled" >&2;}
    { echo "$as_me:$LINENO: WARNING: expat.h:     check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: expat.h:     check for missing prerequisite headers?" >&2;}
    { echo "$as_me:$LINENO: WARNING: expat.h: see the Autoconf documentation" >&5
echo "$as_me: WARNING: expat.h: see the Autoconf documentation" >&2;}
    { echo "$as_me:$LINENO: WARNING: expat.h:     section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: expat.h:     section \"Present But Cannot Be Compiled\"" >&2;}
    { echo "$as_me:$LINENO: WARNING: expat.h: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: expat.h: proceeding with the preprocessor's result" >&2;}
    { echo "$as_me:$LINENO: WARNING: expat.h: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: expat.h: in the future, the compiler will take precedence" >&2;}

    ;;
esac
{ echo "$as_me:$LINENO: checking for expat.h" >&5
echo $ECHO_N "checking for expat.h... $ECHO_C" >&6; }
if test "${ac_cv_header_expat_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_cv_header_expat_h=$ac_header_preproc
fi
{ echo "$as_me:$LINENO: result: $ac_cv_header_expat_h" >&5
echo "${ECHO_T}$ac_cv_header_expat_h" >&6; }

fi
if test $ac_cv_header_expat_h = yes; then
  :
else
  { { echo "$as_me:$LINENO: error: expat.h not found. install expat" >&5
echo "$as_me: error: expat.h not found. install expat" >&2;}
   { (exit 1); exit 1; }; }
fi



{ echo "$as_me:$LINENO: checking for XML_ParserCreate in -lexpat" >&5
echo $ECHO_N "checking for XML_ParserCreate in -lexpat... $ECHO_C" >&6; }
if test "${ac_cv_lib_expat_XML_ParserCreate+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lexpat  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char XML_ParserCreate ();
int
main ()
{
return XML_ParserCreate ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_expat_XML_ParserCreate=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_lib_expat_XML_ParserCreate=no
fi

rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ echo "$as_me:$LINENO: result: $ac_cv_lib_expat_XML_ParserCreate" >&5
echo "${ECHO_T}$ac_cv_lib_expat_XML_ParserCreate" >&6; }
if test $ac_cv_lib_expat_XML_ParserCreate = yes; then
  cat >>confdefs.h <<_ACEOF
#define HAVE_LIBEXPAT 1
_ACEOF

  LIBS="-lexpat $LIBS"

else
  { echo "$as_me:$LINENO: result: expat library not found or functional." >&5
echo "${ECHO_T}expat library not found or functional." >&6; }
fi

else
    { echo "$as_me:$LINENO: result: internal" >&5
echo "${ECHO_T}internal" >&6; }
    SYSTEM_EXPAT=NO
    BUILD_TYPE="$BUILD_TYPE EXPAT"
fi


{ echo "$as_me:$LINENO: checking which freetype to use" >&5
echo $ECHO_N "checking which freetype to use... $ECHO_C" >&6; }
if test -n "$with_system_freetype" -o -n "$with_system_libs" && \
	test "$with_system_freetype" != "no"; then
    { echo "$as_me:$LINENO: result: external" >&5
echo "${ECHO_T}external" >&6; }
    SYSTEM_FREETYPE=YES

  succeeded=no

  if test -z "$PKG_CONFIG"; then
    # Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $PKG_CONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
  ;;
esac
fi
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
if test -n "$PKG_CONFIG"; then
  { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
echo "${ECHO_T}$PKG_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  fi

  if test "$PKG_CONFIG" = "no" ; then
     echo "*** The pkg-config script could not be found. Make sure it is"
     echo "*** in your path, or set the PKG_CONFIG environment variable"
     echo "*** to the full path to pkg-config."
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
  else
     PKG_CONFIG_MIN_VERSION=0.9.0
     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
        { echo "$as_me:$LINENO: checking for freetype2 >= 2.0 " >&5
echo $ECHO_N "checking for freetype2 >= 2.0 ... $ECHO_C" >&6; }

        if $PKG_CONFIG --exists "freetype2 >= 2.0 " ; then
            { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
            succeeded=yes

            { echo "$as_me:$LINENO: checking FREETYPE_CFLAGS" >&5
echo $ECHO_N "checking FREETYPE_CFLAGS... $ECHO_C" >&6; }
            FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2 >= 2.0 "`
            { echo "$as_me:$LINENO: result: $FREETYPE_CFLAGS" >&5
echo "${ECHO_T}$FREETYPE_CFLAGS" >&6; }

            { echo "$as_me:$LINENO: checking FREETYPE_LIBS" >&5
echo $ECHO_N "checking FREETYPE_LIBS... $ECHO_C" >&6; }
            FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2 >= 2.0 "`
            { echo "$as_me:$LINENO: result: $FREETYPE_LIBS" >&5
echo "${ECHO_T}$FREETYPE_LIBS" >&6; }
        else
            FREETYPE_CFLAGS=""
            FREETYPE_LIBS=""
            ## If we have a custom action on failure, don't print errors, but
            ## do set a variable so people can do so.
            FREETYPE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "freetype2 >= 2.0 "`
            echo $FREETYPE_PKG_ERRORS
        fi



     else
        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
        echo "*** See http://www.freedesktop.org/software/pkgconfig"
     fi
  fi

  if test $succeeded = yes; then
     :
  else
     { { echo "$as_me:$LINENO: error: Library requirements (freetype2 >= 2.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5
echo "$as_me: error: Library requirements (freetype2 >= 2.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;}
   { (exit 1); exit 1; }; }
  fi

else
    { echo "$as_me:$LINENO: result: internal" >&5
echo "${ECHO_T}internal" >&6; }
    SYSTEM_FREETYPE=NO
    BUILD_TYPE="$BUILD_TYPE FREETYPE"
fi




{ echo "$as_me:$LINENO: checking which libwpd to use" >&5
echo $ECHO_N "checking which libwpd to use... $ECHO_C" >&6; }
if test -n "$with_system_libwpd" -o -n "$with_system_libs" && \
        test "$with_system_libwpd" != "no"; then
    { echo "$as_me:$LINENO: result: external" >&5
echo "${ECHO_T}external" >&6; }
    SYSTEM_LIBWPD=YES

  succeeded=no

  if test -z "$PKG_CONFIG"; then
    # Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $PKG_CONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
  ;;
esac
fi
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
if test -n "$PKG_CONFIG"; then
  { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
echo "${ECHO_T}$PKG_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  fi

  if test "$PKG_CONFIG" = "no" ; then
     echo "*** The pkg-config script could not be found. Make sure it is"
     echo "*** in your path, or set the PKG_CONFIG environment variable"
     echo "*** to the full path to pkg-config."
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
  else
     PKG_CONFIG_MIN_VERSION=0.9.0
     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
        { echo "$as_me:$LINENO: checking for libwpd-0.8 " >&5
echo $ECHO_N "checking for libwpd-0.8 ... $ECHO_C" >&6; }

        if $PKG_CONFIG --exists "libwpd-0.8 " ; then
            { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
            succeeded=yes

            { echo "$as_me:$LINENO: checking LIBWPD_CFLAGS" >&5
echo $ECHO_N "checking LIBWPD_CFLAGS... $ECHO_C" >&6; }
            LIBWPD_CFLAGS=`$PKG_CONFIG --cflags "libwpd-0.8 "`
            { echo "$as_me:$LINENO: result: $LIBWPD_CFLAGS" >&5
echo "${ECHO_T}$LIBWPD_CFLAGS" >&6; }

            { echo "$as_me:$LINENO: checking LIBWPD_LIBS" >&5
echo $ECHO_N "checking LIBWPD_LIBS... $ECHO_C" >&6; }
            LIBWPD_LIBS=`$PKG_CONFIG --libs "libwpd-0.8 "`
            { echo "$as_me:$LINENO: result: $LIBWPD_LIBS" >&5
echo "${ECHO_T}$LIBWPD_LIBS" >&6; }
        else
            LIBWPD_CFLAGS=""
            LIBWPD_LIBS=""
            ## If we have a custom action on failure, don't print errors, but
            ## do set a variable so people can do so.
            LIBWPD_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libwpd-0.8 "`
            echo $LIBWPD_PKG_ERRORS
        fi



     else
        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
        echo "*** See http://www.freedesktop.org/software/pkgconfig"
     fi
  fi

  if test $succeeded = yes; then
     :
  else
     { { echo "$as_me:$LINENO: error: Library requirements (libwpd-0.8 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5
echo "$as_me: error: Library requirements (libwpd-0.8 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;}
   { (exit 1); exit 1; }; }
  fi

else
    { echo "$as_me:$LINENO: result: internal" >&5
echo "${ECHO_T}internal" >&6; }
    SYSTEM_LIBWPD=NO
    BUILD_TYPE="$BUILD_TYPE LIBWPD"
fi




{ echo "$as_me:$LINENO: checking which libxml to use" >&5
echo $ECHO_N "checking which libxml to use... $ECHO_C" >&6; }
if test -n "$with_system_libxml" -o -n "$with_system_libs" && \
	test "$with_system_libxml" != "no"; then
    { echo "$as_me:$LINENO: result: external" >&5
echo "${ECHO_T}external" >&6; }
    SYSTEM_LIBXML=YES

  succeeded=no

  if test -z "$PKG_CONFIG"; then
    # Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $PKG_CONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
  ;;
esac
fi
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
if test -n "$PKG_CONFIG"; then
  { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
echo "${ECHO_T}$PKG_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  fi

  if test "$PKG_CONFIG" = "no" ; then
     echo "*** The pkg-config script could not be found. Make sure it is"
     echo "*** in your path, or set the PKG_CONFIG environment variable"
     echo "*** to the full path to pkg-config."
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
  else
     PKG_CONFIG_MIN_VERSION=0.9.0
     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
        { echo "$as_me:$LINENO: checking for libxml-2.0 >= 2.0 " >&5
echo $ECHO_N "checking for libxml-2.0 >= 2.0 ... $ECHO_C" >&6; }

        if $PKG_CONFIG --exists "libxml-2.0 >= 2.0 " ; then
            { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
            succeeded=yes

            { echo "$as_me:$LINENO: checking LIBXML_CFLAGS" >&5
echo $ECHO_N "checking LIBXML_CFLAGS... $ECHO_C" >&6; }
            LIBXML_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0 >= 2.0 "`
            { echo "$as_me:$LINENO: result: $LIBXML_CFLAGS" >&5
echo "${ECHO_T}$LIBXML_CFLAGS" >&6; }

            { echo "$as_me:$LINENO: checking LIBXML_LIBS" >&5
echo $ECHO_N "checking LIBXML_LIBS... $ECHO_C" >&6; }
            LIBXML_LIBS=`$PKG_CONFIG --libs "libxml-2.0 >= 2.0 "`
            { echo "$as_me:$LINENO: result: $LIBXML_LIBS" >&5
echo "${ECHO_T}$LIBXML_LIBS" >&6; }
        else
            LIBXML_CFLAGS=""
            LIBXML_LIBS=""
            ## If we have a custom action on failure, don't print errors, but
            ## do set a variable so people can do so.
            LIBXML_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libxml-2.0 >= 2.0 "`
            echo $LIBXML_PKG_ERRORS
        fi



     else
        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
        echo "*** See http://www.freedesktop.org/software/pkgconfig"
     fi
  fi

  if test $succeeded = yes; then
     :
  else
     { { echo "$as_me:$LINENO: error: Library requirements (libxml-2.0 >= 2.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5
echo "$as_me: error: Library requirements (libxml-2.0 >= 2.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;}
   { (exit 1); exit 1; }; }
  fi

    BUILD_TYPE="$BUILD_TYPE LIBXMLSEC"
else
    { echo "$as_me:$LINENO: result: internal" >&5
echo "${ECHO_T}internal" >&6; }
    SYSTEM_LIBXML=NO
    BUILD_TYPE="$BUILD_TYPE LIBXML2 LIBXMLSEC"
fi




if test "$_os" = "Darwin" && test "$with_system_python" != "no"; then
   with_system_python=yes
fi
{ echo "$as_me:$LINENO: checking which python to use" >&5
echo $ECHO_N "checking which python to use... $ECHO_C" >&6; }
if test -n "$with_system_python" && test "$with_system_python" != "no"; then
   SYSTEM_PYTHON=YES
   { echo "$as_me:$LINENO: result: external" >&5
echo "${ECHO_T}external" >&6; }




        if test -n "$PYTHON"; then
      # If the user set $PYTHON, use it and don't search something else.
      { echo "$as_me:$LINENO: checking whether $PYTHON version >= 2.2" >&5
echo $ECHO_N "checking whether $PYTHON version >= 2.2... $ECHO_C" >&6; }
      prog="import sys, string
# split strings by '.' and convert to numeric.  Append some zeros
# because we need at least 4 digits for the hex conversion.
minver = map(int, string.split('2.2', '.')) + [0, 0, 0]
minverhex = 0
for i in xrange(0, 4): minverhex = (minverhex << 8) + minver[i]
sys.exit(sys.hexversion < minverhex)"
  if { echo "$as_me:$LINENO: $PYTHON -c "$prog"" >&5
   ($PYTHON -c "$prog") >&5 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; then
  { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
else
  { { echo "$as_me:$LINENO: error: too old" >&5
echo "$as_me: error: too old" >&2;}
   { (exit 1); exit 1; }; }
fi

      am_display_PYTHON=$PYTHON
    else
      # Otherwise, try each interpreter until we find one that satisfies
      # VERSION.
      { echo "$as_me:$LINENO: checking for a Python interpreter with version >= 2.2" >&5
echo $ECHO_N "checking for a Python interpreter with version >= 2.2... $ECHO_C" >&6; }
if test "${am_cv_pathless_PYTHON+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else

	for am_cv_pathless_PYTHON in python python2 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5 none; do
	  test "$am_cv_pathless_PYTHON" = none && break
	  prog="import sys, string
# split strings by '.' and convert to numeric.  Append some zeros
# because we need at least 4 digits for the hex conversion.
minver = map(int, string.split('2.2', '.')) + [0, 0, 0]
minverhex = 0
for i in xrange(0, 4): minverhex = (minverhex << 8) + minver[i]
sys.exit(sys.hexversion < minverhex)"
  if { echo "$as_me:$LINENO: $am_cv_pathless_PYTHON -c "$prog"" >&5
   ($am_cv_pathless_PYTHON -c "$prog") >&5 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; then
  break
fi

	done
fi
{ echo "$as_me:$LINENO: result: $am_cv_pathless_PYTHON" >&5
echo "${ECHO_T}$am_cv_pathless_PYTHON" >&6; }
      # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON.
      if test "$am_cv_pathless_PYTHON" = none; then
	PYTHON=:
      else
        # Extract the first word of "$am_cv_pathless_PYTHON", so it can be a program name with args.
set dummy $am_cv_pathless_PYTHON; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path_PYTHON+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $PYTHON in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
PYTHON=$ac_cv_path_PYTHON
if test -n "$PYTHON"; then
  { echo "$as_me:$LINENO: result: $PYTHON" >&5
echo "${ECHO_T}$PYTHON" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


      fi
      am_display_PYTHON=$am_cv_pathless_PYTHON
    fi


  if test "$PYTHON" = :; then
      { { echo "$as_me:$LINENO: error: no suitable Python interpreter found" >&5
echo "$as_me: error: no suitable Python interpreter found" >&2;}
   { (exit 1); exit 1; }; }
  else


  { echo "$as_me:$LINENO: checking for $am_display_PYTHON version" >&5
echo $ECHO_N "checking for $am_display_PYTHON version... $ECHO_C" >&6; }
if test "${am_cv_python_version+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  am_cv_python_version=`$PYTHON -c "import sys; print sys.version[:3]"`
fi
{ echo "$as_me:$LINENO: result: $am_cv_python_version" >&5
echo "${ECHO_T}$am_cv_python_version" >&6; }
  PYTHON_VERSION=$am_cv_python_version



  PYTHON_PREFIX='${prefix}'

  PYTHON_EXEC_PREFIX='${exec_prefix}'



  { echo "$as_me:$LINENO: checking for $am_display_PYTHON platform" >&5
echo $ECHO_N "checking for $am_display_PYTHON platform... $ECHO_C" >&6; }
if test "${am_cv_python_platform+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  am_cv_python_platform=`$PYTHON -c "import sys; print sys.platform"`
fi
{ echo "$as_me:$LINENO: result: $am_cv_python_platform" >&5
echo "${ECHO_T}$am_cv_python_platform" >&6; }
  PYTHON_PLATFORM=$am_cv_python_platform




                { echo "$as_me:$LINENO: checking for $am_display_PYTHON script directory" >&5
echo $ECHO_N "checking for $am_display_PYTHON script directory... $ECHO_C" >&6; }
if test "${am_cv_python_pythondir+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  am_cv_python_pythondir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(0,0,prefix='$PYTHON_PREFIX')" 2>/dev/null ||
     echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"`
fi
{ echo "$as_me:$LINENO: result: $am_cv_python_pythondir" >&5
echo "${ECHO_T}$am_cv_python_pythondir" >&6; }
  pythondir=$am_cv_python_pythondir



  pkgpythondir=\${pythondir}/$PACKAGE


            { echo "$as_me:$LINENO: checking for $am_display_PYTHON extension module directory" >&5
echo $ECHO_N "checking for $am_display_PYTHON extension module directory... $ECHO_C" >&6; }
if test "${am_cv_python_pyexecdir+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  am_cv_python_pyexecdir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(1,0,prefix='$PYTHON_EXEC_PREFIX')" 2>/dev/null ||
     echo "${PYTHON_EXEC_PREFIX}/lib/python${PYTHON_VERSION}/site-packages"`
fi
{ echo "$as_me:$LINENO: result: $am_cv_python_pyexecdir" >&5
echo "${ECHO_T}$am_cv_python_pyexecdir" >&6; }
  pyexecdir=$am_cv_python_pyexecdir



  pkgpyexecdir=\${pyexecdir}/$PACKAGE



  fi



   python_include=`$PYTHON -c "import distutils.sysconfig; print distutils.sysconfig.get_config_var('INCLUDEPY');"`
   python_version=`$PYTHON -c "import distutils.sysconfig; print distutils.sysconfig.get_config_var('VERSION');"`
   PYTHON_CFLAGS="-I$python_include"

   if test "$_os" = "Darwin"; then
      PYTHON_LIBS="-framework Python"
   else
      PYTHON_LIBS="-lpython$python_version"
   fi

      save_CPPFLAGS="$CPPFLAGS"
   CPPFLAGS="$CPPFLAGS $PYTHON_CFLAGS"
   cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
Python.h
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_cxx_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  :
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  { { echo "$as_me:$LINENO: error: Python headers not found." >&5
echo "$as_me: error: Python headers not found." >&2;}
   { (exit 1); exit 1; }; }
fi

rm -f conftest.err conftest.$ac_ext
   CPPFLAGS="$save_CPPFLAGS"
else
   SYSTEM_PYTHON=NO
   BUILD_TYPE="$BUILD_TYPE PYTHON"
   { echo "$as_me:$LINENO: result: internal" >&5
echo "${ECHO_T}internal" >&6; }
fi




{ echo "$as_me:$LINENO: checking which db to use" >&5
echo $ECHO_N "checking which db to use... $ECHO_C" >&6; }
if test -n "$with_system_db" -o -n "$with_system_libs" && \
	test "$with_system_db" != "no"; then
    SYSTEM_DB=YES
    { echo "$as_me:$LINENO: result: external" >&5
echo "${ECHO_T}external" >&6; }
    { echo "$as_me:$LINENO: checking for db.h" >&5
echo $ECHO_N "checking for db.h... $ECHO_C" >&6; }
if test "${ac_cv_header_db_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */



#include <db.h>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_header_db_h=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_header_db_h=no
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ac_cv_header_db_h" >&5
echo "${ECHO_T}$ac_cv_header_db_h" >&6; }
if test $ac_cv_header_db_h = yes; then
   DB_INCLUDES=/usr/include
else

             CFLAGS=-I/usr/include/db4
             { echo "$as_me:$LINENO: checking for db4/db.h" >&5
echo $ECHO_N "checking for db4/db.h... $ECHO_C" >&6; }
if test "${ac_cv_header_db4_db_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
+

#include <db4/db.h>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_header_db4_db_h=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_header_db4_db_h=no
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ac_cv_header_db4_db_h" >&5
echo "${ECHO_T}$ac_cv_header_db4_db_h" >&6; }
if test $ac_cv_header_db4_db_h = yes; then
   DB_INCLUDES=/usr/include/db4
else
   { { echo "$as_me:$LINENO: error: no. install the db4 libraries" >&5
echo "$as_me: error: no. install the db4 libraries" >&2;}
   { (exit 1); exit 1; }; }
fi



fi


    { echo "$as_me:$LINENO: checking whether db is at least 4.1" >&5
echo $ECHO_N "checking whether db is at least 4.1... $ECHO_C" >&6; }
    # FIXME: Will db 4.3 work? Can't test it since the 4.3 java bindings are not packaged :/
    for v in 1 2; do
       if test "$cross_compiling" = yes; then
  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
See \`config.log' for more details." >&5
echo "$as_me: error: cannot run test program while cross compiling
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; }
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

#include <db.h>

int main(int argc, char **argv) {
       if(DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR == $v) return 0;
       else return 1;
}

_ACEOF
rm -f conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  DB_VERSION_MINOR=$v
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi


    done
    if test "$DB_VERSION_MINOR" -gt "1"; then
       { echo "$as_me:$LINENO: result: OK" >&5
echo "${ECHO_T}OK" >&6; }
       DB_VERSION=4.$DB_VERSION_MINOR
    else
       { echo "$as_me:$LINENO: result: no. you need at least db 4.1" >&5
echo "${ECHO_T}no. you need at least db 4.1" >&6; }
    fi
    # does not work :/
    #AC_CHECK_LIB(db, db_create, [],
    #  [AC_MSG_ERROR([db library not installed or functional])], [])

{ echo "$as_me:$LINENO: checking for main in -ldb" >&5
echo $ECHO_N "checking for main in -ldb... $ECHO_C" >&6; }
if test "${ac_cv_lib_db_main+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-ldb  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */


int
main ()
{
return main ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_db_main=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_lib_db_main=no
fi

rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ echo "$as_me:$LINENO: result: $ac_cv_lib_db_main" >&5
echo "${ECHO_T}$ac_cv_lib_db_main" >&6; }
if test $ac_cv_lib_db_main = yes; then
  cat >>confdefs.h <<_ACEOF
#define HAVE_LIBDB 1
_ACEOF

  LIBS="-ldb $LIBS"

else
  { { echo "$as_me:$LINENO: error: db not installed or functional" >&5
echo "$as_me: error: db not installed or functional" >&2;}
   { (exit 1); exit 1; }; }
fi
ac_cv_lib_db=ac_cv_lib_db_main

     if test "$SOLAR_JAVA" = "TRUE"; then
       if test -z "$DB_JAR"; then
         # three different naming methods *grumble* Are there even more?
         { echo "$as_me:$LINENO: checking for /usr/share/java/db.jar" >&5
echo $ECHO_N "checking for /usr/share/java/db.jar... $ECHO_C" >&6; }
if test "${ac_cv_file__usr_share_java_db_jar+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  test "$cross_compiling" = yes &&
  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
   { (exit 1); exit 1; }; }
if test -r "/usr/share/java/db.jar"; then
  ac_cv_file__usr_share_java_db_jar=yes
else
  ac_cv_file__usr_share_java_db_jar=no
fi
fi
{ echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_db_jar" >&5
echo "${ECHO_T}$ac_cv_file__usr_share_java_db_jar" >&6; }
if test $ac_cv_file__usr_share_java_db_jar = yes; then
   JARVER=0
else

             as_ac_File=`echo "ac_cv_file_/usr/share/java/db-$DB_VERSION.jar" | $as_tr_sh`
{ echo "$as_me:$LINENO: checking for /usr/share/java/db-$DB_VERSION.jar" >&5
echo $ECHO_N "checking for /usr/share/java/db-$DB_VERSION.jar... $ECHO_C" >&6; }
if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  test "$cross_compiling" = yes &&
  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
   { (exit 1); exit 1; }; }
if test -r "/usr/share/java/db-$DB_VERSION.jar"; then
  eval "$as_ac_File=yes"
else
  eval "$as_ac_File=no"
fi
fi
ac_res=`eval echo '${'$as_ac_File'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&6; }
if test `eval echo '${'$as_ac_File'}'` = yes; then
   JARVER=1
else
   as_ac_File=`echo "ac_cv_file_/usr/share/java/libdb$DB_VERSION-java.jar" | $as_tr_sh`
{ echo "$as_me:$LINENO: checking for /usr/share/java/libdb$DB_VERSION-java.jar" >&5
echo $ECHO_N "checking for /usr/share/java/libdb$DB_VERSION-java.jar... $ECHO_C" >&6; }
if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  test "$cross_compiling" = yes &&
  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
   { (exit 1); exit 1; }; }
if test -r "/usr/share/java/libdb$DB_VERSION-java.jar"; then
  eval "$as_ac_File=yes"
else
  eval "$as_ac_File=no"
fi
fi
ac_res=`eval echo '${'$as_ac_File'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&6; }
if test `eval echo '${'$as_ac_File'}'` = yes; then
   JARVER_LONGSTYLE=1
else
   { { echo "$as_me:$LINENO: error: db$DB_VERSION_MAJOR Java bindings not found" >&5
echo "$as_me: error: db$DB_VERSION_MAJOR Java bindings not found" >&2;}
   { (exit 1); exit 1; }; }

fi



fi



fi

         if test "$JARVER" = "1"; then
           DB_JAR=/usr/share/java/jar-$DB_VERSION.jar
         else
           DB_JAR=/usr/share/java/db.jar
         fi
         if test "$JARVER_LONGSTYLE" = "1"; then
           DB_JAR=/usr/share/java/libdb$DB_VERSION-java.jar
         fi
	  if test -z "$DB_JAR"; then
	    { { echo "$as_me:$LINENO: error: libdb $DB_VERSION jar not found. Install it or specify path with --with-db-jar=/path/to/jar" >&5
echo "$as_me: error: libdb $DB_VERSION jar not found. Install it or specify path with --with-db-jar=/path/to/jar" >&2;}
   { (exit 1); exit 1; }; }
	  fi
       fi
    fi
    SCPDEFS="$SCPDEFS -DSYSTEM_DB"
else
    { echo "$as_me:$LINENO: result: internal" >&5
echo "${ECHO_T}internal" >&6; }
    SYSTEM_DB=NO
    BUILD_TYPE="$BUILD_TYPE BERKELEYDB"
fi





{ echo "$as_me:$LINENO: checking which hsqldb to use" >&5
echo $ECHO_N "checking which hsqldb to use... $ECHO_C" >&6; }
if test -n "$with_system_hsqldb" -o -n "$with_system_libs" && \
       test "$with_system_hsqldb" != "no"; then
        { echo "$as_me:$LINENO: result: external" >&5
echo "${ECHO_T}external" >&6; }
        SYSTEM_HSQLDB=YES
        if test -z $HSQLDB_JAR; then
               HSQLDB_JAR=/usr/share/java/hsqldb.jar
        fi
        as_ac_File=`echo "ac_cv_file_$HSQLDB_JAR" | $as_tr_sh`
{ echo "$as_me:$LINENO: checking for $HSQLDB_JAR" >&5
echo $ECHO_N "checking for $HSQLDB_JAR... $ECHO_C" >&6; }
if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  test "$cross_compiling" = yes &&
  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
   { (exit 1); exit 1; }; }
if test -r "$HSQLDB_JAR"; then
  eval "$as_ac_File=yes"
else
  eval "$as_ac_File=no"
fi
fi
ac_res=`eval echo '${'$as_ac_File'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&6; }
if test `eval echo '${'$as_ac_File'}'` = yes; then
  :
else
  { { echo "$as_me:$LINENO: error: hsqldb.jar not found." >&5
echo "$as_me: error: hsqldb.jar not found." >&2;}
   { (exit 1); exit 1; }; }
fi

        { echo "$as_me:$LINENO: checking whether hsqldb is >= 1.8.0" >&5
echo $ECHO_N "checking whether hsqldb is >= 1.8.0... $ECHO_C" >&6; }
        export HSQLDB_JAR
        if $PERL -e 'use Archive::Zip;
            my $file = "$ENV{'HSQLDB_JAR'}";
            my $zip = Archive::Zip->new( $file );
            my $mf = $zip->contents ( "META-INF/MANIFEST.MF" );
            if ( $mf =~ m/Specification-Version: 1.8.*/ ) {
               exit 0;
            } else {
               exit 1;
            }'; then
            { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
         else
            { { echo "$as_me:$LINENO: error: no, hsqldb >= 1.8.0 is needed" >&5
echo "$as_me: error: no, hsqldb >= 1.8.0 is needed" >&2;}
   { (exit 1); exit 1; }; }
         fi
else
    { echo "$as_me:$LINENO: result: internal" >&5
echo "${ECHO_T}internal" >&6; }
    SYSTEM_HSQLDB=NO
    BUILD_TYPE="$BUILD_TYPE HSQLDB"
fi



{ echo "$as_me:$LINENO: checking which beanshell to use" >&5
echo $ECHO_N "checking which beanshell to use... $ECHO_C" >&6; }
if test -n "$with_system_beanshell" -o -n "$with_system_libs" && \
       test "$with_system_beanshell" != "no"; then
        { echo "$as_me:$LINENO: result: external" >&5
echo "${ECHO_T}external" >&6; }
        SYSTEM_BSH=YES
        if test -z $BSH_JAR; then
               BSH_JAR=/usr/share/java/bsh.jar
        fi
        as_ac_File=`echo "ac_cv_file_$BSH_JAR" | $as_tr_sh`
{ echo "$as_me:$LINENO: checking for $BSH_JAR" >&5
echo $ECHO_N "checking for $BSH_JAR... $ECHO_C" >&6; }
if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  test "$cross_compiling" = yes &&
  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
   { (exit 1); exit 1; }; }
if test -r "$BSH_JAR"; then
  eval "$as_ac_File=yes"
else
  eval "$as_ac_File=no"
fi
fi
ac_res=`eval echo '${'$as_ac_File'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&6; }
if test `eval echo '${'$as_ac_File'}'` = yes; then
  :
else
  { { echo "$as_me:$LINENO: error: bsh.jar not found." >&5
echo "$as_me: error: bsh.jar not found." >&2;}
   { (exit 1); exit 1; }; }
fi

else
    { echo "$as_me:$LINENO: result: internal" >&5
echo "${ECHO_T}internal" >&6; }
    SYSTEM_BSH=NO
    BUILD_TYPE="$BUILD_TYPE BSH"
fi



{ echo "$as_me:$LINENO: checking which xml-apis to use" >&5
echo $ECHO_N "checking which xml-apis to use... $ECHO_C" >&6; }
if test -n "$with_system_xml_apis" -o -n "$with_system_libs" && \
       test "$with_system_xml_apis" != "no"; then
        { echo "$as_me:$LINENO: result: external" >&5
echo "${ECHO_T}external" >&6; }
        SYSTEM_XML_APIS=YES
        if test -z $XML_APIS_JAR; then
          { echo "$as_me:$LINENO: checking for /usr/share/java/xml-commons-apis.jar" >&5
echo $ECHO_N "checking for /usr/share/java/xml-commons-apis.jar... $ECHO_C" >&6; }
if test "${ac_cv_file__usr_share_java_xml_commons_apis_jar+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  test "$cross_compiling" = yes &&
  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
   { (exit 1); exit 1; }; }
if test -r "/usr/share/java/xml-commons-apis.jar"; then
  ac_cv_file__usr_share_java_xml_commons_apis_jar=yes
else
  ac_cv_file__usr_share_java_xml_commons_apis_jar=no
fi
fi
{ echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_xml_commons_apis_jar" >&5
echo "${ECHO_T}$ac_cv_file__usr_share_java_xml_commons_apis_jar" >&6; }
if test $ac_cv_file__usr_share_java_xml_commons_apis_jar = yes; then
   XML_APIS_JAR=/usr/share/java/xml-commons-apis.jar
else

              { echo "$as_me:$LINENO: checking for /usr/share/java/xml-apis.jar" >&5
echo $ECHO_N "checking for /usr/share/java/xml-apis.jar... $ECHO_C" >&6; }
if test "${ac_cv_file__usr_share_java_xml_apis_jar+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  test "$cross_compiling" = yes &&
  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
   { (exit 1); exit 1; }; }
if test -r "/usr/share/java/xml-apis.jar"; then
  ac_cv_file__usr_share_java_xml_apis_jar=yes
else
  ac_cv_file__usr_share_java_xml_apis_jar=no
fi
fi
{ echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_xml_apis_jar" >&5
echo "${ECHO_T}$ac_cv_file__usr_share_java_xml_apis_jar" >&6; }
if test $ac_cv_file__usr_share_java_xml_apis_jar = yes; then
   XML_APIS_JAR=/usr/share/java/xml-apis.jar
else
   { echo "$as_me:$LINENO: checking for /usr/share/java/jaxp-1.2.jar" >&5
echo $ECHO_N "checking for /usr/share/java/jaxp-1.2.jar... $ECHO_C" >&6; }
if test "${ac_cv_file__usr_share_java_jaxp_1_2_jar+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  test "$cross_compiling" = yes &&
  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
   { (exit 1); exit 1; }; }
if test -r "/usr/share/java/jaxp-1.2.jar"; then
  ac_cv_file__usr_share_java_jaxp_1_2_jar=yes
else
  ac_cv_file__usr_share_java_jaxp_1_2_jar=no
fi
fi
{ echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_jaxp_1_2_jar" >&5
echo "${ECHO_T}$ac_cv_file__usr_share_java_jaxp_1_2_jar" >&6; }
if test $ac_cv_file__usr_share_java_jaxp_1_2_jar = yes; then
   XML_APIS_JAR=/usr/share/java/jaxp-1.2.jar
else
   { { echo "$as_me:$LINENO: error: xml-apis.jar replacement not found" >&5
echo "$as_me: error: xml-apis.jar replacement not found" >&2;}
   { (exit 1); exit 1; }; }

fi



fi



fi

        else
          as_ac_File=`echo "ac_cv_file_$XML_APIS_JAR" | $as_tr_sh`
{ echo "$as_me:$LINENO: checking for $XML_APIS_JAR" >&5
echo $ECHO_N "checking for $XML_APIS_JAR... $ECHO_C" >&6; }
if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  test "$cross_compiling" = yes &&
  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
   { (exit 1); exit 1; }; }
if test -r "$XML_APIS_JAR"; then
  eval "$as_ac_File=yes"
else
  eval "$as_ac_File=no"
fi
fi
ac_res=`eval echo '${'$as_ac_File'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&6; }
if test `eval echo '${'$as_ac_File'}'` = yes; then
  :
else
  { { echo "$as_me:$LINENO: error: xml-apis.jar replacement not found." >&5
echo "$as_me: error: xml-apis.jar replacement not found." >&2;}
   { (exit 1); exit 1; }; }
fi

        fi
else
    { echo "$as_me:$LINENO: result: internal" >&5
echo "${ECHO_T}internal" >&6; }
    SYSTEM_XML_APIS=NO
    NEED_XALAN=TRUE
fi



{ echo "$as_me:$LINENO: checking which xerces to use" >&5
echo $ECHO_N "checking which xerces to use... $ECHO_C" >&6; }
if test -n "$with_system_xerces" -o -n "$with_system_libs" && \
       test "$with_system_xerces" != "no"; then
        { echo "$as_me:$LINENO: result: external" >&5
echo "${ECHO_T}external" >&6; }
        SYSTEM_XERCES=YES
        if test -z $XERCES_JAR; then
          { echo "$as_me:$LINENO: checking for /usr/share/java/xerces-j2.jar" >&5
echo $ECHO_N "checking for /usr/share/java/xerces-j2.jar... $ECHO_C" >&6; }
if test "${ac_cv_file__usr_share_java_xerces_j2_jar+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  test "$cross_compiling" = yes &&
  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
   { (exit 1); exit 1; }; }
if test -r "/usr/share/java/xerces-j2.jar"; then
  ac_cv_file__usr_share_java_xerces_j2_jar=yes
else
  ac_cv_file__usr_share_java_xerces_j2_jar=no
fi
fi
{ echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_xerces_j2_jar" >&5
echo "${ECHO_T}$ac_cv_file__usr_share_java_xerces_j2_jar" >&6; }
if test $ac_cv_file__usr_share_java_xerces_j2_jar = yes; then
   XERCES_JAR=/usr/share/java/xerces-j2.jar
else

              { echo "$as_me:$LINENO: checking for /usr/share/java/xercesImpl.jar" >&5
echo $ECHO_N "checking for /usr/share/java/xercesImpl.jar... $ECHO_C" >&6; }
if test "${ac_cv_file__usr_share_java_xercesImpl_jar+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  test "$cross_compiling" = yes &&
  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
   { (exit 1); exit 1; }; }
if test -r "/usr/share/java/xercesImpl.jar"; then
  ac_cv_file__usr_share_java_xercesImpl_jar=yes
else
  ac_cv_file__usr_share_java_xercesImpl_jar=no
fi
fi
{ echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_xercesImpl_jar" >&5
echo "${ECHO_T}$ac_cv_file__usr_share_java_xercesImpl_jar" >&6; }
if test $ac_cv_file__usr_share_java_xercesImpl_jar = yes; then
   XERCES_JAR=/usr/share/java/xercesImpl.jar
else
   { { echo "$as_me:$LINENO: error: xercesImpl.jar replacement not found" >&5
echo "$as_me: error: xercesImpl.jar replacement not found" >&2;}
   { (exit 1); exit 1; }; }

fi



fi

        else
          as_ac_File=`echo "ac_cv_file_$XERCES_JAR" | $as_tr_sh`
{ echo "$as_me:$LINENO: checking for $XERCES_JAR" >&5
echo $ECHO_N "checking for $XERCES_JAR... $ECHO_C" >&6; }
if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  test "$cross_compiling" = yes &&
  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
   { (exit 1); exit 1; }; }
if test -r "$XERCES_JAR"; then
  eval "$as_ac_File=yes"
else
  eval "$as_ac_File=no"
fi
fi
ac_res=`eval echo '${'$as_ac_File'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&6; }
if test `eval echo '${'$as_ac_File'}'` = yes; then
  :
else
  { { echo "$as_me:$LINENO: error: xercesImpl.jar replacement not found." >&5
echo "$as_me: error: xercesImpl.jar replacement not found." >&2;}
   { (exit 1); exit 1; }; }
fi

        fi
else
    { echo "$as_me:$LINENO: result: internal" >&5
echo "${ECHO_T}internal" >&6; }
    SYSTEM_XERCES=NO
    NEED_XALAN=TRUE
fi



{ echo "$as_me:$LINENO: checking which xalan to use" >&5
echo $ECHO_N "checking which xalan to use... $ECHO_C" >&6; }
if test -n "$with_system_xalan" -o -n "$with_system_libs" && \
       test "$with_system_xalan" != "no"; then
        { echo "$as_me:$LINENO: result: external" >&5
echo "${ECHO_T}external" >&6; }
        SYSTEM_XALAN=YES
        if test -z $XALAN_JAR; then
          { echo "$as_me:$LINENO: checking for /usr/share/java/xalan-j2.jar" >&5
echo $ECHO_N "checking for /usr/share/java/xalan-j2.jar... $ECHO_C" >&6; }
if test "${ac_cv_file__usr_share_java_xalan_j2_jar+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  test "$cross_compiling" = yes &&
  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
   { (exit 1); exit 1; }; }
if test -r "/usr/share/java/xalan-j2.jar"; then
  ac_cv_file__usr_share_java_xalan_j2_jar=yes
else
  ac_cv_file__usr_share_java_xalan_j2_jar=no
fi
fi
{ echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_xalan_j2_jar" >&5
echo "${ECHO_T}$ac_cv_file__usr_share_java_xalan_j2_jar" >&6; }
if test $ac_cv_file__usr_share_java_xalan_j2_jar = yes; then
   XALAN_JAR=/usr/share/java/xalan-j2.jar
else

              { echo "$as_me:$LINENO: checking for /usr/share/java/xalan2.jar" >&5
echo $ECHO_N "checking for /usr/share/java/xalan2.jar... $ECHO_C" >&6; }
if test "${ac_cv_file__usr_share_java_xalan2_jar+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  test "$cross_compiling" = yes &&
  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
   { (exit 1); exit 1; }; }
if test -r "/usr/share/java/xalan2.jar"; then
  ac_cv_file__usr_share_java_xalan2_jar=yes
else
  ac_cv_file__usr_share_java_xalan2_jar=no
fi
fi
{ echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_xalan2_jar" >&5
echo "${ECHO_T}$ac_cv_file__usr_share_java_xalan2_jar" >&6; }
if test $ac_cv_file__usr_share_java_xalan2_jar = yes; then
   XALAN_JAR=/usr/share/java/xalan2.jar
else
   { echo "$as_me:$LINENO: checking for /usr/share/java/xalan.jar" >&5
echo $ECHO_N "checking for /usr/share/java/xalan.jar... $ECHO_C" >&6; }
if test "${ac_cv_file__usr_share_java_xalan_jar+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  test "$cross_compiling" = yes &&
  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
   { (exit 1); exit 1; }; }
if test -r "/usr/share/java/xalan.jar"; then
  ac_cv_file__usr_share_java_xalan_jar=yes
else
  ac_cv_file__usr_share_java_xalan_jar=no
fi
fi
{ echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_xalan_jar" >&5
echo "${ECHO_T}$ac_cv_file__usr_share_java_xalan_jar" >&6; }
if test $ac_cv_file__usr_share_java_xalan_jar = yes; then
   XALAN_JAR=/usr/share/java/xalan.jar
else
   { { echo "$as_me:$LINENO: error: xalan.jar replacement not found" >&5
echo "$as_me: error: xalan.jar replacement not found" >&2;}
   { (exit 1); exit 1; }; }

fi



fi



fi

        else
          as_ac_File=`echo "ac_cv_file_$XALAN_JAR" | $as_tr_sh`
{ echo "$as_me:$LINENO: checking for $XALAN_JAR" >&5
echo $ECHO_N "checking for $XALAN_JAR... $ECHO_C" >&6; }
if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  test "$cross_compiling" = yes &&
  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
   { (exit 1); exit 1; }; }
if test -r "$XALAN_JAR"; then
  eval "$as_ac_File=yes"
else
  eval "$as_ac_File=no"
fi
fi
ac_res=`eval echo '${'$as_ac_File'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&6; }
if test `eval echo '${'$as_ac_File'}'` = yes; then
  :
else
  { { echo "$as_me:$LINENO: error: xalan.jar replacement not found." >&5
echo "$as_me: error: xalan.jar replacement not found." >&2;}
   { (exit 1); exit 1; }; }
fi

        fi
else
    { echo "$as_me:$LINENO: result: internal" >&5
echo "${ECHO_T}internal" >&6; }
    SYSTEM_XALAN=NO
    NEED_XALAN=TRUE
fi



if test -n "$NEED_XALAN"; then
   BUILD_TYPE="$BUILD_TYPE XALAN"
fi


{ echo "$as_me:$LINENO: checking which sablot to use" >&5
echo $ECHO_N "checking which sablot to use... $ECHO_C" >&6; }
if test -n "$with_system_sablot" -o -n "$with_system_libs" && \
	test "$with_system_sablot" != "no"; then
   { echo "$as_me:$LINENO: result: external" >&5
echo "${ECHO_T}external" >&6; }
   SYSTEM_SABLOT=YES

   # Extract the first word of "sablot-config", so it can be a program name with args.
set dummy sablot-config; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path_SABLOTCONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $SABLOTCONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_SABLOTCONFIG="$SABLOTCONFIG" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_SABLOTCONFIG="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
SABLOTCONFIG=$ac_cv_path_SABLOTCONFIG
if test -n "$SABLOTCONFIG"; then
  { echo "$as_me:$LINENO: result: $SABLOTCONFIG" >&5
echo "${ECHO_T}$SABLOTCONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


   if test -z "$SABLOTCONFIG"; then
      { { echo "$as_me:$LINENO: error: install sablot to run this script" >&5
echo "$as_me: error: install sablot to run this script" >&2;}
   { (exit 1); exit 1; }; }
   fi

   SABLOT_LIBS=`$SABLOTCONFIG --libs`
   SABLOT_LIBS="-lsablot $SABLOT_LIBS"
else
   { echo "$as_me:$LINENO: result: internal" >&5
echo "${ECHO_T}internal" >&6; }
   SYSTEM_SABLOT=NO
   BUILD_TYPE="$BUILD_TYPE SABLOT"
fi



if test "$_os" = "Darwin" && test "$with_system_curl" != "no"; then
   with_system_curl=yes
fi
{ echo "$as_me:$LINENO: checking which curl to use" >&5
echo $ECHO_N "checking which curl to use... $ECHO_C" >&6; }
if test -n "$with_system_curl" -o -n "$with_system_libs" && \
	test "$with_system_curl" != "no"; then
   { echo "$as_me:$LINENO: result: external" >&5
echo "${ECHO_T}external" >&6; }
   SYSTEM_CURL=YES

   # Extract the first word of "curl-config", so it can be a program name with args.
set dummy curl-config; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path_CURLCONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $CURLCONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CURLCONFIG="$CURLCONFIG" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_CURLCONFIG="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
CURLCONFIG=$ac_cv_path_CURLCONFIG
if test -n "$CURLCONFIG"; then
  { echo "$as_me:$LINENO: result: $CURLCONFIG" >&5
echo "${ECHO_T}$CURLCONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


   if test -z "$CURLCONFIG"; then
      { { echo "$as_me:$LINENO: error: install curl to run this script" >&5
echo "$as_me: error: install curl to run this script" >&2;}
   { (exit 1); exit 1; }; }
   fi

   # check curl version
   { echo "$as_me:$LINENO: checking whether curl is >= 7.9.8" >&5
echo $ECHO_N "checking whether curl is >= 7.9.8... $ECHO_C" >&6; }
   if test "`$CURLCONFIG --version | $AWK -F' ' '{print $2}' | $AWK -F. '{ print $1 }'`" -gt "7" -a \
	"`$CURLCONFIG --version | $AWK -F' ' '{print $2}' | $AWK -F. '{ print $2 }'`" -gt "9" -a \
	"`$CURLCONFIG --version | $AWK -F' ' '{print $2}' | $AWK -F. '{ print $3 }'`" -gt "8"; then
      { { echo "$as_me:$LINENO: error: no, you need at least curl 7.9,8" >&5
echo "$as_me: error: no, you need at least curl 7.9,8" >&2;}
   { (exit 1); exit 1; }; }
   else
      { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
   fi
   CURL_LIBS=`$CURLCONFIG --libs`
   CURL_CFLAGS=`$CURLCONFIG --cflags`
else
   { echo "$as_me:$LINENO: result: internal" >&5
echo "${ECHO_T}internal" >&6; }
   SYSTEM_CURL=NO
   BUILD_TYPE="$BUILD_TYPE CURL"
fi




{ echo "$as_me:$LINENO: checking which boost to use" >&5
echo $ECHO_N "checking which boost to use... $ECHO_C" >&6; }
if test -n "$with_system_boost" && test "$with_system_boost" != "no"; then
   { echo "$as_me:$LINENO: result: external" >&5
echo "${ECHO_T}external" >&6; }
   SYSTEM_BOOST=YES

   ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu

   if test "${ac_cv_header_boost_shared_ptr_hpp+set}" = set; then
  { echo "$as_me:$LINENO: checking for boost/shared_ptr.hpp" >&5
echo $ECHO_N "checking for boost/shared_ptr.hpp... $ECHO_C" >&6; }
if test "${ac_cv_header_boost_shared_ptr_hpp+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
fi
{ echo "$as_me:$LINENO: result: $ac_cv_header_boost_shared_ptr_hpp" >&5
echo "${ECHO_T}$ac_cv_header_boost_shared_ptr_hpp" >&6; }
else
  # Is the header compilable?
{ echo "$as_me:$LINENO: checking boost/shared_ptr.hpp usability" >&5
echo $ECHO_N "checking boost/shared_ptr.hpp usability... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
#include <boost/shared_ptr.hpp>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_header_compiler=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_header_compiler=no
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6; }

# Is the header present?
{ echo "$as_me:$LINENO: checking boost/shared_ptr.hpp presence" >&5
echo $ECHO_N "checking boost/shared_ptr.hpp presence... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <boost/shared_ptr.hpp>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_cxx_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  ac_header_preproc=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  ac_header_preproc=no
fi

rm -f conftest.err conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6; }

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
  yes:no: )
    { echo "$as_me:$LINENO: WARNING: boost/shared_ptr.hpp: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: boost/shared_ptr.hpp: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { echo "$as_me:$LINENO: WARNING: boost/shared_ptr.hpp: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: boost/shared_ptr.hpp: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { echo "$as_me:$LINENO: WARNING: boost/shared_ptr.hpp: present but cannot be compiled" >&5
echo "$as_me: WARNING: boost/shared_ptr.hpp: present but cannot be compiled" >&2;}
    { echo "$as_me:$LINENO: WARNING: boost/shared_ptr.hpp:     check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: boost/shared_ptr.hpp:     check for missing prerequisite headers?" >&2;}
    { echo "$as_me:$LINENO: WARNING: boost/shared_ptr.hpp: see the Autoconf documentation" >&5
echo "$as_me: WARNING: boost/shared_ptr.hpp: see the Autoconf documentation" >&2;}
    { echo "$as_me:$LINENO: WARNING: boost/shared_ptr.hpp:     section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: boost/shared_ptr.hpp:     section \"Present But Cannot Be Compiled\"" >&2;}
    { echo "$as_me:$LINENO: WARNING: boost/shared_ptr.hpp: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: boost/shared_ptr.hpp: proceeding with the preprocessor's result" >&2;}
    { echo "$as_me:$LINENO: WARNING: boost/shared_ptr.hpp: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: boost/shared_ptr.hpp: in the future, the compiler will take precedence" >&2;}

    ;;
esac
{ echo "$as_me:$LINENO: checking for boost/shared_ptr.hpp" >&5
echo $ECHO_N "checking for boost/shared_ptr.hpp... $ECHO_C" >&6; }
if test "${ac_cv_header_boost_shared_ptr_hpp+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_cv_header_boost_shared_ptr_hpp=$ac_header_preproc
fi
{ echo "$as_me:$LINENO: result: $ac_cv_header_boost_shared_ptr_hpp" >&5
echo "${ECHO_T}$ac_cv_header_boost_shared_ptr_hpp" >&6; }

fi
if test $ac_cv_header_boost_shared_ptr_hpp = yes; then
  :
else
  { { echo "$as_me:$LINENO: error: boost/shared_ptr.hpp not found. install boost" >&5
echo "$as_me: error: boost/shared_ptr.hpp not found. install boost" >&2;}
   { (exit 1); exit 1; }; }
fi


   if test "${ac_cv_header_boost_spirit_core_hpp+set}" = set; then
  { echo "$as_me:$LINENO: checking for boost/spirit/core.hpp" >&5
echo $ECHO_N "checking for boost/spirit/core.hpp... $ECHO_C" >&6; }
if test "${ac_cv_header_boost_spirit_core_hpp+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
fi
{ echo "$as_me:$LINENO: result: $ac_cv_header_boost_spirit_core_hpp" >&5
echo "${ECHO_T}$ac_cv_header_boost_spirit_core_hpp" >&6; }
else
  # Is the header compilable?
{ echo "$as_me:$LINENO: checking boost/spirit/core.hpp usability" >&5
echo $ECHO_N "checking boost/spirit/core.hpp usability... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
#include <boost/spirit/core.hpp>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_header_compiler=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_header_compiler=no
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6; }

# Is the header present?
{ echo "$as_me:$LINENO: checking boost/spirit/core.hpp presence" >&5
echo $ECHO_N "checking boost/spirit/core.hpp presence... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <boost/spirit/core.hpp>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_cxx_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  ac_header_preproc=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  ac_header_preproc=no
fi

rm -f conftest.err conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6; }

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
  yes:no: )
    { echo "$as_me:$LINENO: WARNING: boost/spirit/core.hpp: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: boost/spirit/core.hpp: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { echo "$as_me:$LINENO: WARNING: boost/spirit/core.hpp: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: boost/spirit/core.hpp: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { echo "$as_me:$LINENO: WARNING: boost/spirit/core.hpp: present but cannot be compiled" >&5
echo "$as_me: WARNING: boost/spirit/core.hpp: present but cannot be compiled" >&2;}
    { echo "$as_me:$LINENO: WARNING: boost/spirit/core.hpp:     check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: boost/spirit/core.hpp:     check for missing prerequisite headers?" >&2;}
    { echo "$as_me:$LINENO: WARNING: boost/spirit/core.hpp: see the Autoconf documentation" >&5
echo "$as_me: WARNING: boost/spirit/core.hpp: see the Autoconf documentation" >&2;}
    { echo "$as_me:$LINENO: WARNING: boost/spirit/core.hpp:     section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: boost/spirit/core.hpp:     section \"Present But Cannot Be Compiled\"" >&2;}
    { echo "$as_me:$LINENO: WARNING: boost/spirit/core.hpp: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: boost/spirit/core.hpp: proceeding with the preprocessor's result" >&2;}
    { echo "$as_me:$LINENO: WARNING: boost/spirit/core.hpp: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: boost/spirit/core.hpp: in the future, the compiler will take precedence" >&2;}

    ;;
esac
{ echo "$as_me:$LINENO: checking for boost/spirit/core.hpp" >&5
echo $ECHO_N "checking for boost/spirit/core.hpp... $ECHO_C" >&6; }
if test "${ac_cv_header_boost_spirit_core_hpp+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_cv_header_boost_spirit_core_hpp=$ac_header_preproc
fi
{ echo "$as_me:$LINENO: result: $ac_cv_header_boost_spirit_core_hpp" >&5
echo "${ECHO_T}$ac_cv_header_boost_spirit_core_hpp" >&6; }

fi
if test $ac_cv_header_boost_spirit_core_hpp = yes; then
  :
else
  { { echo "$as_me:$LINENO: error: boost/spirit/core.hpp not found. install boost" >&5
echo "$as_me: error: boost/spirit/core.hpp not found. install boost" >&2;}
   { (exit 1); exit 1; }; }
fi


   ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu

else
   { echo "$as_me:$LINENO: result: internal" >&5
echo "${ECHO_T}internal" >&6; }
   BUILD_TYPE="$BUILD_TYPE BOOST"
   SYSTEM_BOOST=NO
fi


{ echo "$as_me:$LINENO: checking which odbc headers to use" >&5
echo $ECHO_N "checking which odbc headers to use... $ECHO_C" >&6; }
if test -n "$with_system_odbc_headers" && test "$with_system_odbc_headers" != "no"; then
   { echo "$as_me:$LINENO: result: external" >&5
echo "${ECHO_T}external" >&6; }
   SYSTEM_ODBC_HEADERS=YES

   if test "${ac_cv_header_sqlext_h+set}" = set; then
  { echo "$as_me:$LINENO: checking for sqlext.h" >&5
echo $ECHO_N "checking for sqlext.h... $ECHO_C" >&6; }
if test "${ac_cv_header_sqlext_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
fi
{ echo "$as_me:$LINENO: result: $ac_cv_header_sqlext_h" >&5
echo "${ECHO_T}$ac_cv_header_sqlext_h" >&6; }
else
  # Is the header compilable?
{ echo "$as_me:$LINENO: checking sqlext.h usability" >&5
echo $ECHO_N "checking sqlext.h usability... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
#include <sqlext.h>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_header_compiler=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_header_compiler=no
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6; }

# Is the header present?
{ echo "$as_me:$LINENO: checking sqlext.h presence" >&5
echo $ECHO_N "checking sqlext.h presence... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <sqlext.h>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_cxx_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  ac_header_preproc=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  ac_header_preproc=no
fi

rm -f conftest.err conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6; }

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
  yes:no: )
    { echo "$as_me:$LINENO: WARNING: sqlext.h: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: sqlext.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { echo "$as_me:$LINENO: WARNING: sqlext.h: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: sqlext.h: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { echo "$as_me:$LINENO: WARNING: sqlext.h: present but cannot be compiled" >&5
echo "$as_me: WARNING: sqlext.h: present but cannot be compiled" >&2;}
    { echo "$as_me:$LINENO: WARNING: sqlext.h:     check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: sqlext.h:     check for missing prerequisite headers?" >&2;}
    { echo "$as_me:$LINENO: WARNING: sqlext.h: see the Autoconf documentation" >&5
echo "$as_me: WARNING: sqlext.h: see the Autoconf documentation" >&2;}
    { echo "$as_me:$LINENO: WARNING: sqlext.h:     section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: sqlext.h:     section \"Present But Cannot Be Compiled\"" >&2;}
    { echo "$as_me:$LINENO: WARNING: sqlext.h: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: sqlext.h: proceeding with the preprocessor's result" >&2;}
    { echo "$as_me:$LINENO: WARNING: sqlext.h: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: sqlext.h: in the future, the compiler will take precedence" >&2;}

    ;;
esac
{ echo "$as_me:$LINENO: checking for sqlext.h" >&5
echo $ECHO_N "checking for sqlext.h... $ECHO_C" >&6; }
if test "${ac_cv_header_sqlext_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_cv_header_sqlext_h=$ac_header_preproc
fi
{ echo "$as_me:$LINENO: result: $ac_cv_header_sqlext_h" >&5
echo "${ECHO_T}$ac_cv_header_sqlext_h" >&6; }

fi
if test $ac_cv_header_sqlext_h = yes; then
  :
else
  { { echo "$as_me:$LINENO: error: odbc not found. install odbc" >&5
echo "$as_me: error: odbc not found. install odbc" >&2;}
   { (exit 1); exit 1; }; }
fi


else
   { echo "$as_me:$LINENO: result: internal" >&5
echo "${ECHO_T}internal" >&6; }
   SYSTEM_ODBC_HEADERS=NO
   BUILD_TYPE="$BUILD_TYPE UNIXODBC"
fi


{ echo "$as_me:$LINENO: checking whether to enable build of Mozilla/Mozilla NSS-using components" >&5
echo $ECHO_N "checking whether to enable build of Mozilla/Mozilla NSS-using components... $ECHO_C" >&6; }
if test "$enable_mozilla" = "no"; then
   { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
   WITH_MOZILLA=NO
else
   { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
   WITH_MOZILLA=YES
fi


{ echo "$as_me:$LINENO: checking whether to build Mozilla addressbook connectivity" >&5
echo $ECHO_N "checking whether to build Mozilla addressbook connectivity... $ECHO_C" >&6; }
if test "$enable_mozilla" = "no"; then
   { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
elif test -n "$with_system_mozilla"; then
   { echo "$as_me:$LINENO: result: no, not possible with system-mozilla" >&5
echo "${ECHO_T}no, not possible with system-mozilla" >&6; }
else
   { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
fi

{ echo "$as_me:$LINENO: checking whether to build XML Security support" >&5
echo $ECHO_N "checking whether to build XML Security support... $ECHO_C" >&6; }
if test "$enable_mozilla" = "no"; then
   { echo "$as_me:$LINENO: result: no, since Mozilla (NSS) disabled but needed" >&5
echo "${ECHO_T}no, since Mozilla (NSS) disabled but needed" >&6; }
elif test "$with_system_mozilla" = "yes"; then
   { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
else
   { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
fi

{ echo "$as_me:$LINENO: checking whether to build LDAP configuration backend" >&5
echo $ECHO_N "checking whether to build LDAP configuration backend... $ECHO_C" >&6; }
if test -z "$enable_ldap" || test "$enable_ldap" = "yes"; then
   if test "$enable_mozilla" = "yes" || test "$with_openldap" = "yes"; then
      { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
      WITH_LDAP=YES
   else
      { echo "$as_me:$LINENO: result: no. Either Mozilla or OpenLDAP needed" >&5
echo "${ECHO_T}no. Either Mozilla or OpenLDAP needed" >&6; }
      WITH_LDAP=NO
   fi
else
   { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
   WITH_LDAP=NO
fi

if test "$WITH_LDAP" = "YES"; then
            { echo "$as_me:$LINENO: checking which LDAP SDK to use" >&5
echo $ECHO_N "checking which LDAP SDK to use... $ECHO_C" >&6; }
   if test -n "$with_openldap" && test "$with_openldap" != "no"; then
  	   { echo "$as_me:$LINENO: result: OpenLDAP" >&5
echo "${ECHO_T}OpenLDAP" >&6; }
	   WITH_OPENLDAP=YES

for ac_header in ldap.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  { echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&6; }
else
  # Is the header compilable?
{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_header_compiler=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_header_compiler=no
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6; }

# Is the header present?
{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <$ac_header>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_cxx_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  ac_header_preproc=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  ac_header_preproc=no
fi

rm -f conftest.err conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6; }

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
  yes:no: )
    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}

    ;;
esac
{ echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  eval "$as_ac_Header=\$ac_header_preproc"
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&6; }

fi
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

else
  { { echo "$as_me:$LINENO: error: ldap.h not found. install openldap libs" >&5
echo "$as_me: error: ldap.h not found. install openldap libs" >&2;}
   { (exit 1); exit 1; }; }
fi

done


{ echo "$as_me:$LINENO: checking for ldap_simple_bind_s in -lldap" >&5
echo $ECHO_N "checking for ldap_simple_bind_s in -lldap... $ECHO_C" >&6; }
if test "${ac_cv_lib_ldap_ldap_simple_bind_s+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lldap  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char ldap_simple_bind_s ();
int
main ()
{
return ldap_simple_bind_s ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_ldap_ldap_simple_bind_s=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_lib_ldap_ldap_simple_bind_s=no
fi

rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_ldap_simple_bind_s" >&5
echo "${ECHO_T}$ac_cv_lib_ldap_ldap_simple_bind_s" >&6; }
if test $ac_cv_lib_ldap_ldap_simple_bind_s = yes; then
  cat >>confdefs.h <<_ACEOF
#define HAVE_LIBLDAP 1
_ACEOF

  LIBS="-lldap $LIBS"

else
  { { echo "$as_me:$LINENO: error: openldap lib not found or functional" >&5
echo "$as_me: error: openldap lib not found or functional" >&2;}
   { (exit 1); exit 1; }; }
fi

	   # rumours say that OpenLDAP doesn't have that function. I looked and
	   # it has it. Test for it to be sure

{ echo "$as_me:$LINENO: checking for ldap_set_option in -lldap" >&5
echo $ECHO_N "checking for ldap_set_option in -lldap... $ECHO_C" >&6; }
if test "${ac_cv_lib_ldap_ldap_set_option+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lldap  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char ldap_set_option ();
int
main ()
{
return ldap_set_option ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_ldap_ldap_set_option=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_lib_ldap_ldap_set_option=no
fi

rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_ldap_set_option" >&5
echo "${ECHO_T}$ac_cv_lib_ldap_ldap_set_option" >&6; }
if test $ac_cv_lib_ldap_ldap_set_option = yes; then
  cat >>confdefs.h <<_ACEOF
#define HAVE_LIBLDAP 1
_ACEOF

  LIBS="-lldap $LIBS"

else
  { { echo "$as_me:$LINENO: error: openldap lib not found or functional" >&5
echo "$as_me: error: openldap lib not found or functional" >&2;}
   { (exit 1); exit 1; }; }
fi

   else
	   { echo "$as_me:$LINENO: result: Netscape/Mozilla" >&5
echo "${ECHO_T}Netscape/Mozilla" >&6; }
	   # TODO. Actually do a sanity check and check for
	   # LDAP_OPT_SIZELIMIT and LDAP_X_OPT_CONNECT_TIMEOUT
	   WITH_OPENLDAP=NO
   fi
fi



{ echo "$as_me:$LINENO: checking which mozilla to use" >&5
echo $ECHO_N "checking which mozilla to use... $ECHO_C" >&6; }
if test -n "$with_system_mozilla" && test "$with_system_mozilla" != "no"; then
    { echo "$as_me:$LINENO: result: external" >&5
echo "${ECHO_T}external" >&6; }
    SYSTEM_MOZILLA=YES
    { echo "$as_me:$LINENO: checking which Mozilla flavour to use" >&5
echo $ECHO_N "checking which Mozilla flavour to use... $ECHO_C" >&6; }
    if test -n "$with_firefox" && test "$with_firefox" != "no"; then
      MOZ_FLAVOUR=firefox
    elif test -n "$with_xulrunner" && test "$with_xulrunner" != "no"; then
      MOZ_FLAVOUR=xulrunner
    else
      MOZ_FLAVOUR=mozilla
    fi
    tmp=`echo $MOZ_FLAVOUR | $PERL -e 'print ucfirst(<STDIN>);'`
    { echo "$as_me:$LINENO: result: $tmp" >&5
echo "${ECHO_T}$tmp" >&6; }


  succeeded=no

  if test -z "$PKG_CONFIG"; then
    # Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $PKG_CONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
  ;;
esac
fi
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
if test -n "$PKG_CONFIG"; then
  { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
echo "${ECHO_T}$PKG_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  fi

  if test "$PKG_CONFIG" = "no" ; then
     echo "*** The pkg-config script could not be found. Make sure it is"
     echo "*** in your path, or set the PKG_CONFIG environment variable"
     echo "*** to the full path to pkg-config."
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
  else
     PKG_CONFIG_MIN_VERSION=0.9.0
     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
        { echo "$as_me:$LINENO: checking for $MOZ_FLAVOUR-xpcom " >&5
echo $ECHO_N "checking for $MOZ_FLAVOUR-xpcom ... $ECHO_C" >&6; }

        if $PKG_CONFIG --exists "$MOZ_FLAVOUR-xpcom " ; then
            { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
            succeeded=yes

            { echo "$as_me:$LINENO: checking MOZILLAXPCOM_CFLAGS" >&5
echo $ECHO_N "checking MOZILLAXPCOM_CFLAGS... $ECHO_C" >&6; }
            MOZILLAXPCOM_CFLAGS=`$PKG_CONFIG --cflags "$MOZ_FLAVOUR-xpcom "`
            { echo "$as_me:$LINENO: result: $MOZILLAXPCOM_CFLAGS" >&5
echo "${ECHO_T}$MOZILLAXPCOM_CFLAGS" >&6; }

            { echo "$as_me:$LINENO: checking MOZILLAXPCOM_LIBS" >&5
echo $ECHO_N "checking MOZILLAXPCOM_LIBS... $ECHO_C" >&6; }
            MOZILLAXPCOM_LIBS=`$PKG_CONFIG --libs "$MOZ_FLAVOUR-xpcom "`
            { echo "$as_me:$LINENO: result: $MOZILLAXPCOM_LIBS" >&5
echo "${ECHO_T}$MOZILLAXPCOM_LIBS" >&6; }
        else
            MOZILLAXPCOM_CFLAGS=""
            MOZILLAXPCOM_LIBS=""
            ## If we have a custom action on failure, don't print errors, but
            ## do set a variable so people can do so.
            MOZILLAXPCOM_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$MOZ_FLAVOUR-xpcom "`
            echo $MOZILLAXPCOM_PKG_ERRORS
        fi



     else
        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
        echo "*** See http://www.freedesktop.org/software/pkgconfig"
     fi
  fi

  if test $succeeded = yes; then
     :
  else
     { { echo "$as_me:$LINENO: error: Library requirements ($MOZ_FLAVOUR-xpcom ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5
echo "$as_me: error: Library requirements ($MOZ_FLAVOUR-xpcom ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;}
   { (exit 1); exit 1; }; }
  fi


    if $PKG_CONFIG --exists nspr ; then

  succeeded=no

  if test -z "$PKG_CONFIG"; then
    # Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $PKG_CONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
  ;;
esac
fi
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
if test -n "$PKG_CONFIG"; then
  { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
echo "${ECHO_T}$PKG_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  fi

  if test "$PKG_CONFIG" = "no" ; then
     echo "*** The pkg-config script could not be found. Make sure it is"
     echo "*** in your path, or set the PKG_CONFIG environment variable"
     echo "*** to the full path to pkg-config."
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
  else
     PKG_CONFIG_MIN_VERSION=0.9.0
     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
        { echo "$as_me:$LINENO: checking for nspr " >&5
echo $ECHO_N "checking for nspr ... $ECHO_C" >&6; }

        if $PKG_CONFIG --exists "nspr " ; then
            { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
            succeeded=yes

            { echo "$as_me:$LINENO: checking MOZ_NSPR_CFLAGS" >&5
echo $ECHO_N "checking MOZ_NSPR_CFLAGS... $ECHO_C" >&6; }
            MOZ_NSPR_CFLAGS=`$PKG_CONFIG --cflags "nspr "`
            { echo "$as_me:$LINENO: result: $MOZ_NSPR_CFLAGS" >&5
echo "${ECHO_T}$MOZ_NSPR_CFLAGS" >&6; }

            { echo "$as_me:$LINENO: checking MOZ_NSPR_LIBS" >&5
echo $ECHO_N "checking MOZ_NSPR_LIBS... $ECHO_C" >&6; }
            MOZ_NSPR_LIBS=`$PKG_CONFIG --libs "nspr "`
            { echo "$as_me:$LINENO: result: $MOZ_NSPR_LIBS" >&5
echo "${ECHO_T}$MOZ_NSPR_LIBS" >&6; }
        else
            MOZ_NSPR_CFLAGS=""
            MOZ_NSPR_LIBS=""
            ## If we have a custom action on failure, don't print errors, but
            ## do set a variable so people can do so.
            MOZ_NSPR_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "nspr "`
            echo $MOZ_NSPR_PKG_ERRORS
        fi



     else
        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
        echo "*** See http://www.freedesktop.org/software/pkgconfig"
     fi
  fi

  if test $succeeded = yes; then
     :
  else
     { { echo "$as_me:$LINENO: error: Library requirements (nspr ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5
echo "$as_me: error: Library requirements (nspr ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;}
   { (exit 1); exit 1; }; }
  fi

      NSPR_LIB="-L`$PKG_CONFIG --variable=libdir nspr`"

    else

  succeeded=no

  if test -z "$PKG_CONFIG"; then
    # Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $PKG_CONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
  ;;
esac
fi
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
if test -n "$PKG_CONFIG"; then
  { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
echo "${ECHO_T}$PKG_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  fi

  if test "$PKG_CONFIG" = "no" ; then
     echo "*** The pkg-config script could not be found. Make sure it is"
     echo "*** in your path, or set the PKG_CONFIG environment variable"
     echo "*** to the full path to pkg-config."
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
  else
     PKG_CONFIG_MIN_VERSION=0.9.0
     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
        { echo "$as_me:$LINENO: checking for $MOZ_FLAVOUR-nspr " >&5
echo $ECHO_N "checking for $MOZ_FLAVOUR-nspr ... $ECHO_C" >&6; }

        if $PKG_CONFIG --exists "$MOZ_FLAVOUR-nspr " ; then
            { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
            succeeded=yes

            { echo "$as_me:$LINENO: checking MOZ_NSPR_CFLAGS" >&5
echo $ECHO_N "checking MOZ_NSPR_CFLAGS... $ECHO_C" >&6; }
            MOZ_NSPR_CFLAGS=`$PKG_CONFIG --cflags "$MOZ_FLAVOUR-nspr "`
            { echo "$as_me:$LINENO: result: $MOZ_NSPR_CFLAGS" >&5
echo "${ECHO_T}$MOZ_NSPR_CFLAGS" >&6; }

            { echo "$as_me:$LINENO: checking MOZ_NSPR_LIBS" >&5
echo $ECHO_N "checking MOZ_NSPR_LIBS... $ECHO_C" >&6; }
            MOZ_NSPR_LIBS=`$PKG_CONFIG --libs "$MOZ_FLAVOUR-nspr "`
            { echo "$as_me:$LINENO: result: $MOZ_NSPR_LIBS" >&5
echo "${ECHO_T}$MOZ_NSPR_LIBS" >&6; }
        else
            MOZ_NSPR_CFLAGS=""
            MOZ_NSPR_LIBS=""
            ## If we have a custom action on failure, don't print errors, but
            ## do set a variable so people can do so.
            MOZ_NSPR_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$MOZ_FLAVOUR-nspr "`
            echo $MOZ_NSPR_PKG_ERRORS
        fi



     else
        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
        echo "*** See http://www.freedesktop.org/software/pkgconfig"
     fi
  fi

  if test $succeeded = yes; then
     :
  else
     { { echo "$as_me:$LINENO: error: Library requirements ($MOZ_FLAVOUR-nspr ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5
echo "$as_me: error: Library requirements ($MOZ_FLAVOUR-nspr ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;}
   { (exit 1); exit 1; }; }
  fi

    fi


  succeeded=no

  if test -z "$PKG_CONFIG"; then
    # Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $PKG_CONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
  ;;
esac
fi
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
if test -n "$PKG_CONFIG"; then
  { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
echo "${ECHO_T}$PKG_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  fi

  if test "$PKG_CONFIG" = "no" ; then
     echo "*** The pkg-config script could not be found. Make sure it is"
     echo "*** in your path, or set the PKG_CONFIG environment variable"
     echo "*** to the full path to pkg-config."
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
  else
     PKG_CONFIG_MIN_VERSION=0.9.0
     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
        { echo "$as_me:$LINENO: checking for nss" >&5
echo $ECHO_N "checking for nss... $ECHO_C" >&6; }

        if $PKG_CONFIG --exists "nss" ; then
            { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
            succeeded=yes

            { echo "$as_me:$LINENO: checking MOZ_NSS_CFLAGS" >&5
echo $ECHO_N "checking MOZ_NSS_CFLAGS... $ECHO_C" >&6; }
            MOZ_NSS_CFLAGS=`$PKG_CONFIG --cflags "nss"`
            { echo "$as_me:$LINENO: result: $MOZ_NSS_CFLAGS" >&5
echo "${ECHO_T}$MOZ_NSS_CFLAGS" >&6; }

            { echo "$as_me:$LINENO: checking MOZ_NSS_LIBS" >&5
echo $ECHO_N "checking MOZ_NSS_LIBS... $ECHO_C" >&6; }
            MOZ_NSS_LIBS=`$PKG_CONFIG --libs "nss"`
            { echo "$as_me:$LINENO: result: $MOZ_NSS_LIBS" >&5
echo "${ECHO_T}$MOZ_NSS_LIBS" >&6; }
        else
            MOZ_NSS_CFLAGS=""
            MOZ_NSS_LIBS=""
            ## If we have a custom action on failure, don't print errors, but
            ## do set a variable so people can do so.
            MOZ_NSS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "nss"`

        fi



     else
        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
        echo "*** See http://www.freedesktop.org/software/pkgconfig"
     fi
  fi

  if test $succeeded = yes; then
     STANDALONENSS="TRUE"
  else
     STANDALONENSS=""
  fi

    if test -z "$STANDALONENSS"; then

  succeeded=no

  if test -z "$PKG_CONFIG"; then
    # Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $PKG_CONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
  ;;
esac
fi
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
if test -n "$PKG_CONFIG"; then
  { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
echo "${ECHO_T}$PKG_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  fi

  if test "$PKG_CONFIG" = "no" ; then
     echo "*** The pkg-config script could not be found. Make sure it is"
     echo "*** in your path, or set the PKG_CONFIG environment variable"
     echo "*** to the full path to pkg-config."
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
  else
     PKG_CONFIG_MIN_VERSION=0.9.0
     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
        { echo "$as_me:$LINENO: checking for $MOZ_FLAVOUR-nss " >&5
echo $ECHO_N "checking for $MOZ_FLAVOUR-nss ... $ECHO_C" >&6; }

        if $PKG_CONFIG --exists "$MOZ_FLAVOUR-nss " ; then
            { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
            succeeded=yes

            { echo "$as_me:$LINENO: checking MOZ_NSS_CFLAGS" >&5
echo $ECHO_N "checking MOZ_NSS_CFLAGS... $ECHO_C" >&6; }
            MOZ_NSS_CFLAGS=`$PKG_CONFIG --cflags "$MOZ_FLAVOUR-nss "`
            { echo "$as_me:$LINENO: result: $MOZ_NSS_CFLAGS" >&5
echo "${ECHO_T}$MOZ_NSS_CFLAGS" >&6; }

            { echo "$as_me:$LINENO: checking MOZ_NSS_LIBS" >&5
echo $ECHO_N "checking MOZ_NSS_LIBS... $ECHO_C" >&6; }
            MOZ_NSS_LIBS=`$PKG_CONFIG --libs "$MOZ_FLAVOUR-nss "`
            { echo "$as_me:$LINENO: result: $MOZ_NSS_LIBS" >&5
echo "${ECHO_T}$MOZ_NSS_LIBS" >&6; }
        else
            MOZ_NSS_CFLAGS=""
            MOZ_NSS_LIBS=""
            ## If we have a custom action on failure, don't print errors, but
            ## do set a variable so people can do so.
            MOZ_NSS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$MOZ_FLAVOUR-nss "`
            echo $MOZ_NSS_PKG_ERRORS
        fi



     else
        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
        echo "*** See http://www.freedesktop.org/software/pkgconfig"
     fi
  fi

  if test $succeeded = yes; then
     :
  else
     { { echo "$as_me:$LINENO: error: Library requirements ($MOZ_FLAVOUR-nss ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5
echo "$as_me: error: Library requirements ($MOZ_FLAVOUR-nss ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;}
   { (exit 1); exit 1; }; }
  fi

    else
        NSS_LIB="-L`$PKG_CONFIG --variable=libdir nss`"

    fi

    save_CPPFLAGS="$CPPFLAGS"
    save_LDFLAGS="$LDFLAGS"
    save_LIBS="$LIBS"
    CPPFLAGS="$CPPFLAGS $MOZ_NSS_CFLAGS"
    LDFLAGS="$LDFLAGS $MOZ_NSS_LIBS"

{ echo "$as_me:$LINENO: checking for PK11_GetCertFromPrivateKey in -lnss3" >&5
echo $ECHO_N "checking for PK11_GetCertFromPrivateKey in -lnss3... $ECHO_C" >&6; }
if test "${ac_cv_lib_nss3_PK11_GetCertFromPrivateKey+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lnss3  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char PK11_GetCertFromPrivateKey ();
int
main ()
{
return PK11_GetCertFromPrivateKey ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_nss3_PK11_GetCertFromPrivateKey=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_lib_nss3_PK11_GetCertFromPrivateKey=no
fi

rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ echo "$as_me:$LINENO: result: $ac_cv_lib_nss3_PK11_GetCertFromPrivateKey" >&5
echo "${ECHO_T}$ac_cv_lib_nss3_PK11_GetCertFromPrivateKey" >&6; }
if test $ac_cv_lib_nss3_PK11_GetCertFromPrivateKey = yes; then
  cat >>confdefs.h <<_ACEOF
#define HAVE_LIBNSS3 1
_ACEOF

  LIBS="-lnss3 $LIBS"

else
  { { echo "$as_me:$LINENO: error: PK11_GetCertFromPrivateKey missing but needed.
See https://bugzilla.mozilla.org/show_bug.cgi?id=262274.
Fixed since nss 3.9.3 (contained by e.g. mozilla >= 1.7.5)" >&5
echo "$as_me: error: PK11_GetCertFromPrivateKey missing but needed.
See https://bugzilla.mozilla.org/show_bug.cgi?id=262274.
Fixed since nss 3.9.3 (contained by e.g. mozilla >= 1.7.5)" >&2;}
   { (exit 1); exit 1; }; }
fi

    LDFLAGS="$save_LDFLAGS"
    CPPFLAGS="$save_CPPFLAGS"
    LIBS="$save_LIBS"

    MOZ_INC=`$PKG_CONFIG --variable=includedir $MOZ_FLAVOUR-xpcom`
    MOZ_LIB=`$PKG_CONFIG --variable=libdir $MOZ_FLAVOUR-xpcom`
    MOZ_LIB_XPCOM=$MOZILLAXPCOM_LIBS
    if test "$WITH_LDAP" != "NO" && test "$WITH_OPENLDAP" != "YES"; then
      { echo "$as_me:$LINENO: checking whether $tmp was compiled with --enable-ldap" >&5
echo $ECHO_N "checking whether $tmp was compiled with --enable-ldap... $ECHO_C" >&6; }
      if test -d "$MOZ_INC/ldap"; then
         { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
         MOZ_LDAP_CFLAGS="-I$MOZ_INC"
      else
        { { echo "$as_me:$LINENO: error: no.
Could not find LDAP header include files in $MOZ_INC/ldap.
Please recompile $tmp with --enable-ldap." >&5
echo "$as_me: error: no.
Could not find LDAP header include files in $MOZ_INC/ldap.
Please recompile $tmp with --enable-ldap." >&2;}
   { (exit 1); exit 1; }; }
      fi
    fi
elif test "$enable_mozilla" = "no"; then
    { echo "$as_me:$LINENO: result: none" >&5
echo "${ECHO_T}none" >&6; }
    WITH_MOZILLA=NO
else
    { echo "$as_me:$LINENO: result: internal" >&5
echo "${ECHO_T}internal" >&6; }
    SYSTEM_MOZILLA=NO
    BUILD_TYPE="$BUILD_TYPE MOZ"
if test -z "$with_mozilla_version"; then
   MOZILLA_VERSION=
else
   { echo "$as_me:$LINENO: checking which mozilla version to build" >&5
echo $ECHO_N "checking which mozilla version to build... $ECHO_C" >&6; }
   MOZILLA_VERSION=$with_mozilla_version
   enable_build_mozilla=1
   { echo "$as_me:$LINENO: result: $MOZILLA_VERSION" >&5
echo "${ECHO_T}$MOZILLA_VERSION" >&6; }
fi



if test -z "$with_mozilla_toolkit"; then
   { echo "$as_me:$LINENO: checking for toolkit which mozilla should use" >&5
echo $ECHO_N "checking for toolkit which mozilla should use... $ECHO_C" >&6; }
   if test "$_os" != "WINNT"; then
      MOZILLA_TOOLKIT=gtk2
      { echo "$as_me:$LINENO: result: gtk2" >&5
echo "${ECHO_T}gtk2" >&6; }
   fi
else
   MOZILLA_TOOLKIT=$with_mozilla_toolkit
   enable_build_mozilla=1
   { echo "$as_me:$LINENO: result: $MOZILLA_TOOLKIT" >&5
echo "${ECHO_T}$MOZILLA_TOOLKIT" >&6; }
fi



{ echo "$as_me:$LINENO: checking whether to build Mozilla" >&5
echo $ECHO_N "checking whether to build Mozilla... $ECHO_C" >&6; }
if test -n "$enable_build_mozilla"; then
   BUILD_MOZAB="TRUE"
   { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
else
   BUILD_MOZAB=""
   { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi

if test "$BUILD_MOZAB" = "TRUE"; then
   if test -z "$MOZILLA_VERSION"; then
      MOZILLA_VERSION=1.7.5
   fi
   if test "$MOZILLA_VERSION" = "1.7b" ; then
      MOZILLA_SOURCE_VERSION="mozilla-source-1.7b-source.tar.gz"
   else
      MOZILLA_SOURCE_VERSION="mozilla-source-${MOZILLA_VERSION}.tar.gz"
   fi
   { echo "$as_me:$LINENO: checking for $MOZILLA_SOURCE_VERSION" >&5
echo $ECHO_N "checking for $MOZILLA_SOURCE_VERSION... $ECHO_C" >&6; }
   if test ! -e "../moz/download/$MOZILLA_SOURCE_VERSION"; then
      { { echo "$as_me:$LINENO: error: Mozilla source archive not found.
Please copy $MOZILLA_SOURCE_VERSION to moz/download/.
The archive can be found here:
http://ftp.mozilla.org/pub/mozilla.org/mozilla/releases/mozilla$MOZILLA_VERSION/source/" >&5
echo "$as_me: error: Mozilla source archive not found.
Please copy $MOZILLA_SOURCE_VERSION to moz/download/.
The archive can be found here:
http://ftp.mozilla.org/pub/mozilla.org/mozilla/releases/mozilla$MOZILLA_VERSION/source/" >&2;}
   { (exit 1); exit 1; }; }
   else
      { echo "$as_me:$LINENO: result: found" >&5
echo "${ECHO_T}found" >&6; }
   fi
   if test "$_os" = "WINNT"; then
      { echo "$as_me:$LINENO: checking for glib and libIDL binaries" >&5
echo $ECHO_N "checking for glib and libIDL binaries... $ECHO_C" >&6; }
      if test ! -e "../moz/download/vc71-glib-1.2.10-bin.zip" \
           -o ! -e "../moz/download/vc71-libIDL-0.6.8-bin.zip" \
           -o ! -e "../moz/download/wintools.zip" ; then
{ { echo "$as_me:$LINENO: error: One or more of the following archives is missing in moz/download/
  vc71-glib-1.2.10-bin.zip
  vc71-libIDL-0.6.8-bin.zip
(from ftp://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/historic/vc71/)
  wintools.zip
(from http://ftp.mozilla.org/pub/mozilla.org/mozilla/source/wintools.zip)" >&5
echo "$as_me: error: One or more of the following archives is missing in moz/download/
  vc71-glib-1.2.10-bin.zip
  vc71-libIDL-0.6.8-bin.zip
(from ftp://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/historic/vc71/)
  wintools.zip
(from http://ftp.mozilla.org/pub/mozilla.org/mozilla/source/wintools.zip)" >&2;}
   { (exit 1); exit 1; }; }
      else
         { echo "$as_me:$LINENO: result: ok" >&5
echo "${ECHO_T}ok" >&6; }
      fi
   elif test "$_os" = "Darwin"; then
      { echo "$as_me:$LINENO: WARNING: Mozilla build environment for MacOSX not checked. Do it yourself or supply patches." >&5
echo "$as_me: WARNING: Mozilla build environment for MacOSX not checked. Do it yourself or supply patches." >&2;}
   else
      # Generic Unix/Linux section
      if test "$MOZILLA_TOOLKIT" = "gtk2"; then

  succeeded=no

  if test -z "$PKG_CONFIG"; then
    # Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $PKG_CONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
  ;;
esac
fi
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
if test -n "$PKG_CONFIG"; then
  { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
echo "${ECHO_T}$PKG_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  fi

  if test "$PKG_CONFIG" = "no" ; then
     echo "*** The pkg-config script could not be found. Make sure it is"
     echo "*** in your path, or set the PKG_CONFIG environment variable"
     echo "*** to the full path to pkg-config."
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
  else
     PKG_CONFIG_MIN_VERSION=0.9.0
     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
        { echo "$as_me:$LINENO: checking for gtk+-2.0" >&5
echo $ECHO_N "checking for gtk+-2.0... $ECHO_C" >&6; }

        if $PKG_CONFIG --exists "gtk+-2.0" ; then
            { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
            succeeded=yes

            { echo "$as_me:$LINENO: checking MOZLIBREQ_CFLAGS" >&5
echo $ECHO_N "checking MOZLIBREQ_CFLAGS... $ECHO_C" >&6; }
            MOZLIBREQ_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0"`
            { echo "$as_me:$LINENO: result: $MOZLIBREQ_CFLAGS" >&5
echo "${ECHO_T}$MOZLIBREQ_CFLAGS" >&6; }

            { echo "$as_me:$LINENO: checking MOZLIBREQ_LIBS" >&5
echo $ECHO_N "checking MOZLIBREQ_LIBS... $ECHO_C" >&6; }
            MOZLIBREQ_LIBS=`$PKG_CONFIG --libs "gtk+-2.0"`
            { echo "$as_me:$LINENO: result: $MOZLIBREQ_LIBS" >&5
echo "${ECHO_T}$MOZLIBREQ_LIBS" >&6; }
        else
            MOZLIBREQ_CFLAGS=""
            MOZLIBREQ_LIBS=""
            ## If we have a custom action on failure, don't print errors, but
            ## do set a variable so people can do so.
            MOZLIBREQ_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtk+-2.0"`

        fi



     else
        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
        echo "*** See http://www.freedesktop.org/software/pkgconfig"
     fi
  fi

  if test $succeeded = yes; then
     MOZGTK="TRUE"
  else
     MOZGTK=""
  fi

         if test -z "$MOZGTK"; then
            { { echo "$as_me:$LINENO: error: GTK2 is needed to build mozilla." >&5
echo "$as_me: error: GTK2 is needed to build mozilla." >&2;}
   { (exit 1); exit 1; }; }
         fi

  succeeded=no

  if test -z "$PKG_CONFIG"; then
    # Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $PKG_CONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
  ;;
esac
fi
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
if test -n "$PKG_CONFIG"; then
  { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
echo "${ECHO_T}$PKG_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  fi

  if test "$PKG_CONFIG" = "no" ; then
     echo "*** The pkg-config script could not be found. Make sure it is"
     echo "*** in your path, or set the PKG_CONFIG environment variable"
     echo "*** to the full path to pkg-config."
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
  else
     PKG_CONFIG_MIN_VERSION=0.9.0
     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
        { echo "$as_me:$LINENO: checking for libIDL-2.0 >= 0.8.0" >&5
echo $ECHO_N "checking for libIDL-2.0 >= 0.8.0... $ECHO_C" >&6; }

        if $PKG_CONFIG --exists "libIDL-2.0 >= 0.8.0" ; then
            { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
            succeeded=yes

            { echo "$as_me:$LINENO: checking MOZLIBREQ_CFLAGS" >&5
echo $ECHO_N "checking MOZLIBREQ_CFLAGS... $ECHO_C" >&6; }
            MOZLIBREQ_CFLAGS=`$PKG_CONFIG --cflags "libIDL-2.0 >= 0.8.0"`
            { echo "$as_me:$LINENO: result: $MOZLIBREQ_CFLAGS" >&5
echo "${ECHO_T}$MOZLIBREQ_CFLAGS" >&6; }

            { echo "$as_me:$LINENO: checking MOZLIBREQ_LIBS" >&5
echo $ECHO_N "checking MOZLIBREQ_LIBS... $ECHO_C" >&6; }
            MOZLIBREQ_LIBS=`$PKG_CONFIG --libs "libIDL-2.0 >= 0.8.0"`
            { echo "$as_me:$LINENO: result: $MOZLIBREQ_LIBS" >&5
echo "${ECHO_T}$MOZLIBREQ_LIBS" >&6; }
        else
            MOZLIBREQ_CFLAGS=""
            MOZLIBREQ_LIBS=""
            ## If we have a custom action on failure, don't print errors, but
            ## do set a variable so people can do so.
            MOZLIBREQ_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libIDL-2.0 >= 0.8.0"`

        fi



     else
        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
        echo "*** See http://www.freedesktop.org/software/pkgconfig"
     fi
  fi

  if test $succeeded = yes; then
     MOZIDL="TRUE"
  else
     MOZIDL=""
  fi

         if test -z "$MOZIDL"; then
            { { echo "$as_me:$LINENO: error: libIDL >= 0.8.0 is needed when using GTK2 to build mozilla." >&5
echo "$as_me: error: libIDL >= 0.8.0 is needed when using GTK2 to build mozilla." >&2;}
   { (exit 1); exit 1; }; }
         fi
      else

  succeeded=no

  if test -z "$PKG_CONFIG"; then
    # Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $PKG_CONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
  ;;
esac
fi
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
if test -n "$PKG_CONFIG"; then
  { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
echo "${ECHO_T}$PKG_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  fi

  if test "$PKG_CONFIG" = "no" ; then
     echo "*** The pkg-config script could not be found. Make sure it is"
     echo "*** in your path, or set the PKG_CONFIG environment variable"
     echo "*** to the full path to pkg-config."
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
  else
     PKG_CONFIG_MIN_VERSION=0.9.0
     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
        { echo "$as_me:$LINENO: checking for gtk+ >= 1.2.3" >&5
echo $ECHO_N "checking for gtk+ >= 1.2.3... $ECHO_C" >&6; }

        if $PKG_CONFIG --exists "gtk+ >= 1.2.3" ; then
            { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
            succeeded=yes

            { echo "$as_me:$LINENO: checking MOZLIBREQ_CFLAGS" >&5
echo $ECHO_N "checking MOZLIBREQ_CFLAGS... $ECHO_C" >&6; }
            MOZLIBREQ_CFLAGS=`$PKG_CONFIG --cflags "gtk+ >= 1.2.3"`
            { echo "$as_me:$LINENO: result: $MOZLIBREQ_CFLAGS" >&5
echo "${ECHO_T}$MOZLIBREQ_CFLAGS" >&6; }

            { echo "$as_me:$LINENO: checking MOZLIBREQ_LIBS" >&5
echo $ECHO_N "checking MOZLIBREQ_LIBS... $ECHO_C" >&6; }
            MOZLIBREQ_LIBS=`$PKG_CONFIG --libs "gtk+ >= 1.2.3"`
            { echo "$as_me:$LINENO: result: $MOZLIBREQ_LIBS" >&5
echo "${ECHO_T}$MOZLIBREQ_LIBS" >&6; }
        else
            MOZLIBREQ_CFLAGS=""
            MOZLIBREQ_LIBS=""
            ## If we have a custom action on failure, don't print errors, but
            ## do set a variable so people can do so.
            MOZLIBREQ_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtk+ >= 1.2.3"`

        fi



     else
        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
        echo "*** See http://www.freedesktop.org/software/pkgconfig"
     fi
  fi

  if test $succeeded = yes; then
     MOZGTK="TRUE"
  else
     MOZGTK=""
  fi

         if test -z "$MOZGTK"; then
            { { echo "$as_me:$LINENO: error: gtk 1.2 is needed when not using GTK2 to build mozilla." >&5
echo "$as_me: error: gtk 1.2 is needed when not using GTK2 to build mozilla." >&2;}
   { (exit 1); exit 1; }; }
         fi

  succeeded=no

  if test -z "$PKG_CONFIG"; then
    # Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $PKG_CONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
  ;;
esac
fi
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
if test -n "$PKG_CONFIG"; then
  { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
echo "${ECHO_T}$PKG_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  fi

  if test "$PKG_CONFIG" = "no" ; then
     echo "*** The pkg-config script could not be found. Make sure it is"
     echo "*** in your path, or set the PKG_CONFIG environment variable"
     echo "*** to the full path to pkg-config."
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
  else
     PKG_CONFIG_MIN_VERSION=0.9.0
     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
        { echo "$as_me:$LINENO: checking for libidl >= 0.6.3 libidl <= 0.6.8" >&5
echo $ECHO_N "checking for libidl >= 0.6.3 libidl <= 0.6.8... $ECHO_C" >&6; }

        if $PKG_CONFIG --exists "libidl >= 0.6.3 libidl <= 0.6.8" ; then
            { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
            succeeded=yes

            { echo "$as_me:$LINENO: checking MOZLIBREQ_CFLAGS" >&5
echo $ECHO_N "checking MOZLIBREQ_CFLAGS... $ECHO_C" >&6; }
            MOZLIBREQ_CFLAGS=`$PKG_CONFIG --cflags "libidl >= 0.6.3 libidl <= 0.6.8"`
            { echo "$as_me:$LINENO: result: $MOZLIBREQ_CFLAGS" >&5
echo "${ECHO_T}$MOZLIBREQ_CFLAGS" >&6; }

            { echo "$as_me:$LINENO: checking MOZLIBREQ_LIBS" >&5
echo $ECHO_N "checking MOZLIBREQ_LIBS... $ECHO_C" >&6; }
            MOZLIBREQ_LIBS=`$PKG_CONFIG --libs "libidl >= 0.6.3 libidl <= 0.6.8"`
            { echo "$as_me:$LINENO: result: $MOZLIBREQ_LIBS" >&5
echo "${ECHO_T}$MOZLIBREQ_LIBS" >&6; }
        else
            MOZLIBREQ_CFLAGS=""
            MOZLIBREQ_LIBS=""
            ## If we have a custom action on failure, don't print errors, but
            ## do set a variable so people can do so.
            MOZLIBREQ_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libidl >= 0.6.3 libidl <= 0.6.8"`

        fi



     else
        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
        echo "*** See http://www.freedesktop.org/software/pkgconfig"
     fi
  fi

  if test $succeeded = yes; then
     MOZIDL="TRUE"
  else
     MOZIDL=""
  fi

         if test -z "$MOZIDL"; then
            { { echo "$as_me:$LINENO: error: libIDL 0.6.3 - 0.6.8 is needed when not using GTK2 to build mozilla." >&5
echo "$as_me: error: libIDL 0.6.3 - 0.6.8 is needed when not using GTK2 to build mozilla." >&2;}
   { (exit 1); exit 1; }; }
         fi
      fi
   fi
fi



fi









{ echo "$as_me:$LINENO: checking which sane header to use" >&5
echo $ECHO_N "checking which sane header to use... $ECHO_C" >&6; }
if test -n "$with_system_sane_header" && test "$with_system_sane_header" != "no"; then
   { echo "$as_me:$LINENO: result: external" >&5
echo "${ECHO_T}external" >&6; }
   SYSTEM_SANE_HEADER=YES
   if test "${ac_cv_header_sane_sane_h+set}" = set; then
  { echo "$as_me:$LINENO: checking for sane/sane.h" >&5
echo $ECHO_N "checking for sane/sane.h... $ECHO_C" >&6; }
if test "${ac_cv_header_sane_sane_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
fi
{ echo "$as_me:$LINENO: result: $ac_cv_header_sane_sane_h" >&5
echo "${ECHO_T}$ac_cv_header_sane_sane_h" >&6; }
else
  # Is the header compilable?
{ echo "$as_me:$LINENO: checking sane/sane.h usability" >&5
echo $ECHO_N "checking sane/sane.h usability... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
#include <sane/sane.h>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_header_compiler=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_header_compiler=no
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6; }

# Is the header present?
{ echo "$as_me:$LINENO: checking sane/sane.h presence" >&5
echo $ECHO_N "checking sane/sane.h presence... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <sane/sane.h>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_cxx_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  ac_header_preproc=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  ac_header_preproc=no
fi

rm -f conftest.err conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6; }

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
  yes:no: )
    { echo "$as_me:$LINENO: WARNING: sane/sane.h: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: sane/sane.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { echo "$as_me:$LINENO: WARNING: sane/sane.h: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: sane/sane.h: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { echo "$as_me:$LINENO: WARNING: sane/sane.h: present but cannot be compiled" >&5
echo "$as_me: WARNING: sane/sane.h: present but cannot be compiled" >&2;}
    { echo "$as_me:$LINENO: WARNING: sane/sane.h:     check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: sane/sane.h:     check for missing prerequisite headers?" >&2;}
    { echo "$as_me:$LINENO: WARNING: sane/sane.h: see the Autoconf documentation" >&5
echo "$as_me: WARNING: sane/sane.h: see the Autoconf documentation" >&2;}
    { echo "$as_me:$LINENO: WARNING: sane/sane.h:     section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: sane/sane.h:     section \"Present But Cannot Be Compiled\"" >&2;}
    { echo "$as_me:$LINENO: WARNING: sane/sane.h: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: sane/sane.h: proceeding with the preprocessor's result" >&2;}
    { echo "$as_me:$LINENO: WARNING: sane/sane.h: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: sane/sane.h: in the future, the compiler will take precedence" >&2;}

    ;;
esac
{ echo "$as_me:$LINENO: checking for sane/sane.h" >&5
echo $ECHO_N "checking for sane/sane.h... $ECHO_C" >&6; }
if test "${ac_cv_header_sane_sane_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_cv_header_sane_sane_h=$ac_header_preproc
fi
{ echo "$as_me:$LINENO: result: $ac_cv_header_sane_sane_h" >&5
echo "${ECHO_T}$ac_cv_header_sane_sane_h" >&6; }

fi
if test $ac_cv_header_sane_sane_h = yes; then
  :
else
  { { echo "$as_me:$LINENO: error: sane not found. install sane" >&5
echo "$as_me: error: sane not found. install sane" >&2;}
   { (exit 1); exit 1; }; }
fi


else
   { echo "$as_me:$LINENO: result: internal" >&5
echo "${ECHO_T}internal" >&6; }
   SYSTEM_SANE_HEADER=NO
   BUILD_TYPE="$BUILD_TYPE SANE"
fi


# DISABLED; INCOMPLETE
#AC_MSG_CHECKING([which icu to use])
#if test -n "$with_system_icu" -o -n "$with_system_libs" && \
#	test "$with_system_icu" != "no"; then
#   AC_MSG_RESULT([external])
#   SYSTEM_ICU=YES
#   AC_MSG_CHECKING([for unicode/rbbi.h])
#   AC_TRY_CPP(unicode/rbbi.h, AC_MSG_RESULT([checked.]), AC_MSG_ERROR([icu headers not found.]))
#   AC_PATH_PROG(SYSTEM_GENBRK, genbrk)
#   if test -z "$SYSTEM_GENBRK"; then
#      AC_MSG_ERROR([\"genbrk\" not found in \$PATH, install the icu development tool \"genbrk"\])
#   fi
#   AC_PATH_PROG(SYSTEM_GENCCODE, genccode)
#   if test -z "$SYSTEM_GENCCODE"; then
#      AC_MSG_ERROR([\"genccode\" not found in \$PATH, install the icu development tool \"genccode"\])
#   fi
#else
#    AC_MSG_RESULT([internal])
#    SYSTEM_ICU=NO
#fi
#AC_SUBST(SYSTEM_ICU)
#AC_SUBST(SYSTEM_GENBRK)
#AC_SUBST(SYSTEM_GENCCODE)


if test  "$_os" = "Darwin"  -a  "x$with_x" != "xyes"  -a  "x$x_includes" = "xNONE"  -a  "x$x_libraries" = "xNONE"; then
         { echo "$as_me:$LINENO: checking for /System/Library/Frameworks/AppKit.framework" >&5
echo $ECHO_N "checking for /System/Library/Frameworks/AppKit.framework... $ECHO_C" >&6; }
   if test -d "/System/Library/Frameworks/AppKit.framework/"; then
      { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
      x_includes="no_x_includes"
      x_libraries="no_x_libraries"
   else
      { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
         fi
fi

if test "$_os" = "Darwin" -a "x$x_includes" = "xno_x_includes"; then
   echo "Do Nothing for _os = Darwin and x_includes = no_x_includes"
      :
elif test "$_os" != "WINNT" ; then
   { echo "$as_me:$LINENO: checking for X" >&5
echo $ECHO_N "checking for X... $ECHO_C" >&6; }


# Check whether --with-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
  case $x_includes,$x_libraries in #(
    *\'*) { { echo "$as_me:$LINENO: error: Cannot use X directory names containing '" >&5
echo "$as_me: error: Cannot use X directory names containing '" >&2;}
   { (exit 1); exit 1; }; };; #(
    *,NONE | NONE,*) 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 -f -r conftest.dir
if mkdir conftest.dir; then
  cd conftest.dir
  cat >Imakefile <<'_ACEOF'
incroot:
	@echo incroot='${INCROOT}'
usrlibdir:
	@echo usrlibdir='${USRLIBDIR}'
libdir:
	@echo libdir='${LIBDIR}'
_ACEOF
  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
    for ac_var in incroot usrlibdir libdir; do
      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
    done
    # 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) ac_x_includes= ;;
	*) 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 -f -r conftest.dir
fi

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

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

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

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

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

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

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

if test "$ac_x_includes" = no; then
  # Guess where to find include files, by looking for Xlib.h.
  # First, try using that file with no special directory specified.
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <X11/Xlib.h>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_cxx_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  # We can compile using X headers with no special include directory.
ac_x_includes=
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  for ac_dir in $ac_x_header_dirs; do
  if test -r "$ac_dir/X11/Xlib.h"; then
    ac_x_includes=$ac_dir
    break
  fi
done
fi

rm -f conftest.err conftest.$ac_ext
fi # $ac_x_includes = no

if test "$ac_x_libraries" = no; then
  # Check for the libraries.
  # See if we find them without any special options.
  # Don't add to $LIBS permanently.
  ac_save_LIBS=$LIBS
  LIBS="-lXt $LIBS"
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <X11/Xlib.h>
int
main ()
{
XrmInitialize ()
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  LIBS=$ac_save_LIBS
# We can link X programs with no special library path.
ac_x_libraries=
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	LIBS=$ac_save_LIBS
for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
do
  # Don't even attempt the hair of trying to link an X program!
  for ac_extension in a so sl; do
    if test -r "$ac_dir/libXt.$ac_extension"; then
      ac_x_libraries=$ac_dir
      break 2
    fi
  done
done
fi

rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi # $ac_x_libraries = no

case $ac_x_includes,$ac_x_libraries in #(
  no,* | *,no | *\'*)
    # Didn't find X, or a directory has "'" in its name.
    ac_cv_have_x="have_x=no";; #(
  *)
    # 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'"
esac
fi
;; #(
    *) have_x=yes;;
  esac
  eval "$ac_cv_have_x"
fi # $with_x != no

if test "$have_x" != yes; then
  { echo "$as_me:$LINENO: result: $have_x" >&5
echo "${ECHO_T}$have_x" >&6; }
  no_x=yes
else
  # If each of the values was on the command line, it overrides each guess.
  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
  # Update the cache value to reflect the command line values.
  ac_cv_have_x="have_x=yes\
	ac_x_includes='$x_includes'\
	ac_x_libraries='$x_libraries'"
  { echo "$as_me:$LINENO: 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 <<\_ACEOF
#define X_DISPLAY_MISSING 1
_ACEOF

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

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

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_R_nospace=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_R_nospace=no
fi

rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
      if test $ac_R_nospace = yes; then
	{ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
	X_LIBS="$X_LIBS -R$x_libraries"
      else
	LIBS="$ac_xsave_LIBS -R $x_libraries"
	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_R_space=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_R_space=no
fi

rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
	if test $ac_R_space = yes; then
	  { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
	  X_LIBS="$X_LIBS -R $x_libraries"
	else
	  { echo "$as_me:$LINENO: result: neither works" >&5
echo "${ECHO_T}neither works" >&6; }
	fi
      fi
      LIBS=$ac_xsave_LIBS
    esac
  fi

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

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

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char XOpenDisplay ();
int
main ()
{
return XOpenDisplay ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  :
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	{ echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6; }
if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-ldnet  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char dnet_ntoa ();
int
main ()
{
return dnet_ntoa ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_dnet_dnet_ntoa=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_lib_dnet_dnet_ntoa=no
fi

rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6; }
if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
fi

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

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char dnet_ntoa ();
int
main ()
{
return dnet_ntoa ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_dnet_stub_dnet_ntoa=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_lib_dnet_stub_dnet_ntoa=no
fi

rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
fi

    fi
fi

rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
    LIBS="$ac_xsave_LIBS"

    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
    # to get the SysV transport functions.
    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
    # needs -lnsl.
    # The nsl library prevents programs from opening the X display
    # on Irix 5.2, according to T.E. Dickey.
    # The functions gethostbyname, getservbyname, and inet_addr are
    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
    { echo "$as_me:$LINENO: checking for gethostbyname" >&5
echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6; }
if test "${ac_cv_func_gethostbyname+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
/* Define gethostbyname to an innocuous variant, in case <limits.h> declares gethostbyname.
   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
#define gethostbyname innocuous_gethostbyname

/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char gethostbyname (); below.
    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
    <limits.h> exists even on freestanding compilers.  */

#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif

#undef gethostbyname

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char gethostbyname ();
/* 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
#endif

int
main ()
{
return gethostbyname ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func_gethostbyname=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_func_gethostbyname=no
fi

rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6; }

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

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char gethostbyname ();
int
main ()
{
return gethostbyname ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_nsl_gethostbyname=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_lib_nsl_gethostbyname=no
fi

rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6; }
if test $ac_cv_lib_nsl_gethostbyname = yes; then
  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
fi

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

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char gethostbyname ();
int
main ()
{
return gethostbyname ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_bsd_gethostbyname=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_lib_bsd_gethostbyname=no
fi

rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ echo "$as_me:$LINENO: 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 name server (or something).  -lsocket
    # must be given before -lnsl if both are needed.  We assume that
    # if connect needs -lnsl, so does gethostbyname.
    { echo "$as_me:$LINENO: checking for connect" >&5
echo $ECHO_N "checking for connect... $ECHO_C" >&6; }
if test "${ac_cv_func_connect+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
/* Define connect to an innocuous variant, in case <limits.h> declares connect.
   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
#define connect innocuous_connect

/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char connect (); below.
    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
    <limits.h> exists even on freestanding compilers.  */

#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif

#undef connect

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char connect ();
/* 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
#endif

int
main ()
{
return connect ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func_connect=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_func_connect=no
fi

rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
echo "${ECHO_T}$ac_cv_func_connect" >&6; }

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

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char connect ();
int
main ()
{
return connect ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_socket_connect=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_lib_socket_connect=no
fi

rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5
echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6; }
if test $ac_cv_lib_socket_connect = yes; then
  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
fi

    fi

    # Guillermo Gomez says -lposix is necessary on A/UX.
    { echo "$as_me:$LINENO: checking for remove" >&5
echo $ECHO_N "checking for remove... $ECHO_C" >&6; }
if test "${ac_cv_func_remove+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
/* Define remove to an innocuous variant, in case <limits.h> declares remove.
   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
#define remove innocuous_remove

/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char remove (); below.
    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
    <limits.h> exists even on freestanding compilers.  */

#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif

#undef remove

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char remove ();
/* 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
#endif

int
main ()
{
return remove ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func_remove=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_func_remove=no
fi

rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5
echo "${ECHO_T}$ac_cv_func_remove" >&6; }

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

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char remove ();
int
main ()
{
return remove ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_posix_remove=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_lib_posix_remove=no
fi

rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5
echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6; }
if test $ac_cv_lib_posix_remove = yes; then
  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
fi

    fi

    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
    { echo "$as_me:$LINENO: checking for shmat" >&5
echo $ECHO_N "checking for shmat... $ECHO_C" >&6; }
if test "${ac_cv_func_shmat+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
/* Define shmat to an innocuous variant, in case <limits.h> declares shmat.
   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
#define shmat innocuous_shmat

/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char shmat (); below.
    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
    <limits.h> exists even on freestanding compilers.  */

#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif

#undef shmat

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char shmat ();
/* 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
#endif

int
main ()
{
return shmat ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func_shmat=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_func_shmat=no
fi

rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5
echo "${ECHO_T}$ac_cv_func_shmat" >&6; }

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

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char shmat ();
int
main ()
{
return shmat ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_ipc_shmat=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_lib_ipc_shmat=no
fi

rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5
echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6; }
if test $ac_cv_lib_ipc_shmat = yes; then
  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
fi

    fi
  fi

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

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char IceConnectionNumber ();
int
main ()
{
return IceConnectionNumber ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_ICE_IceConnectionNumber=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_lib_ICE_IceConnectionNumber=no
fi

rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ echo "$as_me:$LINENO: 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

   CPPFLAGS="$CPPFLAGS $X_CFLAGS"

for ac_header in X11/Xaw/Label.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  { echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&6; }
else
  # Is the header compilable?
{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_header_compiler=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_header_compiler=no
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6; }

# Is the header present?
{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <$ac_header>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_cxx_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  ac_header_preproc=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  ac_header_preproc=no
fi

rm -f conftest.err conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6; }

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
  yes:no: )
    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}

    ;;
esac
{ echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  eval "$as_ac_Header=\$ac_header_preproc"
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&6; }

fi
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

else
  { { echo "$as_me:$LINENO: error: Xaw include headers not found" >&5
echo "$as_me: error: Xaw include headers not found" >&2;}
   { (exit 1); exit 1; }; }
fi

done


   if test "x$x_includes" = "x"; then
     x_includes="default_x_includes"
   fi
   if test "x$x_libraries" = "x"; then
     x_libraries="default_x_libraries"
   fi
      if test -z "$x_libraries"; then
      { { echo "$as_me:$LINENO: error: No X libraries found" >&5
echo "$as_me: error: No X libraries found" >&2;}
   { (exit 1); exit 1; }; } # Exit
   fi
   if test -z "$x_includes"; then
      { { echo "$as_me:$LINENO: error: No X includes found" >&5
echo "$as_me: error: No X includes found" >&2;}
   { (exit 1); exit 1; }; } # Exit
   fi
   CFLAGS=$X_CFLAGS
   LDFLAGS="$X_LDFLAGS $X_LIBS"
   { echo "$as_me:$LINENO: checking for XOpenDisplay in -lX11" >&5
echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6; }
if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lX11  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char XOpenDisplay ();
int
main ()
{
return XOpenDisplay ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_X11_XOpenDisplay=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_lib_X11_XOpenDisplay=no
fi

rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ echo "$as_me:$LINENO: result: $ac_cv_lib_X11_XOpenDisplay" >&5
echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6; }
if test $ac_cv_lib_X11_XOpenDisplay = yes; then
  x_libs="-lX11 $X_EXTRA_LIBS"
else
  { { echo "$as_me:$LINENO: error: X Development libraries not found" >&5
echo "$as_me: error: X Development libraries not found" >&2;}
   { (exit 1); exit 1; }; }
fi

else
   x_includes="no_x_includes"
   x_libraries="no_x_libraries"
fi
if test -z "$x_includes"; then
   x_includes="no_x_includes"
fi
if test -z "$x_libraries"; then
   x_libraries="no_x_libraries"
fi
XINC="$x_includes"

XLIB="$x_libraries"


if test "$ENABLE_FONTCONFIG" = "TRUE" ; then
    if test "${ac_cv_header_fontconfig_fontconfig_h+set}" = set; then
  { echo "$as_me:$LINENO: checking for fontconfig/fontconfig.h" >&5
echo $ECHO_N "checking for fontconfig/fontconfig.h... $ECHO_C" >&6; }
if test "${ac_cv_header_fontconfig_fontconfig_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
fi
{ echo "$as_me:$LINENO: result: $ac_cv_header_fontconfig_fontconfig_h" >&5
echo "${ECHO_T}$ac_cv_header_fontconfig_fontconfig_h" >&6; }
else
  # Is the header compilable?
{ echo "$as_me:$LINENO: checking fontconfig/fontconfig.h usability" >&5
echo $ECHO_N "checking fontconfig/fontconfig.h usability... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
#include <fontconfig/fontconfig.h>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_header_compiler=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_header_compiler=no
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6; }

# Is the header present?
{ echo "$as_me:$LINENO: checking fontconfig/fontconfig.h presence" >&5
echo $ECHO_N "checking fontconfig/fontconfig.h presence... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <fontconfig/fontconfig.h>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_cxx_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  ac_header_preproc=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  ac_header_preproc=no
fi

rm -f conftest.err conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6; }

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
  yes:no: )
    { echo "$as_me:$LINENO: WARNING: fontconfig/fontconfig.h: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: fontconfig/fontconfig.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { echo "$as_me:$LINENO: WARNING: fontconfig/fontconfig.h: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: fontconfig/fontconfig.h: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { echo "$as_me:$LINENO: WARNING: fontconfig/fontconfig.h: present but cannot be compiled" >&5
echo "$as_me: WARNING: fontconfig/fontconfig.h: present but cannot be compiled" >&2;}
    { echo "$as_me:$LINENO: WARNING: fontconfig/fontconfig.h:     check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: fontconfig/fontconfig.h:     check for missing prerequisite headers?" >&2;}
    { echo "$as_me:$LINENO: WARNING: fontconfig/fontconfig.h: see the Autoconf documentation" >&5
echo "$as_me: WARNING: fontconfig/fontconfig.h: see the Autoconf documentation" >&2;}
    { echo "$as_me:$LINENO: WARNING: fontconfig/fontconfig.h:     section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: fontconfig/fontconfig.h:     section \"Present But Cannot Be Compiled\"" >&2;}
    { echo "$as_me:$LINENO: WARNING: fontconfig/fontconfig.h: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: fontconfig/fontconfig.h: proceeding with the preprocessor's result" >&2;}
    { echo "$as_me:$LINENO: WARNING: fontconfig/fontconfig.h: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: fontconfig/fontconfig.h: in the future, the compiler will take precedence" >&2;}

    ;;
esac
{ echo "$as_me:$LINENO: checking for fontconfig/fontconfig.h" >&5
echo $ECHO_N "checking for fontconfig/fontconfig.h... $ECHO_C" >&6; }
if test "${ac_cv_header_fontconfig_fontconfig_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_cv_header_fontconfig_fontconfig_h=$ac_header_preproc
fi
{ echo "$as_me:$LINENO: result: $ac_cv_header_fontconfig_fontconfig_h" >&5
echo "${ECHO_T}$ac_cv_header_fontconfig_fontconfig_h" >&6; }

fi
if test $ac_cv_header_fontconfig_fontconfig_h = yes; then
  :
else
  { { echo "$as_me:$LINENO: error: fontconfig/fontconfig.h could not be found. libfontconfig1-dev or fontconfig???-devel missing?" >&5
echo "$as_me: error: fontconfig/fontconfig.h could not be found. libfontconfig1-dev or fontconfig???-devel missing?" >&2;}
   { (exit 1); exit 1; }; }
fi


    { echo "$as_me:$LINENO: checking whether fontconfig is >= 2.2.0" >&5
echo $ECHO_N "checking whether fontconfig is >= 2.2.0... $ECHO_C" >&6; }
    if test "$cross_compiling" = yes; then
  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
See \`config.log' for more details." >&5
echo "$as_me: error: cannot run test program while cross compiling
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; }
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

#include <fontconfig/fontconfig.h>

int main(int argc, char **argv) {
	if(FC_MAJOR > 2 || (FC_MAJOR == 2 && FC_MINOR >= 2)) return 0;
	else return 1;
}

_ACEOF
rm -f conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
{ { echo "$as_me:$LINENO: error: no, fontconfig >= 2.2.0 needed" >&5
echo "$as_me: error: no, fontconfig >= 2.2.0 needed" >&2;}
   { (exit 1); exit 1; }; }
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi


fi

{ echo "$as_me:$LINENO: checking whether to link to Xrender" >&5
echo $ECHO_N "checking whether to link to Xrender... $ECHO_C" >&6; }
if test -n "$enable_xrender_link"; then
   { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
   XRENDER_LINK=YES
   with_system_xrender_headers=yes
else
   { echo "$as_me:$LINENO: result: no, dynamically open it" >&5
echo "${ECHO_T}no, dynamically open it" >&6; }
   XRENDER_LINK=NO
fi
{ echo "$as_me:$LINENO: checking which Xrender headers to use" >&5
echo $ECHO_N "checking which Xrender headers to use... $ECHO_C" >&6; }
if test -n "$with_system_xrender_headers" && test "$with_system_xrender_headers" != "no"; then
   { echo "$as_me:$LINENO: result: external" >&5
echo "${ECHO_T}external" >&6; }
   SYSTEM_XRENDER_HEADERS=YES
   if test "${ac_cv_header_X11_extensions_Xrender_h+set}" = set; then
  { echo "$as_me:$LINENO: checking for X11/extensions/Xrender.h" >&5
echo $ECHO_N "checking for X11/extensions/Xrender.h... $ECHO_C" >&6; }
if test "${ac_cv_header_X11_extensions_Xrender_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
fi
{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xrender_h" >&5
echo "${ECHO_T}$ac_cv_header_X11_extensions_Xrender_h" >&6; }
else
  # Is the header compilable?
{ echo "$as_me:$LINENO: checking X11/extensions/Xrender.h usability" >&5
echo $ECHO_N "checking X11/extensions/Xrender.h usability... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
#include <X11/extensions/Xrender.h>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_header_compiler=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_header_compiler=no
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6; }

# Is the header present?
{ echo "$as_me:$LINENO: checking X11/extensions/Xrender.h presence" >&5
echo $ECHO_N "checking X11/extensions/Xrender.h presence... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <X11/extensions/Xrender.h>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_cxx_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  ac_header_preproc=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  ac_header_preproc=no
fi

rm -f conftest.err conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6; }

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
  yes:no: )
    { echo "$as_me:$LINENO: WARNING: X11/extensions/Xrender.h: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: X11/extensions/Xrender.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { echo "$as_me:$LINENO: WARNING: X11/extensions/Xrender.h: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: X11/extensions/Xrender.h: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { echo "$as_me:$LINENO: WARNING: X11/extensions/Xrender.h: present but cannot be compiled" >&5
echo "$as_me: WARNING: X11/extensions/Xrender.h: present but cannot be compiled" >&2;}
    { echo "$as_me:$LINENO: WARNING: X11/extensions/Xrender.h:     check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: X11/extensions/Xrender.h:     check for missing prerequisite headers?" >&2;}
    { echo "$as_me:$LINENO: WARNING: X11/extensions/Xrender.h: see the Autoconf documentation" >&5
echo "$as_me: WARNING: X11/extensions/Xrender.h: see the Autoconf documentation" >&2;}
    { echo "$as_me:$LINENO: WARNING: X11/extensions/Xrender.h:     section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: X11/extensions/Xrender.h:     section \"Present But Cannot Be Compiled\"" >&2;}
    { echo "$as_me:$LINENO: WARNING: X11/extensions/Xrender.h: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: X11/extensions/Xrender.h: proceeding with the preprocessor's result" >&2;}
    { echo "$as_me:$LINENO: WARNING: X11/extensions/Xrender.h: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: X11/extensions/Xrender.h: in the future, the compiler will take precedence" >&2;}

    ;;
esac
{ echo "$as_me:$LINENO: checking for X11/extensions/Xrender.h" >&5
echo $ECHO_N "checking for X11/extensions/Xrender.h... $ECHO_C" >&6; }
if test "${ac_cv_header_X11_extensions_Xrender_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_cv_header_X11_extensions_Xrender_h=$ac_header_preproc
fi
{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xrender_h" >&5
echo "${ECHO_T}$ac_cv_header_X11_extensions_Xrender_h" >&6; }

fi
if test $ac_cv_header_X11_extensions_Xrender_h = yes; then
  :
else
  { { echo "$as_me:$LINENO: error: Xrender not found. install X" >&5
echo "$as_me: error: Xrender not found. install X" >&2;}
   { (exit 1); exit 1; }; }
fi


else
   { echo "$as_me:$LINENO: result: internal" >&5
echo "${ECHO_T}internal" >&6; }
   SYSTEM_XRENDER_HEADERS=NO
   BUILD_TYPE="$BUILD_TYPE X11_EXTENSIONS"
fi
if test "$XRENDER_LINK" = "YES"; then

{ echo "$as_me:$LINENO: checking for XRenderQueryVersion in -lXrender" >&5
echo $ECHO_N "checking for XRenderQueryVersion in -lXrender... $ECHO_C" >&6; }
if test "${ac_cv_lib_Xrender_XRenderQueryVersion+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lXrender  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char XRenderQueryVersion ();
int
main ()
{
return XRenderQueryVersion ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_Xrender_XRenderQueryVersion=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_lib_Xrender_XRenderQueryVersion=no
fi

rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xrender_XRenderQueryVersion" >&5
echo "${ECHO_T}$ac_cv_lib_Xrender_XRenderQueryVersion" >&6; }
if test $ac_cv_lib_Xrender_XRenderQueryVersion = yes; then
  cat >>confdefs.h <<_ACEOF
#define HAVE_LIBXRENDER 1
_ACEOF

  LIBS="-lXrender $LIBS"

else
  { { echo "$as_me:$LINENO: error: libXrender not found or functional" >&5
echo "$as_me: error: libXrender not found or functional" >&2;}
   { (exit 1); exit 1; }; }
fi

fi



{ echo "$as_me:$LINENO: checking which nas to use" >&5
echo $ECHO_N "checking which nas to use... $ECHO_C" >&6; }
if test -n "$with_nas"; then
    { echo "$as_me:$LINENO: result: none" >&5
echo "${ECHO_T}none" >&6; }
elif test -n "$without_nas"; then
    ENABLE_NAS=""
elif test -n "$with_system_nas" -o -n "$with_system_libs" && \
	test "$with_system_nas" != "no"; then
    { echo "$as_me:$LINENO: result: external" >&5
echo "${ECHO_T}external" >&6; }
    SYSTEM_NAS=YES
    { echo "$as_me:$LINENO: checking for audio/audiolib.h" >&5
echo $ECHO_N "checking for audio/audiolib.h... $ECHO_C" >&6; }
if test "${ac_cv_header_audio_audiolib_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */



#include <audio/audiolib.h>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_header_audio_audiolib_h=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_header_audio_audiolib_h=no
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ac_cv_header_audio_audiolib_h" >&5
echo "${ECHO_T}$ac_cv_header_audio_audiolib_h" >&6; }
if test $ac_cv_header_audio_audiolib_h = yes; then
   NAS_INCLUDES=/usr/include
else

             CFLAGS=-I/usr/X11R6/include
             { echo "$as_me:$LINENO: checking for audio/audiolib.h" >&5
echo $ECHO_N "checking for audio/audiolib.h... $ECHO_C" >&6; }
if test "${ac_cv_header_audio_audiolib_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */



#include <audio/audiolib.h>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_header_audio_audiolib_h=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_header_audio_audiolib_h=no
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ac_cv_header_audio_audiolib_h" >&5
echo "${ECHO_T}$ac_cv_header_audio_audiolib_h" >&6; }
if test $ac_cv_header_audio_audiolib_h = yes; then
   NAS_INCLUDES=/usr/X11R6/include
else
   { { echo "$as_me:$LINENO: error: no. install nas" >&5
echo "$as_me: error: no. install nas" >&2;}
   { (exit 1); exit 1; }; }
fi



fi



{ echo "$as_me:$LINENO: checking for AuOpenServer in -laudio" >&5
echo $ECHO_N "checking for AuOpenServer in -laudio... $ECHO_C" >&6; }
if test "${ac_cv_lib_audio_AuOpenServer+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-laudio -L$XLIB -lXt $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char AuOpenServer ();
int
main ()
{
return AuOpenServer ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_audio_AuOpenServer=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_lib_audio_AuOpenServer=no
fi

rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ echo "$as_me:$LINENO: result: $ac_cv_lib_audio_AuOpenServer" >&5
echo "${ECHO_T}$ac_cv_lib_audio_AuOpenServer" >&6; }
if test $ac_cv_lib_audio_AuOpenServer = yes; then
  cat >>confdefs.h <<_ACEOF
#define HAVE_LIBAUDIO 1
_ACEOF

  LIBS="-laudio $LIBS"

else
  { { echo "$as_me:$LINENO: error: nas not found or functional" >&5
echo "$as_me: error: nas not found or functional" >&2;}
   { (exit 1); exit 1; }; }
fi

    ENABLE_NAS=YES
else
    { echo "$as_me:$LINENO: result: internal" >&5
echo "${ECHO_T}internal" >&6; }
    SYSTEM_NAS=NO
    ENABLE_NAS=YES
    BUILD_TYPE="$BUILD_TYPE NAS"
                if test  "$test_x" = "yes"; then
	for ac_prog in xmkmf
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path_XMKMF+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $XMKMF in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_XMKMF="$XMKMF" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_XMKMF="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
XMKMF=$ac_cv_path_XMKMF
if test -n "$XMKMF"; then
  { echo "$as_me:$LINENO: result: $XMKMF" >&5
echo "${ECHO_T}$XMKMF" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$XMKMF" && break
done

	if test -z "$XMKMF"; then
	   { { echo "$as_me:$LINENO: error: install xmkmf to run this script, include openwin in path" >&5
echo "$as_me: error: install xmkmf to run this script, include openwin in path" >&2;}
   { (exit 1); exit 1; }; }
	fi
    fi
fi




{ echo "$as_me:$LINENO: checking whether to enable portaudio/sndfile support" >&5
echo $ECHO_N "checking whether to enable portaudio/sndfile support... $ECHO_C" >&6; }
if test "$_os" != "WINNT" && \
  test -n "$enable_pasf" && test "$enable_pasf" != "no"; then
	{ echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
   ENABLE_PASF=YES
  	{ echo "$as_me:$LINENO: checking which sndfile to use" >&5
echo $ECHO_N "checking which sndfile to use... $ECHO_C" >&6; }
	if test -n "$with_system_sndfile" -o -n "$with_system_libs" && \
		test "$with_system_sndfile" != "no"; then
	   { echo "$as_me:$LINENO: result: external" >&5
echo "${ECHO_T}external" >&6; }
	   if test "${ac_cv_header_sndfile_h+set}" = set; then
  { echo "$as_me:$LINENO: checking for sndfile.h" >&5
echo $ECHO_N "checking for sndfile.h... $ECHO_C" >&6; }
if test "${ac_cv_header_sndfile_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
fi
{ echo "$as_me:$LINENO: result: $ac_cv_header_sndfile_h" >&5
echo "${ECHO_T}$ac_cv_header_sndfile_h" >&6; }
else
  # Is the header compilable?
{ echo "$as_me:$LINENO: checking sndfile.h usability" >&5
echo $ECHO_N "checking sndfile.h usability... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
#include <sndfile.h>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_header_compiler=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_header_compiler=no
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6; }

# Is the header present?
{ echo "$as_me:$LINENO: checking sndfile.h presence" >&5
echo $ECHO_N "checking sndfile.h presence... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <sndfile.h>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_cxx_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  ac_header_preproc=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  ac_header_preproc=no
fi

rm -f conftest.err conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6; }

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
  yes:no: )
    { echo "$as_me:$LINENO: WARNING: sndfile.h: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: sndfile.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { echo "$as_me:$LINENO: WARNING: sndfile.h: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: sndfile.h: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { echo "$as_me:$LINENO: WARNING: sndfile.h: present but cannot be compiled" >&5
echo "$as_me: WARNING: sndfile.h: present but cannot be compiled" >&2;}
    { echo "$as_me:$LINENO: WARNING: sndfile.h:     check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: sndfile.h:     check for missing prerequisite headers?" >&2;}
    { echo "$as_me:$LINENO: WARNING: sndfile.h: see the Autoconf documentation" >&5
echo "$as_me: WARNING: sndfile.h: see the Autoconf documentation" >&2;}
    { echo "$as_me:$LINENO: WARNING: sndfile.h:     section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: sndfile.h:     section \"Present But Cannot Be Compiled\"" >&2;}
    { echo "$as_me:$LINENO: WARNING: sndfile.h: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: sndfile.h: proceeding with the preprocessor's result" >&2;}
    { echo "$as_me:$LINENO: WARNING: sndfile.h: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: sndfile.h: in the future, the compiler will take precedence" >&2;}

    ;;
esac
{ echo "$as_me:$LINENO: checking for sndfile.h" >&5
echo $ECHO_N "checking for sndfile.h... $ECHO_C" >&6; }
if test "${ac_cv_header_sndfile_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_cv_header_sndfile_h=$ac_header_preproc
fi
{ echo "$as_me:$LINENO: result: $ac_cv_header_sndfile_h" >&5
echo "${ECHO_T}$ac_cv_header_sndfile_h" >&6; }

fi
if test $ac_cv_header_sndfile_h = yes; then
  :
else
  { { echo "$as_me:$LINENO: error: sndfile header not found. install sndfile" >&5
echo "$as_me: error: sndfile header not found. install sndfile" >&2;}
   { (exit 1); exit 1; }; }
fi



{ echo "$as_me:$LINENO: checking for sf_open in -lsndfile" >&5
echo $ECHO_N "checking for sf_open in -lsndfile... $ECHO_C" >&6; }
if test "${ac_cv_lib_sndfile_sf_open+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lsndfile  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char sf_open ();
int
main ()
{
return sf_open ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_sndfile_sf_open=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_lib_sndfile_sf_open=no
fi

rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ echo "$as_me:$LINENO: result: $ac_cv_lib_sndfile_sf_open" >&5
echo "${ECHO_T}$ac_cv_lib_sndfile_sf_open" >&6; }
if test $ac_cv_lib_sndfile_sf_open = yes; then
  cat >>confdefs.h <<_ACEOF
#define HAVE_LIBSNDFILE 1
_ACEOF

  LIBS="-lsndfile $LIBS"

else
  { { echo "$as_me:$LINENO: error: sndfile library not found or functional" >&5
echo "$as_me: error: sndfile library not found or functional" >&2;}
   { (exit 1); exit 1; }; }
fi

	   SYSTEM_SNDFILE=YES
	else
           { echo "$as_me:$LINENO: result: internal" >&5
echo "${ECHO_T}internal" >&6; }
	   SYSTEM_SNDFILE=NO
	    BUILD_TYPE="$BUILD_TYPE SNDFILE"
	fi
	{ echo "$as_me:$LINENO: checking which portaudio to use" >&5
echo $ECHO_N "checking which portaudio to use... $ECHO_C" >&6; }
	if test -n "$with_system_portaudio" -o -n "$with_system_libs" && \
		test "$with_system_portaudio" != "no"; then
	   { echo "$as_me:$LINENO: result: external" >&5
echo "${ECHO_T}external" >&6; }
	   if test "${ac_cv_header_portaudio_h+set}" = set; then
  { echo "$as_me:$LINENO: checking for portaudio.h" >&5
echo $ECHO_N "checking for portaudio.h... $ECHO_C" >&6; }
if test "${ac_cv_header_portaudio_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
fi
{ echo "$as_me:$LINENO: result: $ac_cv_header_portaudio_h" >&5
echo "${ECHO_T}$ac_cv_header_portaudio_h" >&6; }
else
  # Is the header compilable?
{ echo "$as_me:$LINENO: checking portaudio.h usability" >&5
echo $ECHO_N "checking portaudio.h usability... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
#include <portaudio.h>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_header_compiler=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_header_compiler=no
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6; }

# Is the header present?
{ echo "$as_me:$LINENO: checking portaudio.h presence" >&5
echo $ECHO_N "checking portaudio.h presence... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <portaudio.h>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_cxx_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  ac_header_preproc=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  ac_header_preproc=no
fi

rm -f conftest.err conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6; }

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
  yes:no: )
    { echo "$as_me:$LINENO: WARNING: portaudio.h: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: portaudio.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { echo "$as_me:$LINENO: WARNING: portaudio.h: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: portaudio.h: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { echo "$as_me:$LINENO: WARNING: portaudio.h: present but cannot be compiled" >&5
echo "$as_me: WARNING: portaudio.h: present but cannot be compiled" >&2;}
    { echo "$as_me:$LINENO: WARNING: portaudio.h:     check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: portaudio.h:     check for missing prerequisite headers?" >&2;}
    { echo "$as_me:$LINENO: WARNING: portaudio.h: see the Autoconf documentation" >&5
echo "$as_me: WARNING: portaudio.h: see the Autoconf documentation" >&2;}
    { echo "$as_me:$LINENO: WARNING: portaudio.h:     section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: portaudio.h:     section \"Present But Cannot Be Compiled\"" >&2;}
    { echo "$as_me:$LINENO: WARNING: portaudio.h: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: portaudio.h: proceeding with the preprocessor's result" >&2;}
    { echo "$as_me:$LINENO: WARNING: portaudio.h: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: portaudio.h: in the future, the compiler will take precedence" >&2;}

    ;;
esac
{ echo "$as_me:$LINENO: checking for portaudio.h" >&5
echo $ECHO_N "checking for portaudio.h... $ECHO_C" >&6; }
if test "${ac_cv_header_portaudio_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_cv_header_portaudio_h=$ac_header_preproc
fi
{ echo "$as_me:$LINENO: result: $ac_cv_header_portaudio_h" >&5
echo "${ECHO_T}$ac_cv_header_portaudio_h" >&6; }

fi
if test $ac_cv_header_portaudio_h = yes; then
  :
else
  { { echo "$as_me:$LINENO: error: portaudio header not found. install portaudio" >&5
echo "$as_me: error: portaudio header not found. install portaudio" >&2;}
   { (exit 1); exit 1; }; }
fi



{ echo "$as_me:$LINENO: checking for Pa_Initialize in -lportaudio" >&5
echo $ECHO_N "checking for Pa_Initialize in -lportaudio... $ECHO_C" >&6; }
if test "${ac_cv_lib_portaudio_Pa_Initialize+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lportaudio  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char Pa_Initialize ();
int
main ()
{
return Pa_Initialize ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_portaudio_Pa_Initialize=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_lib_portaudio_Pa_Initialize=no
fi

rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ echo "$as_me:$LINENO: result: $ac_cv_lib_portaudio_Pa_Initialize" >&5
echo "${ECHO_T}$ac_cv_lib_portaudio_Pa_Initialize" >&6; }
if test $ac_cv_lib_portaudio_Pa_Initialize = yes; then
  cat >>confdefs.h <<_ACEOF
#define HAVE_LIBPORTAUDIO 1
_ACEOF

  LIBS="-lportaudio $LIBS"

else
  { { echo "$as_me:$LINENO: error: portaudio library not found or functional" >&5
echo "$as_me: error: portaudio library not found or functional" >&2;}
   { (exit 1); exit 1; }; }
fi

	   { echo "$as_me:$LINENO: checking portaudio version" >&5
echo $ECHO_N "checking portaudio version... $ECHO_C" >&6; }
	   cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <portaudio.h>
int
main ()
{

void main(int argc, char **argv) {
	 /* Pa_GetVersion() only exists in v19, so this fails to build with v18 */
        int v = Pa_GetVersion();
}

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  { { echo "$as_me:$LINENO: error: portaudio too new. you need v18" >&5
echo "$as_me: error: portaudio too new. you need v18" >&2;}
   { (exit 1); exit 1; }; }
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	{ echo "$as_me:$LINENO: result: OK, v18" >&5
echo "${ECHO_T}OK, v18" >&6; }
fi

rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
      SYSTEM_PORTAUDIO=YES
	else
	   { echo "$as_me:$LINENO: result: internal" >&5
echo "${ECHO_T}internal" >&6; }
	   SYSTEM_PORTAUDIO=NO
	   BUILD_TYPE="$BUILD_TYPE PORTAUDIO"
	fi
else
	{ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi





{ echo "$as_me:$LINENO: checking whether to build neon" >&5
echo $ECHO_N "checking whether to build neon... $ECHO_C" >&6; }
if test "$enable_neon" = "no"; then
    { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
    DISABLE_NEON=TRUE

else
    { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
{ echo "$as_me:$LINENO: checking which neon to use" >&5
echo $ECHO_N "checking which neon to use... $ECHO_C" >&6; }
if test -n "$with_system_neon" -o -n "$with_system_libs" && \
	test "$with_system_neon" != "no"; then
        { echo "$as_me:$LINENO: result: external" >&5
echo "${ECHO_T}external" >&6; }

  succeeded=no

  if test -z "$PKG_CONFIG"; then
    # Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $PKG_CONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
  ;;
esac
fi
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
if test -n "$PKG_CONFIG"; then
  { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
echo "${ECHO_T}$PKG_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  fi

  if test "$PKG_CONFIG" = "no" ; then
     echo "*** The pkg-config script could not be found. Make sure it is"
     echo "*** in your path, or set the PKG_CONFIG environment variable"
     echo "*** to the full path to pkg-config."
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
  else
     PKG_CONFIG_MIN_VERSION=0.9.0
     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
        { echo "$as_me:$LINENO: checking for neon >= 0.24.0" >&5
echo $ECHO_N "checking for neon >= 0.24.0... $ECHO_C" >&6; }

        if $PKG_CONFIG --exists "neon >= 0.24.0" ; then
            { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
            succeeded=yes

            { echo "$as_me:$LINENO: checking NEON_CFLAGS" >&5
echo $ECHO_N "checking NEON_CFLAGS... $ECHO_C" >&6; }
            NEON_CFLAGS=`$PKG_CONFIG --cflags "neon >= 0.24.0"`
            { echo "$as_me:$LINENO: result: $NEON_CFLAGS" >&5
echo "${ECHO_T}$NEON_CFLAGS" >&6; }

            { echo "$as_me:$LINENO: checking NEON_LIBS" >&5
echo $ECHO_N "checking NEON_LIBS... $ECHO_C" >&6; }
            NEON_LIBS=`$PKG_CONFIG --libs "neon >= 0.24.0"`
            { echo "$as_me:$LINENO: result: $NEON_LIBS" >&5
echo "${ECHO_T}$NEON_LIBS" >&6; }
        else
            NEON_CFLAGS=""
            NEON_LIBS=""
            ## If we have a custom action on failure, don't print errors, but
            ## do set a variable so people can do so.
            NEON_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "neon >= 0.24.0"`
            echo $NEON_PKG_ERRORS
        fi



     else
        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
        echo "*** See http://www.freedesktop.org/software/pkgconfig"
     fi
  fi

  if test $succeeded = yes; then
     :
  else
     { { echo "$as_me:$LINENO: error: Library requirements (neon >= 0.24.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5
echo "$as_me: error: Library requirements (neon >= 0.24.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;}
   { (exit 1); exit 1; }; }
  fi


  succeeded=no

  if test -z "$PKG_CONFIG"; then
    # Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $PKG_CONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
  ;;
esac
fi
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
if test -n "$PKG_CONFIG"; then
  { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
echo "${ECHO_T}$PKG_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  fi

  if test "$PKG_CONFIG" = "no" ; then
     echo "*** The pkg-config script could not be found. Make sure it is"
     echo "*** in your path, or set the PKG_CONFIG environment variable"
     echo "*** to the full path to pkg-config."
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
  else
     PKG_CONFIG_MIN_VERSION=0.9.0
     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
        { echo "$as_me:$LINENO: checking for neon < 0.27.0" >&5
echo $ECHO_N "checking for neon < 0.27.0... $ECHO_C" >&6; }

        if $PKG_CONFIG --exists "neon < 0.27.0" ; then
            { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
            succeeded=yes

            { echo "$as_me:$LINENO: checking NEON_CFLAGS" >&5
echo $ECHO_N "checking NEON_CFLAGS... $ECHO_C" >&6; }
            NEON_CFLAGS=`$PKG_CONFIG --cflags "neon < 0.27.0"`
            { echo "$as_me:$LINENO: result: $NEON_CFLAGS" >&5
echo "${ECHO_T}$NEON_CFLAGS" >&6; }

            { echo "$as_me:$LINENO: checking NEON_LIBS" >&5
echo $ECHO_N "checking NEON_LIBS... $ECHO_C" >&6; }
            NEON_LIBS=`$PKG_CONFIG --libs "neon < 0.27.0"`
            { echo "$as_me:$LINENO: result: $NEON_LIBS" >&5
echo "${ECHO_T}$NEON_LIBS" >&6; }
        else
            NEON_CFLAGS=""
            NEON_LIBS=""
            ## If we have a custom action on failure, don't print errors, but
            ## do set a variable so people can do so.
            NEON_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "neon < 0.27.0"`

        fi



     else
        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
        echo "*** See http://www.freedesktop.org/software/pkgconfig"
     fi
  fi

  if test $succeeded = yes; then
     :
  else
     { { echo "$as_me:$LINENO: error: you need neon 0.24.x to 0.26.x for system-neon" >&5
echo "$as_me: error: you need neon 0.24.x to 0.26.x for system-neon" >&2;}
   { (exit 1); exit 1; }; }
  fi

        NEON_VERSION="`$PKG_CONFIG --modversion neon | $SED 's/\.//g'`"
        NEON_CFLAGS="$NEON_CFLAGS -DSYSTEM_NEON -DUSE_DAV_LOCKS=1"
        SYSTEM_NEON=YES
else
    { echo "$as_me:$LINENO: result: internal" >&5
echo "${ECHO_T}internal" >&6; }
    SYSTEM_NEON=NO
    NEON_LIBS=-lneon
    NEON_CFLAGS=
    NEON_VERSION=0247
    BUILD_TYPE="$BUILD_TYPE NEON"
fi




fi

{ echo "$as_me:$LINENO: checking which AGG to use" >&5
echo $ECHO_N "checking which AGG to use... $ECHO_C" >&6; }
if test -n "$with_system_agg" -o -n "$with_system_libs" && \
   test "$with_system_agg" != "no"; then
         { echo "$as_me:$LINENO: result: external" >&5
echo "${ECHO_T}external" >&6; }

  succeeded=no

  if test -z "$PKG_CONFIG"; then
    # Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $PKG_CONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
  ;;
esac
fi
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
if test -n "$PKG_CONFIG"; then
  { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
echo "${ECHO_T}$PKG_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  fi

  if test "$PKG_CONFIG" = "no" ; then
     echo "*** The pkg-config script could not be found. Make sure it is"
     echo "*** in your path, or set the PKG_CONFIG environment variable"
     echo "*** to the full path to pkg-config."
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
  else
     PKG_CONFIG_MIN_VERSION=0.9.0
     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
        { echo "$as_me:$LINENO: checking for libagg >= 2.3" >&5
echo $ECHO_N "checking for libagg >= 2.3... $ECHO_C" >&6; }

        if $PKG_CONFIG --exists "libagg >= 2.3" ; then
            { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
            succeeded=yes

            { echo "$as_me:$LINENO: checking AGG_CFLAGS" >&5
echo $ECHO_N "checking AGG_CFLAGS... $ECHO_C" >&6; }
            AGG_CFLAGS=`$PKG_CONFIG --cflags "libagg >= 2.3"`
            { echo "$as_me:$LINENO: result: $AGG_CFLAGS" >&5
echo "${ECHO_T}$AGG_CFLAGS" >&6; }

            { echo "$as_me:$LINENO: checking AGG_LIBS" >&5
echo $ECHO_N "checking AGG_LIBS... $ECHO_C" >&6; }
            AGG_LIBS=`$PKG_CONFIG --libs "libagg >= 2.3"`
            { echo "$as_me:$LINENO: result: $AGG_LIBS" >&5
echo "${ECHO_T}$AGG_LIBS" >&6; }
        else
            AGG_CFLAGS=""
            AGG_LIBS=""
            ## If we have a custom action on failure, don't print errors, but
            ## do set a variable so people can do so.
            AGG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libagg >= 2.3"`
            echo $AGG_PKG_ERRORS
        fi



     else
        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
        echo "*** See http://www.freedesktop.org/software/pkgconfig"
     fi
  fi

  if test $succeeded = yes; then
     :
  else
     { { echo "$as_me:$LINENO: error: Library requirements (libagg >= 2.3) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5
echo "$as_me: error: Library requirements (libagg >= 2.3) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;}
   { (exit 1); exit 1; }; }
  fi

         # unfortunately, agg 2.4 per default has 2.3 in version, so this check only will work
         # when you have fixed that / have a fixed package.. :/

  succeeded=no

  if test -z "$PKG_CONFIG"; then
    # Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $PKG_CONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
  ;;
esac
fi
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
if test -n "$PKG_CONFIG"; then
  { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
echo "${ECHO_T}$PKG_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  fi

  if test "$PKG_CONFIG" = "no" ; then
     echo "*** The pkg-config script could not be found. Make sure it is"
     echo "*** in your path, or set the PKG_CONFIG environment variable"
     echo "*** to the full path to pkg-config."
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
  else
     PKG_CONFIG_MIN_VERSION=0.9.0
     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
        { echo "$as_me:$LINENO: checking for libagg < 2.4" >&5
echo $ECHO_N "checking for libagg < 2.4... $ECHO_C" >&6; }

        if $PKG_CONFIG --exists "libagg < 2.4" ; then
            { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
            succeeded=yes

            { echo "$as_me:$LINENO: checking AGG_CFLAGS" >&5
echo $ECHO_N "checking AGG_CFLAGS... $ECHO_C" >&6; }
            AGG_CFLAGS=`$PKG_CONFIG --cflags "libagg < 2.4"`
            { echo "$as_me:$LINENO: result: $AGG_CFLAGS" >&5
echo "${ECHO_T}$AGG_CFLAGS" >&6; }

            { echo "$as_me:$LINENO: checking AGG_LIBS" >&5
echo $ECHO_N "checking AGG_LIBS... $ECHO_C" >&6; }
            AGG_LIBS=`$PKG_CONFIG --libs "libagg < 2.4"`
            { echo "$as_me:$LINENO: result: $AGG_LIBS" >&5
echo "${ECHO_T}$AGG_LIBS" >&6; }
        else
            AGG_CFLAGS=""
            AGG_LIBS=""
            ## If we have a custom action on failure, don't print errors, but
            ## do set a variable so people can do so.
            AGG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libagg < 2.4"`

        fi



     else
        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
        echo "*** See http://www.freedesktop.org/software/pkgconfig"
     fi
  fi

  if test $succeeded = yes; then
     :
  else
     { { echo "$as_me:$LINENO: error: you need agg 2.3 for system-agg" >&5
echo "$as_me: error: you need agg 2.3 for system-agg" >&2;}
   { (exit 1); exit 1; }; }
  fi

         SYSTEM_AGG=YES
else
         { echo "$as_me:$LINENO: result: internal" >&5
echo "${ECHO_T}internal" >&6; }
         SYSTEM_AGG=NO
         BUILD_TYPE="$BUILD_TYPE AGG"
fi


{ echo "$as_me:$LINENO: checking which myspell to use" >&5
echo $ECHO_N "checking which myspell to use... $ECHO_C" >&6; }
if test -n "$with_system_myspell" && test "$with_system_myspell" != "no"; then
    { echo "$as_me:$LINENO: result: external" >&5
echo "${ECHO_T}external" >&6; }
    SYSTEM_MYSPELL=YES

  succeeded=no

  if test -z "$PKG_CONFIG"; then
    # Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $PKG_CONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
  ;;
esac
fi
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
if test -n "$PKG_CONFIG"; then
  { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
echo "${ECHO_T}$PKG_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  fi

  if test "$PKG_CONFIG" = "no" ; then
     echo "*** The pkg-config script could not be found. Make sure it is"
     echo "*** in your path, or set the PKG_CONFIG environment variable"
     echo "*** to the full path to pkg-config."
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
  else
     PKG_CONFIG_MIN_VERSION=0.9.0
     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
        { echo "$as_me:$LINENO: checking for myspell" >&5
echo $ECHO_N "checking for myspell... $ECHO_C" >&6; }

        if $PKG_CONFIG --exists "myspell" ; then
            { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
            succeeded=yes

            { echo "$as_me:$LINENO: checking MYSPELL_CFLAGS" >&5
echo $ECHO_N "checking MYSPELL_CFLAGS... $ECHO_C" >&6; }
            MYSPELL_CFLAGS=`$PKG_CONFIG --cflags "myspell"`
            { echo "$as_me:$LINENO: result: $MYSPELL_CFLAGS" >&5
echo "${ECHO_T}$MYSPELL_CFLAGS" >&6; }

            { echo "$as_me:$LINENO: checking MYSPELL_LIBS" >&5
echo $ECHO_N "checking MYSPELL_LIBS... $ECHO_C" >&6; }
            MYSPELL_LIBS=`$PKG_CONFIG --libs "myspell"`
            { echo "$as_me:$LINENO: result: $MYSPELL_LIBS" >&5
echo "${ECHO_T}$MYSPELL_LIBS" >&6; }
        else
            MYSPELL_CFLAGS=""
            MYSPELL_LIBS=""
            ## If we have a custom action on failure, don't print errors, but
            ## do set a variable so people can do so.
            MYSPELL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "myspell"`

        fi



     else
        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
        echo "*** See http://www.freedesktop.org/software/pkgconfig"
     fi
  fi

  if test $succeeded = yes; then
      MYSPELL_PKGCONFIG=YES
  else

         if test "${ac_cv_header_myspell_myspell_hxx+set}" = set; then
  { echo "$as_me:$LINENO: checking for myspell/myspell.hxx" >&5
echo $ECHO_N "checking for myspell/myspell.hxx... $ECHO_C" >&6; }
if test "${ac_cv_header_myspell_myspell_hxx+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
fi
{ echo "$as_me:$LINENO: result: $ac_cv_header_myspell_myspell_hxx" >&5
echo "${ECHO_T}$ac_cv_header_myspell_myspell_hxx" >&6; }
else
  # Is the header compilable?
{ echo "$as_me:$LINENO: checking myspell/myspell.hxx usability" >&5
echo $ECHO_N "checking myspell/myspell.hxx usability... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
#include <myspell/myspell.hxx>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_header_compiler=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_header_compiler=no
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6; }

# Is the header present?
{ echo "$as_me:$LINENO: checking myspell/myspell.hxx presence" >&5
echo $ECHO_N "checking myspell/myspell.hxx presence... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <myspell/myspell.hxx>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_cxx_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  ac_header_preproc=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  ac_header_preproc=no
fi

rm -f conftest.err conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6; }

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
  yes:no: )
    { echo "$as_me:$LINENO: WARNING: myspell/myspell.hxx: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: myspell/myspell.hxx: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { echo "$as_me:$LINENO: WARNING: myspell/myspell.hxx: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: myspell/myspell.hxx: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { echo "$as_me:$LINENO: WARNING: myspell/myspell.hxx: present but cannot be compiled" >&5
echo "$as_me: WARNING: myspell/myspell.hxx: present but cannot be compiled" >&2;}
    { echo "$as_me:$LINENO: WARNING: myspell/myspell.hxx:     check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: myspell/myspell.hxx:     check for missing prerequisite headers?" >&2;}
    { echo "$as_me:$LINENO: WARNING: myspell/myspell.hxx: see the Autoconf documentation" >&5
echo "$as_me: WARNING: myspell/myspell.hxx: see the Autoconf documentation" >&2;}
    { echo "$as_me:$LINENO: WARNING: myspell/myspell.hxx:     section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: myspell/myspell.hxx:     section \"Present But Cannot Be Compiled\"" >&2;}
    { echo "$as_me:$LINENO: WARNING: myspell/myspell.hxx: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: myspell/myspell.hxx: proceeding with the preprocessor's result" >&2;}
    { echo "$as_me:$LINENO: WARNING: myspell/myspell.hxx: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: myspell/myspell.hxx: in the future, the compiler will take precedence" >&2;}

    ;;
esac
{ echo "$as_me:$LINENO: checking for myspell/myspell.hxx" >&5
echo $ECHO_N "checking for myspell/myspell.hxx... $ECHO_C" >&6; }
if test "${ac_cv_header_myspell_myspell_hxx+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_cv_header_myspell_myspell_hxx=$ac_header_preproc
fi
{ echo "$as_me:$LINENO: result: $ac_cv_header_myspell_myspell_hxx" >&5
echo "${ECHO_T}$ac_cv_header_myspell_myspell_hxx" >&6; }

fi
if test $ac_cv_header_myspell_myspell_hxx = yes; then
  :
else
  { { echo "$as_me:$LINENO: error: myspell headers not found." >&5
echo "$as_me: error: myspell headers not found." >&2;}
   { (exit 1); exit 1; }; }
fi


         MYSPELL_CFLAGS=-I/usr/include/myspell

{ echo "$as_me:$LINENO: checking for main in -lmyspell" >&5
echo $ECHO_N "checking for main in -lmyspell... $ECHO_C" >&6; }
if test "${ac_cv_lib_myspell_main+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lmyspell  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */


int
main ()
{
return main ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_myspell_main=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_lib_myspell_main=no
fi

rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ echo "$as_me:$LINENO: result: $ac_cv_lib_myspell_main" >&5
echo "${ECHO_T}$ac_cv_lib_myspell_main" >&6; }
if test $ac_cv_lib_myspell_main = yes; then
  cat >>confdefs.h <<_ACEOF
#define HAVE_LIBMYSPELL 1
_ACEOF

  LIBS="-lmyspell $LIBS"

else
   { { echo "$as_me:$LINENO: error: myspell library not found." >&5
echo "$as_me: error: myspell library not found." >&2;}
   { (exit 1); exit 1; }; }
fi

         MYSPELL_LIBS=-lmyspell


  fi

else
    { echo "$as_me:$LINENO: result: internal" >&5
echo "${ECHO_T}internal" >&6; }
    SYSTEM_MYSPELL=NO
    MYSPELL_LIBS=-lmyspell
fi




{ echo "$as_me:$LINENO: checking which libhunspell to use" >&5
echo $ECHO_N "checking which libhunspell to use... $ECHO_C" >&6; }
if test -n "$with_system_hunspell" && test "$with_system_hunspell" != "no"; then
    { echo "$as_me:$LINENO: result: external" >&5
echo "${ECHO_T}external" >&6; }
    SYSTEM_HUNSPELL=YES
    ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu

    if test "${ac_cv_header_hunspell_hxx+set}" = set; then
  { echo "$as_me:$LINENO: checking for hunspell.hxx" >&5
echo $ECHO_N "checking for hunspell.hxx... $ECHO_C" >&6; }
if test "${ac_cv_header_hunspell_hxx+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
fi
{ echo "$as_me:$LINENO: result: $ac_cv_header_hunspell_hxx" >&5
echo "${ECHO_T}$ac_cv_header_hunspell_hxx" >&6; }
else
  # Is the header compilable?
{ echo "$as_me:$LINENO: checking hunspell.hxx usability" >&5
echo $ECHO_N "checking hunspell.hxx usability... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
#include <hunspell.hxx>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_header_compiler=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_header_compiler=no
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6; }

# Is the header present?
{ echo "$as_me:$LINENO: checking hunspell.hxx presence" >&5
echo $ECHO_N "checking hunspell.hxx presence... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <hunspell.hxx>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_cxx_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  ac_header_preproc=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  ac_header_preproc=no
fi

rm -f conftest.err conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6; }

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
  yes:no: )
    { echo "$as_me:$LINENO: WARNING: hunspell.hxx: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: hunspell.hxx: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { echo "$as_me:$LINENO: WARNING: hunspell.hxx: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: hunspell.hxx: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { echo "$as_me:$LINENO: WARNING: hunspell.hxx: present but cannot be compiled" >&5
echo "$as_me: WARNING: hunspell.hxx: present but cannot be compiled" >&2;}
    { echo "$as_me:$LINENO: WARNING: hunspell.hxx:     check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: hunspell.hxx:     check for missing prerequisite headers?" >&2;}
    { echo "$as_me:$LINENO: WARNING: hunspell.hxx: see the Autoconf documentation" >&5
echo "$as_me: WARNING: hunspell.hxx: see the Autoconf documentation" >&2;}
    { echo "$as_me:$LINENO: WARNING: hunspell.hxx:     section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: hunspell.hxx:     section \"Present But Cannot Be Compiled\"" >&2;}
    { echo "$as_me:$LINENO: WARNING: hunspell.hxx: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: hunspell.hxx: proceeding with the preprocessor's result" >&2;}
    { echo "$as_me:$LINENO: WARNING: hunspell.hxx: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: hunspell.hxx: in the future, the compiler will take precedence" >&2;}

    ;;
esac
{ echo "$as_me:$LINENO: checking for hunspell.hxx" >&5
echo $ECHO_N "checking for hunspell.hxx... $ECHO_C" >&6; }
if test "${ac_cv_header_hunspell_hxx+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_cv_header_hunspell_hxx=$ac_header_preproc
fi
{ echo "$as_me:$LINENO: result: $ac_cv_header_hunspell_hxx" >&5
echo "${ECHO_T}$ac_cv_header_hunspell_hxx" >&6; }

fi
if test $ac_cv_header_hunspell_hxx = yes; then
  :
else

    if test "${ac_cv_header_hunspell_hunspell_hxx+set}" = set; then
  { echo "$as_me:$LINENO: checking for hunspell/hunspell.hxx" >&5
echo $ECHO_N "checking for hunspell/hunspell.hxx... $ECHO_C" >&6; }
if test "${ac_cv_header_hunspell_hunspell_hxx+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
fi
{ echo "$as_me:$LINENO: result: $ac_cv_header_hunspell_hunspell_hxx" >&5
echo "${ECHO_T}$ac_cv_header_hunspell_hunspell_hxx" >&6; }
else
  # Is the header compilable?
{ echo "$as_me:$LINENO: checking hunspell/hunspell.hxx usability" >&5
echo $ECHO_N "checking hunspell/hunspell.hxx usability... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
#include <hunspell/hunspell.hxx>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_header_compiler=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_header_compiler=no
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6; }

# Is the header present?
{ echo "$as_me:$LINENO: checking hunspell/hunspell.hxx presence" >&5
echo $ECHO_N "checking hunspell/hunspell.hxx presence... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <hunspell/hunspell.hxx>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_cxx_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  ac_header_preproc=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  ac_header_preproc=no
fi

rm -f conftest.err conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6; }

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
  yes:no: )
    { echo "$as_me:$LINENO: WARNING: hunspell/hunspell.hxx: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: hunspell/hunspell.hxx: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { echo "$as_me:$LINENO: WARNING: hunspell/hunspell.hxx: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: hunspell/hunspell.hxx: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { echo "$as_me:$LINENO: WARNING: hunspell/hunspell.hxx: present but cannot be compiled" >&5
echo "$as_me: WARNING: hunspell/hunspell.hxx: present but cannot be compiled" >&2;}
    { echo "$as_me:$LINENO: WARNING: hunspell/hunspell.hxx:     check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: hunspell/hunspell.hxx:     check for missing prerequisite headers?" >&2;}
    { echo "$as_me:$LINENO: WARNING: hunspell/hunspell.hxx: see the Autoconf documentation" >&5
echo "$as_me: WARNING: hunspell/hunspell.hxx: see the Autoconf documentation" >&2;}
    { echo "$as_me:$LINENO: WARNING: hunspell/hunspell.hxx:     section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: hunspell/hunspell.hxx:     section \"Present But Cannot Be Compiled\"" >&2;}
    { echo "$as_me:$LINENO: WARNING: hunspell/hunspell.hxx: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: hunspell/hunspell.hxx: proceeding with the preprocessor's result" >&2;}
    { echo "$as_me:$LINENO: WARNING: hunspell/hunspell.hxx: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: hunspell/hunspell.hxx: in the future, the compiler will take precedence" >&2;}

    ;;
esac
{ echo "$as_me:$LINENO: checking for hunspell/hunspell.hxx" >&5
echo $ECHO_N "checking for hunspell/hunspell.hxx... $ECHO_C" >&6; }
if test "${ac_cv_header_hunspell_hunspell_hxx+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_cv_header_hunspell_hunspell_hxx=$ac_header_preproc
fi
{ echo "$as_me:$LINENO: result: $ac_cv_header_hunspell_hunspell_hxx" >&5
echo "${ECHO_T}$ac_cv_header_hunspell_hunspell_hxx" >&6; }

fi
if test $ac_cv_header_hunspell_hunspell_hxx = yes; then
   HUNSPELL_CFLAGS=-I/usr/include/hunspell
else
  { { echo "$as_me:$LINENO: error: hunspell headers not found." >&5
echo "$as_me: error: hunspell headers not found." >&2;}
   { (exit 1); exit 1; }; }
fi



fi



{ echo "$as_me:$LINENO: checking for main in -lhunspell" >&5
echo $ECHO_N "checking for main in -lhunspell... $ECHO_C" >&6; }
if test "${ac_cv_lib_hunspell_main+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lhunspell  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */


int
main ()
{
return main ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_hunspell_main=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_lib_hunspell_main=no
fi

rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ echo "$as_me:$LINENO: result: $ac_cv_lib_hunspell_main" >&5
echo "${ECHO_T}$ac_cv_lib_hunspell_main" >&6; }
if test $ac_cv_lib_hunspell_main = yes; then
  cat >>confdefs.h <<_ACEOF
#define HAVE_LIBHUNSPELL 1
_ACEOF

  LIBS="-lhunspell $LIBS"

else
   { { echo "$as_me:$LINENO: error: hunspell library not found." >&5
echo "$as_me: error: hunspell library not found." >&2;}
   { (exit 1); exit 1; }; }
fi

else
    { echo "$as_me:$LINENO: result: internal" >&5
echo "${ECHO_T}internal" >&6; }
    SYSTEM_HUNSPELL=NO
fi



{ echo "$as_me:$LINENO: checking which altlinuxhyph to use" >&5
echo $ECHO_N "checking which altlinuxhyph to use... $ECHO_C" >&6; }
if test -n "$with_system_altlinuxhyph" && test "$with_system_altlinuxyph" != "no"; then
    { echo "$as_me:$LINENO: result: external" >&5
echo "${ECHO_T}external" >&6; }
    SYSTEM_HYPH=YES
    if test "${ac_cv_header_hyphen_h+set}" = set; then
  { echo "$as_me:$LINENO: checking for hyphen.h" >&5
echo $ECHO_N "checking for hyphen.h... $ECHO_C" >&6; }
if test "${ac_cv_header_hyphen_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
fi
{ echo "$as_me:$LINENO: result: $ac_cv_header_hyphen_h" >&5
echo "${ECHO_T}$ac_cv_header_hyphen_h" >&6; }
else
  # Is the header compilable?
{ echo "$as_me:$LINENO: checking hyphen.h usability" >&5
echo $ECHO_N "checking hyphen.h usability... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
#include <hyphen.h>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_header_compiler=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_header_compiler=no
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6; }

# Is the header present?
{ echo "$as_me:$LINENO: checking hyphen.h presence" >&5
echo $ECHO_N "checking hyphen.h presence... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <hyphen.h>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_cxx_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  ac_header_preproc=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  ac_header_preproc=no
fi

rm -f conftest.err conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6; }

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
  yes:no: )
    { echo "$as_me:$LINENO: WARNING: hyphen.h: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: hyphen.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { echo "$as_me:$LINENO: WARNING: hyphen.h: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: hyphen.h: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { echo "$as_me:$LINENO: WARNING: hyphen.h: present but cannot be compiled" >&5
echo "$as_me: WARNING: hyphen.h: present but cannot be compiled" >&2;}
    { echo "$as_me:$LINENO: WARNING: hyphen.h:     check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: hyphen.h:     check for missing prerequisite headers?" >&2;}
    { echo "$as_me:$LINENO: WARNING: hyphen.h: see the Autoconf documentation" >&5
echo "$as_me: WARNING: hyphen.h: see the Autoconf documentation" >&2;}
    { echo "$as_me:$LINENO: WARNING: hyphen.h:     section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: hyphen.h:     section \"Present But Cannot Be Compiled\"" >&2;}
    { echo "$as_me:$LINENO: WARNING: hyphen.h: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: hyphen.h: proceeding with the preprocessor's result" >&2;}
    { echo "$as_me:$LINENO: WARNING: hyphen.h: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: hyphen.h: in the future, the compiler will take precedence" >&2;}

    ;;
esac
{ echo "$as_me:$LINENO: checking for hyphen.h" >&5
echo $ECHO_N "checking for hyphen.h... $ECHO_C" >&6; }
if test "${ac_cv_header_hyphen_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_cv_header_hyphen_h=$ac_header_preproc
fi
{ echo "$as_me:$LINENO: result: $ac_cv_header_hyphen_h" >&5
echo "${ECHO_T}$ac_cv_header_hyphen_h" >&6; }

fi
if test $ac_cv_header_hyphen_h = yes; then
  :
else
   { { echo "$as_me:$LINENO: error: altlinuxhyph headers not found." >&5
echo "$as_me: error: altlinuxhyph headers not found." >&2;}
   { (exit 1); exit 1; }; }
fi


    { echo "$as_me:$LINENO: checking for struct _HyphenDict.cset" >&5
echo $ECHO_N "checking for struct _HyphenDict.cset... $ECHO_C" >&6; }
if test "${ac_cv_member_struct__HyphenDict_cset+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <hyphen.h>

int
main ()
{
static struct _HyphenDict ac_aggr;
if (ac_aggr.cset)
return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_member_struct__HyphenDict_cset=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <hyphen.h>

int
main ()
{
static struct _HyphenDict ac_aggr;
if (sizeof ac_aggr.cset)
return 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_member_struct__HyphenDict_cset=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_member_struct__HyphenDict_cset=no
fi

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

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ac_cv_member_struct__HyphenDict_cset" >&5
echo "${ECHO_T}$ac_cv_member_struct__HyphenDict_cset" >&6; }
if test $ac_cv_member_struct__HyphenDict_cset = yes; then
  :
else
   { { echo "$as_me:$LINENO: error: no. You are sure you have altlinuyhyph headers?" >&5
echo "$as_me: error: no. You are sure you have altlinuyhyph headers?" >&2;}
   { (exit 1); exit 1; }; }
fi


{ echo "$as_me:$LINENO: checking for hnj_hyphen_hyphenate2 in -lhyph" >&5
echo $ECHO_N "checking for hnj_hyphen_hyphenate2 in -lhyph... $ECHO_C" >&6; }
if test "${ac_cv_lib_hyph_hnj_hyphen_hyphenate2+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lhyph  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char hnj_hyphen_hyphenate2 ();
int
main ()
{
return hnj_hyphen_hyphenate2 ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_hyph_hnj_hyphen_hyphenate2=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_lib_hyph_hnj_hyphen_hyphenate2=no
fi

rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ echo "$as_me:$LINENO: result: $ac_cv_lib_hyph_hnj_hyphen_hyphenate2" >&5
echo "${ECHO_T}$ac_cv_lib_hyph_hnj_hyphen_hyphenate2" >&6; }
if test $ac_cv_lib_hyph_hnj_hyphen_hyphenate2 = yes; then
  cat >>confdefs.h <<_ACEOF
#define HAVE_LIBHYPH 1
_ACEOF

  LIBS="-lhyph $LIBS"

else
   { { echo "$as_me:$LINENO: error: altlinuxhyph library not found or too old." >&5
echo "$as_me: error: altlinuxhyph library not found or too old." >&2;}
   { (exit 1); exit 1; }; }
fi

else
    { echo "$as_me:$LINENO: result: internal" >&5
echo "${ECHO_T}internal" >&6; }
    SYSTEM_HYPH=NO
fi


{ echo "$as_me:$LINENO: checking which mythes to use" >&5
echo $ECHO_N "checking which mythes to use... $ECHO_C" >&6; }
if test -n "$with_system_mythes" && test "$with_system_mythes" != "no"; then
    { echo "$as_me:$LINENO: result: external" >&5
echo "${ECHO_T}external" >&6; }
    SYSTEM_MYTHES=YES
    if test "${ac_cv_header_mythes_hxx+set}" = set; then
  { echo "$as_me:$LINENO: checking for mythes.hxx" >&5
echo $ECHO_N "checking for mythes.hxx... $ECHO_C" >&6; }
if test "${ac_cv_header_mythes_hxx+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
fi
{ echo "$as_me:$LINENO: result: $ac_cv_header_mythes_hxx" >&5
echo "${ECHO_T}$ac_cv_header_mythes_hxx" >&6; }
else
  # Is the header compilable?
{ echo "$as_me:$LINENO: checking mythes.hxx usability" >&5
echo $ECHO_N "checking mythes.hxx usability... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
#include <mythes.hxx>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_header_compiler=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_header_compiler=no
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6; }

# Is the header present?
{ echo "$as_me:$LINENO: checking mythes.hxx presence" >&5
echo $ECHO_N "checking mythes.hxx presence... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <mythes.hxx>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_cxx_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  ac_header_preproc=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  ac_header_preproc=no
fi

rm -f conftest.err conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6; }

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
  yes:no: )
    { echo "$as_me:$LINENO: WARNING: mythes.hxx: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: mythes.hxx: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { echo "$as_me:$LINENO: WARNING: mythes.hxx: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: mythes.hxx: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { echo "$as_me:$LINENO: WARNING: mythes.hxx: present but cannot be compiled" >&5
echo "$as_me: WARNING: mythes.hxx: present but cannot be compiled" >&2;}
    { echo "$as_me:$LINENO: WARNING: mythes.hxx:     check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: mythes.hxx:     check for missing prerequisite headers?" >&2;}
    { echo "$as_me:$LINENO: WARNING: mythes.hxx: see the Autoconf documentation" >&5
echo "$as_me: WARNING: mythes.hxx: see the Autoconf documentation" >&2;}
    { echo "$as_me:$LINENO: WARNING: mythes.hxx:     section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: mythes.hxx:     section \"Present But Cannot Be Compiled\"" >&2;}
    { echo "$as_me:$LINENO: WARNING: mythes.hxx: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: mythes.hxx: proceeding with the preprocessor's result" >&2;}
    { echo "$as_me:$LINENO: WARNING: mythes.hxx: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: mythes.hxx: in the future, the compiler will take precedence" >&2;}

    ;;
esac
{ echo "$as_me:$LINENO: checking for mythes.hxx" >&5
echo $ECHO_N "checking for mythes.hxx... $ECHO_C" >&6; }
if test "${ac_cv_header_mythes_hxx+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_cv_header_mythes_hxx=$ac_header_preproc
fi
{ echo "$as_me:$LINENO: result: $ac_cv_header_mythes_hxx" >&5
echo "${ECHO_T}$ac_cv_header_mythes_hxx" >&6; }

fi
if test $ac_cv_header_mythes_hxx = yes; then
  :
else
   { { echo "$as_me:$LINENO: error: mythes.hxx headers not found." >&5
echo "$as_me: error: mythes.hxx headers not found." >&2;}
   { (exit 1); exit 1; }; }
fi



{ echo "$as_me:$LINENO: checking for main in -lmythes" >&5
echo $ECHO_N "checking for main in -lmythes... $ECHO_C" >&6; }
if test "${ac_cv_lib_mythes_main+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lmythes  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */


int
main ()
{
return main ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_mythes_main=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_lib_mythes_main=no
fi

rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ echo "$as_me:$LINENO: result: $ac_cv_lib_mythes_main" >&5
echo "${ECHO_T}$ac_cv_lib_mythes_main" >&6; }
if test $ac_cv_lib_mythes_main = yes; then
  cat >>confdefs.h <<_ACEOF
#define HAVE_LIBMYTHES 1
_ACEOF

  LIBS="-lmythes $LIBS"

else
   { { echo "$as_me:$LINENO: error: mythes library not found." >&5
echo "$as_me: error: mythes library not found." >&2;}
   { (exit 1); exit 1; }; }
fi

else
    { echo "$as_me:$LINENO: result: internal" >&5
echo "${ECHO_T}internal" >&6; }
    SYSTEM_MYTHES=NO
fi


if test "$_os" = "Linux"; then
   { echo "$as_me:$LINENO: checking whether libc is >= 2.1.1" >&5
echo $ECHO_N "checking whether libc is >= 2.1.1... $ECHO_C" >&6; }
   exec 6>/dev/null # no output
   { echo "$as_me:$LINENO: checking for gnu_get_libc_version in -lc" >&5
echo $ECHO_N "checking for gnu_get_libc_version in -lc... $ECHO_C" >&6; }
if test "${ac_cv_lib_c_gnu_get_libc_version+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lc  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char gnu_get_libc_version ();
int
main ()
{
return gnu_get_libc_version ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_c_gnu_get_libc_version=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_lib_c_gnu_get_libc_version=no
fi

rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_gnu_get_libc_version" >&5
echo "${ECHO_T}$ac_cv_lib_c_gnu_get_libc_version" >&6; }
if test $ac_cv_lib_c_gnu_get_libc_version = yes; then
  HAVE_LIBC=yes; export HAVE_LIBC
fi

   exec 6>&1 # output on again
   if test "$HAVE_LIBC"; then
      { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
   else
      { { echo "$as_me:$LINENO: error: no, upgrade libc" >&5
echo "$as_me: error: no, upgrade libc" >&2;}
   { (exit 1); exit 1; }; }
   fi
fi

if test \( "$_os" = "WINNT" \) ; then
	{ echo "$as_me:$LINENO: checking for PSDK files" >&5
echo $ECHO_N "checking for PSDK files... $ECHO_C" >&6; }
	if test -z "$with_psdk_home"; then
		# This first line will detect a February 2003 Microsoft Platform SDK
		PSDK_HOME=`./oowintool --psdk-home`
        # But there might be also an April 2005 PSDK, unfortunately MS changed
        # the registry entry. (we prefer the old version!?)
        if test -z "$PSDK_HOME"; then
          PSDK_HOME=`cat /proc/registry/HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/MicrosoftSDK/InstalledSDKs/*/Install\ Dir 2> /dev/null | tr '\000' '\n' | head -n 1`
        fi
        # normalize if found
        if test -n "$PSDK_HOME"; then
          PSDK_HOME=`cygpath -d "$PSDK_HOME"`
          PSDK_HOME=`cygpath -u "$PSDK_HOME"`
        fi
	else
		PSDK_HOME="$with_psdk_home"
	fi
        # Remove a possible trailing backslash
        PSDK_HOME=`echo $PSDK_HOME | $SED 's/\/$//'`
    # Problem with current PSDK (iz 49865)
    if test -f "$PSDK_HOME/Lib/libcp.lib"; then
        { { echo "$as_me:$LINENO: error:

Some modules do not build correctly with MS Platform SDK - April 2005
Edition if the library ($PSDK_HOME/Lib/libcp.lib) is found.
Remove/rename/backup that file and restart configure. Details about this
problem can be found in issue 49856." >&5
echo "$as_me: error:

Some modules do not build correctly with MS Platform SDK - April 2005
Edition if the library ($PSDK_HOME/Lib/libcp.lib) is found.
Remove/rename/backup that file and restart configure. Details about this
problem can be found in issue 49856." >&2;}
   { (exit 1); exit 1; }; }
    fi
	if test \( -f "$PSDK_HOME/Include/AdoCtint.h" \) \
		 -a \( -f "$PSDK_HOME/Include/SqlUcode.h" \) \
		 -a \( -f "$PSDK_HOME/Include/usp10.h" \); then
		HAVE_PSDK_H="yes"
	else
		HAVE_PSDK_H="no"
	fi
	if test -f "$PSDK_HOME/lib/unicows.lib"; then
		HAVE_PSDK_LIB="yes"
	else
		HAVE_PSDK_LIB="no"
	fi
    if test "$HAVE_PSDK_H" = "no" -o "$HAVE_PSDK_LIB" = "no"; then
        { { echo "$as_me:$LINENO: error: Some (all?) PSDK files not found, please check if all needed Platform SDKs
are installed or use --with-psdk-home ." >&5
echo "$as_me: error: Some (all?) PSDK files not found, please check if all needed Platform SDKs
are installed or use --with-psdk-home ." >&2;}
   { (exit 1); exit 1; }; }
    fi
    if test ! -x "$PSDK_HOME/bin/msiinfo.exe" \
         -o ! -x "$PSDK_HOME/bin/msidb.exe" \
         -o ! -x "$PSDK_HOME/bin/uuidgen.exe" \
         -o ! -x "$PSDK_HOME/bin/msitran.exe" ; then
        { { echo "$as_me:$LINENO: error: Some (all) files of the Windows Installer SDK are missing, please install." >&5
echo "$as_me: error: Some (all) files of the Windows Installer SDK are missing, please install." >&2;}
   { (exit 1); exit 1; }; }
    fi
    { echo "$as_me:$LINENO: result: PSDK files found ($PSDK_HOME)" >&5
echo "${ECHO_T}PSDK files found ($PSDK_HOME)" >&6; }
fi


if test \( "$_os" = "WINNT" \) ; then
    { echo "$as_me:$LINENO: checking for DirectX SDK files" >&5
echo $ECHO_N "checking for DirectX SDK files... $ECHO_C" >&6; }
    if test -z "$with_directx_home"; then
                if test -n "$DXSDK_DIR"; then
            DIRECTXSDK_HOME=`cygpath -d "$DXSDK_DIR"`
            DIRECTXSDK_HOME=`cygpath -u "$DIRECTXSDK_HOME"`
        fi
        # At this point $DIRECTXSDK_HOME might still be undefined. This will lead to
        # the "DirectX SDK files not found" error later
	else
		DIRECTXSDK_HOME="$with_directx_home"
	fi
    # Remove a possible trailing backslash
    DIRECTXSDK_HOME=`echo $DIRECTXSDK_HOME | $SED 's/\/$//'`

    if test -f "$DIRECTXSDK_HOME/Include/ddraw.h" ; then
        HAVE_DIRECTXSDK_H="yes"
    else
        HAVE_DIRECTXSDK_H="no"
    fi
    # MS changed the location of the libraries with dec 2004 directx sdk
    if test -d "$DIRECTXSDK_HOME/lib/x86" ; then
        DIRECTXSDK_LIB="$DIRECTXSDK_HOME/lib/x86"
    else
        DIRECTXSDK_LIB="$DIRECTXSDK_HOME/lib"
    fi
    if test -f "$DIRECTXSDK_LIB/ddraw.lib" ; then
        HAVE_DIRECTXSDK_LIB="yes"
    else
        HAVE_DIRECTXSDK_LIB="no"
    fi
    if test -n "$ENABLE_DIRECTX"; then
	    if test "$HAVE_DIRECTXSDK_H" = "yes" -a "$HAVE_DIRECTXSDK_LIB" = "yes"; then
		    { echo "$as_me:$LINENO: result: found" >&5
echo "${ECHO_T}found" >&6; }
	    else
		    { { echo "$as_me:$LINENO: error: DirectX SDK files not found, please use --with-directx-home or -disable-directx." >&5
echo "$as_me: error: DirectX SDK files not found, please use --with-directx-home or -disable-directx." >&2;}
   { (exit 1); exit 1; }; }
	    fi
    else
		DIRECTXSDK_HOME=""
		{ echo "$as_me:$LINENO: result: disabled" >&5
echo "${ECHO_T}disabled" >&6; }
    fi
fi



NSIS_PATH=""
if test "$_os" = "WINNT" ; then
    { echo "$as_me:$LINENO: checking for NSIS" >&5
echo $ECHO_N "checking for NSIS... $ECHO_C" >&6; }
    # Extract the first word of "nsis.exe", so it can be a program name with args.
set dummy nsis.exe; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path_NSIS_PATH+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $NSIS_PATH in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_NSIS_PATH="$NSIS_PATH" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_NSIS_PATH="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
NSIS_PATH=$ac_cv_path_NSIS_PATH
if test -n "$NSIS_PATH"; then
  { echo "$as_me:$LINENO: result: $NSIS_PATH" >&5
echo "${ECHO_T}$NSIS_PATH" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


    if test -n "$NSIS_PATH"; then
        NSIS_PATH=`dirname "$NSIS_PATH"`
    fi
    if test -e "$with_nsis_path/nsis.exe"; then
        NSIS_PATH="$with_nsis_path"
    fi
    nsistest=`./oowintool --nsis-dir`;
    if test -x "$nsistest/nsis.exe"; then
        NSIS_PATH="$nsistest"
    fi
    if test -z "$NSIS_PATH"; then
        { echo "$as_me:$LINENO: WARNING: NSIS not found, no self contained installer will be build." >&5
echo "$as_me: WARNING: NSIS not found, no self contained installer will be build." >&2;}
        echo "NSIS not found, no self contained installer will be build." >> warn
    else
        NSIS_PATH=`cygpath -d "$NSIS_PATH"`
        NSIS_PATH=`cygpath -u "$NSIS_PATH"`
        { echo "$as_me:$LINENO: result: found ($NSIS_PATH)" >&5
echo "${ECHO_T}found ($NSIS_PATH)" >&6; }
    fi
fi


if test "$_os" = "WINNT" -a -n "$with_extra_dotnet_files" ; then
	{ echo "$as_me:$LINENO: checking extra .net include/library files" >&5
echo $ECHO_N "checking extra .net include/library files... $ECHO_C" >&6; }
	if test -d "$with_extra_dotnet_files"; then
		{ echo "$as_me:$LINENO: result: directory found" >&5
echo "${ECHO_T}directory found" >&6; }
        EXTRA_DOTNET_FILES="$with_extra_dotnet_files"
    else
		{ { echo "$as_me:$LINENO: error: invalid directory, please check." >&5
echo "$as_me: error: invalid directory, please check." >&2;}
   { (exit 1); exit 1; }; }
    fi
else
    EXTRA_DOTNET_FILES=""
fi


# Extract the first word of "bison", so it can be a program name with args.
set dummy bison; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path_BISON+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $BISON in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
BISON=$ac_cv_path_BISON
if test -n "$BISON"; then
  { echo "$as_me:$LINENO: result: $BISON" >&5
echo "${ECHO_T}$BISON" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


if test -z "$BISON"; then
   { { echo "$as_me:$LINENO: error: no bison found in \$PATH, install bison" >&5
echo "$as_me: error: no bison found in \$PATH, install bison" >&2;}
   { (exit 1); exit 1; }; }
else
   { echo "$as_me:$LINENO: checking the bison version" >&5
echo $ECHO_N "checking the bison version... $ECHO_C" >&6; }
   _bison_version=`$BISON --version | grep GNU | $SED -e 's@^[^0-9]*@@' -e 's@ .*@@' -e 's@,.*@@'`;
    _bison_longver=`echo $_bison_version | $AWK -F. '{ print \$1*1000+\$2}'`
    # Accept newer than 1.875 or older(equal) than 1.75
    if test "$_bison_longver" -ge 1875 -o "$_bison_longver" -le 1075; then
       if test "$_bison_version" = "1.875" ; then
          { echo "$as_me:$LINENO: WARNING: suspect ($BISON $_bison_version)" >&5
echo "$as_me: WARNING: suspect ($BISON $_bison_version)" >&2;}
          echo "Suspect ($BISON $_bison_version) suggest upgrade" >> warn
       else
          { echo "$as_me:$LINENO: result: checked ($BISON $_bison_version)" >&5
echo "${ECHO_T}checked ($BISON $_bison_version)" >&6; }
       fi
    else
       { { echo "$as_me:$LINENO: error: failed ($BISON $_bison_version need 1.875+ (or 1.75 and older))" >&5
echo "$as_me: error: failed ($BISON $_bison_version need 1.875+ (or 1.75 and older))" >&2;}
   { (exit 1); exit 1; }; }
    fi
fi
# Extract the first word of "flex", so it can be a program name with args.
set dummy flex; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path_FLEX+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $FLEX in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_FLEX="$FLEX" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_FLEX="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
FLEX=$ac_cv_path_FLEX
if test -n "$FLEX"; then
  { echo "$as_me:$LINENO: result: $FLEX" >&5
echo "${ECHO_T}$FLEX" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


if test -z "$FLEX"; then
   { { echo "$as_me:$LINENO: error: no flex found in \$PATH, install flex" >&5
echo "$as_me: error: no flex found in \$PATH, install flex" >&2;}
   { (exit 1); exit 1; }; }
fi
# Extract the first word of "patch", so it can be a program name with args.
set dummy patch; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path_PATCH+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $PATCH in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
PATCH=$ac_cv_path_PATCH
if test -n "$PATCH"; then
  { echo "$as_me:$LINENO: result: $PATCH" >&5
echo "${ECHO_T}$PATCH" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


if test -z "$PATCH"; then
   { { echo "$as_me:$LINENO: error: \\"patch\\" not found in \$PATH, install the development tool named\\"patch\"\" >&5
echo "$as_me: error: \\"patch\\" not found in \$PATH, install the development tool named\\"patch\"\" >&2;}
   { (exit 1); exit 1; }; }
fi

if test "$_os" = "SunOS" -o "$_os" = "FreeBSD" -o "$_os" = "Darwin"; then
   if test -z "$with_gnu_patch"; then
      GNUPATCH=$PATCH
   else
      if test -x "$with_gnu_patch"; then
	GNUPATCH=$with_gnu_patch
      else
        { { echo "$as_me:$LINENO: error: --with-gnu-patch did not point to an executable" >&5
echo "$as_me: error: --with-gnu-patch did not point to an executable" >&2;}
   { (exit 1); exit 1; }; }
      fi
   fi

   { echo "$as_me:$LINENO: checking whether $GNUPATCH is GNU patch" >&5
echo $ECHO_N "checking whether $GNUPATCH is GNU patch... $ECHO_C" >&6; }
   if $GNUPATCH --version | grep "Free Software Foundation" >/dev/null 2>/dev/null; then
	{ echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
   else
  	{ { echo "$as_me:$LINENO: error: no, GNU patch needed. install or specify with --with-gnu-patch=/path/to/it" >&5
echo "$as_me: error: no, GNU patch needed. install or specify with --with-gnu-patch=/path/to/it" >&2;}
   { (exit 1); exit 1; }; }
   fi


  if test -z "$with_gnu_cp"; then
    GNUCP=gnucp
  else
    if test -x "$with_gnu_cp"; then
      GNUCP=$with_gnu_cp
    else
      { { echo "$as_me:$LINENO: error: --with-gnu-cp did not point to an executable" >&5
echo "$as_me: error: --with-gnu-cp did not point to an executable" >&2;}
   { (exit 1); exit 1; }; }
    fi
  fi

  { echo "$as_me:$LINENO: checking whether $GNUCP is GNU cp" >&5
echo $ECHO_N "checking whether $GNUCP is GNU cp... $ECHO_C" >&6; }
  if $GNUCP --version | grep "Free Software Foundation" >/dev/null 2>/dev/null; then
	{ echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
  else
   if $GNUCP --version | grep "GNU fileutils" >/dev/null 2>/dev/null; then
	{ echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
   else
  	{ { echo "$as_me:$LINENO: error: no, GNU cp needed. install or specify with --with-gnu-cp=/path/to/it" >&5
echo "$as_me: error: no, GNU cp needed. install or specify with --with-gnu-cp=/path/to/it" >&2;}
   { (exit 1); exit 1; }; }
   fi
  fi

fi



if test "$_os" = "WINNT"; then
    CYGWIN_PATH=""
    # Extract the first word of "bash", so it can be a program name with args.
set dummy bash; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path_CYGWIN_PATH+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $CYGWIN_PATH in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_CYGWIN_PATH="$CYGWIN_PATH" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_CYGWIN_PATH="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
CYGWIN_PATH=$ac_cv_path_CYGWIN_PATH
if test -n "$CYGWIN_PATH"; then
  { echo "$as_me:$LINENO: result: $CYGWIN_PATH" >&5
echo "${ECHO_T}$CYGWIN_PATH" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


    CYGWIN_PATH=`dirname "$CYGWIN_PATH"`
fi
if test -z "$CYGWIN_PATH"; then
   CYGWIN_PATH="NO_CYGWIN"
fi


if test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then
  { echo "$as_me:$LINENO: checking ml.exe assembler path" >&5
echo $ECHO_N "checking ml.exe assembler path... $ECHO_C" >&6; }
  if test ! -x "$with_asm_home/ml.exe"; then
    # Extract the first word of "ml.exe", so it can be a program name with args.
set dummy ml.exe; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path_ML_EXE+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $ML_EXE in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ML_EXE="$ML_EXE" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_ML_EXE="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
ML_EXE=$ac_cv_path_ML_EXE
if test -n "$ML_EXE"; then
  { echo "$as_me:$LINENO: result: $ML_EXE" >&5
echo "${ECHO_T}$ML_EXE" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


    if test -z "$ML_EXE"; then
      if test -x "$with_cl_home/bin/ml.exe"; then
        with_asm_home=$with_cl_home/bin
        { echo "$as_me:$LINENO: result: found ($with_asm_home)" >&5
echo "${ECHO_T}found ($with_asm_home)" >&6; }
      else
        { { echo "$as_me:$LINENO: error: Configure did not find ml.exe assembler." >&5
echo "$as_me: error: Configure did not find ml.exe assembler." >&2;}
   { (exit 1); exit 1; }; }
      fi
    else
       with_asm_home="ASM_IN_PATH"
    fi
  fi
else
	with_asm_home="NO_ASM_HOME"
fi
ASM_HOME="$with_asm_home"
if test -z "$ASM_HOME"; then
  { echo "$as_me:$LINENO: result: $ASM_HOME" >&5
echo "${ECHO_T}$ASM_HOME" >&6; }
fi


if test -z "$with_zip_home"; then
	with_zip_home="$with_unzip_home"
fi
if test -n "$with_zip_home" ; then
	 ZIP="$with_zip_home/zip"
    UNZIP="$with_unzip_home/unzip"
    ZIP_HOME="$with_zip_home"
else
    # Extract the first word of "zip", so it can be a program name with args.
set dummy zip; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path_ZIP+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $ZIP in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
ZIP=$ac_cv_path_ZIP
if test -n "$ZIP"; then
  { echo "$as_me:$LINENO: result: $ZIP" >&5
echo "${ECHO_T}$ZIP" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


    # Extract the first word of "unzip", so it can be a program name with args.
set dummy unzip; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path_UNZIP+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $UNZIP in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
UNZIP=$ac_cv_path_UNZIP
if test -n "$UNZIP"; then
  { echo "$as_me:$LINENO: result: $UNZIP" >&5
echo "${ECHO_T}$UNZIP" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


    ZIP_HOME=`dirname "$ZIP"`
fi
if test -z "$ZIP" -o -z "$UNZIP"; then
    { { echo "$as_me:$LINENO: error: Zip/Unzip are required to build, please install or use --with-zip-home" >&5
echo "$as_me: error: Zip/Unzip are required to build, please install or use --with-zip-home" >&2;}
   { (exit 1); exit 1; }; }
fi

if test "$_os" = "WINNT"; then
    if test "$with_use_shell" = "4nt" ; then
         if test -z "`$ZIP -h | grep -i WinNT`" ; then
{ { echo "$as_me:$LINENO: error: $ZIP found in the path is not the required native Windows Version 2.3 of Info-ZIPs zip.exe.
Probably there is a cygwin version in the path." >&5
echo "$as_me: error: $ZIP found in the path is not the required native Windows Version 2.3 of Info-ZIPs zip.exe.
Probably there is a cygwin version in the path." >&2;}
   { (exit 1); exit 1; }; }
         fi
    else
         if test -n "`$ZIP -h | grep -i WinNT`" ; then
{ { echo "$as_me:$LINENO: error: $ZIP found in the path is not the required cygwin version of Info-ZIPs zip.exe." >&5
echo "$as_me: error: $ZIP found in the path is not the required cygwin version of Info-ZIPs zip.exe." >&2;}
   { (exit 1); exit 1; }; }
         fi
    fi
fi


if test "$_os" = "WINNT"; then
   { echo "$as_me:$LINENO: checking for unicows.dll" >&5
echo $ECHO_N "checking for unicows.dll... $ECHO_C" >&6; }
   if test -x ../external/unicows/unicows.dll; then
      { echo "$as_me:$LINENO: result: found" >&5
echo "${ECHO_T}found" >&6; }
   else
      { { echo "$as_me:$LINENO: error: The Microsoft Layer for Unicode (unicows.dll) is missing in external/unicows/.
Get it from the Microsoft site and put it into external/unicows.
(Note: Microsoft seems to enjoy changing the exact location of this file. You
may have to search Microsoft's website.) Last time it was seen at:
<http://download.microsoft.com/download/b/7/5/b75eace3-00e2-4aa0-9a6f-0b6882c71642/unicows.exe>." >&5
echo "$as_me: error: The Microsoft Layer for Unicode (unicows.dll) is missing in external/unicows/.
Get it from the Microsoft site and put it into external/unicows.
(Note: Microsoft seems to enjoy changing the exact location of this file. You
may have to search Microsoft's website.) Last time it was seen at:
<http://download.microsoft.com/download/b/7/5/b75eace3-00e2-4aa0-9a6f-0b6882c71642/unicows.exe>." >&2;}
   { (exit 1); exit 1; }; }
   fi
fi

if test "$_os" = "WINNT"; then
   { echo "$as_me:$LINENO: checking for dbghelp.dll" >&5
echo $ECHO_N "checking for dbghelp.dll... $ECHO_C" >&6; }
   if test -x ../external/dbghelp/dbghelp.dll; then
      { echo "$as_me:$LINENO: result: found" >&5
echo "${ECHO_T}found" >&6; }
   else
      { { echo "$as_me:$LINENO: error: dbghelp.dll is missing in external/dbghelp/.
Get it from the Microsoft site and put it into external/dbghelp.
(Note: Microsoft seems to enjoy changing the exact location of this file. You
may have to search Microsoft's website.) Last time it was seen at:
<http://www.microsoft.com/downloads/release.asp?releaseid=30682>." >&5
echo "$as_me: error: dbghelp.dll is missing in external/dbghelp/.
Get it from the Microsoft site and put it into external/dbghelp.
(Note: Microsoft seems to enjoy changing the exact location of this file. You
may have to search Microsoft's website.) Last time it was seen at:
<http://www.microsoft.com/downloads/release.asp?releaseid=30682>." >&2;}
   { (exit 1); exit 1; }; }
   fi
fi

if test "$_os" = "WINNT"; then
       ./oowintool --msvc-copy-dlls ../external/msvcp
fi

if test "$_os" = "WINNT"; then
   { echo "$as_me:$LINENO: checking for gdiplus.dll" >&5
echo $ECHO_N "checking for gdiplus.dll... $ECHO_C" >&6; }
   if test -x ../external/gdiplus/gdiplus.dll; then
      { echo "$as_me:$LINENO: result: found" >&5
echo "${ECHO_T}found" >&6; }
   else
      { { echo "$as_me:$LINENO: error: gdiplus.dll is missing in external/gdiplus/.
Get it from the Microsoft site and put it into external/gdiplus.
You may have to search Microsoft's website. Last time it was seen at:
<http://www.microsoft.com/downloads/details.aspx?familyid=6A63AB9C-DF12-4D41-933C-BE590FEAA05A&displaylang=en>." >&5
echo "$as_me: error: gdiplus.dll is missing in external/gdiplus/.
Get it from the Microsoft site and put it into external/gdiplus.
You may have to search Microsoft's website. Last time it was seen at:
<http://www.microsoft.com/downloads/details.aspx?familyid=6A63AB9C-DF12-4D41-933C-BE590FEAA05A&displaylang=en>." >&2;}
   { (exit 1); exit 1; }; }
   fi
fi

if test "$_os" = "WINNT" -a "$COMEX" = "8"; then
   { echo "$as_me:$LINENO: checking for msvcp70.dll/msvcr70.dll" >&5
echo $ECHO_N "checking for msvcp70.dll/msvcr70.dll... $ECHO_C" >&6; }
   if test -x ../external/msvcp70/msvcp70.dll -a -x ../external/msvcp70/msvcr70.dll; then
      { echo "$as_me:$LINENO: result: found" >&5
echo "${ECHO_T}found" >&6; }
   else
      MSVCPPATH=`/bin/find "$COMPATH/../.." -iname msvcp70.dll | head -n 1`
      MSVCRPATH=`/bin/find "$COMPATH/../.." -iname msvcr70.dll | head -n 1`
      if test -n "$MSVCPPATH" -a -n "$MSVCRPATH"; then
         cp "$MSVCPPATH" ../external/msvcp70/ && chmod +x ../external/msvcp70/msvcp70.dll && MSVCPCOPY="OK"
         cp "$MSVCRPATH" ../external/msvcp70/ && chmod +x ../external/msvcp70/msvcr70.dll && MSVCRCOPY="OK"
      fi
      if test -z "$MSVCPCOPY" -o -z "$MSVCRCOPY"; then
         { { echo "$as_me:$LINENO: error: msvcp70.dll and/or msvcr70.dll are/is missing in the default location.
These dlls are part of the .NET installation and should be found in a directory
similar to:
\"c:\\Program Files\\Microsoft Visual Studio .NET\\Visual C++ .NET Professional - English\\\"
As the automatic detection fails please copy the files to external/msvcp70/." >&5
echo "$as_me: error: msvcp70.dll and/or msvcr70.dll are/is missing in the default location.
These dlls are part of the .NET installation and should be found in a directory
similar to:
\"c:\\Program Files\\Microsoft Visual Studio .NET\\Visual C++ .NET Professional - English\\\"
As the automatic detection fails please copy the files to external/msvcp70/." >&2;}
   { (exit 1); exit 1; }; }
      else
         { echo "$as_me:$LINENO: result: found and copied" >&5
echo "${ECHO_T}found and copied" >&6; }
      fi
   fi
fi

if test "$_os" = "WINNT" -a "$COMEX" = "10"; then
   { echo "$as_me:$LINENO: checking for msvcp71.dll/msvcr71.dll" >&5
echo $ECHO_N "checking for msvcp71.dll/msvcr71.dll... $ECHO_C" >&6; }
   if test -x ../external/msvcp71/msvcp71.dll -a -x ../external/msvcp71/msvcr71.dll; then
      { echo "$as_me:$LINENO: result: found" >&5
echo "${ECHO_T}found" >&6; }
   else
      MSVCPPATH=`/bin/find "$COMPATH/../.." -iname msvcp71.dll | head -n 1`
      MSVCRPATH=`/bin/find "$COMPATH/../.." -iname msvcr71.dll | head -n 1`
      if test -n "$MSVCPPATH" -a -n "$MSVCRPATH"; then
         cp "$MSVCPPATH" ../external/msvcp71/ && chmod +x ../external/msvcp71/msvcp71.dll && MSVCPCOPY="OK"
         cp "$MSVCRPATH" ../external/msvcp71/ && chmod +x ../external/msvcp71/msvcr71.dll && MSVCRCOPY="OK"
      fi
      if test -z "$MSVCPCOPY" -o -z "$MSVCRCOPY"; then
         { { echo "$as_me:$LINENO: error: msvcp71.dll and/or msvcr71.dll are/is missing in the default location.
These dlls are part of the .NET installation and should be found in a directory
similar to:
\"c:\\Program Files\\Microsoft Visual Studio .NET 2003\\Visual C++ .NET Professional - English\\\"
As the automatic detection fails please copy the files to external/msvcp71/." >&5
echo "$as_me: error: msvcp71.dll and/or msvcr71.dll are/is missing in the default location.
These dlls are part of the .NET installation and should be found in a directory
similar to:
\"c:\\Program Files\\Microsoft Visual Studio .NET 2003\\Visual C++ .NET Professional - English\\\"
As the automatic detection fails please copy the files to external/msvcp71/." >&2;}
   { (exit 1); exit 1; }; }
      else
         { echo "$as_me:$LINENO: result: found and copied" >&5
echo "${ECHO_T}found and copied" >&6; }
      fi
   fi
fi

if test "$_os" = "WINNT"; then
       ./oowintool --msvc-copy-instmsi ../external/msi
fi

if test "$_os" = "WINNT" -a "$COMEX" = "10"; then
   { echo "$as_me:$LINENO: checking for instmsia.exe/instmsiw.exe" >&5
echo $ECHO_N "checking for instmsia.exe/instmsiw.exe... $ECHO_C" >&6; }
   if test -x ../external/msi/instmsia.exe -a -x ../external/msi/instmsiw.exe; then
      { echo "$as_me:$LINENO: result: found" >&5
echo "${ECHO_T}found" >&6; }
   else
      MSIAPATH=`/bin/find "$COMPATH/../.." -iname instmsia.exe | head -n 1`
      MSIWPATH=`/bin/find "$COMPATH/../.." -iname instmsiw.exe | head -n 1`
      if test -n "$MSIAPATH" -a -n "$MSIWPATH"; then
         cp "$MSIAPATH" ../external/msi/ && chmod +x ../external/msi/instmsia.exe && MSIACOPY="OK"
         cp "$MSIWPATH" ../external/msi/ && chmod +x ../external/msi/instmsiw.exe && MSIWCOPY="OK"
      fi
      if test -z "$MSIACOPY" -o -z "$MSIWCOPY"; then
         { { echo "$as_me:$LINENO: error: instmsia.exe and/or instmsiw.exe are/is missing in the default location.
These programs are part of the .NET installation and should be found in a
directory similar to:
\"c:\\Program Files\\Microsoft Visual Studio .NET 2003\\Common7\\Tools\\Deployment\\MsiRedist\\\"
As the automatic detection fails please copy the files to external/msi/." >&5
echo "$as_me: error: instmsia.exe and/or instmsiw.exe are/is missing in the default location.
These programs are part of the .NET installation and should be found in a
directory similar to:
\"c:\\Program Files\\Microsoft Visual Studio .NET 2003\\Common7\\Tools\\Deployment\\MsiRedist\\\"
As the automatic detection fails please copy the files to external/msi/." >&2;}
   { (exit 1); exit 1; }; }
      else
         { echo "$as_me:$LINENO: result: found and copied" >&5
echo "${ECHO_T}found and copied" >&6; }
      fi
   fi
fi

{ echo "$as_me:$LINENO: checking which polygon clipping code to use" >&5
echo $ECHO_N "checking which polygon clipping code to use... $ECHO_C" >&6; }
WITH_GPC=NO

if test "$with_gpc" != "no" && test "$without_gpc" != "yes"; then
  WITH_GPC=YES
  { echo "$as_me:$LINENO: result: GPC" >&5
echo "${ECHO_T}GPC" >&6; }

  { echo "$as_me:$LINENO: checking for GPC files" >&5
echo $ECHO_N "checking for GPC files... $ECHO_C" >&6; }
  if test -f ../external/gpc/gpc.h; then
	HAVE_GPC_H="yes"
  else
	HAVE_GPC_H="no"
  fi
  if test -f ../external/gpc/gpc.c; then
	HAVE_GPC_C="yes"
  else
	HAVE_GPC_C="no"
  fi

  if test "$HAVE_GPC_H" = "yes" -a "$HAVE_GPC_C" = "yes"; then
	{ echo "$as_me:$LINENO: result: GPC files found" >&5
echo "${ECHO_T}GPC files found" >&6; }
  else
	{ { echo "$as_me:$LINENO: error: GPC files not found
ftp://ftp.cs.man.ac.uk/pub/toby/gpc/gpc231.tar.Z and untar in external/gpc,
or use basegfx' implementation using --without-gpc" >&5
echo "$as_me: error: GPC files not found
ftp://ftp.cs.man.ac.uk/pub/toby/gpc/gpc231.tar.Z and untar in external/gpc,
or use basegfx' implementation using --without-gpc" >&2;}
   { (exit 1); exit 1; }; }
  fi
else
  { echo "$as_me:$LINENO: result: internal" >&5
echo "${ECHO_T}internal" >&6; }
fi


{ echo "$as_me:$LINENO: checking which VCLplugs shall be built" >&5
echo $ECHO_N "checking which VCLplugs shall be built... $ECHO_C" >&6; }
ENABLE_GTK=""
if test "x$enable_gtk" = "xyes"; then
    ENABLE_GTK="TRUE"
    R="gtk"
fi


ENABLE_KDE=""
if test "x$enable_kde" = "xyes"; then
    ENABLE_KDE="TRUE"
    R="$R kde"
fi


if test -z "$R"; then
	{ echo "$as_me:$LINENO: result: none" >&5
echo "${ECHO_T}none" >&6; }
else
	{ echo "$as_me:$LINENO: result: $R" >&5
echo "${ECHO_T}$R" >&6; }
fi


ENABLE_GNOMEVFS=""
{ echo "$as_me:$LINENO: checking whether to enable GNOME VFS support" >&5
echo $ECHO_N "checking whether to enable GNOME VFS support... $ECHO_C" >&6; }
if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_gnome_vfs" = "yes"; then
    ENABLE_GNOMEVFS="TRUE"
    { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }

  succeeded=no

  if test -z "$PKG_CONFIG"; then
    # Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $PKG_CONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
  ;;
esac
fi
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
if test -n "$PKG_CONFIG"; then
  { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
echo "${ECHO_T}$PKG_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  fi

  if test "$PKG_CONFIG" = "no" ; then
     echo "*** The pkg-config script could not be found. Make sure it is"
     echo "*** in your path, or set the PKG_CONFIG environment variable"
     echo "*** to the full path to pkg-config."
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
  else
     PKG_CONFIG_MIN_VERSION=0.9.0
     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
        { echo "$as_me:$LINENO: checking for gnome-vfs-2.0 >= 2.6.0 " >&5
echo $ECHO_N "checking for gnome-vfs-2.0 >= 2.6.0 ... $ECHO_C" >&6; }

        if $PKG_CONFIG --exists "gnome-vfs-2.0 >= 2.6.0 " ; then
            { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
            succeeded=yes

            { echo "$as_me:$LINENO: checking GNOMEVFS_CFLAGS" >&5
echo $ECHO_N "checking GNOMEVFS_CFLAGS... $ECHO_C" >&6; }
            GNOMEVFS_CFLAGS=`$PKG_CONFIG --cflags "gnome-vfs-2.0 >= 2.6.0 "`
            { echo "$as_me:$LINENO: result: $GNOMEVFS_CFLAGS" >&5
echo "${ECHO_T}$GNOMEVFS_CFLAGS" >&6; }

            { echo "$as_me:$LINENO: checking GNOMEVFS_LIBS" >&5
echo $ECHO_N "checking GNOMEVFS_LIBS... $ECHO_C" >&6; }
            GNOMEVFS_LIBS=`$PKG_CONFIG --libs "gnome-vfs-2.0 >= 2.6.0 "`
            { echo "$as_me:$LINENO: result: $GNOMEVFS_LIBS" >&5
echo "${ECHO_T}$GNOMEVFS_LIBS" >&6; }
        else
            GNOMEVFS_CFLAGS=""
            GNOMEVFS_LIBS=""
            ## If we have a custom action on failure, don't print errors, but
            ## do set a variable so people can do so.
            GNOMEVFS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gnome-vfs-2.0 >= 2.6.0 "`
            echo $GNOMEVFS_PKG_ERRORS
        fi



     else
        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
        echo "*** See http://www.freedesktop.org/software/pkgconfig"
     fi
  fi

  if test $succeeded = yes; then
     :
  else
     { { echo "$as_me:$LINENO: error: Library requirements (gnome-vfs-2.0 >= 2.6.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5
echo "$as_me: error: Library requirements (gnome-vfs-2.0 >= 2.6.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;}
   { (exit 1); exit 1; }; }
  fi


  succeeded=no

  if test -z "$PKG_CONFIG"; then
    # Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $PKG_CONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
  ;;
esac
fi
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
if test -n "$PKG_CONFIG"; then
  { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
echo "${ECHO_T}$PKG_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  fi

  if test "$PKG_CONFIG" = "no" ; then
     echo "*** The pkg-config script could not be found. Make sure it is"
     echo "*** in your path, or set the PKG_CONFIG environment variable"
     echo "*** to the full path to pkg-config."
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
  else
     PKG_CONFIG_MIN_VERSION=0.9.0
     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
        { echo "$as_me:$LINENO: checking for gconf-2.0 " >&5
echo $ECHO_N "checking for gconf-2.0 ... $ECHO_C" >&6; }

        if $PKG_CONFIG --exists "gconf-2.0 " ; then
            { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
            succeeded=yes

            { echo "$as_me:$LINENO: checking GCONF_CFLAGS" >&5
echo $ECHO_N "checking GCONF_CFLAGS... $ECHO_C" >&6; }
            GCONF_CFLAGS=`$PKG_CONFIG --cflags "gconf-2.0 "`
            { echo "$as_me:$LINENO: result: $GCONF_CFLAGS" >&5
echo "${ECHO_T}$GCONF_CFLAGS" >&6; }

            { echo "$as_me:$LINENO: checking GCONF_LIBS" >&5
echo $ECHO_N "checking GCONF_LIBS... $ECHO_C" >&6; }
            GCONF_LIBS=`$PKG_CONFIG --libs "gconf-2.0 "`
            { echo "$as_me:$LINENO: result: $GCONF_LIBS" >&5
echo "${ECHO_T}$GCONF_LIBS" >&6; }
        else
            GCONF_CFLAGS=""
            GCONF_LIBS=""
            ## If we have a custom action on failure, don't print errors, but
            ## do set a variable so people can do so.
            GCONF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gconf-2.0 "`
            echo $GCONF_PKG_ERRORS
        fi



     else
        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
        echo "*** See http://www.freedesktop.org/software/pkgconfig"
     fi
  fi

  if test $succeeded = yes; then
     :
  else
     { { echo "$as_me:$LINENO: error: Library requirements (gconf-2.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5
echo "$as_me: error: Library requirements (gconf-2.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;}
   { (exit 1); exit 1; }; }
  fi

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



GTK_CFLAGS=""
GTK_LIBS=""
if test  "$test_gtk" = "yes"; then

    if test "$ENABLE_GTK" = "TRUE" ; then

  succeeded=no

  if test -z "$PKG_CONFIG"; then
    # Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $PKG_CONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
  ;;
esac
fi
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
if test -n "$PKG_CONFIG"; then
  { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
echo "${ECHO_T}$PKG_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  fi

  if test "$PKG_CONFIG" = "no" ; then
     echo "*** The pkg-config script could not be found. Make sure it is"
     echo "*** in your path, or set the PKG_CONFIG environment variable"
     echo "*** to the full path to pkg-config."
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
  else
     PKG_CONFIG_MIN_VERSION=0.9.0
     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
        { echo "$as_me:$LINENO: checking for gtk+-2.0 >= 2.4" >&5
echo $ECHO_N "checking for gtk+-2.0 >= 2.4... $ECHO_C" >&6; }

        if $PKG_CONFIG --exists "gtk+-2.0 >= 2.4" ; then
            { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
            succeeded=yes

            { echo "$as_me:$LINENO: checking GTK_CFLAGS" >&5
echo $ECHO_N "checking GTK_CFLAGS... $ECHO_C" >&6; }
            GTK_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0 >= 2.4"`
            { echo "$as_me:$LINENO: result: $GTK_CFLAGS" >&5
echo "${ECHO_T}$GTK_CFLAGS" >&6; }

            { echo "$as_me:$LINENO: checking GTK_LIBS" >&5
echo $ECHO_N "checking GTK_LIBS... $ECHO_C" >&6; }
            GTK_LIBS=`$PKG_CONFIG --libs "gtk+-2.0 >= 2.4"`
            { echo "$as_me:$LINENO: result: $GTK_LIBS" >&5
echo "${ECHO_T}$GTK_LIBS" >&6; }
        else
            GTK_CFLAGS=""
            GTK_LIBS=""
            ## If we have a custom action on failure, don't print errors, but
            ## do set a variable so people can do so.
            GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtk+-2.0 >= 2.4"`
            echo $GTK_PKG_ERRORS
        fi



     else
        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
        echo "*** See http://www.freedesktop.org/software/pkgconfig"
     fi
  fi

  if test $succeeded = yes; then
     :
  else
     { { echo "$as_me:$LINENO: error: Library requirements (gtk+-2.0 >= 2.4) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5
echo "$as_me: error: Library requirements (gtk+-2.0 >= 2.4) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;}
   { (exit 1); exit 1; }; }
  fi


  succeeded=no

  if test -z "$PKG_CONFIG"; then
    # Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $PKG_CONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
  ;;
esac
fi
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
if test -n "$PKG_CONFIG"; then
  { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
echo "${ECHO_T}$PKG_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  fi

  if test "$PKG_CONFIG" = "no" ; then
     echo "*** The pkg-config script could not be found. Make sure it is"
     echo "*** in your path, or set the PKG_CONFIG environment variable"
     echo "*** to the full path to pkg-config."
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
  else
     PKG_CONFIG_MIN_VERSION=0.9.0
     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
        { echo "$as_me:$LINENO: checking for gdk-pixbuf-xlib-2.0 >= 2.2" >&5
echo $ECHO_N "checking for gdk-pixbuf-xlib-2.0 >= 2.2... $ECHO_C" >&6; }

        if $PKG_CONFIG --exists "gdk-pixbuf-xlib-2.0 >= 2.2" ; then
            { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
            succeeded=yes

            { echo "$as_me:$LINENO: checking GDKPIXBUF_CFLAGS" >&5
echo $ECHO_N "checking GDKPIXBUF_CFLAGS... $ECHO_C" >&6; }
            GDKPIXBUF_CFLAGS=`$PKG_CONFIG --cflags "gdk-pixbuf-xlib-2.0 >= 2.2"`
            { echo "$as_me:$LINENO: result: $GDKPIXBUF_CFLAGS" >&5
echo "${ECHO_T}$GDKPIXBUF_CFLAGS" >&6; }

            { echo "$as_me:$LINENO: checking GDKPIXBUF_LIBS" >&5
echo $ECHO_N "checking GDKPIXBUF_LIBS... $ECHO_C" >&6; }
            GDKPIXBUF_LIBS=`$PKG_CONFIG --libs "gdk-pixbuf-xlib-2.0 >= 2.2"`
            { echo "$as_me:$LINENO: result: $GDKPIXBUF_LIBS" >&5
echo "${ECHO_T}$GDKPIXBUF_LIBS" >&6; }
        else
            GDKPIXBUF_CFLAGS=""
            GDKPIXBUF_LIBS=""
            ## If we have a custom action on failure, don't print errors, but
            ## do set a variable so people can do so.
            GDKPIXBUF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gdk-pixbuf-xlib-2.0 >= 2.2"`
            echo $GDKPIXBUF_PKG_ERRORS
        fi



     else
        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
        echo "*** See http://www.freedesktop.org/software/pkgconfig"
     fi
  fi

  if test $succeeded = yes; then
     :
  else
     { { echo "$as_me:$LINENO: error: Library requirements (gdk-pixbuf-xlib-2.0 >= 2.2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5
echo "$as_me: error: Library requirements (gdk-pixbuf-xlib-2.0 >= 2.2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;}
   { (exit 1); exit 1; }; }
  fi

        GTK_CFLAGS="$GTK_CFLAGS $GDKPIXBUF_CFLAGS"
        GTK_LIBS="$GTK_LIBS $GDKPIXBUF_LIBS"
    fi

fi




ENABLE_CAIRO=""

if test  "$build_cairo" = "yes"; then

    { echo "$as_me:$LINENO: checking whether to enable the Cairo canvas backend" >&5
echo $ECHO_N "checking whether to enable the Cairo canvas backend... $ECHO_C" >&6; }
    if test "x$enable_cairo" != "xno" ; then
        ENABLE_CAIRO="TRUE"
	     SYSTEM_CAIRO=YES
	     { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }

  succeeded=no

  if test -z "$PKG_CONFIG"; then
    # Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $PKG_CONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
  ;;
esac
fi
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
if test -n "$PKG_CONFIG"; then
  { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
echo "${ECHO_T}$PKG_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  fi

  if test "$PKG_CONFIG" = "no" ; then
     echo "*** The pkg-config script could not be found. Make sure it is"
     echo "*** in your path, or set the PKG_CONFIG environment variable"
     echo "*** to the full path to pkg-config."
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
  else
     PKG_CONFIG_MIN_VERSION=0.9.0
     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
        { echo "$as_me:$LINENO: checking for cairo >= 1.0.2 " >&5
echo $ECHO_N "checking for cairo >= 1.0.2 ... $ECHO_C" >&6; }

        if $PKG_CONFIG --exists "cairo >= 1.0.2 " ; then
            { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
            succeeded=yes

            { echo "$as_me:$LINENO: checking CAIRO_CFLAGS" >&5
echo $ECHO_N "checking CAIRO_CFLAGS... $ECHO_C" >&6; }
            CAIRO_CFLAGS=`$PKG_CONFIG --cflags "cairo >= 1.0.2 "`
            { echo "$as_me:$LINENO: result: $CAIRO_CFLAGS" >&5
echo "${ECHO_T}$CAIRO_CFLAGS" >&6; }

            { echo "$as_me:$LINENO: checking CAIRO_LIBS" >&5
echo $ECHO_N "checking CAIRO_LIBS... $ECHO_C" >&6; }
            CAIRO_LIBS=`$PKG_CONFIG --libs "cairo >= 1.0.2 "`
            { echo "$as_me:$LINENO: result: $CAIRO_LIBS" >&5
echo "${ECHO_T}$CAIRO_LIBS" >&6; }
        else
            CAIRO_CFLAGS=""
            CAIRO_LIBS=""
            ## If we have a custom action on failure, don't print errors, but
            ## do set a variable so people can do so.
            CAIRO_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "cairo >= 1.0.2 "`
            echo $CAIRO_PKG_ERRORS
        fi



     else
        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
        echo "*** See http://www.freedesktop.org/software/pkgconfig"
     fi
  fi

  if test $succeeded = yes; then
     :
  else
     { { echo "$as_me:$LINENO: error: Library requirements (cairo >= 1.0.2 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5
echo "$as_me: error: Library requirements (cairo >= 1.0.2 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;}
   { (exit 1); exit 1; }; }
  fi

        if test "$with_system_xrender_headers" = "yes"; then
            { echo "$as_me:$LINENO: checking whether Xrender.h defines PictStandardA8" >&5
echo $ECHO_N "checking whether Xrender.h defines PictStandardA8... $ECHO_C" >&6; }
            if test "$cross_compiling" = yes; then
  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
See \`config.log' for more details." >&5
echo "$as_me: error: cannot run test program while cross compiling
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; }
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

#include <X11/extensions/Xrender.h>

int main(int argc, char **argv) {
#ifdef PictStandardA8
      return 0;
#else
      return 1;
#endif
}

_ACEOF
rm -f conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
{ { echo "$as_me:$LINENO: error: no, X headers too old." >&5
echo "$as_me: error: no, X headers too old." >&2;}
   { (exit 1); exit 1; }; }
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi


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







KDE_CFLAGS=""
KDE_LIBS=""
MOC="moc"
if test "$test_kde" = "yes" -a "$ENABLE_KDE" = "TRUE" ; then
        if test "$build_cpu" != "x86_64" ; then
        qt_incdirs="$QTINC /usr/local/qt/include /usr/include/qt /usr/include /usr/X11R6/include/X11/qt /usr/X11R6/include/qt /usr/lib/qt3/include /usr/lib/qt/include /usr/share/qt3/include $x_includes"
        qt_libdirs="$QTLIB /usr/local/qt/lib /usr/lib/qt /usr/lib /usr/X11R6/lib/X11/qt /usr/X11R6/lib/qt /usr/lib/qt3/lib /usr/lib/qt/lib /usr/share/qt3/lib $x_libraries"
    else
        qt_incdirs="$QTINC /usr/local/qt/include /usr/include/qt /usr/include /usr/X11R6/include/X11/qt /usr/X11R6/include/qt /usr/lib64/qt3/include /usr/lib64/qt/include /usr/share/qt3/include /usr/lib/qt3/include /usr/lib/qt/include $x_includes"
        qt_libdirs="$QTLIB /usr/local/qt/lib64 /usr/lib64/qt /usr/lib64 /usr/X11R6/lib64/X11/qt /usr/X11R6/lib64/qt /usr/lib64/qt3/lib64 /usr/lib64/qt/lib64 /usr/share/qt3/lib64 /usr/local/qt/lib /usr/lib/qt /usr/lib /usr/X11R6/lib/X11/qt /usr/X11R6/lib/qt /usr/lib/qt3/lib /usr/lib/qt/lib /usr/share/qt3/lib $x_libraries"
    fi
    if test -n "$QTDIR" ; then
        qt_incdirs="$QTDIR/include $qt_incdirs"
        if test "$build_cpu" != "x86_64" ; then
            qt_libdirs="$QTDIR/lib $qt_libdirs"
        else
            qt_libdirs="$QTDIR/lib64 $QTDIR/lib $qt_libdirs"
        fi
    fi
    if test "$build_cpu" != "x86_64" ; then
        kde_incdirs="/usr/lib/kde/include /usr/local/kde/include /usr/local/include /usr/kde/include /usr/include/kde /usr/include /opt/kde3/include /opt/kde/include $x_includes"
        kde_libdirs="/usr/lib/kde/lib /usr/local/kde/lib /usr/kde/lib /usr/lib/kde /usr/lib/kde3 /usr/lib /usr/X11R6/lib /usr/local/lib /opt/kde3/lib /opt/kde/lib /usr/X11R6/kde/lib $x_libraries"
    else
        kde_incdirs="/usr/lib64/kde/include /usr/lib/kde/include /usr/local/kde/include /usr/local/include /usr/kde/include /usr/include/kde /usr/include /opt/kde3/include /opt/kde/include $x_includes"
        kde_libdirs="/usr/lib64/kde/lib64 /usr/local/kde/lib64 /usr/kde/lib64 /usr/lib64/kde /usr/lib64/kde3 /usr/lib64 /usr/X11R6/lib64 /usr/local/lib64 /opt/kde3/lib64 /opt/kde/lib64 /usr/X11R6/kde/lib64 /usr/lib/kde/lib /usr/local/kde/lib /usr/kde/lib /usr/lib/kde /usr/lib/kde3 /usr/lib /usr/X11R6/lib /usr/local/lib /opt/kde3/lib /opt/kde/lib /usr/X11R6/kde/lib $x_libraries"
    fi
    if test -n "$KDEDIR" ; then
        kde_incdirs="$KDEDIR/include $kde_incdirs"
        if test "$build_cpu" != "x86_64" ; then
            kde_libdirs="$KDEDIR/lib $kde_libdirs"
        else
            kde_libdirs="$KDEDIR/lib64 $KDEDIR/lib $kde_libdirs"
        fi
    fi

        qt_test_include="qstyle.h"
    qt_test_library="libqt-mt.so"
    kde_test_include="ksharedptr.h"
    kde_test_library="libkdeui.la"

        { echo "$as_me:$LINENO: checking for Qt headers" >&5
echo $ECHO_N "checking for Qt headers... $ECHO_C" >&6; }
    qt_incdir="no"
    for kde_check in $qt_incdirs ; do
        if test -r "$kde_check/$qt_test_include" ; then
            qt_incdir="$kde_check"
            break
        fi
    done
    { echo "$as_me:$LINENO: result: $qt_incdir" >&5
echo "${ECHO_T}$qt_incdir" >&6; }
    if test "x$qt_incdir" = "xno" ; then
        { { echo "$as_me:$LINENO: error: Qt headers not found.  Please specify the root of
your Qt installation by exporting QTDIR before running \"configure\"." >&5
echo "$as_me: error: Qt headers not found.  Please specify the root of
your Qt installation by exporting QTDIR before running \"configure\"." >&2;}
   { (exit 1); exit 1; }; }
    fi

        { echo "$as_me:$LINENO: checking for Qt libraries" >&5
echo $ECHO_N "checking for Qt libraries... $ECHO_C" >&6; }
    qt_libdir="no"
    for qt_check in $qt_libdirs ; do
        if test -r "$qt_check/$qt_test_library" ; then
            qt_libdir="$qt_check"
            break
        fi
    done
    { echo "$as_me:$LINENO: result: $qt_libdir" >&5
echo "${ECHO_T}$qt_libdir" >&6; }
    if test "x$qt_libdir" = "xno" ; then
        { { echo "$as_me:$LINENO: error: Qt libraries not found.  Please specify the root of
your Qt installation by exporting QTDIR before running \"configure\"." >&5
echo "$as_me: error: Qt libraries not found.  Please specify the root of
your Qt installation by exporting QTDIR before running \"configure\"." >&2;}
   { (exit 1); exit 1; }; }
    fi

    # Extract the first word of "moc", so it can be a program name with args.
set dummy moc; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path_MOC+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $MOC in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_MOC="$MOC" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_dummy="$QTDIR/bin:$PATH "
for as_dir in $as_dummy
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_MOC="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  test -z "$ac_cv_path_MOC" && ac_cv_path_MOC="no"
  ;;
esac
fi
MOC=$ac_cv_path_MOC
if test -n "$MOC"; then
  { echo "$as_me:$LINENO: result: $MOC" >&5
echo "${ECHO_T}$MOC" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


    if test "$MOC" = "no" ; then
        { { echo "$as_me:$LINENO: error: Qt Meta Object Compiler not found.  Please specify
the root of your Qt installation by exporting QTDIR before running \"configure\"." >&5
echo "$as_me: error: Qt Meta Object Compiler not found.  Please specify
the root of your Qt installation by exporting QTDIR before running \"configure\"." >&2;}
   { (exit 1); exit 1; }; }
     fi

        { echo "$as_me:$LINENO: checking for KDE headers" >&5
echo $ECHO_N "checking for KDE headers... $ECHO_C" >&6; }
    kde_incdir="no"
    for kde_check in $kde_incdirs ; do
        if test -r "$kde_check/$kde_test_include" ; then
            kde_incdir="$kde_check"
            break
        fi
    done
    { echo "$as_me:$LINENO: result: $kde_incdir" >&5
echo "${ECHO_T}$kde_incdir" >&6; }
    if test "x$kde_incdir" = "xno" ; then
        { { echo "$as_me:$LINENO: error: KDE headers not found.  Please specify the root of
your KDE installation by exporting KDEDIR before running \"configure\"." >&5
echo "$as_me: error: KDE headers not found.  Please specify the root of
your KDE installation by exporting KDEDIR before running \"configure\"." >&2;}
   { (exit 1); exit 1; }; }
    fi

        { echo "$as_me:$LINENO: checking for KDE libraries" >&5
echo $ECHO_N "checking for KDE libraries... $ECHO_C" >&6; }
    kde_libdir="no"
    for kde_check in $kde_libdirs ; do
        if test -r "$kde_check/$kde_test_library" ; then
            kde_libdir="$kde_check"
            break
        fi
    done
    { echo "$as_me:$LINENO: result: $kde_libdir" >&5
echo "${ECHO_T}$kde_libdir" >&6; }
    if test "x$kde_libdir" = "xno" ; then
        { { echo "$as_me:$LINENO: error: KDE libraries not found.  Please specify the root of
your KDE installation by exporting KDEDIR before running \"configure\"." >&5
echo "$as_me: error: KDE libraries not found.  Please specify the root of
your KDE installation by exporting KDEDIR before running \"configure\"." >&2;}
   { (exit 1); exit 1; }; }
    fi

        KDE_CFLAGS="-I$qt_incdir -I$kde_incdir -DQT_CLEAN_NAMESPACE -DQT_THREAD_SUPPORT"
    KDE_LIBS="-L$kde_libdir -L$qt_libdir -lkdeui -lkdecore -lqt-mt"
fi




{ echo "$as_me:$LINENO: checking whether to enable the lockdown pieces" >&5
echo $ECHO_N "checking whether to enable the lockdown pieces... $ECHO_C" >&6; }
ENABLE_LOCKDOWN=""
if test -n "$enable_lockdown" && test "$enable_lockdown" != "no"; then
  ENABLE_LOCKDOWN=YES
  { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


{ echo "$as_me:$LINENO: checking whether to use libstartup-notification" >&5
echo $ECHO_N "checking whether to use libstartup-notification... $ECHO_C" >&6; }
WITH_LIBSN=NO
if test -n "$enable_libsn" && test "$enable_libsn" != "no"; then

  succeeded=no

  if test -z "$PKG_CONFIG"; then
    # Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $PKG_CONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
  ;;
esac
fi
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
if test -n "$PKG_CONFIG"; then
  { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
echo "${ECHO_T}$PKG_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  fi

  if test "$PKG_CONFIG" = "no" ; then
     echo "*** The pkg-config script could not be found. Make sure it is"
     echo "*** in your path, or set the PKG_CONFIG environment variable"
     echo "*** to the full path to pkg-config."
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
  else
     PKG_CONFIG_MIN_VERSION=0.9.0
     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
        { echo "$as_me:$LINENO: checking for libstartup-notification-1.0 >= 0.5 " >&5
echo $ECHO_N "checking for libstartup-notification-1.0 >= 0.5 ... $ECHO_C" >&6; }

        if $PKG_CONFIG --exists "libstartup-notification-1.0 >= 0.5 " ; then
            { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
            succeeded=yes

            { echo "$as_me:$LINENO: checking LIBSN_CFLAGS" >&5
echo $ECHO_N "checking LIBSN_CFLAGS... $ECHO_C" >&6; }
            LIBSN_CFLAGS=`$PKG_CONFIG --cflags "libstartup-notification-1.0 >= 0.5 "`
            { echo "$as_me:$LINENO: result: $LIBSN_CFLAGS" >&5
echo "${ECHO_T}$LIBSN_CFLAGS" >&6; }

            { echo "$as_me:$LINENO: checking LIBSN_LIBS" >&5
echo $ECHO_N "checking LIBSN_LIBS... $ECHO_C" >&6; }
            LIBSN_LIBS=`$PKG_CONFIG --libs "libstartup-notification-1.0 >= 0.5 "`
            { echo "$as_me:$LINENO: result: $LIBSN_LIBS" >&5
echo "${ECHO_T}$LIBSN_LIBS" >&6; }
        else
            LIBSN_CFLAGS=""
            LIBSN_LIBS=""
            ## If we have a custom action on failure, don't print errors, but
            ## do set a variable so people can do so.
            LIBSN_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libstartup-notification-1.0 >= 0.5 "`
            echo $LIBSN_PKG_ERRORS
        fi



     else
        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
        echo "*** See http://www.freedesktop.org/software/pkgconfig"
     fi
  fi

  if test $succeeded = yes; then
     :
  else
     { { echo "$as_me:$LINENO: error: Library requirements (libstartup-notification-1.0 >= 0.5 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5
echo "$as_me: error: Library requirements (libstartup-notification-1.0 >= 0.5 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;}
   { (exit 1); exit 1; }; }
  fi

  WITH_LIBSN=YES
  { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi




{ echo "$as_me:$LINENO: checking whether to enable evolution 2 support" >&5
echo $ECHO_N "checking whether to enable evolution 2 support... $ECHO_C" >&6; }
if test "$enable_evolution2" = "yes" -o "$enable_evolution2" = "TRUE"; then
   { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }

  succeeded=no

  if test -z "$PKG_CONFIG"; then
    # Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $PKG_CONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
  ;;
esac
fi
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
if test -n "$PKG_CONFIG"; then
  { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
echo "${ECHO_T}$PKG_CONFIG" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  fi

  if test "$PKG_CONFIG" = "no" ; then
     echo "*** The pkg-config script could not be found. Make sure it is"
     echo "*** in your path, or set the PKG_CONFIG environment variable"
     echo "*** to the full path to pkg-config."
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
  else
     PKG_CONFIG_MIN_VERSION=0.9.0
     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
        { echo "$as_me:$LINENO: checking for gobject-2.0" >&5
echo $ECHO_N "checking for gobject-2.0... $ECHO_C" >&6; }

        if $PKG_CONFIG --exists "gobject-2.0" ; then
            { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
            succeeded=yes

            { echo "$as_me:$LINENO: checking GOBJECT_CFLAGS" >&5
echo $ECHO_N "checking GOBJECT_CFLAGS... $ECHO_C" >&6; }
            GOBJECT_CFLAGS=`$PKG_CONFIG --cflags "gobject-2.0"`
            { echo "$as_me:$LINENO: result: $GOBJECT_CFLAGS" >&5
echo "${ECHO_T}$GOBJECT_CFLAGS" >&6; }

            { echo "$as_me:$LINENO: checking GOBJECT_LIBS" >&5
echo $ECHO_N "checking GOBJECT_LIBS... $ECHO_C" >&6; }
            GOBJECT_LIBS=`$PKG_CONFIG --libs "gobject-2.0"`
            { echo "$as_me:$LINENO: result: $GOBJECT_LIBS" >&5
echo "${ECHO_T}$GOBJECT_LIBS" >&6; }
        else
            GOBJECT_CFLAGS=""
            GOBJECT_LIBS=""
            ## If we have a custom action on failure, don't print errors, but
            ## do set a variable so people can do so.
            GOBJECT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gobject-2.0"`
            echo $GOBJECT_PKG_ERRORS
        fi



     else
        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
        echo "*** See http://www.freedesktop.org/software/pkgconfig"
     fi
  fi

  if test $succeeded = yes; then
     :
  else
     { { echo "$as_me:$LINENO: error: Library requirements (gobject-2.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5
echo "$as_me: error: Library requirements (gobject-2.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;}
   { (exit 1); exit 1; }; }
  fi

   ENABLE_EVOAB2="TRUE"
else
   ENABLE_EVOAB2=""
   { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi




{ echo "$as_me:$LINENO: checking whether to enable KDE address book support" >&5
echo $ECHO_N "checking whether to enable KDE address book support... $ECHO_C" >&6; }
if test "$enable_kdeab" = "yes" && test "$enable_kde" = "yes"; then
   { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
   save_CXXFLAGS=$CXXFLAGS
   CXXFLAGS="$CXXFLAGS $KDE_CFLAGS"
   { echo "$as_me:$LINENO: checking whether KDE is between 3.2 and 3.6" >&5
echo $ECHO_N "checking whether KDE is between 3.2 and 3.6... $ECHO_C" >&6; }
       if test "$cross_compiling" = yes; then
  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
See \`config.log' for more details." >&5
echo "$as_me: error: cannot run test program while cross compiling
See \`config.log' for more details." >&2;}
   { (exit 1); exit 1; }; }
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

#include <kdeversion.h>

int main(int argc, char **argv) {
       if (KDE_VERSION_MAJOR == 3 && 2 <= KDE_VERSION_MINOR && KDE_VERSION_MINOR <= 6) return 0;
       else return 1;
}

_ACEOF
rm -f conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
else
  echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
{ { echo "$as_me:$LINENO: error: KDE version too old or too recent, please use another version of KDE or disable KDE address book support" >&5
echo "$as_me: error: KDE version too old or too recent, please use another version of KDE or disable KDE address book support" >&2;}
   { (exit 1); exit 1; }; }
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi


   CXXFLAGS=$save_CXXFLAGS
   ENABLE_KAB=TRUE
else
   { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
   ENABLE_KAB=
fi


{ echo "$as_me:$LINENO: checking whether to include FontOOo" >&5
echo $ECHO_N "checking whether to include FontOOo... $ECHO_C" >&6; }
if test -n "$enable_fontooo"; then
  if test "$enable_fontooo" = "no"; then
    { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
    WITH_FONTOOO=NO
    SCPDEFS="$SCPDEFS -DWITHOUT_FONTOOO"
  else
    { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
    WITH_FONTOOO=YES
    BUILD_TYPE="$BUILD_TYPE MSFONTEXTRACT"
  fi
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
  WITH_FONTOOO=NO
  SCPDEFS="$SCPDEFS -DWITHOUT_FONTOOO"
fi


if test "$WITH_FONTOOO" = "YES"; then
        { echo "$as_me:$LINENO: checking whether to use system libmspack" >&5
echo $ECHO_N "checking whether to use system libmspack... $ECHO_C" >&6; }
  if test -n "$with_system_mspack" -o -n "$with_system_libs" && \
	  test "$with_system_mspack" != "no"; then
    { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
    SYSTEM_MSPACK=YES
    if test "${ac_cv_header_mspack_h+set}" = set; then
  { echo "$as_me:$LINENO: checking for mspack.h" >&5
echo $ECHO_N "checking for mspack.h... $ECHO_C" >&6; }
if test "${ac_cv_header_mspack_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
fi
{ echo "$as_me:$LINENO: result: $ac_cv_header_mspack_h" >&5
echo "${ECHO_T}$ac_cv_header_mspack_h" >&6; }
else
  # Is the header compilable?
{ echo "$as_me:$LINENO: checking mspack.h usability" >&5
echo $ECHO_N "checking mspack.h usability... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
#include <mspack.h>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_header_compiler=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_header_compiler=no
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6; }

# Is the header present?
{ echo "$as_me:$LINENO: checking mspack.h presence" >&5
echo $ECHO_N "checking mspack.h presence... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <mspack.h>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_cxx_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  ac_header_preproc=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  ac_header_preproc=no
fi

rm -f conftest.err conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6; }

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
  yes:no: )
    { echo "$as_me:$LINENO: WARNING: mspack.h: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: mspack.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { echo "$as_me:$LINENO: WARNING: mspack.h: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: mspack.h: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { echo "$as_me:$LINENO: WARNING: mspack.h: present but cannot be compiled" >&5
echo "$as_me: WARNING: mspack.h: present but cannot be compiled" >&2;}
    { echo "$as_me:$LINENO: WARNING: mspack.h:     check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: mspack.h:     check for missing prerequisite headers?" >&2;}
    { echo "$as_me:$LINENO: WARNING: mspack.h: see the Autoconf documentation" >&5
echo "$as_me: WARNING: mspack.h: see the Autoconf documentation" >&2;}
    { echo "$as_me:$LINENO: WARNING: mspack.h:     section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: mspack.h:     section \"Present But Cannot Be Compiled\"" >&2;}
    { echo "$as_me:$LINENO: WARNING: mspack.h: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: mspack.h: proceeding with the preprocessor's result" >&2;}
    { echo "$as_me:$LINENO: WARNING: mspack.h: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: mspack.h: in the future, the compiler will take precedence" >&2;}

    ;;
esac
{ echo "$as_me:$LINENO: checking for mspack.h" >&5
echo $ECHO_N "checking for mspack.h... $ECHO_C" >&6; }
if test "${ac_cv_header_mspack_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_cv_header_mspack_h=$ac_header_preproc
fi
{ echo "$as_me:$LINENO: result: $ac_cv_header_mspack_h" >&5
echo "${ECHO_T}$ac_cv_header_mspack_h" >&6; }

fi
if test $ac_cv_header_mspack_h = yes; then
  :
else
  { { echo "$as_me:$LINENO: error: mspack.h not found, install libmspack" >&5
echo "$as_me: error: mspack.h not found, install libmspack" >&2;}
   { (exit 1); exit 1; }; }
fi



{ echo "$as_me:$LINENO: checking for mspack_create_cab_decompressor in -lmspack" >&5
echo $ECHO_N "checking for mspack_create_cab_decompressor in -lmspack... $ECHO_C" >&6; }
if test "${ac_cv_lib_mspack_mspack_create_cab_decompressor+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lmspack  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char mspack_create_cab_decompressor ();
int
main ()
{
return mspack_create_cab_decompressor ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_mspack_mspack_create_cab_decompressor=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_lib_mspack_mspack_create_cab_decompressor=no
fi

rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ echo "$as_me:$LINENO: result: $ac_cv_lib_mspack_mspack_create_cab_decompressor" >&5
echo "${ECHO_T}$ac_cv_lib_mspack_mspack_create_cab_decompressor" >&6; }
if test $ac_cv_lib_mspack_mspack_create_cab_decompressor = yes; then
  cat >>confdefs.h <<_ACEOF
#define HAVE_LIBMSPACK 1
_ACEOF

  LIBS="-lmspack $LIBS"

else
  { { echo "$as_me:$LINENO: error: libmspack not installed or functional" >&5
echo "$as_me: error: libmspack not installed or functional" >&2;}
   { (exit 1); exit 1; }; }
fi

  else
    { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
    SYSTEM_MSPACK=NO
  fi
fi


{ echo "$as_me:$LINENO: checking whether to include MathMLDTD" >&5
echo $ECHO_N "checking whether to include MathMLDTD... $ECHO_C" >&6; }
if test -n "$enable_mathmldtd"; then
  if test "$enable_mathmldtd" = "no"; then
    { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
    SCPDEFS="$SCPDEFS -DWITHOUT_MATHMLDTD"
  else
    { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
    BUILD_TYPE="$BUILD_TYPE MATHMLDTD"
  fi
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
  SCPDEFS="$SCPDEFS -DWITHOUT_MATHMLDTD"
fi

{ echo "$as_me:$LINENO: checking whether to include Bitstream Vera fonts" >&5
echo $ECHO_N "checking whether to include Bitstream Vera fonts... $ECHO_C" >&6; }
if test "$with_fonts" != "no" ; then
  { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
  WITH_FONTS=YES
  BUILD_TYPE="$BUILD_TYPE BITSTREAM_VERA_FONTS"
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
  WITH_FONTS=NO
  SCPDEFS="$SCPDEFS -DWITHOUT_FONTS"
fi




{ echo "$as_me:$LINENO: checking whether to include PPDs" >&5
echo $ECHO_N "checking whether to include PPDs... $ECHO_C" >&6; }
if test "$without_ppds" = "yes"; then
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
  WITHOUT_PPDS=YES
  SCPDEFS="$SCPDEFS -DWITHOUT_PPDS"
else
  { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
fi



{ echo "$as_me:$LINENO: checking whether to include AFMs" >&5
echo $ECHO_N "checking whether to include AFMs... $ECHO_C" >&6; }
if test "$without_afms" = "yes"; then
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
  WITHOUT_AFMS=YES
  SCPDEFS="$SCPDEFS -DWITHOUT_AFMS"
else
  { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
fi




{ echo "$as_me:$LINENO: checking whether and how to use Xinerama" >&5
echo $ECHO_N "checking whether and how to use Xinerama... $ECHO_C" >&6; }
if test "$_os" = "Darwin"; then
   USE_XINERAMA=YES
   XINERAMA_LINK=dynamic
   { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
elif test "$_os" = "Linux" -o "$_os" = "FreeBSD"; then
   if test -e "$XLIB/libXinerama.so" -a -e "$XLIB/libXinerama.a"; then
      # we have both versions, let the user decide but use the static one
      # per default
      USE_XINERAMA=YES
      if test -n "$with_dynamic_xinerama" -o -n "$with_system_libs"; then
         XINERAMA_LINK=dynamic
      else
         XINERAMA_LINK=static
      fi
   elif test -e "$XLIB/libXinerama.so" -a ! -e "$XLIB/libXinerama.a"; then
      # we have only the dynamic version
      USE_XINERAMA=YES
      XINERAMA_LINK=dynamic
   elif test -e "$XLIB/libXinerama.a"; then
      # static version
      if echo $build_cpu | grep -E 'i[3456]86' 2>/dev/null >/dev/null; then
         USE_XINERAMA=YES
         XINERAMA_LINK=static
      else
         USE_XINERAMA=NO
         XINERAMA_LINK=none
      fi
   else
      # no Xinerama
      USE_XINERAMA=NO
      XINERAMA_LINK=none
   fi
   if test "$USE_XINERAMA" = "YES"; then
      { echo "$as_me:$LINENO: result: yes, with $XINERAMA_LINK linking" >&5
echo "${ECHO_T}yes, with $XINERAMA_LINK linking" >&6; }
      if test "${ac_cv_header_X11_extensions_Xinerama_h+set}" = set; then
  { echo "$as_me:$LINENO: checking for X11/extensions/Xinerama.h" >&5
echo $ECHO_N "checking for X11/extensions/Xinerama.h... $ECHO_C" >&6; }
if test "${ac_cv_header_X11_extensions_Xinerama_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
fi
{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xinerama_h" >&5
echo "${ECHO_T}$ac_cv_header_X11_extensions_Xinerama_h" >&6; }
else
  # Is the header compilable?
{ echo "$as_me:$LINENO: checking X11/extensions/Xinerama.h usability" >&5
echo $ECHO_N "checking X11/extensions/Xinerama.h usability... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
#include <X11/extensions/Xinerama.h>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest.$ac_objext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_header_compiler=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_header_compiler=no
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6; }

# Is the header present?
{ echo "$as_me:$LINENO: checking X11/extensions/Xinerama.h presence" >&5
echo $ECHO_N "checking X11/extensions/Xinerama.h presence... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <X11/extensions/Xinerama.h>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null; then
  if test -s conftest.err; then
    ac_cpp_err=$ac_cxx_preproc_warn_flag
    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
  else
    ac_cpp_err=
  fi
else
  ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
  ac_header_preproc=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  ac_header_preproc=no
fi

rm -f conftest.err conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6; }

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
  yes:no: )
    { echo "$as_me:$LINENO: WARNING: X11/extensions/Xinerama.h: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: X11/extensions/Xinerama.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { echo "$as_me:$LINENO: WARNING: X11/extensions/Xinerama.h: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: X11/extensions/Xinerama.h: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { echo "$as_me:$LINENO: WARNING: X11/extensions/Xinerama.h: present but cannot be compiled" >&5
echo "$as_me: WARNING: X11/extensions/Xinerama.h: present but cannot be compiled" >&2;}
    { echo "$as_me:$LINENO: WARNING: X11/extensions/Xinerama.h:     check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: X11/extensions/Xinerama.h:     check for missing prerequisite headers?" >&2;}
    { echo "$as_me:$LINENO: WARNING: X11/extensions/Xinerama.h: see the Autoconf documentation" >&5
echo "$as_me: WARNING: X11/extensions/Xinerama.h: see the Autoconf documentation" >&2;}
    { echo "$as_me:$LINENO: WARNING: X11/extensions/Xinerama.h:     section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: X11/extensions/Xinerama.h:     section \"Present But Cannot Be Compiled\"" >&2;}
    { echo "$as_me:$LINENO: WARNING: X11/extensions/Xinerama.h: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: X11/extensions/Xinerama.h: proceeding with the preprocessor's result" >&2;}
    { echo "$as_me:$LINENO: WARNING: X11/extensions/Xinerama.h: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: X11/extensions/Xinerama.h: in the future, the compiler will take precedence" >&2;}

    ;;
esac
{ echo "$as_me:$LINENO: checking for X11/extensions/Xinerama.h" >&5
echo $ECHO_N "checking for X11/extensions/Xinerama.h... $ECHO_C" >&6; }
if test "${ac_cv_header_X11_extensions_Xinerama_h+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_cv_header_X11_extensions_Xinerama_h=$ac_header_preproc
fi
{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xinerama_h" >&5
echo "${ECHO_T}$ac_cv_header_X11_extensions_Xinerama_h" >&6; }

fi
if test $ac_cv_header_X11_extensions_Xinerama_h = yes; then
  :
else
  { { echo "$as_me:$LINENO: error: Xinerama header not found." >&5
echo "$as_me: error: Xinerama header not found." >&2;}
   { (exit 1); exit 1; }; }
fi


      XINERAMA_EXTRA_LIBS="-L$XLIB -lXext"
      if test "$_os" = "FreeBSD"; then
          XINERAMA_EXTRA_LIBS="$XINERAMA_EXTRA_LIBS -lXt"
      fi
      if test "$_os" = "Linux"; then
          XINERAMA_EXTRA_LIBS="$XINERAMA_EXTRA_LIBS -ldl"
      fi

{ echo "$as_me:$LINENO: checking for XineramaIsActive in -lXinerama" >&5
echo $ECHO_N "checking for XineramaIsActive in -lXinerama... $ECHO_C" >&6; }
if test "${ac_cv_lib_Xinerama_XineramaIsActive+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lXinerama $XINERAMA_EXTRA_LIBS $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char XineramaIsActive ();
int
main ()
{
return XineramaIsActive ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_Xinerama_XineramaIsActive=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_lib_Xinerama_XineramaIsActive=no
fi

rm -f core conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xinerama_XineramaIsActive" >&5
echo "${ECHO_T}$ac_cv_lib_Xinerama_XineramaIsActive" >&6; }
if test $ac_cv_lib_Xinerama_XineramaIsActive = yes; then
  cat >>confdefs.h <<_ACEOF
#define HAVE_LIBXINERAMA 1
_ACEOF

  LIBS="-lXinerama $LIBS"

else
  { { echo "$as_me:$LINENO: error: Xinerama not functional?" >&5
echo "$as_me: error: Xinerama not functional?" >&2;}
   { (exit 1); exit 1; }; }
fi

   else
      { echo "$as_me:$LINENO: result: no, libXinerama not found or wrong architecture." >&5
echo "${ECHO_T}no, libXinerama not found or wrong architecture." >&6; }
   fi
else
   { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi




if test "$SOLAR_JAVA" != ""; then
ANT_HOME=; export ANT_HOME
WITH_ANT_HOME=; export WITH_ANT_HOME
if test -z "$with_ant_home"; then
   for ac_prog in jakarta-ant ant ant.sh ant.bat
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path_ANT+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $ANT in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ANT="$ANT" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_ANT="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
ANT=$ac_cv_path_ANT
if test -n "$ANT"; then
  { echo "$as_me:$LINENO: result: $ANT" >&5
echo "${ECHO_T}$ANT" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ANT" && break
done

else
   for ac_prog in jakarta-ant ant ant.sh ant.bat
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_path_ANT+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  case $ANT in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ANT="$ANT" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_dummy="$with_ant_home/bin:$PATH"
for as_dir in $as_dummy
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_path_ANT="$as_dir/$ac_word$ac_exec_ext"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done
IFS=$as_save_IFS

  ;;
esac
fi
ANT=$ac_cv_path_ANT
if test -n "$ANT"; then
  { echo "$as_me:$LINENO: result: $ANT" >&5
echo "${ECHO_T}$ANT" >&6; }
else
  { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


  test -n "$ANT" && break
done

   WITH_ANT_HOME=$with_ant_home
fi

if test -z "$ANT"; then
  { { echo "$as_me:$LINENO: error: Ant not found - Make sure it's in the path or use --with-ant-home" >&5
echo "$as_me: error: Ant not found - Make sure it's in the path or use --with-ant-home" >&2;}
   { (exit 1); exit 1; }; }
else
  # resolve relative or absolute symlink
  while test -h "$ANT"; do
     a_cwd=`pwd`
     a_basename=`basename "$ANT"`
     a_script=`ls -l "$ANT" | sed "s/.*${a_basename} -> //g"`
     cd "`dirname "$ANT"`"
     cd "`dirname "$a_script"`"
     ANT="`pwd`"/"`basename "$a_script"`"
     cd "$a_cwd"
  done
  { echo "$as_me:$LINENO: checking if $ANT works" >&5
echo $ECHO_N "checking if $ANT works... $ECHO_C" >&6; }
cat > conftest.java << EOF
    public class conftest {
	int testmethod(int a, int b) {
            return a + b;
	}
    }
EOF

cat > conftest.xml << EOF
    <project name="conftest" default="conftest">
	<target name="conftest">
            <javac srcdir="." includes="conftest.java">
	    </javac>
	</target>
    </project>
EOF
  oldJAVA_HOME=$JAVA_HOME
  if test "$JAVACISGCJ" = "yes"; then
    JAVA_HOME=; export JAVA_HOME
    ant_cmd="$ANT -Dbuild.compiler=gcj -buildfile conftest.xml 1>&2"
  else
    ant_cmd="$ANT -buildfile conftest.xml 1>&2"
  fi
  { (eval echo "$as_me:$LINENO: \"$ant_cmd\"") >&5
  (eval $ant_cmd) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }
  if test $? = 0 && test -f ./conftest.class ; then
    { echo "$as_me:$LINENO: result: Ant works" >&5
echo "${ECHO_T}Ant works" >&6; }
    if test -z "$WITH_ANT_HOME"; then
        ANT_HOME=`echo $ANT | $SED -n "s/\/bin\/ant.*\$//p"`
    else
        ANT_HOME="$WITH_ANT_HOME"
    fi
  else
    echo "configure: Ant test failed" >&5
    cat conftest.java >&5
    cat conftest.xml >&5
    { echo "$as_me:$LINENO: WARNING: Ant does not work - Some Java projects will not build!" >&5
echo "$as_me: WARNING: Ant does not work - Some Java projects will not build!" >&2;}
    ANT_HOME=""
    echo "Ant does not work - Some Java projects will not build!" >>warn
  fi
  JAVA_HOME=$oldJAVA_HOME
  rm -f conftest* core core.* *.core
fi
if test -z "$ANT_HOME"; then
   ANT_HOME="NO_ANT_HOME"
fi


if test "$ANT_HOME" != "NO_ANT_HOME"; then
   { echo "$as_me:$LINENO: checking Ant lib directory" >&5
echo $ECHO_N "checking Ant lib directory... $ECHO_C" >&6; }
   if test -f $ANT_HOME/lib/ant.jar; then
	  ANT_LIB="$ANT_HOME/lib"
   else
      if test -f $ANT_HOME/ant.jar; then
	     ANT_LIB="$ANT_HOME"
      else
          if test -f /usr/share/java/ant.jar; then
              ANT_LIB=/usr/share/java
          else
             if test -f /usr/share/ant-core/lib/ant.jar; then
                 ANT_LIB=/usr/share/ant-core/lib
             else
                 { { echo "$as_me:$LINENO: error: Ant libraries not found!" >&5
echo "$as_me: error: Ant libraries not found!" >&2;}
   { (exit 1); exit 1; }; }
             fi
          fi
      fi
   fi
   { echo "$as_me:$LINENO: result: Ant lib directory found." >&5
echo "${ECHO_T}Ant lib directory found." >&6; }
fi

fi

{ echo "$as_me:$LINENO: checking which languages to be built" >&5
echo $ECHO_N "checking which languages to be built... $ECHO_C" >&6; }
WITH_LANG="$with_lang"
if test -z "$WITH_LANG"; then
   { echo "$as_me:$LINENO: result: en-US" >&5
echo "${ECHO_T}en-US" >&6; }
else
   { echo "$as_me:$LINENO: result: $WITH_LANG" >&5
echo "${ECHO_T}$WITH_LANG" >&6; }
fi


{ echo "$as_me:$LINENO: checking which dictionaries to include" >&5
echo $ECHO_N "checking which dictionaries to include... $ECHO_C" >&6; }
if test -z "$with_dict"; then
   WITH_DICT=,ALL,
   { echo "$as_me:$LINENO: result: ALL" >&5
echo "${ECHO_T}ALL" >&6; }
else
   WITH_DICT=","$with_dict","
   { echo "$as_me:$LINENO: result: $with_dict" >&5
echo "${ECHO_T}$with_dict" >&6; }
fi


{ echo "$as_me:$LINENO: checking whether to statically link to Gtk" >&5
echo $ECHO_N "checking whether to statically link to Gtk... $ECHO_C" >&6; }
if test -n "$enable_static_gtk" && test "$enable_static_gtk" != "no"; then
   ENABLE_STATIC_GTK="TRUE"
   { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
else
   ENABLE_STATIC_GTK="FALSE"
   { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi


echo "********************************************************************"
echo "*                                                                  *"
echo "*   Setting up the build environment variables.                    *"
echo "*                                                                  *"
echo "********************************************************************"

if test -z "$COMPATH"; then
   { { echo "$as_me:$LINENO: error: No compiler found." >&5
echo "$as_me: error: No compiler found." >&2;}
   { (exit 1); exit 1; }; }
fi


{ echo "$as_me:$LINENO: checking solver path" >&5
echo $ECHO_N "checking solver path... $ECHO_C" >&6; }
if test -z "$with_local_solver"; then
   LOCAL_SOLVER="DEFAULT"
   { echo "$as_me:$LINENO: result: default" >&5
echo "${ECHO_T}default" >&6; }
else
   LOCAL_SOLVER=$with_local_solver
   { echo "$as_me:$LINENO: result: $with_local_solver" >&5
echo "${ECHO_T}$with_local_solver" >&6; }
fi




# make sure config.guess is +x; we execute config.guess, so it has to be so;
chmod +x $_solenv/bin/config.guess

ac_config_files="$ac_config_files set_soenv"

cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
# scripts and configure runs, see configure's option --config-cache.
# It is not useful on other systems.  If it contains results you don't
# want to keep, you may remove or edit it.
#
# config.status only pays attention to the cache file if you give it
# the --recheck option to rerun configure.
#
# `ac_cv_env_foo' variables (set or unset) will be overridden when
# loading this file, other *unset* `ac_cv_foo' will be assigned the
# following values.

_ACEOF

# The following way of writing the cache mishandles newlines in values,
# but we know of no workaround that is simple, portable, and efficient.
# So, we kill variables containing newlines.
# 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.
(
  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
    eval ac_val=\$$ac_var
    case $ac_val in #(
    *${as_nl}*)
      case $ac_var in #(
      *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
      esac
      case $ac_var in #(
      _ | IFS | as_nl) ;; #(
      *) $as_unset $ac_var ;;
      esac ;;
    esac
  done

  (set) 2>&1 |
    case $as_nl`(ac_space=' '; set) 2>&1` in #(
    *${as_nl}ac_space=\ *)
      # `set' does not quote correctly, so add quotes (double-quote
      # substitution turns \\\\ into \\, and sed turns \\ into \).
      sed -n \
	"s/'/'\\\\''/g;
	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
      ;; #(
    *)
      # `set' quotes correctly as required by POSIX, so do not add quotes.
      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
      ;;
    esac |
    sort
) |
  sed '
     /^ac_cv_env_/b end
     t clear
     :clear
     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
     t end
     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
     :end' >>confcache
if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
  if test -w "$cache_file"; then
    test "x$cache_file" != "x/dev/null" &&
      { echo "$as_me:$LINENO: updating cache $cache_file" >&5
echo "$as_me: updating cache $cache_file" >&6;}
    cat confcache >$cache_file
  else
    { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
echo "$as_me: not updating unwritable cache $cache_file" >&6;}
  fi
fi
rm -f confcache

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

# Transform confdefs.h into DEFS.
# Protect against shell expansion while executing Makefile rules.
# Protect against Makefile macro expansion.
#
# If the first sed substitution is executed (which looks for macros that
# take arguments), then branch to the quote section.  Otherwise,
# look for a macro that doesn't take arguments.
ac_script='
t clear
:clear
s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
t quote
s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
t quote
b any
:quote
s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
s/\[/\\&/g
s/\]/\\&/g
s/\$/$$/g
H
:any
${
	g
	s/^\n//
	s/\n/ /g
	p
}
'
DEFS=`sed -n "$ac_script" confdefs.h`


ac_libobjs=
ac_ltlibobjs=
for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
  # 1. Remove the extension, and $U if already installed.
  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
  ac_i=`echo "$ac_i" | sed "$ac_script"`
  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
  #    will be set to the directory where LIBOBJS objects are built.
  ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
  ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
done
LIBOBJS=$ac_libobjs

LTLIBOBJS=$ac_ltlibobjs



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

debug=false
ac_cs_recheck=false
ac_cs_silent=false
SHELL=\${CONFIG_SHELL-$SHELL}
_ACEOF

cat >>$CONFIG_STATUS <<\_ACEOF
## --------------------- ##
## M4sh Initialization.  ##
## --------------------- ##

# Be Bourne compatible
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
  emulate sh
  NULLCMD=:
  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
  # is contrary to our usage.  Disable this feature.
  alias -g '${1+"$@"}'='"$@"'
  setopt NO_GLOB_SUBST
else
  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
fi
BIN_SH=xpg4; export BIN_SH # for Tru64
DUALCASE=1; export DUALCASE # for MKS sh


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

# The user is always right.
if test "${PATH_SEPARATOR+set}" != set; then
  echo "#! /bin/sh" >conf$$.sh
  echo  "exit 0"   >>conf$$.sh
  chmod +x conf$$.sh
  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
    PATH_SEPARATOR=';'
  else
    PATH_SEPARATOR=:
  fi
  rm -f conf$$.sh
fi

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


# IFS
# We need space, tab and new line, in precisely that order.  Quoting is
# there to prevent editors from complaining about space-tab.
# (If _AS_PATH_WALK were called with IFS unset, it would disable word
# splitting by setting IFS to empty value.)
as_nl='
'
IFS=" ""	$as_nl"

# Find who we are.  Look in the path if we contain no directory separator.
case $0 in
  *[\\/]* ) as_myself=$0 ;;
  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
done
IFS=$as_save_IFS

     ;;
esac
# We did not find ourselves, most probably we were run as `sh COMMAND'
# in which case we are not to be found in the path.
if test "x$as_myself" = x; then
  as_myself=$0
fi
if test ! -f "$as_myself"; then
  echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
  { (exit 1); exit 1; }
fi

# Work around bugs in pre-3.0 UWIN ksh.
for as_var in ENV MAIL MAILPATH
do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
done
PS1='$ '
PS2='> '
PS4='+ '

# NLS nuisances.
for as_var in \
  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
  LC_TELEPHONE LC_TIME
do
  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
    eval $as_var=C; export $as_var
  else
    ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
  fi
done

# Required to use basename.
if expr a : '\(a\)' >/dev/null 2>&1 &&
   test "X`expr 00001 : '.*\(...\)'`" = X001; then
  as_expr=expr
else
  as_expr=false
fi

if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
  as_basename=basename
else
  as_basename=false
fi


# Name of the executable.
as_me=`$as_basename -- "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
	 X"$0" : 'X\(//\)$' \| \
	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
echo X/"$0" |
    sed '/^.*\/\([^/][^/]*\)\/*$/{
	    s//\1/
	    q
	  }
	  /^X\/\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\/\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`

# CDPATH.
$as_unset CDPATH



  as_lineno_1=$LINENO
  as_lineno_2=$LINENO
  test "x$as_lineno_1" != "x$as_lineno_2" &&
  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {

  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
  # uniformly replaced by the line number.  The first 'sed' inserts a
  # line-number line after each line using $LINENO; the second 'sed'
  # does the real work.  The second script uses 'N' to pair each
  # line-number line with the line containing $LINENO, and appends
  # trailing '-' during substitution so that $LINENO is not a special
  # case at line end.
  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
  # scripts with optimization help from Paolo Bonzini.  Blame Lee
  # E. McMahon (1931-1989) for sed's syntax.  :-)
  sed -n '
    p
    /[$]LINENO/=
  ' <$as_myself |
    sed '
      s/[$]LINENO.*/&-/
      t lineno
      b
      :lineno
      N
      :loop
      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
      t loop
      s/-\n.*//
    ' >$as_me.lineno &&
  chmod +x "$as_me.lineno" ||
    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
   { (exit 1); exit 1; }; }

  # Don't try to exec as it changes $[0], causing all sort of problems
  # (the dirname of $[0] is not the place where we might find the
  # original and so on.  Autoconf is especially sensitive to this).
  . "./$as_me.lineno"
  # Exit status is that of the last command.
  exit
}


if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
  as_dirname=dirname
else
  as_dirname=false
fi

ECHO_C= ECHO_N= ECHO_T=
case `echo -n x` in
-n*)
  case `echo 'x\c'` in
  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
  *)   ECHO_C='\c';;
  esac;;
*)
  ECHO_N='-n';;
esac

if expr a : '\(a\)' >/dev/null 2>&1 &&
   test "X`expr 00001 : '.*\(...\)'`" = X001; then
  as_expr=expr
else
  as_expr=false
fi

rm -f conf$$ conf$$.exe conf$$.file
if test -d conf$$.dir; then
  rm -f conf$$.dir/conf$$.file
else
  rm -f conf$$.dir
  mkdir conf$$.dir
fi
echo >conf$$.file
if ln -s conf$$.file conf$$ 2>/dev/null; then
  as_ln_s='ln -s'
  # ... but there are two gotchas:
  # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
  # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
  # In both cases, we have to default to `cp -p'.
  ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
    as_ln_s='cp -p'
elif ln conf$$.file conf$$ 2>/dev/null; then
  as_ln_s=ln
else
  as_ln_s='cp -p'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null

if mkdir -p . 2>/dev/null; then
  as_mkdir_p=:
else
  test -d ./-p && rmdir ./-p
  as_mkdir_p=false
fi

# Find out whether ``test -x'' works.  Don't use a zero-byte file, as
# systems may use methods other than mode bits to determine executability.
cat >conf$$.file <<_ASEOF
#! /bin/sh
exit 0
_ASEOF
chmod +x conf$$.file
if test -x conf$$.file >/dev/null 2>&1; then
  as_executable_p="test -x"
else
  as_executable_p=:
fi
rm -f conf$$.file

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

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


exec 6>&1

# Save the log message, to keep $[0] and so on meaningful, and to
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by $as_me, which was
generated by GNU Autoconf 2.60.  Invocation command line was

  CONFIG_FILES    = $CONFIG_FILES
  CONFIG_HEADERS  = $CONFIG_HEADERS
  CONFIG_LINKS    = $CONFIG_LINKS
  CONFIG_COMMANDS = $CONFIG_COMMANDS
  $ $0 $@

on `(hostname || uname -n) 2>/dev/null | sed 1q`
"

_ACEOF

cat >>$CONFIG_STATUS <<_ACEOF
# Files that config.status was made for.
config_files="$ac_config_files"

_ACEOF

cat >>$CONFIG_STATUS <<\_ACEOF
ac_cs_usage="\
\`$as_me' instantiates files from templates according to the
current configuration.

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

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

Configuration files:
$config_files

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

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

Copyright (C) 2006 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."

ac_pwd='$ac_pwd'
srcdir='$srcdir'
_ACEOF

cat >>$CONFIG_STATUS <<\_ACEOF
# If no file are specified by the user, then we need to provide default
# value.  By we need to know if files were specified by the user.
ac_need_defaults=:
while test $# != 0
do
  case $1 in
  --*=*)
    ac_option=`expr "X$1" : 'X\([^=]*\)='`
    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
    ac_shift=:
    ;;
  *)
    ac_option=$1
    ac_optarg=$2
    ac_shift=shift
    ;;
  esac

  case $ac_option in
  # Handling of the options.
  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
    ac_cs_recheck=: ;;
  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
    echo "$ac_cs_version"; exit ;;
  --debug | --debu | --deb | --de | --d | -d )
    debug=: ;;
  --file | --fil | --fi | --f )
    $ac_shift
    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
    ac_need_defaults=false;;
  --he | --h |  --help | --hel | -h )
    echo "$ac_cs_usage"; exit ;;
  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  | -silent | --silent | --silen | --sile | --sil | --si | --s)
    ac_cs_silent=: ;;

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

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

  esac
  shift
done

ac_configure_extra_args=

if $ac_cs_silent; then
  exec 6>/dev/null
  ac_configure_extra_args="$ac_configure_extra_args --silent"
fi

_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
if \$ac_cs_recheck; then
  echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
  CONFIG_SHELL=$SHELL
  export CONFIG_SHELL
  exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
fi

_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF
exec 5>>config.log
{
  echo
  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
## Running $as_me. ##
_ASBOX
  echo "$ac_log"
} >&5

_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
_ACEOF

cat >>$CONFIG_STATUS <<\_ACEOF

# Handling of arguments.
for ac_config_target in $ac_config_targets
do
  case $ac_config_target in
    "set_soenv") CONFIG_FILES="$CONFIG_FILES set_soenv" ;;

  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
   { (exit 1); exit 1; }; };;
  esac
done


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

# Have a temporary directory for convenience.  Make it in the build tree
# simply because there is no reason against having it here, and in addition,
# creating and moving files from /tmp can sometimes cause problems.
# Hook for its removal unless debugging.
# Note that there is a small window in which the directory will not be cleaned:
# after its creation but before its name has been assigned to `$tmp'.
$debug ||
{
  tmp=
  trap 'exit_status=$?
  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
' 0
  trap '{ (exit 1); exit 1; }' 1 2 13 15
}
# Create a (secure) tmp directory for tmp files.

{
  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
  test -n "$tmp" && test -d "$tmp"
}  ||
{
  tmp=./conf$$-$RANDOM
  (umask 077 && mkdir "$tmp")
} ||
{
   echo "$me: cannot create a temporary directory in ." >&2
   { (exit 1); exit 1; }
}

#
# Set up the sed scripts for 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

_ACEOF



ac_delim='%!_!# '
for ac_last_try in false false false false false :; do
  cat >conf$$subs.sed <<_ACEOF
SHELL!$SHELL$ac_delim
PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
PACKAGE_NAME!$PACKAGE_NAME$ac_delim
PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
PACKAGE_STRING!$PACKAGE_STRING$ac_delim
PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
exec_prefix!$exec_prefix$ac_delim
prefix!$prefix$ac_delim
program_transform_name!$program_transform_name$ac_delim
bindir!$bindir$ac_delim
sbindir!$sbindir$ac_delim
libexecdir!$libexecdir$ac_delim
datarootdir!$datarootdir$ac_delim
datadir!$datadir$ac_delim
sysconfdir!$sysconfdir$ac_delim
sharedstatedir!$sharedstatedir$ac_delim
localstatedir!$localstatedir$ac_delim
includedir!$includedir$ac_delim
oldincludedir!$oldincludedir$ac_delim
docdir!$docdir$ac_delim
infodir!$infodir$ac_delim
htmldir!$htmldir$ac_delim
dvidir!$dvidir$ac_delim
pdfdir!$pdfdir$ac_delim
psdir!$psdir$ac_delim
libdir!$libdir$ac_delim
localedir!$localedir$ac_delim
mandir!$mandir$ac_delim
DEFS!$DEFS$ac_delim
ECHO_C!$ECHO_C$ac_delim
ECHO_N!$ECHO_N$ac_delim
ECHO_T!$ECHO_T$ac_delim
LIBS!$LIBS$ac_delim
build_alias!$build_alias$ac_delim
host_alias!$host_alias$ac_delim
target_alias!$target_alias$ac_delim
AWK!$AWK$ac_delim
SED!$SED$ac_delim
LOCAL_SOLENV!$LOCAL_SOLENV$ac_delim
UPD!$UPD$ac_delim
SOURCEVERSION!$SOURCEVERSION$ac_delim
build!$build$ac_delim
build_cpu!$build_cpu$ac_delim
build_vendor!$build_vendor$ac_delim
build_os!$build_os$ac_delim
host!$host$ac_delim
host_cpu!$host_cpu$ac_delim
host_vendor!$host_vendor$ac_delim
host_os!$host_os$ac_delim
target!$target$ac_delim
target_cpu!$target_cpu$ac_delim
target_vendor!$target_vendor$ac_delim
target_os!$target_os$ac_delim
OSVERSION!$OSVERSION$ac_delim
PTHREAD_CFLAGS!$PTHREAD_CFLAGS$ac_delim
PTHREAD_LIBS!$PTHREAD_LIBS$ac_delim
ENABLE_CRASHDUMP!$ENABLE_CRASHDUMP$ac_delim
ENABLE_VCTK!$ENABLE_VCTK$ac_delim
VC_STANDARD!$VC_STANDARD$ac_delim
ENABLE_DEBUG!$ENABLE_DEBUG$ac_delim
PRODUCT!$PRODUCT$ac_delim
PROFULLSWITCH!$PROFULLSWITCH$ac_delim
PROEXT!$PROEXT$ac_delim
ENABLE_SYMBOLS!$ENABLE_SYMBOLS$ac_delim
ENABLE_CUPS!$ENABLE_CUPS$ac_delim
ENABLE_FONTCONFIG!$ENABLE_FONTCONFIG$ac_delim
WITH_BINFILTER!$WITH_BINFILTER$ac_delim
ENABLE_DIRECTX!$ENABLE_DIRECTX$ac_delim
NETTOOLKIT!$NETTOOLKIT$ac_delim
ENABLE_RPATH!$ENABLE_RPATH$ac_delim
WITH_MYSPELL_DICTS!$WITH_MYSPELL_DICTS$ac_delim
USE_SHELL!$USE_SHELL$ac_delim
WITH_MINGWIN!$WITH_MINGWIN$ac_delim
SHELLPATH!$SHELLPATH$ac_delim
GCC_HOME!$GCC_HOME$ac_delim
CC!$CC$ac_delim
CFLAGS!$CFLAGS$ac_delim
LDFLAGS!$LDFLAGS$ac_delim
CPPFLAGS!$CPPFLAGS$ac_delim
ac_ct_CC!$ac_ct_CC$ac_delim
EXEEXT!$EXEEXT$ac_delim
OBJEXT!$OBJEXT$ac_delim
COMPATH!$COMPATH$ac_delim
GCCVER!$GCCVER$ac_delim
HAVE_GCC_VISIBILITY_FEATURE!$HAVE_GCC_VISIBILITY_FEATURE$ac_delim
GNUMAKE!$GNUMAKE$ac_delim
_cc!$_cc$ac_delim
PERL!$PERL$ac_delim
MSPDB_PATH!$MSPDB_PATH$ac_delim
COMEX!$COMEX$ac_delim
MIDL_PATH!$MIDL_PATH$ac_delim
CSC_PATH!$CSC_PATH$ac_delim
NMAKE_PATH!$NMAKE_PATH$ac_delim
FRAME_HOME!$FRAME_HOME$ac_delim
CPP!$CPP$ac_delim
GREP!$GREP$ac_delim
_ACEOF

  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
    break
  elif $ac_last_try; then
    { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
   { (exit 1); exit 1; }; }
  else
    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
  fi
done

ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
if test -n "$ac_eof"; then
  ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
  ac_eof=`expr $ac_eof + 1`
fi

cat >>$CONFIG_STATUS <<_ACEOF
cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
_ACEOF
sed '
s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
s/^/s,@/; s/!/@,|#_!!_#|/
:n
t n
s/'"$ac_delim"'$/,g/; t
s/$/\\/; p
N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
' >>$CONFIG_STATUS <conf$$subs.sed
rm -f conf$$subs.sed
cat >>$CONFIG_STATUS <<_ACEOF
CEOF$ac_eof
_ACEOF


ac_delim='%!_!# '
for ac_last_try in false false false false false :; do
  cat >conf$$subs.sed <<_ACEOF
EGREP!$EGREP$ac_delim
PAM!$PAM$ac_delim
NEW_SHADOW_API!$NEW_SHADOW_API$ac_delim
PAM_LINK!$PAM_LINK$ac_delim
CRYPT_LINK!$CRYPT_LINK$ac_delim
CXX!$CXX$ac_delim
CXXFLAGS!$CXXFLAGS$ac_delim
ac_ct_CXX!$ac_ct_CXX$ac_delim
GXX_INCLUDE_PATH!$GXX_INCLUDE_PATH$ac_delim
EXCEPTIONS!$EXCEPTIONS$ac_delim
CXXCPP!$CXXCPP$ac_delim
STLPORT4!$STLPORT4$ac_delim
USE_SYSTEM_STL!$USE_SYSTEM_STL$ac_delim
ALLOC!$ALLOC$ac_delim
BUILD_VER_STRING!$BUILD_VER_STRING$ac_delim
SOLAR_JAVA!$SOLAR_JAVA$ac_delim
LANG!$LANG$ac_delim
JAVAINTERPRETER!$JAVAINTERPRETER$ac_delim
JAVACOMPILER!$JAVACOMPILER$ac_delim
JAVACISGCJ!$JAVACISGCJ$ac_delim
JAVADOC!$JAVADOC$ac_delim
AWTLIB!$AWTLIB$ac_delim
JAVAAOTCOMPILER!$JAVAAOTCOMPILER$ac_delim
JAVA_HOME!$JAVA_HOME$ac_delim
JDK!$JDK$ac_delim
XSLTPROC!$XSLTPROC$ac_delim
DMAKE!$DMAKE$ac_delim
BUILD_DMAKE!$BUILD_DMAKE$ac_delim
EPM!$EPM$ac_delim
DPKG!$DPKG$ac_delim
PKGMK!$PKGMK$ac_delim
BUILD_EPM!$BUILD_EPM$ac_delim
PKGFORMAT!$PKGFORMAT$ac_delim
RPM!$RPM$ac_delim
SYSTEM_STDLIBS!$SYSTEM_STDLIBS$ac_delim
SYSTEM_ZLIB!$SYSTEM_ZLIB$ac_delim
SYSTEM_JPEG!$SYSTEM_JPEG$ac_delim
SYSTEM_EXPAT!$SYSTEM_EXPAT$ac_delim
PKG_CONFIG!$PKG_CONFIG$ac_delim
FREETYPE_CFLAGS!$FREETYPE_CFLAGS$ac_delim
FREETYPE_LIBS!$FREETYPE_LIBS$ac_delim
SYSTEM_FREETYPE!$SYSTEM_FREETYPE$ac_delim
LIBWPD_CFLAGS!$LIBWPD_CFLAGS$ac_delim
LIBWPD_LIBS!$LIBWPD_LIBS$ac_delim
SYSTEM_LIBWPD!$SYSTEM_LIBWPD$ac_delim
LIBXML_CFLAGS!$LIBXML_CFLAGS$ac_delim
LIBXML_LIBS!$LIBXML_LIBS$ac_delim
SYSTEM_LIBXML!$SYSTEM_LIBXML$ac_delim
PYTHON!$PYTHON$ac_delim
PYTHON_VERSION!$PYTHON_VERSION$ac_delim
PYTHON_PREFIX!$PYTHON_PREFIX$ac_delim
PYTHON_EXEC_PREFIX!$PYTHON_EXEC_PREFIX$ac_delim
PYTHON_PLATFORM!$PYTHON_PLATFORM$ac_delim
pythondir!$pythondir$ac_delim
pkgpythondir!$pkgpythondir$ac_delim
pyexecdir!$pyexecdir$ac_delim
pkgpyexecdir!$pkgpyexecdir$ac_delim
SYSTEM_PYTHON!$SYSTEM_PYTHON$ac_delim
PYTHON_CFLAGS!$PYTHON_CFLAGS$ac_delim
PYTHON_LIBS!$PYTHON_LIBS$ac_delim
SYSTEM_DB!$SYSTEM_DB$ac_delim
DB_VERSION!$DB_VERSION$ac_delim
DB_INCLUDES!$DB_INCLUDES$ac_delim
DB_JAR!$DB_JAR$ac_delim
SYSTEM_HSQLDB!$SYSTEM_HSQLDB$ac_delim
HSQLDB_JAR!$HSQLDB_JAR$ac_delim
SYSTEM_BSH!$SYSTEM_BSH$ac_delim
BSH_JAR!$BSH_JAR$ac_delim
SYSTEM_XML_APIS!$SYSTEM_XML_APIS$ac_delim
XML_APIS_JAR!$XML_APIS_JAR$ac_delim
SYSTEM_XERCES!$SYSTEM_XERCES$ac_delim
XERCES_JAR!$XERCES_JAR$ac_delim
SYSTEM_XALAN!$SYSTEM_XALAN$ac_delim
XALAN_JAR!$XALAN_JAR$ac_delim
SABLOTCONFIG!$SABLOTCONFIG$ac_delim
SYSTEM_SABLOT!$SYSTEM_SABLOT$ac_delim
SABLOT_LIBS!$SABLOT_LIBS$ac_delim
CURLCONFIG!$CURLCONFIG$ac_delim
SYSTEM_CURL!$SYSTEM_CURL$ac_delim
CURL_CFLAGS!$CURL_CFLAGS$ac_delim
CURL_LIBS!$CURL_LIBS$ac_delim
SYSTEM_BOOST!$SYSTEM_BOOST$ac_delim
SYSTEM_ODBC_HEADERS!$SYSTEM_ODBC_HEADERS$ac_delim
WITH_MOZILLA!$WITH_MOZILLA$ac_delim
WITH_LDAP!$WITH_LDAP$ac_delim
WITH_OPENLDAP!$WITH_OPENLDAP$ac_delim
MOZILLAXPCOM_CFLAGS!$MOZILLAXPCOM_CFLAGS$ac_delim
MOZILLAXPCOM_LIBS!$MOZILLAXPCOM_LIBS$ac_delim
MOZ_NSPR_CFLAGS!$MOZ_NSPR_CFLAGS$ac_delim
MOZ_NSPR_LIBS!$MOZ_NSPR_LIBS$ac_delim
NSPR_LIB!$NSPR_LIB$ac_delim
MOZ_NSS_CFLAGS!$MOZ_NSS_CFLAGS$ac_delim
MOZ_NSS_LIBS!$MOZ_NSS_LIBS$ac_delim
NSS_LIB!$NSS_LIB$ac_delim
MOZILLA_VERSION!$MOZILLA_VERSION$ac_delim
MOZILLA_TOOLKIT!$MOZILLA_TOOLKIT$ac_delim
MOZLIBREQ_CFLAGS!$MOZLIBREQ_CFLAGS$ac_delim
_ACEOF

  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
    break
  elif $ac_last_try; then
    { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
   { (exit 1); exit 1; }; }
  else
    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
  fi
done

ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
if test -n "$ac_eof"; then
  ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
  ac_eof=`expr $ac_eof + 1`
fi

cat >>$CONFIG_STATUS <<_ACEOF
cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
_ACEOF
sed '
s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
s/^/s,@/; s/!/@,|#_!!_#|/
:n
t n
s/'"$ac_delim"'$/,g/; t
s/$/\\/; p
N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
' >>$CONFIG_STATUS <conf$$subs.sed
rm -f conf$$subs.sed
cat >>$CONFIG_STATUS <<_ACEOF
CEOF$ac_eof
_ACEOF


ac_delim='%!_!# '
for ac_last_try in false false false false false :; do
  cat >conf$$subs.sed <<_ACEOF
MOZLIBREQ_LIBS!$MOZLIBREQ_LIBS$ac_delim
BUILD_MOZAB!$BUILD_MOZAB$ac_delim
SYSTEM_MOZILLA!$SYSTEM_MOZILLA$ac_delim
MOZ_FLAVOUR!$MOZ_FLAVOUR$ac_delim
MOZ_INC!$MOZ_INC$ac_delim
MOZ_LIB!$MOZ_LIB$ac_delim
MOZ_LIB_XPCOM!$MOZ_LIB_XPCOM$ac_delim
MOZ_LDAP_CFLAGS!$MOZ_LDAP_CFLAGS$ac_delim
SYSTEM_SANE_HEADER!$SYSTEM_SANE_HEADER$ac_delim
XMKMF!$XMKMF$ac_delim
X_CFLAGS!$X_CFLAGS$ac_delim
X_PRE_LIBS!$X_PRE_LIBS$ac_delim
X_LIBS!$X_LIBS$ac_delim
X_EXTRA_LIBS!$X_EXTRA_LIBS$ac_delim
XINC!$XINC$ac_delim
XLIB!$XLIB$ac_delim
SYSTEM_XRENDER_HEADERS!$SYSTEM_XRENDER_HEADERS$ac_delim
XRENDER_LINK!$XRENDER_LINK$ac_delim
SYSTEM_NAS!$SYSTEM_NAS$ac_delim
NAS_INCLUDES!$NAS_INCLUDES$ac_delim
ENABLE_NAS!$ENABLE_NAS$ac_delim
ENABLE_PASF!$ENABLE_PASF$ac_delim
SYSTEM_PORTAUDIO!$SYSTEM_PORTAUDIO$ac_delim
SYSTEM_SNDFILE!$SYSTEM_SNDFILE$ac_delim
BUILD_TYPE!$BUILD_TYPE$ac_delim
DISABLE_NEON!$DISABLE_NEON$ac_delim
NEON_CFLAGS!$NEON_CFLAGS$ac_delim
NEON_LIBS!$NEON_LIBS$ac_delim
SYSTEM_NEON!$SYSTEM_NEON$ac_delim
NEON_VERSION!$NEON_VERSION$ac_delim
AGG_CFLAGS!$AGG_CFLAGS$ac_delim
AGG_LIBS!$AGG_LIBS$ac_delim
SYSTEM_AGG!$SYSTEM_AGG$ac_delim
MYSPELL_CFLAGS!$MYSPELL_CFLAGS$ac_delim
MYSPELL_LIBS!$MYSPELL_LIBS$ac_delim
SYSTEM_MYSPELL!$SYSTEM_MYSPELL$ac_delim
SYSTEM_HUNSPELL!$SYSTEM_HUNSPELL$ac_delim
HUNSPELL_CFLAGS!$HUNSPELL_CFLAGS$ac_delim
SYSTEM_HYPH!$SYSTEM_HYPH$ac_delim
SYSTEM_MYTHES!$SYSTEM_MYTHES$ac_delim
PSDK_HOME!$PSDK_HOME$ac_delim
DIRECTXSDK_HOME!$DIRECTXSDK_HOME$ac_delim
DIRECTXSDK_LIB!$DIRECTXSDK_LIB$ac_delim
NSIS_PATH!$NSIS_PATH$ac_delim
EXTRA_DOTNET_FILES!$EXTRA_DOTNET_FILES$ac_delim
BISON!$BISON$ac_delim
FLEX!$FLEX$ac_delim
PATCH!$PATCH$ac_delim
GNUPATCH!$GNUPATCH$ac_delim
GNUCP!$GNUCP$ac_delim
CYGWIN_PATH!$CYGWIN_PATH$ac_delim
ML_EXE!$ML_EXE$ac_delim
ASM_HOME!$ASM_HOME$ac_delim
ZIP!$ZIP$ac_delim
UNZIP!$UNZIP$ac_delim
ZIP_HOME!$ZIP_HOME$ac_delim
WITH_GPC!$WITH_GPC$ac_delim
ENABLE_GTK!$ENABLE_GTK$ac_delim
ENABLE_KDE!$ENABLE_KDE$ac_delim
GNOMEVFS_CFLAGS!$GNOMEVFS_CFLAGS$ac_delim
GNOMEVFS_LIBS!$GNOMEVFS_LIBS$ac_delim
GCONF_CFLAGS!$GCONF_CFLAGS$ac_delim
GCONF_LIBS!$GCONF_LIBS$ac_delim
ENABLE_GNOMEVFS!$ENABLE_GNOMEVFS$ac_delim
GTK_CFLAGS!$GTK_CFLAGS$ac_delim
GTK_LIBS!$GTK_LIBS$ac_delim
GDKPIXBUF_CFLAGS!$GDKPIXBUF_CFLAGS$ac_delim
GDKPIXBUF_LIBS!$GDKPIXBUF_LIBS$ac_delim
CAIRO_CFLAGS!$CAIRO_CFLAGS$ac_delim
CAIRO_LIBS!$CAIRO_LIBS$ac_delim
ENABLE_CAIRO!$ENABLE_CAIRO$ac_delim
SYSTEM_CAIRO!$SYSTEM_CAIRO$ac_delim
MOC!$MOC$ac_delim
KDE_CFLAGS!$KDE_CFLAGS$ac_delim
KDE_LIBS!$KDE_LIBS$ac_delim
ENABLE_LOCKDOWN!$ENABLE_LOCKDOWN$ac_delim
LIBSN_CFLAGS!$LIBSN_CFLAGS$ac_delim
LIBSN_LIBS!$LIBSN_LIBS$ac_delim
WITH_LIBSN!$WITH_LIBSN$ac_delim
GOBJECT_CFLAGS!$GOBJECT_CFLAGS$ac_delim
GOBJECT_LIBS!$GOBJECT_LIBS$ac_delim
ENABLE_EVOAB2!$ENABLE_EVOAB2$ac_delim
ENABLE_KAB!$ENABLE_KAB$ac_delim
WITH_FONTOOO!$WITH_FONTOOO$ac_delim
SYSTEM_MSPACK!$SYSTEM_MSPACK$ac_delim
WITH_FONTS!$WITH_FONTS$ac_delim
SCPDEFS!$SCPDEFS$ac_delim
WITHOUT_PPDS!$WITHOUT_PPDS$ac_delim
WITHOUT_AFMS!$WITHOUT_AFMS$ac_delim
USE_XINERAMA!$USE_XINERAMA$ac_delim
XINERAMA_LINK!$XINERAMA_LINK$ac_delim
ANT!$ANT$ac_delim
ANT_HOME!$ANT_HOME$ac_delim
ANT_LIB!$ANT_LIB$ac_delim
WITH_LANG!$WITH_LANG$ac_delim
WITH_DICT!$WITH_DICT$ac_delim
ENABLE_STATIC_GTK!$ENABLE_STATIC_GTK$ac_delim
_ACEOF

  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
    break
  elif $ac_last_try; then
    { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
   { (exit 1); exit 1; }; }
  else
    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
  fi
done

ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
if test -n "$ac_eof"; then
  ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
  ac_eof=`expr $ac_eof + 1`
fi

cat >>$CONFIG_STATUS <<_ACEOF
cat >"\$tmp/subs-3.sed" <<\CEOF$ac_eof
/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
_ACEOF
sed '
s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
s/^/s,@/; s/!/@,|#_!!_#|/
:n
t n
s/'"$ac_delim"'$/,g/; t
s/$/\\/; p
N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
' >>$CONFIG_STATUS <conf$$subs.sed
rm -f conf$$subs.sed
cat >>$CONFIG_STATUS <<_ACEOF
CEOF$ac_eof
_ACEOF


ac_delim='%!_!# '
for ac_last_try in false false false false false :; do
  cat >conf$$subs.sed <<_ACEOF
LOCAL_SOLVER!$LOCAL_SOLVER$ac_delim
LIBOBJS!$LIBOBJS$ac_delim
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF

  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 3; then
    break
  elif $ac_last_try; then
    { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
   { (exit 1); exit 1; }; }
  else
    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
  fi
done

ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
if test -n "$ac_eof"; then
  ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
  ac_eof=`expr $ac_eof + 1`
fi

cat >>$CONFIG_STATUS <<_ACEOF
cat >"\$tmp/subs-4.sed" <<\CEOF$ac_eof
/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
_ACEOF
sed '
s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
s/^/s,@/; s/!/@,|#_!!_#|/
:n
t n
s/'"$ac_delim"'$/,g/; t
s/$/\\/; p
N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
' >>$CONFIG_STATUS <conf$$subs.sed
rm -f conf$$subs.sed
cat >>$CONFIG_STATUS <<_ACEOF
:end
s/|#_!!_#|//g
CEOF$ac_eof
_ACEOF


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

cat >>$CONFIG_STATUS <<\_ACEOF
fi # test -n "$CONFIG_FILES"


for ac_tag in  :F $CONFIG_FILES
do
  case $ac_tag in
  :[FHLC]) ac_mode=$ac_tag; continue;;
  esac
  case $ac_mode$ac_tag in
  :[FHL]*:*);;
  :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
echo "$as_me: error: Invalid tag $ac_tag." >&2;}
   { (exit 1); exit 1; }; };;
  :[FH]-) ac_tag=-:-;;
  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
  esac
  ac_save_IFS=$IFS
  IFS=:
  set x $ac_tag
  IFS=$ac_save_IFS
  shift
  ac_file=$1
  shift

  case $ac_mode in
  :L) ac_source=$1;;
  :[FH])
    ac_file_inputs=
    for ac_f
    do
      case $ac_f in
      -) ac_f="$tmp/stdin";;
      *) # Look for the file first in the build tree, then in the source tree
	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
	 # because $ac_f cannot contain `:'.
	 test -f "$ac_f" ||
	   case $ac_f in
	   [\\/$]*) false;;
	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
	   esac ||
	   { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
echo "$as_me: error: cannot find input file: $ac_f" >&2;}
   { (exit 1); exit 1; }; };;
      esac
      ac_file_inputs="$ac_file_inputs $ac_f"
    done

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

    case $ac_tag in
    *:-:* | *:-) cat >"$tmp/stdin";;
    esac
    ;;
  esac

  ac_dir=`$as_dirname -- "$ac_file" ||
$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"$ac_file" : 'X\(//\)[^/]' \| \
	 X"$ac_file" : 'X\(//\)$' \| \
	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
echo X"$ac_file" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`
  { as_dir="$ac_dir"
  case $as_dir in #(
  -*) as_dir=./$as_dir;;
  esac
  test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
    as_dirs=
    while :; do
      case $as_dir in #(
      *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
      *) as_qdir=$as_dir;;
      esac
      as_dirs="'$as_qdir' $as_dirs"
      as_dir=`$as_dirname -- "$as_dir" ||
$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"$as_dir" : 'X\(//\)[^/]' \| \
	 X"$as_dir" : 'X\(//\)$' \| \
	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
echo X"$as_dir" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`
      test -d "$as_dir" && break
    done
    test -z "$as_dirs" || eval "mkdir $as_dirs"
  } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
echo "$as_me: error: cannot create directory $as_dir" >&2;}
   { (exit 1); exit 1; }; }; }
  ac_builddir=.

case "$ac_dir" in
.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
*)
  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
  # A ".." for each directory in $ac_dir_suffix.
  ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
  case $ac_top_builddir_sub in
  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
  esac ;;
esac
ac_abs_top_builddir=$ac_pwd
ac_abs_builddir=$ac_pwd$ac_dir_suffix
# for backward compatibility:
ac_top_builddir=$ac_top_build_prefix

case $srcdir in
  .)  # We are building in place.
    ac_srcdir=.
    ac_top_srcdir=$ac_top_builddir_sub
    ac_abs_top_srcdir=$ac_pwd ;;
  [\\/]* | ?:[\\/]* )  # Absolute name.
    ac_srcdir=$srcdir$ac_dir_suffix;
    ac_top_srcdir=$srcdir
    ac_abs_top_srcdir=$srcdir ;;
  *) # Relative name.
    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
    ac_top_srcdir=$ac_top_build_prefix$srcdir
    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
esac
ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix


  case $ac_mode in
  :F)
  #
  # CONFIG_FILE
  #

_ACEOF

cat >>$CONFIG_STATUS <<\_ACEOF
# If the template does not know about datarootdir, expand it.
# FIXME: This hack should be removed a few years after 2.60.
ac_datarootdir_hack=; ac_datarootdir_seen=

case `sed -n '/datarootdir/ {
  p
  q
}
/@datadir@/p
/@docdir@/p
/@infodir@/p
/@localedir@/p
/@mandir@/p
' $ac_file_inputs` in
*datarootdir*) ac_datarootdir_seen=yes;;
*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
  { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
  ac_datarootdir_hack='
  s&@datadir@&$datadir&g
  s&@docdir@&$docdir&g
  s&@infodir@&$infodir&g
  s&@localedir@&$localedir&g
  s&@mandir@&$mandir&g
    s&\\\${datarootdir}&$datarootdir&g' ;;
esac
_ACEOF

# Neutralize VPATH when `$srcdir' = `.'.
# Shell code in configure.ac might set extrasub.
# FIXME: do we really want to maintain this feature?
cat >>$CONFIG_STATUS <<_ACEOF
  sed "$ac_vpsub
$extrasub
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF
:t
/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
s&@configure_input@&$configure_input&;t t
s&@top_builddir@&$ac_top_builddir_sub&;t t
s&@srcdir@&$ac_srcdir&;t t
s&@abs_srcdir@&$ac_abs_srcdir&;t t
s&@top_srcdir@&$ac_top_srcdir&;t t
s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
s&@builddir@&$ac_builddir&;t t
s&@abs_builddir@&$ac_abs_builddir&;t t
s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
$ac_datarootdir_hack
" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" | sed -f "$tmp/subs-3.sed" | sed -f "$tmp/subs-4.sed" >$tmp/out

test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
  { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
which seems to be undefined.  Please make sure it is defined." >&5
echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
which seems to be undefined.  Please make sure it is defined." >&2;}

  rm -f "$tmp/stdin"
  case $ac_file in
  -) cat "$tmp/out"; rm -f "$tmp/out";;
  *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
  esac
 ;;



  esac

done # for ac_tag


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


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


chmod a+x set_soenv
if test -z "$enable_check_only"; then
   './set_soenv'
else
   echo
   echo Test Complete
   echo No environment file will be generated
   echo
   num_warnings=`wc -l warn`
   _num=`echo $num_warnings | $AWK '{ print $1 }'`
   if test $_num -gt 0; then
      echo The following warning\(s\) were generated by configure
      echo ----------------------------------------------------
      echo
      cat warn
      echo
   else
      echo There were no warnings
   fi
   echo
fi
