[mapserver] 01/03: Imported Debian patch 6.0.1-2ubuntu1.1

Bas Couwenberg sebastic at debian.org
Wed Jan 18 22:42:30 UTC 2017


This is an automated email from the git hooks/post-receive script.

sebastic pushed a commit to branch ubuntu-precise
in repository mapserver.

commit 9ad61c40e791066ba9853a1b285edafff28ad867
Author: Johan Van de Wauw <johan.vandewauw at gmail.com>
Date:   Sun Jan 12 21:07:15 2014 +0100

    Imported Debian patch 6.0.1-2ubuntu1.1
---
 debian/changelog                           |    19 +-
 debian/control                             |     3 +-
 debian/patches/cve-2013-7262.patch         |    20 +
 debian/patches/fix-jpeg-gd-detection.patch | 18950 +++++++++++++++++++++++++++
 debian/patches/series                      |     3 +-
 debian/rules                               |    10 +-
 6 files changed, 18997 insertions(+), 8 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 81af6d1..83b8f88 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,20 @@
+mapserver (6.0.1-2ubuntu1.1) precise-security; urgency=low
+
+  * Add patch to fix CVE-2013-7262, an SQL injection vulnerability in the
+    msPostGISLayerSetTimeFilter function in mappostgis.c. (LP: #1267616)
+
+ -- Johan Van de Wauw <johan.vandewauw at gmail.com>  Sun, 12 Jan 2014 21:07:15 +0100
+
+mapserver (6.0.1-2ubuntu1) precise; urgency=low
+
+  * fix-jpeg-gd-detection.patch: Rework configure detection of jpeg and gd
+    headers and libraries from system locations. Fixes cases where it
+    would not build when libraries where in /usr/lib/<arch>-linux-gnu/
+  * debian/rules: Do not pass /usr to --with-XX= and let configure auto
+    detect based on system locations.
+
+ -- Ben Collins <bcollins at ubuntu.com>  Sat, 21 Jan 2012 04:17:27 +0000
+
 mapserver (6.0.1-2) unstable; urgency=low
 
   * Added missed stuff for libmapscript-perl.
@@ -5,7 +22,7 @@ mapserver (6.0.1-2) unstable; urgency=low
  -- Francesco Paolo Lovergine <frankie at debian.org>  Fri, 23 Dec 2011 14:02:06 +0100
 
 mapserver (6.0.1-1) unstable; urgency=low
-	
+
   [ Alan Boudreault ]
   * New upstream release.
 
diff --git a/debian/control b/debian/control
index c49b0e7..ee9c671 100644
--- a/debian/control
+++ b/debian/control
@@ -1,7 +1,8 @@
 Source: mapserver
 Section: devel
 Priority: optional
-Maintainer: Debian GIS Project <pkg-grass-devel at lists.alioth.debian.org>
+Maintainer: Ubuntu Developers <ubuntu-devel-discuss at lists.ubuntu.com>
+XSBC-Original-Maintainer: Debian GIS Project <pkg-grass-devel at lists.alioth.debian.org>
 Uploaders: Francesco Paolo Lovergine <frankie at debian.org>, Alan Boudreault <aboudreault at mapgears.com>
 Standards-Version: 3.9.2
 Build-Depends: debhelper (>= 8), libcurl4-gnutls-dev, libpng12-dev, zlib1g-dev (>= 1.1.4),
diff --git a/debian/patches/cve-2013-7262.patch b/debian/patches/cve-2013-7262.patch
new file mode 100644
index 0000000..ec15bb7
--- /dev/null
+++ b/debian/patches/cve-2013-7262.patch
@@ -0,0 +1,20 @@
+Description: Fix potential SQL Injection with postgis TIME filters.
+Origin: https://github.com/mapserver/mapserver/commit/3f0ee57b12d482e0ff5611d05afd32408949f7f9
+Author: Even Rouault <even.rouault at mines-paris.org>
+Bug: https://github.com/mapserver/mapserver/issues/4834
+Bug-Debian: http://bugs.debian.org/734565
+Last-Update: 2013-01-08
+--- a/mappostgis.c
++++ b/mappostgis.c
+@@ -2961,6 +2961,11 @@ int msPostGISLayerSetTimeFilter(layerObj
+     if (!lp || !timestring || !timefield)
+       return MS_FALSE;
+ 
++    if( strchr(timestring,'\'') || strchr(timestring, '\\') ) {
++       msSetError(MS_MISCERR, "Invalid time filter.", "msPostGISLayerSetTimeFilter()");
++       return MS_FALSE;
++    }
++
+     if (strstr(timestring, ",") == NULL && 
+         strstr(timestring, "/") == NULL) /* discrete time */
+       tmpstimestring = msStrdup(timestring);
diff --git a/debian/patches/fix-jpeg-gd-detection.patch b/debian/patches/fix-jpeg-gd-detection.patch
new file mode 100644
index 0000000..55bd682
--- /dev/null
+++ b/debian/patches/fix-jpeg-gd-detection.patch
@@ -0,0 +1,18950 @@
+diff -urN mapserver-6.0.1.orig/configure mapserver-6.0.1/configure
+--- mapserver-6.0.1.orig/configure	2011-12-08 22:50:36.000000000 +0000
++++ mapserver-6.0.1/configure	2012-01-21 04:10:44.000000000 +0000
+@@ -1,81 +1,423 @@
+ #! /bin/sh
+ # Guess values for system-dependent variables and create Makefiles.
+-# Generated by GNU Autoconf 2.59.
++# Generated by GNU Autoconf 2.68.
++#
++#
++# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
++# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
++# Foundation, Inc.
++#
+ #
+-# Copyright (C) 2003 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.  ##
+-## --------------------- ##
++## -------------------- ##
++## M4sh Initialization. ##
++## -------------------- ##
+ 
+-# Be Bourne compatible
+-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
++# Be more Bourne compatible
++DUALCASE=1; export DUALCASE # for MKS sh
++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
++  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+   # is contrary to our usage.  Disable this feature.
+   alias -g '${1+"$@"}'='"$@"'
+-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+-  set -o posix
++  setopt NO_GLOB_SUBST
++else
++  case `(set -o) 2>/dev/null` in #(
++  *posix*) :
++    set -o posix ;; #(
++  *) :
++     ;;
++esac
+ fi
+-DUALCASE=1; export DUALCASE # for MKS sh
+ 
+-# Support unset when possible.
+-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+-  as_unset=unset
+-else
+-  as_unset=false
++
++as_nl='
++'
++export as_nl
++# Printing a long string crashes Solaris 7 /usr/bin/printf.
++as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
++as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
++as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
++# Prefer a ksh shell builtin over an external printf program on Solaris,
++# but without wasting forks for bash or zsh.
++if test -z "$BASH_VERSION$ZSH_VERSION" \
++    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
++  as_echo='print -r --'
++  as_echo_n='print -rn --'
++elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
++  as_echo='printf %s\n'
++  as_echo_n='printf %s'
++else
++  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
++    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
++    as_echo_n='/usr/ucb/echo -n'
++  else
++    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
++    as_echo_n_body='eval
++      arg=$1;
++      case $arg in #(
++      *"$as_nl"*)
++	expr "X$arg" : "X\\(.*\\)$as_nl";
++	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
++      esac;
++      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
++    '
++    export as_echo_n_body
++    as_echo_n='sh -c $as_echo_n_body as_echo'
++  fi
++  export as_echo_body
++  as_echo='sh -c $as_echo_body as_echo'
++fi
++
++# The user is always right.
++if test "${PATH_SEPARATOR+set}" != set; then
++  PATH_SEPARATOR=:
++  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
++    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
++      PATH_SEPARATOR=';'
++  }
+ fi
+ 
+ 
+-# Work around bugs in pre-3.0 UWIN ksh.
+-$as_unset ENV MAIL MAILPATH
++# 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.)
++IFS=" ""	$as_nl"
++
++# Find who we are.  Look in the path if we contain no directory separator.
++as_myself=
++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
++  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
++  exit 1
++fi
++
++# Unset variables that we do not need and which cause bugs (e.g. in
++# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
++# suppresses any "Segmentation fault" message there.  '((' could
++# trigger a bug in pdksh 5.2.14.
++for as_var in BASH_ENV ENV MAIL MAILPATH
++do eval test x\${$as_var+set} = xset \
++  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && 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
++LC_ALL=C
++export LC_ALL
++LANGUAGE=C
++export LANGUAGE
++
++# CDPATH.
++(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
++
++if test "x$CONFIG_SHELL" = x; then
++  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
++  emulate sh
++  NULLCMD=:
++  # Pre-4.2 versions of Zsh do 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
++"
++  as_required="as_fn_return () { (exit \$1); }
++as_fn_success () { as_fn_return 0; }
++as_fn_failure () { as_fn_return 1; }
++as_fn_ret_success () { return 0; }
++as_fn_ret_failure () { return 1; }
++
++exitcode=0
++as_fn_success || { exitcode=1; echo as_fn_success failed.; }
++as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
++as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
++as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
++if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
++
++else
++  exitcode=1; echo positional parameters were not saved.
++fi
++test x\$exitcode = x0 || exit 1"
++  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
++  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
++  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
++  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
++test \$(( 1 + 1 )) = 2 || exit 1"
++  if (eval "$as_required") 2>/dev/null; then :
++  as_have_required=yes
++else
++  as_have_required=no
++fi
++  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
++
++else
++  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++as_found=false
++for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+ 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
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++  as_found=:
++  case $as_dir in #(
++	 /*)
++	   for as_base in sh bash ksh sh5; do
++	     # Try only shells that exist, to save several forks.
++	     as_shell=$as_dir/$as_base
++	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
++		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
++  CONFIG_SHELL=$as_shell as_have_required=yes
++		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
++  break 2
++fi
++fi
++	   done;;
++       esac
++  as_found=false
++done
++$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
++	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
++  CONFIG_SHELL=$SHELL as_have_required=yes
++fi; }
++IFS=$as_save_IFS
++
++
++      if test "x$CONFIG_SHELL" != x; then :
++  # We cannot yet assume a decent shell, so we have to provide a
++	# neutralization value for shells without unset; and this also
++	# works around shells that cannot unset nonexistent variables.
++	# Preserve -v and -x to the replacement shell.
++	BASH_ENV=/dev/null
++	ENV=/dev/null
++	(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
++	export CONFIG_SHELL
++	case $- in # ((((
++	  *v*x* | *x*v* ) as_opts=-vx ;;
++	  *v* ) as_opts=-v ;;
++	  *x* ) as_opts=-x ;;
++	  * ) as_opts= ;;
++	esac
++	exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
++fi
++
++    if test x$as_have_required = xno; then :
++  $as_echo "$0: This script requires a shell more modern than all"
++  $as_echo "$0: the shells that I found on your system."
++  if test x${ZSH_VERSION+set} = xset ; then
++    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
++    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
++  else
++    $as_echo "$0: Please tell bug-autoconf at gnu.org about your system,
++$0: including any error possibly output before this
++$0: message. Then install a modern shell, or manually run
++$0: the script under such a shell if you do have one."
+   fi
+-done
++  exit 1
++fi
++fi
++fi
++SHELL=${CONFIG_SHELL-/bin/sh}
++export SHELL
++# Unset more variables known to interfere with behavior of common tools.
++CLICOLOR_FORCE= GREP_OPTIONS=
++unset CLICOLOR_FORCE GREP_OPTIONS
++
++## --------------------- ##
++## M4sh Shell Functions. ##
++## --------------------- ##
++# as_fn_unset VAR
++# ---------------
++# Portably unset VAR.
++as_fn_unset ()
++{
++  { eval $1=; unset $1;}
++}
++as_unset=as_fn_unset
++
++# as_fn_set_status STATUS
++# -----------------------
++# Set $? to STATUS, without forking.
++as_fn_set_status ()
++{
++  return $1
++} # as_fn_set_status
++
++# as_fn_exit STATUS
++# -----------------
++# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
++as_fn_exit ()
++{
++  set +e
++  as_fn_set_status $1
++  exit $1
++} # as_fn_exit
++
++# as_fn_mkdir_p
++# -------------
++# Create "$as_dir" as a directory, including parents if necessary.
++as_fn_mkdir_p ()
++{
++
++  case $as_dir in #(
++  -*) as_dir=./$as_dir;;
++  esac
++  test -d "$as_dir" || eval $as_mkdir_p || {
++    as_dirs=
++    while :; do
++      case $as_dir in #(
++      *\'*) as_qdir=`$as_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 ||
++$as_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" || as_fn_error $? "cannot create directory $as_dir"
++
++
++} # as_fn_mkdir_p
++# as_fn_append VAR VALUE
++# ----------------------
++# Append the text in VALUE to the end of the definition contained in VAR. Take
++# advantage of any shell optimizations that allow amortized linear growth over
++# repeated appends, instead of the typical quadratic growth present in naive
++# implementations.
++if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
++  eval 'as_fn_append ()
++  {
++    eval $1+=\$2
++  }'
++else
++  as_fn_append ()
++  {
++    eval $1=\$$1\$2
++  }
++fi # as_fn_append
++
++# as_fn_arith ARG...
++# ------------------
++# Perform arithmetic evaluation on the ARGs, and store the result in the
++# global $as_val. Take advantage of shells that can avoid forks. The arguments
++# must be portable across $(()) and expr.
++if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
++  eval 'as_fn_arith ()
++  {
++    as_val=$(( $* ))
++  }'
++else
++  as_fn_arith ()
++  {
++    as_val=`expr "$@" || test $? -eq 1`
++  }
++fi # as_fn_arith
++
++
++# as_fn_error STATUS ERROR [LINENO LOG_FD]
++# ----------------------------------------
++# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
++# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
++# script with STATUS, using 1 if that was 0.
++as_fn_error ()
++{
++  as_status=$1; test $as_status -eq 0 && as_status=1
++  if test "$4"; then
++    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
++    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
++  fi
++  $as_echo "$as_me: error: $2" >&2
++  as_fn_exit $as_status
++} # as_fn_error
+ 
+-# Required to use basename.
+-if expr a : '\(a\)' >/dev/null 2>&1; then
++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
++if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+   as_basename=basename
+ else
+   as_basename=false
+ fi
+ 
++if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
++  as_dirname=dirname
++else
++  as_dirname=false
++fi
+ 
+-# Name of the executable.
+-as_me=`$as_basename "$0" ||
++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'`
+-
++	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
++$as_echo X/"$0" |
++    sed '/^.*\/\([^/][^/]*\)\/*$/{
++	    s//\1/
++	    q
++	  }
++	  /^X\/\(\/\/\)$/{
++	    s//\1/
++	    q
++	  }
++	  /^X\/\(\/\).*/{
++	    s//\1/
++	    q
++	  }
++	  s/.*/./; q'`
+ 
+-# PATH needs CR, and LINENO needs CR and PATH.
+ # Avoid depending upon Character Ranges.
+ as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+ as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+@@ -83,146 +425,107 @@
+ 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
+-
+-
+-  as_lineno_1=$LINENO
+-  as_lineno_2=$LINENO
+-  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+-  test "x$as_lineno_1" != "x$as_lineno_2" &&
+-  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
+-  # Find who we are.  Look in the path if we contain no path at all
+-  # relative or not.
+-  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
+-
+-       ;;
+-  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_me: error: cannot find myself; rerun with an absolute path" >&2
+-   { (exit 1); exit 1; }; }
+-  fi
+-  case $CONFIG_SHELL in
+-  '')
+-    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+-do
+-  IFS=$as_save_IFS
+-  test -z "$as_dir" && as_dir=.
+-  for as_base in sh bash ksh sh5; do
+-	 case $as_dir in
+-	 /*)
+-	   if ("$as_dir/$as_base" -c '
+-  as_lineno_1=$LINENO
+-  as_lineno_2=$LINENO
+-  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+-  test "x$as_lineno_1" != "x$as_lineno_2" &&
+-  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
+-	     $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+-	     $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+-	     CONFIG_SHELL=$as_dir/$as_base
+-	     export CONFIG_SHELL
+-	     exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+-	   fi;;
+-	 esac
+-       done
+-done
+-;;
+-  esac
+ 
+-  # 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 before each line; the second 'sed' does the real
+-  # work.  The second script uses 'N' to pair each line-number line
+-  # with the numbered line, 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
+-  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
+-  sed '=' <$as_myself |
++  as_lineno_1=$LINENO as_lineno_1a=$LINENO
++  as_lineno_2=$LINENO as_lineno_2a=$LINENO
++  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
++  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
++  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
++  sed -n '
++    p
++    /[$]LINENO/=
++  ' <$as_myself |
+     sed '
++      s/[$]LINENO.*/&-/
++      t lineno
++      b
++      :lineno
+       N
+-      s,$,-,
+-      : loop
+-      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
++      :loop
++      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+       t loop
+-      s,-$,,
+-      s,^['$as_cr_digits']*\n,,
++      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; }; }
++  chmod +x "$as_me.lineno" ||
++    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_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 sensible to this).
+-  . ./$as_me.lineno
++  # original and so on.  Autoconf is especially sensitive to this).
++  . "./$as_me.lineno"
+   # Exit status is that of the last command.
+   exit
+ }
+ 
+-
+-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+-  *c*,-n*) ECHO_N= ECHO_C='
+-' ECHO_T='	' ;;
+-  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+-  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
++ECHO_C= ECHO_N= ECHO_T=
++case `echo -n x` in #(((((
++-n*)
++  case `echo 'xy\c'` in
++  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
++  xy)  ECHO_C='\c';;
++  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
++       ECHO_T='	';;
++  esac;;
++*)
++  ECHO_N='-n';;
+ esac
+ 
+-if expr a : '\(a\)' >/dev/null 2>&1; then
+-  as_expr=expr
++rm -f conf$$ conf$$.exe conf$$.file
++if test -d conf$$.dir; then
++  rm -f conf$$.dir/conf$$.file
+ else
+-  as_expr=false
++  rm -f conf$$.dir
++  mkdir conf$$.dir 2>/dev/null
+ fi
+-
+-rm -f conf$$ conf$$.exe conf$$.file
+-echo >conf$$.file
+-if ln -s conf$$.file conf$$ 2>/dev/null; then
+-  # We could just check for DJGPP; but this test a) works b) is more generic
+-  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+-  if test -f conf$$.exe; then
+-    # Don't use ln at all; we don't have any links
+-    as_ln_s='cp -p'
+-  else
++if (echo >conf$$.file) 2>/dev/null; then
++  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
+-elif ln conf$$.file conf$$ 2>/dev/null; then
+-  as_ln_s=ln
+ else
+   as_ln_s='cp -p'
+ fi
+-rm -f conf$$ conf$$.exe conf$$.file
++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=:
++  as_mkdir_p='mkdir -p "$as_dir"'
+ else
+   test -d ./-p && rmdir ./-p
+   as_mkdir_p=false
+ fi
+ 
+-as_executable_p="test -f"
++if test -x / >/dev/null 2>&1; then
++  as_test_x='test -x'
++else
++  if ls -dL / >/dev/null 2>&1; then
++    as_ls_L_option=L
++  else
++    as_ls_L_option=
++  fi
++  as_test_x='
++    eval sh -c '\''
++      if test -d "$1"; then
++	test -d "$1/.";
++      else
++	case $1 in #(
++	-*)set "./$1";;
++	esac;
++	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
++	???[sx]*):;;*)false;;esac;fi
++    '\'' sh
++  '
++fi
++as_executable_p=$as_test_x
+ 
+ # 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'"
+@@ -231,38 +534,25 @@
+ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+ 
+ 
+-# IFS
+-# We need space, tab and new line, in precisely that order.
+-as_nl='
+-'
+-IFS=" 	$as_nl"
+-
+-# CDPATH.
+-$as_unset CDPATH
+-
++test -n "$DJDIR" || exec 7<&0 </dev/null
++exec 6>&1
+ 
+ # Name of the host.
+-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
++# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
+ # so uname gets run too.
+ ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+ 
+-exec 6>&1
+-
+ #
+ # Initializations.
+ #
+ ac_default_prefix=/usr/local
++ac_clean_files=
+ ac_config_libobj_dir=.
++LIBOBJS=
+ cross_compiling=no
+ subdirs=
+ MFLAGS=
+ MAKEFLAGS=
+-SHELL=${CONFIG_SHELL-/bin/sh}
+-
+-# Maximum number of lines to put in a shell here document.
+-# This variable seems obsolete.  It should probably be removed, and
+-# only ac_max_sed_lines should be used.
+-: ${ac_max_here_lines=38}
+ 
+ # Identity of this package.
+ PACKAGE_NAME=
+@@ -270,51 +560,303 @@
+ PACKAGE_VERSION=
+ PACKAGE_STRING=
+ PACKAGE_BUGREPORT=
++PACKAGE_URL=
+ 
+ ac_unique_file="Makefile.in"
+ # Factoring default headers for most tests.
+ ac_includes_default="\
+ #include <stdio.h>
+-#if HAVE_SYS_TYPES_H
++#ifdef HAVE_SYS_TYPES_H
+ # include <sys/types.h>
+ #endif
+-#if HAVE_SYS_STAT_H
++#ifdef HAVE_SYS_STAT_H
+ # include <sys/stat.h>
+ #endif
+-#if STDC_HEADERS
++#ifdef STDC_HEADERS
+ # include <stdlib.h>
+ # include <stddef.h>
+ #else
+-# if HAVE_STDLIB_H
++# ifdef HAVE_STDLIB_H
+ #  include <stdlib.h>
+ # endif
+ #endif
+-#if HAVE_STRING_H
+-# if !STDC_HEADERS && HAVE_MEMORY_H
++#ifdef HAVE_STRING_H
++# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+ #  include <memory.h>
+ # endif
+ # include <string.h>
+ #endif
+-#if HAVE_STRINGS_H
++#ifdef HAVE_STRINGS_H
+ # include <strings.h>
+ #endif
+-#if HAVE_INTTYPES_H
++#ifdef HAVE_INTTYPES_H
+ # include <inttypes.h>
+-#else
+-# if HAVE_STDINT_H
+-#  include <stdint.h>
+-# endif
+ #endif
+-#if HAVE_UNISTD_H
++#ifdef HAVE_STDINT_H
++# include <stdint.h>
++#endif
++#ifdef 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 datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX RANLIB ac_ct_RANLIB LEX LEXLIB LEX_OUTPUT_ROOT YACC XTRALIBS CPP EGREP C_P [...]
++ac_subst_vars='LTLIBOBJS
++LIBOBJS
++RPATHS
++ALL_STATIC_LIB
++ALL_LIB
++ALL_INC
++ALL_ENABLED
++OS_INCLUDE_DIR
++APACHE_INC
++MAKE_PHPMS_CLEAN
++MAKE_PHPMS
++USE_PHP_REGEX
++PHP_REGEX_OBJ
++PHP_REGEX_INC
++PHP_LD
++PHP_CC
++PHP_SRC_DIR
++PHP_VERSION_FLAG
++PHP_LD_SHARED
++SO_COMMAND_NAME
++SO_EXT
++LD_SHARED
++DEBUG_FLAGS
++USE_NINT
++USE_POINT_Z_M
++IGNORE_MISSING_DATA
++MS_LIB
++MS_INC
++HTTPD
++FASTCGI_LIB
++FASTCGI_INC
++FASTCGI_ENABLED
++CAIRO_LIB
++CAIRO_INC
++CAIRO_ENABLED
++FRIBIDI_LIB
++FRIBIDI_INC
++FRIBIDI_ENABLED
++FRIBIDI_CONFIG
++EXSLT_LIB
++EXSLT_INC
++EXSLT_ENABLED
++XSLT_LIB
++XSLT_INC
++XSLT_ENABLED
++SOS_SVR_ENABLED
++WFS_LYR_ENABLED
++WMS_LYR_ENABLED
++XML2_LIB
++XML2_INC
++LIBXML2_CONFIG
++CURL_LIB
++CURL_INC
++LIBCURL_CONFIG
++WCS_SVR_ENABLED
++WFS_SVR_ENABLED
++WMS_SVR_ENABLED
++ORACLESPATIAL_LIB
++ORACLESPATIAL_INC
++ORACLESPATIAL_ENABLED
++MYSQL_LIB
++MYSQL_INC
++MYSQL_ENABLED
++MY_CONFIG
++POSTGIS_LIB
++POSTGIS_INC
++POSTGIS_ENABLED
++PG_CONFIG
++GDAL_LIB
++GDAL_INC
++OGR_ENABLED
++GDAL_ENABLED
++GDAL_CONFIG
++GEOS_LIB
++GEOS_INC
++GEOS_ENABLED
++GEOS_CONFIG
++SDE_LIB
++SDE_INC
++SDE_ENABLED
++THREAD_LIB
++THREAD_FLAG
++PROJ_LIBS
++PROJ_INC
++PROJ_ENABLED
++AGG_OBJ
++AGG_INC
++AGG_LIB
++OGL_LIB
++OGL_INC
++OGL_ENABLED
++FTGL_LIB
++FTGL_INC
++FTGL_ENABLED
++MAKE_GD_CLEAN
++MAKE_GD
++GD_STATIC
++GD_LIB
++GD_INC
++GD_DEF
++ICONV_LIB
++ICONV_INC
++ICONV_ENABLED
++JPEG_LIB
++JPEG_INC
++JPEG_ENABLED
++GIF_LIB
++GIF_INC
++GIF_ENABLED
++PNG_LIB
++PNG_INC
++PNG_ENABLED
++ZLIB_LIB
++ZLIB_INC
++ZLIB_ENABLED
++FT_LIB
++FT_INC
++FT_ENABLED
++FT_BIN
++PKG_CONFIG
++MS_VERSION
++STRINGS
++C_PIC
++EGREP
++GREP
++CPP
++XTRALIBS
++YFLAGS
++YACC
++LEXLIB
++LEX_OUTPUT_ROOT
++LEX
++RANLIB
++ac_ct_CXX
++CXXFLAGS
++CXX
++OBJEXT
++EXEEXT
++ac_ct_CC
++CPPFLAGS
++LDFLAGS
++CFLAGS
++CC
++target_alias
++host_alias
++build_alias
++LIBS
++ECHO_T
++ECHO_N
++ECHO_C
++DEFS
++mandir
++localedir
++libdir
++psdir
++pdfdir
++dvidir
++htmldir
++infodir
++docdir
++oldincludedir
++includedir
++localstatedir
++sharedstatedir
++sysconfdir
++datadir
++datarootdir
++libexecdir
++sbindir
++bindir
++program_transform_name
++prefix
++exec_prefix
++PACKAGE_URL
++PACKAGE_BUGREPORT
++PACKAGE_STRING
++PACKAGE_VERSION
++PACKAGE_TARNAME
++PACKAGE_NAME
++PATH_SEPARATOR
++SHELL'
+ ac_subst_files=''
++ac_user_opts='
++enable_option_checking
++with_pkg_config
++with_freetype
++with_zlib
++with_png
++with_gif
++with_jpeg
++with_xpm
++with_libiconv
++with_gd
++with_ftgl
++with_ogl
++with_expat
++with_agg_svg_symbols
++with_proj
++with_threads
++with_sde
++with_sde_version
++with_geos
++with_ogr
++with_gdal
++with_postgis
++with_mysql
++with_oraclespatial
++with_wms
++with_wfs
++with_wcs
++with_wmsclient
++with_wfsclient
++with_sos
++with_curl_config
++with_kml
++with_xml2_config
++with_xml_mapfile
++with_xslt
++with_exslt
++with_fribidi_config
++with_cairo
++with_fastcgi
++with_httpd
++enable_ignore_missing_data
++enable_point_z_m
++with_warnings
++enable_debug
++enable_cgi_cl_debug_args
++enable_gcov
++with_php
++enable_internal_ld_detect
++with_ld_shared
++with_apxs
++with_apache
++enable_runpath
++with_java_include_os_name
++'
++      ac_precious_vars='build_alias
++host_alias
++target_alias
++CC
++CFLAGS
++LDFLAGS
++LIBS
++CPPFLAGS
++CXX
++CXXFLAGS
++CCC
++YACC
++YFLAGS
++CPP'
++
+ 
+ # Initialize some variables set by options.
+ ac_init_help=
+ ac_init_version=false
++ac_unrecognized_opts=
++ac_unrecognized_sep=
+ # The variables have the same names as the options, with
+ # dashes changed to underlines.
+ cache_file=/dev/null
+@@ -337,34 +879,49 @@
+ # 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'
+-datadir='${prefix}/share'
++datarootdir='${prefix}/share'
++datadir='${datarootdir}'
+ sysconfdir='${prefix}/etc'
+ sharedstatedir='${prefix}/com'
+ localstatedir='${prefix}/var'
+-libdir='${exec_prefix}/lib'
+ includedir='${prefix}/include'
+ oldincludedir='/usr/include'
+-infodir='${prefix}/info'
+-mandir='${prefix}/man'
++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"
++    eval $ac_prev=\$ac_option
+     ac_prev=
+     continue
+   fi
+ 
+-  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
++  case $ac_option in
++  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
++  *=)   ac_optarg= ;;
++  *)    ac_optarg=yes ;;
++  esac
+ 
+   # Accept the important Cygnus configure options, so we can diagnose typos.
+ 
+-  case $ac_option in
++  case $ac_dashdash$ac_option in
++  --)
++    ac_dashdash=yes ;;
+ 
+   -bindir | --bindir | --bindi | --bind | --bin | --bi)
+     ac_prev=bindir ;;
+@@ -386,33 +943,59 @@
+   --config-cache | -C)
+     cache_file=config.cache ;;
+ 
+-  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
++  -datadir | --datadir | --datadi | --datad)
+     ac_prev=datadir ;;
+-  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+-  | --da=*)
++  -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-\(.*\)'`
++    ac_useropt=`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" ;;
++    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
++      as_fn_error $? "invalid feature name: $ac_useropt"
++    ac_useropt_orig=$ac_useropt
++    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
++    case $ac_user_opts in
++      *"
++"enable_$ac_useropt"
++"*) ;;
++      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
++	 ac_unrecognized_sep=', ';;
++    esac
++    eval enable_$ac_useropt=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-\([^=]*\)'`
++    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+     # Reject names that are not valid shell variable names.
+-    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+-      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+-   { (exit 1); exit 1; }; }
+-    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+-    case $ac_option in
+-      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+-      *) ac_optarg=yes ;;
++    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
++      as_fn_error $? "invalid feature name: $ac_useropt"
++    ac_useropt_orig=$ac_useropt
++    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
++    case $ac_user_opts in
++      *"
++"enable_$ac_useropt"
++"*) ;;
++      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
++	 ac_unrecognized_sep=', ';;
+     esac
+-    eval "enable_$ac_feature='$ac_optarg'" ;;
++    eval enable_$ac_useropt=\$ac_optarg ;;
+ 
+   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+@@ -439,6 +1022,12 @@
+   -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 ;;
+@@ -463,13 +1052,16 @@
+   | --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 | --local | --loca | --loc | --lo)
++  | --localstate | --localstat | --localsta | --localst | --locals)
+     ac_prev=localstatedir ;;
+   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+-  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+-  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
++  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+     localstatedir=$ac_optarg ;;
+ 
+   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+@@ -534,6 +1126,16 @@
+   | --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 ;;
+@@ -584,26 +1186,36 @@
+     ac_init_version=: ;;
+ 
+   -with-* | --with-*)
+-    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
++    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+     # Reject names that are not valid shell variable names.
+-    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+-      { echo "$as_me: error: invalid package name: $ac_package" >&2
+-   { (exit 1); exit 1; }; }
+-    ac_package=`echo $ac_package| sed 's/-/_/g'`
+-    case $ac_option in
+-      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+-      *) ac_optarg=yes ;;
++    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
++      as_fn_error $? "invalid package name: $ac_useropt"
++    ac_useropt_orig=$ac_useropt
++    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
++    case $ac_user_opts in
++      *"
++"with_$ac_useropt"
++"*) ;;
++      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
++	 ac_unrecognized_sep=', ';;
+     esac
+-    eval "with_$ac_package='$ac_optarg'" ;;
++    eval with_$ac_useropt=\$ac_optarg ;;
+ 
+   -without-* | --without-*)
+-    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
++    ac_useropt=`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" ;;
++    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
++      as_fn_error $? "invalid package name: $ac_useropt"
++    ac_useropt_orig=$ac_useropt
++    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
++    case $ac_user_opts in
++      *"
++"with_$ac_useropt"
++"*) ;;
++      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
++	 ac_unrecognized_sep=', ';;
++    esac
++    eval with_$ac_useropt=no ;;
+ 
+   --x)
+     # Obsolete; use --with-x.
+@@ -623,27 +1235,26 @@
+   | --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; }; }
++  -*) as_fn_error $? "unrecognized option: \`$ac_option'
++Try \`$0 --help' for more information"
+     ;;
+ 
+   *=*)
+     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+     # Reject names that are not valid shell variable names.
+-    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+-      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+-   { (exit 1); exit 1; }; }
+-    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
+-    eval "$ac_envvar='$ac_optarg'"
++    case $ac_envvar in #(
++      '' | [0-9]* | *[!_$as_cr_alnum]* )
++      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
++    esac
++    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
++    $as_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}
++      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
++    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
+     ;;
+ 
+   esac
+@@ -651,31 +1262,36 @@
+ 
+ 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; }; }
++  as_fn_error $? "missing argument to $ac_option"
+ fi
+ 
+-# Be sure to have absolute paths.
+-for ac_var in exec_prefix prefix
+-do
+-  eval ac_val=$`echo $ac_var`
+-  case $ac_val in
+-    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
+-    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+-   { (exit 1); exit 1; }; };;
++if test -n "$ac_unrecognized_opts"; then
++  case $enable_option_checking in
++    no) ;;
++    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
++    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+   esac
+-done
++fi
+ 
+-# Be sure to have absolute paths.
+-for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
+-	      localstatedir libdir includedir oldincludedir infodir mandir
++# Check all directory arguments for consistency.
++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=$`echo $ac_var`
++  eval ac_val=\$$ac_var
++  # Remove trailing slashes.
++  case $ac_val in
++    */ )
++      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
++      eval $ac_var=\$ac_val;;
++  esac
++  # Be sure to have absolute directory names.
+   case $ac_val in
+-    [\\/$]* | ?:[\\/]* ) ;;
+-    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+-   { (exit 1); exit 1; }; };;
++    [\\/$]* | ?:[\\/]* )  continue;;
++    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+   esac
++  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
+ done
+ 
+ # There might be people who depend on the old broken behavior: `$host'
+@@ -689,8 +1305,8 @@
+ 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
++    $as_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
+@@ -702,82 +1318,72 @@
+ 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 .` ||
++  as_fn_error $? "working directory cannot be determined"
++test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
++  as_fn_error $? "pwd does not report name of working directory"
++
++
+ # Find the source files, if location was not specified.
+ if test -z "$srcdir"; then
+   ac_srcdir_defaulted=yes
+-  # Try the directory containing this script, then its parent.
+-  ac_confdir=`(dirname "$0") 2>/dev/null ||
+-$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'`
++  # Try the directory containing this script, then the parent directory.
++  ac_confdir=`$as_dirname -- "$as_myself" ||
++$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
++	 X"$as_myself" : 'X\(//\)[^/]' \| \
++	 X"$as_myself" : 'X\(//\)$' \| \
++	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
++$as_echo X"$as_myself" |
++    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
++  if test ! -r "$srcdir/$ac_unique_file"; then
+     srcdir=..
+   fi
+ else
+   ac_srcdir_defaulted=no
+ fi
+-if test ! -r $srcdir/$ac_unique_file; then
+-  if test "$ac_srcdir_defaulted" = yes; then
+-    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
+-   { (exit 1); exit 1; }; }
+-  else
+-    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+-   { (exit 1); exit 1; }; }
+-  fi
+-fi
+-(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
+-  { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
+-   { (exit 1); exit 1; }; }
+-srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
+-ac_env_build_alias_set=${build_alias+set}
+-ac_env_build_alias_value=$build_alias
+-ac_cv_env_build_alias_set=${build_alias+set}
+-ac_cv_env_build_alias_value=$build_alias
+-ac_env_host_alias_set=${host_alias+set}
+-ac_env_host_alias_value=$host_alias
+-ac_cv_env_host_alias_set=${host_alias+set}
+-ac_cv_env_host_alias_value=$host_alias
+-ac_env_target_alias_set=${target_alias+set}
+-ac_env_target_alias_value=$target_alias
+-ac_cv_env_target_alias_set=${target_alias+set}
+-ac_cv_env_target_alias_value=$target_alias
+-ac_env_CC_set=${CC+set}
+-ac_env_CC_value=$CC
+-ac_cv_env_CC_set=${CC+set}
+-ac_cv_env_CC_value=$CC
+-ac_env_CFLAGS_set=${CFLAGS+set}
+-ac_env_CFLAGS_value=$CFLAGS
+-ac_cv_env_CFLAGS_set=${CFLAGS+set}
+-ac_cv_env_CFLAGS_value=$CFLAGS
+-ac_env_LDFLAGS_set=${LDFLAGS+set}
+-ac_env_LDFLAGS_value=$LDFLAGS
+-ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
+-ac_cv_env_LDFLAGS_value=$LDFLAGS
+-ac_env_CPPFLAGS_set=${CPPFLAGS+set}
+-ac_env_CPPFLAGS_value=$CPPFLAGS
+-ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
+-ac_cv_env_CPPFLAGS_value=$CPPFLAGS
+-ac_env_CXX_set=${CXX+set}
+-ac_env_CXX_value=$CXX
+-ac_cv_env_CXX_set=${CXX+set}
+-ac_cv_env_CXX_value=$CXX
+-ac_env_CXXFLAGS_set=${CXXFLAGS+set}
+-ac_env_CXXFLAGS_value=$CXXFLAGS
+-ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
+-ac_cv_env_CXXFLAGS_value=$CXXFLAGS
+-ac_env_CPP_set=${CPP+set}
+-ac_env_CPP_value=$CPP
+-ac_cv_env_CPP_set=${CPP+set}
+-ac_cv_env_CPP_value=$CPP
++if test ! -r "$srcdir/$ac_unique_file"; then
++  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
++  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
++fi
++ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
++ac_abs_confdir=`(
++	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
++	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.
+@@ -800,20 +1406,17 @@
+       --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
++  -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 \`..']
+ 
+-_ACEOF
+-
+-  cat <<_ACEOF
+ Installation directories:
+   --prefix=PREFIX         install architecture-independent files in PREFIX
+-			  [$ac_default_prefix]
++                          [$ac_default_prefix]
+   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
+-			  [PREFIX]
++                          [PREFIX]
+ 
+ By default, \`make install' will install all the files in
+ \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
+@@ -823,18 +1426,25 @@
+ For better control, use the options below.
+ 
+ Fine tuning of the installation directories:
+-  --bindir=DIR           user executables [EPREFIX/bin]
+-  --sbindir=DIR          system admin executables [EPREFIX/sbin]
+-  --libexecdir=DIR       program executables [EPREFIX/libexec]
+-  --datadir=DIR          read-only architecture-independent data [PREFIX/share]
+-  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
+-  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
+-  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
+-  --libdir=DIR           object code libraries [EPREFIX/lib]
+-  --includedir=DIR       C header files [PREFIX/include]
+-  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
+-  --infodir=DIR          info documentation [PREFIX/info]
+-  --mandir=DIR           man documentation [PREFIX/man]
++  --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
+@@ -846,6 +1456,7 @@
+   cat <<\_ACEOF
+ 
+ Optional Features:
++  --disable-option-checking  ignore unrecognized --enable/--with options
+   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
+   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+   --enable-ignore-missing-data
+@@ -966,167 +1577,581 @@
+   CFLAGS      C compiler flags
+   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
+               nonstandard directory <lib dir>
+-  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
+-              headers in a nonstandard directory <include dir>
++  LIBS        libraries to pass to the linker, e.g. -l<library>
++  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
++              you have headers in a nonstandard directory <include dir>
+   CXX         C++ compiler command
+   CXXFLAGS    C++ compiler flags
++  YACC        The `Yet Another Compiler Compiler' implementation to use.
++              Defaults to the first program found out of: `bison -y', `byacc',
++              `yacc'.
++  YFLAGS      The list of arguments that will be passed by default to $YACC.
++              This script will default YFLAGS to the empty string to avoid a
++              default value of `-d' given by some make applications.
+   CPP         C preprocessor
+ 
+ Use these variables to override the choices made by `configure' or to help
+ it to find libraries and programs with nonstandard names/locations.
+ 
++Report bugs to the package provider.
+ _ACEOF
++ac_status=$?
+ fi
+ 
+ if test "$ac_init_help" = "recursive"; then
+   # If there are subdirs, report their specific --help.
+-  ac_popdir=`pwd`
+   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+-    test -d $ac_dir || continue
++    test -d "$ac_dir" ||
++      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
++      continue
+     ac_builddir=.
+ 
+-if test "$ac_dir" != .; then
+-  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+-  # A "../" for each directory in $ac_dir_suffix.
+-  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+-else
+-  ac_dir_suffix= ac_top_builddir=
+-fi
++case "$ac_dir" in
++.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
++*)
++  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
++  # A ".." for each directory in $ac_dir_suffix.
++  ac_top_builddir_sub=`$as_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
+-  .)  # No --srcdir option.  We are building in place.
++  .)  # We are building in place.
+     ac_srcdir=.
+-    if test -z "$ac_top_builddir"; then
+-       ac_top_srcdir=.
+-    else
+-       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+-    fi ;;
+-  [\\/]* | ?:[\\/]* )  # Absolute path.
++    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 ;;
+-  *) # Relative path.
+-    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+-    ac_top_srcdir=$ac_top_builddir$srcdir ;;
+-esac
+-
+-# Do not use `cd foo && pwd` to compute absolute paths, because
+-# the directories may not exist.
+-case `pwd` in
+-.) ac_abs_builddir="$ac_dir";;
+-*)
+-  case "$ac_dir" in
+-  .) ac_abs_builddir=`pwd`;;
+-  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+-  *) ac_abs_builddir=`pwd`/"$ac_dir";;
+-  esac;;
+-esac
+-case $ac_abs_builddir in
+-.) ac_abs_top_builddir=${ac_top_builddir}.;;
+-*)
+-  case ${ac_top_builddir}. in
+-  .) ac_abs_top_builddir=$ac_abs_builddir;;
+-  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+-  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+-  esac;;
+-esac
+-case $ac_abs_builddir in
+-.) ac_abs_srcdir=$ac_srcdir;;
+-*)
+-  case $ac_srcdir in
+-  .) ac_abs_srcdir=$ac_abs_builddir;;
+-  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+-  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+-  esac;;
+-esac
+-case $ac_abs_builddir in
+-.) ac_abs_top_srcdir=$ac_top_srcdir;;
+-*)
+-  case $ac_top_srcdir in
+-  .) ac_abs_top_srcdir=$ac_abs_builddir;;
+-  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+-  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+-  esac;;
++    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
+-    # Check for guested configure; otherwise get Cygnus style 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
+-    elif test -f $ac_srcdir/configure.ac ||
+-	   test -f $ac_srcdir/configure.in; then
+-      echo
+-      $ac_configure --help
++    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
+-    cd $ac_popdir
++      $as_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 0
++test -n "$ac_init_help" && exit $ac_status
+ if $ac_init_version; then
+   cat <<\_ACEOF
++configure
++generated by GNU Autoconf 2.68
+ 
+-Copyright (C) 2003 Free Software Foundation, Inc.
++Copyright (C) 2010 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 0
++  exit
+ fi
+-exec 5>config.log
+-cat >&5 <<_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.59.  Invocation command line was
+-
+-  $ $0 $@
+ 
+-_ACEOF
++## ------------------------ ##
++## Autoconf initialization. ##
++## ------------------------ ##
++
++# ac_fn_c_try_compile LINENO
++# --------------------------
++# Try to compile conftest.$ac_ext, and return whether this succeeded.
++ac_fn_c_try_compile ()
+ {
+-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`
++  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
++  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 ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
++$as_echo "$ac_try_echo"; } >&5
++  (eval "$ac_compile") 2>conftest.err
++  ac_status=$?
++  if test -s conftest.err; then
++    grep -v '^ *+' conftest.err >conftest.er1
++    cat conftest.er1 >&5
++    mv -f conftest.er1 conftest.err
++  fi
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; } && {
++	 test -z "$ac_c_werror_flag" ||
++	 test ! -s conftest.err
++       } && test -s conftest.$ac_objext; then :
++  ac_retval=0
++else
++  $as_echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
+ 
+-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+-/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
++	ac_retval=1
++fi
++  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
++  as_fn_set_status $ac_retval
+ 
+-/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
+-/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
+-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+-hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
+-/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
+-/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
+-/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
++} # ac_fn_c_try_compile
+ 
+-_ASUNAME
++# ac_fn_cxx_try_compile LINENO
++# ----------------------------
++# Try to compile conftest.$ac_ext, and return whether this succeeded.
++ac_fn_cxx_try_compile ()
++{
++  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
++  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 ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
++$as_echo "$ac_try_echo"; } >&5
++  (eval "$ac_compile") 2>conftest.err
++  ac_status=$?
++  if test -s conftest.err; then
++    grep -v '^ *+' conftest.err >conftest.er1
++    cat conftest.er1 >&5
++    mv -f conftest.er1 conftest.err
++  fi
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; } && {
++	 test -z "$ac_cxx_werror_flag" ||
++	 test ! -s conftest.err
++       } && test -s conftest.$ac_objext; then :
++  ac_retval=0
++else
++  $as_echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++	ac_retval=1
++fi
++  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
++  as_fn_set_status $ac_retval
++
++} # ac_fn_cxx_try_compile
++
++# ac_fn_c_try_link LINENO
++# -----------------------
++# Try to link conftest.$ac_ext, and return whether this succeeded.
++ac_fn_c_try_link ()
++{
++  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
++  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 ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
++$as_echo "$ac_try_echo"; } >&5
++  (eval "$ac_link") 2>conftest.err
++  ac_status=$?
++  if test -s conftest.err; then
++    grep -v '^ *+' conftest.err >conftest.er1
++    cat conftest.er1 >&5
++    mv -f conftest.er1 conftest.err
++  fi
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; } && {
++	 test -z "$ac_c_werror_flag" ||
++	 test ! -s conftest.err
++       } && test -s conftest$ac_exeext && {
++	 test "$cross_compiling" = yes ||
++	 $as_test_x conftest$ac_exeext
++       }; then :
++  ac_retval=0
++else
++  $as_echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++	ac_retval=1
++fi
++  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
++  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
++  # interfere with the next link command; also delete a directory that is
++  # left behind by Apple's compiler.  We do this before executing the actions.
++  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
++  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
++  as_fn_set_status $ac_retval
++
++} # ac_fn_c_try_link
++
++# ac_fn_c_try_cpp LINENO
++# ----------------------
++# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
++ac_fn_c_try_cpp ()
++{
++  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
++  if { { ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++  *) ac_try_echo=$ac_try;;
++esac
++eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
++$as_echo "$ac_try_echo"; } >&5
++  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
++  ac_status=$?
++  if test -s conftest.err; then
++    grep -v '^ *+' conftest.err >conftest.er1
++    cat conftest.er1 >&5
++    mv -f conftest.er1 conftest.err
++  fi
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; } > conftest.i && {
++	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
++	 test ! -s conftest.err
++       }; then :
++  ac_retval=0
++else
++  $as_echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++    ac_retval=1
++fi
++  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
++  as_fn_set_status $ac_retval
++
++} # ac_fn_c_try_cpp
++
++# ac_fn_c_try_run LINENO
++# ----------------------
++# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
++# that executables *can* be run.
++ac_fn_c_try_run ()
++{
++  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
++  if { { ac_try="$ac_link"
++case "(($ac_try" in
++  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++  *) ac_try_echo=$ac_try;;
++esac
++eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
++$as_echo "$ac_try_echo"; } >&5
++  (eval "$ac_link") 2>&5
++  ac_status=$?
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
++  { { case "(($ac_try" in
++  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++  *) ac_try_echo=$ac_try;;
++esac
++eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
++$as_echo "$ac_try_echo"; } >&5
++  (eval "$ac_try") 2>&5
++  ac_status=$?
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; }; }; then :
++  ac_retval=0
++else
++  $as_echo "$as_me: program exited with status $ac_status" >&5
++       $as_echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
+ 
+-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
++       ac_retval=$ac_status
++fi
++  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
++  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
++  as_fn_set_status $ac_retval
+ 
+-} >&5
++} # ac_fn_c_try_run
+ 
+-cat >&5 <<_ACEOF
++# ac_fn_c_check_func LINENO FUNC VAR
++# ----------------------------------
++# Tests whether FUNC exists, setting the cache variable VAR accordingly
++ac_fn_c_check_func ()
++{
++  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
++$as_echo_n "checking for $2... " >&6; }
++if eval \${$3+:} false; then :
++  $as_echo_n "(cached) " >&6
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
++   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
++#define $2 innocuous_$2
+ 
++/* System header to define __stub macros and hopefully few prototypes,
++    which can conflict with char $2 (); 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 $2
++
++/* 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 $2 ();
++/* 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_$2 || defined __stub___$2
++choke me
++#endif
++
++int
++main ()
++{
++return $2 ();
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_link "$LINENO"; then :
++  eval "$3=yes"
++else
++  eval "$3=no"
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++fi
++eval ac_res=\$$3
++	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
++$as_echo "$ac_res" >&6; }
++  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
++
++} # ac_fn_c_check_func
++
++# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
++# -------------------------------------------------------
++# Tests whether HEADER exists, giving a warning if it cannot be compiled using
++# the include files in INCLUDES and setting the cache variable VAR
++# accordingly.
++ac_fn_c_check_header_mongrel ()
++{
++  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
++  if eval \${$3+:} false; then :
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
++$as_echo_n "checking for $2... " >&6; }
++if eval \${$3+:} false; then :
++  $as_echo_n "(cached) " >&6
++fi
++eval ac_res=\$$3
++	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
++$as_echo "$ac_res" >&6; }
++else
++  # Is the header compilable?
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
++$as_echo_n "checking $2 usability... " >&6; }
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++$4
++#include <$2>
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_header_compiler=yes
++else
++  ac_header_compiler=no
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
++$as_echo "$ac_header_compiler" >&6; }
++
++# Is the header present?
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
++$as_echo_n "checking $2 presence... " >&6; }
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <$2>
++_ACEOF
++if ac_fn_c_try_cpp "$LINENO"; then :
++  ac_header_preproc=yes
++else
++  ac_header_preproc=no
++fi
++rm -f conftest.err conftest.i conftest.$ac_ext
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
++$as_echo "$ac_header_preproc" >&6; }
++
++# So?  What about this header?
++case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
++  yes:no: )
++    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
++$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
++    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
++$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
++    ;;
++  no:yes:* )
++    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
++$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
++    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
++$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
++    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
++$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
++    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
++$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
++    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
++$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
++    ;;
++esac
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
++$as_echo_n "checking for $2... " >&6; }
++if eval \${$3+:} false; then :
++  $as_echo_n "(cached) " >&6
++else
++  eval "$3=\$ac_header_compiler"
++fi
++eval ac_res=\$$3
++	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
++$as_echo "$ac_res" >&6; }
++fi
++  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
++
++} # ac_fn_c_check_header_mongrel
++
++# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
++# -------------------------------------------------------
++# Tests whether HEADER exists and can be compiled using the include files in
++# INCLUDES, setting the cache variable VAR accordingly.
++ac_fn_c_check_header_compile ()
++{
++  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
++$as_echo_n "checking for $2... " >&6; }
++if eval \${$3+:} false; then :
++  $as_echo_n "(cached) " >&6
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++$4
++#include <$2>
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++  eval "$3=yes"
++else
++  eval "$3=no"
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++eval ac_res=\$$3
++	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
++$as_echo "$ac_res" >&6; }
++  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
++
++} # ac_fn_c_check_header_compile
++
++# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
++# ---------------------------------------------
++# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
++# accordingly.
++ac_fn_c_check_decl ()
++{
++  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
++  as_decl_name=`echo $2|sed 's/ *(.*//'`
++  as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
++$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
++if eval \${$3+:} false; then :
++  $as_echo_n "(cached) " >&6
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++$4
++int
++main ()
++{
++#ifndef $as_decl_name
++#ifdef __cplusplus
++  (void) $as_decl_use;
++#else
++  (void) $as_decl_name;
++#endif
++#endif
++
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++  eval "$3=yes"
++else
++  eval "$3=no"
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++eval ac_res=\$$3
++	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
++$as_echo "$ac_res" >&6; }
++  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
++
++} # ac_fn_c_check_decl
++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.68.  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=.
++    $as_echo "PATH: $as_dir"
++  done
++IFS=$as_save_IFS
++
++} >&5
++
++cat >&5 <<_ACEOF
++
++
++## ----------- ##
+ ## Core tests. ##
+ ## ----------- ##
+ 
+@@ -1141,7 +2166,6 @@
+ ac_configure_args=
+ ac_configure_args0=
+ ac_configure_args1=
+-ac_sep=
+ ac_must_keep_next=false
+ for ac_pass in 1 2
+ do
+@@ -1152,13 +2176,13 @@
+     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+     | -silent | --silent | --silen | --sile | --sil)
+       continue ;;
+-    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+-      ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
++    *\'*)
++      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+     esac
+     case $ac_pass in
+-    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
++    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
+     2)
+-      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
++      as_fn_append ac_configure_args1 " '$ac_arg'"
+       if test $ac_must_keep_next = true; then
+ 	ac_must_keep_next=false # Got value, back to normal.
+       else
+@@ -1174,104 +2198,115 @@
+ 	  -* ) ac_must_keep_next=true ;;
+ 	esac
+       fi
+-      ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
+-      # Get rid of the leading space.
+-      ac_sep=" "
++      as_fn_append 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; }
++{ ac_configure_args0=; unset ac_configure_args0;}
++{ ac_configure_args1=; unset 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: Be sure not to use single quotes in there, as some shells,
+-# such as our DU 5.0 friend, will then `close' the trap.
++# 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
+-## ---------------- ##
++    $as_echo "## ---------------- ##
+ ## 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_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
++$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
++      esac
++      case $ac_var in #(
++      _ | IFS | as_nl) ;; #(
++      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
++      *) { eval $ac_var=; unset $ac_var;} ;;
++      esac ;;
++    esac
++  done
+   (set) 2>&1 |
+-    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
+-    *ac_space=\ *)
++    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"
+-      ;;
++	"s/'\''/'\''\\\\'\'''\''/g;
++	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
++      ;; #(
+     *)
+-      sed -n \
+-	"s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
++      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+       ;;
+-    esac;
+-}
++    esac |
++    sort
++)
+     echo
+ 
+-    cat <<\_ASBOX
+-## ----------------- ##
++    $as_echo "## ----------------- ##
+ ## Output variables. ##
+-## ----------------- ##
+-_ASBOX
++## ----------------- ##"
+     echo
+     for ac_var in $ac_subst_vars
+     do
+-      eval ac_val=$`echo $ac_var`
+-      echo "$ac_var='"'"'$ac_val'"'"'"
++      eval ac_val=\$$ac_var
++      case $ac_val in
++      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
++      esac
++      $as_echo "$ac_var='\''$ac_val'\''"
+     done | sort
+     echo
+ 
+     if test -n "$ac_subst_files"; then
+-      cat <<\_ASBOX
+-## ------------- ##
+-## Output files. ##
+-## ------------- ##
+-_ASBOX
++      $as_echo "## ------------------- ##
++## File substitutions. ##
++## ------------------- ##"
+       echo
+       for ac_var in $ac_subst_files
+       do
+-	eval ac_val=$`echo $ac_var`
+-	echo "$ac_var='"'"'$ac_val'"'"'"
++	eval ac_val=\$$ac_var
++	case $ac_val in
++	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
++	esac
++	$as_echo "$ac_var='\''$ac_val'\''"
+       done | sort
+       echo
+     fi
+ 
+     if test -s confdefs.h; then
+-      cat <<\_ASBOX
+-## ----------- ##
++      $as_echo "## ----------- ##
+ ## confdefs.h. ##
+-## ----------- ##
+-_ASBOX
++## ----------- ##"
+       echo
+-      sed "/^$/d" confdefs.h | sort
++      cat confdefs.h
+       echo
+     fi
+     test "$ac_signal" != 0 &&
+-      echo "$as_me: caught signal $ac_signal"
+-    echo "$as_me: exit $exit_status"
++      $as_echo "$as_me: caught signal $ac_signal"
++    $as_echo "$as_me: exit $exit_status"
+   } >&5
+-  rm -f core *.core &&
+-  rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
++  rm -f core *.core core.conftest.* &&
++    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+     exit $exit_status
+-     ' 0
++' 0
+ for ac_signal in 1 2 13 15; do
+-  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
++  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
+ done
+ ac_signal=0
+ 
+ # confdefs.h avoids OS command line length limits that DEFS can exceed.
+-rm -rf conftest* confdefs.h
+-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+-echo >confdefs.h
++rm -f -r conftest* confdefs.h
++
++$as_echo "/* confdefs.h */" > confdefs.h
+ 
+ # Predefined preprocessor variables.
+ 
+@@ -1279,112 +2314,137 @@
+ #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
+ 
++cat >>confdefs.h <<_ACEOF
++#define PACKAGE_URL "$PACKAGE_URL"
++_ACEOF
++
+ 
+ # Let the site file select an alternate cache file if it wants to.
+-# Prefer explicitly selected file to automatically selected ones.
+-if test -z "$CONFIG_SITE"; then
+-  if test "x$prefix" != xNONE; then
+-    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+-  else
+-    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+-  fi
+-fi
+-for ac_site_file in $CONFIG_SITE; do
+-  if test -r "$ac_site_file"; then
+-    { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+-echo "$as_me: loading site script $ac_site_file" >&6;}
++# Prefer an explicitly selected file to automatically selected ones.
++ac_site_file1=NONE
++ac_site_file2=NONE
++if test -n "$CONFIG_SITE"; then
++  # We do not want a PATH search for config.site.
++  case $CONFIG_SITE in #((
++    -*)  ac_site_file1=./$CONFIG_SITE;;
++    */*) ac_site_file1=$CONFIG_SITE;;
++    *)   ac_site_file1=./$CONFIG_SITE;;
++  esac
++elif test "x$prefix" != xNONE; then
++  ac_site_file1=$prefix/share/config.site
++  ac_site_file2=$prefix/etc/config.site
++else
++  ac_site_file1=$ac_default_prefix/share/config.site
++  ac_site_file2=$ac_default_prefix/etc/config.site
++fi
++for ac_site_file in "$ac_site_file1" "$ac_site_file2"
++do
++  test "x$ac_site_file" = xNONE && continue
++  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
++    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
++$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+     sed 's/^/| /' "$ac_site_file" >&5
+-    . "$ac_site_file"
++    . "$ac_site_file" \
++      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
++as_fn_error $? "failed to load site script $ac_site_file
++See \`config.log' for more details" "$LINENO" 5; }
+   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;}
++  # Some versions of bash will fail to source /dev/null (special files
++  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
++  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
++    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
++$as_echo "$as_me: loading cache $cache_file" >&6;}
+     case $cache_file in
+-      [\\/]* | ?:[\\/]* ) . $cache_file;;
+-      *)                      . ./$cache_file;;
++      [\\/]* | ?:[\\/]* ) . "$cache_file";;
++      *)                      . "./$cache_file";;
+     esac
+   fi
+ else
+-  { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+-echo "$as_me: creating cache $cache_file" >&6;}
++  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
++$as_echo "$as_me: creating cache $cache_file" >&6;}
+   >$cache_file
+ fi
+ 
+ # Check that the precious variables saved in the cache have kept the same
+ # value.
+ ac_cache_corrupted=false
+-for ac_var in `(set) 2>&1 |
+-	       sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
++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"
++  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;}
++      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
++$as_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;}
++      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
++$as_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=:
++	# differences in whitespace do not lead to failure.
++	ac_old_val_w=`echo x $ac_old_val`
++	ac_new_val_w=`echo x $ac_new_val`
++	if test "$ac_old_val_w" != "$ac_new_val_w"; then
++	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
++$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
++	  ac_cache_corrupted=:
++	else
++	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
++$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
++	  eval $ac_var=\$ac_old_val
++	fi
++	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
++$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
++	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
++$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
+       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=`$as_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'" ;;
++      *) as_fn_append 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
++  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
++  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
++$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
++  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
++fi
++## -------------------- ##
++## Main body of script. ##
++## -------------------- ##
+ 
+ ac_ext=c
+ ac_cpp='$CPP $CPPFLAGS'
+@@ -1394,23 +2454,6 @@
+ 
+ 
+ 
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+ ac_ext=c
+ ac_cpp='$CPP $CPPFLAGS'
+ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+@@ -1419,10 +2462,10 @@
+ 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
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if ${ac_cv_prog_CC+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   if test -n "$CC"; then
+   ac_cv_prog_CC="$CC" # Let the user override the test.
+@@ -1432,35 +2475,37 @@
+ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+-  for ac_exec_ext in '' $ac_executable_extensions; do
+-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+   fi
+ done
+-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
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
++$as_echo "$CC" >&6; }
+ else
+-  echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "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
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if ${ac_cv_prog_ac_ct_CC+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   if test -n "$ac_ct_CC"; then
+   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+@@ -1470,39 +2515,50 @@
+ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+-  for ac_exec_ext in '' $ac_executable_extensions; do
+-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+   fi
+ done
+-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
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
++$as_echo "$ac_ct_CC" >&6; }
+ else
+-  echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+ fi
+ 
+-  CC=$ac_ct_CC
++  if test "x$ac_ct_CC" = x; then
++    CC=""
++  else
++    case $cross_compiling:$ac_tool_warned in
++yes:)
++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&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.
++          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
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if ${ac_cv_prog_CC+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   if test -n "$CC"; then
+   ac_cv_prog_CC="$CC" # Let the user override the test.
+@@ -1512,77 +2568,37 @@
+ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+-  for ac_exec_ext in '' $ac_executable_extensions; do
+-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+   fi
+ done
+-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 "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_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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+-    ac_cv_prog_ac_ct_CC="cc"
+-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+-    break 2
+-  fi
+-done
+-done
+-
+-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
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
++$as_echo "$CC" >&6; }
+ else
+-  echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+ fi
+ 
+-  CC=$ac_ct_CC
+-else
+-  CC="$ac_cv_prog_CC"
+-fi
+ 
++  fi
+ fi
+ if test -z "$CC"; then
+   # Extract the first word of "cc", so it can be a program name with args.
+ set dummy cc; ac_word=$2
+-echo "$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
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if ${ac_cv_prog_CC+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   if test -n "$CC"; then
+   ac_cv_prog_CC="$CC" # Let the user override the test.
+@@ -1593,18 +2609,19 @@
+ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+-  for ac_exec_ext in '' $ac_executable_extensions; do
+-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+   fi
+ done
+-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.
+@@ -1622,24 +2639,25 @@
+ fi
+ CC=$ac_cv_prog_CC
+ if test -n "$CC"; then
+-  echo "$as_me:$LINENO: result: $CC" >&5
+-echo "${ECHO_T}$CC" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
++$as_echo "$CC" >&6; }
+ else
+-  echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+ fi
+ 
++
+ fi
+ if test -z "$CC"; then
+   if test -n "$ac_tool_prefix"; then
+-  for ac_prog in cl
++  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
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if ${ac_cv_prog_CC+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   if test -n "$CC"; then
+   ac_cv_prog_CC="$CC" # Let the user override the test.
+@@ -1649,39 +2667,41 @@
+ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+-  for ac_exec_ext in '' $ac_executable_extensions; do
+-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+   fi
+ done
+-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
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
++$as_echo "$CC" >&6; }
+ else
+-  echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+ fi
+ 
++
+     test -n "$CC" && break
+   done
+ fi
+ if test -z "$CC"; then
+   ac_ct_CC=$CC
+-  for ac_prog in cl
++  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
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if ${ac_cv_prog_ac_ct_CC+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   if test -n "$ac_ct_CC"; then
+   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+@@ -1691,66 +2711,78 @@
+ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+-  for ac_exec_ext in '' $ac_executable_extensions; do
+-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+   fi
+ done
+-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
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
++$as_echo "$ac_ct_CC" >&6; }
+ else
+-  echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+ fi
+ 
++
+   test -n "$ac_ct_CC" && break
+ done
+ 
+-  CC=$ac_ct_CC
++  if test "x$ac_ct_CC" = x; then
++    CC=""
++  else
++    case $cross_compiling:$ac_tool_warned in
++yes:)
++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&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; }; }
++test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
++as_fn_error $? "no acceptable C compiler found in \$PATH
++See \`config.log' for more details" "$LINENO" 5; }
+ 
+ # Provide some information about the compiler.
+-echo "$as_me:$LINENO:" \
+-     "checking for C compiler version" >&5
+-ac_compiler=`set X $ac_compile; echo $2`
+-{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+-  (eval $ac_compiler --version </dev/null >&5) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }
+-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+-  (eval $ac_compiler -v </dev/null >&5) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }
+-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+-  (eval $ac_compiler -V </dev/null >&5) 2>&5
++$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
++set X $ac_compile
++ac_compiler=$2
++for ac_option in --version -v -V -qversion; do
++  { { ac_try="$ac_compiler $ac_option >&5"
++case "(($ac_try" in
++  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++  *) ac_try_echo=$ac_try;;
++esac
++eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
++$as_echo "$ac_try_echo"; } >&5
++  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+   ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }
++  if test -s conftest.err; then
++    sed '10a\
++... rest of stderr output deleted ...
++         10q' conftest.err >conftest.er1
++    cat conftest.er1 >&5
++  fi
++  rm -f conftest.er1 conftest.err
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; }
++done
+ 
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+ int
+@@ -1762,112 +2794,108 @@
+ }
+ _ACEOF
+ ac_clean_files_save=$ac_clean_files
+-ac_clean_files="$ac_clean_files a.out a.exe b.out"
++ac_clean_files="$ac_clean_files a.out a.out.dSYM 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[^ ]*//'`
+-if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
+-  (eval $ac_link_default) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; then
+-  # Find the output, starting from the most likely.  This scheme is
+-# not robust to junk in `.', hence go to wildcards (a.*) only as a last
+-# resort.
+-
+-# Be careful to initialize this variable, since it used to be cached.
+-# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
+-ac_cv_exeext=
+-# b.out is created by i960 compilers.
+-for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
++$as_echo_n "checking whether the C compiler works... " >&6; }
++ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
++
++# The possible output files:
++ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
++
++ac_rmfiles=
++for ac_file in $ac_files
++do
++  case $ac_file in
++    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.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 ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
++$as_echo "$ac_try_echo"; } >&5
++  (eval "$ac_link_default") 2>&5
++  ac_status=$?
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; }; 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 | *.o | *.obj )
+-	;;
+-    conftest.$ac_ext )
+-	# This is the source file.
++    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
+ 	;;
+     [ab].out )
+ 	# We found the default executable, but exeext='' is most
+ 	# certainly right.
+ 	break;;
+     *.* )
+-	ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+-	# FIXME: I believe we export ac_cv_exeext for Libtool,
+-	# but it would be cool to find out if it's true.  Does anybody
+-	# maintain Libtool? --akim.
+-	export ac_cv_exeext
++	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
++  ac_file=''
++fi
++if test -z "$ac_file"; then :
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++$as_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; }; }
++{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
++as_fn_error 77 "C compiler cannot create executables
++See \`config.log' for more details" "$LINENO" 5; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
+ fi
+-
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
++$as_echo_n "checking for C compiler default output file name... " >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
++$as_echo "$ac_file" >&6; }
+ ac_exeext=$ac_cv_exeext
+-echo "$as_me:$LINENO: result: $ac_file" >&5
+-echo "${ECHO_T}$ac_file" >&6
+ 
+-# Check the compiler produces executables we can run.  If not, either
+-# the compiler is broken, or we cross compile.
+-echo "$as_me:$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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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
++rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
+ ac_clean_files=$ac_clean_files_save
+-# Check the compiler produces executables we can run.  If not, either
+-# the compiler is broken, or we cross compile.
+-echo "$as_me:$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 { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+-  (eval $ac_link) 2>&5
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
++$as_echo_n "checking for suffix of executables... " >&6; }
++if { { ac_try="$ac_link"
++case "(($ac_try" in
++  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++  *) ac_try_echo=$ac_try;;
++esac
++eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
++$as_echo "$ac_try_echo"; } >&5
++  (eval "$ac_link") 2>&5
+   ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; then
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; }; 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
+@@ -1875,38 +2903,90 @@
+ 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 | *.o | *.obj ) ;;
++    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+-	  export ac_cv_exeext
+ 	  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
++  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
++as_fn_error $? "cannot compute suffix of executables: cannot compile and link
++See \`config.log' for more details" "$LINENO" 5; }
++fi
++rm -f conftest conftest$ac_cv_exeext
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
++$as_echo "$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.  */
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <stdio.h>
++int
++main ()
++{
++FILE *f = fopen ("conftest.out", "w");
++ return ferror (f) || fclose (f) != 0;
++
++  ;
++  return 0;
++}
+ _ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++ac_clean_files="$ac_clean_files conftest.out"
++# Check that the compiler produces executables we can run.  If not, either
++# the compiler is broken, or we cross compile.
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
++$as_echo_n "checking whether we are cross compiling... " >&6; }
++if test "$cross_compiling" != yes; then
++  { { ac_try="$ac_link"
++case "(($ac_try" in
++  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++  *) ac_try_echo=$ac_try;;
++esac
++eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
++$as_echo "$ac_try_echo"; } >&5
++  (eval "$ac_link") 2>&5
++  ac_status=$?
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; }
++  if { ac_try='./conftest$ac_cv_exeext'
++  { { case "(($ac_try" in
++  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++  *) ac_try_echo=$ac_try;;
++esac
++eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
++$as_echo "$ac_try_echo"; } >&5
++  (eval "$ac_try") 2>&5
++  ac_status=$?
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; }; }; then
++    cross_compiling=no
++  else
++    if test "$cross_compiling" = maybe; then
++	cross_compiling=yes
++    else
++	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
++as_fn_error $? "cannot run C compiled programs.
++If you meant to cross compile, use \`--host'.
++See \`config.log' for more details" "$LINENO" 5; }
++    fi
++  fi
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
++$as_echo "$cross_compiling" >&6; }
++
++rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
++ac_clean_files=$ac_clean_files_save
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
++$as_echo_n "checking for suffix of object files... " >&6; }
++if ${ac_cv_objext+:} false; then :
++  $as_echo_n "(cached) " >&6
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+ int
+@@ -1918,45 +2998,46 @@
+ }
+ _ACEOF
+ rm -f conftest.o conftest.obj
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+-  (eval $ac_compile) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; then
+-  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
++if { { ac_try="$ac_compile"
++case "(($ac_try" in
++  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++  *) ac_try_echo=$ac_try;;
++esac
++eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
++$as_echo "$ac_try_echo"; } >&5
++  (eval "$ac_compile") 2>&5
++  ac_status=$?
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; }; 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 ) ;;
++    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
+     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+        break;;
+   esac
+ done
+ else
+-  echo "$as_me: failed program was:" >&5
++  $as_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; }; }
++{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
++as_fn_error $? "cannot compute suffix of object files: cannot compile
++See \`config.log' for more details" "$LINENO" 5; }
+ 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
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
++$as_echo "$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
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
++$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
++if ${ac_cv_c_compiler_gnu+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+ int
+@@ -1970,55 +3051,34 @@
+   return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++if ac_fn_c_try_compile "$LINENO"; then :
+   ac_compiler_gnu=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-ac_compiler_gnu=no
++  ac_compiler_gnu=no
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++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`
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
++$as_echo "$ac_cv_c_compiler_gnu" >&6; }
++if test $ac_compiler_gnu = yes; then
++  GCC=yes
++else
++  GCC=
++fi
+ ac_test_CFLAGS=${CFLAGS+set}
+ ac_save_CFLAGS=$CFLAGS
+-CFLAGS="-g"
+-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
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
++$as_echo_n "checking whether $CC accepts -g... " >&6; }
++if ${ac_cv_prog_cc_g+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++  ac_save_c_werror_flag=$ac_c_werror_flag
++   ac_c_werror_flag=yes
++   ac_cv_prog_cc_g=no
++   CFLAGS="-g"
++   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+ int
+@@ -2029,39 +3089,49 @@
+   return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++if ac_fn_c_try_compile "$LINENO"; then :
+   ac_cv_prog_cc_g=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
++  CFLAGS=""
++      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++
++int
++main ()
++{
++
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++
++else
++  ac_c_werror_flag=$ac_save_c_werror_flag
++	 CFLAGS="-g"
++	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++
++int
++main ()
++{
+ 
+-ac_cv_prog_cc_g=no
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_cv_prog_cc_g=yes
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+-echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
++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
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
++$as_echo "$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
+@@ -2077,18 +3147,14 @@
+     CFLAGS=
+   fi
+ fi
+-echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
+-echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
+-if test "${ac_cv_prog_cc_stdc+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
++$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
++if ${ac_cv_prog_cc_c89+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+-  ac_cv_prog_cc_stdc=no
++  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
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ #include <stdarg.h>
+ #include <stdio.h>
+@@ -2116,12 +3182,17 @@
+ /* 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 -std1 is added to get
++   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 -std1.  */
++   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);};
+@@ -2136,225 +3207,61 @@
+   return 0;
+ }
+ _ACEOF
+-# Don't try gcc -ansi; that turns off useful extensions and
+-# breaks some systems' header files.
+-# AIX			-qlanglvl=ansi
+-# Ultrix and OSF/1	-std1
+-# HP-UX 10.20 and later	-Ae
+-# HP-UX older versions	-Aa -D_HPUX_SOURCE
+-# SVR4			-Xc -D__EXTENSIONS__
+-for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
++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 { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
+-  ac_cv_prog_cc_stdc=$ac_arg
+-break
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
++  if ac_fn_c_try_compile "$LINENO"; then :
++  ac_cv_prog_cc_c89=$ac_arg
+ fi
+-rm -f conftest.err conftest.$ac_objext
++rm -f core conftest.err conftest.$ac_objext
++  test "x$ac_cv_prog_cc_c89" != "xno" && break
+ done
+-rm -f conftest.$ac_ext conftest.$ac_objext
++rm -f conftest.$ac_ext
+ CC=$ac_save_CC
+ 
+ fi
+-
+-case "x$ac_cv_prog_cc_stdc" in
+-  x|xno)
+-    echo "$as_me:$LINENO: result: none needed" >&5
+-echo "${ECHO_T}none needed" >&6 ;;
++# AC_CACHE_VAL
++case "x$ac_cv_prog_cc_c89" in
++  x)
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
++$as_echo "none needed" >&6; } ;;
++  xno)
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
++$as_echo "unsupported" >&6; } ;;
+   *)
+-    echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
+-echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
+-    CC="$CC $ac_cv_prog_cc_stdc" ;;
+-esac
+-
+-# Some people use a C++ compiler to compile C.  Since we use `exit',
+-# in C++ we need to declare it.  In case someone uses the same compiler
+-# for both compiling C and C++ we need to have the C++ compiler decide
+-# the declaration of exit, since it's the most demanding environment.
+-cat >conftest.$ac_ext <<_ACEOF
+-#ifndef __cplusplus
+-  choke me
+-#endif
+-_ACEOF
+-rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
+-  for ac_declaration in \
+-   '' \
+-   'extern "C" void std::exit (int) throw (); using std::exit;' \
+-   'extern "C" void std::exit (int); using std::exit;' \
+-   'extern "C" void exit (int) throw ();' \
+-   'extern "C" void exit (int);' \
+-   'void exit (int);'
+-do
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-$ac_declaration
+-#include <stdlib.h>
+-int
+-main ()
+-{
+-exit (42);
+-  ;
+-  return 0;
+-}
+-_ACEOF
+-rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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
+-
+-continue
+-fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-$ac_declaration
+-int
+-main ()
+-{
+-exit (42);
+-  ;
+-  return 0;
+-}
+-_ACEOF
+-rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
+-  break
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
++    CC="$CC $ac_cv_prog_cc_c89"
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
++$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
++esac
++if test "x$ac_cv_prog_cc_c89" != xno; then :
+ 
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+-done
+-rm -f conftest*
+-if test -n "$ac_declaration"; then
+-  echo '#ifdef __cplusplus' >>confdefs.h
+-  echo $ac_declaration      >>confdefs.h
+-  echo '#endif'             >>confdefs.h
+-fi
+ 
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ ac_cpp='$CPP $CPPFLAGS'
+ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ 
+-ac_ext=cc
++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 -n "$ac_tool_prefix"; then
+-  for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
++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
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if ${ac_cv_prog_CXX+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   if test -n "$CXX"; then
+   ac_cv_prog_CXX="$CXX" # Let the user override the test.
+@@ -2364,39 +3271,41 @@
+ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+-  for ac_exec_ext in '' $ac_executable_extensions; do
+-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+   fi
+ done
+-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
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
++$as_echo "$CXX" >&6; }
+ else
+-  echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+ fi
+ 
++
+     test -n "$CXX" && break
+   done
+ fi
+ if test -z "$CXX"; then
+   ac_ct_CXX=$CXX
+-  for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
++  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
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if ${ac_cv_prog_ac_ct_CXX+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   if test -n "$ac_ct_CXX"; then
+   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
+@@ -2406,64 +3315,77 @@
+ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+-  for ac_exec_ext in '' $ac_executable_extensions; do
+-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+   fi
+ done
+-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
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
++$as_echo "$ac_ct_CXX" >&6; }
+ else
+-  echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+ fi
+ 
++
+   test -n "$ac_ct_CXX" && break
+ done
+-test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
+ 
+-  CXX=$ac_ct_CXX
++  if test "x$ac_ct_CXX" = x; then
++    CXX="g++"
++  else
++    case $cross_compiling:$ac_tool_warned in
++yes:)
++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&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`
+-{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+-  (eval $ac_compiler --version </dev/null >&5) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }
+-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+-  (eval $ac_compiler -v </dev/null >&5) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }
+-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+-  (eval $ac_compiler -V </dev/null >&5) 2>&5
++$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
++set X $ac_compile
++ac_compiler=$2
++for ac_option in --version -v -V -qversion; do
++  { { ac_try="$ac_compiler $ac_option >&5"
++case "(($ac_try" in
++  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++  *) ac_try_echo=$ac_try;;
++esac
++eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
++$as_echo "$ac_try_echo"; } >&5
++  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+   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
++  if test -s conftest.err; then
++    sed '10a\
++... rest of stderr output deleted ...
++         10q' conftest.err >conftest.er1
++    cat conftest.er1 >&5
++  fi
++  rm -f conftest.er1 conftest.err
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; }
++done
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
++$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
++if ${ac_cv_cxx_compiler_gnu+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+ int
+@@ -2477,55 +3399,34 @@
+   return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++if ac_fn_cxx_try_compile "$LINENO"; then :
+   ac_compiler_gnu=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-ac_compiler_gnu=no
++  ac_compiler_gnu=no
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++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`
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
++$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
++if test $ac_compiler_gnu = yes; then
++  GXX=yes
++else
++  GXX=
++fi
+ ac_test_CXXFLAGS=${CXXFLAGS+set}
+ ac_save_CXXFLAGS=$CXXFLAGS
+-CXXFLAGS="-g"
+-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
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
++$as_echo_n "checking whether $CXX accepts -g... " >&6; }
++if ${ac_cv_prog_cxx_g+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
++   ac_cxx_werror_flag=yes
++   ac_cv_prog_cxx_g=no
++   CXXFLAGS="-g"
++   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+ int
+@@ -2536,160 +3437,64 @@
+   return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++if ac_fn_cxx_try_compile "$LINENO"; then :
+   ac_cv_prog_cxx_g=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-ac_cv_prog_cxx_g=no
+-fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+-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
+-for ac_declaration in \
+-   '' \
+-   'extern "C" void std::exit (int) throw (); using std::exit;' \
+-   'extern "C" void std::exit (int); using std::exit;' \
+-   'extern "C" void exit (int) throw ();' \
+-   'extern "C" void exit (int);' \
+-   'void exit (int);'
+-do
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++  CXXFLAGS=""
++      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+-$ac_declaration
+-#include <stdlib.h>
++
+ int
+ main ()
+ {
+-exit (42);
++
+   ;
+   return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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
++if ac_fn_cxx_try_compile "$LINENO"; then :
+ 
+-continue
+-fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++else
++  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
++	 CXXFLAGS="-g"
++	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+-$ac_declaration
++
+ int
+ main ()
+ {
+-exit (42);
++
+   ;
+   return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
+-  break
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
++if ac_fn_cxx_try_compile "$LINENO"; then :
++  ac_cv_prog_cxx_g=yes
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+-done
+-rm -f conftest*
+-if test -n "$ac_declaration"; then
+-  echo '#ifdef __cplusplus' >>confdefs.h
+-  echo $ac_declaration      >>confdefs.h
+-  echo '#endif'             >>confdefs.h
++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
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
++$as_echo "$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'
+@@ -2699,10 +3504,10 @@
+ if test -n "$ac_tool_prefix"; then
+   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+ set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+-echo "$as_me:$LINENO: checking for $ac_word" >&5
+-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+-if test "${ac_cv_prog_RANLIB+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if ${ac_cv_prog_RANLIB+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   if test -n "$RANLIB"; then
+   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+@@ -2712,35 +3517,37 @@
+ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+-  for ac_exec_ext in '' $ac_executable_extensions; do
+-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+   fi
+ done
+-done
++  done
++IFS=$as_save_IFS
+ 
+ fi
+ fi
+ RANLIB=$ac_cv_prog_RANLIB
+ if test -n "$RANLIB"; then
+-  echo "$as_me:$LINENO: result: $RANLIB" >&5
+-echo "${ECHO_T}$RANLIB" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
++$as_echo "$RANLIB" >&6; }
+ else
+-  echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+ fi
+ 
++
+ fi
+ if test -z "$ac_cv_prog_RANLIB"; then
+   ac_ct_RANLIB=$RANLIB
+   # Extract the first word of "ranlib", so it can be a program name with args.
+ set dummy ranlib; ac_word=$2
+-echo "$as_me:$LINENO: checking for $ac_word" >&5
+-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+-if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   if test -n "$ac_ct_RANLIB"; then
+   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+@@ -2750,28 +3557,38 @@
+ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+-  for ac_exec_ext in '' $ac_executable_extensions; do
+-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_prog_ac_ct_RANLIB="ranlib"
+-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+   fi
+ done
+-done
++  done
++IFS=$as_save_IFS
+ 
+-  test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
+ fi
+ fi
+ ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+ if test -n "$ac_ct_RANLIB"; then
+-  echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
+-echo "${ECHO_T}$ac_ct_RANLIB" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
++$as_echo "$ac_ct_RANLIB" >&6; }
+ else
+-  echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+ fi
+ 
+-  RANLIB=$ac_ct_RANLIB
++  if test "x$ac_ct_RANLIB" = x; then
++    RANLIB=":"
++  else
++    case $cross_compiling:$ac_tool_warned in
++yes:)
++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
++ac_tool_warned=yes ;;
++esac
++    RANLIB=$ac_ct_RANLIB
++  fi
+ else
+   RANLIB="$ac_cv_prog_RANLIB"
+ fi
+@@ -2781,10 +3598,10 @@
+ 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_LEX+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if ${ac_cv_prog_LEX+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   if test -n "$LEX"; then
+   ac_cv_prog_LEX="$LEX" # Let the user override the test.
+@@ -2794,271 +3611,155 @@
+ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+-  for ac_exec_ext in '' $ac_executable_extensions; do
+-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_prog_LEX="$ac_prog"
+-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+   fi
+ done
+-done
++  done
++IFS=$as_save_IFS
+ 
+ fi
+ fi
+ LEX=$ac_cv_prog_LEX
+ if test -n "$LEX"; then
+-  echo "$as_me:$LINENO: result: $LEX" >&5
+-echo "${ECHO_T}$LEX" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5
++$as_echo "$LEX" >&6; }
+ else
+-  echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+ fi
+ 
++
+   test -n "$LEX" && break
+ done
+ test -n "$LEX" || LEX=":"
+ 
+-if test -z "$LEXLIB"
+-then
+-  echo "$as_me:$LINENO: checking for yywrap in -lfl" >&5
+-echo $ECHO_N "checking for yywrap in -lfl... $ECHO_C" >&6
+-if test "${ac_cv_lib_fl_yywrap+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lfl  $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
++if test "x$LEX" != "x:"; then
++  cat >conftest.l <<_ACEOF
++%%
++a { ECHO; }
++b { REJECT; }
++c { yymore (); }
++d { yyless (1); }
++e { yyless (input () != 0); }
++f { unput (yytext[0]); }
++. { BEGIN INITIAL; }
++%%
++#ifdef YYTEXT_POINTER
++extern char *yytext;
++#endif
++int
++main (void)
++{
++  return ! yylex () + ! yywrap ();
++}
+ _ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-
+-/* Override any gcc2 internal prototype to avoid an error.  */
+-#ifdef __cplusplus
+-extern "C"
+-#endif
+-/* We use char because int might match the return type of a gcc2
+-   builtin and then its argument prototype would still apply.  */
+-char yywrap ();
+-int
+-main ()
+-{
+-yywrap ();
+-  ;
+-  return 0;
+-}
+-_ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
+-  ac_cv_lib_fl_yywrap=yes
++{ { ac_try="$LEX conftest.l"
++case "(($ac_try" in
++  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++  *) ac_try_echo=$ac_try;;
++esac
++eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
++$as_echo "$ac_try_echo"; } >&5
++  (eval "$LEX conftest.l") 2>&5
++  ac_status=$?
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5
++$as_echo_n "checking lex output file root... " >&6; }
++if ${ac_cv_prog_lex_root+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+ 
+-ac_cv_lib_fl_yywrap=no
++if test -f lex.yy.c; then
++  ac_cv_prog_lex_root=lex.yy
++elif test -f lexyy.c; then
++  ac_cv_prog_lex_root=lexyy
++else
++  as_fn_error $? "cannot find output from $LEX; giving up" "$LINENO" 5
+ fi
+-rm -f 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_fl_yywrap" >&5
+-echo "${ECHO_T}$ac_cv_lib_fl_yywrap" >&6
+-if test $ac_cv_lib_fl_yywrap = yes; then
+-  LEXLIB="-lfl"
+-else
+-  echo "$as_me:$LINENO: checking for yywrap in -ll" >&5
+-echo $ECHO_N "checking for yywrap in -ll... $ECHO_C" >&6
+-if test "${ac_cv_lib_l_yywrap+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  ac_check_lib_save_LIBS=$LIBS
+-LIBS="-ll  $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5
++$as_echo "$ac_cv_prog_lex_root" >&6; }
++LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
+ 
+-/* Override any gcc2 internal prototype to avoid an error.  */
+-#ifdef __cplusplus
+-extern "C"
+-#endif
+-/* We use char because int might match the return type of a gcc2
+-   builtin and then its argument prototype would still apply.  */
+-char yywrap ();
+-int
+-main ()
+-{
+-yywrap ();
+-  ;
+-  return 0;
+-}
+-_ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
+-  ac_cv_lib_l_yywrap=yes
++if test -z "${LEXLIB+set}"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5
++$as_echo_n "checking lex library... " >&6; }
++if ${ac_cv_lib_lex+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+ 
+-ac_cv_lib_l_yywrap=no
+-fi
+-rm -f 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_l_yywrap" >&5
+-echo "${ECHO_T}$ac_cv_lib_l_yywrap" >&6
+-if test $ac_cv_lib_l_yywrap = yes; then
+-  LEXLIB="-ll"
++    ac_save_LIBS=$LIBS
++    ac_cv_lib_lex='none needed'
++    for ac_lib in '' -lfl -ll; do
++      LIBS="$ac_lib $ac_save_LIBS"
++      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++`cat $LEX_OUTPUT_ROOT.c`
++_ACEOF
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_lex=$ac_lib
+ fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++      test "$ac_cv_lib_lex" != 'none needed' && break
++    done
++    LIBS=$ac_save_LIBS
+ 
+ fi
+-
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5
++$as_echo "$ac_cv_lib_lex" >&6; }
++  test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex
+ fi
+ 
+-if test "x$LEX" != "x:"; then
+-  echo "$as_me:$LINENO: checking lex output file root" >&5
+-echo $ECHO_N "checking lex output file root... $ECHO_C" >&6
+-if test "${ac_cv_prog_lex_root+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  # The minimal lex program is just a single line: %%.  But some broken lexes
+-# (Solaris, I think it was) want two %% lines, so accommodate them.
+-cat >conftest.l <<_ACEOF
+-%%
+-%%
+-_ACEOF
+-{ (eval echo "$as_me:$LINENO: \"$LEX conftest.l\"") >&5
+-  (eval $LEX conftest.l) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }
+-if test -f lex.yy.c; then
+-  ac_cv_prog_lex_root=lex.yy
+-elif test -f lexyy.c; then
+-  ac_cv_prog_lex_root=lexyy
+-else
+-  { { echo "$as_me:$LINENO: error: cannot find output from $LEX; giving up" >&5
+-echo "$as_me: error: cannot find output from $LEX; giving up" >&2;}
+-   { (exit 1); exit 1; }; }
+-fi
+-fi
+-echo "$as_me:$LINENO: result: $ac_cv_prog_lex_root" >&5
+-echo "${ECHO_T}$ac_cv_prog_lex_root" >&6
+-rm -f conftest.l
+-LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
+ 
+-echo "$as_me:$LINENO: checking whether yytext is a pointer" >&5
+-echo $ECHO_N "checking whether yytext is a pointer... $ECHO_C" >&6
+-if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5
++$as_echo_n "checking whether yytext is a pointer... " >&6; }
++if ${ac_cv_prog_lex_yytext_pointer+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   # POSIX says lex can declare yytext either as a pointer or an array; the
+-# default is implementation-dependent. Figure out which it is, since
++# default is implementation-dependent.  Figure out which it is, since
+ # not all implementations provide the %pointer and %array declarations.
+ ac_cv_prog_lex_yytext_pointer=no
+-echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
+ ac_save_LIBS=$LIBS
+-LIBS="$LIBS $LEXLIB"
+-cat >conftest.$ac_ext <<_ACEOF
++LIBS="$LEXLIB $ac_save_LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++
++  #define YYTEXT_POINTER 1
+ `cat $LEX_OUTPUT_ROOT.c`
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_prog_lex_yytext_pointer=yes
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+ fi
+-rm -f conftest.err conftest.$ac_objext \
+-      conftest$ac_exeext conftest.$ac_ext
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_save_LIBS
+-rm -f "${LEX_OUTPUT_ROOT}.c"
+ 
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_prog_lex_yytext_pointer" >&5
+-echo "${ECHO_T}$ac_cv_prog_lex_yytext_pointer" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5
++$as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; }
+ if test $ac_cv_prog_lex_yytext_pointer = yes; then
+ 
+-cat >>confdefs.h <<\_ACEOF
+-#define YYTEXT_POINTER 1
+-_ACEOF
++$as_echo "#define YYTEXT_POINTER 1" >>confdefs.h
+ 
+ fi
++rm -f conftest.l $LEX_OUTPUT_ROOT.c
+ 
+ fi
+ for ac_prog in 'bison -y' byacc
+ 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_YACC+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if ${ac_cv_prog_YACC+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   if test -n "$YACC"; then
+   ac_cv_prog_YACC="$YACC" # Let the user override the test.
+@@ -3068,44 +3769,42 @@
+ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+-  for ac_exec_ext in '' $ac_executable_extensions; do
+-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_prog_YACC="$ac_prog"
+-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+   fi
+ done
+-done
++  done
++IFS=$as_save_IFS
+ 
+ fi
+ fi
+ YACC=$ac_cv_prog_YACC
+ if test -n "$YACC"; then
+-  echo "$as_me:$LINENO: result: $YACC" >&5
+-echo "${ECHO_T}$YACC" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
++$as_echo "$YACC" >&6; }
+ else
+-  echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+ fi
+ 
++
+   test -n "$YACC" && break
+ done
+ test -n "$YACC" || YACC="yacc"
+ 
+ 
+-  echo "$as_me:$LINENO: checking if compiler supports -R" >&5
+-echo $ECHO_N "checking if compiler supports -R... $ECHO_C" >&6
+-  if test "${php_cv_cc_dashr+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -R" >&5
++$as_echo_n "checking if compiler supports -R... " >&6; }
++  if ${php_cv_cc_dashr+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+ 
+ 	SAVE_LIBS="${LIBS}"
+ 	LIBS="-R /usr/lib ${LIBS}"
+-	cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+ int
+@@ -3116,60 +3815,32 @@
+   return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++if ac_fn_c_try_link "$LINENO"; then :
+   php_cv_cc_dashr=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-php_cv_cc_dashr=no
++  php_cv_cc_dashr=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
+-      conftest$ac_exeext conftest.$ac_ext
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
+ 	LIBS="${SAVE_LIBS}"
+ fi
+ 
+-  echo "$as_me:$LINENO: result: $php_cv_cc_dashr" >&5
+-echo "${ECHO_T}$php_cv_cc_dashr" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $php_cv_cc_dashr" >&5
++$as_echo "$php_cv_cc_dashr" >&6; }
+   if test $php_cv_cc_dashr = "yes"; then
+ 	ld_runpath_switch="-R"
+ 	apxs_runpath_switch="-Wl,-R'"
+   fi
+   if test -z "$ld_runpath_switch" ; then
+-	echo "$as_me:$LINENO: checking if compiler supports -Wl,-rpath," >&5
+-echo $ECHO_N "checking if compiler supports -Wl,-rpath,... $ECHO_C" >&6
+-	if test "${php_cv_cc_rpath+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Wl,-rpath," >&5
++$as_echo_n "checking if compiler supports -Wl,-rpath,... " >&6; }
++	if ${php_cv_cc_rpath+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+ 
+ 		SAVE_LIBS="${LIBS}"
+ 		LIBS="-Wl,-rpath,/usr/lib ${LIBS}"
+-		cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+ int
+@@ -3180,61 +3851,33 @@
+   return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++if ac_fn_c_try_link "$LINENO"; then :
+   php_cv_cc_rpath=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-php_cv_cc_rpath=no
++  php_cv_cc_rpath=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
+-      conftest$ac_exeext conftest.$ac_ext
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
+ 		LIBS="${SAVE_LIBS}"
+ fi
+ 
+-	echo "$as_me:$LINENO: result: $php_cv_cc_rpath" >&5
+-echo "${ECHO_T}$php_cv_cc_rpath" >&6
++	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $php_cv_cc_rpath" >&5
++$as_echo "$php_cv_cc_rpath" >&6; }
+ 	if test $php_cv_cc_rpath = "yes"; then
+ 		ld_runpath_switch="-Wl,-rpath,"
+ 		apxs_runpath_switch="-Wl,'-rpath "
+ 	fi
+   fi
+   if test -z "$ld_runpath_switch" ; then
+-	echo "$as_me:$LINENO: checking if compiler supports -Wl,-R" >&5
+-echo $ECHO_N "checking if compiler supports -Wl,-R... $ECHO_C" >&6
+-	if test "${php_cv_cc_dashwlr+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Wl,-R" >&5
++$as_echo_n "checking if compiler supports -Wl,-R... " >&6; }
++	if ${php_cv_cc_dashwlr+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+ 
+ 		SAVE_LIBS="${LIBS}"
+ 		LIBS="-Wl,-R/usr/lib ${LIBS}"
+-		cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+ int
+@@ -3245,42 +3888,18 @@
+   return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++if ac_fn_c_try_link "$LINENO"; then :
+   php_cv_cc_dashwlr=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-php_cv_cc_dashwlr=no
++  php_cv_cc_dashwlr=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
+-      conftest$ac_exeext conftest.$ac_ext
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
+ 		LIBS="${SAVE_LIBS}"
+ fi
+ 
+-	echo "$as_me:$LINENO: result: $php_cv_cc_dashwlr" >&5
+-echo "${ECHO_T}$php_cv_cc_dashwlr" >&6
++	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $php_cv_cc_dashwlr" >&5
++$as_echo "$php_cv_cc_dashwlr" >&6; }
+ 	if test $php_cv_cc_rpath = "yes"; then
+ 		ld_runpath_switch="-Wl,-R"
+ 		apxs_runpath_switch="-Wl,-R'"
+@@ -3293,142 +3912,86 @@
+ 
+ 
+ 
+-echo "$as_me:$LINENO: checking for exp in -lm" >&5
+-echo $ECHO_N "checking for exp in -lm... $ECHO_C" >&6
+-if test "${ac_cv_lib_m_exp+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for exp in -lm" >&5
++$as_echo_n "checking for exp in -lm... " >&6; }
++if ${ac_cv_lib_m_exp+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lm  $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+-/* Override any gcc2 internal prototype to avoid an error.  */
++/* 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
+-/* We use char because int might match the return type of a gcc2
+-   builtin and then its argument prototype would still apply.  */
+ char exp ();
+ int
+ main ()
+ {
+-exp ();
++return exp ();
+   ;
+   return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_lib_m_exp=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-ac_cv_lib_m_exp=no
++  ac_cv_lib_m_exp=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
+-      conftest$ac_exeext conftest.$ac_ext
++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_m_exp" >&5
+-echo "${ECHO_T}$ac_cv_lib_m_exp" >&6
+-if test $ac_cv_lib_m_exp = yes; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_exp" >&5
++$as_echo "$ac_cv_lib_m_exp" >&6; }
++if test "x$ac_cv_lib_m_exp" = xyes; then :
+   XTRALIBS="$XTRALIBS -lm"
+ fi
+ 
+ XTRALIBS=$XTRALIBS
+ 
+ 
+-echo "$as_me:$LINENO: checking for __gxx_personality_v0 in -lstdc++" >&5
+-echo $ECHO_N "checking for __gxx_personality_v0 in -lstdc++... $ECHO_C" >&6
+-if test "${ac_cv_lib_stdcpp___gxx_personality_v0+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __gxx_personality_v0 in -lstdc++" >&5
++$as_echo_n "checking for __gxx_personality_v0 in -lstdc++... " >&6; }
++if ${ac_cv_lib_stdcpp___gxx_personality_v0+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lstdc++  $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+-/* Override any gcc2 internal prototype to avoid an error.  */
++/* 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
+-/* We use char because int might match the return type of a gcc2
+-   builtin and then its argument prototype would still apply.  */
+ char __gxx_personality_v0 ();
+ int
+ main ()
+ {
+-__gxx_personality_v0 ();
++return __gxx_personality_v0 ();
+   ;
+   return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_lib_stdcpp___gxx_personality_v0=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-ac_cv_lib_stdcpp___gxx_personality_v0=no
++  ac_cv_lib_stdcpp___gxx_personality_v0=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
+-      conftest$ac_exeext conftest.$ac_ext
++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_stdcpp___gxx_personality_v0" >&5
+-echo "${ECHO_T}$ac_cv_lib_stdcpp___gxx_personality_v0" >&6
+-if test $ac_cv_lib_stdcpp___gxx_personality_v0 = yes; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_stdcpp___gxx_personality_v0" >&5
++$as_echo "$ac_cv_lib_stdcpp___gxx_personality_v0" >&6; }
++if test "x$ac_cv_lib_stdcpp___gxx_personality_v0" = xyes; then :
+   XTRALIBS="$XTRALIBS -lstdc++"
+ fi
+ 
+@@ -3442,15 +4005,15 @@
+ 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
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
++$as_echo_n "checking how to run the C preprocessor... " >&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
++  if ${ac_cv_prog_CPP+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+       # Double quotes because CPP needs to be expanded
+     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+@@ -3464,11 +4027,7 @@
+   # <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
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ #ifdef __STDC__
+ # include <limits.h>
+@@ -3477,78 +4036,34 @@
+ #endif
+ 		     Syntax error
+ _ACEOF
+-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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
++if ac_fn_c_try_cpp "$LINENO"; then :
+ 
++else
+   # Broken: fails on valid input.
+ continue
+ fi
+-rm -f conftest.err conftest.$ac_ext
++rm -f conftest.err conftest.i conftest.$ac_ext
+ 
+-  # OK, works on sane cases.  Now check whether non-existent headers
++  # 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
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ #include <ac_nonexistent.h>
+ _ACEOF
+-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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
++if ac_fn_c_try_cpp "$LINENO"; 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
++rm -f conftest.err conftest.i 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
++rm -f conftest.i conftest.err conftest.$ac_ext
++if $ac_preproc_ok; then :
+   break
+ fi
+ 
+@@ -3560,8 +4075,8 @@
+ else
+   ac_cv_prog_CPP=$CPP
+ fi
+-echo "$as_me:$LINENO: result: $CPP" >&5
+-echo "${ECHO_T}$CPP" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
++$as_echo "$CPP" >&6; }
+ ac_preproc_ok=false
+ for ac_c_preproc_warn_flag in '' yes
+ do
+@@ -3571,11 +4086,7 @@
+   # <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
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ #ifdef __STDC__
+ # include <limits.h>
+@@ -3584,85 +4095,40 @@
+ #endif
+ 		     Syntax error
+ _ACEOF
+-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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
++if ac_fn_c_try_cpp "$LINENO"; then :
+ 
++else
+   # Broken: fails on valid input.
+ continue
+ fi
+-rm -f conftest.err conftest.$ac_ext
++rm -f conftest.err conftest.i conftest.$ac_ext
+ 
+-  # OK, works on sane cases.  Now check whether non-existent headers
++  # 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
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ #include <ac_nonexistent.h>
+ _ACEOF
+-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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
++if ac_fn_c_try_cpp "$LINENO"; 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
++rm -f conftest.err conftest.i 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
+-  :
++rm -f conftest.i 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; }; }
++  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
++as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
++See \`config.log' for more details" "$LINENO" 5; }
+ fi
+ 
+ ac_ext=c
+@@ -3672,31 +4138,142 @@
+ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ 
+ 
+-echo "$as_me:$LINENO: checking for egrep" >&5
+-echo $ECHO_N "checking for egrep... $ECHO_C" >&6
+-if test "${ac_cv_prog_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_prog_egrep='grep -E'
+-    else ac_cv_prog_egrep='egrep'
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
++$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
++if ${ac_cv_path_GREP+:} false; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test -z "$GREP"; then
++  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_test_x "$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
++  $as_echo_n 0123456789 >"conftest.in"
++  while :
++  do
++    cat "conftest.in" "conftest.in" >"conftest.tmp"
++    mv "conftest.tmp" "conftest.in"
++    cp "conftest.in" "conftest.nl"
++    $as_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
++    as_fn_arith $ac_count + 1 && ac_count=$as_val
++    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
++  if test -z "$ac_cv_path_GREP"; then
++    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
++  fi
++else
++  ac_cv_path_GREP=$GREP
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
+-echo "${ECHO_T}$ac_cv_prog_egrep" >&6
+- EGREP=$ac_cv_prog_egrep
++
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
++$as_echo "$ac_cv_path_GREP" >&6; }
++ GREP="$ac_cv_path_GREP"
+ 
+ 
+-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
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
++$as_echo_n "checking for egrep... " >&6; }
++if ${ac_cv_path_EGREP+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
++   then ac_cv_path_EGREP="$GREP -E"
++   else
++     if test -z "$EGREP"; then
++  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_test_x "$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
++  $as_echo_n 0123456789 >"conftest.in"
++  while :
++  do
++    cat "conftest.in" "conftest.in" >"conftest.tmp"
++    mv "conftest.tmp" "conftest.in"
++    cp "conftest.in" "conftest.nl"
++    $as_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
++    as_fn_arith $ac_count + 1 && ac_count=$as_val
++    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
++  if test -z "$ac_cv_path_EGREP"; then
++    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
++  fi
++else
++  ac_cv_path_EGREP=$EGREP
++fi
++
++   fi
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
++$as_echo "$ac_cv_path_EGREP" >&6; }
++ EGREP="$ac_cv_path_EGREP"
++
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
++$as_echo_n "checking for ANSI C header files... " >&6; }
++if ${ac_cv_header_stdc+:} false; then :
++  $as_echo_n "(cached) " >&6
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ #include <stdlib.h>
+ #include <stdarg.h>
+@@ -3711,51 +4288,23 @@
+   return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++if ac_fn_c_try_compile "$LINENO"; 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
++  ac_cv_header_stdc=no
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++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
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ #include <string.h>
+ 
+ _ACEOF
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+-  $EGREP "memchr" >/dev/null 2>&1; then
+-  :
++  $EGREP "memchr" >/dev/null 2>&1; then :
++
+ else
+   ac_cv_header_stdc=no
+ fi
+@@ -3765,18 +4314,14 @@
+ 
+ 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
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ #include <stdlib.h>
+ 
+ _ACEOF
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+-  $EGREP "free" >/dev/null 2>&1; then
+-  :
++  $EGREP "free" >/dev/null 2>&1; then :
++
+ else
+   ac_cv_header_stdc=no
+ fi
+@@ -3786,16 +4331,13 @@
+ 
+ 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
++  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
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* 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))
+@@ -3815,41 +4357,26 @@
+   for (i = 0; i < 256; i++)
+     if (XOR (islower (i), ISLOWER (i))
+ 	|| toupper (i) != TOUPPER (i))
+-      exit(2);
+-  exit (0);
++      return 2;
++  return 0;
+ }
+ _ACEOF
+-rm -f conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+-  (eval $ac_link) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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
++if ac_fn_c_try_run "$LINENO"; then :
+ 
+-( exit $ac_status )
+-ac_cv_header_stdc=no
++else
++  ac_cv_header_stdc=no
+ fi
+-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
+ fi
++
+ fi
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+-echo "${ECHO_T}$ac_cv_header_stdc" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
++$as_echo "$ac_cv_header_stdc" >&6; }
+ if test $ac_cv_header_stdc = yes; then
+ 
+-cat >>confdefs.h <<\_ACEOF
+-#define STDC_HEADERS 1
+-_ACEOF
++$as_echo "#define STDC_HEADERS 1" >>confdefs.h
+ 
+ fi
+ 
+@@ -3869,769 +4396,57 @@
+ CFLAGS="$CFLAGS $C_PIC"
+ CXXFLAGS="$CXXFLAGS $C_PIC"
+ 
+-echo "$as_me:$LINENO: checking for strcasecmp" >&5
+-echo $ECHO_N "checking for strcasecmp... $ECHO_C" >&6
+-if test "${ac_cv_func_strcasecmp+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
++if test "x$ac_cv_func_strcasecmp" = xyes; then :
++
+ else
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-/* Define strcasecmp to an innocuous variant, in case <limits.h> declares strcasecmp.
+-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+-#define strcasecmp innocuous_strcasecmp
++  STRINGS="-DNEED_STRCASECMP $STRINGS"
++fi
+ 
+-/* System header to define __stub macros and hopefully few prototypes,
+-    which can conflict with char strcasecmp (); below.
+-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+-    <limits.h> exists even on freestanding compilers.  */
++ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp"
++if test "x$ac_cv_func_strncasecmp" = xyes; then :
+ 
+-#ifdef __STDC__
+-# include <limits.h>
+-#else
+-# include <assert.h>
+-#endif
++else
++  STRINGS="-DNEED_STRNCASECMP $STRINGS"
++fi
+ 
+-#undef strcasecmp
++ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
++if test "x$ac_cv_func_strdup" = xyes; then :
+ 
+-/* Override any gcc2 internal prototype to avoid an error.  */
+-#ifdef __cplusplus
+-extern "C"
+-{
+-#endif
+-/* We use char because int might match the return type of a gcc2
+-   builtin and then its argument prototype would still apply.  */
+-char strcasecmp ();
+-/* 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_strcasecmp) || defined (__stub___strcasecmp)
+-choke me
+-#else
+-char (*f) () = strcasecmp;
+-#endif
+-#ifdef __cplusplus
+-}
+-#endif
++else
++  STRINGS="-DNEED_STRDUP $STRINGS"
++fi
+ 
+-int
+-main ()
+-{
+-return f != strcasecmp;
+-  ;
+-  return 0;
+-}
+-_ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
+-  ac_cv_func_strcasecmp=yes
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-ac_cv_func_strcasecmp=no
+-fi
+-rm -f conftest.err conftest.$ac_objext \
+-      conftest$ac_exeext conftest.$ac_ext
+-fi
+-echo "$as_me:$LINENO: result: $ac_cv_func_strcasecmp" >&5
+-echo "${ECHO_T}$ac_cv_func_strcasecmp" >&6
+-if test $ac_cv_func_strcasecmp = yes; then
+-  :
+-else
+-  STRINGS="-DNEED_STRCASECMP $STRINGS"
+-fi
+-
+-echo "$as_me:$LINENO: checking for strncasecmp" >&5
+-echo $ECHO_N "checking for strncasecmp... $ECHO_C" >&6
+-if test "${ac_cv_func_strncasecmp+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 strncasecmp to an innocuous variant, in case <limits.h> declares strncasecmp.
+-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+-#define strncasecmp innocuous_strncasecmp
+-
+-/* System header to define __stub macros and hopefully few prototypes,
+-    which can conflict with char strncasecmp (); 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 strncasecmp
+-
+-/* Override any gcc2 internal prototype to avoid an error.  */
+-#ifdef __cplusplus
+-extern "C"
+-{
+-#endif
+-/* We use char because int might match the return type of a gcc2
+-   builtin and then its argument prototype would still apply.  */
+-char strncasecmp ();
+-/* 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_strncasecmp) || defined (__stub___strncasecmp)
+-choke me
+-#else
+-char (*f) () = strncasecmp;
+-#endif
+-#ifdef __cplusplus
+-}
+-#endif
+-
+-int
+-main ()
+-{
+-return f != strncasecmp;
+-  ;
+-  return 0;
+-}
+-_ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
+-  ac_cv_func_strncasecmp=yes
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-ac_cv_func_strncasecmp=no
+-fi
+-rm -f conftest.err conftest.$ac_objext \
+-      conftest$ac_exeext conftest.$ac_ext
+-fi
+-echo "$as_me:$LINENO: result: $ac_cv_func_strncasecmp" >&5
+-echo "${ECHO_T}$ac_cv_func_strncasecmp" >&6
+-if test $ac_cv_func_strncasecmp = yes; then
+-  :
+-else
+-  STRINGS="-DNEED_STRNCASECMP $STRINGS"
+-fi
+-
+-echo "$as_me:$LINENO: checking for strdup" >&5
+-echo $ECHO_N "checking for strdup... $ECHO_C" >&6
+-if test "${ac_cv_func_strdup+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 strdup to an innocuous variant, in case <limits.h> declares strdup.
+-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+-#define strdup innocuous_strdup
+-
+-/* System header to define __stub macros and hopefully few prototypes,
+-    which can conflict with char strdup (); 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 strdup
+-
+-/* Override any gcc2 internal prototype to avoid an error.  */
+-#ifdef __cplusplus
+-extern "C"
+-{
+-#endif
+-/* We use char because int might match the return type of a gcc2
+-   builtin and then its argument prototype would still apply.  */
+-char strdup ();
+-/* 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_strdup) || defined (__stub___strdup)
+-choke me
+-#else
+-char (*f) () = strdup;
+-#endif
+-#ifdef __cplusplus
+-}
+-#endif
+-
+-int
+-main ()
+-{
+-return f != strdup;
+-  ;
+-  return 0;
+-}
+-_ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
+-  ac_cv_func_strdup=yes
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-ac_cv_func_strdup=no
+-fi
+-rm -f conftest.err conftest.$ac_objext \
+-      conftest$ac_exeext conftest.$ac_ext
+-fi
+-echo "$as_me:$LINENO: result: $ac_cv_func_strdup" >&5
+-echo "${ECHO_T}$ac_cv_func_strdup" >&6
+-if test $ac_cv_func_strdup = yes; then
+-  :
+-else
+-  STRINGS="-DNEED_STRDUP $STRINGS"
+-fi
+-
+-echo "$as_me:$LINENO: checking for strrstr" >&5
+-echo $ECHO_N "checking for strrstr... $ECHO_C" >&6
+-if test "${ac_cv_func_strrstr+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 strrstr to an innocuous variant, in case <limits.h> declares strrstr.
+-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+-#define strrstr innocuous_strrstr
+-
+-/* System header to define __stub macros and hopefully few prototypes,
+-    which can conflict with char strrstr (); 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 strrstr
+-
+-/* Override any gcc2 internal prototype to avoid an error.  */
+-#ifdef __cplusplus
+-extern "C"
+-{
+-#endif
+-/* We use char because int might match the return type of a gcc2
+-   builtin and then its argument prototype would still apply.  */
+-char strrstr ();
+-/* 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_strrstr) || defined (__stub___strrstr)
+-choke me
+-#else
+-char (*f) () = strrstr;
+-#endif
+-#ifdef __cplusplus
+-}
+-#endif
+-
+-int
+-main ()
+-{
+-return f != strrstr;
+-  ;
+-  return 0;
+-}
+-_ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
+-  ac_cv_func_strrstr=yes
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
++ac_fn_c_check_func "$LINENO" "strrstr" "ac_cv_func_strrstr"
++if test "x$ac_cv_func_strrstr" = xyes; then :
+ 
+-ac_cv_func_strrstr=no
+-fi
+-rm -f conftest.err conftest.$ac_objext \
+-      conftest$ac_exeext conftest.$ac_ext
+-fi
+-echo "$as_me:$LINENO: result: $ac_cv_func_strrstr" >&5
+-echo "${ECHO_T}$ac_cv_func_strrstr" >&6
+-if test $ac_cv_func_strrstr = yes; then
+-  :
+ else
+   STRINGS="-DNEED_STRRSTR $STRINGS"
+ fi
+ 
+-echo "$as_me:$LINENO: checking for strcasestr" >&5
+-echo $ECHO_N "checking for strcasestr... $ECHO_C" >&6
+-if test "${ac_cv_func_strcasestr+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 strcasestr to an innocuous variant, in case <limits.h> declares strcasestr.
+-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+-#define strcasestr innocuous_strcasestr
+-
+-/* System header to define __stub macros and hopefully few prototypes,
+-    which can conflict with char strcasestr (); 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 strcasestr
+-
+-/* Override any gcc2 internal prototype to avoid an error.  */
+-#ifdef __cplusplus
+-extern "C"
+-{
+-#endif
+-/* We use char because int might match the return type of a gcc2
+-   builtin and then its argument prototype would still apply.  */
+-char strcasestr ();
+-/* 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_strcasestr) || defined (__stub___strcasestr)
+-choke me
+-#else
+-char (*f) () = strcasestr;
+-#endif
+-#ifdef __cplusplus
+-}
+-#endif
+-
+-int
+-main ()
+-{
+-return f != strcasestr;
+-  ;
+-  return 0;
+-}
+-_ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
+-  ac_cv_func_strcasestr=yes
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
++ac_fn_c_check_func "$LINENO" "strcasestr" "ac_cv_func_strcasestr"
++if test "x$ac_cv_func_strcasestr" = xyes; then :
+ 
+-ac_cv_func_strcasestr=no
+-fi
+-rm -f conftest.err conftest.$ac_objext \
+-      conftest$ac_exeext conftest.$ac_ext
+-fi
+-echo "$as_me:$LINENO: result: $ac_cv_func_strcasestr" >&5
+-echo "${ECHO_T}$ac_cv_func_strcasestr" >&6
+-if test $ac_cv_func_strcasestr = yes; then
+-  :
+ else
+   STRINGS="-DNEED_STRCASESTR $STRINGS"
+ fi
+ 
+-echo "$as_me:$LINENO: checking for strlcat" >&5
+-echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
+-if test "${ac_cv_func_strlcat+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 strlcat to an innocuous variant, in case <limits.h> declares strlcat.
+-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+-#define strlcat innocuous_strlcat
+-
+-/* System header to define __stub macros and hopefully few prototypes,
+-    which can conflict with char strlcat (); 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 strlcat
+-
+-/* Override any gcc2 internal prototype to avoid an error.  */
+-#ifdef __cplusplus
+-extern "C"
+-{
+-#endif
+-/* We use char because int might match the return type of a gcc2
+-   builtin and then its argument prototype would still apply.  */
+-char strlcat ();
+-/* 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_strlcat) || defined (__stub___strlcat)
+-choke me
+-#else
+-char (*f) () = strlcat;
+-#endif
+-#ifdef __cplusplus
+-}
+-#endif
++ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
++if test "x$ac_cv_func_strlcat" = xyes; then :
+ 
+-int
+-main ()
+-{
+-return f != strlcat;
+-  ;
+-  return 0;
+-}
+-_ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
+-  ac_cv_func_strlcat=yes
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-ac_cv_func_strlcat=no
+-fi
+-rm -f conftest.err conftest.$ac_objext \
+-      conftest$ac_exeext conftest.$ac_ext
+-fi
+-echo "$as_me:$LINENO: result: $ac_cv_func_strlcat" >&5
+-echo "${ECHO_T}$ac_cv_func_strlcat" >&6
+-if test $ac_cv_func_strlcat = yes; then
+-  :
+ else
+   STRINGS="-DNEED_STRLCAT $STRINGS"
+ fi
+ 
+-echo "$as_me:$LINENO: checking for strlcpy" >&5
+-echo $ECHO_N "checking for strlcpy... $ECHO_C" >&6
+-if test "${ac_cv_func_strlcpy+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 strlcpy to an innocuous variant, in case <limits.h> declares strlcpy.
+-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+-#define strlcpy innocuous_strlcpy
+-
+-/* System header to define __stub macros and hopefully few prototypes,
+-    which can conflict with char strlcpy (); 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 strlcpy
++ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
++if test "x$ac_cv_func_strlcpy" = xyes; then :
+ 
+-/* Override any gcc2 internal prototype to avoid an error.  */
+-#ifdef __cplusplus
+-extern "C"
+-{
+-#endif
+-/* We use char because int might match the return type of a gcc2
+-   builtin and then its argument prototype would still apply.  */
+-char strlcpy ();
+-/* 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_strlcpy) || defined (__stub___strlcpy)
+-choke me
+-#else
+-char (*f) () = strlcpy;
+-#endif
+-#ifdef __cplusplus
+-}
+-#endif
+-
+-int
+-main ()
+-{
+-return f != strlcpy;
+-  ;
+-  return 0;
+-}
+-_ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
+-  ac_cv_func_strlcpy=yes
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-ac_cv_func_strlcpy=no
+-fi
+-rm -f conftest.err conftest.$ac_objext \
+-      conftest$ac_exeext conftest.$ac_ext
+-fi
+-echo "$as_me:$LINENO: result: $ac_cv_func_strlcpy" >&5
+-echo "${ECHO_T}$ac_cv_func_strlcpy" >&6
+-if test $ac_cv_func_strlcpy = yes; then
+-  :
+ else
+   STRINGS="-DNEED_STRLCPY $STRINGS"
+ fi
+ 
+-echo "$as_me:$LINENO: checking for vsnprintf" >&5
+-echo $ECHO_N "checking for vsnprintf... $ECHO_C" >&6
+-if test "${ac_cv_func_vsnprintf+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 vsnprintf to an innocuous variant, in case <limits.h> declares vsnprintf.
+-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+-#define vsnprintf innocuous_vsnprintf
+-
+-/* System header to define __stub macros and hopefully few prototypes,
+-    which can conflict with char vsnprintf (); 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 vsnprintf
+-
+-/* Override any gcc2 internal prototype to avoid an error.  */
+-#ifdef __cplusplus
+-extern "C"
+-{
+-#endif
+-/* We use char because int might match the return type of a gcc2
+-   builtin and then its argument prototype would still apply.  */
+-char vsnprintf ();
+-/* 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_vsnprintf) || defined (__stub___vsnprintf)
+-choke me
+-#else
+-char (*f) () = vsnprintf;
+-#endif
+-#ifdef __cplusplus
+-}
+-#endif
+-
+-int
+-main ()
+-{
+-return f != vsnprintf;
+-  ;
+-  return 0;
+-}
+-_ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
+-  ac_cv_func_vsnprintf=yes
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-ac_cv_func_vsnprintf=no
+-fi
+-rm -f conftest.err conftest.$ac_objext \
+-      conftest$ac_exeext conftest.$ac_ext
+-fi
+-echo "$as_me:$LINENO: result: $ac_cv_func_vsnprintf" >&5
+-echo "${ECHO_T}$ac_cv_func_vsnprintf" >&6
+-if test $ac_cv_func_vsnprintf = yes; then
++ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
++if test "x$ac_cv_func_vsnprintf" = xyes; then :
+   STRINGS="-DHAVE_VSNPRINTF $STRINGS"
+ fi
+ 
+@@ -4639,26 +4454,26 @@
+ 
+ 
+ MS_VERSION=`grep 'MS_VERSION ' mapserver.h | grep '#define' | cut -d\" -f2`
+-echo "$as_me:$LINENO: result: MapServer Version from mapserver.h: '$MS_VERSION'" >&5
+-echo "${ECHO_T}MapServer Version from mapserver.h: '$MS_VERSION'" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MapServer Version from mapserver.h: '$MS_VERSION'" >&5
++$as_echo "MapServer Version from mapserver.h: '$MS_VERSION'" >&6; }
+ MS_VERSION="$MS_VERSION"
+ 
+ 
+ 
+-echo "$as_me:$LINENO: checking if pkg-config path is provided" >&5
+-echo $ECHO_N "checking if pkg-config path is provided... $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if pkg-config path is provided" >&5
++$as_echo_n "checking if pkg-config path is provided... " >&6; }
+ 
+ 
+-# Check whether --with-pkg-config or --without-pkg-config was given.
+-if test "${with_pkg_config+set}" = set; then
+-  withval="$with_pkg_config"
++# Check whether --with-pkg-config was given.
++if test "${with_pkg_config+set}" = set; then :
++  withval=$with_pkg_config;
++fi
+ 
+-fi;
+ 
+ if test -n "$with_pkg_config" -a "$with_pkg_config" != "no" ; then
+ 
+-  echo "$as_me:$LINENO: result: yes" >&5
+-echo "${ECHO_T}yes" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
+ 
+   PKG_CONFIG=$with_pkg_config
+ else
+@@ -4669,10 +4484,10 @@
+ 
+    # 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
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if ${ac_cv_path_PKG_CONFIG+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   case $PKG_CONFIG in
+   [\\/]* | ?:[\\/]*)
+@@ -4684,42 +4499,41 @@
+ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+-  for ac_exec_ext in '' $ac_executable_extensions; do
+-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+   fi
+ done
+-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
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
++$as_echo "$PKG_CONFIG" >&6; }
+ else
+-  echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+ fi
+ 
+ 
++
+    if test "$PKG_CONFIG" = "no" ; then
+-      echo "$as_me:$LINENO: result: couldn't find pkg-config in default path. Please specify full path to pkg-config if needed" >&5
+-echo "${ECHO_T}couldn't find pkg-config in default path. Please specify full path to pkg-config if needed" >&6
++      { $as_echo "$as_me:${as_lineno-$LINENO}: result: couldn't find pkg-config in default path. Please specify full path to pkg-config if needed" >&5
++$as_echo "couldn't find pkg-config in default path. Please specify full path to pkg-config if needed" >&6; }
+    fi
+ 
+ elif test -f "$PKG_CONFIG" -a -x "$PKG_CONFIG" ; then
+-     echo "$as_me:$LINENO: result: user supplied pkg-config ($PKG_CONFIG)" >&5
+-echo "${ECHO_T}user supplied pkg-config ($PKG_CONFIG)" >&6
++     { $as_echo "$as_me:${as_lineno-$LINENO}: result: user supplied pkg-config ($PKG_CONFIG)" >&5
++$as_echo "user supplied pkg-config ($PKG_CONFIG)" >&6; }
+ else
+-     { { echo "$as_me:$LINENO: error: '$PKG_CONFIG' is not an executable.  Make sure you use --with-pkg-config=/path/to/pkg-config" >&5
+-echo "$as_me: error: '$PKG_CONFIG' is not an executable.  Make sure you use --with-pkg-config=/path/to/pkg-config" >&2;}
+-   { (exit 1); exit 1; }; }
++     as_fn_error $? "'$PKG_CONFIG' is not an executable.  Make sure you use --with-pkg-config=/path/to/pkg-config" "$LINENO" 5
+ fi
+ 
+ 
+@@ -4728,32 +4542,30 @@
+ unset ac_cv_lib_ttf_TT_Init_FreeType
+ 
+ 
+-# Check whether --with-freetype or --without-freetype was given.
+-if test "${with_freetype+set}" = set; then
+-  withval="$with_freetype"
+-  FT_DIR=$withval
++# Check whether --with-freetype was given.
++if test "${with_freetype+set}" = set; then :
++  withval=$with_freetype; FT_DIR=$withval
+ else
+   FT_DIR=''
+-fi;
++fi
++
+ 
+ FT_LDFLAGS=''
+ FT_CFLAGS=''
+ FT_BIN=''
+ 
+ if test "x$FT_DIR" = "xno" ; then
+-    { { echo "$as_me:$LINENO: error: Freetype support disabled but is now mandatory. Rerun without --without-freetype or --with-freetype=no" >&5
+-echo "$as_me: error: Freetype support disabled but is now mandatory. Rerun without --without-freetype or --with-freetype=no" >&2;}
+-   { (exit 1); exit 1; }; }
++    as_fn_error $? "Freetype support disabled but is now mandatory. Rerun without --without-freetype or --with-freetype=no" "$LINENO" 5
+ fi
+ 
+ 
+ if test -z "$FT_DIR" -o "$FT_DIR" = "yes" ; then
+         # Extract the first word of "freetype-config", so it can be a program name with args.
+ set dummy freetype-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_FT_BIN+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if ${ac_cv_path_FT_BIN+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   case $FT_BIN in
+   [\\/]* | ?:[\\/]*)
+@@ -4765,32 +4577,33 @@
+ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+-  for ac_exec_ext in '' $ac_executable_extensions; do
+-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_path_FT_BIN="$as_dir/$ac_word$ac_exec_ext"
+-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+   fi
+ done
+-done
++  done
++IFS=$as_save_IFS
+ 
+   test -z "$ac_cv_path_FT_BIN" && ac_cv_path_FT_BIN=""""
+   ;;
+ esac
+ fi
+ FT_BIN=$ac_cv_path_FT_BIN
+-
+ if test -n "$FT_BIN"; then
+-  echo "$as_me:$LINENO: result: $FT_BIN" >&5
+-echo "${ECHO_T}$FT_BIN" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FT_BIN" >&5
++$as_echo "$FT_BIN" >&6; }
+ else
+-  echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+ fi
+ 
++
+     if test "x$FT_BIN" = "xno" ; then
+-                echo "$as_me:$LINENO: checking for Freetype2.x in system locations" >&5
+-echo $ECHO_N "checking for Freetype2.x in system locations... $ECHO_C" >&6
++                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Freetype2.x in system locations" >&5
++$as_echo_n "checking for Freetype2.x in system locations... " >&6; }
+         test -f /usr/include/ft2build.h -a -d /usr/include/freetype2 && FT_CFLAGS=-I/usr/include/freetype2
+         test -f /usr/local/include/ft2build.h -a -d /usr/local/include/freetype2 && FT_CFLAGS=-I/usr/local/include -I/usr/local/include/freetype2
+         FT_LDFLAGS="-lfreetype -lz"
+@@ -4803,8 +4616,8 @@
+     FT_DIR="`pwd`/$FT_DIR"
+   fi
+ 
+-    echo "$as_me:$LINENO: checking for Freetype2.x in $FT_DIR" >&5
+-echo $ECHO_N "checking for Freetype2.x in $FT_DIR... $ECHO_C" >&6
++    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Freetype2.x in $FT_DIR" >&5
++$as_echo_n "checking for Freetype2.x in $FT_DIR... " >&6; }
+     test -x "$FT_DIR" -a "freetype-config" = "`basename $FT_DIR ''`" && FT_BIN="$FT_DIR"
+     test -x "$FT_DIR/freetype-config" && FT_BIN="$FT_DIR/freetype-config"
+     test -x "$FT_DIR/bin/freetype-config" && FT_BIN="$FT_DIR/bin/freetype-config"
+@@ -4829,72 +4642,43 @@
+ CPPFLAGS="$FT_CFLAGS $CPPFLAGS"
+ LDFLAGS="$FT_LDFLAGS $LDFLAGS"
+ 
+-
+-echo "$as_me:$LINENO: checking for FT_Init_FreeType in -lfreetype" >&5
+-echo $ECHO_N "checking for FT_Init_FreeType in -lfreetype... $ECHO_C" >&6
+-if test "${ac_cv_lib_freetype_FT_Init_FreeType+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
++$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
++if ${ac_cv_lib_freetype_FT_Init_FreeType+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lfreetype  $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+-/* Override any gcc2 internal prototype to avoid an error.  */
++/* 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
+-/* We use char because int might match the return type of a gcc2
+-   builtin and then its argument prototype would still apply.  */
+ char FT_Init_FreeType ();
+ int
+ main ()
+ {
+-FT_Init_FreeType ();
++return FT_Init_FreeType ();
+   ;
+   return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_lib_freetype_FT_Init_FreeType=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-ac_cv_lib_freetype_FT_Init_FreeType=no
++  ac_cv_lib_freetype_FT_Init_FreeType=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
+-      conftest$ac_exeext conftest.$ac_ext
++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_freetype_FT_Init_FreeType" >&5
+-echo "${ECHO_T}$ac_cv_lib_freetype_FT_Init_FreeType" >&6
+-if test $ac_cv_lib_freetype_FT_Init_FreeType = yes; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
++$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
++if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = xyes; then :
+   cat >>confdefs.h <<_ACEOF
+ #define HAVE_LIBFREETYPE 1
+ _ACEOF
+@@ -4902,77 +4686,20 @@
+   LIBS="-lfreetype $LIBS"
+ 
+ else
+-  { { echo "$as_me:$LINENO: error: unable to link - reconfigure with correct --with-freetype=dir " >&5
+-echo "$as_me: error: unable to link - reconfigure with correct --with-freetype=dir " >&2;}
+-   { (exit 1); exit 1; }; }
++  as_fn_error $? "unable to link - reconfigure with correct --with-freetype=dir " "$LINENO" 5
+ fi
+ 
+ 
+ # On IRIX 5.3, sys/types and inttypes.h are conflicting.
+-
+-
+-
+-
+-
+-
+-
+-
+-
+ for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+ 		  inttypes.h stdint.h unistd.h
+-do
+-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+-echo "$as_me:$LINENO: checking for $ac_header" >&5
+-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+-if eval "test \"\${$as_ac_Header+set}\" = set"; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  cat >conftest.$ac_ext <<_ACEOF
+-/* 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 { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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 conftest.err conftest.$ac_objext conftest.$ac_ext
+-fi
+-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+-if test `eval echo '${'$as_ac_Header'}'` = yes; then
++do :
++  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
++ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
++"
++if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+   cat >>confdefs.h <<_ACEOF
+-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+ _ACEOF
+ 
+ fi
+@@ -4980,156 +4707,16 @@
+ done
+ 
+ 
+-
+ for ac_header in ft2build.h
+-do
+-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+-if eval "test \"\${$as_ac_Header+set}\" = set"; then
+-  echo "$as_me:$LINENO: checking for $ac_header" >&5
+-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+-if eval "test \"\${$as_ac_Header+set}\" = set"; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-fi
+-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&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 { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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 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 { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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: $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;}
+-    (
+-      cat <<\_ASBOX
+-## ------------------------------------------ ##
+-## Report this to the AC_PACKAGE_NAME lists.  ##
+-## ------------------------------------------ ##
+-_ASBOX
+-    ) |
+-      sed "s/^/$as_me: WARNING:     /" >&2
+-    ;;
+-esac
+-echo "$as_me:$LINENO: checking for $ac_header" >&5
+-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+-if eval "test \"\${$as_ac_Header+set}\" = set"; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  eval "$as_ac_Header=\$ac_header_preproc"
+-fi
+-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+-
+-fi
+-if test `eval echo '${'$as_ac_Header'}'` = yes; then
++do :
++  ac_fn_c_check_header_mongrel "$LINENO" "ft2build.h" "ac_cv_header_ft2build_h" "$ac_includes_default"
++if test "x$ac_cv_header_ft2build_h" = xyes; then :
+   cat >>confdefs.h <<_ACEOF
+-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
++#define HAVE_FT2BUILD_H 1
+ _ACEOF
+ 
+ else
+-  { { echo "$as_me:$LINENO: error: ft2build.h header not found - reconfigure with correct --with-freetype=dir " >&5
+-echo "$as_me: error: ft2build.h header not found - reconfigure with correct --with-freetype=dir " >&2;}
+-   { (exit 1); exit 1; }; }
++  as_fn_error $? "ft2build.h header not found - reconfigure with correct --with-freetype=dir " "$LINENO" 5
+ fi
+ 
+ done
+@@ -5154,13 +4741,13 @@
+ unset ac_cv_lib_z_zlibVersion
+ 
+ 
+-# Check whether --with-zlib or --without-zlib was given.
+-if test "${with_zlib+set}" = set; then
+-  withval="$with_zlib"
+-  ZLIB_DIR=$withval
++# Check whether --with-zlib was given.
++if test "${with_zlib+set}" = set; then :
++  withval=$with_zlib; ZLIB_DIR=$withval
+ else
+   ZLIB_DIR=''
+-fi;
++fi
++
+ 
+ 
+   if test -z "$ZLIB_DIR" || echo "$ZLIB_DIR" | grep '^/' >/dev/null ; then
+@@ -5169,8 +4756,8 @@
+     ZLIB_DIR="`pwd`/$ZLIB_DIR"
+   fi
+ 
+-{ echo "$as_me:$LINENO: checking where Zlib is installed..." >&5
+-echo "$as_me: checking where Zlib is installed..." >&6;}
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where Zlib is installed..." >&5
++$as_echo "$as_me: checking where Zlib is installed..." >&6;}
+ ZLIB_LIB=''
+ 
+ test -f $ZLIB_DIR/include/zlib.h && ZLIB_INCDIR="$ZLIB_DIR/include"
+@@ -5185,8 +4772,8 @@
+         ZLIB_ENABLED="-DUSE_ZLIB"
+   ZLIB_INC="-I$ZLIB_INCDIR"
+   ZLIB_LIB="-L$ZLIB_LIBDIR -lz"
+-  echo "$as_me:$LINENO: result:         using libz from $ZLIB_LIB ($ZLIB_ENABLED)" >&5
+-echo "${ECHO_T}        using libz from $ZLIB_LIB ($ZLIB_ENABLED)" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result:         using libz from $ZLIB_LIB ($ZLIB_ENABLED)" >&5
++$as_echo "        using libz from $ZLIB_LIB ($ZLIB_ENABLED)" >&6; }
+ 
+   if test ""$ZLIB_DIR"" != "/usr/lib"; then
+ 
+@@ -5213,8 +4800,8 @@
+ elif test -n "$ZLIB_LIBDIR" ; then
+ 
+         ZLIB_LIB="-L$ZLIB_LIBDIR -lz"
+-  echo "$as_me:$LINENO: result:         using runtime libz from $ZLIB_LIB" >&5
+-echo "${ECHO_T}        using runtime libz from $ZLIB_LIB" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result:         using runtime libz from $ZLIB_LIB" >&5
++$as_echo "        using runtime libz from $ZLIB_LIB" >&6; }
+ 
+   if test ""$ZLIB_DIR"" != "/usr/lib"; then
+ 
+@@ -5241,82 +4828,54 @@
+ else
+ 
+ 
+-  echo "$as_me:$LINENO: checking for zlibVersion in -lz" >&5
+-echo $ECHO_N "checking for zlibVersion in -lz... $ECHO_C" >&6
+-if test "${ac_cv_lib_z_zlibVersion+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for zlibVersion in -lz" >&5
++$as_echo_n "checking for zlibVersion in -lz... " >&6; }
++if ${ac_cv_lib_z_zlibVersion+:} false; then :
++  $as_echo_n "(cached) " >&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
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+-/* Override any gcc2 internal prototype to avoid an error.  */
++/* 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
+-/* We use char because int might match the return type of a gcc2
+-   builtin and then its argument prototype would still apply.  */
+ char zlibVersion ();
+ int
+ main ()
+ {
+-zlibVersion ();
++return zlibVersion ();
+   ;
+   return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_lib_z_zlibVersion=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-ac_cv_lib_z_zlibVersion=no
++  ac_cv_lib_z_zlibVersion=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
+-      conftest$ac_exeext conftest.$ac_ext
++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_zlibVersion" >&5
+-echo "${ECHO_T}$ac_cv_lib_z_zlibVersion" >&6
+-if test $ac_cv_lib_z_zlibVersion = yes; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_zlibVersion" >&5
++$as_echo "$ac_cv_lib_z_zlibVersion" >&6; }
++if test "x$ac_cv_lib_z_zlibVersion" = xyes; then :
+   ZLIB_LIB="-lz"
+ fi
+ 
+ 
+   if test -n "$ZLIB_LIB" ; then
+     ZLIB_ENABLED="-DUSE_ZLIB"
+-    echo "$as_me:$LINENO: result:         using libz from system libs ($ZLIB_ENABLED)." >&5
+-echo "${ECHO_T}        using libz from system libs ($ZLIB_ENABLED)." >&6
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result:         using libz from system libs ($ZLIB_ENABLED)." >&5
++$as_echo "        using libz from system libs ($ZLIB_ENABLED)." >&6; }
+   else
+-    echo "$as_me:$LINENO: result:         Zlib (libz) library cannot be found, possibly needed for GD" >&5
+-echo "${ECHO_T}        Zlib (libz) library cannot be found, possibly needed for GD" >&6
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result:         Zlib (libz) library cannot be found, possibly needed for GD" >&5
++$as_echo "        Zlib (libz) library cannot be found, possibly needed for GD" >&6; }
+   fi
+ 
+ fi
+@@ -5337,13 +4896,13 @@
+ unset ac_cv_lib_png_png_init_io
+ 
+ 
+-# Check whether --with-png or --without-png was given.
+-if test "${with_png+set}" = set; then
+-  withval="$with_png"
+-  PNG_DIR=$withval
++# Check whether --with-png was given.
++if test "${with_png+set}" = set; then :
++  withval=$with_png; PNG_DIR=$withval
+ else
+   PNG_DIR=''
+-fi;
++fi
++
+ 
+ 
+   if test -z "$PNG_DIR" || echo "$PNG_DIR" | grep '^/' >/dev/null ; then
+@@ -5352,8 +4911,8 @@
+     PNG_DIR="`pwd`/$PNG_DIR"
+   fi
+ 
+-{ echo "$as_me:$LINENO: checking where PNG is installed..." >&5
+-echo "$as_me: checking where PNG is installed..." >&6;}
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where PNG is installed..." >&5
++$as_echo "$as_me: checking where PNG is installed..." >&6;}
+ PNG_LIB=''
+ PNG_INC=''
+ PNG_ENABLED=''
+@@ -5369,8 +4928,8 @@
+ 
+     if test -n "$PNG_LIBDIR" ; then
+       PNG_LIB="-L$PNG_LIBDIR -lpng"
+-      echo "$as_me:$LINENO: result:         using libpng from $PNG_LIB" >&5
+-echo "${ECHO_T}        using libpng from $PNG_LIB" >&6
++      { $as_echo "$as_me:${as_lineno-$LINENO}: result:         using libpng from $PNG_LIB" >&5
++$as_echo "        using libpng from $PNG_LIB" >&6; }
+ 
+   if test ""$PNG_LIBDIR"" != "/usr/lib"; then
+ 
+@@ -5389,545 +4948,97 @@
+       EXTRA_LIBS="$EXTRA_LIBS -L$ai_p"
+         RPATHS="$RPATHS ${ld_runpath_switch}$ai_p"
+ 
+-  fi
+-
+-  fi
+-
+-    else
+-      { { echo "$as_me:$LINENO: error: cannot find png lib in $PNG_DIR" >&5
+-echo "$as_me: error: cannot find png lib in $PNG_DIR" >&2;}
+-   { (exit 1); exit 1; }; }
+-    fi
+-
+-    if test -n "$PNG_INCLUDE" ; then
+-            old_cflags="$CFLAGS"
+-      CFLAGS="$ZLIB_INC $CFLAGS"
+-      as_ac_Header=`echo "ac_cv_header_$PNG_INCLUDE/png.h" | $as_tr_sh`
+-if eval "test \"\${$as_ac_Header+set}\" = set"; then
+-  echo "$as_me:$LINENO: checking for $PNG_INCLUDE/png.h" >&5
+-echo $ECHO_N "checking for $PNG_INCLUDE/png.h... $ECHO_C" >&6
+-if eval "test \"\${$as_ac_Header+set}\" = set"; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-fi
+-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+-else
+-  # Is the header compilable?
+-echo "$as_me:$LINENO: checking $PNG_INCLUDE/png.h usability" >&5
+-echo $ECHO_N "checking $PNG_INCLUDE/png.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 <$PNG_INCLUDE/png.h>
+-_ACEOF
+-rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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 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 $PNG_INCLUDE/png.h presence" >&5
+-echo $ECHO_N "checking $PNG_INCLUDE/png.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 <$PNG_INCLUDE/png.h>
+-_ACEOF
+-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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
++  fi
+ 
+-  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
++  fi
+ 
+-# 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: $PNG_INCLUDE/png.h: accepted by the compiler, rejected by the preprocessor!" >&5
+-echo "$as_me: WARNING: $PNG_INCLUDE/png.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $PNG_INCLUDE/png.h: proceeding with the compiler's result" >&5
+-echo "$as_me: WARNING: $PNG_INCLUDE/png.h: proceeding with the compiler's result" >&2;}
+-    ac_header_preproc=yes
+-    ;;
+-  no:yes:* )
+-    { echo "$as_me:$LINENO: WARNING: $PNG_INCLUDE/png.h: present but cannot be compiled" >&5
+-echo "$as_me: WARNING: $PNG_INCLUDE/png.h: present but cannot be compiled" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $PNG_INCLUDE/png.h:     check for missing prerequisite headers?" >&5
+-echo "$as_me: WARNING: $PNG_INCLUDE/png.h:     check for missing prerequisite headers?" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $PNG_INCLUDE/png.h: see the Autoconf documentation" >&5
+-echo "$as_me: WARNING: $PNG_INCLUDE/png.h: see the Autoconf documentation" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $PNG_INCLUDE/png.h:     section \"Present But Cannot Be Compiled\"" >&5
+-echo "$as_me: WARNING: $PNG_INCLUDE/png.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $PNG_INCLUDE/png.h: proceeding with the preprocessor's result" >&5
+-echo "$as_me: WARNING: $PNG_INCLUDE/png.h: proceeding with the preprocessor's result" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $PNG_INCLUDE/png.h: in the future, the compiler will take precedence" >&5
+-echo "$as_me: WARNING: $PNG_INCLUDE/png.h: in the future, the compiler will take precedence" >&2;}
+-    (
+-      cat <<\_ASBOX
+-## ------------------------------------------ ##
+-## Report this to the AC_PACKAGE_NAME lists.  ##
+-## ------------------------------------------ ##
+-_ASBOX
+-    ) |
+-      sed "s/^/$as_me: WARNING:     /" >&2
+-    ;;
+-esac
+-echo "$as_me:$LINENO: checking for $PNG_INCLUDE/png.h" >&5
+-echo $ECHO_N "checking for $PNG_INCLUDE/png.h... $ECHO_C" >&6
+-if eval "test \"\${$as_ac_Header+set}\" = set"; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  eval "$as_ac_Header=\$ac_header_preproc"
+-fi
+-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
++    else
++      as_fn_error $? "cannot find png lib in $PNG_DIR" "$LINENO" 5
++    fi
+ 
+-fi
+-if test `eval echo '${'$as_ac_Header'}'` = yes; then
++    if test -n "$PNG_INCLUDE" ; then
++            old_cflags="$CFLAGS"
++      CFLAGS="$ZLIB_INC $CFLAGS"
++      as_ac_Header=`$as_echo "ac_cv_header_$PNG_INCLUDE/png.h" | $as_tr_sh`
++ac_fn_c_check_header_mongrel "$LINENO" "$PNG_INCLUDE/png.h" "$as_ac_Header" "$ac_includes_default"
++if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+   PNG_INC=-I$PNG_INCLUDE
+ else
+-  { { echo "$as_me:$LINENO: error: cannot find png headers" >&5
+-echo "$as_me: error: cannot find png headers" >&2;}
+-   { (exit 1); exit 1; }; }
++  as_fn_error $? "cannot find png headers" "$LINENO" 5
+ fi
+ 
+ 
+       CFLAGS="$old_cflags"
+       ALL_INC="$PNG_INC $ALL_INC"
+     else
+-        { { echo "$as_me:$LINENO: error: cannot find png headers in $PNG_DIR" >&5
+-echo "$as_me: error: cannot find png headers in $PNG_DIR" >&2;}
+-   { (exit 1); exit 1; }; }
++        as_fn_error $? "cannot find png headers in $PNG_DIR" "$LINENO" 5
+     fi
+     PNG_ENABLED="-DUSE_PNG"
+ else
+ 
+ 
+-  echo "$as_me:$LINENO: checking for png_init_io in -lpng" >&5
+-echo $ECHO_N "checking for png_init_io in -lpng... $ECHO_C" >&6
+-if test "${ac_cv_lib_png_png_init_io+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_init_io in -lpng" >&5
++$as_echo_n "checking for png_init_io in -lpng... " >&6; }
++if ${ac_cv_lib_png_png_init_io+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lpng $ZLIB_LIB $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+-/* Override any gcc2 internal prototype to avoid an error.  */
++/* 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
+-/* We use char because int might match the return type of a gcc2
+-   builtin and then its argument prototype would still apply.  */
+ char png_init_io ();
+ int
+ main ()
+ {
+-png_init_io ();
++return png_init_io ();
+   ;
+   return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_lib_png_png_init_io=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-ac_cv_lib_png_png_init_io=no
++  ac_cv_lib_png_png_init_io=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
+-      conftest$ac_exeext conftest.$ac_ext
++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_png_png_init_io" >&5
+-echo "${ECHO_T}$ac_cv_lib_png_png_init_io" >&6
+-if test $ac_cv_lib_png_png_init_io = yes; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png_png_init_io" >&5
++$as_echo "$ac_cv_lib_png_png_init_io" >&6; }
++if test "x$ac_cv_lib_png_png_init_io" = xyes; then :
+   PNG_LIB="-lpng"
+ fi
+ 
+-  if test "${ac_cv_header_png_h+set}" = set; then
+-  echo "$as_me:$LINENO: checking for png.h" >&5
+-echo $ECHO_N "checking for png.h... $ECHO_C" >&6
+-if test "${ac_cv_header_png_h+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-fi
+-echo "$as_me:$LINENO: result: $ac_cv_header_png_h" >&5
+-echo "${ECHO_T}$ac_cv_header_png_h" >&6
+-else
+-  # Is the header compilable?
+-echo "$as_me:$LINENO: checking png.h usability" >&5
+-echo $ECHO_N "checking png.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 <png.h>
+-_ACEOF
+-rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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 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 png.h presence" >&5
+-echo $ECHO_N "checking png.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 <png.h>
+-_ACEOF
+-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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: png.h: accepted by the compiler, rejected by the preprocessor!" >&5
+-echo "$as_me: WARNING: png.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: png.h: proceeding with the compiler's result" >&5
+-echo "$as_me: WARNING: png.h: proceeding with the compiler's result" >&2;}
+-    ac_header_preproc=yes
+-    ;;
+-  no:yes:* )
+-    { echo "$as_me:$LINENO: WARNING: png.h: present but cannot be compiled" >&5
+-echo "$as_me: WARNING: png.h: present but cannot be compiled" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: png.h:     check for missing prerequisite headers?" >&5
+-echo "$as_me: WARNING: png.h:     check for missing prerequisite headers?" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: png.h: see the Autoconf documentation" >&5
+-echo "$as_me: WARNING: png.h: see the Autoconf documentation" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: png.h:     section \"Present But Cannot Be Compiled\"" >&5
+-echo "$as_me: WARNING: png.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: png.h: proceeding with the preprocessor's result" >&5
+-echo "$as_me: WARNING: png.h: proceeding with the preprocessor's result" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: png.h: in the future, the compiler will take precedence" >&5
+-echo "$as_me: WARNING: png.h: in the future, the compiler will take precedence" >&2;}
+-    (
+-      cat <<\_ASBOX
+-## ------------------------------------------ ##
+-## Report this to the AC_PACKAGE_NAME lists.  ##
+-## ------------------------------------------ ##
+-_ASBOX
+-    ) |
+-      sed "s/^/$as_me: WARNING:     /" >&2
+-    ;;
+-esac
+-echo "$as_me:$LINENO: checking for png.h" >&5
+-echo $ECHO_N "checking for png.h... $ECHO_C" >&6
+-if test "${ac_cv_header_png_h+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  ac_cv_header_png_h=$ac_header_preproc
+-fi
+-echo "$as_me:$LINENO: result: $ac_cv_header_png_h" >&5
+-echo "${ECHO_T}$ac_cv_header_png_h" >&6
++  ac_fn_c_check_header_mongrel "$LINENO" "png.h" "ac_cv_header_png_h" "$ac_includes_default"
++if test "x$ac_cv_header_png_h" = xyes; then :
+ 
+-fi
+-if test $ac_cv_header_png_h = yes; then
+-  :
+ else
+-  { { echo "$as_me:$LINENO: error: cannot find png headers in system path" >&5
+-echo "$as_me: error: cannot find png headers in system path" >&2;}
+-   { (exit 1); exit 1; }; }
++  as_fn_error $? "cannot find png headers in system path" "$LINENO" 5
+ fi
+ 
+ 
+   if test -n "$PNG_LIB" ; then
+-    echo "$as_me:$LINENO: result:         using libpng from system libs." >&5
+-echo "${ECHO_T}        using libpng from system libs." >&6
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result:         using libpng from system libs." >&5
++$as_echo "        using libpng from system libs." >&6; }
+   else
+-    { { echo "$as_me:$LINENO: error: PNG (libpng) library cannot be found. install or reconfigure with --with-png=DIR" >&5
+-echo "$as_me: error: PNG (libpng) library cannot be found. install or reconfigure with --with-png=DIR" >&2;}
+-   { (exit 1); exit 1; }; }
++    as_fn_error $? "PNG (libpng) library cannot be found. install or reconfigure with --with-png=DIR" "$LINENO" 5
+   fi
+   PNG_ENABLED="-DUSE_PNG"
+ fi
+ 
+-if test "${ac_cv_header_setjmp_h+set}" = set; then
+-  echo "$as_me:$LINENO: checking for setjmp.h" >&5
+-echo $ECHO_N "checking for setjmp.h... $ECHO_C" >&6
+-if test "${ac_cv_header_setjmp_h+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-fi
+-echo "$as_me:$LINENO: result: $ac_cv_header_setjmp_h" >&5
+-echo "${ECHO_T}$ac_cv_header_setjmp_h" >&6
+-else
+-  # Is the header compilable?
+-echo "$as_me:$LINENO: checking setjmp.h usability" >&5
+-echo $ECHO_N "checking setjmp.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 <setjmp.h>
+-_ACEOF
+-rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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 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 setjmp.h presence" >&5
+-echo $ECHO_N "checking setjmp.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 <setjmp.h>
+-_ACEOF
+-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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: setjmp.h: accepted by the compiler, rejected by the preprocessor!" >&5
+-echo "$as_me: WARNING: setjmp.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: setjmp.h: proceeding with the compiler's result" >&5
+-echo "$as_me: WARNING: setjmp.h: proceeding with the compiler's result" >&2;}
+-    ac_header_preproc=yes
+-    ;;
+-  no:yes:* )
+-    { echo "$as_me:$LINENO: WARNING: setjmp.h: present but cannot be compiled" >&5
+-echo "$as_me: WARNING: setjmp.h: present but cannot be compiled" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: setjmp.h:     check for missing prerequisite headers?" >&5
+-echo "$as_me: WARNING: setjmp.h:     check for missing prerequisite headers?" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: setjmp.h: see the Autoconf documentation" >&5
+-echo "$as_me: WARNING: setjmp.h: see the Autoconf documentation" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: setjmp.h:     section \"Present But Cannot Be Compiled\"" >&5
+-echo "$as_me: WARNING: setjmp.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: setjmp.h: proceeding with the preprocessor's result" >&5
+-echo "$as_me: WARNING: setjmp.h: proceeding with the preprocessor's result" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: setjmp.h: in the future, the compiler will take precedence" >&5
+-echo "$as_me: WARNING: setjmp.h: in the future, the compiler will take precedence" >&2;}
+-    (
+-      cat <<\_ASBOX
+-## ------------------------------------------ ##
+-## Report this to the AC_PACKAGE_NAME lists.  ##
+-## ------------------------------------------ ##
+-_ASBOX
+-    ) |
+-      sed "s/^/$as_me: WARNING:     /" >&2
+-    ;;
+-esac
+-echo "$as_me:$LINENO: checking for setjmp.h" >&5
+-echo $ECHO_N "checking for setjmp.h... $ECHO_C" >&6
+-if test "${ac_cv_header_setjmp_h+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  ac_cv_header_setjmp_h=$ac_header_preproc
+-fi
+-echo "$as_me:$LINENO: result: $ac_cv_header_setjmp_h" >&5
+-echo "${ECHO_T}$ac_cv_header_setjmp_h" >&6
++ac_fn_c_check_header_mongrel "$LINENO" "setjmp.h" "ac_cv_header_setjmp_h" "$ac_includes_default"
++if test "x$ac_cv_header_setjmp_h" = xyes; then :
+ 
+-fi
+-if test $ac_cv_header_setjmp_h = yes; then
+-  :
+ else
+-  { { echo "$as_me:$LINENO: error: setjmp.h is required with libpng" >&5
+-echo "$as_me: error: setjmp.h is required with libpng" >&2;}
+-   { (exit 1); exit 1; }; }
++  as_fn_error $? "setjmp.h is required with libpng" "$LINENO" 5
+ fi
+ 
+ 
+@@ -5943,13 +5054,13 @@
+ 
+ 
+ 
+-# Check whether --with-gif or --without-gif was given.
+-if test "${with_gif+set}" = set; then
+-  withval="$with_gif"
+-  GIF_DIR=$withval
++# Check whether --with-gif was given.
++if test "${with_gif+set}" = set; then :
++  withval=$with_gif; GIF_DIR=$withval
+ else
+   GIF_DIR=''
+-fi;
++fi
++
+ 
+ 
+   if test -z "$GIF_DIR" || echo "$GIF_DIR" | grep '^/' >/dev/null ; then
+@@ -5958,8 +5069,8 @@
+     GIF_DIR="`pwd`/$GIF_DIR"
+   fi
+ 
+-{ echo "$as_me:$LINENO: checking where GIF is installed..." >&5
+-echo "$as_me: checking where GIF is installed..." >&6;}
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where GIF is installed..." >&5
++$as_echo "$as_me: checking where GIF is installed..." >&6;}
+ GIF_LIB=''
+ GIF_INC=''
+ GIF_ENABLED=''
+@@ -5975,8 +5086,8 @@
+ 
+     if test -n "$GIF_LIBDIR" ; then
+       GIF_LIB="-L$GIF_LIBDIR -lgif"
+-      echo "$as_me:$LINENO: result:         using libgif from $GIF_LIB" >&5
+-echo "${ECHO_T}        using libgif from $GIF_LIB" >&6
++      { $as_echo "$as_me:${as_lineno-$LINENO}: result:         using libgif from $GIF_LIB" >&5
++$as_echo "        using libgif from $GIF_LIB" >&6; }
+ 
+   if test ""$GIF_LIBDIR"" != "/usr/lib"; then
+ 
+@@ -6000,390 +5111,80 @@
+   fi
+ 
+     else
+-      { { echo "$as_me:$LINENO: error: cannot find gif lib in $GIF_DIR" >&5
+-echo "$as_me: error: cannot find gif lib in $GIF_DIR" >&2;}
+-   { (exit 1); exit 1; }; }
++      as_fn_error $? "cannot find gif lib in $GIF_DIR" "$LINENO" 5
+     fi
+ 
+     if test -n "$GIF_INCLUDE" ; then
+-      as_ac_Header=`echo "ac_cv_header_$GIF_INCLUDE/gif_lib.h" | $as_tr_sh`
+-if eval "test \"\${$as_ac_Header+set}\" = set"; then
+-  echo "$as_me:$LINENO: checking for $GIF_INCLUDE/gif_lib.h" >&5
+-echo $ECHO_N "checking for $GIF_INCLUDE/gif_lib.h... $ECHO_C" >&6
+-if eval "test \"\${$as_ac_Header+set}\" = set"; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-fi
+-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+-else
+-  # Is the header compilable?
+-echo "$as_me:$LINENO: checking $GIF_INCLUDE/gif_lib.h usability" >&5
+-echo $ECHO_N "checking $GIF_INCLUDE/gif_lib.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 <$GIF_INCLUDE/gif_lib.h>
+-_ACEOF
+-rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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 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 $GIF_INCLUDE/gif_lib.h presence" >&5
+-echo $ECHO_N "checking $GIF_INCLUDE/gif_lib.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 <$GIF_INCLUDE/gif_lib.h>
+-_ACEOF
+-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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: $GIF_INCLUDE/gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&5
+-echo "$as_me: WARNING: $GIF_INCLUDE/gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $GIF_INCLUDE/gif_lib.h: proceeding with the compiler's result" >&5
+-echo "$as_me: WARNING: $GIF_INCLUDE/gif_lib.h: proceeding with the compiler's result" >&2;}
+-    ac_header_preproc=yes
+-    ;;
+-  no:yes:* )
+-    { echo "$as_me:$LINENO: WARNING: $GIF_INCLUDE/gif_lib.h: present but cannot be compiled" >&5
+-echo "$as_me: WARNING: $GIF_INCLUDE/gif_lib.h: present but cannot be compiled" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $GIF_INCLUDE/gif_lib.h:     check for missing prerequisite headers?" >&5
+-echo "$as_me: WARNING: $GIF_INCLUDE/gif_lib.h:     check for missing prerequisite headers?" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $GIF_INCLUDE/gif_lib.h: see the Autoconf documentation" >&5
+-echo "$as_me: WARNING: $GIF_INCLUDE/gif_lib.h: see the Autoconf documentation" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $GIF_INCLUDE/gif_lib.h:     section \"Present But Cannot Be Compiled\"" >&5
+-echo "$as_me: WARNING: $GIF_INCLUDE/gif_lib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $GIF_INCLUDE/gif_lib.h: proceeding with the preprocessor's result" >&5
+-echo "$as_me: WARNING: $GIF_INCLUDE/gif_lib.h: proceeding with the preprocessor's result" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $GIF_INCLUDE/gif_lib.h: in the future, the compiler will take precedence" >&5
+-echo "$as_me: WARNING: $GIF_INCLUDE/gif_lib.h: in the future, the compiler will take precedence" >&2;}
+-    (
+-      cat <<\_ASBOX
+-## ------------------------------------------ ##
+-## Report this to the AC_PACKAGE_NAME lists.  ##
+-## ------------------------------------------ ##
+-_ASBOX
+-    ) |
+-      sed "s/^/$as_me: WARNING:     /" >&2
+-    ;;
+-esac
+-echo "$as_me:$LINENO: checking for $GIF_INCLUDE/gif_lib.h" >&5
+-echo $ECHO_N "checking for $GIF_INCLUDE/gif_lib.h... $ECHO_C" >&6
+-if eval "test \"\${$as_ac_Header+set}\" = set"; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  eval "$as_ac_Header=\$ac_header_preproc"
+-fi
+-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+-
+-fi
+-if test `eval echo '${'$as_ac_Header'}'` = yes; then
++      as_ac_Header=`$as_echo "ac_cv_header_$GIF_INCLUDE/gif_lib.h" | $as_tr_sh`
++ac_fn_c_check_header_mongrel "$LINENO" "$GIF_INCLUDE/gif_lib.h" "$as_ac_Header" "$ac_includes_default"
++if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+   GIF_INC=-I$GIF_INCLUDE
+ else
+-  { { echo "$as_me:$LINENO: error: cannot find gif headers" >&5
+-echo "$as_me: error: cannot find gif headers" >&2;}
+-   { (exit 1); exit 1; }; }
++  as_fn_error $? "cannot find gif headers" "$LINENO" 5
+ fi
+ 
+ 
+       ALL_INC="$GIF_INC $ALL_INC"
+     else
+-        { { echo "$as_me:$LINENO: error: cannot find gif headers in $GIF_DIR" >&5
+-echo "$as_me: error: cannot find gif headers in $GIF_DIR" >&2;}
+-   { (exit 1); exit 1; }; }
++        as_fn_error $? "cannot find gif headers in $GIF_DIR" "$LINENO" 5
+     fi
+     GIF_ENABLED="-DUSE_GIF"
+ else
+ 
+ 
+-  echo "$as_me:$LINENO: checking for DGifOpenFileHandle in -lgif" >&5
+-echo $ECHO_N "checking for DGifOpenFileHandle in -lgif... $ECHO_C" >&6
+-if test "${ac_cv_lib_gif_DGifOpenFileHandle+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifOpenFileHandle in -lgif" >&5
++$as_echo_n "checking for DGifOpenFileHandle in -lgif... " >&6; }
++if ${ac_cv_lib_gif_DGifOpenFileHandle+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lgif  $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+-/* Override any gcc2 internal prototype to avoid an error.  */
++/* 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
+-/* We use char because int might match the return type of a gcc2
+-   builtin and then its argument prototype would still apply.  */
+ char DGifOpenFileHandle ();
+ int
+ main ()
+ {
+-DGifOpenFileHandle ();
++return DGifOpenFileHandle ();
+   ;
+   return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_lib_gif_DGifOpenFileHandle=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-ac_cv_lib_gif_DGifOpenFileHandle=no
++  ac_cv_lib_gif_DGifOpenFileHandle=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
+-      conftest$ac_exeext conftest.$ac_ext
++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_gif_DGifOpenFileHandle" >&5
+-echo "${ECHO_T}$ac_cv_lib_gif_DGifOpenFileHandle" >&6
+-if test $ac_cv_lib_gif_DGifOpenFileHandle = yes; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifOpenFileHandle" >&5
++$as_echo "$ac_cv_lib_gif_DGifOpenFileHandle" >&6; }
++if test "x$ac_cv_lib_gif_DGifOpenFileHandle" = xyes; then :
+   GIF_LIB="-lgif"
+ fi
+ 
+-  if test "${ac_cv_header_gif_lib_h+set}" = set; then
+-  echo "$as_me:$LINENO: checking for gif_lib.h" >&5
+-echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6
+-if test "${ac_cv_header_gif_lib_h+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-fi
+-echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
+-echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6
+-else
+-  # Is the header compilable?
+-echo "$as_me:$LINENO: checking gif_lib.h usability" >&5
+-echo $ECHO_N "checking gif_lib.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 <gif_lib.h>
+-_ACEOF
+-rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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 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 gif_lib.h presence" >&5
+-echo $ECHO_N "checking gif_lib.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 <gif_lib.h>
+-_ACEOF
+-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&5
+-echo "$as_me: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the compiler's result" >&5
+-echo "$as_me: WARNING: gif_lib.h: proceeding with the compiler's result" >&2;}
+-    ac_header_preproc=yes
+-    ;;
+-  no:yes:* )
+-    { echo "$as_me:$LINENO: WARNING: gif_lib.h: present but cannot be compiled" >&5
+-echo "$as_me: WARNING: gif_lib.h: present but cannot be compiled" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: gif_lib.h:     check for missing prerequisite headers?" >&5
+-echo "$as_me: WARNING: gif_lib.h:     check for missing prerequisite headers?" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: gif_lib.h: see the Autoconf documentation" >&5
+-echo "$as_me: WARNING: gif_lib.h: see the Autoconf documentation" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: gif_lib.h:     section \"Present But Cannot Be Compiled\"" >&5
+-echo "$as_me: WARNING: gif_lib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&5
+-echo "$as_me: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: gif_lib.h: in the future, the compiler will take precedence" >&5
+-echo "$as_me: WARNING: gif_lib.h: in the future, the compiler will take precedence" >&2;}
+-    (
+-      cat <<\_ASBOX
+-## ------------------------------------------ ##
+-## Report this to the AC_PACKAGE_NAME lists.  ##
+-## ------------------------------------------ ##
+-_ASBOX
+-    ) |
+-      sed "s/^/$as_me: WARNING:     /" >&2
+-    ;;
+-esac
+-echo "$as_me:$LINENO: checking for gif_lib.h" >&5
+-echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6
+-if test "${ac_cv_header_gif_lib_h+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  ac_cv_header_gif_lib_h=$ac_header_preproc
+-fi
+-echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
+-echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6
++  ac_fn_c_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
++if test "x$ac_cv_header_gif_lib_h" = xyes; then :
+ 
+-fi
+-if test $ac_cv_header_gif_lib_h = yes; then
+-  :
+ else
+-  { { echo "$as_me:$LINENO: error: cannot find gif headers in system path" >&5
+-echo "$as_me: error: cannot find gif headers in system path" >&2;}
+-   { (exit 1); exit 1; }; }
++  as_fn_error $? "cannot find gif headers in system path" "$LINENO" 5
+ fi
+ 
+ 
+   if test -n "$GIF_LIB" ; then
+-    echo "$as_me:$LINENO: result:         using libgif from system libs." >&5
+-echo "${ECHO_T}        using libgif from system libs." >&6
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result:         using libgif from system libs." >&5
++$as_echo "        using libgif from system libs." >&6; }
+   else
+-    { { echo "$as_me:$LINENO: error: GIF (libgif) library cannot be found. install or reconfigure with --with-gif=DIR" >&5
+-echo "$as_me: error: GIF (libgif) library cannot be found. install or reconfigure with --with-gif=DIR" >&2;}
+-   { (exit 1); exit 1; }; }
++    as_fn_error $? "GIF (libgif) library cannot be found. install or reconfigure with --with-gif=DIR" "$LINENO" 5
+   fi
+   GIF_ENABLED="-DUSE_GIF"
+ fi
+@@ -6400,14 +5201,14 @@
+ 
+ unset ac_cv_lib_jpeg_jpeg_read_header
+ 
+-{ echo "$as_me:$LINENO: checking whether we should include JPEG support..." >&5
+-echo "$as_me: checking whether we should include JPEG support..." >&6;}
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we should include JPEG support..." >&5
++$as_echo "$as_me: checking whether we should include JPEG support..." >&6;}
+ 
+-# Check whether --with-jpeg or --without-jpeg was given.
+-if test "${with_jpeg+set}" = set; then
+-  withval="$with_jpeg"
++# Check whether --with-jpeg was given.
++if test "${with_jpeg+set}" = set; then :
++  withval=$with_jpeg;
++fi
+ 
+-fi;
+ 
+ if test -n "$with_jpeg" -a "$with_jpeg" != "yes" ; then
+ 
+@@ -6457,9 +5258,7 @@
+   fi
+ 
+   else
+-        { { echo "$as_me:$LINENO: error: \"Could not find jpeglib.h or libjpeg.a/libjpeg.so/libjpeg.dylib in $JPEG_DIR.\"" >&5
+-echo "$as_me: error: \"Could not find jpeglib.h or libjpeg.a/libjpeg.so/libjpeg.dylib in $JPEG_DIR.\"" >&2;}
+-   { (exit 1); exit 1; }; }
++        as_fn_error $? "\"Could not find jpeglib.h or libjpeg.a/libjpeg.so/libjpeg.dylib in $JPEG_DIR.\"" "$LINENO" 5
+   fi
+ 
+ 
+@@ -6468,227 +5267,58 @@
+     _libs="$LIBS"
+     CPPFLAGS="$JPEG_INC $CPPFLAGS"
+     LDFLAGS="$JPEG_LIB $LDFLAGS"
+-
+-echo "$as_me:$LINENO: checking for jpeg_read_header in -ljpeg" >&5
+-echo $ECHO_N "checking for jpeg_read_header in -ljpeg... $ECHO_C" >&6
+-if test "${ac_cv_lib_jpeg_jpeg_read_header+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_read_header in -ljpeg" >&5
++$as_echo_n "checking for jpeg_read_header in -ljpeg... " >&6; }
++if ${ac_cv_lib_jpeg_jpeg_read_header+:} false; then :
++  $as_echo_n "(cached) " >&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
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+-/* Override any gcc2 internal prototype to avoid an error.  */
++/* 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
+-/* We use char because int might match the return type of a gcc2
+-   builtin and then its argument prototype would still apply.  */
+ char jpeg_read_header ();
+ int
+ main ()
+ {
+-jpeg_read_header ();
++return jpeg_read_header ();
+   ;
+   return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_lib_jpeg_jpeg_read_header=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-ac_cv_lib_jpeg_jpeg_read_header=no
+-fi
+-rm -f 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_read_header" >&5
+-echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_read_header" >&6
+-if test $ac_cv_lib_jpeg_jpeg_read_header = yes; then
+-  cat >>confdefs.h <<_ACEOF
+-#define HAVE_LIBJPEG 1
+-_ACEOF
+-
+-  LIBS="-ljpeg $LIBS"
+-
+-else
+-  { { echo "$as_me:$LINENO: error: \"cannot link with libjpeg\"" >&5
+-echo "$as_me: error: \"cannot link with libjpeg\"" >&2;}
+-   { (exit 1); exit 1; }; }
+-fi
+-
+-    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 { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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 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 { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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: 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;}
+-    (
+-      cat <<\_ASBOX
+-## ------------------------------------------ ##
+-## Report this to the AC_PACKAGE_NAME lists.  ##
+-## ------------------------------------------ ##
+-_ASBOX
+-    ) |
+-      sed "s/^/$as_me: WARNING:     /" >&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
++  ac_cv_lib_jpeg_jpeg_read_header=no
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5
+-echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_read_header" >&5
++$as_echo "$ac_cv_lib_jpeg_jpeg_read_header" >&6; }
++if test "x$ac_cv_lib_jpeg_jpeg_read_header" = xyes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_LIBJPEG 1
++_ACEOF
++
++  LIBS="-ljpeg $LIBS"
+ 
++else
++  as_fn_error $? "\"cannot link with libjpeg\"" "$LINENO" 5
+ fi
+-if test $ac_cv_header_jpeglib_h = yes; then
+-  :
++
++    ac_fn_c_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
++if test "x$ac_cv_header_jpeglib_h" = xyes; then :
++
+ else
+-  { { echo "$as_me:$LINENO: error: \"cannot find jpeg headers\"" >&5
+-echo "$as_me: error: \"cannot find jpeg headers\"" >&2;}
+-   { (exit 1); exit 1; }; }
++  as_fn_error $? "\"cannot find jpeg headers\"" "$LINENO" 5
+ fi
+ 
+ 
+@@ -6696,77 +5326,48 @@
+     CPPFLAGS=$_cppflags
+     LDFLAGS=$_ldflags
+     LIBS=$_libs
+-    echo "$as_me:$LINENO: result:         using libjpeg from system $JPEG_LIB" >&5
+-echo "${ECHO_T}        using libjpeg from system $JPEG_LIB" >&6
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result:         using libjpeg from system $JPEG_LIB" >&5
++$as_echo "        using libjpeg from system $JPEG_LIB" >&6; }
+ 
+ else
+ 
+-
+-echo "$as_me:$LINENO: checking for jpeg_read_header in -ljpeg" >&5
+-echo $ECHO_N "checking for jpeg_read_header in -ljpeg... $ECHO_C" >&6
+-if test "${ac_cv_lib_jpeg_jpeg_read_header+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_read_header in -ljpeg" >&5
++$as_echo_n "checking for jpeg_read_header in -ljpeg... " >&6; }
++if ${ac_cv_lib_jpeg_jpeg_read_header+:} false; then :
++  $as_echo_n "(cached) " >&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
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+-/* Override any gcc2 internal prototype to avoid an error.  */
++/* 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
+-/* We use char because int might match the return type of a gcc2
+-   builtin and then its argument prototype would still apply.  */
+ char jpeg_read_header ();
+ int
+ main ()
+ {
+-jpeg_read_header ();
++return jpeg_read_header ();
+   ;
+   return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_lib_jpeg_jpeg_read_header=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-ac_cv_lib_jpeg_jpeg_read_header=no
++  ac_cv_lib_jpeg_jpeg_read_header=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
+-      conftest$ac_exeext conftest.$ac_ext
++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_read_header" >&5
+-echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_read_header" >&6
+-if test $ac_cv_lib_jpeg_jpeg_read_header = yes; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_read_header" >&5
++$as_echo "$ac_cv_lib_jpeg_jpeg_read_header" >&6; }
++if test "x$ac_cv_lib_jpeg_jpeg_read_header" = xyes; then :
+   cat >>confdefs.h <<_ACEOF
+ #define HAVE_LIBJPEG 1
+ _ACEOF
+@@ -6774,161 +5375,21 @@
+   LIBS="-ljpeg $LIBS"
+ 
+ else
+-  { { echo "$as_me:$LINENO: error: \"cannot link with libjpeg\"" >&5
+-echo "$as_me: error: \"cannot link with libjpeg\"" >&2;}
+-   { (exit 1); exit 1; }; }
+-fi
+-
+-    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 { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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 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 { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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
++  as_fn_error $? "\"cannot link with libjpeg\"" "$LINENO" 5
+ 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: 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;}
+-    (
+-      cat <<\_ASBOX
+-## ------------------------------------------ ##
+-## Report this to the AC_PACKAGE_NAME lists.  ##
+-## ------------------------------------------ ##
+-_ASBOX
+-    ) |
+-      sed "s/^/$as_me: WARNING:     /" >&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
++    ac_fn_c_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
++if test "x$ac_cv_header_jpeglib_h" = xyes; then :
+ 
+-fi
+-if test $ac_cv_header_jpeglib_h = yes; then
+-  :
+ else
+-  { { echo "$as_me:$LINENO: error: \"cannot find jpeg headers\"" >&5
+-echo "$as_me: error: \"cannot find jpeg headers\"" >&2;}
+-   { (exit 1); exit 1; }; }
++  as_fn_error $? "\"cannot find jpeg headers\"" "$LINENO" 5
+ fi
+ 
+ 
+     JPEG_ENABLED="-DUSE_JPEG"
+     JPEG_LIB="-ljpeg"
+-    echo "$as_me:$LINENO: result:         using libjpeg from system libs." >&5
+-echo "${ECHO_T}        using libjpeg from system libs." >&6
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result:         using libjpeg from system libs." >&5
++$as_echo "        using libjpeg from system libs." >&6; }
+ fi
+ 
+ JPEG_ENABLED=$JPEG_ENABLED
+@@ -6942,13 +5403,13 @@
+ unset ac_cv_lib_Xpm_XpmFreeXpmImage
+ 
+ 
+-# Check whether --with-xpm or --without-xpm was given.
+-if test "${with_xpm+set}" = set; then
+-  withval="$with_xpm"
+-  XPM_DIR=$withval
++# Check whether --with-xpm was given.
++if test "${with_xpm+set}" = set; then :
++  withval=$with_xpm; XPM_DIR=$withval
+ else
+   XPM_DIR=''
+-fi;
++fi
++
+ 
+ if test "$with_xpm" != "no" ; then
+ 
+@@ -6959,8 +5420,8 @@
+     XPM_DIR="`pwd`/$XPM_DIR"
+   fi
+ 
+-  { echo "$as_me:$LINENO: checking where libXpm is installed..." >&5
+-echo "$as_me: checking where libXpm is installed..." >&6;}
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where libXpm is installed..." >&5
++$as_echo "$as_me: checking where libXpm is installed..." >&6;}
+   XPM_LIB=''
+ 
+   test -f $XPM_DIR/lib/libXpm.a -o -f $XPM_DIR/lib/libXpm.so -o -f $XPM_DIR/lib/libXpm.sl -o -f $XPM_DIR/lib/libXpm.dylib && XPM_LIBDIR="$XPM_DIR/lib"
+@@ -6970,8 +5431,8 @@
+   if test -n "$XPM_LIBDIR" ; then
+ 
+     XPM_LIB="-L$XPM_LIBDIR -lXpm -lX11"
+-    echo "$as_me:$LINENO: result:         using libXpm from $XPM_LIB" >&5
+-echo "${ECHO_T}        using libXpm from $XPM_LIB" >&6
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result:         using libXpm from $XPM_LIB" >&5
++$as_echo "        using libXpm from $XPM_LIB" >&6; }
+ 
+   if test ""$XPM_LIBDIR"" != "/usr/lib"; then
+ 
+@@ -6998,81 +5459,53 @@
+   else
+ 
+ 
+-    echo "$as_me:$LINENO: checking for XpmFreeXpmImage in -lXpm" >&5
+-echo $ECHO_N "checking for XpmFreeXpmImage in -lXpm... $ECHO_C" >&6
+-if test "${ac_cv_lib_Xpm_XpmFreeXpmImage+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmFreeXpmImage in -lXpm" >&5
++$as_echo_n "checking for XpmFreeXpmImage in -lXpm... " >&6; }
++if ${ac_cv_lib_Xpm_XpmFreeXpmImage+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lXpm -lX11 $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+-/* Override any gcc2 internal prototype to avoid an error.  */
++/* 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
+-/* We use char because int might match the return type of a gcc2
+-   builtin and then its argument prototype would still apply.  */
+ char XpmFreeXpmImage ();
+ int
+ main ()
+ {
+-XpmFreeXpmImage ();
++return XpmFreeXpmImage ();
+   ;
+   return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_lib_Xpm_XpmFreeXpmImage=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-ac_cv_lib_Xpm_XpmFreeXpmImage=no
++  ac_cv_lib_Xpm_XpmFreeXpmImage=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
+-      conftest$ac_exeext conftest.$ac_ext
++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_Xpm_XpmFreeXpmImage" >&5
+-echo "${ECHO_T}$ac_cv_lib_Xpm_XpmFreeXpmImage" >&6
+-if test $ac_cv_lib_Xpm_XpmFreeXpmImage = yes; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmFreeXpmImage" >&5
++$as_echo "$ac_cv_lib_Xpm_XpmFreeXpmImage" >&6; }
++if test "x$ac_cv_lib_Xpm_XpmFreeXpmImage" = xyes; then :
+   XPM_LIB="-lXpm -lX11"
+ fi
+ 
+ 
+     if test -n "$XPM_LIB" ; then
+-      echo "$as_me:$LINENO: result:         using libXpm from system libs." >&5
+-echo "${ECHO_T}        using libXpm from system libs." >&6
++      { $as_echo "$as_me:${as_lineno-$LINENO}: result:         using libXpm from system libs." >&5
++$as_echo "        using libXpm from system libs." >&6; }
+     else
+-      echo "$as_me:$LINENO: result:         XPM (libXpm) library cannot be found, possibly needed for GD" >&5
+-echo "${ECHO_T}        XPM (libXpm) library cannot be found, possibly needed for GD" >&6
++      { $as_echo "$as_me:${as_lineno-$LINENO}: result:         XPM (libXpm) library cannot be found, possibly needed for GD" >&5
++$as_echo "        XPM (libXpm) library cannot be found, possibly needed for GD" >&6; }
+     fi
+   fi
+ 
+@@ -7088,16 +5521,16 @@
+ unset ac_cv_lib_c_iconv_open
+ 
+ 
+-# Check whether --with-libiconv or --without-libiconv was given.
+-if test "${with_libiconv+set}" = set; then
+-  withval="$with_libiconv"
+-  ICONV_DIR=$withval
++# Check whether --with-libiconv was given.
++if test "${with_libiconv+set}" = set; then :
++  withval=$with_libiconv; ICONV_DIR=$withval
+ else
+   ICONV_DIR=''
+-fi;
++fi
++
+ 
+-{ echo "$as_me:$LINENO: checking where libiconv is installed..." >&5
+-echo "$as_me: checking where libiconv is installed..." >&6;}
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where libiconv is installed..." >&5
++$as_echo "$as_me: checking where libiconv is installed..." >&6;}
+ 
+ ICONV_LIB=''
+ 
+@@ -7115,207 +5548,123 @@
+   test -f $ICONV_DIR/lib/libiconv.a -o -f $ICONV_DIR/lib/libiconv.so -o -f $ICONV_DIR/lib/libiconv.sl -o -f $ICONV_DIR/lib/libiconv.dylib && ICONV_LIBDIR="$ICONV_DIR/lib" && ICONV_INCDIR="$ICONV_DIR/include"
+   test -f $ICONV_DIR/lib64/libiconv.a -o -f $ICONV_DIR/lib64/libiconv.so -o -f $ICONV_DIR/lib64/libiconv.sl && ICONV_LIBDIR="$ICONV_DIR/lib64" && ICONV_INCDIR="$ICONV_DIR/include"
+ 
+-            echo "$as_me:$LINENO: checking for iconv_open in -lc" >&5
+-echo $ECHO_N "checking for iconv_open in -lc... $ECHO_C" >&6
+-if test "${ac_cv_lib_c_iconv_open+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv_open in -lc" >&5
++$as_echo_n "checking for iconv_open in -lc... " >&6; }
++if ${ac_cv_lib_c_iconv_open+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lc "-L$ICONV_LIBDIR" $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+-/* Override any gcc2 internal prototype to avoid an error.  */
++/* 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
+-/* We use char because int might match the return type of a gcc2
+-   builtin and then its argument prototype would still apply.  */
+ char iconv_open ();
+ int
+ main ()
+ {
+-iconv_open ();
++return iconv_open ();
+   ;
+   return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_lib_c_iconv_open=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-ac_cv_lib_c_iconv_open=no
++  ac_cv_lib_c_iconv_open=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
+-      conftest$ac_exeext conftest.$ac_ext
++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_iconv_open" >&5
+-echo "${ECHO_T}$ac_cv_lib_c_iconv_open" >&6
+-if test $ac_cv_lib_c_iconv_open = yes; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_iconv_open" >&5
++$as_echo "$ac_cv_lib_c_iconv_open" >&6; }
++if test "x$ac_cv_lib_c_iconv_open" = xyes; then :
+   ICONV_LIB="-L$ICONV_LIBDIR -lc"
+ fi
+ 
+-  echo "$as_me:$LINENO: checking for libiconv_open in -liconv" >&5
+-echo $ECHO_N "checking for libiconv_open in -liconv... $ECHO_C" >&6
+-if test "${ac_cv_lib_iconv_libiconv_open+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libiconv_open in -liconv" >&5
++$as_echo_n "checking for libiconv_open in -liconv... " >&6; }
++if ${ac_cv_lib_iconv_libiconv_open+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-liconv "-L$ICONV_LIBDIR" $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+-/* Override any gcc2 internal prototype to avoid an error.  */
++/* 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
+-/* We use char because int might match the return type of a gcc2
+-   builtin and then its argument prototype would still apply.  */
+ char libiconv_open ();
+ int
+ main ()
+ {
+-libiconv_open ();
++return libiconv_open ();
+   ;
+   return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_lib_iconv_libiconv_open=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-ac_cv_lib_iconv_libiconv_open=no
++  ac_cv_lib_iconv_libiconv_open=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
+-      conftest$ac_exeext conftest.$ac_ext
++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_iconv_libiconv_open" >&5
+-echo "${ECHO_T}$ac_cv_lib_iconv_libiconv_open" >&6
+-if test $ac_cv_lib_iconv_libiconv_open = yes; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iconv_libiconv_open" >&5
++$as_echo "$ac_cv_lib_iconv_libiconv_open" >&6; }
++if test "x$ac_cv_lib_iconv_libiconv_open" = xyes; then :
+   ICONV_LIB="-L$ICONV_LIBDIR -liconv"
+ fi
+ 
+-  echo "$as_me:$LINENO: checking for iconv_open in -liconv" >&5
+-echo $ECHO_N "checking for iconv_open in -liconv... $ECHO_C" >&6
+-if test "${ac_cv_lib_iconv_iconv_open+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv_open in -liconv" >&5
++$as_echo_n "checking for iconv_open in -liconv... " >&6; }
++if ${ac_cv_lib_iconv_iconv_open+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-liconv "-L$ICONV_LIBDIR" $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+-/* Override any gcc2 internal prototype to avoid an error.  */
++/* 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
+-/* We use char because int might match the return type of a gcc2
+-   builtin and then its argument prototype would still apply.  */
+ char iconv_open ();
+ int
+ main ()
+ {
+-iconv_open ();
++return iconv_open ();
+   ;
+   return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_lib_iconv_iconv_open=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-ac_cv_lib_iconv_iconv_open=no
++  ac_cv_lib_iconv_iconv_open=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
+-      conftest$ac_exeext conftest.$ac_ext
++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_iconv_iconv_open" >&5
+-echo "${ECHO_T}$ac_cv_lib_iconv_iconv_open" >&6
+-if test $ac_cv_lib_iconv_iconv_open = yes; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iconv_iconv_open" >&5
++$as_echo "$ac_cv_lib_iconv_iconv_open" >&6; }
++if test "x$ac_cv_lib_iconv_iconv_open" = xyes; then :
+   ICONV_LIB="-L$ICONV_LIBDIR -liconv"
+ fi
+ 
+@@ -7326,8 +5675,8 @@
+   if test -n "$ICONV_INCDIR"; then
+      ICONV_INC="-I$ICONV_INCDIR"
+   fi
+-  echo "$as_me:$LINENO: result:         using libiconv from $ICONV_LIB" >&5
+-echo "${ECHO_T}        using libiconv from $ICONV_LIB" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result:         using libiconv from $ICONV_LIB" >&5
++$as_echo "        using libiconv from $ICONV_LIB" >&6; }
+ 
+   if test ""$ICONV_DIR"" != "/usr/lib"; then
+ 
+@@ -7356,225 +5705,141 @@
+ 
+   unset ac_cv_lib_iconv_libiconv_open
+   unset ac_cv_lib_c_iconv_open
+-  echo "$as_me:$LINENO: checking for iconv_open in -lc" >&5
+-echo $ECHO_N "checking for iconv_open in -lc... $ECHO_C" >&6
+-if test "${ac_cv_lib_c_iconv_open+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv_open in -lc" >&5
++$as_echo_n "checking for iconv_open in -lc... " >&6; }
++if ${ac_cv_lib_c_iconv_open+:} false; then :
++  $as_echo_n "(cached) " >&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
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+-/* Override any gcc2 internal prototype to avoid an error.  */
++/* 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
+-/* We use char because int might match the return type of a gcc2
+-   builtin and then its argument prototype would still apply.  */
+ char iconv_open ();
+ int
+ main ()
+ {
+-iconv_open ();
++return iconv_open ();
+   ;
+   return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_lib_c_iconv_open=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-ac_cv_lib_c_iconv_open=no
++  ac_cv_lib_c_iconv_open=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
+-      conftest$ac_exeext conftest.$ac_ext
++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_iconv_open" >&5
+-echo "${ECHO_T}$ac_cv_lib_c_iconv_open" >&6
+-if test $ac_cv_lib_c_iconv_open = yes; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_iconv_open" >&5
++$as_echo "$ac_cv_lib_c_iconv_open" >&6; }
++if test "x$ac_cv_lib_c_iconv_open" = xyes; then :
+   ICONV_LIB="-lc"
+ fi
+ 
+-  echo "$as_me:$LINENO: checking for libiconv_open in -liconv" >&5
+-echo $ECHO_N "checking for libiconv_open in -liconv... $ECHO_C" >&6
+-if test "${ac_cv_lib_iconv_libiconv_open+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libiconv_open in -liconv" >&5
++$as_echo_n "checking for libiconv_open in -liconv... " >&6; }
++if ${ac_cv_lib_iconv_libiconv_open+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-liconv  $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+-/* Override any gcc2 internal prototype to avoid an error.  */
++/* 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
+-/* We use char because int might match the return type of a gcc2
+-   builtin and then its argument prototype would still apply.  */
+ char libiconv_open ();
+ int
+ main ()
+ {
+-libiconv_open ();
++return libiconv_open ();
+   ;
+   return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_lib_iconv_libiconv_open=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-ac_cv_lib_iconv_libiconv_open=no
++  ac_cv_lib_iconv_libiconv_open=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
+-      conftest$ac_exeext conftest.$ac_ext
++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_iconv_libiconv_open" >&5
+-echo "${ECHO_T}$ac_cv_lib_iconv_libiconv_open" >&6
+-if test $ac_cv_lib_iconv_libiconv_open = yes; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iconv_libiconv_open" >&5
++$as_echo "$ac_cv_lib_iconv_libiconv_open" >&6; }
++if test "x$ac_cv_lib_iconv_libiconv_open" = xyes; then :
+   ICONV_LIB="-liconv"
+ fi
+ 
+-  echo "$as_me:$LINENO: checking for iconv_open in -liconv" >&5
+-echo $ECHO_N "checking for iconv_open in -liconv... $ECHO_C" >&6
+-if test "${ac_cv_lib_iconv_iconv_open+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv_open in -liconv" >&5
++$as_echo_n "checking for iconv_open in -liconv... " >&6; }
++if ${ac_cv_lib_iconv_iconv_open+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-liconv  $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+-/* Override any gcc2 internal prototype to avoid an error.  */
++/* 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
+-/* We use char because int might match the return type of a gcc2
+-   builtin and then its argument prototype would still apply.  */
+ char iconv_open ();
+ int
+ main ()
+ {
+-iconv_open ();
++return iconv_open ();
+   ;
+   return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_lib_iconv_iconv_open=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-ac_cv_lib_iconv_iconv_open=no
++  ac_cv_lib_iconv_iconv_open=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
+-      conftest$ac_exeext conftest.$ac_ext
++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_iconv_iconv_open" >&5
+-echo "${ECHO_T}$ac_cv_lib_iconv_iconv_open" >&6
+-if test $ac_cv_lib_iconv_iconv_open = yes; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iconv_iconv_open" >&5
++$as_echo "$ac_cv_lib_iconv_iconv_open" >&6; }
++if test "x$ac_cv_lib_iconv_iconv_open" = xyes; then :
+   ICONV_LIB="-liconv"
+ fi
+ 
+ 
+   if test -n "$ICONV_LIB" ; then
+-    echo "$as_me:$LINENO: result:         using libiconv from system libs." >&5
+-echo "${ECHO_T}        using libiconv from system libs." >&6
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result:         using libiconv from system libs." >&5
++$as_echo "        using libiconv from system libs." >&6; }
+   else
+-    echo "$as_me:$LINENO: result:         libiconv library cannot be found, possibly needed for GD" >&5
+-echo "${ECHO_T}        libiconv library cannot be found, possibly needed for GD" >&6
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result:         libiconv library cannot be found, possibly needed for GD" >&5
++$as_echo "        libiconv library cannot be found, possibly needed for GD" >&6; }
+   fi
+ 
+ fi
+ 
+ if test -n "$ICONV_LIB" ; then
+   ICONV_ENABLED="-DUSE_ICONV"
+-  echo "$as_me:$LINENO: result:         libiconv found. Enabling internationalization ($ICONV_ENABLED)" >&5
+-echo "${ECHO_T}        libiconv found. Enabling internationalization ($ICONV_ENABLED)" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result:         libiconv found. Enabling internationalization ($ICONV_ENABLED)" >&5
++$as_echo "        libiconv found. Enabling internationalization ($ICONV_ENABLED)" >&6; }
+ fi
+ 
+ 
+@@ -7615,19 +5880,17 @@
+ unset ac_cv_lib_c_gdFontGetTiny
+ unset ac_cv_lib_gd_gdImageCreatePaletteFromTrueColor
+ 
+-{ echo "$as_me:$LINENO: checking for GD 2.0.28 or higher..." >&5
+-echo "$as_me: checking for GD 2.0.28 or higher..." >&6;}
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GD 2.0.28 or higher..." >&5
++$as_echo "$as_me: checking for GD 2.0.28 or higher..." >&6;}
+ 
+-# Check whether --with-gd or --without-gd was given.
+-if test "${with_gd+set}" = set; then
+-  withval="$with_gd"
++# Check whether --with-gd was given.
++if test "${with_gd+set}" = set; then :
++  withval=$with_gd;
++fi
+ 
+-fi;
+ 
+ if test "$with_gd" = "no" ; then
+-  { { echo "$as_me:$LINENO: error: GD library cannot be disabled" >&5
+-echo "$as_me: error: GD library cannot be disabled" >&2;}
+-   { (exit 1); exit 1; }; }
++  as_fn_error $? "GD library cannot be disabled" "$LINENO" 5
+ elif test -n "$with_gd" -a "$with_gd" != "yes" ; then
+ 
+   if echo "$with_gd" | grep '^static,' >/dev/null ; then
+@@ -7661,144 +5924,88 @@
+   test -f $GD_DIR/_libs/libgd.so -o -f $GD_DIR/_libs/libgd.sl -o -f $GD_DIR/_libs/libgd.dylib && GD_LIBDIR="$GD_DIR/_libs"
+   test -f $GD_DIR/libgd.so -o -f $GD_DIR/libgd.sl -o -f $GD_DIR/libgd.dylib && GD_LIBDIR="$GD_DIR"
+ 
+-    echo "$as_me:$LINENO: checking for gdImageCreatePaletteFromTrueColor in -lgd" >&5
+-echo $ECHO_N "checking for gdImageCreatePaletteFromTrueColor in -lgd... $ECHO_C" >&6
+-if test "${ac_cv_lib_gd_gdImageCreatePaletteFromTrueColor+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdImageCreatePaletteFromTrueColor in -lgd" >&5
++$as_echo_n "checking for gdImageCreatePaletteFromTrueColor in -lgd... " >&6; }
++if ${ac_cv_lib_gd_gdImageCreatePaletteFromTrueColor+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lgd $GD_XTRA_LIBS -L$GD_LIBDIR $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+-/* Override any gcc2 internal prototype to avoid an error.  */
++/* 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
+-/* We use char because int might match the return type of a gcc2
+-   builtin and then its argument prototype would still apply.  */
+ char gdImageCreatePaletteFromTrueColor ();
+ int
+ main ()
+ {
+-gdImageCreatePaletteFromTrueColor ();
++return gdImageCreatePaletteFromTrueColor ();
+   ;
+   return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_lib_gd_gdImageCreatePaletteFromTrueColor=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-ac_cv_lib_gd_gdImageCreatePaletteFromTrueColor=no
++  ac_cv_lib_gd_gdImageCreatePaletteFromTrueColor=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
+-      conftest$ac_exeext conftest.$ac_ext
++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_gd_gdImageCreatePaletteFromTrueColor" >&5
+-echo "${ECHO_T}$ac_cv_lib_gd_gdImageCreatePaletteFromTrueColor" >&6
+-if test $ac_cv_lib_gd_gdImageCreatePaletteFromTrueColor = yes; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gd_gdImageCreatePaletteFromTrueColor" >&5
++$as_echo "$ac_cv_lib_gd_gdImageCreatePaletteFromTrueColor" >&6; }
++if test "x$ac_cv_lib_gd_gdImageCreatePaletteFromTrueColor" = xyes; then :
+   IS_GD2="true"
+ fi
+ 
+ 
+   if test "$IS_GD2" = "false" -a -n "$ICONV_LIB"; then
+         unset ac_cv_lib_gd_gdImageCreatePaletteFromTrueColor
+-    { echo "$as_me:$LINENO: checking whether GD needs libiconv..." >&5
+-echo "$as_me: checking whether GD needs libiconv..." >&6;}
+-    echo "$as_me:$LINENO: checking for gdImageCreatePaletteFromTrueColor in -lgd" >&5
+-echo $ECHO_N "checking for gdImageCreatePaletteFromTrueColor in -lgd... $ECHO_C" >&6
+-if test "${ac_cv_lib_gd_gdImageCreatePaletteFromTrueColor+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GD needs libiconv..." >&5
++$as_echo "$as_me: checking whether GD needs libiconv..." >&6;}
++    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdImageCreatePaletteFromTrueColor in -lgd" >&5
++$as_echo_n "checking for gdImageCreatePaletteFromTrueColor in -lgd... " >&6; }
++if ${ac_cv_lib_gd_gdImageCreatePaletteFromTrueColor+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lgd $GD_XTRA_LIBS -L$GD_LIBDIR $ICONV_LIB $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+-/* Override any gcc2 internal prototype to avoid an error.  */
++/* 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
+-/* We use char because int might match the return type of a gcc2
+-   builtin and then its argument prototype would still apply.  */
+ char gdImageCreatePaletteFromTrueColor ();
+ int
+ main ()
+ {
+-gdImageCreatePaletteFromTrueColor ();
++return gdImageCreatePaletteFromTrueColor ();
+   ;
+   return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_lib_gd_gdImageCreatePaletteFromTrueColor=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-ac_cv_lib_gd_gdImageCreatePaletteFromTrueColor=no
++  ac_cv_lib_gd_gdImageCreatePaletteFromTrueColor=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
+-      conftest$ac_exeext conftest.$ac_ext
++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_gd_gdImageCreatePaletteFromTrueColor" >&5
+-echo "${ECHO_T}$ac_cv_lib_gd_gdImageCreatePaletteFromTrueColor" >&6
+-if test $ac_cv_lib_gd_gdImageCreatePaletteFromTrueColor = yes; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gd_gdImageCreatePaletteFromTrueColor" >&5
++$as_echo "$ac_cv_lib_gd_gdImageCreatePaletteFromTrueColor" >&6; }
++if test "x$ac_cv_lib_gd_gdImageCreatePaletteFromTrueColor" = xyes; then :
+   IS_GD2="true"
+ fi
+ 
+@@ -7809,8 +6016,8 @@
+       GD_INC=-I$GD_INCLUDE
+       GD_LIB="-L$GD_LIBDIR -lgd"
+       GD_XTRA_LIBS="$GD_XTRA_LIBS $GD_NEED_ICONV_LIB"
+-      echo "$as_me:$LINENO: result:         using libgd 2.0.28 (or higher) from $GD_LIB $GD_XTRA_LIBS" >&5
+-echo "${ECHO_T}        using libgd 2.0.28 (or higher) from $GD_LIB $GD_XTRA_LIBS" >&6
++      { $as_echo "$as_me:${as_lineno-$LINENO}: result:         using libgd 2.0.28 (or higher) from $GD_LIB $GD_XTRA_LIBS" >&5
++$as_echo "        using libgd 2.0.28 (or higher) from $GD_LIB $GD_XTRA_LIBS" >&6; }
+ 
+   if test ""$GD_LIBDIR"" != "/usr/lib"; then
+ 
+@@ -7834,202 +6041,64 @@
+   fi
+ 
+   else
+-      { { echo "$as_me:$LINENO: error: Could not find gd.h or libgd.a/libgd.so in $GD_DIR.  Make sure GD 2.0.28 or higher is compiled before calling configure. You may also get this error if you didn't specify the appropriate location for one of GD's dependencies (freetype, libpng, libjpeg or libiconv)." >&5
+-echo "$as_me: error: Could not find gd.h or libgd.a/libgd.so in $GD_DIR.  Make sure GD 2.0.28 or higher is compiled before calling configure. You may also get this error if you didn't specify the appropriate location for one of GD's dependencies (freetype, libpng, libjpeg or libiconv)." >&2;}
+-   { (exit 1); exit 1; }; }
++      as_fn_error $? "Could not find gd.h or libgd.a/libgd.so in $GD_DIR.  Make sure GD 2.0.28 or higher is compiled before calling configure. You may also get this error if you didn't specify the appropriate location for one of GD's dependencies (freetype, libpng, libjpeg or libiconv)." "$LINENO" 5
+   fi
+ else
+-    FOUND_GD="false"
+-  for GD_DIR in /usr /usr/local
+-  do
+-    test -f $GD_DIR/include/gd.h && GD_INCLUDE="$GD_DIR/include"
+-    test -f $GD_DIR/lib/libgd.a && GD_LIBDIR="$GD_DIR/lib"
+-    test -f $GD_DIR/lib64/libgd.a && GD_LIBDIR="$GD_DIR/lib64"
+-    test -f $GD_DIR/lib/libgd.so -o -f $GD_DIR/lib/libgd.sl -o -f $GD_DIR/lib/libgd.dylib && GD_LIBDIR="$GD_DIR/lib"
+-    test -f $GD_DIR/lib64/libgd.so -o -f $GD_DIR/lib/libgd.sl && GD_LIBDIR="$GD_DIR/lib64"
+-
+-        echo "$as_me:$LINENO: checking for gdImageCreatePaletteFromTrueColor in -lgd" >&5
+-echo $ECHO_N "checking for gdImageCreatePaletteFromTrueColor in -lgd... $ECHO_C" >&6
+-if test "${ac_cv_lib_gd_gdImageCreatePaletteFromTrueColor+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdImageCreatePaletteFromTrueColor in -lgd" >&5
++$as_echo_n "checking for gdImageCreatePaletteFromTrueColor in -lgd... " >&6; }
++if ${ac_cv_lib_gd_gdImageCreatePaletteFromTrueColor+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lgd $GD_XTRA_LIBS $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++LIBS="-lgd  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+-/* Override any gcc2 internal prototype to avoid an error.  */
++/* 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
+-/* We use char because int might match the return type of a gcc2
+-   builtin and then its argument prototype would still apply.  */
+ char gdImageCreatePaletteFromTrueColor ();
+ int
+ main ()
+ {
+-gdImageCreatePaletteFromTrueColor ();
++return gdImageCreatePaletteFromTrueColor ();
+   ;
+   return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_lib_gd_gdImageCreatePaletteFromTrueColor=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-ac_cv_lib_gd_gdImageCreatePaletteFromTrueColor=no
++  ac_cv_lib_gd_gdImageCreatePaletteFromTrueColor=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
+-      conftest$ac_exeext conftest.$ac_ext
++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_gd_gdImageCreatePaletteFromTrueColor" >&5
+-echo "${ECHO_T}$ac_cv_lib_gd_gdImageCreatePaletteFromTrueColor" >&6
+-if test $ac_cv_lib_gd_gdImageCreatePaletteFromTrueColor = yes; then
+-  IS_GD2="true"
+-fi
+-
+-
+-    if test "$IS_GD2" = "false" -a -n "$ICONV_LIB"; then
+-            { echo "$as_me:$LINENO: checking whether GD needs libiconv..." >&5
+-echo "$as_me: checking whether GD needs libiconv..." >&6;}
+-      unset ac_cv_lib_gd_gdImageCreatePaletteFromTrueColor
+-      echo "$as_me:$LINENO: checking for gdImageCreatePaletteFromTrueColor in -lgd" >&5
+-echo $ECHO_N "checking for gdImageCreatePaletteFromTrueColor in -lgd... $ECHO_C" >&6
+-if test "${ac_cv_lib_gd_gdImageCreatePaletteFromTrueColor+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lgd $GD_XTRA_LIBS $ICONV_LIB $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gd_gdImageCreatePaletteFromTrueColor" >&5
++$as_echo "$ac_cv_lib_gd_gdImageCreatePaletteFromTrueColor" >&6; }
++if test "x$ac_cv_lib_gd_gdImageCreatePaletteFromTrueColor" = xyes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_LIBGD 1
+ _ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+ 
+-/* Override any gcc2 internal prototype to avoid an error.  */
+-#ifdef __cplusplus
+-extern "C"
+-#endif
+-/* We use char because int might match the return type of a gcc2
+-   builtin and then its argument prototype would still apply.  */
+-char gdImageCreatePaletteFromTrueColor ();
+-int
+-main ()
+-{
+-gdImageCreatePaletteFromTrueColor ();
+-  ;
+-  return 0;
+-}
+-_ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
+-  ac_cv_lib_gd_gdImageCreatePaletteFromTrueColor=yes
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
++  LIBS="-lgd $LIBS"
+ 
+-ac_cv_lib_gd_gdImageCreatePaletteFromTrueColor=no
+-fi
+-rm -f 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_gd_gdImageCreatePaletteFromTrueColor" >&5
+-echo "${ECHO_T}$ac_cv_lib_gd_gdImageCreatePaletteFromTrueColor" >&6
+-if test $ac_cv_lib_gd_gdImageCreatePaletteFromTrueColor = yes; then
+-  IS_GD2="true"
++else
++  as_fn_error $? "\"cannot find GD library\"" "$LINENO" 5
+ fi
+ 
+-      GD_NEED_ICONV_LIB="$ICONV_LIB"
+-    fi
+-
+-    if test -n "$GD_INCLUDE" -a -n "$GD_LIBDIR" -a "$IS_GD2" = "true"; then
+-      GD_INC=-I$GD_INCLUDE
+-      GD_LIB="-L$GD_LIBDIR -lgd"
+-      GD_XTRA_LIBS="$GD_XTRA_LIBS $GD_NEED_ICONV_LIB"
+-      echo "$as_me:$LINENO: result:         using libgd 2.0.28 (or higher) from system libs ($GD_LIB $GD_XTRA_LIBS)." >&5
+-echo "${ECHO_T}        using libgd 2.0.28 (or higher) from system libs ($GD_LIB $GD_XTRA_LIBS)." >&6
+-
+-  if test ""$GD_LIBDIR"" != "/usr/lib"; then
+-
+-  if test -z ""$GD_LIBDIR"" || echo ""$GD_LIBDIR"" | grep '^/' >/dev/null ; then
+-    ai_p=""$GD_LIBDIR""
+-  else
+-    ai_p="`pwd`/"$GD_LIBDIR""
+-  fi
+-
++  ac_fn_c_check_header_mongrel "$LINENO" "gd.h" "ac_cv_header_gd_h" "$ac_includes_default"
++if test "x$ac_cv_header_gd_h" = xyes; then :
+ 
+-  unique=`echo $ac_n "$ai_p$ac_c" | tr -c -d a-zA-Z0-9`
+-  cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\""
+-  if test -n "$unique" && test "`eval $cmd`" = "" ; then
+-    eval "LIBPATH$unique=set"
+-
+-      EXTRA_LIBS="$EXTRA_LIBS -L$ai_p"
+-        RPATHS="$RPATHS ${ld_runpath_switch}$ai_p"
+-
+-  fi
+-
+-  fi
++else
++  as_fn_error $? "\"cannot find GD headers\"" "$LINENO" 5
++fi
+ 
+-      FOUND_GD="true"
+-      break;
+-    fi
+-  done
+ 
+-  if test "$FOUND_GD" = "false" ; then
+-    { { echo "$as_me:$LINENO: error: Could not find gd.h or libgd.a/libgd.so in $GD_DIR.  Make sure GD 2.0.28 or higher is compiled before calling configure. You may also get this error if you didn't specify the appropriate location for one of GD's dependencies (freetype, libpng, libjpeg or libiconv)." >&5
+-echo "$as_me: error: Could not find gd.h or libgd.a/libgd.so in $GD_DIR.  Make sure GD 2.0.28 or higher is compiled before calling configure. You may also get this error if you didn't specify the appropriate location for one of GD's dependencies (freetype, libpng, libjpeg or libiconv)." >&2;}
+-   { (exit 1); exit 1; }; }
+-  fi
+ fi
+ 
+ 
+@@ -8040,358 +6109,223 @@
+             GD_CHECKLIB=c
+     GD_LIB=$GD_LIBDIR/libgd.a
+     GD_STATIC=$GD_LIBDIR/libgd.a
+-    echo "$as_me:$LINENO: result: static linkage of $GD_STATIC requested... testing supported formats..." >&5
+-echo "${ECHO_T}static linkage of $GD_STATIC requested... testing supported formats..." >&6
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result: static linkage of $GD_STATIC requested... testing supported formats..." >&5
++$as_echo "static linkage of $GD_STATIC requested... testing supported formats..." >&6; }
+   else
+     GD_CHECKLIB=c
+     # GD_LIB was already set above
+     GD_STATIC=""
+   fi
+ 
+-  as_ac_Lib=`echo "ac_cv_lib_$GD_CHECKLIB''_gdImageGif" | $as_tr_sh`
+-echo "$as_me:$LINENO: checking for gdImageGif in -l$GD_CHECKLIB" >&5
+-echo $ECHO_N "checking for gdImageGif in -l$GD_CHECKLIB... $ECHO_C" >&6
+-if eval "test \"\${$as_ac_Lib+set}\" = set"; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++  as_ac_Lib=`$as_echo "ac_cv_lib_$GD_CHECKLIB''_gdImageGif" | $as_tr_sh`
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdImageGif in -l$GD_CHECKLIB" >&5
++$as_echo_n "checking for gdImageGif in -l$GD_CHECKLIB... " >&6; }
++if eval \${$as_ac_Lib+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-l$GD_CHECKLIB $GD_STATIC $GD_LIB $GD_XTRA_LIBS $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+-/* Override any gcc2 internal prototype to avoid an error.  */
++/* 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
+-/* We use char because int might match the return type of a gcc2
+-   builtin and then its argument prototype would still apply.  */
+ char gdImageGif ();
+ int
+ main ()
+ {
+-gdImageGif ();
++return gdImageGif ();
+   ;
+   return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++if ac_fn_c_try_link "$LINENO"; then :
+   eval "$as_ac_Lib=yes"
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-eval "$as_ac_Lib=no"
++  eval "$as_ac_Lib=no"
+ fi
+-rm -f conftest.err conftest.$ac_objext \
+-      conftest$ac_exeext conftest.$ac_ext
++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: `eval echo '${'$as_ac_Lib'}'`" >&5
+-echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
+-if test `eval echo '${'$as_ac_Lib'}'` = yes; then
++eval ac_res=\$$as_ac_Lib
++	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
++$as_echo "$ac_res" >&6; }
++if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+   GD_DEF="$GD_DEF -DUSE_GD_GIF"
+ fi
+ 
+-  as_ac_Lib=`echo "ac_cv_lib_$GD_CHECKLIB''_gdImagePng" | $as_tr_sh`
+-echo "$as_me:$LINENO: checking for gdImagePng in -l$GD_CHECKLIB" >&5
+-echo $ECHO_N "checking for gdImagePng in -l$GD_CHECKLIB... $ECHO_C" >&6
+-if eval "test \"\${$as_ac_Lib+set}\" = set"; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++  as_ac_Lib=`$as_echo "ac_cv_lib_$GD_CHECKLIB''_gdImagePng" | $as_tr_sh`
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdImagePng in -l$GD_CHECKLIB" >&5
++$as_echo_n "checking for gdImagePng in -l$GD_CHECKLIB... " >&6; }
++if eval \${$as_ac_Lib+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-l$GD_CHECKLIB $GD_STATIC $GD_LIB $GD_XTRA_LIBS $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+-/* Override any gcc2 internal prototype to avoid an error.  */
++/* 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
+-/* We use char because int might match the return type of a gcc2
+-   builtin and then its argument prototype would still apply.  */
+ char gdImagePng ();
+ int
+ main ()
+ {
+-gdImagePng ();
++return gdImagePng ();
+   ;
+   return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++if ac_fn_c_try_link "$LINENO"; then :
+   eval "$as_ac_Lib=yes"
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-eval "$as_ac_Lib=no"
++  eval "$as_ac_Lib=no"
+ fi
+-rm -f conftest.err conftest.$ac_objext \
+-      conftest$ac_exeext conftest.$ac_ext
++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: `eval echo '${'$as_ac_Lib'}'`" >&5
+-echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
+-if test `eval echo '${'$as_ac_Lib'}'` = yes; then
++eval ac_res=\$$as_ac_Lib
++	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
++$as_echo "$ac_res" >&6; }
++if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+   GD_DEF="$GD_DEF -DUSE_GD_PNG"
+ fi
+ 
+-  as_ac_Lib=`echo "ac_cv_lib_$GD_CHECKLIB''_gdImageJpeg" | $as_tr_sh`
+-echo "$as_me:$LINENO: checking for gdImageJpeg in -l$GD_CHECKLIB" >&5
+-echo $ECHO_N "checking for gdImageJpeg in -l$GD_CHECKLIB... $ECHO_C" >&6
+-if eval "test \"\${$as_ac_Lib+set}\" = set"; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++  as_ac_Lib=`$as_echo "ac_cv_lib_$GD_CHECKLIB''_gdImageJpeg" | $as_tr_sh`
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdImageJpeg in -l$GD_CHECKLIB" >&5
++$as_echo_n "checking for gdImageJpeg in -l$GD_CHECKLIB... " >&6; }
++if eval \${$as_ac_Lib+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-l$GD_CHECKLIB $GD_STATIC $GD_LIB $GD_XTRA_LIBS $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+-/* Override any gcc2 internal prototype to avoid an error.  */
++/* 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
+-/* We use char because int might match the return type of a gcc2
+-   builtin and then its argument prototype would still apply.  */
+ char gdImageJpeg ();
+ int
+ main ()
+ {
+-gdImageJpeg ();
++return gdImageJpeg ();
+   ;
+   return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++if ac_fn_c_try_link "$LINENO"; then :
+   eval "$as_ac_Lib=yes"
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-eval "$as_ac_Lib=no"
++  eval "$as_ac_Lib=no"
+ fi
+-rm -f conftest.err conftest.$ac_objext \
+-      conftest$ac_exeext conftest.$ac_ext
++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: `eval echo '${'$as_ac_Lib'}'`" >&5
+-echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
+-if test `eval echo '${'$as_ac_Lib'}'` = yes; then
++eval ac_res=\$$as_ac_Lib
++	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
++$as_echo "$ac_res" >&6; }
++if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+   GD_DEF="$GD_DEF -DUSE_GD_JPEG"
+ fi
+ 
+-  as_ac_Lib=`echo "ac_cv_lib_$GD_CHECKLIB''_gdImageWBMP" | $as_tr_sh`
+-echo "$as_me:$LINENO: checking for gdImageWBMP in -l$GD_CHECKLIB" >&5
+-echo $ECHO_N "checking for gdImageWBMP in -l$GD_CHECKLIB... $ECHO_C" >&6
+-if eval "test \"\${$as_ac_Lib+set}\" = set"; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++  as_ac_Lib=`$as_echo "ac_cv_lib_$GD_CHECKLIB''_gdImageWBMP" | $as_tr_sh`
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdImageWBMP in -l$GD_CHECKLIB" >&5
++$as_echo_n "checking for gdImageWBMP in -l$GD_CHECKLIB... " >&6; }
++if eval \${$as_ac_Lib+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-l$GD_CHECKLIB $GD_STATIC $GD_LIB $GD_XTRA_LIBS $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+-/* Override any gcc2 internal prototype to avoid an error.  */
++/* 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
+-/* We use char because int might match the return type of a gcc2
+-   builtin and then its argument prototype would still apply.  */
+ char gdImageWBMP ();
+ int
+ main ()
+ {
+-gdImageWBMP ();
++return gdImageWBMP ();
+   ;
+   return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++if ac_fn_c_try_link "$LINENO"; then :
+   eval "$as_ac_Lib=yes"
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-eval "$as_ac_Lib=no"
++  eval "$as_ac_Lib=no"
+ fi
+-rm -f conftest.err conftest.$ac_objext \
+-      conftest$ac_exeext conftest.$ac_ext
++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: `eval echo '${'$as_ac_Lib'}'`" >&5
+-echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
+-if test `eval echo '${'$as_ac_Lib'}'` = yes; then
++eval ac_res=\$$as_ac_Lib
++	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
++$as_echo "$ac_res" >&6; }
++if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+   GD_DEF="$GD_DEF -DUSE_GD_WBMP"
+ fi
+ 
+ 
+     GD_FT_SUPPORT=no
+-  as_ac_Lib=`echo "ac_cv_lib_$GD_CHECKLIB''_gdImageStringFT" | $as_tr_sh`
+-echo "$as_me:$LINENO: checking for gdImageStringFT in -l$GD_CHECKLIB" >&5
+-echo $ECHO_N "checking for gdImageStringFT in -l$GD_CHECKLIB... $ECHO_C" >&6
+-if eval "test \"\${$as_ac_Lib+set}\" = set"; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++  as_ac_Lib=`$as_echo "ac_cv_lib_$GD_CHECKLIB''_gdImageStringFT" | $as_tr_sh`
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdImageStringFT in -l$GD_CHECKLIB" >&5
++$as_echo_n "checking for gdImageStringFT in -l$GD_CHECKLIB... " >&6; }
++if eval \${$as_ac_Lib+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-l$GD_CHECKLIB $GD_STATIC $GD_LIB $GD_XTRA_LIBS $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+-/* Override any gcc2 internal prototype to avoid an error.  */
++/* 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
+-/* We use char because int might match the return type of a gcc2
+-   builtin and then its argument prototype would still apply.  */
+ char gdImageStringFT ();
+ int
+ main ()
+ {
+-gdImageStringFT ();
++return gdImageStringFT ();
+   ;
+   return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++if ac_fn_c_try_link "$LINENO"; then :
+   eval "$as_ac_Lib=yes"
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-eval "$as_ac_Lib=no"
++  eval "$as_ac_Lib=no"
+ fi
+-rm -f conftest.err conftest.$ac_objext \
+-      conftest$ac_exeext conftest.$ac_ext
++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: `eval echo '${'$as_ac_Lib'}'`" >&5
+-echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
+-if test `eval echo '${'$as_ac_Lib'}'` = yes; then
++eval ac_res=\$$as_ac_Lib
++	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
++$as_echo "$ac_res" >&6; }
++if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+   GD_FT_SUPPORT=yes
+ fi
+ 
+@@ -8399,72 +6333,45 @@
+     if test -n "$GD_STATIC" ; then
+      GD_LIB="$GD_LIB -lfontconfig"
+      unset ac_cv_lib_c___gdImageStringFT
+-     as_ac_Lib=`echo "ac_cv_lib_$GD_CHECKLIB''_gdImageStringFT" | $as_tr_sh`
+-echo "$as_me:$LINENO: checking for gdImageStringFT in -l$GD_CHECKLIB" >&5
+-echo $ECHO_N "checking for gdImageStringFT in -l$GD_CHECKLIB... $ECHO_C" >&6
+-if eval "test \"\${$as_ac_Lib+set}\" = set"; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++     as_ac_Lib=`$as_echo "ac_cv_lib_$GD_CHECKLIB''_gdImageStringFT" | $as_tr_sh`
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdImageStringFT in -l$GD_CHECKLIB" >&5
++$as_echo_n "checking for gdImageStringFT in -l$GD_CHECKLIB... " >&6; }
++if eval \${$as_ac_Lib+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-l$GD_CHECKLIB $GD_STATIC $GD_LIB $GD_XTRA_LIBS $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+-/* Override any gcc2 internal prototype to avoid an error.  */
++/* 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
+-/* We use char because int might match the return type of a gcc2
+-   builtin and then its argument prototype would still apply.  */
+ char gdImageStringFT ();
+ int
+ main ()
+ {
+-gdImageStringFT ();
++return gdImageStringFT ();
+   ;
+   return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++if ac_fn_c_try_link "$LINENO"; then :
+   eval "$as_ac_Lib=yes"
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-eval "$as_ac_Lib=no"
++  eval "$as_ac_Lib=no"
+ fi
+-rm -f conftest.err conftest.$ac_objext \
+-      conftest$ac_exeext conftest.$ac_ext
++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: `eval echo '${'$as_ac_Lib'}'`" >&5
+-echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
+-if test `eval echo '${'$as_ac_Lib'}'` = yes; then
++eval ac_res=\$$as_ac_Lib
++	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
++$as_echo "$ac_res" >&6; }
++if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+   GD_FT_SUPPORT=yes
+ fi
+ 
+@@ -8475,72 +6382,45 @@
+   fi
+ 
+     GD_RESOLUTION_SUPPORT=no
+-  as_ac_Lib=`echo "ac_cv_lib_$GD_CHECKLIB''_gdImageSetResolution" | $as_tr_sh`
+-echo "$as_me:$LINENO: checking for gdImageSetResolution in -l$GD_CHECKLIB" >&5
+-echo $ECHO_N "checking for gdImageSetResolution in -l$GD_CHECKLIB... $ECHO_C" >&6
+-if eval "test \"\${$as_ac_Lib+set}\" = set"; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++  as_ac_Lib=`$as_echo "ac_cv_lib_$GD_CHECKLIB''_gdImageSetResolution" | $as_tr_sh`
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdImageSetResolution in -l$GD_CHECKLIB" >&5
++$as_echo_n "checking for gdImageSetResolution in -l$GD_CHECKLIB... " >&6; }
++if eval \${$as_ac_Lib+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-l$GD_CHECKLIB $GD_STATIC $GD_LIB $GD_XTRA_LIBS $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+-/* Override any gcc2 internal prototype to avoid an error.  */
++/* 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
+-/* We use char because int might match the return type of a gcc2
+-   builtin and then its argument prototype would still apply.  */
+ char gdImageSetResolution ();
+ int
+ main ()
+ {
+-gdImageSetResolution ();
++return gdImageSetResolution ();
+   ;
+   return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++if ac_fn_c_try_link "$LINENO"; then :
+   eval "$as_ac_Lib=yes"
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-eval "$as_ac_Lib=no"
++  eval "$as_ac_Lib=no"
+ fi
+-rm -f conftest.err conftest.$ac_objext \
+-      conftest$ac_exeext conftest.$ac_ext
++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: `eval echo '${'$as_ac_Lib'}'`" >&5
+-echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
+-if test `eval echo '${'$as_ac_Lib'}'` = yes; then
++eval ac_res=\$$as_ac_Lib
++	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
++$as_echo "$ac_res" >&6; }
++if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+   GD_RESOLUTION_SUPPORT=yes
+ fi
+ 
+@@ -8549,212 +6429,131 @@
+      GD_DEF="$GD_DEF -DUSE_GD_RESOLUTION"
+   fi
+ 
+-    as_ac_Lib=`echo "ac_cv_lib_$GD_CHECKLIB''_gdImageOpenPolygon" | $as_tr_sh`
+-echo "$as_me:$LINENO: checking for gdImageOpenPolygon in -l$GD_CHECKLIB" >&5
+-echo $ECHO_N "checking for gdImageOpenPolygon in -l$GD_CHECKLIB... $ECHO_C" >&6
+-if eval "test \"\${$as_ac_Lib+set}\" = set"; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++    as_ac_Lib=`$as_echo "ac_cv_lib_$GD_CHECKLIB''_gdImageOpenPolygon" | $as_tr_sh`
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdImageOpenPolygon in -l$GD_CHECKLIB" >&5
++$as_echo_n "checking for gdImageOpenPolygon in -l$GD_CHECKLIB... " >&6; }
++if eval \${$as_ac_Lib+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-l$GD_CHECKLIB $GD_STATIC $GD_LIB $GD_XTRA_LIBS $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+-/* Override any gcc2 internal prototype to avoid an error.  */
++/* 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
+-/* We use char because int might match the return type of a gcc2
+-   builtin and then its argument prototype would still apply.  */
+ char gdImageOpenPolygon ();
+ int
+ main ()
+ {
+-gdImageOpenPolygon ();
++return gdImageOpenPolygon ();
+   ;
+   return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++if ac_fn_c_try_link "$LINENO"; then :
+   eval "$as_ac_Lib=yes"
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-eval "$as_ac_Lib=no"
++  eval "$as_ac_Lib=no"
+ fi
+-rm -f conftest.err conftest.$ac_objext \
+-      conftest$ac_exeext conftest.$ac_ext
++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: `eval echo '${'$as_ac_Lib'}'`" >&5
+-echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
+-if test `eval echo '${'$as_ac_Lib'}'` = yes; then
++eval ac_res=\$$as_ac_Lib
++	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
++$as_echo "$ac_res" >&6; }
++if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+   GD_DEF="$GD_DEF -DGD_HAS_FTEX_XSHOW"
+ fi
+ 
+ 
+-    as_ac_Lib=`echo "ac_cv_lib_$GD_CHECKLIB''_gdImageGifPtr" | $as_tr_sh`
+-echo "$as_me:$LINENO: checking for gdImageGifPtr in -l$GD_CHECKLIB" >&5
+-echo $ECHO_N "checking for gdImageGifPtr in -l$GD_CHECKLIB... $ECHO_C" >&6
+-if eval "test \"\${$as_ac_Lib+set}\" = set"; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++    as_ac_Lib=`$as_echo "ac_cv_lib_$GD_CHECKLIB''_gdImageGifPtr" | $as_tr_sh`
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdImageGifPtr in -l$GD_CHECKLIB" >&5
++$as_echo_n "checking for gdImageGifPtr in -l$GD_CHECKLIB... " >&6; }
++if eval \${$as_ac_Lib+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-l$GD_CHECKLIB $GD_STATIC $GD_LIB $GD_XTRA_LIBS $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+-/* Override any gcc2 internal prototype to avoid an error.  */
++/* 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
+-/* We use char because int might match the return type of a gcc2
+-   builtin and then its argument prototype would still apply.  */
+ char gdImageGifPtr ();
+ int
+ main ()
+ {
+-gdImageGifPtr ();
++return gdImageGifPtr ();
+   ;
+   return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++if ac_fn_c_try_link "$LINENO"; then :
+   eval "$as_ac_Lib=yes"
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-eval "$as_ac_Lib=no"
++  eval "$as_ac_Lib=no"
+ fi
+-rm -f conftest.err conftest.$ac_objext \
+-      conftest$ac_exeext conftest.$ac_ext
++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: `eval echo '${'$as_ac_Lib'}'`" >&5
+-echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
+-if test `eval echo '${'$as_ac_Lib'}'` = yes; then
++eval ac_res=\$$as_ac_Lib
++	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
++$as_echo "$ac_res" >&6; }
++if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+   GD_DEF="$GD_DEF -DGD_HAS_GDIMAGEGIFPTR"
+ fi
+ 
+ 
+-      as_ac_Lib=`echo "ac_cv_lib_$GD_CHECKLIB''_gdFontGetTiny" | $as_tr_sh`
+-echo "$as_me:$LINENO: checking for gdFontGetTiny in -l$GD_CHECKLIB" >&5
+-echo $ECHO_N "checking for gdFontGetTiny in -l$GD_CHECKLIB... $ECHO_C" >&6
+-if eval "test \"\${$as_ac_Lib+set}\" = set"; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++      as_ac_Lib=`$as_echo "ac_cv_lib_$GD_CHECKLIB''_gdFontGetTiny" | $as_tr_sh`
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdFontGetTiny in -l$GD_CHECKLIB" >&5
++$as_echo_n "checking for gdFontGetTiny in -l$GD_CHECKLIB... " >&6; }
++if eval \${$as_ac_Lib+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-l$GD_CHECKLIB $GD_STATIC $GD_LIB $GD_XTRA_LIBS $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+-/* Override any gcc2 internal prototype to avoid an error.  */
++/* 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
+-/* We use char because int might match the return type of a gcc2
+-   builtin and then its argument prototype would still apply.  */
+ char gdFontGetTiny ();
+ int
+ main ()
+ {
+-gdFontGetTiny ();
++return gdFontGetTiny ();
+   ;
+   return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++if ac_fn_c_try_link "$LINENO"; then :
+   eval "$as_ac_Lib=yes"
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-eval "$as_ac_Lib=no"
++  eval "$as_ac_Lib=no"
+ fi
+-rm -f conftest.err conftest.$ac_objext \
+-      conftest$ac_exeext conftest.$ac_ext
++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: `eval echo '${'$as_ac_Lib'}'`" >&5
+-echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
+-if test `eval echo '${'$as_ac_Lib'}'` = yes; then
++eval ac_res=\$$as_ac_Lib
++	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
++$as_echo "$ac_res" >&6; }
++if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+   GD_DEF="$GD_DEF -DGD_HAS_GETBITMAPFONTS"
+ fi
+ 
+@@ -8765,64 +6564,9 @@
+   CXXFLAGS_BACKUP="$CXXFLAGS"
+   CFLAGS="$CFLAGS $GD_INC"
+   CXXFLAGS="$CXXFLAGS $GD_INC"
+-  echo "$as_me:$LINENO: checking whether gdImageGetTrueColorPixel is declared" >&5
+-echo $ECHO_N "checking whether gdImageGetTrueColorPixel is declared... $ECHO_C" >&6
+-if test "${ac_cv_have_decl_gdImageGetTrueColorPixel+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 <gd.h>
+-
+-int
+-main ()
+-{
+-#ifndef gdImageGetTrueColorPixel
+-  char *p = (char *) gdImageGetTrueColorPixel;
+-#endif
+-
+-  ;
+-  return 0;
+-}
+-_ACEOF
+-rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
+-  ac_cv_have_decl_gdImageGetTrueColorPixel=yes
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-ac_cv_have_decl_gdImageGetTrueColorPixel=no
+-fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+-fi
+-echo "$as_me:$LINENO: result: $ac_cv_have_decl_gdImageGetTrueColorPixel" >&5
+-echo "${ECHO_T}$ac_cv_have_decl_gdImageGetTrueColorPixel" >&6
+-if test $ac_cv_have_decl_gdImageGetTrueColorPixel = yes; then
++  ac_fn_c_check_decl "$LINENO" "gdImageGetTrueColorPixel" "ac_cv_have_decl_gdImageGetTrueColorPixel" "#include <gd.h>
++"
++if test "x$ac_cv_have_decl_gdImageGetTrueColorPixel" = xyes; then :
+   GD_HAS_GET_TRUE_COLOR_PIXEL=yes
+ fi
+ 
+@@ -8830,773 +6574,465 @@
+   CXXFLAGS="$CXXFLAGS_BACKUP"
+ 
+     if test .$GD_HAS_GET_TRUE_COLOR_PIXEL = .yes ; then
+-    as_ac_Lib=`echo "ac_cv_lib_$GD_CHECKLIB''_gdImageGetTrueColorPixel" | $as_tr_sh`
+-echo "$as_me:$LINENO: checking for gdImageGetTrueColorPixel in -l$GD_CHECKLIB" >&5
+-echo $ECHO_N "checking for gdImageGetTrueColorPixel in -l$GD_CHECKLIB... $ECHO_C" >&6
+-if eval "test \"\${$as_ac_Lib+set}\" = set"; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++    as_ac_Lib=`$as_echo "ac_cv_lib_$GD_CHECKLIB''_gdImageGetTrueColorPixel" | $as_tr_sh`
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdImageGetTrueColorPixel in -l$GD_CHECKLIB" >&5
++$as_echo_n "checking for gdImageGetTrueColorPixel in -l$GD_CHECKLIB... " >&6; }
++if eval \${$as_ac_Lib+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-l$GD_CHECKLIB $GD_STATIC $GD_LIB $GD_XTRA_LIBS $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+-/* Override any gcc2 internal prototype to avoid an error.  */
++/* 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
+-/* We use char because int might match the return type of a gcc2
+-   builtin and then its argument prototype would still apply.  */
+ char gdImageGetTrueColorPixel ();
+ int
+ main ()
+ {
+-gdImageGetTrueColorPixel ();
++return gdImageGetTrueColorPixel ();
+   ;
+   return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++if ac_fn_c_try_link "$LINENO"; then :
+   eval "$as_ac_Lib=yes"
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-eval "$as_ac_Lib=no"
++  eval "$as_ac_Lib=no"
+ fi
+-rm -f conftest.err conftest.$ac_objext \
+-      conftest$ac_exeext conftest.$ac_ext
++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: `eval echo '${'$as_ac_Lib'}'`" >&5
+-echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
+-if test `eval echo '${'$as_ac_Lib'}'` = yes; then
++eval ac_res=\$$as_ac_Lib
++	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
++$as_echo "$ac_res" >&6; }
++if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+   GD_DEF="$GD_DEF -DGD_HAS_GET_TRUE_COLOR_PIXEL"
+ fi
+ 
+   fi
+ 
+-  echo "$as_me:$LINENO: result:         using GD ($GD_DEF) from $GD_DIR." >&5
+-echo "${ECHO_T}        using GD ($GD_DEF) from $GD_DIR." >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result:         using GD ($GD_DEF) from $GD_DIR." >&5
++$as_echo "        using GD ($GD_DEF) from $GD_DIR." >&6; }
+ 
+ else
+ 
+ 
+-    echo "$as_me:$LINENO: checking for gdImageCreate in -lgd" >&5
+-echo $ECHO_N "checking for gdImageCreate in -lgd... $ECHO_C" >&6
+-if test "${ac_cv_lib_gd_gdImageCreate+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdImageCreate in -lgd" >&5
++$as_echo_n "checking for gdImageCreate in -lgd... " >&6; }
++if ${ac_cv_lib_gd_gdImageCreate+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lgd $GD_XTRA_LIBS $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+-/* Override any gcc2 internal prototype to avoid an error.  */
++/* 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
+-/* We use char because int might match the return type of a gcc2
+-   builtin and then its argument prototype would still apply.  */
+ char gdImageCreate ();
+ int
+ main ()
+ {
+-gdImageCreate ();
++return gdImageCreate ();
+   ;
+   return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_lib_gd_gdImageCreate=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-ac_cv_lib_gd_gdImageCreate=no
++  ac_cv_lib_gd_gdImageCreate=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
+-      conftest$ac_exeext conftest.$ac_ext
++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_gd_gdImageCreate" >&5
+-echo "${ECHO_T}$ac_cv_lib_gd_gdImageCreate" >&6
+-if test $ac_cv_lib_gd_gdImageCreate = yes; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gd_gdImageCreate" >&5
++$as_echo "$ac_cv_lib_gd_gdImageCreate" >&6; }
++if test "x$ac_cv_lib_gd_gdImageCreate" = xyes; then :
+   GD_FOUND=yes
+ fi
+ 
+   if test -z "$GD_FOUND" ; then
+-      { { echo "$as_me:$LINENO: error: GD is required but was not found... use --with-gd=DIR to specify its location." >&5
+-echo "$as_me: error: GD is required but was not found... use --with-gd=DIR to specify its location." >&2;}
+-   { (exit 1); exit 1; }; }
++      as_fn_error $? "GD is required but was not found... use --with-gd=DIR to specify its location." "$LINENO" 5
+   fi
+ 
+-    echo "$as_me:$LINENO: checking for gdImageGif in -lgd" >&5
+-echo $ECHO_N "checking for gdImageGif in -lgd... $ECHO_C" >&6
+-if test "${ac_cv_lib_gd_gdImageGif+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdImageGif in -lgd" >&5
++$as_echo_n "checking for gdImageGif in -lgd... " >&6; }
++if ${ac_cv_lib_gd_gdImageGif+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lgd $GD_LIB $GD_XTRA_LIBS $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+-/* Override any gcc2 internal prototype to avoid an error.  */
++/* 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
+-/* We use char because int might match the return type of a gcc2
+-   builtin and then its argument prototype would still apply.  */
+ char gdImageGif ();
+ int
+ main ()
+ {
+-gdImageGif ();
++return gdImageGif ();
+   ;
+   return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_lib_gd_gdImageGif=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-ac_cv_lib_gd_gdImageGif=no
++  ac_cv_lib_gd_gdImageGif=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
+-      conftest$ac_exeext conftest.$ac_ext
++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_gd_gdImageGif" >&5
+-echo "${ECHO_T}$ac_cv_lib_gd_gdImageGif" >&6
+-if test $ac_cv_lib_gd_gdImageGif = yes; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gd_gdImageGif" >&5
++$as_echo "$ac_cv_lib_gd_gdImageGif" >&6; }
++if test "x$ac_cv_lib_gd_gdImageGif" = xyes; then :
+   GD_DEF="$GD_DEF -DUSE_GD_GIF"
+ fi
+ 
+-  echo "$as_me:$LINENO: checking for gdImagePng in -lgd" >&5
+-echo $ECHO_N "checking for gdImagePng in -lgd... $ECHO_C" >&6
+-if test "${ac_cv_lib_gd_gdImagePng+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdImagePng in -lgd" >&5
++$as_echo_n "checking for gdImagePng in -lgd... " >&6; }
++if ${ac_cv_lib_gd_gdImagePng+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lgd $GD_LIB $GD_XTRA_LIBS $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+-/* Override any gcc2 internal prototype to avoid an error.  */
++/* 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
+-/* We use char because int might match the return type of a gcc2
+-   builtin and then its argument prototype would still apply.  */
+ char gdImagePng ();
+ int
+ main ()
+ {
+-gdImagePng ();
++return gdImagePng ();
+   ;
+   return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_lib_gd_gdImagePng=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-ac_cv_lib_gd_gdImagePng=no
++  ac_cv_lib_gd_gdImagePng=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
+-      conftest$ac_exeext conftest.$ac_ext
++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_gd_gdImagePng" >&5
+-echo "${ECHO_T}$ac_cv_lib_gd_gdImagePng" >&6
+-if test $ac_cv_lib_gd_gdImagePng = yes; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gd_gdImagePng" >&5
++$as_echo "$ac_cv_lib_gd_gdImagePng" >&6; }
++if test "x$ac_cv_lib_gd_gdImagePng" = xyes; then :
+   GD_DEF="$GD_DEF -DUSE_GD_PNG"
+ fi
+ 
+-  echo "$as_me:$LINENO: checking for gdImageJpeg in -lgd" >&5
+-echo $ECHO_N "checking for gdImageJpeg in -lgd... $ECHO_C" >&6
+-if test "${ac_cv_lib_gd_gdImageJpeg+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdImageJpeg in -lgd" >&5
++$as_echo_n "checking for gdImageJpeg in -lgd... " >&6; }
++if ${ac_cv_lib_gd_gdImageJpeg+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lgd $GD_LIB $GD_XTRA_LIBS $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+-/* Override any gcc2 internal prototype to avoid an error.  */
++/* 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
+-/* We use char because int might match the return type of a gcc2
+-   builtin and then its argument prototype would still apply.  */
+ char gdImageJpeg ();
+ int
+ main ()
+ {
+-gdImageJpeg ();
++return gdImageJpeg ();
+   ;
+   return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_lib_gd_gdImageJpeg=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-ac_cv_lib_gd_gdImageJpeg=no
++  ac_cv_lib_gd_gdImageJpeg=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
+-      conftest$ac_exeext conftest.$ac_ext
++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_gd_gdImageJpeg" >&5
+-echo "${ECHO_T}$ac_cv_lib_gd_gdImageJpeg" >&6
+-if test $ac_cv_lib_gd_gdImageJpeg = yes; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gd_gdImageJpeg" >&5
++$as_echo "$ac_cv_lib_gd_gdImageJpeg" >&6; }
++if test "x$ac_cv_lib_gd_gdImageJpeg" = xyes; then :
+   GD_DEF="$GD_DEF -DUSE_GD_JPEG"
+ fi
+ 
+-  echo "$as_me:$LINENO: checking for gdImageWBMP in -lgd" >&5
+-echo $ECHO_N "checking for gdImageWBMP in -lgd... $ECHO_C" >&6
+-if test "${ac_cv_lib_gd_gdImageWBMP+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdImageWBMP in -lgd" >&5
++$as_echo_n "checking for gdImageWBMP in -lgd... " >&6; }
++if ${ac_cv_lib_gd_gdImageWBMP+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lgd $GD_LIB $GD_XTRA_LIBS $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+-/* Override any gcc2 internal prototype to avoid an error.  */
++/* 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
+-/* We use char because int might match the return type of a gcc2
+-   builtin and then its argument prototype would still apply.  */
+ char gdImageWBMP ();
+ int
+ main ()
+ {
+-gdImageWBMP ();
++return gdImageWBMP ();
+   ;
+   return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_lib_gd_gdImageWBMP=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-ac_cv_lib_gd_gdImageWBMP=no
++  ac_cv_lib_gd_gdImageWBMP=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
+-      conftest$ac_exeext conftest.$ac_ext
++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_gd_gdImageWBMP" >&5
+-echo "${ECHO_T}$ac_cv_lib_gd_gdImageWBMP" >&6
+-if test $ac_cv_lib_gd_gdImageWBMP = yes; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gd_gdImageWBMP" >&5
++$as_echo "$ac_cv_lib_gd_gdImageWBMP" >&6; }
++if test "x$ac_cv_lib_gd_gdImageWBMP" = xyes; then :
+   GD_DEF="$GD_DEF -DUSE_GD_WBMP"
+ fi
+ 
+ 
+-    echo "$as_me:$LINENO: checking for gdImageStringFT in -lgd" >&5
+-echo $ECHO_N "checking for gdImageStringFT in -lgd... $ECHO_C" >&6
+-if test "${ac_cv_lib_gd_gdImageStringFT+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdImageStringFT in -lgd" >&5
++$as_echo_n "checking for gdImageStringFT in -lgd... " >&6; }
++if ${ac_cv_lib_gd_gdImageStringFT+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lgd $GD_LIB $GD_XTRA_LIBS $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+-/* Override any gcc2 internal prototype to avoid an error.  */
++/* 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
+-/* We use char because int might match the return type of a gcc2
+-   builtin and then its argument prototype would still apply.  */
+ char gdImageStringFT ();
+ int
+ main ()
+ {
+-gdImageStringFT ();
++return gdImageStringFT ();
+   ;
+   return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_lib_gd_gdImageStringFT=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-ac_cv_lib_gd_gdImageStringFT=no
++  ac_cv_lib_gd_gdImageStringFT=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
+-      conftest$ac_exeext conftest.$ac_ext
++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_gd_gdImageStringFT" >&5
+-echo "${ECHO_T}$ac_cv_lib_gd_gdImageStringFT" >&6
+-if test $ac_cv_lib_gd_gdImageStringFT = yes; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gd_gdImageStringFT" >&5
++$as_echo "$ac_cv_lib_gd_gdImageStringFT" >&6; }
++if test "x$ac_cv_lib_gd_gdImageStringFT" = xyes; then :
+   GD_DEF="$GD_DEF -DUSE_GD_FT"
+ fi
+ 
+ 
+-    echo "$as_me:$LINENO: checking for gdImageOpenPolygon in -lgd" >&5
+-echo $ECHO_N "checking for gdImageOpenPolygon in -lgd... $ECHO_C" >&6
+-if test "${ac_cv_lib_gd_gdImageOpenPolygon+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdImageOpenPolygon in -lgd" >&5
++$as_echo_n "checking for gdImageOpenPolygon in -lgd... " >&6; }
++if ${ac_cv_lib_gd_gdImageOpenPolygon+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lgd $GD_STATIC $GD_LIB $GD_XTRA_LIBS $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+-/* Override any gcc2 internal prototype to avoid an error.  */
++/* 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
+-/* We use char because int might match the return type of a gcc2
+-   builtin and then its argument prototype would still apply.  */
+ char gdImageOpenPolygon ();
+ int
+ main ()
+ {
+-gdImageOpenPolygon ();
++return gdImageOpenPolygon ();
+   ;
+   return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_lib_gd_gdImageOpenPolygon=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-ac_cv_lib_gd_gdImageOpenPolygon=no
++  ac_cv_lib_gd_gdImageOpenPolygon=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
+-      conftest$ac_exeext conftest.$ac_ext
++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_gd_gdImageOpenPolygon" >&5
+-echo "${ECHO_T}$ac_cv_lib_gd_gdImageOpenPolygon" >&6
+-if test $ac_cv_lib_gd_gdImageOpenPolygon = yes; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gd_gdImageOpenPolygon" >&5
++$as_echo "$ac_cv_lib_gd_gdImageOpenPolygon" >&6; }
++if test "x$ac_cv_lib_gd_gdImageOpenPolygon" = xyes; then :
+   GD_DEF="$GD_DEF -DGD_HAS_FTEX_XSHOW"
+ fi
+ 
+ 
+-    echo "$as_me:$LINENO: checking for gdImageGifPtr in -lgd" >&5
+-echo $ECHO_N "checking for gdImageGifPtr in -lgd... $ECHO_C" >&6
+-if test "${ac_cv_lib_gd_gdImageGifPtr+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdImageGifPtr in -lgd" >&5
++$as_echo_n "checking for gdImageGifPtr in -lgd... " >&6; }
++if ${ac_cv_lib_gd_gdImageGifPtr+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lgd $GD_LIB $GD_XTRA_LIBS $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+-/* Override any gcc2 internal prototype to avoid an error.  */
++/* 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
+-/* We use char because int might match the return type of a gcc2
+-   builtin and then its argument prototype would still apply.  */
+ char gdImageGifPtr ();
+ int
+ main ()
+ {
+-gdImageGifPtr ();
++return gdImageGifPtr ();
+   ;
+   return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_lib_gd_gdImageGifPtr=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-ac_cv_lib_gd_gdImageGifPtr=no
++  ac_cv_lib_gd_gdImageGifPtr=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
+-      conftest$ac_exeext conftest.$ac_ext
++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_gd_gdImageGifPtr" >&5
+-echo "${ECHO_T}$ac_cv_lib_gd_gdImageGifPtr" >&6
+-if test $ac_cv_lib_gd_gdImageGifPtr = yes; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gd_gdImageGifPtr" >&5
++$as_echo "$ac_cv_lib_gd_gdImageGifPtr" >&6; }
++if test "x$ac_cv_lib_gd_gdImageGifPtr" = xyes; then :
+   GD_DEF="$GD_DEF -DGD_HAS_GDIMAGEGIFPTR"
+ fi
+ 
+ 
+-      echo "$as_me:$LINENO: checking for gdFontGetTiny in -lgd" >&5
+-echo $ECHO_N "checking for gdFontGetTiny in -lgd... $ECHO_C" >&6
+-if test "${ac_cv_lib_gd_gdFontGetTiny+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdFontGetTiny in -lgd" >&5
++$as_echo_n "checking for gdFontGetTiny in -lgd... " >&6; }
++if ${ac_cv_lib_gd_gdFontGetTiny+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lgd $GD_LIB $GD_XTRA_LIBS $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+-/* Override any gcc2 internal prototype to avoid an error.  */
++/* 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
+-/* We use char because int might match the return type of a gcc2
+-   builtin and then its argument prototype would still apply.  */
+ char gdFontGetTiny ();
+ int
+ main ()
+ {
+-gdFontGetTiny ();
++return gdFontGetTiny ();
+   ;
+   return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_lib_gd_gdFontGetTiny=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-ac_cv_lib_gd_gdFontGetTiny=no
++  ac_cv_lib_gd_gdFontGetTiny=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
+-      conftest$ac_exeext conftest.$ac_ext
++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_gd_gdFontGetTiny" >&5
+-echo "${ECHO_T}$ac_cv_lib_gd_gdFontGetTiny" >&6
+-if test $ac_cv_lib_gd_gdFontGetTiny = yes; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gd_gdFontGetTiny" >&5
++$as_echo "$ac_cv_lib_gd_gdFontGetTiny" >&6; }
++if test "x$ac_cv_lib_gd_gdFontGetTiny" = xyes; then :
+   GD_DEF="$GD_DEF -DGD_HAS_GETBITMAPFONTS"
+ fi
+ 
+ 
+     GD_RESOLUTION_SUPPORT=no
+-  as_ac_Lib=`echo "ac_cv_lib_$GD_CHECKLIB''_gdImageSetResolution" | $as_tr_sh`
+-echo "$as_me:$LINENO: checking for gdImageSetResolution in -l$GD_CHECKLIB" >&5
+-echo $ECHO_N "checking for gdImageSetResolution in -l$GD_CHECKLIB... $ECHO_C" >&6
+-if eval "test \"\${$as_ac_Lib+set}\" = set"; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++  as_ac_Lib=`$as_echo "ac_cv_lib_$GD_CHECKLIB''_gdImageSetResolution" | $as_tr_sh`
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdImageSetResolution in -l$GD_CHECKLIB" >&5
++$as_echo_n "checking for gdImageSetResolution in -l$GD_CHECKLIB... " >&6; }
++if eval \${$as_ac_Lib+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-l$GD_CHECKLIB $GD_STATIC $GD_LIB $GD_XTRA_LIBS $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+-/* Override any gcc2 internal prototype to avoid an error.  */
++/* 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
+-/* We use char because int might match the return type of a gcc2
+-   builtin and then its argument prototype would still apply.  */
+ char gdImageSetResolution ();
+ int
+ main ()
+ {
+-gdImageSetResolution ();
++return gdImageSetResolution ();
+   ;
+   return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++if ac_fn_c_try_link "$LINENO"; then :
+   eval "$as_ac_Lib=yes"
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-eval "$as_ac_Lib=no"
++  eval "$as_ac_Lib=no"
+ fi
+-rm -f conftest.err conftest.$ac_objext \
+-      conftest$ac_exeext conftest.$ac_ext
++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: `eval echo '${'$as_ac_Lib'}'`" >&5
+-echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
+-if test `eval echo '${'$as_ac_Lib'}'` = yes; then
++eval ac_res=\$$as_ac_Lib
++	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
++$as_echo "$ac_res" >&6; }
++if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+   GD_RESOLUTION_SUPPORT=yes
+ fi
+ 
+@@ -9606,133 +7042,50 @@
+   fi
+ 
+         GD_HAS_GET_TRUE_COLOR_PIXEL=
+-  echo "$as_me:$LINENO: checking whether gdImageGetTrueColorPixel is declared" >&5
+-echo $ECHO_N "checking whether gdImageGetTrueColorPixel is declared... $ECHO_C" >&6
+-if test "${ac_cv_have_decl_gdImageGetTrueColorPixel+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 <gd.h>
+-
+-int
+-main ()
+-{
+-#ifndef gdImageGetTrueColorPixel
+-  char *p = (char *) gdImageGetTrueColorPixel;
+-#endif
+-
+-  ;
+-  return 0;
+-}
+-_ACEOF
+-rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
+-  ac_cv_have_decl_gdImageGetTrueColorPixel=yes
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-ac_cv_have_decl_gdImageGetTrueColorPixel=no
+-fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+-fi
+-echo "$as_me:$LINENO: result: $ac_cv_have_decl_gdImageGetTrueColorPixel" >&5
+-echo "${ECHO_T}$ac_cv_have_decl_gdImageGetTrueColorPixel" >&6
+-if test $ac_cv_have_decl_gdImageGetTrueColorPixel = yes; then
++  ac_fn_c_check_decl "$LINENO" "gdImageGetTrueColorPixel" "ac_cv_have_decl_gdImageGetTrueColorPixel" "#include <gd.h>
++"
++if test "x$ac_cv_have_decl_gdImageGetTrueColorPixel" = xyes; then :
+   GD_HAS_GET_TRUE_COLOR_PIXEL=yes
+ fi
+ 
+     if test .$GD_HAS_GET_TRUE_COLOR_PIXEL = .yes ; then
+-    echo "$as_me:$LINENO: checking for gdImageGetTrueColorPixel in -lgd" >&5
+-echo $ECHO_N "checking for gdImageGetTrueColorPixel in -lgd... $ECHO_C" >&6
+-if test "${ac_cv_lib_gd_gdImageGetTrueColorPixel+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdImageGetTrueColorPixel in -lgd" >&5
++$as_echo_n "checking for gdImageGetTrueColorPixel in -lgd... " >&6; }
++if ${ac_cv_lib_gd_gdImageGetTrueColorPixel+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lgd $GD_STATIC $GD_LIB $GD_XTRA_LIBS $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+-/* Override any gcc2 internal prototype to avoid an error.  */
++/* 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
+-/* We use char because int might match the return type of a gcc2
+-   builtin and then its argument prototype would still apply.  */
+ char gdImageGetTrueColorPixel ();
+ int
+ main ()
+ {
+-gdImageGetTrueColorPixel ();
++return gdImageGetTrueColorPixel ();
+   ;
+   return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_lib_gd_gdImageGetTrueColorPixel=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-ac_cv_lib_gd_gdImageGetTrueColorPixel=no
++  ac_cv_lib_gd_gdImageGetTrueColorPixel=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
+-      conftest$ac_exeext conftest.$ac_ext
++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_gd_gdImageGetTrueColorPixel" >&5
+-echo "${ECHO_T}$ac_cv_lib_gd_gdImageGetTrueColorPixel" >&6
+-if test $ac_cv_lib_gd_gdImageGetTrueColorPixel = yes; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gd_gdImageGetTrueColorPixel" >&5
++$as_echo "$ac_cv_lib_gd_gdImageGetTrueColorPixel" >&6; }
++if test "x$ac_cv_lib_gd_gdImageGetTrueColorPixel" = xyes; then :
+   GD_DEF="$GD_DEF -DGD_HAS_GET_TRUE_COLOR_PIXEL"
+ fi
+ 
+@@ -9740,8 +7093,8 @@
+ 
+   if test -n "$GD_DEF" ; then
+       GD_LIB="-lgd $GD_LIB"
+-      echo "$as_me:$LINENO: result:         using GD ($GD_DEF) from system libs." >&5
+-echo "${ECHO_T}        using GD ($GD_DEF) from system libs." >&6
++      { $as_echo "$as_me:${as_lineno-$LINENO}: result:         using GD ($GD_DEF) from system libs." >&5
++$as_echo "        using GD ($GD_DEF) from system libs." >&6; }
+   fi
+ fi
+ 
+@@ -9769,19 +7122,19 @@
+ 
+ 
+ 
+-echo "$as_me:$LINENO: checking if FTGL support requested" >&5
+-echo $ECHO_N "checking if FTGL support requested... $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if FTGL support requested" >&5
++$as_echo_n "checking if FTGL support requested... " >&6; }
+ 
+-# Check whether --with-ftgl or --without-ftgl was given.
+-if test "${with_ftgl+set}" = set; then
+-  withval="$with_ftgl"
++# Check whether --with-ftgl was given.
++if test "${with_ftgl+set}" = set; then :
++  withval=$with_ftgl;
++fi
+ 
+-fi;
+ 
+ if test "$with_ftgl" = "yes" ; then
+   with_ftgl="/usr"
+-  echo "$as_me:$LINENO: result: looking for ftgl libs in /usr" >&5
+-echo "${ECHO_T}looking for ftgl libs in /usr" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: looking for ftgl libs in /usr" >&5
++$as_echo "looking for ftgl libs in /usr" >&6; }
+ fi
+ if test -n "$with_ftgl" -a "$with_ftgl" != "no" ; then
+ 
+@@ -9802,9 +7155,7 @@
+   fi
+ 
+   if test -z "$FTGL_INCLUDE" ; then
+-      { { echo "$as_me:$LINENO: error: \"could not find ftgl.h/FTGL.h in $FTGL_DIR/include/FTGL.\"" >&5
+-echo "$as_me: error: \"could not find ftgl.h/FTGL.h in $FTGL_DIR/include/FTGL.\"" >&2;}
+-   { (exit 1); exit 1; }; }
++      as_fn_error $? "\"could not find ftgl.h/FTGL.h in $FTGL_DIR/include/FTGL.\"" "$LINENO" 5
+   fi
+ 
+   test -f $FTGL_DIR/lib/libftgl.so && FTGL_LIBDIR="$FTGL_DIR/lib"
+@@ -9812,9 +7163,7 @@
+   test -f $FTGL_DIR/lib64/libftgl.so && FTGL_LIBDIR="$FTGL_DIR/lib64"
+ 
+   if test -z "$FTGL_LIBDIR" ; then
+-      { { echo "$as_me:$LINENO: error: \"could not find libftgl in $FTGL_DIR.\"" >&5
+-echo "$as_me: error: \"could not find libftgl in $FTGL_DIR.\"" >&2;}
+-   { (exit 1); exit 1; }; }
++      as_fn_error $? "\"could not find libftgl in $FTGL_DIR.\"" "$LINENO" 5
+   fi
+ 
+ 
+@@ -9845,13 +7194,13 @@
+   fi
+ 
+ 
+-  echo "$as_me:$LINENO: result: using ftgl from $FTGL_DIR" >&5
+-echo "${ECHO_T}using ftgl from $FTGL_DIR" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: using ftgl from $FTGL_DIR" >&5
++$as_echo "using ftgl from $FTGL_DIR" >&6; }
+ 
+ else
+ 
+-  echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+ 
+ fi
+ 
+@@ -9869,27 +7218,25 @@
+ 
+ 
+ 
+-echo "$as_me:$LINENO: checking if OGL support requested" >&5
+-echo $ECHO_N "checking if OGL support requested... $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if OGL support requested" >&5
++$as_echo_n "checking if OGL support requested... " >&6; }
+ 
+-# Check whether --with-ogl or --without-ogl was given.
+-if test "${with_ogl+set}" = set; then
+-  withval="$with_ogl"
++# Check whether --with-ogl was given.
++if test "${with_ogl+set}" = set; then :
++  withval=$with_ogl;
++fi
+ 
+-fi;
+ 
+ if test "$with_opengl" = "yes" ; then
+ 
+   with_opengl="/usr"
+-  echo "$as_me:$LINENO: result: looking for opengl libs in /usr" >&5
+-echo "${ECHO_T}looking for opengl libs in /usr" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: looking for opengl libs in /usr" >&5
++$as_echo "looking for opengl libs in /usr" >&6; }
+ fi
+ if test -n "$with_opengl" -a "$with_opengl" != "no" ; then
+ 
+   if test -z "$FTGL_LIB" ; then
+-     { { echo "$as_me:$LINENO: error: FTGL required for opengl support - please configure --with-ftgl." >&5
+-echo "$as_me: error: FTGL required for opengl support - please configure --with-ftgl." >&2;}
+-   { (exit 1); exit 1; }; }
++     as_fn_error $? "FTGL required for opengl support - please configure --with-ftgl." "$LINENO" 5
+   fi
+ 
+ 
+@@ -9903,9 +7250,7 @@
+   test -f $OGL_DIR/include/GL/gl.h -a -f $OGL_DIR/include/GL/glx.h -a -f $OGL_DIR/include/GL/glu.h && OGL_INCLUDE="-I$OGL_DIR/include"
+ 
+   if test -z "$OGL_INCLUDE" ; then
+-      { { echo "$as_me:$LINENO: error: \"could not find gl.h in $OGL_DIR/include/.\"" >&5
+-echo "$as_me: error: \"could not find gl.h in $OGL_DIR/include/.\"" >&2;}
+-   { (exit 1); exit 1; }; }
++      as_fn_error $? "\"could not find gl.h in $OGL_DIR/include/.\"" "$LINENO" 5
+   fi
+ 
+   test -f $OGL_DIR/lib/libGL.so -a -f $OGL_DIR/lib/libGLU.so && OGL_LIBDIR="$OGL_DIR/lib"
+@@ -9913,9 +7258,7 @@
+   test -f $OGL_DIR/lib64/libGL.so -a -f $OGL_DIR/lib64/libGLU.so && OGL_LIBDIR="$OGL_DIR/lib64"
+ 
+   if test -z "$OGL_LIBDIR" ; then
+-      { { echo "$as_me:$LINENO: error: \"could not find libGL or libGLU in $OGL_DIR/lib/ or $OGL_DIR/lib64/.\"" >&5
+-echo "$as_me: error: \"could not find libGL or libGLU in $OGL_DIR/lib/ or $OGL_DIR/lib64/.\"" >&2;}
+-   { (exit 1); exit 1; }; }
++      as_fn_error $? "\"could not find libGL or libGLU in $OGL_DIR/lib/ or $OGL_DIR/lib64/.\"" "$LINENO" 5
+   fi
+ 
+ 
+@@ -9946,13 +7289,13 @@
+   fi
+ 
+ 
+-  echo "$as_me:$LINENO: result: using opengl from $OGL_DIR" >&5
+-echo "${ECHO_T}using opengl from $OGL_DIR" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: using opengl from $OGL_DIR" >&5
++$as_echo "using opengl from $OGL_DIR" >&6; }
+ 
+ else
+ 
+-  echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+ 
+ fi
+ 
+@@ -9972,13 +7315,13 @@
+ 
+ 
+ 
+-# Check whether --with-expat or --without-expat was given.
+-if test "${with_expat+set}" = set; then
+-  withval="$with_expat"
+-  EXPAT_DIR=$withval
++# Check whether --with-expat was given.
++if test "${with_expat+set}" = set; then :
++  withval=$with_expat; EXPAT_DIR=$withval
+ else
+   EXPAT_DIR=''
+-fi;
++fi
++
+ 
+ 
+   if test -z "$EXPAT_DIR" || echo "$EXPAT_DIR" | grep '^/' >/dev/null ; then
+@@ -9987,8 +7330,8 @@
+     EXPAT_DIR="`pwd`/$EXPAT_DIR"
+   fi
+ 
+-{ echo "$as_me:$LINENO: checking where EXPAT is installed..." >&5
+-echo "$as_me: checking where EXPAT is installed..." >&6;}
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where EXPAT is installed..." >&5
++$as_echo "$as_me: checking where EXPAT is installed..." >&6;}
+ EXPAT_LIB=''
+ EXPAT_INC=''
+ EXPAT_FOUND='no'
+@@ -10004,8 +7347,8 @@
+ 
+     if test -n "$EXPAT_LIBDIR" ; then
+       EXPAT_LIB="-L$EXPAT_LIBDIR -lexpat"
+-      echo "$as_me:$LINENO: result:         using libexpat from $EXPAT_LIB" >&5
+-echo "${ECHO_T}        using libexpat from $EXPAT_LIB" >&6
++      { $as_echo "$as_me:${as_lineno-$LINENO}: result:         using libexpat from $EXPAT_LIB" >&5
++$as_echo "        using libexpat from $EXPAT_LIB" >&6; }
+ 
+   if test ""$EXPAT_LIBDIR"" != "/usr/lib"; then
+ 
+@@ -10029,413 +7372,107 @@
+   fi
+ 
+     else
+-      { { echo "$as_me:$LINENO: error: cannot find expat lib in $EXPAT_DIR" >&5
+-echo "$as_me: error: cannot find expat lib in $EXPAT_DIR" >&2;}
+-   { (exit 1); exit 1; }; }
++      as_fn_error $? "cannot find expat lib in $EXPAT_DIR" "$LINENO" 5
+     fi
+ 
+     if test -n "$EXPAT_INCDIR" ; then
+-      as_ac_Header=`echo "ac_cv_header_$EXPAT_INCDIR/expat.h" | $as_tr_sh`
+-if eval "test \"\${$as_ac_Header+set}\" = set"; then
+-  echo "$as_me:$LINENO: checking for $EXPAT_INCDIR/expat.h" >&5
+-echo $ECHO_N "checking for $EXPAT_INCDIR/expat.h... $ECHO_C" >&6
+-if eval "test \"\${$as_ac_Header+set}\" = set"; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-fi
+-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+-else
+-  # Is the header compilable?
+-echo "$as_me:$LINENO: checking $EXPAT_INCDIR/expat.h usability" >&5
+-echo $ECHO_N "checking $EXPAT_INCDIR/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_INCDIR/expat.h>
+-_ACEOF
+-rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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 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_INCDIR/expat.h presence" >&5
+-echo $ECHO_N "checking $EXPAT_INCDIR/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_INCDIR/expat.h>
+-_ACEOF
+-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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: $EXPAT_INCDIR/expat.h: accepted by the compiler, rejected by the preprocessor!" >&5
+-echo "$as_me: WARNING: $EXPAT_INCDIR/expat.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $EXPAT_INCDIR/expat.h: proceeding with the compiler's result" >&5
+-echo "$as_me: WARNING: $EXPAT_INCDIR/expat.h: proceeding with the compiler's result" >&2;}
+-    ac_header_preproc=yes
+-    ;;
+-  no:yes:* )
+-    { echo "$as_me:$LINENO: WARNING: $EXPAT_INCDIR/expat.h: present but cannot be compiled" >&5
+-echo "$as_me: WARNING: $EXPAT_INCDIR/expat.h: present but cannot be compiled" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $EXPAT_INCDIR/expat.h:     check for missing prerequisite headers?" >&5
+-echo "$as_me: WARNING: $EXPAT_INCDIR/expat.h:     check for missing prerequisite headers?" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $EXPAT_INCDIR/expat.h: see the Autoconf documentation" >&5
+-echo "$as_me: WARNING: $EXPAT_INCDIR/expat.h: see the Autoconf documentation" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $EXPAT_INCDIR/expat.h:     section \"Present But Cannot Be Compiled\"" >&5
+-echo "$as_me: WARNING: $EXPAT_INCDIR/expat.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $EXPAT_INCDIR/expat.h: proceeding with the preprocessor's result" >&5
+-echo "$as_me: WARNING: $EXPAT_INCDIR/expat.h: proceeding with the preprocessor's result" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $EXPAT_INCDIR/expat.h: in the future, the compiler will take precedence" >&5
+-echo "$as_me: WARNING: $EXPAT_INCDIR/expat.h: in the future, the compiler will take precedence" >&2;}
+-    (
+-      cat <<\_ASBOX
+-## ------------------------------------------ ##
+-## Report this to the AC_PACKAGE_NAME lists.  ##
+-## ------------------------------------------ ##
+-_ASBOX
+-    ) |
+-      sed "s/^/$as_me: WARNING:     /" >&2
+-    ;;
+-esac
+-echo "$as_me:$LINENO: checking for $EXPAT_INCDIR/expat.h" >&5
+-echo $ECHO_N "checking for $EXPAT_INCDIR/expat.h... $ECHO_C" >&6
+-if eval "test \"\${$as_ac_Header+set}\" = set"; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  eval "$as_ac_Header=\$ac_header_preproc"
+-fi
+-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+-
+-fi
+-if test `eval echo '${'$as_ac_Header'}'` = yes; then
++      as_ac_Header=`$as_echo "ac_cv_header_$EXPAT_INCDIR/expat.h" | $as_tr_sh`
++ac_fn_c_check_header_mongrel "$LINENO" "$EXPAT_INCDIR/expat.h" "$as_ac_Header" "$ac_includes_default"
++if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+   EXPAT_INC=-I$EXPAT_INCDIR
+ else
+-  { { echo "$as_me:$LINENO: error: cannot find expat headers" >&5
+-echo "$as_me: error: cannot find expat headers" >&2;}
+-   { (exit 1); exit 1; }; }
++  as_fn_error $? "cannot find expat headers" "$LINENO" 5
+ fi
+ 
+ 
+       ALL_INC="$EXPAT_INC $ALL_INC"
+     else
+-        { { echo "$as_me:$LINENO: error: cannot find expat headers in $EXPAT_DIR" >&5
+-echo "$as_me: error: cannot find expat headers in $EXPAT_DIR" >&2;}
+-   { (exit 1); exit 1; }; }
++        as_fn_error $? "cannot find expat headers in $EXPAT_DIR" "$LINENO" 5
+     fi
+     EXPAT_FOUND="yes"
+ else
+ 
+ 
+-  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
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML_ParserCreate in -lexpat" >&5
++$as_echo_n "checking for XML_ParserCreate in -lexpat... " >&6; }
++if ${ac_cv_lib_expat_XML_ParserCreate+:} false; then :
++  $as_echo_n "(cached) " >&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 gcc2 internal prototype to avoid an error.  */
+-#ifdef __cplusplus
+-extern "C"
+-#endif
+-/* We use char because int might match the return type of a gcc2
+-   builtin and then its argument prototype would still apply.  */
+-char XML_ParserCreate ();
+-int
+-main ()
+-{
+-XML_ParserCreate ();
+-  ;
+-  return 0;
+-}
+-_ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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 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
+-  EXPAT_LIB="-lexpat"
+-fi
+-
+-  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 { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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 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
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+-#include <expat.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
+-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_expat_XML_ParserCreate=yes
+ else
+-  ac_cpp_err=yes
++  ac_cv_lib_expat_XML_ParserCreate=no
+ 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
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
+ 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: 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;}
+-    (
+-      cat <<\_ASBOX
+-## ------------------------------------------ ##
+-## Report this to the AC_PACKAGE_NAME lists.  ##
+-## ------------------------------------------ ##
+-_ASBOX
+-    ) |
+-      sed "s/^/$as_me: WARNING:     /" >&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
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_expat_XML_ParserCreate" >&5
++$as_echo "$ac_cv_lib_expat_XML_ParserCreate" >&6; }
++if test "x$ac_cv_lib_expat_XML_ParserCreate" = xyes; then :
++  EXPAT_LIB="-lexpat"
+ 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
+-  :
++  ac_fn_c_check_header_mongrel "$LINENO" "expat.h" "ac_cv_header_expat_h" "$ac_includes_default"
++if test "x$ac_cv_header_expat_h" = xyes; then :
++
+ else
+   EXPAT_HEADER_FOUND="no"
+ fi
+ 
+ 
+   if test -n "$EXPAT_LIB" -a "$EXPAT_HEADER_FOUND" != "no"; then
+-    echo "$as_me:$LINENO: result:         using libexpat from system libs." >&5
+-echo "${ECHO_T}        using libexpat from system libs." >&6
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result:         using libexpat from system libs." >&5
++$as_echo "        using libexpat from system libs." >&6; }
+     EXPAT_FOUND='yes'
+   else
+-    echo "$as_me:$LINENO: result:         not found in system libs. svg symbol support will be disabled" >&5
+-echo "${ECHO_T}        not found in system libs. svg symbol support will be disabled" >&6
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result:         not found in system libs. svg symbol support will be disabled" >&5
++$as_echo "        not found in system libs. svg symbol support will be disabled" >&6; }
+     EXPAT_FOUND='no'
+   fi
+ 
+ fi
+ 
+ 
+-echo "$as_me:$LINENO: checking for AGG support" >&5
+-echo $ECHO_N "checking for AGG support... $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for AGG support" >&5
++$as_echo_n "checking for AGG support... " >&6; }
+ AGG_ENABLED="internal"
+-echo "$as_me:$LINENO: result:         yes" >&5
+-echo "${ECHO_T}        yes" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result:         yes" >&5
++$as_echo "        yes" >&6; }
+ AGG_OBJ="renderers/agg/src/clipper.o renderers/agg/src/agg_arc.o renderers/agg/src/agg_curves.o renderers/agg/src/agg_vcgen_contour.o renderers/agg/src/agg_vcgen_dash.o renderers/agg/src/agg_vcgen_stroke.o renderers/agg/src/agg_image_filters.o renderers/agg/src/agg_line_aa_basics.o renderers/agg/src/agg_line_profile_aa.o renderers/agg/src/agg_sqrt_tables.o renderers/agg/src/agg_embedded_raster_fonts.o renderers/agg/src/agg_trans_affine.o renderers/agg/src/agg_vpgen_clip_polygon.o render [...]
+ AGG_LIB=""
+ AGG_INC="-Irenderers/agg/include"
+ ALL_INC="$AGG_INC $ALL_INC"
+ 
+ 
+-echo "$as_me:$LINENO: checking if SVG Symbol support requested" >&5
+-echo $ECHO_N "checking if SVG Symbol support requested... $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if SVG Symbol support requested" >&5
++$as_echo_n "checking if SVG Symbol support requested... " >&6; }
+ 
+-# Check whether --with-agg-svg-symbols or --without-agg-svg-symbols was given.
+-if test "${with_agg_svg_symbols+set}" = set; then
+-  withval="$with_agg_svg_symbols"
++# Check whether --with-agg-svg-symbols was given.
++if test "${with_agg_svg_symbols+set}" = set; then :
++  withval=$with_agg_svg_symbols;
++fi
+ 
+-fi;
+ 
+ 
+ if test "$with_agg_svg_symbols" != "no" ; then
+@@ -10451,12 +7488,12 @@
+         ALL_INC="$AGG_INC $ALL_INC"
+         AGG_SVG_SYMBOLS_ENABLED="-DUSE_AGG_SVG_SYMBOLS"
+         ALL_ENABLED="$AGG_SVG_SYMBOLS_ENABLED $ALL_ENABLED"
+-        echo "$as_me:$LINENO: result:         enabled" >&5
+-echo "${ECHO_T}        enabled" >&6
++        { $as_echo "$as_me:${as_lineno-$LINENO}: result:         enabled" >&5
++$as_echo "        enabled" >&6; }
+ 
+     else
+-        echo "$as_me:$LINENO: result:         disabled due to missing expat dependency" >&5
+-echo "${ECHO_T}        disabled due to missing expat dependency" >&6
++        { $as_echo "$as_me:${as_lineno-$LINENO}: result:         disabled due to missing expat dependency" >&5
++$as_echo "        disabled due to missing expat dependency" >&6; }
+     fi
+ fi
+ 
+@@ -10472,150 +7509,94 @@
+ unset ac_cv_lib_proj_pj_transform
+ unset ac_cv_lib_proj_pj_latlong_from_proj
+ 
+-{ echo "$as_me:$LINENO: checking whether we should include PROJ.4 support..." >&5
+-echo "$as_me: checking whether we should include PROJ.4 support..." >&6;}
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we should include PROJ.4 support..." >&5
++$as_echo "$as_me: checking whether we should include PROJ.4 support..." >&6;}
+ 
+-# Check whether --with-proj or --without-proj was given.
+-if test "${with_proj+set}" = set; then
+-  withval="$with_proj"
++# Check whether --with-proj was given.
++if test "${with_proj+set}" = set; then :
++  withval=$with_proj;
++fi
+ 
+-fi;
+ 
+ if test "$with_proj" = "yes" ; then
+ 
+-  echo "$as_me:$LINENO: checking for pj_init in -lproj" >&5
+-echo $ECHO_N "checking for pj_init in -lproj... $ECHO_C" >&6
+-if test "${ac_cv_lib_proj_pj_init+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pj_init in -lproj" >&5
++$as_echo_n "checking for pj_init in -lproj... " >&6; }
++if ${ac_cv_lib_proj_pj_init+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lproj  $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+-/* Override any gcc2 internal prototype to avoid an error.  */
++/* 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
+-/* We use char because int might match the return type of a gcc2
+-   builtin and then its argument prototype would still apply.  */
+ char pj_init ();
+ int
+ main ()
+ {
+-pj_init ();
++return pj_init ();
+   ;
+   return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_lib_proj_pj_init=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-ac_cv_lib_proj_pj_init=no
++  ac_cv_lib_proj_pj_init=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
+-      conftest$ac_exeext conftest.$ac_ext
++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_proj_pj_init" >&5
+-echo "${ECHO_T}$ac_cv_lib_proj_pj_init" >&6
+-if test $ac_cv_lib_proj_pj_init = yes; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_proj_pj_init" >&5
++$as_echo "$ac_cv_lib_proj_pj_init" >&6; }
++if test "x$ac_cv_lib_proj_pj_init" = xyes; then :
+   PROJ_ENABLED=-DUSE_PROJ
+ fi
+ 
+-  echo "$as_me:$LINENO: checking for pj_transform in -lproj" >&5
+-echo $ECHO_N "checking for pj_transform in -lproj... $ECHO_C" >&6
+-if test "${ac_cv_lib_proj_pj_transform+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pj_transform in -lproj" >&5
++$as_echo_n "checking for pj_transform in -lproj... " >&6; }
++if ${ac_cv_lib_proj_pj_transform+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lproj  $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+-/* Override any gcc2 internal prototype to avoid an error.  */
++/* 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
+-/* We use char because int might match the return type of a gcc2
+-   builtin and then its argument prototype would still apply.  */
+ char pj_transform ();
+ int
+ main ()
+ {
+-pj_transform ();
++return pj_transform ();
+   ;
+   return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_lib_proj_pj_transform=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-ac_cv_lib_proj_pj_transform=no
++  ac_cv_lib_proj_pj_transform=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
+-      conftest$ac_exeext conftest.$ac_ext
++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_proj_pj_transform" >&5
+-echo "${ECHO_T}$ac_cv_lib_proj_pj_transform" >&6
+-if test $ac_cv_lib_proj_pj_transform = yes; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_proj_pj_transform" >&5
++$as_echo "$ac_cv_lib_proj_pj_transform" >&6; }
++if test "x$ac_cv_lib_proj_pj_transform" = xyes; then :
+   PJ_TRANSFORM=yes
+ else
+   PJ_TRANSFORM=no
+@@ -10623,16 +7604,14 @@
+ 
+ 
+   if test -n "$PROJ_ENABLED" -a "$PJ_TRANSFORM" = "no"; then
+-      { { echo "$as_me:$LINENO: error: This version of PROJ is too old.  PROJ4.4.2 or later is required." >&5
+-echo "$as_me: error: This version of PROJ is too old.  PROJ4.4.2 or later is required." >&2;}
+-   { (exit 1); exit 1; }; }
++      as_fn_error $? "This version of PROJ is too old.  PROJ4.4.2 or later is required." "$LINENO" 5
+   elif test -n "$PROJ_ENABLED" -a "$PJ_TRANSFORM" = "yes"; then
+       PROJ_LIBS="-lproj"
+-      echo "$as_me:$LINENO: result:         using PROJ.4 from system libs." >&5
+-echo "${ECHO_T}        using PROJ.4 from system libs." >&6
++      { $as_echo "$as_me:${as_lineno-$LINENO}: result:         using PROJ.4 from system libs." >&5
++$as_echo "        using PROJ.4 from system libs." >&6; }
+   else
+-      { echo "$as_me:$LINENO: WARNING:         PROJ.4 not found in system libs... use --with-proj=DIR." >&5
+-echo "$as_me: WARNING:         PROJ.4 not found in system libs... use --with-proj=DIR." >&2;}
++      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:         PROJ.4 not found in system libs... use --with-proj=DIR." >&5
++$as_echo "$as_me: WARNING:         PROJ.4 not found in system libs... use --with-proj=DIR." >&2;}
+   fi
+ 
+ elif test -n "$with_proj" -a "$with_proj" != "no" ; then
+@@ -10685,95 +7664,63 @@
+   fi
+ 
+   else
+-      { { echo "$as_me:$LINENO: error: \"Could not find proj_api.h or libproj.a/libproj.so in $PROJ_DIR.\"" >&5
+-echo "$as_me: error: \"Could not find proj_api.h or libproj.a/libproj.so in $PROJ_DIR.\"" >&2;}
+-   { (exit 1); exit 1; }; }
++      as_fn_error $? "\"Could not find proj_api.h or libproj.a/libproj.so in $PROJ_DIR.\"" "$LINENO" 5
+   fi
+ 
+-  echo "$as_me:$LINENO: checking for pj_transform in -lproj" >&5
+-echo $ECHO_N "checking for pj_transform in -lproj... $ECHO_C" >&6
+-if test "${ac_cv_lib_proj_pj_transform+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pj_transform in -lproj" >&5
++$as_echo_n "checking for pj_transform in -lproj... " >&6; }
++if ${ac_cv_lib_proj_pj_transform+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lproj $PROJ_LIBS $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+-/* Override any gcc2 internal prototype to avoid an error.  */
++/* 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
+-/* We use char because int might match the return type of a gcc2
+-   builtin and then its argument prototype would still apply.  */
+ char pj_transform ();
+ int
+ main ()
+ {
+-pj_transform ();
++return pj_transform ();
+   ;
+   return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_lib_proj_pj_transform=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-ac_cv_lib_proj_pj_transform=no
++  ac_cv_lib_proj_pj_transform=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
+-      conftest$ac_exeext conftest.$ac_ext
++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_proj_pj_transform" >&5
+-echo "${ECHO_T}$ac_cv_lib_proj_pj_transform" >&6
+-if test $ac_cv_lib_proj_pj_transform = yes; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_proj_pj_transform" >&5
++$as_echo "$ac_cv_lib_proj_pj_transform" >&6; }
++if test "x$ac_cv_lib_proj_pj_transform" = xyes; then :
+   PJ_TRANSFORM=yes
+ else
+   PJ_TRANSFORM=no
+ fi
+ 
+   if test "$PJ_TRANSFORM" = "no"; then
+-      { { echo "$as_me:$LINENO: error: This version of PROJ is too old.  PROJ4.4.2 or later is required." >&5
+-echo "$as_me: error: This version of PROJ is too old.  PROJ4.4.2 or later is required." >&2;}
+-   { (exit 1); exit 1; }; }
++      as_fn_error $? "This version of PROJ is too old.  PROJ4.4.2 or later is required." "$LINENO" 5
+   fi
+ 
+   PROJ_ENABLED=-DUSE_PROJ
+-  echo "$as_me:$LINENO: result:         using PROJ.4 from $PROJ_DIR." >&5
+-echo "${ECHO_T}        using PROJ.4 from $PROJ_DIR." >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result:         using PROJ.4 from $PROJ_DIR." >&5
++$as_echo "        using PROJ.4 from $PROJ_DIR." >&6; }
+ 
+ else
+ 
+-  echo "$as_me:$LINENO: result:         PROJ.4 support not requested." >&5
+-echo "${ECHO_T}        PROJ.4 support not requested." >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result:         PROJ.4 support not requested." >&5
++$as_echo "        PROJ.4 support not requested." >&6; }
+ fi
+ 
+ PROJ_ENABLED=$PROJ_ENABLED
+@@ -10791,94 +7738,64 @@
+ THREAD_LIB=""
+ THREAD_FLAG=""
+ 
+-{ echo "$as_me:$LINENO: checking whether we should include thread safe support..." >&5
+-echo "$as_me: checking whether we should include thread safe support..." >&6;}
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we should include thread safe support..." >&5
++$as_echo "$as_me: checking whether we should include thread safe support..." >&6;}
+ 
+-# Check whether --with-threads or --without-threads was given.
+-if test "${with_threads+set}" = set; then
+-  withval="$with_threads"
++# Check whether --with-threads was given.
++if test "${with_threads+set}" = set; then :
++  withval=$with_threads;
++fi
+ 
+-fi;
+ 
+ if test "$with_threads" = "yes" ; then
+ 
+-  echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
+-echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
+-if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
++$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
++if ${ac_cv_lib_pthread_pthread_create+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lpthread  $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+-/* Override any gcc2 internal prototype to avoid an error.  */
++/* 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
+-/* We use char because int might match the return type of a gcc2
+-   builtin and then its argument prototype would still apply.  */
+ char pthread_create ();
+ int
+ main ()
+ {
+-pthread_create ();
++return pthread_create ();
+   ;
+   return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_lib_pthread_pthread_create=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-ac_cv_lib_pthread_pthread_create=no
++  ac_cv_lib_pthread_pthread_create=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
+-      conftest$ac_exeext conftest.$ac_ext
++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_pthread_pthread_create" >&5
+-echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6
+-if test $ac_cv_lib_pthread_pthread_create = yes; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5
++$as_echo "$ac_cv_lib_pthread_pthread_create" >&6; }
++if test "x$ac_cv_lib_pthread_pthread_create" = xyes; then :
+   THREAD_FLAG=-DUSE_THREAD
+ fi
+ 
+ 
+   if test -n "$THREAD_FLAG" ; then
+       THREAD_LIB="-lpthread"
+-      echo "$as_me:$LINENO: result:         using -lpthread from system libs." >&5
+-echo "${ECHO_T}        using -lpthread from system libs." >&6
++      { $as_echo "$as_me:${as_lineno-$LINENO}: result:         using -lpthread from system libs." >&5
++$as_echo "        using -lpthread from system libs." >&6; }
+   else
+-      { { echo "$as_me:$LINENO: error:         -lpthread not found, use --with-thread=<pthread link options>" >&5
+-echo "$as_me: error:         -lpthread not found, use --with-thread=<pthread link options>" >&2;}
+-   { (exit 1); exit 1; }; }
++      as_fn_error $? "        -lpthread not found, use --with-thread=<pthread link options>" "$LINENO" 5
+   fi
+ 
+ elif test -n "$with_threads" -a "$with_threads" != "no" ; then
+@@ -10886,12 +7803,12 @@
+   THREAD_FLAG=-DUSE_THREAD
+   THREAD_LIB="$with_threads"
+ 
+-  echo "$as_me:$LINENO: result:         using threads with link options \"$THREAD_LIB\"." >&5
+-echo "${ECHO_T}        using threads with link options \"$THREAD_LIB\"." >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result:         using threads with link options \"$THREAD_LIB\"." >&5
++$as_echo "        using threads with link options \"$THREAD_LIB\"." >&6; }
+ 
+ else
+-  echo "$as_me:$LINENO: result:         thread safe support disabled." >&5
+-echo "${ECHO_T}        thread safe support disabled." >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result:         thread safe support disabled." >&5
++$as_echo "        thread safe support disabled." >&6; }
+ fi
+ 
+ THREAD_FLAG=$THREAD_FLAG
+@@ -10903,292 +7820,181 @@
+ ALL_LIB="$THREAD_LIB $ALL_LIB"
+ 
+ 
+-{ echo "$as_me:$LINENO: checking whether we should include ESRI SDE support..." >&5
+-echo "$as_me: checking whether we should include ESRI SDE support..." >&6;}
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we should include ESRI SDE support..." >&5
++$as_echo "$as_me: checking whether we should include ESRI SDE support..." >&6;}
+ 
+-# Check whether --with-sde or --without-sde was given.
+-if test "${with_sde+set}" = set; then
+-  withval="$with_sde"
++# Check whether --with-sde was given.
++if test "${with_sde+set}" = set; then :
++  withval=$with_sde;
++fi
+ 
+-fi;
+ 
+ 
+-# Check whether --with-sde-version or --without-sde-version was given.
+-if test "${with_sde_version+set}" = set; then
+-  withval="$with_sde_version"
+-  SDE_VERSION=$with_sde_version
++# Check whether --with-sde-version was given.
++if test "${with_sde_version+set}" = set; then :
++  withval=$with_sde_version; SDE_VERSION=$with_sde_version
+ else
+   SDE_VERSION=91
+-fi;
++fi
++
+ 
+ if test -z "$SDE_VERSION" -o `expr "$SDE_VERSION" \>\= 92` = 1; then
+ SDE_VERSION=""
+ fi
+ if test "$with_sde" = "yes" ; then
+ 
+-  as_ac_Lib=`echo "ac_cv_lib_sde$SDE_VERSION''_SE_connection_create" | $as_tr_sh`
+-echo "$as_me:$LINENO: checking for SE_connection_create in -lsde$SDE_VERSION" >&5
+-echo $ECHO_N "checking for SE_connection_create in -lsde$SDE_VERSION... $ECHO_C" >&6
+-if eval "test \"\${$as_ac_Lib+set}\" = set"; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++  as_ac_Lib=`$as_echo "ac_cv_lib_sde$SDE_VERSION''_SE_connection_create" | $as_tr_sh`
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SE_connection_create in -lsde$SDE_VERSION" >&5
++$as_echo_n "checking for SE_connection_create in -lsde$SDE_VERSION... " >&6; }
++if eval \${$as_ac_Lib+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lsde$SDE_VERSION  $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+-/* Override any gcc2 internal prototype to avoid an error.  */
++/* 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
+-/* We use char because int might match the return type of a gcc2
+-   builtin and then its argument prototype would still apply.  */
+ char SE_connection_create ();
+ int
+ main ()
+ {
+-SE_connection_create ();
++return SE_connection_create ();
+   ;
+   return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++if ac_fn_c_try_link "$LINENO"; then :
+   eval "$as_ac_Lib=yes"
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-eval "$as_ac_Lib=no"
++  eval "$as_ac_Lib=no"
+ fi
+-rm -f conftest.err conftest.$ac_objext \
+-      conftest$ac_exeext conftest.$ac_ext
++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: `eval echo '${'$as_ac_Lib'}'`" >&5
+-echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
+-if test `eval echo '${'$as_ac_Lib'}'` = yes; then
++eval ac_res=\$$as_ac_Lib
++	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
++$as_echo "$ac_res" >&6; }
++if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+   SDE_ENABLED=-DUSE_SDE
+ fi
+ 
+ 
+   if test -n "$SDE_ENABLED" ; then
+       SDE_LIB="-lsde$SDE_VERSION -lpe$SDE_VERSION -lsg$SDE_VERSION"
+-      echo "$as_me:$LINENO: checking for main in -lpthread" >&5
+-echo $ECHO_N "checking for main in -lpthread... $ECHO_C" >&6
+-if test "${ac_cv_lib_pthread_main+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lpthread" >&5
++$as_echo_n "checking for main in -lpthread... " >&6; }
++if ${ac_cv_lib_pthread_main+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lpthread  $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+ 
+ int
+ main ()
+ {
+-main ();
++return main ();
+   ;
+   return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_lib_pthread_main=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-ac_cv_lib_pthread_main=no
++  ac_cv_lib_pthread_main=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
+-      conftest$ac_exeext conftest.$ac_ext
++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_pthread_main" >&5
+-echo "${ECHO_T}$ac_cv_lib_pthread_main" >&6
+-if test $ac_cv_lib_pthread_main = yes; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_main" >&5
++$as_echo "$ac_cv_lib_pthread_main" >&6; }
++if test "x$ac_cv_lib_pthread_main" = xyes; then :
+   SDE_LIB="$SDE_LIB -lpthread"
+ fi
+ 
+-      echo "$as_me:$LINENO: checking for main in -lsocket" >&5
+-echo $ECHO_N "checking for main in -lsocket... $ECHO_C" >&6
+-if test "${ac_cv_lib_socket_main+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lsocket" >&5
++$as_echo_n "checking for main in -lsocket... " >&6; }
++if ${ac_cv_lib_socket_main+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lsocket  $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+ 
+ int
+ main ()
+ {
+-main ();
++return main ();
+   ;
+   return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_lib_socket_main=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-ac_cv_lib_socket_main=no
++  ac_cv_lib_socket_main=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
+-      conftest$ac_exeext conftest.$ac_ext
++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_main" >&5
+-echo "${ECHO_T}$ac_cv_lib_socket_main" >&6
+-if test $ac_cv_lib_socket_main = yes; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_main" >&5
++$as_echo "$ac_cv_lib_socket_main" >&6; }
++if test "x$ac_cv_lib_socket_main" = xyes; then :
+   SDE_LIB="$SDE_LIB -lsocket"
+ fi
+ 
+-      echo "$as_me:$LINENO: checking for main in -ldl" >&5
+-echo $ECHO_N "checking for main in -ldl... $ECHO_C" >&6
+-if test "${ac_cv_lib_dl_main+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ldl" >&5
++$as_echo_n "checking for main in -ldl... " >&6; }
++if ${ac_cv_lib_dl_main+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-ldl  $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+ 
+ int
+ main ()
+ {
+-main ();
++return main ();
+   ;
+   return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_lib_dl_main=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-ac_cv_lib_dl_main=no
++  ac_cv_lib_dl_main=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
+-      conftest$ac_exeext conftest.$ac_ext
++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_dl_main" >&5
+-echo "${ECHO_T}$ac_cv_lib_dl_main" >&6
+-if test $ac_cv_lib_dl_main = yes; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_main" >&5
++$as_echo "$ac_cv_lib_dl_main" >&6; }
++if test "x$ac_cv_lib_dl_main" = xyes; then :
+   SDE_LIB="$SDE_LIB -ldl"
+ fi
+ 
+-      echo "$as_me:$LINENO: result:         using ESRI SDE from system libs." >&5
+-echo "${ECHO_T}        using ESRI SDE from system libs." >&6
++      { $as_echo "$as_me:${as_lineno-$LINENO}: result:         using ESRI SDE from system libs." >&5
++$as_echo "        using ESRI SDE from system libs." >&6; }
+   else
+-      { echo "$as_me:$LINENO: WARNING:         ESRI SDE not found in system libs... use --with-sde=DIR." >&5
+-echo "$as_me: WARNING:         ESRI SDE not found in system libs... use --with-sde=DIR." >&2;}
++      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:         ESRI SDE not found in system libs... use --with-sde=DIR." >&5
++$as_echo "$as_me: WARNING:         ESRI SDE not found in system libs... use --with-sde=DIR." >&2;}
+   fi
+ 
+ elif test -n "$with_sde" -a "$with_sde" != "no" ; then
+@@ -11216,189 +8022,105 @@
+   if test -n "$SDE_INCDIR" -a -n "$SDE_LIBDIR" ; then
+       SDE_INC=-I$SDE_INCDIR
+       SDE_LIB="-L$SDE_LIBDIR -lsde$SDE_VERSION -lpe$SDE_VERSION -lsg$SDE_VERSION"
+-      echo "$as_me:$LINENO: checking for main in -lpthread" >&5
+-echo $ECHO_N "checking for main in -lpthread... $ECHO_C" >&6
+-if test "${ac_cv_lib_pthread_main+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lpthread" >&5
++$as_echo_n "checking for main in -lpthread... " >&6; }
++if ${ac_cv_lib_pthread_main+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lpthread  $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+ 
+ int
+ main ()
+ {
+-main ();
++return main ();
+   ;
+   return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_lib_pthread_main=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-ac_cv_lib_pthread_main=no
++  ac_cv_lib_pthread_main=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
+-      conftest$ac_exeext conftest.$ac_ext
++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_pthread_main" >&5
+-echo "${ECHO_T}$ac_cv_lib_pthread_main" >&6
+-if test $ac_cv_lib_pthread_main = yes; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_main" >&5
++$as_echo "$ac_cv_lib_pthread_main" >&6; }
++if test "x$ac_cv_lib_pthread_main" = xyes; then :
+   SDE_LIB="$SDE_LIB -lpthread"
+ fi
+ 
+-      echo "$as_me:$LINENO: checking for main in -lsocket" >&5
+-echo $ECHO_N "checking for main in -lsocket... $ECHO_C" >&6
+-if test "${ac_cv_lib_socket_main+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lsocket" >&5
++$as_echo_n "checking for main in -lsocket... " >&6; }
++if ${ac_cv_lib_socket_main+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lsocket  $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+ 
+ int
+ main ()
+ {
+-main ();
++return main ();
+   ;
+   return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_lib_socket_main=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-ac_cv_lib_socket_main=no
++  ac_cv_lib_socket_main=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
+-      conftest$ac_exeext conftest.$ac_ext
++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_main" >&5
+-echo "${ECHO_T}$ac_cv_lib_socket_main" >&6
+-if test $ac_cv_lib_socket_main = yes; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_main" >&5
++$as_echo "$ac_cv_lib_socket_main" >&6; }
++if test "x$ac_cv_lib_socket_main" = xyes; then :
+   SDE_LIB="$SDE_LIB -lsocket"
+ fi
+ 
+-      echo "$as_me:$LINENO: checking for main in -ldl" >&5
+-echo $ECHO_N "checking for main in -ldl... $ECHO_C" >&6
+-if test "${ac_cv_lib_dl_main+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ldl" >&5
++$as_echo_n "checking for main in -ldl... " >&6; }
++if ${ac_cv_lib_dl_main+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-ldl  $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+ 
+ int
+ main ()
+ {
+-main ();
++return main ();
+   ;
+   return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_lib_dl_main=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-ac_cv_lib_dl_main=no
++  ac_cv_lib_dl_main=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
+-      conftest$ac_exeext conftest.$ac_ext
++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_dl_main" >&5
+-echo "${ECHO_T}$ac_cv_lib_dl_main" >&6
+-if test $ac_cv_lib_dl_main = yes; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_main" >&5
++$as_echo "$ac_cv_lib_dl_main" >&6; }
++if test "x$ac_cv_lib_dl_main" = xyes; then :
+   SDE_LIB="$SDE_LIB -ldl"
+ fi
+ 
+@@ -11425,19 +8147,17 @@
+   fi
+ 
+   else
+-      { { echo "$as_me:$LINENO: error: \"Could not find sdetype.h or libsde$SDE_VERSION.a/libsde$SDE_VERSION.so in $SDE_DIR.\"" >&5
+-echo "$as_me: error: \"Could not find sdetype.h or libsde$SDE_VERSION.a/libsde$SDE_VERSION.so in $SDE_DIR.\"" >&2;}
+-   { (exit 1); exit 1; }; }
++      as_fn_error $? "\"Could not find sdetype.h or libsde$SDE_VERSION.a/libsde$SDE_VERSION.so in $SDE_DIR.\"" "$LINENO" 5
+   fi
+ 
+   SDE_ENABLED=-DUSE_SDE
+-  echo "$as_me:$LINENO: result:         using ESRI SDE from $SDE_DIR." >&5
+-echo "${ECHO_T}        using ESRI SDE from $SDE_DIR." >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result:         using ESRI SDE from $SDE_DIR." >&5
++$as_echo "        using ESRI SDE from $SDE_DIR." >&6; }
+ 
+ else
+ 
+-  echo "$as_me:$LINENO: result:         ESRI SDE support not requested." >&5
+-echo "${ECHO_T}        ESRI SDE support not requested." >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result:         ESRI SDE support not requested." >&5
++$as_echo "        ESRI SDE support not requested." >&6; }
+ fi
+ 
+ SDE_ENABLED=$SDE_ENABLED
+@@ -11452,20 +8172,20 @@
+ ALL_LIB="$SDE_LIB $ALL_LIB"
+ 
+ 
+-echo "$as_me:$LINENO: checking if GEOS support requested" >&5
+-echo $ECHO_N "checking if GEOS support requested... $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if GEOS support requested" >&5
++$as_echo_n "checking if GEOS support requested... " >&6; }
+ 
+ 
+-# Check whether --with-geos or --without-geos was given.
+-if test "${with_geos+set}" = set; then
+-  withval="$with_geos"
++# Check whether --with-geos was given.
++if test "${with_geos+set}" = set; then :
++  withval=$with_geos;
++fi
+ 
+-fi;
+ 
+ if test -n "$with_geos" -a "$with_geos" != "no" ; then
+ 
+-  echo "$as_me:$LINENO: result: yes" >&5
+-echo "${ECHO_T}yes" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
+ 
+   GEOS_CONFIG=$with_geos
+ 
+@@ -11473,10 +8193,10 @@
+ 
+     # Extract the first word of "geos-config", so it can be a program name with args.
+ set dummy geos-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_GEOS_CONFIG+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if ${ac_cv_path_GEOS_CONFIG+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   case $GEOS_CONFIG in
+   [\\/]* | ?:[\\/]*)
+@@ -11488,50 +8208,47 @@
+ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+-  for ac_exec_ext in '' $ac_executable_extensions; do
+-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_path_GEOS_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+   fi
+ done
+-done
++  done
++IFS=$as_save_IFS
+ 
+   test -z "$ac_cv_path_GEOS_CONFIG" && ac_cv_path_GEOS_CONFIG="no"
+   ;;
+ esac
+ fi
+ GEOS_CONFIG=$ac_cv_path_GEOS_CONFIG
+-
+ if test -n "$GEOS_CONFIG"; then
+-  echo "$as_me:$LINENO: result: $GEOS_CONFIG" >&5
+-echo "${ECHO_T}$GEOS_CONFIG" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GEOS_CONFIG" >&5
++$as_echo "$GEOS_CONFIG" >&6; }
+ else
+-  echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+ fi
+ 
+ 
++
+     if test "$GEOS_CONFIG" = "no" ; then
+-      { { echo "$as_me:$LINENO: error: couldn't find geos-config in default path. Please specify full path to geos-config" >&5
+-echo "$as_me: error: couldn't find geos-config in default path. Please specify full path to geos-config" >&2;}
+-   { (exit 1); exit 1; }; }
++      as_fn_error $? "couldn't find geos-config in default path. Please specify full path to geos-config" "$LINENO" 5
+     fi
+ 
+   elif test -f "$GEOS_CONFIG" -a -x "$GEOS_CONFIG" ; then
+-    echo "$as_me:$LINENO: result: user supplied geos-config ($GEOS_CONFIG)" >&5
+-echo "${ECHO_T}user supplied geos-config ($GEOS_CONFIG)" >&6
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result: user supplied geos-config ($GEOS_CONFIG)" >&5
++$as_echo "user supplied geos-config ($GEOS_CONFIG)" >&6; }
+   else
+-    { { echo "$as_me:$LINENO: error: '$GEOS_CONFIG' is not an executable.  Make sure you use --with-geos=/path/to/geos-config" >&5
+-echo "$as_me: error: '$GEOS_CONFIG' is not an executable.  Make sure you use --with-geos=/path/to/geos-config" >&2;}
+-   { (exit 1); exit 1; }; }
++    as_fn_error $? "'$GEOS_CONFIG' is not an executable.  Make sure you use --with-geos=/path/to/geos-config" "$LINENO" 5
+   fi
+ 
+ 
+   min_geos_version=3.0.0
+ 
+-  echo "$as_me:$LINENO: checking for GEOS version >= $min_geos_version" >&5
+-echo $ECHO_N "checking for GEOS version >= $min_geos_version... $ECHO_C" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GEOS version >= $min_geos_version" >&5
++$as_echo_n "checking for GEOS version >= $min_geos_version... " >&6; }
+ 
+   geos_major_version=`$GEOS_CONFIG --version | \
+        sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1/'`
+@@ -11551,14 +8268,12 @@
+   ac_geos_version=`expr $geos_major_version \* 100000 \+  $geos_minor_version \* 100 \+ $geos_micro_version`
+ 
+   if test $ac_req_version -le $ac_geos_version; then
+-     echo "$as_me:$LINENO: result: yes. Found version ${geos_major_version}.${geos_minor_version}.${geos_micro_version}" >&5
+-echo "${ECHO_T}yes. Found version ${geos_major_version}.${geos_minor_version}.${geos_micro_version}" >&6
++     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes. Found version ${geos_major_version}.${geos_minor_version}.${geos_micro_version}" >&5
++$as_echo "yes. Found version ${geos_major_version}.${geos_minor_version}.${geos_micro_version}" >&6; }
+   else
+-     echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
+-     { { echo "$as_me:$LINENO: error: geos-config reports version ${geos_major_version}.${geos_minor_version}.${geos_micro_version}, need at least $min_geos_version or configure --without-geos" >&5
+-echo "$as_me: error: geos-config reports version ${geos_major_version}.${geos_minor_version}.${geos_micro_version}, need at least $min_geos_version or configure --without-geos" >&2;}
+-   { (exit 1); exit 1; }; }
++     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++     as_fn_error $? "geos-config reports version ${geos_major_version}.${geos_minor_version}.${geos_micro_version}, need at least $min_geos_version or configure --without-geos" "$LINENO" 5
+   fi
+ 
+ 
+@@ -11582,20 +8297,20 @@
+ 
+ else
+ 
+-  echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+ 
+ fi
+ 
+ 
+-{ echo "$as_me:$LINENO: checking whether we should include OGR support..." >&5
+-echo "$as_me: checking whether we should include OGR support..." >&6;}
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we should include OGR support..." >&5
++$as_echo "$as_me: checking whether we should include OGR support..." >&6;}
+ 
+-# Check whether --with-ogr or --without-ogr was given.
+-if test "${with_ogr+set}" = set; then
+-  withval="$with_ogr"
++# Check whether --with-ogr was given.
++if test "${with_ogr+set}" = set; then :
++  withval=$with_ogr;
++fi
+ 
+-fi;
+ 
+ if test "`basename xx/$with_ogr`" = "gdal-config" ; then
+   GDAL_CONFIG="$with_ogr"
+@@ -11604,10 +8319,10 @@
+ if test "$with_ogr" = "yes" ; then
+  # Extract the first word of "gdal-config", so it can be a program name with args.
+ set dummy gdal-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_GDAL_CONFIG+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if ${ac_cv_path_GDAL_CONFIG+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   case $GDAL_CONFIG in
+   [\\/]* | ?:[\\/]*)
+@@ -11619,34 +8334,33 @@
+ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+-  for ac_exec_ext in '' $ac_executable_extensions; do
+-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_path_GDAL_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+   fi
+ done
+-done
++  done
++IFS=$as_save_IFS
+ 
+   test -z "$ac_cv_path_GDAL_CONFIG" && ac_cv_path_GDAL_CONFIG="no"
+   ;;
+ esac
+ fi
+ GDAL_CONFIG=$ac_cv_path_GDAL_CONFIG
+-
+ if test -n "$GDAL_CONFIG"; then
+-  echo "$as_me:$LINENO: result: $GDAL_CONFIG" >&5
+-echo "${ECHO_T}$GDAL_CONFIG" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GDAL_CONFIG" >&5
++$as_echo "$GDAL_CONFIG" >&6; }
+ else
+-  echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+ fi
+ 
+ 
++
+   if test "$GDAL_CONFIG" = "no" ; then
+-    { { echo "$as_me:$LINENO: error: couldn't find gdal-config" >&5
+-echo "$as_me: error: couldn't find gdal-config" >&2;}
+-   { (exit 1); exit 1; }; }
++    as_fn_error $? "couldn't find gdal-config" "$LINENO" 5
+   fi
+ fi
+ 
+@@ -11655,34 +8369,34 @@
+ 
+   if test x`$GDAL_CONFIG --ogr-enabled` = "xyes" ; then
+       OGR_ENABLED=-DUSE_OGR
+-      echo "$as_me:$LINENO: result:         OGR enabled ($OGR_ENABLED)." >&5
+-echo "${ECHO_T}        OGR enabled ($OGR_ENABLED)." >&6
++      { $as_echo "$as_me:${as_lineno-$LINENO}: result:         OGR enabled ($OGR_ENABLED)." >&5
++$as_echo "        OGR enabled ($OGR_ENABLED)." >&6; }
+   else
+-      { echo "$as_me:$LINENO: WARNING:         OGR not available." >&5
+-echo "$as_me: WARNING:         OGR not available." >&2;}
++      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:         OGR not available." >&5
++$as_echo "$as_me: WARNING:         OGR not available." >&2;}
+   fi
+ 
+ else
+ 
+-  echo "$as_me:$LINENO: result:         OGR support not requested." >&5
+-echo "${ECHO_T}        OGR support not requested." >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result:         OGR support not requested." >&5
++$as_echo "        OGR support not requested." >&6; }
+ fi
+ 
+ 
+-echo "$as_me:$LINENO: checking if GDAL support requested" >&5
+-echo $ECHO_N "checking if GDAL support requested... $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if GDAL support requested" >&5
++$as_echo_n "checking if GDAL support requested... " >&6; }
+ 
+ 
+-# Check whether --with-gdal or --without-gdal was given.
+-if test "${with_gdal+set}" = set; then
+-  withval="$with_gdal"
++# Check whether --with-gdal was given.
++if test "${with_gdal+set}" = set; then :
++  withval=$with_gdal;
++fi
+ 
+-fi;
+ 
+ if test "$with_gdal" = "yes" ; then
+ 
+-  echo "$as_me:$LINENO: result: yes" >&5
+-echo "${ECHO_T}yes" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
+ 
+   if test "`basename xx/$with_gdal`" = "gdal-config" ; then
+     GDAL_CONFIG="$with_gdal"
+@@ -11691,10 +8405,10 @@
+   if test -z "$GDAL_CONFIG" ; then
+     # Extract the first word of "gdal-config", so it can be a program name with args.
+ set dummy gdal-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_GDAL_CONFIG+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if ${ac_cv_path_GDAL_CONFIG+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   case $GDAL_CONFIG in
+   [\\/]* | ?:[\\/]*)
+@@ -11706,35 +8420,34 @@
+ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+-  for ac_exec_ext in '' $ac_executable_extensions; do
+-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_path_GDAL_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+   fi
+ done
+-done
++  done
++IFS=$as_save_IFS
+ 
+   test -z "$ac_cv_path_GDAL_CONFIG" && ac_cv_path_GDAL_CONFIG="no"
+   ;;
+ esac
+ fi
+ GDAL_CONFIG=$ac_cv_path_GDAL_CONFIG
+-
+ if test -n "$GDAL_CONFIG"; then
+-  echo "$as_me:$LINENO: result: $GDAL_CONFIG" >&5
+-echo "${ECHO_T}$GDAL_CONFIG" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GDAL_CONFIG" >&5
++$as_echo "$GDAL_CONFIG" >&6; }
+ else
+-  echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+ fi
+ 
++
+   fi
+ 
+   if test "$GDAL_CONFIG" = "no" ; then
+-    { { echo "$as_me:$LINENO: error: couldn't find gdal-config" >&5
+-echo "$as_me: error: couldn't find gdal-config" >&2;}
+-   { (exit 1); exit 1; }; }
++    as_fn_error $? "couldn't find gdal-config" "$LINENO" 5
+   fi
+ 
+   GDAL_ENABLED=-DUSE_GDAL
+@@ -11744,20 +8457,18 @@
+   GDAL_CONFIG=$with_gdal
+ 
+   if test -f "$GDAL_CONFIG" -a -x "$GDAL_CONFIG" ; then
+-    echo "$as_me:$LINENO: result: yes, user supplied gdal-config ($GDAL_CONFIG)" >&5
+-echo "${ECHO_T}yes, user supplied gdal-config ($GDAL_CONFIG)" >&6
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, user supplied gdal-config ($GDAL_CONFIG)" >&5
++$as_echo "yes, user supplied gdal-config ($GDAL_CONFIG)" >&6; }
+   else
+-    { { echo "$as_me:$LINENO: error: '$GDAL_CONFIG' is not an executable.  Make sure you use --with-gdal=/path/to/gdal-config" >&5
+-echo "$as_me: error: '$GDAL_CONFIG' is not an executable.  Make sure you use --with-gdal=/path/to/gdal-config" >&2;}
+-   { (exit 1); exit 1; }; }
++    as_fn_error $? "'$GDAL_CONFIG' is not an executable.  Make sure you use --with-gdal=/path/to/gdal-config" "$LINENO" 5
+   fi
+ 
+   GDAL_ENABLED=-DUSE_GDAL
+ 
+ else
+ 
+-  echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+ 
+ fi
+ 
+@@ -11785,29 +8496,29 @@
+ 
+ 
+ 
+-echo "$as_me:$LINENO: checking if PostGIS support requested" >&5
+-echo $ECHO_N "checking if PostGIS support requested... $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if PostGIS support requested" >&5
++$as_echo_n "checking if PostGIS support requested... " >&6; }
+ 
+ 
+-# Check whether --with-postgis or --without-postgis was given.
+-if test "${with_postgis+set}" = set; then
+-  withval="$with_postgis"
++# Check whether --with-postgis was given.
++if test "${with_postgis+set}" = set; then :
++  withval=$with_postgis;
++fi
+ 
+-fi;
+ 
+ if test "$with_postgis" = "no" -o "$with_postgis" = "" ; then
+-  echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+   PG_CONFIG="no"
+ elif test "$with_postgis" = "yes" ; then
+-  echo "$as_me:$LINENO: result: yes" >&5
+-echo "${ECHO_T}yes" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
+   # Extract the first word of "pg_config", so it can be a program name with args.
+ set dummy pg_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_PG_CONFIG+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if ${ac_cv_path_PG_CONFIG+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   case $PG_CONFIG in
+   [\\/]* | ?:[\\/]*)
+@@ -11819,29 +8530,30 @@
+ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+-  for ac_exec_ext in '' $ac_executable_extensions; do
+-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_path_PG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+   fi
+ done
+-done
++  done
++IFS=$as_save_IFS
+ 
+   test -z "$ac_cv_path_PG_CONFIG" && ac_cv_path_PG_CONFIG="no"
+   ;;
+ esac
+ fi
+ PG_CONFIG=$ac_cv_path_PG_CONFIG
+-
+ if test -n "$PG_CONFIG"; then
+-  echo "$as_me:$LINENO: result: $PG_CONFIG" >&5
+-echo "${ECHO_T}$PG_CONFIG" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PG_CONFIG" >&5
++$as_echo "$PG_CONFIG" >&6; }
+ else
+-  echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+ fi
+ 
++
+ else
+   PG_CONFIG=$with_postgis
+ fi
+@@ -11854,12 +8566,10 @@
+   POSTGIS_ENABLED=
+ 
+   if test -f "$PG_CONFIG" -a -x "$PG_CONFIG" ; then
+-    echo "$as_me:$LINENO: result: yes, user supplied pg_config ($PG_CONFIG)" >&5
+-echo "${ECHO_T}yes, user supplied pg_config ($PG_CONFIG)" >&6
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, user supplied pg_config ($PG_CONFIG)" >&5
++$as_echo "yes, user supplied pg_config ($PG_CONFIG)" >&6; }
+   else
+-    { { echo "$as_me:$LINENO: error: '$PG_CONFIG' is not an executable.  Make sure you use --with-postgis=/path/to/pg_config" >&5
+-echo "$as_me: error: '$PG_CONFIG' is not an executable.  Make sure you use --with-postgis=/path/to/pg_config" >&2;}
+-   { (exit 1); exit 1; }; }
++    as_fn_error $? "'$PG_CONFIG' is not an executable.  Make sure you use --with-postgis=/path/to/pg_config" "$LINENO" 5
+   fi
+ 
+   POSTGIS_EXTRALIBS="`$PG_CONFIG --libs`"
+@@ -11874,71 +8584,43 @@
+   POSTGIS_LIB="-L`$PG_CONFIG --libdir` -lpq"
+   LDFLAGS="$LDFLAGS $POSTGIS_LIB"
+ 
+-  echo "$as_me:$LINENO: checking for PQconnectdb in -lpq" >&5
+-echo $ECHO_N "checking for PQconnectdb in -lpq... $ECHO_C" >&6
+-if test "${ac_cv_lib_pq_PQconnectdb+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQconnectdb in -lpq" >&5
++$as_echo_n "checking for PQconnectdb in -lpq... " >&6; }
++if ${ac_cv_lib_pq_PQconnectdb+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lpq  $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+-/* Override any gcc2 internal prototype to avoid an error.  */
++/* 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
+-/* We use char because int might match the return type of a gcc2
+-   builtin and then its argument prototype would still apply.  */
+ char PQconnectdb ();
+ int
+ main ()
+ {
+-PQconnectdb ();
++return PQconnectdb ();
+   ;
+   return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_lib_pq_PQconnectdb=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-ac_cv_lib_pq_PQconnectdb=no
++  ac_cv_lib_pq_PQconnectdb=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
+-      conftest$ac_exeext conftest.$ac_ext
++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_pq_PQconnectdb" >&5
+-echo "${ECHO_T}$ac_cv_lib_pq_PQconnectdb" >&6
+-if test $ac_cv_lib_pq_PQconnectdb = yes; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQconnectdb" >&5
++$as_echo "$ac_cv_lib_pq_PQconnectdb" >&6; }
++if test "x$ac_cv_lib_pq_PQconnectdb" = xyes; then :
+   POSTGIS_ENABLED="-DUSE_POSTGIS"
+ fi
+ 
+@@ -11947,142 +8629,86 @@
+     POSTGIS_LIB="$POSTGIS_LIB $POSTGIS_EXTRALIBS"
+     LDFLAGS="$old_LDFLAGS $POSTGIS_LIB"
+     unset ac_cv_lib_pq_PQconnectdb
+-    echo "$as_me:$LINENO: checking for PQconnectdb in -lpq" >&5
+-echo $ECHO_N "checking for PQconnectdb in -lpq... $ECHO_C" >&6
+-if test "${ac_cv_lib_pq_PQconnectdb+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQconnectdb in -lpq" >&5
++$as_echo_n "checking for PQconnectdb in -lpq... " >&6; }
++if ${ac_cv_lib_pq_PQconnectdb+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lpq  $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+-/* Override any gcc2 internal prototype to avoid an error.  */
++/* 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
+-/* We use char because int might match the return type of a gcc2
+-   builtin and then its argument prototype would still apply.  */
+ char PQconnectdb ();
+ int
+ main ()
+ {
+-PQconnectdb ();
++return PQconnectdb ();
+   ;
+   return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_lib_pq_PQconnectdb=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-ac_cv_lib_pq_PQconnectdb=no
++  ac_cv_lib_pq_PQconnectdb=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
+-      conftest$ac_exeext conftest.$ac_ext
++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_pq_PQconnectdb" >&5
+-echo "${ECHO_T}$ac_cv_lib_pq_PQconnectdb" >&6
+-if test $ac_cv_lib_pq_PQconnectdb = yes; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQconnectdb" >&5
++$as_echo "$ac_cv_lib_pq_PQconnectdb" >&6; }
++if test "x$ac_cv_lib_pq_PQconnectdb" = xyes; then :
+   POSTGIS_ENABLED="-DUSE_POSTGIS"
+ fi
+ 
+   fi
+ 
+     if test "$POSTGIS_ENABLED" = "-DUSE_POSTGIS" ; then
+-    echo "$as_me:$LINENO: checking for PQserverVersion in -lpq" >&5
+-echo $ECHO_N "checking for PQserverVersion in -lpq... $ECHO_C" >&6
+-if test "${ac_cv_lib_pq_PQserverVersion+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQserverVersion in -lpq" >&5
++$as_echo_n "checking for PQserverVersion in -lpq... " >&6; }
++if ${ac_cv_lib_pq_PQserverVersion+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lpq  $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+-/* Override any gcc2 internal prototype to avoid an error.  */
++/* 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
+-/* We use char because int might match the return type of a gcc2
+-   builtin and then its argument prototype would still apply.  */
+ char PQserverVersion ();
+ int
+ main ()
+ {
+-PQserverVersion ();
++return PQserverVersion ();
+   ;
+   return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_lib_pq_PQserverVersion=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-ac_cv_lib_pq_PQserverVersion=no
++  ac_cv_lib_pq_PQserverVersion=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
+-      conftest$ac_exeext conftest.$ac_ext
++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_pq_PQserverVersion" >&5
+-echo "${ECHO_T}$ac_cv_lib_pq_PQserverVersion" >&6
+-if test $ac_cv_lib_pq_PQserverVersion = yes; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQserverVersion" >&5
++$as_echo "$ac_cv_lib_pq_PQserverVersion" >&6; }
++if test "x$ac_cv_lib_pq_PQserverVersion" = xyes; then :
+   POSTGIS_ENABLED="$POSTGIS_ENABLED -DPOSTGIS_HAS_SERVER_VERSION"
+ fi
+ 
+@@ -12104,29 +8730,29 @@
+ ALL_LIB="$POSTGIS_LIB $ALL_LIB"
+ 
+ 
+-echo "$as_me:$LINENO: checking if Mysql support requested" >&5
+-echo $ECHO_N "checking if Mysql support requested... $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if Mysql support requested" >&5
++$as_echo_n "checking if Mysql support requested... " >&6; }
+ 
+ 
+-# Check whether --with-mysql or --without-mysql was given.
+-if test "${with_mysql+set}" = set; then
+-  withval="$with_mysql"
++# Check whether --with-mysql was given.
++if test "${with_mysql+set}" = set; then :
++  withval=$with_mysql;
++fi
+ 
+-fi;
+ 
+ if test "$with_mysql" = "no" -o "$with_mysql" = "" ; then
+-  echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+   MY_CONFIG="no"
+ elif test "$with_mysql" = "yes" ; then
+-  echo "$as_me:$LINENO: result: yes" >&5
+-echo "${ECHO_T}yes" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
+   # Extract the first word of "mysql_config", so it can be a program name with args.
+ set dummy mysql_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_MY_CONFIG+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if ${ac_cv_path_MY_CONFIG+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   case $MY_CONFIG in
+   [\\/]* | ?:[\\/]*)
+@@ -12138,29 +8764,30 @@
+ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+-  for ac_exec_ext in '' $ac_executable_extensions; do
+-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_path_MY_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+   fi
+ done
+-done
++  done
++IFS=$as_save_IFS
+ 
+   test -z "$ac_cv_path_MY_CONFIG" && ac_cv_path_MY_CONFIG="no"
+   ;;
+ esac
+ fi
+ MY_CONFIG=$ac_cv_path_MY_CONFIG
+-
+ if test -n "$MY_CONFIG"; then
+-  echo "$as_me:$LINENO: result: $MY_CONFIG" >&5
+-echo "${ECHO_T}$MY_CONFIG" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MY_CONFIG" >&5
++$as_echo "$MY_CONFIG" >&6; }
+ else
+-  echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+ fi
+ 
++
+ else
+   MY_CONFIG=$with_mysql
+ fi
+@@ -12171,12 +8798,10 @@
+   MYSQL_LIB=
+ else
+   if test -f "$MY_CONFIG" -a -x "$MY_CONFIG" ; then
+-    echo "$as_me:$LINENO: result: yes, user supplied mysql_config ($MY_CONFIG)" >&5
+-echo "${ECHO_T}yes, user supplied mysql_config ($MY_CONFIG)" >&6
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, user supplied mysql_config ($MY_CONFIG)" >&5
++$as_echo "yes, user supplied mysql_config ($MY_CONFIG)" >&6; }
+   else
+-    { { echo "$as_me:$LINENO: error: '$MY_CONFIG' is not an executable.  Make sure you use --with-mysql=/path/to/mysql_config" >&5
+-echo "$as_me: error: '$MY_CONFIG' is not an executable.  Make sure you use --with-mysql=/path/to/mysql_config" >&2;}
+-   { (exit 1); exit 1; }; }
++    as_fn_error $? "'$MY_CONFIG' is not an executable.  Make sure you use --with-mysql=/path/to/mysql_config" "$LINENO" 5
+   fi
+ 
+   MYSQL_ENABLED=-DUSE_MYSQL
+@@ -12198,33 +8823,31 @@
+ ALL_LIB="$MYSQL_LIB $ALL_LIB"
+ 
+ 
+-echo "$as_me:$LINENO: checking if OracleSpatial support requested" >&5
+-echo $ECHO_N "checking if OracleSpatial support requested... $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if OracleSpatial support requested" >&5
++$as_echo_n "checking if OracleSpatial support requested... " >&6; }
+ 
+-# Check whether --with-oraclespatial or --without-oraclespatial was given.
+-if test "${with_oraclespatial+set}" = set; then
+-  withval="$with_oraclespatial"
++# Check whether --with-oraclespatial was given.
++if test "${with_oraclespatial+set}" = set; then :
++  withval=$with_oraclespatial;
++fi
+ 
+-fi;
+ 
+ if test "$with_oraclespatial" = "no" -o "$with_oraclespatial" = ""; then
+-  echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+   ORA_HOME="no"
+ elif test "$with_oraclespatial" = "yes"; then
+   if test -d "$ORACLE_HOME"; then
+-    echo "$as_me:$LINENO: result: yes, set from ORACLE_HOME environment variable" >&5
+-echo "${ECHO_T}yes, set from ORACLE_HOME environment variable" >&6
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, set from ORACLE_HOME environment variable" >&5
++$as_echo "yes, set from ORACLE_HOME environment variable" >&6; }
+     ORA_HOME="$ORACLE_HOME"
+   else
+     ORA_HOME="no"
+-    { { echo "$as_me:$LINENO: error: ORACLE_HOME variable is not properly set" >&5
+-echo "$as_me: error: ORACLE_HOME variable is not properly set" >&2;}
+-   { (exit 1); exit 1; }; }
++    as_fn_error $? "ORACLE_HOME variable is not properly set" "$LINENO" 5
+   fi
+ else
+-  echo "$as_me:$LINENO: result: yes, user supplied ORACLE_HOME" >&5
+-echo "${ECHO_T}yes, user supplied ORACLE_HOME" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, user supplied ORACLE_HOME" >&5
++$as_echo "yes, user supplied ORACLE_HOME" >&6; }
+   ORA_HOME=$with_oraclespatial
+ fi
+ 
+@@ -12240,9 +8863,7 @@
+   test -f $ORA_HOME/lib/oracle/10*/client/lib/libclntsh.dylib && ORA_LIBDIR=`dirname $ORA_HOME/lib/oracle/10*/client/lib/libclntsh.dylib`
+ 
+   if test -z "$ORA_LIBDIR" ; then
+-    { { echo "$as_me:$LINENO: error: Oracle Spatial: libclntsh.so not found." >&5
+-echo "$as_me: error: Oracle Spatial: libclntsh.so not found." >&2;}
+-   { (exit 1); exit 1; }; }
++    as_fn_error $? "Oracle Spatial: libclntsh.so not found." "$LINENO" 5
+   fi
+ 
+     test -f $ORA_HOME/sdk/include/oci.h && ORA_INCDIR="$ORA_HOME/sdk/include"
+@@ -12251,17 +8872,15 @@
+   test -f $ORA_HOME/include/oracle/10*/client/oci.h && ORA_INCDIR=`dirname $ORA_HOME/include/oracle/10*/client/oci.h`
+ 
+   if test -z "$ORA_INCDIR" ; then
+-    { { echo "$as_me:$LINENO: error: Oracle Spatial: oci.h not found." >&5
+-echo "$as_me: error: Oracle Spatial: oci.h not found." >&2;}
+-   { (exit 1); exit 1; }; }
++    as_fn_error $? "Oracle Spatial: oci.h not found." "$LINENO" 5
+   fi
+ 
+   ORACLESPATIAL_ENABLED=-DUSE_ORACLESPATIAL
+   ORACLESPATIAL_LIB="-L$ORA_LIBDIR -lclntsh"
+   ORACLESPATIAL_INC="-I$ORA_INCDIR -I$ORA_HOME/rdbms/demo -I$ORA_HOME/rdbms/public"
+ 
+-  echo "$as_me:$LINENO: result:         Oracle Spatial found in $ORA_HOME." >&5
+-echo "${ECHO_T}        Oracle Spatial found in $ORA_HOME." >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result:         Oracle Spatial found in $ORA_HOME." >&5
++$as_echo "        Oracle Spatial found in $ORA_HOME." >&6; }
+ 
+ fi
+ 
+@@ -12279,30 +8898,30 @@
+ 
+ 
+ 
+-{ echo "$as_me:$LINENO: checking whether we should include WMS Server support..." >&5
+-echo "$as_me: checking whether we should include WMS Server support..." >&6;}
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we should include WMS Server support..." >&5
++$as_echo "$as_me: checking whether we should include WMS Server support..." >&6;}
+ 
+-# Check whether --with-wms or --without-wms was given.
+-if test "${with_wms+set}" = set; then
+-  withval="$with_wms"
++# Check whether --with-wms was given.
++if test "${with_wms+set}" = set; then :
++  withval=$with_wms;
++fi
+ 
+-fi;
+ 
+ if test "$with_wms" = "no" ; then
+ 
+-  echo "$as_me:$LINENO: result:         OGC WMS Compatibility disabled by --without-wms." >&5
+-echo "${ECHO_T}        OGC WMS Compatibility disabled by --without-wms." >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result:         OGC WMS Compatibility disabled by --without-wms." >&5
++$as_echo "        OGC WMS Compatibility disabled by --without-wms." >&6; }
+ 
+ elif test -z "$PROJ_ENABLED" ; then
+ 
+-  echo "$as_me:$LINENO: result:         OGC WMS Compatibility not enabled (PROJ.4 is required for WMS)." >&5
+-echo "${ECHO_T}        OGC WMS Compatibility not enabled (PROJ.4 is required for WMS)." >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result:         OGC WMS Compatibility not enabled (PROJ.4 is required for WMS)." >&5
++$as_echo "        OGC WMS Compatibility not enabled (PROJ.4 is required for WMS)." >&6; }
+ 
+ else
+ 
+   WMS_SVR_ENABLED="-DUSE_WMS_SVR"
+-  echo "$as_me:$LINENO: result:         OGC WMS compatibility enabled ($WMS_SVR_ENABLED)." >&5
+-echo "${ECHO_T}        OGC WMS compatibility enabled ($WMS_SVR_ENABLED)." >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result:         OGC WMS compatibility enabled ($WMS_SVR_ENABLED)." >&5
++$as_echo "        OGC WMS compatibility enabled ($WMS_SVR_ENABLED)." >&6; }
+ 
+ fi
+ 
+@@ -12313,37 +8932,33 @@
+ 
+ 
+ 
+-{ echo "$as_me:$LINENO: checking whether we should include WFS Server support..." >&5
+-echo "$as_me: checking whether we should include WFS Server support..." >&6;}
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we should include WFS Server support..." >&5
++$as_echo "$as_me: checking whether we should include WFS Server support..." >&6;}
+ 
+-# Check whether --with-wfs or --without-wfs was given.
+-if test "${with_wfs+set}" = set; then
+-  withval="$with_wfs"
++# Check whether --with-wfs was given.
++if test "${with_wfs+set}" = set; then :
++  withval=$with_wfs;
++fi
+ 
+-fi;
+ 
+ if test "$with_wfs" != "yes" ; then
+ 
+-  echo "$as_me:$LINENO: result:         OGC WFS Server support not requested." >&5
+-echo "${ECHO_T}        OGC WFS Server support not requested." >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result:         OGC WFS Server support not requested." >&5
++$as_echo "        OGC WFS Server support not requested." >&6; }
+ 
+ elif test -z "$OGR_ENABLED" ; then
+ 
+-  { { echo "$as_me:$LINENO: error: OGC WFS Server support cannot be enabled: missing OGR which is required)." >&5
+-echo "$as_me: error: OGC WFS Server support cannot be enabled: missing OGR which is required)." >&2;}
+-   { (exit 1); exit 1; }; }
++  as_fn_error $? "OGC WFS Server support cannot be enabled: missing OGR which is required)." "$LINENO" 5
+ 
+ elif test -z "$PROJ_ENABLED" ; then
+ 
+-  { { echo "$as_me:$LINENO: error: OGC WFS Server support cannot be enabled: missing PROJ4 which is required)." >&5
+-echo "$as_me: error: OGC WFS Server support cannot be enabled: missing PROJ4 which is required)." >&2;}
+-   { (exit 1); exit 1; }; }
++  as_fn_error $? "OGC WFS Server support cannot be enabled: missing PROJ4 which is required)." "$LINENO" 5
+ 
+ elif test "$with_wfs" = "yes" ; then
+ 
+   WFS_SVR_ENABLED="-DUSE_WFS_SVR"
+-  echo "$as_me:$LINENO: result:         OGC WFS Server support enabled ($WFS_SVR_ENABLED)." >&5
+-echo "${ECHO_T}        OGC WFS Server support enabled ($WFS_SVR_ENABLED)." >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result:         OGC WFS Server support enabled ($WFS_SVR_ENABLED)." >&5
++$as_echo "        OGC WFS Server support enabled ($WFS_SVR_ENABLED)." >&6; }
+ 
+ fi
+ 
+@@ -12354,30 +8969,26 @@
+ 
+ 
+ 
+-{ echo "$as_me:$LINENO: checking whether we should include WCS Server support..." >&5
+-echo "$as_me: checking whether we should include WCS Server support..." >&6;}
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we should include WCS Server support..." >&5
++$as_echo "$as_me: checking whether we should include WCS Server support..." >&6;}
+ 
+-# Check whether --with-wcs or --without-wcs was given.
+-if test "${with_wcs+set}" = set; then
+-  withval="$with_wcs"
++# Check whether --with-wcs was given.
++if test "${with_wcs+set}" = set; then :
++  withval=$with_wcs;
++fi
+ 
+-fi;
+ 
+ if test "$with_wcs" != "yes" ; then
+-  echo "$as_me:$LINENO: result:         OGC WCS Server support not requested." >&5
+-echo "${ECHO_T}        OGC WCS Server support not requested." >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result:         OGC WCS Server support not requested." >&5
++$as_echo "        OGC WCS Server support not requested." >&6; }
+ elif test -z "$GDAL_ENABLED" ; then
+-  { { echo "$as_me:$LINENO: error: OGC WCS Server support cannot be enabled: missing GDAL which is required)." >&5
+-echo "$as_me: error: OGC WCS Server support cannot be enabled: missing GDAL which is required)." >&2;}
+-   { (exit 1); exit 1; }; }
++  as_fn_error $? "OGC WCS Server support cannot be enabled: missing GDAL which is required)." "$LINENO" 5
+ elif test -z "$PROJ_ENABLED" ; then
+-  { { echo "$as_me:$LINENO: error: OGC WCS Server support cannot be enabled: missing PROJ4 which is required)." >&5
+-echo "$as_me: error: OGC WCS Server support cannot be enabled: missing PROJ4 which is required)." >&2;}
+-   { (exit 1); exit 1; }; }
++  as_fn_error $? "OGC WCS Server support cannot be enabled: missing PROJ4 which is required)." "$LINENO" 5
+ elif test "$with_wcs" = "yes" ; then
+   WCS_SVR_ENABLED="-DUSE_WCS_SVR"
+-  echo "$as_me:$LINENO: result:         OGC WCS Server support enabled ($WCS_SVR_ENABLED)." >&5
+-echo "${ECHO_T}        OGC WCS Server support enabled ($WCS_SVR_ENABLED)." >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result:         OGC WCS Server support enabled ($WCS_SVR_ENABLED)." >&5
++$as_echo "        OGC WCS Server support enabled ($WCS_SVR_ENABLED)." >&6; }
+ fi
+ 
+ WCS_SVR_ENABLED=$WCS_SVR_ENABLED
+@@ -12386,24 +8997,24 @@
+ 
+ 
+ 
+-{ echo "$as_me:$LINENO: checking whether we should include WMS Client Connections support..." >&5
+-echo "$as_me: checking whether we should include WMS Client Connections support..." >&6;}
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we should include WMS Client Connections support..." >&5
++$as_echo "$as_me: checking whether we should include WMS Client Connections support..." >&6;}
+ 
+-# Check whether --with-wmsclient or --without-wmsclient was given.
+-if test "${with_wmsclient+set}" = set; then
+-  withval="$with_wmsclient"
++# Check whether --with-wmsclient was given.
++if test "${with_wmsclient+set}" = set; then :
++  withval=$with_wmsclient;
++fi
+ 
+-fi;
+ 
+ if test "$with_wmsclient" = "no" ; then
+ 
+-  echo "$as_me:$LINENO: result:         OGC WMS Client Layers disabled by --without-wmsclient." >&5
+-echo "${ECHO_T}        OGC WMS Client Layers disabled by --without-wmsclient." >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result:         OGC WMS Client Layers disabled by --without-wmsclient." >&5
++$as_echo "        OGC WMS Client Layers disabled by --without-wmsclient." >&6; }
+ 
+ elif test -z "$PROJ_ENABLED" -o -z "$GDAL_ENABLED"; then
+ 
+-  echo "$as_me:$LINENO: result:         OGC WMS Client Connections not enabled (PROJ.4, libcurl and GDAL required)." >&5
+-echo "${ECHO_T}        OGC WMS Client Connections not enabled (PROJ.4, libcurl and GDAL required)." >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result:         OGC WMS Client Connections not enabled (PROJ.4, libcurl and GDAL required)." >&5
++$as_echo "        OGC WMS Client Connections not enabled (PROJ.4, libcurl and GDAL required)." >&6; }
+ 
+ elif test "$with_wmsclient" = "yes" ; then
+ 
+@@ -12412,24 +9023,24 @@
+ fi
+ 
+ 
+-{ echo "$as_me:$LINENO: checking whether we should include WFS Client Connections support..." >&5
+-echo "$as_me: checking whether we should include WFS Client Connections support..." >&6;}
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we should include WFS Client Connections support..." >&5
++$as_echo "$as_me: checking whether we should include WFS Client Connections support..." >&6;}
+ 
+-# Check whether --with-wfsclient or --without-wfsclient was given.
+-if test "${with_wfsclient+set}" = set; then
+-  withval="$with_wfsclient"
++# Check whether --with-wfsclient was given.
++if test "${with_wfsclient+set}" = set; then :
++  withval=$with_wfsclient;
++fi
+ 
+-fi;
+ 
+ if test "$with_wfsclient" = "no" ; then
+ 
+-  echo "$as_me:$LINENO: result:         OGC WFS Client Layers disabled by --without-wfsclient." >&5
+-echo "${ECHO_T}        OGC WFS Client Layers disabled by --without-wfsclient." >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result:         OGC WFS Client Layers disabled by --without-wfsclient." >&5
++$as_echo "        OGC WFS Client Layers disabled by --without-wfsclient." >&6; }
+ 
+ elif test -z "$PROJ_ENABLED" -o -z "$OGR_ENABLED"; then
+ 
+-  echo "$as_me:$LINENO: result:         OGC WFS Client Connections not enabled (PROJ.4, libcurl and OGR required)." >&5
+-echo "${ECHO_T}        OGC WFS Client Connections not enabled (PROJ.4, libcurl and OGR required)." >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result:         OGC WFS Client Connections not enabled (PROJ.4, libcurl and OGR required)." >&5
++$as_echo "        OGC WFS Client Connections not enabled (PROJ.4, libcurl and OGR required)." >&6; }
+ 
+ elif test "$with_wfsclient" = "yes" ; then
+ 
+@@ -12438,48 +9049,44 @@
+ fi
+ 
+ 
+-{ echo "$as_me:$LINENO: checking whether we should include OGC SOS Server support..." >&5
+-echo "$as_me: checking whether we should include OGC SOS Server support..." >&6;}
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we should include OGC SOS Server support..." >&5
++$as_echo "$as_me: checking whether we should include OGC SOS Server support..." >&6;}
+ 
+-# Check whether --with-sos or --without-sos was given.
+-if test "${with_sos+set}" = set; then
+-  withval="$with_sos"
++# Check whether --with-sos was given.
++if test "${with_sos+set}" = set; then :
++  withval=$with_sos;
++fi
+ 
+-fi;
+ 
+ if test "x$with_sos" != "xyes" ; then
+ 
+-  echo "$as_me:$LINENO: result:         OGC SOS Server support not requested." >&5
+-echo "${ECHO_T}        OGC SOS Server support not requested." >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result:         OGC SOS Server support not requested." >&5
++$as_echo "        OGC SOS Server support not requested." >&6; }
+ 
+ else
+ 
+   if test -z "$PROJ_ENABLED" ; then
+-    { { echo "$as_me:$LINENO: error:         OGC SOS Support requested, but PROJ.4 required and missing." >&5
+-echo "$as_me: error:         OGC SOS Support requested, but PROJ.4 required and missing." >&2;}
+-   { (exit 1); exit 1; }; }
++    as_fn_error $? "        OGC SOS Support requested, but PROJ.4 required and missing." "$LINENO" 5
+   fi
+   if test -z "$OGR_ENABLED" ; then
+-    { { echo "$as_me:$LINENO: error:         OGC SOS Support requested, but OGR required and missing." >&5
+-echo "$as_me: error:         OGC SOS Support requested, but OGR required and missing." >&2;}
+-   { (exit 1); exit 1; }; }
++    as_fn_error $? "        OGC SOS Support requested, but OGR required and missing." "$LINENO" 5
+   fi
+ 
+     SOS_REQUESTED="yes"
+-  echo "$as_me:$LINENO: result:         OGC SOS Server support requested." >&5
+-echo "${ECHO_T}        OGC SOS Server support requested." >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result:         OGC SOS Server support requested." >&5
++$as_echo "        OGC SOS Server support requested." >&6; }
+ 
+ fi
+ 
+ 
+-echo "$as_me:$LINENO: checking for curl-config" >&5
+-echo $ECHO_N "checking for curl-config... $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for curl-config" >&5
++$as_echo_n "checking for curl-config... " >&6; }
+ 
+-# Check whether --with-curl-config or --without-curl-config was given.
+-if test "${with_curl_config+set}" = set; then
+-  withval="$with_curl_config"
++# Check whether --with-curl-config was given.
++if test "${with_curl_config+set}" = set; then :
++  withval=$with_curl_config;
++fi
+ 
+-fi;
+ 
+ unset ac_cv_path_LIBCURL_CONFIG
+ 
+@@ -12488,20 +9095,18 @@
+   if test "`basename xx/$with_curl_config`" = "curl-config" ; then
+     LIBCURL_CONFIG="$with_curl_config"
+     if test -f "$LIBCURL_CONFIG" -a -x "$LIBCURL_CONFIG" ; then
+-      echo "$as_me:$LINENO: result: yes, user supplied curl-config ($LIBCURL_CONFIG)" >&5
+-echo "${ECHO_T}yes, user supplied curl-config ($LIBCURL_CONFIG)" >&6
++      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, user supplied curl-config ($LIBCURL_CONFIG)" >&5
++$as_echo "yes, user supplied curl-config ($LIBCURL_CONFIG)" >&6; }
+     else
+-      { { echo "$as_me:$LINENO: error: '$LIBCURL_CONFIG' is not an executable.  Make sure you use --with-curl-config=/path/to/curl-config" >&5
+-echo "$as_me: error: '$LIBCURL_CONFIG' is not an executable.  Make sure you use --with-curl-config=/path/to/curl-config" >&2;}
+-   { (exit 1); exit 1; }; }
++      as_fn_error $? "'$LIBCURL_CONFIG' is not an executable.  Make sure you use --with-curl-config=/path/to/curl-config" "$LINENO" 5
+     fi
+   else
+     # 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_LIBCURL_CONFIG+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if ${ac_cv_path_LIBCURL_CONFIG+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   case $LIBCURL_CONFIG in
+   [\\/]* | ?:[\\/]*)
+@@ -12513,71 +9118,68 @@
+ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+-  for ac_exec_ext in '' $ac_executable_extensions; do
+-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_path_LIBCURL_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+   fi
+ done
+-done
++  done
++IFS=$as_save_IFS
+ 
+   test -z "$ac_cv_path_LIBCURL_CONFIG" && ac_cv_path_LIBCURL_CONFIG="no"
+   ;;
+ esac
+ fi
+ LIBCURL_CONFIG=$ac_cv_path_LIBCURL_CONFIG
+-
+ if test -n "$LIBCURL_CONFIG"; then
+-  echo "$as_me:$LINENO: result: $LIBCURL_CONFIG" >&5
+-echo "${ECHO_T}$LIBCURL_CONFIG" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBCURL_CONFIG" >&5
++$as_echo "$LIBCURL_CONFIG" >&6; }
+ else
+-  echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+ fi
+ 
++
+   fi
+ 
+   if test "$LIBCURL_CONFIG" = "no" ; then
+-    { { echo "$as_me:$LINENO: error: couldn't find curl-config, try using --with-curl-config=PATH" >&5
+-echo "$as_me: error: couldn't find curl-config, try using --with-curl-config=PATH" >&2;}
+-   { (exit 1); exit 1; }; }
++    as_fn_error $? "couldn't find curl-config, try using --with-curl-config=PATH" "$LINENO" 5
+   fi
+ 
+   CURL_VERNUM=`$LIBCURL_CONFIG --vernum`
+   CURL_VER=`$LIBCURL_CONFIG --version | awk '{print $2}'`
+   CURL_FLAGS=""
+ 
+-  echo "$as_me:$LINENO: result:         found libcurl version $CURL_VER" >&5
+-echo "${ECHO_T}        found libcurl version $CURL_VER" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result:         found libcurl version $CURL_VER" >&5
++$as_echo "        found libcurl version $CURL_VER" >&6; }
+ 
+     if test -z "$CURL_VERNUM" -o `expr "0x$CURL_VERNUM" \< "0x070a01"` = 1; then
+-    { { echo "$as_me:$LINENO: error: libcurl version 7.10.1 or more recent is required." >&5
+-echo "$as_me: error: libcurl version 7.10.1 or more recent is required." >&2;}
+-   { (exit 1); exit 1; }; }
++    as_fn_error $? "libcurl version 7.10.1 or more recent is required." "$LINENO" 5
+   fi
+ 
+-    echo "$as_me:$LINENO: checking for CURLOPT_PROXYAUTH support" >&5
+-echo $ECHO_N "checking for CURLOPT_PROXYAUTH support... $ECHO_C" >&6
++    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CURLOPT_PROXYAUTH support" >&5
++$as_echo_n "checking for CURLOPT_PROXYAUTH support... " >&6; }
+   if test -z "$CURL_VERNUM" -o `expr "0x$CURL_VERNUM" \>= "0x070a07"` = 1; then
+-    echo "$as_me:$LINENO: result: yes." >&5
+-echo "${ECHO_T}yes." >&6
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes." >&5
++$as_echo "yes." >&6; }
+     CURL_FLAGS="-DUSE_CURLOPT_PROXYAUTH"
+   else
+-    echo "$as_me:$LINENO: result: no." >&5
+-echo "${ECHO_T}no." >&6
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no." >&5
++$as_echo "no." >&6; }
+   fi
+ 
+       if test "$WMS_REQUESTED" = "yes" ; then
+     WMS_LYR_ENABLED="-DUSE_WMS_LYR"
+-    echo "$as_me:$LINENO: result:         OGC WMS Client Connections enabled ($WMS_LYR_ENABLED)." >&5
+-echo "${ECHO_T}        OGC WMS Client Connections enabled ($WMS_LYR_ENABLED)." >&6
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result:         OGC WMS Client Connections enabled ($WMS_LYR_ENABLED)." >&5
++$as_echo "        OGC WMS Client Connections enabled ($WMS_LYR_ENABLED)." >&6; }
+   fi
+ 
+   if test "$WFS_REQUESTED" = "yes" ; then
+     WFS_LYR_ENABLED="-DUSE_WFS_LYR"
+-    echo "$as_me:$LINENO: result:         OGC WFS Client Connections enabled ($WFS_LYR_ENABLED)." >&5
+-echo "${ECHO_T}        OGC WFS Client Connections enabled ($WFS_LYR_ENABLED)." >&6
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result:         OGC WFS Client Connections enabled ($WFS_LYR_ENABLED)." >&5
++$as_echo "        OGC WFS Client Connections enabled ($WFS_LYR_ENABLED)." >&6; }
+   fi
+ 
+   CURL_INC=`$LIBCURL_CONFIG --cflags`
+@@ -12596,35 +9198,35 @@
+ 
+ 
+ 
+-# Check whether --with-kml or --without-kml was given.
+-if test "${with_kml+set}" = set; then
+-  withval="$with_kml"
++# Check whether --with-kml was given.
++if test "${with_kml+set}" = set; then :
++  withval=$with_kml;
++fi
+ 
+-fi;
+ 
+-echo "$as_me:$LINENO: checking if KML output is requested" >&5
+-echo $ECHO_N "checking if KML output is requested... $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if KML output is requested" >&5
++$as_echo_n "checking if KML output is requested... " >&6; }
+ KML_REQUESTED=""
+ 
+ if test "$with_kml" = "yes"; then
+-    echo "$as_me:$LINENO: result: yes" >&5
+-echo "${ECHO_T}yes" >&6
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
+     KML_REQUESTED="yes"
+ else
+-    echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+ fi
+ 
+ 
+-echo "$as_me:$LINENO: checking for libxml2" >&5
+-echo $ECHO_N "checking for libxml2... $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml2" >&5
++$as_echo_n "checking for libxml2... " >&6; }
+ 
+ 
+-# Check whether --with-xml2-config or --without-xml2-config was given.
+-if test "${with_xml2_config+set}" = set; then
+-  withval="$with_xml2_config"
++# Check whether --with-xml2-config was given.
++if test "${with_xml2_config+set}" = set; then :
++  withval=$with_xml2_config;
++fi
+ 
+-fi;
+ 
+ unset ac_cv_path_LIBXML2_CONFIG
+ 
+@@ -12632,32 +9234,32 @@
+ if test -z "$with_xml2_config" ; then
+   if test "x$SOS_REQUESTED" = "xyes" ; then
+     with_xml2_config=yes
+-    echo "$as_me:$LINENO: result: libxml2 required." >&5
+-echo "${ECHO_T}libxml2 required." >&6
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result: libxml2 required." >&5
++$as_echo "libxml2 required." >&6; }
+   elif test "x$KML_REQUESTED" = "xyes" ; then
+     with_xml2_config=yes
+-    echo "$as_me:$LINENO: result: libxml2 required." >&5
+-echo "${ECHO_T}libxml2 required." >&6
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result: libxml2 required." >&5
++$as_echo "libxml2 required." >&6; }
+   elif test "x$WCS_SVR_ENABLED" != "x" ; then
+     with_xml2_config=yes
+-    echo "$as_me:$LINENO: result: libxml2 requested for WCS Server." >&5
+-echo "${ECHO_T}libxml2 requested for WCS Server." >&6
+-    echo "$as_me:$LINENO: result:       If unavailable disable using --without-xml2-config," >&5
+-echo "${ECHO_T}      If unavailable disable using --without-xml2-config," >&6
+-    echo "$as_me:$LINENO: result:       but WCS 1.1 support will be disabled." >&5
+-echo "${ECHO_T}      but WCS 1.1 support will be disabled." >&6
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result: libxml2 requested for WCS Server." >&5
++$as_echo "libxml2 requested for WCS Server." >&6; }
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result:       If unavailable disable using --without-xml2-config," >&5
++$as_echo "      If unavailable disable using --without-xml2-config," >&6; }
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result:       but WCS 1.1 support will be disabled." >&5
++$as_echo "      but WCS 1.1 support will be disabled." >&6; }
+   elif test "x$WFS_SVR_ENABLED" != "x" ; then
+     with_xml2_config=yes
+-    echo "$as_me:$LINENO: result: libxml2 requested for WFS Server." >&5
+-echo "${ECHO_T}libxml2 requested for WFS Server." >&6
+-    echo "$as_me:$LINENO: result:       If unavailable disable using --without-xml2-config," >&5
+-echo "${ECHO_T}      If unavailable disable using --without-xml2-config," >&6
+-    echo "$as_me:$LINENO: result:       but WFS 1.1 support will be disabled." >&5
+-echo "${ECHO_T}      but WFS 1.1 support will be disabled." >&6
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result: libxml2 requested for WFS Server." >&5
++$as_echo "libxml2 requested for WFS Server." >&6; }
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result:       If unavailable disable using --without-xml2-config," >&5
++$as_echo "      If unavailable disable using --without-xml2-config," >&6; }
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result:       but WFS 1.1 support will be disabled." >&5
++$as_echo "      but WFS 1.1 support will be disabled." >&6; }
+   else
+     with_xml2_config=no
+-    echo "$as_me:$LINENO: result: libxml2 not required." >&5
+-echo "${ECHO_T}libxml2 not required." >&6
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result: libxml2 not required." >&5
++$as_echo "libxml2 not required." >&6; }
+   fi
+ fi
+ 
+@@ -12666,20 +9268,18 @@
+   if test "`basename xx/$with_xml2_config`" = "xml2-config" ; then
+     LIBXML2_CONFIG="$with_xml2_config"
+     if test -f "$LIBXML2_CONFIG" -a -x "$LIBXML2_CONFIG" ; then
+-      echo "$as_me:$LINENO: result: yes, user supplied xml2-config ($LIBXML2_CONFIG)" >&5
+-echo "${ECHO_T}yes, user supplied xml2-config ($LIBXML2_CONFIG)" >&6
++      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, user supplied xml2-config ($LIBXML2_CONFIG)" >&5
++$as_echo "yes, user supplied xml2-config ($LIBXML2_CONFIG)" >&6; }
+     else
+-      { { echo "$as_me:$LINENO: error: '$LIBXML2_CONFIG' is not an executable.  Make sure you use --with-xml2-config=/path/to/xml2-config" >&5
+-echo "$as_me: error: '$LIBXML2_CONFIG' is not an executable.  Make sure you use --with-xml2-config=/path/to/xml2-config" >&2;}
+-   { (exit 1); exit 1; }; }
++      as_fn_error $? "'$LIBXML2_CONFIG' is not an executable.  Make sure you use --with-xml2-config=/path/to/xml2-config" "$LINENO" 5
+     fi
+   else
+     # Extract the first word of "xml2-config", so it can be a program name with args.
+ set dummy xml2-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_LIBXML2_CONFIG+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if ${ac_cv_path_LIBXML2_CONFIG+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   case $LIBXML2_CONFIG in
+   [\\/]* | ?:[\\/]*)
+@@ -12691,41 +9291,40 @@
+ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+-  for ac_exec_ext in '' $ac_executable_extensions; do
+-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_path_LIBXML2_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+   fi
+ done
+-done
++  done
++IFS=$as_save_IFS
+ 
+   test -z "$ac_cv_path_LIBXML2_CONFIG" && ac_cv_path_LIBXML2_CONFIG="no"
+   ;;
+ esac
+ fi
+ LIBXML2_CONFIG=$ac_cv_path_LIBXML2_CONFIG
+-
+ if test -n "$LIBXML2_CONFIG"; then
+-  echo "$as_me:$LINENO: result: $LIBXML2_CONFIG" >&5
+-echo "${ECHO_T}$LIBXML2_CONFIG" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXML2_CONFIG" >&5
++$as_echo "$LIBXML2_CONFIG" >&6; }
+ else
+-  echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+ fi
+ 
++
+   fi
+ 
+   if test "$LIBXML2_CONFIG" = "no" ; then
+-   { { echo "$as_me:$LINENO: error: couldn't find xml2-config, try using --with-xml2-config=PATH" >&5
+-echo "$as_me: error: couldn't find xml2-config, try using --with-xml2-config=PATH" >&2;}
+-   { (exit 1); exit 1; }; }
++   as_fn_error $? "couldn't find xml2-config, try using --with-xml2-config=PATH" "$LINENO" 5
+   fi
+ 
+   XML2_VER=`$LIBXML2_CONFIG --version`
+ 
+-  echo "$as_me:$LINENO: result:         found libxml2 version $XML2_VER" >&5
+-echo "${ECHO_T}        found libxml2 version $XML2_VER" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result:         found libxml2 version $XML2_VER" >&5
++$as_echo "        found libxml2 version $XML2_VER" >&6; }
+ 
+   XML2_INC=`$LIBXML2_CONFIG --cflags`
+   XML2_LIB=`$LIBXML2_CONFIG --libs`
+@@ -12760,44 +9359,44 @@
+ 
+ 
+ 
+-# Check whether --with-xml-mapfile or --without-xml-mapfile was given.
+-if test "${with_xml_mapfile+set}" = set; then
+-  withval="$with_xml_mapfile"
+-  XMLMAPFILE_REQUESTED=""
+-fi;
++# Check whether --with-xml-mapfile was given.
++if test "${with_xml_mapfile+set}" = set; then :
++  withval=$with_xml_mapfile; XMLMAPFILE_REQUESTED=""
++fi
++
+ 
+-echo "$as_me:$LINENO: checking if xml-mapfile is requested" >&5
+-echo $ECHO_N "checking if xml-mapfile is requested... $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if xml-mapfile is requested" >&5
++$as_echo_n "checking if xml-mapfile is requested... " >&6; }
+ XMLMAPFILE_ENABLED=""
+ 
+ if test "$with_xml_mapfile" = "yes"; then
+   XMLMAPFILE_ENABLED="-DUSE_XMLMAPFILE"
+-  echo "$as_me:$LINENO: result: yes.. xslt and exslt support needed" >&5
+-echo "${ECHO_T}yes.. xslt and exslt support needed" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes.. xslt and exslt support needed" >&5
++$as_echo "yes.. xslt and exslt support needed" >&6; }
+ else
+-  echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+ fi
+ 
+ ALL_ENABLED="$XMLMAPFILE_ENABLED $ALL_ENABLED"
+ 
+ 
+ 
+-# Check whether --with-xslt or --without-xslt was given.
+-if test "${with_xslt+set}" = set; then
+-  withval="$with_xslt"
+-  XSLT_DIR=$withval
++# Check whether --with-xslt was given.
++if test "${with_xslt+set}" = set; then :
++  withval=$with_xslt; XSLT_DIR=$withval
+ else
+   XSLT_DIR=''
+-fi;
++fi
+ 
+-echo "$as_me:$LINENO: checking if xslt is requested" >&5
+-echo $ECHO_N "checking if xslt is requested... $ECHO_C" >&6
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if xslt is requested" >&5
++$as_echo_n "checking if xslt is requested... " >&6; }
+ XSLT_LIB=''
+ 
+ if test -z "$XMLMAPFILE_ENABLED" -a \( "$with_xslt" = "no" -o "$with_xslt" = ""  \); then
+-  echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+ else
+ 
+   if test "$XSLT_DIR" = "yes" -o "$XSLT_DIR" = ""; then
+@@ -12812,8 +9411,8 @@
+                 XSLT_ENABLED="-DUSE_XSLT"
+     XSLT_INC="-I$XSLT_INCDIR"
+     XSLT_LIB="-L$XSLT_LIBDIR -lxslt"
+-    echo "$as_me:$LINENO: result: using xslt from $XSLT_LIB ($XSLT_ENABLED)" >&5
+-echo "${ECHO_T}using xslt from $XSLT_LIB ($XSLT_ENABLED)" >&6
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result: using xslt from $XSLT_LIB ($XSLT_ENABLED)" >&5
++$as_echo "using xslt from $XSLT_LIB ($XSLT_ENABLED)" >&6; }
+ 
+   if test ""$XSLT_DIR"" != "/usr/lib"; then
+ 
+@@ -12838,9 +9437,7 @@
+ 
+ 
+   else
+-    { { echo "$as_me:$LINENO: error: '$XSLT_DIR' not a valid installation path of xslt." >&5
+-echo "$as_me: error: '$XSLT_DIR' not a valid installation path of xslt." >&2;}
+-   { (exit 1); exit 1; }; }
++    as_fn_error $? "'$XSLT_DIR' not a valid installation path of xslt." "$LINENO" 5
+   fi
+ fi
+ 
+@@ -12857,21 +9454,21 @@
+ 
+ 
+ 
+-# Check whether --with-exslt or --without-exslt was given.
+-if test "${with_exslt+set}" = set; then
+-  withval="$with_exslt"
+-  EXSLT_DIR=$withval
++# Check whether --with-exslt was given.
++if test "${with_exslt+set}" = set; then :
++  withval=$with_exslt; EXSLT_DIR=$withval
+ else
+   EXSLT_DIR=''
+-fi;
++fi
+ 
+-echo "$as_me:$LINENO: checking if exslt is requested" >&5
+-echo $ECHO_N "checking if exslt is requested... $ECHO_C" >&6
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if exslt is requested" >&5
++$as_echo_n "checking if exslt is requested... " >&6; }
+ EXSLT_LIB=''
+ 
+ if test -z "$XMLMAPFILE_ENABLED" -a \( "$with_exslt" = "no" -o "$with_exslt" = ""  \); then
+-  echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+ else
+ 
+   if test "$EXSLT_DIR" = "yes" -o "$EXSLT_DIR" = ""; then
+@@ -12886,8 +9483,8 @@
+                 EXSLT_ENABLED="-DUSE_EXSLT"
+     EXSLT_INC="-I$EXSLT_INCDIR"
+     EXSLT_LIB="-L$EXSLT_LIBDIR -lexslt"
+-    echo "$as_me:$LINENO: result: using exslt from $EXSLT_LIB ($EXSLT_ENABLED)" >&5
+-echo "${ECHO_T}using exslt from $EXSLT_LIB ($EXSLT_ENABLED)" >&6
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result: using exslt from $EXSLT_LIB ($EXSLT_ENABLED)" >&5
++$as_echo "using exslt from $EXSLT_LIB ($EXSLT_ENABLED)" >&6; }
+ 
+   if test ""$EXSLT_DIR"" != "/usr/lib"; then
+ 
+@@ -12911,9 +9508,7 @@
+   fi
+ 
+   else
+-    { { echo "$as_me:$LINENO: error: '$EXSLT_DIR' not a valid installation path of exslt." >&5
+-echo "$as_me: error: '$EXSLT_DIR' not a valid installation path of exslt." >&2;}
+-   { (exit 1); exit 1; }; }
++    as_fn_error $? "'$EXSLT_DIR' not a valid installation path of exslt." "$LINENO" 5
+   fi
+ fi
+ 
+@@ -12930,30 +9525,30 @@
+ 
+ 
+ 
+-echo "$as_me:$LINENO: checking if FriBidi support requested" >&5
+-echo $ECHO_N "checking if FriBidi support requested... $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if FriBidi support requested" >&5
++$as_echo_n "checking if FriBidi support requested... " >&6; }
+ 
+ 
+-# Check whether --with-fribidi-config or --without-fribidi-config was given.
+-if test "${with_fribidi_config+set}" = set; then
+-  withval="$with_fribidi_config"
++# Check whether --with-fribidi-config was given.
++if test "${with_fribidi_config+set}" = set; then :
++  withval=$with_fribidi_config;
++fi
+ 
+-fi;
+ 
+ if test "$with_fribidi_config" = "no" -o "$with_fribidi_config" = "" ; then
+-  echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+   FRIBIDI_CONFIG="no"
+ 
+ elif test "$with_fribidi_config" = "yes" ; then
+-  echo "$as_me:$LINENO: result: yes" >&5
+-echo "${ECHO_T}yes" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
+   # Extract the first word of "fribidi-config", so it can be a program name with args.
+ set dummy fribidi-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_FRIBIDI_CONFIG+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if ${ac_cv_path_FRIBIDI_CONFIG+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   case $FRIBIDI_CONFIG in
+   [\\/]* | ?:[\\/]*)
+@@ -12965,42 +9560,43 @@
+ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+-  for ac_exec_ext in '' $ac_executable_extensions; do
+-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_path_FRIBIDI_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+   fi
+ done
+-done
++  done
++IFS=$as_save_IFS
+ 
+   test -z "$ac_cv_path_FRIBIDI_CONFIG" && ac_cv_path_FRIBIDI_CONFIG="no"
+   ;;
+ esac
+ fi
+ FRIBIDI_CONFIG=$ac_cv_path_FRIBIDI_CONFIG
+-
+ if test -n "$FRIBIDI_CONFIG"; then
+-  echo "$as_me:$LINENO: result: $FRIBIDI_CONFIG" >&5
+-echo "${ECHO_T}$FRIBIDI_CONFIG" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FRIBIDI_CONFIG" >&5
++$as_echo "$FRIBIDI_CONFIG" >&6; }
+ else
+-  echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+ fi
+ 
++
+   FRIBIDI_PKG_CONFIG="no"
+   if test "$FRIBIDI_CONFIG" = "no" -a "$PKG_CONFIG" != "no" ; then
+-     echo "$as_me:$LINENO: checking for fribidi pkg-config path" >&5
+-echo $ECHO_N "checking for fribidi pkg-config path... $ECHO_C" >&6
++     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fribidi pkg-config path" >&5
++$as_echo_n "checking for fribidi pkg-config path... " >&6; }
+      `$PKG_CONFIG --silence-errors --libs fribidi >> /dev/null`
+      if test $? -eq 0 ; then
+-        echo "$as_me:$LINENO: result: yes" >&5
+-echo "${ECHO_T}yes" >&6
++        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
+         FRIBIDI_PKG_CONFIG="yes"
+         FRIBIDI_CONFIG="fribidi"
+      else
+-       echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
++       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+      fi
+   fi
+ else
+@@ -13013,19 +9609,17 @@
+   FRIBIDI_LIB=
+ else
+   if test "$FRIBIDI_PKG_CONFIG" = "yes" -o ${FRIBIDI_CONFIG: -3} = ".pc" ; then
+-     echo "$as_me:$LINENO: result: yes, user supplied path to fribidi.pc" >&5
+-echo "${ECHO_T}yes, user supplied path to fribidi.pc" >&6
++     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, user supplied path to fribidi.pc" >&5
++$as_echo "yes, user supplied path to fribidi.pc" >&6; }
+      FRIBIDI_ENABLED="-DUSE_FRIBIDI -DUSE_FRIBIDI2"
+      FRIBIDI_LIB=`$PKG_CONFIG --libs $FRIBIDI_CONFIG`
+      FRIBIDI_INC=`$PKG_CONFIG --cflags $FRIBIDI_CONFIG`
+   else
+      if test -f "$FRIBIDI_CONFIG" -a -x "$FRIBIDI_CONFIG" ; then
+-       echo "$as_me:$LINENO: result: yes, user supplied fribidi-config ($FRIBIDI_CONFIG)" >&5
+-echo "${ECHO_T}yes, user supplied fribidi-config ($FRIBIDI_CONFIG)" >&6
++       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, user supplied fribidi-config ($FRIBIDI_CONFIG)" >&5
++$as_echo "yes, user supplied fribidi-config ($FRIBIDI_CONFIG)" >&6; }
+      else
+-       { { echo "$as_me:$LINENO: error: '$FRIBIDI_CONFIG' is not an executable.  Make sure you use --with-fribidi-config=/path/to/fribidi-config or fribidi.pc" >&5
+-echo "$as_me: error: '$FRIBIDI_CONFIG' is not an executable.  Make sure you use --with-fribidi-config=/path/to/fribidi-config or fribidi.pc" >&2;}
+-   { (exit 1); exit 1; }; }
++       as_fn_error $? "'$FRIBIDI_CONFIG' is not an executable.  Make sure you use --with-fribidi-config=/path/to/fribidi-config or fribidi.pc" "$LINENO" 5
+      fi
+      FRIBIDI_ENABLED=-DUSE_FRIBIDI
+      FRIBIDI_LIB=`$FRIBIDI_CONFIG --libs`
+@@ -13046,41 +9640,37 @@
+ 
+ 
+ 
+-echo "$as_me:$LINENO: checking if Cairo support requested" >&5
+-echo $ECHO_N "checking if Cairo support requested... $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if Cairo support requested" >&5
++$as_echo_n "checking if Cairo support requested... " >&6; }
+ 
+ 
+-# Check whether --with-cairo or --without-cairo was given.
+-if test "${with_cairo+set}" = set; then
+-  withval="$with_cairo"
++# Check whether --with-cairo was given.
++if test "${with_cairo+set}" = set; then :
++  withval=$with_cairo;
++fi
+ 
+-fi;
+ 
+ if test "$with_cairo" = "no" -o "$with_cairo" = "" ; then
+-  echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+   CAIRO_CONFIG="no"
+ 
+ elif test "$with_cairo" = "yes" ; then
+-  echo "$as_me:$LINENO: result: yes" >&5
+-echo "${ECHO_T}yes" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
+   if test "$PKG_CONFIG" != "no" ; then
+-     echo "$as_me:$LINENO: checking for cairo pkg-config path" >&5
+-echo $ECHO_N "checking for cairo pkg-config path... $ECHO_C" >&6
++     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cairo pkg-config path" >&5
++$as_echo_n "checking for cairo pkg-config path... " >&6; }
+      `$PKG_CONFIG --silence-errors -- cairo cairo-ft cairo-svg cairo-pdf cairo-png >> /dev/null`
+      if test $? -eq 0 ; then
+-        echo "$as_me:$LINENO: result: yes" >&5
+-echo "${ECHO_T}yes" >&6
++        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
+         CAIRO_CONFIG="cairo cairo-ft cairo-svg cairo-pdf cairo-png"
+      else
+-       { { echo "$as_me:$LINENO: error: cairo support requested, but not found.Try installing the cairo development headers" >&5
+-echo "$as_me: error: cairo support requested, but not found.Try installing the cairo development headers" >&2;}
+-   { (exit 1); exit 1; }; }
++       as_fn_error $? "cairo support requested, but not found.Try installing the cairo development headers" "$LINENO" 5
+      fi
+   else
+-    { { echo "$as_me:$LINENO: error: pkg-config required for cairo support, try using --with-pkg-config=PATH" >&5
+-echo "$as_me: error: pkg-config required for cairo support, try using --with-pkg-config=PATH" >&2;}
+-   { (exit 1); exit 1; }; }
++    as_fn_error $? "pkg-config required for cairo support, try using --with-pkg-config=PATH" "$LINENO" 5
+   fi
+ else
+   CAIRO_CONFIG=$with_cairo_config
+@@ -13091,8 +9681,8 @@
+   CAIRO_INC=
+   CAIRO_LIB=
+ else
+-  echo "$as_me:$LINENO: result: yes, pkg-config defaults, or user supplied path to cairo.pc" >&5
+-echo "${ECHO_T}yes, pkg-config defaults, or user supplied path to cairo.pc" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, pkg-config defaults, or user supplied path to cairo.pc" >&5
++$as_echo "yes, pkg-config defaults, or user supplied path to cairo.pc" >&6; }
+   CAIRO_ENABLED="-DUSE_CAIRO"
+   CAIRO_LIB=`$PKG_CONFIG --libs $CAIRO_CONFIG`
+   CAIRO_INC=`$PKG_CONFIG --cflags $CAIRO_CONFIG`
+@@ -13110,24 +9700,24 @@
+ ALL_LIB="$CAIRO_LIB $ALL_LIB"
+ 
+ 
+-echo "$as_me:$LINENO: checking FastCGI support" >&5
+-echo $ECHO_N "checking FastCGI support... $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking FastCGI support" >&5
++$as_echo_n "checking FastCGI support... " >&6; }
+ 
+-# Check whether --with-fastcgi or --without-fastcgi was given.
+-if test "${with_fastcgi+set}" = set; then
+-  withval="$with_fastcgi"
++# Check whether --with-fastcgi was given.
++if test "${with_fastcgi+set}" = set; then :
++  withval=$with_fastcgi;
++fi
+ 
+-fi;
+ 
+ if test "$with_fastcgi" = "no" -o "$with_fastcgi" = "" ; then
+ 
+-  echo "$as_me:$LINENO: result: not requested." >&5
+-echo "${ECHO_T}not requested." >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: not requested." >&5
++$as_echo "not requested." >&6; }
+ 
+ else
+ 
+-  echo "$as_me:$LINENO: result: requested." >&5
+-echo "${ECHO_T}requested." >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: requested." >&5
++$as_echo "requested." >&6; }
+ 
+   if test "$with_fastcgi" = "yes" ; then
+     FASTCGI_INC=""
+@@ -13137,79 +9727,49 @@
+     FASTCGI_LIB="-L$with_fastcgi/lib -lfcgi"
+   fi
+ 
+-  echo "$as_me:$LINENO: checking for FCGI_Accept in -lfcgi" >&5
+-echo $ECHO_N "checking for FCGI_Accept in -lfcgi... $ECHO_C" >&6
+-if test "${ac_cv_lib_fcgi_FCGI_Accept+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FCGI_Accept in -lfcgi" >&5
++$as_echo_n "checking for FCGI_Accept in -lfcgi... " >&6; }
++if ${ac_cv_lib_fcgi_FCGI_Accept+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lfcgi $FASTCGI_LIB $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+-/* Override any gcc2 internal prototype to avoid an error.  */
++/* 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
+-/* We use char because int might match the return type of a gcc2
+-   builtin and then its argument prototype would still apply.  */
+ char FCGI_Accept ();
+ int
+ main ()
+ {
+-FCGI_Accept ();
++return FCGI_Accept ();
+   ;
+   return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
++if ac_fn_c_try_link "$LINENO"; then :
+   ac_cv_lib_fcgi_FCGI_Accept=yes
+ else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-ac_cv_lib_fcgi_FCGI_Accept=no
++  ac_cv_lib_fcgi_FCGI_Accept=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
+-      conftest$ac_exeext conftest.$ac_ext
++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_fcgi_FCGI_Accept" >&5
+-echo "${ECHO_T}$ac_cv_lib_fcgi_FCGI_Accept" >&6
+-if test $ac_cv_lib_fcgi_FCGI_Accept = yes; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcgi_FCGI_Accept" >&5
++$as_echo "$ac_cv_lib_fcgi_FCGI_Accept" >&6; }
++if test "x$ac_cv_lib_fcgi_FCGI_Accept" = xyes; then :
+   FASTCGI_ENABLED=-DUSE_FASTCGI
+ fi
+ 
+ 
+   if test "x$FASTCGI_ENABLED" = "x" ; then
+-    { { echo "$as_me:$LINENO: error: Unable to link against $FASTCGI_LIB" >&5
+-echo "$as_me: error: Unable to link against $FASTCGI_LIB" >&2;}
+-   { (exit 1); exit 1; }; }
++    as_fn_error $? "Unable to link against $FASTCGI_LIB" "$LINENO" 5
+   fi
+ 
+ fi
+@@ -13226,25 +9786,23 @@
+ ALL_LIB="$FASTCGI_LIB $ALL_LIB"
+ 
+ 
+-{ echo "$as_me:$LINENO: checking HTTPD server (Apache) version..." >&5
+-echo "$as_me: checking HTTPD server (Apache) version..." >&6;}
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking HTTPD server (Apache) version..." >&5
++$as_echo "$as_me: checking HTTPD server (Apache) version..." >&6;}
+ 
+-# Check whether --with-httpd or --without-httpd was given.
+-if test "${with_httpd+set}" = set; then
+-  withval="$with_httpd"
++# Check whether --with-httpd was given.
++if test "${with_httpd+set}" = set; then :
++  withval=$with_httpd;
++fi
+ 
+-fi;
+ 
+ 
+ if test "$with_httpd" = "no" ; then
+ 
+-  echo "$as_me:$LINENO: result:         HTTPD server (Apache) version detection disabled by --without-httpd." >&5
+-echo "${ECHO_T}        HTTPD server (Apache) version detection disabled by --without-httpd." >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result:         HTTPD server (Apache) version detection disabled by --without-httpd." >&5
++$as_echo "        HTTPD server (Apache) version detection disabled by --without-httpd." >&6; }
+ 
+ elif test "$with_httpd" = "yes" ; then
+-  { { echo "$as_me:$LINENO: error: full path to httpd executable is required as argument when using --with-httpd" >&5
+-echo "$as_me: error: full path to httpd executable is required as argument when using --with-httpd" >&2;}
+-   { (exit 1); exit 1; }; }
++  as_fn_error $? "full path to httpd executable is required as argument when using --with-httpd" "$LINENO" 5
+ 
+ else
+ 
+@@ -13252,20 +9810,18 @@
+                 HTTPD="$with_httpd"
+ 
+     if test -f "$HTTPD" -a -x "$HTTPD" ; then
+-      echo "$as_me:$LINENO: result:         using user-supplied httpd ($HTTPD)" >&5
+-echo "${ECHO_T}        using user-supplied httpd ($HTTPD)" >&6
++      { $as_echo "$as_me:${as_lineno-$LINENO}: result:         using user-supplied httpd ($HTTPD)" >&5
++$as_echo "        using user-supplied httpd ($HTTPD)" >&6; }
+     else
+-      { { echo "$as_me:$LINENO: error: $HTTPD is not an executable.  Make sure you use --with-httpd=/path/to/httpd" >&5
+-echo "$as_me: error: $HTTPD is not an executable.  Make sure you use --with-httpd=/path/to/httpd" >&2;}
+-   { (exit 1); exit 1; }; }
++      as_fn_error $? "$HTTPD is not an executable.  Make sure you use --with-httpd=/path/to/httpd" "$LINENO" 5
+     fi
+   else
+                 # Extract the first word of "httpd", so it can be a program name with args.
+ set dummy httpd; 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_HTTPD+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if ${ac_cv_path_HTTPD+:} false; then :
++  $as_echo_n "(cached) " >&6
+ else
+   case $HTTPD in
+   [\\/]* | ?:[\\/]*)
+@@ -13278,45 +9834,46 @@
+ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+-  for ac_exec_ext in '' $ac_executable_extensions; do
+-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+     ac_cv_path_HTTPD="$as_dir/$ac_word$ac_exec_ext"
+-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+   fi
+ done
+-done
++  done
++IFS=$as_save_IFS
+ 
+   test -z "$ac_cv_path_HTTPD" && ac_cv_path_HTTPD=""""
+   ;;
+ esac
+ fi
+ HTTPD=$ac_cv_path_HTTPD
+-
+ if test -n "$HTTPD"; then
+-  echo "$as_me:$LINENO: result: $HTTPD" >&5
+-echo "${ECHO_T}$HTTPD" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HTTPD" >&5
++$as_echo "$HTTPD" >&6; }
+ else
+-  echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+ fi
+ 
++
+   fi
+ 
+   if test -z "$HTTPD" ; then
+-    echo "$as_me:$LINENO: result:         'httpd' not found, skipping Apache version detection. You may want to use --with-httpd=/path/to/httpd" >&5
+-echo "${ECHO_T}        'httpd' not found, skipping Apache version detection. You may want to use --with-httpd=/path/to/httpd" >&6
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result:         'httpd' not found, skipping Apache version detection. You may want to use --with-httpd=/path/to/httpd" >&5
++$as_echo "        'httpd' not found, skipping Apache version detection. You may want to use --with-httpd=/path/to/httpd" >&6; }
+   else
+     HTTPD_VERSION_STRING=`$HTTPD -v | grep "Server version" | awk '{print $3}'`
+         APACHE_VERSION=`echo "$HTTPD_VERSION_STRING" | grep Apache | awk -F / '{print $2}' | awk -F . '{print $1*1000000 + $2*1000 + $3}'`
+ 
+-    echo "$as_me:$LINENO: result:         $HTTPD version is $HTTPD_VERSION_STRING ($APACHE_VERSION)." >&5
+-echo "${ECHO_T}        $HTTPD version is $HTTPD_VERSION_STRING ($APACHE_VERSION)." >&6
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result:         $HTTPD version is $HTTPD_VERSION_STRING ($APACHE_VERSION)." >&5
++$as_echo "        $HTTPD version is $HTTPD_VERSION_STRING ($APACHE_VERSION)." >&6; }
+ 
+ 
+         if test -n "$APACHE_VERSION" -a `expr "$APACHE_VERSION" \>= "2000000"` = 1 -a `expr "$APACHE_VERSION" \< "2000049"` = 1 ; then
+-      echo "$as_me:$LINENO: result:         Your system is apparently running $HTTPD_VERSION_STRING.  Setting stderr to non-blocking for msDebug() due to Apache 2.0.0-2.0.48 bug (see MapServer bug 458 or Apache bug 22030)." >&5
+-echo "${ECHO_T}        Your system is apparently running $HTTPD_VERSION_STRING.  Setting stderr to non-blocking for msDebug() due to Apache 2.0.0-2.0.48 bug (see MapServer bug 458 or Apache bug 22030)." >&6
++      { $as_echo "$as_me:${as_lineno-$LINENO}: result:         Your system is apparently running $HTTPD_VERSION_STRING.  Setting stderr to non-blocking for msDebug() due to Apache 2.0.0-2.0.48 bug (see MapServer bug 458 or Apache bug 22030)." >&5
++$as_echo "        Your system is apparently running $HTTPD_VERSION_STRING.  Setting stderr to non-blocking for msDebug() due to Apache 2.0.0-2.0.48 bug (see MapServer bug 458 or Apache bug 22030)." >&6; }
+       DEBUG_FLAGS="${DEBUG_FLAGS} -DNEED_NONBLOCKING_STDERR"
+     fi
+ 
+@@ -13357,33 +9914,33 @@
+ 
+ 
+ 
+-# Check whether --enable-ignore-missing-data or --disable-ignore-missing-data was given.
+-if test "${enable_ignore_missing_data+set}" = set; then
+-  enableval="$enable_ignore_missing_data"
++# Check whether --enable-ignore-missing-data was given.
++if test "${enable_ignore_missing_data+set}" = set; then :
++  enableval=$enable_ignore_missing_data;
++fi
+ 
+-fi;
+ if test "$enable_ignore_missing_data" = "yes" ; then
+ 
+   IGNORE_MISSING_DATA="-DIGNORE_MISSING_DATA"
+ 
+-  echo "$as_me:$LINENO: result: Compiling with -DIGNORE_MISSING_DATA." >&5
+-echo "${ECHO_T}Compiling with -DIGNORE_MISSING_DATA." >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: Compiling with -DIGNORE_MISSING_DATA." >&5
++$as_echo "Compiling with -DIGNORE_MISSING_DATA." >&6; }
+ fi
+ IGNORE_MISSING_DATA=$IGNORE_MISSING_DATA
+ 
+ 
+ 
+-# Check whether --enable-point-z-m or --disable-point-z-m was given.
+-if test "${enable_point_z_m+set}" = set; then
+-  enableval="$enable_point_z_m"
++# Check whether --enable-point-z-m was given.
++if test "${enable_point_z_m+set}" = set; then :
++  enableval=$enable_point_z_m;
++fi
+ 
+-fi;
+ if test "$enable_point_z_m" = "yes" ; then
+ 
+   USE_POINT_Z_M="-DUSE_POINT_Z_M"
+ 
+-  echo "$as_me:$LINENO: result: Compiling with -DUSE_POINT_Z_M." >&5
+-echo "${ECHO_T}Compiling with -DUSE_POINT_Z_M." >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: Compiling with -DUSE_POINT_Z_M." >&5
++$as_echo "Compiling with -DUSE_POINT_Z_M." >&6; }
+ fi
+ USE_POINT_Z_M=$USE_POINT_Z_M
+ 
+@@ -13391,98 +9948,98 @@
+ 
+ 
+ 
+-# Check whether --enable-point-z-m or --disable-point-z-m was given.
+-if test "${enable_point_z_m+set}" = set; then
+-  enableval="$enable_point_z_m"
++# Check whether --enable-point-z-m was given.
++if test "${enable_point_z_m+set}" = set; then :
++  enableval=$enable_point_z_m;
++fi
+ 
+-fi;
+ 
+ if test "$enable_fast_nint" = "no" ; then
+ 
+   USE_NINT="-DUSE_GENERIC_MS_NINT"
+ 
+-  echo "$as_me:$LINENO: result: Compiling with safe MS_NINT" >&5
+-echo "${ECHO_T}Compiling with safe MS_NINT" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: Compiling with safe MS_NINT" >&5
++$as_echo "Compiling with safe MS_NINT" >&6; }
+ else
+   USE_NINT=""
+ 
+-  echo "$as_me:$LINENO: result: Compiling with fast MS_NINT" >&5
+-echo "${ECHO_T}Compiling with fast MS_NINT" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: Compiling with fast MS_NINT" >&5
++$as_echo "Compiling with fast MS_NINT" >&6; }
+ fi
+ USE_NINT=$USE_NINT
+ 
+ ALL_ENABLED="$USE_NINT $ALL_ENABLED"
+ 
+ 
+-echo "$as_me:$LINENO: checking compiler warnings" >&5
+-echo $ECHO_N "checking compiler warnings... $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warnings" >&5
++$as_echo_n "checking compiler warnings... " >&6; }
+ 
+ 
+-# Check whether --with-warnings or --without-warnings was given.
+-if test "${with_warnings+set}" = set; then
+-  withval="$with_warnings"
++# Check whether --with-warnings was given.
++if test "${with_warnings+set}" = set; then :
++  withval=$with_warnings;
++fi
+ 
+-fi;
+ 
+ if test "$with_warnings" = "yes" ; then
+   if test "$GCC" = "yes" ; then
+     WFLAGS="-W -Wall -Wcast-align -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith -Wreturn-type"
+     C_EXTRA_WFLAGS="-Wmissing-declarations"
+ 
+-    echo "$as_me:$LINENO: result: strict" >&5
+-echo "${ECHO_T}strict" >&6
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result: strict" >&5
++$as_echo "strict" >&6; }
+   else
+     WFLAGS=""
+     C_EXTRA_WFLAGS=""
+-    echo "$as_me:$LINENO: result: disabled" >&5
+-echo "${ECHO_T}disabled" >&6
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
++$as_echo "disabled" >&6; }
+   fi
+ 
+ elif test "$with_warnings" = "" ; then
+   if test "$GCC" = "yes" ; then
+     WFLAGS="-Wall"
+     C_EXTRA_WFLAGS=""
+-    echo "$as_me:$LINENO: result: basic" >&5
+-echo "${ECHO_T}basic" >&6
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result: basic" >&5
++$as_echo "basic" >&6; }
+   else
+     WFLAGS=""
+     C_EXTRA_WFLAGS=""
+-    echo "$as_me:$LINENO: result: disabled" >&5
+-echo "${ECHO_T}disabled" >&6
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
++$as_echo "disabled" >&6; }
+   fi
+ 
+ elif test "$with_warnings" = "no" ; then
+   WFLAGS=""
+   C_EXTRA_WFLAGS=""
+-  echo "$as_me:$LINENO: result: disabled" >&5
+-echo "${ECHO_T}disabled" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
++$as_echo "disabled" >&6; }
+ 
+ else
+   WFLAGS="$with_warnings"
+   C_EXTRA_WFLAGS=""
+-  echo "$as_me:$LINENO: result: user defined" >&5
+-echo "${ECHO_T}user defined" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: user defined" >&5
++$as_echo "user defined" >&6; }
+ fi
+ 
+ CFLAGS="$CFLAGS $WFLAGS $C_EXTRA_WFLAGS"
+ CXXFLAGS="$CXXFLAGS $WFLAGS "
+ 
+ 
+-{ echo "$as_me:$LINENO: checking whether we should enable debug features..." >&5
+-echo "$as_me: checking whether we should enable debug features..." >&6;}
+-# Check whether --enable-debug or --disable-debug was given.
+-if test "${enable_debug+set}" = set; then
+-  enableval="$enable_debug"
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we should enable debug features..." >&5
++$as_echo "$as_me: checking whether we should enable debug features..." >&6;}
++# Check whether --enable-debug was given.
++if test "${enable_debug+set}" = set; then :
++  enableval=$enable_debug;
++fi
+ 
+-fi;
+ 
+ if test "$enable_debug" = "yes" ; then
+     CXXFLAGS=`echo "$CXXFLAGS " | sed 's/-O[123] / /'`
+   CFLAGS=`echo "$CFLAGS " | sed 's/-O[123] / /'`
+ 
+   REPORT_ENABLE_DEBUG="-g "
+-  echo "$as_me:$LINENO: result:         Enabling debug features: -g in CFLAGS." >&5
+-echo "${ECHO_T}        Enabling debug features: -g in CFLAGS." >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result:         Enabling debug features: -g in CFLAGS." >&5
++$as_echo "        Enabling debug features: -g in CFLAGS." >&6; }
+ 
+ else
+   CXXFLAGS=`echo "$CXXFLAGS -DNDEBUG " | sed "s/-g //"`
+@@ -13490,18 +10047,18 @@
+ fi
+ 
+ 
+-{ echo "$as_me:$LINENO: checking whether we should enable mapserv CGI command-line debug arguments..." >&5
+-echo "$as_me: checking whether we should enable mapserv CGI command-line debug arguments..." >&6;}
+-# Check whether --enable-cgi-cl-debug-args or --disable-cgi-cl-debug-args was given.
+-if test "${enable_cgi_cl_debug_args+set}" = set; then
+-  enableval="$enable_cgi_cl_debug_args"
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we should enable mapserv CGI command-line debug arguments..." >&5
++$as_echo "$as_me: checking whether we should enable mapserv CGI command-line debug arguments..." >&6;}
++# Check whether --enable-cgi-cl-debug-args was given.
++if test "${enable_cgi_cl_debug_args+set}" = set; then :
++  enableval=$enable_cgi_cl_debug_args;
++fi
+ 
+-fi;
+ 
+ if test "$enable_cgi_cl_debug_args" = "yes" ; then
+   DEBUG_FLAGS="$DEBUG_FLAGS -DMS_ENABLE_CGI_CL_DEBUG_ARGS"
+-  echo "$as_me:$LINENO: result:         Enabling (potentially insecure) mapserv CGI command-line debug arguments: -DMS_ENABLE_CGI_CL_DEBUG_ARGS." >&5
+-echo "${ECHO_T}        Enabling (potentially insecure) mapserv CGI command-line debug arguments: -DMS_ENABLE_CGI_CL_DEBUG_ARGS." >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result:         Enabling (potentially insecure) mapserv CGI command-line debug arguments: -DMS_ENABLE_CGI_CL_DEBUG_ARGS." >&5
++$as_echo "        Enabling (potentially insecure) mapserv CGI command-line debug arguments: -DMS_ENABLE_CGI_CL_DEBUG_ARGS." >&6; }
+ fi
+ 
+ DEBUG_FLAGS=$DEBUG_FLAGS
+@@ -13510,29 +10067,29 @@
+ 
+ 
+ 
+-# Check whether --enable-gcov or --disable-gcov was given.
+-if test "${enable_gcov+set}" = set; then
+-  enableval="$enable_gcov"
+-  CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
++# Check whether --enable-gcov was given.
++if test "${enable_gcov+set}" = set; then :
++  enableval=$enable_gcov; CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
+  PHP_LD_XTRAFLAGS="$PHP_LD_XTRAFLAGS -fprofile-arcs -ftest-coverage"
+-fi;
++fi
+ 
+ 
+ 
+-{ echo "$as_me:$LINENO: checking for PHP/MapScript module options..." >&5
+-echo "$as_me: checking for PHP/MapScript module options..." >&6;}
+ 
+-# Check whether --with-php or --without-php was given.
+-if test "${with_php+set}" = set; then
+-  withval="$with_php"
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PHP/MapScript module options..." >&5
++$as_echo "$as_me: checking for PHP/MapScript module options..." >&6;}
++
++# Check whether --with-php was given.
++if test "${with_php+set}" = set; then :
++  withval=$with_php;
++fi
+ 
+-fi;
+ 
+-# Check whether --enable-internal-ld-detect or --disable-internal-ld-detect was given.
+-if test "${enable_internal_ld_detect+set}" = set; then
+-  enableval="$enable_internal_ld_detect"
++# Check whether --enable-internal-ld-detect was given.
++if test "${enable_internal_ld_detect+set}" = set; then :
++  enableval=$enable_internal_ld_detect;
++fi
+ 
+-fi;
+ 
+ if test -n "$with_php" -a -d "$with_php" ; then
+ 
+@@ -13544,14 +10101,14 @@
+ 
+ 
+   if test "$enable_perlv_ld_detect" = "yes" ; then
+-      echo "$as_me:$LINENO: result: Using perl -V macro to figure ld command to link php_mapscript.so" >&5
+-echo "${ECHO_T}Using perl -V macro to figure ld command to link php_mapscript.so" >&6
++      { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using perl -V macro to figure ld command to link php_mapscript.so" >&5
++$as_echo "Using perl -V macro to figure ld command to link php_mapscript.so" >&6; }
+ 
+-      echo "$as_me:$LINENO: checking whether 'perl -V' works" >&5
+-echo $ECHO_N "checking whether 'perl -V' works... $ECHO_C" >&6
++      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether 'perl -V' works" >&5
++$as_echo_n "checking whether 'perl -V' works... " >&6; }
+       if  (perl -V > /dev/null 2>&1)  ; then
+-        echo "$as_me:$LINENO: result: yes" >&5
+-echo "${ECHO_T}yes" >&6
++        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
+ 
+ #
+ # The following is a massive hack.  It tries to steal the
+@@ -13609,11 +10166,9 @@
+         PHP_CC="$PERL_CC"
+         PHP_LD="$PERL_LD $PHP_LD_XTRAFLAGS"
+       else
+-        echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
+-        { { echo "$as_me:$LINENO: error: ERROR: Cannot use --enable-perlv-ld-detect since Perl -V does not work on this system." >&5
+-echo "$as_me: error: ERROR: Cannot use --enable-perlv-ld-detect since Perl -V does not work on this system." >&2;}
+-   { (exit 1); exit 1; }; }
++        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++        as_fn_error $? "ERROR: Cannot use --enable-perlv-ld-detect since Perl -V does not work on this system." "$LINENO" 5
+       fi
+   else
+ 
+@@ -13650,19 +10205,19 @@
+   fi
+ 
+ 
+-# Check whether --with-ld-shared or --without-ld-shared was given.
+-if test "${with_ld_shared+set}" = set; then
+-  withval="$with_ld_shared"
++# Check whether --with-ld-shared was given.
++if test "${with_ld_shared+set}" = set; then :
++  withval=$with_ld_shared;
++fi
+ 
+-fi;
+ 
+       if test "$with_ld_shared" != "" -a "$with_ld_shared" != "yes"; then
+     if test "$with_ld_shared" = "no" ; then
+-      echo "$as_me:$LINENO: result: user disabled shared library support." >&5
+-echo "${ECHO_T}user disabled shared library support." >&6
++      { $as_echo "$as_me:${as_lineno-$LINENO}: result: user disabled shared library support." >&5
++$as_echo "user disabled shared library support." >&6; }
+     else
+-      echo "$as_me:$LINENO: result: using user supplied .so link command ... $with_ld_shared" >&5
+-echo "${ECHO_T}using user supplied .so link command ... $with_ld_shared" >&6
++      { $as_echo "$as_me:${as_lineno-$LINENO}: result: using user supplied .so link command ... $with_ld_shared" >&5
++$as_echo "using user supplied .so link command ... $with_ld_shared" >&6; }
+     fi
+     LD_SHARED="$with_ld_shared"
+   fi
+@@ -13796,82 +10351,69 @@
+     PHP_LD="$PHP_LD_SHARED $PHP_LD_XTRAFLAGS"
+   fi
+ 
+-          echo "$as_me:$LINENO: checking for location of php_config.h" >&5
+-echo $ECHO_N "checking for location of php_config.h... $ECHO_C" >&6
++          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for location of php_config.h" >&5
++$as_echo_n "checking for location of php_config.h... " >&6; }
+     test -f "$PHP_SRC_DIR/main/php_config.h" && test -f "$PHP_SRC_DIR/main/php_version.h"  && PHP_CONFIG_H="$PHP_SRC_DIR/main/php_config.h"
+ 
+     test -f "$PHP_SRC_DIR/include/php/main/php_config.h" && PHP_SRC_DIR="$PHP_SRC_DIR/include/php/" && PHP_CONFIG_H="$PHP_SRC_DIR/main/php_config.h"
+     test -f "$PHP_SRC_DIR/include/php5/main/php_config.h" && PHP_SRC_DIR="$PHP_SRC_DIR/include/php5/" && PHP_CONFIG_H="$PHP_SRC_DIR/main/php_config.h"
+ 
+   if test -n "$PHP_CONFIG_H" ; then
+-    echo "$as_me:$LINENO: result: $PHP_CONFIG_H" >&5
+-echo "${ECHO_T}$PHP_CONFIG_H" >&6
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PHP_CONFIG_H" >&5
++$as_echo "$PHP_CONFIG_H" >&6; }
+   else
+-    { { echo "$as_me:$LINENO: error:
++    as_fn_error $? "
+ !!! Could not find php_config.h and php_version.h in $PHP_SRC_DIR.          !!!
+-!!! Has PHP been configured yet?                                      !!!" >&5
+-echo "$as_me: error:
+-!!! Could not find php_config.h and php_version.h in $PHP_SRC_DIR.          !!!
+-!!! Has PHP been configured yet?                                      !!!" >&2;}
+-   { (exit 1); exit 1; }; }
++!!! Has PHP been configured yet?                                      !!!" "$LINENO" 5
+   fi
+ 
+ 
+-        echo "$as_me:$LINENO: checking if we have PHP 5.2.0+" >&5
+-echo $ECHO_N "checking if we have PHP 5.2.0+... $ECHO_C" >&6
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we have PHP 5.2.0+" >&5
++$as_echo_n "checking if we have PHP 5.2.0+... " >&6; }
+   PHP_VERSION=`grep 'PHP_VERSION_ID' $PHP_SRC_DIR/main/php_version.h | cut -d' ' -f3`
+   if test -z "$PHP_VERSION" || test $PHP_VERSION -lt 50200; then
+-    { { echo "$as_me:$LINENO: error:
+-!!! PHP MapScript now requires PHP 5.2.0 or more recent.              !!!
+-!!! Support for PHP3 has been dropped after MapServer version 3.5.    !!!
+-!!! Support for PHP4 has been dropped after MapServer version 5.6.    !!!" >&5
+-echo "$as_me: error:
++    as_fn_error $? "
+ !!! PHP MapScript now requires PHP 5.2.0 or more recent.              !!!
+ !!! Support for PHP3 has been dropped after MapServer version 3.5.    !!!
+-!!! Support for PHP4 has been dropped after MapServer version 5.6.    !!!" >&2;}
+-   { (exit 1); exit 1; }; }
++!!! Support for PHP4 has been dropped after MapServer version 5.6.    !!!" "$LINENO" 5
+   else
+-     echo "$as_me:$LINENO: result: yes" >&5
+-echo "${ECHO_T}yes" >&6
++     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
+   fi
+-  echo "$as_me:$LINENO: result: $PHP_VERSION_FLAG" >&5
+-echo "${ECHO_T}$PHP_VERSION_FLAG" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PHP_VERSION_FLAG" >&5
++$as_echo "$PHP_VERSION_FLAG" >&6; }
+ 
+-          echo "$as_me:$LINENO: checking whether we should use PHP's regex" >&5
+-echo $ECHO_N "checking whether we should use PHP's regex... $ECHO_C" >&6
++          { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we should use PHP's regex" >&5
++$as_echo_n "checking whether we should use PHP's regex... " >&6; }
+   if test -n "`grep 'define REGEX 1' $PHP_CONFIG_H`"  ; then
+-    echo "$as_me:$LINENO: result: yes" >&5
+-echo "${ECHO_T}yes" >&6
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
+ 
+             test -f "$PHP_SRC_DIR/regex/regex_extra.h" && PHP_NO_SOURCE="1"
+         if test -n "$PHP_NO_SOURCE" ; then
+                     USE_PHP_REGEX="-DUSE_PHP_REGEX"
+           PHP_REGEX_INC="-I$PHP_SRC_DIR"
+           PHP_REGEX_OBJ=php_regex.o
+-          echo "$as_me:$LINENO: result:         found regex_extra.h - building PHP MapScript with PHP's bundled regex " >&5
+-echo "${ECHO_T}        found regex_extra.h - building PHP MapScript with PHP's bundled regex " >&6
++          { $as_echo "$as_me:${as_lineno-$LINENO}: result:         found regex_extra.h - building PHP MapScript with PHP's bundled regex " >&5
++$as_echo "        found regex_extra.h - building PHP MapScript with PHP's bundled regex " >&6; }
+         else
+                     test -f "$PHP_SRC_DIR/ext/ereg/regex/regex.h" && PHP_NO_SOURCE="1"
+           if test -n "$PHP_NO_SOURCE" ; then
+                     USE_PHP_REGEX="-DUSE_PHP_REGEX"
+           PHP_REGEX_INC="-I$PHP_SRC_DIR/ext/ereg/"
+           PHP_REGEX_OBJ=php_regex.o
+-          echo "$as_me:$LINENO: result:         found regex.h - building PHP MapScript with PHP's bundled regex " >&5
+-echo "${ECHO_T}        found regex.h - building PHP MapScript with PHP's bundled regex " >&6
++          { $as_echo "$as_me:${as_lineno-$LINENO}: result:         found regex.h - building PHP MapScript with PHP's bundled regex " >&5
++$as_echo "        found regex.h - building PHP MapScript with PHP's bundled regex " >&6; }
+           else
+-            { { echo "$as_me:$LINENO: error:
+-!!! PHP uses its bundled regex library but regex/regex_extra.h (PHP <=5.2) or !!!
+-!!! ext/ereg/regex/regex.h (PHP >=5.3) cannot be found.                                  !!!" >&5
+-echo "$as_me: error:
++            as_fn_error $? "
+ !!! PHP uses its bundled regex library but regex/regex_extra.h (PHP <=5.2) or !!!
+-!!! ext/ereg/regex/regex.h (PHP >=5.3) cannot be found.                                  !!!" >&2;}
+-   { (exit 1); exit 1; }; }
++!!! ext/ereg/regex/regex.h (PHP >=5.3) cannot be found.                                  !!!" "$LINENO" 5
+           fi
+ 	fi
+ 
+   else
+-    echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+   fi
+ 
+   PHPMS_MAKEFILE=mapscript/php/Makefile
+@@ -13893,15 +10435,13 @@
+   USE_PHP_REGEX=$USE_PHP_REGEX
+ 
+ 
+-  echo "$as_me:$LINENO: result:         PHP/MapScript module configured." >&5
+-echo "${ECHO_T}        PHP/MapScript module configured." >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result:         PHP/MapScript module configured." >&5
++$as_echo "        PHP/MapScript module configured." >&6; }
+ elif test -n "$with_php" -a "$with_php" != "no" ; then
+-  { { echo "$as_me:$LINENO: error: Missing or invalid PHP source directory in --with-php=DIR." >&5
+-echo "$as_me: error: Missing or invalid PHP source directory in --with-php=DIR." >&2;}
+-   { (exit 1); exit 1; }; }
++  as_fn_error $? "Missing or invalid PHP source directory in --with-php=DIR." "$LINENO" 5
+ else
+-  echo "$as_me:$LINENO: result:         PHP/MapScript module not configured." >&5
+-echo "${ECHO_T}        PHP/MapScript module not configured." >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result:         PHP/MapScript module not configured." >&5
++$as_echo "        PHP/MapScript module not configured." >&6; }
+ fi
+ 
+ MAKE_PHPMS=$MAKE_PHPMS
+@@ -13942,19 +10482,19 @@
+   fi
+ 
+ 
+-# Check whether --with-ld-shared or --without-ld-shared was given.
+-if test "${with_ld_shared+set}" = set; then
+-  withval="$with_ld_shared"
++# Check whether --with-ld-shared was given.
++if test "${with_ld_shared+set}" = set; then :
++  withval=$with_ld_shared;
++fi
+ 
+-fi;
+ 
+       if test "$with_ld_shared" != "" -a "$with_ld_shared" != "yes"; then
+     if test "$with_ld_shared" = "no" ; then
+-      echo "$as_me:$LINENO: result: user disabled shared library support." >&5
+-echo "${ECHO_T}user disabled shared library support." >&6
++      { $as_echo "$as_me:${as_lineno-$LINENO}: result: user disabled shared library support." >&5
++$as_echo "user disabled shared library support." >&6; }
+     else
+-      echo "$as_me:$LINENO: result: using user supplied .so link command ... $with_ld_shared" >&5
+-echo "${ECHO_T}using user supplied .so link command ... $with_ld_shared" >&6
++      { $as_echo "$as_me:${as_lineno-$LINENO}: result: using user supplied .so link command ... $with_ld_shared" >&5
++$as_echo "using user supplied .so link command ... $with_ld_shared" >&6; }
+     fi
+     LD_SHARED="$with_ld_shared"
+   fi
+@@ -14076,33 +10616,25 @@
+ 
+ 
+ 
+-# Check whether --with-apxs or --without-apxs was given.
+-if test "${with_apxs+set}" = set; then
+-  withval="$with_apxs"
++# Check whether --with-apxs was given.
++if test "${with_apxs+set}" = set; then :
++  withval=$with_apxs;
++fi
+ 
+-fi;
+ 
+ if test -n "$with_apxs" -a "$with_apxs" != "no" ; then
+ 
+-  { { echo "$as_me:$LINENO: error:
++  as_fn_error $? "
+ !!! The current version of PHP MapScript requires PHP4 configured as  !!!
+ !!! a CGI and cannot be used with PHP4 configured as an Apache module,!!!
+ !!! so you cannot use the --with-apxs option.                         !!!
+-!!! See: http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?PHPMapScriptCGI !!!" >&5
+-echo "$as_me: error:
+-!!! The current version of PHP MapScript requires PHP4 configured as  !!!
+-!!! a CGI and cannot be used with PHP4 configured as an Apache module,!!!
+-!!! so you cannot use the --with-apxs option.                         !!!
+-!!! See: http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?PHPMapScriptCGI !!!" >&2;}
+-   { (exit 1); exit 1; }; }
++!!! See: http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?PHPMapScriptCGI !!!" "$LINENO" 5
+ 
+ 
+-  echo "$as_me:$LINENO: checking for location of Apache headers using apxs" >&5
+-echo $ECHO_N "checking for location of Apache headers using apxs... $ECHO_C" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for location of Apache headers using apxs" >&5
++$as_echo_n "checking for location of Apache headers using apxs... " >&6; }
+   if test -z "$MAKE_PHPMS" ; then
+-    { { echo "$as_me:$LINENO: error: --with-apxs applies only if --with-php is used." >&5
+-echo "$as_me: error: --with-apxs applies only if --with-php is used." >&2;}
+-   { (exit 1); exit 1; }; }
++    as_fn_error $? "--with-apxs applies only if --with-php is used." "$LINENO" 5
+ 
+   elif test "$with_apxs" = "yes" ; then
+     APXS=apxs
+@@ -14111,40 +10643,32 @@
+   fi
+ 
+   APACHE_INC=-I`$APXS -q INCLUDEDIR`
+-  echo "$as_me:$LINENO: result: $APACHE_INC" >&5
+-echo "${ECHO_T}$APACHE_INC" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $APACHE_INC" >&5
++$as_echo "$APACHE_INC" >&6; }
+ 
+     fi
+ 
+ 
+ 
+ 
+-# Check whether --with-apache or --without-apache was given.
+-if test "${with_apache+set}" = set; then
+-  withval="$with_apache"
++# Check whether --with-apache was given.
++if test "${with_apache+set}" = set; then :
++  withval=$with_apache;
++fi
+ 
+-fi;
+ 
+ if test -n "$with_apache" -a "$with_apache" != "no" ; then
+ 
+-  { { echo "$as_me:$LINENO: error:
++  as_fn_error $? "
+ !!! The current version of PHP MapScript requires PHP4 configured as  !!!
+ !!! a CGI and cannot be used with PHP4 configured as an Apache module,!!!
+ !!! so you cannot use the --with-apache option.                       !!!
+-!!! See: http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?PHPMapScriptCGI !!!" >&5
+-echo "$as_me: error:
+-!!! The current version of PHP MapScript requires PHP4 configured as  !!!
+-!!! a CGI and cannot be used with PHP4 configured as an Apache module,!!!
+-!!! so you cannot use the --with-apache option.                       !!!
+-!!! See: http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?PHPMapScriptCGI !!!" >&2;}
+-   { (exit 1); exit 1; }; }
++!!! See: http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?PHPMapScriptCGI !!!" "$LINENO" 5
+ 
+-  echo "$as_me:$LINENO: checking for location of Apache headers" >&5
+-echo $ECHO_N "checking for location of Apache headers... $ECHO_C" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for location of Apache headers" >&5
++$as_echo_n "checking for location of Apache headers... " >&6; }
+   if test -z "$MAKE_PHPMS" ; then
+-    { { echo "$as_me:$LINENO: error: --with-apache applies only if --with-php is used." >&5
+-echo "$as_me: error: --with-apache applies only if --with-php is used." >&2;}
+-   { (exit 1); exit 1; }; }
++    as_fn_error $? "--with-apache applies only if --with-php is used." "$LINENO" 5
+   fi
+ 
+ 
+@@ -14159,12 +10683,10 @@
+   test -f $APACHE_DIR/src/include/httpd.h && APACHE_INC_DIR="$APACHE_DIR/src/include"
+   if test -n "$APACHE_INC_DIR" ; then
+     APACHE_INC="-I$APACHE_INC_DIR $APACHE_INC"
+-    echo "$as_me:$LINENO: result: \"-I$APACHE_INC_DIR\"" >&5
+-echo "${ECHO_T}\"-I$APACHE_INC_DIR\"" >&6
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"-I$APACHE_INC_DIR\"" >&5
++$as_echo "\"-I$APACHE_INC_DIR\"" >&6; }
+   else
+-    { { echo "$as_me:$LINENO: error: \"Could not find httpd.h in $APACHE_DIR.\"" >&5
+-echo "$as_me: error: \"Could not find httpd.h in $APACHE_DIR.\"" >&2;}
+-   { (exit 1); exit 1; }; }
++    as_fn_error $? "\"Could not find httpd.h in $APACHE_DIR.\"" "$LINENO" 5
+   fi
+ fi
+ 
+@@ -14173,36 +10695,36 @@
+ 
+ 
+ 
+-echo "$as_me:$LINENO: checking if --enable-runpath requested" >&5
+-echo $ECHO_N "checking if --enable-runpath requested... $ECHO_C" >&6
+-# Check whether --enable-runpath or --disable-runpath was given.
+-if test "${enable_runpath+set}" = set; then
+-  enableval="$enable_runpath"
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-runpath requested" >&5
++$as_echo_n "checking if --enable-runpath requested... " >&6; }
++# Check whether --enable-runpath was given.
++if test "${enable_runpath+set}" = set; then :
++  enableval=$enable_runpath;
++fi
+ 
+-fi;
+ 
+ if test "$enable_runpath" != "yes" ; then
+   RPATHS=""
+-  echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+ else
+-  echo "$as_me:$LINENO: result: yes ($RPATHS)" >&5
+-echo "${ECHO_T}yes ($RPATHS)" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($RPATHS)" >&5
++$as_echo "yes ($RPATHS)" >&6; }
+ fi
+ 
+ 
+-echo "$as_me:$LINENO: checking if --with-java-include-os-name specified" >&5
+-echo $ECHO_N "checking if --with-java-include-os-name specified... $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --with-java-include-os-name specified" >&5
++$as_echo_n "checking if --with-java-include-os-name specified... " >&6; }
+ 
+-# Check whether --with-java-include-os-name or --without-java-include-os-name was given.
+-if test "${with_java_include_os_name+set}" = set; then
+-  withval="$with_java_include_os_name"
++# Check whether --with-java-include-os-name was given.
++if test "${with_java_include_os_name+set}" = set; then :
++  withval=$with_java_include_os_name;
++fi
+ 
+-fi;
+ if test -n "${with_java_include_os_name}" ; then
+ OS_INCLUDE_DIR="${with_java_include_os_name}"
+-echo "$as_me:$LINENO: result: yes ($OS_INCLUDE_DIR)" >&5
+-echo "${ECHO_T}yes ($OS_INCLUDE_DIR)" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($OS_INCLUDE_DIR)" >&5
++$as_echo "yes ($OS_INCLUDE_DIR)" >&6; }
+ else
+ OUR_OSNAME=`uname -s`
+ case "${OUR_OSNAME}" in
+@@ -14212,8 +10734,8 @@
+ [Ww]in*) OS_INCLUDE_DIR="win32" ;;
+ *) OS_INCLUDE_DIR="linux" ;;
+ esac
+-echo "$as_me:$LINENO: result: no, autodetected $OS_INCLUDE_DIR" >&5
+-echo "${ECHO_T}no, autodetected $OS_INCLUDE_DIR" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no, autodetected $OS_INCLUDE_DIR" >&5
++$as_echo "no, autodetected $OS_INCLUDE_DIR" >&6; }
+ fi
+ 
+ OS_INCLUDE_DIR=$OS_INCLUDE_DIR
+@@ -14231,7 +10753,8 @@
+ RPATHS=$RPATHS
+ 
+ 
+-                                        ac_config_files="$ac_config_files Makefile $PHPMS_MAKEFILE mapscript/java/Makefile mapscript/csharp/Makefile"
++ac_config_files="$ac_config_files Makefile $PHPMS_MAKEFILE mapscript/java/Makefile mapscript/csharp/Makefile"
++
+ cat >confcache <<\_ACEOF
+ # This file is a shell script that caches the results of configure
+ # tests run on this system so they can be shared between configure
+@@ -14250,104 +10773,127 @@
+ 
+ # The following way of writing the cache mishandles newlines in values,
+ # but we know of no workaround that is simple, portable, and efficient.
+-# So, don't put newlines in cache variables' values.
++# 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_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
++$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
++      esac
++      case $ac_var in #(
++      _ | IFS | as_nl) ;; #(
++      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
++      *) { eval $ac_var=; unset $ac_var;} ;;
++      esac ;;
++    esac
++  done
++
+   (set) 2>&1 |
+-    case `(ac_space=' '; set | grep ac_space) 2>&1` in
+-    *ac_space=\ *)
+-      # `set' does not quote correctly, so add quotes (double-quote
+-      # substitution turns \\\\ into \\, and sed turns \\ into \).
++    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 \
+-	"s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
++      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+       ;;
+-    esac;
+-} |
++    esac |
++    sort
++) |
+   sed '
++     /^ac_cv_env_/b end
+      t clear
+-     : clear
++     :clear
+      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+      t end
+-     /^ac_cv_env/!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 "updating cache $cache_file"
+-    cat confcache >$cache_file
++     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
++     :end' >>confcache
++if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
++  if test -w "$cache_file"; then
++    if test "x$cache_file" != "x/dev/null"; then
++      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
++$as_echo "$as_me: updating cache $cache_file" >&6;}
++      if test ! -f "$cache_file" || test -h "$cache_file"; then
++	cat confcache >"$cache_file"
++      else
++        case $cache_file in #(
++        */* | ?:*)
++	  mv -f confcache "$cache_file"$$ &&
++	  mv -f "$cache_file"$$ "$cache_file" ;; #(
++        *)
++	  mv -f confcache "$cache_file" ;;
++	esac
++      fi
++    fi
+   else
+-    echo "not updating unwritable cache $cache_file"
++    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
++$as_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}'
+-
+-# 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
++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 we branch to the quote section.  Otherwise,
++# take arguments), then branch to the quote section.  Otherwise,
+ # look for a macro that doesn't take arguments.
+-cat >confdef2opt.sed <<\_ACEOF
++ac_script='
++:mline
++/\\$/{
++ N
++ s,\\\n,,
++ b mline
++}
+ t clear
+-: clear
+-s,^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\),-D\1=\2,g
++:clear
++s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
+ t quote
+-s,^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\),-D\1=\2,g
++s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
+ t quote
+-d
+-: quote
+-s,[	 `~#$^&*(){}\\|;'"<>?],\\&,g
+-s,\[,\\&,g
+-s,\],\\&,g
+-s,\$,$$,g
+-p
+-_ACEOF
+-# We use echo to avoid assuming a particular line-breaking character.
+-# The extra dot is to prevent the shell from consuming trailing
+-# line-breaks from the sub-command output.  A line-break within
+-# single-quotes doesn't work because, if this script is created in a
+-# platform that uses two characters for line-breaks (e.g., DOS), tr
+-# would break.
+-ac_LF_and_DOT=`echo; echo .`
+-DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
+-rm -f confdef2opt.sed
++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=
++U=
+ for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+   # 1. Remove the extension, and $U if already installed.
+-  ac_i=`echo "$ac_i" |
+-	 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
+-  # 2. Add them.
+-  ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
+-  ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
++  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
++  ac_i=`$as_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.
++  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
++  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
+ done
+ LIBOBJS=$ac_libobjs
+ 
+@@ -14355,12 +10901,14 @@
+ 
+ 
+ 
+-: ${CONFIG_STATUS=./config.status}
++: "${CONFIG_STATUS=./config.status}"
++ac_write_fail=0
+ 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
++{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
++$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
++as_write_fail=0
++cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
+ #! $SHELL
+ # Generated by $as_me.
+ # Run this file to recreate the current configuration.
+@@ -14370,81 +10918,253 @@
+ debug=false
+ ac_cs_recheck=false
+ ac_cs_silent=false
+-SHELL=\${CONFIG_SHELL-$SHELL}
+-_ACEOF
+ 
+-cat >>$CONFIG_STATUS <<\_ACEOF
+-## --------------------- ##
+-## M4sh Initialization.  ##
+-## --------------------- ##
++SHELL=\${CONFIG_SHELL-$SHELL}
++export SHELL
++_ASEOF
++cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
++## -------------------- ##
++## M4sh Initialization. ##
++## -------------------- ##
+ 
+-# Be Bourne compatible
+-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
++# Be more Bourne compatible
++DUALCASE=1; export DUALCASE # for MKS sh
++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
++  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+   # is contrary to our usage.  Disable this feature.
+   alias -g '${1+"$@"}'='"$@"'
+-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+-  set -o posix
++  setopt NO_GLOB_SUBST
++else
++  case `(set -o) 2>/dev/null` in #(
++  *posix*) :
++    set -o posix ;; #(
++  *) :
++     ;;
++esac
+ fi
+-DUALCASE=1; export DUALCASE # for MKS sh
+ 
+-# Support unset when possible.
+-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+-  as_unset=unset
+-else
+-  as_unset=false
++
++as_nl='
++'
++export as_nl
++# Printing a long string crashes Solaris 7 /usr/bin/printf.
++as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
++as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
++as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
++# Prefer a ksh shell builtin over an external printf program on Solaris,
++# but without wasting forks for bash or zsh.
++if test -z "$BASH_VERSION$ZSH_VERSION" \
++    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
++  as_echo='print -r --'
++  as_echo_n='print -rn --'
++elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
++  as_echo='printf %s\n'
++  as_echo_n='printf %s'
++else
++  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
++    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
++    as_echo_n='/usr/ucb/echo -n'
++  else
++    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
++    as_echo_n_body='eval
++      arg=$1;
++      case $arg in #(
++      *"$as_nl"*)
++	expr "X$arg" : "X\\(.*\\)$as_nl";
++	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
++      esac;
++      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
++    '
++    export as_echo_n_body
++    as_echo_n='sh -c $as_echo_n_body as_echo'
++  fi
++  export as_echo_body
++  as_echo='sh -c $as_echo_body as_echo'
++fi
++
++# The user is always right.
++if test "${PATH_SEPARATOR+set}" != set; then
++  PATH_SEPARATOR=:
++  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
++    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
++      PATH_SEPARATOR=';'
++  }
+ fi
+ 
+ 
+-# Work around bugs in pre-3.0 UWIN ksh.
+-$as_unset ENV MAIL MAILPATH
++# 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.)
++IFS=" ""	$as_nl"
++
++# Find who we are.  Look in the path if we contain no directory separator.
++as_myself=
++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
++  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
++  exit 1
++fi
++
++# Unset variables that we do not need and which cause bugs (e.g. in
++# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
++# suppresses any "Segmentation fault" message there.  '((' could
++# trigger a bug in pdksh 5.2.14.
++for as_var in BASH_ENV ENV MAIL MAILPATH
++do eval test x\${$as_var+set} = xset \
++  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && 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
+-  fi
+-done
++LC_ALL=C
++export LC_ALL
++LANGUAGE=C
++export LANGUAGE
++
++# CDPATH.
++(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
++
++
++# as_fn_error STATUS ERROR [LINENO LOG_FD]
++# ----------------------------------------
++# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
++# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
++# script with STATUS, using 1 if that was 0.
++as_fn_error ()
++{
++  as_status=$1; test $as_status -eq 0 && as_status=1
++  if test "$4"; then
++    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
++    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
++  fi
++  $as_echo "$as_me: error: $2" >&2
++  as_fn_exit $as_status
++} # as_fn_error
++
++
++# as_fn_set_status STATUS
++# -----------------------
++# Set $? to STATUS, without forking.
++as_fn_set_status ()
++{
++  return $1
++} # as_fn_set_status
++
++# as_fn_exit STATUS
++# -----------------
++# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
++as_fn_exit ()
++{
++  set +e
++  as_fn_set_status $1
++  exit $1
++} # as_fn_exit
++
++# as_fn_unset VAR
++# ---------------
++# Portably unset VAR.
++as_fn_unset ()
++{
++  { eval $1=; unset $1;}
++}
++as_unset=as_fn_unset
++# as_fn_append VAR VALUE
++# ----------------------
++# Append the text in VALUE to the end of the definition contained in VAR. Take
++# advantage of any shell optimizations that allow amortized linear growth over
++# repeated appends, instead of the typical quadratic growth present in naive
++# implementations.
++if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
++  eval 'as_fn_append ()
++  {
++    eval $1+=\$2
++  }'
++else
++  as_fn_append ()
++  {
++    eval $1=\$$1\$2
++  }
++fi # as_fn_append
++
++# as_fn_arith ARG...
++# ------------------
++# Perform arithmetic evaluation on the ARGs, and store the result in the
++# global $as_val. Take advantage of shells that can avoid forks. The arguments
++# must be portable across $(()) and expr.
++if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
++  eval 'as_fn_arith ()
++  {
++    as_val=$(( $* ))
++  }'
++else
++  as_fn_arith ()
++  {
++    as_val=`expr "$@" || test $? -eq 1`
++  }
++fi # as_fn_arith
++
+ 
+-# Required to use basename.
+-if expr a : '\(a\)' >/dev/null 2>&1; then
++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
++if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+   as_basename=basename
+ else
+   as_basename=false
+ fi
+ 
++if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
++  as_dirname=dirname
++else
++  as_dirname=false
++fi
+ 
+-# Name of the executable.
+-as_me=`$as_basename "$0" ||
++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'`
++	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
++$as_echo X/"$0" |
++    sed '/^.*\/\([^/][^/]*\)\/*$/{
++	    s//\1/
++	    q
++	  }
++	  /^X\/\(\/\/\)$/{
++	    s//\1/
++	    q
++	  }
++	  /^X\/\(\/\).*/{
++	    s//\1/
++	    q
++	  }
++	  s/.*/./; q'`
+ 
+-
+-# PATH needs CR, and LINENO needs CR and PATH.
+ # Avoid depending upon Character Ranges.
+ as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+ as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+@@ -14452,148 +11172,123 @@
+ 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
+-
+-
+-  as_lineno_1=$LINENO
+-  as_lineno_2=$LINENO
+-  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+-  test "x$as_lineno_1" != "x$as_lineno_2" &&
+-  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
+-  # Find who we are.  Look in the path if we contain no path at all
+-  # relative or not.
+-  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
+-
+-       ;;
+-  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_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
+-echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
+-   { (exit 1); exit 1; }; }
+-  fi
+-  case $CONFIG_SHELL in
+-  '')
+-    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+-do
+-  IFS=$as_save_IFS
+-  test -z "$as_dir" && as_dir=.
+-  for as_base in sh bash ksh sh5; do
+-	 case $as_dir in
+-	 /*)
+-	   if ("$as_dir/$as_base" -c '
+-  as_lineno_1=$LINENO
+-  as_lineno_2=$LINENO
+-  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+-  test "x$as_lineno_1" != "x$as_lineno_2" &&
+-  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
+-	     $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+-	     $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+-	     CONFIG_SHELL=$as_dir/$as_base
+-	     export CONFIG_SHELL
+-	     exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+-	   fi;;
+-	 esac
+-       done
+-done
+-;;
+-  esac
+-
+-  # 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 before each line; the second 'sed' does the real
+-  # work.  The second script uses 'N' to pair each line-number line
+-  # with the numbered line, 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
+-  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
+-  sed '=' <$as_myself |
+-    sed '
+-      N
+-      s,$,-,
+-      : loop
+-      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+-      t loop
+-      s,-$,,
+-      s,^['$as_cr_digits']*\n,,
+-    ' >$as_me.lineno &&
+-  chmod +x $as_me.lineno ||
+-    { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
+-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 sensible to this).
+-  . ./$as_me.lineno
+-  # Exit status is that of the last command.
+-  exit
+-}
+-
+-
+-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+-  *c*,-n*) ECHO_N= ECHO_C='
+-' ECHO_T='	' ;;
+-  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+-  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
++ECHO_C= ECHO_N= ECHO_T=
++case `echo -n x` in #(((((
++-n*)
++  case `echo 'xy\c'` in
++  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
++  xy)  ECHO_C='\c';;
++  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
++       ECHO_T='	';;
++  esac;;
++*)
++  ECHO_N='-n';;
+ esac
+ 
+-if expr a : '\(a\)' >/dev/null 2>&1; then
+-  as_expr=expr
++rm -f conf$$ conf$$.exe conf$$.file
++if test -d conf$$.dir; then
++  rm -f conf$$.dir/conf$$.file
+ else
+-  as_expr=false
++  rm -f conf$$.dir
++  mkdir conf$$.dir 2>/dev/null
+ fi
+-
+-rm -f conf$$ conf$$.exe conf$$.file
+-echo >conf$$.file
+-if ln -s conf$$.file conf$$ 2>/dev/null; then
+-  # We could just check for DJGPP; but this test a) works b) is more generic
+-  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+-  if test -f conf$$.exe; then
+-    # Don't use ln at all; we don't have any links
+-    as_ln_s='cp -p'
+-  else
++if (echo >conf$$.file) 2>/dev/null; then
++  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
+-elif ln conf$$.file conf$$ 2>/dev/null; then
+-  as_ln_s=ln
+ else
+   as_ln_s='cp -p'
+ fi
+-rm -f conf$$ conf$$.exe conf$$.file
++rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
++rmdir conf$$.dir 2>/dev/null
++
+ 
++# as_fn_mkdir_p
++# -------------
++# Create "$as_dir" as a directory, including parents if necessary.
++as_fn_mkdir_p ()
++{
++
++  case $as_dir in #(
++  -*) as_dir=./$as_dir;;
++  esac
++  test -d "$as_dir" || eval $as_mkdir_p || {
++    as_dirs=
++    while :; do
++      case $as_dir in #(
++      *\'*) as_qdir=`$as_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 ||
++$as_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" || as_fn_error $? "cannot create directory $as_dir"
++
++
++} # as_fn_mkdir_p
+ if mkdir -p . 2>/dev/null; then
+-  as_mkdir_p=:
++  as_mkdir_p='mkdir -p "$as_dir"'
+ else
+   test -d ./-p && rmdir ./-p
+   as_mkdir_p=false
+ fi
+ 
+-as_executable_p="test -f"
++if test -x / >/dev/null 2>&1; then
++  as_test_x='test -x'
++else
++  if ls -dL / >/dev/null 2>&1; then
++    as_ls_L_option=L
++  else
++    as_ls_L_option=
++  fi
++  as_test_x='
++    eval sh -c '\''
++      if test -d "$1"; then
++	test -d "$1/.";
++      else
++	case $1 in #(
++	-*)set "./$1";;
++	esac;
++	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
++	???[sx]*):;;*)false;;esac;fi
++    '\'' sh
++  '
++fi
++as_executable_p=$as_test_x
+ 
+ # 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'"
+@@ -14602,31 +11297,20 @@
+ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+ 
+ 
+-# IFS
+-# We need space, tab and new line, in precisely that order.
+-as_nl='
+-'
+-IFS=" 	$as_nl"
+-
+-# CDPATH.
+-$as_unset CDPATH
+-
+ exec 6>&1
++## ----------------------------------- ##
++## Main body of $CONFIG_STATUS script. ##
++## ----------------------------------- ##
++_ASEOF
++test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
+ 
+-# Open the log real soon, to keep \$[0] and so on meaningful, and to
++cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=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.  Logging --version etc. is OK.
+-exec 5>>config.log
+-{
+-  echo
+-  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+-## Running $as_me. ##
+-_ASBOX
+-} >&5
+-cat >&5 <<_CSEOF
+-
++# values after options handling.
++ac_log="
+ This file was extended by $as_me, which was
+-generated by GNU Autoconf 2.59.  Invocation command line was
++generated by GNU Autoconf 2.68.  Invocation command line was
+ 
+   CONFIG_FILES    = $CONFIG_FILES
+   CONFIG_HEADERS  = $CONFIG_HEADERS
+@@ -14634,124 +11318,116 @@
+   CONFIG_COMMANDS = $CONFIG_COMMANDS
+   $ $0 $@
+ 
+-_CSEOF
+-echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
+-echo >&5
++on `(hostname || uname -n) 2>/dev/null | sed 1q`
++"
++
+ _ACEOF
+ 
+-# Files that config.status was made for.
+-if test -n "$ac_config_files"; then
+-  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
+-fi
++case $ac_config_files in *"
++"*) set x $ac_config_files; shift; ac_config_files=$*;;
++esac
+ 
+-if test -n "$ac_config_headers"; then
+-  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
+-fi
+ 
+-if test -n "$ac_config_links"; then
+-  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
+-fi
+ 
+-if test -n "$ac_config_commands"; then
+-  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
+-fi
++cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
++# Files that config.status was made for.
++config_files="$ac_config_files"
+ 
+-cat >>$CONFIG_STATUS <<\_ACEOF
++_ACEOF
+ 
++cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ ac_cs_usage="\
+-\`$as_me' instantiates files from templates according to the
+-current configuration.
++\`$as_me' instantiates files and other configuration actions
++from templates according to the current configuration.  Unless the files
++and actions are specified as TAGs, all are instantiated by default.
+ 
+-Usage: $0 [OPTIONS] [FILE]...
++Usage: $0 [OPTION]... [TAG]...
+ 
+   -h, --help       print this help, then exit
+-  -V, --version    print version number, then exit
+-  -q, --quiet      do not print progress messages
++  -V, --version    print version number and configuration settings, then exit
++      --config     print configuration, then exit
++  -q, --quiet, --silent
++                   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
++      --file=FILE[:TEMPLATE]
++                   instantiate the configuration file FILE
+ 
+ Configuration files:
+ $config_files
+ 
+-Report bugs to <bug-autoconf at gnu.org>."
+-_ACEOF
++Report bugs to the package provider."
+ 
+-cat >>$CONFIG_STATUS <<_ACEOF
++_ACEOF
++cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
++ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ ac_cs_version="\\
+ config.status
+-configured by $0, generated by GNU Autoconf 2.59,
+-  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
++configured by $0, generated by GNU Autoconf 2.68,
++  with options \\"\$ac_cs_config\\"
+ 
+-Copyright (C) 2003 Free Software Foundation, Inc.
++Copyright (C) 2010 Free Software Foundation, Inc.
+ This config.status script is free software; the Free Software Foundation
+ gives unlimited permission to copy, distribute and modify it."
+-srcdir=$srcdir
++
++ac_pwd='$ac_pwd'
++srcdir='$srcdir'
++test -n "\$AWK" || AWK=awk
+ _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.
++cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
++# The default lists apply if the user does not specify any file.
+ ac_need_defaults=:
+ while test $# != 0
+ do
+   case $1 in
+-  --*=*)
+-    ac_option=`expr "x$1" : 'x\([^=]*\)='`
+-    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
++  --*=?*)
++    ac_option=`expr "X$1" : 'X\([^=]*\)='`
++    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
++    ac_shift=:
++    ;;
++  --*=)
++    ac_option=`expr "X$1" : 'X\([^=]*\)='`
++    ac_optarg=
+     ac_shift=:
+     ;;
+-  -*)
++  *)
+     ac_option=$1
+     ac_optarg=$2
+     ac_shift=shift
+     ;;
+-  *) # This is not an option, so the user has probably given explicit
+-     # arguments.
+-     ac_option=$1
+-     ac_need_defaults=false;;
+   esac
+ 
+   case $ac_option in
+   # Handling of the options.
+-_ACEOF
+-cat >>$CONFIG_STATUS <<\_ACEOF
+   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+     ac_cs_recheck=: ;;
+-  --version | --vers* | -V )
+-    echo "$ac_cs_version"; exit 0 ;;
+-  --he | --h)
+-    # Conflict between --help and --header
+-    { { echo "$as_me:$LINENO: error: ambiguous option: $1
+-Try \`$0 --help' for more information." >&5
+-echo "$as_me: error: ambiguous option: $1
+-Try \`$0 --help' for more information." >&2;}
+-   { (exit 1); exit 1; }; };;
+-  --help | --hel | -h )
+-    echo "$ac_cs_usage"; exit 0 ;;
+-  --debug | --d* | -d )
++  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
++    $as_echo "$ac_cs_version"; exit ;;
++  --config | --confi | --conf | --con | --co | --c )
++    $as_echo "$ac_cs_config"; exit ;;
++  --debug | --debu | --deb | --de | --d | -d )
+     debug=: ;;
+   --file | --fil | --fi | --f )
+     $ac_shift
+-    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+-    ac_need_defaults=false;;
+-  --header | --heade | --head | --hea )
+-    $ac_shift
+-    CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
++    case $ac_optarg in
++    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
++    '') as_fn_error $? "missing file argument" ;;
++    esac
++    as_fn_append CONFIG_FILES " '$ac_optarg'"
+     ac_need_defaults=false;;
++  --he | --h |  --help | --hel | -h )
++    $as_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:$LINENO: error: unrecognized option: $1
+-Try \`$0 --help' for more information." >&5
+-echo "$as_me: error: unrecognized option: $1
+-Try \`$0 --help' for more information." >&2;}
+-   { (exit 1); exit 1; }; } ;;
++  -*) as_fn_error $? "unrecognized option: \`$1'
++Try \`$0 --help' for more information." ;;
+ 
+-  *) ac_config_targets="$ac_config_targets $1" ;;
++  *) as_fn_append ac_config_targets " $1"
++     ac_need_defaults=false ;;
+ 
+   esac
+   shift
+@@ -14765,33 +11441,47 @@
+ fi
+ 
+ _ACEOF
+-cat >>$CONFIG_STATUS <<_ACEOF
++cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ if \$ac_cs_recheck; then
+-  echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+-  exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
++  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
++  shift
++  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
++  CONFIG_SHELL='$SHELL'
++  export CONFIG_SHELL
++  exec "\$@"
+ fi
+ 
+ _ACEOF
++cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
++exec 5>>config.log
++{
++  echo
++  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
++## Running $as_me. ##
++_ASBOX
++  $as_echo "$ac_log"
++} >&5
+ 
++_ACEOF
++cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
++_ACEOF
+ 
++cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ 
+-
+-
+-cat >>$CONFIG_STATUS <<\_ACEOF
++# Handling of arguments.
+ for ac_config_target in $ac_config_targets
+ do
+-  case "$ac_config_target" in
+-  # Handling of arguments.
+-  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+-  "$PHPMS_MAKEFILE" ) CONFIG_FILES="$CONFIG_FILES $PHPMS_MAKEFILE" ;;
+-  "mapscript/java/Makefile" ) CONFIG_FILES="$CONFIG_FILES mapscript/java/Makefile" ;;
+-  "mapscript/csharp/Makefile" ) CONFIG_FILES="$CONFIG_FILES mapscript/csharp/Makefile" ;;
+-  *) { { 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; }; };;
++  case $ac_config_target in
++    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
++    "$PHPMS_MAKEFILE") CONFIG_FILES="$CONFIG_FILES $PHPMS_MAKEFILE" ;;
++    "mapscript/java/Makefile") CONFIG_FILES="$CONFIG_FILES mapscript/java/Makefile" ;;
++    "mapscript/csharp/Makefile") CONFIG_FILES="$CONFIG_FILES mapscript/csharp/Makefile" ;;
++
++  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+   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
+@@ -14801,457 +11491,414 @@
+ fi
+ 
+ # Have a temporary directory for convenience.  Make it in the build tree
+-# simply because there is no reason to put it here, and in addition,
++# simply because there is no reason against having it here, and in addition,
+ # creating and moving files from /tmp can sometimes cause problems.
+-# Create a temporary directory, and hook for its removal unless debugging.
++# 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 ||
+ {
+-  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
+-  trap '{ (exit 1); exit 1; }' 1 2 13 15
++  tmp= ac_tmp=
++  trap 'exit_status=$?
++  : "${ac_tmp:=$tmp}"
++  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
++' 0
++  trap 'as_fn_exit 1' 1 2 13 15
+ }
+-
+ # Create a (secure) tmp directory for tmp files.
+ 
+ {
+-  tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
+-  test -n "$tmp" && test -d "$tmp"
++  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
++  test -d "$tmp"
+ }  ||
+ {
+-  tmp=./confstat$$-$RANDOM
+-  (umask 077 && mkdir $tmp)
+-} ||
+-{
+-   echo "$me: cannot create a temporary directory in ." >&2
+-   { (exit 1); exit 1; }
+-}
++  tmp=./conf$$-$RANDOM
++  (umask 077 && mkdir "$tmp")
++} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
++ac_tmp=$tmp
++
++# Set up the scripts for CONFIG_FILES section.
++# No need to generate them if there are no CONFIG_FILES.
++# This happens for instance with `./config.status config.h'.
++if test -n "$CONFIG_FILES"; then
++
++
++ac_cr=`echo X | tr X '\015'`
++# On cygwin, bash can eat \r inside `` if the user requested igncr.
++# But we know of no other shell where ac_cr would be empty at this
++# point, so we can use a bashism as a fallback.
++if test "x$ac_cr" = x; then
++  eval ac_cr=\$\'\\r\'
++fi
++ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
++if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
++  ac_cs_awk_cr='\\r'
++else
++  ac_cs_awk_cr=$ac_cr
++fi
+ 
++echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
+ _ACEOF
+ 
+-cat >>$CONFIG_STATUS <<_ACEOF
+ 
+-#
+-# CONFIG_FILES section.
+-#
++{
++  echo "cat >conf$$subs.awk <<_ACEOF" &&
++  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
++  echo "_ACEOF"
++} >conf$$subs.sh ||
++  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
++ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
++ac_delim='%!_!# '
++for ac_last_try in false false false false false :; do
++  . ./conf$$subs.sh ||
++    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ 
+-# No need to generate the scripts if there are no CONFIG_FILES.
+-# This happens for instance when ./config.status config.h
+-if test -n "\$CONFIG_FILES"; then
+-  # Protect against being on the right side of a sed subst in config.status.
+-  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
+-   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
+-s, at SHELL@,$SHELL,;t t
+-s, at PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
+-s, at PACKAGE_NAME@,$PACKAGE_NAME,;t t
+-s, at PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
+-s, at PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
+-s, at PACKAGE_STRING@,$PACKAGE_STRING,;t t
+-s, at PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
+-s, at exec_prefix@,$exec_prefix,;t t
+-s, at prefix@,$prefix,;t t
+-s, at program_transform_name@,$program_transform_name,;t t
+-s, at bindir@,$bindir,;t t
+-s, at sbindir@,$sbindir,;t t
+-s, at libexecdir@,$libexecdir,;t t
+-s, at datadir@,$datadir,;t t
+-s, at sysconfdir@,$sysconfdir,;t t
+-s, at sharedstatedir@,$sharedstatedir,;t t
+-s, at localstatedir@,$localstatedir,;t t
+-s, at libdir@,$libdir,;t t
+-s, at includedir@,$includedir,;t t
+-s, at oldincludedir@,$oldincludedir,;t t
+-s, at infodir@,$infodir,;t t
+-s, at mandir@,$mandir,;t t
+-s, at build_alias@,$build_alias,;t t
+-s, at host_alias@,$host_alias,;t t
+-s, at target_alias@,$target_alias,;t t
+-s, at DEFS@,$DEFS,;t t
+-s, at ECHO_C@,$ECHO_C,;t t
+-s, at ECHO_N@,$ECHO_N,;t t
+-s, at ECHO_T@,$ECHO_T,;t t
+-s, at LIBS@,$LIBS,;t t
+-s, at CC@,$CC,;t t
+-s, at CFLAGS@,$CFLAGS,;t t
+-s, at LDFLAGS@,$LDFLAGS,;t t
+-s, at CPPFLAGS@,$CPPFLAGS,;t t
+-s, at ac_ct_CC@,$ac_ct_CC,;t t
+-s, at EXEEXT@,$EXEEXT,;t t
+-s, at OBJEXT@,$OBJEXT,;t t
+-s, at CXX@,$CXX,;t t
+-s, at CXXFLAGS@,$CXXFLAGS,;t t
+-s, at ac_ct_CXX@,$ac_ct_CXX,;t t
+-s, at RANLIB@,$RANLIB,;t t
+-s, at ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
+-s, at LEX@,$LEX,;t t
+-s, at LEXLIB@,$LEXLIB,;t t
+-s, at LEX_OUTPUT_ROOT@,$LEX_OUTPUT_ROOT,;t t
+-s, at YACC@,$YACC,;t t
+-s, at XTRALIBS@,$XTRALIBS,;t t
+-s, at CPP@,$CPP,;t t
+-s, at EGREP@,$EGREP,;t t
+-s, at C_PIC@,$C_PIC,;t t
+-s, at STRINGS@,$STRINGS,;t t
+-s, at MS_VERSION@,$MS_VERSION,;t t
+-s, at PKG_CONFIG@,$PKG_CONFIG,;t t
+-s, at FT_BIN@,$FT_BIN,;t t
+-s, at FT_ENABLED@,$FT_ENABLED,;t t
+-s, at FT_INC@,$FT_INC,;t t
+-s, at FT_LIB@,$FT_LIB,;t t
+-s, at ZLIB_ENABLED@,$ZLIB_ENABLED,;t t
+-s, at ZLIB_INC@,$ZLIB_INC,;t t
+-s, at ZLIB_LIB@,$ZLIB_LIB,;t t
+-s, at PNG_ENABLED@,$PNG_ENABLED,;t t
+-s, at PNG_INC@,$PNG_INC,;t t
+-s, at PNG_LIB@,$PNG_LIB,;t t
+-s, at GIF_ENABLED@,$GIF_ENABLED,;t t
+-s, at GIF_INC@,$GIF_INC,;t t
+-s, at GIF_LIB@,$GIF_LIB,;t t
+-s, at JPEG_ENABLED@,$JPEG_ENABLED,;t t
+-s, at JPEG_INC@,$JPEG_INC,;t t
+-s, at JPEG_LIB@,$JPEG_LIB,;t t
+-s, at ICONV_ENABLED@,$ICONV_ENABLED,;t t
+-s, at ICONV_INC@,$ICONV_INC,;t t
+-s, at ICONV_LIB@,$ICONV_LIB,;t t
+-s, at GD_DEF@,$GD_DEF,;t t
+-s, at GD_INC@,$GD_INC,;t t
+-s, at GD_LIB@,$GD_LIB,;t t
+-s, at GD_STATIC@,$GD_STATIC,;t t
+-s, at MAKE_GD@,$MAKE_GD,;t t
+-s, at MAKE_GD_CLEAN@,$MAKE_GD_CLEAN,;t t
+-s, at FTGL_ENABLED@,$FTGL_ENABLED,;t t
+-s, at FTGL_INC@,$FTGL_INC,;t t
+-s, at FTGL_LIB@,$FTGL_LIB,;t t
+-s, at OGL_ENABLED@,$OGL_ENABLED,;t t
+-s, at OGL_INC@,$OGL_INC,;t t
+-s, at OGL_LIB@,$OGL_LIB,;t t
+-s, at AGG_LIB@,$AGG_LIB,;t t
+-s, at AGG_INC@,$AGG_INC,;t t
+-s, at AGG_OBJ@,$AGG_OBJ,;t t
+-s, at PROJ_ENABLED@,$PROJ_ENABLED,;t t
+-s, at PROJ_INC@,$PROJ_INC,;t t
+-s, at PROJ_LIBS@,$PROJ_LIBS,;t t
+-s, at THREAD_FLAG@,$THREAD_FLAG,;t t
+-s, at THREAD_LIB@,$THREAD_LIB,;t t
+-s, at SDE_ENABLED@,$SDE_ENABLED,;t t
+-s, at SDE_INC@,$SDE_INC,;t t
+-s, at SDE_LIB@,$SDE_LIB,;t t
+-s, at GEOS_CONFIG@,$GEOS_CONFIG,;t t
+-s, at GEOS_ENABLED@,$GEOS_ENABLED,;t t
+-s, at GEOS_INC@,$GEOS_INC,;t t
+-s, at GEOS_LIB@,$GEOS_LIB,;t t
+-s, at GDAL_CONFIG@,$GDAL_CONFIG,;t t
+-s, at GDAL_ENABLED@,$GDAL_ENABLED,;t t
+-s, at OGR_ENABLED@,$OGR_ENABLED,;t t
+-s, at GDAL_INC@,$GDAL_INC,;t t
+-s, at GDAL_LIB@,$GDAL_LIB,;t t
+-s, at PG_CONFIG@,$PG_CONFIG,;t t
+-s, at POSTGIS_ENABLED@,$POSTGIS_ENABLED,;t t
+-s, at POSTGIS_INC@,$POSTGIS_INC,;t t
+-s, at POSTGIS_LIB@,$POSTGIS_LIB,;t t
+-s, at MY_CONFIG@,$MY_CONFIG,;t t
+-s, at MYSQL_ENABLED@,$MYSQL_ENABLED,;t t
+-s, at MYSQL_INC@,$MYSQL_INC,;t t
+-s, at MYSQL_LIB@,$MYSQL_LIB,;t t
+-s, at ORACLESPATIAL_ENABLED@,$ORACLESPATIAL_ENABLED,;t t
+-s, at ORACLESPATIAL_INC@,$ORACLESPATIAL_INC,;t t
+-s, at ORACLESPATIAL_LIB@,$ORACLESPATIAL_LIB,;t t
+-s, at WMS_SVR_ENABLED@,$WMS_SVR_ENABLED,;t t
+-s, at WFS_SVR_ENABLED@,$WFS_SVR_ENABLED,;t t
+-s, at WCS_SVR_ENABLED@,$WCS_SVR_ENABLED,;t t
+-s, at LIBCURL_CONFIG@,$LIBCURL_CONFIG,;t t
+-s, at CURL_INC@,$CURL_INC,;t t
+-s, at CURL_LIB@,$CURL_LIB,;t t
+-s, at LIBXML2_CONFIG@,$LIBXML2_CONFIG,;t t
+-s, at XML2_INC@,$XML2_INC,;t t
+-s, at XML2_LIB@,$XML2_LIB,;t t
+-s, at WMS_LYR_ENABLED@,$WMS_LYR_ENABLED,;t t
+-s, at WFS_LYR_ENABLED@,$WFS_LYR_ENABLED,;t t
+-s, at SOS_SVR_ENABLED@,$SOS_SVR_ENABLED,;t t
+-s, at XSLT_ENABLED@,$XSLT_ENABLED,;t t
+-s, at XSLT_INC@,$XSLT_INC,;t t
+-s, at XSLT_LIB@,$XSLT_LIB,;t t
+-s, at EXSLT_ENABLED@,$EXSLT_ENABLED,;t t
+-s, at EXSLT_INC@,$EXSLT_INC,;t t
+-s, at EXSLT_LIB@,$EXSLT_LIB,;t t
+-s, at FRIBIDI_CONFIG@,$FRIBIDI_CONFIG,;t t
+-s, at FRIBIDI_ENABLED@,$FRIBIDI_ENABLED,;t t
+-s, at FRIBIDI_INC@,$FRIBIDI_INC,;t t
+-s, at FRIBIDI_LIB@,$FRIBIDI_LIB,;t t
+-s, at CAIRO_ENABLED@,$CAIRO_ENABLED,;t t
+-s, at CAIRO_INC@,$CAIRO_INC,;t t
+-s, at CAIRO_LIB@,$CAIRO_LIB,;t t
+-s, at FASTCGI_ENABLED@,$FASTCGI_ENABLED,;t t
+-s, at FASTCGI_INC@,$FASTCGI_INC,;t t
+-s, at FASTCGI_LIB@,$FASTCGI_LIB,;t t
+-s, at HTTPD@,$HTTPD,;t t
+-s, at MS_INC@,$MS_INC,;t t
+-s, at MS_LIB@,$MS_LIB,;t t
+-s, at IGNORE_MISSING_DATA@,$IGNORE_MISSING_DATA,;t t
+-s, at USE_POINT_Z_M@,$USE_POINT_Z_M,;t t
+-s, at USE_NINT@,$USE_NINT,;t t
+-s, at DEBUG_FLAGS@,$DEBUG_FLAGS,;t t
+-s, at LD_SHARED@,$LD_SHARED,;t t
+-s, at SO_EXT@,$SO_EXT,;t t
+-s, at SO_COMMAND_NAME@,$SO_COMMAND_NAME,;t t
+-s, at PHP_LD_SHARED@,$PHP_LD_SHARED,;t t
+-s, at PHP_VERSION_FLAG@,$PHP_VERSION_FLAG,;t t
+-s, at PHP_SRC_DIR@,$PHP_SRC_DIR,;t t
+-s, at PHP_CC@,$PHP_CC,;t t
+-s, at PHP_LD@,$PHP_LD,;t t
+-s, at PHP_REGEX_INC@,$PHP_REGEX_INC,;t t
+-s, at PHP_REGEX_OBJ@,$PHP_REGEX_OBJ,;t t
+-s, at USE_PHP_REGEX@,$USE_PHP_REGEX,;t t
+-s, at MAKE_PHPMS@,$MAKE_PHPMS,;t t
+-s, at MAKE_PHPMS_CLEAN@,$MAKE_PHPMS_CLEAN,;t t
+-s, at APACHE_INC@,$APACHE_INC,;t t
+-s, at OS_INCLUDE_DIR@,$OS_INCLUDE_DIR,;t t
+-s, at ALL_ENABLED@,$ALL_ENABLED,;t t
+-s, at ALL_INC@,$ALL_INC,;t t
+-s, at ALL_LIB@,$ALL_LIB,;t t
+-s, at ALL_STATIC_LIB@,$ALL_STATIC_LIB,;t t
+-s, at RPATHS@,$RPATHS,;t t
+-s, at LIBOBJS@,$LIBOBJS,;t t
+-s, at LTLIBOBJS@,$LTLIBOBJS,;t t
+-CEOF
+-
+-_ACEOF
+-
+-  cat >>$CONFIG_STATUS <<\_ACEOF
+-  # Split the substitutions into bite-sized pieces for seds with
+-  # small command number limits, like on Digital OSF/1 and HP-UX.
+-  ac_max_sed_lines=48
+-  ac_sed_frag=1 # Number of current file.
+-  ac_beg=1 # First line for current file.
+-  ac_end=$ac_max_sed_lines # Line after last line for current file.
+-  ac_more_lines=:
+-  ac_sed_cmds=
+-  while $ac_more_lines; do
+-    if test $ac_beg -gt 1; then
+-      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+-    else
+-      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+-    fi
+-    if test ! -s $tmp/subs.frag; then
+-      ac_more_lines=false
+-    else
+-      # The purpose of the label and of the branching condition is to
+-      # speed up the sed processing (if there are no `@' at all, there
+-      # is no need to browse any of the substitutions).
+-      # These are the two extra sed commands mentioned above.
+-      (echo ':t
+-  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
+-      if test -z "$ac_sed_cmds"; then
+-	ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
+-      else
+-	ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
+-      fi
+-      ac_sed_frag=`expr $ac_sed_frag + 1`
+-      ac_beg=$ac_end
+-      ac_end=`expr $ac_end + $ac_max_sed_lines`
+-    fi
+-  done
+-  if test -z "$ac_sed_cmds"; then
+-    ac_sed_cmds=cat
++  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
++  if test $ac_delim_n = $ac_delim_num; then
++    break
++  elif $ac_last_try; then
++    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
++  else
++    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+   fi
+-fi # test -n "$CONFIG_FILES"
++done
++rm -f conf$$subs.sh
+ 
++cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
++cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
+ _ACEOF
+-cat >>$CONFIG_STATUS <<\_ACEOF
+-for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
+-  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+-  case $ac_file in
+-  - | *:- | *:-:* ) # input from stdin
+-	cat >$tmp/stdin
+-	ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+-	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+-  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+-	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+-  * )   ac_file_in=$ac_file.in ;;
++sed -n '
++h
++s/^/S["/; s/!.*/"]=/
++p
++g
++s/^[^!]*!//
++:repl
++t repl
++s/'"$ac_delim"'$//
++t delim
++:nl
++h
++s/\(.\{148\}\)..*/\1/
++t more1
++s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
++p
++n
++b repl
++:more1
++s/["\\]/\\&/g; s/^/"/; s/$/"\\/
++p
++g
++s/.\{148\}//
++t nl
++:delim
++h
++s/\(.\{148\}\)..*/\1/
++t more2
++s/["\\]/\\&/g; s/^/"/; s/$/"/
++p
++b
++:more2
++s/["\\]/\\&/g; s/^/"/; s/$/"\\/
++p
++g
++s/.\{148\}//
++t delim
++' <conf$$subs.awk | sed '
++/^[^""]/{
++  N
++  s/\n//
++}
++' >>$CONFIG_STATUS || ac_write_fail=1
++rm -f conf$$subs.awk
++cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
++_ACAWK
++cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
++  for (key in S) S_is_set[key] = 1
++  FS = ""
++
++}
++{
++  line = $ 0
++  nfields = split(line, field, "@")
++  substed = 0
++  len = length(field[1])
++  for (i = 2; i < nfields; i++) {
++    key = field[i]
++    keylen = length(key)
++    if (S_is_set[key]) {
++      value = S[key]
++      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
++      len += length(value) + length(field[++i])
++      substed = 1
++    } else
++      len += 1 + keylen
++  }
++
++  print line
++}
++
++_ACAWK
++_ACEOF
++cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
++if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
++  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
++else
++  cat
++fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
++  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
++_ACEOF
++
++# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
++# ${srcdir} and @srcdir@ entries 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[	 ]*=[	 ]*/{
++h
++s///
++s/^/:/
++s/[	 ]*$/:/
++s/:\$(srcdir):/:/g
++s/:\${srcdir}:/:/g
++s/:@srcdir@:/:/g
++s/^:*//
++s/:*$//
++x
++s/\(=[	 ]*\).*/\1/
++G
++s/\n//
++s/^[^=]*=[	 ]*$//
++}'
++fi
++
++cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
++fi # test -n "$CONFIG_FILES"
++
++
++eval set X "  :F $CONFIG_FILES      "
++shift
++for ac_tag
++do
++  case $ac_tag in
++  :[FHLC]) ac_mode=$ac_tag; continue;;
++  esac
++  case $ac_mode$ac_tag in
++  :[FHL]*:*);;
++  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
++  :[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="$ac_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 ||
++	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
++      esac
++      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
++      as_fn_append 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 '`
++	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
++	`' by configure.'
++    if test x"$ac_file" != x-; then
++      configure_input="$ac_file.  $configure_input"
++      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
++$as_echo "$as_me: creating $ac_file" >&6;}
++    fi
++    # Neutralize special characters interpreted by sed in replacement strings.
++    case $configure_input in #(
++    *\&* | *\|* | *\\* )
++       ac_sed_conf_input=`$as_echo "$configure_input" |
++       sed 's/[\\\\&|]/\\\\&/g'`;; #(
++    *) ac_sed_conf_input=$configure_input;;
++    esac
++
++    case $ac_tag in
++    *:-:* | *:-) cat >"$ac_tmp/stdin" \
++      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
++    esac
++    ;;
+   esac
+ 
+-  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
+-  ac_dir=`(dirname "$ac_file") 2>/dev/null ||
++  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'`
+-  { if $as_mkdir_p; then
+-    mkdir -p "$ac_dir"
+-  else
+-    as_dir="$ac_dir"
+-    as_dirs=
+-    while test ! -d "$as_dir"; do
+-      as_dirs="$as_dir $as_dirs"
+-      as_dir=`(dirname "$as_dir") 2>/dev/null ||
+-$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'`
+-    done
+-    test ! -n "$as_dirs" || mkdir $as_dirs
+-  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+-   { (exit 1); exit 1; }; }; }
+-
++	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
++$as_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"; as_fn_mkdir_p
+   ac_builddir=.
+ 
+-if test "$ac_dir" != .; then
+-  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+-  # A "../" for each directory in $ac_dir_suffix.
+-  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+-else
+-  ac_dir_suffix= ac_top_builddir=
+-fi
++case "$ac_dir" in
++.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
++*)
++  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
++  # A ".." for each directory in $ac_dir_suffix.
++  ac_top_builddir_sub=`$as_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
+-  .)  # No --srcdir option.  We are building in place.
++  .)  # We are building in place.
+     ac_srcdir=.
+-    if test -z "$ac_top_builddir"; then
+-       ac_top_srcdir=.
+-    else
+-       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+-    fi ;;
+-  [\\/]* | ?:[\\/]* )  # Absolute path.
++    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 ;;
+-  *) # Relative path.
+-    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+-    ac_top_srcdir=$ac_top_builddir$srcdir ;;
++    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
+ 
+-# Do not use `cd foo && pwd` to compute absolute paths, because
+-# the directories may not exist.
+-case `pwd` in
+-.) ac_abs_builddir="$ac_dir";;
+-*)
+-  case "$ac_dir" in
+-  .) ac_abs_builddir=`pwd`;;
+-  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+-  *) ac_abs_builddir=`pwd`/"$ac_dir";;
+-  esac;;
+-esac
+-case $ac_abs_builddir in
+-.) ac_abs_top_builddir=${ac_top_builddir}.;;
+-*)
+-  case ${ac_top_builddir}. in
+-  .) ac_abs_top_builddir=$ac_abs_builddir;;
+-  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+-  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+-  esac;;
+-esac
+-case $ac_abs_builddir in
+-.) ac_abs_srcdir=$ac_srcdir;;
+-*)
+-  case $ac_srcdir in
+-  .) ac_abs_srcdir=$ac_abs_builddir;;
+-  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+-  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+-  esac;;
+-esac
+-case $ac_abs_builddir in
+-.) ac_abs_top_srcdir=$ac_top_srcdir;;
+-*)
+-  case $ac_top_srcdir in
+-  .) ac_abs_top_srcdir=$ac_abs_builddir;;
+-  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+-  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+-  esac;;
+-esac
+ 
++  case $ac_mode in
++  :F)
++  #
++  # CONFIG_FILE
++  #
+ 
++_ACEOF
+ 
+-  if test x"$ac_file" != x-; then
+-    { echo "$as_me:$LINENO: creating $ac_file" >&5
+-echo "$as_me: creating $ac_file" >&6;}
+-    rm -f "$ac_file"
+-  fi
+-  # Let's still pretend it is `configure' which instantiates (i.e., don't
+-  # use $as_me), people would be surprised to read:
+-  #    /* config.h.  Generated by config.status.  */
+-  if test x"$ac_file" = x-; then
+-    configure_input=
+-  else
+-    configure_input="$ac_file.  "
+-  fi
+-  configure_input=$configure_input"Generated from `echo $ac_file_in |
+-				     sed 's,.*/,,'` by configure."
+-
+-  # First look for the input files in the build tree, otherwise in the
+-  # src tree.
+-  ac_file_inputs=`IFS=:
+-    for f in $ac_file_in; do
+-      case $f in
+-      -) echo $tmp/stdin ;;
+-      [\\/$]*)
+-	 # Absolute (can't be DOS-style, as IFS=:)
+-	 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+-echo "$as_me: error: cannot find input file: $f" >&2;}
+-   { (exit 1); exit 1; }; }
+-	 echo "$f";;
+-      *) # Relative
+-	 if test -f "$f"; then
+-	   # Build tree
+-	   echo "$f"
+-	 elif test -f "$srcdir/$f"; then
+-	   # Source tree
+-	   echo "$srcdir/$f"
+-	 else
+-	   # /dev/null tree
+-	   { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+-echo "$as_me: error: cannot find input file: $f" >&2;}
+-   { (exit 1); exit 1; }; }
+-	 fi;;
+-      esac
+-    done` || { (exit 1); exit 1; }
++cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
++# 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=
++ac_sed_dataroot='
++/datarootdir/ {
++  p
++  q
++}
++/@datadir@/p
++/@docdir@/p
++/@infodir@/p
++/@localedir@/p
++/@mandir@/p'
++case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
++*datarootdir*) ac_datarootdir_seen=yes;;
++*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
++  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
++$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
++_ACEOF
++cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
++  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
+-cat >>$CONFIG_STATUS <<_ACEOF
+-  sed "$ac_vpsub
++
++# 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 || ac_write_fail=1
++ac_sed_extra="$ac_vpsub
+ $extrasub
+ _ACEOF
+-cat >>$CONFIG_STATUS <<\_ACEOF
++cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ :t
+ /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+-s, at configure_input@,$configure_input,;t t
+-s, at srcdir@,$ac_srcdir,;t t
+-s, at abs_srcdir@,$ac_abs_srcdir,;t t
+-s, at top_srcdir@,$ac_top_srcdir,;t t
+-s, at abs_top_srcdir@,$ac_abs_top_srcdir,;t t
+-s, at builddir@,$ac_builddir,;t t
+-s, at abs_builddir@,$ac_abs_builddir,;t t
+-s, at top_builddir@,$ac_top_builddir,;t t
+-s, at abs_top_builddir@,$ac_abs_top_builddir,;t t
+-" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
+-  rm -f $tmp/stdin
+-  if test x"$ac_file" != x-; then
+-    mv $tmp/out $ac_file
+-  else
+-    cat $tmp/out
+-    rm -f $tmp/out
+-  fi
++s|@configure_input@|$ac_sed_conf_input|;t t
++s&@top_builddir@&$ac_top_builddir_sub&;t t
++s&@top_build_prefix@&$ac_top_build_prefix&;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
++"
++eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
++  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
++
++test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
++  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
++  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
++      "$ac_tmp/out"`; test -z "$ac_out"; } &&
++  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
++which seems to be undefined.  Please make sure it is defined" >&5
++$as_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;}
+ 
+-done
+-_ACEOF
++  rm -f "$ac_tmp/stdin"
++  case $ac_file in
++  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
++  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
++  esac \
++  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
++ ;;
++
++
++
++  esac
++
++done # for ac_tag
+ 
+-cat >>$CONFIG_STATUS <<\_ACEOF
+ 
+-{ (exit 0); exit 0; }
++as_fn_exit 0
+ _ACEOF
+-chmod +x $CONFIG_STATUS
+ ac_clean_files=$ac_clean_files_save
+ 
++test $ac_write_fail = 0 ||
++  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
++
+ 
+ # configure is writing to config.log, and then calls config.status.
+ # config.status does its own redirection, appending to config.log.
+@@ -15271,123 +11918,127 @@
+   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; }
++  $ac_cs_success || as_fn_exit 1
++fi
++if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
++$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+ fi
+ 
+ 
+ 
+ 
+-echo "$as_me:$LINENO: result: " >&5
+-echo "${ECHO_T}" >&6
+-echo "$as_me:$LINENO: result: MapServer is now configured for ${host}" >&5
+-echo "${ECHO_T}MapServer is now configured for ${host}" >&6
+-echo "$as_me:$LINENO: result: " >&5
+-echo "${ECHO_T}" >&6
+-echo "$as_me:$LINENO: result:  -------------- Compiler Info ------------- " >&5
+-echo "${ECHO_T} -------------- Compiler Info ------------- " >&6
+-echo "$as_me:$LINENO: result:   C compiler:                ${CC} ${CFLAGS}" >&5
+-echo "${ECHO_T}  C compiler:                ${CC} ${CFLAGS}" >&6
+-echo "$as_me:$LINENO: result:   C++ compiler:              ${CXX} ${CXXFLAGS}" >&5
+-echo "${ECHO_T}  C++ compiler:              ${CXX} ${CXXFLAGS}" >&6
+-echo "$as_me:$LINENO: result:   Debug:                     ${REPORT_ENABLE_DEBUG}${DEBUG_FLAGS}" >&5
+-echo "${ECHO_T}  Debug:                     ${REPORT_ENABLE_DEBUG}${DEBUG_FLAGS}" >&6
+-echo "$as_me:$LINENO: result:   Generic NINT:              ${USE_NINT}" >&5
+-echo "${ECHO_T}  Generic NINT:              ${USE_NINT}" >&6
+-echo "$as_me:$LINENO: result: " >&5
+-echo "${ECHO_T}" >&6
+-echo "$as_me:$LINENO: result:  -------------- Renderer Settings --------- " >&5
+-echo "${ECHO_T} -------------- Renderer Settings --------- " >&6
+-echo "$as_me:$LINENO: result:   OpenGL support:            ${OGL_ENABLED}" >&5
+-echo "${ECHO_T}  OpenGL support:            ${OGL_ENABLED}" >&6
+-echo "$as_me:$LINENO: result:   zlib support:              ${ZLIB_ENABLED}" >&5
+-echo "${ECHO_T}  zlib support:              ${ZLIB_ENABLED}" >&6
+-echo "$as_me:$LINENO: result:   png support:               ${PNG_ENABLED}" >&5
+-echo "${ECHO_T}  png support:               ${PNG_ENABLED}" >&6
+-echo "$as_me:$LINENO: result:   gif support:               ${GIF_ENABLED}" >&5
+-echo "${ECHO_T}  gif support:               ${GIF_ENABLED}" >&6
+-echo "$as_me:$LINENO: result:   jpeg support:              ${JPEG_ENABLED}" >&5
+-echo "${ECHO_T}  jpeg support:              ${JPEG_ENABLED}" >&6
+-echo "$as_me:$LINENO: result:   freetype support:          ${FT_ENABLED}" >&5
+-echo "${ECHO_T}  freetype support:          ${FT_ENABLED}" >&6
+-echo "$as_me:$LINENO: result:   iconv support:             ${ICONV_ENABLED}" >&5
+-echo "${ECHO_T}  iconv support:             ${ICONV_ENABLED}" >&6
+-echo "$as_me:$LINENO: result:   AGG support:               ${AGG_ENABLED}" >&5
+-echo "${ECHO_T}  AGG support:               ${AGG_ENABLED}" >&6
+-echo "$as_me:$LINENO: result:   SVG Symbol support:        ${AGG_SVG_SYMBOLS_ENABLED}" >&5
+-echo "${ECHO_T}  SVG Symbol support:        ${AGG_SVG_SYMBOLS_ENABLED}" >&6
+-echo "$as_me:$LINENO: result:   Cairo (SVG,PDF) support:   ${CAIRO_ENABLED}" >&5
+-echo "${ECHO_T}  Cairo (SVG,PDF) support:   ${CAIRO_ENABLED}" >&6
+-echo "$as_me:$LINENO: result:   KML support:               ${KML_ENABLED}" >&5
+-echo "${ECHO_T}  KML support:               ${KML_ENABLED}" >&6
+-echo "$as_me:$LINENO: result: " >&5
+-echo "${ECHO_T}" >&6
+-
+-echo "$as_me:$LINENO: result:  -------------- Support Libraries --------- " >&5
+-echo "${ECHO_T} -------------- Support Libraries --------- " >&6
+-echo "$as_me:$LINENO: result:   Proj.4 support:            ${PROJ_ENABLED}" >&5
+-echo "${ECHO_T}  Proj.4 support:            ${PROJ_ENABLED}" >&6
+-echo "$as_me:$LINENO: result:   Libxml2 support:           ${XML2_ENABLED}" >&5
+-echo "${ECHO_T}  Libxml2 support:           ${XML2_ENABLED}" >&6
+-echo "$as_me:$LINENO: result:   FriBidi support:           ${FRIBIDI_ENABLED}" >&5
+-echo "${ECHO_T}  FriBidi support:           ${FRIBIDI_ENABLED}" >&6
+-echo "$as_me:$LINENO: result:   Curl support:              ${CURL_ENABLED}" >&5
+-echo "${ECHO_T}  Curl support:              ${CURL_ENABLED}" >&6
+-echo "$as_me:$LINENO: result:   FastCGI support:           ${FASTCGI_ENABLED}" >&5
+-echo "${ECHO_T}  FastCGI support:           ${FASTCGI_ENABLED}" >&6
+-echo "$as_me:$LINENO: result:   Threading support:         ${THREAD_FLAG}" >&5
+-echo "${ECHO_T}  Threading support:         ${THREAD_FLAG}" >&6
+-echo "$as_me:$LINENO: result:   GEOS support:              ${GEOS_ENABLED}" >&5
+-echo "${ECHO_T}  GEOS support:              ${GEOS_ENABLED}" >&6
+-echo "$as_me:$LINENO: result:   XML Mapfile support:        ${XMLMAPFILE_ENABLED}" >&5
+-echo "${ECHO_T}  XML Mapfile support:        ${XMLMAPFILE_ENABLED}" >&6
+-echo "$as_me:$LINENO: result:   XSLT support:              ${XSLT_ENABLED}" >&5
+-echo "${ECHO_T}  XSLT support:              ${XSLT_ENABLED}" >&6
+-echo "$as_me:$LINENO: result:   EXSLT support:              ${EXSLT_ENABLED}" >&5
+-echo "${ECHO_T}  EXSLT support:              ${EXSLT_ENABLED}" >&6
+-echo "$as_me:$LINENO: result: " >&5
+-echo "${ECHO_T}" >&6
+-
+-echo "$as_me:$LINENO: result:  -------------- Data Format Drivers ------- " >&5
+-echo "${ECHO_T} -------------- Data Format Drivers ------- " >&6
+-echo "$as_me:$LINENO: result:   PostGIS support:           ${POSTGIS_ENABLED}" >&5
+-echo "${ECHO_T}  PostGIS support:           ${POSTGIS_ENABLED}" >&6
+-echo "$as_me:$LINENO: result:   ArcSDE support:            ${SDE_ENABLED}" >&5
+-echo "${ECHO_T}  ArcSDE support:            ${SDE_ENABLED}" >&6
+-echo "$as_me:$LINENO: result:   OGR support:               ${OGR_ENABLED}" >&5
+-echo "${ECHO_T}  OGR support:               ${OGR_ENABLED}" >&6
+-echo "$as_me:$LINENO: result:   GDAL support:              ${GDAL_ENABLED}" >&5
+-echo "${ECHO_T}  GDAL support:              ${GDAL_ENABLED}" >&6
+-echo "$as_me:$LINENO: result:   Oracle Spatial support:    ${ORACLESPATIAL_ENABLED}" >&5
+-echo "${ECHO_T}  Oracle Spatial support:    ${ORACLESPATIAL_ENABLED}" >&6
+-echo "$as_me:$LINENO: result: " >&5
+-echo "${ECHO_T}" >&6
+-
+-echo "$as_me:$LINENO: result:  -------------- OGC Services -------------- " >&5
+-echo "${ECHO_T} -------------- OGC Services -------------- " >&6
+-echo "$as_me:$LINENO: result:   WMS Server:                ${WMS_SVR_ENABLED}" >&5
+-echo "${ECHO_T}  WMS Server:                ${WMS_SVR_ENABLED}" >&6
+-echo "$as_me:$LINENO: result:   WMS Client:                ${WMS_LYR_ENABLED}" >&5
+-echo "${ECHO_T}  WMS Client:                ${WMS_LYR_ENABLED}" >&6
+-echo "$as_me:$LINENO: result:   WFS Server:                ${WFS_SVR_ENABLED}" >&5
+-echo "${ECHO_T}  WFS Server:                ${WFS_SVR_ENABLED}" >&6
+-echo "$as_me:$LINENO: result:   WFS Client:                ${WFS_LYR_ENABLED}" >&5
+-echo "${ECHO_T}  WFS Client:                ${WFS_LYR_ENABLED}" >&6
+-echo "$as_me:$LINENO: result:   WCS Server:                ${WCS_SVR_ENABLED}" >&5
+-echo "${ECHO_T}  WCS Server:                ${WCS_SVR_ENABLED}" >&6
+-echo "$as_me:$LINENO: result:   SOS Server:                ${SOS_SVR_ENABLED}" >&5
+-echo "${ECHO_T}  SOS Server:                ${SOS_SVR_ENABLED}" >&6
+-echo "$as_me:$LINENO: result: " >&5
+-echo "${ECHO_T}" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
++$as_echo "" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MapServer is now configured for ${host}" >&5
++$as_echo "MapServer is now configured for ${host}" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
++$as_echo "" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result:  -------------- Compiler Info ------------- " >&5
++$as_echo " -------------- Compiler Info ------------- " >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   C compiler:                ${CC} ${CFLAGS}" >&5
++$as_echo "  C compiler:                ${CC} ${CFLAGS}" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   C++ compiler:              ${CXX} ${CXXFLAGS}" >&5
++$as_echo "  C++ compiler:              ${CXX} ${CXXFLAGS}" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   Debug:                     ${REPORT_ENABLE_DEBUG}${DEBUG_FLAGS}" >&5
++$as_echo "  Debug:                     ${REPORT_ENABLE_DEBUG}${DEBUG_FLAGS}" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   Generic NINT:              ${USE_NINT}" >&5
++$as_echo "  Generic NINT:              ${USE_NINT}" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
++$as_echo "" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result:  -------------- Renderer Settings --------- " >&5
++$as_echo " -------------- Renderer Settings --------- " >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   OpenGL support:            ${OGL_ENABLED}" >&5
++$as_echo "  OpenGL support:            ${OGL_ENABLED}" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   zlib support:              ${ZLIB_ENABLED}" >&5
++$as_echo "  zlib support:              ${ZLIB_ENABLED}" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   png support:               ${PNG_ENABLED}" >&5
++$as_echo "  png support:               ${PNG_ENABLED}" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   gif support:               ${GIF_ENABLED}" >&5
++$as_echo "  gif support:               ${GIF_ENABLED}" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   jpeg support:              ${JPEG_ENABLED}" >&5
++$as_echo "  jpeg support:              ${JPEG_ENABLED}" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   freetype support:          ${FT_ENABLED}" >&5
++$as_echo "  freetype support:          ${FT_ENABLED}" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   iconv support:             ${ICONV_ENABLED}" >&5
++$as_echo "  iconv support:             ${ICONV_ENABLED}" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   AGG support:               ${AGG_ENABLED}" >&5
++$as_echo "  AGG support:               ${AGG_ENABLED}" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   SVG Symbol support:        ${AGG_SVG_SYMBOLS_ENABLED}" >&5
++$as_echo "  SVG Symbol support:        ${AGG_SVG_SYMBOLS_ENABLED}" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   Cairo (SVG,PDF) support:   ${CAIRO_ENABLED}" >&5
++$as_echo "  Cairo (SVG,PDF) support:   ${CAIRO_ENABLED}" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   KML support:               ${KML_ENABLED}" >&5
++$as_echo "  KML support:               ${KML_ENABLED}" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
++$as_echo "" >&6; }
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result:  -------------- Support Libraries --------- " >&5
++$as_echo " -------------- Support Libraries --------- " >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   Proj.4 support:            ${PROJ_ENABLED}" >&5
++$as_echo "  Proj.4 support:            ${PROJ_ENABLED}" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   Libxml2 support:           ${XML2_ENABLED}" >&5
++$as_echo "  Libxml2 support:           ${XML2_ENABLED}" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   FriBidi support:           ${FRIBIDI_ENABLED}" >&5
++$as_echo "  FriBidi support:           ${FRIBIDI_ENABLED}" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   Curl support:              ${CURL_ENABLED}" >&5
++$as_echo "  Curl support:              ${CURL_ENABLED}" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   FastCGI support:           ${FASTCGI_ENABLED}" >&5
++$as_echo "  FastCGI support:           ${FASTCGI_ENABLED}" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   Threading support:         ${THREAD_FLAG}" >&5
++$as_echo "  Threading support:         ${THREAD_FLAG}" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   GEOS support:              ${GEOS_ENABLED}" >&5
++$as_echo "  GEOS support:              ${GEOS_ENABLED}" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   XML Mapfile support:        ${XMLMAPFILE_ENABLED}" >&5
++$as_echo "  XML Mapfile support:        ${XMLMAPFILE_ENABLED}" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   XSLT support:              ${XSLT_ENABLED}" >&5
++$as_echo "  XSLT support:              ${XSLT_ENABLED}" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   EXSLT support:              ${EXSLT_ENABLED}" >&5
++$as_echo "  EXSLT support:              ${EXSLT_ENABLED}" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
++$as_echo "" >&6; }
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result:  -------------- Data Format Drivers ------- " >&5
++$as_echo " -------------- Data Format Drivers ------- " >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   PostGIS support:           ${POSTGIS_ENABLED}" >&5
++$as_echo "  PostGIS support:           ${POSTGIS_ENABLED}" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   ArcSDE support:            ${SDE_ENABLED}" >&5
++$as_echo "  ArcSDE support:            ${SDE_ENABLED}" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   OGR support:               ${OGR_ENABLED}" >&5
++$as_echo "  OGR support:               ${OGR_ENABLED}" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   GDAL support:              ${GDAL_ENABLED}" >&5
++$as_echo "  GDAL support:              ${GDAL_ENABLED}" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   Oracle Spatial support:    ${ORACLESPATIAL_ENABLED}" >&5
++$as_echo "  Oracle Spatial support:    ${ORACLESPATIAL_ENABLED}" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
++$as_echo "" >&6; }
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result:  -------------- OGC Services -------------- " >&5
++$as_echo " -------------- OGC Services -------------- " >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   WMS Server:                ${WMS_SVR_ENABLED}" >&5
++$as_echo "  WMS Server:                ${WMS_SVR_ENABLED}" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   WMS Client:                ${WMS_LYR_ENABLED}" >&5
++$as_echo "  WMS Client:                ${WMS_LYR_ENABLED}" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   WFS Server:                ${WFS_SVR_ENABLED}" >&5
++$as_echo "  WFS Server:                ${WFS_SVR_ENABLED}" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   WFS Client:                ${WFS_LYR_ENABLED}" >&5
++$as_echo "  WFS Client:                ${WFS_LYR_ENABLED}" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   WCS Server:                ${WCS_SVR_ENABLED}" >&5
++$as_echo "  WCS Server:                ${WCS_SVR_ENABLED}" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result:   SOS Server:                ${SOS_SVR_ENABLED}" >&5
++$as_echo "  SOS Server:                ${SOS_SVR_ENABLED}" >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
++$as_echo "" >&6; }
+ 
+-echo "$as_me:$LINENO: result:  -------------- MapScript ----------------- " >&5
+-echo "${ECHO_T} -------------- MapScript ----------------- " >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result:  -------------- MapScript ----------------- " >&5
++$as_echo " -------------- MapScript ----------------- " >&6; }
+ if test -n "${PHP_SRC_DIR}"; then
+-  echo "$as_me:$LINENO: result:   PHP MapScript:             yes" >&5
+-echo "${ECHO_T}  PHP MapScript:             yes" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result:   PHP MapScript:             yes" >&5
++$as_echo "  PHP MapScript:             yes" >&6; }
+ else
+-  echo "$as_me:$LINENO: result:   PHP MapScript:             no" >&5
+-echo "${ECHO_T}  PHP MapScript:             no" >&6
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result:   PHP MapScript:             no" >&5
++$as_echo "  PHP MapScript:             no" >&6; }
+ fi
+ 
+-echo "$as_me:$LINENO: result: " >&5
+-echo "${ECHO_T}" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
++$as_echo "" >&6; }
+diff -urN mapserver-6.0.1.orig/configure.in mapserver-6.0.1/configure.in
+--- mapserver-6.0.1.orig/configure.in	2011-12-08 22:50:36.000000000 +0000
++++ mapserver-6.0.1/configure.in	2012-01-21 04:10:35.000000000 +0000
+@@ -669,41 +669,9 @@
+       AC_MSG_ERROR([Could not find gd.h or libgd.a/libgd.so in $GD_DIR.  Make sure GD 2.0.28 or higher is compiled before calling configure. You may also get this error if you didn't specify the appropriate location for one of GD's dependencies (freetype, libpng, libjpeg or libiconv).])
+   fi
+ else
+-  dnl  --with-gd specified without a DIR, look for gd in system dirs /usr or /usr/local
+-  FOUND_GD="false"
+-  for GD_DIR in /usr /usr/local
+-  do
+-    test -f $GD_DIR/include/gd.h && GD_INCLUDE="$GD_DIR/include"
+-    test -f $GD_DIR/lib/libgd.a && GD_LIBDIR="$GD_DIR/lib"
+-    test -f $GD_DIR/lib64/libgd.a && GD_LIBDIR="$GD_DIR/lib64"
+-    test -f $GD_DIR/lib/libgd.so -o -f $GD_DIR/lib/libgd.sl -o -f $GD_DIR/lib/libgd.dylib && GD_LIBDIR="$GD_DIR/lib"
+-    test -f $GD_DIR/lib64/libgd.so -o -f $GD_DIR/lib/libgd.sl && GD_LIBDIR="$GD_DIR/lib64"
+-
+-    dnl make sure it is GD 2.0.28 or higher
+-    AC_CHECK_LIB(gd, gdImageCreatePaletteFromTrueColor, IS_GD2="true",,$GD_XTRA_LIBS)
+- 
+-    if test "$IS_GD2" = "false" -a -n "$ICONV_LIB"; then
+-      dnl try again including libiconv this time
+-      AC_CHECKING(whether GD needs libiconv)
+-      unset ac_cv_lib_gd_gdImageCreatePaletteFromTrueColor
+-      AC_CHECK_LIB(gd, gdImageCreatePaletteFromTrueColor,IS_GD2="true",,$GD_XTRA_LIBS $ICONV_LIB)
+-      GD_NEED_ICONV_LIB="$ICONV_LIB"
+-    fi
+-
+-    if test -n "$GD_INCLUDE" -a -n "$GD_LIBDIR" -a "$IS_GD2" = "true"; then
+-      GD_INC=-I$GD_INCLUDE
+-      GD_LIB="-L$GD_LIBDIR -lgd"
+-      GD_XTRA_LIBS="$GD_XTRA_LIBS $GD_NEED_ICONV_LIB"
+-      AC_MSG_RESULT([        using libgd 2.0.28 (or higher) from system libs ($GD_LIB $GD_XTRA_LIBS).])
+-      AC_ADD_RUNPATH("$GD_LIBDIR")
+-      FOUND_GD="true"
+-      break;
+-    fi
+-  done
+-
+-  if test "$FOUND_GD" = "false" ; then
+-    AC_MSG_ERROR([Could not find gd.h or libgd.a/libgd.so in $GD_DIR.  Make sure GD 2.0.28 or higher is compiled before calling configure. You may also get this error if you didn't specify the appropriate location for one of GD's dependencies (freetype, libpng, libjpeg or libiconv).])
+-  fi
++  dnl  --with-gd specified without a DIR, look for gd in system dirs
++  AC_CHECK_LIB(gd, gdImageCreatePaletteFromTrueColor,,AC_MSG_ERROR(["cannot find GD library"]))
++  AC_CHECK_HEADER(gd.h,,AC_MSG_ERROR(["cannot find GD headers"]))
+ fi
+ 
+ dnl ----------------------------------------------------------------------
diff --git a/debian/patches/series b/debian/patches/series
index 8b13789..5fdfefb 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
-
+fix-jpeg-gd-detection.patch
+cve-2013-7262.patch
diff --git a/debian/rules b/debian/rules
index a04fff0..f792a84 100755
--- a/debian/rules
+++ b/debian/rules
@@ -29,12 +29,12 @@ COMMON_CONFIG=	--prefix=/usr \
 		--enable-debug \
 		--without-tiff \
 		--without-pdf \
-		--with-gd=/usr \
-		--with-freetype=/usr \
+		--with-gd \
+		--with-freetype \
 		--with-fribidi-config \
-		--with-zlib=/usr \
-		--with-xpm=/usr \
-		--with-jpeg=/usr \
+		--with-zlib \
+		--with-xpm \
+		--with-jpeg \
 		--with-gdal \
 		--with-ogr \
 		--with-proj \

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/mapserver.git



More information about the Pkg-grass-devel mailing list