diff -pruN 6.0.1-2/configure 6.0.1-2ubuntu1/configure
--- 6.0.1-2/configure	2011-12-08 22:50:36.000000000 +0000
+++ 6.0.1-2ubuntu1/configure	2012-01-21 09:00:41.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@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_Letters=$as_cr_letters$as_cr_LETTE
 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_cpp="eval sed 'y%*$as_cr_letters%P
 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_TARNAME=
 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_PIC STRINGS MS_VERSION PKG_CONFIG FT_BIN FT_ENABLED FT_INC FT_LIB ZLIB_ENABLED ZLIB_INC ZLIB_LIB PNG_ENABLED PNG_INC PNG_LIB GIF_ENABLED GIF_INC GIF_LIB JPEG_ENABLED JPEG_INC JPEG_LIB ICONV_ENABLED ICONV_INC ICONV_LIB GD_DEF GD_INC GD_LIB GD_STATIC MAKE_GD MAKE_GD_CLEAN FTGL_ENABLED FTGL_INC FTGL_LIB OGL_ENABLED OGL_INC OGL_LIB AGG_LIB AGG_INC AGG_OBJ PROJ_ENABLED PROJ_INC PROJ_LIBS THREAD_FLAG THREAD_LIB SDE_ENABLED SDE_INC SDE_LIB GEOS_CONFIG GEOS_ENABLED GEOS_INC GEOS_LIB GDAL_CONFIG GDAL_ENABLED OGR_ENABLED GDAL_INC GDAL_LIB PG_CONFIG POSTGIS_ENABLED POSTGIS_INC POSTGIS_LIB MY_CONFIG MYSQL_ENABLED MYSQL_INC MYSQL_LIB ORACLESPATIAL_ENABLED ORACLESPATIAL_INC ORACLESPATIAL_LIB WMS_SVR_ENABLED WFS_SVR_ENABLED WCS_SVR_ENABLED LIBCURL_CONFIG CURL_INC CURL_LIB LIBXML2_CONFIG XML2_INC XML2_LIB WMS_LYR_ENABLED WFS_LYR_ENABLED SOS_SVR_ENABLED XSLT_ENABLED XSLT_INC XSLT_LIB EXSLT_ENABLED EXSLT_INC EXSLT_LIB FRIBIDI_CONFIG FRIBIDI_ENABLED FRIBIDI_INC FRIBIDI_LIB CAIRO_ENABLED CAIRO_INC CAIRO_LIB FASTCGI_ENABLED FASTCGI_INC FASTCGI_LIB HTTPD MS_INC MS_LIB IGNORE_MISSING_DATA USE_POINT_Z_M USE_NINT DEBUG_FLAGS LD_SHARED SO_EXT SO_COMMAND_NAME PHP_LD_SHARED PHP_VERSION_FLAG PHP_SRC_DIR PHP_CC PHP_LD PHP_REGEX_INC PHP_REGEX_OBJ USE_PHP_REGEX MAKE_PHPMS MAKE_PHPMS_CLEAN APACHE_INC OS_INCLUDE_DIR ALL_ENABLED ALL_INC ALL_LIB ALL_STATIC_LIB RPATHS LIBOBJS LTLIBOBJS'
+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 @@ x_libraries=NONE
 # 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 @@ do
   --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 @@ do
   -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 @@ do
   | --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 @@ do
   | --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 @@ do
     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 @@ do
   | --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 @@ done
 
 if test -n "$ac_prev"; then
   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
-  { echo "$as_me: error: missing argument to $ac_option" >&2
-   { (exit 1); exit 1; }; }
+  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 @@ target=$target_alias
 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 -n "$host_alias" && ac_tool_prefix=
 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 @@ Configuration:
       --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 instance \`--prefix=\$HOME'.
 For better control, use the options below.
 
 Fine tuning of the installation directories:
-  --bindir=DIR           user executables [EPREFIX/bin]
-  --sbindir=DIR          system admin executables [EPREFIX/sbin]
-  --libexecdir=DIR       program executables [EPREFIX/libexec]
-  --datadir=DIR          read-only architecture-independent data [PREFIX/share]
-  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
-  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
-  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
-  --libdir=DIR           object code libraries [EPREFIX/lib]
-  --includedir=DIR       C header files [PREFIX/include]
-  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
-  --infodir=DIR          info documentation [PREFIX/info]
-  --mandir=DIR           man documentation [PREFIX/man]
+  --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 @@ if test -n "$ac_init_help"; then
   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 @@ Some influential environment variables:
   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 @@ _ACEOF
 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 @@ do
     -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 @@ do
 	  -* ) 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 @@ cat >>confdefs.h <<_ACEOF
 #define PACKAGE_NAME "$PACKAGE_NAME"
 _ACEOF
 
-
 cat >>confdefs.h <<_ACEOF
 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
 _ACEOF
 
-
 cat >>confdefs.h <<_ACEOF
 #define PACKAGE_VERSION "$PACKAGE_VERSION"
 _ACEOF
 
-
 cat >>confdefs.h <<_ACEOF
 #define PACKAGE_STRING "$PACKAGE_STRING"
 _ACEOF
 
-
 cat >>confdefs.h <<_ACEOF
 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
 _ACEOF
 
+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_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -1419,10 +2462,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
 set dummy ${ac_tool_prefix}gcc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $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 @@ 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
+    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 @@ 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
+    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 @@ 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
+    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 @@ 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
+    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
 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 @@ 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
+    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 @@ 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
+    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 @@ main ()
 }
 _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 @@ if { (eval echo "$as_me:$LINENO: \"$ac_l
 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 @@ main ()
 }
 _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 @@ main ()
   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 @@ main ()
   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 @@ else
     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 @@ static char *f (char * (*g) (char **, in
 /* 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 f (e, argv, 0) != argv[0]  ||  f 
   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 @@ 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
+    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 @@ 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
+    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 @@ main ()
   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 @@ main ()
   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 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 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 @@ 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
+    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 @@ 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
+    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 @@ for ac_prog in flex lex
 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 @@ 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
+    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 @@ 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
+    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 @@ 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 :
   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 @@ 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 :
   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 @@ 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 :
   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 "${ECHO_T}$php_cv_cc_dashwlr" >&6
 
 
 
-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_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
-echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
-echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
+{ $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 @@ do
   # <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 @@ cat >>conftest.$ac_ext <<_ACEOF
 #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 @@ fi
 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 @@ do
   # <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 @@ cat >>conftest.$ac_ext <<_ACEOF
 #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_link='$CC -o conftest$ac_exeext $CFLA
 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 @@ main ()
   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 @@ fi
 
 if test $ac_cv_header_stdc = yes; then
   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  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 @@ fi
 
 if test $ac_cv_header_stdc = yes; then
   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-  if test "$cross_compiling" = yes; then
+  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 @@ main ()
   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 @@ fi
 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 @@ STRINGS=$STRINGS
 
 
 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 @@ if test "$PKG_CONFIG" = "yes" ; then
 
    # Extract the first word of "pkg-config", so it can be a program name with args.
 set dummy pkg-config; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $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 @@ 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
+    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_freetype_FT_Init_FreeTyp
 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 @@ 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
+    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 @@ else
     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 @@ _libs="$LIBS"
 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 @@ _ACEOF
   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 @@ fi
 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 @@ ALL_LIB="$FT_LDFLAGS $ALL_LIB"
 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 @@ fi;
     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 @@ if test -n "$ZLIB_LIBDIR" -a -n "$ZLIB_I
         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 @@ echo "${ECHO_T}        using libz from $
 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 @@ echo "${ECHO_T}        using runtime lib
 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 @@ ALL_LIB="$ZLIB_LIB $ALL_LIB"
 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 @@ fi;
     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_DIR" ; then
 
     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 @@ echo "${ECHO_T}        using libpng from
       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 @@ PNG_LIB=$PNG_LIB
 
 
 
-# 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 @@ fi;
     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_DIR" -a "GIF_DIR" != "y
 
     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 @@ echo "${ECHO_T}        using libgif from
   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 @@ GIF_LIB=$GIF_LIB
 
 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 @@ if test -n "$with_jpeg" -a "$with_jpeg" 
   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 @@ echo "$as_me: error: \"Could not find jp
     _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 @@ fi
     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 @@ _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
+  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 @@ JPEG_LIB=$JPEG_LIB
 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 @@ if test "$with_xpm" != "no" ; then
     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 @@ echo "$as_me: checking where libXpm is i
   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 @@ echo "${ECHO_T}        using libXpm from
   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_iconv_iconv_open
 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 @@ if test -n "$ICONV_DIR" ; then
   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_LIB" ; then
   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 @@ else
 
   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_gdImageGifPtr
 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 @@ elif test -n "$with_gd" -a "$with_gd" !=
   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 @@ fi
       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 @@ echo "${ECHO_T}        using libgd 2.0.2
   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 @@ if test -n "$with_gd" -a "$with_gd" != "
             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 @@ fi
     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
   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 @@ fi
      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 @@ fi
   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 @@ fi
   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
   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 @@ fi
 
   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 @@ LIBS="$ms_saved_LIBS"
 
 
 
-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 @@ if test -n "$with_ftgl" -a "$with_ftgl" 
   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 @@ echo "$as_me: error: \"could not find ft
   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 @@ echo "$as_me: error: \"could not find li
   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 @@ ALL_LIB="$FTGL_LIB $ALL_LIB"
 
 
 
-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 @@ echo "$as_me: error: FTGL required for o
   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 @@ echo "$as_me: error: \"could not find gl
   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 @@ echo "$as_me: error: \"could not find li
   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 @@ ALL_LIB="$OGL_LIB $ALL_LIB"
 
 
 
-# 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 @@ fi;
     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_DIR" ; then
 
     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 @@ echo "${ECHO_T}        using libexpat fr
   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 renderers/agg/src/agg_vpgen_clip_polyline.o renderers/agg/src/agg_font_freetype.o"
 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 @@ if test "$with_agg_svg_symbols" != "no" 
         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_init
 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 @@ fi
 
 
   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 @@ elif test -n "$with_proj" -a "$with_proj
   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 @@ ALL_LIB="$PROJ_LIBS $ALL_LIB"
 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 @@ elif test -n "$with_threads" -a "$with_t
   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_ENABLED="$THREAD_FLAG $ALL_ENABLED"
 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 @@ elif test -n "$with_sde" -a "$with_sde" 
   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
   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_INC="$SDE_INC $ALL_INC"
 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 @@ echo "${ECHO_T}yes" >&6
 
     # 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 @@ 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
+    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 @@ echo $ECHO_N "checking for GEOS version 
   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 @@ echo "$as_me: error: geos-config reports
 
 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 @@ fi
 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 @@ 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
+    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 -n "$GDAL_CONFIG" -a "$with_ogr"
 
   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 @@ echo "${ECHO_T}yes" >&6
   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 @@ 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
+    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 @@ elif test -n "$with_gdal" -a "$with_gdal
   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 @@ ALL_LIB="$GDAL_LIB $ALL_LIB"
 
 
 
-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 @@ 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
+    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 @@ else
   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 @@ echo "$as_me: error: '$PG_CONFIG' is not
   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 @@ fi
     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_INC="$POSTGIS_INC $ALL_INC"
 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 @@ 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
+    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 @@ if test "$MY_CONFIG" = "no" ; then
   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_INC="$MYSQL_INC $ALL_INC"
 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 @@ else
   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 @@ echo "$as_me: error: Oracle Spatial: lib
   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 @@ ALL_LIB="$ORACLESPATIAL_LIB $ALL_LIB"
 
 
 
-{ 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 @@ ALL_ENABLED="$WMS_SVR_ENABLED $ALL_ENABL
 
 
 
-{ 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 @@ ALL_ENABLED="$WFS_SVR_ENABLED $ALL_ENABL
 
 
 
-{ 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 @@ ALL_ENABLED="$WCS_SVR_ENABLED $ALL_ENABL
 
 
 
-{ 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 @@ elif test "$with_wmsclient" = "yes" ; th
 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 @@ elif test "$with_wfsclient" = "yes" ; th
 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 "$WMS_REQUESTED" = "yes" -o "$WF
   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 @@ 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
+    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 @@ ALL_LIB="$CURL_LIB $ALL_LIB"
 
 
 
-# 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 @@ unset ac_cv_path_LIBXML2_CONFIG
 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 "$with_xml2_config" != "no" ; th
   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 @@ 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
+    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 @@ ALL_ENABLED="$WMS_LYR_ENABLED $WFS_LYR_E
 
 
 
-# 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 @@ else
                 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 @@ echo "${ECHO_T}using xslt from $XSLT_LIB
 
 
   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 @@ ALL_LIB="$XSLT_LIB $ALL_LIB"
 
 
 
-# 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 @@ else
                 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 @@ echo "${ECHO_T}using exslt from $EXSLT_L
   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 @@ ALL_LIB="$EXSLT_LIB $ALL_LIB"
 
 
 
-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 @@ 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
+    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 @@ if test "$FRIBIDI_CONFIG" = "no" ; then
   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 @@ ALL_LIB="$FRIBIDI_LIB $ALL_LIB"
 
 
 
-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 @@ if test "$CAIRO_CONFIG" = "no" ; then
   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_INC="$CAIRO_INC $ALL_INC"
 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 @@ echo "${ECHO_T}requested." >&6
     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_INC="$FASTCGI_INC $ALL_INC"
 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 @@ else
                 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 @@ for as_dir in $as_dummy
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $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 @@ MS_LIB=$MS_LIB
 
 
 
-# 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 @@ ALL_ENABLED="$USE_POINT_Z_M $ALL_ENABLED
 
 
 
-# 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 @@ else
 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 @@ ALL_ENABLED="$DEBUG_FLAGS $ALL_ENABLED"
 
 
 
-# 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 -n "$with_php" -a -d "$with_php"
 
 
   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 @@ rm -f perl.out
         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 @@ echo "$as_me: error: ERROR: Cannot use -
   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_SHARED=$PHP_LD_SHARED
     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 @@ echo "${ECHO_T}no" >&6
   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 @@ if test "x$LD_SHARED" = "x" ; then
   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 @@ fi
 
 
 
-# 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 @@ echo "$as_me: error: --with-apxs applies
   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 @@ echo "$as_me: error: --with-apache appli
   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 @@ APACHE_INC=$APACHE_INC
 
 
 
-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 @@ case "${OUR_OSNAME}" in
 [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 @@ ALL_STATIC_LIB=$ALL_STATIC_LIB
 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 @@ _ACEOF
 
 # The following way of writing the cache mishandles newlines in values,
 # but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
+# 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 @@ LTLIBOBJS=$ac_ltlibobjs
 
 
 
-: ${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 @@ cat >$CONFIG_STATUS <<_ACEOF
 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_Letters=$as_cr_letters$as_cr_LETTE
 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_cpp="eval sed 'y%*$as_cr_letters%P
 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 @@ generated by GNU Autoconf 2.59.  Invocat
   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@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 @@ if $ac_cs_silent; then
 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 @@ if $ac_need_defaults; then
 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,@SHELL@,$SHELL,;t t
-s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
-s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
-s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
-s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
-s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
-s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
-s,@exec_prefix@,$exec_prefix,;t t
-s,@prefix@,$prefix,;t t
-s,@program_transform_name@,$program_transform_name,;t t
-s,@bindir@,$bindir,;t t
-s,@sbindir@,$sbindir,;t t
-s,@libexecdir@,$libexecdir,;t t
-s,@datadir@,$datadir,;t t
-s,@sysconfdir@,$sysconfdir,;t t
-s,@sharedstatedir@,$sharedstatedir,;t t
-s,@localstatedir@,$localstatedir,;t t
-s,@libdir@,$libdir,;t t
-s,@includedir@,$includedir,;t t
-s,@oldincludedir@,$oldincludedir,;t t
-s,@infodir@,$infodir,;t t
-s,@mandir@,$mandir,;t t
-s,@build_alias@,$build_alias,;t t
-s,@host_alias@,$host_alias,;t t
-s,@target_alias@,$target_alias,;t t
-s,@DEFS@,$DEFS,;t t
-s,@ECHO_C@,$ECHO_C,;t t
-s,@ECHO_N@,$ECHO_N,;t t
-s,@ECHO_T@,$ECHO_T,;t t
-s,@LIBS@,$LIBS,;t t
-s,@CC@,$CC,;t t
-s,@CFLAGS@,$CFLAGS,;t t
-s,@LDFLAGS@,$LDFLAGS,;t t
-s,@CPPFLAGS@,$CPPFLAGS,;t t
-s,@ac_ct_CC@,$ac_ct_CC,;t t
-s,@EXEEXT@,$EXEEXT,;t t
-s,@OBJEXT@,$OBJEXT,;t t
-s,@CXX@,$CXX,;t t
-s,@CXXFLAGS@,$CXXFLAGS,;t t
-s,@ac_ct_CXX@,$ac_ct_CXX,;t t
-s,@RANLIB@,$RANLIB,;t t
-s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
-s,@LEX@,$LEX,;t t
-s,@LEXLIB@,$LEXLIB,;t t
-s,@LEX_OUTPUT_ROOT@,$LEX_OUTPUT_ROOT,;t t
-s,@YACC@,$YACC,;t t
-s,@XTRALIBS@,$XTRALIBS,;t t
-s,@CPP@,$CPP,;t t
-s,@EGREP@,$EGREP,;t t
-s,@C_PIC@,$C_PIC,;t t
-s,@STRINGS@,$STRINGS,;t t
-s,@MS_VERSION@,$MS_VERSION,;t t
-s,@PKG_CONFIG@,$PKG_CONFIG,;t t
-s,@FT_BIN@,$FT_BIN,;t t
-s,@FT_ENABLED@,$FT_ENABLED,;t t
-s,@FT_INC@,$FT_INC,;t t
-s,@FT_LIB@,$FT_LIB,;t t
-s,@ZLIB_ENABLED@,$ZLIB_ENABLED,;t t
-s,@ZLIB_INC@,$ZLIB_INC,;t t
-s,@ZLIB_LIB@,$ZLIB_LIB,;t t
-s,@PNG_ENABLED@,$PNG_ENABLED,;t t
-s,@PNG_INC@,$PNG_INC,;t t
-s,@PNG_LIB@,$PNG_LIB,;t t
-s,@GIF_ENABLED@,$GIF_ENABLED,;t t
-s,@GIF_INC@,$GIF_INC,;t t
-s,@GIF_LIB@,$GIF_LIB,;t t
-s,@JPEG_ENABLED@,$JPEG_ENABLED,;t t
-s,@JPEG_INC@,$JPEG_INC,;t t
-s,@JPEG_LIB@,$JPEG_LIB,;t t
-s,@ICONV_ENABLED@,$ICONV_ENABLED,;t t
-s,@ICONV_INC@,$ICONV_INC,;t t
-s,@ICONV_LIB@,$ICONV_LIB,;t t
-s,@GD_DEF@,$GD_DEF,;t t
-s,@GD_INC@,$GD_INC,;t t
-s,@GD_LIB@,$GD_LIB,;t t
-s,@GD_STATIC@,$GD_STATIC,;t t
-s,@MAKE_GD@,$MAKE_GD,;t t
-s,@MAKE_GD_CLEAN@,$MAKE_GD_CLEAN,;t t
-s,@FTGL_ENABLED@,$FTGL_ENABLED,;t t
-s,@FTGL_INC@,$FTGL_INC,;t t
-s,@FTGL_LIB@,$FTGL_LIB,;t t
-s,@OGL_ENABLED@,$OGL_ENABLED,;t t
-s,@OGL_INC@,$OGL_INC,;t t
-s,@OGL_LIB@,$OGL_LIB,;t t
-s,@AGG_LIB@,$AGG_LIB,;t t
-s,@AGG_INC@,$AGG_INC,;t t
-s,@AGG_OBJ@,$AGG_OBJ,;t t
-s,@PROJ_ENABLED@,$PROJ_ENABLED,;t t
-s,@PROJ_INC@,$PROJ_INC,;t t
-s,@PROJ_LIBS@,$PROJ_LIBS,;t t
-s,@THREAD_FLAG@,$THREAD_FLAG,;t t
-s,@THREAD_LIB@,$THREAD_LIB,;t t
-s,@SDE_ENABLED@,$SDE_ENABLED,;t t
-s,@SDE_INC@,$SDE_INC,;t t
-s,@SDE_LIB@,$SDE_LIB,;t t
-s,@GEOS_CONFIG@,$GEOS_CONFIG,;t t
-s,@GEOS_ENABLED@,$GEOS_ENABLED,;t t
-s,@GEOS_INC@,$GEOS_INC,;t t
-s,@GEOS_LIB@,$GEOS_LIB,;t t
-s,@GDAL_CONFIG@,$GDAL_CONFIG,;t t
-s,@GDAL_ENABLED@,$GDAL_ENABLED,;t t
-s,@OGR_ENABLED@,$OGR_ENABLED,;t t
-s,@GDAL_INC@,$GDAL_INC,;t t
-s,@GDAL_LIB@,$GDAL_LIB,;t t
-s,@PG_CONFIG@,$PG_CONFIG,;t t
-s,@POSTGIS_ENABLED@,$POSTGIS_ENABLED,;t t
-s,@POSTGIS_INC@,$POSTGIS_INC,;t t
-s,@POSTGIS_LIB@,$POSTGIS_LIB,;t t
-s,@MY_CONFIG@,$MY_CONFIG,;t t
-s,@MYSQL_ENABLED@,$MYSQL_ENABLED,;t t
-s,@MYSQL_INC@,$MYSQL_INC,;t t
-s,@MYSQL_LIB@,$MYSQL_LIB,;t t
-s,@ORACLESPATIAL_ENABLED@,$ORACLESPATIAL_ENABLED,;t t
-s,@ORACLESPATIAL_INC@,$ORACLESPATIAL_INC,;t t
-s,@ORACLESPATIAL_LIB@,$ORACLESPATIAL_LIB,;t t
-s,@WMS_SVR_ENABLED@,$WMS_SVR_ENABLED,;t t
-s,@WFS_SVR_ENABLED@,$WFS_SVR_ENABLED,;t t
-s,@WCS_SVR_ENABLED@,$WCS_SVR_ENABLED,;t t
-s,@LIBCURL_CONFIG@,$LIBCURL_CONFIG,;t t
-s,@CURL_INC@,$CURL_INC,;t t
-s,@CURL_LIB@,$CURL_LIB,;t t
-s,@LIBXML2_CONFIG@,$LIBXML2_CONFIG,;t t
-s,@XML2_INC@,$XML2_INC,;t t
-s,@XML2_LIB@,$XML2_LIB,;t t
-s,@WMS_LYR_ENABLED@,$WMS_LYR_ENABLED,;t t
-s,@WFS_LYR_ENABLED@,$WFS_LYR_ENABLED,;t t
-s,@SOS_SVR_ENABLED@,$SOS_SVR_ENABLED,;t t
-s,@XSLT_ENABLED@,$XSLT_ENABLED,;t t
-s,@XSLT_INC@,$XSLT_INC,;t t
-s,@XSLT_LIB@,$XSLT_LIB,;t t
-s,@EXSLT_ENABLED@,$EXSLT_ENABLED,;t t
-s,@EXSLT_INC@,$EXSLT_INC,;t t
-s,@EXSLT_LIB@,$EXSLT_LIB,;t t
-s,@FRIBIDI_CONFIG@,$FRIBIDI_CONFIG,;t t
-s,@FRIBIDI_ENABLED@,$FRIBIDI_ENABLED,;t t
-s,@FRIBIDI_INC@,$FRIBIDI_INC,;t t
-s,@FRIBIDI_LIB@,$FRIBIDI_LIB,;t t
-s,@CAIRO_ENABLED@,$CAIRO_ENABLED,;t t
-s,@CAIRO_INC@,$CAIRO_INC,;t t
-s,@CAIRO_LIB@,$CAIRO_LIB,;t t
-s,@FASTCGI_ENABLED@,$FASTCGI_ENABLED,;t t
-s,@FASTCGI_INC@,$FASTCGI_INC,;t t
-s,@FASTCGI_LIB@,$FASTCGI_LIB,;t t
-s,@HTTPD@,$HTTPD,;t t
-s,@MS_INC@,$MS_INC,;t t
-s,@MS_LIB@,$MS_LIB,;t t
-s,@IGNORE_MISSING_DATA@,$IGNORE_MISSING_DATA,;t t
-s,@USE_POINT_Z_M@,$USE_POINT_Z_M,;t t
-s,@USE_NINT@,$USE_NINT,;t t
-s,@DEBUG_FLAGS@,$DEBUG_FLAGS,;t t
-s,@LD_SHARED@,$LD_SHARED,;t t
-s,@SO_EXT@,$SO_EXT,;t t
-s,@SO_COMMAND_NAME@,$SO_COMMAND_NAME,;t t
-s,@PHP_LD_SHARED@,$PHP_LD_SHARED,;t t
-s,@PHP_VERSION_FLAG@,$PHP_VERSION_FLAG,;t t
-s,@PHP_SRC_DIR@,$PHP_SRC_DIR,;t t
-s,@PHP_CC@,$PHP_CC,;t t
-s,@PHP_LD@,$PHP_LD,;t t
-s,@PHP_REGEX_INC@,$PHP_REGEX_INC,;t t
-s,@PHP_REGEX_OBJ@,$PHP_REGEX_OBJ,;t t
-s,@USE_PHP_REGEX@,$USE_PHP_REGEX,;t t
-s,@MAKE_PHPMS@,$MAKE_PHPMS,;t t
-s,@MAKE_PHPMS_CLEAN@,$MAKE_PHPMS_CLEAN,;t t
-s,@APACHE_INC@,$APACHE_INC,;t t
-s,@OS_INCLUDE_DIR@,$OS_INCLUDE_DIR,;t t
-s,@ALL_ENABLED@,$ALL_ENABLED,;t t
-s,@ALL_INC@,$ALL_INC,;t t
-s,@ALL_LIB@,$ALL_LIB,;t t
-s,@ALL_STATIC_LIB@,$ALL_STATIC_LIB,;t t
-s,@RPATHS@,$RPATHS,;t t
-s,@LIBOBJS@,$LIBOBJS,;t t
-s,@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,@configure_input@,$configure_input,;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,@top_builddir@,$ac_top_builddir,;t t
-s,@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 @@ if test "$no_create" != yes; then
   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 -pruN 6.0.1-2/configure.in 6.0.1-2ubuntu1/configure.in
--- 6.0.1-2/configure.in	2011-12-08 22:50:36.000000000 +0000
+++ 6.0.1-2ubuntu1/configure.in	2012-01-21 09:00:41.000000000 +0000
@@ -669,41 +669,9 @@ elif test -n "$with_gd" -a "$with_gd" !=
       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 -pruN 6.0.1-2/debian/changelog 6.0.1-2ubuntu1/debian/changelog
--- 6.0.1-2/debian/changelog	2011-12-23 13:03:21.000000000 +0000
+++ 6.0.1-2ubuntu1/debian/changelog	2012-01-21 04:21:25.000000000 +0000
@@ -1,3 +1,13 @@
+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@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 +15,7 @@ mapserver (6.0.1-2) unstable; urgency=lo
  -- Francesco Paolo Lovergine <frankie@debian.org>  Fri, 23 Dec 2011 14:02:06 +0100
 
 mapserver (6.0.1-1) unstable; urgency=low
-	
+
   [ Alan Boudreault ]
   * New upstream release.
 
diff -pruN 6.0.1-2/debian/patches/fix-jpeg-gd-detection.patch 6.0.1-2ubuntu1/debian/patches/fix-jpeg-gd-detection.patch
--- 6.0.1-2/debian/patches/fix-jpeg-gd-detection.patch	1970-01-01 00:00:00.000000000 +0000
+++ 6.0.1-2ubuntu1/debian/patches/fix-jpeg-gd-detection.patch	2012-01-21 04:16:03.000000000 +0000
@@ -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@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_PIC STRINGS MS_VERSION PKG_CONFIG FT_BIN FT_ENABLED FT_INC FT_LIB ZLIB_ENABLED ZLIB_INC ZLIB_LIB PNG_ENABLED PNG_INC PNG_LIB GIF_ENABLED GIF_INC GIF_LIB JPEG_ENABLED JPEG_INC JPEG_LIB ICONV_ENABLED ICONV_INC ICONV_LIB GD_DEF GD_INC GD_LIB GD_STATIC MAKE_GD MAKE_GD_CLEAN FTGL_ENABLED FTGL_INC FTGL_LIB OGL_ENABLED OGL_INC OGL_LIB AGG_LIB AGG_INC AGG_OBJ PROJ_ENABLED PROJ_INC PROJ_LIBS THREAD_FLAG THREAD_LIB SDE_ENABLED SDE_INC SDE_LIB GEOS_CONFIG GEOS_ENABLED GEOS_INC GEOS_LIB GDAL_CONFIG GDAL_ENABLED OGR_ENABLED GDAL_INC GDAL_LIB PG_CONFIG POSTGIS_ENABLED POSTGIS_INC POSTGIS_LIB MY_CONFIG MYSQL_ENABLED MYSQL_INC MYSQL_LIB ORACLESPATIAL_ENABLED ORACLESPATIAL_INC ORACLESPATIAL_LIB WMS_SVR_ENABLED WFS_SVR_ENABLED WCS_SVR_ENABLED LIBCURL_CONFIG CURL_INC CURL_LIB LIBXML2_CONFIG XML2_INC XML2_LIB WMS_LYR_ENABLED WFS_LYR_ENABLED SOS_SVR_ENABLED XSLT_ENABLED XSLT_INC XSLT_LIB EXSLT_ENABLED EXSLT_INC EXSLT_LIB FRIBIDI_CONFIG FRIBIDI_ENABLED FRIBIDI_INC FRIBIDI_LIB CAIRO_ENABLED CAIRO_INC CAIRO_LIB FASTCGI_ENABLED FASTCGI_INC FASTCGI_LIB HTTPD MS_INC MS_LIB IGNORE_MISSING_DATA USE_POINT_Z_M USE_NINT DEBUG_FLAGS LD_SHARED SO_EXT SO_COMMAND_NAME PHP_LD_SHARED PHP_VERSION_FLAG PHP_SRC_DIR PHP_CC PHP_LD PHP_REGEX_INC PHP_REGEX_OBJ USE_PHP_REGEX MAKE_PHPMS MAKE_PHPMS_CLEAN APACHE_INC OS_INCLUDE_DIR ALL_ENABLED ALL_INC ALL_LIB ALL_STATIC_LIB RPATHS LIBOBJS LTLIBOBJS'
++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 renderers/agg/src/agg_vpgen_clip_polyline.o renderers/agg/src/agg_font_freetype.o"
+ 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@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,@SHELL@,$SHELL,;t t
+-s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
+-s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
+-s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
+-s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
+-s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
+-s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
+-s,@exec_prefix@,$exec_prefix,;t t
+-s,@prefix@,$prefix,;t t
+-s,@program_transform_name@,$program_transform_name,;t t
+-s,@bindir@,$bindir,;t t
+-s,@sbindir@,$sbindir,;t t
+-s,@libexecdir@,$libexecdir,;t t
+-s,@datadir@,$datadir,;t t
+-s,@sysconfdir@,$sysconfdir,;t t
+-s,@sharedstatedir@,$sharedstatedir,;t t
+-s,@localstatedir@,$localstatedir,;t t
+-s,@libdir@,$libdir,;t t
+-s,@includedir@,$includedir,;t t
+-s,@oldincludedir@,$oldincludedir,;t t
+-s,@infodir@,$infodir,;t t
+-s,@mandir@,$mandir,;t t
+-s,@build_alias@,$build_alias,;t t
+-s,@host_alias@,$host_alias,;t t
+-s,@target_alias@,$target_alias,;t t
+-s,@DEFS@,$DEFS,;t t
+-s,@ECHO_C@,$ECHO_C,;t t
+-s,@ECHO_N@,$ECHO_N,;t t
+-s,@ECHO_T@,$ECHO_T,;t t
+-s,@LIBS@,$LIBS,;t t
+-s,@CC@,$CC,;t t
+-s,@CFLAGS@,$CFLAGS,;t t
+-s,@LDFLAGS@,$LDFLAGS,;t t
+-s,@CPPFLAGS@,$CPPFLAGS,;t t
+-s,@ac_ct_CC@,$ac_ct_CC,;t t
+-s,@EXEEXT@,$EXEEXT,;t t
+-s,@OBJEXT@,$OBJEXT,;t t
+-s,@CXX@,$CXX,;t t
+-s,@CXXFLAGS@,$CXXFLAGS,;t t
+-s,@ac_ct_CXX@,$ac_ct_CXX,;t t
+-s,@RANLIB@,$RANLIB,;t t
+-s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
+-s,@LEX@,$LEX,;t t
+-s,@LEXLIB@,$LEXLIB,;t t
+-s,@LEX_OUTPUT_ROOT@,$LEX_OUTPUT_ROOT,;t t
+-s,@YACC@,$YACC,;t t
+-s,@XTRALIBS@,$XTRALIBS,;t t
+-s,@CPP@,$CPP,;t t
+-s,@EGREP@,$EGREP,;t t
+-s,@C_PIC@,$C_PIC,;t t
+-s,@STRINGS@,$STRINGS,;t t
+-s,@MS_VERSION@,$MS_VERSION,;t t
+-s,@PKG_CONFIG@,$PKG_CONFIG,;t t
+-s,@FT_BIN@,$FT_BIN,;t t
+-s,@FT_ENABLED@,$FT_ENABLED,;t t
+-s,@FT_INC@,$FT_INC,;t t
+-s,@FT_LIB@,$FT_LIB,;t t
+-s,@ZLIB_ENABLED@,$ZLIB_ENABLED,;t t
+-s,@ZLIB_INC@,$ZLIB_INC,;t t
+-s,@ZLIB_LIB@,$ZLIB_LIB,;t t
+-s,@PNG_ENABLED@,$PNG_ENABLED,;t t
+-s,@PNG_INC@,$PNG_INC,;t t
+-s,@PNG_LIB@,$PNG_LIB,;t t
+-s,@GIF_ENABLED@,$GIF_ENABLED,;t t
+-s,@GIF_INC@,$GIF_INC,;t t
+-s,@GIF_LIB@,$GIF_LIB,;t t
+-s,@JPEG_ENABLED@,$JPEG_ENABLED,;t t
+-s,@JPEG_INC@,$JPEG_INC,;t t
+-s,@JPEG_LIB@,$JPEG_LIB,;t t
+-s,@ICONV_ENABLED@,$ICONV_ENABLED,;t t
+-s,@ICONV_INC@,$ICONV_INC,;t t
+-s,@ICONV_LIB@,$ICONV_LIB,;t t
+-s,@GD_DEF@,$GD_DEF,;t t
+-s,@GD_INC@,$GD_INC,;t t
+-s,@GD_LIB@,$GD_LIB,;t t
+-s,@GD_STATIC@,$GD_STATIC,;t t
+-s,@MAKE_GD@,$MAKE_GD,;t t
+-s,@MAKE_GD_CLEAN@,$MAKE_GD_CLEAN,;t t
+-s,@FTGL_ENABLED@,$FTGL_ENABLED,;t t
+-s,@FTGL_INC@,$FTGL_INC,;t t
+-s,@FTGL_LIB@,$FTGL_LIB,;t t
+-s,@OGL_ENABLED@,$OGL_ENABLED,;t t
+-s,@OGL_INC@,$OGL_INC,;t t
+-s,@OGL_LIB@,$OGL_LIB,;t t
+-s,@AGG_LIB@,$AGG_LIB,;t t
+-s,@AGG_INC@,$AGG_INC,;t t
+-s,@AGG_OBJ@,$AGG_OBJ,;t t
+-s,@PROJ_ENABLED@,$PROJ_ENABLED,;t t
+-s,@PROJ_INC@,$PROJ_INC,;t t
+-s,@PROJ_LIBS@,$PROJ_LIBS,;t t
+-s,@THREAD_FLAG@,$THREAD_FLAG,;t t
+-s,@THREAD_LIB@,$THREAD_LIB,;t t
+-s,@SDE_ENABLED@,$SDE_ENABLED,;t t
+-s,@SDE_INC@,$SDE_INC,;t t
+-s,@SDE_LIB@,$SDE_LIB,;t t
+-s,@GEOS_CONFIG@,$GEOS_CONFIG,;t t
+-s,@GEOS_ENABLED@,$GEOS_ENABLED,;t t
+-s,@GEOS_INC@,$GEOS_INC,;t t
+-s,@GEOS_LIB@,$GEOS_LIB,;t t
+-s,@GDAL_CONFIG@,$GDAL_CONFIG,;t t
+-s,@GDAL_ENABLED@,$GDAL_ENABLED,;t t
+-s,@OGR_ENABLED@,$OGR_ENABLED,;t t
+-s,@GDAL_INC@,$GDAL_INC,;t t
+-s,@GDAL_LIB@,$GDAL_LIB,;t t
+-s,@PG_CONFIG@,$PG_CONFIG,;t t
+-s,@POSTGIS_ENABLED@,$POSTGIS_ENABLED,;t t
+-s,@POSTGIS_INC@,$POSTGIS_INC,;t t
+-s,@POSTGIS_LIB@,$POSTGIS_LIB,;t t
+-s,@MY_CONFIG@,$MY_CONFIG,;t t
+-s,@MYSQL_ENABLED@,$MYSQL_ENABLED,;t t
+-s,@MYSQL_INC@,$MYSQL_INC,;t t
+-s,@MYSQL_LIB@,$MYSQL_LIB,;t t
+-s,@ORACLESPATIAL_ENABLED@,$ORACLESPATIAL_ENABLED,;t t
+-s,@ORACLESPATIAL_INC@,$ORACLESPATIAL_INC,;t t
+-s,@ORACLESPATIAL_LIB@,$ORACLESPATIAL_LIB,;t t
+-s,@WMS_SVR_ENABLED@,$WMS_SVR_ENABLED,;t t
+-s,@WFS_SVR_ENABLED@,$WFS_SVR_ENABLED,;t t
+-s,@WCS_SVR_ENABLED@,$WCS_SVR_ENABLED,;t t
+-s,@LIBCURL_CONFIG@,$LIBCURL_CONFIG,;t t
+-s,@CURL_INC@,$CURL_INC,;t t
+-s,@CURL_LIB@,$CURL_LIB,;t t
+-s,@LIBXML2_CONFIG@,$LIBXML2_CONFIG,;t t
+-s,@XML2_INC@,$XML2_INC,;t t
+-s,@XML2_LIB@,$XML2_LIB,;t t
+-s,@WMS_LYR_ENABLED@,$WMS_LYR_ENABLED,;t t
+-s,@WFS_LYR_ENABLED@,$WFS_LYR_ENABLED,;t t
+-s,@SOS_SVR_ENABLED@,$SOS_SVR_ENABLED,;t t
+-s,@XSLT_ENABLED@,$XSLT_ENABLED,;t t
+-s,@XSLT_INC@,$XSLT_INC,;t t
+-s,@XSLT_LIB@,$XSLT_LIB,;t t
+-s,@EXSLT_ENABLED@,$EXSLT_ENABLED,;t t
+-s,@EXSLT_INC@,$EXSLT_INC,;t t
+-s,@EXSLT_LIB@,$EXSLT_LIB,;t t
+-s,@FRIBIDI_CONFIG@,$FRIBIDI_CONFIG,;t t
+-s,@FRIBIDI_ENABLED@,$FRIBIDI_ENABLED,;t t
+-s,@FRIBIDI_INC@,$FRIBIDI_INC,;t t
+-s,@FRIBIDI_LIB@,$FRIBIDI_LIB,;t t
+-s,@CAIRO_ENABLED@,$CAIRO_ENABLED,;t t
+-s,@CAIRO_INC@,$CAIRO_INC,;t t
+-s,@CAIRO_LIB@,$CAIRO_LIB,;t t
+-s,@FASTCGI_ENABLED@,$FASTCGI_ENABLED,;t t
+-s,@FASTCGI_INC@,$FASTCGI_INC,;t t
+-s,@FASTCGI_LIB@,$FASTCGI_LIB,;t t
+-s,@HTTPD@,$HTTPD,;t t
+-s,@MS_INC@,$MS_INC,;t t
+-s,@MS_LIB@,$MS_LIB,;t t
+-s,@IGNORE_MISSING_DATA@,$IGNORE_MISSING_DATA,;t t
+-s,@USE_POINT_Z_M@,$USE_POINT_Z_M,;t t
+-s,@USE_NINT@,$USE_NINT,;t t
+-s,@DEBUG_FLAGS@,$DEBUG_FLAGS,;t t
+-s,@LD_SHARED@,$LD_SHARED,;t t
+-s,@SO_EXT@,$SO_EXT,;t t
+-s,@SO_COMMAND_NAME@,$SO_COMMAND_NAME,;t t
+-s,@PHP_LD_SHARED@,$PHP_LD_SHARED,;t t
+-s,@PHP_VERSION_FLAG@,$PHP_VERSION_FLAG,;t t
+-s,@PHP_SRC_DIR@,$PHP_SRC_DIR,;t t
+-s,@PHP_CC@,$PHP_CC,;t t
+-s,@PHP_LD@,$PHP_LD,;t t
+-s,@PHP_REGEX_INC@,$PHP_REGEX_INC,;t t
+-s,@PHP_REGEX_OBJ@,$PHP_REGEX_OBJ,;t t
+-s,@USE_PHP_REGEX@,$USE_PHP_REGEX,;t t
+-s,@MAKE_PHPMS@,$MAKE_PHPMS,;t t
+-s,@MAKE_PHPMS_CLEAN@,$MAKE_PHPMS_CLEAN,;t t
+-s,@APACHE_INC@,$APACHE_INC,;t t
+-s,@OS_INCLUDE_DIR@,$OS_INCLUDE_DIR,;t t
+-s,@ALL_ENABLED@,$ALL_ENABLED,;t t
+-s,@ALL_INC@,$ALL_INC,;t t
+-s,@ALL_LIB@,$ALL_LIB,;t t
+-s,@ALL_STATIC_LIB@,$ALL_STATIC_LIB,;t t
+-s,@RPATHS@,$RPATHS,;t t
+-s,@LIBOBJS@,$LIBOBJS,;t t
+-s,@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,@configure_input@,$configure_input,;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,@top_builddir@,$ac_top_builddir,;t t
+-s,@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 -pruN 6.0.1-2/debian/patches/series 6.0.1-2ubuntu1/debian/patches/series
--- 6.0.1-2/debian/patches/series	2011-12-23 13:03:21.000000000 +0000
+++ 6.0.1-2ubuntu1/debian/patches/series	2012-01-21 04:17:10.000000000 +0000
@@ -1 +1 @@
-
+fix-jpeg-gd-detection.patch
diff -pruN 6.0.1-2/debian/rules 6.0.1-2ubuntu1/debian/rules
--- 6.0.1-2/debian/rules	2011-12-23 13:03:21.000000000 +0000
+++ 6.0.1-2ubuntu1/debian/rules	2012-01-21 03:59:58.000000000 +0000
@@ -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 \
diff -pruN 6.0.1-2/.pc/applied-patches 6.0.1-2ubuntu1/.pc/applied-patches
--- 6.0.1-2/.pc/applied-patches	1970-01-01 00:00:00.000000000 +0000
+++ 6.0.1-2ubuntu1/.pc/applied-patches	2012-01-21 09:00:41.000000000 +0000
@@ -0,0 +1 @@
+fix-jpeg-gd-detection.patch
diff -pruN 6.0.1-2/.pc/fix-jpeg-gd-detection.patch/configure 6.0.1-2ubuntu1/.pc/fix-jpeg-gd-detection.patch/configure
--- 6.0.1-2/.pc/fix-jpeg-gd-detection.patch/configure	1970-01-01 00:00:00.000000000 +0000
+++ 6.0.1-2ubuntu1/.pc/fix-jpeg-gd-detection.patch/configure	2011-12-08 22:50:36.000000000 +0000
@@ -0,0 +1,15393 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.59.
+#
+# 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.  ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+  set -o posix
+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
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+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
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)$' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+  	  /^X\/\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\/\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+
+
+  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 |
+    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: 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= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+  # We could just check for DJGPP; but this test a) works b) is more generic
+  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+  if test -f conf$$.exe; then
+    # Don't use ln at all; we don't have any links
+    as_ln_s='cp -p'
+  else
+    as_ln_s='ln -s'
+  fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s=ln
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p=:
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" 	$as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+exec 6>&1
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_config_libobj_dir=.
+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=
+PACKAGE_TARNAME=
+PACKAGE_VERSION=
+PACKAGE_STRING=
+PACKAGE_BUGREPORT=
+
+ac_unique_file="Makefile.in"
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#if STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# if HAVE_STDLIB_H
+#  include <stdlib.h>
+# endif
+#endif
+#if HAVE_STRING_H
+# if !STDC_HEADERS && HAVE_MEMORY_H
+#  include <memory.h>
+# endif
+# include <string.h>
+#endif
+#if HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+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_PIC STRINGS MS_VERSION PKG_CONFIG FT_BIN FT_ENABLED FT_INC FT_LIB ZLIB_ENABLED ZLIB_INC ZLIB_LIB PNG_ENABLED PNG_INC PNG_LIB GIF_ENABLED GIF_INC GIF_LIB JPEG_ENABLED JPEG_INC JPEG_LIB ICONV_ENABLED ICONV_INC ICONV_LIB GD_DEF GD_INC GD_LIB GD_STATIC MAKE_GD MAKE_GD_CLEAN FTGL_ENABLED FTGL_INC FTGL_LIB OGL_ENABLED OGL_INC OGL_LIB AGG_LIB AGG_INC AGG_OBJ PROJ_ENABLED PROJ_INC PROJ_LIBS THREAD_FLAG THREAD_LIB SDE_ENABLED SDE_INC SDE_LIB GEOS_CONFIG GEOS_ENABLED GEOS_INC GEOS_LIB GDAL_CONFIG GDAL_ENABLED OGR_ENABLED GDAL_INC GDAL_LIB PG_CONFIG POSTGIS_ENABLED POSTGIS_INC POSTGIS_LIB MY_CONFIG MYSQL_ENABLED MYSQL_INC MYSQL_LIB ORACLESPATIAL_ENABLED ORACLESPATIAL_INC ORACLESPATIAL_LIB WMS_SVR_ENABLED WFS_SVR_ENABLED WCS_SVR_ENABLED LIBCURL_CONFIG CURL_INC CURL_LIB LIBXML2_CONFIG XML2_INC XML2_LIB WMS_LYR_ENABLED WFS_LYR_ENABLED SOS_SVR_ENABLED XSLT_ENABLED XSLT_INC XSLT_LIB EXSLT_ENABLED EXSLT_INC EXSLT_LIB FRIBIDI_CONFIG FRIBIDI_ENABLED FRIBIDI_INC FRIBIDI_LIB CAIRO_ENABLED CAIRO_INC CAIRO_LIB FASTCGI_ENABLED FASTCGI_INC FASTCGI_LIB HTTPD MS_INC MS_LIB IGNORE_MISSING_DATA USE_POINT_Z_M USE_NINT DEBUG_FLAGS LD_SHARED SO_EXT SO_COMMAND_NAME PHP_LD_SHARED PHP_VERSION_FLAG PHP_SRC_DIR PHP_CC PHP_LD PHP_REGEX_INC PHP_REGEX_OBJ USE_PHP_REGEX MAKE_PHPMS MAKE_PHPMS_CLEAN APACHE_INC OS_INCLUDE_DIR ALL_ENABLED ALL_INC ALL_LIB ALL_STATIC_LIB RPATHS LIBOBJS LTLIBOBJS'
+ac_subst_files=''
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+ac_prev=
+for ac_option
+do
+  # If the previous option needs an argument, assign it.
+  if test -n "$ac_prev"; then
+    eval "$ac_prev=\$ac_option"
+    ac_prev=
+    continue
+  fi
+
+  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
+
+  # Accept the important Cygnus configure options, so we can diagnose typos.
+
+  case $ac_option in
+
+  -bindir | --bindir | --bindi | --bind | --bin | --bi)
+    ac_prev=bindir ;;
+  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+    bindir=$ac_optarg ;;
+
+  -build | --build | --buil | --bui | --bu)
+    ac_prev=build_alias ;;
+  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+    build_alias=$ac_optarg ;;
+
+  -cache-file | --cache-file | --cache-fil | --cache-fi \
+  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+    ac_prev=cache_file ;;
+  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+    cache_file=$ac_optarg ;;
+
+  --config-cache | -C)
+    cache_file=config.cache ;;
+
+  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+    ac_prev=datadir ;;
+  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+  | --da=*)
+    datadir=$ac_optarg ;;
+
+  -disable-* | --disable-*)
+    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+   { (exit 1); exit 1; }; }
+    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+    eval "enable_$ac_feature=no" ;;
+
+  -enable-* | --enable-*)
+    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+   { (exit 1); exit 1; }; }
+    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+    case $ac_option in
+      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+      *) ac_optarg=yes ;;
+    esac
+    eval "enable_$ac_feature='$ac_optarg'" ;;
+
+  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+  | --exec | --exe | --ex)
+    ac_prev=exec_prefix ;;
+  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+  | --exec=* | --exe=* | --ex=*)
+    exec_prefix=$ac_optarg ;;
+
+  -gas | --gas | --ga | --g)
+    # Obsolete; use --with-gas.
+    with_gas=yes ;;
+
+  -help | --help | --hel | --he | -h)
+    ac_init_help=long ;;
+  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+    ac_init_help=recursive ;;
+  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+    ac_init_help=short ;;
+
+  -host | --host | --hos | --ho)
+    ac_prev=host_alias ;;
+  -host=* | --host=* | --hos=* | --ho=*)
+    host_alias=$ac_optarg ;;
+
+  -includedir | --includedir | --includedi | --included | --include \
+  | --includ | --inclu | --incl | --inc)
+    ac_prev=includedir ;;
+  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+  | --includ=* | --inclu=* | --incl=* | --inc=*)
+    includedir=$ac_optarg ;;
+
+  -infodir | --infodir | --infodi | --infod | --info | --inf)
+    ac_prev=infodir ;;
+  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+    infodir=$ac_optarg ;;
+
+  -libdir | --libdir | --libdi | --libd)
+    ac_prev=libdir ;;
+  -libdir=* | --libdir=* | --libdi=* | --libd=*)
+    libdir=$ac_optarg ;;
+
+  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+  | --libexe | --libex | --libe)
+    ac_prev=libexecdir ;;
+  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+  | --libexe=* | --libex=* | --libe=*)
+    libexecdir=$ac_optarg ;;
+
+  -localstatedir | --localstatedir | --localstatedi | --localstated \
+  | --localstate | --localstat | --localsta | --localst \
+  | --locals | --local | --loca | --loc | --lo)
+    ac_prev=localstatedir ;;
+  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+    localstatedir=$ac_optarg ;;
+
+  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+    ac_prev=mandir ;;
+  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+    mandir=$ac_optarg ;;
+
+  -nfp | --nfp | --nf)
+    # Obsolete; use --without-fp.
+    with_fp=no ;;
+
+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+  | --no-cr | --no-c | -n)
+    no_create=yes ;;
+
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+    no_recursion=yes ;;
+
+  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+  | --oldin | --oldi | --old | --ol | --o)
+    ac_prev=oldincludedir ;;
+  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+    oldincludedir=$ac_optarg ;;
+
+  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+    ac_prev=prefix ;;
+  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+    prefix=$ac_optarg ;;
+
+  -program-prefix | --program-prefix | --program-prefi | --program-pref \
+  | --program-pre | --program-pr | --program-p)
+    ac_prev=program_prefix ;;
+  -program-prefix=* | --program-prefix=* | --program-prefi=* \
+  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+    program_prefix=$ac_optarg ;;
+
+  -program-suffix | --program-suffix | --program-suffi | --program-suff \
+  | --program-suf | --program-su | --program-s)
+    ac_prev=program_suffix ;;
+  -program-suffix=* | --program-suffix=* | --program-suffi=* \
+  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+    program_suffix=$ac_optarg ;;
+
+  -program-transform-name | --program-transform-name \
+  | --program-transform-nam | --program-transform-na \
+  | --program-transform-n | --program-transform- \
+  | --program-transform | --program-transfor \
+  | --program-transfo | --program-transf \
+  | --program-trans | --program-tran \
+  | --progr-tra | --program-tr | --program-t)
+    ac_prev=program_transform_name ;;
+  -program-transform-name=* | --program-transform-name=* \
+  | --program-transform-nam=* | --program-transform-na=* \
+  | --program-transform-n=* | --program-transform-=* \
+  | --program-transform=* | --program-transfor=* \
+  | --program-transfo=* | --program-transf=* \
+  | --program-trans=* | --program-tran=* \
+  | --progr-tra=* | --program-tr=* | --program-t=*)
+    program_transform_name=$ac_optarg ;;
+
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil)
+    silent=yes ;;
+
+  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+    ac_prev=sbindir ;;
+  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+  | --sbi=* | --sb=*)
+    sbindir=$ac_optarg ;;
+
+  -sharedstatedir | --sharedstatedir | --sharedstatedi \
+  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+  | --sharedst | --shareds | --shared | --share | --shar \
+  | --sha | --sh)
+    ac_prev=sharedstatedir ;;
+  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+  | --sha=* | --sh=*)
+    sharedstatedir=$ac_optarg ;;
+
+  -site | --site | --sit)
+    ac_prev=site ;;
+  -site=* | --site=* | --sit=*)
+    site=$ac_optarg ;;
+
+  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+    ac_prev=srcdir ;;
+  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+    srcdir=$ac_optarg ;;
+
+  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+  | --syscon | --sysco | --sysc | --sys | --sy)
+    ac_prev=sysconfdir ;;
+  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+    sysconfdir=$ac_optarg ;;
+
+  -target | --target | --targe | --targ | --tar | --ta | --t)
+    ac_prev=target_alias ;;
+  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+    target_alias=$ac_optarg ;;
+
+  -v | -verbose | --verbose | --verbos | --verbo | --verb)
+    verbose=yes ;;
+
+  -version | --version | --versio | --versi | --vers | -V)
+    ac_init_version=: ;;
+
+  -with-* | --with-*)
+    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid package name: $ac_package" >&2
+   { (exit 1); exit 1; }; }
+    ac_package=`echo $ac_package| sed 's/-/_/g'`
+    case $ac_option in
+      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+      *) ac_optarg=yes ;;
+    esac
+    eval "with_$ac_package='$ac_optarg'" ;;
+
+  -without-* | --without-*)
+    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid package name: $ac_package" >&2
+   { (exit 1); exit 1; }; }
+    ac_package=`echo $ac_package | sed 's/-/_/g'`
+    eval "with_$ac_package=no" ;;
+
+  --x)
+    # Obsolete; use --with-x.
+    with_x=yes ;;
+
+  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+  | --x-incl | --x-inc | --x-in | --x-i)
+    ac_prev=x_includes ;;
+  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+    x_includes=$ac_optarg ;;
+
+  -x-libraries | --x-libraries | --x-librarie | --x-librari \
+  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+    ac_prev=x_libraries ;;
+  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+    x_libraries=$ac_optarg ;;
+
+  -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+   { (exit 1); exit 1; }; }
+    ;;
+
+  *=*)
+    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+   { (exit 1); exit 1; }; }
+    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
+    eval "$ac_envvar='$ac_optarg'"
+    export $ac_envvar ;;
+
+  *)
+    # FIXME: should be removed in autoconf 3.0.
+    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+    ;;
+
+  esac
+done
+
+if test -n "$ac_prev"; then
+  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+  { echo "$as_me: error: missing argument to $ac_option" >&2
+   { (exit 1); exit 1; }; }
+fi
+
+# Be sure to have absolute paths.
+for ac_var in exec_prefix prefix
+do
+  eval ac_val=$`echo $ac_var`
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
+    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+   { (exit 1); exit 1; }; };;
+  esac
+done
+
+# Be sure to have absolute paths.
+for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
+	      localstatedir libdir includedir oldincludedir infodir mandir
+do
+  eval ac_val=$`echo $ac_var`
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* ) ;;
+    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+   { (exit 1); exit 1; }; };;
+  esac
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+  if test "x$build_alias" = x; then
+    cross_compiling=maybe
+    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+    If a cross compiler is detected then cross compile mode will be used." >&2
+  elif test "x$build_alias" != "x$host_alias"; then
+    cross_compiling=yes
+  fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+# 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'`
+  srcdir=$ac_confdir
+  if test ! -r $srcdir/$ac_unique_file; then
+    srcdir=..
+  fi
+else
+  ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+  if test "$ac_srcdir_defaulted" = yes; then
+    { echo "$as_me: error: cannot find sources ($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
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+  # Omit some internal or obsolete options to make the list less imposing.
+  # This message is too long to be a string in the A/UX 3.1 sh.
+  cat <<_ACEOF
+\`configure' configures this package to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE.  See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+  -h, --help              display this help and exit
+      --help=short        display options specific to this package
+      --help=recursive    display the short help of all the included packages
+  -V, --version           display version information and exit
+  -q, --quiet, --silent   do not print \`checking...' messages
+      --cache-file=FILE   cache test results in FILE [disabled]
+  -C, --config-cache      alias for \`--cache-file=config.cache'
+  -n, --no-create         do not create output files
+      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
+
+_ACEOF
+
+  cat <<_ACEOF
+Installation directories:
+  --prefix=PREFIX         install architecture-independent files in PREFIX
+			  [$ac_default_prefix]
+  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
+			  [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+  --bindir=DIR           user executables [EPREFIX/bin]
+  --sbindir=DIR          system admin executables [EPREFIX/sbin]
+  --libexecdir=DIR       program executables [EPREFIX/libexec]
+  --datadir=DIR          read-only architecture-independent data [PREFIX/share]
+  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
+  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
+  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
+  --libdir=DIR           object code libraries [EPREFIX/lib]
+  --includedir=DIR       C header files [PREFIX/include]
+  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
+  --infodir=DIR          info documentation [PREFIX/info]
+  --mandir=DIR           man documentation [PREFIX/man]
+_ACEOF
+
+  cat <<\_ACEOF
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+
+  cat <<\_ACEOF
+
+Optional Features:
+  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
+  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --enable-ignore-missing-data
+                          Ignore missing data file errors at runtime
+  --disable-ignore-missing-data
+                          Report all missing data files (enabled by default).
+  --enable-point-z-m      Use point Z and M parameters (disabled by default).
+  --disable-point-z-m     Disable support for point Z and M parameters.
+  --disable-fast-nint     Use safe MS_NINT with reliable rounding
+  --enable-debug          Include "-g" in CFLAGS for debugging.
+  --disable-debug         Do not include "-g" in CFLAGS (the default).
+  --enable-cgi-cl-debug-args
+                          Enable mapserv CGI command-line debug arguments
+                          (disabled by default). These command-line args may
+                          be insecure and should be enabled only on
+                          development servers and only if you understand the
+                          security implications.
+  --enable-gcov           Enable source code coverage testing using gcov
+  --enable-perlv-ld-detect
+                          (applies to --with-php only)
+                          Use perl -V output to figure the command to use to
+                          link php_mapscript.so.  Try this only if the default
+                          internal macro didn't work.
+  --enable-runpath        Include runtime library path flags (-Wl,-R) in link.
+                          Required on *BSD systems.
+  --disable-runpath       Do not link with runtime lib path (the default).
+
+Optional Packages:
+  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
+  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --with-pkg-config[=PATH]
+                          Include pkg-config support (PATH is path to pkg-config)
+  --with-freetype=DIR     GD: Specify where FreeType 2.x is installed (DIR is
+                              path to freetype-config program or install dir).
+  --with-zlib=DIR         GD,SVG: Specify where zlib is installed (DIR is path
+                              to zlib install dir).
+  --with-png=DIR          GD: Specify where PNG is installed (DIR is path to
+                              PNG install dir).
+  --with-gif=DIR          Specify where GIF is installed (DIR is path to
+                              GIF install dir).
+  --with-jpeg[=DIR]       Include JPEG support (DIR is LibJPEG's install dir).
+  --with-xpm=DIR          GD: Specify where libXpm is installed (DIR it the
+                              libXpm install prefix).
+  --with-libiconv=DIR     Specify where libiconv is installed (DIR is path
+                          to libiconv install dir (prefix)).
+  --with-gd[=[static,]DIR]
+                          Specify which version of GD to use (DIR is GD's
+                          install dir).
+  --with-ftgl[=DIR]       Include OpenGl support (DIR is OpenGL's install dir).
+  --with-opengl[=DIR]     Include OpenGl support (DIR is OpenGL's install dir).
+  --with-expat=DIR          Specify expat location, needed for SVG symbol parsing
+  --with-agg-svg-symbols[=yes/no]
+                          Include AGG SVG symbol support (Requires expat).
+  --with-proj[=DIR]       Include PROJ.4 support (DIR is PROJ.4's install dir).
+  --with-threads[=linkopt]Include thread safe support
+  --with-sde[=DIR]        Include ESRI SDE support (DIR is SDE's install dir).
+  --with-sde-version[=VERSION NUMBER]
+                          Set ESRI SDE version number (Default is 91).
+  --with-geos[=PATH]      Include GEOS support (PATH is path to geos-config)
+  --with-ogr[=PATH]       Include OGR support (PATH is path to gdal-config).
+  --with-gdal[=PATH]      Include GDAL support (PATH is path to gdal-config)
+  --with-postgis[=ARG]    Include PostGIS Support (ARG=yes/path to pg_config)
+  --with-mysql[=ARG]      Include Mysql Support (ARG=yes/path to mysql_config)
+  --with-oraclespatial[=ARG]
+                          Include OracleSpatial Support (ARG=yes/path to
+                          Oracle home)
+  --without-wms           Disable OGC WMS Compatibility (enabled by default).
+  --with-wfs              Enable OGC WFS Server Support (OGR+PROJ4 required).
+  --with-wcs              Enable OGC WCS Server Support (GDAL+PROJ4 required).
+  --with-wmsclient        Enable OGC WMS Client Connections (PROJ4, libcurl and
+                          GDAL required).
+  --with-wfsclient        Enable OGC WFS Client Connections (PROJ4, libcurl and
+                          OGR required).
+  --with-sos              Enable OGC SOS Server Support (libxml2 and PROJ4 and
+                          OGR required).
+  --with-curl-config=PATH Specify path to curl-config.
+  --with-kml=                KML output Support (ARG=yes/no).
+  --with-xml2-config=PATH Specify path to xml2-config.
+  --with-xml-mapfile=                Include xml-mapfile Support (ARG=yes/no).
+  --with-xslt=DIR         Include xslt Support (ARG=yes/path to
+                          to xslt install dir).
+  --with-exslt=DIR         Include exslt Support (ARG=yes/path to
+                           to exslt install dir).
+  --with-fribidi-config[=ARG]
+                          Include FriBidi Support (ARG=yes/path to
+                          fribidi-config or fribidi.pc)
+  --with-cairo[=ARG]      Include Cairo Support (ARG=yes/path to cairo.pc)
+  --with-fastcgi=path     Enable FastCGI, point to installed tree.
+  --with-httpd            Specify path to 'httpd' executable.
+  --with-warnings[=flags] Enable strict warnings (or user defined warnings)
+  --with-php=DIR          Specify directory where PHP5's include files are
+                          installed (or a pointer to the full source tree)
+                          Required in order to compile the PHP/MapScript
+                          module.
+  --with-ld-shared=CMD    Specify link command to use to build shared libs
+  --without-ld-shared     Disable shared library support
+  --with-apxs[=FILE]      (CURRENTLY DISABLED)
+                          Use this option only if building the PHP MapScript
+                          on a system where PHP was built as a shared Apache
+                          module.  FILE is the optional pathname to the
+                          Apache apxs tool; defaults to apxs.
+  --with-apache=DIR       (CURRENTLY DISABLED)
+                          Use this option only if building the PHP MapScript
+                          on a system where PHP was built as an Apache
+                          module statically linked into the httpd executable.
+                          DIR is the path to the apache include files.
+  --with-java-include-os-name=dirname
+                          (AUTODETECTED)
+                          Use this option only if building of Java Mapscript
+                          fails because os-dependent headers are not found.
+                          dirname is the name of subdirectory of the Java
+                          installation where os-dependent include files are
+                          found (for instance linux or solaris).
+                          Only used by Java mapscript.
+
+Some influential environment variables:
+  CC          C compiler command
+  CFLAGS      C compiler flags
+  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
+              nonstandard directory <lib dir>
+  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
+              headers in a nonstandard directory <include dir>
+  CXX         C++ compiler command
+  CXXFLAGS    C++ compiler flags
+  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.
+
+_ACEOF
+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
+    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 $srcdir in
+  .)  # No --srcdir option.  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_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;;
+esac
+
+    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
+    else
+      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+    fi
+    cd $ac_popdir
+  done
+fi
+
+test -n "$ac_init_help" && exit 0
+if $ac_init_version; then
+  cat <<\_ACEOF
+
+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.
+_ACEOF
+  exit 0
+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
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
+
+/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
+/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
+/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  echo "PATH: $as_dir"
+done
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_sep=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+  for ac_arg
+  do
+    case $ac_arg in
+    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+    | -silent | --silent | --silen | --sile | --sil)
+      continue ;;
+    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+      ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    case $ac_pass in
+    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+    2)
+      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+      if test $ac_must_keep_next = true; then
+	ac_must_keep_next=false # Got value, back to normal.
+      else
+	case $ac_arg in
+	  *=* | --config-cache | -C | -disable-* | --disable-* \
+	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+	  | -with-* | --with-* | -without-* | --without-* | --x)
+	    case "$ac_configure_args0 " in
+	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+	    esac
+	    ;;
+	  -* ) ac_must_keep_next=true ;;
+	esac
+      fi
+      ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
+      # Get rid of the leading space.
+      ac_sep=" "
+      ;;
+    esac
+  done
+done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log.  We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Be sure not to use single quotes in there, as some shells,
+# such as our DU 5.0 friend, will then `close' the trap.
+trap 'exit_status=$?
+  # Save into config.log some information that might help in debugging.
+  {
+    echo
+
+    cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+    echo
+    # The following way of writing the cache mishandles newlines in values,
+{
+  (set) 2>&1 |
+    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
+    *ac_space=\ *)
+      sed -n \
+	"s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
+      ;;
+    *)
+      sed -n \
+	"s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+      ;;
+    esac;
+}
+    echo
+
+    cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+    echo
+    for ac_var in $ac_subst_vars
+    do
+      eval ac_val=$`echo $ac_var`
+      echo "$ac_var='"'"'$ac_val'"'"'"
+    done | sort
+    echo
+
+    if test -n "$ac_subst_files"; then
+      cat <<\_ASBOX
+## ------------- ##
+## Output files. ##
+## ------------- ##
+_ASBOX
+      echo
+      for ac_var in $ac_subst_files
+      do
+	eval ac_val=$`echo $ac_var`
+	echo "$ac_var='"'"'$ac_val'"'"'"
+      done | sort
+      echo
+    fi
+
+    if test -s confdefs.h; then
+      cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+      echo
+      sed "/^$/d" confdefs.h | sort
+      echo
+    fi
+    test "$ac_signal" != 0 &&
+      echo "$as_me: caught signal $ac_signal"
+    echo "$as_me: exit $exit_status"
+  } >&5
+  rm -f core *.core &&
+  rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
+    exit $exit_status
+     ' 0
+for ac_signal in 1 2 13 15; do
+  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo >confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer explicitly selected file to automatically selected ones.
+if test -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;}
+    sed 's/^/| /' "$ac_site_file" >&5
+    . "$ac_site_file"
+  fi
+done
+
+if test -r "$cache_file"; then
+  # Some versions of bash will fail to source /dev/null (special
+  # files actually), so we avoid doing that.
+  if test -f "$cache_file"; then
+    { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+    case $cache_file in
+      [\\/]* | ?:[\\/]* ) . $cache_file;;
+      *)                      . ./$cache_file;;
+    esac
+  fi
+else
+  { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+  >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in `(set) 2>&1 |
+	       sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
+  eval ac_old_set=\$ac_cv_env_${ac_var}_set
+  eval ac_new_set=\$ac_env_${ac_var}_set
+  eval ac_old_val="\$ac_cv_env_${ac_var}_value"
+  eval ac_new_val="\$ac_env_${ac_var}_value"
+  case $ac_old_set,$ac_new_set in
+    set,)
+      { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,set)
+      { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,);;
+    *)
+      if test "x$ac_old_val" != "x$ac_new_val"; then
+	{ echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+	{ echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
+echo "$as_me:   former value:  $ac_old_val" >&2;}
+	{ echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
+echo "$as_me:   current value: $ac_new_val" >&2;}
+	ac_cache_corrupted=:
+      fi;;
+  esac
+  # Pass precious variables to config.status.
+  if test "$ac_new_set" = set; then
+    case $ac_new_val in
+    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+    *) ac_arg=$ac_var=$ac_new_val ;;
+    esac
+    case " $ac_configure_args " in
+      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
+      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+    esac
+  fi
+done
+if $ac_cache_corrupted; then
+  { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+  { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="${ac_tool_prefix}gcc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+  ac_ct_CC=$CC
+  # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="gcc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  CC=$ac_ct_CC
+else
+  CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="${ac_tool_prefix}cc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+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
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  CC=$ac_ct_CC
+else
+  CC="$ac_cv_prog_CC"
+fi
+
+fi
+if test -z "$CC"; then
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+       ac_prog_rejected=yes
+       continue
+     fi
+    ac_cv_prog_CC="cc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+if test $ac_prog_rejected = yes; then
+  # We found a bogon in the path, so make sure we never use it.
+  set dummy $ac_cv_prog_CC
+  shift
+  if test $# != 0; then
+    # We chose a different compiler from the bogus one.
+    # However, it has the same basename, so the bogon will be chosen
+    # first if we set CC to just the basename; use the full file name.
+    shift
+    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+  fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  for ac_prog in cl
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+    test -n "$CC" && break
+  done
+fi
+if test -z "$CC"; then
+  ac_ct_CC=$CC
+  for ac_prog in cl
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$ac_ct_CC" && break
+done
+
+  CC=$ac_ct_CC
+fi
+
+fi
+
+
+test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&5
+echo "$as_me: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO:" \
+     "checking for C compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (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
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
+echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
+ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+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
+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.
+	;;
+    [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
+	break;;
+    * )
+	break;;
+  esac
+done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
+See \`config.log' for more details." >&5
+echo "$as_me: error: C compiler cannot create executables
+See \`config.log' for more details." >&2;}
+   { (exit 77); exit 77; }; }
+fi
+
+ac_exeext=$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_file" >&5
+echo "${ECHO_T}$ac_file" >&6
+
+# Check 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
+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
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.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
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+echo "$as_me:$LINENO: checking for suffix of object files" >&5
+echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
+if test "${ac_cv_objext+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { (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
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
+    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+       break;;
+  esac
+done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+echo "${ECHO_T}$ac_cv_objext" >&6
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (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_compiler_gnu=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
+GCC=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+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
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$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_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_prog_cc_g=no
+fi
+rm -f 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
+if test "$ac_test_CFLAGS" = set; then
+  CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+  if test "$GCC" = yes; then
+    CFLAGS="-g -O2"
+  else
+    CFLAGS="-g"
+  fi
+else
+  if test "$GCC" = yes; then
+    CFLAGS="-O2"
+  else
+    CFLAGS=
+  fi
+fi
+echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
+echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_stdc+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_prog_cc_stdc=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+     char **p;
+     int i;
+{
+  return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+  char *s;
+  va_list v;
+  va_start (v,p);
+  s = g (p, va_arg (v,int));
+  va_end (v);
+  return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
+   function prototypes and stuff, but not '\xHH' hex character constants.
+   These don't provoke an error unfortunately, instead are silently treated
+   as 'x'.  The following induces an error, until -std1 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.  */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
+  ;
+  return 0;
+}
+_ACEOF
+# Don't try gcc -ansi; that turns off useful extensions and
+# breaks some systems' header files.
+# AIX			-qlanglvl=ansi
+# Ultrix and OSF/1	-std1
+# HP-UX 10.20 and later	-Ae
+# HP-UX older versions	-Aa -D_HPUX_SOURCE
+# SVR4			-Xc -D__EXTENSIONS__
+for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+  CC="$ac_save_CC $ac_arg"
+  rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$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
+
+fi
+rm -f conftest.err conftest.$ac_objext
+done
+rm -f conftest.$ac_ext conftest.$ac_objext
+CC=$ac_save_CC
+
+fi
+
+case "x$ac_cv_prog_cc_stdc" in
+  x|xno)
+    echo "$as_me:$LINENO: result: none needed" >&5
+echo "${ECHO_T}none needed" >&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
+
+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_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
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CXX+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CXX"; then
+  ac_cv_prog_CXX="$CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+CXX=$ac_cv_prog_CXX
+if test -n "$CXX"; then
+  echo "$as_me:$LINENO: result: $CXX" >&5
+echo "${ECHO_T}$CXX" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+    test -n "$CXX" && break
+  done
+fi
+if test -z "$CXX"; then
+  ac_ct_CXX=$CXX
+  for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CXX"; then
+  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CXX="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
+if test -n "$ac_ct_CXX"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
+echo "${ECHO_T}$ac_ct_CXX" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$ac_ct_CXX" && break
+done
+test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
+
+  CXX=$ac_ct_CXX
+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
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+
+echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
+if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (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
+  ac_compiler_gnu=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
+GXX=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CXXFLAGS=${CXXFLAGS+set}
+ac_save_CXXFLAGS=$CXXFLAGS
+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
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$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
+  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
+/* 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
+
+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_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
+
+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
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}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
+else
+  if test -n "$RANLIB"; then
+  ac_cv_prog_RANLIB="$RANLIB" # 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_RANLIB="${ac_tool_prefix}ranlib"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+  echo "$as_me:$LINENO: result: $RANLIB" >&5
+echo "${ECHO_T}$RANLIB" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+  ac_ct_RANLIB=$RANLIB
+  # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+echo "$as_me:$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
+else
+  if test -n "$ac_ct_RANLIB"; then
+  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # 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_RANLIB="ranlib"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+  echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
+echo "${ECHO_T}$ac_ct_RANLIB" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  RANLIB=$ac_ct_RANLIB
+else
+  RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+
+for ac_prog in flex lex
+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
+else
+  if test -n "$LEX"; then
+  ac_cv_prog_LEX="$LEX" # 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_LEX="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+LEX=$ac_cv_prog_LEX
+if test -n "$LEX"; then
+  echo "$as_me:$LINENO: result: $LEX" >&5
+echo "${ECHO_T}$LEX" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}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.  */
+_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
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_fl_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_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.  */
+
+/* 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
+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"
+fi
+
+fi
+
+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
+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
+# 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
+`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
+  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
+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
+if test $ac_cv_prog_lex_yytext_pointer = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define YYTEXT_POINTER 1
+_ACEOF
+
+fi
+
+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
+else
+  if test -n "$YACC"; then
+  ac_cv_prog_YACC="$YACC" # 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_YACC="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+YACC=$ac_cv_prog_YACC
+if test -n "$YACC"; then
+  echo "$as_me:$LINENO: result: $YACC" >&5
+echo "${ECHO_T}$YACC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}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
+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
+/* end confdefs.h.  */
+
+int
+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
+  php_cv_cc_dashr=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+php_cv_cc_dashr=no
+fi
+rm -f 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
+  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
+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
+/* end confdefs.h.  */
+
+int
+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
+  php_cv_cc_rpath=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+php_cv_cc_rpath=no
+fi
+rm -f 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
+	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
+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
+/* end confdefs.h.  */
+
+int
+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
+  php_cv_cc_dashwlr=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+php_cv_cc_dashwlr=no
+fi
+rm -f 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
+	if test $php_cv_cc_rpath = "yes"; then
+		ld_runpath_switch="-Wl,-R"
+		apxs_runpath_switch="-Wl,-R'"
+	fi
+  fi
+  if test -z "$ld_runpath_switch" ; then
+		ld_runpath_switch="-L"
+	apxs_runpath_switch="-L'"
+  fi
+
+
+
+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
+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
+/* 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 exp ();
+int
+main ()
+{
+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
+  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
+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_m_exp" >&5
+echo "${ECHO_T}$ac_cv_lib_m_exp" >&6
+if test $ac_cv_lib_m_exp = yes; 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
+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
+/* 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 __gxx_personality_v0 ();
+int
+main ()
+{
+__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
+  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
+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_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
+  XTRALIBS="$XTRALIBS -lstdc++"
+fi
+
+XTRALIBS=$XTRALIBS
+
+
+LIBS="$XTRALIBS $LIBS"
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+  CPP=
+fi
+if test -z "$CPP"; then
+  if test "${ac_cv_prog_CPP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+      # Double quotes because CPP needs to be expanded
+    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+    do
+      ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if { (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
+
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether non-existent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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
+  # Broken: success on invalid input.
+continue
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  break
+fi
+
+    done
+    ac_cv_prog_CPP=$CPP
+
+fi
+  CPP=$ac_cv_prog_CPP
+else
+  ac_cv_prog_CPP=$CPP
+fi
+echo "$as_me:$LINENO: result: $CPP" >&5
+echo "${ECHO_T}$CPP" >&6
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if { (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
+
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether non-existent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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
+  # Broken: success on invalid input.
+continue
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  :
+else
+  { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&5
+echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+echo "$as_me:$LINENO: checking for 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'
+    fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
+echo "${ECHO_T}$ac_cv_prog_egrep" >&6
+ EGREP=$ac_cv_prog_egrep
+
+
+echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
+if test "${ac_cv_header_stdc+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (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_header_stdc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_stdc=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "memchr" >/dev/null 2>&1; then
+  :
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "free" >/dev/null 2>&1; then
+  :
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+  if test "$cross_compiling" = yes; then
+  :
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ctype.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+		   (('a' <= (c) && (c) <= 'i') \
+		     || ('j' <= (c) && (c) <= 'r') \
+		     || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+  int i;
+  for (i = 0; i < 256; i++)
+    if (XOR (islower (i), ISLOWER (i))
+	|| toupper (i) != TOUPPER (i))
+      exit(2);
+  exit (0);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$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
+
+( exit $ac_status )
+ac_cv_header_stdc=no
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+echo "${ECHO_T}$ac_cv_header_stdc" >&6
+if test $ac_cv_header_stdc = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define STDC_HEADERS 1
+_ACEOF
+
+fi
+
+
+
+	echo 'void f(){}' > conftest.c
+	if test -z "`${CC} -fPIC -c conftest.c 2>&1`"; then
+	  C_PIC=-fPIC
+	else
+	  C_PIC=
+	fi
+	rm -f conftest*
+
+	C_PIC=$C_PIC
+
+
+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
+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
+
+/* 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.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef strcasecmp
+
+/* 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
+
+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_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_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
+
+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
+
+/* 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
+  STRINGS="-DHAVE_VSNPRINTF $STRINGS"
+fi
+
+STRINGS=$STRINGS
+
+
+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
+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
+
+
+# Check whether --with-pkg-config or --without-pkg-config was given.
+if test "${with_pkg_config+set}" = set; then
+  withval="$with_pkg_config"
+
+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
+
+  PKG_CONFIG=$with_pkg_config
+else
+  PKG_CONFIG="yes"
+fi
+
+if test "$PKG_CONFIG" = "yes" ; then
+
+   # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $PKG_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
+  ;;
+esac
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+
+if test -n "$PKG_CONFIG"; then
+  echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
+echo "${ECHO_T}$PKG_CONFIG" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+
+   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
+   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
+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; }; }
+fi
+
+
+
+unset ac_cv_lib_freetype_FT_Init_FreeType
+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
+else
+  FT_DIR=''
+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; }; }
+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
+else
+  case $FT_BIN in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_FT_BIN="$FT_BIN" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$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
+    break 2
+  fi
+done
+done
+
+  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
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}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
+        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"
+        fi
+else
+
+  if test -z "$FT_DIR" || echo "$FT_DIR" | grep '^/' >/dev/null ; then
+    FT_DIR="$FT_DIR"
+  else
+    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
+    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"
+    if test "x$FT_BIN" = "x"; then
+        test -f $FT_DIR/ft2build.h -a -d $FT_DIR/freetype2 && FT_CFLAGS="-I$FT_DIR -I$FT_DIR/freetype2"
+        test -f $FT_DIR/include/ft2build.h -a -d $FT_DIR/include/freetype2 && FT_CFLAGS="-I$FT_DIR/include -I$FT_DIR/include/freetype2"
+        test -f $FT_DIR/lib/libfreetype.a -o -f $FT_DIR/lib/libfreetype.so -o -f $FT_DIR/lib/libfreetype.sl -o -f $FT_DIR/lib/libfreetype.dylib && FT_LDFLAGS="-L$FT_DIR/lib"
+        test -f $FT_DIR/lib64/libfreetype.a -o -f $FT_DIR/lib64/libfreetype.so -o -f $FT_DIR/lib64/libfreetype.sl && FT_LDFLAGS="-L$FT_DIR/lib64"
+        test -f $FT_DIR/libfreetype.a -o -f $FT_DIR/libfreetype.so -o -f $FT_DIR/libfreetype.sl -o -f $FT_DIR/libfreetype.dylib && FT_LDFLAGS="-L$FT_DIR"
+        fi
+fi
+
+if test "x$FT_BIN" != "x" ; then
+        FT_LDFLAGS=`$FT_BIN --libs`
+        FT_CFLAGS=`$FT_BIN --cflags`
+fi
+
+
+_cppflags="$CPPFLAGS"
+_ldflags="$LDFLAGS"
+_libs="$LIBS"
+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
+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
+/* 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 FT_Init_FreeType ();
+int
+main ()
+{
+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
+  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
+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_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
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBFREETYPE 1
+_ACEOF
+
+  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; }; }
+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
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+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
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 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; }; }
+fi
+
+done
+
+
+CPPFLAGS=$_cppflags
+LDFLAGS=$_ldflags
+LIBS=$_libs
+FT_ENABLED="-DUSE_FREETYPE"
+FT_ENABLED=$FT_ENABLED
+
+FT_INC=$FT_CFLAGS
+
+FT_LIB=$FT_LDFLAGS
+
+ALL_ENABLED="$FT_ENABLED $ALL_ENABLED"
+ALL_INC="$FT_CFLAGS $ALL_INC"
+ALL_LIB="$FT_LDFLAGS $ALL_LIB"
+
+
+
+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
+else
+  ZLIB_DIR=''
+fi;
+
+
+  if test -z "$ZLIB_DIR" || echo "$ZLIB_DIR" | grep '^/' >/dev/null ; then
+    ZLIB_DIR="$ZLIB_DIR"
+  else
+    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;}
+ZLIB_LIB=''
+
+test -f $ZLIB_DIR/include/zlib.h && ZLIB_INCDIR="$ZLIB_DIR/include"
+
+test -f $ZLIB_DIR/lib/libz.a -o -f $ZLIB_DIR/lib/libz.so -o -f $ZLIB_DIR/lib/libz.sl -o -f $ZLIB_DIR/lib/libz.dylib && ZLIB_LIBDIR="$ZLIB_DIR/lib"
+test -f $ZLIB_DIR/lib64/libz.a -o -f $ZLIB_DIR/lib64/libz.so -o -f $ZLIB_DIR/lib64/libz.sl && ZLIB_LIBDIR="$ZLIB_DIR/lib64"
+test -f $ZLIB_DIR/libz.a -o -f $ZLIB_DIR/libz.so -o -f $ZLIB_DIR/libz.sl && ZLIB_LIBDIR="$ZLIB_DIR"
+
+
+if test -n "$ZLIB_LIBDIR" -a -n "$ZLIB_INCDIR" ; then
+
+        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
+
+  if test ""$ZLIB_DIR"" != "/usr/lib"; then
+
+  if test -z ""$ZLIB_DIR"" || echo ""$ZLIB_DIR"" | grep '^/' >/dev/null ; then
+    ai_p=""$ZLIB_DIR""
+  else
+    ai_p="`pwd`/"$ZLIB_DIR""
+  fi
+
+
+  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
+
+
+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
+
+  if test ""$ZLIB_DIR"" != "/usr/lib"; then
+
+  if test -z ""$ZLIB_DIR"" || echo ""$ZLIB_DIR"" | grep '^/' >/dev/null ; then
+    ai_p=""$ZLIB_DIR""
+  else
+    ai_p="`pwd`/"$ZLIB_DIR""
+  fi
+
+
+  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
+
+
+  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
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lz  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char zlibVersion ();
+int
+main ()
+{
+zlibVersion ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$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_z_zlibVersion=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_z_zlibVersion=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_z_zlibVersion" >&5
+echo "${ECHO_T}$ac_cv_lib_z_zlibVersion" >&6
+if test $ac_cv_lib_z_zlibVersion = yes; 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
+  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
+  fi
+
+fi
+
+
+ZLIB_ENABLED=$ZLIB_ENABLED
+
+ZLIB_INC=$ZLIB_INC
+
+ZLIB_LIB=$ZLIB_LIB
+
+
+ALL_ENABLED="$ZLIB_ENABLED $ALL_ENABLED"
+ALL_INC="$ZLIB_INC $ALL_INC"
+ALL_LIB="$ZLIB_LIB $ALL_LIB"
+
+
+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
+else
+  PNG_DIR=''
+fi;
+
+
+  if test -z "$PNG_DIR" || echo "$PNG_DIR" | grep '^/' >/dev/null ; then
+    PNG_DIR="$PNG_DIR"
+  else
+    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;}
+PNG_LIB=''
+PNG_INC=''
+PNG_ENABLED=''
+
+
+if test -n "$PNG_DIR" ; then
+    test -f $PNG_DIR/lib/libpng.a -o -f $PNG_DIR/lib/libpng.so -o -f $PNG_DIR/lib/libpng.sl -o -f $PNG_DIR/lib/libpng.dylib && PNG_LIBDIR="$PNG_DIR/lib"
+    test -f $PNG_DIR/lib64/libpng.a -o -f $PNG_DIR/lib64/libpng.so -o -f $PNG_DIR/lib64/libpng.sl -o -f $PNG_DIR/libpng.dylib && PNG_LIBDIR="$PNG_DIR/lib64"
+    test -f $PNG_DIR/libpng.a -o -f $PNG_DIR/libpng.so -o -f $PNG_DIR/libpng.sl -o -f $PNG_DIR/libpng.dylib && PNG_LIBDIR="$PNG_DIR"
+    test -f $PNG_DIR/include/png.h && PNG_INCLUDE="$PNG_DIR/include"
+    test -f $PNG_DIR/lib/png.h && PNG_INCLUDE="$PNG_DIR/lib"
+    test -f $PNG_DIR/png.h && PNG_INCLUDE="$PNG_DIR"
+
+    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
+
+  if test ""$PNG_LIBDIR"" != "/usr/lib"; then
+
+  if test -z ""$PNG_LIBDIR"" || echo ""$PNG_LIBDIR"" | grep '^/' >/dev/null ; then
+    ai_p=""$PNG_LIBDIR""
+  else
+    ai_p="`pwd`/"$PNG_LIBDIR""
+  fi
+
+
+  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
+      { { 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
+
+  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_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
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = 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; }; }
+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; }; }
+    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
+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
+/* 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 png_init_io ();
+int
+main ()
+{
+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
+  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
+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_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
+  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
+
+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; }; }
+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
+  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; }; }
+  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
+
+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; }; }
+fi
+
+
+
+ALL_ENABLED="$PNG_ENABLED $ALL_ENABLED"
+PNG_ENABLED=$PNG_ENABLED
+
+PNG_INC=$PNG_INC
+
+PNG_LIB=$PNG_LIB
+
+
+
+
+
+# Check whether --with-gif or --without-gif was given.
+if test "${with_gif+set}" = set; then
+  withval="$with_gif"
+  GIF_DIR=$withval
+else
+  GIF_DIR=''
+fi;
+
+
+  if test -z "$GIF_DIR" || echo "$GIF_DIR" | grep '^/' >/dev/null ; then
+    GIF_DIR="$GIF_DIR"
+  else
+    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;}
+GIF_LIB=''
+GIF_INC=''
+GIF_ENABLED=''
+
+
+if test -n "$GIF_DIR" -a "GIF_DIR" != "yes" ; then
+    test -f $GIF_DIR/lib/libgif.a -o -f $GIF_DIR/lib/libgif.so -o -f $GIF_DIR/lib/libgif.sl -o -f $GIF_DIR/lib/libgif.dylib && GIF_LIBDIR="$GIF_DIR/lib"
+    test -f $GIF_DIR/lib64/libgif.a -o -f $GIF_DIR/lib64/libgif.so -o -f $GIF_DIR/lib64/libgif.sl -o -f $GIF_DIR/libgif.dylib && GIF_LIBDIR="$GIF_DIR/lib64"
+    test -f $GIF_DIR/libgif.a -o -f $GIF_DIR/libgif.so -o -f $GIF_DIR/libgif.sl -o -f $GIF_DIR/libgif.dylib && GIF_LIBDIR="$GIF_DIR"
+    test -f $GIF_DIR/include/gif_lib.h && GIF_INCLUDE="$GIF_DIR/include"
+    test -f $GIF_DIR/lib/gif_lib.h && GIF_INCLUDE="$GIF_DIR/lib"
+    test -f $GIF_DIR/gif_lib.h && GIF_INCLUDE="$GIF_DIR"
+
+    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
+
+  if test ""$GIF_LIBDIR"" != "/usr/lib"; then
+
+  if test -z ""$GIF_LIBDIR"" || echo ""$GIF_LIBDIR"" | grep '^/' >/dev/null ; then
+    ai_p=""$GIF_LIBDIR""
+  else
+    ai_p="`pwd`/"$GIF_LIBDIR""
+  fi
+
+
+  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
+      { { 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; }; }
+    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
+  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; }; }
+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; }; }
+    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
+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
+/* 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 DGifOpenFileHandle ();
+int
+main ()
+{
+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
+  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
+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_gif_DGifOpenFileHandle" >&5
+echo "${ECHO_T}$ac_cv_lib_gif_DGifOpenFileHandle" >&6
+if test $ac_cv_lib_gif_DGifOpenFileHandle = yes; 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
+
+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; }; }
+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
+  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; }; }
+  fi
+  GIF_ENABLED="-DUSE_GIF"
+fi
+
+ALL_ENABLED="$GIF_ENABLED $ALL_ENABLED"
+GIF_ENABLED=$GIF_ENABLED
+
+GIF_INC=$GIF_INC
+
+GIF_LIB=$GIF_LIB
+
+
+
+
+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;}
+
+# Check whether --with-jpeg or --without-jpeg was given.
+if test "${with_jpeg+set}" = set; then
+  withval="$with_jpeg"
+
+fi;
+
+if test -n "$with_jpeg" -a "$with_jpeg" != "yes" ; then
+
+
+  if test -z "$with_jpeg" || echo "$with_jpeg" | grep '^/' >/dev/null ; then
+    JPEG_DIR="$with_jpeg"
+  else
+    JPEG_DIR="`pwd`/$with_jpeg"
+  fi
+
+  test -f $JPEG_DIR/include/jpeg/jpeglib.h && JPEG_INCLUDE="$JPEG_DIR/include/jpeg"
+  test -f $JPEG_DIR/include/jpeglib.h && JPEG_INCLUDE="$JPEG_DIR/include"
+  test -f $JPEG_DIR/lib/jpeglib.h && JPEG_INCLUDE="$JPEG_DIR/lib"
+  test -f $JPEG_DIR/jpeglib.h && JPEG_INCLUDE="$JPEG_DIR"
+
+  test -f $JPEG_DIR/lib/libjpeg.a && JPEG_LIBDIR="$JPEG_DIR/lib"
+  test -f $JPEG_DIR/lib64/libjpeg.a && JPEG_LIBDIR="$JPEG_DIR/lib64"
+  test -f $JPEG_DIR/libjpeg.a && JPEG_LIBDIR="$JPEG_DIR"
+
+  test -f $JPEG_DIR/lib/libjpeg.so -o -f $JPEG_DIR/lib/libjpeg.sl -o -f $JPEG_DIR/lib/libjpeg.dylib && JPEG_LIBDIR="$JPEG_DIR/lib"
+  test -f $JPEG_DIR/lib64/libjpeg.so -o -f $JPEG_DIR/lib64/libjpeg.sl && JPEG_LIBDIR="$JPEG_DIR/lib64"
+  test -f $JPEG_DIR/libjpeg.so -o -f $JPEG_DIR/libjpeg.sl -o -f $JPEG_DIR/libjpeg.dylib && JPEG_LIBDIR="$JPEG_DIR"
+
+  if test -n "$JPEG_INCLUDE" -a -n "$JPEG_LIBDIR" ; then
+      JPEG_INC=-I$JPEG_INCLUDE
+      JPEG_LIB="-L$JPEG_LIBDIR -ljpeg"
+
+  if test ""$JPEG_LIBDIR"" != "/usr/lib"; then
+
+  if test -z ""$JPEG_LIBDIR"" || echo ""$JPEG_LIBDIR"" | grep '^/' >/dev/null ; then
+    ai_p=""$JPEG_LIBDIR""
+  else
+    ai_p="`pwd`/"$JPEG_LIBDIR""
+  fi
+
+
+  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
+        { { 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; }; }
+  fi
+
+
+    _cppflags="$CPPFLAGS"
+    _ldflags="$LDFLAGS"
+    _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
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ljpeg  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char jpeg_read_header ();
+int
+main ()
+{
+jpeg_read_header ();
+  ;
+  return 0;
+}
+_ACEOF
+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_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
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5
+echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6
+
+fi
+if test $ac_cv_header_jpeglib_h = yes; then
+  :
+else
+  { { echo "$as_me:$LINENO: error: \"cannot find jpeg headers\"" >&5
+echo "$as_me: error: \"cannot find jpeg headers\"" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+
+    JPEG_ENABLED="-DUSE_JPEG"
+    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
+
+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
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ljpeg  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char jpeg_read_header ();
+int
+main ()
+{
+jpeg_read_header ();
+  ;
+  return 0;
+}
+_ACEOF
+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_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
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5
+echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6
+
+fi
+if test $ac_cv_header_jpeglib_h = yes; then
+  :
+else
+  { { echo "$as_me:$LINENO: error: \"cannot find jpeg headers\"" >&5
+echo "$as_me: error: \"cannot find jpeg headers\"" >&2;}
+   { (exit 1); exit 1; }; }
+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
+fi
+
+JPEG_ENABLED=$JPEG_ENABLED
+
+JPEG_INC=$JPEG_INC
+
+JPEG_LIB=$JPEG_LIB
+
+
+
+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
+else
+  XPM_DIR=''
+fi;
+
+if test "$with_xpm" != "no" ; then
+
+
+  if test -z "$XPM_DIR" || echo "$XPM_DIR" | grep '^/' >/dev/null ; then
+    XPM_DIR="$XPM_DIR"
+  else
+    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;}
+  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"
+  test -f $XPM_DIR/lib64/libXpm.a -o -f $XPM_DIR/lib64/libXpm.so -o -f $XPM_DIR/lib64/libXpm.sl && XPM_LIBDIR="$XPM_DIR/lib64"
+  test -f $XPM_DIR/libXpm.a -o -f $XPM_DIR/libXpm.so -o -f $XPM_DIR/libXpm.sl -o -f $XPM_DIR/libXpm.dylib && XPM_LIBDIR="$XPM_DIR"
+
+  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
+
+  if test ""$XPM_LIBDIR"" != "/usr/lib"; then
+
+  if test -z ""$XPM_LIBDIR"" || echo ""$XPM_LIBDIR"" | grep '^/' >/dev/null ; then
+    ai_p=""$XPM_LIBDIR""
+  else
+    ai_p="`pwd`/"$XPM_LIBDIR""
+  fi
+
+
+  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
+
+
+    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
+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
+/* 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 XpmFreeXpmImage ();
+int
+main ()
+{
+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
+  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
+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_Xpm_XpmFreeXpmImage" >&5
+echo "${ECHO_T}$ac_cv_lib_Xpm_XpmFreeXpmImage" >&6
+if test $ac_cv_lib_Xpm_XpmFreeXpmImage = yes; 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
+    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
+    fi
+  fi
+
+fi
+
+
+GD_XTRA_LIBS="$JPEG_LIB $FT_LIB $PNG_LIB $ZLIB_LIB $XPM_LIB"
+
+
+
+unset ac_cv_lib_iconv_libiconv_open
+unset ac_cv_lib_iconv_iconv_open
+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
+else
+  ICONV_DIR=''
+fi;
+
+{ echo "$as_me:$LINENO: checking where libiconv is installed..." >&5
+echo "$as_me: checking where libiconv is installed..." >&6;}
+
+ICONV_LIB=''
+
+if test -n "$ICONV_DIR" ; then
+
+
+  if test -z "$ICONV_DIR" || echo "$ICONV_DIR" | grep '^/' >/dev/null ; then
+    ICONV_DIR="$ICONV_DIR"
+  else
+    ICONV_DIR="`pwd`/$ICONV_DIR"
+  fi
+
+
+  test -f $ICONV_DIR/include/iconv.h && ICONV_LIBDIR="$ICONV_DIR/lib" && ICONV_INCDIR="$ICONV_DIR/include"
+  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
+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
+/* 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 iconv_open ();
+int
+main ()
+{
+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
+  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
+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_c_iconv_open" >&5
+echo "${ECHO_T}$ac_cv_lib_c_iconv_open" >&6
+if test $ac_cv_lib_c_iconv_open = yes; 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
+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
+/* 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 libiconv_open ();
+int
+main ()
+{
+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
+  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
+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_iconv_libiconv_open" >&5
+echo "${ECHO_T}$ac_cv_lib_iconv_libiconv_open" >&6
+if test $ac_cv_lib_iconv_libiconv_open = yes; 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
+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
+/* 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 iconv_open ();
+int
+main ()
+{
+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
+  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
+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_iconv_iconv_open" >&5
+echo "${ECHO_T}$ac_cv_lib_iconv_iconv_open" >&6
+if test $ac_cv_lib_iconv_iconv_open = yes; then
+  ICONV_LIB="-L$ICONV_LIBDIR -liconv"
+fi
+
+
+fi
+
+if test -n "$ICONV_LIB" ; then
+  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
+
+  if test ""$ICONV_DIR"" != "/usr/lib"; then
+
+  if test -z ""$ICONV_DIR"" || echo ""$ICONV_DIR"" | grep '^/' >/dev/null ; then
+    ai_p=""$ICONV_DIR""
+  else
+    ai_p="`pwd`/"$ICONV_DIR""
+  fi
+
+
+  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
+
+
+  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
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lc  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any 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 iconv_open ();
+int
+main ()
+{
+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
+  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
+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_c_iconv_open" >&5
+echo "${ECHO_T}$ac_cv_lib_c_iconv_open" >&6
+if test $ac_cv_lib_c_iconv_open = yes; 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
+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
+/* 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 libiconv_open ();
+int
+main ()
+{
+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
+  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
+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_iconv_libiconv_open" >&5
+echo "${ECHO_T}$ac_cv_lib_iconv_libiconv_open" >&6
+if test $ac_cv_lib_iconv_libiconv_open = yes; 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
+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
+/* 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 iconv_open ();
+int
+main ()
+{
+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
+  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
+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_iconv_iconv_open" >&5
+echo "${ECHO_T}$ac_cv_lib_iconv_iconv_open" >&6
+if test $ac_cv_lib_iconv_iconv_open = yes; 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
+  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
+  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
+fi
+
+
+ICONV_ENABLED=$ICONV_ENABLED
+
+ICONV_INC=$ICONV_INC
+
+ICONV_LIB=$ICONV_LIB
+
+
+ALL_ENABLED="$ICONV_ENABLED $ALL_ENABLED"
+ALL_INC="$ICONV_INC $ALL_INC"
+ALL_LIB="$ICONV_LIB $ALL_LIB"
+
+
+
+
+ms_saved_LIBS="$LIBS"
+IS_GD2="false";
+
+unset ac_cv_lib_gd_gdImageCreate
+unset ac_cv_lib_gd_gdImageString16
+unset ac_cv_lib_gd_gdImageGif
+unset ac_cv_lib_gd_gdImagePng
+unset ac_cv_lib_gd_gdImageJpeg
+unset ac_cv_lib_gd_gdImageWBMP
+unset ac_cv_lib_gd_gdImageStringFT
+unset ac_cv_lib_gd_gdImageGifPtr
+unset ac_cv_lib_gd_gdFontGetTiny
+unset ac_cv_lib_c_gdImageCreate
+unset ac_cv_lib_c_gdImageString16
+unset ac_cv_lib_c_gdImageGif
+unset ac_cv_lib_c_gdImagePng
+unset ac_cv_lib_c_gdImageJpeg
+unset ac_cv_lib_c_gdImageWBMP
+unset ac_cv_lib_c_gdImageStringFT
+unset ac_cv_lib_c_gdImageGifPtr
+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;}
+
+# Check whether --with-gd or --without-gd was given.
+if test "${with_gd+set}" = set; then
+  withval="$with_gd"
+
+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; }; }
+elif test -n "$with_gd" -a "$with_gd" != "yes" ; then
+
+  if echo "$with_gd" | grep '^static,' >/dev/null ; then
+    GD_DIR=`echo "$with_gd" | sed "s/^static,//"`
+    GD_STATIC=yes
+  else
+    GD_DIR=$with_gd
+    GD_STATIC=no
+  fi
+
+
+  if test -z "$GD_DIR" || echo "$GD_DIR" | grep '^/' >/dev/null ; then
+    GD_DIR="$GD_DIR"
+  else
+    GD_DIR="`pwd`/$GD_DIR"
+  fi
+
+  test -f $GD_DIR/include/gd.h && GD_INCLUDE="$GD_DIR/include"
+  test -f $GD_DIR/include/gd/gd.h && GD_INCLUDE="$GD_DIR/include/gd"
+  test -f $GD_DIR/gd.h && GD_INCLUDE="$GD_DIR"
+
+  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/.libs/libgd.a && GD_LIBDIR="$GD_DIR/.libs"
+  test -f $GD_DIR/_libs/libgd.a && GD_LIBDIR="$GD_DIR/_libs"
+  test -f $GD_DIR/libgd.a && GD_LIBDIR="$GD_DIR"
+
+  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"
+  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/_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
+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
+/* 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
+
+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"
+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
+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
+/* 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
+
+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"
+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 $GD_LIB $GD_XTRA_LIBS" >&5
+echo "${ECHO_T}        using libgd 2.0.28 (or higher) from $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
+
+
+  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
+      { { 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
+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
+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
+/* 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
+
+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"
+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.  */
+_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
+
+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"
+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
+
+
+  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
+
+      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
+
+
+if test -n "$with_gd" -a "$with_gd" != "yes" ; then
+
+
+  if test "$GD_STATIC" = "yes" ; then
+            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
+  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
+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
+/* 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 gdImageGif ();
+int
+main ()
+{
+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
+  eval "$as_ac_Lib=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_Lib=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: `eval echo '${'$as_ac_Lib'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
+if test `eval echo '${'$as_ac_Lib'}'` = 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
+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
+/* 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 gdImagePng ();
+int
+main ()
+{
+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
+  eval "$as_ac_Lib=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_Lib=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: `eval echo '${'$as_ac_Lib'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
+if test `eval echo '${'$as_ac_Lib'}'` = 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
+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
+/* 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 gdImageJpeg ();
+int
+main ()
+{
+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
+  eval "$as_ac_Lib=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_Lib=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: `eval echo '${'$as_ac_Lib'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
+if test `eval echo '${'$as_ac_Lib'}'` = 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
+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
+/* 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 gdImageWBMP ();
+int
+main ()
+{
+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
+  eval "$as_ac_Lib=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_Lib=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: `eval echo '${'$as_ac_Lib'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
+if test `eval echo '${'$as_ac_Lib'}'` = 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
+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
+/* 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 gdImageStringFT ();
+int
+main ()
+{
+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
+  eval "$as_ac_Lib=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_Lib=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: `eval echo '${'$as_ac_Lib'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
+if test `eval echo '${'$as_ac_Lib'}'` = yes; then
+  GD_FT_SUPPORT=yes
+fi
+
+
+    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
+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
+/* 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 gdImageStringFT ();
+int
+main ()
+{
+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
+  eval "$as_ac_Lib=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_Lib=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: `eval echo '${'$as_ac_Lib'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
+if test `eval echo '${'$as_ac_Lib'}'` = yes; then
+  GD_FT_SUPPORT=yes
+fi
+
+  fi
+
+  if test "$GD_FT_SUPPORT" = "yes"; then
+     GD_DEF="$GD_DEF -DUSE_GD_FT"
+  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
+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
+/* 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 gdImageSetResolution ();
+int
+main ()
+{
+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
+  eval "$as_ac_Lib=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_Lib=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: `eval echo '${'$as_ac_Lib'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
+if test `eval echo '${'$as_ac_Lib'}'` = yes; then
+  GD_RESOLUTION_SUPPORT=yes
+fi
+
+
+  if test "$GD_RESOLUTION_SUPPORT" = "yes"; then
+     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
+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
+/* 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 gdImageOpenPolygon ();
+int
+main ()
+{
+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
+  eval "$as_ac_Lib=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_Lib=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: `eval echo '${'$as_ac_Lib'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
+if test `eval echo '${'$as_ac_Lib'}'` = 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
+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
+/* 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 gdImageGifPtr ();
+int
+main ()
+{
+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
+  eval "$as_ac_Lib=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_Lib=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: `eval echo '${'$as_ac_Lib'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
+if test `eval echo '${'$as_ac_Lib'}'` = 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
+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
+/* 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 gdFontGetTiny ();
+int
+main ()
+{
+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
+  eval "$as_ac_Lib=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_Lib=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: `eval echo '${'$as_ac_Lib'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
+if test `eval echo '${'$as_ac_Lib'}'` = yes; then
+  GD_DEF="$GD_DEF -DGD_HAS_GETBITMAPFONTS"
+fi
+
+
+        GD_HAS_GET_TRUE_COLOR_PIXEL=
+
+    CFLAGS_BACKUP="$CFLAGS"
+  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
+  GD_HAS_GET_TRUE_COLOR_PIXEL=yes
+fi
+
+  CFLAGS="$CFLAGS_BACKUP"
+  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
+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
+/* 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 gdImageGetTrueColorPixel ();
+int
+main ()
+{
+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
+  eval "$as_ac_Lib=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_Lib=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: `eval echo '${'$as_ac_Lib'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
+if test `eval echo '${'$as_ac_Lib'}'` = 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
+
+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
+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
+/* 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 gdImageCreate ();
+int
+main ()
+{
+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
+  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
+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_gdImageCreate" >&5
+echo "${ECHO_T}$ac_cv_lib_gd_gdImageCreate" >&6
+if test $ac_cv_lib_gd_gdImageCreate = yes; 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; }; }
+  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
+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
+/* 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 gdImageGif ();
+int
+main ()
+{
+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
+  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
+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_gdImageGif" >&5
+echo "${ECHO_T}$ac_cv_lib_gd_gdImageGif" >&6
+if test $ac_cv_lib_gd_gdImageGif = yes; 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
+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
+/* 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 gdImagePng ();
+int
+main ()
+{
+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
+  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
+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_gdImagePng" >&5
+echo "${ECHO_T}$ac_cv_lib_gd_gdImagePng" >&6
+if test $ac_cv_lib_gd_gdImagePng = yes; 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
+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
+/* 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 gdImageJpeg ();
+int
+main ()
+{
+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
+  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
+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_gdImageJpeg" >&5
+echo "${ECHO_T}$ac_cv_lib_gd_gdImageJpeg" >&6
+if test $ac_cv_lib_gd_gdImageJpeg = yes; 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
+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
+/* 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 gdImageWBMP ();
+int
+main ()
+{
+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
+  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
+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_gdImageWBMP" >&5
+echo "${ECHO_T}$ac_cv_lib_gd_gdImageWBMP" >&6
+if test $ac_cv_lib_gd_gdImageWBMP = yes; 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
+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
+/* 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 gdImageStringFT ();
+int
+main ()
+{
+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
+  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
+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_gdImageStringFT" >&5
+echo "${ECHO_T}$ac_cv_lib_gd_gdImageStringFT" >&6
+if test $ac_cv_lib_gd_gdImageStringFT = yes; 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
+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
+/* 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 gdImageOpenPolygon ();
+int
+main ()
+{
+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
+  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
+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_gdImageOpenPolygon" >&5
+echo "${ECHO_T}$ac_cv_lib_gd_gdImageOpenPolygon" >&6
+if test $ac_cv_lib_gd_gdImageOpenPolygon = yes; 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
+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
+/* 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 gdImageGifPtr ();
+int
+main ()
+{
+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
+  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
+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_gdImageGifPtr" >&5
+echo "${ECHO_T}$ac_cv_lib_gd_gdImageGifPtr" >&6
+if test $ac_cv_lib_gd_gdImageGifPtr = yes; 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
+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
+/* 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 gdFontGetTiny ();
+int
+main ()
+{
+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
+  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
+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_gdFontGetTiny" >&5
+echo "${ECHO_T}$ac_cv_lib_gd_gdFontGetTiny" >&6
+if test $ac_cv_lib_gd_gdFontGetTiny = yes; 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
+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
+/* 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 gdImageSetResolution ();
+int
+main ()
+{
+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
+  eval "$as_ac_Lib=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_Lib=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: `eval echo '${'$as_ac_Lib'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
+if test `eval echo '${'$as_ac_Lib'}'` = yes; then
+  GD_RESOLUTION_SUPPORT=yes
+fi
+
+
+  if test "$GD_RESOLUTION_SUPPORT" = "yes"; then
+     GD_DEF="$GD_DEF -DUSE_GD_RESOLUTION"
+  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
+  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
+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
+/* 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 gdImageGetTrueColorPixel ();
+int
+main ()
+{
+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
+  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
+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_gdImageGetTrueColorPixel" >&5
+echo "${ECHO_T}$ac_cv_lib_gd_gdImageGetTrueColorPixel" >&6
+if test $ac_cv_lib_gd_gdImageGetTrueColorPixel = yes; then
+  GD_DEF="$GD_DEF -DGD_HAS_GET_TRUE_COLOR_PIXEL"
+fi
+
+  fi
+
+  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
+  fi
+fi
+
+GD_LIB="$GD_LIB $GD_XTRA_LIBS"
+
+GD_DEF=$GD_DEF
+
+GD_INC=$GD_INC
+
+GD_LIB=$GD_LIB
+
+GD_STATIC=$GD_STATIC
+
+MAKE_GD=$MAKE_GD
+
+MAKE_GD_CLEAN=$MAKE_GD_CLEAN
+
+
+ALL_ENABLED="$GD_DEF $ALL_ENABLED"
+ALL_INC="$GD_INC $ALL_INC"
+ALL_LIB="$GD_LIB $ALL_LIB"
+ALL_STATIC_LIB="$GD_STATIC $ALL_STATIC_LIB"
+
+LIBS="$ms_saved_LIBS"
+
+
+
+echo "$as_me:$LINENO: checking if FTGL support requested" >&5
+echo $ECHO_N "checking if FTGL support requested... $ECHO_C" >&6
+
+# Check whether --with-ftgl or --without-ftgl was given.
+if test "${with_ftgl+set}" = set; then
+  withval="$with_ftgl"
+
+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
+fi
+if test -n "$with_ftgl" -a "$with_ftgl" != "no" ; then
+
+
+  if test -z "$with_ftgl" || echo "$with_ftgl" | grep '^/' >/dev/null ; then
+    FTGL_DIR="$with_ftgl"
+  else
+    FTGL_DIR="`pwd`/$with_ftgl"
+  fi
+
+
+  FTGL_FLAG=""
+  if  test -f $FTGL_DIR/include/FTGL/ftgl.h -a -f $FTGL_DIR/include/FTGL/FTGLTextureFont.h ; then
+      FTGL_INCLUDE="-I$FTGL_DIR/include/FTGL/"
+  elif  test -f $FTGL_DIR/include/FTGL/FTGL.h -a -f $FTGL_DIR/include/FTGL/FTGLTextureFont.h ; then
+      FTGL_INCLUDE="-I$FTGL_DIR/include/FTGL/"
+      FTGL_FLAG="-DUSE_FTGL_2_1_2"
+  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; }; }
+  fi
+
+  test -f $FTGL_DIR/lib/libftgl.so && FTGL_LIBDIR="$FTGL_DIR/lib"
+  test -f $FTGL_DIR/lib/libftgl.dylib && FTGL_LIBDIR="$FTGL_DIR/lib"
+  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; }; }
+  fi
+
+
+
+    FTGL_ENABLED="-DUSE_FTGL $FTGL_FLAG"
+  FTGL_INC="$FTGL_INCLUDE"
+  FTGL_LIB="-L$FTGL_LIBDIR -lftgl"
+
+  if test ""$FTGL_LIBDIR"" != "/usr/lib"; then
+
+  if test -z ""$FTGL_LIBDIR"" || echo ""$FTGL_LIBDIR"" | grep '^/' >/dev/null ; then
+    ai_p=""$FTGL_LIBDIR""
+  else
+    ai_p="`pwd`/"$FTGL_LIBDIR""
+  fi
+
+
+  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
+
+
+  echo "$as_me:$LINENO: result: using ftgl from $FTGL_DIR" >&5
+echo "${ECHO_T}using ftgl from $FTGL_DIR" >&6
+
+else
+
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+
+fi
+
+FTGL_ENABLED=$FTGL_ENABLED
+
+FTGL_INC=$FTGL_INC
+
+FTGL_LIB=$FTGL_LIB
+
+
+
+ALL_ENABLED="$FTGL_ENABLED $ALL_ENABLED"
+ALL_INC="$FTGL_INC $ALL_INC"
+ALL_LIB="$FTGL_LIB $ALL_LIB"
+
+
+
+echo "$as_me:$LINENO: checking if OGL support requested" >&5
+echo $ECHO_N "checking if OGL support requested... $ECHO_C" >&6
+
+# Check whether --with-ogl or --without-ogl was given.
+if test "${with_ogl+set}" = set; then
+  withval="$with_ogl"
+
+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
+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; }; }
+  fi
+
+
+  if test -z "$with_opengl" || echo "$with_opengl" | grep '^/' >/dev/null ; then
+    OGL_DIR="$with_opengl"
+  else
+    OGL_DIR="`pwd`/$with_opengl"
+  fi
+
+
+  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; }; }
+  fi
+
+  test -f $OGL_DIR/lib/libGL.so -a -f $OGL_DIR/lib/libGLU.so && OGL_LIBDIR="$OGL_DIR/lib"
+  test -f $OGL_DIR/lib/libGL.dylib -a -f $OGL_DIR/lib/libGLU.dylib && OGL_LIBDIR="$OGL_DIR/lib"
+  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; }; }
+  fi
+
+
+
+    OGL_ENABLED="-DUSE_OGL"
+  OGL_INC="$OGL_INCLUDE"
+  OGL_LIB="-L$OGL_LIBDIR -lGL -lGLU"
+
+  if test ""$OGL_LIBDIR"" != "/usr/lib"; then
+
+  if test -z ""$OGL_LIBDIR"" || echo ""$OGL_LIBDIR"" | grep '^/' >/dev/null ; then
+    ai_p=""$OGL_LIBDIR""
+  else
+    ai_p="`pwd`/"$OGL_LIBDIR""
+  fi
+
+
+  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
+
+
+  echo "$as_me:$LINENO: result: using opengl from $OGL_DIR" >&5
+echo "${ECHO_T}using opengl from $OGL_DIR" >&6
+
+else
+
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+
+fi
+
+OGL_ENABLED=$OGL_ENABLED
+
+OGL_INC=$OGL_INC
+
+OGL_LIB=$OGL_LIB
+
+
+
+ALL_ENABLED="$OGL_ENABLED $ALL_ENABLED"
+ALL_INC="$OGL_INC $ALL_INC"
+ALL_LIB="$OGL_LIB $ALL_LIB"
+
+
+
+
+
+# Check whether --with-expat or --without-expat was given.
+if test "${with_expat+set}" = set; then
+  withval="$with_expat"
+  EXPAT_DIR=$withval
+else
+  EXPAT_DIR=''
+fi;
+
+
+  if test -z "$EXPAT_DIR" || echo "$EXPAT_DIR" | grep '^/' >/dev/null ; then
+    EXPAT_DIR="$EXPAT_DIR"
+  else
+    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;}
+EXPAT_LIB=''
+EXPAT_INC=''
+EXPAT_FOUND='no'
+
+
+if test -n "$EXPAT_DIR" ; then
+    test -f $EXPAT_DIR/lib/libexpat.a -o -f $EXPAT_DIR/lib/libexpat.so -o -f $EXPAT_DIR/lib/libexpat.sl -o -f $EXPAT_DIR/lib/libexpat.dylib && EXPAT_LIBDIR="$PNG_DIR/lib"
+    test -f $EXPAT_DIR/lib64/libexpat.a -o -f $EXPAT_DIR/lib64/libexpat.so -o -f $EXPAT_DIR/lib64/libexpat.sl -o -f $EXPAT_DIR/libexpat.dylib && EXPAT_LIBDIR="$PNG_DIR/lib64"
+    test -f $EXPAT_DIR/libexpat.a -o -f $EXPAT_DIR/libexpat.so -o -f $EXPAT_DIR/libexpat.sl -o -f $PNG_DIR/libexpat.dylib && EXPAT_LIBDIR="$PNG_DIR"
+    test -f $EXPAT_DIR/include/expat.h && EXPAT_INCDIR="$EXPAT_DIR/include"
+    test -f $EXPAT_DIR/lib/expat.h && EXPAT_INCDIR="$EXPAT_DIR/lib"
+    test -f $EXPAT_DIR/expat.h && EXPAT_INCDIR="$EXPAT_DIR"
+
+    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
+
+  if test ""$EXPAT_LIBDIR"" != "/usr/lib"; then
+
+  if test -z ""$EXPAT_LIBDIR"" || echo ""$EXPAT_LIBDIR"" | grep '^/' >/dev/null ; then
+    ai_p=""$EXPAT_LIBDIR""
+  else
+    ai_p="`pwd`/"$EXPAT_LIBDIR""
+  fi
+
+
+  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
+      { { 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; }; }
+    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
+  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; }; }
+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; }; }
+    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
+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
+/* end confdefs.h.  */
+#include <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.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
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_expat_h" >&5
+echo "${ECHO_T}$ac_cv_header_expat_h" >&6
+
+fi
+if test $ac_cv_header_expat_h = yes; then
+  :
+else
+  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
+    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
+    EXPAT_FOUND='no'
+  fi
+
+fi
+
+
+echo "$as_me:$LINENO: checking for AGG support" >&5
+echo $ECHO_N "checking for AGG support... $ECHO_C" >&6
+AGG_ENABLED="internal"
+echo "$as_me:$LINENO: result:         yes" >&5
+echo "${ECHO_T}        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 renderers/agg/src/agg_vpgen_clip_polyline.o renderers/agg/src/agg_font_freetype.o"
+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
+
+# 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"
+
+fi;
+
+
+if test "$with_agg_svg_symbols" != "no" ; then
+    if test "$EXPAT_FOUND" = "yes" ; then
+                AGG_OBJ="$AGG_OBJ renderers/agg/src/agg_svg_parser.o renderers/agg/src/agg_svg_path_renderer.o renderers/agg/src/agg_svg_path_tokenizer.o"
+        AGG_LIB="$AGG_LIB $EXPAT_LIB"
+        AGG_LIB=$AGG_LIB
+
+        ALL_LIB="$AGG_LIB $ALL_LIB"
+        AGG_INC="$AGG_INC $EXPAT_INC"
+        AGG_INC=$AGG_INC
+
+        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
+
+    else
+        echo "$as_me:$LINENO: result:         disabled due to missing expat dependency" >&5
+echo "${ECHO_T}        disabled due to missing expat dependency" >&6
+    fi
+fi
+
+AGG_OBJ=$AGG_OBJ
+
+
+
+
+
+
+
+unset ac_cv_lib_proj_pj_init
+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;}
+
+# Check whether --with-proj or --without-proj was given.
+if test "${with_proj+set}" = set; then
+  withval="$with_proj"
+
+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
+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
+/* 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 pj_init ();
+int
+main ()
+{
+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
+  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
+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_proj_pj_init" >&5
+echo "${ECHO_T}$ac_cv_lib_proj_pj_init" >&6
+if test $ac_cv_lib_proj_pj_init = yes; 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
+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
+/* 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 pj_transform ();
+int
+main ()
+{
+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
+  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
+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_proj_pj_transform" >&5
+echo "${ECHO_T}$ac_cv_lib_proj_pj_transform" >&6
+if test $ac_cv_lib_proj_pj_transform = yes; then
+  PJ_TRANSFORM=yes
+else
+  PJ_TRANSFORM=no
+fi
+
+
+  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; }; }
+  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
+  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;}
+  fi
+
+elif test -n "$with_proj" -a "$with_proj" != "no" ; then
+
+
+  if test -z "$with_proj" || echo "$with_proj" | grep '^/' >/dev/null ; then
+    PROJ_DIR="$with_proj"
+  else
+    PROJ_DIR="`pwd`/$with_proj"
+  fi
+
+  test -f $PROJ_DIR/include/proj_api.h && PROJ_INCLUDE="$PROJ_DIR/include"
+  test -f $PROJ_DIR/include/proj/proj_api.h && PROJ_INCLUDE="$PROJ_DIR/include/proj"
+  test -f $PROJ_DIR/src/proj_api.h && PROJ_INCLUDE="$PROJ_DIR/src"
+  test -f $PROJ_DIR/proj_api.h && PROJ_INCLUDE="$PROJ_DIR"
+
+  test -f $PROJ_DIR/src/.libs/libproj.a && PROJ_LIBDIR="$PROJ_DIR/src/.libs"
+  test -f $PROJ_DIR/lib/libproj.a && PROJ_LIBDIR="$PROJ_DIR/lib"
+  test -f $PROJ_DIR/lib64/libproj.a && PROJ_LIBDIR="$PROJ_DIR/lib64"
+  test -f $PROJ_DIR/libproj.a && PROJ_LIBDIR="$PROJ_DIR"
+
+  test -f $PROJ_DIR/src/.libs/libproj.so -o -f $PROJ_DIR/src/.libs/libproj.sl -o -f $PROJ_DIR/src/.libs/libproj.dylib && PROJ_LIBDIR="$PROJ_DIR/src/.libs"
+  test -f $PROJ_DIR/lib/libproj.so -o -f $PROJ_DIR/lib/libproj.sl -o -f $PROJ_DIR/lib/libproj.dylib && PROJ_LIBDIR="$PROJ_DIR/lib"
+  test -f $PROJ_DIR/lib64/libproj.so -o -f $PROJ_DIR/lib64/libproj.sl && PROJ_LIBDIR="$PROJ_DIR/lib64"
+  test -f $PROJ_DIR/libproj.so -o -f $PROJ_DIR/libproj.sl -o -f $PROJ_DIR/libproj.dylib && PROJ_LIBDIR="$PROJ_DIR"
+
+  if test -n "$PROJ_INCLUDE" -a -n "$PROJ_LIBDIR" ; then
+      PROJ_INC=-I$PROJ_INCLUDE
+      PROJ_LIBS="-L$PROJ_LIBDIR -lproj"
+
+  if test ""$PROJ_LIBDIR"" != "/usr/lib"; then
+
+  if test -z ""$PROJ_LIBDIR"" || echo ""$PROJ_LIBDIR"" | grep '^/' >/dev/null ; then
+    ai_p=""$PROJ_LIBDIR""
+  else
+    ai_p="`pwd`/"$PROJ_LIBDIR""
+  fi
+
+
+  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
+      { { 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; }; }
+  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
+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
+/* 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 pj_transform ();
+int
+main ()
+{
+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
+  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
+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_proj_pj_transform" >&5
+echo "${ECHO_T}$ac_cv_lib_proj_pj_transform" >&6
+if test $ac_cv_lib_proj_pj_transform = yes; 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; }; }
+  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
+
+else
+
+  echo "$as_me:$LINENO: result:         PROJ.4 support not requested." >&5
+echo "${ECHO_T}        PROJ.4 support not requested." >&6
+fi
+
+PROJ_ENABLED=$PROJ_ENABLED
+
+PROJ_INC=$PROJ_INC
+
+PROJ_LIBS=$PROJ_LIBS
+
+
+ALL_ENABLED="$PROJ_ENABLED $ALL_ENABLED"
+ALL_INC="$PROJ_INC $ALL_INC"
+ALL_LIB="$PROJ_LIBS $ALL_LIB"
+
+
+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;}
+
+# Check whether --with-threads or --without-threads was given.
+if test "${with_threads+set}" = set; then
+  withval="$with_threads"
+
+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
+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
+/* 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 pthread_create ();
+int
+main ()
+{
+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
+  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
+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_pthread_pthread_create" >&5
+echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6
+if test $ac_cv_lib_pthread_pthread_create = yes; 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
+  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; }; }
+  fi
+
+elif test -n "$with_threads" -a "$with_threads" != "no" ; then
+
+  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
+
+else
+  echo "$as_me:$LINENO: result:         thread safe support disabled." >&5
+echo "${ECHO_T}        thread safe support disabled." >&6
+fi
+
+THREAD_FLAG=$THREAD_FLAG
+
+THREAD_LIB=$THREAD_LIB
+
+
+ALL_ENABLED="$THREAD_FLAG $ALL_ENABLED"
+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;}
+
+# Check whether --with-sde or --without-sde was given.
+if test "${with_sde+set}" = set; then
+  withval="$with_sde"
+
+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
+else
+  SDE_VERSION=91
+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
+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
+/* 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 SE_connection_create ();
+int
+main ()
+{
+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
+  eval "$as_ac_Lib=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_Lib=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: `eval echo '${'$as_ac_Lib'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
+if test `eval echo '${'$as_ac_Lib'}'` = 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
+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
+/* end confdefs.h.  */
+
+
+int
+main ()
+{
+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
+  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
+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_pthread_main" >&5
+echo "${ECHO_T}$ac_cv_lib_pthread_main" >&6
+if test $ac_cv_lib_pthread_main = yes; 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
+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
+/* end confdefs.h.  */
+
+
+int
+main ()
+{
+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
+  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
+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_socket_main" >&5
+echo "${ECHO_T}$ac_cv_lib_socket_main" >&6
+if test $ac_cv_lib_socket_main = yes; 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
+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
+/* end confdefs.h.  */
+
+
+int
+main ()
+{
+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
+  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
+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_dl_main" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_main" >&6
+if test $ac_cv_lib_dl_main = yes; 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
+  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;}
+  fi
+
+elif test -n "$with_sde" -a "$with_sde" != "no" ; then
+
+
+  if test -z "$with_sde" || echo "$with_sde" | grep '^/' >/dev/null ; then
+    SDE_DIR="$with_sde"
+  else
+    SDE_DIR="`pwd`/$with_sde"
+  fi
+
+
+  test -f $SDE_DIR/arcsde/coverages/include/sdetype.h && SDE_INCDIR="$SDE_DIR/arcsde/coverages/include"
+  test -f $SDE_DIR/include/sdetype.h && SDE_INCDIR="$SDE_DIR/include"
+  test -f $SDE_DIR/sdetype.h && SDE_INCDIR="$SDE_DIR"
+
+  test -f $SDE_DIR/lib/libsde$SDE_VERSION.a && SDE_LIBDIR="$SDE_DIR/lib"
+  test -f $SDE_DIR/lib64/libsde$SDE_VERSION.a && SDE_LIBDIR="$SDE_DIR/lib64"
+  test -f $SDE_DIR/libsde$SDE_VERSION.a && SDE_LIBDIR="$SDE_DIR"
+
+  test -f $SDE_DIR/lib/libsde$SDE_VERSION.so -o -f $SDE_DIR/lib/libsde$SDE_VERSION.sl && SDE_LIBDIR="$SDE_DIR/lib"
+  test -f $SDE_DIR/lib64/libsde$SDE_VERSION.so -o -f $SDE_DIR/lib64/libsde$SDE_VERSION.sl && SDE_LIBDIR="$SDE_DIR/lib64"
+  test -f $SDE_DIR/libsde$SDE_VERSION.so -o -f $SDE_DIR/libsde$SDE_VERSION.sl && SDE_LIBDIR="$SDE_DIR"
+
+  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
+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
+/* end confdefs.h.  */
+
+
+int
+main ()
+{
+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
+  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
+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_pthread_main" >&5
+echo "${ECHO_T}$ac_cv_lib_pthread_main" >&6
+if test $ac_cv_lib_pthread_main = yes; 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
+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
+/* end confdefs.h.  */
+
+
+int
+main ()
+{
+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
+  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
+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_socket_main" >&5
+echo "${ECHO_T}$ac_cv_lib_socket_main" >&6
+if test $ac_cv_lib_socket_main = yes; 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
+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
+/* end confdefs.h.  */
+
+
+int
+main ()
+{
+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
+  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
+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_dl_main" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_main" >&6
+if test $ac_cv_lib_dl_main = yes; then
+  SDE_LIB="$SDE_LIB -ldl"
+fi
+
+
+  if test ""$SDE_LIBDIR"" != "/usr/lib"; then
+
+  if test -z ""$SDE_LIBDIR"" || echo ""$SDE_LIBDIR"" | grep '^/' >/dev/null ; then
+    ai_p=""$SDE_LIBDIR""
+  else
+    ai_p="`pwd`/"$SDE_LIBDIR""
+  fi
+
+
+  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
+      { { 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; }; }
+  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
+
+else
+
+  echo "$as_me:$LINENO: result:         ESRI SDE support not requested." >&5
+echo "${ECHO_T}        ESRI SDE support not requested." >&6
+fi
+
+SDE_ENABLED=$SDE_ENABLED
+
+SDE_INC=$SDE_INC
+
+SDE_LIB=$SDE_LIB
+
+
+ALL_ENABLED="$SDE_ENABLED $ALL_ENABLED"
+ALL_INC="$SDE_INC $ALL_INC"
+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
+
+
+# Check whether --with-geos or --without-geos was given.
+if test "${with_geos+set}" = set; then
+  withval="$with_geos"
+
+fi;
+
+if test -n "$with_geos" -a "$with_geos" != "no" ; then
+
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+  GEOS_CONFIG=$with_geos
+
+  if test "$GEOS_CONFIG" = "yes" ; then
+
+    # 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
+else
+  case $GEOS_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_GEOS_CONFIG="$GEOS_CONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$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
+    break 2
+  fi
+done
+done
+
+  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
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}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; }; }
+    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
+  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; }; }
+  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
+
+  geos_major_version=`$GEOS_CONFIG --version | \
+       sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1/'`
+  geos_minor_version=`$GEOS_CONFIG --version | \
+       sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\2/'`
+  geos_micro_version=`$GEOS_CONFIG --version | \
+       sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\3/'`
+
+  req_major=`echo $min_geos_version | \
+       sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1/'`
+  req_minor=`echo $min_geos_version | \
+       sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\2/'`
+  req_micro=`echo $min_geos_version | \
+       sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\3/'`
+
+  ac_req_version=`expr $req_major \* 100000 \+  $req_minor \* 100 \+ $req_micro`
+  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
+  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; }; }
+  fi
+
+
+
+  GEOS_ENABLED=-DUSE_GEOS
+
+  GEOS_INCDIR=`$GEOS_CONFIG --includes`
+  GEOS_INC="-I$GEOS_INCDIR"
+  GEOS_LIB="`$GEOS_CONFIG --libs`_c"
+
+  GEOS_ENABLED=$GEOS_ENABLED
+
+  GEOS_INC=$GEOS_INC
+
+  GEOS_LIB=$GEOS_LIB
+
+
+  ALL_ENABLED="$GEOS_ENABLED $ALL_ENABLED"
+  ALL_INC="$GEOS_INC $ALL_INC"
+  ALL_LIB="$GEOS_LIB $ALL_LIB"
+
+else
+
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}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;}
+
+# Check whether --with-ogr or --without-ogr was given.
+if test "${with_ogr+set}" = set; then
+  withval="$with_ogr"
+
+fi;
+
+if test "`basename xx/$with_ogr`" = "gdal-config" ; then
+  GDAL_CONFIG="$with_ogr"
+fi
+
+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
+else
+  case $GDAL_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_GDAL_CONFIG="$GDAL_CONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$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
+    break 2
+  fi
+done
+done
+
+  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
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}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; }; }
+  fi
+fi
+
+if test -n "$GDAL_CONFIG" -a "$with_ogr" != "no" ; then
+
+
+  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
+  else
+      { echo "$as_me:$LINENO: WARNING:         OGR not available." >&5
+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
+fi
+
+
+echo "$as_me:$LINENO: checking if GDAL support requested" >&5
+echo $ECHO_N "checking if GDAL support requested... $ECHO_C" >&6
+
+
+# Check whether --with-gdal or --without-gdal was given.
+if test "${with_gdal+set}" = set; then
+  withval="$with_gdal"
+
+fi;
+
+if test "$with_gdal" = "yes" ; then
+
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+  if test "`basename xx/$with_gdal`" = "gdal-config" ; then
+    GDAL_CONFIG="$with_gdal"
+  fi
+
+  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
+else
+  case $GDAL_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_GDAL_CONFIG="$GDAL_CONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$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
+    break 2
+  fi
+done
+done
+
+  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
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}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; }; }
+  fi
+
+  GDAL_ENABLED=-DUSE_GDAL
+
+elif test -n "$with_gdal" -a "$with_gdal" != "no" ; then
+
+  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
+  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; }; }
+  fi
+
+  GDAL_ENABLED=-DUSE_GDAL
+
+else
+
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+
+fi
+
+
+if test -n "$GDAL_ENABLED" -o "$OGR_ENABLED"; then
+
+  GDAL_LIB=`$GDAL_CONFIG --libs`
+  GDAL_INC=`$GDAL_CONFIG --cflags`
+
+fi
+
+GDAL_ENABLED=$GDAL_ENABLED
+
+OGR_ENABLED=$OGR_ENABLED
+
+GDAL_INC=$GDAL_INC
+
+GDAL_LIB=$GDAL_LIB
+
+
+ALL_ENABLED="$GDAL_ENABLED $OGR_ENABLED $ALL_ENABLED"
+ALL_INC="$GDAL_INC $ALL_INC"
+ALL_LIB="$GDAL_LIB $ALL_LIB"
+
+
+
+
+echo "$as_me:$LINENO: checking if PostGIS support requested" >&5
+echo $ECHO_N "checking if PostGIS support requested... $ECHO_C" >&6
+
+
+# Check whether --with-postgis or --without-postgis was given.
+if test "${with_postgis+set}" = set; then
+  withval="$with_postgis"
+
+fi;
+
+if test "$with_postgis" = "no" -o "$with_postgis" = "" ; then
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+  PG_CONFIG="no"
+elif test "$with_postgis" = "yes" ; then
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}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
+else
+  case $PG_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PG_CONFIG="$PG_CONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$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
+    break 2
+  fi
+done
+done
+
+  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
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+else
+  PG_CONFIG=$with_postgis
+fi
+
+if test "$PG_CONFIG" = "no" ; then
+  POSTGIS_ENABLED=
+  POSTGIS_INC=
+  POSTGIS_LIB=
+else
+  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
+  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; }; }
+  fi
+
+  POSTGIS_EXTRALIBS="`$PG_CONFIG --libs`"
+    if test $? -ne 0 ; then
+      POSTGIS_EXTRALIBS=
+  fi
+
+  POSTGIS_INC="-I`$PG_CONFIG --includedir`"
+
+  old_LDFLAGS="$LDFLAGS"
+
+  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
+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
+/* 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 PQconnectdb ();
+int
+main ()
+{
+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
+  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
+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_pq_PQconnectdb" >&5
+echo "${ECHO_T}$ac_cv_lib_pq_PQconnectdb" >&6
+if test $ac_cv_lib_pq_PQconnectdb = yes; then
+  POSTGIS_ENABLED="-DUSE_POSTGIS"
+fi
+
+
+    if test  "$POSTGIS_ENABLED"x = x ; then
+    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
+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
+/* 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 PQconnectdb ();
+int
+main ()
+{
+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
+  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
+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_pq_PQconnectdb" >&5
+echo "${ECHO_T}$ac_cv_lib_pq_PQconnectdb" >&6
+if test $ac_cv_lib_pq_PQconnectdb = yes; 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
+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
+/* 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 PQserverVersion ();
+int
+main ()
+{
+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
+  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
+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_pq_PQserverVersion" >&5
+echo "${ECHO_T}$ac_cv_lib_pq_PQserverVersion" >&6
+if test $ac_cv_lib_pq_PQserverVersion = yes; then
+  POSTGIS_ENABLED="$POSTGIS_ENABLED -DPOSTGIS_HAS_SERVER_VERSION"
+fi
+
+  fi
+
+  LDFLAGS="$old_LDFLAGS"
+
+fi
+
+POSTGIS_ENABLED=$POSTGIS_ENABLED
+
+POSTGIS_INC=$POSTGIS_INC
+
+POSTGIS_LIB=$POSTGIS_LIB
+
+
+ALL_ENABLED="$POSTGIS_ENABLED $ALL_ENABLED"
+ALL_INC="$POSTGIS_INC $ALL_INC"
+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
+
+
+# Check whether --with-mysql or --without-mysql was given.
+if test "${with_mysql+set}" = set; then
+  withval="$with_mysql"
+
+fi;
+
+if test "$with_mysql" = "no" -o "$with_mysql" = "" ; then
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+  MY_CONFIG="no"
+elif test "$with_mysql" = "yes" ; then
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}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
+else
+  case $MY_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_MY_CONFIG="$MY_CONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$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
+    break 2
+  fi
+done
+done
+
+  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
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+else
+  MY_CONFIG=$with_mysql
+fi
+
+if test "$MY_CONFIG" = "no" ; then
+  MYSQL_ENABLED=
+  MYSQL_INC=
+  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
+  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; }; }
+  fi
+
+  MYSQL_ENABLED=-DUSE_MYSQL
+  MYSQL_LIB="`$MY_CONFIG --libs` -lmysqlclient"
+#  MYSQL_LIB="-L/usr/lib/mysql -lmysqlclient"
+  MYSQL_INC="`$MY_CONFIG --cflags`"
+#  MYSQL_INC="-I/usr/include/mysql"
+fi
+
+MYSQL_ENABLED=$MYSQL_ENABLED
+
+MYSQL_INC=$MYSQL_INC
+
+MYSQL_LIB=$MYSQL_LIB
+
+
+ALL_ENABLED="$MYSQL_ENABLED $ALL_ENABLED"
+ALL_INC="$MYSQL_INC $ALL_INC"
+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
+
+# Check whether --with-oraclespatial or --without-oraclespatial was given.
+if test "${with_oraclespatial+set}" = set; then
+  withval="$with_oraclespatial"
+
+fi;
+
+if test "$with_oraclespatial" = "no" -o "$with_oraclespatial" = ""; then
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}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
+    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; }; }
+  fi
+else
+  echo "$as_me:$LINENO: result: yes, user supplied ORACLE_HOME" >&5
+echo "${ECHO_T}yes, user supplied ORACLE_HOME" >&6
+  ORA_HOME=$with_oraclespatial
+fi
+
+if test "$ORA_HOME" = "no" ; then
+  ORACLESPATIAL_ENABLED=
+  ORACLESPATIAL_INC=
+  ORACLESPATIAL_LIB=
+else
+
+    test -f $ORA_HOME/lib/libclntsh.so -o -f $ORA_HOME/lib/libclntsh.dylib && ORA_LIBDIR="$ORA_HOME/lib"
+  test -f $ORA_HOME/libclntsh.so -o -f $ORA_HOME/libclntsh.dylib && ORA_LIBDIR="$ORA_HOME"
+  test -f $ORA_HOME/lib/oracle/10*/client/lib/libclntsh.so && ORA_LIBDIR=`dirname $ORA_HOME/lib/oracle/10*/client/lib/libclntsh.so`
+  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; }; }
+  fi
+
+    test -f $ORA_HOME/sdk/include/oci.h && ORA_INCDIR="$ORA_HOME/sdk/include"
+  test -f $ORA_HOME/rdbms/public/oci.h && ORA_INCDIR="$ORA_HOME/rdbms/public"
+  test -f $ORA_HOME/rdbms/demo/oci.h && ORA_INCDIR="$ORA_HOME/rdbms/public"
+  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; }; }
+  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
+
+fi
+
+ORACLESPATIAL_ENABLED=$ORACLESPATIAL_ENABLED
+
+ORACLESPATIAL_INC=$ORACLESPATIAL_INC
+
+ORACLESPATIAL_LIB=$ORACLESPATIAL_LIB
+
+
+ALL_ENABLED="$ORACLESPATIAL_ENABLED $ALL_ENABLED"
+ALL_INC="$ORACLESPATIAL_INC $ALL_INC"
+ALL_LIB="$ORACLESPATIAL_LIB $ALL_LIB"
+
+
+
+
+{ 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;}
+
+# Check whether --with-wms or --without-wms was given.
+if test "${with_wms+set}" = set; then
+  withval="$with_wms"
+
+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
+
+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
+
+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
+
+fi
+
+WMS_SVR_ENABLED=$WMS_SVR_ENABLED
+
+
+ALL_ENABLED="$WMS_SVR_ENABLED $ALL_ENABLED"
+
+
+
+{ 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;}
+
+# Check whether --with-wfs or --without-wfs was given.
+if test "${with_wfs+set}" = set; then
+  withval="$with_wfs"
+
+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
+
+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; }; }
+
+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; }; }
+
+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
+
+fi
+
+WFS_SVR_ENABLED=$WFS_SVR_ENABLED
+
+
+ALL_ENABLED="$WFS_SVR_ENABLED $ALL_ENABLED"
+
+
+
+{ 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;}
+
+# Check whether --with-wcs or --without-wcs was given.
+if test "${with_wcs+set}" = set; then
+  withval="$with_wcs"
+
+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
+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; }; }
+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; }; }
+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
+fi
+
+WCS_SVR_ENABLED=$WCS_SVR_ENABLED
+
+ALL_ENABLED="$WCS_SVR_ENABLED $ALL_ENABLED"
+
+
+
+{ 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;}
+
+# Check whether --with-wmsclient or --without-wmsclient was given.
+if test "${with_wmsclient+set}" = set; then
+  withval="$with_wmsclient"
+
+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
+
+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
+
+elif test "$with_wmsclient" = "yes" ; then
+
+    WMS_REQUESTED="yes"
+
+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;}
+
+# Check whether --with-wfsclient or --without-wfsclient was given.
+if test "${with_wfsclient+set}" = set; then
+  withval="$with_wfsclient"
+
+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
+
+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
+
+elif test "$with_wfsclient" = "yes" ; then
+
+    WFS_REQUESTED="yes"
+
+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;}
+
+# Check whether --with-sos or --without-sos was given.
+if test "${with_sos+set}" = set; then
+  withval="$with_sos"
+
+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
+
+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; }; }
+  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; }; }
+  fi
+
+    SOS_REQUESTED="yes"
+  echo "$as_me:$LINENO: result:         OGC SOS Server support requested." >&5
+echo "${ECHO_T}        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
+
+# Check whether --with-curl-config or --without-curl-config was given.
+if test "${with_curl_config+set}" = set; then
+  withval="$with_curl_config"
+
+fi;
+
+unset ac_cv_path_LIBCURL_CONFIG
+
+if test "$WMS_REQUESTED" = "yes" -o "$WFS_REQUESTED" = "yes" ; then
+
+  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
+    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; }; }
+    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
+else
+  case $LIBCURL_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_LIBCURL_CONFIG="$LIBCURL_CONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$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
+    break 2
+  fi
+done
+done
+
+  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
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}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; }; }
+  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
+
+    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; }; }
+  fi
+
+    echo "$as_me:$LINENO: checking for CURLOPT_PROXYAUTH support" >&5
+echo $ECHO_N "checking for CURLOPT_PROXYAUTH support... $ECHO_C" >&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
+    CURL_FLAGS="-DUSE_CURLOPT_PROXYAUTH"
+  else
+    echo "$as_me:$LINENO: result: no." >&5
+echo "${ECHO_T}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
+  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
+  fi
+
+  CURL_INC=`$LIBCURL_CONFIG --cflags`
+  CURL_LIB=`$LIBCURL_CONFIG --libs`
+  CURL_ENABLED="-DUSE_CURL $CURL_FLAGS"
+
+fi
+
+CURL_INC=$CURL_INC
+
+CURL_LIB=$CURL_LIB
+
+
+ALL_INC="$CURL_INC $ALL_INC"
+ALL_LIB="$CURL_LIB $ALL_LIB"
+
+
+
+# Check whether --with-kml or --without-kml was given.
+if test "${with_kml+set}" = set; then
+  withval="$with_kml"
+
+fi;
+
+echo "$as_me:$LINENO: checking if KML output is requested" >&5
+echo $ECHO_N "checking if KML output is requested... $ECHO_C" >&6
+KML_REQUESTED=""
+
+if test "$with_kml" = "yes"; then
+    echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+    KML_REQUESTED="yes"
+else
+    echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+
+echo "$as_me:$LINENO: checking for libxml2" >&5
+echo $ECHO_N "checking for libxml2... $ECHO_C" >&6
+
+
+# Check whether --with-xml2-config or --without-xml2-config was given.
+if test "${with_xml2_config+set}" = set; then
+  withval="$with_xml2_config"
+
+fi;
+
+unset ac_cv_path_LIBXML2_CONFIG
+
+
+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
+  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
+  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
+  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
+  else
+    with_xml2_config=no
+    echo "$as_me:$LINENO: result: libxml2 not required." >&5
+echo "${ECHO_T}libxml2 not required." >&6
+  fi
+fi
+
+if test "$with_xml2_config" != "no" ; then
+
+  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
+    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; }; }
+    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
+else
+  case $LIBXML2_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_LIBXML2_CONFIG="$LIBXML2_CONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$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
+    break 2
+  fi
+done
+done
+
+  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
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}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; }; }
+  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
+
+  XML2_INC=`$LIBXML2_CONFIG --cflags`
+  XML2_LIB=`$LIBXML2_CONFIG --libs`
+  XML2_ENABLED=-DUSE_LIBXML2
+
+  if test "$SOS_REQUESTED" = "yes" ; then
+    SOS_SVR_ENABLED="-DUSE_SOS_SVR"
+  fi
+  if test "$KML_REQUESTED" = "yes" ; then
+    KML_ENABLED="-DUSE_KML"
+  fi
+fi
+
+XML2_INC=$XML2_INC
+
+XML2_LIB=$XML2_LIB
+
+
+ALL_INC="$XML2_INC $ALL_INC"
+ALL_LIB="$XML2_LIB $ALL_LIB"
+
+
+WMS_LYR_ENABLED=$WMS_LYR_ENABLED
+
+WFS_LYR_ENABLED=$WFS_LYR_ENABLED
+
+SOS_SVR_ENABLED=$SOS_SVR_ENABLED
+
+
+ALL_ENABLED="$WMS_LYR_ENABLED $WFS_LYR_ENABLED $SOS_SVR_ENABLED $XML2_ENABLED $CURL_ENABLED $KML_ENABLED $ALL_ENABLED"
+
+
+
+
+# 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;
+
+echo "$as_me:$LINENO: checking if xml-mapfile is requested" >&5
+echo $ECHO_N "checking if xml-mapfile is requested... $ECHO_C" >&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
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}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
+else
+  XSLT_DIR=''
+fi;
+
+echo "$as_me:$LINENO: checking if xslt is requested" >&5
+echo $ECHO_N "checking if xslt is requested... $ECHO_C" >&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
+else
+
+  if test "$XSLT_DIR" = "yes" -o "$XSLT_DIR" = ""; then
+     XSLT_DIR="/usr"
+  fi
+
+  test -f $XSLT_DIR/include/libxslt/xslt.h && XSLT_INCDIR="$XSLT_DIR/include"
+  test -f $XSLT_DIR/lib/libxslt.so && XSLT_LIBDIR="$XSLT_DIR/lib"
+  test -f $XSLT_DIR/lib64/libxslt.so && XSLT_LIBDIR="$XSLT_DIR/lib64"
+
+  if test -n "$XSLT_LIBDIR" -a -n "$XSLT_INCDIR" ; then
+                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
+
+  if test ""$XSLT_DIR"" != "/usr/lib"; then
+
+  if test -z ""$XSLT_DIR"" || echo ""$XSLT_DIR"" | grep '^/' >/dev/null ; then
+    ai_p=""$XSLT_DIR""
+  else
+    ai_p="`pwd`/"$XSLT_DIR""
+  fi
+
+
+  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
+    { { 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; }; }
+  fi
+fi
+
+XSLT_ENABLED=$XSLT_ENABLED
+
+XSLT_INC=$XSLT_INC
+
+XSLT_LIB=$XSLT_LIB
+
+
+ALL_ENABLED="$XSLT_ENABLED $ALL_ENABLED"
+ALL_INC="$XSLT_INC $ALL_INC"
+ALL_LIB="$XSLT_LIB $ALL_LIB"
+
+
+
+# Check whether --with-exslt or --without-exslt was given.
+if test "${with_exslt+set}" = set; then
+  withval="$with_exslt"
+  EXSLT_DIR=$withval
+else
+  EXSLT_DIR=''
+fi;
+
+echo "$as_me:$LINENO: checking if exslt is requested" >&5
+echo $ECHO_N "checking if exslt is requested... $ECHO_C" >&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
+else
+
+  if test "$EXSLT_DIR" = "yes" -o "$EXSLT_DIR" = ""; then
+     EXSLT_DIR="/usr"
+  fi
+
+  test -f $EXSLT_DIR/include/libexslt/exslt.h && EXSLT_INCDIR="$EXSLT_DIR/include"
+  test -f $EXSLT_DIR/lib/libexslt.so && EXSLT_LIBDIR="$EXSLT_DIR/lib"
+  test -f $EXSLT_DIR/lib64/libexslt.so && EXSLT_LIBDIR="$EXSLT_DIR/lib64"
+
+  if test -n "$EXSLT_LIBDIR" -a -n "$EXSLT_INCDIR" ; then
+                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
+
+  if test ""$EXSLT_DIR"" != "/usr/lib"; then
+
+  if test -z ""$EXSLT_DIR"" || echo ""$EXSLT_DIR"" | grep '^/' >/dev/null ; then
+    ai_p=""$EXSLT_DIR""
+  else
+    ai_p="`pwd`/"$EXSLT_DIR""
+  fi
+
+
+  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
+    { { 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; }; }
+  fi
+fi
+
+EXSLT_ENABLED=$EXSLT_ENABLED
+
+EXSLT_INC=$EXSLT_INC
+
+EXSLT_LIB=$EXSLT_LIB
+
+
+ALL_ENABLED="$EXSLT_ENABLED $ALL_ENABLED"
+ALL_INC="$EXSLT_INC $ALL_INC"
+ALL_LIB="$EXSLT_LIB $ALL_LIB"
+
+
+
+echo "$as_me:$LINENO: checking if FriBidi support requested" >&5
+echo $ECHO_N "checking if FriBidi support requested... $ECHO_C" >&6
+
+
+# Check whether --with-fribidi-config or --without-fribidi-config was given.
+if test "${with_fribidi_config+set}" = set; then
+  withval="$with_fribidi_config"
+
+fi;
+
+if test "$with_fribidi_config" = "no" -o "$with_fribidi_config" = "" ; then
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+  FRIBIDI_CONFIG="no"
+
+elif test "$with_fribidi_config" = "yes" ; then
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}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
+else
+  case $FRIBIDI_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_FRIBIDI_CONFIG="$FRIBIDI_CONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$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
+    break 2
+  fi
+done
+done
+
+  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
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}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
+     `$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
+        FRIBIDI_PKG_CONFIG="yes"
+        FRIBIDI_CONFIG="fribidi"
+     else
+       echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+     fi
+  fi
+else
+  FRIBIDI_CONFIG=$with_fribidi_config
+fi
+
+if test "$FRIBIDI_CONFIG" = "no" ; then
+  FRIBIDI_ENABLED=
+  FRIBIDI_INC=
+  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
+     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
+     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; }; }
+     fi
+     FRIBIDI_ENABLED=-DUSE_FRIBIDI
+     FRIBIDI_LIB=`$FRIBIDI_CONFIG --libs`
+     FRIBIDI_INC=`$FRIBIDI_CONFIG --cflags`
+  fi
+fi
+
+FRIBIDI_ENABLED=$FRIBIDI_ENABLED
+
+FRIBIDI_INC=$FRIBIDI_INC
+
+FRIBIDI_LIB=$FRIBIDI_LIB
+
+
+ALL_ENABLED="$FRIBIDI_ENABLED $ALL_ENABLED"
+ALL_INC="$FRIBIDI_INC $ALL_INC"
+ALL_LIB="$FRIBIDI_LIB $ALL_LIB"
+
+
+
+echo "$as_me:$LINENO: checking if Cairo support requested" >&5
+echo $ECHO_N "checking if Cairo support requested... $ECHO_C" >&6
+
+
+# Check whether --with-cairo or --without-cairo was given.
+if test "${with_cairo+set}" = set; then
+  withval="$with_cairo"
+
+fi;
+
+if test "$with_cairo" = "no" -o "$with_cairo" = "" ; then
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+  CAIRO_CONFIG="no"
+
+elif test "$with_cairo" = "yes" ; then
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}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
+     `$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
+        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; }; }
+     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; }; }
+  fi
+else
+  CAIRO_CONFIG=$with_cairo_config
+fi
+
+if test "$CAIRO_CONFIG" = "no" ; then
+  CAIRO_ENABLED=
+  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
+  CAIRO_ENABLED="-DUSE_CAIRO"
+  CAIRO_LIB=`$PKG_CONFIG --libs $CAIRO_CONFIG`
+  CAIRO_INC=`$PKG_CONFIG --cflags $CAIRO_CONFIG`
+fi
+
+CAIRO_ENABLED=$CAIRO_ENABLED
+
+CAIRO_INC=$CAIRO_INC
+
+CAIRO_LIB=$CAIRO_LIB
+
+
+ALL_ENABLED="$CAIRO_ENABLED $ALL_ENABLED"
+ALL_INC="$CAIRO_INC $ALL_INC"
+ALL_LIB="$CAIRO_LIB $ALL_LIB"
+
+
+echo "$as_me:$LINENO: checking FastCGI support" >&5
+echo $ECHO_N "checking FastCGI support... $ECHO_C" >&6
+
+# Check whether --with-fastcgi or --without-fastcgi was given.
+if test "${with_fastcgi+set}" = set; then
+  withval="$with_fastcgi"
+
+fi;
+
+if test "$with_fastcgi" = "no" -o "$with_fastcgi" = "" ; then
+
+  echo "$as_me:$LINENO: result: not requested." >&5
+echo "${ECHO_T}not requested." >&6
+
+else
+
+  echo "$as_me:$LINENO: result: requested." >&5
+echo "${ECHO_T}requested." >&6
+
+  if test "$with_fastcgi" = "yes" ; then
+    FASTCGI_INC=""
+    FASTCGI_LIB="-lfcgi"
+  else
+    FASTCGI_INC="-I$with_fastcgi/include -I$with_fastcgi/include/fastcgi"
+    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
+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
+/* 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 FCGI_Accept ();
+int
+main ()
+{
+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
+  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
+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_fcgi_FCGI_Accept" >&5
+echo "${ECHO_T}$ac_cv_lib_fcgi_FCGI_Accept" >&6
+if test $ac_cv_lib_fcgi_FCGI_Accept = yes; 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; }; }
+  fi
+
+fi
+
+FASTCGI_ENABLED=$FASTCGI_ENABLED
+
+FASTCGI_INC=$FASTCGI_INC
+
+FASTCGI_LIB=$FASTCGI_LIB
+
+
+ALL_ENABLED="$FASTCGI_ENABLED $ALL_ENABLED"
+ALL_INC="$FASTCGI_INC $ALL_INC"
+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;}
+
+# Check whether --with-httpd or --without-httpd was given.
+if test "${with_httpd+set}" = set; then
+  withval="$with_httpd"
+
+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
+
+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; }; }
+
+else
+
+  if test -n "$with_httpd" ; then
+                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
+    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; }; }
+    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
+else
+  case $HTTPD in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_HTTPD="$HTTPD" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_dummy=""$PATH:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/apache/bin""
+for as_dir in $as_dummy
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$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
+    break 2
+  fi
+done
+done
+
+  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
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}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
+  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
+
+
+        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
+      DEBUG_FLAGS="${DEBUG_FLAGS} -DNEED_NONBLOCKING_STDERR"
+    fi
+
+  fi
+
+fi
+
+
+
+MS_DIR="`pwd`"
+MS_INC="-I$MS_DIR"
+MS_LIB="-L$MS_DIR -lmapserver"
+
+  if test ""$MS_DIR"" != "/usr/lib"; then
+
+  if test -z ""$MS_DIR"" || echo ""$MS_DIR"" | grep '^/' >/dev/null ; then
+    ai_p=""$MS_DIR""
+  else
+    ai_p="`pwd`/"$MS_DIR""
+  fi
+
+
+  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
+
+MS_INC=$MS_INC
+
+MS_LIB=$MS_LIB
+
+
+
+# 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"
+
+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
+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"
+
+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
+fi
+USE_POINT_Z_M=$USE_POINT_Z_M
+
+ALL_ENABLED="$USE_POINT_Z_M $ALL_ENABLED"
+
+
+
+# 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"
+
+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
+else
+  USE_NINT=""
+
+  echo "$as_me:$LINENO: result: Compiling with fast MS_NINT" >&5
+echo "${ECHO_T}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
+
+
+# Check whether --with-warnings or --without-warnings was given.
+if test "${with_warnings+set}" = set; then
+  withval="$with_warnings"
+
+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
+  else
+    WFLAGS=""
+    C_EXTRA_WFLAGS=""
+    echo "$as_me:$LINENO: result: disabled" >&5
+echo "${ECHO_T}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
+  else
+    WFLAGS=""
+    C_EXTRA_WFLAGS=""
+    echo "$as_me:$LINENO: result: disabled" >&5
+echo "${ECHO_T}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
+
+else
+  WFLAGS="$with_warnings"
+  C_EXTRA_WFLAGS=""
+  echo "$as_me:$LINENO: result: user defined" >&5
+echo "${ECHO_T}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"
+
+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
+
+else
+  CXXFLAGS=`echo "$CXXFLAGS -DNDEBUG " | sed "s/-g //"`
+  CFLAGS=`echo "$CFLAGS -DNDEBUG " | sed "s/-g //"`
+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"
+
+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
+fi
+
+DEBUG_FLAGS=$DEBUG_FLAGS
+
+ALL_ENABLED="$DEBUG_FLAGS $ALL_ENABLED"
+
+
+
+# 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"
+ PHP_LD_XTRAFLAGS="$PHP_LD_XTRAFLAGS -fprofile-arcs -ftest-coverage"
+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"
+
+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"
+
+fi;
+
+if test -n "$with_php" -a -d "$with_php" ; then
+
+  if test -z "$with_php" || echo "$with_php" | grep '^/' >/dev/null ; then
+    PHP_SRC_DIR="$with_php"
+  else
+    PHP_SRC_DIR="`pwd`/$with_php"
+  fi
+
+
+  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
+
+      echo "$as_me:$LINENO: checking whether 'perl -V' works" >&5
+echo $ECHO_N "checking whether 'perl -V' works... $ECHO_C" >&6
+      if  (perl -V > /dev/null 2>&1)  ; then
+        echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+#
+# The following is a massive hack.  It tries to steal the
+# mechanism for build a dynamic library from Perl's -V output
+# If this script fails on this machine, try running 'perl -V'
+# manually and pick out the setting for:
+#
+#    cc, optimize, ccflags, ld, cccdlflags and lddlflags
+#
+# Replace the below definitions with the output you see.
+#
+
+if test ! -r "perl.out"; then
+	perl -V > perl.out
+fi
+
+# if the greps and cuts don't do the job, set these manually
+PERL_CC="`grep ' cc=' perl.out | cut -d, -f1 | cut -d\' -f2 | grep -v undef`"
+PERL_OPT="`grep ' optimize=' perl.out | cut -d, -f2 | cut -d\' -f2 | grep -v undef`"
+PERL_CCFLAGS="`grep ' ccflags' perl.out | cut -d, -f1 | grep cflags | cut -d\' -f2 | grep -v undef` `grep ' ccflags' perl.out | cut -d, -f2 | grep ccflags | cut -d\' -f2 | grep -v undef`"
+PERL_LD="`grep ' ld=' perl.out | cut -d, -f1 | cut -d\' -f2 | grep -v undef`"
+PERL_LFLAGS="`grep ' cccdlflags=' perl.out | cut -d, -f1 | cut -d\' -f2 | grep -v undef`"
+PERL_CCDLFLAGS="`grep ' ccdlflags=' perl.out | cut -d, -f4 | cut -d\' -f2 | sed 's, ,,' | grep -v undef`"
+PERL_LDDLFLAGS=`grep ' lddlflags' perl.out | cut -d, -f2 | cut -d\' -f2 | grep -v undef`
+#--------
+
+#if test -n "$PERL_CCDLFLAGS" ; then
+#	echo "-------------------------"
+#	echo "----- IMPORTANT !!! -----"
+#	echo "-------------------------"
+#	echo "To use PHP extensions on your OS, you will need to recompile "
+#	echo "PHP.                                                         "
+#	echo "You need to edit the Makefile in the php3 directory and add  "
+#	echo "$PERL_CCDLFLAGS to the start of the LDFLAGS line at the top  "
+#	echo "of the Makefile.  Then type: 'make clean; make'              "
+#	echo "You can still go ahead and build the extensions now by typing"
+#	echo "'make' in this directory.  They just won't work correctly    "
+#	echo "until you recompile your PHP.                                "
+#        echo "If you are compiling php as a module, you should also add    "
+#        echo "$PERL_CCDLFLAGS to the start of the EXTRA_LDFLAGS in Apache  "
+#        echo "Configuration file.  Note that if you are using the APACI    "
+#        echo "build mechanism you should make this change in the           "
+#        echo "Configuration.tmpl file instead.                             "
+#	echo "-------------------------"
+#	echo "-------------------------"
+#	echo "-------------------------"
+#fi
+
+PERL_CC="$PERL_CC $PERL_OPT $PERL_CCFLAGS -I. -I.. $PERL_LFLAGS"
+PERL_LD="$PERL_LD $PERL_LDDLFLAGS $PERL_CCDLFLAGS"
+
+rm -f perl.out
+
+
+        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; }; }
+      fi
+  else
+
+	echo 'void f(){}' > conftest.c
+	if test -z "`${CC} -fPIC -c conftest.c 2>&1`"; then
+	  C_PIC=-fPIC
+	else
+	  C_PIC=
+	fi
+	rm -f conftest*
+
+	C_PIC=$C_PIC
+
+
+
+
+
+
+
+  echo 'void g(); int main(){ g(); return 0; }' > conftest1.c
+
+  echo '#include <stdio.h>' > conftest2.c
+  echo 'void g(); void g(){printf("");}' >> conftest2.c
+  ${CC} ${C_PIC} -c conftest2.c
+  SO_EXT="so"
+  SO_COMMAND_NAME="-soname"
+  export SO_EXT
+  export SO_COMMAND_NAME
+  LD_SHARED="/bin/true"
+  if test ! -z "`uname -a | grep IRIX`" ; then
+    IRIX_ALL=-all
+  else
+    IRIX_ALL=
+  fi
+
+
+# Check whether --with-ld-shared or --without-ld-shared was given.
+if test "${with_ld_shared+set}" = set; then
+  withval="$with_ld_shared"
+
+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
+    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
+    fi
+    LD_SHARED="$with_ld_shared"
+  fi
+
+    if test ! -z "`uname -a | grep CYGWIN`" \
+        -a "$LD_SHARED" = "/bin/true" ; then
+    if test -z "`gcc -shared conftest2.o -o libconftest.dll`" ; then
+      if test -z "`${CC} conftest1.c -L./ -lconftest -o conftest1 2>&1`"; then
+        LD_LIBRARY_PATH_OLD="$LD_LIBRARY_PATH"
+        if test -z "$LD_LIBRARY_PATH" ; then
+          LD_LIBRARY_PATH="`pwd`"
+        else
+          LD_LIBRARY_PATH="`pwd`:$LD_LIBRARY_PATH"
+        fi
+        export LD_LIBRARY_PATH
+        if test -z "`./conftest1 2>&1`" ; then
+          echo "checking for Cygwin gcc -shared ... yes"
+          LD_SHARED="c++ -shared"
+          SO_EXT="dll"
+        fi
+        LD_LIBRARY_PATH="$LD_LIBRARY_PATH_OLD"
+      fi
+    fi
+  fi
+
+
+    if test ! -z "`uname | grep Darwin`" \
+          -a "$LD_SHARED" = "/bin/true" ; then
+    if test -z "`${CXX} -dynamiclib conftest2.o -o libconftest.so 2>&1`" ; then
+      ${CC} -c conftest1.c
+      if test -z "`${CXX} conftest1.o libconftest.so -o conftest1 2>&1`"; then
+        DYLD_LIBRARY_PATH_OLD="$DYLD_LIBRARY_PATH"
+        if test -z "$DYLD_LIBRARY_PATH" ; then
+          DYLD_LIBRARY_PATH="`pwd`"
+        else
+          DYLD_LIBRARY_PATH="`pwd`:$DYLD_LIBRARY_PATH"
+        fi
+        export DYLD_LIBRARY_PATH
+        if test -z "`./conftest1 2>&1`" ; then
+          echo "checking for ${CXX} -dynamiclib ... yes"
+          LD_SHARED="${CXX} -dynamiclib -single_module -flat_namespace -undefined suppress"
+	  SO_EXT=dylib
+          SO_COMMAND_NAME='-dylib_install_name'
+        fi
+        DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH_OLD"
+      fi
+      rm -f conftest1.o
+    fi
+  fi
+
+  if test "$LD_SHARED" = "/bin/true" \
+	-a -z "`${CXX} -shared $IRIX_ALL conftest2.o -o libconftest.so 2>&1|grep -v WARNING`" ; then
+    if test -z "`${CC} conftest1.c libconftest.so -o conftest1 2>&1`"; then
+      LD_LIBRARY_PATH_OLD="$LD_LIBRARY_PATH"
+      if test -z "$LD_LIBRARY_PATH" ; then
+        LD_LIBRARY_PATH="`pwd`"
+      else
+        LD_LIBRARY_PATH="`pwd`:$LD_LIBRARY_PATH"
+      fi
+      export LD_LIBRARY_PATH
+      if test -z "`./conftest1 2>&1`" ; then
+        echo "checking for ${CXX} -shared ... yes"
+        LD_SHARED="${CXX} -shared $IRIX_ALL"
+      else
+        echo "checking for ${CXX} -shared ... no(3)"
+      fi
+      LD_LIBRARY_PATH="$LD_LIBRARY_PATH_OLD"
+    else
+      echo "checking for ${CXX} -shared ... no(2)"
+    fi
+  else
+    if test "$LD_SHARED" = "/bin/true" ; then
+      echo "checking for ${CXX} -shared ... no(1)"
+    fi
+  fi
+
+  if test "$LD_SHARED" = "/bin/true" \
+          -a -z "`ld -shared conftest2.o -o libconftest.so 2>&1`" ; then
+    if test -z "`${CC} conftest1.c libconftest.so -o conftest1 2>&1`"; then
+      LD_LIBRARY_PATH_OLD="$LD_LIBRARY_PATH"
+      if test -z "$LD_LIBRARY_PATH" ; then
+        LD_LIBRARY_PATH="`pwd`"
+      else
+        LD_LIBRARY_PATH="`pwd`:$LD_LIBRARY_PATH"
+      fi
+      export LD_LIBRARY_PATH
+      if test -z "`./conftest1 2>&1`" ; then
+        echo "checking for ld -shared ... yes"
+        LD_SHARED="ld -shared"
+      fi
+      LD_LIBRARY_PATH="$LD_LIBRARY_PATH_OLD"
+    fi
+  fi
+
+  if test "$LD_SHARED" = "/bin/true" ; then
+    echo "checking for ld -shared ... no"
+    if test ! -x /bin/true ; then
+      LD_SHARED=/usr/bin/true
+    fi
+  fi
+  if test "$LD_SHARED" = "no" ; then
+    if test -x /bin/true ; then
+      LD_SHARED=/bin/true
+    else
+      LD_SHARED=/usr/bin/true
+    fi
+  fi
+
+  rm -f conftest* libconftest*
+
+  LD_SHARED=$LD_SHARED
+
+  SO_EXT=$SO_EXT
+
+  SO_COMMAND_NAME=$SO_COMMAND_NAME
+
+
+
+    if test ! -z "`uname | grep Darwin`" ;then
+          PHP_LD_SHARED="${CXX} -bundle -flat_namespace -undefined suppress"
+  else
+	  PHP_LD_SHARED=$LD_SHARED
+  fi
+
+export PHP_LD_SHARED
+PHP_LD_SHARED=$PHP_LD_SHARED
+
+
+
+    PHP_CC="$CC $C_PIC"
+    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
+    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
+  else
+    { { echo "$as_me:$LINENO: 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; }; }
+  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
+  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:
+!!! 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; }; }
+  else
+     echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+  fi
+  echo "$as_me:$LINENO: result: $PHP_VERSION_FLAG" >&5
+echo "${ECHO_T}$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
+  if test -n "`grep 'define REGEX 1' $PHP_CONFIG_H`"  ; then
+    echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}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
+        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
+          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:
+!!! 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; }; }
+          fi
+	fi
+
+  else
+    echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+  fi
+
+  PHPMS_MAKEFILE=mapscript/php/Makefile
+  MAKE_PHPMS=php_mapscript
+  MAKE_PHPMS_CLEAN=php_mapscript_clean
+
+  PHP_VERSION_FLAG=$PHP_VERSION_FLAG
+
+  PHP_SRC_DIR=$PHP_SRC_DIR
+
+  PHP_CC=$PHP_CC
+
+  PHP_LD=$PHP_LD
+
+  PHP_REGEX_INC=$PHP_REGEX_INC
+
+  PHP_REGEX_OBJ=$PHP_REGEX_OBJ
+
+  USE_PHP_REGEX=$USE_PHP_REGEX
+
+
+  echo "$as_me:$LINENO: result:         PHP/MapScript module configured." >&5
+echo "${ECHO_T}        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; }; }
+else
+  echo "$as_me:$LINENO: result:         PHP/MapScript module not configured." >&5
+echo "${ECHO_T}        PHP/MapScript module not configured." >&6
+fi
+
+MAKE_PHPMS=$MAKE_PHPMS
+
+MAKE_PHPMS_CLEAN=$MAKE_PHPMS_CLEAN
+
+
+
+if test "x$LD_SHARED" = "x" ; then
+
+	echo 'void f(){}' > conftest.c
+	if test -z "`${CC} -fPIC -c conftest.c 2>&1`"; then
+	  C_PIC=-fPIC
+	else
+	  C_PIC=
+	fi
+	rm -f conftest*
+
+	C_PIC=$C_PIC
+
+
+
+
+  echo 'void g(); int main(){ g(); return 0; }' > conftest1.c
+
+  echo '#include <stdio.h>' > conftest2.c
+  echo 'void g(); void g(){printf("");}' >> conftest2.c
+  ${CC} ${C_PIC} -c conftest2.c
+  SO_EXT="so"
+  SO_COMMAND_NAME="-soname"
+  export SO_EXT
+  export SO_COMMAND_NAME
+  LD_SHARED="/bin/true"
+  if test ! -z "`uname -a | grep IRIX`" ; then
+    IRIX_ALL=-all
+  else
+    IRIX_ALL=
+  fi
+
+
+# Check whether --with-ld-shared or --without-ld-shared was given.
+if test "${with_ld_shared+set}" = set; then
+  withval="$with_ld_shared"
+
+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
+    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
+    fi
+    LD_SHARED="$with_ld_shared"
+  fi
+
+    if test ! -z "`uname -a | grep CYGWIN`" \
+        -a "$LD_SHARED" = "/bin/true" ; then
+    if test -z "`gcc -shared conftest2.o -o libconftest.dll`" ; then
+      if test -z "`${CC} conftest1.c -L./ -lconftest -o conftest1 2>&1`"; then
+        LD_LIBRARY_PATH_OLD="$LD_LIBRARY_PATH"
+        if test -z "$LD_LIBRARY_PATH" ; then
+          LD_LIBRARY_PATH="`pwd`"
+        else
+          LD_LIBRARY_PATH="`pwd`:$LD_LIBRARY_PATH"
+        fi
+        export LD_LIBRARY_PATH
+        if test -z "`./conftest1 2>&1`" ; then
+          echo "checking for Cygwin gcc -shared ... yes"
+          LD_SHARED="c++ -shared"
+          SO_EXT="dll"
+        fi
+        LD_LIBRARY_PATH="$LD_LIBRARY_PATH_OLD"
+      fi
+    fi
+  fi
+
+
+    if test ! -z "`uname | grep Darwin`" \
+          -a "$LD_SHARED" = "/bin/true" ; then
+    if test -z "`${CXX} -dynamiclib conftest2.o -o libconftest.so 2>&1`" ; then
+      ${CC} -c conftest1.c
+      if test -z "`${CXX} conftest1.o libconftest.so -o conftest1 2>&1`"; then
+        DYLD_LIBRARY_PATH_OLD="$DYLD_LIBRARY_PATH"
+        if test -z "$DYLD_LIBRARY_PATH" ; then
+          DYLD_LIBRARY_PATH="`pwd`"
+        else
+          DYLD_LIBRARY_PATH="`pwd`:$DYLD_LIBRARY_PATH"
+        fi
+        export DYLD_LIBRARY_PATH
+        if test -z "`./conftest1 2>&1`" ; then
+          echo "checking for ${CXX} -dynamiclib ... yes"
+          LD_SHARED="${CXX} -dynamiclib -single_module -flat_namespace -undefined suppress"
+	  SO_EXT=dylib
+          SO_COMMAND_NAME='-dylib_install_name'
+        fi
+        DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH_OLD"
+      fi
+      rm -f conftest1.o
+    fi
+  fi
+
+  if test "$LD_SHARED" = "/bin/true" \
+	-a -z "`${CXX} -shared $IRIX_ALL conftest2.o -o libconftest.so 2>&1|grep -v WARNING`" ; then
+    if test -z "`${CC} conftest1.c libconftest.so -o conftest1 2>&1`"; then
+      LD_LIBRARY_PATH_OLD="$LD_LIBRARY_PATH"
+      if test -z "$LD_LIBRARY_PATH" ; then
+        LD_LIBRARY_PATH="`pwd`"
+      else
+        LD_LIBRARY_PATH="`pwd`:$LD_LIBRARY_PATH"
+      fi
+      export LD_LIBRARY_PATH
+      if test -z "`./conftest1 2>&1`" ; then
+        echo "checking for ${CXX} -shared ... yes"
+        LD_SHARED="${CXX} -shared $IRIX_ALL"
+      else
+        echo "checking for ${CXX} -shared ... no(3)"
+      fi
+      LD_LIBRARY_PATH="$LD_LIBRARY_PATH_OLD"
+    else
+      echo "checking for ${CXX} -shared ... no(2)"
+    fi
+  else
+    if test "$LD_SHARED" = "/bin/true" ; then
+      echo "checking for ${CXX} -shared ... no(1)"
+    fi
+  fi
+
+  if test "$LD_SHARED" = "/bin/true" \
+          -a -z "`ld -shared conftest2.o -o libconftest.so 2>&1`" ; then
+    if test -z "`${CC} conftest1.c libconftest.so -o conftest1 2>&1`"; then
+      LD_LIBRARY_PATH_OLD="$LD_LIBRARY_PATH"
+      if test -z "$LD_LIBRARY_PATH" ; then
+        LD_LIBRARY_PATH="`pwd`"
+      else
+        LD_LIBRARY_PATH="`pwd`:$LD_LIBRARY_PATH"
+      fi
+      export LD_LIBRARY_PATH
+      if test -z "`./conftest1 2>&1`" ; then
+        echo "checking for ld -shared ... yes"
+        LD_SHARED="ld -shared"
+      fi
+      LD_LIBRARY_PATH="$LD_LIBRARY_PATH_OLD"
+    fi
+  fi
+
+  if test "$LD_SHARED" = "/bin/true" ; then
+    echo "checking for ld -shared ... no"
+    if test ! -x /bin/true ; then
+      LD_SHARED=/usr/bin/true
+    fi
+  fi
+  if test "$LD_SHARED" = "no" ; then
+    if test -x /bin/true ; then
+      LD_SHARED=/bin/true
+    else
+      LD_SHARED=/usr/bin/true
+    fi
+  fi
+
+  rm -f conftest* libconftest*
+
+  LD_SHARED=$LD_SHARED
+
+  SO_EXT=$SO_EXT
+
+  SO_COMMAND_NAME=$SO_COMMAND_NAME
+
+
+fi
+
+
+
+# Check whether --with-apxs or --without-apxs was given.
+if test "${with_apxs+set}" = set; then
+  withval="$with_apxs"
+
+fi;
+
+if test -n "$with_apxs" -a "$with_apxs" != "no" ; then
+
+  { { echo "$as_me:$LINENO: 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; }; }
+
+
+  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
+  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; }; }
+
+  elif test "$with_apxs" = "yes" ; then
+    APXS=apxs
+  else
+    APXS="$with_apxs"
+  fi
+
+  APACHE_INC=-I`$APXS -q INCLUDEDIR`
+  echo "$as_me:$LINENO: result: $APACHE_INC" >&5
+echo "${ECHO_T}$APACHE_INC" >&6
+
+    fi
+
+
+
+
+# Check whether --with-apache or --without-apache was given.
+if test "${with_apache+set}" = set; then
+  withval="$with_apache"
+
+fi;
+
+if test -n "$with_apache" -a "$with_apache" != "no" ; then
+
+  { { echo "$as_me:$LINENO: 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; }; }
+
+  echo "$as_me:$LINENO: checking for location of Apache headers" >&5
+echo $ECHO_N "checking for location of Apache headers... $ECHO_C" >&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; }; }
+  fi
+
+
+  if test -z "$with_apache" || echo "$with_apache" | grep '^/' >/dev/null ; then
+    APACHE_DIR="$with_apache"
+  else
+    APACHE_DIR="`pwd`/$with_apache"
+  fi
+
+  test -f $APACHE_DIR/httpd.h && APACHE_INC_DIR="$APACHE_DIR"
+  test -f $APACHE_DIR/include/httpd.h && APACHE_INC_DIR="$APACHE_DIR/include"
+  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
+  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; }; }
+  fi
+fi
+
+APACHE_INC=$APACHE_INC
+
+
+
+
+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"
+
+fi;
+
+if test "$enable_runpath" != "yes" ; then
+  RPATHS=""
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+else
+  echo "$as_me:$LINENO: result: yes ($RPATHS)" >&5
+echo "${ECHO_T}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
+
+# 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"
+
+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
+else
+OUR_OSNAME=`uname -s`
+case "${OUR_OSNAME}" in
+[Ll]inux) OS_INCLUDE_DIR="linux" ;;
+[sS]olaris*) OS_INCLUDE_DIR="solaris" ;;
+[sS]unOS*) OS_INCLUDE_DIR="solaris" ;;
+[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
+fi
+
+OS_INCLUDE_DIR=$OS_INCLUDE_DIR
+
+
+
+ALL_ENABLED=$ALL_ENABLED
+
+ALL_INC=$ALL_INC
+
+ALL_LIB=$ALL_LIB
+
+ALL_STATIC_LIB=$ALL_STATIC_LIB
+
+RPATHS=$RPATHS
+
+
+                                        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
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems.  If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+{
+  (set) 2>&1 |
+    case `(ac_space=' '; set | grep ac_space) 2>&1` in
+    *ac_space=\ *)
+      # `set' does not quote correctly, so add quotes (double-quote
+      # substitution turns \\\\ into \\, and sed turns \\ into \).
+      sed -n \
+	"s/'/'\\\\''/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+      ;;
+    *)
+      # `set' quotes correctly as required by POSIX, so do not add quotes.
+      sed -n \
+	"s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+      ;;
+    esac;
+} |
+  sed '
+     t clear
+     : clear
+     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+     t end
+     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+     : end' >>confcache
+if 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
+  else
+    echo "not updating unwritable cache $cache_file"
+  fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+  ac_vpsub='/^[	 ]*VPATH[	 ]*=/{
+s/:*\$(srcdir):*/:/;
+s/:*\${srcdir}:*/:/;
+s/:*@srcdir@:*/:/;
+s/^\([^=]*=[	 ]*\):*/\1/;
+s/:*$//;
+s/^[^=]*=[	 ]*$//;
+}'
+fi
+
+# 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,
+# look for a macro that doesn't take arguments.
+cat >confdef2opt.sed <<\_ACEOF
+t clear
+: clear
+s,^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\),-D\1=\2,g
+t quote
+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
+
+
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+  # 1. Remove the extension, and $U if already installed.
+  ac_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'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+
+: ${CONFIG_STATUS=./config.status}
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+## --------------------- ##
+## M4sh Initialization.  ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+  set -o posix
+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
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+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
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)$' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+  	  /^X\/\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\/\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+
+
+  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= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+  # We could just check for DJGPP; but this test a) works b) is more generic
+  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+  if test -f conf$$.exe; then
+    # Don't use ln at all; we don't have any links
+    as_ln_s='cp -p'
+  else
+    as_ln_s='ln -s'
+  fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s=ln
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p=:
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" 	$as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+exec 6>&1
+
+# Open the log real soon, 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
+
+This file was extended by $as_me, which was
+generated by GNU Autoconf 2.59.  Invocation command line was
+
+  CONFIG_FILES    = $CONFIG_FILES
+  CONFIG_HEADERS  = $CONFIG_HEADERS
+  CONFIG_LINKS    = $CONFIG_LINKS
+  CONFIG_COMMANDS = $CONFIG_COMMANDS
+  $ $0 $@
+
+_CSEOF
+echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
+echo >&5
+_ACEOF
+
+# Files that config.status was made for.
+if test -n "$ac_config_files"; then
+  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_headers"; then
+  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_links"; then
+  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_commands"; then
+  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTIONS] [FILE]...
+
+  -h, --help       print this help, then exit
+  -V, --version    print version number, then exit
+  -q, --quiet      do not print progress messages
+  -d, --debug      don't remove temporary files
+      --recheck    update $as_me by reconfiguring in the same conditions
+  --file=FILE[:TEMPLATE]
+		   instantiate the configuration file FILE
+
+Configuration files:
+$config_files
+
+Report bugs to <bug-autoconf@gnu.org>."
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+ac_cs_version="\\
+config.status
+configured by $0, generated by GNU Autoconf 2.59,
+  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright (C) 2003 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
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If no file are specified by the user, then we need to provide default
+# value.  By we need to know if files were specified by the user.
+ac_need_defaults=:
+while test $# != 0
+do
+  case $1 in
+  --*=*)
+    ac_option=`expr "x$1" : 'x\([^=]*\)='`
+    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
+    ac_shift=:
+    ;;
+  -*)
+    ac_option=$1
+    ac_optarg=$2
+    ac_shift=shift
+    ;;
+  *) # 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 )
+    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"
+    ac_need_defaults=false;;
+  -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; }; } ;;
+
+  *) ac_config_targets="$ac_config_targets $1" ;;
+
+  esac
+  shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+  exec 6>/dev/null
+  ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+if \$ac_cs_recheck; then
+  echo "running $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
+fi
+
+_ACEOF
+
+
+
+
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+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; }; };;
+  esac
+done
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used.  Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+fi
+
+# Have a temporary directory for convenience.  Make it in the build tree
+# simply because there is no reason to put 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.
+$debug ||
+{
+  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
+  trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+
+# Create a (secure) tmp directory for tmp files.
+
+{
+  tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
+  test -n "$tmp" && test -d "$tmp"
+}  ||
+{
+  tmp=./confstat$$-$RANDOM
+  (umask 077 && mkdir $tmp)
+} ||
+{
+   echo "$me: cannot create a temporary directory in ." >&2
+   { (exit 1); exit 1; }
+}
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+
+#
+# CONFIG_FILES section.
+#
+
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "\$CONFIG_FILES"; then
+  # Protect against being on the right side of a sed subst in config.status.
+  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
+   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
+s,@SHELL@,$SHELL,;t t
+s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
+s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
+s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
+s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
+s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
+s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
+s,@exec_prefix@,$exec_prefix,;t t
+s,@prefix@,$prefix,;t t
+s,@program_transform_name@,$program_transform_name,;t t
+s,@bindir@,$bindir,;t t
+s,@sbindir@,$sbindir,;t t
+s,@libexecdir@,$libexecdir,;t t
+s,@datadir@,$datadir,;t t
+s,@sysconfdir@,$sysconfdir,;t t
+s,@sharedstatedir@,$sharedstatedir,;t t
+s,@localstatedir@,$localstatedir,;t t
+s,@libdir@,$libdir,;t t
+s,@includedir@,$includedir,;t t
+s,@oldincludedir@,$oldincludedir,;t t
+s,@infodir@,$infodir,;t t
+s,@mandir@,$mandir,;t t
+s,@build_alias@,$build_alias,;t t
+s,@host_alias@,$host_alias,;t t
+s,@target_alias@,$target_alias,;t t
+s,@DEFS@,$DEFS,;t t
+s,@ECHO_C@,$ECHO_C,;t t
+s,@ECHO_N@,$ECHO_N,;t t
+s,@ECHO_T@,$ECHO_T,;t t
+s,@LIBS@,$LIBS,;t t
+s,@CC@,$CC,;t t
+s,@CFLAGS@,$CFLAGS,;t t
+s,@LDFLAGS@,$LDFLAGS,;t t
+s,@CPPFLAGS@,$CPPFLAGS,;t t
+s,@ac_ct_CC@,$ac_ct_CC,;t t
+s,@EXEEXT@,$EXEEXT,;t t
+s,@OBJEXT@,$OBJEXT,;t t
+s,@CXX@,$CXX,;t t
+s,@CXXFLAGS@,$CXXFLAGS,;t t
+s,@ac_ct_CXX@,$ac_ct_CXX,;t t
+s,@RANLIB@,$RANLIB,;t t
+s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
+s,@LEX@,$LEX,;t t
+s,@LEXLIB@,$LEXLIB,;t t
+s,@LEX_OUTPUT_ROOT@,$LEX_OUTPUT_ROOT,;t t
+s,@YACC@,$YACC,;t t
+s,@XTRALIBS@,$XTRALIBS,;t t
+s,@CPP@,$CPP,;t t
+s,@EGREP@,$EGREP,;t t
+s,@C_PIC@,$C_PIC,;t t
+s,@STRINGS@,$STRINGS,;t t
+s,@MS_VERSION@,$MS_VERSION,;t t
+s,@PKG_CONFIG@,$PKG_CONFIG,;t t
+s,@FT_BIN@,$FT_BIN,;t t
+s,@FT_ENABLED@,$FT_ENABLED,;t t
+s,@FT_INC@,$FT_INC,;t t
+s,@FT_LIB@,$FT_LIB,;t t
+s,@ZLIB_ENABLED@,$ZLIB_ENABLED,;t t
+s,@ZLIB_INC@,$ZLIB_INC,;t t
+s,@ZLIB_LIB@,$ZLIB_LIB,;t t
+s,@PNG_ENABLED@,$PNG_ENABLED,;t t
+s,@PNG_INC@,$PNG_INC,;t t
+s,@PNG_LIB@,$PNG_LIB,;t t
+s,@GIF_ENABLED@,$GIF_ENABLED,;t t
+s,@GIF_INC@,$GIF_INC,;t t
+s,@GIF_LIB@,$GIF_LIB,;t t
+s,@JPEG_ENABLED@,$JPEG_ENABLED,;t t
+s,@JPEG_INC@,$JPEG_INC,;t t
+s,@JPEG_LIB@,$JPEG_LIB,;t t
+s,@ICONV_ENABLED@,$ICONV_ENABLED,;t t
+s,@ICONV_INC@,$ICONV_INC,;t t
+s,@ICONV_LIB@,$ICONV_LIB,;t t
+s,@GD_DEF@,$GD_DEF,;t t
+s,@GD_INC@,$GD_INC,;t t
+s,@GD_LIB@,$GD_LIB,;t t
+s,@GD_STATIC@,$GD_STATIC,;t t
+s,@MAKE_GD@,$MAKE_GD,;t t
+s,@MAKE_GD_CLEAN@,$MAKE_GD_CLEAN,;t t
+s,@FTGL_ENABLED@,$FTGL_ENABLED,;t t
+s,@FTGL_INC@,$FTGL_INC,;t t
+s,@FTGL_LIB@,$FTGL_LIB,;t t
+s,@OGL_ENABLED@,$OGL_ENABLED,;t t
+s,@OGL_INC@,$OGL_INC,;t t
+s,@OGL_LIB@,$OGL_LIB,;t t
+s,@AGG_LIB@,$AGG_LIB,;t t
+s,@AGG_INC@,$AGG_INC,;t t
+s,@AGG_OBJ@,$AGG_OBJ,;t t
+s,@PROJ_ENABLED@,$PROJ_ENABLED,;t t
+s,@PROJ_INC@,$PROJ_INC,;t t
+s,@PROJ_LIBS@,$PROJ_LIBS,;t t
+s,@THREAD_FLAG@,$THREAD_FLAG,;t t
+s,@THREAD_LIB@,$THREAD_LIB,;t t
+s,@SDE_ENABLED@,$SDE_ENABLED,;t t
+s,@SDE_INC@,$SDE_INC,;t t
+s,@SDE_LIB@,$SDE_LIB,;t t
+s,@GEOS_CONFIG@,$GEOS_CONFIG,;t t
+s,@GEOS_ENABLED@,$GEOS_ENABLED,;t t
+s,@GEOS_INC@,$GEOS_INC,;t t
+s,@GEOS_LIB@,$GEOS_LIB,;t t
+s,@GDAL_CONFIG@,$GDAL_CONFIG,;t t
+s,@GDAL_ENABLED@,$GDAL_ENABLED,;t t
+s,@OGR_ENABLED@,$OGR_ENABLED,;t t
+s,@GDAL_INC@,$GDAL_INC,;t t
+s,@GDAL_LIB@,$GDAL_LIB,;t t
+s,@PG_CONFIG@,$PG_CONFIG,;t t
+s,@POSTGIS_ENABLED@,$POSTGIS_ENABLED,;t t
+s,@POSTGIS_INC@,$POSTGIS_INC,;t t
+s,@POSTGIS_LIB@,$POSTGIS_LIB,;t t
+s,@MY_CONFIG@,$MY_CONFIG,;t t
+s,@MYSQL_ENABLED@,$MYSQL_ENABLED,;t t
+s,@MYSQL_INC@,$MYSQL_INC,;t t
+s,@MYSQL_LIB@,$MYSQL_LIB,;t t
+s,@ORACLESPATIAL_ENABLED@,$ORACLESPATIAL_ENABLED,;t t
+s,@ORACLESPATIAL_INC@,$ORACLESPATIAL_INC,;t t
+s,@ORACLESPATIAL_LIB@,$ORACLESPATIAL_LIB,;t t
+s,@WMS_SVR_ENABLED@,$WMS_SVR_ENABLED,;t t
+s,@WFS_SVR_ENABLED@,$WFS_SVR_ENABLED,;t t
+s,@WCS_SVR_ENABLED@,$WCS_SVR_ENABLED,;t t
+s,@LIBCURL_CONFIG@,$LIBCURL_CONFIG,;t t
+s,@CURL_INC@,$CURL_INC,;t t
+s,@CURL_LIB@,$CURL_LIB,;t t
+s,@LIBXML2_CONFIG@,$LIBXML2_CONFIG,;t t
+s,@XML2_INC@,$XML2_INC,;t t
+s,@XML2_LIB@,$XML2_LIB,;t t
+s,@WMS_LYR_ENABLED@,$WMS_LYR_ENABLED,;t t
+s,@WFS_LYR_ENABLED@,$WFS_LYR_ENABLED,;t t
+s,@SOS_SVR_ENABLED@,$SOS_SVR_ENABLED,;t t
+s,@XSLT_ENABLED@,$XSLT_ENABLED,;t t
+s,@XSLT_INC@,$XSLT_INC,;t t
+s,@XSLT_LIB@,$XSLT_LIB,;t t
+s,@EXSLT_ENABLED@,$EXSLT_ENABLED,;t t
+s,@EXSLT_INC@,$EXSLT_INC,;t t
+s,@EXSLT_LIB@,$EXSLT_LIB,;t t
+s,@FRIBIDI_CONFIG@,$FRIBIDI_CONFIG,;t t
+s,@FRIBIDI_ENABLED@,$FRIBIDI_ENABLED,;t t
+s,@FRIBIDI_INC@,$FRIBIDI_INC,;t t
+s,@FRIBIDI_LIB@,$FRIBIDI_LIB,;t t
+s,@CAIRO_ENABLED@,$CAIRO_ENABLED,;t t
+s,@CAIRO_INC@,$CAIRO_INC,;t t
+s,@CAIRO_LIB@,$CAIRO_LIB,;t t
+s,@FASTCGI_ENABLED@,$FASTCGI_ENABLED,;t t
+s,@FASTCGI_INC@,$FASTCGI_INC,;t t
+s,@FASTCGI_LIB@,$FASTCGI_LIB,;t t
+s,@HTTPD@,$HTTPD,;t t
+s,@MS_INC@,$MS_INC,;t t
+s,@MS_LIB@,$MS_LIB,;t t
+s,@IGNORE_MISSING_DATA@,$IGNORE_MISSING_DATA,;t t
+s,@USE_POINT_Z_M@,$USE_POINT_Z_M,;t t
+s,@USE_NINT@,$USE_NINT,;t t
+s,@DEBUG_FLAGS@,$DEBUG_FLAGS,;t t
+s,@LD_SHARED@,$LD_SHARED,;t t
+s,@SO_EXT@,$SO_EXT,;t t
+s,@SO_COMMAND_NAME@,$SO_COMMAND_NAME,;t t
+s,@PHP_LD_SHARED@,$PHP_LD_SHARED,;t t
+s,@PHP_VERSION_FLAG@,$PHP_VERSION_FLAG,;t t
+s,@PHP_SRC_DIR@,$PHP_SRC_DIR,;t t
+s,@PHP_CC@,$PHP_CC,;t t
+s,@PHP_LD@,$PHP_LD,;t t
+s,@PHP_REGEX_INC@,$PHP_REGEX_INC,;t t
+s,@PHP_REGEX_OBJ@,$PHP_REGEX_OBJ,;t t
+s,@USE_PHP_REGEX@,$USE_PHP_REGEX,;t t
+s,@MAKE_PHPMS@,$MAKE_PHPMS,;t t
+s,@MAKE_PHPMS_CLEAN@,$MAKE_PHPMS_CLEAN,;t t
+s,@APACHE_INC@,$APACHE_INC,;t t
+s,@OS_INCLUDE_DIR@,$OS_INCLUDE_DIR,;t t
+s,@ALL_ENABLED@,$ALL_ENABLED,;t t
+s,@ALL_INC@,$ALL_INC,;t t
+s,@ALL_LIB@,$ALL_LIB,;t t
+s,@ALL_STATIC_LIB@,$ALL_STATIC_LIB,;t t
+s,@RPATHS@,$RPATHS,;t t
+s,@LIBOBJS@,$LIBOBJS,;t t
+s,@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
+  fi
+fi # test -n "$CONFIG_FILES"
+
+_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 ;;
+  esac
+
+  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
+  ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$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; }; }; }
+
+  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 $srcdir in
+  .)  # No --srcdir option.  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_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;;
+esac
+
+
+
+  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; }
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+  sed "$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s,@configure_input@,$configure_input,;t t
+s,@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,@top_builddir@,$ac_top_builddir,;t t
+s,@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
+
+done
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+{ (exit 0); exit 0; }
+_ACEOF
+chmod +x $CONFIG_STATUS
+ac_clean_files=$ac_clean_files_save
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded.  So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status.  When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+  ac_cs_success=:
+  ac_config_status_args=
+  test "$silent" = yes &&
+    ac_config_status_args="$ac_config_status_args --quiet"
+  exec 5>/dev/null
+  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+  exec 5>>config.log
+  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+  # would make configure fail if this is the last instruction.
+  $ac_cs_success || { (exit 1); exit 1; }
+fi
+
+
+
+
+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
+
+echo "$as_me:$LINENO: result:  -------------- MapScript ----------------- " >&5
+echo "${ECHO_T} -------------- 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
+else
+  echo "$as_me:$LINENO: result:   PHP MapScript:             no" >&5
+echo "${ECHO_T}  PHP MapScript:             no" >&6
+fi
+
+echo "$as_me:$LINENO: result: " >&5
+echo "${ECHO_T}" >&6
diff -pruN 6.0.1-2/.pc/fix-jpeg-gd-detection.patch/configure.in 6.0.1-2ubuntu1/.pc/fix-jpeg-gd-detection.patch/configure.in
--- 6.0.1-2/.pc/fix-jpeg-gd-detection.patch/configure.in	1970-01-01 00:00:00.000000000 +0000
+++ 6.0.1-2ubuntu1/.pc/fix-jpeg-gd-detection.patch/configure.in	2011-12-08 22:50:36.000000000 +0000
@@ -0,0 +1,2900 @@
+dnl **************************************************************************
+dnl $Id: configure.in 11618 2011-04-27 15:06:17Z dmorissette $
+dnl
+dnl Project:  MapServer
+dnl Purpose:  Main autoconf script ( Process this file with autoconf to 
+dnl           produce a configure script.)
+dnl Author:   Steve Lime and the MapServer team.
+dnl
+dnl **************************************************************************
+dnl Copyright (c) 1996-2007 Regents of the University of Minnesota.
+dnl
+dnl Permission is hereby granted, free of charge, to any person obtaining a
+dnl copy of this software and associated documentation files (the "Software"),
+dnl to deal in the Software without restriction, including without limitation
+dnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
+dnl and/or sell copies of the Software, and to permit persons to whom the
+dnl Software is furnished to do so, subject to the following conditions:
+dnl
+dnl The above copyright notice and this permission notice shall be included in 
+dnl all copies of this Software or works derived from this Software.
+dnl
+dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+dnl DEALINGS IN THE SOFTWARE.
+dnl **************************************************************************
+
+AC_INIT(Makefile.in)
+
+dnl Checks for programs.
+AC_PROG_CC
+AC_PROG_CXX
+AC_PROG_RANLIB
+AC_PROG_LEX
+AC_PROG_YACC
+AC_RUNPATH_SWITCH
+
+dnl ---------------------------------------------------------------------
+dnl Checks for libraries.
+dnl ---------------------------------------------------------------------
+AC_CHECK_LIB(m,exp, XTRALIBS="$XTRALIBS -lm",,)
+AC_SUBST(XTRALIBS, $XTRALIBS)
+
+AC_CHECK_LIB(stdc++,__gxx_personality_v0, XTRALIBS="$XTRALIBS -lstdc++",,)
+AC_SUBST(XTRALIBS, $XTRALIBS)
+
+LIBS="$XTRALIBS $LIBS"
+
+dnl ---------------------------------------------------------------------
+dnl Checks for header files.
+dnl ---------------------------------------------------------------------
+AC_HEADER_STDC
+
+dnl ---------------------------------------------------------------------
+dnl Add -fPIC to compiler flags if appropriate
+dnl ---------------------------------------------------------------------
+AC_COMPILER_PIC
+CFLAGS="$CFLAGS $C_PIC"
+CXXFLAGS="$CXXFLAGS $C_PIC"
+
+dnl ---------------------------------------------------------------------
+dnl Check for some string functions
+dnl ---------------------------------------------------------------------
+AC_CHECK_FUNC(strcasecmp, ,  STRINGS="-DNEED_STRCASECMP $STRINGS")
+AC_CHECK_FUNC(strncasecmp, , STRINGS="-DNEED_STRNCASECMP $STRINGS")
+AC_CHECK_FUNC(strdup, ,      STRINGS="-DNEED_STRDUP $STRINGS")
+AC_CHECK_FUNC(strrstr, ,      STRINGS="-DNEED_STRRSTR $STRINGS")
+AC_CHECK_FUNC(strcasestr, ,      STRINGS="-DNEED_STRCASESTR $STRINGS")
+AC_CHECK_FUNC(strlcat, ,      STRINGS="-DNEED_STRLCAT $STRINGS")
+AC_CHECK_FUNC(strlcpy, ,      STRINGS="-DNEED_STRLCPY $STRINGS")
+AC_CHECK_FUNC(vsnprintf, STRINGS="-DHAVE_VSNPRINTF $STRINGS", )
+AC_SUBST(STRINGS, $STRINGS)
+
+dnl ---------------------------------------------------------------------
+dnl Look for MapServer version in mapserver.h
+dnl ---------------------------------------------------------------------
+MS_VERSION=`grep 'MS_VERSION ' mapserver.h | grep '#define' | cut -d\" -f2`
+AC_MSG_RESULT([MapServer Version from mapserver.h: '$MS_VERSION'])
+AC_SUBST(MS_VERSION,    "$MS_VERSION")
+
+dnl ---------------------------------------------------------------------
+dnl Several libraries may use pkg-config.
+dnl ---------------------------------------------------------------------
+
+AC_MSG_CHECKING(if pkg-config path is provided)
+
+AC_ARG_WITH(pkg-config,
+[  --with-pkg-config[[=PATH]]
+                          Include pkg-config support (PATH is path to pkg-config)],,)
+
+if test -n "$with_pkg_config" -a "$with_pkg_config" != "no" ; then
+
+  AC_MSG_RESULT([yes])
+
+  PKG_CONFIG=$with_pkg_config
+else
+  PKG_CONFIG="yes"
+fi
+
+if test "$PKG_CONFIG" = "yes" ; then
+
+   AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
+
+   if test "$PKG_CONFIG" = "no" ; then
+      AC_MSG_RESULT([couldn't find pkg-config in default path. Please specify full path to pkg-config if needed])
+   fi
+
+elif test -f "$PKG_CONFIG" -a -x "$PKG_CONFIG" ; then
+     AC_MSG_RESULT([user supplied pkg-config ($PKG_CONFIG)])
+else
+     AC_MSG_ERROR(['$PKG_CONFIG' is not an executable.  Make sure you use --with-pkg-config=/path/to/pkg-config])
+fi
+
+dnl ---------------------------------------------------------------------
+dnl Several libraries might be needed for GD: png, zlib, freetype,
+dnl and jpeg (processed above).  Use where GD was found as default.
+dnl ---------------------------------------------------------------------
+
+dnl ---------------------------------------------------------------------
+dnl Check where FreeType is installed
+dnl ---------------------------------------------------------------------
+
+unset ac_cv_lib_freetype_FT_Init_FreeType
+unset ac_cv_lib_ttf_TT_Init_FreeType
+
+AC_ARG_WITH(freetype,
+[  --with-freetype=DIR     GD: Specify where FreeType 2.x is installed (DIR is
+                              path to freetype-config program or install dir).],
+    FT_DIR=$withval,FT_DIR='')
+
+FT_LDFLAGS=''
+FT_CFLAGS=''
+FT_BIN=''
+
+if test "x$FT_DIR" = "xno" ; then
+    AC_MSG_ERROR([Freetype support disabled but is now mandatory. Rerun without --without-freetype or --with-freetype=no])
+fi
+
+     
+if test -z "$FT_DIR" -o "$FT_DIR" = "yes" ; then
+    dnl no supplied argument
+    AC_PATH_PROG(FT_BIN, freetype-config, "")
+    if test "x$FT_BIN" = "xno" ; then
+        dnl freetype-config not found, check system locations
+        AC_MSG_CHECKING([for Freetype2.x in system locations])
+        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"  
+    dnl else freetype-config found, will test further down
+    fi
+else
+    AC_EXPAND_PATH($FT_DIR, FT_DIR)
+    AC_MSG_CHECKING(for Freetype2.x in $FT_DIR)
+    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"
+    if test "x$FT_BIN" = "x"; then
+        test -f $FT_DIR/ft2build.h -a -d $FT_DIR/freetype2 && FT_CFLAGS="-I$FT_DIR -I$FT_DIR/freetype2"
+        test -f $FT_DIR/include/ft2build.h -a -d $FT_DIR/include/freetype2 && FT_CFLAGS="-I$FT_DIR/include -I$FT_DIR/include/freetype2"
+        test -f $FT_DIR/lib/libfreetype.a -o -f $FT_DIR/lib/libfreetype.so -o -f $FT_DIR/lib/libfreetype.sl -o -f $FT_DIR/lib/libfreetype.dylib && FT_LDFLAGS="-L$FT_DIR/lib"
+        test -f $FT_DIR/lib64/libfreetype.a -o -f $FT_DIR/lib64/libfreetype.so -o -f $FT_DIR/lib64/libfreetype.sl && FT_LDFLAGS="-L$FT_DIR/lib64"
+        test -f $FT_DIR/libfreetype.a -o -f $FT_DIR/libfreetype.so -o -f $FT_DIR/libfreetype.sl -o -f $FT_DIR/libfreetype.dylib && FT_LDFLAGS="-L$FT_DIR"
+    dnl else freetype-config found, will test further down
+    fi
+fi
+
+if test "x$FT_BIN" != "x" ; then
+        FT_LDFLAGS=`$FT_BIN --libs`
+        FT_CFLAGS=`$FT_BIN --cflags`
+fi
+
+
+_cppflags="$CPPFLAGS"
+_ldflags="$LDFLAGS"
+_libs="$LIBS"
+CPPFLAGS="$FT_CFLAGS $CPPFLAGS"
+LDFLAGS="$FT_LDFLAGS $LDFLAGS"
+
+AC_CHECK_LIB(freetype,FT_Init_FreeType,,
+             AC_MSG_ERROR([unable to link - reconfigure with correct --with-freetype=dir ]))
+
+AC_CHECK_HEADERS(ft2build.h,,
+                 AC_MSG_ERROR([ft2build.h header not found - reconfigure with correct --with-freetype=dir ]))
+
+CPPFLAGS=$_cppflags
+LDFLAGS=$_ldflags
+LIBS=$_libs
+FT_ENABLED="-DUSE_FREETYPE"
+AC_SUBST(FT_ENABLED,$FT_ENABLED)
+AC_SUBST(FT_INC,$FT_CFLAGS)
+AC_SUBST(FT_LIB,$FT_LDFLAGS)
+ALL_ENABLED="$FT_ENABLED $ALL_ENABLED"
+ALL_INC="$FT_CFLAGS $ALL_INC"
+ALL_LIB="$FT_LDFLAGS $ALL_LIB"
+
+
+dnl ---------------------------------------------------------------------
+dnl Check where zlib is installed (used by libpng and by ZVG compressed output)
+dnl ---------------------------------------------------------------------
+
+unset ac_cv_lib_z_zlibVersion
+
+AC_ARG_WITH(zlib,
+[  --with-zlib=DIR         GD,SVG: Specify where zlib is installed (DIR is path
+                              to zlib install dir).],
+    ZLIB_DIR=$withval,ZLIB_DIR='')
+
+AC_EXPAND_PATH($ZLIB_DIR, ZLIB_DIR)
+AC_CHECKING(where Zlib is installed)
+ZLIB_LIB=''
+
+test -f $ZLIB_DIR/include/zlib.h && ZLIB_INCDIR="$ZLIB_DIR/include"
+
+test -f $ZLIB_DIR/lib/libz.a -o -f $ZLIB_DIR/lib/libz.so -o -f $ZLIB_DIR/lib/libz.sl -o -f $ZLIB_DIR/lib/libz.dylib && ZLIB_LIBDIR="$ZLIB_DIR/lib"
+test -f $ZLIB_DIR/lib64/libz.a -o -f $ZLIB_DIR/lib64/libz.so -o -f $ZLIB_DIR/lib64/libz.sl && ZLIB_LIBDIR="$ZLIB_DIR/lib64"
+test -f $ZLIB_DIR/libz.a -o -f $ZLIB_DIR/libz.so -o -f $ZLIB_DIR/libz.sl && ZLIB_LIBDIR="$ZLIB_DIR"
+
+
+if test -n "$ZLIB_LIBDIR" -a -n "$ZLIB_INCDIR" ; then
+
+  dnl
+  dnl Found libz runtime and headers. Enable USE_ZLIB (SVG compressed output)
+  dnl
+  ZLIB_ENABLED="-DUSE_ZLIB"
+  ZLIB_INC="-I$ZLIB_INCDIR"
+  ZLIB_LIB="-L$ZLIB_LIBDIR -lz"
+  AC_MSG_RESULT([        using libz from $ZLIB_LIB ($ZLIB_ENABLED)])
+  AC_ADD_RUNPATH("$ZLIB_DIR")
+
+elif test -n "$ZLIB_LIBDIR" ; then
+
+  dnl
+  dnl Found only runtime but no headers (good only for libpng)
+  dnl
+  ZLIB_LIB="-L$ZLIB_LIBDIR -lz"
+  AC_MSG_RESULT([        using runtime libz from $ZLIB_LIB])
+  AC_ADD_RUNPATH("$ZLIB_DIR")
+
+else
+
+  dnl check for lib in system libs
+
+  AC_CHECK_LIB(z, zlibVersion, ZLIB_LIB="-lz",,)
+
+  if test -n "$ZLIB_LIB" ; then
+    ZLIB_ENABLED="-DUSE_ZLIB"
+    AC_MSG_RESULT([        using libz from system libs ($ZLIB_ENABLED).])
+  else
+    AC_MSG_RESULT([        Zlib (libz) library cannot be found, possibly needed for GD])
+  fi
+
+fi
+
+dnl If we found ZLIB headers then enable it by default since SVG output
+dnl is enabled by default and will take advantage of it, otherwise the 
+dnl PNG code below will take care of including the runtime lib only.
+
+AC_SUBST(ZLIB_ENABLED,$ZLIB_ENABLED)
+AC_SUBST(ZLIB_INC,    $ZLIB_INC)
+AC_SUBST(ZLIB_LIB,    $ZLIB_LIB)
+
+ALL_ENABLED="$ZLIB_ENABLED $ALL_ENABLED"
+ALL_INC="$ZLIB_INC $ALL_INC"
+ALL_LIB="$ZLIB_LIB $ALL_LIB"
+
+dnl ---------------------------------------------------------------------
+dnl Check where PNG is installed
+dnl ---------------------------------------------------------------------
+
+unset ac_cv_lib_png_png_init_io
+
+AC_ARG_WITH(png,
+[  --with-png=DIR          GD: Specify where PNG is installed (DIR is path to
+                              PNG install dir).],
+    PNG_DIR=$withval,PNG_DIR='')
+
+AC_EXPAND_PATH($PNG_DIR, PNG_DIR)
+AC_CHECKING(where PNG is installed)
+PNG_LIB=''
+PNG_INC=''
+PNG_ENABLED=''
+
+
+if test -n "$PNG_DIR" ; then
+    test -f $PNG_DIR/lib/libpng.a -o -f $PNG_DIR/lib/libpng.so -o -f $PNG_DIR/lib/libpng.sl -o -f $PNG_DIR/lib/libpng.dylib && PNG_LIBDIR="$PNG_DIR/lib"
+    test -f $PNG_DIR/lib64/libpng.a -o -f $PNG_DIR/lib64/libpng.so -o -f $PNG_DIR/lib64/libpng.sl -o -f $PNG_DIR/libpng.dylib && PNG_LIBDIR="$PNG_DIR/lib64"
+    test -f $PNG_DIR/libpng.a -o -f $PNG_DIR/libpng.so -o -f $PNG_DIR/libpng.sl -o -f $PNG_DIR/libpng.dylib && PNG_LIBDIR="$PNG_DIR"
+    test -f $PNG_DIR/include/png.h && PNG_INCLUDE="$PNG_DIR/include"
+    test -f $PNG_DIR/lib/png.h && PNG_INCLUDE="$PNG_DIR/lib"
+    test -f $PNG_DIR/png.h && PNG_INCLUDE="$PNG_DIR"
+    
+    if test -n "$PNG_LIBDIR" ; then   
+      PNG_LIB="-L$PNG_LIBDIR -lpng"
+      AC_MSG_RESULT([        using libpng from $PNG_LIB])
+      AC_ADD_RUNPATH("$PNG_LIBDIR")
+    else
+      AC_MSG_ERROR([cannot find png lib in $PNG_DIR])
+    fi
+    
+    if test -n "$PNG_INCLUDE" ; then
+      dnl make sure we'll be able to find zlib.h
+      old_cflags="$CFLAGS"
+      CFLAGS="$ZLIB_INC $CFLAGS"
+      AC_CHECK_HEADER([$PNG_INCLUDE/png.h],PNG_INC=-I$PNG_INCLUDE,
+        [AC_MSG_ERROR([cannot find png headers])])
+      CFLAGS="$old_cflags"
+      ALL_INC="$PNG_INC $ALL_INC"
+    else
+        AC_MSG_ERROR([cannot find png headers in $PNG_DIR])
+    fi
+    PNG_ENABLED="-DUSE_PNG"
+else
+
+  dnl check for png in system locations
+
+  AC_CHECK_LIB(png, png_init_io, PNG_LIB="-lpng",, $ZLIB_LIB)
+  AC_CHECK_HEADER([png.h],,
+        [AC_MSG_ERROR([cannot find png headers in system path])])
+  if test -n "$PNG_LIB" ; then
+    AC_MSG_RESULT([        using libpng from system libs.])
+  else
+    AC_MSG_ERROR([PNG (libpng) library cannot be found. install or reconfigure with --with-png=DIR])
+  fi
+  PNG_ENABLED="-DUSE_PNG"
+fi
+
+AC_CHECK_HEADER([setjmp.h],,
+        [AC_MSG_ERROR([setjmp.h is required with libpng])])
+
+ALL_ENABLED="$PNG_ENABLED $ALL_ENABLED"
+AC_SUBST(PNG_ENABLED, $PNG_ENABLED)
+AC_SUBST(PNG_INC,    $PNG_INC)
+AC_SUBST(PNG_LIB,    $PNG_LIB)
+
+
+dnl ---------------------------------------------------------------------
+dnl Check where GIF is installed
+dnl ---------------------------------------------------------------------
+
+AC_ARG_WITH(gif,
+[  --with-gif=DIR          Specify where GIF is installed (DIR is path to
+                              GIF install dir).],
+    GIF_DIR=$withval,GIF_DIR='')
+
+AC_EXPAND_PATH($GIF_DIR, GIF_DIR)
+AC_CHECKING(where GIF is installed)
+GIF_LIB=''
+GIF_INC=''
+GIF_ENABLED=''
+
+
+if test -n "$GIF_DIR" -a "GIF_DIR" != "yes" ; then
+    test -f $GIF_DIR/lib/libgif.a -o -f $GIF_DIR/lib/libgif.so -o -f $GIF_DIR/lib/libgif.sl -o -f $GIF_DIR/lib/libgif.dylib && GIF_LIBDIR="$GIF_DIR/lib"
+    test -f $GIF_DIR/lib64/libgif.a -o -f $GIF_DIR/lib64/libgif.so -o -f $GIF_DIR/lib64/libgif.sl -o -f $GIF_DIR/libgif.dylib && GIF_LIBDIR="$GIF_DIR/lib64"
+    test -f $GIF_DIR/libgif.a -o -f $GIF_DIR/libgif.so -o -f $GIF_DIR/libgif.sl -o -f $GIF_DIR/libgif.dylib && GIF_LIBDIR="$GIF_DIR"
+    test -f $GIF_DIR/include/gif_lib.h && GIF_INCLUDE="$GIF_DIR/include"
+    test -f $GIF_DIR/lib/gif_lib.h && GIF_INCLUDE="$GIF_DIR/lib"
+    test -f $GIF_DIR/gif_lib.h && GIF_INCLUDE="$GIF_DIR"
+    
+    if test -n "$GIF_LIBDIR" ; then   
+      GIF_LIB="-L$GIF_LIBDIR -lgif"
+      AC_MSG_RESULT([        using libgif from $GIF_LIB])
+      AC_ADD_RUNPATH("$GIF_LIBDIR")
+    else
+      AC_MSG_ERROR([cannot find gif lib in $GIF_DIR])
+    fi
+    
+    if test -n "$GIF_INCLUDE" ; then
+      AC_CHECK_HEADER([$GIF_INCLUDE/gif_lib.h],GIF_INC=-I$GIF_INCLUDE,
+        [AC_MSG_ERROR([cannot find gif headers])])
+      ALL_INC="$GIF_INC $ALL_INC"
+    else
+        AC_MSG_ERROR([cannot find gif headers in $GIF_DIR])
+    fi
+    GIF_ENABLED="-DUSE_GIF"
+else
+
+  dnl check for gif in system locations
+
+  AC_CHECK_LIB(gif, DGifOpenFileHandle, GIF_LIB="-lgif",,)
+  AC_CHECK_HEADER([gif_lib.h],,
+        [AC_MSG_ERROR([cannot find gif headers in system path])])
+  if test -n "$GIF_LIB" ; then
+    AC_MSG_RESULT([        using libgif from system libs.])
+  else
+    AC_MSG_ERROR([GIF (libgif) library cannot be found. install or reconfigure with --with-gif=DIR])
+  fi
+  GIF_ENABLED="-DUSE_GIF"
+fi
+
+ALL_ENABLED="$GIF_ENABLED $ALL_ENABLED"
+AC_SUBST(GIF_ENABLED, $GIF_ENABLED)
+AC_SUBST(GIF_INC,    $GIF_INC)
+AC_SUBST(GIF_LIB,    $GIF_LIB)
+
+
+dnl ---------------------------------------------------------------------
+dnl libJPEG (included by default if found on system).
+dnl ---------------------------------------------------------------------
+
+unset ac_cv_lib_jpeg_jpeg_read_header
+
+AC_CHECKING(whether we should include JPEG support)
+AC_ARG_WITH(jpeg,
+[  --with-jpeg[[=DIR]]       Include JPEG support (DIR is LibJPEG's install dir).],,)
+
+if test -n "$with_jpeg" -a "$with_jpeg" != "yes" ; then
+
+  AC_EXPAND_PATH($with_jpeg, JPEG_DIR)
+  test -f $JPEG_DIR/include/jpeg/jpeglib.h && JPEG_INCLUDE="$JPEG_DIR/include/jpeg"
+  test -f $JPEG_DIR/include/jpeglib.h && JPEG_INCLUDE="$JPEG_DIR/include"
+  test -f $JPEG_DIR/lib/jpeglib.h && JPEG_INCLUDE="$JPEG_DIR/lib"
+  test -f $JPEG_DIR/jpeglib.h && JPEG_INCLUDE="$JPEG_DIR"
+
+  test -f $JPEG_DIR/lib/libjpeg.a && JPEG_LIBDIR="$JPEG_DIR/lib"
+  test -f $JPEG_DIR/lib64/libjpeg.a && JPEG_LIBDIR="$JPEG_DIR/lib64"
+  test -f $JPEG_DIR/libjpeg.a && JPEG_LIBDIR="$JPEG_DIR"
+
+  test -f $JPEG_DIR/lib/libjpeg.so -o -f $JPEG_DIR/lib/libjpeg.sl -o -f $JPEG_DIR/lib/libjpeg.dylib && JPEG_LIBDIR="$JPEG_DIR/lib"
+  test -f $JPEG_DIR/lib64/libjpeg.so -o -f $JPEG_DIR/lib64/libjpeg.sl && JPEG_LIBDIR="$JPEG_DIR/lib64"
+  test -f $JPEG_DIR/libjpeg.so -o -f $JPEG_DIR/libjpeg.sl -o -f $JPEG_DIR/libjpeg.dylib && JPEG_LIBDIR="$JPEG_DIR"
+
+  if test -n "$JPEG_INCLUDE" -a -n "$JPEG_LIBDIR" ; then
+      JPEG_INC=-I$JPEG_INCLUDE
+      JPEG_LIB="-L$JPEG_LIBDIR -ljpeg"
+      AC_ADD_RUNPATH("$JPEG_LIBDIR")
+  else
+        AC_MSG_ERROR("Could not find jpeglib.h or libjpeg.a/libjpeg.so/libjpeg.dylib in $JPEG_DIR.")
+  fi
+
+
+    _cppflags="$CPPFLAGS"
+    _ldflags="$LDFLAGS"
+    _libs="$LIBS"
+    CPPFLAGS="$JPEG_INC $CPPFLAGS"
+    LDFLAGS="$JPEG_LIB $LDFLAGS"
+    AC_CHECK_LIB(jpeg, jpeg_read_header,,AC_MSG_ERROR(["cannot link with libjpeg"]),,)
+    AC_CHECK_HEADER(jpeglib.h,,AC_MSG_ERROR(["cannot find jpeg headers"]))
+    JPEG_ENABLED="-DUSE_JPEG"
+    CPPFLAGS=$_cppflags
+    LDFLAGS=$_ldflags
+    LIBS=$_libs
+    AC_MSG_RESULT([        using libjpeg from system $JPEG_LIB])
+
+else
+    dnl Look for libjpeg in system dirs
+
+    AC_CHECK_LIB(jpeg, jpeg_read_header,,AC_MSG_ERROR(["cannot link with libjpeg"]),,)
+    AC_CHECK_HEADER(jpeglib.h,,AC_MSG_ERROR(["cannot find jpeg headers"]))
+    JPEG_ENABLED="-DUSE_JPEG"
+    JPEG_LIB="-ljpeg"
+    AC_MSG_RESULT([        using libjpeg from system libs.])
+fi
+
+AC_SUBST(JPEG_ENABLED,$JPEG_ENABLED)
+AC_SUBST(JPEG_INC,    $JPEG_INC)
+AC_SUBST(JPEG_LIB,    $JPEG_LIB)
+
+dnl ---------------------------------------------------------------------
+dnl Look for X11 and XPM libs used by GD
+dnl ---------------------------------------------------------------------
+
+unset ac_cv_lib_Xpm_XpmFreeXpmImage
+
+AC_ARG_WITH(xpm,
+[  --with-xpm=DIR          GD: Specify where libXpm is installed (DIR it the 
+                              libXpm install prefix).],
+    XPM_DIR=$withval,XPM_DIR='')
+
+if test "$with_xpm" != "no" ; then
+
+  AC_EXPAND_PATH($XPM_DIR, XPM_DIR)
+  AC_CHECKING(where libXpm is installed)
+  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"
+  test -f $XPM_DIR/lib64/libXpm.a -o -f $XPM_DIR/lib64/libXpm.so -o -f $XPM_DIR/lib64/libXpm.sl && XPM_LIBDIR="$XPM_DIR/lib64"
+  test -f $XPM_DIR/libXpm.a -o -f $XPM_DIR/libXpm.so -o -f $XPM_DIR/libXpm.sl -o -f $XPM_DIR/libXpm.dylib && XPM_LIBDIR="$XPM_DIR"
+
+  if test -n "$XPM_LIBDIR" ; then
+
+    XPM_LIB="-L$XPM_LIBDIR -lXpm -lX11"
+    AC_MSG_RESULT([        using libXpm from $XPM_LIB])
+    AC_ADD_RUNPATH("$XPM_LIBDIR")
+
+  else
+  
+    dnl check for lib in system libs
+
+    AC_CHECK_LIB(Xpm, XpmFreeXpmImage, XPM_LIB="-lXpm -lX11",,-lX11)
+
+    if test -n "$XPM_LIB" ; then
+      AC_MSG_RESULT([        using libXpm from system libs.])
+    else
+      AC_MSG_RESULT([        XPM (libXpm) library cannot be found, possibly needed for GD])
+    fi
+  fi
+
+fi
+
+dnl Note: don't include iconv by default in GD_XTRA_LIBS as it may not
+dnl       be required by GD.
+
+GD_XTRA_LIBS="$JPEG_LIB $FT_LIB $PNG_LIB $ZLIB_LIB $XPM_LIB"
+
+
+dnl ---------------------------------------------------------------------
+dnl Check where libiconv is installed. We always look for it, even if not
+dnl explicitly requested since GD may require it for linking.
+dnl Iconv can come either as libiconv.so or as part of glibc
+dnl ---------------------------------------------------------------------
+
+unset ac_cv_lib_iconv_libiconv_open
+unset ac_cv_lib_iconv_iconv_open
+unset ac_cv_lib_c_iconv_open
+
+AC_ARG_WITH(libiconv,
+[  --with-libiconv=DIR     Specify where libiconv is installed (DIR is path
+                          to libiconv install dir (prefix)).],
+    ICONV_DIR=$withval,ICONV_DIR='')
+
+AC_CHECKING(where libiconv is installed)
+
+ICONV_LIB=''
+
+if test -n "$ICONV_DIR" ; then
+
+  AC_EXPAND_PATH($ICONV_DIR, ICONV_DIR)
+
+  test -f $ICONV_DIR/include/iconv.h && ICONV_LIBDIR="$ICONV_DIR/lib" && ICONV_INCDIR="$ICONV_DIR/include"
+  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"
+
+  dnl If we have both the glibc and a local libiconv, then the local libiconv
+  dnl will be included in the link line no matter what. This shouldn't hurt
+  dnl programs that don't need it, and saves us from having to figure some
+  dnl black magic to detect what was used to build GD, etc.
+  dnl Just doing the AC_CHECK_LIB(iconv ...) last does the trick.
+  AC_CHECK_LIB(c, iconv_open, ICONV_LIB="-L$ICONV_LIBDIR -lc",,"-L$ICONV_LIBDIR")
+  AC_CHECK_LIB(iconv, libiconv_open, ICONV_LIB="-L$ICONV_LIBDIR -liconv",,"-L$ICONV_LIBDIR")
+  AC_CHECK_LIB(iconv, iconv_open, ICONV_LIB="-L$ICONV_LIBDIR -liconv",,"-L$ICONV_LIBDIR")
+
+fi
+
+if test -n "$ICONV_LIB" ; then
+  if test -n "$ICONV_INCDIR"; then 
+     ICONV_INC="-I$ICONV_INCDIR"
+  fi
+  AC_MSG_RESULT([        using libiconv from $ICONV_LIB])
+  AC_ADD_RUNPATH("$ICONV_DIR")
+
+else
+
+  dnl check for lib in system libs
+
+  unset ac_cv_lib_iconv_libiconv_open
+  unset ac_cv_lib_c_iconv_open
+  AC_CHECK_LIB(c, iconv_open, ICONV_LIB="-lc",,)
+  AC_CHECK_LIB(iconv, libiconv_open, ICONV_LIB="-liconv",,)
+  AC_CHECK_LIB(iconv, iconv_open, ICONV_LIB="-liconv",,)
+
+  if test -n "$ICONV_LIB" ; then
+    AC_MSG_RESULT([        using libiconv from system libs.])
+  else
+    AC_MSG_RESULT([        libiconv library cannot be found, possibly needed for GD])
+  fi
+
+fi
+
+if test -n "$ICONV_LIB" ; then
+  ICONV_ENABLED="-DUSE_ICONV"
+  AC_MSG_RESULT([        libiconv found. Enabling internationalization ($ICONV_ENABLED)])
+fi
+
+
+AC_SUBST(ICONV_ENABLED, $ICONV_ENABLED)
+AC_SUBST(ICONV_INC,     $ICONV_INC)
+AC_SUBST(ICONV_LIB,     $ICONV_LIB)
+
+ALL_ENABLED="$ICONV_ENABLED $ALL_ENABLED"
+ALL_INC="$ICONV_INC $ALL_INC"
+ALL_LIB="$ICONV_LIB $ALL_LIB"
+
+
+dnl ---------------------------------------------------------------------
+dnl Find GD library
+dnl
+dnl If --with-gd not given, then check in system libs.
+dnl ---------------------------------------------------------------------
+
+dnl We don't want LIBS updated by all the GD stuff, so we save it and
+dnl restore later.
+
+ms_saved_LIBS="$LIBS"
+IS_GD2="false";
+
+dnl Clear some cache variables
+unset ac_cv_lib_gd_gdImageCreate
+unset ac_cv_lib_gd_gdImageString16
+unset ac_cv_lib_gd_gdImageGif
+unset ac_cv_lib_gd_gdImagePng
+unset ac_cv_lib_gd_gdImageJpeg
+unset ac_cv_lib_gd_gdImageWBMP
+unset ac_cv_lib_gd_gdImageStringFT
+unset ac_cv_lib_gd_gdImageGifPtr
+unset ac_cv_lib_gd_gdFontGetTiny
+unset ac_cv_lib_c_gdImageCreate
+unset ac_cv_lib_c_gdImageString16
+unset ac_cv_lib_c_gdImageGif
+unset ac_cv_lib_c_gdImagePng
+unset ac_cv_lib_c_gdImageJpeg
+unset ac_cv_lib_c_gdImageWBMP
+unset ac_cv_lib_c_gdImageStringFT
+unset ac_cv_lib_c_gdImageGifPtr
+unset ac_cv_lib_c_gdFontGetTiny
+unset ac_cv_lib_gd_gdImageCreatePaletteFromTrueColor
+
+AC_CHECKING(for GD 2.0.28 or higher)
+AC_ARG_WITH(gd,
+[  --with-gd[[=[static,]DIR]]
+                          Specify which version of GD to use (DIR is GD's
+                          install dir).],,)
+
+if test "$with_gd" = "no" ; then
+  AC_MSG_ERROR(GD library cannot be disabled)
+elif test -n "$with_gd" -a "$with_gd" != "yes" ; then
+  dnl
+  dnl --with-gd was specified explicitly... 
+  dnl
+  AC_PARSE_WITH_LIB_STATIC($with_gd, GD_DIR, GD_STATIC)
+  AC_EXPAND_PATH($GD_DIR, GD_DIR)
+  test -f $GD_DIR/include/gd.h && GD_INCLUDE="$GD_DIR/include"
+  test -f $GD_DIR/include/gd/gd.h && GD_INCLUDE="$GD_DIR/include/gd"
+  test -f $GD_DIR/gd.h && GD_INCLUDE="$GD_DIR"
+
+  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/.libs/libgd.a && GD_LIBDIR="$GD_DIR/.libs"
+  test -f $GD_DIR/_libs/libgd.a && GD_LIBDIR="$GD_DIR/_libs"
+  test -f $GD_DIR/libgd.a && GD_LIBDIR="$GD_DIR"
+
+  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"
+  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/_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"
+
+  dnl make sure it is GD 2.0.28+ with antialias and gdFontCacheSetup() and gdImageCreatePaletteFromTrueColor support
+  AC_CHECK_LIB(gd, gdImageCreatePaletteFromTrueColor,IS_GD2="true",,$GD_XTRA_LIBS -L$GD_LIBDIR)
+
+  if test "$IS_GD2" = "false" -a -n "$ICONV_LIB"; then
+    dnl try again including libiconv this time
+    unset ac_cv_lib_gd_gdImageCreatePaletteFromTrueColor
+    AC_CHECKING(whether GD needs libiconv)
+    AC_CHECK_LIB(gd, gdImageCreatePaletteFromTrueColor,IS_GD2="true",,$GD_XTRA_LIBS -L$GD_LIBDIR $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 $GD_LIB $GD_XTRA_LIBS])
+      AC_ADD_RUNPATH("$GD_LIBDIR")
+  else
+      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
+fi
+
+dnl ----------------------------------------------------------------------
+dnl Continue with GD processing - determine GD formats and other features
+dnl ----------------------------------------------------------------------
+
+if test -n "$with_gd" -a "$with_gd" != "yes" ; then
+
+  dnl check gd lib that was found on --with-gd=
+  
+  if test "$GD_STATIC" = "yes" ; then
+    dnl To test against static GD, do AC_CHECK_LIB calls against -lc and
+    dnl include libgd.a in GD_LIB param
+    GD_CHECKLIB=c
+    GD_LIB=$GD_LIBDIR/libgd.a
+    GD_STATIC=$GD_LIBDIR/libgd.a
+    AC_MSG_RESULT([static linkage of $GD_STATIC requested... testing supported formats...])
+  else
+    GD_CHECKLIB=c
+    # GD_LIB was already set above
+    GD_STATIC=""
+  fi
+  
+  AC_CHECK_LIB($GD_CHECKLIB, gdImageGif, GD_DEF="$GD_DEF -DUSE_GD_GIF",, $GD_STATIC $GD_LIB $GD_XTRA_LIBS)
+  AC_CHECK_LIB($GD_CHECKLIB, gdImagePng, GD_DEF="$GD_DEF -DUSE_GD_PNG",, $GD_STATIC $GD_LIB $GD_XTRA_LIBS)
+  AC_CHECK_LIB($GD_CHECKLIB, gdImageJpeg, GD_DEF="$GD_DEF -DUSE_GD_JPEG",, $GD_STATIC $GD_LIB $GD_XTRA_LIBS)
+  AC_CHECK_LIB($GD_CHECKLIB, gdImageWBMP, GD_DEF="$GD_DEF -DUSE_GD_WBMP",, $GD_STATIC $GD_LIB $GD_XTRA_LIBS)
+
+  dnl check for Freetype 2.x support
+  GD_FT_SUPPORT=no  
+  AC_CHECK_LIB($GD_CHECKLIB, gdImageStringFT, GD_FT_SUPPORT=yes,, $GD_STATIC $GD_LIB $GD_XTRA_LIBS)
+
+  dnl If GD static is requested, it may needs libfontconfig.
+  if test -n "$GD_STATIC" ; then
+     GD_LIB="$GD_LIB -lfontconfig"
+     unset ac_cv_lib_c___gdImageStringFT
+     AC_CHECK_LIB($GD_CHECKLIB, gdImageStringFT, GD_FT_SUPPORT=yes,, $GD_STATIC $GD_LIB $GD_XTRA_LIBS)
+  fi
+
+  if test "$GD_FT_SUPPORT" = "yes"; then
+     GD_DEF="$GD_DEF -DUSE_GD_FT"
+  fi
+
+  dnl check for Resolution support
+  GD_RESOLUTION_SUPPORT=no  
+  AC_CHECK_LIB($GD_CHECKLIB, gdImageSetResolution, GD_RESOLUTION_SUPPORT=yes,, $GD_STATIC $GD_LIB $GD_XTRA_LIBS)
+
+  if test "$GD_RESOLUTION_SUPPORT" = "yes"; then
+     GD_DEF="$GD_DEF -DUSE_GD_RESOLUTION"
+  fi
+
+  dnl check for gdImageOpenPolygon (means GD version 2.0.29 or higher)
+  AC_CHECK_LIB($GD_CHECKLIB, gdImageOpenPolygon, GD_DEF="$GD_DEF -DGD_HAS_FTEX_XSHOW",, $GD_STATIC $GD_LIB $GD_XTRA_LIBS)
+
+  dnl gdImageGifPtr is there only in GIF-patched GD versions
+  AC_CHECK_LIB($GD_CHECKLIB, gdImageGifPtr, GD_DEF="$GD_DEF -DGD_HAS_GDIMAGEGIFPTR",, $GD_STATIC $GD_LIB $GD_XTRA_LIBS)
+
+  dnl GD 2.0.22 and more recent replaced the static font pointers with 
+  dnl getter functions.
+  AC_CHECK_LIB($GD_CHECKLIB, gdFontGetTiny, GD_DEF="$GD_DEF -DGD_HAS_GETBITMAPFONTS",, $GD_STATIC $GD_LIB $GD_XTRA_LIBS)
+
+  dnl check for gdImageGetTrueColorPixel.
+  dnl In some GD versions this function is defined, but not declared in gd.h,
+  dnl so check headers first
+  GD_HAS_GET_TRUE_COLOR_PIXEL=
+
+  dnl AC_CHECK_DECL needs to know the gd include path
+  CFLAGS_BACKUP="$CFLAGS"
+  CXXFLAGS_BACKUP="$CXXFLAGS"
+  CFLAGS="$CFLAGS $GD_INC"
+  CXXFLAGS="$CXXFLAGS $GD_INC"
+  AC_CHECK_DECL(gdImageGetTrueColorPixel,[GD_HAS_GET_TRUE_COLOR_PIXEL=yes],,[#include <gd.h>])
+  CFLAGS="$CFLAGS_BACKUP"
+  CXXFLAGS="$CXXFLAGS_BACKUP"
+
+  dnl if it's declared, check if we can link with it
+  if test .$GD_HAS_GET_TRUE_COLOR_PIXEL = .yes ; then
+    AC_CHECK_LIB($GD_CHECKLIB, gdImageGetTrueColorPixel, GD_DEF="$GD_DEF -DGD_HAS_GET_TRUE_COLOR_PIXEL",, $GD_STATIC $GD_LIB $GD_XTRA_LIBS)
+  fi
+
+  AC_MSG_RESULT([        using GD ($GD_DEF) from $GD_DIR.])
+
+else
+
+  dnl
+  dnl --with-gd was not given... then look in system libs
+  dnl
+
+  dnl Make sure GD is at least there!
+  AC_CHECK_LIB(gd, gdImageCreate, GD_FOUND=yes , ,$GD_XTRA_LIBS)
+  if test -z "$GD_FOUND" ; then
+      AC_MSG_ERROR([GD is required but was not found... use --with-gd=DIR to specify its location.])
+  fi
+
+  dnl Check supported formats
+  AC_CHECK_LIB(gd, gdImageGif, GD_DEF="$GD_DEF -DUSE_GD_GIF",, $GD_LIB $GD_XTRA_LIBS)
+  AC_CHECK_LIB(gd, gdImagePng, GD_DEF="$GD_DEF -DUSE_GD_PNG",, $GD_LIB $GD_XTRA_LIBS)
+  AC_CHECK_LIB(gd, gdImageJpeg, GD_DEF="$GD_DEF -DUSE_GD_JPEG",, $GD_LIB $GD_XTRA_LIBS)
+  AC_CHECK_LIB(gd, gdImageWBMP, GD_DEF="$GD_DEF -DUSE_GD_WBMP",, $GD_LIB $GD_XTRA_LIBS)
+
+  dnl Check for Freetype 2 support
+  AC_CHECK_LIB(gd, gdImageStringFT, GD_DEF="$GD_DEF -DUSE_GD_FT",, $GD_LIB $GD_XTRA_LIBS)
+
+  dnl check for gdImageOpenPolygon (means GD version 2.0.29 or higher)
+  AC_CHECK_LIB(gd, gdImageOpenPolygon, GD_DEF="$GD_DEF -DGD_HAS_FTEX_XSHOW",, $GD_STATIC $GD_LIB $GD_XTRA_LIBS)
+
+  dnl gdImageGifPtr is there only in GIF-patched GD versions
+  AC_CHECK_LIB(gd, gdImageGifPtr, GD_DEF="$GD_DEF -DGD_HAS_GDIMAGEGIFPTR",, $GD_LIB $GD_XTRA_LIBS)
+
+  dnl GD 2.0.22 and more recent replaced the static font pointers with 
+  dnl getter functions.
+  AC_CHECK_LIB(gd, gdFontGetTiny, GD_DEF="$GD_DEF -DGD_HAS_GETBITMAPFONTS",, $GD_LIB $GD_XTRA_LIBS)
+
+  dnl check for Resolution support
+  GD_RESOLUTION_SUPPORT=no  
+  AC_CHECK_LIB($GD_CHECKLIB, gdImageSetResolution, GD_RESOLUTION_SUPPORT=yes,, $GD_STATIC $GD_LIB $GD_XTRA_LIBS)
+
+  if test "$GD_RESOLUTION_SUPPORT" = "yes"; then
+     GD_DEF="$GD_DEF -DUSE_GD_RESOLUTION"
+  fi
+
+  dnl check for gdImageGetTrueColorPixel.
+  dnl In some GD versions this function is defined, but not declared in gd.h,
+  dnl so check headers first
+  GD_HAS_GET_TRUE_COLOR_PIXEL=
+  AC_CHECK_DECL(gdImageGetTrueColorPixel,[GD_HAS_GET_TRUE_COLOR_PIXEL=yes],,[#include <gd.h>])
+  dnl if it's declared, check if we can link with it
+  if test .$GD_HAS_GET_TRUE_COLOR_PIXEL = .yes ; then
+    AC_CHECK_LIB(gd, gdImageGetTrueColorPixel, GD_DEF="$GD_DEF -DGD_HAS_GET_TRUE_COLOR_PIXEL",, $GD_STATIC $GD_LIB $GD_XTRA_LIBS)
+  fi
+
+  if test -n "$GD_DEF" ; then
+      GD_LIB="-lgd $GD_LIB"
+      AC_MSG_RESULT([        using GD ($GD_DEF) from system libs.])
+  fi
+fi
+
+GD_LIB="$GD_LIB $GD_XTRA_LIBS"
+
+AC_SUBST(GD_DEF, $GD_DEF)
+AC_SUBST(GD_INC, $GD_INC)
+AC_SUBST(GD_LIB, $GD_LIB)
+AC_SUBST(GD_STATIC, $GD_STATIC)
+AC_SUBST(MAKE_GD, $MAKE_GD)
+AC_SUBST(MAKE_GD_CLEAN, $MAKE_GD_CLEAN)
+
+ALL_ENABLED="$GD_DEF $ALL_ENABLED"
+ALL_INC="$GD_INC $ALL_INC"
+ALL_LIB="$GD_LIB $ALL_LIB"
+ALL_STATIC_LIB="$GD_STATIC $ALL_STATIC_LIB"
+
+dnl Restore LIBS environment to state at beginning of gd tests.
+LIBS="$ms_saved_LIBS"
+
+
+dnl ---------------------------------------------------------------------
+dnl FTGL Support.
+dnl ---------------------------------------------------------------------
+
+AC_MSG_CHECKING(if FTGL support requested)
+AC_ARG_WITH(ftgl,
+[  --with-ftgl[[=DIR]]       Include OpenGl support (DIR is OpenGL's install dir).],,)
+
+if test "$with_ftgl" = "yes" ; then
+  with_ftgl="/usr"
+  AC_MSG_RESULT([looking for ftgl libs in /usr])
+fi
+if test -n "$with_ftgl" -a "$with_ftgl" != "no" ; then
+
+  AC_EXPAND_PATH($with_ftgl, FTGL_DIR)
+
+  FTGL_FLAG=""
+  if [ test -f $FTGL_DIR/include/FTGL/ftgl.h -a -f $FTGL_DIR/include/FTGL/FTGLTextureFont.h ]; then
+      FTGL_INCLUDE="-I$FTGL_DIR/include/FTGL/"
+  elif [ test -f $FTGL_DIR/include/FTGL/FTGL.h -a -f $FTGL_DIR/include/FTGL/FTGLTextureFont.h ]; then
+      FTGL_INCLUDE="-I$FTGL_DIR/include/FTGL/"
+      FTGL_FLAG="-DUSE_FTGL_2_1_2"
+  fi
+
+  if test -z "$FTGL_INCLUDE" ; then
+      AC_MSG_ERROR("could not find ftgl.h/FTGL.h in $FTGL_DIR/include/FTGL.")
+  fi
+  
+  test -f $FTGL_DIR/lib/libftgl.so && FTGL_LIBDIR="$FTGL_DIR/lib"
+  test -f $FTGL_DIR/lib/libftgl.dylib && FTGL_LIBDIR="$FTGL_DIR/lib"
+  test -f $FTGL_DIR/lib64/libftgl.so && FTGL_LIBDIR="$FTGL_DIR/lib64"
+   
+  if test -z "$FTGL_LIBDIR" ; then
+      AC_MSG_ERROR("could not find libftgl in $FTGL_DIR.")
+  fi
+
+  
+
+  dnl If we got this far all is well!
+  FTGL_ENABLED="-DUSE_FTGL $FTGL_FLAG"
+  FTGL_INC="$FTGL_INCLUDE"
+  FTGL_LIB="-L$FTGL_LIBDIR -lftgl"
+  AC_ADD_RUNPATH("$FTGL_LIBDIR")
+  
+  AC_MSG_RESULT([using ftgl from $FTGL_DIR])
+  
+else
+
+  AC_MSG_RESULT([no])
+
+fi
+
+AC_SUBST(FTGL_ENABLED,$FTGL_ENABLED)
+AC_SUBST(FTGL_INC,    $FTGL_INC)
+AC_SUBST(FTGL_LIB,    $FTGL_LIB)
+
+
+ALL_ENABLED="$FTGL_ENABLED $ALL_ENABLED"
+ALL_INC="$FTGL_INC $ALL_INC"
+ALL_LIB="$FTGL_LIB $ALL_LIB"
+
+
+dnl ---------------------------------------------------------------------
+dnl Optional OGL Support.
+dnl ---------------------------------------------------------------------
+
+AC_MSG_CHECKING(if OGL support requested)
+AC_ARG_WITH(ogl,
+[  --with-opengl[[=DIR]]     Include OpenGl support (DIR is OpenGL's install dir).],,)
+
+if test "$with_opengl" = "yes" ; then
+
+  with_opengl="/usr"
+  AC_MSG_RESULT([looking for opengl libs in /usr])
+fi
+if test -n "$with_opengl" -a "$with_opengl" != "no" ; then
+
+  if test -z "$FTGL_LIB" ; then
+     AC_MSG_ERROR([FTGL required for opengl support - please configure --with-ftgl.])
+  fi
+  
+  AC_EXPAND_PATH($with_opengl, OGL_DIR)
+
+  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
+      AC_MSG_ERROR("could not find gl.h in $OGL_DIR/include/.")
+  fi
+  
+  test -f $OGL_DIR/lib/libGL.so -a -f $OGL_DIR/lib/libGLU.so && OGL_LIBDIR="$OGL_DIR/lib"
+  test -f $OGL_DIR/lib/libGL.dylib -a -f $OGL_DIR/lib/libGLU.dylib && OGL_LIBDIR="$OGL_DIR/lib"
+  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
+      AC_MSG_ERROR("could not find libGL or libGLU in $OGL_DIR/lib/ or $OGL_DIR/lib64/.")
+  fi
+
+  
+
+  dnl If we got this far all is well!
+  OGL_ENABLED="-DUSE_OGL"
+  OGL_INC="$OGL_INCLUDE"
+  OGL_LIB="-L$OGL_LIBDIR -lGL -lGLU"
+  AC_ADD_RUNPATH("$OGL_LIBDIR")
+  
+  AC_MSG_RESULT([using opengl from $OGL_DIR])
+  
+else
+
+  AC_MSG_RESULT([no])
+
+fi
+
+AC_SUBST(OGL_ENABLED,$OGL_ENABLED)
+AC_SUBST(OGL_INC,    $OGL_INC)
+AC_SUBST(OGL_LIB,    $OGL_LIB)
+
+
+ALL_ENABLED="$OGL_ENABLED $ALL_ENABLED"
+ALL_INC="$OGL_INC $ALL_INC"
+ALL_LIB="$OGL_LIB $ALL_LIB"
+
+
+dnl ---------------------------------------------------------------------
+dnl Check whether expat is available (needed for svg symbol parsing)
+dnl ---------------------------------------------------------------------
+
+
+AC_ARG_WITH(expat,
+[  --with-expat=DIR          Specify expat location, needed for SVG symbol parsing],
+    EXPAT_DIR=$withval,EXPAT_DIR='')
+
+AC_EXPAND_PATH($EXPAT_DIR, EXPAT_DIR)
+AC_CHECKING(where EXPAT is installed)
+EXPAT_LIB=''
+EXPAT_INC=''
+EXPAT_FOUND='no'
+
+
+if test -n "$EXPAT_DIR" ; then
+    test -f $EXPAT_DIR/lib/libexpat.a -o -f $EXPAT_DIR/lib/libexpat.so -o -f $EXPAT_DIR/lib/libexpat.sl -o -f $EXPAT_DIR/lib/libexpat.dylib && EXPAT_LIBDIR="$PNG_DIR/lib"
+    test -f $EXPAT_DIR/lib64/libexpat.a -o -f $EXPAT_DIR/lib64/libexpat.so -o -f $EXPAT_DIR/lib64/libexpat.sl -o -f $EXPAT_DIR/libexpat.dylib && EXPAT_LIBDIR="$PNG_DIR/lib64"
+    test -f $EXPAT_DIR/libexpat.a -o -f $EXPAT_DIR/libexpat.so -o -f $EXPAT_DIR/libexpat.sl -o -f $PNG_DIR/libexpat.dylib && EXPAT_LIBDIR="$PNG_DIR"
+    test -f $EXPAT_DIR/include/expat.h && EXPAT_INCDIR="$EXPAT_DIR/include"
+    test -f $EXPAT_DIR/lib/expat.h && EXPAT_INCDIR="$EXPAT_DIR/lib"
+    test -f $EXPAT_DIR/expat.h && EXPAT_INCDIR="$EXPAT_DIR"
+    
+    if test -n "$EXPAT_LIBDIR" ; then   
+      EXPAT_LIB="-L$EXPAT_LIBDIR -lexpat"
+      AC_MSG_RESULT([        using libexpat from $EXPAT_LIB])
+      AC_ADD_RUNPATH("$EXPAT_LIBDIR")
+    else
+      AC_MSG_ERROR([cannot find expat lib in $EXPAT_DIR])
+    fi
+    
+    if test -n "$EXPAT_INCDIR" ; then
+      AC_CHECK_HEADER([$EXPAT_INCDIR/expat.h],EXPAT_INC=-I$EXPAT_INCDIR,
+        [AC_MSG_ERROR([cannot find expat headers])])
+      ALL_INC="$EXPAT_INC $ALL_INC"
+    else
+        AC_MSG_ERROR([cannot find expat headers in $EXPAT_DIR])
+    fi
+    EXPAT_FOUND="yes"
+else
+
+  dnl check for expat in system locations
+
+  AC_CHECK_LIB(expat, XML_ParserCreate, EXPAT_LIB="-lexpat",,)
+  AC_CHECK_HEADER([expat.h],,EXPAT_HEADER_FOUND="no")
+  if test -n "$EXPAT_LIB" -a "$EXPAT_HEADER_FOUND" != "no"; then
+    AC_MSG_RESULT([        using libexpat from system libs.])
+    EXPAT_FOUND='yes'
+  else
+    AC_MSG_RESULT([        not found in system libs. svg symbol support will be disabled])
+    EXPAT_FOUND='no'
+  fi
+
+fi
+
+dnl ---------------------------------------------------------------------
+dnl Optional AGG SVG Symbol Support.
+dnl ---------------------------------------------------------------------
+
+AC_MSG_CHECKING(for AGG support)
+AGG_ENABLED="internal"
+AC_MSG_RESULT([        yes])
+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 renderers/agg/src/agg_vpgen_clip_polyline.o renderers/agg/src/agg_font_freetype.o"
+AGG_LIB=""
+AGG_INC="-Irenderers/agg/include"
+ALL_INC="$AGG_INC $ALL_INC"
+
+dnl ---------------------------------------------------------------------
+dnl Optional AGG SVG Symbol Support.
+dnl ---------------------------------------------------------------------
+
+AC_MSG_CHECKING(if SVG Symbol support requested)
+AC_ARG_WITH(agg-svg-symbols,
+[  --with-agg-svg-symbols[[=yes/no]]
+                          Include AGG SVG symbol support (Requires expat).],,)
+
+dnl Check for expat availability
+
+if test "$with_agg_svg_symbols" != "no" ; then
+    if test "$EXPAT_FOUND" = "yes" ; then
+        dnl add SVG to the AGG build
+        AGG_OBJ="$AGG_OBJ renderers/agg/src/agg_svg_parser.o renderers/agg/src/agg_svg_path_renderer.o renderers/agg/src/agg_svg_path_tokenizer.o"
+        AGG_LIB="$AGG_LIB $EXPAT_LIB"
+        AC_SUBST(AGG_LIB, $AGG_LIB)
+        ALL_LIB="$AGG_LIB $ALL_LIB"
+        AGG_INC="$AGG_INC $EXPAT_INC"
+        AC_SUBST(AGG_INC, $AGG_INC)
+        ALL_INC="$AGG_INC $ALL_INC"
+        AGG_SVG_SYMBOLS_ENABLED="-DUSE_AGG_SVG_SYMBOLS"
+        ALL_ENABLED="$AGG_SVG_SYMBOLS_ENABLED $ALL_ENABLED"
+        AC_MSG_RESULT([        enabled])
+
+    else
+        AC_MSG_RESULT([        disabled due to missing expat dependency])
+    fi
+fi
+
+AC_SUBST(AGG_OBJ,    $AGG_OBJ)
+
+
+
+
+
+dnl ---------------------------------------------------------------------
+dnl Find PROJ.4 ONLY IF REQUESTED.
+dnl ---------------------------------------------------------------------
+
+dnl Clear some cache variables
+unset ac_cv_lib_proj_pj_init
+unset ac_cv_lib_proj_pj_transform
+unset ac_cv_lib_proj_pj_latlong_from_proj
+
+AC_CHECKING(whether we should include PROJ.4 support)
+AC_ARG_WITH(proj,
+[  --with-proj[[=DIR]]       Include PROJ.4 support (DIR is PROJ.4's install dir).],,)
+
+if test "$with_proj" = "yes" ; then
+
+  AC_CHECK_LIB(proj,pj_init,PROJ_ENABLED=-DUSE_PROJ,,,)
+  AC_CHECK_LIB(proj,pj_transform,PJ_TRANSFORM=yes,PJ_TRANSFORM=no,,)
+
+  if test -n "$PROJ_ENABLED" -a "$PJ_TRANSFORM" = "no"; then
+      AC_MSG_ERROR([This version of PROJ is too old.  PROJ4.4.2 or later is required.])
+  elif test -n "$PROJ_ENABLED" -a "$PJ_TRANSFORM" = "yes"; then
+      PROJ_LIBS="-lproj"
+      AC_MSG_RESULT([        using PROJ.4 from system libs.])
+  else
+      AC_MSG_WARN([        PROJ.4 not found in system libs... use --with-proj=DIR.])
+  fi
+
+elif test -n "$with_proj" -a "$with_proj" != "no" ; then
+
+  AC_EXPAND_PATH($with_proj, PROJ_DIR)
+  test -f $PROJ_DIR/include/proj_api.h && PROJ_INCLUDE="$PROJ_DIR/include"
+  test -f $PROJ_DIR/include/proj/proj_api.h && PROJ_INCLUDE="$PROJ_DIR/include/proj"
+  test -f $PROJ_DIR/src/proj_api.h && PROJ_INCLUDE="$PROJ_DIR/src"
+  test -f $PROJ_DIR/proj_api.h && PROJ_INCLUDE="$PROJ_DIR"
+
+  test -f $PROJ_DIR/src/.libs/libproj.a && PROJ_LIBDIR="$PROJ_DIR/src/.libs"
+  test -f $PROJ_DIR/lib/libproj.a && PROJ_LIBDIR="$PROJ_DIR/lib"
+  test -f $PROJ_DIR/lib64/libproj.a && PROJ_LIBDIR="$PROJ_DIR/lib64"
+  test -f $PROJ_DIR/libproj.a && PROJ_LIBDIR="$PROJ_DIR"
+
+  test -f $PROJ_DIR/src/.libs/libproj.so -o -f $PROJ_DIR/src/.libs/libproj.sl -o -f $PROJ_DIR/src/.libs/libproj.dylib && PROJ_LIBDIR="$PROJ_DIR/src/.libs"
+  test -f $PROJ_DIR/lib/libproj.so -o -f $PROJ_DIR/lib/libproj.sl -o -f $PROJ_DIR/lib/libproj.dylib && PROJ_LIBDIR="$PROJ_DIR/lib"
+  test -f $PROJ_DIR/lib64/libproj.so -o -f $PROJ_DIR/lib64/libproj.sl && PROJ_LIBDIR="$PROJ_DIR/lib64"
+  test -f $PROJ_DIR/libproj.so -o -f $PROJ_DIR/libproj.sl -o -f $PROJ_DIR/libproj.dylib && PROJ_LIBDIR="$PROJ_DIR"
+
+  if test -n "$PROJ_INCLUDE" -a -n "$PROJ_LIBDIR" ; then
+      PROJ_INC=-I$PROJ_INCLUDE
+      PROJ_LIBS="-L$PROJ_LIBDIR -lproj"
+      AC_ADD_RUNPATH("$PROJ_LIBDIR")
+  else
+      AC_MSG_ERROR("Could not find proj_api.h or libproj.a/libproj.so in $PROJ_DIR.")
+  fi
+
+  AC_CHECK_LIB(proj,pj_transform,PJ_TRANSFORM=yes,PJ_TRANSFORM=no,$PROJ_LIBS)
+  if test "$PJ_TRANSFORM" = "no"; then
+      AC_MSG_ERROR([This version of PROJ is too old.  PROJ4.4.2 or later is required.])
+  fi
+
+  PROJ_ENABLED=-DUSE_PROJ
+  AC_MSG_RESULT([        using PROJ.4 from $PROJ_DIR.])
+
+else
+
+  AC_MSG_RESULT([        PROJ.4 support not requested.])
+fi
+
+AC_SUBST(PROJ_ENABLED,$PROJ_ENABLED)
+AC_SUBST(PROJ_INC,    $PROJ_INC)
+AC_SUBST(PROJ_LIBS,   $PROJ_LIBS)
+
+ALL_ENABLED="$PROJ_ENABLED $ALL_ENABLED"
+ALL_INC="$PROJ_INC $ALL_INC"
+ALL_LIB="$PROJ_LIBS $ALL_LIB"
+
+dnl ---------------------------------------------------------------------
+dnl ENABLE THREADS ONLY IF REQUESTED.
+dnl ---------------------------------------------------------------------
+
+THREAD_LIB=""
+THREAD_FLAG=""
+
+AC_CHECKING(whether we should include thread safe support)
+AC_ARG_WITH(threads,
+[  --with-threads[[=linkopt]]Include thread safe support],,)
+
+if test "$with_threads" = "yes" ; then
+
+  AC_CHECK_LIB(pthread,pthread_create,THREAD_FLAG=-DUSE_THREAD,,,)
+
+  if test -n "$THREAD_FLAG" ; then
+      THREAD_LIB="-lpthread"
+      AC_MSG_RESULT([        using -lpthread from system libs.])
+  else
+      AC_MSG_ERROR([        -lpthread not found, use --with-thread=<pthread link options>])
+  fi
+
+elif test -n "$with_threads" -a "$with_threads" != "no" ; then
+
+  THREAD_FLAG=-DUSE_THREAD
+  THREAD_LIB="$with_threads"  
+
+  AC_MSG_RESULT([        using threads with link options "$THREAD_LIB".])
+
+else
+  AC_MSG_RESULT([        thread safe support disabled.])
+fi
+
+AC_SUBST(THREAD_FLAG,$THREAD_FLAG)
+AC_SUBST(THREAD_LIB,$THREAD_LIB)
+
+ALL_ENABLED="$THREAD_FLAG $ALL_ENABLED"
+ALL_LIB="$THREAD_LIB $ALL_LIB"
+
+dnl ---------------------------------------------------------------------
+dnl Find ESRI SDE ONLY IF REQUESTED.
+dnl ---------------------------------------------------------------------
+
+AC_CHECKING(whether we should include ESRI SDE support)
+AC_ARG_WITH(sde,
+[  --with-sde[[=DIR]]        Include ESRI SDE support (DIR is SDE's install dir).],,)
+
+AC_ARG_WITH(sde-version,
+[  --with-sde-version[[=VERSION NUMBER]]
+                          Set ESRI SDE version number (Default is 91).],SDE_VERSION=$with_sde_version,SDE_VERSION=91)
+
+if test -z "$SDE_VERSION" -o `expr "$SDE_VERSION" \>\= 92` = 1; then
+SDE_VERSION=""
+fi
+if test "$with_sde" = "yes" ; then
+
+  AC_CHECK_LIB(sde$SDE_VERSION,SE_connection_create,SDE_ENABLED=-DUSE_SDE,,,)
+
+  if test -n "$SDE_ENABLED" ; then
+      SDE_LIB="-lsde$SDE_VERSION -lpe$SDE_VERSION -lsg$SDE_VERSION"
+      AC_CHECK_LIB(pthread, main, SDE_LIB="$SDE_LIB -lpthread",,)
+      AC_CHECK_LIB(socket, main, SDE_LIB="$SDE_LIB -lsocket",,)
+      AC_CHECK_LIB(dl, main, SDE_LIB="$SDE_LIB -ldl",,)
+      AC_MSG_RESULT([        using ESRI SDE from system libs.])
+  else
+      AC_MSG_WARN([        ESRI SDE not found in system libs... use --with-sde=DIR.])
+  fi
+
+elif test -n "$with_sde" -a "$with_sde" != "no" ; then
+
+  AC_EXPAND_PATH($with_sde, SDE_DIR)
+
+  test -f $SDE_DIR/arcsde/coverages/include/sdetype.h && SDE_INCDIR="$SDE_DIR/arcsde/coverages/include"
+  test -f $SDE_DIR/include/sdetype.h && SDE_INCDIR="$SDE_DIR/include"
+  test -f $SDE_DIR/sdetype.h && SDE_INCDIR="$SDE_DIR"
+
+  test -f $SDE_DIR/lib/libsde$SDE_VERSION.a && SDE_LIBDIR="$SDE_DIR/lib"
+  test -f $SDE_DIR/lib64/libsde$SDE_VERSION.a && SDE_LIBDIR="$SDE_DIR/lib64"
+  test -f $SDE_DIR/libsde$SDE_VERSION.a && SDE_LIBDIR="$SDE_DIR"
+
+  test -f $SDE_DIR/lib/libsde$SDE_VERSION.so -o -f $SDE_DIR/lib/libsde$SDE_VERSION.sl && SDE_LIBDIR="$SDE_DIR/lib"
+  test -f $SDE_DIR/lib64/libsde$SDE_VERSION.so -o -f $SDE_DIR/lib64/libsde$SDE_VERSION.sl && SDE_LIBDIR="$SDE_DIR/lib64"
+  test -f $SDE_DIR/libsde$SDE_VERSION.so -o -f $SDE_DIR/libsde$SDE_VERSION.sl && SDE_LIBDIR="$SDE_DIR"
+
+  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"
+      AC_CHECK_LIB(pthread, main, SDE_LIB="$SDE_LIB -lpthread",,)
+      AC_CHECK_LIB(socket, main, SDE_LIB="$SDE_LIB -lsocket",,)
+      AC_CHECK_LIB(dl, main, SDE_LIB="$SDE_LIB -ldl",,)
+      AC_ADD_RUNPATH("$SDE_LIBDIR")
+  else
+      AC_MSG_ERROR("Could not find sdetype.h or libsde$SDE_VERSION.a/libsde$SDE_VERSION.so in $SDE_DIR.")
+  fi
+
+  SDE_ENABLED=-DUSE_SDE
+  AC_MSG_RESULT([        using ESRI SDE from $SDE_DIR.])
+
+else
+
+  AC_MSG_RESULT([        ESRI SDE support not requested.])
+fi
+
+AC_SUBST(SDE_ENABLED,$SDE_ENABLED)
+AC_SUBST(SDE_INC,    $SDE_INC)
+AC_SUBST(SDE_LIB,    $SDE_LIB)
+
+ALL_ENABLED="$SDE_ENABLED $ALL_ENABLED"
+ALL_INC="$SDE_INC $ALL_INC"
+ALL_LIB="$SDE_LIB $ALL_LIB"
+
+dnl ---------------------------------------------------------------------
+dnl Find GEOS ONLY IF REQUESTED.
+dnl ---------------------------------------------------------------------
+
+AC_MSG_CHECKING(if GEOS support requested)
+
+AC_ARG_WITH(geos,
+[  --with-geos[[=PATH]]      Include GEOS support (PATH is path to geos-config)],,)
+
+if test -n "$with_geos" -a "$with_geos" != "no" ; then
+
+  AC_MSG_RESULT([yes])
+
+  GEOS_CONFIG=$with_geos
+
+  if test "$GEOS_CONFIG" = "yes" ; then
+
+    AC_PATH_PROG(GEOS_CONFIG, geos-config, no)
+
+    if test "$GEOS_CONFIG" = "no" ; then
+      AC_MSG_ERROR([couldn't find geos-config in default path. Please specify full path to geos-config])
+    fi
+
+  elif test -f "$GEOS_CONFIG" -a -x "$GEOS_CONFIG" ; then
+    AC_MSG_RESULT([user supplied geos-config ($GEOS_CONFIG)])
+  else
+    AC_MSG_ERROR(['$GEOS_CONFIG' is not an executable.  Make sure you use --with-geos=/path/to/geos-config])
+  fi
+
+  dnl
+  dnl Test that we have at least version 3.0.0
+  dnl (Version check code borrowed from GDAL's geos.m4)
+  dnl
+
+  min_geos_version=3.0.0
+
+  AC_MSG_CHECKING(for GEOS version >= $min_geos_version)
+
+  geos_major_version=`$GEOS_CONFIG --version | \
+       sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
+  geos_minor_version=`$GEOS_CONFIG --version | \
+       sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
+  geos_micro_version=`$GEOS_CONFIG --version | \
+       sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'`
+
+  req_major=`echo $min_geos_version | \
+       sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
+  req_minor=`echo $min_geos_version | \
+       sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
+  req_micro=`echo $min_geos_version | \
+       sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'`
+      
+  ac_req_version=`expr $req_major \* 100000 \+  $req_minor \* 100 \+ $req_micro`
+  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
+     AC_MSG_RESULT([yes. Found version ${geos_major_version}.${geos_minor_version}.${geos_micro_version}])
+  else 
+     AC_MSG_RESULT(no)
+     AC_MSG_ERROR([geos-config reports version ${geos_major_version}.${geos_minor_version}.${geos_micro_version}, need at least $min_geos_version or configure --without-geos])
+  fi
+
+  
+  dnl
+  dnl All checks passed. Set compile flags
+  dnl
+
+  GEOS_ENABLED=-DUSE_GEOS
+
+  GEOS_INCDIR=`$GEOS_CONFIG --includes`
+  GEOS_INC="-I$GEOS_INCDIR"
+  GEOS_LIB="`$GEOS_CONFIG --libs`_c"
+
+  AC_SUBST(GEOS_ENABLED,$GEOS_ENABLED)
+  AC_SUBST(GEOS_INC,    $GEOS_INC)
+  AC_SUBST(GEOS_LIB,    $GEOS_LIB)
+
+  ALL_ENABLED="$GEOS_ENABLED $ALL_ENABLED"
+  ALL_INC="$GEOS_INC $ALL_INC"
+  ALL_LIB="$GEOS_LIB $ALL_LIB"
+
+else
+
+  AC_MSG_RESULT([no])
+
+fi
+
+dnl ---------------------------------------------------------------------
+dnl Find OGR ONLY IF REQUESTED.
+dnl ---------------------------------------------------------------------
+
+AC_CHECKING(whether we should include OGR support)
+AC_ARG_WITH(ogr,
+[  --with-ogr[[=PATH]]       Include OGR support (PATH is path to gdal-config).],,)
+
+if test "`basename xx/$with_ogr`" = "gdal-config" ; then
+  GDAL_CONFIG="$with_ogr"
+fi
+
+if test "$with_ogr" = "yes" ; then
+ AC_PATH_PROG(GDAL_CONFIG, gdal-config, no)
+
+  if test "$GDAL_CONFIG" = "no" ; then
+    AC_MSG_ERROR([couldn't find gdal-config])
+  fi
+fi
+
+if test -n "$GDAL_CONFIG" -a "$with_ogr" != "no" ; then
+
+  dnl Is OGR enabled in this gdal build?
+
+  if test x`$GDAL_CONFIG --ogr-enabled` = "xyes" ; then
+      OGR_ENABLED=-DUSE_OGR
+      AC_MSG_RESULT([        OGR enabled ($OGR_ENABLED).])
+  else
+      AC_MSG_WARN([        OGR not available.])
+  fi
+
+else
+
+  AC_MSG_RESULT([        OGR support not requested.])
+fi
+
+dnl
+dnl OGR Makefile substitutions are done together with GDAL stuff below.
+dnl
+
+dnl ---------------------------------------------------------------------
+dnl Find GDAL only if requested (and not supplied by OGR)
+dnl ---------------------------------------------------------------------
+AC_MSG_CHECKING(if GDAL support requested)
+
+AC_ARG_WITH(gdal,
+[  --with-gdal[[=PATH]]      Include GDAL support (PATH is path to gdal-config)],,)
+
+if test "$with_gdal" = "yes" ; then
+
+  AC_MSG_RESULT([yes])
+
+  if test "`basename xx/$with_gdal`" = "gdal-config" ; then
+    GDAL_CONFIG="$with_gdal"
+  fi
+
+  if test -z "$GDAL_CONFIG" ; then
+    AC_PATH_PROG(GDAL_CONFIG, gdal-config, no)
+  fi
+
+  if test "$GDAL_CONFIG" = "no" ; then
+    AC_MSG_ERROR([couldn't find gdal-config])
+  fi
+
+  GDAL_ENABLED=-DUSE_GDAL
+
+elif test -n "$with_gdal" -a "$with_gdal" != "no" ; then
+
+  GDAL_CONFIG=$with_gdal
+
+  if test -f "$GDAL_CONFIG" -a -x "$GDAL_CONFIG" ; then
+    AC_MSG_RESULT([yes, user supplied gdal-config ($GDAL_CONFIG)])
+  else
+    AC_MSG_ERROR(['$GDAL_CONFIG' is not an executable.  Make sure you use --with-gdal=/path/to/gdal-config])
+  fi
+
+  GDAL_ENABLED=-DUSE_GDAL
+
+else
+
+  AC_MSG_RESULT([no])
+
+fi
+
+dnl
+dnl GDAL_LIB and GDAL_INC are used for both GDAL and OGR
+dnl
+
+if test -n "$GDAL_ENABLED" -o "$OGR_ENABLED"; then
+
+  GDAL_LIB=`$GDAL_CONFIG --libs`
+  GDAL_INC=`$GDAL_CONFIG --cflags`
+
+fi
+
+AC_SUBST(GDAL_ENABLED,$GDAL_ENABLED)
+AC_SUBST(OGR_ENABLED,$OGR_ENABLED)
+AC_SUBST(GDAL_INC,    $GDAL_INC)
+AC_SUBST(GDAL_LIB,    $GDAL_LIB)
+
+ALL_ENABLED="$GDAL_ENABLED $OGR_ENABLED $ALL_ENABLED"
+ALL_INC="$GDAL_INC $ALL_INC"
+ALL_LIB="$GDAL_LIB $ALL_LIB"
+
+dnl ---------------------------------------------------------------------------
+dnl Determine whether we should enable JPEG output - not if we have GDAL.
+dnl ---------------------------------------------------------------------------
+
+dnl if test -n "$JPEG_ENABLED" ; then
+dnl   AC_MSG_CHECKING(checking ms JPEG output)
+dnl   if test -n "$GDAL_ENABLED" ; then 
+dnl     JPEG_ENABLED=
+dnl     AC_MSG_RESULT([no we, have GDAL available.])
+dnl   else
+dnl     ALL_ENABLED="$JPEG_ENABLED $ALL_ENABLED"
+dnl     ALL_INC="$JPEG_INC $ALL_INC"
+dnl     ALL_LIB="$JPEG_LIB $ALL_LIB"
+dnl     AC_MSG_RESULT([yes, GDAL is not available but libjpeg is.])
+dnl   fi
+dnl fi
+
+dnl ---------------------------------------------------------------------------
+dnl Try to find PostgreSQL if PostGIS support requested.
+dnl ---------------------------------------------------------------------------
+
+AC_MSG_CHECKING(if PostGIS support requested)
+
+AC_ARG_WITH(postgis,[  --with-postgis[[=ARG]]    Include PostGIS Support (ARG=yes/path to pg_config)],,)
+
+if test "$with_postgis" = "no" -o "$with_postgis" = "" ; then
+  AC_MSG_RESULT(no)
+  PG_CONFIG="no"
+elif test "$with_postgis" = "yes" ; then
+  AC_MSG_RESULT(yes)
+  AC_PATH_PROG(PG_CONFIG, pg_config, no)
+else
+  PG_CONFIG=$with_postgis
+fi
+
+if test "$PG_CONFIG" = "no" ; then
+  POSTGIS_ENABLED=
+  POSTGIS_INC=
+  POSTGIS_LIB=
+else
+  POSTGIS_ENABLED=
+
+  if test -f "$PG_CONFIG" -a -x "$PG_CONFIG" ; then
+    AC_MSG_RESULT([yes, user supplied pg_config ($PG_CONFIG)])
+  else
+    AC_MSG_ERROR(['$PG_CONFIG' is not an executable.  Make sure you use --with-postgis=/path/to/pg_config])
+  fi
+
+  POSTGIS_EXTRALIBS="`$PG_CONFIG --libs`"
+  dnl Verify if pg_config has the "--libs" option..
+  if test $? -ne 0 ; then  
+      POSTGIS_EXTRALIBS=
+  fi
+
+  POSTGIS_INC="-I`$PG_CONFIG --includedir`"
+
+  old_LDFLAGS="$LDFLAGS"
+
+  POSTGIS_LIB="-L`$PG_CONFIG --libdir` -lpq"
+  LDFLAGS="$LDFLAGS $POSTGIS_LIB"
+
+  AC_CHECK_LIB(pq, PQconnectdb, POSTGIS_ENABLED="-DUSE_POSTGIS")
+
+  dnl if that didn't work, try adding in the dependent libs. 
+  if test  "$POSTGIS_ENABLED"x = x ; then
+    POSTGIS_LIB="$POSTGIS_LIB $POSTGIS_EXTRALIBS"
+    LDFLAGS="$old_LDFLAGS $POSTGIS_LIB"
+    unset ac_cv_lib_pq_PQconnectdb
+    AC_CHECK_LIB(pq, PQconnectdb, POSTGIS_ENABLED="-DUSE_POSTGIS")
+  fi
+
+  dnl If we have postgresql client lib, check for versioninfo.
+  if test "$POSTGIS_ENABLED" = "-DUSE_POSTGIS" ; then
+    AC_CHECK_LIB(pq, PQserverVersion, POSTGIS_ENABLED="$POSTGIS_ENABLED -DPOSTGIS_HAS_SERVER_VERSION")
+  fi
+
+  LDFLAGS="$old_LDFLAGS"
+
+fi
+
+AC_SUBST(POSTGIS_ENABLED,$POSTGIS_ENABLED)
+AC_SUBST(POSTGIS_INC,$POSTGIS_INC)
+AC_SUBST(POSTGIS_LIB,$POSTGIS_LIB)
+
+ALL_ENABLED="$POSTGIS_ENABLED $ALL_ENABLED"
+ALL_INC="$POSTGIS_INC $ALL_INC"
+ALL_LIB="$POSTGIS_LIB $ALL_LIB"
+
+dnl ---------------------------------------------------------------------------
+dnl Try to find MySQL if MYSQL support requested.
+dnl ---------------------------------------------------------------------------
+
+AC_MSG_CHECKING(if Mysql support requested)
+
+AC_ARG_WITH(mysql,[  --with-mysql[[=ARG]]      Include Mysql Support (ARG=yes/path to mysql_config)],,)
+
+if test "$with_mysql" = "no" -o "$with_mysql" = "" ; then
+  AC_MSG_RESULT(no)
+  MY_CONFIG="no"
+elif test "$with_mysql" = "yes" ; then
+  AC_MSG_RESULT(yes)
+  AC_PATH_PROG(MY_CONFIG, mysql_config, no)
+else
+  MY_CONFIG=$with_mysql
+fi
+
+if test "$MY_CONFIG" = "no" ; then
+  MYSQL_ENABLED=
+  MYSQL_INC=
+  MYSQL_LIB=
+else
+  if test -f "$MY_CONFIG" -a -x "$MY_CONFIG" ; then
+    AC_MSG_RESULT([yes, user supplied mysql_config ($MY_CONFIG)])
+  else
+    AC_MSG_ERROR(['$MY_CONFIG' is not an executable.  Make sure you use --with-mysql=/path/to/mysql_config])
+  fi
+
+  MYSQL_ENABLED=-DUSE_MYSQL
+  MYSQL_LIB="`$MY_CONFIG --libs` -lmysqlclient"
+#  MYSQL_LIB="-L/usr/lib/mysql -lmysqlclient"
+  MYSQL_INC="`$MY_CONFIG --cflags`"
+#  MYSQL_INC="-I/usr/include/mysql"
+fi
+
+AC_SUBST(MYSQL_ENABLED,$MYSQL_ENABLED)
+AC_SUBST(MYSQL_INC,$MYSQL_INC)
+AC_SUBST(MYSQL_LIB,$MYSQL_LIB)
+
+ALL_ENABLED="$MYSQL_ENABLED $ALL_ENABLED"
+ALL_INC="$MYSQL_INC $ALL_INC"
+ALL_LIB="$MYSQL_LIB $ALL_LIB"
+
+dnl ---------------------------------------------------------------------------
+dnl Try to find out if OracleSpatial support requested.
+dnl ---------------------------------------------------------------------------
+
+AC_MSG_CHECKING(if OracleSpatial support requested)
+AC_ARG_WITH(oraclespatial,
+[  --with-oraclespatial[[=ARG]]
+                          Include OracleSpatial Support (ARG=yes/path to
+                          Oracle home)],,)
+
+if test "$with_oraclespatial" = "no" -o "$with_oraclespatial" = ""; then
+  AC_MSG_RESULT([no])
+  ORA_HOME="no"
+elif test "$with_oraclespatial" = "yes"; then
+  if test -d "$ORACLE_HOME"; then
+    AC_MSG_RESULT([yes, set from ORACLE_HOME environment variable])
+    ORA_HOME="$ORACLE_HOME"
+  else
+    ORA_HOME="no"
+    AC_MSG_ERROR([ORACLE_HOME variable is not properly set])
+  fi
+else
+  AC_MSG_RESULT([yes, user supplied ORACLE_HOME])
+  ORA_HOME=$with_oraclespatial
+fi
+
+if test "$ORA_HOME" = "no" ; then
+  ORACLESPATIAL_ENABLED=
+  ORACLESPATIAL_INC=
+  ORACLESPATIAL_LIB=
+else
+
+  dnl Try to locate lib directory
+  test -f $ORA_HOME/lib/libclntsh.so -o -f $ORA_HOME/lib/libclntsh.dylib && ORA_LIBDIR="$ORA_HOME/lib"
+  test -f $ORA_HOME/libclntsh.so -o -f $ORA_HOME/libclntsh.dylib && ORA_LIBDIR="$ORA_HOME"
+  test -f $ORA_HOME/lib/oracle/10*/client/lib/libclntsh.so && ORA_LIBDIR=`dirname $ORA_HOME/lib/oracle/10*/client/lib/libclntsh.so`
+  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
+    AC_MSG_ERROR([Oracle Spatial: libclntsh.so not found.])
+  fi
+
+  dnl Try to locate include directory
+  test -f $ORA_HOME/sdk/include/oci.h && ORA_INCDIR="$ORA_HOME/sdk/include"
+  test -f $ORA_HOME/rdbms/public/oci.h && ORA_INCDIR="$ORA_HOME/rdbms/public"
+  test -f $ORA_HOME/rdbms/demo/oci.h && ORA_INCDIR="$ORA_HOME/rdbms/public"
+  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
+    AC_MSG_ERROR([Oracle Spatial: oci.h not found.])
+  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"
+
+  AC_MSG_RESULT([        Oracle Spatial found in $ORA_HOME.])
+
+fi
+
+AC_SUBST(ORACLESPATIAL_ENABLED,$ORACLESPATIAL_ENABLED)
+AC_SUBST(ORACLESPATIAL_INC,$ORACLESPATIAL_INC)
+AC_SUBST(ORACLESPATIAL_LIB,$ORACLESPATIAL_LIB)
+
+ALL_ENABLED="$ORACLESPATIAL_ENABLED $ALL_ENABLED"
+ALL_INC="$ORACLESPATIAL_INC $ALL_INC"
+ALL_LIB="$ORACLESPATIAL_LIB $ALL_LIB"
+
+dnl ---------------------------------------------------------------------------
+dnl Try to find out if MING FLASH support requested.
+dnl ---------------------------------------------------------------------------
+
+dnl AC_MSG_CHECKING(if MING/Flash support requested)
+dnl AC_ARG_WITH(ming,
+dnl [  --with-ming[[=DIR]]       Include MING/Flash Support (DIR=path to Ming
+dnl                           directory)],,)
+dnl 
+dnl if test "$with_ming" = "no" -o "$with_ming" = ""; then
+dnl   AC_MSG_RESULT([no])
+dnl   MING_ENABLED=
+dnl   MING_LIB=
+dnl   MING_INC=
+dnl elif test "$with_ming" = "yes"; then
+dnl   AC_MSG_RESULT([yes])
+dnl   MING_ENABLED=-DUSE_MING_FLASH
+dnl   MING_LIB="-lming"
+dnl   MING_INC=
+dnl else
+dnl   AC_MSG_RESULT([yes, user supplied MING directory])
+dnl   MING_ENABLED=-DUSE_MING_FLASH
+dnl   MING_LIB="-L$with_ming/lib -lming"
+dnl   MING_INC="-I$with_ming/include"
+dnl fi
+dnl 
+dnl AC_SUBST(MING_ENABLED,$MING_ENABLED)
+dnl AC_SUBST(MING_INC,$MING_INC)
+dnl AC_SUBST(MING_LIB,$MING_LIB)
+dnl 
+dnl ALL_ENABLED="$MING_ENABLED $ALL_ENABLED"
+dnl ALL_INC="$MING_INC $ALL_INC"
+dnl ALL_LIB="$MING_LIB $ALL_LIB"
+
+dnl ---------------------------------------------------------------------
+dnl WMS Server Compatibility - Enabled by default if PROJ.4 is there.
+dnl Can be explicitly disabled using --without-wms
+dnl ---------------------------------------------------------------------
+
+AC_CHECKING(whether we should include WMS Server support)
+AC_ARG_WITH(wms,
+[  --without-wms           Disable OGC WMS Compatibility (enabled by default).],,)
+
+if test "$with_wms" = "no" ; then
+
+  AC_MSG_RESULT([        OGC WMS Compatibility disabled by --without-wms.])
+
+elif test -z "$PROJ_ENABLED" ; then
+
+  AC_MSG_RESULT([        OGC WMS Compatibility not enabled (PROJ.4 is required for WMS).])
+
+else
+
+  WMS_SVR_ENABLED="-DUSE_WMS_SVR"
+  AC_MSG_RESULT([        OGC WMS compatibility enabled ($WMS_SVR_ENABLED).])
+
+fi
+
+AC_SUBST(WMS_SVR_ENABLED,$WMS_SVR_ENABLED)
+
+ALL_ENABLED="$WMS_SVR_ENABLED $ALL_ENABLED"
+
+
+dnl ---------------------------------------------------------------------
+dnl WFS Server support - Requires OGR and PROJ
+dnl ---------------------------------------------------------------------
+
+AC_CHECKING(whether we should include WFS Server support)
+AC_ARG_WITH(wfs,
+[  --with-wfs              Enable OGC WFS Server Support (OGR+PROJ4 required).],,)
+
+if test "$with_wfs" != "yes" ; then
+
+  AC_MSG_RESULT([        OGC WFS Server support not requested.])
+
+elif test -z "$OGR_ENABLED" ; then
+
+  AC_MSG_ERROR([OGC WFS Server support cannot be enabled: missing OGR which is required).])
+
+elif test -z "$PROJ_ENABLED" ; then
+
+  AC_MSG_ERROR([OGC WFS Server support cannot be enabled: missing PROJ4 which is required).])
+
+elif test "$with_wfs" = "yes" ; then
+
+  WFS_SVR_ENABLED="-DUSE_WFS_SVR"
+  AC_MSG_RESULT([        OGC WFS Server support enabled ($WFS_SVR_ENABLED).])
+
+fi
+
+AC_SUBST(WFS_SVR_ENABLED,$WFS_SVR_ENABLED)
+
+ALL_ENABLED="$WFS_SVR_ENABLED $ALL_ENABLED"
+
+
+dnl ---------------------------------------------------------------------
+dnl WCS Server support - Requires GDAL and PROJ
+dnl ---------------------------------------------------------------------
+
+AC_CHECKING(whether we should include WCS Server support)
+AC_ARG_WITH(wcs,[  --with-wcs              Enable OGC WCS Server Support (GDAL+PROJ4 required).],,)
+
+if test "$with_wcs" != "yes" ; then
+  AC_MSG_RESULT([        OGC WCS Server support not requested.])  
+elif test -z "$GDAL_ENABLED" ; then
+  AC_MSG_ERROR([OGC WCS Server support cannot be enabled: missing GDAL which is required).])
+elif test -z "$PROJ_ENABLED" ; then
+  AC_MSG_ERROR([OGC WCS Server support cannot be enabled: missing PROJ4 which is required).])
+elif test "$with_wcs" = "yes" ; then
+  WCS_SVR_ENABLED="-DUSE_WCS_SVR"
+  AC_MSG_RESULT([        OGC WCS Server support enabled ($WCS_SVR_ENABLED).])
+fi
+
+AC_SUBST(WCS_SVR_ENABLED,$WCS_SVR_ENABLED)
+ALL_ENABLED="$WCS_SVR_ENABLED $ALL_ENABLED"
+
+
+dnl ---------------------------------------------------------------------
+dnl WMS and WFS Client support - Requires PROJ.4 and libcurl.
+dnl OGR recommended for WMS and required for WFS
+dnl ---------------------------------------------------------------------
+
+AC_CHECKING(whether we should include WMS Client Connections support)
+AC_ARG_WITH(wmsclient,
+[  --with-wmsclient        Enable OGC WMS Client Connections (PROJ4, libcurl and
+                          GDAL required).],,)
+
+if test "$with_wmsclient" = "no" ; then
+
+  AC_MSG_RESULT([        OGC WMS Client Layers disabled by --without-wmsclient.])
+
+elif test -z "$PROJ_ENABLED" -o -z "$GDAL_ENABLED"; then
+
+  AC_MSG_RESULT([        OGC WMS Client Connections not enabled (PROJ.4, libcurl and GDAL required).])
+
+elif test "$with_wmsclient" = "yes" ; then
+
+  dnl we'll test for libcurl below.
+  WMS_REQUESTED="yes"
+
+fi
+
+
+AC_CHECKING(whether we should include WFS Client Connections support)
+AC_ARG_WITH(wfsclient,
+[  --with-wfsclient        Enable OGC WFS Client Connections (PROJ4, libcurl and
+                          OGR required).],,)
+
+if test "$with_wfsclient" = "no" ; then
+
+  AC_MSG_RESULT([        OGC WFS Client Layers disabled by --without-wfsclient.])
+
+elif test -z "$PROJ_ENABLED" -o -z "$OGR_ENABLED"; then
+
+  AC_MSG_RESULT([        OGC WFS Client Connections not enabled (PROJ.4, libcurl and OGR required).])
+
+elif test "$with_wfsclient" = "yes" ; then
+
+  dnl we'll test for libcurl below.
+  WFS_REQUESTED="yes"
+
+fi
+
+dnl ---------------------------------------------------------------------
+dnl OGC SOS Server support - Requires libxml2 and PROJ4 and OGR
+dnl ---------------------------------------------------------------------
+
+AC_CHECKING(whether we should include OGC SOS Server support)
+AC_ARG_WITH(sos,
+[  --with-sos              Enable OGC SOS Server Support (libxml2 and PROJ4 and
+                          OGR required).],,)
+
+if test "x$with_sos" != "xyes" ; then
+
+  AC_MSG_RESULT([        OGC SOS Server support not requested.])
+
+else
+
+  if test -z "$PROJ_ENABLED" ; then
+    AC_MSG_ERROR([        OGC SOS Support requested, but PROJ.4 required and missing.])
+  fi
+  if test -z "$OGR_ENABLED" ; then
+    AC_MSG_ERROR([        OGC SOS Support requested, but OGR required and missing.])
+  fi
+
+  dnl we'll test for libxml2 below.
+  SOS_REQUESTED="yes"
+  AC_MSG_RESULT([        OGC SOS Server support requested.])
+
+fi
+
+dnl ---------------------------------------------------------------------
+dnl Look for libcurl if WMS and WFS Client requested
+dnl ---------------------------------------------------------------------
+
+AC_MSG_CHECKING(for curl-config)
+AC_ARG_WITH(curl-config,
+[  --with-curl-config=PATH Specify path to curl-config.],,)
+
+dnl Clear some cache variables
+unset ac_cv_path_LIBCURL_CONFIG
+
+if test "$WMS_REQUESTED" = "yes" -o "$WFS_REQUESTED" = "yes" ; then
+
+  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
+      AC_MSG_RESULT([yes, user supplied curl-config ($LIBCURL_CONFIG)])
+    else
+      AC_MSG_ERROR(['$LIBCURL_CONFIG' is not an executable.  Make sure you use --with-curl-config=/path/to/curl-config])
+    fi
+  else
+    AC_PATH_PROG(LIBCURL_CONFIG, curl-config, no)
+  fi
+
+  if test "$LIBCURL_CONFIG" = "no" ; then
+    AC_MSG_ERROR([couldn't find curl-config, try using --with-curl-config=PATH])
+  fi
+
+  CURL_VERNUM=`$LIBCURL_CONFIG --vernum`
+  CURL_VER=`$LIBCURL_CONFIG --version | awk '{print $2}'`
+  CURL_FLAGS=""
+
+  AC_MSG_RESULT([        found libcurl version $CURL_VER])
+  
+  dnl Need libcurl 7.10.1 or more recent
+  if test -z "$CURL_VERNUM" -o `expr "0x$CURL_VERNUM" \< "0x070a01"` = 1; then
+    AC_MSG_ERROR([libcurl version 7.10.1 or more recent is required.])
+  fi
+
+  dnl Verify if the the PROXYAUTH support is avaible (>= 7.10.7)
+  AC_MSG_CHECKING(for CURLOPT_PROXYAUTH support)
+  if test -z "$CURL_VERNUM" -o `expr "0x$CURL_VERNUM" \>= "0x070a07"` = 1; then
+    AC_MSG_RESULT([yes.])
+    CURL_FLAGS="-DUSE_CURLOPT_PROXYAUTH"
+  else
+    AC_MSG_RESULT([no.])
+  fi
+
+  dnl set WMS_LYR_ENABLED/WFS_LYR_ENABLED here, Makefile substitutions are
+  dnl done only further down, after checking for libxml2
+  if test "$WMS_REQUESTED" = "yes" ; then
+    WMS_LYR_ENABLED="-DUSE_WMS_LYR"
+    AC_MSG_RESULT([        OGC WMS Client Connections enabled ($WMS_LYR_ENABLED).])
+  fi
+
+  if test "$WFS_REQUESTED" = "yes" ; then
+    WFS_LYR_ENABLED="-DUSE_WFS_LYR"
+    AC_MSG_RESULT([        OGC WFS Client Connections enabled ($WFS_LYR_ENABLED).])
+  fi
+
+  CURL_INC=`$LIBCURL_CONFIG --cflags`
+  CURL_LIB=`$LIBCURL_CONFIG --libs`
+  CURL_ENABLED="-DUSE_CURL $CURL_FLAGS"
+
+fi
+
+AC_SUBST(CURL_INC,    $CURL_INC)
+AC_SUBST(CURL_LIB,    $CURL_LIB)
+
+ALL_INC="$CURL_INC $ALL_INC"
+ALL_LIB="$CURL_LIB $ALL_LIB"
+
+dnl ---------------------------------------------------------------------
+dnl KML support
+dnl ---------------------------------------------------------------------
+
+AC_ARG_WITH(kml,[  --with-kml=                KML output Support (ARG=yes/no).],)
+
+AC_MSG_CHECKING(if KML output is requested)
+KML_REQUESTED=""
+
+if test "$with_kml" = "yes"; then
+    AC_MSG_RESULT(yes)
+    KML_REQUESTED="yes"
+else
+    AC_MSG_RESULT(no)
+fi
+
+dnl ---------------------------------------------------------------------
+dnl Look for libxml2 if SOS Server requested
+dnl ---------------------------------------------------------------------
+
+AC_MSG_CHECKING(for libxml2)
+
+AC_ARG_WITH(xml2-config,
+[  --with-xml2-config=PATH Specify path to xml2-config.],,)
+
+dnl Clear some cache variables
+unset ac_cv_path_LIBXML2_CONFIG
+
+dnl If xml2 not explicitly mentioned, set to yes/no depending on whether
+dnl we are requesting libxml2 related services. 
+
+if test -z "$with_xml2_config" ; then
+  if test "x$SOS_REQUESTED" = "xyes" ; then
+    with_xml2_config=yes
+    AC_MSG_RESULT([libxml2 required.])
+  elif test "x$KML_REQUESTED" = "xyes" ; then
+    with_xml2_config=yes
+    AC_MSG_RESULT([libxml2 required.])
+  elif test "x$WCS_SVR_ENABLED" != "x" ; then 
+    with_xml2_config=yes
+    AC_MSG_RESULT([libxml2 requested for WCS Server.])
+    AC_MSG_RESULT([      If unavailable disable using --without-xml2-config,])
+    AC_MSG_RESULT([      but WCS 1.1 support will be disabled.])
+  elif test "x$WFS_SVR_ENABLED" != "x" ; then 
+    with_xml2_config=yes
+    AC_MSG_RESULT([libxml2 requested for WFS Server.])
+    AC_MSG_RESULT([      If unavailable disable using --without-xml2-config,])
+    AC_MSG_RESULT([      but WFS 1.1 support will be disabled.])
+  else
+    with_xml2_config=no
+    AC_MSG_RESULT([libxml2 not required.])
+  fi
+fi
+
+if test "$with_xml2_config" != "no" ; then
+
+  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
+      AC_MSG_RESULT([yes, user supplied xml2-config ($LIBXML2_CONFIG)])
+    else
+      AC_MSG_ERROR(['$LIBXML2_CONFIG' is not an executable.  Make sure you use --with-xml2-config=/path/to/xml2-config])
+    fi
+  else
+    AC_PATH_PROG(LIBXML2_CONFIG, xml2-config, no)
+  fi
+
+  if test "$LIBXML2_CONFIG" = "no" ; then
+   AC_MSG_ERROR([couldn't find xml2-config, try using --with-xml2-config=PATH])
+  fi
+
+  XML2_VER=`$LIBXML2_CONFIG --version`
+
+  AC_MSG_RESULT([        found libxml2 version $XML2_VER])
+
+  XML2_INC=`$LIBXML2_CONFIG --cflags`
+  XML2_LIB=`$LIBXML2_CONFIG --libs`
+  XML2_ENABLED=-DUSE_LIBXML2
+ 
+  if test "$SOS_REQUESTED" = "yes" ; then  
+    SOS_SVR_ENABLED="-DUSE_SOS_SVR"
+  fi
+  if test "$KML_REQUESTED" = "yes" ; then  
+    KML_ENABLED="-DUSE_KML"
+  fi
+fi
+
+AC_SUBST(XML2_INC,    $XML2_INC)
+AC_SUBST(XML2_LIB,    $XML2_LIB)
+
+ALL_INC="$XML2_INC $ALL_INC"
+ALL_LIB="$XML2_LIB $ALL_LIB"
+
+dnl ---------------------------------------------------------------------
+dnl Substitutions for vars which are set only if curl and/or libxml2 are found
+dnl ---------------------------------------------------------------------
+
+AC_SUBST(WMS_LYR_ENABLED,$WMS_LYR_ENABLED)
+AC_SUBST(WFS_LYR_ENABLED,$WFS_LYR_ENABLED)
+AC_SUBST(SOS_SVR_ENABLED,$SOS_SVR_ENABLED)
+
+ALL_ENABLED="$WMS_LYR_ENABLED $WFS_LYR_ENABLED $SOS_SVR_ENABLED $XML2_ENABLED $CURL_ENABLED $KML_ENABLED $ALL_ENABLED"
+
+
+dnl ---------------------------------------------------------------------
+dnl Check if xml-mapfile requested
+dnl ---------------------------------------------------------------------
+
+AC_ARG_WITH(xml-mapfile,
+[  --with-xml-mapfile=                Include xml-mapfile Support (ARG=yes/no).],
+   XMLMAPFILE_REQUESTED="")
+
+AC_MSG_CHECKING(if xml-mapfile is requested)
+XMLMAPFILE_ENABLED=""
+
+if test "$with_xml_mapfile" = "yes"; then
+  XMLMAPFILE_ENABLED="-DUSE_XMLMAPFILE"
+  AC_MSG_RESULT(yes.. xslt and exslt support needed)
+else
+  AC_MSG_RESULT(no)
+fi
+
+ALL_ENABLED="$XMLMAPFILE_ENABLED $ALL_ENABLED"
+
+dnl ---------------------------------------------------------------------
+dnl Check if xslt requested
+dnl ---------------------------------------------------------------------
+
+AC_ARG_WITH(xslt,
+[  --with-xslt=DIR         Include xslt Support (ARG=yes/path to 
+                          to xslt install dir).],
+    XSLT_DIR=$withval,XSLT_DIR='')
+
+AC_MSG_CHECKING(if xslt is requested)
+XSLT_LIB=''
+
+if test -z "$XMLMAPFILE_ENABLED" -a \( "$with_xslt" = "no" -o "$with_xslt" = ""  \); then
+  AC_MSG_RESULT(no)
+else
+
+  if test "$XSLT_DIR" = "yes" -o "$XSLT_DIR" = ""; then
+     XSLT_DIR="/usr"
+  fi
+
+  test -f $XSLT_DIR/include/libxslt/xslt.h && XSLT_INCDIR="$XSLT_DIR/include"
+  test -f $XSLT_DIR/lib/libxslt.so && XSLT_LIBDIR="$XSLT_DIR/lib"
+  test -f $XSLT_DIR/lib64/libxslt.so && XSLT_LIBDIR="$XSLT_DIR/lib64"
+
+  if test -n "$XSLT_LIBDIR" -a -n "$XSLT_INCDIR" ; then
+    dnl
+    dnl Found xslt runtime and headers. Enable USE_XSLT .
+    dnl
+    XSLT_ENABLED="-DUSE_XSLT"
+    XSLT_INC="-I$XSLT_INCDIR"
+    XSLT_LIB="-L$XSLT_LIBDIR -lxslt"
+    AC_MSG_RESULT([using xslt from $XSLT_LIB ($XSLT_ENABLED)])
+    AC_ADD_RUNPATH("$XSLT_DIR")
+
+  else
+    AC_MSG_ERROR(['$XSLT_DIR' not a valid installation path of xslt.])
+  fi
+fi
+
+AC_SUBST(XSLT_ENABLED,$XSLT_ENABLED)
+AC_SUBST(XSLT_INC,    $XSLT_INC)
+AC_SUBST(XSLT_LIB,    $XSLT_LIB)
+
+ALL_ENABLED="$XSLT_ENABLED $ALL_ENABLED"
+ALL_INC="$XSLT_INC $ALL_INC"
+ALL_LIB="$XSLT_LIB $ALL_LIB"
+
+dnl ---------------------------------------------------------------------
+dnl Check if exslt requested
+dnl ---------------------------------------------------------------------
+
+AC_ARG_WITH(exslt,
+[  --with-exslt=DIR         Include exslt Support (ARG=yes/path to 
+                           to exslt install dir).],
+    EXSLT_DIR=$withval,EXSLT_DIR='')
+
+AC_MSG_CHECKING(if exslt is requested)
+EXSLT_LIB=''
+
+if test -z "$XMLMAPFILE_ENABLED" -a \( "$with_exslt" = "no" -o "$with_exslt" = ""  \); then
+  AC_MSG_RESULT(no)
+else
+
+  if test "$EXSLT_DIR" = "yes" -o "$EXSLT_DIR" = ""; then
+     EXSLT_DIR="/usr"
+  fi
+
+  test -f $EXSLT_DIR/include/libexslt/exslt.h && EXSLT_INCDIR="$EXSLT_DIR/include"
+  test -f $EXSLT_DIR/lib/libexslt.so && EXSLT_LIBDIR="$EXSLT_DIR/lib"
+  test -f $EXSLT_DIR/lib64/libexslt.so && EXSLT_LIBDIR="$EXSLT_DIR/lib64"
+
+  if test -n "$EXSLT_LIBDIR" -a -n "$EXSLT_INCDIR" ; then
+    dnl
+    dnl Found exslt runtime and headers. Enable USE_EXSLT .
+    dnl
+    EXSLT_ENABLED="-DUSE_EXSLT"
+    EXSLT_INC="-I$EXSLT_INCDIR"
+    EXSLT_LIB="-L$EXSLT_LIBDIR -lexslt"
+    AC_MSG_RESULT([using exslt from $EXSLT_LIB ($EXSLT_ENABLED)])
+    AC_ADD_RUNPATH("$EXSLT_DIR")
+  else
+    AC_MSG_ERROR(['$EXSLT_DIR' not a valid installation path of exslt.])
+  fi
+fi
+
+AC_SUBST(EXSLT_ENABLED,$EXSLT_ENABLED)
+AC_SUBST(EXSLT_INC,    $EXSLT_INC)
+AC_SUBST(EXSLT_LIB,    $EXSLT_LIB)
+
+ALL_ENABLED="$EXSLT_ENABLED $ALL_ENABLED"
+ALL_INC="$EXSLT_INC $ALL_INC"
+ALL_LIB="$EXSLT_LIB $ALL_LIB"
+
+
+dnl ---------------------------------------------------------------------------
+dnl Look for FriBidi if requested.
+dnl ---------------------------------------------------------------------------
+
+AC_MSG_CHECKING(if FriBidi support requested)
+
+AC_ARG_WITH(fribidi-config,
+[  --with-fribidi-config[[=ARG]]
+                          Include FriBidi Support (ARG=yes/path to 
+                          fribidi-config or fribidi.pc)],,)
+
+if test "$with_fribidi_config" = "no" -o "$with_fribidi_config" = "" ; then
+  AC_MSG_RESULT(no)
+  FRIBIDI_CONFIG="no"
+
+elif test "$with_fribidi_config" = "yes" ; then
+  AC_MSG_RESULT(yes)
+  AC_PATH_PROG(FRIBIDI_CONFIG, fribidi-config, no)
+  FRIBIDI_PKG_CONFIG="no"
+  if test "$FRIBIDI_CONFIG" = "no" -a "$PKG_CONFIG" != "no" ; then 
+     AC_MSG_CHECKING(for fribidi pkg-config path)
+     `$PKG_CONFIG --silence-errors --libs fribidi >> /dev/null`
+     if test $? -eq 0 ; then
+        AC_MSG_RESULT(yes)
+        FRIBIDI_PKG_CONFIG="yes"
+        FRIBIDI_CONFIG="fribidi"
+     else
+       AC_MSG_RESULT(no)
+     fi
+  fi 
+else
+  FRIBIDI_CONFIG=$with_fribidi_config
+fi
+
+if test "$FRIBIDI_CONFIG" = "no" ; then 
+  FRIBIDI_ENABLED=
+  FRIBIDI_INC=
+  FRIBIDI_LIB=
+else
+  if test "$FRIBIDI_PKG_CONFIG" = "yes" -o ${FRIBIDI_CONFIG: -3} = ".pc" ; then
+     AC_MSG_RESULT([yes, user supplied path to fribidi.pc])
+     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
+       AC_MSG_RESULT([yes, user supplied fribidi-config ($FRIBIDI_CONFIG)])
+     else
+       AC_MSG_ERROR(['$FRIBIDI_CONFIG' is not an executable.  Make sure you use --with-fribidi-config=/path/to/fribidi-config or fribidi.pc])
+     fi
+     FRIBIDI_ENABLED=-DUSE_FRIBIDI
+     FRIBIDI_LIB=`$FRIBIDI_CONFIG --libs`
+     FRIBIDI_INC=`$FRIBIDI_CONFIG --cflags`
+  fi
+fi
+
+AC_SUBST(FRIBIDI_ENABLED,$FRIBIDI_ENABLED)
+AC_SUBST(FRIBIDI_INC,$FRIBIDI_INC)
+AC_SUBST(FRIBIDI_LIB,$FRIBIDI_LIB)
+
+ALL_ENABLED="$FRIBIDI_ENABLED $ALL_ENABLED"
+ALL_INC="$FRIBIDI_INC $ALL_INC"
+ALL_LIB="$FRIBIDI_LIB $ALL_LIB"
+
+
+dnl ---------------------------------------------------------------------------
+dnl Look for Cairo if requested.
+dnl ---------------------------------------------------------------------------
+
+AC_MSG_CHECKING(if Cairo support requested)
+
+AC_ARG_WITH(cairo,
+[  --with-cairo[[=ARG]]      Include Cairo Support (ARG=yes/path to cairo.pc)],,)
+
+if test "$with_cairo" = "no" -o "$with_cairo" = "" ; then
+  AC_MSG_RESULT(no)
+  CAIRO_CONFIG="no"
+
+elif test "$with_cairo" = "yes" ; then
+  AC_MSG_RESULT(yes)
+  if test "$PKG_CONFIG" != "no" ; then 
+     AC_MSG_CHECKING(for cairo pkg-config path)
+     `$PKG_CONFIG --silence-errors -- cairo cairo-ft cairo-svg cairo-pdf cairo-png >> /dev/null`
+     if test $? -eq 0 ; then
+        AC_MSG_RESULT(yes)
+        CAIRO_CONFIG="cairo cairo-ft cairo-svg cairo-pdf cairo-png"
+     else
+       AC_MSG_ERROR([cairo support requested, but not found.Try installing the cairo development headers])
+     fi
+  else
+    AC_MSG_ERROR([pkg-config required for cairo support, try using --with-pkg-config=PATH])
+  fi 
+else
+  CAIRO_CONFIG=$with_cairo_config
+fi
+
+if test "$CAIRO_CONFIG" = "no" ; then 
+  CAIRO_ENABLED=
+  CAIRO_INC=
+  CAIRO_LIB=
+else
+  AC_MSG_RESULT([yes, pkg-config defaults, or user supplied path to cairo.pc])
+  CAIRO_ENABLED="-DUSE_CAIRO"
+  CAIRO_LIB=`$PKG_CONFIG --libs $CAIRO_CONFIG`
+  CAIRO_INC=`$PKG_CONFIG --cflags $CAIRO_CONFIG`
+fi
+
+AC_SUBST(CAIRO_ENABLED,$CAIRO_ENABLED)
+AC_SUBST(CAIRO_INC,$CAIRO_INC)
+AC_SUBST(CAIRO_LIB,$CAIRO_LIB)
+
+ALL_ENABLED="$CAIRO_ENABLED $ALL_ENABLED"
+ALL_INC="$CAIRO_INC $ALL_INC"
+ALL_LIB="$CAIRO_LIB $ALL_LIB"
+
+
+dnl ---------------------------------------------------------------------
+dnl Support for FastCGI enabled builds.
+dnl ---------------------------------------------------------------------
+AC_MSG_CHECKING(FastCGI support)
+AC_ARG_WITH(fastcgi,
+[  --with-fastcgi=path     Enable FastCGI, point to installed tree.],,)
+
+if test "$with_fastcgi" = "no" -o "$with_fastcgi" = "" ; then
+
+  AC_MSG_RESULT([not requested.])
+
+else 
+
+  AC_MSG_RESULT([requested.])
+
+  if test "$with_fastcgi" = "yes" ; then
+    FASTCGI_INC=""
+    FASTCGI_LIB="-lfcgi"
+  else
+    FASTCGI_INC="-I$with_fastcgi/include -I$with_fastcgi/include/fastcgi"
+    FASTCGI_LIB="-L$with_fastcgi/lib -lfcgi"
+  fi
+
+  AC_CHECK_LIB(fcgi,FCGI_Accept,FASTCGI_ENABLED=-DUSE_FASTCGI,,$FASTCGI_LIB)
+
+  if test "x$FASTCGI_ENABLED" = "x" ; then
+    AC_MSG_ERROR([Unable to link against $FASTCGI_LIB])
+  fi
+
+fi
+
+AC_SUBST(FASTCGI_ENABLED,$FASTCGI_ENABLED)
+AC_SUBST(FASTCGI_INC,    $FASTCGI_INC)
+AC_SUBST(FASTCGI_LIB,    $FASTCGI_LIB)
+
+ALL_ENABLED="$FASTCGI_ENABLED $ALL_ENABLED"
+ALL_INC="$FASTCGI_INC $ALL_INC"
+ALL_LIB="$FASTCGI_LIB $ALL_LIB"
+
+dnl ---------------------------------------------------------------------
+dnl Try to detect Apache version (httpd -v)
+dnl ---------------------------------------------------------------------
+
+AC_CHECKING(HTTPD server (Apache) version)
+AC_ARG_WITH(httpd,
+[  --with-httpd            Specify path to 'httpd' executable.],,)
+
+
+if test "$with_httpd" = "no" ; then
+
+  AC_MSG_RESULT([        HTTPD server (Apache) version detection disabled by --without-httpd.])
+
+elif test "$with_httpd" = "yes" ; then
+  AC_MSG_ERROR([full path to httpd executable is required as argument when using --with-httpd])
+
+else
+
+  if test -n "$with_httpd" ; then
+    dnl
+    dnl User supplied explicit httpd path
+    dnl
+    HTTPD="$with_httpd"
+    
+    if test -f "$HTTPD" -a -x "$HTTPD" ; then
+      AC_MSG_RESULT([        using user-supplied httpd ($HTTPD)])
+    else
+      AC_MSG_ERROR([$HTTPD is not an executable.  Make sure you use --with-httpd=/path/to/httpd])
+    fi
+  else
+    dnl 
+    dnl Try to locate httpd
+    dnl
+    AC_PATH_PROG(HTTPD, httpd, "", "$PATH:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/apache/bin")
+  fi
+
+  if test -z "$HTTPD" ; then
+    AC_MSG_RESULT([        'httpd' not found, skipping Apache version detection. You may want to use --with-httpd=/path/to/httpd])
+  else
+    HTTPD_VERSION_STRING=`$HTTPD -v | grep "Server version" | awk '{print $3}'`
+    dnl If server is not Apache then APACHE_VERSION will be empty
+    APACHE_VERSION=`echo "$HTTPD_VERSION_STRING" | grep Apache | awk -F / '{print $2}' | awk -F . '{print $1*1000000 + $2*1000 + $3}'`
+
+    AC_MSG_RESULT([        $HTTPD version is $HTTPD_VERSION_STRING ($APACHE_VERSION).])
+
+
+    dnl Check whether msDebug() calls need non-blocking stderr
+    if test -n "$APACHE_VERSION" -a `expr "$APACHE_VERSION" \>= "2000000"` = 1 -a `expr "$APACHE_VERSION" \< "2000049"` = 1 ; then
+      AC_MSG_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).])
+      DEBUG_FLAGS="${DEBUG_FLAGS} -DNEED_NONBLOCKING_STDERR"
+    fi
+
+  fi
+
+fi
+
+
+dnl ---------------------------------------------------------------------
+dnl Define some vars for the mapserver library itself for modules that
+dnl link with it.
+dnl ---------------------------------------------------------------------
+
+MS_DIR="`pwd`"
+MS_INC="-I$MS_DIR"
+MS_LIB="-L$MS_DIR -lmapserver"
+AC_ADD_RUNPATH("$MS_DIR")
+AC_SUBST(MS_INC, $MS_INC)
+AC_SUBST(MS_LIB, $MS_LIB)
+
+dnl ---------------------------------------------------------------------
+dnl Check IGNORE_MISSING_DATA option (OFF by default)
+dnl ---------------------------------------------------------------------
+
+AC_ARG_ENABLE(ignore-missing-data,
+[  --enable-ignore-missing-data
+                          Ignore missing data file errors at runtime
+  --disable-ignore-missing-data
+                          Report all missing data files (enabled by default).],,)
+if test "$enable_ignore_missing_data" = "yes" ; then
+
+  IGNORE_MISSING_DATA="-DIGNORE_MISSING_DATA"
+
+  AC_MSG_RESULT([Compiling with -DIGNORE_MISSING_DATA.])
+fi
+AC_SUBST(IGNORE_MISSING_DATA, $IGNORE_MISSING_DATA)
+
+dnl ---------------------------------------------------------------------
+dnl Check USE_POINT_Z_M option (OFF by default)
+dnl ---------------------------------------------------------------------
+
+AC_ARG_ENABLE(point-z-m,
+[  --enable-point-z-m      Use point Z and M parameters (disabled by default).
+  --disable-point-z-m     Disable support for point Z and M parameters.],,)
+if test "$enable_point_z_m" = "yes" ; then
+
+  USE_POINT_Z_M="-DUSE_POINT_Z_M"
+
+  AC_MSG_RESULT([Compiling with -DUSE_POINT_Z_M.])
+fi
+AC_SUBST(USE_POINT_Z_M, $USE_POINT_Z_M)
+ALL_ENABLED="$USE_POINT_Z_M $ALL_ENABLED"
+
+
+dnl ---------------------------------------------------------------------
+dnl Force use of slow (generic) MS_NINT macro.
+dnl ---------------------------------------------------------------------
+
+AC_ARG_ENABLE(point-z-m,
+[  --disable-fast-nint     Use safe MS_NINT with reliable rounding],,)
+
+if test "$enable_fast_nint" = "no" ; then
+
+  USE_NINT="-DUSE_GENERIC_MS_NINT"
+
+  AC_MSG_RESULT([Compiling with safe MS_NINT])
+else
+  USE_NINT=""
+
+  AC_MSG_RESULT([Compiling with fast MS_NINT])
+fi
+AC_SUBST(USE_NINT, $USE_NINT)
+ALL_ENABLED="$USE_NINT $ALL_ENABLED"
+
+dnl ---------------------------------------------------------------------
+dnl Check for warning flags. 
+dnl 
+dnl By default we use -Wall with gcc.  We provide an option for very 
+dnl strict gcc warnings if so desired. 
+dnl ---------------------------------------------------------------------
+
+AC_MSG_CHECKING(compiler warnings)
+
+AC_ARG_WITH(warnings,
+[  --with-warnings[[=flags]] Enable strict warnings (or user defined warnings)],,)
+
+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"
+  
+    AC_MSG_RESULT([strict])
+  else
+    WFLAGS=""
+    C_EXTRA_WFLAGS=""
+    AC_MSG_RESULT([disabled])
+  fi
+
+elif test "$with_warnings" = "" ; then 
+  if test "$GCC" = "yes" ; then
+    WFLAGS="-Wall"
+    C_EXTRA_WFLAGS=""
+    AC_MSG_RESULT([basic])
+  else
+    WFLAGS=""
+    C_EXTRA_WFLAGS=""
+    AC_MSG_RESULT([disabled])
+  fi
+
+elif test "$with_warnings" = "no" ; then
+  WFLAGS=""
+  C_EXTRA_WFLAGS=""
+  AC_MSG_RESULT([disabled])
+
+else
+  WFLAGS="$with_warnings"
+  C_EXTRA_WFLAGS=""
+  AC_MSG_RESULT([user defined])
+fi
+
+CFLAGS="$CFLAGS $WFLAGS $C_EXTRA_WFLAGS"
+CXXFLAGS="$CXXFLAGS $WFLAGS "
+
+dnl ---------------------------------------------------------------------
+dnl Check --enable-debug option for "-g" compile flag. (OFF by default)
+dnl ---------------------------------------------------------------------
+
+AC_CHECKING(whether we should enable debug features)
+AC_ARG_ENABLE(debug,
+[  --enable-debug          Include "-g" in CFLAGS for debugging.
+  --disable-debug         Do not include "-g" in CFLAGS (the default).],,)
+
+if test "$enable_debug" = "yes" ; then
+  dnl remove optimization flags
+  CXXFLAGS=`echo "$CXXFLAGS " | sed 's/-O[[123]] / /'`
+  CFLAGS=`echo "$CFLAGS " | sed 's/-O[[123]] / /'`
+
+  REPORT_ENABLE_DEBUG="-g "
+  AC_MSG_RESULT([        Enabling debug features: -g in CFLAGS.])
+
+else
+  CXXFLAGS=`echo "$CXXFLAGS -DNDEBUG " | sed "s/-g //"`
+  CFLAGS=`echo "$CFLAGS -DNDEBUG " | sed "s/-g //"`
+fi
+
+dnl ---------------------------------------------------------------------
+dnl Check --enable-cgi-cl-debug-args option (OFF by default)
+dnl ---------------------------------------------------------------------
+
+AC_CHECKING(whether we should enable mapserv CGI command-line debug arguments)
+AC_ARG_ENABLE(cgi-cl-debug-args,
+[  --enable-cgi-cl-debug-args 
+                          Enable mapserv CGI command-line debug arguments
+                          (disabled by default). These command-line args may
+                          be insecure and should be enabled only on 
+                          development servers and only if you understand the 
+                          security implications.],,)
+
+if test "$enable_cgi_cl_debug_args" = "yes" ; then
+  DEBUG_FLAGS="$DEBUG_FLAGS -DMS_ENABLE_CGI_CL_DEBUG_ARGS"
+  AC_MSG_RESULT([        Enabling (potentially insecure) mapserv CGI command-line debug arguments: -DMS_ENABLE_CGI_CL_DEBUG_ARGS.])
+fi
+
+AC_SUBST(DEBUG_FLAGS, $DEBUG_FLAGS)
+ALL_ENABLED="$DEBUG_FLAGS $ALL_ENABLED"
+
+
+dnl ---------------------------------------------------------------------
+dnl Enable source code coverage reporting for GCC
+dnl ---------------------------------------------------------------------
+
+AC_ARG_ENABLE(gcov,
+[  --enable-gcov           Enable source code coverage testing using gcov],
+[CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
+ PHP_LD_XTRAFLAGS="$PHP_LD_XTRAFLAGS -fprofile-arcs -ftest-coverage"])
+
+
+dnl ---------------------------------------------------------------------
+dnl PHP/MapScript module options
+dnl ---------------------------------------------------------------------
+
+AC_CHECKING(for PHP/MapScript module options)
+AC_ARG_WITH(php,
+[  --with-php=DIR          Specify directory where PHP5's include files are
+                          installed (or a pointer to the full source tree)
+                          Required in order to compile the PHP/MapScript 
+                          module.],,)
+
+AC_ARG_ENABLE(internal-ld-detect,
+[  --enable-perlv-ld-detect
+                          (applies to --with-php only) 
+                          Use perl -V output to figure the command to use to 
+                          link php_mapscript.so.  Try this only if the default
+                          internal macro didn't work.],,)
+
+if test -n "$with_php" -a -d "$with_php" ; then
+  AC_EXPAND_PATH($with_php, PHP_SRC_DIR)
+  dnl
+  dnl Checks for shared library linking.
+  dnl
+  dnl Default to internal AC_LD_SHARED macro, or use the the perl-based 
+  dnl if requested and perl is available... 
+  dnl (The perl-V macro was the default in 3.6 and before but this was
+  dnl  changed in 3.7 to use the internal AC_LD_SHARED macro by default)
+  dnl
+
+  if test "$enable_perlv_ld_detect" = "yes" ; then
+      AC_MSG_RESULT(Using perl -V macro to figure ld command to link php_mapscript.so)
+
+      AC_MSG_CHECKING([whether 'perl -V' works])
+      if  (perl -V > /dev/null 2>&1)  ; then
+        AC_MSG_RESULT(yes)
+        AC_LD_SHARED_FROM_PERL
+        PHP_CC="$PERL_CC"
+        PHP_LD="$PERL_LD $PHP_LD_XTRAFLAGS"
+      else
+        AC_MSG_RESULT(no)
+        AC_MSG_ERROR([ERROR: Cannot use --enable-perlv-ld-detect since Perl -V does not work on this system.])
+      fi
+  else
+    dnl The default: use the internal AC_LD_SHARED macro
+    dnl
+    AC_COMPILER_PIC
+    dnl AC_LD_SHARED
+    AC_PHP_LD_SHARED
+    PHP_CC="$CC $C_PIC"
+    PHP_LD="$PHP_LD_SHARED $PHP_LD_XTRAFLAGS"
+  fi
+
+  dnl
+  dnl Look for PHP5's php_config.h.
+  dnl We'll need the config file to find info about the PHP configuration
+  dnl
+  AC_MSG_CHECKING([for location of php_config.h])
+  dnl Look for the main/php_config.h
+  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"
+
+  dnl If php was installed, then the headers are under $prefix/include/php/*
+  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"
+  dnl In PHP 5, few distributions use "/usr/include/php5" directory
+  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
+    AC_MSG_RESULT([$PHP_CONFIG_H])
+  else
+    AC_MSG_ERROR([
+!!! Could not find php_config.h and php_version.h in $PHP_SRC_DIR.          !!!
+!!! Has PHP been configured yet?                                      !!!])
+  fi
+
+
+  dnl Check which PHP version we're using.
+  dnl Default is PHP3, and if ZEND_API is set then we assume that we have PHP4.
+  dnl
+  AC_MSG_CHECKING([if we have PHP 5.2.0+])
+  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
+    AC_MSG_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.    !!!])
+  else
+     AC_MSG_RESULT([yes])
+  fi
+  AC_MSG_RESULT([$PHP_VERSION_FLAG])
+
+  dnl
+  dnl Check if PHP was compiled with the bundled regex, and if so then
+  dnl use the same version to compile MapServer.
+  dnl
+  AC_MSG_CHECKING([whether we should use PHP's regex])
+  if test -n "`grep 'define REGEX 1' $PHP_CONFIG_H`"  ; then
+    AC_MSG_RESULT(yes)
+
+    dnl We'll check for regex_extra.h - that might let use build
+    dnl without the source using libphp_common.so
+    test -f "$PHP_SRC_DIR/regex/regex_extra.h" && PHP_NO_SOURCE="1"
+        if test -n "$PHP_NO_SOURCE" ; then
+          dnl Found regex_extra.h
+          USE_PHP_REGEX="-DUSE_PHP_REGEX"
+          PHP_REGEX_INC="-I$PHP_SRC_DIR"
+          PHP_REGEX_OBJ=php_regex.o
+          AC_MSG_RESULT([        found regex_extra.h - building PHP MapScript with PHP's bundled regex ])
+        else
+          dnl PHP 5.3 changed the layout of regex-related files.
+          test -f "$PHP_SRC_DIR/ext/ereg/regex/regex.h" && PHP_NO_SOURCE="1"
+          if test -n "$PHP_NO_SOURCE" ; then
+          dnl Found regex.h
+          USE_PHP_REGEX="-DUSE_PHP_REGEX"
+          PHP_REGEX_INC="-I$PHP_SRC_DIR/ext/ereg/"
+          PHP_REGEX_OBJ=php_regex.o
+          AC_MSG_RESULT([        found regex.h - building PHP MapScript with PHP's bundled regex ])
+          else
+            AC_MSG_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.                                  !!!])
+          fi
+	fi
+
+  else
+    AC_MSG_RESULT(no)
+  fi
+
+  PHPMS_MAKEFILE=mapscript/php/Makefile
+  MAKE_PHPMS=php_mapscript
+  MAKE_PHPMS_CLEAN=php_mapscript_clean
+
+  AC_SUBST(PHP_VERSION_FLAG, $PHP_VERSION_FLAG)
+  AC_SUBST(PHP_SRC_DIR, $PHP_SRC_DIR)
+  AC_SUBST(PHP_CC, $PHP_CC)
+  AC_SUBST(PHP_LD, $PHP_LD)
+  AC_SUBST(PHP_REGEX_INC, $PHP_REGEX_INC)
+  AC_SUBST(PHP_REGEX_OBJ, $PHP_REGEX_OBJ)
+  AC_SUBST(USE_PHP_REGEX, $USE_PHP_REGEX)
+
+  AC_MSG_RESULT([        PHP/MapScript module configured.])
+elif test -n "$with_php" -a "$with_php" != "no" ; then
+  AC_MSG_ERROR([Missing or invalid PHP source directory in --with-php=DIR.])
+else
+  AC_MSG_RESULT([        PHP/MapScript module not configured.])
+fi
+
+AC_SUBST(MAKE_PHPMS, $MAKE_PHPMS)
+AC_SUBST(MAKE_PHPMS_CLEAN, $MAKE_PHPMS_CLEAN)
+
+dnl ---------------------------------------------------------------------
+dnl Shared library building.
+dnl
+dnl If we didn't select an LD_SHARED for PHP then we should do so here.
+dnl ---------------------------------------------------------------------
+
+if test "x$LD_SHARED" = "x" ; then
+  AC_COMPILER_PIC
+  AC_LD_SHARED
+fi
+
+dnl ---------------------------------------------------------------------
+dnl 'apxs' option for PHP built as an Apache module (libphp3.so)
+dnl --with-apxs[=FILE] should be the exact same value that was passed
+dnl   to the PHP configure command.
+dnl
+dnl All we need is to add the Apache include files to the php module
+dnl include path.
+dnl
+dnl The APXS variable also affects the way AC_ADD_RUNPATH() works
+dnl ---------------------------------------------------------------------
+
+AC_ARG_WITH(apxs,
+[  --with-apxs[[=FILE]]      (CURRENTLY DISABLED) 
+                          Use this option only if building the PHP MapScript
+                          on a system where PHP was built as a shared Apache
+                          module.  FILE is the optional pathname to the
+                          Apache apxs tool; defaults to apxs.],,)
+
+if test -n "$with_apxs" -a "$with_apxs" != "no" ; then
+
+  AC_MSG_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 !!!])
+
+
+  AC_MSG_CHECKING([for location of Apache headers using apxs])
+  if test -z "$MAKE_PHPMS" ; then
+    AC_MSG_ERROR([--with-apxs applies only if --with-php is used.])
+
+  elif test "$with_apxs" = "yes" ; then
+    APXS=apxs
+  else
+    APXS="$with_apxs"
+  fi
+
+  APACHE_INC=-I`$APXS -q INCLUDEDIR`
+  AC_MSG_RESULT($APACHE_INC)
+
+  dnl APACHE_INC substitution is done after --with-apache switch processing
+  dnl below.
+fi
+
+
+dnl ---------------------------------------------------------------------
+dnl '--with-apache' option for PHP built as an Apache module and statically
+dnl linked into the httpd executable.  This option is used to specify the
+dnl location of the apache include files.
+dnl ---------------------------------------------------------------------
+
+AC_ARG_WITH(apache,
+[  --with-apache=DIR       (CURRENTLY DISABLED) 
+                          Use this option only if building the PHP MapScript
+                          on a system where PHP was built as an Apache
+                          module statically linked into the httpd executable.
+                          DIR is the path to the apache include files.],,)
+
+if test -n "$with_apache" -a "$with_apache" != "no" ; then
+
+  AC_MSG_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 !!!])
+
+  AC_MSG_CHECKING([for location of Apache headers])
+  if test -z "$MAKE_PHPMS" ; then
+    AC_MSG_ERROR([--with-apache applies only if --with-php is used.])
+  fi
+
+  AC_EXPAND_PATH($with_apache, APACHE_DIR)
+  test -f $APACHE_DIR/httpd.h && APACHE_INC_DIR="$APACHE_DIR"
+  test -f $APACHE_DIR/include/httpd.h && APACHE_INC_DIR="$APACHE_DIR/include"
+  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"
+    AC_MSG_RESULT("-I$APACHE_INC_DIR")
+  else
+    AC_MSG_ERROR("Could not find httpd.h in $APACHE_DIR.")
+  fi
+fi
+
+AC_SUBST(APACHE_INC, $APACHE_INC)
+
+
+dnl ---------------------------------------------------------------------
+dnl Check --enable-runpath to request including -Wl,-R for runtime
+dnl lib path in link command (disabled by default)
+dnl ---------------------------------------------------------------------
+
+AC_MSG_CHECKING([if --enable-runpath requested])
+AC_ARG_ENABLE(runpath,
+[  --enable-runpath        Include runtime library path flags (-Wl,-R) in link.
+                          Required on *BSD systems.
+  --disable-runpath       Do not link with runtime lib path (the default).],,)
+
+if test "$enable_runpath" != "yes" ; then
+  RPATHS=""
+  AC_MSG_RESULT([no])
+else
+  AC_MSG_RESULT([yes ($RPATHS)])
+fi
+
+dnl ---------------------------------------------------------------------
+dnl Check operating system (used by Java Mapscript and possibily
+dnl other mapscripts)
+dnl ---------------------------------------------------------------------
+
+AC_MSG_CHECKING([if --with-java-include-os-name specified])
+AC_ARG_WITH(java-include-os-name,
+[  --with-java-include-os-name=dirname
+                          (AUTODETECTED)
+                          Use this option only if building of Java Mapscript
+                          fails because os-dependent headers are not found.
+                          dirname is the name of subdirectory of the Java 
+                          installation where os-dependent include files are 
+                          found (for instance linux or solaris).
+                          Only used by Java mapscript.],,)
+if test -n "${with_java_include_os_name}" ; then
+OS_INCLUDE_DIR="${with_java_include_os_name}"
+AC_MSG_RESULT([yes ($OS_INCLUDE_DIR)])
+else
+dnl might break on Windows???
+OUR_OSNAME=`uname -s`
+case "${OUR_OSNAME}" in
+[[Ll]inux]) OS_INCLUDE_DIR="linux" ;;
+[[sS]olaris*]) OS_INCLUDE_DIR="solaris" ;;
+[[sS]unOS*]) OS_INCLUDE_DIR="solaris" ;;
+[[Ww]in*]) OS_INCLUDE_DIR="win32" ;;
+*) OS_INCLUDE_DIR="linux" ;;
+esac
+AC_MSG_RESULT([no, autodetected $OS_INCLUDE_DIR])
+fi
+
+AC_SUBST(OS_INCLUDE_DIR, $OS_INCLUDE_DIR)
+
+dnl ---------------------------------------------------------------------
+dnl Generate output files
+dnl ---------------------------------------------------------------------
+
+AC_SUBST(ALL_ENABLED, $ALL_ENABLED)
+AC_SUBST(ALL_INC, $ALL_INC)
+AC_SUBST(ALL_LIB, $ALL_LIB)
+AC_SUBST(ALL_STATIC_LIB, $ALL_STATIC_LIB)
+AC_SUBST(RPATHS, [$RPATHS])
+
+AC_OUTPUT(Makefile $PHPMS_MAKEFILE mapscript/java/Makefile mapscript/csharp/Makefile)
+
+dnl ---------------------------------------------------------------------------
+dnl Display configuration status
+dnl ---------------------------------------------------------------------------
+
+
+AC_MSG_RESULT()
+AC_MSG_RESULT([MapServer is now configured for ${host}])
+AC_MSG_RESULT()
+AC_MSG_RESULT([ -------------- Compiler Info ------------- ])
+AC_MSG_RESULT([  C compiler:                ${CC} ${CFLAGS}])
+AC_MSG_RESULT([  C++ compiler:              ${CXX} ${CXXFLAGS}])
+AC_MSG_RESULT([  Debug:                     ${REPORT_ENABLE_DEBUG}${DEBUG_FLAGS}])
+AC_MSG_RESULT([  Generic NINT:              ${USE_NINT}])
+AC_MSG_RESULT()
+AC_MSG_RESULT([ -------------- Renderer Settings --------- ])
+AC_MSG_RESULT([  OpenGL support:            ${OGL_ENABLED}])
+AC_MSG_RESULT([  zlib support:              ${ZLIB_ENABLED}])
+AC_MSG_RESULT([  png support:               ${PNG_ENABLED}])
+AC_MSG_RESULT([  gif support:               ${GIF_ENABLED}])
+AC_MSG_RESULT([  jpeg support:              ${JPEG_ENABLED}])
+AC_MSG_RESULT([  freetype support:          ${FT_ENABLED}])
+AC_MSG_RESULT([  iconv support:             ${ICONV_ENABLED}])
+AC_MSG_RESULT([  AGG support:               ${AGG_ENABLED}])
+AC_MSG_RESULT([  SVG Symbol support:        ${AGG_SVG_SYMBOLS_ENABLED}])
+AC_MSG_RESULT([  Cairo (SVG,PDF) support:   ${CAIRO_ENABLED}])
+AC_MSG_RESULT([  KML support:               ${KML_ENABLED}])
+AC_MSG_RESULT()
+
+AC_MSG_RESULT([ -------------- Support Libraries --------- ])
+AC_MSG_RESULT([  Proj.4 support:            ${PROJ_ENABLED}])
+AC_MSG_RESULT([  Libxml2 support:           ${XML2_ENABLED}])
+AC_MSG_RESULT([  FriBidi support:           ${FRIBIDI_ENABLED}])
+AC_MSG_RESULT([  Curl support:              ${CURL_ENABLED}])
+AC_MSG_RESULT([  FastCGI support:           ${FASTCGI_ENABLED}])
+AC_MSG_RESULT([  Threading support:         ${THREAD_FLAG}])
+AC_MSG_RESULT([  GEOS support:              ${GEOS_ENABLED}])
+AC_MSG_RESULT([  XML Mapfile support:        ${XMLMAPFILE_ENABLED}])
+AC_MSG_RESULT([  XSLT support:              ${XSLT_ENABLED}])
+AC_MSG_RESULT([  EXSLT support:              ${EXSLT_ENABLED}])
+AC_MSG_RESULT()
+
+AC_MSG_RESULT([ -------------- Data Format Drivers ------- ])
+AC_MSG_RESULT([  PostGIS support:           ${POSTGIS_ENABLED}])
+AC_MSG_RESULT([  ArcSDE support:            ${SDE_ENABLED}])
+AC_MSG_RESULT([  OGR support:               ${OGR_ENABLED}])
+AC_MSG_RESULT([  GDAL support:              ${GDAL_ENABLED}])
+AC_MSG_RESULT([  Oracle Spatial support:    ${ORACLESPATIAL_ENABLED}])
+AC_MSG_RESULT()
+
+AC_MSG_RESULT([ -------------- OGC Services -------------- ])
+AC_MSG_RESULT([  WMS Server:                ${WMS_SVR_ENABLED}])
+AC_MSG_RESULT([  WMS Client:                ${WMS_LYR_ENABLED}])
+AC_MSG_RESULT([  WFS Server:                ${WFS_SVR_ENABLED}])
+AC_MSG_RESULT([  WFS Client:                ${WFS_LYR_ENABLED}])
+AC_MSG_RESULT([  WCS Server:                ${WCS_SVR_ENABLED}])
+AC_MSG_RESULT([  SOS Server:                ${SOS_SVR_ENABLED}])
+AC_MSG_RESULT()
+
+AC_MSG_RESULT([ -------------- MapScript ----------------- ])
+if test -n "${PHP_SRC_DIR}"; then
+  AC_MSG_RESULT([  PHP MapScript:             yes])
+else
+  AC_MSG_RESULT([  PHP MapScript:             no])
+fi
+
+AC_MSG_RESULT()

