[SCM] mediatomb/master: Refresh all patches.

ceros-guest at users.alioth.debian.org ceros-guest at users.alioth.debian.org
Sun Sep 12 05:04:31 UTC 2010


The following commit has been merged in the master branch:
commit 6005db3f9161d2e58f001413735be3a9917fed31
Author: Andres Mejia <mcitadel at gmail.com>
Date:   Sat Sep 11 23:23:37 2010 -0400

    Refresh all patches.

diff --git a/debian/patches/autoreconf_-fi.patch b/debian/patches/autoreconf_-fi.patch
index 9a1e73f..7161293 100644
--- a/debian/patches/autoreconf_-fi.patch
+++ b/debian/patches/autoreconf_-fi.patch
@@ -1,10 +1,8 @@
 Patch that applies changes after `autoreconf -fi` is done.
 ==========================================================================
-diff --git a/Makefile.in b/Makefile.in
-index 2d88d17..726b6df 100644
 --- a/Makefile.in
 +++ b/Makefile.in
-@@ -251,6 +251,7 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+@@ -251,6 +251,7 @@
  PACKAGE_NAME = @PACKAGE_NAME@
  PACKAGE_STRING = @PACKAGE_STRING@
  PACKAGE_TARNAME = @PACKAGE_TARNAME@
@@ -12,8 +10,6 @@ index 2d88d17..726b6df 100644
  PACKAGE_VERSION = @PACKAGE_VERSION@
  PATH_SEPARATOR = @PATH_SEPARATOR@
  POW_LIB = @POW_LIB@
-diff --git a/aclocal.m4 b/aclocal.m4
-index 6bd5e3c..4721d28 100644
 --- a/aclocal.m4
 +++ b/aclocal.m4
 @@ -13,8 +13,8 @@
@@ -27,11 +23,9 @@ index 6bd5e3c..4721d28 100644
  You have another version of autoconf.  It may work, but is not guaranteed to.
  If you have problems, you may need to regenerate the build system entirely.
  To do so, use the procedure documented by the package, typically `autoreconf'.])])
-diff --git a/artwork/Makefile.in b/artwork/Makefile.in
-index f85a7c4..2854064 100644
 --- a/artwork/Makefile.in
 +++ b/artwork/Makefile.in
-@@ -192,6 +192,7 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+@@ -192,6 +192,7 @@
  PACKAGE_NAME = @PACKAGE_NAME@
  PACKAGE_STRING = @PACKAGE_STRING@
  PACKAGE_TARNAME = @PACKAGE_TARNAME@
@@ -39,8 +33,6 @@ index f85a7c4..2854064 100644
  PACKAGE_VERSION = @PACKAGE_VERSION@
  PATH_SEPARATOR = @PATH_SEPARATOR@
  POW_LIB = @POW_LIB@
-diff --git a/autoconfig.h.in b/autoconfig.h.in
-index 60154dd..b3171fb 100644
 --- a/autoconfig.h.in
 +++ b/autoconfig.h.in
 @@ -535,6 +535,9 @@
@@ -53,11 +45,9 @@ index 60154dd..b3171fb 100644
  /* Define to the version of this package. */
  #undef PACKAGE_VERSION
  
-diff --git a/build/Makefile.in b/build/Makefile.in
-index b3d9ac4..0131395 100644
 --- a/build/Makefile.in
 +++ b/build/Makefile.in
-@@ -373,6 +373,7 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+@@ -373,6 +373,7 @@
  PACKAGE_NAME = @PACKAGE_NAME@
  PACKAGE_STRING = @PACKAGE_STRING@
  PACKAGE_TARNAME = @PACKAGE_TARNAME@
@@ -65,11 +55,9 @@ index b3d9ac4..0131395 100644
  PACKAGE_VERSION = @PACKAGE_VERSION@
  PATH_SEPARATOR = @PATH_SEPARATOR@
  POW_LIB = @POW_LIB@
-diff --git a/config/Makefile.in b/config/Makefile.in
-index d223218..8c107b9 100644
 --- a/config/Makefile.in
 +++ b/config/Makefile.in
-@@ -217,6 +217,7 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+@@ -217,6 +217,7 @@
  PACKAGE_NAME = @PACKAGE_NAME@
  PACKAGE_STRING = @PACKAGE_STRING@
  PACKAGE_TARNAME = @PACKAGE_TARNAME@
@@ -77,8 +65,6 @@ index d223218..8c107b9 100644
  PACKAGE_VERSION = @PACKAGE_VERSION@
  PATH_SEPARATOR = @PATH_SEPARATOR@
  POW_LIB = @POW_LIB@
-diff --git a/configure b/configure
-index f51d803..459bf70 100755
 --- a/configure
 +++ b/configure
 @@ -1,20 +1,24 @@
@@ -112,7 +98,7 @@ index f51d803..459bf70 100755
    emulate sh
    NULLCMD=:
    # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
-@@ -22,23 +26,15 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+@@ -22,23 +26,15 @@
    alias -g '${1+"$@"}'='"$@"'
    setopt NO_GLOB_SUBST
  else
@@ -141,7 +127,7 @@ index f51d803..459bf70 100755
  as_nl='
  '
  export as_nl
-@@ -46,7 +42,13 @@ export as_nl
+@@ -46,7 +42,13 @@
  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
@@ -156,7 +142,7 @@ index f51d803..459bf70 100755
    as_echo='printf %s\n'
    as_echo_n='printf %s'
  else
-@@ -57,7 +59,7 @@ else
+@@ -57,7 +59,7 @@
      as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
      as_echo_n_body='eval
        arg=$1;
@@ -165,7 +151,7 @@ index f51d803..459bf70 100755
        *"$as_nl"*)
  	expr "X$arg" : "X\\(.*\\)$as_nl";
  	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
-@@ -80,13 +82,6 @@ if test "${PATH_SEPARATOR+set}" != set; then
+@@ -80,13 +82,6 @@
    }
  fi
  
@@ -179,7 +165,7 @@ index f51d803..459bf70 100755
  
  # IFS
  # We need space, tab and new line, in precisely that order.  Quoting is
-@@ -96,15 +91,15 @@ fi
+@@ -96,15 +91,15 @@
  IFS=" ""	$as_nl"
  
  # Find who we are.  Look in the path if we contain no directory separator.
@@ -198,7 +184,7 @@ index f51d803..459bf70 100755
  IFS=$as_save_IFS
  
       ;;
-@@ -116,12 +111,16 @@ if test "x$as_myself" = x; then
+@@ -116,12 +111,16 @@
  fi
  if test ! -f "$as_myself"; then
    $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
@@ -219,7 +205,7 @@ index f51d803..459bf70 100755
  done
  PS1='$ '
  PS2='> '
-@@ -133,330 +132,300 @@ export LC_ALL
+@@ -133,330 +132,300 @@
  LANGUAGE=C
  export LANGUAGE
  
@@ -554,7 +540,7 @@ index f51d803..459bf70 100755
 +# Unset more variables known to interfere with behavior of common tools.
 +CLICOLOR_FORCE= GREP_OPTIONS=
 +unset CLICOLOR_FORCE GREP_OPTIONS
- 
++
 +## --------------------- ##
 +## M4sh Shell Functions. ##
 +## --------------------- ##
@@ -566,7 +552,7 @@ index f51d803..459bf70 100755
 +  { eval $1=; unset $1;}
 +}
 +as_unset=as_fn_unset
- 
++
 +# as_fn_set_status STATUS
 +# -----------------------
 +# Set $? to STATUS, without forking.
@@ -574,22 +560,7 @@ index f51d803..459bf70 100755
 +{
 +  return $1
 +} # as_fn_set_status
- 
--(eval "as_func_return () {
--  (exit \$1)
--}
--as_func_success () {
--  as_func_return 0
--}
--as_func_failure () {
--  as_func_return 1
--}
--as_func_ret_success () {
--  return 0
--}
--as_func_ret_failure () {
--  return 1
--}
++
 +# as_fn_exit STATUS
 +# -----------------
 +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
@@ -606,9 +577,6 @@ index f51d803..459bf70 100755
 +as_fn_mkdir_p ()
 +{
  
--exitcode=0
--if as_func_success; then
--  :
 +  case $as_dir in #(
 +  -*) as_dir=./$as_dir;;
 +  esac
@@ -647,8 +615,23 @@ index f51d803..459bf70 100755
 +    done
 +    test -z "$as_dirs" || eval "mkdir $as_dirs"
 +  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
-+
-+
+ 
+ 
+-(eval "as_func_return () {
+-  (exit \$1)
+-}
+-as_func_success () {
+-  as_func_return 0
+-}
+-as_func_failure () {
+-  as_func_return 1
+-}
+-as_func_ret_success () {
+-  return 0
+-}
+-as_func_ret_failure () {
+-  return 1
+-}
 +} # as_fn_mkdir_p
 +# as_fn_append VAR VALUE
 +# ----------------------
@@ -661,16 +644,16 @@ index f51d803..459bf70 100755
 +  {
 +    eval $1+=\$2
 +  }'
- else
--  exitcode=1
--  echo as_func_success failed.
--fi
++else
 +  as_fn_append ()
 +  {
 +    eval $1=\$$1\$2
 +  }
 +fi # as_fn_append
-+
+ 
+-exitcode=0
+-if as_func_success; then
+-  :
 +# as_fn_arith ARG...
 +# ------------------
 +# Perform arithmetic evaluation on the ARGs, and store the result in the
@@ -681,7 +664,10 @@ index f51d803..459bf70 100755
 +  {
 +    as_val=$(( $* ))
 +  }'
-+else
+ else
+-  exitcode=1
+-  echo as_func_success failed.
+-fi
 +  as_fn_arith ()
 +  {
 +    as_val=`expr "$@" || test $? -eq 1`
@@ -746,7 +732,6 @@ index f51d803..459bf70 100755
 -  echo This can help us improve future autoconf versions.
 -  echo Configuration will now proceed without shell functions.
 -}
--
 +as_me=`$as_basename -- "$0" ||
 +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
 +	 X"$0" : 'X\(//\)$' \| \
@@ -773,11 +758,12 @@ index f51d803..459bf70 100755
 +as_cr_digits='0123456789'
 +as_cr_alnum=$as_cr_Letters$as_cr_digits
  
+ 
 -  as_lineno_1=$LINENO
 -  as_lineno_2=$LINENO
 -  test "x$as_lineno_1" != "x$as_lineno_2" &&
 -  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
- 
+-
 -  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
 -  # uniformly replaced by the line number.  The first 'sed' inserts a
 -  # line-number line after each line using $LINENO; the second 'sed'
@@ -796,7 +782,7 @@ index f51d803..459bf70 100755
    sed -n '
      p
      /[$]LINENO/=
-@@ -473,8 +442,7 @@ test \$exitcode = 0") || {
+@@ -473,8 +442,7 @@
        s/-\n.*//
      ' >$as_me.lineno &&
    chmod +x "$as_me.lineno" ||
@@ -806,7 +792,7 @@ index f51d803..459bf70 100755
  
    # 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
-@@ -484,29 +452,18 @@ test \$exitcode = 0") || {
+@@ -484,29 +452,18 @@
    exit
  }
  
@@ -841,7 +827,7 @@ index f51d803..459bf70 100755
  
  rm -f conf$$ conf$$.exe conf$$.file
  if test -d conf$$.dir; then
-@@ -536,7 +493,7 @@ rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+@@ -536,7 +493,7 @@
  rmdir conf$$.dir 2>/dev/null
  
  if mkdir -p . 2>/dev/null; then
@@ -850,7 +836,7 @@ index f51d803..459bf70 100755
  else
    test -d ./-p && rmdir ./-p
    as_mkdir_p=false
-@@ -555,10 +512,10 @@ else
+@@ -555,10 +512,10 @@
        if test -d "$1"; then
  	test -d "$1/.";
        else
@@ -863,7 +849,7 @@ index f51d803..459bf70 100755
  	???[sx]*):;;*)false;;esac;fi
      '\'' sh
    '
-@@ -572,11 +529,11 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+@@ -572,11 +529,11 @@
  as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
  
  
@@ -878,7 +864,7 @@ index f51d803..459bf70 100755
  # so uname gets run too.
  ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
  
-@@ -591,7 +548,6 @@ cross_compiling=no
+@@ -591,7 +548,6 @@
  subdirs=
  MFLAGS=
  MAKEFLAGS=
@@ -886,7 +872,7 @@ index f51d803..459bf70 100755
  
  # Identity of this package.
  PACKAGE_NAME='MediaTomb'
-@@ -599,6 +555,7 @@ PACKAGE_TARNAME='mediatomb'
+@@ -599,6 +555,7 @@
  PACKAGE_VERSION='0.12.1'
  PACKAGE_STRING='MediaTomb 0.12.1'
  PACKAGE_BUGREPORT='jin at mediatomb.cc'
@@ -894,7 +880,7 @@ index f51d803..459bf70 100755
  
  ac_unique_file="src/common.h"
  # Factoring default headers for most tests.
-@@ -877,6 +834,7 @@ bindir
+@@ -877,6 +834,7 @@
  program_transform_name
  prefix
  exec_prefix
@@ -902,7 +888,7 @@ index f51d803..459bf70 100755
  PACKAGE_BUGREPORT
  PACKAGE_STRING
  PACKAGE_VERSION
-@@ -1034,8 +992,9 @@ do
+@@ -1034,8 +992,9 @@
    fi
  
    case $ac_option in
@@ -914,7 +900,7 @@ index f51d803..459bf70 100755
    esac
  
    # Accept the important Cygnus configure options, so we can diagnose typos.
-@@ -1080,8 +1039,7 @@ do
+@@ -1080,8 +1039,7 @@
      ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
      # Reject names that are not valid shell variable names.
      expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
@@ -924,7 +910,7 @@ index f51d803..459bf70 100755
      ac_useropt_orig=$ac_useropt
      ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
      case $ac_user_opts in
-@@ -1107,8 +1065,7 @@ do
+@@ -1107,8 +1065,7 @@
      ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
      # Reject names that are not valid shell variable names.
      expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
@@ -934,7 +920,7 @@ index f51d803..459bf70 100755
      ac_useropt_orig=$ac_useropt
      ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
      case $ac_user_opts in
-@@ -1312,8 +1269,7 @@ do
+@@ -1312,8 +1269,7 @@
      ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
      # Reject names that are not valid shell variable names.
      expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
@@ -944,7 +930,7 @@ index f51d803..459bf70 100755
      ac_useropt_orig=$ac_useropt
      ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
      case $ac_user_opts in
-@@ -1329,8 +1285,7 @@ do
+@@ -1329,8 +1285,7 @@
      ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
      # Reject names that are not valid shell variable names.
      expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
@@ -954,7 +940,7 @@ index f51d803..459bf70 100755
      ac_useropt_orig=$ac_useropt
      ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
      case $ac_user_opts in
-@@ -1360,17 +1315,17 @@ do
+@@ -1360,17 +1315,17 @@
    | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
      x_libraries=$ac_optarg ;;
  
@@ -978,7 +964,7 @@ index f51d803..459bf70 100755
      eval $ac_envvar=\$ac_optarg
      export $ac_envvar ;;
  
-@@ -1387,15 +1342,13 @@ done
+@@ -1387,15 +1342,13 @@
  
  if test -n "$ac_prev"; then
    ac_option=--`echo $ac_prev | sed 's/_/-/g'`
@@ -996,7 +982,7 @@ index f51d803..459bf70 100755
      *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
    esac
  fi
-@@ -1418,8 +1371,7 @@ do
+@@ -1418,8 +1371,7 @@
      [\\/$]* | ?:[\\/]* )  continue;;
      NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
    esac
@@ -1006,7 +992,7 @@ index f51d803..459bf70 100755
  done
  
  # There might be people who depend on the old broken behavior: `$host'
-@@ -1433,8 +1385,8 @@ target=$target_alias
+@@ -1433,8 +1385,8 @@
  if test "x$host_alias" != x; then
    if test "x$build_alias" = x; then
      cross_compiling=maybe
@@ -1017,7 +1003,7 @@ index f51d803..459bf70 100755
    elif test "x$build_alias" != "x$host_alias"; then
      cross_compiling=yes
    fi
-@@ -1449,11 +1401,9 @@ test "$silent" = yes && exec 6>/dev/null
+@@ -1449,11 +1401,9 @@
  ac_pwd=`pwd` && test -n "$ac_pwd" &&
  ac_ls_di=`ls -di .` &&
  ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
@@ -1031,7 +1017,7 @@ index f51d803..459bf70 100755
  
  
  # Find the source files, if location was not specified.
-@@ -1492,13 +1442,11 @@ else
+@@ -1492,13 +1442,11 @@
  fi
  if test ! -r "$srcdir/$ac_unique_file"; then
    test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
@@ -1047,7 +1033,7 @@ index f51d803..459bf70 100755
  	pwd)`
  # When building in place, set srcdir=.
  if test "$ac_abs_confdir" = "$ac_pwd"; then
-@@ -1538,7 +1486,7 @@ Configuration:
+@@ -1538,7 +1486,7 @@
        --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
@@ -1056,7 +1042,7 @@ index f51d803..459bf70 100755
        --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
-@@ -1739,7 +1687,7 @@ Some influential environment variables:
+@@ -1739,7 +1687,7 @@
    LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
                nonstandard directory <lib dir>
    LIBS        libraries to pass to the linker, e.g. -l<library>
@@ -1065,7 +1051,7 @@ index f51d803..459bf70 100755
                you have headers in a nonstandard directory <include dir>
    CC          C compiler command
    CFLAGS      C compiler flags
-@@ -1813,21 +1761,1102 @@ test -n "$ac_init_help" && exit $ac_status
+@@ -1813,16504 +1761,4541 @@
  if $ac_init_version; then
    cat <<\_ACEOF
  MediaTomb configure 0.12.1
@@ -1080,7 +1066,12 @@ index f51d803..459bf70 100755
  _ACEOF
    exit
  fi
-+
+-cat >config.log <<_ACEOF
+-This file contains any messages produced by compilers while
+-running configure, to aid debugging if configure makes a mistake.
+ 
+-It was created by MediaTomb $as_me 0.12.1, which was
+-generated by GNU Autoconf 2.63.  Invocation command line was
 +## ------------------------ ##
 +## Autoconf initialization. ##
 +## ------------------------ ##
@@ -1115,19 +1106,26 @@ index f51d803..459bf70 100755
 +else
 +  $as_echo "$as_me: failed program was:" >&5
 +sed 's/^/| /' conftest.$ac_ext >&5
-+
+ 
+-  $ $0 $@
 +	ac_retval=1
 +fi
 +  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
 +  as_fn_set_status $ac_retval
-+
+ 
+-_ACEOF
+-exec 5>>config.log
 +} # ac_fn_cxx_try_compile
 +
 +# 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. ##
+-## --------- ##
 +  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
 +  rm -f conftest.$ac_objext
 +  if { { ac_try="$ac_compile"
@@ -1153,14 +1151,28 @@ index f51d803..459bf70 100755
 +else
 +  $as_echo "$as_me: failed program was:" >&5
 +sed 's/^/| /' conftest.$ac_ext >&5
-+
+ 
+-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`
 +	ac_retval=1
 +fi
 +  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
 +  as_fn_set_status $ac_retval
-+
+ 
+-/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_fn_c_try_compile
-+
+ 
+-/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`
 +# ac_fn_c_try_cpp LINENO
 +# ----------------------
 +# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
@@ -1190,14 +1202,24 @@ index f51d803..459bf70 100755
 +else
 +  $as_echo "$as_me: failed program was:" >&5
 +sed 's/^/| /' conftest.$ac_ext >&5
-+
+ 
+-_ASUNAME
 +    ac_retval=1
 +fi
 +  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
 +  as_fn_set_status $ac_retval
-+
+ 
+-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
 +} # ac_fn_c_try_cpp
-+
+ 
+-} >&5
 +# ac_fn_c_try_link LINENO
 +# -----------------------
 +# Try to link conftest.$ac_ext, and return whether this succeeded.
@@ -1231,7 +1253,8 @@ index f51d803..459bf70 100755
 +else
 +  $as_echo "$as_me: failed program was:" >&5
 +sed 's/^/| /' conftest.$ac_ext >&5
-+
+ 
+-cat >&5 <<_ACEOF
 +	ac_retval=1
 +fi
 +  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
@@ -1241,9 +1264,12 @@ index f51d803..459bf70 100755
 +  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
 +  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
 +  as_fn_set_status $ac_retval
-+
+ 
 +} # ac_fn_c_try_link
-+
+ 
+-## ----------- ##
+-## Core tests. ##
+-## ----------- ##
 +# ac_fn_c_try_run LINENO
 +# ----------------------
 +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
@@ -1283,7 +1309,7 @@ index f51d803..459bf70 100755
 +  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
 +  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
 +  as_fn_set_status $ac_retval
-+
+ 
 +} # ac_fn_c_try_run
 +
 +# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
@@ -1323,9 +1349,9 @@ index f51d803..459bf70 100755
 +  ;
 +  return 0;
 +}
-+_ACEOF
+ _ACEOF
 +if ac_fn_c_try_compile "$LINENO"; then :
-+
+ 
 +else
 +  eval "$3=yes"
 +fi
@@ -1337,9 +1363,65 @@ index f51d803..459bf70 100755
 +	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
 +$as_echo "$ac_res" >&6; }
 +  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-+
+ 
+-# Keep a trace of the command line.
+-# Strip out --no-create and --no-recursion so they do not pile up.
+-# Strip out --silent because we don't want to record it for future runs.
+-# Also quote any args containing shell meta-characters.
+-# Make two passes to allow for proper duplicate-argument suppression.
+-ac_configure_args=
+-ac_configure_args0=
+-ac_configure_args1=
+-ac_must_keep_next=false
+-for ac_pass in 1 2
+-do
+-  for ac_arg
+-  do
+-    case $ac_arg in
+-    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+-    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+-    | -silent | --silent | --silen | --sile | --sil)
+-      continue ;;
+-    *\'*)
+-      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+-    esac
+-    case $ac_pass in
+-    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+-    2)
+-      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+-      if test $ac_must_keep_next = true; then
+-	ac_must_keep_next=false # Got value, back to normal.
+-      else
+-	case $ac_arg in
+-	  *=* | --config-cache | -C | -disable-* | --disable-* \
+-	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+-	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+-	  | -with-* | --with-* | -without-* | --without-* | --x)
+-	    case "$ac_configure_args0 " in
+-	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+-	    esac
+-	    ;;
+-	  -* ) ac_must_keep_next=true ;;
+-	esac
+-      fi
+-      ac_configure_args="$ac_configure_args '$ac_arg'"
+-      ;;
+-    esac
+-  done
+-done
+-$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+-$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
 +} # ac_fn_c_check_type
-+
+ 
+-# When interrupted or exit'd, cleanup temporary files, and complete
+-# config.log.  We remove comments because anyway the quotes in there
+-# would cause problems or look ugly.
+-# WARNING: Use '\'' to represent an apostrophe within the trap.
+-# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+-trap 'exit_status=$?
+-  # Save into config.log some information that might help in debugging.
+-  {
+-    echo
 +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
 +# -------------------------------------------------------
 +# Tests whether HEADER exists and can be compiled using the include files in
@@ -1368,9 +1450,61 @@ index f51d803..459bf70 100755
 +	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
 +$as_echo "$ac_res" >&6; }
 +  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-+
+ 
+-    cat <<\_ASBOX
+-## ---------------- ##
+-## Cache variables. ##
+-## ---------------- ##
+-_ASBOX
+-    echo
+-    # The following way of writing the cache mishandles newlines in values,
+-(
+-  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+-    eval ac_val=\$$ac_var
+-    case $ac_val in #(
+-    *${as_nl}*)
+-      case $ac_var in #(
+-      *_cv_*) { $as_echo "$as_me:$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= ;; #(
+-      *) $as_unset $ac_var ;;
+-      esac ;;
+-    esac
+-  done
+-  (set) 2>&1 |
+-    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+-    *${as_nl}ac_space=\ *)
+-      sed -n \
+-	"s/'\''/'\''\\\\'\'''\''/g;
+-	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+-      ;; #(
+-    *)
+-      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+-      ;;
+-    esac |
+-    sort
+-)
+-    echo
 +} # ac_fn_c_check_header_compile
-+
+ 
+-    cat <<\_ASBOX
+-## ----------------- ##
+-## Output variables. ##
+-## ----------------- ##
+-_ASBOX
+-    echo
+-    for ac_var in $ac_subst_vars
+-    do
+-      eval ac_val=\$$ac_var
+-      case $ac_val in
+-      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+-      esac
+-      $as_echo "$ac_var='\''$ac_val'\''"
+-    done | sort
+-    echo
 +# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
 +# -------------------------------------------------------
 +# Tests whether HEADER exists, giving a warning if it cannot be compiled using
@@ -1405,7 +1539,24 @@ index f51d803..459bf70 100755
 +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; }
-+
+ 
+-    if test -n "$ac_subst_files"; then
+-      cat <<\_ASBOX
+-## ------------------- ##
+-## File substitutions. ##
+-## ------------------- ##
+-_ASBOX
+-      echo
+-      for ac_var in $ac_subst_files
+-      do
+-	eval ac_val=\$$ac_var
+-	case $ac_val in
+-	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+-	esac
+-	$as_echo "$ac_var='\''$ac_val'\''"
+-      done | sort
+-      echo
+-    fi
 +# Is the header present?
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
 +$as_echo_n "checking $2 presence... " >&6; }
@@ -1421,7 +1572,29 @@ index f51d803..459bf70 100755
 +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; }
-+
+ 
+-    if test -s confdefs.h; then
+-      cat <<\_ASBOX
+-## ----------- ##
+-## confdefs.h. ##
+-## ----------- ##
+-_ASBOX
+-      echo
+-      cat confdefs.h
+-      echo
+-    fi
+-    test "$ac_signal" != 0 &&
+-      $as_echo "$as_me: caught signal $ac_signal"
+-    $as_echo "$as_me: exit $exit_status"
+-  } >&5
+-  rm -f core *.core core.conftest.* &&
+-    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+-    exit $exit_status
+-' 0
+-for ac_signal in 1 2 13 15; do
+-  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+-done
+-ac_signal=0
 +# So?  What about this header?
 +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
 +  yes:no: )
@@ -1459,9 +1632,12 @@ index f51d803..459bf70 100755
 +$as_echo "$ac_res" >&6; }
 +fi
 +  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-+
+ 
+-# confdefs.h avoids OS command line length limits that DEFS can exceed.
+-rm -f -r conftest* confdefs.h
 +} # ac_fn_c_check_header_mongrel
-+
+ 
+-# Predefined preprocessor variables.
 +# ac_fn_c_check_func LINENO FUNC VAR
 +# ----------------------------------
 +# Tests whether FUNC exists, setting the cache variable VAR accordingly
@@ -1478,20 +1654,26 @@ index f51d803..459bf70 100755
 +/* 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
-+
+ 
+-cat >>confdefs.h <<_ACEOF
+-#define PACKAGE_NAME "$PACKAGE_NAME"
+-_ACEOF
 +/* 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
-+
+ 
+-cat >>confdefs.h <<_ACEOF
+-#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+-_ACEOF
 +#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.  */
@@ -1505,7 +1687,9 @@ index f51d803..459bf70 100755
 +#if defined __stub_$2 || defined __stub___$2
 +choke me
 +#endif
-+
+ 
+-cat >>confdefs.h <<_ACEOF
+-#define PACKAGE_VERSION "$PACKAGE_VERSION"
 +int
 +main ()
 +{
@@ -1513,7 +1697,7 @@ index f51d803..459bf70 100755
 +  ;
 +  return 0;
 +}
-+_ACEOF
+ _ACEOF
 +if ac_fn_c_try_link "$LINENO"; then :
 +  eval "$3=yes"
 +else
@@ -1526,9 +1710,11 @@ index f51d803..459bf70 100755
 +	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
 +$as_echo "$ac_res" >&6; }
 +  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-+
+ 
 +} # ac_fn_c_check_func
-+
+ 
+-cat >>confdefs.h <<_ACEOF
+-#define PACKAGE_STRING "$PACKAGE_STRING"
 +# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
 +# --------------------------------------------
 +# Tries to find the compile-time value of EXPR in a program that includes
@@ -1551,7 +1737,7 @@ index f51d803..459bf70 100755
 +  ;
 +  return 0;
 +}
-+_ACEOF
+ _ACEOF
 +if ac_fn_c_try_compile "$LINENO"; then :
 +  ac_lo=0 ac_mid=0
 +  while :; do
@@ -1563,7 +1749,7 @@ index f51d803..459bf70 100755
 +{
 +static int test_array [1 - 2 * !(($2) <= $ac_mid)];
 +test_array [0] = 0
-+
+ 
 +  ;
 +  return 0;
 +}
@@ -1589,11 +1775,13 @@ index f51d803..459bf70 100755
 +{
 +static int test_array [1 - 2 * !(($2) < 0)];
 +test_array [0] = 0
-+
+ 
+-cat >>confdefs.h <<_ACEOF
+-#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
 +  ;
 +  return 0;
 +}
-+_ACEOF
+ _ACEOF
 +if ac_fn_c_try_compile "$LINENO"; then :
 +  ac_hi=-1 ac_mid=-1
 +  while :; do
@@ -1605,7 +1793,7 @@ index f51d803..459bf70 100755
 +{
 +static int test_array [1 - 2 * !(($2) >= $ac_mid)];
 +test_array [0] = 0
-+
+ 
 +  ;
 +  return 0;
 +}
@@ -1639,18 +1827,38 @@ index f51d803..459bf70 100755
 +{
 +static int test_array [1 - 2 * !(($2) <= $ac_mid)];
 +test_array [0] = 0
-+
+ 
+-# Let the site file select an alternate cache file if it wants to.
+-# Prefer an explicitly selected file to automatically selected ones.
+-ac_site_file1=NONE
+-ac_site_file2=NONE
+-if test -n "$CONFIG_SITE"; then
+-  ac_site_file1=$CONFIG_SITE
+-elif test "x$prefix" != xNONE; then
+-  ac_site_file1=$prefix/share/config.site
+-  ac_site_file2=$prefix/etc/config.site
 +  ;
 +  return 0;
 +}
 +_ACEOF
 +if ac_fn_c_try_compile "$LINENO"; then :
 +  ac_hi=$ac_mid
-+else
+ else
+-  ac_site_file1=$ac_default_prefix/share/config.site
+-  ac_site_file2=$ac_default_prefix/etc/config.site
 +  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
-+fi
+ fi
+-for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+-do
+-  test "x$ac_site_file" = xNONE && continue
+-  if test -r "$ac_site_file"; then
+-    { $as_echo "$as_me:$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"
+-  fi
 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+done
+ done
 +case $ac_lo in #((
 +?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
 +'') ac_retval=1 ;;
@@ -1666,7 +1874,18 @@ index f51d803..459bf70 100755
 +int
 +main ()
 +{
-+
+ 
+-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
+-    { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5
+-$as_echo "$as_me: loading cache $cache_file" >&6;}
+-    case $cache_file in
+-      [\\/]* | ?:[\\/]* ) . "$cache_file";;
+-      *)                      . "./$cache_file";;
+-    esac
+-  fi
 +  FILE *f = fopen ("conftest.val", "w");
 +  if (! f)
 +    return 1;
@@ -1694,19 +1913,80 @@ index f51d803..459bf70 100755
 +_ACEOF
 +if ac_fn_c_try_run "$LINENO"; then :
 +  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
-+else
+ else
+-  { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5
+-$as_echo "$as_me: creating cache $cache_file" >&6;}
+-  >$cache_file
 +  ac_retval=1
-+fi
+ fi
 +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
 +  conftest.$ac_objext conftest.beam conftest.$ac_ext
 +rm -f conftest.val
-+
-+  fi
+ 
+-# Check that the precious variables saved in the cache have kept the same
+-# value.
+-ac_cache_corrupted=false
+-for ac_var in $ac_precious_vars; do
+-  eval ac_old_set=\$ac_cv_env_${ac_var}_set
+-  eval ac_new_set=\$ac_env_${ac_var}_set
+-  eval ac_old_val=\$ac_cv_env_${ac_var}_value
+-  eval ac_new_val=\$ac_env_${ac_var}_value
+-  case $ac_old_set,$ac_new_set in
+-    set,)
+-      { $as_echo "$as_me:$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)
+-      { $as_echo "$as_me:$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
+-	# 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:$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:$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:$LINENO:   former value:  \`$ac_old_val'" >&5
+-$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
+-	{ $as_echo "$as_me:$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=`$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'" ;;
+-    esac
+   fi
+-done
+-if $ac_cache_corrupted; then
+-  { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+-  { $as_echo "$as_me:$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_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+-$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+-   { (exit 1); exit 1; }; }
+-fi
 +  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
 +  as_fn_set_status $ac_retval
-+
+ 
 +} # ac_fn_c_compute_int
-+
+ 
 +# ac_fn_c_find_intX_t LINENO BITS VAR
 +# -----------------------------------
 +# Finds a signed integer type with width BITS, setting cache variable VAR
@@ -1733,7 +2013,7 @@ index f51d803..459bf70 100755
 +{
 +static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
 +test_array [0] = 0
-+
+ 
 +  ;
 +  return 0;
 +}
@@ -1749,13 +2029,13 @@ index f51d803..459bf70 100755
 +static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
 +		 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
 +test_array [0] = 0
-+
+ 
 +  ;
 +  return 0;
 +}
 +_ACEOF
 +if ac_fn_c_try_compile "$LINENO"; then :
-+
+ 
 +else
 +  case $ac_type in #(
 +  int$2_t) :
@@ -1768,7 +2048,7 @@ index f51d803..459bf70 100755
 +fi
 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 +       if eval test \"x\$"$3"\" = x"no"; then :
-+
+ 
 +else
 +  break
 +fi
@@ -1778,9 +2058,9 @@ index f51d803..459bf70 100755
 +	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
 +$as_echo "$ac_res" >&6; }
 +  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-+
+ 
 +} # ac_fn_c_find_intX_t
-+
+ 
 +# ac_fn_c_find_uintX_t LINENO BITS VAR
 +# ------------------------------------
 +# Finds an unsigned integer type with width BITS, setting cache variable VAR
@@ -1806,7 +2086,7 @@ index f51d803..459bf70 100755
 +{
 +static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
 +test_array [0] = 0
-+
+ 
 +  ;
 +  return 0;
 +}
@@ -1821,7 +2101,7 @@ index f51d803..459bf70 100755
 +fi
 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 +       if eval test \"x\$"$3"\" = x"no"; then :
-+
+ 
 +else
 +  break
 +fi
@@ -1831,9 +2111,9 @@ index f51d803..459bf70 100755
 +	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
 +$as_echo "$ac_res" >&6; }
 +  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-+
+ 
 +} # ac_fn_c_find_uintX_t
-+
+ 
 +# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
 +# ---------------------------------------------
 +# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
@@ -1861,7 +2141,7 @@ index f51d803..459bf70 100755
 +  (void) $as_decl_name;
 +#endif
 +#endif
-+
+ 
 +  ;
 +  return 0;
 +}
@@ -1877,9 +2157,9 @@ index f51d803..459bf70 100755
 +	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
 +$as_echo "$ac_res" >&6; }
 +  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-+
+ 
 +} # ac_fn_c_check_decl
-+
+ 
 +# ac_fn_cxx_try_link LINENO
 +# -------------------------
 +# Try to link conftest.$ac_ext, and return whether this succeeded.
@@ -1913,7 +2193,7 @@ index f51d803..459bf70 100755
 +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
@@ -1923,9 +2203,9 @@ index f51d803..459bf70 100755
 +  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
 +  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
 +  as_fn_set_status $ac_retval
-+
+ 
 +} # ac_fn_cxx_try_link
-+
+ 
 +# ac_fn_cxx_check_func LINENO FUNC VAR
 +# ------------------------------------
 +# Tests whether FUNC exists, setting the cache variable VAR accordingly
@@ -1942,20 +2222,20 @@ index f51d803..459bf70 100755
 +/* 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.  */
@@ -1969,7 +2249,7 @@ index f51d803..459bf70 100755
 +#if defined __stub_$2 || defined __stub___$2
 +choke me
 +#endif
-+
+ 
 +int
 +main ()
 +{
@@ -1990,9 +2270,14 @@ index f51d803..459bf70 100755
 +	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
 +$as_echo "$ac_res" >&6; }
 +  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-+
+ 
 +} # ac_fn_cxx_check_func
-+
+ 
+-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_fn_cxx_try_cpp LINENO
 +# ------------------------
 +# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
@@ -2022,14 +2307,35 @@ index f51d803..459bf70 100755
 +else
 +  $as_echo "$as_me: failed program was:" >&5
 +sed 's/^/| /' conftest.$ac_ext >&5
-+
+ 
 +    ac_retval=1
 +fi
 +  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
 +  as_fn_set_status $ac_retval
-+
+ 
+-ac_config_headers="$ac_config_headers autoconfig.h tombupnp/upnp/inc/upnpconfig.h"
 +} # ac_fn_cxx_try_cpp
-+
+ 
+-ac_aux_dir=
+-for ac_dir in configure_aux "$srcdir"/configure_aux; do
+-  if test -f "$ac_dir/install-sh"; then
+-    ac_aux_dir=$ac_dir
+-    ac_install_sh="$ac_aux_dir/install-sh -c"
+-    break
+-  elif test -f "$ac_dir/install.sh"; then
+-    ac_aux_dir=$ac_dir
+-    ac_install_sh="$ac_aux_dir/install.sh -c"
+-    break
+-  elif test -f "$ac_dir/shtool"; then
+-    ac_aux_dir=$ac_dir
+-    ac_install_sh="$ac_aux_dir/shtool install -c"
+-    break
+-  fi
+-done
+-if test -z "$ac_aux_dir"; then
+-  { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in configure_aux \"$srcdir\"/configure_aux" >&5
+-$as_echo "$as_me: error: cannot find install-sh or install.sh in configure_aux \"$srcdir\"/configure_aux" >&2;}
+-   { (exit 1); exit 1; }; }
 +# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
 +# ---------------------------------------------------------
 +# Tests whether HEADER exists, giving a warning if it cannot be compiled using
@@ -2043,7 +2349,7 @@ index f51d803..459bf70 100755
 +$as_echo_n "checking for $2... " >&6; }
 +if eval "test \"\${$3+set}\"" = set; then :
 +  $as_echo_n "(cached) " >&6
-+fi
+ fi
 +eval ac_res=\$$3
 +	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
 +$as_echo "$ac_res" >&6; }
@@ -2064,7 +2370,15 @@ index f51d803..459bf70 100755
 +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; }
-+
+ 
+-# These three variables are undocumented and unsupported,
+-# and are intended to be withdrawn in a future Autoconf release.
+-# They can cause serious problems if a builder's source tree is in a directory
+-# whose full name contains unusual characters.
+-ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
+-ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
+-ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
+-
 +# Is the header present?
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
 +$as_echo_n "checking $2 presence... " >&6; }
@@ -2080,7 +2394,7 @@ index f51d803..459bf70 100755
 +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_cxx_preproc_warn_flag in #((
 +  yes:no: )
@@ -2118,9 +2432,74 @@ index f51d803..459bf70 100755
 +$as_echo "$ac_res" >&6; }
 +fi
 +  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-+
+ 
+-am__api_version='1.11'
 +} # ac_fn_cxx_check_header_mongrel
-+
+ 
+-# Find a good install program.  We prefer a C program (faster),
+-# so one script is as good as another.  But avoid the broken or
+-# incompatible versions:
+-# SysV /etc/install, /usr/sbin/install
+-# SunOS /usr/etc/install
+-# IRIX /sbin/install
+-# AIX /bin/install
+-# AmigaOS /C/install, which installs bootblocks on floppy discs
+-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+-# OS/2's system install, which has a completely different semantic
+-# ./install, which can be erroneously created by make from ./install.sh.
+-# Reject install programs that cannot install multiple files.
+-{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+-$as_echo_n "checking for a BSD-compatible install... " >&6; }
+-if test -z "$INSTALL"; then
+-if test "${ac_cv_path_install+set}" = set; then
+-  $as_echo_n "(cached) " >&6
+-else
+-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+-for as_dir in $PATH
+-do
+-  IFS=$as_save_IFS
+-  test -z "$as_dir" && as_dir=.
+-  # Account for people who put trailing slashes in PATH elements.
+-case $as_dir/ in
+-  ./ | .// | /cC/* | \
+-  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+-  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
+-  /usr/ucb/* ) ;;
+-  *)
+-    # OSF1 and SCO ODT 3.0 have their own names for install.
+-    # Don't use installbsd from OSF since it installs stuff as root
+-    # by default.
+-    for ac_prog in ginstall scoinst install; do
+-      for ac_exec_ext in '' $ac_executable_extensions; do
+-	if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+-	  if test $ac_prog = install &&
+-	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+-	    # AIX install.  It has an incompatible calling convention.
+-	    :
+-	  elif test $ac_prog = install &&
+-	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+-	    # program-specific install script used by HP pwplus--don't use.
+-	    :
+-	  else
+-	    rm -rf conftest.one conftest.two conftest.dir
+-	    echo one > conftest.one
+-	    echo two > conftest.two
+-	    mkdir conftest.dir
+-	    if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+-	      test -s conftest.one && test -s conftest.two &&
+-	      test -s conftest.dir/conftest.one &&
+-	      test -s conftest.dir/conftest.two
+-	    then
+-	      ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+-	      break 3
+-	    fi
+-	  fi
+-	fi
+-      done
+-    done
+-    ;;
 +# ac_fn_cxx_try_run LINENO
 +# ------------------------
 +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
@@ -2132,7 +2511,7 @@ index f51d803..459bf70 100755
 +case "(($ac_try" in
 +  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
 +  *) ac_try_echo=$ac_try;;
-+esac
+ esac
 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
 +$as_echo "$ac_try_echo"; } >&5
 +  (eval "$ac_link") 2>&5
@@ -2154,1357 +2533,1394 @@ index f51d803..459bf70 100755
 +  $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
-+
-+       ac_retval=$ac_status
-+fi
-+  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
-+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-+  as_fn_set_status $ac_retval
-+
-+} # ac_fn_cxx_try_run
- 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 MediaTomb $as_me 0.12.1, which was
--generated by GNU Autoconf 2.63.  Invocation command line was
-+generated by GNU Autoconf 2.67.  Invocation command line was
- 
-   $ $0 $@
  
-@@ -1863,8 +2892,8 @@ for as_dir in $PATH
- do
-   IFS=$as_save_IFS
-   test -z "$as_dir" && as_dir=.
--  $as_echo "PATH: $as_dir"
 -done
-+    $as_echo "PATH: $as_dir"
-+  done
- IFS=$as_save_IFS
- 
- } >&5
-@@ -1901,9 +2930,9 @@ do
-       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
-@@ -1919,13 +2948,13 @@ do
- 	  -* ) ac_must_keep_next=true ;;
- 	esac
-       fi
--      ac_configure_args="$ac_configure_args '$ac_arg'"
-+      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
-@@ -1937,11 +2966,9 @@ trap 'exit_status=$?
-   {
-     echo
- 
--    cat <<\_ASBOX
--## ---------------- ##
-+    $as_echo "## ---------------- ##
- ## Cache variables. ##
--## ---------------- ##
--_ASBOX
-+## ---------------- ##"
-     echo
-     # The following way of writing the cache mishandles newlines in values,
- (
-@@ -1950,13 +2977,13 @@ _ASBOX
-     case $ac_val in #(
-     *${as_nl}*)
-       case $ac_var in #(
--      *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
-+      *_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= ;; #(
--      *) $as_unset $ac_var ;;
-+      *) { eval $ac_var=; unset $ac_var;} ;;
-       esac ;;
-     esac
-   done
-@@ -1975,11 +3002,9 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
- )
-     echo
- 
--    cat <<\_ASBOX
--## ----------------- ##
-+    $as_echo "## ----------------- ##
- ## Output variables. ##
--## ----------------- ##
--_ASBOX
-+## ----------------- ##"
-     echo
-     for ac_var in $ac_subst_vars
-     do
-@@ -1992,11 +3017,9 @@ _ASBOX
-     echo
- 
-     if test -n "$ac_subst_files"; then
--      cat <<\_ASBOX
--## ------------------- ##
-+      $as_echo "## ------------------- ##
- ## File substitutions. ##
--## ------------------- ##
--_ASBOX
-+## ------------------- ##"
-       echo
-       for ac_var in $ac_subst_files
-       do
-@@ -2010,11 +3033,9 @@ _ASBOX
-     fi
- 
-     if test -s confdefs.h; then
--      cat <<\_ASBOX
--## ----------- ##
-+      $as_echo "## ----------- ##
- ## confdefs.h. ##
--## ----------- ##
--_ASBOX
-+## ----------- ##"
-       echo
-       cat confdefs.h
-       echo
-@@ -2028,46 +3049,53 @@ _ASBOX
-     exit $exit_status
- ' 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 -f -r conftest* confdefs.h
- 
-+$as_echo "/* confdefs.h */" > 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
- 
+-IFS=$as_save_IFS
 -
- cat >>confdefs.h <<_ACEOF
- #define PACKAGE_VERSION "$PACKAGE_VERSION"
- _ACEOF
- 
--
- cat >>confdefs.h <<_ACEOF
- #define PACKAGE_STRING "$PACKAGE_STRING"
- _ACEOF
- 
+-rm -rf conftest.one conftest.two conftest.dir
 -
- 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 an explicitly selected file to automatically selected ones.
- ac_site_file1=NONE
- ac_site_file2=NONE
- if test -n "$CONFIG_SITE"; then
--  ac_site_file1=$CONFIG_SITE
-+  # 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
-@@ -2078,19 +3106,23 @@ fi
- for ac_site_file in "$ac_site_file1" "$ac_site_file2"
- do
-   test "x$ac_site_file" = xNONE && continue
--  if test -r "$ac_site_file"; then
--    { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
-+  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
--    { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5
-+  # 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";;
-@@ -2098,7 +3130,7 @@ $as_echo "$as_me: loading cache $cache_file" >&6;}
-     esac
-   fi
- else
--  { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
- $as_echo "$as_me: creating cache $cache_file" >&6;}
-   >$cache_file
- fi
-@@ -2113,11 +3145,11 @@ for ac_var in $ac_precious_vars; do
-   eval ac_new_val=\$ac_env_${ac_var}_value
-   case $ac_old_set,$ac_new_set in
-     set,)
--      { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-+      { $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)
--      { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
-+      { $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=: ;;
-     ,);;
-@@ -2127,17 +3159,17 @@ $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
- 	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:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
-+	  { $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:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
-+	  { $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:$LINENO:   former value:  \`$ac_old_val'" >&5
-+	{ $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:$LINENO:   current value: \`$ac_new_val'" >&5
-+	{ $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
-@@ -2149,43 +3181,20 @@ $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
-     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
--  { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-+  { $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:$LINENO: error: changes in the environment can compromise the build" >&5
-+  { $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_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
--$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
--   { (exit 1); exit 1; }; }
-+  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+-fi
+-  if test "${ac_cv_path_install+set}" = set; then
+-    INSTALL=$ac_cv_path_install
+-  else
+-    # As a last resort, use the slow shell script.  Don't cache a
+-    # value for INSTALL within a source directory, because that will
+-    # break other packages using the cache if that directory is
+-    # removed, or if the value is a relative name.
+-    INSTALL=$ac_install_sh
+-  fi
++       ac_retval=$ac_status
  fi
+-{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5
+-$as_echo "$INSTALL" >&6; }
 -
+-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+-# It thinks the first close brace ends the variable substitution.
+-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
 -
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
-+## -------------------- ##
-+## Main body of script. ##
-+## -------------------- ##
- 
- ac_ext=c
- ac_cpp='$CPP $CPPFLAGS'
-@@ -2213,9 +3222,7 @@ for ac_dir in configure_aux "$srcdir"/configure_aux; do
-   fi
- done
- if test -z "$ac_aux_dir"; then
--  { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in configure_aux \"$srcdir\"/configure_aux" >&5
--$as_echo "$as_me: error: cannot find install-sh or install.sh in configure_aux \"$srcdir\"/configure_aux" >&2;}
--   { (exit 1); exit 1; }; }
-+  as_fn_error $? "cannot find install-sh, install.sh, or shtool in configure_aux \"$srcdir\"/configure_aux" "$LINENO" 5
- fi
- 
- # These three variables are undocumented and unsupported,
-@@ -2244,10 +3251,10 @@ am__api_version='1.11'
- # OS/2's system install, which has a completely different semantic
- # ./install, which can be erroneously created by make from ./install.sh.
- # Reject install programs that cannot install multiple files.
--{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
- $as_echo_n "checking for a BSD-compatible install... " >&6; }
- if test -z "$INSTALL"; then
--if test "${ac_cv_path_install+set}" = set; then
-+if test "${ac_cv_path_install+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
-   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-@@ -2255,11 +3262,11 @@ for as_dir in $PATH
- do
-   IFS=$as_save_IFS
-   test -z "$as_dir" && as_dir=.
--  # Account for people who put trailing slashes in PATH elements.
--case $as_dir/ in
--  ./ | .// | /cC/* | \
-+    # Account for people who put trailing slashes in PATH elements.
-+case $as_dir/ in #((
-+  ./ | .// | /[cC]/* | \
-   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
--  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
-+  ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
-   /usr/ucb/* ) ;;
-   *)
-     # OSF1 and SCO ODT 3.0 have their own names for install.
-@@ -2296,7 +3303,7 @@ case $as_dir/ in
-     ;;
- esac
- 
--done
-+  done
- IFS=$as_save_IFS
- 
- rm -rf conftest.one conftest.two conftest.dir
-@@ -2312,7 +3319,7 @@ fi
-     INSTALL=$ac_install_sh
-   fi
- fi
--{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
- $as_echo "$INSTALL" >&6; }
- 
- # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-@@ -2323,7 +3330,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
++  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
++  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
++  as_fn_set_status $ac_retval
  
- test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
++} # ac_fn_cxx_try_run
++cat >config.log <<_ACEOF
++This file contains any messages produced by compilers while
++running configure, to aid debugging if configure makes a mistake.
  
 -{ $as_echo "$as_me:$LINENO: checking whether build environment is sane" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
- $as_echo_n "checking whether build environment is sane... " >&6; }
- # Just in case
- sleep 1
-@@ -2334,15 +3341,11 @@ am_lf='
- '
- case `pwd` in
-   *[\\\"\#\$\&\'\`$am_lf]*)
+-$as_echo_n "checking whether build environment is sane... " >&6; }
+-# Just in case
+-sleep 1
+-echo timestamp > conftest.file
+-# Reject unsafe characters in $srcdir or the absolute working directory
+-# name.  Accept space and tab only in the latter.
+-am_lf='
+-'
+-case `pwd` in
+-  *[\\\"\#\$\&\'\`$am_lf]*)
 -    { { $as_echo "$as_me:$LINENO: error: unsafe absolute working directory name" >&5
 -$as_echo "$as_me: error: unsafe absolute working directory name" >&2;}
 -   { (exit 1); exit 1; }; };;
-+    as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5 ;;
- esac
- case $srcdir in
-   *[\\\"\#\$\&\'\`$am_lf\ \	]*)
+-esac
+-case $srcdir in
+-  *[\\\"\#\$\&\'\`$am_lf\ \	]*)
 -    { { $as_echo "$as_me:$LINENO: error: unsafe srcdir value: \`$srcdir'" >&5
 -$as_echo "$as_me: error: unsafe srcdir value: \`$srcdir'" >&2;}
 -   { (exit 1); exit 1; }; };;
-+    as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5 ;;
- esac
+-esac
++It was created by MediaTomb $as_me 0.12.1, which was
++generated by GNU Autoconf 2.67.  Invocation command line was
  
- # Do `set' in a subshell so we don't clobber the current shell's
-@@ -2364,11 +3367,8 @@ if (
-       # if, for instance, CONFIG_SHELL is bash and it inherits a
-       # broken ls alias from the environment.  This has actually
-       # happened.  Such a system could not be considered "sane".
+-# Do `set' in a subshell so we don't clobber the current shell's
+-# arguments.  Must try -L first in case configure is actually a
+-# symlink; some systems play weird games with the mod time of symlinks
+-# (eg FreeBSD returns the mod time of the symlink's containing
+-# directory).
+-if (
+-   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+-   if test "$*" = "X"; then
+-      # -L didn't work.
+-      set X `ls -t "$srcdir/configure" conftest.file`
+-   fi
+-   rm -f conftest.file
+-   if test "$*" != "X $srcdir/configure conftest.file" \
+-      && test "$*" != "X conftest.file $srcdir/configure"; then
++  $ $0 $@
+ 
+-      # If neither matched, then we have a broken ls.  This can happen
+-      # if, for instance, CONFIG_SHELL is bash and it inherits a
+-      # broken ls alias from the environment.  This has actually
+-      # happened.  Such a system could not be considered "sane".
 -      { { $as_echo "$as_me:$LINENO: error: ls -t appears to fail.  Make sure there is not a broken
 -alias in your environment" >&5
 -$as_echo "$as_me: error: ls -t appears to fail.  Make sure there is not a broken
 -alias in your environment" >&2;}
 -   { (exit 1); exit 1; }; }
-+      as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
-+alias in your environment" "$LINENO" 5
-    fi
+-   fi
++_ACEOF
++exec 5>>config.log
++{
++cat <<_ASUNAME
++## --------- ##
++## Platform. ##
++## --------- ##
  
-    test "$2" = conftest.file
-@@ -2377,13 +3377,10 @@ then
-    # Ok.
-    :
- else
+-   test "$2" = conftest.file
+-   )
+-then
+-   # Ok.
+-   :
+-else
 -   { { $as_echo "$as_me:$LINENO: error: newly created file is older than distributed files!
 -Check your system clock" >&5
 -$as_echo "$as_me: error: newly created file is older than distributed files!
 -Check your system clock" >&2;}
 -   { (exit 1); exit 1; }; }
-+   as_fn_error $? "newly created file is older than distributed files!
-+Check your system clock" "$LINENO" 5
- fi
+-fi
 -{ $as_echo "$as_me:$LINENO: result: yes" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
- $as_echo "yes" >&6; }
- test "$program_prefix" != NONE &&
-   program_transform_name="s&^&$program_prefix&;$program_transform_name"
-@@ -2411,7 +3408,7 @@ if eval "$MISSING --run true"; then
-   am_missing_run="$MISSING --run "
- else
-   am_missing_run=
+-$as_echo "yes" >&6; }
+-test "$program_prefix" != NONE &&
+-  program_transform_name="s&^&$program_prefix&;$program_transform_name"
+-# Use a double $ so make ignores it.
+-test "$program_suffix" != NONE &&
+-  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
+-# Double any \ or $.
+-# By default was `s,x,x', remove it if useless.
+-ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
+-program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
++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`
+ 
+-# expand $ac_aux_dir to an absolute path
+-am_aux_dir=`cd $ac_aux_dir && pwd`
++/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
++/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
+ 
+-if test x"${MISSING+set}" != xset; then
+-  case $am_aux_dir in
+-  *\ * | *\	*)
+-    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+-  *)
+-    MISSING="\${SHELL} $am_aux_dir/missing" ;;
+-  esac
+-fi
+-# Use eval to expand $SHELL
+-if eval "$MISSING --run true"; then
+-  am_missing_run="$MISSING --run "
+-else
+-  am_missing_run=
 -  { $as_echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
- $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
- fi
+-$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+-fi
++/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`
+ 
+-if test x"${install_sh}" != xset; then
+-  case $am_aux_dir in
+-  *\ * | *\	*)
+-    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+-  *)
+-    install_sh="\${SHELL} $am_aux_dir/install-sh"
+-  esac
+-fi
++_ASUNAME
  
-@@ -2432,9 +3429,9 @@ if test "$cross_compiling" != no; then
-   if test -n "$ac_tool_prefix"; then
-   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
- set dummy ${ac_tool_prefix}strip; ac_word=$2
+-# Installed binaries are usually stripped using `strip' when the user
+-# run `make install-strip'.  However `strip' might not be the right
+-# tool to use in cross-compilation environments, therefore Automake
+-# will honor the `STRIP' environment variable to overrule this program.
+-if test "$cross_compiling" != no; then
+-  if test -n "$ac_tool_prefix"; then
+-  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+-set dummy ${ac_tool_prefix}strip; ac_word=$2
 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
- $as_echo_n "checking for $ac_word... " >&6; }
+-$as_echo_n "checking for $ac_word... " >&6; }
 -if test "${ac_cv_prog_STRIP+set}" = set; then
-+if test "${ac_cv_prog_STRIP+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
-   if test -n "$STRIP"; then
-@@ -2445,24 +3442,24 @@ for as_dir in $PATH
+-  $as_echo_n "(cached) " >&6
+-else
+-  if test -n "$STRIP"; then
+-  ac_cv_prog_STRIP="$STRIP" # 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
-+    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_STRIP="${ac_tool_prefix}strip"
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+-    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
 -    $as_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
+-    break 2
+-  fi
+-done
 -done
++    $as_echo "PATH: $as_dir"
 +  done
  IFS=$as_save_IFS
  
- fi
- fi
- STRIP=$ac_cv_prog_STRIP
- if test -n "$STRIP"; then
+-fi
+-fi
+-STRIP=$ac_cv_prog_STRIP
+-if test -n "$STRIP"; then
 -  { $as_echo "$as_me:$LINENO: result: $STRIP" >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
- $as_echo "$STRIP" >&6; }
- else
+-$as_echo "$STRIP" >&6; }
+-else
 -  { $as_echo "$as_me:$LINENO: result: no" >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
- $as_echo "no" >&6; }
- fi
+-$as_echo "no" >&6; }
+-fi
++} >&5
+ 
++cat >&5 <<_ACEOF
  
-@@ -2472,9 +3469,9 @@ if test -z "$ac_cv_prog_STRIP"; then
-   ac_ct_STRIP=$STRIP
-   # Extract the first word of "strip", so it can be a program name with args.
- set dummy strip; ac_word=$2
+-fi
+-if test -z "$ac_cv_prog_STRIP"; then
+-  ac_ct_STRIP=$STRIP
+-  # Extract the first word of "strip", so it can be a program name with args.
+-set dummy strip; ac_word=$2
 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
- $as_echo_n "checking for $ac_word... " >&6; }
+-$as_echo_n "checking for $ac_word... " >&6; }
 -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
-+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
-   if test -n "$ac_ct_STRIP"; then
-@@ -2485,24 +3482,24 @@ for as_dir in $PATH
- do
-   IFS=$as_save_IFS
-   test -z "$as_dir" && as_dir=.
+-  $as_echo_n "(cached) " >&6
+-else
+-  if test -n "$ac_ct_STRIP"; then
+-  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+-else
+-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
-+    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_STRIP="strip"
+-  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_STRIP="strip"
 -    $as_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
+-    break 2
+-  fi
 -done
-+  done
- IFS=$as_save_IFS
+-done
+-IFS=$as_save_IFS
  
- fi
- fi
- ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
- if test -n "$ac_ct_STRIP"; then
+-fi
+-fi
+-ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+-if test -n "$ac_ct_STRIP"; then
 -  { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
- $as_echo "$ac_ct_STRIP" >&6; }
- else
+-$as_echo "$ac_ct_STRIP" >&6; }
+-else
 -  { $as_echo "$as_me:$LINENO: result: no" >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
- $as_echo "no" >&6; }
- fi
+-$as_echo "no" >&6; }
+-fi
++## ----------- ##
++## Core tests. ##
++## ----------- ##
  
-@@ -2511,7 +3508,7 @@ fi
-   else
-     case $cross_compiling:$ac_tool_warned in
- yes:)
+-  if test "x$ac_ct_STRIP" = x; then
+-    STRIP=":"
+-  else
+-    case $cross_compiling:$ac_tool_warned in
+-yes:)
 -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
-+{ $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
-@@ -2524,10 +3521,10 @@ fi
- fi
- INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
- 
+-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+-ac_tool_warned=yes ;;
+-esac
+-    STRIP=$ac_ct_STRIP
+-  fi
+-else
+-  STRIP="$ac_cv_prog_STRIP"
+-fi
+-
+-fi
+-INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+-
 -{ $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
- $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
- if test -z "$MKDIR_P"; then
+-$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
+-if test -z "$MKDIR_P"; then
 -  if test "${ac_cv_path_mkdir+set}" = set; then
-+  if test "${ac_cv_path_mkdir+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
-   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-@@ -2535,7 +3532,7 @@ for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
- do
-   IFS=$as_save_IFS
-   test -z "$as_dir" && as_dir=.
+-  $as_echo_n "(cached) " >&6
+-else
+-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+-for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+-do
+-  IFS=$as_save_IFS
+-  test -z "$as_dir" && as_dir=.
 -  for ac_prog in mkdir gmkdir; do
-+    for ac_prog in mkdir gmkdir; do
- 	 for ac_exec_ext in '' $ac_executable_extensions; do
- 	   { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
- 	   case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
-@@ -2547,11 +3544,12 @@ do
- 	   esac
- 	 done
-        done
+-	 for ac_exec_ext in '' $ac_executable_extensions; do
+-	   { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
+-	   case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
+-	     'mkdir (GNU coreutils) '* | \
+-	     'mkdir (coreutils) '* | \
+-	     'mkdir (fileutils) '4.1*)
+-	       ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+-	       break 3;;
+-	   esac
+-	 done
+-       done
 -done
-+  done
- IFS=$as_save_IFS
- 
- fi
- 
-+  test -d ./--version && rmdir ./--version
-   if test "${ac_cv_path_mkdir+set}" = set; then
-     MKDIR_P="$ac_cv_path_mkdir -p"
-   else
-@@ -2559,11 +3557,10 @@ fi
-     # value for MKDIR_P within a source directory, because that will
-     # break other packages using the cache if that directory is
-     # removed, or if the value is a relative name.
+-IFS=$as_save_IFS
+-
+-fi
+-
+-  if test "${ac_cv_path_mkdir+set}" = set; then
+-    MKDIR_P="$ac_cv_path_mkdir -p"
+-  else
+-    # As a last resort, use the slow shell script.  Don't cache a
+-    # value for MKDIR_P within a source directory, because that will
+-    # break other packages using the cache if that directory is
+-    # removed, or if the value is a relative name.
 -    test -d ./--version && rmdir ./--version
-     MKDIR_P="$ac_install_sh -d"
-   fi
- fi
+-    MKDIR_P="$ac_install_sh -d"
+-  fi
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
- $as_echo "$MKDIR_P" >&6; }
- 
- mkdir_p="$MKDIR_P"
-@@ -2576,9 +3573,9 @@ for ac_prog in gawk mawk nawk awk
- do
-   # Extract the first word of "$ac_prog", so it can be a program name with args.
- set dummy $ac_prog; ac_word=$2
+-$as_echo "$MKDIR_P" >&6; }
+-
+-mkdir_p="$MKDIR_P"
+-case $mkdir_p in
+-  [\\/$]* | ?:[\\/]*) ;;
+-  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+-esac
+-
+-for ac_prog in gawk mawk nawk awk
+-do
+-  # Extract the first word of "$ac_prog", so it can be a program name with args.
+-set dummy $ac_prog; ac_word=$2
 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
- $as_echo_n "checking for $ac_word... " >&6; }
+-$as_echo_n "checking for $ac_word... " >&6; }
 -if test "${ac_cv_prog_AWK+set}" = set; then
-+if test "${ac_cv_prog_AWK+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
-   if test -n "$AWK"; then
-@@ -2589,24 +3586,24 @@ for as_dir in $PATH
- do
-   IFS=$as_save_IFS
-   test -z "$as_dir" && as_dir=.
+-  $as_echo_n "(cached) " >&6
+-else
+-  if test -n "$AWK"; then
+-  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+-else
+-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+-for as_dir in $PATH
+-do
+-  IFS=$as_save_IFS
+-  test -z "$as_dir" && as_dir=.
 -  for ac_exec_ext in '' $ac_executable_extensions; do
-+    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_AWK="$ac_prog"
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+-    ac_cv_prog_AWK="$ac_prog"
 -    $as_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
+-    break 2
+-  fi
 -done
-+  done
- IFS=$as_save_IFS
- 
- fi
- fi
- AWK=$ac_cv_prog_AWK
- if test -n "$AWK"; then
+-done
+-IFS=$as_save_IFS
+-
+-fi
+-fi
+-AWK=$ac_cv_prog_AWK
+-if test -n "$AWK"; then
 -  { $as_echo "$as_me:$LINENO: result: $AWK" >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
- $as_echo "$AWK" >&6; }
- else
+-$as_echo "$AWK" >&6; }
+-else
 -  { $as_echo "$as_me:$LINENO: result: no" >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
- $as_echo "no" >&6; }
- fi
- 
-@@ -2614,11 +3611,11 @@ fi
-   test -n "$AWK" && break
- done
- 
+-$as_echo "no" >&6; }
+-fi
+-
+-
+-  test -n "$AWK" && break
+-done
+-
 -{ $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
- $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
- set x ${MAKE-make}
- ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+-$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+-set x ${MAKE-make}
+-ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
 -if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
-+if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then :
-   $as_echo_n "(cached) " >&6
- else
-   cat >conftest.make <<\_ACEOF
-@@ -2626,7 +3623,7 @@ SHELL = /bin/sh
- all:
- 	@echo '@@@%%%=$(MAKE)=@@@%%%'
- _ACEOF
+-  $as_echo_n "(cached) " >&6
+-else
+-  cat >conftest.make <<\_ACEOF
+-SHELL = /bin/sh
+-all:
+-	@echo '@@@%%%=$(MAKE)=@@@%%%'
+-_ACEOF
 -# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
- case `${MAKE-make} -f conftest.make 2>/dev/null` in
-   *@@@%%%=?*=@@@%%%*)
-     eval ac_cv_prog_make_${ac_make}_set=yes;;
-@@ -2636,11 +3633,11 @@ esac
- rm -f conftest.make
- fi
- if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+-case `${MAKE-make} -f conftest.make 2>/dev/null` in
+-  *@@@%%%=?*=@@@%%%*)
+-    eval ac_cv_prog_make_${ac_make}_set=yes;;
+-  *)
+-    eval ac_cv_prog_make_${ac_make}_set=no;;
+-esac
+-rm -f conftest.make
+-fi
+-if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
 -  { $as_echo "$as_me:$LINENO: result: yes" >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
- $as_echo "yes" >&6; }
-   SET_MAKE=
- else
+-$as_echo "yes" >&6; }
+-  SET_MAKE=
+-else
 -  { $as_echo "$as_me:$LINENO: result: no" >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
- $as_echo "no" >&6; }
-   SET_MAKE="MAKE=${MAKE-make}"
- fi
-@@ -2660,9 +3657,7 @@ if test "`cd $srcdir && pwd`" != "`pwd`"; then
-   am__isrc=' -I$(srcdir)'
-   # test to see if srcdir already configured
-   if test -f $srcdir/config.status; then
+-$as_echo "no" >&6; }
+-  SET_MAKE="MAKE=${MAKE-make}"
+-fi
+-
+-rm -rf .tst 2>/dev/null
+-mkdir .tst 2>/dev/null
+-if test -d .tst; then
+-  am__leading_dot=.
+-else
+-  am__leading_dot=_
+-fi
+-rmdir .tst 2>/dev/null
+-
+-if test "`cd $srcdir && pwd`" != "`pwd`"; then
+-  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+-  # is not polluted with repeated "-I."
+-  am__isrc=' -I$(srcdir)'
+-  # test to see if srcdir already configured
+-  if test -f $srcdir/config.status; then
 -    { { $as_echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
 -$as_echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
 -   { (exit 1); exit 1; }; }
-+    as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
-   fi
- fi
- 
-@@ -2734,35 +3729,27 @@ LIBS_SAVE="$LIBS"
- 
- # Make sure we can run config.sub.
- $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+-  fi
+-fi
+-
+-# test whether we have cygpath
+-if test -z "$CYGPATH_W"; then
+-  if (cygpath --version) >/dev/null 2>/dev/null; then
+-    CYGPATH_W='cygpath -w'
+-  else
+-    CYGPATH_W=echo
+-  fi
+-fi
+-
+-
+-# Define the identity of the package.
+- PACKAGE='mediatomb'
+- VERSION='0.12.1'
+-
+-
+-cat >>confdefs.h <<_ACEOF
+-#define PACKAGE "$PACKAGE"
+-_ACEOF
+-
+-
+-cat >>confdefs.h <<_ACEOF
+-#define VERSION "$VERSION"
+-_ACEOF
+-
+-# Some tools Automake needs.
+-
+-ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+-
+-
+-AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+-
+-
+-AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+-
+-
+-AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+-
+-
+-MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+-
+-# We need awk for the "check" target.  The system "awk" is bad on
+-# some platforms.
+-# Always define AMTAR for backward compatibility.
+-
+-AMTAR=${AMTAR-"${am_missing_run}tar"}
+-
+-am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
+-
+-
+-
+-
+-
+-
+-if test "x${prefix}" = "xNONE"; then
+-    prefix="${ac_default_prefix}"
+-fi
+-
+-SEARCH_DIR="/usr/local"
+-
+-DARWIN_OS=0
+-CYGWIN_OS=0
+-FREEBSD_OS=0
+-OPENBSD_OS=0
+-
+-LIBS_SAVE="$LIBS"
+-
+-# Make sure we can run config.sub.
+-$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
 -  { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
 -$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
 -   { (exit 1); exit 1; }; }
-+  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
- 
+-
 -{ $as_echo "$as_me:$LINENO: checking build system type" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
- $as_echo_n "checking build system type... " >&6; }
+-$as_echo_n "checking build system type... " >&6; }
 -if test "${ac_cv_build+set}" = set; then
-+if test "${ac_cv_build+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
-   ac_build_alias=$build_alias
- test "x$ac_build_alias" = x &&
-   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
- test "x$ac_build_alias" = x &&
+-  $as_echo_n "(cached) " >&6
+-else
+-  ac_build_alias=$build_alias
+-test "x$ac_build_alias" = x &&
+-  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+-test "x$ac_build_alias" = x &&
 -  { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
 -$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
 -   { (exit 1); exit 1; }; }
-+  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
- ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+-ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
 -  { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
 -$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
 -   { (exit 1); exit 1; }; }
-+  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
- 
- fi
+-
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
- $as_echo "$ac_cv_build" >&6; }
- case $ac_cv_build in
- *-*-*) ;;
+-$as_echo "$ac_cv_build" >&6; }
+-case $ac_cv_build in
+-*-*-*) ;;
 -*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
 -$as_echo "$as_me: error: invalid value of canonical build" >&2;}
 -   { (exit 1); exit 1; }; };;
-+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
- esac
- build=$ac_cv_build
- ac_save_IFS=$IFS; IFS='-'
-@@ -2778,28 +3765,24 @@ IFS=$ac_save_IFS
- case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
- 
- 
+-esac
+-build=$ac_cv_build
+-ac_save_IFS=$IFS; IFS='-'
+-set x $ac_cv_build
+-shift
+-build_cpu=$1
+-build_vendor=$2
+-shift; shift
+-# Remember, the first character of IFS is used to create $*,
+-# except with old shells:
+-build_os=$*
+-IFS=$ac_save_IFS
+-case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+-
+-
 -{ $as_echo "$as_me:$LINENO: checking host system type" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
- $as_echo_n "checking host system type... " >&6; }
+-$as_echo_n "checking host system type... " >&6; }
 -if test "${ac_cv_host+set}" = set; then
-+if test "${ac_cv_host+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
-   if test "x$host_alias" = x; then
-   ac_cv_host=$ac_cv_build
- else
-   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+-  $as_echo_n "(cached) " >&6
+-else
+-  if test "x$host_alias" = x; then
+-  ac_cv_host=$ac_cv_build
+-else
+-  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
 -    { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
 -$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
 -   { (exit 1); exit 1; }; }
-+    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
- fi
- 
- fi
+-fi
+-
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
- $as_echo "$ac_cv_host" >&6; }
- case $ac_cv_host in
- *-*-*) ;;
+-$as_echo "$ac_cv_host" >&6; }
+-case $ac_cv_host in
+-*-*-*) ;;
 -*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
 -$as_echo "$as_me: error: invalid value of canonical host" >&2;}
 -   { (exit 1); exit 1; }; };;
-+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
- esac
- host=$ac_cv_host
- ac_save_IFS=$IFS; IFS='-'
-@@ -2823,9 +3806,7 @@ case $host in
-         ;;
-     *-*-solaris*)
- 
+-esac
+-host=$ac_cv_host
+-ac_save_IFS=$IFS; IFS='-'
+-set x $ac_cv_host
+-shift
+-host_cpu=$1
+-host_vendor=$2
+-shift; shift
+-# Remember, the first character of IFS is used to create $*,
+-# except with old shells:
+-host_os=$*
+-IFS=$ac_save_IFS
+-case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+-
+-
+-
+-case $host in
+-    *-*-darwin*)
+-        DARWIN_OS=1
+-        SEARCH_DIR="/opt/local"
+-        ;;
+-    *-*-solaris*)
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define SOLARIS 1
 -_ACEOF
-+$as_echo "#define SOLARIS 1" >>confdefs.h
- 
-         ;;
-     *-*-cygwin*)
-@@ -2851,10 +3832,10 @@ esac
- 
- 
- # Check whether --with-search was given.
+-
+-        ;;
+-    *-*-cygwin*)
+-        CYGWIN_OS=1
+-        ;;
+-    *-*-freebsd*)
+-        FREEBSD_OS=1
+-        ;;
+-    *-*-openbsd*)
+-        OPENBSD_OS=1
+-        ;;
+-esac
+-
+-
+-
+-
+-    MT_SEARCHPATH="/usr/local"
+-    case $host in
+-        *-*-darwin*)
+-            MT_SEARCHPATH="/opt/local"
+-        ;;
+-    esac
+-
+-
+-# Check whether --with-search was given.
 -if test "${with_search+set}" = set; then
-+if test "${with_search+set}" = set; then :
-   withval=$with_search;
-             MT_SEARCHPATH=$withval
+-  withval=$with_search;
+-            MT_SEARCHPATH=$withval
 -            { $as_echo "$as_me:$LINENO: Will also search for packages in ${MT_SEARCHPATH}" >&5
-+            { $as_echo "$as_me:${as_lineno-$LINENO}: Will also search for packages in ${MT_SEARCHPATH}" >&5
- $as_echo "$as_me: Will also search for packages in ${MT_SEARCHPATH}" >&6;}
- 
- 
-@@ -2887,7 +3868,7 @@ SEARCH_DIR_PROGS="$SEARCH_DIR/bin"
- 
- 
- # Check whether --with-js-h was given.
+-$as_echo "$as_me: Will also search for packages in ${MT_SEARCHPATH}" >&6;}
+-
+-
+-fi
+-
+-
+-    MT_SEARCHPATH_HEADERS="${MT_SEARCHPATH}/include"
+-    MT_SEARCHPATH_LIBS="${MT_SEARCHPATH}/lib"
+-    MT_SEARCHPATH_PROGS="${MT_SEARCHPATH}/bin"
+-
+-
+-
+-
+-
+-
+-
+-#AC_ARG_WITH(search,
+-#        AC_HELP_STRING([--with-search=DIR], [Additionally search for packages in DIR]),
+-#        [
+-#            SEARCH_DIR=$withval
+-#            AC_MSG_NOTICE([Will also search for packages in $SEARCH_DIR])
+-#        ]
+-#)
+-
+-SEARCH_DIR_HEADERS="$SEARCH_DIR/include"
+-SEARCH_DIR_LIBS="$SEARCH_DIR/lib"
+-SEARCH_DIR_PROGS="$SEARCH_DIR/bin"
+-
+-# per package header and library search paths
+-
+-
+-# Check whether --with-js-h was given.
 -if test "${with_js_h+set}" = set; then
-+if test "${with_js_h+set}" = set; then :
-   withval=$with_js_h;
-             JS_SEARCH_HEADERS="$withval"
- 
-@@ -2897,7 +3878,7 @@ fi
- 
- 
- # Check whether --with-js-libs was given.
+-  withval=$with_js_h;
+-            JS_SEARCH_HEADERS="$withval"
+-
+-
+-fi
+-
+-
+-
+-# Check whether --with-js-libs was given.
 -if test "${with_js_libs+set}" = set; then
-+if test "${with_js_libs+set}" = set; then :
-   withval=$with_js_libs;
-             JS_SEARCH_LIBS="$withval"
- 
-@@ -2907,10 +3888,10 @@ fi
- 
- 
- # Check whether --with-iconv-h was given.
+-  withval=$with_js_libs;
+-            JS_SEARCH_LIBS="$withval"
+-
+-
+-fi
+-
+-
+-
+-# Check whether --with-iconv-h was given.
 -if test "${with_iconv_h+set}" = set; then
-+if test "${with_iconv_h+set}" = set; then :
-   withval=$with_iconv_h;
-             ICONV_SEARCH_HEADERS="$withval"
+-  withval=$with_iconv_h;
+-            ICONV_SEARCH_HEADERS="$withval"
 -            { $as_echo "$as_me:$LINENO: Will search for iconv headers in $withval" >&5
-+            { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for iconv headers in $withval" >&5
- $as_echo "$as_me: Will search for iconv headers in $withval" >&6;}
- 
- 
-@@ -2919,10 +3900,10 @@ fi
- 
- 
- # Check whether --with-iconv-libs was given.
+-$as_echo "$as_me: Will search for iconv headers in $withval" >&6;}
+-
+-
+-fi
+-
+-
+-
+-# Check whether --with-iconv-libs was given.
 -if test "${with_iconv_libs+set}" = set; then
-+if test "${with_iconv_libs+set}" = set; then :
-   withval=$with_iconv_libs;
-             ICONV_SEARCH_LIBS="$withval"
+-  withval=$with_iconv_libs;
+-            ICONV_SEARCH_LIBS="$withval"
 -            { $as_echo "$as_me:$LINENO: Will search for iconv libraries in $withval" >&5
-+            { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for iconv libraries in $withval" >&5
- $as_echo "$as_me: Will search for iconv libraries in $withval" >&6;}
- 
- 
-@@ -2940,7 +3921,7 @@ fi
-     fi
- 
-     # Check whether --enable-static was given.
+-$as_echo "$as_me: Will search for iconv libraries in $withval" >&6;}
+-
+-
+-fi
+-
+-
+-
+-
+-    mt_static_option_enabled=
+-    mt_static_option_requested=no
+-    if test "xenable" = xdisable; then
+-        mt_static_option_enabled=yes
+-    else
+-        mt_static_option_enabled=no
+-    fi
+-
+-    # Check whether --enable-static was given.
 -if test "${enable_static+set}" = set; then
-+if test "${enable_static+set}" = set; then :
-   enableval=$enable_static;
-             mt_static_option_enabled=$enableval
-             mt_static_option_requested=yes
-@@ -2955,18 +3936,17 @@ fi
- 
- 
- 
+-  enableval=$enable_static;
+-            mt_static_option_enabled=$enableval
+-            mt_static_option_requested=yes
+-
+-
+-fi
+-
+-
+-    STATIC_OPTION_ENABLED=${mt_static_option_enabled}
+-    STATIC_OPTION_REQUESTED=${mt_static_option_requested}
+-
+-
+-
+-
 -    if test "x${mt_static_option_enabled}" = xyes; then
-+    if test "x${mt_static_option_enabled}" = xyes; then :
- 
-             CFLAGS="$CFLAGS -static"
-             CXXFLAGS="$CXXFLAGS -static"
+-
+-            CFLAGS="$CFLAGS -static"
+-            CXXFLAGS="$CXXFLAGS -static"
 -            { $as_echo "$as_me:$LINENO: Building a static executable." >&5
-+            { $as_echo "$as_me:${as_lineno-$LINENO}: Building a static executable." >&5
- $as_echo "$as_me: Building a static executable." >&6;}
- 
- fi
- 
- 
- 
+-$as_echo "$as_me: Building a static executable." >&6;}
 -
-     mt_db_autocreate_option_enabled=
-     mt_db_autocreate_option_requested=no
-     if test "xdisable" = xdisable; then
-@@ -2976,7 +3956,7 @@ fi
-     fi
- 
-     # Check whether --enable-db-autocreate was given.
+-fi
+-
+-
+-
+-
+-    mt_db_autocreate_option_enabled=
+-    mt_db_autocreate_option_requested=no
+-    if test "xdisable" = xdisable; then
+-        mt_db_autocreate_option_enabled=yes
+-    else
+-        mt_db_autocreate_option_enabled=no
+-    fi
+-
+-    # Check whether --enable-db-autocreate was given.
 -if test "${enable_db_autocreate+set}" = set; then
-+if test "${enable_db_autocreate+set}" = set; then :
-   enableval=$enable_db_autocreate;
-             mt_db_autocreate_option_enabled=$enableval
-             mt_db_autocreate_option_requested=yes
-@@ -2991,7 +3971,9 @@ fi
- 
- 
- 
-+    if test "x${mt_db_autocreate_option_enabled}" = xyes; then :
- 
-+fi
- 
- 
- 
-@@ -3004,7 +3986,7 @@ fi
-     fi
- 
-     # Check whether --enable-debug-malloc0 was given.
+-  enableval=$enable_db_autocreate;
+-            mt_db_autocreate_option_enabled=$enableval
+-            mt_db_autocreate_option_requested=yes
+-
+-
+-fi
+-
+-
+-    DB_AUTOCREATE_OPTION_ENABLED=${mt_db_autocreate_option_enabled}
+-    DB_AUTOCREATE_OPTION_REQUESTED=${mt_db_autocreate_option_requested}
+-
+-
+-
+-
+-
+-
+-
+-
+-    mt_debug_malloc0_option_enabled=
+-    mt_debug_malloc0_option_requested=no
+-    if test "xenable" = xdisable; then
+-        mt_debug_malloc0_option_enabled=yes
+-    else
+-        mt_debug_malloc0_option_enabled=no
+-    fi
+-
+-    # Check whether --enable-debug-malloc0 was given.
 -if test "${enable_debug_malloc0+set}" = set; then
-+if test "${enable_debug_malloc0+set}" = set; then :
-   enableval=$enable_debug_malloc0;
-             mt_debug_malloc0_option_enabled=$enableval
-             mt_debug_malloc0_option_requested=yes
-@@ -3019,12 +4001,10 @@ fi
- 
- 
- 
+-  enableval=$enable_debug_malloc0;
+-            mt_debug_malloc0_option_enabled=$enableval
+-            mt_debug_malloc0_option_requested=yes
+-
+-
+-fi
+-
+-
+-    DEBUG_MALLOC0_OPTION_ENABLED=${mt_debug_malloc0_option_enabled}
+-    DEBUG_MALLOC0_OPTION_REQUESTED=${mt_debug_malloc0_option_requested}
+-
+-
+-
+-
 -    if test "x${mt_debug_malloc0_option_enabled}" = xyes; then
-+    if test "x${mt_debug_malloc0_option_enabled}" = xyes; then :
- 
- 
+-
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define DEBUG_MALLOC_0 1
 -_ACEOF
-+$as_echo "#define DEBUG_MALLOC_0 1" >>confdefs.h
- 
- 
- fi
-@@ -3032,7 +4012,6 @@ fi
- 
- 
- 
 -
-     mt_pthread_lib_option_enabled=
-     mt_pthread_lib_option_requested=no
-     if test "xenable" = xdisable; then
-@@ -3042,7 +4021,7 @@ fi
-     fi
- 
-     # Check whether --enable-pthread-lib was given.
+-
+-fi
+-
+-
+-
+-
+-
+-    mt_pthread_lib_option_enabled=
+-    mt_pthread_lib_option_requested=no
+-    if test "xenable" = xdisable; then
+-        mt_pthread_lib_option_enabled=yes
+-    else
+-        mt_pthread_lib_option_enabled=no
+-    fi
+-
+-    # Check whether --enable-pthread-lib was given.
 -if test "${enable_pthread_lib+set}" = set; then
-+if test "${enable_pthread_lib+set}" = set; then :
-   enableval=$enable_pthread_lib;
-             mt_pthread_lib_option_enabled=$enableval
-             mt_pthread_lib_option_requested=yes
-@@ -3057,7 +4036,9 @@ fi
- 
- 
- 
-+    if test "x${mt_pthread_lib_option_enabled}" = xyes; then :
- 
-+fi
- 
- 
- 
-@@ -3070,7 +4051,7 @@ fi
-     fi
- 
-     # Check whether --enable-iconv-lib was given.
+-  enableval=$enable_pthread_lib;
+-            mt_pthread_lib_option_enabled=$enableval
+-            mt_pthread_lib_option_requested=yes
+-
+-
+-fi
+-
+-
+-    PTHREAD_LIB_OPTION_ENABLED=${mt_pthread_lib_option_enabled}
+-    PTHREAD_LIB_OPTION_REQUESTED=${mt_pthread_lib_option_requested}
+-
+-
+-
+-
+-
+-
+-
+-
+-    mt_iconv_lib_option_enabled=
+-    mt_iconv_lib_option_requested=no
+-    if test "xenable" = xdisable; then
+-        mt_iconv_lib_option_enabled=yes
+-    else
+-        mt_iconv_lib_option_enabled=no
+-    fi
+-
+-    # Check whether --enable-iconv-lib was given.
 -if test "${enable_iconv_lib+set}" = set; then
-+if test "${enable_iconv_lib+set}" = set; then :
-   enableval=$enable_iconv_lib;
-             mt_iconv_lib_option_enabled=$enableval
-             mt_iconv_lib_option_requested=yes
-@@ -3085,7 +4066,9 @@ fi
- 
- 
- 
-+    if test "x${mt_iconv_lib_option_enabled}" = xyes; then :
- 
-+fi
- 
- 
- ATOMIC_X86_SMP=0
-@@ -3115,7 +4098,7 @@ ATOMIC_X86=0
-     fi
- 
-     # Check whether --enable-atomic-x86-single was given.
+-  enableval=$enable_iconv_lib;
+-            mt_iconv_lib_option_enabled=$enableval
+-            mt_iconv_lib_option_requested=yes
+-
+-
+-fi
+-
+-
+-    ICONV_LIB_OPTION_ENABLED=${mt_iconv_lib_option_enabled}
+-    ICONV_LIB_OPTION_REQUESTED=${mt_iconv_lib_option_requested}
+-
+-
+-
+-
+-
+-
+-
+-ATOMIC_X86_SMP=0
+-ATOMIC_X86_SMP_REQ=0
+-X86=0
+-case $host_cpu in
+-    *86)
+-        ATOMIC_X86_SMP=1
+-        X86=1
+-    ;;
+-    *86*64)
+-        ATOMIC_X86_SMP=1
+-        X86=1
+-    ;;
+-esac
+-
+-ATOMIC_X86=0
+-
+-
+-
+-    mt_atomic_x86_single_option_enabled=
+-    mt_atomic_x86_single_option_requested=no
+-    if test "xenable" = xdisable; then
+-        mt_atomic_x86_single_option_enabled=yes
+-    else
+-        mt_atomic_x86_single_option_enabled=no
+-    fi
+-
+-    # Check whether --enable-atomic-x86-single was given.
 -if test "${enable_atomic_x86_single+set}" = set; then
-+if test "${enable_atomic_x86_single+set}" = set; then :
-   enableval=$enable_atomic_x86_single;
-             mt_atomic_x86_single_option_enabled=$enableval
-             mt_atomic_x86_single_option_requested=yes
-@@ -3130,28 +4113,23 @@ fi
- 
- 
- 
+-  enableval=$enable_atomic_x86_single;
+-            mt_atomic_x86_single_option_enabled=$enableval
+-            mt_atomic_x86_single_option_requested=yes
+-
+-
+-fi
+-
+-
+-    ATOMIC_X86_SINGLE_OPTION_ENABLED=${mt_atomic_x86_single_option_enabled}
+-    ATOMIC_X86_SINGLE_OPTION_REQUESTED=${mt_atomic_x86_single_option_requested}
+-
+-
+-
+-
 -    if test "x${mt_atomic_x86_single_option_enabled}" = xyes; then
-+    if test "x${mt_atomic_x86_single_option_enabled}" = xyes; then :
- 
-               if test "$X86" -eq 1; then
-                     ATOMIC_X86=1
-                     ATOMIC_X86_SMP=0
-               else
+-
+-              if test "$X86" -eq 1; then
+-                    ATOMIC_X86=1
+-                    ATOMIC_X86_SMP=0
+-              else
 -                    { { $as_echo "$as_me:$LINENO: error: Tried to activate x86 specific option for a non x86 host!" >&5
 -$as_echo "$as_me: error: Tried to activate x86 specific option for a non x86 host!" >&2;}
 -   { (exit 1); exit 1; }; }
-+                    as_fn_error $? "Tried to activate x86 specific option for a non x86 host!" "$LINENO" 5
-               fi
- 
- fi
- 
+-              fi
 -
- # Check whether --enable-atomic-pthread was given.
+-fi
+-
+-
+-# Check whether --enable-atomic-pthread was given.
 -if test "${enable_atomic_pthread+set}" = set; then
-+if test "${enable_atomic_pthread+set}" = set; then :
-   enableval=$enable_atomic_pthread;
-                 if test "x$enableval" = xyes; then
-                     if test "$ATOMIC_X86" -eq 1; then
+-  enableval=$enable_atomic_pthread;
+-                if test "x$enableval" = xyes; then
+-                    if test "$ATOMIC_X86" -eq 1; then
 -                        { { $as_echo "$as_me:$LINENO: error: You can not use atomic-x86-single and atomic-pthread code at the same time!" >&5
 -$as_echo "$as_me: error: You can not use atomic-x86-single and atomic-pthread code at the same time!" >&2;}
 -   { (exit 1); exit 1; }; }
-+                        as_fn_error $? "You can not use atomic-x86-single and atomic-pthread code at the same time!" "$LINENO" 5
-                     else
-                         ATOMIC_X86=0
-                         ATOMIC_X86_SMP=0
-@@ -3173,7 +4151,7 @@ fi
-     fi
- 
-     # Check whether --enable-atomic was given.
+-                    else
+-                        ATOMIC_X86=0
+-                        ATOMIC_X86_SMP=0
+-                    fi
+-                fi
+-
+-
+-fi
+-
+-
+-
+-
+-    mt_atomic_option_enabled=
+-    mt_atomic_option_requested=no
+-    if test "xdisable" = xdisable; then
+-        mt_atomic_option_enabled=yes
+-    else
+-        mt_atomic_option_enabled=no
+-    fi
+-
+-    # Check whether --enable-atomic was given.
 -if test "${enable_atomic+set}" = set; then
-+if test "${enable_atomic+set}" = set; then :
-   enableval=$enable_atomic;
-             mt_atomic_option_enabled=$enableval
-             mt_atomic_option_requested=yes
-@@ -3188,49 +4166,38 @@ fi
- 
- 
- 
+-  enableval=$enable_atomic;
+-            mt_atomic_option_enabled=$enableval
+-            mt_atomic_option_requested=yes
+-
+-
+-fi
+-
+-
+-    ATOMIC_OPTION_ENABLED=${mt_atomic_option_enabled}
+-    ATOMIC_OPTION_REQUESTED=${mt_atomic_option_requested}
+-
+-
+-
+-
 -    if test "x${mt_atomic_option_enabled}" = xyes; then
 -  :
-+    if test "x${mt_atomic_option_enabled}" = xyes; then :
-+
- else
- 
-               ATOMIC_X86=0
-               ATOMIC_X86_SMP=0
+-else
+-
+-              ATOMIC_X86=0
+-              ATOMIC_X86_SMP=0
 -              { $as_echo "$as_me:$LINENO: WARNING: You disabled the use of atomic arithmetics! You have been warned!" >&5
-+              { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You disabled the use of atomic arithmetics! You have been warned!" >&5
- $as_echo "$as_me: WARNING: You disabled the use of atomic arithmetics! You have been warned!" >&2;}
- 
+-$as_echo "$as_me: WARNING: You disabled the use of atomic arithmetics! You have been warned!" >&2;}
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define ATOMIC_TORTURE 1
 -_ACEOF
-+$as_echo "#define ATOMIC_TORTURE 1" >>confdefs.h
- 
- 
- fi
- 
 -
- if ((test $ATOMIC_X86_SMP -eq 1) && (test $ATOMIC_X86 -eq 1)); then
+-
+-fi
+-
+-
+-if ((test $ATOMIC_X86_SMP -eq 1) && (test $ATOMIC_X86 -eq 1)); then
 -    { { $as_echo "$as_me:$LINENO: error: Cannot use atomic-x86-smp and atomic-x86 options at the same time!" >&5
 -$as_echo "$as_me: error: Cannot use atomic-x86-smp and atomic-x86 options at the same time!" >&2;}
 -   { (exit 1); exit 1; }; }
-+    as_fn_error $? "Cannot use atomic-x86-smp and atomic-x86 options at the same time!" "$LINENO" 5
- fi
- 
- if (((test $ATOMIC_X86_SMP -eq 1) || (test $ATOMIC_X86 -eq 1)) &&
-      (test "$X86" -eq 0)); then
+-fi
+-
+-if (((test $ATOMIC_X86_SMP -eq 1) || (test $ATOMIC_X86 -eq 1)) &&
+-     (test "$X86" -eq 0)); then
 -    { { $as_echo "$as_me:$LINENO: error: Cannot use x86 specific code on a non a $host_cpu system!" >&5
 -$as_echo "$as_me: error: Cannot use x86 specific code on a non a $host_cpu system!" >&2;}
 -   { (exit 1); exit 1; }; }
-+    as_fn_error $? "Cannot use x86 specific code on a non a $host_cpu system!" "$LINENO" 5
- fi
- 
- if test $ATOMIC_X86_SMP -eq 1; then
- 
+-fi
+-
+-if test $ATOMIC_X86_SMP -eq 1; then
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define ATOMIC_X86_SMP 1
 -_ACEOF
-+$as_echo "#define ATOMIC_X86_SMP 1" >>confdefs.h
- 
- elif test $ATOMIC_X86 -eq 1; then
- 
+-
+-elif test $ATOMIC_X86 -eq 1; then
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define ATOMIC_X86 1
 -_ACEOF
-+$as_echo "#define ATOMIC_X86 1" >>confdefs.h
- 
+-
 -    { $as_echo "$as_me:$LINENO: WARNING: You specified to use atomic arithmetics code for x86 single processor systems! The resulting binary must not be used on SMP machines!" >&5
-+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You specified to use atomic arithmetics code for x86 single processor systems! The resulting binary must not be used on SMP machines!" >&5
- $as_echo "$as_me: WARNING: You specified to use atomic arithmetics code for x86 single processor systems! The resulting binary must not be used on SMP machines!" >&2;}
- fi
- 
-@@ -3241,7 +4208,7 @@ if test $X86 -eq 1; then
- fi
- 
- # Check whether --enable-sighup was given.
+-$as_echo "$as_me: WARNING: You specified to use atomic arithmetics code for x86 single processor systems! The resulting binary must not be used on SMP machines!" >&2;}
+-fi
+-
+-
+-SIGHUP=0
+-if test $X86 -eq 1; then
+-    SIGHUP=1
+-fi
+-
+-# Check whether --enable-sighup was given.
 -if test "${enable_sighup+set}" = set; then
-+if test "${enable_sighup+set}" = set; then :
-   enableval=$enable_sighup;
-                 if test "x$enableval" = xno; then
-                     SIGHUP=0
-@@ -3255,9 +4222,7 @@ fi
- 
- if test $SIGHUP -eq 1; then
- 
+-  enableval=$enable_sighup;
+-                if test "x$enableval" = xno; then
+-                    SIGHUP=0
+-                else
+-                    SIGHUP=1
+-                fi
+-
+-
+-fi
+-
+-
+-if test $SIGHUP -eq 1; then
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define ENABLE_SIGHUP 1
 -_ACEOF
-+$as_echo "#define ENABLE_SIGHUP 1" >>confdefs.h
- 
- fi
- 
-@@ -3272,7 +4237,7 @@ fi
-     fi
- 
-     # Check whether --enable-mrreg-service was given.
+-
+-fi
+-
+-
+-
+-    mt_mrreg_service_option_enabled=
+-    mt_mrreg_service_option_requested=no
+-    if test "xenable" = xdisable; then
+-        mt_mrreg_service_option_enabled=yes
+-    else
+-        mt_mrreg_service_option_enabled=no
+-    fi
+-
+-    # Check whether --enable-mrreg-service was given.
 -if test "${enable_mrreg_service+set}" = set; then
-+if test "${enable_mrreg_service+set}" = set; then :
-   enableval=$enable_mrreg_service;
-             mt_mrreg_service_option_enabled=$enableval
-             mt_mrreg_service_option_requested=yes
-@@ -3287,19 +4252,16 @@ fi
- 
- 
- 
+-  enableval=$enable_mrreg_service;
+-            mt_mrreg_service_option_enabled=$enableval
+-            mt_mrreg_service_option_requested=yes
+-
+-
+-fi
+-
+-
+-    MRREG_SERVICE_OPTION_ENABLED=${mt_mrreg_service_option_enabled}
+-    MRREG_SERVICE_OPTION_REQUESTED=${mt_mrreg_service_option_requested}
+-
+-
+-
+-
 -    if test "x${mt_mrreg_service_option_enabled}" = xyes; then
-+    if test "x${mt_mrreg_service_option_enabled}" = xyes; then :
- 
- 
+-
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define ENABLE_MRREG 1
 -_ACEOF
-+$as_echo "#define ENABLE_MRREG 1" >>confdefs.h
- 
- 
- fi
- 
- 
- 
 -
-     mt_external_transcoding_option_enabled=
-     mt_external_transcoding_option_requested=no
-     if test "xdisable" = xdisable; then
-@@ -3309,7 +4271,7 @@ fi
-     fi
- 
-     # Check whether --enable-external-transcoding was given.
+-
+-fi
+-
+-
+-
+-
+-    mt_external_transcoding_option_enabled=
+-    mt_external_transcoding_option_requested=no
+-    if test "xdisable" = xdisable; then
+-        mt_external_transcoding_option_enabled=yes
+-    else
+-        mt_external_transcoding_option_enabled=no
+-    fi
+-
+-    # Check whether --enable-external-transcoding was given.
 -if test "${enable_external_transcoding+set}" = set; then
-+if test "${enable_external_transcoding+set}" = set; then :
-   enableval=$enable_external_transcoding;
-             mt_external_transcoding_option_enabled=$enableval
-             mt_external_transcoding_option_requested=yes
-@@ -3324,15 +4286,14 @@ fi
- 
- 
- 
+-  enableval=$enable_external_transcoding;
+-            mt_external_transcoding_option_enabled=$enableval
+-            mt_external_transcoding_option_requested=yes
+-
+-
+-fi
+-
+-
+-    EXTERNAL_TRANSCODING_OPTION_ENABLED=${mt_external_transcoding_option_enabled}
+-    EXTERNAL_TRANSCODING_OPTION_REQUESTED=${mt_external_transcoding_option_requested}
+-
+-
+-
+-
 -    if test "x${mt_external_transcoding_option_enabled}" = xyes; then
 -  :
-+    if test "x${mt_external_transcoding_option_enabled}" = xyes; then :
-+
- else
-   EXTERNAL_TRANSCODING_OPTION_ENABLED=disabled
- fi
- 
- 
- 
+-else
+-  EXTERNAL_TRANSCODING_OPTION_ENABLED=disabled
+-fi
 -
-     mt_youtube_option_enabled=
-     mt_youtube_option_requested=no
-     if test "xdisable" = xdisable; then
-@@ -3342,7 +4303,7 @@ fi
-     fi
- 
-     # Check whether --enable-youtube was given.
+-
+-
+-
+-    mt_youtube_option_enabled=
+-    mt_youtube_option_requested=no
+-    if test "xdisable" = xdisable; then
+-        mt_youtube_option_enabled=yes
+-    else
+-        mt_youtube_option_enabled=no
+-    fi
+-
+-    # Check whether --enable-youtube was given.
 -if test "${enable_youtube+set}" = set; then
-+if test "${enable_youtube+set}" = set; then :
-   enableval=$enable_youtube;
-             mt_youtube_option_enabled=$enableval
-             mt_youtube_option_requested=yes
-@@ -3357,13 +4318,12 @@ fi
- 
- 
- 
+-  enableval=$enable_youtube;
+-            mt_youtube_option_enabled=$enableval
+-            mt_youtube_option_requested=yes
+-
+-
+-fi
+-
+-
+-    YOUTUBE_OPTION_ENABLED=${mt_youtube_option_enabled}
+-    YOUTUBE_OPTION_REQUESTED=${mt_youtube_option_requested}
+-
+-
+-
+-
 -    if test "x${mt_youtube_option_enabled}" = xyes; then
 -  :
-+    if test "x${mt_youtube_option_enabled}" = xyes; then :
-+
- else
-   YOUTUBE_OPTION_ENABLED=disabled
- fi
- 
+-else
+-  YOUTUBE_OPTION_ENABLED=disabled
+-fi
 -
- #MT_OPTION([weborama], [disable],
- #          [Weborama service support],
- #          [],[WEBORAMA_OPTION_ENABLED=disabled])
-@@ -3379,7 +4339,7 @@ fi
-     fi
- 
-     # Check whether --enable-sqlite-backup-defaults was given.
+-
+-#MT_OPTION([weborama], [disable],
+-#          [Weborama service support],
+-#          [],[WEBORAMA_OPTION_ENABLED=disabled])
+-
+-
+-
+-    mt_sqlite_backup_defaults_option_enabled=
+-    mt_sqlite_backup_defaults_option_requested=no
+-    if test "xenable" = xdisable; then
+-        mt_sqlite_backup_defaults_option_enabled=yes
+-    else
+-        mt_sqlite_backup_defaults_option_enabled=no
+-    fi
+-
+-    # Check whether --enable-sqlite-backup-defaults was given.
 -if test "${enable_sqlite_backup_defaults+set}" = set; then
-+if test "${enable_sqlite_backup_defaults+set}" = set; then :
-   enableval=$enable_sqlite_backup_defaults;
-             mt_sqlite_backup_defaults_option_enabled=$enableval
-             mt_sqlite_backup_defaults_option_requested=yes
-@@ -3394,7 +4354,9 @@ fi
- 
- 
- 
-+    if test "x${mt_sqlite_backup_defaults_option_enabled}" = xyes; then :
- 
-+fi
- 
- 
- 
-@@ -3407,7 +4369,7 @@ fi
-     fi
- 
-     # Check whether --enable-protocolinfo-extension was given.
+-  enableval=$enable_sqlite_backup_defaults;
+-            mt_sqlite_backup_defaults_option_enabled=$enableval
+-            mt_sqlite_backup_defaults_option_requested=yes
+-
+-
+-fi
+-
+-
+-    SQLITE_BACKUP_DEFAULTS_OPTION_ENABLED=${mt_sqlite_backup_defaults_option_enabled}
+-    SQLITE_BACKUP_DEFAULTS_OPTION_REQUESTED=${mt_sqlite_backup_defaults_option_requested}
+-
+-
+-
+-
+-
+-
+-
+-
+-    mt_protocolinfo_extension_option_enabled=
+-    mt_protocolinfo_extension_option_requested=no
+-    if test "xdisable" = xdisable; then
+-        mt_protocolinfo_extension_option_enabled=yes
+-    else
+-        mt_protocolinfo_extension_option_enabled=no
+-    fi
+-
+-    # Check whether --enable-protocolinfo-extension was given.
 -if test "${enable_protocolinfo_extension+set}" = set; then
-+if test "${enable_protocolinfo_extension+set}" = set; then :
-   enableval=$enable_protocolinfo_extension;
-             mt_protocolinfo_extension_option_enabled=$enableval
-             mt_protocolinfo_extension_option_requested=yes
-@@ -3422,21 +4384,18 @@ fi
- 
- 
- 
+-  enableval=$enable_protocolinfo_extension;
+-            mt_protocolinfo_extension_option_enabled=$enableval
+-            mt_protocolinfo_extension_option_requested=yes
+-
+-
+-fi
+-
+-
+-    PROTOCOLINFO_EXTENSION_OPTION_ENABLED=${mt_protocolinfo_extension_option_enabled}
+-    PROTOCOLINFO_EXTENSION_OPTION_REQUESTED=${mt_protocolinfo_extension_option_requested}
+-
+-
+-
+-
 -    if test "x${mt_protocolinfo_extension_option_enabled}" = xyes; then
-+    if test "x${mt_protocolinfo_extension_option_enabled}" = xyes; then :
- 
- 
+-
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define EXTEND_PROTOCOLINFO 1
 -_ACEOF
-+$as_echo "#define EXTEND_PROTOCOLINFO 1" >>confdefs.h
- 
- 
- fi
- 
 -
- USE_CURL=1
- CURL_REQUESTED=0
- # Check whether --enable-curl was given.
+-
+-fi
+-
+-
+-USE_CURL=1
+-CURL_REQUESTED=0
+-# Check whether --enable-curl was given.
 -if test "${enable_curl+set}" = set; then
-+if test "${enable_curl+set}" = set; then :
-   enableval=$enable_curl;
-                 if test "x$enableval" = xno; then
-                     USE_CURL=0
-@@ -3452,10 +4411,10 @@ fi
- 
- 
- # Check whether --with-curl-cfg was given.
+-  enableval=$enable_curl;
+-                if test "x$enableval" = xno; then
+-                    USE_CURL=0
+-                    CURL_REQUESTED=1
+-                else
+-                    CURL_REQUESTED=1
+-                    USE_CURL=1
+-                fi
+-
+-
+-fi
+-
+-
+-
+-# Check whether --with-curl-cfg was given.
 -if test "${with_curl_cfg+set}" = set; then
-+if test "${with_curl_cfg+set}" = set; then :
-   withval=$with_curl_cfg;
-                 CURL_SEARCH_CONFIG="$withval"
+-  withval=$with_curl_cfg;
+-                CURL_SEARCH_CONFIG="$withval"
 -                { $as_echo "$as_me:$LINENO: Will search for curl-config in $withval" >&5
-+                { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for curl-config in $withval" >&5
- $as_echo "$as_me: Will search for curl-config in $withval" >&6;}
- 
- 
-@@ -3473,7 +4432,7 @@ fi
-     fi
- 
-     # Check whether --enable-fseeko-check was given.
+-$as_echo "$as_me: Will search for curl-config in $withval" >&6;}
+-
+-
+-fi
+-
+-
+-
+-
+-    mt_fseeko_check_option_enabled=
+-    mt_fseeko_check_option_requested=no
+-    if test "xdisable" = xdisable; then
+-        mt_fseeko_check_option_enabled=yes
+-    else
+-        mt_fseeko_check_option_enabled=no
+-    fi
+-
+-    # Check whether --enable-fseeko-check was given.
 -if test "${enable_fseeko_check+set}" = set; then
-+if test "${enable_fseeko_check+set}" = set; then :
-   enableval=$enable_fseeko_check;
-             mt_fseeko_check_option_enabled=$enableval
-             mt_fseeko_check_option_requested=yes
-@@ -3488,7 +4447,9 @@ fi
- 
- 
- 
-+    if test "x${mt_fseeko_check_option_enabled}" = xyes; then :
- 
-+fi
- 
- ###############################################################################
- # The following block is derived from the configure.ac script from the
-@@ -3533,9 +4494,9 @@ if test -z "$CXX"; then
-   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
+-  enableval=$enable_fseeko_check;
+-            mt_fseeko_check_option_enabled=$enableval
+-            mt_fseeko_check_option_requested=yes
+-
+-
+-fi
+-
+-
+-    FSEEKO_CHECK_OPTION_ENABLED=${mt_fseeko_check_option_enabled}
+-    FSEEKO_CHECK_OPTION_REQUESTED=${mt_fseeko_check_option_requested}
+-
+-
+-
+-
+-
+-
+-###############################################################################
+-# The following block is derived from the configure.ac script from the
+-# libupnp-1.3.1 package
+-# (C) Copyright 2005-2006 Remi Turboult <r3mi at users.sourceforge.net>
+-upnpmaj=0
+-upnpmin=4
+-upnppatch=1
+-
+-cat >>confdefs.h <<_ACEOF
+-#define UPNP_VERSION_STRING "$PACKAGE_VERSION"
+-_ACEOF
+-
+-
+-cat >>confdefs.h <<_ACEOF
+-#define UPNP_VERSION_MAJOR $upnpmaj
+-_ACEOF
+-
+-
+-cat >>confdefs.h <<_ACEOF
+-#define UPNP_VERSION_MINOR $upnpmin
+-_ACEOF
+-
+-
+-cat >>confdefs.h <<_ACEOF
+-#define UPNP_VERSION_PATCH $upnppatch
+-_ACEOF
+-
+-###############################################################################
+-
+-ac_ext=cpp
+-ac_cpp='$CXXCPP $CPPFLAGS'
+-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+-if test -z "$CXX"; then
+-  if test -n "$CCC"; then
+-    CXX=$CCC
+-  else
+-    if test -n "$ac_tool_prefix"; then
+-  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+-  do
+-    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
- $as_echo_n "checking for $ac_word... " >&6; }
+-$as_echo_n "checking for $ac_word... " >&6; }
 -if test "${ac_cv_prog_CXX+set}" = set; then
-+if test "${ac_cv_prog_CXX+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
-   if test -n "$CXX"; then
-@@ -3546,24 +4507,24 @@ for as_dir in $PATH
- do
-   IFS=$as_save_IFS
-   test -z "$as_dir" && as_dir=.
+-  $as_echo_n "(cached) " >&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
-+    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"
+-  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"
 -    $as_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
+-    break 2
+-  fi
 -done
-+  done
- IFS=$as_save_IFS
- 
- fi
- fi
- CXX=$ac_cv_prog_CXX
- if test -n "$CXX"; then
+-done
+-IFS=$as_save_IFS
+-
+-fi
+-fi
+-CXX=$ac_cv_prog_CXX
+-if test -n "$CXX"; then
 -  { $as_echo "$as_me:$LINENO: result: $CXX" >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
- $as_echo "$CXX" >&6; }
- else
+-$as_echo "$CXX" >&6; }
+-else
 -  { $as_echo "$as_me:$LINENO: result: no" >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
- $as_echo "no" >&6; }
- fi
- 
-@@ -3577,9 +4538,9 @@ if test -z "$CXX"; then
- do
-   # Extract the first word of "$ac_prog", so it can be a program name with args.
- set dummy $ac_prog; ac_word=$2
+-$as_echo "no" >&6; }
+-fi
+-
+-
+-    test -n "$CXX" && break
+-  done
+-fi
+-if test -z "$CXX"; then
+-  ac_ct_CXX=$CXX
+-  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+-do
+-  # Extract the first word of "$ac_prog", so it can be a program name with args.
+-set dummy $ac_prog; ac_word=$2
 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
- $as_echo_n "checking for $ac_word... " >&6; }
+-$as_echo_n "checking for $ac_word... " >&6; }
 -if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
-+if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
-   if test -n "$ac_ct_CXX"; then
-@@ -3590,24 +4551,24 @@ for as_dir in $PATH
- do
-   IFS=$as_save_IFS
-   test -z "$as_dir" && as_dir=.
+-  $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.
+-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
-+    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"
+-  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"
 -    $as_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
+-    break 2
+-  fi
 -done
-+  done
- IFS=$as_save_IFS
- 
- fi
- fi
- ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
- if test -n "$ac_ct_CXX"; then
+-done
+-IFS=$as_save_IFS
+-
+-fi
+-fi
+-ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
+-if test -n "$ac_ct_CXX"; then
 -  { $as_echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
- $as_echo "$ac_ct_CXX" >&6; }
- else
+-$as_echo "$ac_ct_CXX" >&6; }
+-else
 -  { $as_echo "$as_me:$LINENO: result: no" >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
- $as_echo "no" >&6; }
- fi
- 
-@@ -3620,7 +4581,7 @@ done
-   else
-     case $cross_compiling:$ac_tool_warned in
- yes:)
+-$as_echo "no" >&6; }
+-fi
+-
+-
+-  test -n "$ac_ct_CXX" && break
+-done
+-
+-  if test "x$ac_ct_CXX" = x; then
+-    CXX="g++"
+-  else
+-    case $cross_compiling:$ac_tool_warned in
+-yes:)
 -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
-+{ $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
-@@ -3631,48 +4592,31 @@ fi
-   fi
- fi
- # Provide some information about the compiler.
+-$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.
 -$as_echo "$as_me:$LINENO: checking for C++ compiler version" >&5
-+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
- set X $ac_compile
- ac_compiler=$2
+-set X $ac_compile
+-ac_compiler=$2
 -{ (ac_try="$ac_compiler --version >&5"
-+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
+-case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
 -  (eval "$ac_compiler --version >&5") 2>&5
-+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=$?
+-  ac_status=$?
 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
 -  (exit $ac_status); }
 -{ (ac_try="$ac_compiler -v >&5"
@@ -3529,105 +3945,108 @@ index f51d803..459bf70 100755
 -  ac_status=$?
 -  $as_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
-@@ -3688,8 +4632,8 @@ 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.
+-/* end confdefs.h.  */
+-
+-int
+-main ()
+-{
+-
+-  ;
+-  return 0;
+-}
+-_ACEOF
+-ac_clean_files_save=$ac_clean_files
+-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.
 -{ $as_echo "$as_me:$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}: 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:
-@@ -3705,17 +4649,17 @@ do
- done
- rm -f $ac_rmfiles
- 
+-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"
-+if { { ac_try="$ac_link_default"
- case "(($ac_try" in
-   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-   *) ac_try_echo=$ac_try;;
- esac
+-case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
-+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=$?
+-  (eval "$ac_link_default") 2>&5
+-  ac_status=$?
 -  $as_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 :
-   # 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,
-@@ -3732,7 +4676,7 @@ do
- 	# certainly right.
- 	break;;
-     *.* )
+-  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+-# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+-# in a Makefile.  We should not override ac_cv_exeext if it was cached,
+-# so that the user can short-circuit this test for compilers unknown to
+-# Autoconf.
+-for ac_file in $ac_files ''
+-do
+-  test -f "$ac_file" || continue
+-  case $ac_file in
+-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
+-	;;
+-    [ab].out )
+-	# We found the default executable, but exeext='' is most
+-	# certainly right.
+-	break;;
+-    *.* )
 -        if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
-+	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
- 	then :; else
- 	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- 	fi
-@@ -3751,84 +4695,41 @@ test "$ac_cv_exeext" = no && ac_cv_exeext=
- else
-   ac_file=''
- fi
+-	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
+-  ac_file=''
+-fi
 -
 -{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5
 -$as_echo "$ac_file" >&6; }
 -if test -z "$ac_file"; then
 -  $as_echo "$as_me: failed program was:" >&5
-+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
- 
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
 -{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-+{ { $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: error: in \`$ac_pwd':" >&2;}
 -{ { $as_echo "$as_me:$LINENO: error: C++ compiler cannot create executables
 -See \`config.log' for more details." >&5
 -$as_echo "$as_me: error: C++ compiler cannot create executables
 -See \`config.log' for more details." >&2;}
 -   { (exit 77); exit 77; }; }; }
-+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
+-fi
+-
+-ac_exeext=$ac_cv_exeext
 -
-+{ $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
- 
 -# Check that the compiler produces executables we can run.  If not, either
 -# the compiler is broken, or we cross compile.
 -{ $as_echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
@@ -3666,8 +4085,8 @@ index f51d803..459bf70 100755
 -{ $as_echo "$as_me:$LINENO: result: yes" >&5
 -$as_echo "yes" >&6; }
 -
- rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
- ac_clean_files=$ac_clean_files_save
+-rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
+-ac_clean_files=$ac_clean_files_save
 -# Check that the compiler produces executables we can run.  If not, either
 -# the compiler is broken, or we cross compile.
 -{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
@@ -3676,193 +4095,130 @@ index f51d803..459bf70 100755
 -$as_echo "$cross_compiling" >&6; }
 -
 -{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
- $as_echo_n "checking for suffix of executables... " >&6; }
+-$as_echo_n "checking for suffix of executables... " >&6; }
 -if { (ac_try="$ac_link"
-+if { { ac_try="$ac_link"
- case "(($ac_try" in
-   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-   *) ac_try_echo=$ac_try;;
- esac
+-case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
-+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=$?
+-  (eval "$ac_link") 2>&5
+-  ac_status=$?
 -  $as_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
-@@ -3843,32 +4744,83 @@ for ac_file in conftest.exe conftest conftest.*; do
-   esac
- done
- else
+-  # If both `conftest.exe' and `conftest' are `present' (well, observable)
+-# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
+-# work properly (i.e., refer to `conftest.exe'), while it won't with
+-# `rm'.
+-for ac_file in conftest.exe conftest conftest.*; do
+-  test -f "$ac_file" || continue
+-  case $ac_file in
+-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+-    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+-	  break;;
+-    * ) break;;
+-  esac
+-done
+-else
 -  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-+  { { $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: error: in \`$ac_pwd':" >&2;}
 -{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
 -See \`config.log' for more details." >&5
 -$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
 -See \`config.log' for more details." >&2;}
 -   { (exit 1); exit 1; }; }; }
-+as_fn_error $? "cannot compute suffix of executables: cannot compile and link
-+See \`config.log' for more details" "$LINENO" 5 ; }
- fi
+-fi
 -
 -rm -f conftest$ac_cv_exeext
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
-+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
+-$as_echo "$ac_cv_exeext" >&6; }
+-
+-rm -f conftest.$ac_ext
+-EXEEXT=$ac_cv_exeext
+-ac_exeext=$EXEEXT
 -{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5
-+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
-+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; }
+-$as_echo_n "checking for suffix of object files... " >&6; }
 -if test "${ac_cv_objext+set}" = set; then
-+if test "${ac_cv_objext+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
+-  $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
-@@ -3880,17 +4832,17 @@ main ()
- }
- _ACEOF
- rm -f conftest.o conftest.obj
+-/* end confdefs.h.  */
+-
+-int
+-main ()
+-{
+-
+-  ;
+-  return 0;
+-}
+-_ACEOF
+-rm -f conftest.o conftest.obj
 -if { (ac_try="$ac_compile"
-+if { { ac_try="$ac_compile"
- case "(($ac_try" in
-   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-   *) ac_try_echo=$ac_try;;
- esac
+-case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
-+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=$?
+-  (eval "$ac_compile") 2>&5
+-  ac_status=$?
 -  $as_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 :
-   for ac_file in conftest.o conftest.obj conftest.*; do
-   test -f "$ac_file" || continue;
-   case $ac_file in
-@@ -3903,31 +4855,23 @@ else
-   $as_echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- 
+-  for ac_file in conftest.o conftest.obj conftest.*; do
+-  test -f "$ac_file" || continue;
+-  case $ac_file in
+-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
+-    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+-       break;;
+-  esac
+-done
+-else
+-  $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
 -{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-+{ { $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: error: in \`$ac_pwd':" >&2;}
 -{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
 -See \`config.log' for more details." >&5
 -$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile
 -See \`config.log' for more details." >&2;}
 -   { (exit 1); exit 1; }; }; }
-+as_fn_error $? "cannot compute suffix of object files: cannot compile
-+See \`config.log' for more details" "$LINENO" 5 ; }
- fi
+-fi
 -
- rm -f conftest.$ac_cv_objext conftest.$ac_ext
- fi
+-rm -f conftest.$ac_cv_objext conftest.$ac_ext
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
-+{ $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
+-$as_echo "$ac_cv_objext" >&6; }
+-OBJEXT=$ac_cv_objext
+-ac_objext=$OBJEXT
 -{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
-+{ $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; }
+-$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
 -if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
-+if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
+-  $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
-@@ -3941,37 +4885,16 @@ main ()
-   return 0;
- }
- _ACEOF
+-/* end confdefs.h.  */
+-
+-int
+-main ()
+-{
+-#ifndef __GNUC__
+-       choke me
+-#endif
+-
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -3881,53 +4237,51 @@ index f51d803..459bf70 100755
 -	 test -z "$ac_cxx_werror_flag" ||
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
-+if ac_fn_cxx_try_compile "$LINENO"; then :
-   ac_compiler_gnu=yes
- else
+-  ac_compiler_gnu=yes
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_compiler_gnu=no
-+  ac_compiler_gnu=no
- fi
+-fi
 -
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
- 
- fi
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
+-
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
-+{ $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
-@@ -3980,20 +4903,16 @@ else
- fi
- ac_test_CXXFLAGS=${CXXFLAGS+set}
- ac_save_CXXFLAGS=$CXXFLAGS
+-$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
 -{ $as_echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
- $as_echo_n "checking whether $CXX accepts -g... " >&6; }
+-$as_echo_n "checking whether $CXX accepts -g... " >&6; }
 -if test "${ac_cv_prog_cxx_g+set}" = set; then
-+if test "${ac_cv_prog_cxx_g+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
-   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
-    ac_cxx_werror_flag=yes
-    ac_cv_prog_cxx_g=no
-    CXXFLAGS="-g"
+-  $as_echo_n "(cached) " >&6
+-else
+-  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
+-   ac_cxx_werror_flag=yes
+-   ac_cv_prog_cxx_g=no
+-   CXXFLAGS="-g"
 -   cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
- 
- int
-@@ -4004,35 +4923,11 @@ main ()
-   return 0;
- }
- _ACEOF
+-/* end confdefs.h.  */
+-
+-int
+-main ()
+-{
+-
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -3946,9 +4300,8 @@ index f51d803..459bf70 100755
 -	 test -z "$ac_cxx_werror_flag" ||
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
-+if ac_fn_cxx_try_compile "$LINENO"; then :
-   ac_cv_prog_cxx_g=yes
- else
+-  ac_cv_prog_cxx_g=yes
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
@@ -3958,15 +4311,16 @@ index f51d803..459bf70 100755
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+  CXXFLAGS=""
-+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
- 
- int
-@@ -4043,36 +4938,12 @@ main ()
-   return 0;
- }
- _ACEOF
+-/* end confdefs.h.  */
+-
+-int
+-main ()
+-{
+-
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -3989,25 +4343,24 @@ index f51d803..459bf70 100755
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+if ac_fn_cxx_try_compile "$LINENO"; then :
- 
+-
 -	ac_cxx_werror_flag=$ac_save_cxx_werror_flag
-+else
-+  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
- 	 CXXFLAGS="-g"
+-	 CXXFLAGS="-g"
 -	 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
-@@ -4083,42 +4954,17 @@ main ()
-   return 0;
- }
- _ACEOF
+-/* end confdefs.h.  */
+-
+-int
+-main ()
+-{
+-
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -4026,369 +4379,545 @@ index f51d803..459bf70 100755
 -	 test -z "$ac_cxx_werror_flag" ||
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
-+if ac_fn_cxx_try_compile "$LINENO"; then :
-   ac_cv_prog_cxx_g=yes
+-  ac_cv_prog_cxx_g=yes
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -
- fi
+-fi
 -
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-fi
 -
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- 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
+-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:$LINENO: result: $ac_cv_prog_cxx_g" >&5
-+{ $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
-@@ -4152,7 +4998,7 @@ am__doit:
- .PHONY: am__doit
- END
- # If we don't find an include directive, just comment out the code.
+-$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'
+-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+-ac_compiler_gnu=$ac_cv_c_compiler_gnu
+-DEPDIR="${am__leading_dot}deps"
+-
+-ac_config_commands="$ac_config_commands depfiles"
+-
+-
+-am_make=${MAKE-make}
+-cat > confinc << 'END'
+-am__doit:
+-	@echo this is the am__doit target
+-.PHONY: am__doit
+-END
+-# If we don't find an include directive, just comment out the code.
 -{ $as_echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
- $as_echo_n "checking for style of include used by $am_make... " >&6; }
- am__include="#"
- am__quote=
-@@ -4180,12 +5026,12 @@ if test "$am__include" = "#"; then
- fi
- 
- 
+-$as_echo_n "checking for style of include used by $am_make... " >&6; }
+-am__include="#"
+-am__quote=
+-_am_result=none
+-# First try GNU make style include.
+-echo "include confinc" > confmf
+-# Ignore all kinds of additional output from `make'.
+-case `$am_make -s -f confmf 2> /dev/null` in #(
+-*the\ am__doit\ target*)
+-  am__include=include
+-  am__quote=
+-  _am_result=GNU
+-  ;;
+-esac
+-# Now try BSD make style include.
+-if test "$am__include" = "#"; then
+-   echo '.include "confinc"' > confmf
+-   case `$am_make -s -f confmf 2> /dev/null` in #(
+-   *the\ am__doit\ target*)
+-     am__include=.include
+-     am__quote="\""
+-     _am_result=BSD
+-     ;;
+-   esac
+-fi
+-
+-
 -{ $as_echo "$as_me:$LINENO: result: $_am_result" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
- $as_echo "$_am_result" >&6; }
- rm -f confinc confmf
- 
- # Check whether --enable-dependency-tracking was given.
+-$as_echo "$_am_result" >&6; }
+-rm -f confinc confmf
+-
+-# Check whether --enable-dependency-tracking was given.
 -if test "${enable_dependency_tracking+set}" = set; then
-+if test "${enable_dependency_tracking+set}" = set; then :
-   enableval=$enable_dependency_tracking;
- fi
- 
-@@ -4205,9 +5051,9 @@ fi
- 
- depcc="$CXX"  am_compiler_list=
- 
+-  enableval=$enable_dependency_tracking;
+-fi
+-
+-if test "x$enable_dependency_tracking" != xno; then
+-  am_depcomp="$ac_aux_dir/depcomp"
+-  AMDEPBACKSLASH='\'
+-fi
+- if test "x$enable_dependency_tracking" != xno; then
+-  AMDEP_TRUE=
+-  AMDEP_FALSE='#'
+-else
+-  AMDEP_TRUE='#'
+-  AMDEP_FALSE=
+-fi
+-
+-
+-
+-depcc="$CXX"  am_compiler_list=
+-
 -{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
- $as_echo_n "checking dependency style of $depcc... " >&6; }
+-$as_echo_n "checking dependency style of $depcc... " >&6; }
 -if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then
-+if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
-   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
-@@ -4315,7 +5161,7 @@ else
- fi
- 
- fi
+-  $as_echo_n "(cached) " >&6
+-else
+-  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+-  # We make a subdir and do the tests there.  Otherwise we can end up
+-  # making bogus files that we don't know about and never remove.  For
+-  # instance it was reported that on HP-UX the gcc test will end up
+-  # making a dummy file named `D' -- because `-MD' means `put the output
+-  # in D'.
+-  mkdir conftest.dir
+-  # Copy depcomp to subdir because otherwise we won't find it if we're
+-  # using a relative directory.
+-  cp "$am_depcomp" conftest.dir
+-  cd conftest.dir
+-  # We will build objects and dependencies in a subdirectory because
+-  # it helps to detect inapplicable dependency modes.  For instance
+-  # both Tru64's cc and ICC support -MD to output dependencies as a
+-  # side effect of compilation, but ICC will put the dependencies in
+-  # the current directory while Tru64 will put them in the object
+-  # directory.
+-  mkdir sub
+-
+-  am_cv_CXX_dependencies_compiler_type=none
+-  if test "$am_compiler_list" = ""; then
+-     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+-  fi
+-  am__universal=false
+-  case " $depcc " in #(
+-     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+-     esac
+-
+-  for depmode in $am_compiler_list; do
+-    # Setup a source with many dependencies, because some compilers
+-    # like to wrap large dependency lists on column 80 (with \), and
+-    # we should not choose a depcomp mode which is confused by this.
+-    #
+-    # We need to recreate these files for each test, as the compiler may
+-    # overwrite some of them when testing with obscure command lines.
+-    # This happens at least with the AIX C compiler.
+-    : > sub/conftest.c
+-    for i in 1 2 3 4 5 6; do
+-      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+-      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+-      # Solaris 8's {/usr,}/bin/sh.
+-      touch sub/conftst$i.h
+-    done
+-    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+-
+-    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+-    # mode.  It turns out that the SunPro C++ compiler does not properly
+-    # handle `-M -o', and we need to detect this.  Also, some Intel
+-    # versions had trouble with output in subdirs
+-    am__obj=sub/conftest.${OBJEXT-o}
+-    am__minus_obj="-o $am__obj"
+-    case $depmode in
+-    gcc)
+-      # This depmode causes a compiler race in universal mode.
+-      test "$am__universal" = false || continue
+-      ;;
+-    nosideeffect)
+-      # after this tag, mechanisms are not by side-effect, so they'll
+-      # only be used when explicitly requested
+-      if test "x$enable_dependency_tracking" = xyes; then
+-	continue
+-      else
+-	break
+-      fi
+-      ;;
+-    msvisualcpp | msvcmsys)
+-      # This compiler won't grok `-c -o', but also, the minuso test has
+-      # not run yet.  These depmodes are late enough in the game, and
+-      # so weak that their functioning should not be impacted.
+-      am__obj=conftest.${OBJEXT-o}
+-      am__minus_obj=
+-      ;;
+-    none) break ;;
+-    esac
+-    if depmode=$depmode \
+-       source=sub/conftest.c object=$am__obj \
+-       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+-       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+-         >/dev/null 2>conftest.err &&
+-       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+-       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+-       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+-       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+-      # icc doesn't choke on unknown options, it will just issue warnings
+-      # or remarks (even with -Werror).  So we grep stderr for any message
+-      # that says an option was ignored or not supported.
+-      # When given -MP, icc 7.0 and 7.1 complain thusly:
+-      #   icc: Command line warning: ignoring option '-M'; no argument required
+-      # The diagnosis changed in icc 8.0:
+-      #   icc: Command line remark: option '-MP' not supported
+-      if (grep 'ignoring option' conftest.err ||
+-          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+-        am_cv_CXX_dependencies_compiler_type=$depmode
+-        break
+-      fi
+-    fi
+-  done
+-
+-  cd ..
+-  rm -rf conftest.dir
+-else
+-  am_cv_CXX_dependencies_compiler_type=none
+-fi
+-
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5
- $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; }
- CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
- 
-@@ -4338,9 +5184,9 @@ 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
+-$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; }
+-CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
+-
+- if
+-  test "x$enable_dependency_tracking" != xno \
+-  && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
+-  am__fastdepCXX_TRUE=
+-  am__fastdepCXX_FALSE='#'
+-else
+-  am__fastdepCXX_TRUE='#'
+-  am__fastdepCXX_FALSE=
+-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}gcc", so it can be a program name with args.
+-set dummy ${ac_tool_prefix}gcc; ac_word=$2
 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
- $as_echo_n "checking for $ac_word... " >&6; }
+-$as_echo_n "checking for $ac_word... " >&6; }
 -if test "${ac_cv_prog_CC+set}" = set; then
-+if test "${ac_cv_prog_CC+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
-   if test -n "$CC"; then
-@@ -4351,24 +5197,24 @@ for as_dir in $PATH
- do
-   IFS=$as_save_IFS
-   test -z "$as_dir" && as_dir=.
+-  $as_echo_n "(cached) " >&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
-+    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"
+-  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"
 -    $as_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
+-    break 2
+-  fi
 -done
-+  done
- IFS=$as_save_IFS
- 
- fi
- fi
- CC=$ac_cv_prog_CC
- if test -n "$CC"; then
+-done
+-IFS=$as_save_IFS
+-
+-fi
+-fi
+-CC=$ac_cv_prog_CC
+-if test -n "$CC"; then
 -  { $as_echo "$as_me:$LINENO: result: $CC" >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
- $as_echo "$CC" >&6; }
- else
+-$as_echo "$CC" >&6; }
+-else
 -  { $as_echo "$as_me:$LINENO: result: no" >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
- $as_echo "no" >&6; }
- fi
- 
-@@ -4378,9 +5224,9 @@ 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
+-$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
 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
- $as_echo_n "checking for $ac_word... " >&6; }
+-$as_echo_n "checking for $ac_word... " >&6; }
 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
-+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
-   if test -n "$ac_ct_CC"; then
-@@ -4391,24 +5237,24 @@ for as_dir in $PATH
- do
-   IFS=$as_save_IFS
-   test -z "$as_dir" && as_dir=.
+-  $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.
+-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
-+    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"
+-  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"
 -    $as_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
+-    break 2
+-  fi
 -done
-+  done
- IFS=$as_save_IFS
- 
- fi
- fi
- ac_ct_CC=$ac_cv_prog_ac_ct_CC
- if test -n "$ac_ct_CC"; then
+-done
+-IFS=$as_save_IFS
+-
+-fi
+-fi
+-ac_ct_CC=$ac_cv_prog_ac_ct_CC
+-if test -n "$ac_ct_CC"; then
 -  { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
- $as_echo "$ac_ct_CC" >&6; }
- else
+-$as_echo "$ac_ct_CC" >&6; }
+-else
 -  { $as_echo "$as_me:$LINENO: result: no" >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
- $as_echo "no" >&6; }
- fi
- 
-@@ -4417,7 +5263,7 @@ fi
-   else
-     case $cross_compiling:$ac_tool_warned in
- yes:)
+-$as_echo "no" >&6; }
+-fi
+-
+-  if test "x$ac_ct_CC" = x; then
+-    CC=""
+-  else
+-    case $cross_compiling:$ac_tool_warned in
+-yes:)
 -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
-+{ $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
-@@ -4431,9 +5277,9 @@ 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
+-$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.
+-set dummy ${ac_tool_prefix}cc; ac_word=$2
 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
- $as_echo_n "checking for $ac_word... " >&6; }
+-$as_echo_n "checking for $ac_word... " >&6; }
 -if test "${ac_cv_prog_CC+set}" = set; then
-+if test "${ac_cv_prog_CC+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
-   if test -n "$CC"; then
-@@ -4444,24 +5290,24 @@ for as_dir in $PATH
- do
-   IFS=$as_save_IFS
-   test -z "$as_dir" && as_dir=.
+-  $as_echo_n "(cached) " >&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
-+    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"
+-  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"
 -    $as_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
+-    break 2
+-  fi
 -done
-+  done
- IFS=$as_save_IFS
- 
- fi
- fi
- CC=$ac_cv_prog_CC
- if test -n "$CC"; then
+-done
+-IFS=$as_save_IFS
+-
+-fi
+-fi
+-CC=$ac_cv_prog_CC
+-if test -n "$CC"; then
 -  { $as_echo "$as_me:$LINENO: result: $CC" >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
- $as_echo "$CC" >&6; }
- else
+-$as_echo "$CC" >&6; }
+-else
 -  { $as_echo "$as_me:$LINENO: result: no" >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
- $as_echo "no" >&6; }
- fi
- 
-@@ -4471,9 +5317,9 @@ 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
+-$as_echo "no" >&6; }
+-fi
+-
+-
+-  fi
+-fi
+-if test -z "$CC"; then
+-  # Extract the first word of "cc", so it can be a program name with args.
+-set dummy cc; ac_word=$2
 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
- $as_echo_n "checking for $ac_word... " >&6; }
+-$as_echo_n "checking for $ac_word... " >&6; }
 -if test "${ac_cv_prog_CC+set}" = set; then
-+if test "${ac_cv_prog_CC+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
-   if test -n "$CC"; then
-@@ -4485,18 +5331,18 @@ for as_dir in $PATH
- do
-   IFS=$as_save_IFS
-   test -z "$as_dir" && as_dir=.
+-  $as_echo_n "(cached) " >&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
-+    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"
+-  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"
 -    $as_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
+-    break 2
+-  fi
 -done
-+  done
- IFS=$as_save_IFS
- 
- if test $ac_prog_rejected = yes; then
-@@ -4515,10 +5361,10 @@ fi
- fi
- CC=$ac_cv_prog_CC
- if test -n "$CC"; then
+-done
+-IFS=$as_save_IFS
+-
+-if test $ac_prog_rejected = yes; then
+-  # We found a bogon in the path, so make sure we never use it.
+-  set dummy $ac_cv_prog_CC
+-  shift
+-  if test $# != 0; then
+-    # We chose a different compiler from the bogus one.
+-    # However, it has the same basename, so the bogon will be chosen
+-    # first if we set CC to just the basename; use the full file name.
+-    shift
+-    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+-  fi
+-fi
+-fi
+-fi
+-CC=$ac_cv_prog_CC
+-if test -n "$CC"; then
 -  { $as_echo "$as_me:$LINENO: result: $CC" >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
- $as_echo "$CC" >&6; }
- else
+-$as_echo "$CC" >&6; }
+-else
 -  { $as_echo "$as_me:$LINENO: result: no" >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
- $as_echo "no" >&6; }
- fi
- 
-@@ -4530,9 +5376,9 @@ if test -z "$CC"; then
-   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
+-$as_echo "no" >&6; }
+-fi
+-
+-
+-fi
+-if test -z "$CC"; then
+-  if test -n "$ac_tool_prefix"; then
+-  for ac_prog in cl.exe
+-  do
+-    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
- $as_echo_n "checking for $ac_word... " >&6; }
+-$as_echo_n "checking for $ac_word... " >&6; }
 -if test "${ac_cv_prog_CC+set}" = set; then
-+if test "${ac_cv_prog_CC+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
-   if test -n "$CC"; then
-@@ -4543,24 +5389,24 @@ for as_dir in $PATH
- do
-   IFS=$as_save_IFS
-   test -z "$as_dir" && as_dir=.
+-  $as_echo_n "(cached) " >&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
-+    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"
+-  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"
 -    $as_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
+-    break 2
+-  fi
 -done
-+  done
- IFS=$as_save_IFS
- 
- fi
- fi
- CC=$ac_cv_prog_CC
- if test -n "$CC"; then
+-done
+-IFS=$as_save_IFS
+-
+-fi
+-fi
+-CC=$ac_cv_prog_CC
+-if test -n "$CC"; then
 -  { $as_echo "$as_me:$LINENO: result: $CC" >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
- $as_echo "$CC" >&6; }
- else
+-$as_echo "$CC" >&6; }
+-else
 -  { $as_echo "$as_me:$LINENO: result: no" >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
- $as_echo "no" >&6; }
- fi
- 
-@@ -4574,9 +5420,9 @@ if test -z "$CC"; then
- do
-   # Extract the first word of "$ac_prog", so it can be a program name with args.
- set dummy $ac_prog; ac_word=$2
+-$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.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
 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
- $as_echo_n "checking for $ac_word... " >&6; }
+-$as_echo_n "checking for $ac_word... " >&6; }
 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
-+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
-   if test -n "$ac_ct_CC"; then
-@@ -4587,24 +5433,24 @@ for as_dir in $PATH
- do
-   IFS=$as_save_IFS
-   test -z "$as_dir" && as_dir=.
+-  $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.
+-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
-+    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"
+-  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"
 -    $as_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
+-    break 2
+-  fi
 -done
-+  done
- IFS=$as_save_IFS
- 
- fi
- fi
- ac_ct_CC=$ac_cv_prog_ac_ct_CC
- if test -n "$ac_ct_CC"; then
+-done
+-IFS=$as_save_IFS
+-
+-fi
+-fi
+-ac_ct_CC=$ac_cv_prog_ac_ct_CC
+-if test -n "$ac_ct_CC"; then
 -  { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
- $as_echo "$ac_ct_CC" >&6; }
- else
+-$as_echo "$ac_ct_CC" >&6; }
+-else
 -  { $as_echo "$as_me:$LINENO: result: no" >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
- $as_echo "no" >&6; }
- fi
- 
-@@ -4617,7 +5463,7 @@ done
-   else
-     case $cross_compiling:$ac_tool_warned in
- yes:)
+-$as_echo "no" >&6; }
+-fi
+-
+-
+-  test -n "$ac_ct_CC" && break
+-done
+-
+-  if test "x$ac_ct_CC" = x; then
+-    CC=""
+-  else
+-    case $cross_compiling:$ac_tool_warned in
+-yes:)
 -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
-+{ $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
-@@ -4628,62 +5474,42 @@ fi
- fi
- 
- 
+-$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" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-+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_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 -{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
 -See \`config.log' for more details." >&5
 -$as_echo "$as_me: error: no acceptable C compiler found in \$PATH
 -See \`config.log' for more details." >&2;}
 -   { (exit 1); exit 1; }; }; }
-+as_fn_error $? "no acceptable C compiler found in \$PATH
-+See \`config.log' for more details" "$LINENO" 5 ; }
- 
- # Provide some information about the compiler.
+-
+-# Provide some information about the compiler.
 -$as_echo "$as_me:$LINENO: checking for C compiler version" >&5
-+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
- set X $ac_compile
- ac_compiler=$2
+-set X $ac_compile
+-ac_compiler=$2
 -{ (ac_try="$ac_compiler --version >&5"
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -4401,19 +4930,14 @@ index f51d803..459bf70 100755
 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
 -  (exit $ac_status); }
 -{ (ac_try="$ac_compiler -v >&5"
-+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
+-case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
 -  (eval "$ac_compiler -v >&5") 2>&5
-+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=$?
+-  ac_status=$?
 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
 -  (exit $ac_status); }
 -{ (ac_try="$ac_compiler -V >&5"
@@ -4427,37 +4951,30 @@ index f51d803..459bf70 100755
 -  ac_status=$?
 -  $as_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
- 
+-
 -{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
-+{ $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; }
+-$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
 -if test "${ac_cv_c_compiler_gnu+set}" = set; then
-+if test "${ac_cv_c_compiler_gnu+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
+-  $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
-@@ -4697,37 +5523,16 @@ main ()
-   return 0;
- }
- _ACEOF
+-/* end confdefs.h.  */
+-
+-int
+-main ()
+-{
+-#ifndef __GNUC__
+-       choke me
+-#endif
+-
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -4476,53 +4993,51 @@ index f51d803..459bf70 100755
 -	 test -z "$ac_c_werror_flag" ||
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
-+if ac_fn_c_try_compile "$LINENO"; then :
-   ac_compiler_gnu=yes
- else
+-  ac_compiler_gnu=yes
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_compiler_gnu=no
-+  ac_compiler_gnu=no
- fi
+-fi
 -
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- ac_cv_c_compiler_gnu=$ac_compiler_gnu
- 
- fi
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-ac_cv_c_compiler_gnu=$ac_compiler_gnu
+-
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
-+{ $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
-@@ -4736,20 +5541,16 @@ else
- fi
- ac_test_CFLAGS=${CFLAGS+set}
- ac_save_CFLAGS=$CFLAGS
+-$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
 -{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
- $as_echo_n "checking whether $CC accepts -g... " >&6; }
+-$as_echo_n "checking whether $CC accepts -g... " >&6; }
 -if test "${ac_cv_prog_cc_g+set}" = set; then
-+if test "${ac_cv_prog_cc_g+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
-   ac_save_c_werror_flag=$ac_c_werror_flag
-    ac_c_werror_flag=yes
-    ac_cv_prog_cc_g=no
-    CFLAGS="-g"
+-  $as_echo_n "(cached) " >&6
+-else
+-  ac_save_c_werror_flag=$ac_c_werror_flag
+-   ac_c_werror_flag=yes
+-   ac_cv_prog_cc_g=no
+-   CFLAGS="-g"
 -   cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
- 
- int
-@@ -4760,35 +5561,11 @@ main ()
-   return 0;
- }
- _ACEOF
+-/* end confdefs.h.  */
+-
+-int
+-main ()
+-{
+-
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -4541,9 +5056,8 @@ index f51d803..459bf70 100755
 -	 test -z "$ac_c_werror_flag" ||
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
-+if ac_fn_c_try_compile "$LINENO"; then :
-   ac_cv_prog_cc_g=yes
- else
+-  ac_cv_prog_cc_g=yes
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
@@ -4553,15 +5067,16 @@ index f51d803..459bf70 100755
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+  CFLAGS=""
-+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
- 
- int
-@@ -4799,36 +5576,12 @@ main ()
-   return 0;
- }
- _ACEOF
+-/* end confdefs.h.  */
+-
+-int
+-main ()
+-{
+-
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -4584,25 +5099,24 @@ index f51d803..459bf70 100755
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+if ac_fn_c_try_compile "$LINENO"; then :
- 
+-
 -	ac_c_werror_flag=$ac_save_c_werror_flag
-+else
-+  ac_c_werror_flag=$ac_save_c_werror_flag
- 	 CFLAGS="-g"
+-	 CFLAGS="-g"
 -	 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
-@@ -4839,42 +5592,17 @@ main ()
-   return 0;
- }
- _ACEOF
+-/* end confdefs.h.  */
+-
+-int
+-main ()
+-{
+-
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -4621,55 +5135,108 @@ index f51d803..459bf70 100755
 -	 test -z "$ac_c_werror_flag" ||
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
-+if ac_fn_c_try_compile "$LINENO"; then :
-   ac_cv_prog_cc_g=yes
+-  ac_cv_prog_cc_g=yes
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -
- fi
+-fi
 -
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-fi
 -
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-fi
 -
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-    ac_c_werror_flag=$ac_save_c_werror_flag
- fi
+-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:$LINENO: result: $ac_cv_prog_cc_g" >&5
-+{ $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
-@@ -4891,18 +5619,14 @@ else
-     CFLAGS=
-   fi
- fi
+-$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
+-  if test "$GCC" = yes; then
+-    CFLAGS="-g -O2"
+-  else
+-    CFLAGS="-g"
+-  fi
+-else
+-  if test "$GCC" = yes; then
+-    CFLAGS="-O2"
+-  else
+-    CFLAGS=
+-  fi
+-fi
 -{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
-+{ $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; }
+-$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
 -if test "${ac_cv_prog_cc_c89+set}" = set; then
-+if test "${ac_cv_prog_cc_c89+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
-   ac_cv_prog_cc_c89=no
- ac_save_CC=$CC
+-  $as_echo_n "(cached) " >&6
+-else
+-  ac_cv_prog_cc_c89=no
+-ac_save_CC=$CC
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
- #include <stdarg.h>
- #include <stdio.h>
-@@ -4959,32 +5683,9 @@ for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
- 	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
- do
-   CC="$ac_save_CC $ac_arg"
+-/* end confdefs.h.  */
+-#include <stdarg.h>
+-#include <stdio.h>
+-#include <sys/types.h>
+-#include <sys/stat.h>
+-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
+-struct buf { int x; };
+-FILE * (*rcsopen) (struct buf *, struct stat *, int);
+-static char *e (p, i)
+-     char **p;
+-     int i;
+-{
+-  return p[i];
+-}
+-static char *f (char * (*g) (char **, int), char **p, ...)
+-{
+-  char *s;
+-  va_list v;
+-  va_start (v,p);
+-  s = g (p, va_arg (v,int));
+-  va_end (v);
+-  return s;
+-}
+-
+-/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
+-   function prototypes and stuff, but not '\xHH' hex character constants.
+-   These don't provoke an error unfortunately, instead are silently treated
+-   as 'x'.  The following induces an error, until -std is added to get
+-   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
+-   array size at least.  It's necessary to write '\x00'==0 to get something
+-   that's true only with -std.  */
+-int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+-
+-/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+-   inside strings and character constants.  */
+-#define FOO(x) 'x'
+-int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+-
+-int test (int i, double x);
+-struct s1 {int (*f) (int a);};
+-struct s2 {int (*f) (double a);};
+-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+-int argc;
+-char **argv;
+-int
+-main ()
+-{
+-return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
+-  ;
+-  return 0;
+-}
+-_ACEOF
+-for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+-	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+-do
+-  CC="$ac_save_CC $ac_arg"
 -  rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -4688,189 +5255,302 @@ index f51d803..459bf70 100755
 -	 test -z "$ac_c_werror_flag" ||
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
-+  if ac_fn_c_try_compile "$LINENO"; then :
-   ac_cv_prog_cc_c89=$ac_arg
+-  ac_cv_prog_cc_c89=$ac_arg
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -
- fi
+-fi
 -
- rm -f core conftest.err conftest.$ac_objext
-   test "x$ac_cv_prog_cc_c89" != "xno" && break
- done
-@@ -4995,17 +5696,19 @@ fi
- # AC_CACHE_VAL
- case "x$ac_cv_prog_cc_c89" in
-   x)
+-rm -f core conftest.err conftest.$ac_objext
+-  test "x$ac_cv_prog_cc_c89" != "xno" && break
+-done
+-rm -f conftest.$ac_ext
+-CC=$ac_save_CC
+-
+-fi
+-# AC_CACHE_VAL
+-case "x$ac_cv_prog_cc_c89" in
+-  x)
 -    { $as_echo "$as_me:$LINENO: result: none needed" >&5
-+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
- $as_echo "none needed" >&6; } ;;
-   xno)
+-$as_echo "none needed" >&6; } ;;
+-  xno)
 -    { $as_echo "$as_me:$LINENO: result: unsupported" >&5
-+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
- $as_echo "unsupported" >&6; } ;;
-   *)
-     CC="$CC $ac_cv_prog_cc_c89"
+-$as_echo "unsupported" >&6; } ;;
+-  *)
+-    CC="$CC $ac_cv_prog_cc_c89"
 -    { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
-+    { $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
- 
- ac_ext=c
- ac_cpp='$CPP $CPPFLAGS'
-@@ -5015,9 +5718,9 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
- 
- depcc="$CC"   am_compiler_list=
- 
+-$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+-esac
+-
+-
+-ac_ext=c
+-ac_cpp='$CPP $CPPFLAGS'
+-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+-ac_compiler_gnu=$ac_cv_c_compiler_gnu
+-
+-depcc="$CC"   am_compiler_list=
+-
 -{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
- $as_echo_n "checking dependency style of $depcc... " >&6; }
+-$as_echo_n "checking dependency style of $depcc... " >&6; }
 -if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
-+if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
-   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
-@@ -5125,7 +5828,7 @@ else
- fi
- 
- fi
+-  $as_echo_n "(cached) " >&6
+-else
+-  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+-  # We make a subdir and do the tests there.  Otherwise we can end up
+-  # making bogus files that we don't know about and never remove.  For
+-  # instance it was reported that on HP-UX the gcc test will end up
+-  # making a dummy file named `D' -- because `-MD' means `put the output
+-  # in D'.
+-  mkdir conftest.dir
+-  # Copy depcomp to subdir because otherwise we won't find it if we're
+-  # using a relative directory.
+-  cp "$am_depcomp" conftest.dir
+-  cd conftest.dir
+-  # We will build objects and dependencies in a subdirectory because
+-  # it helps to detect inapplicable dependency modes.  For instance
+-  # both Tru64's cc and ICC support -MD to output dependencies as a
+-  # side effect of compilation, but ICC will put the dependencies in
+-  # the current directory while Tru64 will put them in the object
+-  # directory.
+-  mkdir sub
+-
+-  am_cv_CC_dependencies_compiler_type=none
+-  if test "$am_compiler_list" = ""; then
+-     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+-  fi
+-  am__universal=false
+-  case " $depcc " in #(
+-     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+-     esac
+-
+-  for depmode in $am_compiler_list; do
+-    # Setup a source with many dependencies, because some compilers
+-    # like to wrap large dependency lists on column 80 (with \), and
+-    # we should not choose a depcomp mode which is confused by this.
+-    #
+-    # We need to recreate these files for each test, as the compiler may
+-    # overwrite some of them when testing with obscure command lines.
+-    # This happens at least with the AIX C compiler.
+-    : > sub/conftest.c
+-    for i in 1 2 3 4 5 6; do
+-      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+-      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+-      # Solaris 8's {/usr,}/bin/sh.
+-      touch sub/conftst$i.h
+-    done
+-    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+-
+-    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+-    # mode.  It turns out that the SunPro C++ compiler does not properly
+-    # handle `-M -o', and we need to detect this.  Also, some Intel
+-    # versions had trouble with output in subdirs
+-    am__obj=sub/conftest.${OBJEXT-o}
+-    am__minus_obj="-o $am__obj"
+-    case $depmode in
+-    gcc)
+-      # This depmode causes a compiler race in universal mode.
+-      test "$am__universal" = false || continue
+-      ;;
+-    nosideeffect)
+-      # after this tag, mechanisms are not by side-effect, so they'll
+-      # only be used when explicitly requested
+-      if test "x$enable_dependency_tracking" = xyes; then
+-	continue
+-      else
+-	break
+-      fi
+-      ;;
+-    msvisualcpp | msvcmsys)
+-      # This compiler won't grok `-c -o', but also, the minuso test has
+-      # not run yet.  These depmodes are late enough in the game, and
+-      # so weak that their functioning should not be impacted.
+-      am__obj=conftest.${OBJEXT-o}
+-      am__minus_obj=
+-      ;;
+-    none) break ;;
+-    esac
+-    if depmode=$depmode \
+-       source=sub/conftest.c object=$am__obj \
+-       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+-       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+-         >/dev/null 2>conftest.err &&
+-       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+-       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+-       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+-       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+-      # icc doesn't choke on unknown options, it will just issue warnings
+-      # or remarks (even with -Werror).  So we grep stderr for any message
+-      # that says an option was ignored or not supported.
+-      # When given -MP, icc 7.0 and 7.1 complain thusly:
+-      #   icc: Command line warning: ignoring option '-M'; no argument required
+-      # The diagnosis changed in icc 8.0:
+-      #   icc: Command line remark: option '-MP' not supported
+-      if (grep 'ignoring option' conftest.err ||
+-          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+-        am_cv_CC_dependencies_compiler_type=$depmode
+-        break
+-      fi
+-    fi
+-  done
+-
+-  cd ..
+-  rm -rf conftest.dir
+-else
+-  am_cv_CC_dependencies_compiler_type=none
+-fi
+-
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
- $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
- CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
- 
-@@ -5143,9 +5846,9 @@ fi
- 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
+-$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+-CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+-
+- if
+-  test "x$enable_dependency_tracking" != xno \
+-  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+-  am__fastdepCC_TRUE=
+-  am__fastdepCC_FALSE='#'
+-else
+-  am__fastdepCC_TRUE='#'
+-  am__fastdepCC_FALSE=
+-fi
+-
+-
+-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
 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
- $as_echo_n "checking for $ac_word... " >&6; }
+-$as_echo_n "checking for $ac_word... " >&6; }
 -if test "${ac_cv_prog_RANLIB+set}" = set; then
-+if test "${ac_cv_prog_RANLIB+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
-   if test -n "$RANLIB"; then
-@@ -5156,24 +5859,24 @@ for as_dir in $PATH
- do
-   IFS=$as_save_IFS
-   test -z "$as_dir" && as_dir=.
+-  $as_echo_n "(cached) " >&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
-+    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"
+-  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"
 -    $as_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
+-    break 2
+-  fi
 -done
-+  done
- IFS=$as_save_IFS
- 
- fi
- fi
- RANLIB=$ac_cv_prog_RANLIB
- if test -n "$RANLIB"; then
+-done
+-IFS=$as_save_IFS
+-
+-fi
+-fi
+-RANLIB=$ac_cv_prog_RANLIB
+-if test -n "$RANLIB"; then
 -  { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
- $as_echo "$RANLIB" >&6; }
- else
+-$as_echo "$RANLIB" >&6; }
+-else
 -  { $as_echo "$as_me:$LINENO: result: no" >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
- $as_echo "no" >&6; }
- fi
- 
-@@ -5183,9 +5886,9 @@ 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
+-$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
 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
- $as_echo_n "checking for $ac_word... " >&6; }
+-$as_echo_n "checking for $ac_word... " >&6; }
 -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
-+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
-   if test -n "$ac_ct_RANLIB"; then
-@@ -5196,24 +5899,24 @@ for as_dir in $PATH
- do
-   IFS=$as_save_IFS
-   test -z "$as_dir" && as_dir=.
+-  $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.
+-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
-+    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"
+-  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"
 -    $as_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
+-    break 2
+-  fi
 -done
-+  done
- IFS=$as_save_IFS
- 
- fi
- fi
- ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
- if test -n "$ac_ct_RANLIB"; then
+-done
+-IFS=$as_save_IFS
+-
+-fi
+-fi
+-ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+-if test -n "$ac_ct_RANLIB"; then
 -  { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
- $as_echo "$ac_ct_RANLIB" >&6; }
- else
+-$as_echo "$ac_ct_RANLIB" >&6; }
+-else
 -  { $as_echo "$as_me:$LINENO: result: no" >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
- $as_echo "no" >&6; }
- fi
- 
-@@ -5222,7 +5925,7 @@ fi
-   else
-     case $cross_compiling:$ac_tool_warned in
- yes:)
+-$as_echo "no" >&6; }
+-fi
+-
+-  if test "x$ac_ct_RANLIB" = x; then
+-    RANLIB=":"
+-  else
+-    case $cross_compiling:$ac_tool_warned in
+-yes:)
 -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
-+{ $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
-@@ -5238,14 +5941,14 @@ 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
+-$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
+-
+-
+-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
 -{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
-+{ $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
+-$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
-+  if test "${ac_cv_prog_CPP+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
-       # Double quotes because CPP needs to be expanded
-@@ -5260,11 +5963,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.
+-  $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"
+-    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
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
- #ifdef __STDC__
- # include <limits.h>
-@@ -5273,78 +5972,34 @@ cat >>conftest.$ac_ext <<_ACEOF
- #endif
- 		     Syntax error
- _ACEOF
+-/* end confdefs.h.  */
+-#ifdef __STDC__
+-# include <limits.h>
+-#else
+-# include <assert.h>
+-#endif
+-		     Syntax error
+-_ACEOF
 -if { (ac_try="$ac_cpp conftest.$ac_ext"
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -4892,27 +5572,23 @@ index f51d803..459bf70 100755
 -else
 -  $as_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
+-
+-  # 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 nonexistent headers
-   # can be detected and how.
+-
+-  # 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
+-/* end confdefs.h.  */
+-#include <ac_nonexistent.h>
+-_ACEOF
 -if { (ac_try="$ac_cpp conftest.$ac_ext"
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -4930,56 +5606,58 @@ index f51d803..459bf70 100755
 -	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
 -	 test ! -s conftest.err
 -       }; then
-+if ac_fn_c_try_cpp "$LINENO"; then :
-   # Broken: success on invalid input.
- continue
- else
+-  # Broken: success on invalid input.
+-continue
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
-   # Passes both tests.
- ac_preproc_ok=:
- break
- fi
+-  # 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.
+-
+-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
- 
-@@ -5356,7 +6011,7 @@ fi
- else
-   ac_cv_prog_CPP=$CPP
- fi
+-  break
+-fi
+-
+-    done
+-    ac_cv_prog_CPP=$CPP
+-
+-fi
+-  CPP=$ac_cv_prog_CPP
+-else
+-  ac_cv_prog_CPP=$CPP
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $CPP" >&5
-+{ $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
-@@ -5367,11 +6022,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.
+-$as_echo "$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
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
- #ifdef __STDC__
- # include <limits.h>
-@@ -5380,87 +6031,40 @@ cat >>conftest.$ac_ext <<_ACEOF
- #endif
- 		     Syntax error
- _ACEOF
+-/* end confdefs.h.  */
+-#ifdef __STDC__
+-# include <limits.h>
+-#else
+-# include <assert.h>
+-#endif
+-		     Syntax error
+-_ACEOF
 -if { (ac_try="$ac_cpp conftest.$ac_ext"
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -5001,27 +5679,23 @@ index f51d803..459bf70 100755
 -else
 -  $as_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
+-
+-  # 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 nonexistent headers
-   # can be detected and how.
+-
+-  # 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
+-/* end confdefs.h.  */
+-#include <ac_nonexistent.h>
+-_ACEOF
 -if { (ac_try="$ac_cpp conftest.$ac_ext"
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -5039,232 +5713,256 @@ index f51d803..459bf70 100755
 -	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
 -	 test ! -s conftest.err
 -       }; then
-+if ac_fn_c_try_cpp "$LINENO"; then :
-   # Broken: success on invalid input.
- continue
- else
+-  # Broken: success on invalid input.
+-continue
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
-   # Passes both tests.
- ac_preproc_ok=:
- break
- fi
+-  # 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.
+-
+-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
+-else
 -  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-+  { { $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: error: in \`$ac_pwd':" >&2;}
 -{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
 -See \`config.log' for more details." >&5
 -$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
 -See \`config.log' for more details." >&2;}
 -   { (exit 1); exit 1; }; }; }
-+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
-+See \`config.log' for more details" "$LINENO" 5 ; }
- fi
- 
- ac_ext=c
-@@ -5470,9 +6074,9 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
- ac_compiler_gnu=$ac_cv_c_compiler_gnu
- 
- 
+-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
+-
+-
 -{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
-+{ $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; }
+-$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
 -if test "${ac_cv_path_GREP+set}" = set; then
-+if test "${ac_cv_path_GREP+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
-   if test -z "$GREP"; then
-@@ -5483,7 +6087,7 @@ for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
- do
-   IFS=$as_save_IFS
-   test -z "$as_dir" && as_dir=.
+-  $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_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
-@@ -5503,7 +6107,7 @@ case `"$ac_path_GREP" --version 2>&1` in
-     $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
+-    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
 -    ac_count=`expr $ac_count + 1`
-+    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"
-@@ -5518,26 +6122,24 @@ esac
-       $ac_path_GREP_found && break 3
-     done
-   done
+-    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
-+  done
- IFS=$as_save_IFS
-   if test -z "$ac_cv_path_GREP"; then
+-IFS=$as_save_IFS
+-  if test -z "$ac_cv_path_GREP"; then
 -    { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
 -$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
 -   { (exit 1); exit 1; }; }
-+    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
- 
- fi
+-  fi
+-else
+-  ac_cv_path_GREP=$GREP
+-fi
+-
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
-+{ $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"
- 
- 
+-$as_echo "$ac_cv_path_GREP" >&6; }
+- GREP="$ac_cv_path_GREP"
+-
+-
 -{ $as_echo "$as_me:$LINENO: checking for egrep" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
- $as_echo_n "checking for egrep... " >&6; }
+-$as_echo_n "checking for egrep... " >&6; }
 -if test "${ac_cv_path_EGREP+set}" = set; then
-+if test "${ac_cv_path_EGREP+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
-   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
-@@ -5551,7 +6153,7 @@ for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
- do
-   IFS=$as_save_IFS
-   test -z "$as_dir" && as_dir=.
+-  $as_echo_n "(cached) " >&6
+-else
+-  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_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
-@@ -5571,7 +6173,7 @@ case `"$ac_path_EGREP" --version 2>&1` in
-     $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
+-    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
 -    ac_count=`expr $ac_count + 1`
-+    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"
-@@ -5586,12 +6188,10 @@ esac
-       $ac_path_EGREP_found && break 3
-     done
-   done
+-    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
-+  done
- IFS=$as_save_IFS
-   if test -z "$ac_cv_path_EGREP"; then
+-IFS=$as_save_IFS
+-  if test -z "$ac_cv_path_EGREP"; then
 -    { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
 -$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
 -   { (exit 1); exit 1; }; }
-+    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
-@@ -5599,29 +6199,25 @@ fi
- 
-    fi
- fi
+-  fi
+-else
+-  ac_cv_path_EGREP=$EGREP
+-fi
+-
+-   fi
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
-+{ $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"
- 
- 
- if test $ac_cv_c_compiler_gnu = yes; then
+-$as_echo "$ac_cv_path_EGREP" >&6; }
+- EGREP="$ac_cv_path_EGREP"
+-
+-
+-if test $ac_cv_c_compiler_gnu = yes; then
 -    { $as_echo "$as_me:$LINENO: checking whether $CC needs -traditional" >&5
-+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5
- $as_echo_n "checking whether $CC needs -traditional... " >&6; }
+-$as_echo_n "checking whether $CC needs -traditional... " >&6; }
 -if test "${ac_cv_prog_gcc_traditional+set}" = set; then
-+if test "${ac_cv_prog_gcc_traditional+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
-     ac_pattern="Autoconf.*'x'"
+-  $as_echo_n "(cached) " >&6
+-else
+-    ac_pattern="Autoconf.*'x'"
 -  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 <sgtty.h>
- Autoconf TIOCGETP
- _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+-/* end confdefs.h.  */
+-#include <sgtty.h>
+-Autoconf TIOCGETP
+-_ACEOF
+-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
 -  $EGREP "$ac_pattern" >/dev/null 2>&1; then
-+  $EGREP "$ac_pattern" >/dev/null 2>&1; then :
-   ac_cv_prog_gcc_traditional=yes
- else
-   ac_cv_prog_gcc_traditional=no
-@@ -5630,48 +6226,35 @@ rm -f conftest*
- 
- 
-   if test $ac_cv_prog_gcc_traditional = no; then
+-  ac_cv_prog_gcc_traditional=yes
+-else
+-  ac_cv_prog_gcc_traditional=no
+-fi
+-rm -f conftest*
+-
+-
+-  if test $ac_cv_prog_gcc_traditional = no; then
 -    cat >conftest.$ac_ext <<_ACEOF
 -/* 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 <termio.h>
- Autoconf TCGETA
- _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+-/* end confdefs.h.  */
+-#include <termio.h>
+-Autoconf TCGETA
+-_ACEOF
+-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
 -  $EGREP "$ac_pattern" >/dev/null 2>&1; then
-+  $EGREP "$ac_pattern" >/dev/null 2>&1; then :
-   ac_cv_prog_gcc_traditional=yes
- fi
- rm -f conftest*
- 
-   fi
- fi
+-  ac_cv_prog_gcc_traditional=yes
+-fi
+-rm -f conftest*
+-
+-  fi
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_gcc_traditional" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5
- $as_echo "$ac_cv_prog_gcc_traditional" >&6; }
-   if test $ac_cv_prog_gcc_traditional = yes; then
-     CC="$CC -traditional"
-   fi
- fi
- 
+-$as_echo "$ac_cv_prog_gcc_traditional" >&6; }
+-  if test $ac_cv_prog_gcc_traditional = yes; then
+-    CC="$CC -traditional"
+-  fi
+-fi
+-
 -
 -
 -
 -
 -
- ac_header_dirent=no
- for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
-   as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
+-ac_header_dirent=no
+-for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
+-  as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
- $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
+-$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-+if eval "test \"\${$as_ac_Header+set}\"" = set; then :
-   $as_echo_n "(cached) " >&6
- else
+-  $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.  */
- #include <sys/types.h>
- #include <$ac_hdr>
-@@ -5685,41 +6268,17 @@ return 0;
-   return 0;
- }
- _ACEOF
+-/* end confdefs.h.  */
+-#include <sys/types.h>
+-#include <$ac_hdr>
+-
+-int
+-main ()
+-{
+-if ((DIR *) 0)
+-return 0;
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -5283,56 +5981,68 @@ index f51d803..459bf70 100755
 -	 test -z "$ac_c_werror_flag" ||
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
-+if ac_fn_c_try_compile "$LINENO"; then :
-   eval "$as_ac_Header=yes"
- else
+-  eval "$as_ac_Header=yes"
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	eval "$as_ac_Header=no"
-+  eval "$as_ac_Header=no"
- fi
+-fi
 -
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-+eval ac_res=\$$as_ac_Header
-+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
- $as_echo "$ac_res" >&6; }
+-$as_echo "$ac_res" >&6; }
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
-   cat >>confdefs.h <<_ACEOF
- #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
- _ACEOF
-@@ -5730,17 +6289,13 @@ fi
- done
- # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
- if test $ac_header_dirent = dirent.h; then
+-  cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
+-_ACEOF
+-
+-ac_header_dirent=$ac_hdr; break
+-fi
+-
+-done
+-# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
+-if test $ac_header_dirent = dirent.h; then
 -  { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
- $as_echo_n "checking for library containing opendir... " >&6; }
+-$as_echo_n "checking for library containing opendir... " >&6; }
 -if test "${ac_cv_search_opendir+set}" = set; then
-+if test "${ac_cv_search_opendir+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
-   ac_func_search_save_LIBS=$LIBS
+-  $as_echo_n "(cached) " >&6
+-else
+-  ac_func_search_save_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 GCC internal prototype to avoid an error.
-@@ -5765,70 +6320,39 @@ for ac_lib in '' dir; do
-     ac_res=-l$ac_lib
-     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-   fi
+-/* end confdefs.h.  */
+-
+-/* Override any GCC internal prototype to avoid an error.
+-   Use char because int might match the return type of a GCC
+-   builtin and then its argument prototype would still apply.  */
+-#ifdef __cplusplus
+-extern "C"
+-#endif
+-char opendir ();
+-int
+-main ()
+-{
+-return opendir ();
+-  ;
+-  return 0;
+-}
+-_ACEOF
+-for ac_lib in '' dir; do
+-  if test -z "$ac_lib"; then
+-    ac_res="none required"
+-  else
+-    ac_res=-l$ac_lib
+-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+-  fi
 -  rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -5354,67 +6064,73 @@ index f51d803..459bf70 100755
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
-+  if ac_fn_c_try_link "$LINENO"; then :
-   ac_cv_search_opendir=$ac_res
+-  ac_cv_search_opendir=$ac_res
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -
- fi
+-fi
 -
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext
 -  if test "${ac_cv_search_opendir+set}" = set; then
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext
-+  if test "${ac_cv_search_opendir+set}" = set; then :
-   break
- fi
- done
+-  break
+-fi
+-done
 -if test "${ac_cv_search_opendir+set}" = set; then
 -  :
-+if test "${ac_cv_search_opendir+set}" = set; then :
-+
- else
-   ac_cv_search_opendir=no
- fi
- rm conftest.$ac_ext
- LIBS=$ac_func_search_save_LIBS
- fi
+-else
+-  ac_cv_search_opendir=no
+-fi
+-rm conftest.$ac_ext
+-LIBS=$ac_func_search_save_LIBS
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
- $as_echo "$ac_cv_search_opendir" >&6; }
- ac_res=$ac_cv_search_opendir
+-$as_echo "$ac_cv_search_opendir" >&6; }
+-ac_res=$ac_cv_search_opendir
 -if test "$ac_res" != no; then
-+if test "$ac_res" != no; then :
-   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
- 
- fi
- 
- else
+-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+-
+-fi
+-
+-else
 -  { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
- $as_echo_n "checking for library containing opendir... " >&6; }
+-$as_echo_n "checking for library containing opendir... " >&6; }
 -if test "${ac_cv_search_opendir+set}" = set; then
-+if test "${ac_cv_search_opendir+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
-   ac_func_search_save_LIBS=$LIBS
+-  $as_echo_n "(cached) " >&6
+-else
+-  ac_func_search_save_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 GCC internal prototype to avoid an error.
-@@ -5853,70 +6377,39 @@ for ac_lib in '' x; do
-     ac_res=-l$ac_lib
-     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-   fi
+-/* end confdefs.h.  */
+-
+-/* Override any GCC internal prototype to avoid an error.
+-   Use char because int might match the return type of a GCC
+-   builtin and then its argument prototype would still apply.  */
+-#ifdef __cplusplus
+-extern "C"
+-#endif
+-char opendir ();
+-int
+-main ()
+-{
+-return opendir ();
+-  ;
+-  return 0;
+-}
+-_ACEOF
+-for ac_lib in '' x; do
+-  if test -z "$ac_lib"; then
+-    ac_res="none required"
+-  else
+-    ac_res=-l$ac_lib
+-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+-  fi
 -  rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -5436,67 +6152,63 @@ index f51d803..459bf70 100755
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
-+  if ac_fn_c_try_link "$LINENO"; then :
-   ac_cv_search_opendir=$ac_res
+-  ac_cv_search_opendir=$ac_res
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -
- fi
+-fi
 -
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext
 -  if test "${ac_cv_search_opendir+set}" = set; then
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext
-+  if test "${ac_cv_search_opendir+set}" = set; then :
-   break
- fi
- done
+-  break
+-fi
+-done
 -if test "${ac_cv_search_opendir+set}" = set; then
 -  :
-+if test "${ac_cv_search_opendir+set}" = set; then :
-+
- else
-   ac_cv_search_opendir=no
- fi
- rm conftest.$ac_ext
- LIBS=$ac_func_search_save_LIBS
- fi
+-else
+-  ac_cv_search_opendir=no
+-fi
+-rm conftest.$ac_ext
+-LIBS=$ac_func_search_save_LIBS
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
- $as_echo "$ac_cv_search_opendir" >&6; }
- ac_res=$ac_cv_search_opendir
+-$as_echo "$ac_cv_search_opendir" >&6; }
+-ac_res=$ac_cv_search_opendir
 -if test "$ac_res" != no; then
-+if test "$ac_res" != no; then :
-   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
- 
- fi
- 
- fi
- 
+-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+-
+-fi
+-
+-fi
+-
 -{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
- $as_echo_n "checking for ANSI C header files... " >&6; }
+-$as_echo_n "checking for ANSI C header files... " >&6; }
 -if test "${ac_cv_header_stdc+set}" = set; then
-+if test "${ac_cv_header_stdc+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
+-  $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.  */
- #include <stdlib.h>
- #include <stdarg.h>
-@@ -5931,48 +6424,23 @@ main ()
-   return 0;
- }
- _ACEOF
+-/* end confdefs.h.  */
+-#include <stdlib.h>
+-#include <stdarg.h>
+-#include <string.h>
+-#include <float.h>
+-
+-int
+-main ()
+-{
+-
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -5515,81 +6227,94 @@ index f51d803..459bf70 100755
 -	 test -z "$ac_c_werror_flag" ||
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
-+if ac_fn_c_try_compile "$LINENO"; then :
-   ac_cv_header_stdc=yes
- else
+-  ac_cv_header_stdc=yes
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_header_stdc=no
-+  ac_cv_header_stdc=no
- fi
+-fi
 -
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- 
- if test $ac_cv_header_stdc = yes; then
-   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+-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 |
+-/* 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
-@@ -5982,18 +6450,14 @@ fi
- 
- if test $ac_cv_header_stdc = yes; then
-   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+-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
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
- #include <stdlib.h>
- 
- _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+-/* 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
-@@ -6003,14 +6467,10 @@ fi
- 
- if test $ac_cv_header_stdc = yes; then
-   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+-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
-+  if test "$cross_compiling" = yes; then :
-   :
- else
+-  :
+-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>
-@@ -6037,64 +6497,31 @@ main ()
-   return 0;
- }
- _ACEOF
+-/* end confdefs.h.  */
+-#include <ctype.h>
+-#include <stdlib.h>
+-#if ((' ' & 0x0FF) == 0x020)
+-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+-#else
+-# define ISLOWER(c) \
+-		   (('a' <= (c) && (c) <= 'i') \
+-		     || ('j' <= (c) && (c) <= 'r') \
+-		     || ('s' <= (c) && (c) <= 'z'))
+-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+-#endif
+-
+-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+-int
+-main ()
+-{
+-  int i;
+-  for (i = 0; i < 256; i++)
+-    if (XOR (islower (i), ISLOWER (i))
+-	|| toupper (i) != TOUPPER (i))
+-      return 2;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -5617,54 +6342,57 @@ index f51d803..459bf70 100755
 -  $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
-+if ac_fn_c_try_run "$LINENO"; then :
- 
+-
 -( exit $ac_status )
 -ac_cv_header_stdc=no
-+else
-+  ac_cv_header_stdc=no
- fi
+-fi
 -rm -rf conftest.dSYM
 -rm -f core *.core core.conftest.* 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
- fi
+-
+-fi
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
-+{ $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
- 
+-$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
- 
+-
+-fi
+-
 -{ $as_echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
- $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
+-$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
 -if test "${ac_cv_header_sys_wait_h+set}" = set; then
-+if test "${ac_cv_header_sys_wait_h+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
+-  $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.  */
- #include <sys/types.h>
- #include <sys/wait.h>
-@@ -6115,108 +6542,29 @@ main ()
-   return 0;
- }
- _ACEOF
+-/* end confdefs.h.  */
+-#include <sys/types.h>
+-#include <sys/wait.h>
+-#ifndef WEXITSTATUS
+-# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
+-#endif
+-#ifndef WIFEXITED
+-# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
+-#endif
+-
+-int
+-main ()
+-{
+-  int s;
+-  wait (&s);
+-  s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -5683,31 +6411,27 @@ index f51d803..459bf70 100755
 -	 test -z "$ac_c_werror_flag" ||
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
-+if ac_fn_c_try_compile "$LINENO"; then :
-   ac_cv_header_sys_wait_h=yes
- else
+-  ac_cv_header_sys_wait_h=yes
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_header_sys_wait_h=no
-+  ac_cv_header_sys_wait_h=no
- fi
+-fi
 -
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
- $as_echo "$ac_cv_header_sys_wait_h" >&6; }
- if test $ac_cv_header_sys_wait_h = yes; then
- 
+-$as_echo "$ac_cv_header_sys_wait_h" >&6; }
+-if test $ac_cv_header_sys_wait_h = yes; then
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_SYS_WAIT_H 1
 -_ACEOF
-+$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
- 
- fi
- 
- # On IRIX 5.3, sys/types and inttypes.h are conflicting.
+-
+-fi
+-
+-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
 -
 -
 -
@@ -5717,8 +6441,8 @@ index f51d803..459bf70 100755
 -
 -
 -
- for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
- 		  inttypes.h stdint.h unistd.h
+-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=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
@@ -5771,38 +6495,104 @@ index f51d803..459bf70 100755
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""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 `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
- _ACEOF
-@@ -6226,16 +6574,12 @@ fi
- done
- 
- 
+-  cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+-_ACEOF
+-
+-fi
+-
+-done
+-
+-
 -{ $as_echo "$as_me:$LINENO: checking for stdbool.h that conforms to C99" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
- $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
+-$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
 -if test "${ac_cv_header_stdbool_h+set}" = set; then
-+if test "${ac_cv_header_stdbool_h+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
+-  $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.  */
- 
- #include <stdbool.h>
-@@ -6315,131 +6659,17 @@ main ()
-   return 0;
- }
- _ACEOF
+-/* end confdefs.h.  */
+-
+-#include <stdbool.h>
+-#ifndef bool
+- "error: bool is not defined"
+-#endif
+-#ifndef false
+- "error: false is not defined"
+-#endif
+-#if false
+- "error: false is not 0"
+-#endif
+-#ifndef true
+- "error: true is not defined"
+-#endif
+-#if true != 1
+- "error: true is not 1"
+-#endif
+-#ifndef __bool_true_false_are_defined
+- "error: __bool_true_false_are_defined is not defined"
+-#endif
+-
+-	struct s { _Bool s: 1; _Bool t; } s;
+-
+-	char a[true == 1 ? 1 : -1];
+-	char b[false == 0 ? 1 : -1];
+-	char c[__bool_true_false_are_defined == 1 ? 1 : -1];
+-	char d[(bool) 0.5 == true ? 1 : -1];
+-	bool e = &s;
+-	char f[(_Bool) 0.0 == false ? 1 : -1];
+-	char g[true];
+-	char h[sizeof (_Bool)];
+-	char i[sizeof s.t];
+-	enum { j = false, k = true, l = false * true, m = true * 256 };
+-	/* The following fails for
+-	   HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
+-	_Bool n[m];
+-	char o[sizeof n == m * sizeof n[0] ? 1 : -1];
+-	char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
+-#	if defined __xlc__ || defined __GNUC__
+-	 /* Catch a bug in IBM AIX xlc compiler version 6.0.0.0
+-	    reported by James Lemley on 2005-10-05; see
+-	    http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html
+-	    This test is not quite right, since xlc is allowed to
+-	    reject this program, as the initializer for xlcbug is
+-	    not one of the forms that C requires support for.
+-	    However, doing the test right would require a runtime
+-	    test, and that would make cross-compilation harder.
+-	    Let us hope that IBM fixes the xlc bug, and also adds
+-	    support for this kind of constant expression.  In the
+-	    meantime, this test will reject xlc, which is OK, since
+-	    our stdbool.h substitute should suffice.  We also test
+-	    this with GCC, where it should work, to detect more
+-	    quickly whether someone messes up the test in the
+-	    future.  */
+-	 char digs[] = "0123456789";
+-	 int xlcbug = 1 / (&(digs + 5)[-2 + (bool) 1] == &digs[4] ? 1 : -1);
+-#	endif
+-	/* Catch a bug in an HP-UX C compiler.  See
+-	   http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
+-	   http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
+-	 */
+-	_Bool q = true;
+-	_Bool *pq = &q;
+-
+-int
+-main ()
+-{
+-
+-	*pq |= q;
+-	*pq |= ! q;
+-	/* Refer to every declared value, to avoid compiler optimizations.  */
+-	return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
+-		+ !m + !n + !o + !p + !q + !pq);
+-
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -5821,21 +6611,18 @@ index f51d803..459bf70 100755
 -	 test -z "$ac_c_werror_flag" ||
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
-+if ac_fn_c_try_compile "$LINENO"; then :
-   ac_cv_header_stdbool_h=yes
- else
+-  ac_cv_header_stdbool_h=yes
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_header_stdbool_h=no
-+  ac_cv_header_stdbool_h=no
- fi
+-fi
 -
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdbool_h" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
- $as_echo "$ac_cv_header_stdbool_h" >&6; }
+-$as_echo "$ac_cv_header_stdbool_h" >&6; }
 -{ $as_echo "$as_me:$LINENO: checking for _Bool" >&5
 -$as_echo_n "checking for _Bool... " >&6; }
 -if test "${ac_cv_type__Bool+set}" = set; then
@@ -5931,42 +6718,46 @@ index f51d803..459bf70 100755
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
 -$as_echo "$ac_cv_type__Bool" >&6; }
 -if test "x$ac_cv_type__Bool" = x""yes; then
-+ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
-+if test "x$ac_cv_type__Bool" = x""yes; then :
- 
- cat >>confdefs.h <<_ACEOF
- #define HAVE__BOOL 1
-@@ -6450,22 +6680,16 @@ fi
- 
- if test $ac_cv_header_stdbool_h = yes; then
- 
+-
+-cat >>confdefs.h <<_ACEOF
+-#define HAVE__BOOL 1
+-_ACEOF
+-
+-
+-fi
+-
+-if test $ac_cv_header_stdbool_h = yes; then
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_STDBOOL_H 1
 -_ACEOF
-+$as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
- 
- fi
- 
+-
+-fi
+-
 -{ $as_echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
- $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
+-$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
 -if test "${ac_cv_header_time+set}" = set; then
-+if test "${ac_cv_header_time+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
+-  $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.  */
- #include <sys/types.h>
- #include <sys/time.h>
-@@ -6480,54 +6704,27 @@ return 0;
-   return 0;
- }
- _ACEOF
+-/* end confdefs.h.  */
+-#include <sys/types.h>
+-#include <sys/time.h>
+-#include <time.h>
+-
+-int
+-main ()
+-{
+-if ((struct tm *) 0)
+-return 0;
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -5985,50 +6776,57 @@ index f51d803..459bf70 100755
 -	 test -z "$ac_c_werror_flag" ||
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
-+if ac_fn_c_try_compile "$LINENO"; then :
-   ac_cv_header_time=yes
- else
+-  ac_cv_header_time=yes
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_header_time=no
-+  ac_cv_header_time=no
- fi
+-fi
 -
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
- $as_echo "$ac_cv_header_time" >&6; }
- if test $ac_cv_header_time = yes; then
- 
+-$as_echo "$ac_cv_header_time" >&6; }
+-if test $ac_cv_header_time = yes; then
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define TIME_WITH_SYS_TIME 1
 -_ACEOF
-+$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
- 
- fi
- 
+-
+-fi
+-
 -{ $as_echo "$as_me:$LINENO: checking whether stat file-mode macros are broken" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
- $as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
+-$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
 -if test "${ac_cv_header_stat_broken+set}" = set; then
-+if test "${ac_cv_header_stat_broken+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
+-  $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.  */
- #include <sys/types.h>
- #include <sys/stat.h>
-@@ -6549,41 +6746,18 @@ extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
- #endif
- 
- _ACEOF
+-/* end confdefs.h.  */
+-#include <sys/types.h>
+-#include <sys/stat.h>
+-
+-#if defined S_ISBLK && defined S_IFDIR
+-extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
+-#endif
+-
+-#if defined S_ISBLK && defined S_IFCHR
+-extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
+-#endif
+-
+-#if defined S_ISLNK && defined S_IFREG
+-extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
+-#endif
+-
+-#if defined S_ISSOCK && defined S_IFREG
+-extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
+-#endif
+-
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -6047,176 +6845,172 @@ index f51d803..459bf70 100755
 -	 test -z "$ac_c_werror_flag" ||
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
-+if ac_fn_c_try_compile "$LINENO"; then :
-   ac_cv_header_stat_broken=no
- else
+-  ac_cv_header_stat_broken=no
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_header_stat_broken=yes
-+  ac_cv_header_stat_broken=yes
- fi
+-fi
 -
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stat_broken" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
- $as_echo "$ac_cv_header_stat_broken" >&6; }
- if test $ac_cv_header_stat_broken = yes; then
- 
+-$as_echo "$ac_cv_header_stat_broken" >&6; }
+-if test $ac_cv_header_stat_broken = yes; then
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define STAT_MACROS_BROKEN 1
 -_ACEOF
-+$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
- 
- fi
- 
-@@ -6594,22 +6768,18 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
- ac_compiler_gnu=$ac_cv_c_compiler_gnu
- 
- if test "x$CC" != xcc; then
+-
+-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 "x$CC" != xcc; then
 -  { $as_echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
- $as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
- else
+-$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
+-else
 -  { $as_echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
- $as_echo_n "checking whether cc understands -c and -o together... " >&6; }
- fi
- set dummy $CC; ac_cc=`$as_echo "$2" |
- 		      sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
+-$as_echo_n "checking whether cc understands -c and -o together... " >&6; }
+-fi
+-set dummy $CC; ac_cc=`$as_echo "$2" |
+-		      sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
 -if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then
-+if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\"" = set; then :
-   $as_echo_n "(cached) " >&6
- else
+-  $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
-@@ -6625,63 +6795,63 @@ _ACEOF
- # existing .o file with -o, though they will create one.
- ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
- rm -f conftest2.*
+-/* end confdefs.h.  */
+-
+-int
+-main ()
+-{
+-
+-  ;
+-  return 0;
+-}
+-_ACEOF
+-# Make sure it works both with $CC and with simple cc.
+-# We do the test twice because some compilers refuse to overwrite an
+-# existing .o file with -o, though they will create one.
+-ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
+-rm -f conftest2.*
 -if { (case "(($ac_try" in
-+if { { case "(($ac_try" in
-   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-   *) ac_try_echo=$ac_try;;
- esac
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
-+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=$?
+-  (eval "$ac_try") 2>&5
+-  ac_status=$?
 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
 -  (exit $ac_status); } &&
 -   test -f conftest2.$ac_objext && { (case "(($ac_try" in
-+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-+  test $ac_status = 0; } &&
-+   test -f conftest2.$ac_objext && { { case "(($ac_try" in
-   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-   *) ac_try_echo=$ac_try;;
- esac
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
-+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=$?
+-  (eval "$ac_try") 2>&5
+-  ac_status=$?
 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
 -  (exit $ac_status); };
-+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-+  test $ac_status = 0; };
- then
-   eval ac_cv_prog_cc_${ac_cc}_c_o=yes
-   if test "x$CC" != xcc; then
-     # Test first that cc exists at all.
-     if { ac_try='cc -c conftest.$ac_ext >&5'
+-then
+-  eval ac_cv_prog_cc_${ac_cc}_c_o=yes
+-  if test "x$CC" != xcc; then
+-    # Test first that cc exists at all.
+-    if { ac_try='cc -c conftest.$ac_ext >&5'
 -  { (case "(($ac_try" in
-+  { { case "(($ac_try" in
-   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-   *) ac_try_echo=$ac_try;;
- esac
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
-+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=$?
+-  (eval "$ac_try") 2>&5
+-  ac_status=$?
 -  $as_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
-       ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
-       rm -f conftest2.*
+-      ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
+-      rm -f conftest2.*
 -      if { (case "(($ac_try" in
-+      if { { case "(($ac_try" in
-   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-   *) ac_try_echo=$ac_try;;
- esac
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
-+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=$?
+-  (eval "$ac_try") 2>&5
+-  ac_status=$?
 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
 -  (exit $ac_status); } &&
 -	 test -f conftest2.$ac_objext && { (case "(($ac_try" in
-+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-+  test $ac_status = 0; } &&
-+	 test -f conftest2.$ac_objext && { { case "(($ac_try" in
-   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-   *) ac_try_echo=$ac_try;;
- esac
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
-+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=$?
+-  (eval "$ac_try") 2>&5
+-  ac_status=$?
 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
 -  (exit $ac_status); };
-+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-+  test $ac_status = 0; };
-       then
- 	# cc works too.
- 	:
-@@ -6698,15 +6868,13 @@ rm -f core conftest*
- 
- fi
- if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
+-      then
+-	# cc works too.
+-	:
+-      else
+-	# cc exists but doesn't like -o.
+-	eval ac_cv_prog_cc_${ac_cc}_c_o=no
+-      fi
+-    fi
+-  fi
+-else
+-  eval ac_cv_prog_cc_${ac_cc}_c_o=no
+-fi
+-rm -f core conftest*
+-
+-fi
+-if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
 -  { $as_echo "$as_me:$LINENO: result: yes" >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
- $as_echo "yes" >&6; }
- else
+-$as_echo "yes" >&6; }
+-else
 -  { $as_echo "$as_me:$LINENO: result: no" >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
- $as_echo "no" >&6; }
- 
+-$as_echo "no" >&6; }
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define NO_MINUS_C_MINUS_O 1
 -_ACEOF
-+$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
- 
- fi
- 
-@@ -6726,788 +6894,76 @@ fi
- 
- 
- 
+-
+-fi
+-
+-# FIXME: we rely on the cache variable name because
+-# there is no other way.
+-set dummy $CC
+-am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
+-eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
+-if test "$am_t" != yes; then
+-   # Losing compiler, so override with the script.
+-   # FIXME: It is wrong to rewrite CC.
+-   # But if we don't then we get into trouble of one sort or another.
+-   # A longer-term fix would be to have automake use am__CC in this case,
+-   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+-   CC="$am_aux_dir/compile $CC"
+-fi
+-
+-
 -
 -
 -
 -
 -
 -
- for ac_header in time.h syslog.h stddef.h unistd.h arpa/inet.h fcntl.h
+-
+-for ac_header in time.h syslog.h stddef.h unistd.h arpa/inet.h fcntl.h
 -do
 -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
@@ -6358,31 +7152,26 @@ index f51d803..459bf70 100755
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+do :
-+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
-   cat >>confdefs.h <<_ACEOF
- #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
- _ACEOF
- 
- else
+-  cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+-_ACEOF
+-
+-else
 -  { { $as_echo "$as_me:$LINENO: error: required header not found" >&5
 -$as_echo "$as_me: error: required header not found" >&2;}
 -   { (exit 1); exit 1; }; }
-+  as_fn_error $? "required header not found" "$LINENO" 5
- fi
- 
- done
- 
- 
+-fi
+-
+-done
 -
 -
 -
 -
 -
 -
- for ac_header in limits.h netdb.h netinet/in.h stdlib.h string.h sys/file.h
+-
+-
+-for ac_header in limits.h netdb.h netinet/in.h stdlib.h string.h sys/file.h
 -do
 -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
@@ -6524,29 +7313,24 @@ index f51d803..459bf70 100755
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+do :
-+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
-   cat >>confdefs.h <<_ACEOF
- #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
- _ACEOF
- 
- else
+-  cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+-_ACEOF
+-
+-else
 -  { { $as_echo "$as_me:$LINENO: error: required header not found" >&5
 -$as_echo "$as_me: error: required header not found" >&2;}
 -   { (exit 1); exit 1; }; }
-+  as_fn_error $? "required header not found" "$LINENO" 5
- fi
- 
- done
- 
+-fi
+-
+-done
 -
 -
 -
 -
 -
- for ac_header in sys/ioctl.h sys/socket.h sys/time.h sys/types.h sys/wait.h
+-
+-for ac_header in sys/ioctl.h sys/socket.h sys/time.h sys/types.h sys/wait.h
 -do
 -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
@@ -6688,27 +7472,22 @@ index f51d803..459bf70 100755
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+do :
-+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
-   cat >>confdefs.h <<_ACEOF
- #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
- _ACEOF
- 
- else
+-  cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+-_ACEOF
+-
+-else
 -  { { $as_echo "$as_me:$LINENO: error: required header not found" >&5
 -$as_echo "$as_me: error: required header not found" >&2;}
 -   { (exit 1); exit 1; }; }
-+  as_fn_error $? "required header not found" "$LINENO" 5
- fi
- 
- done
- 
- 
+-fi
+-
+-done
+-
 -
 -
- for ac_header in langinfo.h locale.h
+-
+-for ac_header in langinfo.h locale.h
 -do
 -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
@@ -6850,25 +7629,20 @@ index f51d803..459bf70 100755
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+do :
-+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
-   cat >>confdefs.h <<_ACEOF
- #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
- _ACEOF
- 
- else
+-  cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+-_ACEOF
+-
+-else
 -  { $as_echo "$as_me:$LINENO: WARNING: Header that is required to retrieve system locale not found" >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Header that is required to retrieve system locale not found" >&5
- $as_echo "$as_me: WARNING: Header that is required to retrieve system locale not found" >&2;}
- fi
- 
- done
- 
- 
+-$as_echo "$as_me: WARNING: Header that is required to retrieve system locale not found" >&2;}
+-fi
+-
+-done
+-
 -
- for ac_header in sys/utsname.h
+-
+-for ac_header in sys/utsname.h
 -do
 -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
@@ -7010,22 +7784,18 @@ index f51d803..459bf70 100755
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+do :
-+  ac_fn_c_check_header_mongrel "$LINENO" "sys/utsname.h" "ac_cv_header_sys_utsname_h" "$ac_includes_default"
-+if test "x$ac_cv_header_sys_utsname_h" = x""yes; then :
-   cat >>confdefs.h <<_ACEOF
+-  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-+#define HAVE_SYS_UTSNAME_H 1
- _ACEOF
- 
- fi
-@@ -7515,150 +6971,11 @@ fi
- done
- 
- 
+-_ACEOF
+-
+-fi
+-
+-done
+-
 -
 -
- for ac_header in sched.h ctype.h
+-
+-for ac_header in sched.h ctype.h
 -do
 -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
@@ -7167,22 +7937,19 @@ index f51d803..459bf70 100755
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+do :
-+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
-   cat >>confdefs.h <<_ACEOF
- #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
- _ACEOF
-@@ -7667,103 +6984,11 @@ fi
- 
- done
- 
+-  cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+-_ACEOF
+-
+-fi
+-
+-done
+-
 -
 -
 -
 -
- for ac_func in sched_getparam sched_setparam sched_get_priority_min sched_get_priority_max
+-for ac_func in sched_getparam sched_setparam sched_get_priority_min sched_get_priority_max
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -7275,19 +8042,16 @@ index f51d803..459bf70 100755
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+do :
-+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
-   cat >>confdefs.h <<_ACEOF
- #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
- _ACEOF
-@@ -7772,359 +6997,38 @@ fi
- done
- 
- 
+-  cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+-_ACEOF
+-
+-fi
+-done
 -
- for ac_func in mkdir
+-
+-
+-for ac_func in mkdir
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -7380,25 +8144,20 @@ index f51d803..459bf70 100755
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+do :
-+  ac_fn_c_check_func "$LINENO" "mkdir" "ac_cv_func_mkdir"
-+if test "x$ac_cv_func_mkdir" = x""yes; then :
-   cat >>confdefs.h <<_ACEOF
+-  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+#define HAVE_MKDIR 1
- _ACEOF
- 
- else
+-_ACEOF
+-
+-else
 -  { { $as_echo "$as_me:$LINENO: error: required function not found" >&5
 -$as_echo "$as_me: error: required function not found" >&2;}
 -   { (exit 1); exit 1; }; }
-+  as_fn_error $? "required function not found" "$LINENO" 5
- fi
- done
- 
- 
+-fi
+-done
+-
+-
 -
- for ac_header in getopt.h
+-for ac_header in getopt.h
 -do
 -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
@@ -7540,10 +8299,7 @@ index f51d803..459bf70 100755
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+do :
-+  ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
-+if test "x$ac_cv_header_getopt_h" = x""yes; then :
-   cat >>confdefs.h <<_ACEOF
+-  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 -_ACEOF
 -
@@ -7600,8 +8356,7 @@ index f51d803..459bf70 100755
 -  ;
 -  return 0;
 -}
-+#define HAVE_GETOPT_H 1
- _ACEOF
+-_ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -7627,7 +8382,7 @@ index f51d803..459bf70 100755
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -	eval "$as_ac_var=no"
 -fi
 -
@@ -7642,75 +8397,112 @@ index f51d803..459bf70 100755
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+            for ac_func in getopt_long
-+do :
-+  ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
-+if test "x$ac_cv_func_getopt_long" = x""yes; then :
-   cat >>confdefs.h <<_ACEOF
+-  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+#define HAVE_GETOPT_LONG 1
- _ACEOF
- 
- else
+-_ACEOF
+-
+-else
 -  { $as_echo "$as_me:$LINENO: WARNING: getopt_long not found - all command line options disabled" >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: getopt_long not found - all command line options disabled" >&5
- $as_echo "$as_me: WARNING: getopt_long not found - all command line options disabled" >&2;}
- 
- fi
-@@ -8134,7 +7038,7 @@ done
- 
- else
- 
+-$as_echo "$as_me: WARNING: getopt_long not found - all command line options disabled" >&2;}
+-
+-fi
+-done
+-
+-
+-
+-else
+-
 -    { $as_echo "$as_me:$LINENO: WARNING: getopt.h not found - all command line options disabled" >&5
-+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: getopt.h not found - all command line options disabled" >&5
- $as_echo "$as_me: WARNING: getopt.h not found - all command line options disabled" >&2;}
- 
- fi
-@@ -8169,13 +7073,13 @@ _ACEOF
-     case $ac_val in #(
-     *${as_nl}*)
-       case $ac_var in #(
+-$as_echo "$as_me: WARNING: getopt.h not found - all command line options disabled" >&2;}
+-
+-fi
+-
+-done
+-
+-
+-cat >confcache <<\_ACEOF
+-# This file is a shell script that caches the results of configure
+-# tests run on this system so they can be shared between configure
+-# scripts and configure runs, see configure's option --config-cache.
+-# It is not useful on other systems.  If it contains results you don't
+-# want to keep, you may remove or edit it.
+-#
+-# config.status only pays attention to the cache file if you give it
+-# the --recheck option to rerun configure.
+-#
+-# `ac_cv_env_foo' variables (set or unset) will be overridden when
+-# loading this file, other *unset* `ac_cv_foo' will be assigned the
+-# following values.
+-
+-_ACEOF
+-
+-# The following way of writing the cache mishandles newlines in values,
+-# but we know of no workaround that is simple, portable, and efficient.
+-# So, we kill variables containing newlines.
+-# Ultrix sh set writes to stderr and can't be redirected directly,
+-# and sets the high bit in the cache file unless we assign to the vars.
+-(
+-  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+-    eval ac_val=\$$ac_var
+-    case $ac_val in #(
+-    *${as_nl}*)
+-      case $ac_var in #(
 -      *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
-+      *_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= ;; #(
+-$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= ;; #(
 -      *) $as_unset $ac_var ;;
-+      *) { eval $ac_var=; unset $ac_var;} ;;
-       esac ;;
-     esac
-   done
-@@ -8183,8 +7087,8 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
-   (set) 2>&1 |
-     case $as_nl`(ac_space=' '; set) 2>&1` in #(
-     *${as_nl}ac_space=\ *)
+-      esac ;;
+-    esac
+-  done
+-
+-  (set) 2>&1 |
+-    case $as_nl`(ac_space=' '; set) 2>&1` in #(
+-    *${as_nl}ac_space=\ *)
 -      # `set' does not quote correctly, so add quotes (double-quote
 -      # substitution turns \\\\ into \\, and sed turns \\ into \).
-+      # `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"
-@@ -8207,11 +7111,11 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
- if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
-   if test -w "$cache_file"; then
-     test "x$cache_file" != "x/dev/null" &&
+-      sed -n \
+-	"s/'/'\\\\''/g;
+-	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+-      ;; #(
+-    *)
+-      # `set' quotes correctly as required by POSIX, so do not add quotes.
+-      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+-      ;;
+-    esac |
+-    sort
+-) |
+-  sed '
+-     /^ac_cv_env_/b end
+-     t clear
+-     :clear
+-     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+-     t end
+-     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+-     :end' >>confcache
+-if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+-  if test -w "$cache_file"; then
+-    test "x$cache_file" != "x/dev/null" &&
 -      { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5
-+      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
- $as_echo "$as_me: updating cache $cache_file" >&6;}
-     cat confcache >$cache_file
-   else
+-$as_echo "$as_me: updating cache $cache_file" >&6;}
+-    cat confcache >$cache_file
+-  else
 -    { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
-+    { $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
-@@ -8225,118 +7129,24 @@ CXXFLAGS_SAVE="$CXXFLAGS"
- LDFLAGS_SAVE="$LDFLAGS"
- 
- if test "x$EXTERNAL_TRANSCODING_OPTION_ENABLED" = xyes; then
+-$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+-  fi
+-fi
+-rm -f confcache
+-
+-
+-
+-CPPFLAGS_SAVE="$CPPFLAGS"
+-CFLAGS_SAVE="$CFLAGS"
+-CXXFLAGS_SAVE="$CXXFLAGS"
+-LDFLAGS_SAVE="$LDFLAGS"
+-
+-if test "x$EXTERNAL_TRANSCODING_OPTION_ENABLED" = xyes; then
 -
 -for ac_func in mkfifo
 -do
@@ -7805,39 +8597,40 @@ index f51d803..459bf70 100755
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+    for ac_func in mkfifo
-+do :
-+  ac_fn_c_check_func "$LINENO" "mkfifo" "ac_cv_func_mkfifo"
-+if test "x$ac_cv_func_mkfifo" = x""yes; then :
-   cat >>confdefs.h <<_ACEOF
+-  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+#define HAVE_MKFIFO 1
- _ACEOF
- 
- 
+-_ACEOF
+-
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define EXTERNAL_TRANSCODING 1
 -_ACEOF
-+$as_echo "#define EXTERNAL_TRANSCODING 1" >>confdefs.h
- 
- 
- else
- 
-            if test "x$EXTERNAL_TRANSCODING_OPTION_REQUESTED" = xyes; then
+-
+-
+-else
+-
+-           if test "x$EXTERNAL_TRANSCODING_OPTION_REQUESTED" = xyes; then
 -               { { $as_echo "$as_me:$LINENO: error: mkfifo is required by the external transcoding feature" >&5
 -$as_echo "$as_me: error: mkfifo is required by the external transcoding feature" >&2;}
 -   { (exit 1); exit 1; }; }
-+               as_fn_error $? "mkfifo is required by the external transcoding feature" "$LINENO" 5
-            else
+-           else
 -               { $as_echo "$as_me:$LINENO: WARNING: mkfifo is required by the external transcoding feature" >&5
-+               { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: mkfifo is required by the external transcoding feature" >&5
- $as_echo "$as_me: WARNING: mkfifo is required by the external transcoding feature" >&2;}
-                EXTERNAL_TRANSCODING_OPTION_ENABLED=disabled
- 
-@@ -8353,153 +7163,14 @@ ICONV_LIBS=
- 
- if test -n "$ICONV_SEARCH_HEADERS"; then
- as_ac_Header=`$as_echo "ac_cv_header_$ICONV_SEARCH_HEADERS/iconv.h" | $as_tr_sh`
+-$as_echo "$as_me: WARNING: mkfifo is required by the external transcoding feature" >&2;}
+-               EXTERNAL_TRANSCODING_OPTION_ENABLED=disabled
+-
+-           fi
+-
+-
+-fi
+-done
+-
+-fi
+-
+-ICONV_CXXFLAGS=
+-ICONV_LIBS=
+-
+-if test -n "$ICONV_SEARCH_HEADERS"; then
+-as_ac_Header=`$as_echo "ac_cv_header_$ICONV_SEARCH_HEADERS/iconv.h" | $as_tr_sh`
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 -  { $as_echo "$as_me:$LINENO: checking for $ICONV_SEARCH_HEADERS/iconv.h" >&5
 -$as_echo_n "checking for $ICONV_SEARCH_HEADERS/iconv.h... " >&6; }
@@ -7977,24 +8770,21 @@ index f51d803..459bf70 100755
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+ac_fn_c_check_header_mongrel "$LINENO" "$ICONV_SEARCH_HEADERS/iconv.h" "$as_ac_Header" "$ac_includes_default"
-+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- 
-             ICONV_CXXFLAGS="-I$ICONV_SEARCH_HEADERS"
- 
- else
- 
+-
+-            ICONV_CXXFLAGS="-I$ICONV_SEARCH_HEADERS"
+-
+-else
+-
 -            { { $as_echo "$as_me:$LINENO: error: iconv.h not found in requested location $ICONV_SEARCH_HEADERS" >&5
 -$as_echo "$as_me: error: iconv.h not found in requested location $ICONV_SEARCH_HEADERS" >&2;}
 -   { (exit 1); exit 1; }; }
-+            as_fn_error $? "iconv.h not found in requested location $ICONV_SEARCH_HEADERS" "$LINENO" 5
- 
- 
- fi
-@@ -8507,276 +7178,14 @@ fi
- 
- 
- else
+-
+-
+-fi
+-
+-
+-
+-else
 -if test "${ac_cv_header_iconv_h+set}" = set; then
 -  { $as_echo "$as_me:$LINENO: checking for iconv.h" >&5
 -$as_echo_n "checking for iconv.h... " >&6; }
@@ -8128,12 +8918,10 @@ index f51d803..459bf70 100755
 -
 -fi
 -if test "x$ac_cv_header_iconv_h" = x""yes; then
-+ac_fn_c_check_header_mongrel "$LINENO" "iconv.h" "ac_cv_header_iconv_h" "$ac_includes_default"
-+if test "x$ac_cv_header_iconv_h" = x""yes; then :
-   ICONV_OK=yes
- else
- 
-             unset ac_cv_header_iconv_h
+-  ICONV_OK=yes
+-else
+-
+-            unset ac_cv_header_iconv_h
 -            if test "${ac_cv_header__usr_local_include_iconv_h+set}" = set; then
 -  { $as_echo "$as_me:$LINENO: checking for /usr/local/include/iconv.h" >&5
 -$as_echo_n "checking for /usr/local/include/iconv.h... " >&6; }
@@ -8267,15 +9055,16 @@ index f51d803..459bf70 100755
 -
 -fi
 -if test "x$ac_cv_header__usr_local_include_iconv_h" = x""yes; then
-+            ac_fn_c_check_header_mongrel "$LINENO" "/usr/local/include/iconv.h" "ac_cv_header__usr_local_include_iconv_h" "$ac_includes_default"
-+if test "x$ac_cv_header__usr_local_include_iconv_h" = x""yes; then :
- 
-                     ICONV_CXXFLAGS="-I/usr/local/include"
-                     if test -z "$ICONV_SEARCH_LIBS"; then
-@@ -8787,145 +7196,8 @@ else
- 
-                     unset ac_cv_header_iconv_h
-                     as_ac_Header=`$as_echo "ac_cv_header_$SEARCH_DIR_HEADERS/iconv.h" | $as_tr_sh`
+-
+-                    ICONV_CXXFLAGS="-I/usr/local/include"
+-                    if test -z "$ICONV_SEARCH_LIBS"; then
+-                        LDFLAGS="-L/usr/local/lib"
+-                    fi
+-
+-else
+-
+-                    unset ac_cv_header_iconv_h
+-                    as_ac_Header=`$as_echo "ac_cv_header_$SEARCH_DIR_HEADERS/iconv.h" | $as_tr_sh`
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 -  { $as_echo "$as_me:$LINENO: checking for $SEARCH_DIR_HEADERS/iconv.h" >&5
 -$as_echo_n "checking for $SEARCH_DIR_HEADERS/iconv.h... " >&6; }
@@ -8415,26 +9204,36 @@ index f51d803..459bf70 100755
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+ac_fn_c_check_header_mongrel "$LINENO" "$SEARCH_DIR_HEADERS/iconv.h" "$as_ac_Header" "$ac_includes_default"
-+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- 
-                             ICONV_CXXFLAGS="-I$SEARCH_DIR_HEADERS"
-                             if test -z "$ICONV_SEARCH_LIBS"; then
-@@ -8933,9 +7205,7 @@ as_val=`eval 'as_val=${'$as_ac_Header'}
-                             fi
- 
- else
+-
+-                            ICONV_CXXFLAGS="-I$SEARCH_DIR_HEADERS"
+-                            if test -z "$ICONV_SEARCH_LIBS"; then
+-                                LDFLAGS="-L$SEARCH_DIR_LIBS"
+-                            fi
+-
+-else
 -  { { $as_echo "$as_me:$LINENO: error: required header iconv.h not found on your system" >&5
 -$as_echo "$as_me: error: required header iconv.h not found on your system" >&2;}
 -   { (exit 1); exit 1; }; }
-+  as_fn_error $? "required header iconv.h not found on your system" "$LINENO" 5
- 
- fi
- 
-@@ -8956,110 +7226,22 @@ LIBICONV=0
- if test -n "$ICONV_SEARCH_LIBS"; then
-     if test "x$ICONV_LIB_OPTION_ENABLED" = xno; then
-         LDFLAGS="-L$ICONV_SEARCH_LIBS"
+-
+-fi
+-
+-
+-
+-
+-fi
+-
+-
+-
+-
+-fi
+-
+-
+-fi
+-
+-LIBICONV=0
+-if test -n "$ICONV_SEARCH_LIBS"; then
+-    if test "x$ICONV_LIB_OPTION_ENABLED" = xno; then
+-        LDFLAGS="-L$ICONV_SEARCH_LIBS"
 -        { $as_echo "$as_me:$LINENO: checking for iconv" >&5
 -$as_echo_n "checking for iconv... " >&6; }
 -if test "${ac_cv_func_iconv+set}" = set; then
@@ -8521,36 +9320,41 @@ index f51d803..459bf70 100755
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_iconv" >&5
 -$as_echo "$ac_cv_func_iconv" >&6; }
 -if test "x$ac_cv_func_iconv" = x""yes; then
-+        ac_fn_c_check_func "$LINENO" "iconv" "ac_cv_func_iconv"
-+if test "x$ac_cv_func_iconv" = x""yes; then :
- 
-                 ICONV_LIBS="-L$ICONV_SEARCH_LIBS"
- 
- else
- 
-                 LDFLAGS="-L$ICONV_SEARCH_LIBS -liconv"
+-
+-                ICONV_LIBS="-L$ICONV_SEARCH_LIBS"
+-
+-else
+-
+-                LDFLAGS="-L$ICONV_SEARCH_LIBS -liconv"
 -                { $as_echo "$as_me:$LINENO: checking for iconv in -liconv" >&5
-+                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv in -liconv" >&5
- $as_echo_n "checking for iconv in -liconv... " >&6; }
+-$as_echo_n "checking for iconv in -liconv... " >&6; }
 -if test "${ac_cv_lib_iconv_iconv+set}" = set; then
-+if test "${ac_cv_lib_iconv_iconv+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
-   ac_check_lib_save_LIBS=$LIBS
- LIBS="-liconv  $LIBS"
+-  $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 GCC internal prototype to avoid an error.
-@@ -9077,61 +7259,32 @@ return iconv ();
-   return 0;
- }
- _ACEOF
+-/* end confdefs.h.  */
+-
+-/* Override any GCC internal prototype to avoid an error.
+-   Use char because int might match the return type of a GCC
+-   builtin and then its argument prototype would still apply.  */
+-#ifdef __cplusplus
+-extern "C"
+-#endif
+-char iconv ();
+-int
+-main ()
+-{
+-return iconv ();
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -8572,56 +9376,57 @@ index f51d803..459bf70 100755
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
-+if ac_fn_c_try_link "$LINENO"; then :
-   ac_cv_lib_iconv_iconv=yes
- else
+-  ac_cv_lib_iconv_iconv=yes
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_lib_iconv_iconv=no
-+  ac_cv_lib_iconv_iconv=no
- fi
+-fi
 -
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      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
+-LIBS=$ac_check_lib_save_LIBS
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_iconv_iconv" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iconv_iconv" >&5
- $as_echo "$ac_cv_lib_iconv_iconv" >&6; }
+-$as_echo "$ac_cv_lib_iconv_iconv" >&6; }
 -if test "x$ac_cv_lib_iconv_iconv" = x""yes; then
-+if test "x$ac_cv_lib_iconv_iconv" = x""yes; then :
- 
-                         ICONV_LIBS="-L$ICONV_SEARCH_LIBS -liconv"
-                         LIBICONV=1
- 
- else
- 
+-
+-                        ICONV_LIBS="-L$ICONV_SEARCH_LIBS -liconv"
+-                        LIBICONV=1
+-
+-else
+-
 -                        { $as_echo "$as_me:$LINENO: checking for libiconv in -liconv" >&5
-+                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libiconv in -liconv" >&5
- $as_echo_n "checking for libiconv in -liconv... " >&6; }
+-$as_echo_n "checking for libiconv in -liconv... " >&6; }
 -if test "${ac_cv_lib_iconv_libiconv+set}" = set; then
-+if test "${ac_cv_lib_iconv_libiconv+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
-   ac_check_lib_save_LIBS=$LIBS
- LIBS="-liconv  $LIBS"
+-  $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 GCC internal prototype to avoid an error.
-@@ -9149,51 +7302,24 @@ return libiconv ();
-   return 0;
- }
- _ACEOF
+-/* end confdefs.h.  */
+-
+-/* Override any GCC internal prototype to avoid an error.
+-   Use char because int might match the return type of a GCC
+-   builtin and then its argument prototype would still apply.  */
+-#ifdef __cplusplus
+-extern "C"
+-#endif
+-char libiconv ();
+-int
+-main ()
+-{
+-return libiconv ();
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -8643,66 +9448,72 @@ index f51d803..459bf70 100755
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
-+if ac_fn_c_try_link "$LINENO"; then :
-   ac_cv_lib_iconv_libiconv=yes
- else
+-  ac_cv_lib_iconv_libiconv=yes
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_lib_iconv_libiconv=no
-+  ac_cv_lib_iconv_libiconv=no
- fi
+-fi
 -
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      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
+-LIBS=$ac_check_lib_save_LIBS
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_iconv_libiconv" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iconv_libiconv" >&5
- $as_echo "$ac_cv_lib_iconv_libiconv" >&6; }
+-$as_echo "$ac_cv_lib_iconv_libiconv" >&6; }
 -if test "x$ac_cv_lib_iconv_libiconv" = x""yes; then
-+if test "x$ac_cv_lib_iconv_libiconv" = x""yes; then :
- 
-                                 ICONV_LIBS="-L$ICONV_SEARCH_LIBS -liconv"
-                                 LIBICONV=1
- 
- else
+-
+-                                ICONV_LIBS="-L$ICONV_SEARCH_LIBS -liconv"
+-                                LIBICONV=1
+-
+-else
 -  { { $as_echo "$as_me:$LINENO: error: required library iconv not found in requested location $ICONV_SEARCH_LIBS" >&5
 -$as_echo "$as_me: error: required library iconv not found in requested location $ICONV_SEARCH_LIBS" >&2;}
 -   { (exit 1); exit 1; }; }
-+  as_fn_error $? "required library iconv not found in requested location $ICONV_SEARCH_LIBS" "$LINENO" 5
- 
- fi
- 
-@@ -9207,18 +7333,14 @@ fi
- 
-     else
-         LDFLAGS="-L$ICONV_SEARCH_LIBS -liconv"
+-
+-fi
+-
+-
+-
+-fi
+-
+-
+-
+-fi
+-
+-    else
+-        LDFLAGS="-L$ICONV_SEARCH_LIBS -liconv"
 -        { $as_echo "$as_me:$LINENO: checking for iconv in -liconv" >&5
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv in -liconv" >&5
- $as_echo_n "checking for iconv in -liconv... " >&6; }
+-$as_echo_n "checking for iconv in -liconv... " >&6; }
 -if test "${ac_cv_lib_iconv_iconv+set}" = set; then
-+if test "${ac_cv_lib_iconv_iconv+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
-   ac_check_lib_save_LIBS=$LIBS
- LIBS="-liconv  $LIBS"
+-  $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 GCC internal prototype to avoid an error.
-@@ -9236,143 +7358,32 @@ return iconv ();
-   return 0;
- }
- _ACEOF
+-/* end confdefs.h.  */
+-
+-/* Override any GCC internal prototype to avoid an error.
+-   Use char because int might match the return type of a GCC
+-   builtin and then its argument prototype would still apply.  */
+-#ifdef __cplusplus
+-extern "C"
+-#endif
+-char iconv ();
+-int
+-main ()
+-{
+-return iconv ();
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -8724,43 +9535,36 @@ index f51d803..459bf70 100755
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
-+if ac_fn_c_try_link "$LINENO"; then :
-   ac_cv_lib_iconv_iconv=yes
- else
+-  ac_cv_lib_iconv_iconv=yes
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_lib_iconv_iconv=no
-+  ac_cv_lib_iconv_iconv=no
- fi
+-fi
 -
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      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
+-LIBS=$ac_check_lib_save_LIBS
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_iconv_iconv" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iconv_iconv" >&5
- $as_echo "$ac_cv_lib_iconv_iconv" >&6; }
+-$as_echo "$ac_cv_lib_iconv_iconv" >&6; }
 -if test "x$ac_cv_lib_iconv_iconv" = x""yes; then
-+if test "x$ac_cv_lib_iconv_iconv" = x""yes; then :
- 
-                     ICONV_LIBS="-L$ICONV_SEARCH_LIBS -liconv"
-                     LIBICONV=1
- 
- else
+-
+-                    ICONV_LIBS="-L$ICONV_SEARCH_LIBS -liconv"
+-                    LIBICONV=1
+-
+-else
 -  { { $as_echo "$as_me:$LINENO: error: You specified to use libiconv but it was not found in the requested location $ICONV_SEARCH_LIBS" >&5
 -$as_echo "$as_me: error: You specified to use libiconv but it was not found in the requested location $ICONV_SEARCH_LIBS" >&2;}
 -   { (exit 1); exit 1; }; }
-+  as_fn_error $? "You specified to use libiconv but it was not found in the requested location $ICONV_SEARCH_LIBS" "$LINENO" 5
- 
- fi
- 
-     fi
- else
-     if test "x$ICONV_LIB_OPTION_ENABLED" = xno; then
+-
+-fi
+-
+-    fi
+-else
+-    if test "x$ICONV_LIB_OPTION_ENABLED" = xno; then
 -        { $as_echo "$as_me:$LINENO: checking for iconv" >&5
 -$as_echo_n "checking for iconv... " >&6; }
 -if test "${ac_cv_func_iconv+set}" = set; then
@@ -8847,37 +9651,42 @@ index f51d803..459bf70 100755
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_iconv" >&5
 -$as_echo "$ac_cv_func_iconv" >&6; }
 -if test "x$ac_cv_func_iconv" = x""yes; then
-+        ac_fn_c_check_func "$LINENO" "iconv" "ac_cv_func_iconv"
-+if test "x$ac_cv_func_iconv" = x""yes; then :
- 
-                 ICONV_LIBS="$LDFLAGS"
- 
-@@ -9380,18 +7391,14 @@ else
- 
- 
-                 LDFLAGS="$LDFLAGS -liconv"
+-
+-                ICONV_LIBS="$LDFLAGS"
+-
+-else
+-
+-
+-                LDFLAGS="$LDFLAGS -liconv"
 -                { $as_echo "$as_me:$LINENO: checking for iconv in -liconv" >&5
-+                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv in -liconv" >&5
- $as_echo_n "checking for iconv in -liconv... " >&6; }
+-$as_echo_n "checking for iconv in -liconv... " >&6; }
 -if test "${ac_cv_lib_iconv_iconv+set}" = set; then
-+if test "${ac_cv_lib_iconv_iconv+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
-   ac_check_lib_save_LIBS=$LIBS
- LIBS="-liconv  $LIBS"
+-  $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 GCC internal prototype to avoid an error.
-@@ -9409,61 +7416,32 @@ return iconv ();
-   return 0;
- }
- _ACEOF
+-/* end confdefs.h.  */
+-
+-/* Override any GCC internal prototype to avoid an error.
+-   Use char because int might match the return type of a GCC
+-   builtin and then its argument prototype would still apply.  */
+-#ifdef __cplusplus
+-extern "C"
+-#endif
+-char iconv ();
+-int
+-main ()
+-{
+-return iconv ();
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -8899,56 +9708,57 @@ index f51d803..459bf70 100755
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
-+if ac_fn_c_try_link "$LINENO"; then :
-   ac_cv_lib_iconv_iconv=yes
- else
+-  ac_cv_lib_iconv_iconv=yes
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_lib_iconv_iconv=no
-+  ac_cv_lib_iconv_iconv=no
- fi
+-fi
 -
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      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
+-LIBS=$ac_check_lib_save_LIBS
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_iconv_iconv" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iconv_iconv" >&5
- $as_echo "$ac_cv_lib_iconv_iconv" >&6; }
+-$as_echo "$ac_cv_lib_iconv_iconv" >&6; }
 -if test "x$ac_cv_lib_iconv_iconv" = x""yes; then
-+if test "x$ac_cv_lib_iconv_iconv" = x""yes; then :
- 
-                         ICONV_LIBS="$LDFLAGS"
-                         LIBICONV=1
- 
- else
- 
+-
+-                        ICONV_LIBS="$LDFLAGS"
+-                        LIBICONV=1
+-
+-else
+-
 -                        { $as_echo "$as_me:$LINENO: checking for libiconv in -liconv" >&5
-+                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libiconv in -liconv" >&5
- $as_echo_n "checking for libiconv in -liconv... " >&6; }
+-$as_echo_n "checking for libiconv in -liconv... " >&6; }
 -if test "${ac_cv_lib_iconv_libiconv+set}" = set; then
-+if test "${ac_cv_lib_iconv_libiconv+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
-   ac_check_lib_save_LIBS=$LIBS
- LIBS="-liconv  $LIBS"
+-  $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 GCC internal prototype to avoid an error.
-@@ -9481,51 +7459,24 @@ return libiconv ();
-   return 0;
- }
- _ACEOF
+-/* end confdefs.h.  */
+-
+-/* Override any GCC internal prototype to avoid an error.
+-   Use char because int might match the return type of a GCC
+-   builtin and then its argument prototype would still apply.  */
+-#ifdef __cplusplus
+-extern "C"
+-#endif
+-char libiconv ();
+-int
+-main ()
+-{
+-return libiconv ();
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -8970,66 +9780,72 @@ index f51d803..459bf70 100755
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
-+if ac_fn_c_try_link "$LINENO"; then :
-   ac_cv_lib_iconv_libiconv=yes
- else
+-  ac_cv_lib_iconv_libiconv=yes
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_lib_iconv_libiconv=no
-+  ac_cv_lib_iconv_libiconv=no
- fi
+-fi
 -
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      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
+-LIBS=$ac_check_lib_save_LIBS
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_iconv_libiconv" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iconv_libiconv" >&5
- $as_echo "$ac_cv_lib_iconv_libiconv" >&6; }
+-$as_echo "$ac_cv_lib_iconv_libiconv" >&6; }
 -if test "x$ac_cv_lib_iconv_libiconv" = x""yes; then
-+if test "x$ac_cv_lib_iconv_libiconv" = x""yes; then :
- 
-                                 ICONV_LIBS="$LDFLAGS"
-                                 LIBICONV=1
- 
- else
+-
+-                                ICONV_LIBS="$LDFLAGS"
+-                                LIBICONV=1
+-
+-else
 -  { { $as_echo "$as_me:$LINENO: error: required library iconv not found on your system" >&5
 -$as_echo "$as_me: error: required library iconv not found on your system" >&2;}
 -   { (exit 1); exit 1; }; }
-+  as_fn_error $? "required library iconv not found on your system" "$LINENO" 5
- 
- fi
- 
-@@ -9539,18 +7490,14 @@ fi
- 
-     else
-         LDFLAGS="$LDFLAGS -liconv"
+-
+-fi
+-
+-
+-
+-fi
+-
+-
+-
+-fi
+-
+-    else
+-        LDFLAGS="$LDFLAGS -liconv"
 -        { $as_echo "$as_me:$LINENO: checking for iconv in -liconv" >&5
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv in -liconv" >&5
- $as_echo_n "checking for iconv in -liconv... " >&6; }
+-$as_echo_n "checking for iconv in -liconv... " >&6; }
 -if test "${ac_cv_lib_iconv_iconv+set}" = set; then
-+if test "${ac_cv_lib_iconv_iconv+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
-   ac_check_lib_save_LIBS=$LIBS
- LIBS="-liconv  $LIBS"
+-  $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 GCC internal prototype to avoid an error.
-@@ -9568,52 +7515,25 @@ return iconv ();
-   return 0;
- }
- _ACEOF
+-/* end confdefs.h.  */
+-
+-/* Override any GCC internal prototype to avoid an error.
+-   Use char because int might match the return type of a GCC
+-   builtin and then its argument prototype would still apply.  */
+-#ifdef __cplusplus
+-extern "C"
+-#endif
+-char iconv ();
+-int
+-main ()
+-{
+-return iconv ();
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -9051,72 +9867,76 @@ index f51d803..459bf70 100755
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
-+if ac_fn_c_try_link "$LINENO"; then :
-   ac_cv_lib_iconv_iconv=yes
- else
+-  ac_cv_lib_iconv_iconv=yes
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_lib_iconv_iconv=no
-+  ac_cv_lib_iconv_iconv=no
- fi
+-fi
 -
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      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
+-LIBS=$ac_check_lib_save_LIBS
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_iconv_iconv" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iconv_iconv" >&5
- $as_echo "$ac_cv_lib_iconv_iconv" >&6; }
+-$as_echo "$ac_cv_lib_iconv_iconv" >&6; }
 -if test "x$ac_cv_lib_iconv_iconv" = x""yes; then
-+if test "x$ac_cv_lib_iconv_iconv" = x""yes; then :
- 
-                     ICONV_LIBS="$LDFLAGS"
-                     LIBICONV=1
- 
- else
- 
+-
+-                    ICONV_LIBS="$LDFLAGS"
+-                    LIBICONV=1
+-
+-else
+-
 -                    { { $as_echo "$as_me:$LINENO: error: You specified to use libiconv but the library was not found" >&5
 -$as_echo "$as_me: error: You specified to use libiconv but the library was not found" >&2;}
 -   { (exit 1); exit 1; }; }
-+                    as_fn_error $? "You specified to use libiconv but the library was not found" "$LINENO" 5
- 
- 
- fi
-@@ -9623,9 +7543,7 @@ fi
- 
- if test $LIBICONV -eq 1; then
- 
+-
+-
+-fi
+-
+-    fi
+-fi
+-
+-if test $LIBICONV -eq 1; then
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_LIBICONV 1
 -_ACEOF
-+$as_echo "#define HAVE_LIBICONV 1" >>confdefs.h
- 
- fi
- 
-@@ -9633,13 +7551,9 @@ fi
- 
- 
- CFLAGS="$CFLAGS $ICONV_CXXFLAGS -Werror"
+-
+-fi
+-
+-
+-
+-
+-CFLAGS="$CFLAGS $ICONV_CXXFLAGS -Werror"
 -{ $as_echo "$as_me:$LINENO: checking if iconv declaration requires const char cast" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if iconv declaration requires const char cast" >&5
- $as_echo_n "checking if iconv declaration requires const char cast... " >&6; }
+-$as_echo_n "checking if iconv declaration requires const char cast... " >&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 <stdlib.h>
-@@ -9659,44 +7573,21 @@ main ()
-   return 0;
- }
- _ACEOF
+-/* end confdefs.h.  */
+-
+-             #include <stdlib.h>
+-             #include <iconv.h>
+-
+-int
+-main ()
+-{
+-
+-            char **ptr = NULL;
+-            size_t len;
+-            iconv_t cd = NULL;
+-            (void)iconv(cd, ptr, &len, ptr, &len);
+-
+-
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -9135,39 +9955,35 @@ index f51d803..459bf70 100755
 -	 test -z "$ac_c_werror_flag" ||
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
-+if ac_fn_c_try_compile "$LINENO"; then :
- 
+-
 -         { $as_echo "$as_me:$LINENO: result: no" >&5
-+         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
- $as_echo "no" >&6; }
- 
- else
+-$as_echo "no" >&6; }
+-
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
- 
- 
+-
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define ICONV_CONST 1
 -_ACEOF
-+$as_echo "#define ICONV_CONST 1" >>confdefs.h
- 
- 
+-
+-
 -         { $as_echo "$as_me:$LINENO: result: yes" >&5
-+         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
- $as_echo "yes" >&6; }
- 
- fi
+-$as_echo "yes" >&6; }
 -
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- 
- 
-@@ -9704,151 +7595,12 @@ CFLAGS="$CFLAGS_SAVE"
- CXXFLAGS="$CXXFLAGS_SAVE"
- LDFLAGS="$LDFLAGS_SAVE"
- 
+-fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -
- for ac_header in execinfo.h
+-
+-CFLAGS="$CFLAGS_SAVE"
+-CXXFLAGS="$CXXFLAGS_SAVE"
+-LDFLAGS="$LDFLAGS_SAVE"
+-
+-
+-for ac_header in execinfo.h
 -do
 -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
@@ -9309,19 +10125,15 @@ index f51d803..459bf70 100755
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+do :
-+  ac_fn_c_check_header_mongrel "$LINENO" "execinfo.h" "ac_cv_header_execinfo_h" "$ac_includes_default"
-+if test "x$ac_cv_header_execinfo_h" = x""yes; then :
-   cat >>confdefs.h <<_ACEOF
+-  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-+#define HAVE_EXECINFO_H 1
- _ACEOF
- 
- fi
-@@ -9856,103 +7608,9 @@ fi
- done
- 
- 
+-_ACEOF
+-
+-fi
+-
+-done
+-
+-
 -{ $as_echo "$as_me:$LINENO: checking for time_t" >&5
 -$as_echo_n "checking for time_t... " >&6; }
 -if test "${ac_cv_type_time_t+set}" = set; then
@@ -9419,88 +10231,131 @@ index f51d803..459bf70 100755
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_time_t" >&5
 -$as_echo "$ac_cv_type_time_t" >&6; }
 -if test "x$ac_cv_type_time_t" = x""yes; then
-+ac_fn_c_check_type "$LINENO" "time_t" "ac_cv_type_time_t" "#include <sys/types.h>
-+"
-+if test "x$ac_cv_type_time_t" = x""yes; then :
- 
- cat >>confdefs.h <<_ACEOF
- #define HAVE_TIME_T 1
-@@ -9989,13 +7647,13 @@ _ACEOF
-     case $ac_val in #(
-     *${as_nl}*)
-       case $ac_var in #(
+-
+-cat >>confdefs.h <<_ACEOF
+-#define HAVE_TIME_T 1
+-_ACEOF
+-
+-
+-fi
+-
+-
+-cat >confcache <<\_ACEOF
+-# This file is a shell script that caches the results of configure
+-# tests run on this system so they can be shared between configure
+-# scripts and configure runs, see configure's option --config-cache.
+-# It is not useful on other systems.  If it contains results you don't
+-# want to keep, you may remove or edit it.
+-#
+-# config.status only pays attention to the cache file if you give it
+-# the --recheck option to rerun configure.
+-#
+-# `ac_cv_env_foo' variables (set or unset) will be overridden when
+-# loading this file, other *unset* `ac_cv_foo' will be assigned the
+-# following values.
+-
+-_ACEOF
+-
+-# The following way of writing the cache mishandles newlines in values,
+-# but we know of no workaround that is simple, portable, and efficient.
+-# So, we kill variables containing newlines.
+-# Ultrix sh set writes to stderr and can't be redirected directly,
+-# and sets the high bit in the cache file unless we assign to the vars.
+-(
+-  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+-    eval ac_val=\$$ac_var
+-    case $ac_val in #(
+-    *${as_nl}*)
+-      case $ac_var in #(
 -      *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
-+      *_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= ;; #(
+-$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= ;; #(
 -      *) $as_unset $ac_var ;;
-+      *) { eval $ac_var=; unset $ac_var;} ;;
-       esac ;;
-     esac
-   done
-@@ -10003,8 +7661,8 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
-   (set) 2>&1 |
-     case $as_nl`(ac_space=' '; set) 2>&1` in #(
-     *${as_nl}ac_space=\ *)
+-      esac ;;
+-    esac
+-  done
+-
+-  (set) 2>&1 |
+-    case $as_nl`(ac_space=' '; set) 2>&1` in #(
+-    *${as_nl}ac_space=\ *)
 -      # `set' does not quote correctly, so add quotes (double-quote
 -      # substitution turns \\\\ into \\, and sed turns \\ into \).
-+      # `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"
-@@ -10027,26 +7685,26 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
- if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
-   if test -w "$cache_file"; then
-     test "x$cache_file" != "x/dev/null" &&
+-      sed -n \
+-	"s/'/'\\\\''/g;
+-	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+-      ;; #(
+-    *)
+-      # `set' quotes correctly as required by POSIX, so do not add quotes.
+-      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+-      ;;
+-    esac |
+-    sort
+-) |
+-  sed '
+-     /^ac_cv_env_/b end
+-     t clear
+-     :clear
+-     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+-     t end
+-     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+-     :end' >>confcache
+-if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+-  if test -w "$cache_file"; then
+-    test "x$cache_file" != "x/dev/null" &&
 -      { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5
-+      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
- $as_echo "$as_me: updating cache $cache_file" >&6;}
-     cat confcache >$cache_file
-   else
+-$as_echo "$as_me: updating cache $cache_file" >&6;}
+-    cat confcache >$cache_file
+-  else
 -    { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
-+    { $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
- 
- # Check whether --enable-largefile was given.
+-$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+-  fi
+-fi
+-rm -f confcache
+-
+-# Check whether --enable-largefile was given.
 -if test "${enable_largefile+set}" = set; then
-+if test "${enable_largefile+set}" = set; then :
-   enableval=$enable_largefile;
- fi
- 
- if test "$enable_largefile" != no; then
- 
+-  enableval=$enable_largefile;
+-fi
+-
+-if test "$enable_largefile" != no; then
+-
 -  { $as_echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
- $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
+-$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
 -if test "${ac_cv_sys_largefile_CC+set}" = set; then
-+if test "${ac_cv_sys_largefile_CC+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
-   ac_cv_sys_largefile_CC=no
-@@ -10055,11 +7713,7 @@ else
-        while :; do
- 	 # IRIX 6.2 and later do not support large files by default,
- 	 # so use the C compiler's -n32 option if that helps.
+-  $as_echo_n "(cached) " >&6
+-else
+-  ac_cv_sys_largefile_CC=no
+-     if test "$GCC" != yes; then
+-       ac_save_CC=$CC
+-       while :; do
+-	 # IRIX 6.2 and later do not support large files by default,
+-	 # so use the C compiler's -n32 option if that helps.
 -	 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 <sys/types.h>
-  /* Check that off_t can represent 2**63 - 1 correctly.
-@@ -10078,60 +7732,14 @@ main ()
-   return 0;
- }
- _ACEOF
+-/* end confdefs.h.  */
+-#include <sys/types.h>
+- /* Check that off_t can represent 2**63 - 1 correctly.
+-    We can't simply define LARGE_OFF_T to be 9223372036854775807,
+-    since some C++ compilers masquerading as C compilers
+-    incorrectly reject 9223372036854775807.  */
+-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+-  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+-		       && LARGE_OFF_T % 2147483647 == 1)
+-		      ? 1 : -1];
+-int
+-main ()
+-{
+-
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -	 rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -9519,17 +10374,16 @@ index f51d803..459bf70 100755
 -	 test -z "$ac_c_werror_flag" ||
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
-+	 if ac_fn_c_try_compile "$LINENO"; then :
-   break
+-  break
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -
- fi
+-fi
 -
- rm -f core conftest.err conftest.$ac_objext
- 	 CC="$CC -n32"
+-rm -f core conftest.err conftest.$ac_objext
+-	 CC="$CC -n32"
 -	 rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -9548,50 +10402,56 @@ index f51d803..459bf70 100755
 -	 test -z "$ac_c_werror_flag" ||
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
-+	 if ac_fn_c_try_compile "$LINENO"; then :
-   ac_cv_sys_largefile_CC=' -n32'; break
+-  ac_cv_sys_largefile_CC=' -n32'; break
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -
- fi
+-fi
 -
- rm -f core conftest.err conftest.$ac_objext
- 	 break
-        done
-@@ -10139,23 +7747,19 @@ rm -f core conftest.err conftest.$ac_objext
-        rm -f conftest.$ac_ext
-     fi
- fi
+-rm -f core conftest.err conftest.$ac_objext
+-	 break
+-       done
+-       CC=$ac_save_CC
+-       rm -f conftest.$ac_ext
+-    fi
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
- $as_echo "$ac_cv_sys_largefile_CC" >&6; }
-   if test "$ac_cv_sys_largefile_CC" != no; then
-     CC=$CC$ac_cv_sys_largefile_CC
-   fi
- 
+-$as_echo "$ac_cv_sys_largefile_CC" >&6; }
+-  if test "$ac_cv_sys_largefile_CC" != no; then
+-    CC=$CC$ac_cv_sys_largefile_CC
+-  fi
+-
 -  { $as_echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
- $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
+-$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
 -if test "${ac_cv_sys_file_offset_bits+set}" = set; then
-+if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
-   while :; do
+-  $as_echo_n "(cached) " >&6
+-else
+-  while :; do
 -  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 <sys/types.h>
-  /* Check that off_t can represent 2**63 - 1 correctly.
-@@ -10174,38 +7778,11 @@ main ()
-   return 0;
- }
- _ACEOF
+-/* end confdefs.h.  */
+-#include <sys/types.h>
+- /* Check that off_t can represent 2**63 - 1 correctly.
+-    We can't simply define LARGE_OFF_T to be 9223372036854775807,
+-    since some C++ compilers masquerading as C compilers
+-    incorrectly reject 9223372036854775807.  */
+-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+-  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+-		       && LARGE_OFF_T % 2147483647 == 1)
+-		      ? 1 : -1];
+-int
+-main ()
+-{
+-
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -9610,29 +10470,39 @@ index f51d803..459bf70 100755
 -	 test -z "$ac_c_werror_flag" ||
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
-+if ac_fn_c_try_compile "$LINENO"; then :
-   ac_cv_sys_file_offset_bits=no; break
+-  ac_cv_sys_file_offset_bits=no; break
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -
- fi
+-fi
 -
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-rm -f core 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
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
- #define _FILE_OFFSET_BITS 64
- #include <sys/types.h>
-@@ -10225,38 +7802,15 @@ main ()
-   return 0;
- }
- _ACEOF
+-/* end confdefs.h.  */
+-#define _FILE_OFFSET_BITS 64
+-#include <sys/types.h>
+- /* Check that off_t can represent 2**63 - 1 correctly.
+-    We can't simply define LARGE_OFF_T to be 9223372036854775807,
+-    since some C++ compilers masquerading as C compilers
+-    incorrectly reject 9223372036854775807.  */
+-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+-  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+-		       && LARGE_OFF_T % 2147483647 == 1)
+-		      ? 1 : -1];
+-int
+-main ()
+-{
+-
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -9651,50 +10521,60 @@ index f51d803..459bf70 100755
 -	 test -z "$ac_c_werror_flag" ||
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
-+if ac_fn_c_try_compile "$LINENO"; then :
-   ac_cv_sys_file_offset_bits=64; break
+-  ac_cv_sys_file_offset_bits=64; break
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -
- fi
+-fi
 -
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-   ac_cv_sys_file_offset_bits=unknown
-   break
- done
- fi
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-  ac_cv_sys_file_offset_bits=unknown
+-  break
+-done
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
- $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
- case $ac_cv_sys_file_offset_bits in #(
-   no | unknown) ;;
-@@ -10268,17 +7822,13 @@ _ACEOF
- esac
- rm -rf conftest*
-   if test $ac_cv_sys_file_offset_bits = unknown; then
+-$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
+-case $ac_cv_sys_file_offset_bits in #(
+-  no | unknown) ;;
+-  *)
+-cat >>confdefs.h <<_ACEOF
+-#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
+-_ACEOF
+-;;
+-esac
+-rm -rf conftest*
+-  if test $ac_cv_sys_file_offset_bits = unknown; then
 -    { $as_echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
-+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
- $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
+-$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
 -if test "${ac_cv_sys_large_files+set}" = set; then
-+if test "${ac_cv_sys_large_files+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
-   while :; do
+-  $as_echo_n "(cached) " >&6
+-else
+-  while :; do
 -  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 <sys/types.h>
-  /* Check that off_t can represent 2**63 - 1 correctly.
-@@ -10297,38 +7847,11 @@ main ()
-   return 0;
- }
- _ACEOF
+-/* end confdefs.h.  */
+-#include <sys/types.h>
+- /* Check that off_t can represent 2**63 - 1 correctly.
+-    We can't simply define LARGE_OFF_T to be 9223372036854775807,
+-    since some C++ compilers masquerading as C compilers
+-    incorrectly reject 9223372036854775807.  */
+-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+-  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+-		       && LARGE_OFF_T % 2147483647 == 1)
+-		      ? 1 : -1];
+-int
+-main ()
+-{
+-
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -9713,29 +10593,39 @@ index f51d803..459bf70 100755
 -	 test -z "$ac_c_werror_flag" ||
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
-+if ac_fn_c_try_compile "$LINENO"; then :
-   ac_cv_sys_large_files=no; break
+-  ac_cv_sys_large_files=no; break
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -
- fi
+-fi
 -
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-rm -f core 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
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
- #define _LARGE_FILES 1
- #include <sys/types.h>
-@@ -10348,38 +7871,15 @@ main ()
-   return 0;
- }
- _ACEOF
+-/* end confdefs.h.  */
+-#define _LARGE_FILES 1
+-#include <sys/types.h>
+- /* Check that off_t can represent 2**63 - 1 correctly.
+-    We can't simply define LARGE_OFF_T to be 9223372036854775807,
+-    since some C++ compilers masquerading as C compilers
+-    incorrectly reject 9223372036854775807.  */
+-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+-  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+-		       && LARGE_OFF_T % 2147483647 == 1)
+-		      ? 1 : -1];
+-int
+-main ()
+-{
+-
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -9754,29 +10644,33 @@ index f51d803..459bf70 100755
 -	 test -z "$ac_c_werror_flag" ||
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
-+if ac_fn_c_try_compile "$LINENO"; then :
-   ac_cv_sys_large_files=1; break
+-  ac_cv_sys_large_files=1; break
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -
- fi
+-fi
 -
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-   ac_cv_sys_large_files=unknown
-   break
- done
- fi
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-  ac_cv_sys_large_files=unknown
+-  break
+-done
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
- $as_echo "$ac_cv_sys_large_files" >&6; }
- case $ac_cv_sys_large_files in #(
-   no | unknown) ;;
-@@ -10393,102 +7893,9 @@ rm -rf conftest*
-   fi
- fi
- 
+-$as_echo "$ac_cv_sys_large_files" >&6; }
+-case $ac_cv_sys_large_files in #(
+-  no | unknown) ;;
+-  *)
+-cat >>confdefs.h <<_ACEOF
+-#define _LARGE_FILES $ac_cv_sys_large_files
+-_ACEOF
+-;;
+-esac
+-rm -rf conftest*
+-  fi
+-fi
+-
 -{ $as_echo "$as_me:$LINENO: checking for off_t" >&5
 -$as_echo_n "checking for off_t... " >&6; }
 -if test "${ac_cv_type_off_t+set}" = set; then
@@ -9864,9 +10758,7 @@ index f51d803..459bf70 100755
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
-+ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
-+if test "x$ac_cv_type_off_t" = x""yes; then :
- 
+-
 -fi
 -
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
@@ -9875,13 +10767,14 @@ index f51d803..459bf70 100755
 -$as_echo "$ac_cv_type_off_t" >&6; }
 -if test "x$ac_cv_type_off_t" = x""yes; then
 -  :
- else
- 
- cat >>confdefs.h <<_ACEOF
-@@ -10497,102 +7904,9 @@ _ACEOF
- 
- fi
- 
+-else
+-
+-cat >>confdefs.h <<_ACEOF
+-#define off_t long int
+-_ACEOF
+-
+-fi
+-
 -{ $as_echo "$as_me:$LINENO: checking for size_t" >&5
 -$as_echo_n "checking for size_t... " >&6; }
 -if test "${ac_cv_type_size_t+set}" = set; then
@@ -9963,9 +10856,7 @@ index f51d803..459bf70 100755
 -
 -	ac_cv_type_size_t=yes
 -fi
-+ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
-+if test "x$ac_cv_type_size_t" = x""yes; then :
- 
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -else
 -  $as_echo "$as_me: failed program was:" >&5
@@ -9980,34 +10871,40 @@ index f51d803..459bf70 100755
 -$as_echo "$ac_cv_type_size_t" >&6; }
 -if test "x$ac_cv_type_size_t" = x""yes; then
 -  :
- else
- 
- cat >>confdefs.h <<_ACEOF
-@@ -10604,17 +7918,13 @@ fi
- #AC_CHECK_TYPES([ssize_t], [], [], [#include <sys/types.h>])
- 
- if test "x$FSEEKO_CHECK_OPTION_ENABLED" = xyes; then
+-else
+-
+-cat >>confdefs.h <<_ACEOF
+-#define size_t unsigned int
+-_ACEOF
+-
+-fi
+-
+-#AC_CHECK_TYPES([ssize_t], [], [], [#include <sys/types.h>])
+-
+-if test "x$FSEEKO_CHECK_OPTION_ENABLED" = xyes; then
 -    { $as_echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
-+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
- $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
+-$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
 -if test "${ac_cv_sys_largefile_source+set}" = set; then
-+if test "${ac_cv_sys_largefile_source+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
-   while :; do
+-  $as_echo_n "(cached) " >&6
+-else
+-  while :; do
 -  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 <sys/types.h> /* for off_t */
-      #include <stdio.h>
-@@ -10627,43 +7937,12 @@ int (*fp) (FILE *, off_t, int) = fseeko;
-   return 0;
- }
- _ACEOF
+-/* end confdefs.h.  */
+-#include <sys/types.h> /* for off_t */
+-     #include <stdio.h>
+-int
+-main ()
+-{
+-int (*fp) (FILE *, off_t, int) = fseeko;
+-     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -10029,14 +10926,13 @@ index f51d803..459bf70 100755
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
-+if ac_fn_c_try_link "$LINENO"; then :
-   ac_cv_sys_largefile_source=no; break
+-  ac_cv_sys_largefile_source=no; break
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -
- fi
+-fi
 -
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
@@ -10046,16 +10942,19 @@ index f51d803..459bf70 100755
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext conftest.$ac_ext
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
- #define _LARGEFILE_SOURCE 1
- #include <sys/types.h> /* for off_t */
-@@ -10677,43 +7956,16 @@ int (*fp) (FILE *, off_t, int) = fseeko;
-   return 0;
- }
- _ACEOF
+-/* end confdefs.h.  */
+-#define _LARGEFILE_SOURCE 1
+-#include <sys/types.h> /* for off_t */
+-     #include <stdio.h>
+-int
+-main ()
+-{
+-int (*fp) (FILE *, off_t, int) = fseeko;
+-     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -10077,72 +10976,70 @@ index f51d803..459bf70 100755
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
-+if ac_fn_c_try_link "$LINENO"; then :
-   ac_cv_sys_largefile_source=1; break
+-  ac_cv_sys_largefile_source=1; break
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -
- fi
+-fi
 -
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext conftest.$ac_ext
-   ac_cv_sys_largefile_source=unknown
-   break
- done
- fi
+-  ac_cv_sys_largefile_source=unknown
+-  break
+-done
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
- $as_echo "$ac_cv_sys_largefile_source" >&6; }
- case $ac_cv_sys_largefile_source in #(
-   no | unknown) ;;
-@@ -10730,26 +7982,22 @@ rm -rf conftest*
- # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
- if test $ac_cv_sys_largefile_source != unknown; then
- 
+-$as_echo "$ac_cv_sys_largefile_source" >&6; }
+-case $ac_cv_sys_largefile_source in #(
+-  no | unknown) ;;
+-  *)
+-cat >>confdefs.h <<_ACEOF
+-#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
+-_ACEOF
+-;;
+-esac
+-rm -rf conftest*
+-
+-# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
+-# in glibc 2.1.3, but that breaks too many other things.
+-# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
+-if test $ac_cv_sys_largefile_source != unknown; then
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_FSEEKO 1
 -_ACEOF
-+$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
- 
- fi
- 
- 
-     if test "$ac_cv_func_fseeko" = no || test "$ac_cv_sys_largefile_source" = unknown; then
+-
+-fi
+-
+-
+-    if test "$ac_cv_func_fseeko" = no || test "$ac_cv_sys_largefile_source" = unknown; then
 -        { $as_echo "$as_me:$LINENO: WARNING: fseeko has not been found on your system, will use fseek instead." >&5
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: fseeko has not been found on your system, will use fseek instead." >&5
- $as_echo "$as_me: WARNING: fseeko has not been found on your system, will use fseek instead." >&2;}
+-$as_echo "$as_me: WARNING: fseeko has not been found on your system, will use fseek instead." >&2;}
 -        { $as_echo "$as_me:$LINENO: WARNING: This has not been tested, please report if you have any problems." >&5
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This has not been tested, please report if you have any problems." >&5
- $as_echo "$as_me: WARNING: This has not been tested, please report if you have any problems." >&2;}
- 
+-$as_echo "$as_me: WARNING: This has not been tested, please report if you have any problems." >&2;}
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define fseeko fseek
 -_ACEOF
-+$as_echo "#define fseeko fseek" >>confdefs.h
- 
-     fi
- else
+-
+-    fi
+-else
 -    { $as_echo "$as_me:$LINENO: WARNING: Skipping fseeko test! (requested by user)" >&5
-+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Skipping fseeko test! (requested by user)" >&5
- $as_echo "$as_me: WARNING: Skipping fseeko test! (requested by user)" >&2;}
- fi
- 
-@@ -10757,352 +8005,26 @@ fi
- # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
- # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
- # This bug is HP SR number 8606223364.
+-$as_echo "$as_me: WARNING: Skipping fseeko test! (requested by user)" >&2;}
+-fi
+-
+-# The cast to long int works around a bug in the HP C Compiler
+-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+-# This bug is HP SR number 8606223364.
 -{ $as_echo "$as_me:$LINENO: checking size of off_t" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
- $as_echo_n "checking size of off_t... " >&6; }
+-$as_echo_n "checking size of off_t... " >&6; }
 -if test "${ac_cv_sizeof_off_t+set}" = set; then
-+if test "${ac_cv_sizeof_off_t+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
+-  $as_echo_n "(cached) " >&6
+-else
 -  if test "$cross_compiling" = yes; then
 -  # Depending upon the size, compute the lo and hi bounds.
 -cat >conftest.$ac_ext <<_ACEOF
@@ -10329,8 +11226,7 @@ index f51d803..459bf70 100755
 -
 -	ac_lo= ac_hi=
 -fi
-+  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t"        "$ac_includes_default"; then :
- 
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -fi
 -
@@ -10461,7 +11357,7 @@ index f51d803..459bf70 100755
 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
 -  (exit $ac_status); }; }; then
 -  ac_cv_sizeof_off_t=`cat conftest.val`
- else
+-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
@@ -10469,42 +11365,40 @@ index f51d803..459bf70 100755
 -( exit $ac_status )
 -if test "$ac_cv_type_off_t" = yes; then
 -     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-+  if test "$ac_cv_type_off_t" = yes; then
-+     { { $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: error: in \`$ac_pwd':" >&2;}
 -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
 -See \`config.log' for more details." >&5
 -$as_echo "$as_me: error: cannot compute sizeof (off_t)
 -See \`config.log' for more details." >&2;}
 -   { (exit 77); exit 77; }; }; }
-+as_fn_error 77 "cannot compute sizeof (off_t)
-+See \`config.log' for more details" "$LINENO" 5 ; }
-    else
-      ac_cv_sizeof_off_t=0
-    fi
- fi
+-   else
+-     ac_cv_sizeof_off_t=0
+-   fi
+-fi
 -rm -rf conftest.dSYM
 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 -fi
 -rm -f conftest.val
-+
- fi
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
- $as_echo "$ac_cv_sizeof_off_t" >&6; }
- 
- 
-@@ -11116,352 +8038,26 @@ _ACEOF
- # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
- # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
- # This bug is HP SR number 8606223364.
+-$as_echo "$ac_cv_sizeof_off_t" >&6; }
+-
+-
+-
+-cat >>confdefs.h <<_ACEOF
+-#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
+-_ACEOF
+-
+-
+-# The cast to long int works around a bug in the HP C Compiler
+-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+-# This bug is HP SR number 8606223364.
 -{ $as_echo "$as_me:$LINENO: checking size of size_t" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
- $as_echo_n "checking size of size_t... " >&6; }
+-$as_echo_n "checking size of size_t... " >&6; }
 -if test "${ac_cv_sizeof_size_t+set}" = set; then
-+if test "${ac_cv_sizeof_size_t+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
+-  $as_echo_n "(cached) " >&6
+-else
 -  if test "$cross_compiling" = yes; then
 -  # Depending upon the size, compute the lo and hi bounds.
 -cat >conftest.$ac_ext <<_ACEOF
@@ -10688,8 +11582,7 @@ index f51d803..459bf70 100755
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t"        "$ac_includes_default"; then :
- 
+-
 -	ac_lo= ac_hi=
 -fi
 -
@@ -10823,7 +11716,7 @@ index f51d803..459bf70 100755
 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
 -  (exit $ac_status); }; }; then
 -  ac_cv_sizeof_size_t=`cat conftest.val`
- else
+-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
@@ -10831,42 +11724,40 @@ index f51d803..459bf70 100755
 -( exit $ac_status )
 -if test "$ac_cv_type_size_t" = yes; then
 -     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-+  if test "$ac_cv_type_size_t" = yes; then
-+     { { $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: error: in \`$ac_pwd':" >&2;}
 -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
 -See \`config.log' for more details." >&5
 -$as_echo "$as_me: error: cannot compute sizeof (size_t)
 -See \`config.log' for more details." >&2;}
 -   { (exit 77); exit 77; }; }; }
-+as_fn_error 77 "cannot compute sizeof (size_t)
-+See \`config.log' for more details" "$LINENO" 5 ; }
-    else
-      ac_cv_sizeof_size_t=0
-    fi
- fi
+-   else
+-     ac_cv_sizeof_size_t=0
+-   fi
+-fi
 -rm -rf conftest.dSYM
 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 -fi
 -rm -f conftest.val
-+
- fi
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
- $as_echo "$ac_cv_sizeof_size_t" >&6; }
- 
- 
-@@ -11475,352 +8071,26 @@ _ACEOF
- # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
- # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
- # This bug is HP SR number 8606223364.
+-$as_echo "$ac_cv_sizeof_size_t" >&6; }
+-
+-
+-
+-cat >>confdefs.h <<_ACEOF
+-#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
+-_ACEOF
+-
+-
+-# The cast to long int works around a bug in the HP C Compiler
+-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+-# This bug is HP SR number 8606223364.
 -{ $as_echo "$as_me:$LINENO: checking size of time_t" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
- $as_echo_n "checking size of time_t... " >&6; }
+-$as_echo_n "checking size of time_t... " >&6; }
 -if test "${ac_cv_sizeof_time_t+set}" = set; then
-+if test "${ac_cv_sizeof_time_t+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
+-  $as_echo_n "(cached) " >&6
+-else
 -  if test "$cross_compiling" = yes; then
 -  # Depending upon the size, compute the lo and hi bounds.
 -cat >conftest.$ac_ext <<_ACEOF
@@ -11156,8 +12047,7 @@ index f51d803..459bf70 100755
 -  /* Do not output a trailing newline, as this causes \r\n confusion
 -     on some platforms.  */
 -  return ferror (f) || fclose (f) != 0;
-+  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t"        "$ac_includes_default"; then :
- 
+-
 -  ;
 -  return 0;
 -}
@@ -11185,7 +12075,7 @@ index f51d803..459bf70 100755
 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
 -  (exit $ac_status); }; }; then
 -  ac_cv_sizeof_time_t=`cat conftest.val`
- else
+-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
@@ -11193,42 +12083,40 @@ index f51d803..459bf70 100755
 -( exit $ac_status )
 -if test "$ac_cv_type_time_t" = yes; then
 -     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-+  if test "$ac_cv_type_time_t" = yes; then
-+     { { $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: error: in \`$ac_pwd':" >&2;}
 -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
 -See \`config.log' for more details." >&5
 -$as_echo "$as_me: error: cannot compute sizeof (time_t)
 -See \`config.log' for more details." >&2;}
 -   { (exit 77); exit 77; }; }; }
-+as_fn_error 77 "cannot compute sizeof (time_t)
-+See \`config.log' for more details" "$LINENO" 5 ; }
-    else
-      ac_cv_sizeof_time_t=0
-    fi
- fi
+-   else
+-     ac_cv_sizeof_time_t=0
+-   fi
+-fi
 -rm -rf conftest.dSYM
 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 -fi
 -rm -f conftest.val
-+
- fi
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
- $as_echo "$ac_cv_sizeof_time_t" >&6; }
- 
- 
-@@ -11834,352 +8104,26 @@ _ACEOF
- # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
- # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
- # This bug is HP SR number 8606223364.
+-$as_echo "$ac_cv_sizeof_time_t" >&6; }
+-
+-
+-
+-cat >>confdefs.h <<_ACEOF
+-#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
+-_ACEOF
+-
+-
+-# The cast to long int works around a bug in the HP C Compiler
+-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+-# This bug is HP SR number 8606223364.
 -{ $as_echo "$as_me:$LINENO: checking size of unsigned int" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned int" >&5
- $as_echo_n "checking size of unsigned int... " >&6; }
+-$as_echo_n "checking size of unsigned int... " >&6; }
 -if test "${ac_cv_sizeof_unsigned_int+set}" = set; then
-+if test "${ac_cv_sizeof_unsigned_int+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
+-  $as_echo_n "(cached) " >&6
+-else
 -  if test "$cross_compiling" = yes; then
 -  # Depending upon the size, compute the lo and hi bounds.
 -cat >conftest.$ac_ext <<_ACEOF
@@ -11518,8 +12406,7 @@ index f51d803..459bf70 100755
 -  /* Do not output a trailing newline, as this causes \r\n confusion
 -     on some platforms.  */
 -  return ferror (f) || fclose (f) != 0;
-+  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned int))" "ac_cv_sizeof_unsigned_int"        "$ac_includes_default"; then :
- 
+-
 -  ;
 -  return 0;
 -}
@@ -11547,7 +12434,7 @@ index f51d803..459bf70 100755
 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
 -  (exit $ac_status); }; }; then
 -  ac_cv_sizeof_unsigned_int=`cat conftest.val`
- else
+-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
@@ -11555,42 +12442,40 @@ index f51d803..459bf70 100755
 -( exit $ac_status )
 -if test "$ac_cv_type_unsigned_int" = yes; then
 -     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-+  if test "$ac_cv_type_unsigned_int" = yes; then
-+     { { $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: error: in \`$ac_pwd':" >&2;}
 -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned int)
 -See \`config.log' for more details." >&5
 -$as_echo "$as_me: error: cannot compute sizeof (unsigned int)
 -See \`config.log' for more details." >&2;}
 -   { (exit 77); exit 77; }; }; }
-+as_fn_error 77 "cannot compute sizeof (unsigned int)
-+See \`config.log' for more details" "$LINENO" 5 ; }
-    else
-      ac_cv_sizeof_unsigned_int=0
-    fi
- fi
+-   else
+-     ac_cv_sizeof_unsigned_int=0
+-   fi
+-fi
 -rm -rf conftest.dSYM
 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 -fi
 -rm -f conftest.val
-+
- fi
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_unsigned_int" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_int" >&5
- $as_echo "$ac_cv_sizeof_unsigned_int" >&6; }
- 
- 
-@@ -12193,352 +8137,26 @@ _ACEOF
- # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
- # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
- # This bug is HP SR number 8606223364.
+-$as_echo "$ac_cv_sizeof_unsigned_int" >&6; }
+-
+-
+-
+-cat >>confdefs.h <<_ACEOF
+-#define SIZEOF_UNSIGNED_INT $ac_cv_sizeof_unsigned_int
+-_ACEOF
+-
+-
+-# The cast to long int works around a bug in the HP C Compiler
+-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+-# This bug is HP SR number 8606223364.
 -{ $as_echo "$as_me:$LINENO: checking size of unsigned long" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
- $as_echo_n "checking size of unsigned long... " >&6; }
+-$as_echo_n "checking size of unsigned long... " >&6; }
 -if test "${ac_cv_sizeof_unsigned_long+set}" = set; then
-+if test "${ac_cv_sizeof_unsigned_long+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
+-  $as_echo_n "(cached) " >&6
+-else
 -  if test "$cross_compiling" = yes; then
 -  # Depending upon the size, compute the lo and hi bounds.
 -cat >conftest.$ac_ext <<_ACEOF
@@ -11880,8 +12765,7 @@ index f51d803..459bf70 100755
 -  /* Do not output a trailing newline, as this causes \r\n confusion
 -     on some platforms.  */
 -  return ferror (f) || fclose (f) != 0;
-+  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long"        "$ac_includes_default"; then :
- 
+-
 -  ;
 -  return 0;
 -}
@@ -11909,7 +12793,7 @@ index f51d803..459bf70 100755
 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
 -  (exit $ac_status); }; }; then
 -  ac_cv_sizeof_unsigned_long=`cat conftest.val`
- else
+-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
@@ -11917,39 +12801,35 @@ index f51d803..459bf70 100755
 -( exit $ac_status )
 -if test "$ac_cv_type_unsigned_long" = yes; then
 -     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-+  if test "$ac_cv_type_unsigned_long" = yes; then
-+     { { $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: error: in \`$ac_pwd':" >&2;}
 -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long)
 -See \`config.log' for more details." >&5
 -$as_echo "$as_me: error: cannot compute sizeof (unsigned long)
 -See \`config.log' for more details." >&2;}
 -   { (exit 77); exit 77; }; }; }
-+as_fn_error 77 "cannot compute sizeof (unsigned long)
-+See \`config.log' for more details" "$LINENO" 5 ; }
-    else
-      ac_cv_sizeof_unsigned_long=0
-    fi
- fi
+-   else
+-     ac_cv_sizeof_unsigned_long=0
+-   fi
+-fi
 -rm -rf conftest.dSYM
 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 -fi
 -rm -f conftest.val
-+
- fi
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_unsigned_long" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
- $as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
- 
- 
-@@ -12548,102 +8166,11 @@ cat >>confdefs.h <<_ACEOF
- _ACEOF
- 
- 
+-$as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
+-
+-
+-
+-cat >>confdefs.h <<_ACEOF
+-#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
+-_ACEOF
+-
+-
 -
 -
 -
- for ac_func in strtoll nl_langinfo setlocale
+-for ac_func in strtoll nl_langinfo setlocale
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -12042,20 +12922,16 @@ index f51d803..459bf70 100755
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+do :
-+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
-   cat >>confdefs.h <<_ACEOF
- #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
- _ACEOF
-@@ -12651,101 +8178,11 @@ _ACEOF
- fi
- done
- 
+-  cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+-_ACEOF
+-
+-fi
+-done
 -
 -
- for ac_func in backtrace backtrace_symbols
+-
+-for ac_func in backtrace backtrace_symbols
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -12107,7 +12983,7 @@ index f51d803..459bf70 100755
 -  ;
 -  return 0;
 -}
--_ACEOF
+ _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -12136,7 +13012,7 @@ index f51d803..459bf70 100755
 -
 -	eval "$as_ac_var=no"
 -fi
--
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
@@ -12148,37 +13024,129 @@ index f51d803..459bf70 100755
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+do :
-+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
-   cat >>confdefs.h <<_ACEOF
- #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
- _ACEOF
-@@ -12754,16 +8191,12 @@ fi
+-  cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+-_ACEOF
+ 
+-fi
++# Keep a trace of the command line.
++# Strip out --no-create and --no-recursion so they do not pile up.
++# Strip out --silent because we don't want to record it for future runs.
++# Also quote any args containing shell meta-characters.
++# Make two passes to allow for proper duplicate-argument suppression.
++ac_configure_args=
++ac_configure_args0=
++ac_configure_args1=
++ac_must_keep_next=false
++for ac_pass in 1 2
++do
++  for ac_arg
++  do
++    case $ac_arg in
++    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
++    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
++    | -silent | --silent | --silen | --sile | --sil)
++      continue ;;
++    *\'*)
++      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
++    esac
++    case $ac_pass in
++    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
++    2)
++      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
++	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
++      as_fn_append ac_configure_args " '$ac_arg'"
++      ;;
++    esac
++  done
  done
++{ ac_configure_args0=; unset ac_configure_args0;}
++{ ac_configure_args1=; unset ac_configure_args1;}
  
- # Checks for typedefs, structures, and compiler characteristics.
+-# Checks for typedefs, structures, and compiler characteristics.
 -{ $as_echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
- $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
+-$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
 -if test "${ac_cv_c_const+set}" = set; then
-+if test "${ac_cv_c_const+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
+-  $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
-@@ -12823,56 +8256,29 @@ main ()
-   return 0;
- }
- _ACEOF
+-/* end confdefs.h.  */
+-
+-int
+-main ()
+-{
+-/* FIXME: Include the comments suggested by Paul. */
+-#ifndef __cplusplus
+-  /* Ultrix mips cc rejects this.  */
+-  typedef int charset[2];
+-  const charset cs;
+-  /* SunOS 4.1.1 cc rejects this.  */
+-  char const *const *pcpcc;
+-  char **ppc;
+-  /* NEC SVR4.0.2 mips cc rejects this.  */
+-  struct point {int x, y;};
+-  static struct point const zero = {0,0};
+-  /* AIX XL C 1.02.0.0 rejects this.
+-     It does not let you subtract one const X* pointer from another in
+-     an arm of an if-expression whose if-part is not a constant
+-     expression */
+-  const char *g = "string";
+-  pcpcc = &g + (g ? g-g : 0);
+-  /* HPUX 7.0 cc rejects these. */
+-  ++pcpcc;
+-  ppc = (char**) pcpcc;
+-  pcpcc = (char const *const *) ppc;
+-  { /* SCO 3.2v4 cc rejects this.  */
+-    char *t;
+-    char const *s = 0 ? (char *) 0 : (char const *) 0;
+-
+-    *t++ = 0;
+-    if (s) return 0;
+-  }
+-  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
+-    int x[] = {25, 17};
+-    const int *foo = &x[0];
+-    ++foo;
+-  }
+-  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
+-    typedef const int *iptr;
+-    iptr p = 0;
+-    ++p;
+-  }
+-  { /* AIX XL C 1.02.0.0 rejects this saying
+-       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+-    struct s { int j; const int *ap[3]; };
+-    struct s *b; b->j = 5;
+-  }
+-  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+-    const int foo = 10;
+-    if (!foo) return 0;
+-  }
+-  return !cs[0] && !zero.x;
+-#endif
+-
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -12197,52 +13165,55 @@ index f51d803..459bf70 100755
 -	 test -z "$ac_c_werror_flag" ||
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
-+if ac_fn_c_try_compile "$LINENO"; then :
-   ac_cv_c_const=yes
- else
+-  ac_cv_c_const=yes
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_c_const=no
-+  ac_cv_c_const=no
- fi
+-fi
 -
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
- $as_echo "$ac_cv_c_const" >&6; }
- if test $ac_cv_c_const = no; then
- 
+-$as_echo "$ac_cv_c_const" >&6; }
+-if test $ac_cv_c_const = no; then
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define const /**/
 -_ACEOF
-+$as_echo "#define const /**/" >>confdefs.h
- 
- fi
- 
+-
+-fi
+-
 -{ $as_echo "$as_me:$LINENO: checking for inline" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
- $as_echo_n "checking for inline... " >&6; }
+-$as_echo_n "checking for inline... " >&6; }
 -if test "${ac_cv_c_inline+set}" = set; then
-+if test "${ac_cv_c_inline+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
-   ac_cv_c_inline=no
- for ac_kw in inline __inline__ __inline; do
+-  $as_echo_n "(cached) " >&6
+-else
+-  ac_cv_c_inline=no
+-for ac_kw in inline __inline__ __inline; do
 -  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.  */
- #ifndef __cplusplus
- typedef int foo_t;
-@@ -12881,41 +8287,17 @@ $ac_kw foo_t foo () {return 0; }
- #endif
+-/* end confdefs.h.  */
+-#ifndef __cplusplus
+-typedef int foo_t;
+-static $ac_kw foo_t static_foo () {return 0; }
+-$ac_kw foo_t foo () {return 0; }
+-#endif
++# When interrupted or exit'd, cleanup temporary files, and complete
++# config.log.  We remove comments because anyway the quotes in there
++# would cause problems or look ugly.
++# WARNING: Use '\'' to represent an apostrophe within the trap.
++# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
++trap 'exit_status=$?
++  # Save into config.log some information that might help in debugging.
++  {
++    echo
  
- _ACEOF
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -12261,51 +13232,150 @@ index f51d803..459bf70 100755
 -	 test -z "$ac_c_werror_flag" ||
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
-+if ac_fn_c_try_compile "$LINENO"; then :
-   ac_cv_c_inline=$ac_kw
+-  ac_cv_c_inline=$ac_kw
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
--
- fi
--
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-   test "$ac_cv_c_inline" != no && break
++    $as_echo "## ---------------- ##
++## Cache variables. ##
++## ---------------- ##"
++    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 $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
++    *${as_nl}ac_space=\ *)
++      sed -n \
++	"s/'\''/'\''\\\\'\'''\''/g;
++	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
++      ;; #(
++    *)
++      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
++      ;;
++    esac |
++    sort
++)
++    echo
+ 
++    $as_echo "## ----------------- ##
++## Output variables. ##
++## ----------------- ##"
++    echo
++    for ac_var in $ac_subst_vars
++    do
++      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 -n "$ac_subst_files"; then
++      $as_echo "## ------------------- ##
++## File substitutions. ##
++## ------------------- ##"
++      echo
++      for ac_var in $ac_subst_files
++      do
++	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
+ 
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-  test "$ac_cv_c_inline" != no && break
++    if test -s confdefs.h; then
++      $as_echo "## ----------- ##
++## confdefs.h. ##
++## ----------- ##"
++      echo
++      cat confdefs.h
++      echo
++    fi
++    test "$ac_signal" != 0 &&
++      $as_echo "$as_me: caught signal $ac_signal"
++    $as_echo "$as_me: exit $exit_status"
++  } >&5
++  rm -f core *.core core.conftest.* &&
++    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
++    exit $exit_status
++' 0
++for ac_signal in 1 2 13 15; do
++  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
  done
++ac_signal=0
  
- fi
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
- $as_echo "$ac_cv_c_inline" >&6; }
+-$as_echo "$ac_cv_c_inline" >&6; }
++# confdefs.h avoids OS command line length limits that DEFS can exceed.
++rm -f -r conftest* confdefs.h
  
--
- case $ac_cv_c_inline in
-   inline | yes) ;;
-   *)
-@@ -12931,16 +8313,12 @@ _ACEOF
-     ;;
- esac
++$as_echo "/* confdefs.h */" > confdefs.h
+ 
+-case $ac_cv_c_inline in
+-  inline | yes) ;;
+-  *)
+-    case $ac_cv_c_inline in
+-      no) ac_val=;;
+-      *) ac_val=$ac_cv_c_inline;;
+-    esac
+-    cat >>confdefs.h <<_ACEOF
+-#ifndef __cplusplus
+-#define inline $ac_val
+-#endif
+-_ACEOF
+-    ;;
+-esac
++# Predefined preprocessor variables.
  
 -{ $as_echo "$as_me:$LINENO: checking for working volatile" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
- $as_echo_n "checking for working volatile... " >&6; }
+-$as_echo_n "checking for working volatile... " >&6; }
 -if test "${ac_cv_c_volatile+set}" = set; then
-+if test "${ac_cv_c_volatile+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
+-  $as_echo_n "(cached) " >&6
+-else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
--_ACEOF
++cat >>confdefs.h <<_ACEOF
++#define PACKAGE_NAME "$PACKAGE_NAME"
+ _ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+-/* end confdefs.h.  */
+-
+-int
+-main ()
+-{
  
- int
-@@ -12954,54 +8332,27 @@ return !x && !y;
-   return 0;
- }
+-volatile int x;
+-int * volatile y = (int *) 0;
+-return !x && !y;
+-  ;
+-  return 0;
+-}
++cat >>confdefs.h <<_ACEOF
++#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
  _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
@@ -12325,49 +13395,53 @@ index f51d803..459bf70 100755
 -	 test -z "$ac_c_werror_flag" ||
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
-+if ac_fn_c_try_compile "$LINENO"; then :
-   ac_cv_c_volatile=yes
- else
+-  ac_cv_c_volatile=yes
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	ac_cv_c_volatile=no
-+  ac_cv_c_volatile=no
- fi
+-fi
 -
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5
- $as_echo "$ac_cv_c_volatile" >&6; }
- if test $ac_cv_c_volatile = no; then
- 
+-$as_echo "$ac_cv_c_volatile" >&6; }
+-if test $ac_cv_c_volatile = no; then
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define volatile /**/
--_ACEOF
-+$as_echo "#define volatile /**/" >>confdefs.h
- 
- fi
++cat >>confdefs.h <<_ACEOF
++#define PACKAGE_VERSION "$PACKAGE_VERSION"
+ _ACEOF
  
+-fi
+-
 -{ $as_echo "$as_me:$LINENO: checking return type of signal handlers" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
- $as_echo_n "checking return type of signal handlers... " >&6; }
+-$as_echo_n "checking return type of signal handlers... " >&6; }
 -if test "${ac_cv_type_signal+set}" = set; then
-+if test "${ac_cv_type_signal+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
+-  $as_echo_n "(cached) " >&6
+-else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
--_ACEOF
++cat >>confdefs.h <<_ACEOF
++#define PACKAGE_STRING "$PACKAGE_STRING"
+ _ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
- #include <sys/types.h>
- #include <signal.h>
-@@ -13014,35 +8365,14 @@ return *(signal (0, 0)) (0) == 1;
-   return 0;
- }
+-/* end confdefs.h.  */
+-#include <sys/types.h>
+-#include <signal.h>
+ 
+-int
+-main ()
+-{
+-return *(signal (0, 0)) (0) == 1;
+-  ;
+-  return 0;
+-}
++cat >>confdefs.h <<_ACEOF
++#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
  _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
@@ -12387,24 +13461,22 @@ index f51d803..459bf70 100755
 -	 test -z "$ac_c_werror_flag" ||
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
-+if ac_fn_c_try_compile "$LINENO"; then :
-   ac_cv_type_signal=int
- else
+-  ac_cv_type_signal=int
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_type_signal=void
-+  ac_cv_type_signal=void
- fi
+-fi
 -
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
- $as_echo "$ac_cv_type_signal" >&6; }
+-$as_echo "$ac_cv_type_signal" >&6; }
  
  cat >>confdefs.h <<_ACEOF
-@@ -13050,102 +8380,9 @@ cat >>confdefs.h <<_ACEOF
+-#define RETSIGTYPE $ac_cv_type_signal
++#define PACKAGE_URL "$PACKAGE_URL"
  _ACEOF
  
  
@@ -12412,7 +13484,21 @@ index f51d803..459bf70 100755
 -$as_echo_n "checking for pid_t... " >&6; }
 -if test "${ac_cv_type_pid_t+set}" = set; then
 -  $as_echo_n "(cached) " >&6
--else
++# Let the site file select an alternate cache file if it wants to.
++# 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_cv_type_pid_t=no
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
@@ -12483,41 +13569,184 @@ index f51d803..459bf70 100755
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  :
--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" \
++      || { { $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.  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";;
++    esac
++  fi
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
++$as_echo "$as_me: creating cache $cache_file" >&6;}
++  >$cache_file
++fi
+ 
 -	ac_cv_type_pid_t=yes
--fi
-+ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
-+if test "x$ac_cv_type_pid_t" = x""yes; then :
++# Check that the precious variables saved in the cache have kept the same
++# value.
++ac_cache_corrupted=false
++for ac_var in $ac_precious_vars; do
++  eval ac_old_set=\$ac_cv_env_${ac_var}_set
++  eval ac_new_set=\$ac_env_${ac_var}_set
++  eval ac_old_val=\$ac_cv_env_${ac_var}_value
++  eval ac_new_val=\$ac_env_${ac_var}_value
++  case $ac_old_set,$ac_new_set in
++    set,)
++      { $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)
++      { $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
++	# 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=`$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.
++      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
++    esac
++  fi
++done
++if $ac_cache_corrupted; then
++  { $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. ##
++## -------------------- ##
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
--
--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_config_headers="$ac_config_headers autoconfig.h tombupnp/upnp/inc/upnpconfig.h"
++
++ac_aux_dir=
++for ac_dir in configure_aux "$srcdir"/configure_aux; do
++  if test -f "$ac_dir/install-sh"; then
++    ac_aux_dir=$ac_dir
++    ac_install_sh="$ac_aux_dir/install-sh -c"
++    break
++  elif test -f "$ac_dir/install.sh"; then
++    ac_aux_dir=$ac_dir
++    ac_install_sh="$ac_aux_dir/install.sh -c"
++    break
++  elif test -f "$ac_dir/shtool"; then
++    ac_aux_dir=$ac_dir
++    ac_install_sh="$ac_aux_dir/shtool install -c"
++    break
++  fi
++done
++if test -z "$ac_aux_dir"; then
++  as_fn_error $? "cannot find install-sh, install.sh, or shtool in configure_aux \"$srcdir\"/configure_aux" "$LINENO" 5
+ fi
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
 -$as_echo "$ac_cv_type_pid_t" >&6; }
 -if test "x$ac_cv_type_pid_t" = x""yes; then
 -  :
- else
+-else
++# These three variables are undocumented and unsupported,
++# and are intended to be withdrawn in a future Autoconf release.
++# They can cause serious problems if a builder's source tree is in a directory
++# whose full name contains unusual characters.
++ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
++ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
++ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
++
  
- cat >>confdefs.h <<_ACEOF
-@@ -13154,102 +8391,9 @@ _ACEOF
+-cat >>confdefs.h <<_ACEOF
+-#define pid_t int
+-_ACEOF
  
- fi
+-fi
++am__api_version='1.11'
  
 -{ $as_echo "$as_me:$LINENO: checking for size_t" >&5
 -$as_echo_n "checking for size_t... " >&6; }
 -if test "${ac_cv_type_size_t+set}" = set; then
--  $as_echo_n "(cached) " >&6
--else
++# Find a good install program.  We prefer a C program (faster),
++# so one script is as good as another.  But avoid the broken or
++# incompatible versions:
++# SysV /etc/install, /usr/sbin/install
++# SunOS /usr/etc/install
++# IRIX /sbin/install
++# AIX /bin/install
++# AmigaOS /C/install, which installs bootblocks on floppy discs
++# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
++# AFS /usr/afsws/bin/install, which mishandles nonexistent args
++# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
++# OS/2's system install, which has a completely different semantic
++# ./install, which can be erroneously created by make from ./install.sh.
++# Reject install programs that cannot install multiple files.
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
++$as_echo_n "checking for a BSD-compatible install... " >&6; }
++if test -z "$INSTALL"; then
++if test "${ac_cv_path_install+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
 -  ac_cv_type_size_t=no
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
@@ -12574,7 +13803,51 @@ index f51d803..459bf70 100755
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
 -  *) ac_try_echo=$ac_try;;
--esac
++  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    # Account for people who put trailing slashes in PATH elements.
++case $as_dir/ in #((
++  ./ | .// | /[cC]/* | \
++  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
++  ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
++  /usr/ucb/* ) ;;
++  *)
++    # OSF1 and SCO ODT 3.0 have their own names for install.
++    # Don't use installbsd from OSF since it installs stuff as root
++    # by default.
++    for ac_prog in ginstall scoinst install; do
++      for ac_exec_ext in '' $ac_executable_extensions; do
++	if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
++	  if test $ac_prog = install &&
++	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
++	    # AIX install.  It has an incompatible calling convention.
++	    :
++	  elif test $ac_prog = install &&
++	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
++	    # program-specific install script used by HP pwplus--don't use.
++	    :
++	  else
++	    rm -rf conftest.one conftest.two conftest.dir
++	    echo one > conftest.one
++	    echo two > conftest.two
++	    mkdir conftest.dir
++	    if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
++	      test -s conftest.one && test -s conftest.two &&
++	      test -s conftest.dir/conftest.one &&
++	      test -s conftest.dir/conftest.two
++	    then
++	      ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
++	      break 3
++	    fi
++	  fi
++	fi
++      done
++    done
++    ;;
+ esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
 -  (eval "$ac_compile") 2>conftest.er1
@@ -12594,31 +13867,48 @@ index f51d803..459bf70 100755
 -
 -	ac_cv_type_size_t=yes
 -fi
--
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
-+ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
-+if test "x$ac_cv_type_size_t" = x""yes; then :
++  done
++IFS=$as_save_IFS
  
--fi
++rm -rf conftest.one conftest.two conftest.dir
+ 
+ fi
 -
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--fi
++  if test "${ac_cv_path_install+set}" = set; then
++    INSTALL=$ac_cv_path_install
++  else
++    # As a last resort, use the slow shell script.  Don't cache a
++    # value for INSTALL within a source directory, because that will
++    # break other packages using the cache if that directory is
++    # removed, or if the value is a relative name.
++    INSTALL=$ac_install_sh
++  fi
+ fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
 -$as_echo "$ac_cv_type_size_t" >&6; }
 -if test "x$ac_cv_type_size_t" = x""yes; then
 -  :
- else
+-else
+-
+-cat >>confdefs.h <<_ACEOF
+-#define size_t unsigned int
+-_ACEOF
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
++$as_echo "$INSTALL" >&6; }
  
- cat >>confdefs.h <<_ACEOF
-@@ -13258,113 +8402,8 @@ _ACEOF
+-fi
++# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
++# It thinks the first close brace ends the variable substitution.
++test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  
- fi
++test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
  
--
 -  { $as_echo "$as_me:$LINENO: checking for int64_t" >&5
 -$as_echo_n "checking for int64_t... " >&6; }
 -if test "${ac_cv_c_int64_t+set}" = set; then
@@ -12639,7 +13929,8 @@ index f51d803..459bf70 100755
 -{
 -static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
 -test_array [0] = 0
--
++test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+ 
 -  ;
 -  return 0;
 -}
@@ -12649,7 +13940,19 @@ index f51d803..459bf70 100755
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
 -  *) ac_try_echo=$ac_try;;
--esac
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
++$as_echo_n "checking whether build environment is sane... " >&6; }
++# Just in case
++sleep 1
++echo timestamp > conftest.file
++# Reject unsafe characters in $srcdir or the absolute working directory
++# name.  Accept space and tab only in the latter.
++am_lf='
++'
++case `pwd` in
++  *[\\\"\#\$\&\'\`$am_lf]*)
++    as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5 ;;
+ esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
 -  (eval "$ac_compile") 2>conftest.er1
@@ -12685,7 +13988,10 @@ index f51d803..459bf70 100755
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
 -  *) ac_try_echo=$ac_try;;
--esac
++case $srcdir in
++  *[\\\"\#\$\&\'\`$am_lf\ \	]*)
++    as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5 ;;
+ esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
 -  (eval "$ac_compile") 2>conftest.er1
@@ -12702,45 +14008,117 @@ index f51d803..459bf70 100755
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	case $ac_type in
 -  int64_t) ac_cv_c_int64_t=yes ;;
 -  *) ac_cv_c_int64_t=$ac_type ;;
 -esac
--
--fi
--
++# Do `set' in a subshell so we don't clobber the current shell's
++# arguments.  Must try -L first in case configure is actually a
++# symlink; some systems play weird games with the mod time of symlinks
++# (eg FreeBSD returns the mod time of the symlink's containing
++# directory).
++if (
++   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
++   if test "$*" = "X"; then
++      # -L didn't work.
++      set X `ls -t "$srcdir/configure" conftest.file`
++   fi
++   rm -f conftest.file
++   if test "$*" != "X $srcdir/configure conftest.file" \
++      && test "$*" != "X conftest.file $srcdir/configure"; then
+ 
+-fi
++      # If neither matched, then we have a broken ls.  This can happen
++      # if, for instance, CONFIG_SHELL is bash and it inherits a
++      # broken ls alias from the environment.  This has actually
++      # happened.  Such a system could not be considered "sane".
++      as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
++alias in your environment" "$LINENO" 5
++   fi
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--else
++   test "$2" = conftest.file
++   )
++then
++   # Ok.
++   :
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
--
--fi
++   as_fn_error $? "newly created file is older than distributed files!
++Check your system clock" "$LINENO" 5
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++test "$program_prefix" != NONE &&
++  program_transform_name="s&^&$program_prefix&;$program_transform_name"
++# Use a double $ so make ignores it.
++test "$program_suffix" != NONE &&
++  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
++# Double any \ or $.
++# By default was `s,x,x', remove it if useless.
++ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
++program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
+ 
++# expand $ac_aux_dir to an absolute path
++am_aux_dir=`cd $ac_aux_dir && pwd`
+ 
++if test x"${MISSING+set}" != xset; then
++  case $am_aux_dir in
++  *\ * | *\	*)
++    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
++  *)
++    MISSING="\${SHELL} $am_aux_dir/missing" ;;
++  esac
+ fi
 -
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -       test "$ac_cv_c_int64_t" != no && break
 -     done
--fi
++# Use eval to expand $SHELL
++if eval "$MISSING --run true"; then
++  am_missing_run="$MISSING --run "
++else
++  am_missing_run=
++  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
++$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+ fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
 -$as_echo "$ac_cv_c_int64_t" >&6; }
 -  case $ac_cv_c_int64_t in #(
-+ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
-+case $ac_cv_c_int64_t in #(
-   no|yes) ;; #(
+-  no|yes) ;; #(
++
++if test x"${install_sh}" != xset; then
++  case $am_aux_dir in
++  *\ * | *\	*)
++    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
    *)
- 
-@@ -13372,104 +8411,11 @@ cat >>confdefs.h <<_ACEOF
- #define int64_t $ac_cv_c_int64_t
- _ACEOF
- ;;
--  esac
 -
+-cat >>confdefs.h <<_ACEOF
+-#define int64_t $ac_cv_c_int64_t
+-_ACEOF
+-;;
++    install_sh="\${SHELL} $am_aux_dir/install-sh"
+   esac
++fi
+ 
 -{ $as_echo "$as_me:$LINENO: checking for ssize_t" >&5
 -$as_echo_n "checking for ssize_t... " >&6; }
 -if test "${ac_cv_type_ssize_t+set}" = set; then
--  $as_echo_n "(cached) " >&6
--else
++# Installed binaries are usually stripped using `strip' when the user
++# run `make install-strip'.  However `strip' might not be the right
++# tool to use in cross-compilation environments, therefore Automake
++# will honor the `STRIP' environment variable to overrule this program.
++if test "$cross_compiling" != no; then
++  if test -n "$ac_tool_prefix"; then
++  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
++set dummy ${ac_tool_prefix}strip; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_STRIP+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
 -  ac_cv_type_ssize_t=no
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
@@ -12797,7 +14175,7 @@ index f51d803..459bf70 100755
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
 -  *) ac_try_echo=$ac_try;;
- esac
+-esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
 -  (eval "$ac_compile") 2>conftest.er1
@@ -12811,42 +14189,95 @@ index f51d803..459bf70 100755
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  :
--else
++  if test -n "$STRIP"; then
++  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+ else
 -  $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=.
++    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_STRIP="${ac_tool_prefix}strip"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
+ 
 -	ac_cv_type_ssize_t=yes
--fi
+ fi
 -
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--else
++fi
++STRIP=$ac_cv_prog_STRIP
++if test -n "$STRIP"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
++$as_echo "$STRIP" >&6; }
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
- 
--fi
-+ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
-+if test "x$ac_cv_type_ssize_t" = x""yes; then :
+-
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+ fi
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--fi
++
+ fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
 -$as_echo "$ac_cv_type_ssize_t" >&6; }
 -if test "x$ac_cv_type_ssize_t" = x""yes; then
 -  :
++if test -z "$ac_cv_prog_STRIP"; then
++  ac_ct_STRIP=$STRIP
++  # Extract the first word of "strip", so it can be a program name with args.
++set dummy strip; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
++  $as_echo_n "(cached) " >&6
  else
- 
- cat >>confdefs.h <<_ACEOF
-@@ -13478,75 +8424,12 @@ _ACEOF
+-
+-cat >>confdefs.h <<_ACEOF
+-#define ssize_t int
+-_ACEOF
++  if test -n "$ac_ct_STRIP"; then
++  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++    ac_cv_prog_ac_ct_STRIP="strip"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
  
  fi
- 
+-
 -
 -  { $as_echo "$as_me:$LINENO: checking for uint32_t" >&5
 -$as_echo_n "checking for uint32_t... " >&6; }
 -if test "${ac_cv_c_uint32_t+set}" = set; then
 -  $as_echo_n "(cached) " >&6
--else
++fi
++ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
++if test -n "$ac_ct_STRIP"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
++$as_echo "$ac_ct_STRIP" >&6; }
+ else
 -  ac_cv_c_uint32_t=no
 -     for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
 -	 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
@@ -12862,7 +14293,10 @@ index f51d803..459bf70 100755
 -{
 -static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)];
 -test_array [0] = 0
--
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
+ 
 -  ;
 -  return 0;
 -}
@@ -12888,43 +14322,55 @@ index f51d803..459bf70 100755
 -  case $ac_type in
 -  uint32_t) ac_cv_c_uint32_t=yes ;;
 -  *) ac_cv_c_uint32_t=$ac_type ;;
--esac
++  if test "x$ac_ct_STRIP" = x; then
++    STRIP=":"
++  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
 -
--else
++    STRIP=$ac_ct_STRIP
++  fi
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -
--fi
--
++  STRIP="$ac_cv_prog_STRIP"
+ fi
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -       test "$ac_cv_c_uint32_t" != no && break
 -     done
--fi
+ fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
 -$as_echo "$ac_cv_c_uint32_t" >&6; }
 -  case $ac_cv_c_uint32_t in #(
-+ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
-+case $ac_cv_c_uint32_t in #(
-   no|yes) ;; #(
-   *)
- 
+-  no|yes) ;; #(
+-  *)
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define _UINT32_T 1
 -_ACEOF
-+$as_echo "#define _UINT32_T 1" >>confdefs.h
- 
- 
- cat >>confdefs.h <<_ACEOF
-@@ -13555,16 +8438,12 @@ _ACEOF
- ;;
-   esac
+-
+-
+-cat >>confdefs.h <<_ACEOF
+-#define uint32_t $ac_cv_c_uint32_t
+-_ACEOF
+-;;
+-  esac
++INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
  
 -{ $as_echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
- $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
+-$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
 -if test "${ac_cv_struct_tm+set}" = set; then
-+if test "${ac_cv_struct_tm+set}" = set; then :
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
++$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
++if test -z "$MKDIR_P"; then
++  if test "${ac_cv_path_mkdir+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
 -  cat >conftest.$ac_ext <<_ACEOF
@@ -12932,14 +14378,20 @@ index f51d803..459bf70 100755
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
- #include <sys/types.h>
- #include <time.h>
-@@ -13579,57 +8458,29 @@ struct tm tm;
-   return 0;
- }
- _ACEOF
+-/* end confdefs.h.  */
+-#include <sys/types.h>
+-#include <time.h>
+-
+-int
+-main ()
+-{
+-struct tm tm;
+-				     int *p = &tm.tm_sec;
+-				     return !p;
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -12958,59 +14410,142 @@ index f51d803..459bf70 100755
 -	 test -z "$ac_c_werror_flag" ||
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
-+if ac_fn_c_try_compile "$LINENO"; then :
-   ac_cv_struct_tm=time.h
- else
+-  ac_cv_struct_tm=time.h
+-else
 -  $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$PATH_SEPARATOR/opt/sfw/bin
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_prog in mkdir gmkdir; do
++	 for ac_exec_ext in '' $ac_executable_extensions; do
++	   { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
++	   case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
++	     'mkdir (GNU coreutils) '* | \
++	     'mkdir (coreutils) '* | \
++	     'mkdir (fileutils) '4.1*)
++	       ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
++	       break 3;;
++	   esac
++	 done
++       done
++  done
++IFS=$as_save_IFS
+ 
 -	ac_cv_struct_tm=sys/time.h
-+  ac_cv_struct_tm=sys/time.h
  fi
--
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ 
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++  test -d ./--version && rmdir ./--version
++  if test "${ac_cv_path_mkdir+set}" = set; then
++    MKDIR_P="$ac_cv_path_mkdir -p"
++  else
++    # As a last resort, use the slow shell script.  Don't cache a
++    # value for MKDIR_P within a source directory, because that will
++    # break other packages using the cache if that directory is
++    # removed, or if the value is a relative name.
++    MKDIR_P="$ac_install_sh -d"
++  fi
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
- $as_echo "$ac_cv_struct_tm" >&6; }
- if test $ac_cv_struct_tm = sys/time.h; then
+-$as_echo "$ac_cv_struct_tm" >&6; }
+-if test $ac_cv_struct_tm = sys/time.h; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
++$as_echo "$MKDIR_P" >&6; }
  
 -cat >>confdefs.h <<\_ACEOF
 -#define TM_IN_SYS_TIME 1
 -_ACEOF
-+$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
++mkdir_p="$MKDIR_P"
++case $mkdir_p in
++  [\\/$]* | ?:[\\/]*) ;;
++  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
++esac
++
++for ac_prog in gawk mawk nawk awk
++do
++  # Extract the first word of "$ac_prog", so it can be a program name with args.
++set dummy $ac_prog; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_AWK+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test -n "$AWK"; then
++  ac_cv_prog_AWK="$AWK" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++    ac_cv_prog_AWK="$ac_prog"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
  
  fi
++fi
++AWK=$ac_cv_prog_AWK
++if test -n "$AWK"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
++$as_echo "$AWK" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
+ 
  
--
 - { $as_echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
- $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
+-$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
 -if test "${ac_cv_c_bigendian+set}" = set; then
-+if test "${ac_cv_c_bigendian+set}" = set; then :
++  test -n "$AWK" && break
++done
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
++$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
++set x ${MAKE-make}
++ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
++if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then :
    $as_echo_n "(cached) " >&6
  else
-   ac_cv_c_bigendian=unknown
-     # See if we're dealing with a universal compiler.
+-  ac_cv_c_bigendian=unknown
+-    # See if we're dealing with a universal compiler.
 -    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.  */
- #ifndef __APPLE_CC__
- 	       not a universal capable compiler
-@@ -13637,46 +8488,34 @@ cat >>conftest.$ac_ext <<_ACEOF
- 	     typedef int dummy;
- 
+-/* end confdefs.h.  */
+-#ifndef __APPLE_CC__
+-	       not a universal capable compiler
+-	     #endif
+-	     typedef int dummy;
+-
++  cat >conftest.make <<\_ACEOF
++SHELL = /bin/sh
++all:
++	@echo '@@@%%%=$(MAKE)=@@@%%%'
  _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
 -  *) ac_try_echo=$ac_try;;
--esac
++# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
++case `${MAKE-make} -f conftest.make 2>/dev/null` in
++  *@@@%%%=?*=@@@%%%*)
++    eval ac_cv_prog_make_${ac_make}_set=yes;;
++  *)
++    eval ac_cv_prog_make_${ac_make}_set=no;;
+ esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
 -  (eval "$ac_compile") 2>conftest.er1
@@ -13023,57 +14558,79 @@ index f51d803..459bf70 100755
 -	 test -z "$ac_c_werror_flag" ||
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
-+if ac_fn_c_try_compile "$LINENO"; then :
- 
- 	# Check for potential -arch flags.  It is not universal unless
+-
+-	# Check for potential -arch flags.  It is not universal unless
 -	# there are some -arch flags.  Note that *ppc* also matches
 -	# ppc64.  This check is also rather less than ideal.
 -	case "${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}" in  #(
 -	  *-arch*ppc*|*-arch*i386*|*-arch*x86_64*) ac_cv_c_bigendian=universal;;
 -	esac
--else
++rm -f conftest.make
++fi
++if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++  SET_MAKE=
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
--
-+	# there are at least two -arch flags with different values.
-+	ac_arch=
-+	ac_prev=
-+	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
-+	 if test -n "$ac_prev"; then
-+	   case $ac_word in
-+	     i?86 | x86_64 | ppc | ppc64)
-+	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
-+		 ac_arch=$ac_word
-+	       else
-+		 ac_cv_c_bigendian=universal
-+		 break
-+	       fi
-+	       ;;
-+	   esac
-+	   ac_prev=
-+	 elif test "x$ac_word" = "x-arch"; then
-+	   ac_prev=arch
-+	 fi
-+       done
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++  SET_MAKE="MAKE=${MAKE-make}"
++fi
+ 
++rm -rf .tst 2>/dev/null
++mkdir .tst 2>/dev/null
++if test -d .tst; then
++  am__leading_dot=.
++else
++  am__leading_dot=_
++fi
++rmdir .tst 2>/dev/null
+ 
++if test "`cd $srcdir && pwd`" != "`pwd`"; then
++  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
++  # is not polluted with repeated "-I."
++  am__isrc=' -I$(srcdir)'
++  # test to see if srcdir already configured
++  if test -f $srcdir/config.status; then
++    as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
++  fi
  fi
--
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-     if test $ac_cv_c_bigendian = unknown; then
-       # See if sys/param.h defines the BYTE_ORDER macro.
+ 
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-    if test $ac_cv_c_bigendian = unknown; then
+-      # See if sys/param.h defines the BYTE_ORDER macro.
 -      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 <sys/types.h>
- 	     #include <sys/param.h>
-@@ -13694,30 +8533,9 @@ main ()
-   return 0;
- }
- _ACEOF
+-/* end confdefs.h.  */
+-#include <sys/types.h>
+-	     #include <sys/param.h>
++# test whether we have cygpath
++if test -z "$CYGPATH_W"; then
++  if (cygpath --version) >/dev/null 2>/dev/null; then
++    CYGPATH_W='cygpath -w'
++  else
++    CYGPATH_W=echo
++  fi
++fi
+ 
+-int
+-main ()
+-{
+-#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
+-		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
+-		     && LITTLE_ENDIAN)
+-	      bogus endian macros
+-	     #endif
+ 
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -13092,20 +14649,31 @@ index f51d803..459bf70 100755
 -	 test -z "$ac_c_werror_flag" ||
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
-+if ac_fn_c_try_compile "$LINENO"; then :
-   # It does; now see whether it defined to BIG_ENDIAN or not.
+-  # It does; now see whether it defined to BIG_ENDIAN or not.
 -	 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 <sys/types.h>
- 		#include <sys/param.h>
-@@ -13733,49 +8551,18 @@ main ()
-   return 0;
- }
+-/* end confdefs.h.  */
+-#include <sys/types.h>
+-		#include <sys/param.h>
++# Define the identity of the package.
++ PACKAGE='mediatomb'
++ VERSION='0.12.1'
+ 
+-int
+-main ()
+-{
+-#if BYTE_ORDER != BIG_ENDIAN
+-		 not big endian
+-		#endif
+ 
+-  ;
+-  return 0;
+-}
++cat >>confdefs.h <<_ACEOF
++#define PACKAGE "$PACKAGE"
  _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
@@ -13125,41 +14693,48 @@ index f51d803..459bf70 100755
 -	 test -z "$ac_c_werror_flag" ||
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
-+if ac_fn_c_try_compile "$LINENO"; then :
-   ac_cv_c_bigendian=yes
- else
+-  ac_cv_c_bigendian=yes
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_c_bigendian=no
-+  ac_cv_c_bigendian=no
- fi
+-fi
 -
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
+ 
+ 
+-fi
 -
--
- fi
--
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-     fi
-     if test $ac_cv_c_bigendian = unknown; then
-       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-    fi
+-    if test $ac_cv_c_bigendian = unknown; then
+-      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
 -      cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
--_ACEOF
++cat >>confdefs.h <<_ACEOF
++#define VERSION "$VERSION"
+ _ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
- #include <limits.h>
+-/* end confdefs.h.  */
+-#include <limits.h>
  
-@@ -13790,30 +8577,9 @@ main ()
-   return 0;
- }
- _ACEOF
+-int
+-main ()
+-{
+-#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
+-	      bogus endian macros
+-	     #endif
++# Some tools Automake needs.
+ 
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -13178,21 +14753,27 @@ index f51d803..459bf70 100755
 -	 test -z "$ac_c_werror_flag" ||
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
-+if ac_fn_c_try_compile "$LINENO"; then :
-   # It does; now see whether it defined to _BIG_ENDIAN or not.
+-  # It does; now see whether it defined to _BIG_ENDIAN or not.
 -	 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 <limits.h>
+-/* end confdefs.h.  */
+-#include <limits.h>
++ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
  
-@@ -13828,51 +8594,20 @@ main ()
-   return 0;
- }
- _ACEOF
+-int
+-main ()
+-{
+-#ifndef _BIG_ENDIAN
+-		 not big endian
+-		#endif
+ 
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -13211,44 +14792,61 @@ index f51d803..459bf70 100755
 -	 test -z "$ac_c_werror_flag" ||
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
-+if ac_fn_c_try_compile "$LINENO"; then :
-   ac_cv_c_bigendian=yes
- else
+-  ac_cv_c_bigendian=yes
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+ 
 -	ac_cv_c_bigendian=no
-+  ac_cv_c_bigendian=no
- fi
--
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-fi
+ 
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
--
- fi
--
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-     fi
-     if test $ac_cv_c_bigendian = unknown; then
-       # Compile a test program.
++AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+ 
+ 
+-fi
++AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+ 
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-    fi
+-    if test $ac_cv_c_bigendian = unknown; then
+-      # Compile a test program.
 -      if test "$cross_compiling" = yes; then
-+      if test "$cross_compiling" = yes; then :
-   # Try to guess by grepping values from an object file.
+-  # Try to guess by grepping values from an object file.
 -	 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.  */
- short int ascii_mm[] =
- 		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
-@@ -13898,24 +8633,7 @@ return use_ascii (foo) == use_ebcdic (foo);
-   return 0;
- }
- _ACEOF
+-/* end confdefs.h.  */
+-short int ascii_mm[] =
+-		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
+-		short int ascii_ii[] =
+-		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
+-		int use_ascii (int i) {
+-		  return ascii_mm[i] + ascii_ii[i];
+-		}
+-		short int ebcdic_ii[] =
+-		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
+-		short int ebcdic_mm[] =
+-		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
+-		int use_ebcdic (int i) {
+-		  return ebcdic_mm[i] + ebcdic_ii[i];
+-		}
+-		extern int foo;
+ 
+-int
+-main ()
+-{
+-return use_ascii (foo) == use_ebcdic (foo);
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -13267,36 +14865,57 @@ index f51d803..459bf70 100755
 -	 test -z "$ac_c_werror_flag" ||
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
-+if ac_fn_c_try_compile "$LINENO"; then :
-   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
- 	      ac_cv_c_bigendian=yes
- 	    fi
-@@ -13927,20 +8645,10 @@ $as_echo "$ac_try_echo") >&5
- 		ac_cv_c_bigendian=unknown
- 	      fi
- 	    fi
+-  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
+-	      ac_cv_c_bigendian=yes
+-	    fi
+-	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
+-	      if test "$ac_cv_c_bigendian" = unknown; then
+-		ac_cv_c_bigendian=no
+-	      else
+-		# finding both strings is unlikely to happen, but who knows?
+-		ac_cv_c_bigendian=unknown
+-	      fi
+-	    fi
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
--
- fi
--
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- else
++MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
++
++# We need awk for the "check" target.  The system "awk" is bad on
++# some platforms.
++# Always define AMTAR for backward compatibility.
+ 
++AMTAR=${AMTAR-"${am_missing_run}tar"}
+ 
+-fi
++am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
+ 
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-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.  */
- $ac_includes_default
- int
-@@ -13960,130 +8668,42 @@ main ()
-   return 0;
- }
- _ACEOF
+-/* end confdefs.h.  */
+-$ac_includes_default
+-int
+-main ()
+-{
+ 
+-	     /* Are we little or big endian?  From Harbison&Steele.  */
+-	     union
+-	     {
+-	       long int l;
+-	       char c[sizeof (long int)];
+-	     } u;
+-	     u.l = 1;
+-	     return u.c[sizeof (long int) - 1] == 1;
+ 
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -13319,62 +14938,68 @@ index f51d803..459bf70 100755
 -  ac_status=$?
 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
 -  (exit $ac_status); }; }; then
-+if ac_fn_c_try_run "$LINENO"; then :
-   ac_cv_c_bigendian=no
- else
+-  ac_cv_c_bigendian=no
+-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
--
+ 
 -( exit $ac_status )
 -ac_cv_c_bigendian=yes
-+  ac_cv_c_bigendian=yes
- fi
+-fi
 -rm -rf conftest.dSYM
 -rm -f core *.core core.conftest.* 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
+ 
+-    fi
++if test "x${prefix}" = "xNONE"; then
++    prefix="${ac_default_prefix}"
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
- $as_echo "$ac_cv_c_bigendian" >&6; }
-  case $ac_cv_c_bigendian in #(
-    yes)
+-$as_echo "$ac_cv_c_bigendian" >&6; }
+- case $ac_cv_c_bigendian in #(
+-   yes)
 -     cat >>confdefs.h <<\_ACEOF
 -#define WORDS_BIGENDIAN 1
 -_ACEOF
-+     $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
- ;; #(
-    no)
-       ;; #(
-    universal)
+-;; #(
+-   no)
+-      ;; #(
+-   universal)
  
 -cat >>confdefs.h <<\_ACEOF
 -#define AC_APPLE_UNIVERSAL_BUILD 1
 -_ACEOF
-+$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
++SEARCH_DIR="/usr/local"
  
-      ;; #(
-    *)
+-     ;; #(
+-   *)
 -     { { $as_echo "$as_me:$LINENO: error: unknown endianness
 - presetting ac_cv_c_bigendian=no (or yes) will help" >&5
 -$as_echo "$as_me: error: unknown endianness
 - presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
 -   { (exit 1); exit 1; }; } ;;
-+     as_fn_error $? "unknown endianness
-+ presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5  ;;
-  esac
+- esac
++DARWIN_OS=0
++CYGWIN_OS=0
++FREEBSD_OS=0
++OPENBSD_OS=0
++
++LIBS_SAVE="$LIBS"
  
++# Make sure we can run config.sub.
++$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
++  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
  
 -{ $as_echo "$as_me:$LINENO: checking whether LONG_MAX is declared" >&5
 -$as_echo_n "checking whether LONG_MAX is declared... " >&6; }
 -if test "${ac_cv_have_decl_LONG_MAX+set}" = set; then
--  $as_echo_n "(cached) " >&6
--else
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
++$as_echo_n "checking build system type... " >&6; }
++if test "${ac_cv_build+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
@@ -13389,7 +15014,14 @@ index f51d803..459bf70 100755
 -#ifndef LONG_MAX
 -  (void) LONG_MAX;
 -#endif
--
++  ac_build_alias=$build_alias
++test "x$ac_build_alias" = x &&
++  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
++test "x$ac_build_alias" = x &&
++  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
++ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
++  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+ 
 -  ;
 -  return 0;
 -}
@@ -13399,7 +15031,13 @@ index f51d803..459bf70 100755
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
 -  *) ac_try_echo=$ac_try;;
--esac
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
++$as_echo "$ac_cv_build" >&6; }
++case $ac_cv_build in
++*-*-*) ;;
++*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
+ esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
 -  (eval "$ac_compile") 2>conftest.er1
@@ -13416,29 +15054,84 @@ index f51d803..459bf70 100755
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++build=$ac_cv_build
++ac_save_IFS=$IFS; IFS='-'
++set x $ac_cv_build
++shift
++build_cpu=$1
++build_vendor=$2
++shift; shift
++# Remember, the first character of IFS is used to create $*,
++# except with old shells:
++build_os=$*
++IFS=$ac_save_IFS
++case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
++
+ 
 -	ac_cv_have_decl_LONG_MAX=no
--fi
--
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
++$as_echo_n "checking host system type... " >&6; }
++if test "${ac_cv_host+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test "x$host_alias" = x; then
++  ac_cv_host=$ac_cv_build
++else
++  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
++    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+ fi
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--fi
+ fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_LONG_MAX" >&5
 -$as_echo "$ac_cv_have_decl_LONG_MAX" >&6; }
 -if test "x$ac_cv_have_decl_LONG_MAX" = x""yes; then
-+ac_fn_c_check_decl "$LINENO" "LONG_MAX" "ac_cv_have_decl_LONG_MAX" "#include <limits.h>
-+"
-+if test "x$ac_cv_have_decl_LONG_MAX" = x""yes; then :
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
++$as_echo "$ac_cv_host" >&6; }
++case $ac_cv_host in
++*-*-*) ;;
++*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
++esac
++host=$ac_cv_host
++ac_save_IFS=$IFS; IFS='-'
++set x $ac_cv_host
++shift
++host_cpu=$1
++host_vendor=$2
++shift; shift
++# Remember, the first character of IFS is used to create $*,
++# except with old shells:
++host_os=$*
++IFS=$ac_save_IFS
++case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
  
  
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_LONG_MAX 1
 -_ACEOF
-+$as_echo "#define HAVE_LONG_MAX 1" >>confdefs.h
  
-             have_long_max=1
+-            have_long_max=1
++case $host in
++    *-*-darwin*)
++        DARWIN_OS=1
++        SEARCH_DIR="/opt/local"
++        ;;
++    *-*-solaris*)
  
-@@ -14091,138 +8711,28 @@ fi
+-fi
++$as_echo "#define SOLARIS 1" >>confdefs.h
  
++        ;;
++    *-*-cygwin*)
++        CYGWIN_OS=1
++        ;;
++    *-*-freebsd*)
++        FREEBSD_OS=1
++        ;;
++    *-*-openbsd*)
++        OPENBSD_OS=1
++        ;;
++esac
  
  
 -{ $as_echo "$as_me:$LINENO: checking whether LLONG_MAX is declared" >&5
@@ -13453,14 +15146,14 @@ index f51d803..459bf70 100755
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -#include <limits.h>
--
+ 
 -int
 -main ()
 -{
 -#ifndef LLONG_MAX
 -  (void) LLONG_MAX;
 -#endif
--
+ 
 -  ;
 -  return 0;
 -}
@@ -13487,27 +15180,39 @@ index f51d803..459bf70 100755
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++    MT_SEARCHPATH="/usr/local"
++    case $host in
++        *-*-darwin*)
++            MT_SEARCHPATH="/opt/local"
++        ;;
++    esac
+ 
 -	ac_cv_have_decl_LLONG_MAX=no
 -fi
--
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_LLONG_MAX" >&5
 -$as_echo "$ac_cv_have_decl_LLONG_MAX" >&6; }
 -if test "x$ac_cv_have_decl_LLONG_MAX" = x""yes; then
-+ac_fn_c_check_decl "$LINENO" "LLONG_MAX" "ac_cv_have_decl_LLONG_MAX" "#include <limits.h>
-+"
-+if test "x$ac_cv_have_decl_LLONG_MAX" = x""yes; then :
++# Check whether --with-search was given.
++if test "${with_search+set}" = set; then :
++  withval=$with_search;
++            MT_SEARCHPATH=$withval
++            { $as_echo "$as_me:${as_lineno-$LINENO}: Will also search for packages in ${MT_SEARCHPATH}" >&5
++$as_echo "$as_me: Will also search for packages in ${MT_SEARCHPATH}" >&6;}
  
  
 -cat >>confdefs.h <<\_ACEOF
 -#define MAXLLONG LLONG_MAX
 -_ACEOF
-+$as_echo "#define MAXLLONG LLONG_MAX" >>confdefs.h
++fi
  
  
- else
+-else
++    MT_SEARCHPATH_HEADERS="${MT_SEARCHPATH}/include"
++    MT_SEARCHPATH_LIBS="${MT_SEARCHPATH}/lib"
++    MT_SEARCHPATH_PROGS="${MT_SEARCHPATH}/bin"
  
 -            { $as_echo "$as_me:$LINENO: checking whether __LONG_LONG_MAX__ is declared" >&5
 -$as_echo_n "checking whether __LONG_LONG_MAX__ is declared... " >&6; }
@@ -13521,14 +15226,14 @@ index f51d803..459bf70 100755
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -#include <limits.h>
--
+ 
 -int
 -main ()
 -{
 -#ifndef __LONG_LONG_MAX__
 -  (void) __LONG_LONG_MAX__;
 -#endif
--
+ 
 -  ;
 -  return 0;
 -}
@@ -13555,81 +15260,110 @@ index f51d803..459bf70 100755
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	ac_cv_have_decl___LONG_LONG_MAX__=no
 -fi
--
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl___LONG_LONG_MAX__" >&5
 -$as_echo "$ac_cv_have_decl___LONG_LONG_MAX__" >&6; }
 -if test "x$ac_cv_have_decl___LONG_LONG_MAX__" = x""yes; then
-+            ac_fn_c_check_decl "$LINENO" "__LONG_LONG_MAX__" "ac_cv_have_decl___LONG_LONG_MAX__" "#include <limits.h>
-+"
-+if test "x$ac_cv_have_decl___LONG_LONG_MAX__" = x""yes; then :
  
  
 -cat >>confdefs.h <<\_ACEOF
 -#define MAXLLONG __LONG_LONG_MAX__
 -_ACEOF
-+$as_echo "#define MAXLLONG __LONG_LONG_MAX__" >>confdefs.h
++#AC_ARG_WITH(search,
++#        AC_HELP_STRING([--with-search=DIR], [Additionally search for packages in DIR]),
++#        [
++#            SEARCH_DIR=$withval
++#            AC_MSG_NOTICE([Will also search for packages in $SEARCH_DIR])
++#        ]
++#)
  
- else
+-else
++SEARCH_DIR_HEADERS="$SEARCH_DIR/include"
++SEARCH_DIR_LIBS="$SEARCH_DIR/lib"
++SEARCH_DIR_PROGS="$SEARCH_DIR/bin"
  
-                     if test "$have_long_max" -eq 1; then
+-                    if test "$have_long_max" -eq 1; then
++# per package header and library search paths
  
 -cat >>confdefs.h <<\_ACEOF
 -#define MAXLLONG LONG_MAX
 -_ACEOF
-+$as_echo "#define MAXLLONG LONG_MAX" >>confdefs.h
  
-                     fi
+-                    fi
++# Check whether --with-js-h was given.
++if test "${with_js_h+set}" = set; then :
++  withval=$with_js_h;
++            JS_SEARCH_HEADERS="$withval"
++
+ 
+ fi
  
-@@ -14234,16 +8744,16 @@ fi
  
  
- # Check whether --enable-rpl-malloc was given.
++# Check whether --with-js-libs was given.
++if test "${with_js_libs+set}" = set; then :
++  withval=$with_js_libs;
++            JS_SEARCH_LIBS="$withval"
++
++
+ fi
+ 
+ 
+-# Check whether --enable-rpl-malloc was given.
 -if test "${enable_rpl_malloc+set}" = set; then
-+if test "${enable_rpl_malloc+set}" = set; then :
-   enableval=$enable_rpl_malloc;
-             if test "x$enableval" = xno; then
-                 ac_cv_func_malloc_0_nonnull=yes
-                 ac_cv_func_realloc_0_nonnull=yes
+-  enableval=$enable_rpl_malloc;
+-            if test "x$enableval" = xno; then
+-                ac_cv_func_malloc_0_nonnull=yes
+-                ac_cv_func_realloc_0_nonnull=yes
 -                { $as_echo "$as_me:$LINENO: Disabling redefinition of malloc to rpl_malloc" >&5
-+                { $as_echo "$as_me:${as_lineno-$LINENO}: Disabling redefinition of malloc to rpl_malloc" >&5
- $as_echo "$as_me: Disabling redefinition of malloc to rpl_malloc" >&6;}
+-$as_echo "$as_me: Disabling redefinition of malloc to rpl_malloc" >&6;}
 -                { $as_echo "$as_me:$LINENO: Disabling redefinition of realloc to rpl_realloc" >&5
-+                { $as_echo "$as_me:${as_lineno-$LINENO}: Disabling redefinition of realloc to rpl_realloc" >&5
- $as_echo "$as_me: Disabling redefinition of realloc to rpl_realloc" >&6;}
+-$as_echo "$as_me: Disabling redefinition of realloc to rpl_realloc" >&6;}
 -                { $as_echo "$as_me:$LINENO: WARNING: Use this feature only if you are sure that you are building for GNU C!" >&5
-+                { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Use this feature only if you are sure that you are building for GNU C!" >&5
- $as_echo "$as_me: WARNING: Use this feature only if you are sure that you are building for GNU C!" >&2;}
-             fi
+-$as_echo "$as_me: WARNING: Use this feature only if you are sure that you are building for GNU C!" >&2;}
+-            fi
++
++# Check whether --with-iconv-h was given.
++if test "${with_iconv_h+set}" = set; then :
++  withval=$with_iconv_h;
++            ICONV_SEARCH_HEADERS="$withval"
++            { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for iconv headers in $withval" >&5
++$as_echo "$as_me: Will search for iconv headers in $withval" >&6;}
+ 
+ 
+ fi
+ 
  
-@@ -14255,16 +8765,12 @@ fi
- # Checks for library functions.
- # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
- # for constant arguments.  Useless!
+ 
+-# Checks for library functions.
+-# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
+-# for constant arguments.  Useless!
 -{ $as_echo "$as_me:$LINENO: checking for working alloca.h" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
- $as_echo_n "checking for working alloca.h... " >&6; }
+-$as_echo_n "checking for working alloca.h... " >&6; }
 -if test "${ac_cv_working_alloca_h+set}" = set; then
-+if test "${ac_cv_working_alloca_h+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
+-  $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.  */
- #include <alloca.h>
- int
-@@ -14276,59 +8782,28 @@ char *p = (char *) alloca (2 * sizeof (int));
-   return 0;
- }
- _ACEOF
+-/* end confdefs.h.  */
+-#include <alloca.h>
+-int
+-main ()
+-{
+-char *p = (char *) alloca (2 * sizeof (int));
+-			  if (p) return 0;
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -13651,54 +15385,75 @@ index f51d803..459bf70 100755
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
-+if ac_fn_c_try_link "$LINENO"; then :
-   ac_cv_working_alloca_h=yes
- else
+-  ac_cv_working_alloca_h=yes
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++# Check whether --with-iconv-libs was given.
++if test "${with_iconv_libs+set}" = set; then :
++  withval=$with_iconv_libs;
++            ICONV_SEARCH_LIBS="$withval"
++            { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for iconv libraries in $withval" >&5
++$as_echo "$as_me: Will search for iconv libraries in $withval" >&6;}
+ 
 -	ac_cv_working_alloca_h=no
-+  ac_cv_working_alloca_h=no
- fi
--
+-fi
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext conftest.$ac_ext
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
- $as_echo "$ac_cv_working_alloca_h" >&6; }
- if test $ac_cv_working_alloca_h = yes; then
+-$as_echo "$ac_cv_working_alloca_h" >&6; }
+-if test $ac_cv_working_alloca_h = yes; then
  
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_ALLOCA_H 1
 -_ACEOF
-+$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
  
- fi
+-fi
  
 -{ $as_echo "$as_me:$LINENO: checking for alloca" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
- $as_echo_n "checking for alloca... " >&6; }
+-$as_echo_n "checking for alloca... " >&6; }
 -if test "${ac_cv_func_alloca_works+set}" = set; then
-+if test "${ac_cv_func_alloca_works+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
+-  $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.  */
- #ifdef __GNUC__
- # define alloca __builtin_alloca
-@@ -14360,47 +8835,20 @@ char *p = (char *) alloca (1);
-   return 0;
- }
- _ACEOF
+-/* end confdefs.h.  */
+-#ifdef __GNUC__
+-# define alloca __builtin_alloca
+-#else
+-# ifdef _MSC_VER
+-#  include <malloc.h>
+-#  define alloca _alloca
+-# else
+-#  ifdef HAVE_ALLOCA_H
+-#   include <alloca.h>
+-#  else
+-#   ifdef _AIX
+- #pragma alloca
+-#   else
+-#    ifndef alloca /* predefined by HP cc +Olibcalls */
+-char *alloca ();
+-#    endif
+-#   endif
+-#  endif
+-# endif
+-#endif
+ 
+-int
+-main ()
+-{
+-char *p = (char *) alloca (1);
+-				    if (p) return 0;
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -13720,80 +15475,92 @@ index f51d803..459bf70 100755
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
-+if ac_fn_c_try_link "$LINENO"; then :
-   ac_cv_func_alloca_works=yes
- else
+-  ac_cv_func_alloca_works=yes
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++    mt_static_option_enabled=
++    mt_static_option_requested=no
++    if test "xenable" = xdisable; then
++        mt_static_option_enabled=yes
++    else
++        mt_static_option_enabled=no
++    fi
+ 
 -	ac_cv_func_alloca_works=no
-+  ac_cv_func_alloca_works=no
- fi
--
+-fi
++    # Check whether --enable-static was given.
++if test "${enable_static+set}" = set; then :
++  enableval=$enable_static;
++            mt_static_option_enabled=$enableval
++            mt_static_option_requested=yes
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext conftest.$ac_ext
- fi
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
- $as_echo "$ac_cv_func_alloca_works" >&6; }
+-$as_echo "$ac_cv_func_alloca_works" >&6; }
  
- if test $ac_cv_func_alloca_works = yes; then
+-if test $ac_cv_func_alloca_works = yes; then
++fi
  
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_ALLOCA 1
 -_ACEOF
-+$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
  
- else
-   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
-@@ -14410,21 +8858,15 @@ else
+-else
+-  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
+-# that cause trouble.  Some versions do not even contain alloca or
+-# contain a buggy version.  If you still want to use their alloca,
+-# use ar to extract alloca.o from them instead of compiling alloca.c.
++    STATIC_OPTION_ENABLED=${mt_static_option_enabled}
++    STATIC_OPTION_REQUESTED=${mt_static_option_requested}
  
- ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
+-ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
  
 -cat >>confdefs.h <<\_ACEOF
 -#define C_ALLOCA 1
 -_ACEOF
-+$as_echo "#define C_ALLOCA 1" >>confdefs.h
  
  
 -{ $as_echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
- $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
+-$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
 -if test "${ac_cv_os_cray+set}" = set; then
-+if test "${ac_cv_os_cray+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
+-  $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.  */
- #if defined CRAY && ! defined CRAY2
- webecray
-@@ -14434,7 +8876,7 @@ wenotbecray
+-/* end confdefs.h.  */
+-#if defined CRAY && ! defined CRAY2
+-webecray
+-#else
+-wenotbecray
+-#endif
++    if test "x${mt_static_option_enabled}" = xyes; then :
  
- _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+-_ACEOF
+-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
 -  $EGREP "webecray" >/dev/null 2>&1; then
-+  $EGREP "webecray" >/dev/null 2>&1; then :
-   ac_cv_os_cray=yes
- else
-   ac_cv_os_cray=no
-@@ -14442,101 +8884,13 @@ fi
- rm -f conftest*
+-  ac_cv_os_cray=yes
+-else
+-  ac_cv_os_cray=no
+-fi
+-rm -f conftest*
++            CFLAGS="$CFLAGS -static"
++            CXXFLAGS="$CXXFLAGS -static"
++            { $as_echo "$as_me:${as_lineno-$LINENO}: Building a static executable." >&5
++$as_echo "$as_me: Building a static executable." >&6;}
  
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
- $as_echo "$ac_cv_os_cray" >&6; }
- if test $ac_cv_os_cray = yes; then
-   for ac_func in _getb67 GETB67 getb67; do
-     as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+-$as_echo "$ac_cv_os_cray" >&6; }
+-if test $ac_cv_os_cray = yes; then
+-  for ac_func in _getb67 GETB67 getb67; do
+-    as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
@@ -13813,15 +15580,15 @@ index f51d803..459bf70 100755
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
--
+ 
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
--
+ 
 -#undef $ac_func
--
+ 
 -/* Override any GCC internal prototype to avoid an error.
 -   Use char because int might match the return type of a GCC
 -   builtin and then its argument prototype would still apply.  */
@@ -13835,7 +15602,14 @@ index f51d803..459bf70 100755
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
--
++    mt_db_autocreate_option_enabled=
++    mt_db_autocreate_option_requested=no
++    if test "xdisable" = xdisable; then
++        mt_db_autocreate_option_enabled=yes
++    else
++        mt_db_autocreate_option_enabled=no
++    fi
+ 
 -int
 -main ()
 -{
@@ -13869,14 +15643,19 @@ index f51d803..459bf70 100755
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++    # Check whether --enable-db-autocreate was given.
++if test "${enable_db_autocreate+set}" = set; then :
++  enableval=$enable_db_autocreate;
++            mt_db_autocreate_option_enabled=$enableval
++            mt_db_autocreate_option_requested=yes
+ 
 -	eval "$as_ac_var=no"
 -fi
--
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
--fi
+ fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -13884,39 +15663,54 @@ index f51d803..459bf70 100755
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+-
+-cat >>confdefs.h <<_ACEOF
+-#define CRAY_STACKSEG_END $ac_func
+-_ACEOF
  
- cat >>confdefs.h <<_ACEOF
- #define CRAY_STACKSEG_END $ac_func
-@@ -14548,19 +8902,15 @@ fi
-   done
- fi
+-    break
+-fi
+ 
+-  done
+-fi
++    DB_AUTOCREATE_OPTION_ENABLED=${mt_db_autocreate_option_enabled}
++    DB_AUTOCREATE_OPTION_REQUESTED=${mt_db_autocreate_option_requested}
  
 -{ $as_echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
- $as_echo_n "checking stack direction for C alloca... " >&6; }
+-$as_echo_n "checking stack direction for C alloca... " >&6; }
 -if test "${ac_cv_c_stack_direction+set}" = set; then
-+if test "${ac_cv_c_stack_direction+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
+-  $as_echo_n "(cached) " >&6
+-else
 -  if test "$cross_compiling" = yes; then
-+  if test "$cross_compiling" = yes; then :
-   ac_cv_c_stack_direction=0
- else
+-  ac_cv_c_stack_direction=0
+-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.  */
- $ac_includes_default
- int
-@@ -14583,46 +8933,18 @@ main ()
-   return find_stack_direction () < 0;
- }
- _ACEOF
+-/* end confdefs.h.  */
+-$ac_includes_default
+-int
+-find_stack_direction ()
+-{
+-  static char *addr = 0;
+-  auto char dummy;
+-  if (addr == 0)
+-    {
+-      addr = &dummy;
+-      return find_stack_direction ();
+-    }
+-  else
+-    return (&dummy > addr) ? 1 : -1;
+-}
+ 
+-int
+-main ()
+-{
+-  return find_stack_direction () < 0;
+-}
+-_ACEOF
 -rm -f conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -13939,60 +15733,72 @@ index f51d803..459bf70 100755
 -  ac_status=$?
 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
 -  (exit $ac_status); }; }; then
-+if ac_fn_c_try_run "$LINENO"; then :
-   ac_cv_c_stack_direction=1
- else
+-  ac_cv_c_stack_direction=1
+-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
--
+ 
 -( exit $ac_status )
 -ac_cv_c_stack_direction=-1
-+  ac_cv_c_stack_direction=-1
- fi
+-fi
 -rm -rf conftest.dSYM
 -rm -f core *.core core.conftest.* 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
+ 
++    if test "x${mt_db_autocreate_option_enabled}" = xyes; then :
  
--
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
- $as_echo "$ac_cv_c_stack_direction" >&6; }
--
- cat >>confdefs.h <<_ACEOF
- #define STACK_DIRECTION $ac_cv_c_stack_direction
- _ACEOF
-@@ -14630,19 +8952,15 @@ _ACEOF
+-$as_echo "$ac_cv_c_stack_direction" >&6; }
  
- fi
+-cat >>confdefs.h <<_ACEOF
+-#define STACK_DIRECTION $ac_cv_c_stack_direction
+-_ACEOF
+ 
+ 
+-fi
++    mt_debug_malloc0_option_enabled=
++    mt_debug_malloc0_option_requested=no
++    if test "xenable" = xdisable; then
++        mt_debug_malloc0_option_enabled=yes
++    else
++        mt_debug_malloc0_option_enabled=no
++    fi
  
 -{ $as_echo "$as_me:$LINENO: checking whether closedir returns void" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether closedir returns void" >&5
- $as_echo_n "checking whether closedir returns void... " >&6; }
+-$as_echo_n "checking whether closedir returns void... " >&6; }
 -if test "${ac_cv_func_closedir_void+set}" = set; then
-+if test "${ac_cv_func_closedir_void+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
+-  $as_echo_n "(cached) " >&6
+-else
 -  if test "$cross_compiling" = yes; then
-+  if test "$cross_compiling" = yes; then :
-   ac_cv_func_closedir_void=yes
- else
+-  ac_cv_func_closedir_void=yes
+-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.  */
- $ac_includes_default
- #include <$ac_header_dirent>
-@@ -14658,63 +8976,30 @@ return closedir (opendir (".")) != 0;
-   return 0;
- }
- _ACEOF
+-/* end confdefs.h.  */
+-$ac_includes_default
+-#include <$ac_header_dirent>
+-#ifndef __cplusplus
+-int closedir ();
+-#endif
++    # Check whether --enable-debug-malloc0 was given.
++if test "${enable_debug_malloc0+set}" = set; then :
++  enableval=$enable_debug_malloc0;
++            mt_debug_malloc0_option_enabled=$enableval
++            mt_debug_malloc0_option_requested=yes
+ 
+-int
+-main ()
+-{
+-return closedir (opendir (".")) != 0;
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -14015,57 +15821,53 @@ index f51d803..459bf70 100755
 -  ac_status=$?
 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
 -  (exit $ac_status); }; }; then
-+if ac_fn_c_try_run "$LINENO"; then :
-   ac_cv_func_closedir_void=no
- else
+-  ac_cv_func_closedir_void=no
+-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
--
+ 
 -( exit $ac_status )
 -ac_cv_func_closedir_void=yes
-+  ac_cv_func_closedir_void=yes
- fi
+-fi
 -rm -rf conftest.dSYM
 -rm -f core *.core core.conftest.* 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
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_closedir_void" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_closedir_void" >&5
- $as_echo "$ac_cv_func_closedir_void" >&6; }
- if test $ac_cv_func_closedir_void = yes; then
+-$as_echo "$ac_cv_func_closedir_void" >&6; }
+-if test $ac_cv_func_closedir_void = yes; then
++    DEBUG_MALLOC0_OPTION_ENABLED=${mt_debug_malloc0_option_enabled}
++    DEBUG_MALLOC0_OPTION_REQUESTED=${mt_debug_malloc0_option_requested}
  
 -cat >>confdefs.h <<\_ACEOF
 -#define CLOSEDIR_VOID 1
 -_ACEOF
-+$as_echo "#define CLOSEDIR_VOID 1" >>confdefs.h
  
- fi
+-fi
  
 -{ $as_echo "$as_me:$LINENO: checking for error_at_line" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
- $as_echo_n "checking for error_at_line... " >&6; }
+-$as_echo_n "checking for error_at_line... " >&6; }
 -if test "${ac_cv_lib_error_at_line+set}" = set; then
-+if test "${ac_cv_lib_error_at_line+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
+-  $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.  */
- #include <error.h>
- int
-@@ -14725,40 +9010,15 @@ error_at_line (0, 0, "", 0, "an error occurred");
-   return 0;
- }
- _ACEOF
+-/* end confdefs.h.  */
+-#include <error.h>
+-int
+-main ()
+-{
+-error_at_line (0, 0, "", 0, "an error occurred");
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -14087,33 +15889,33 @@ index f51d803..459bf70 100755
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
-+if ac_fn_c_try_link "$LINENO"; then :
-   ac_cv_lib_error_at_line=yes
- else
+-  ac_cv_lib_error_at_line=yes
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	ac_cv_lib_error_at_line=no
-+  ac_cv_lib_error_at_line=no
- fi
--
+-fi
++    if test "x${mt_debug_malloc0_option_enabled}" = xyes; then :
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext conftest.$ac_ext
- fi
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_error_at_line" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
- $as_echo "$ac_cv_lib_error_at_line" >&6; }
- if test $ac_cv_lib_error_at_line = no; then
-   case " $LIBOBJS " in
-@@ -14769,252 +9029,23 @@ esac
+-$as_echo "$ac_cv_lib_error_at_line" >&6; }
+-if test $ac_cv_lib_error_at_line = no; then
+-  case " $LIBOBJS " in
+-  *" error.$ac_objext "* ) ;;
+-  *) LIBOBJS="$LIBOBJS error.$ac_objext"
+- ;;
+-esac
  
- fi
+-fi
++$as_echo "#define DEBUG_MALLOC_0 1" >>confdefs.h
  
--
- for ac_header in vfork.h
+ 
+-for ac_header in vfork.h
 -do
 -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
@@ -14121,7 +15923,7 @@ index f51d803..459bf70 100755
 -$as_echo_n "checking for $ac_header... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 -  $as_echo_n "(cached) " >&6
--fi
+ fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -14161,14 +15963,14 @@ index f51d803..459bf70 100755
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	ac_header_compiler=no
 -fi
--
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 -$as_echo "$ac_header_compiler" >&6; }
--
+ 
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
 -$as_echo_n "checking $ac_header presence... " >&6; }
@@ -14201,14 +16003,27 @@ index f51d803..459bf70 100755
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -  ac_header_preproc=no
 -fi
--
++    mt_pthread_lib_option_enabled=
++    mt_pthread_lib_option_requested=no
++    if test "xenable" = xdisable; then
++        mt_pthread_lib_option_enabled=yes
++    else
++        mt_pthread_lib_option_enabled=no
++    fi
++
++    # Check whether --enable-pthread-lib was given.
++if test "${enable_pthread_lib+set}" = set; then :
++  enableval=$enable_pthread_lib;
++            mt_pthread_lib_option_enabled=$enableval
++            mt_pthread_lib_option_requested=yes
+ 
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$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: )
@@ -14245,31 +16060,55 @@ index f51d803..459bf70 100755
 -  $as_echo_n "(cached) " >&6
 -else
 -  eval "$as_ac_Header=\$ac_header_preproc"
--fi
+ fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
--
--fi
++
++
++    PTHREAD_LIB_OPTION_ENABLED=${mt_pthread_lib_option_enabled}
++    PTHREAD_LIB_OPTION_REQUESTED=${mt_pthread_lib_option_requested}
++
++
++
++
++    if test "x${mt_pthread_lib_option_enabled}" = xyes; then :
+ 
+ fi
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+do :
-+  ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
-+if test "x$ac_cv_header_vfork_h" = x""yes; then :
-   cat >>confdefs.h <<_ACEOF
+-  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-+#define HAVE_VFORK_H 1
- _ACEOF
+-_ACEOF
++
++
++
++    mt_iconv_lib_option_enabled=
++    mt_iconv_lib_option_requested=no
++    if test "xenable" = xdisable; then
++        mt_iconv_lib_option_enabled=yes
++    else
++        mt_iconv_lib_option_enabled=no
++    fi
++
++    # Check whether --enable-iconv-lib was given.
++if test "${enable_iconv_lib+set}" = set; then :
++  enableval=$enable_iconv_lib;
++            mt_iconv_lib_option_enabled=$enableval
++            mt_iconv_lib_option_requested=yes
++
  
  fi
  
- done
+-done
  
--
--
- for ac_func in fork vfork
++    ICONV_LIB_OPTION_ENABLED=${mt_iconv_lib_option_enabled}
++    ICONV_LIB_OPTION_REQUESTED=${mt_iconv_lib_option_requested}
+ 
+ 
+-for ac_func in fork vfork
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -14286,20 +16125,22 @@ index f51d803..459bf70 100755
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
--
+ 
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
--
+ 
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
--
++    if test "x${mt_iconv_lib_option_enabled}" = xyes; then :
+ 
 -#undef $ac_func
--
++fi
+ 
 -/* 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.  */
@@ -14313,7 +16154,7 @@ index f51d803..459bf70 100755
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
--
+ 
 -int
 -main ()
 -{
@@ -14327,7 +16168,19 @@ index f51d803..459bf70 100755
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
 -  *) ac_try_echo=$ac_try;;
--esac
++ATOMIC_X86_SMP=0
++ATOMIC_X86_SMP_REQ=0
++X86=0
++case $host_cpu in
++    *86)
++        ATOMIC_X86_SMP=1
++        X86=1
++    ;;
++    *86*64)
++        ATOMIC_X86_SMP=1
++        X86=1
++    ;;
+ esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
 -  (eval "$ac_link") 2>conftest.er1
@@ -14347,10 +16200,27 @@ index f51d803..459bf70 100755
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	eval "$as_ac_var=no"
 -fi
--
++ATOMIC_X86=0
++
++
++
++    mt_atomic_x86_single_option_enabled=
++    mt_atomic_x86_single_option_requested=no
++    if test "xenable" = xdisable; then
++        mt_atomic_x86_single_option_enabled=yes
++    else
++        mt_atomic_x86_single_option_enabled=no
++    fi
++
++    # Check whether --enable-atomic-x86-single was given.
++if test "${enable_atomic_x86_single+set}" = set; then :
++  enableval=$enable_atomic_x86_single;
++            mt_atomic_x86_single_option_enabled=$enableval
++            mt_atomic_x86_single_option_requested=yes
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
@@ -14362,41 +16232,42 @@ index f51d803..459bf70 100755
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+do :
-+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
-   cat >>confdefs.h <<_ACEOF
- #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
- _ACEOF
-@@ -15023,19 +9054,15 @@ fi
- done
+-  cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+-_ACEOF
  
- if test "x$ac_cv_func_fork" = xyes; then
+ fi
+-done
+ 
+-if test "x$ac_cv_func_fork" = xyes; then
 -  { $as_echo "$as_me:$LINENO: checking for working fork" >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
- $as_echo_n "checking for working fork... " >&6; }
+-$as_echo_n "checking for working fork... " >&6; }
 -if test "${ac_cv_func_fork_works+set}" = set; then
-+if test "${ac_cv_func_fork_works+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
+-  $as_echo_n "(cached) " >&6
+-else
 -  if test "$cross_compiling" = yes; then
-+  if test "$cross_compiling" = yes; then :
-   ac_cv_func_fork_works=cross
- else
+-  ac_cv_func_fork_works=cross
+-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.  */
- $ac_includes_default
- int
-@@ -15049,44 +9076,17 @@ main ()
-   return 0;
- }
- _ACEOF
+-/* end confdefs.h.  */
+-$ac_includes_default
+-int
+-main ()
+-{
+ 
+-	  /* By Ruediger Kuhlmann. */
+-	  return fork () < 0;
++    ATOMIC_X86_SINGLE_OPTION_ENABLED=${mt_atomic_x86_single_option_enabled}
++    ATOMIC_X86_SINGLE_OPTION_REQUESTED=${mt_atomic_x86_single_option_requested}
+ 
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -14419,64 +16290,181 @@ index f51d803..459bf70 100755
 -  ac_status=$?
 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
 -  (exit $ac_status); }; }; then
-+if ac_fn_c_try_run "$LINENO"; then :
-   ac_cv_func_fork_works=yes
- else
+-  ac_cv_func_fork_works=yes
+-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
--
+ 
 -( exit $ac_status )
 -ac_cv_func_fork_works=no
-+  ac_cv_func_fork_works=no
- fi
+-fi
 -rm -rf conftest.dSYM
 -rm -f core *.core core.conftest.* 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
+ 
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
- $as_echo "$ac_cv_func_fork_works" >&6; }
+-$as_echo "$ac_cv_func_fork_works" >&6; }
++    if test "x${mt_atomic_x86_single_option_enabled}" = xyes; then :
++
++              if test "$X86" -eq 1; then
++                    ATOMIC_X86=1
++                    ATOMIC_X86_SMP=0
++              else
++                    as_fn_error $? "Tried to activate x86 specific option for a non x86 host!" "$LINENO" 5
++              fi
  
- else
-@@ -15102,24 +9102,20 @@ if test "x$ac_cv_func_fork_works" = xcross; then
-       ac_cv_func_fork_works=yes
-       ;;
-   esac
+-else
+-  ac_cv_func_fork_works=$ac_cv_func_fork
+ fi
+-if test "x$ac_cv_func_fork_works" = xcross; then
+-  case $host in
+-    *-*-amigaos* | *-*-msdosdjgpp*)
+-      # Override, as these systems have only a dummy fork() stub
+-      ac_cv_func_fork_works=no
+-      ;;
+-    *)
+-      ac_cv_func_fork_works=yes
+-      ;;
+-  esac
 -  { $as_echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
- $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
+-$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
++
++# Check whether --enable-atomic-pthread was given.
++if test "${enable_atomic_pthread+set}" = set; then :
++  enableval=$enable_atomic_pthread;
++                if test "x$enableval" = xyes; then
++                    if test "$ATOMIC_X86" -eq 1; then
++                        as_fn_error $? "You can not use atomic-x86-single and atomic-pthread code at the same time!" "$LINENO" 5
++                    else
++                        ATOMIC_X86=0
++                        ATOMIC_X86_SMP=0
++                    fi
++                fi
++
++
  fi
- ac_cv_func_vfork_works=$ac_cv_func_vfork
- if test "x$ac_cv_func_vfork" = xyes; then
+-ac_cv_func_vfork_works=$ac_cv_func_vfork
+-if test "x$ac_cv_func_vfork" = xyes; then
 -  { $as_echo "$as_me:$LINENO: checking for working vfork" >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
- $as_echo_n "checking for working vfork... " >&6; }
+-$as_echo_n "checking for working vfork... " >&6; }
 -if test "${ac_cv_func_vfork_works+set}" = set; then
-+if test "${ac_cv_func_vfork_works+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
+-  $as_echo_n "(cached) " >&6
+-else
 -  if test "$cross_compiling" = yes; then
-+  if test "$cross_compiling" = yes; then :
-   ac_cv_func_vfork_works=cross
- else
+-  ac_cv_func_vfork_works=cross
+-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.  */
- /* Thanks to Paul Eggert for this test.  */
- $ac_includes_default
-@@ -15211,238 +9207,62 @@ main ()
-   }
- }
- _ACEOF
+-/* end confdefs.h.  */
+-/* Thanks to Paul Eggert for this test.  */
+-$ac_includes_default
+-#include <sys/wait.h>
+-#ifdef HAVE_VFORK_H
+-# include <vfork.h>
+-#endif
+-/* On some sparc systems, changes by the child to local and incoming
+-   argument registers are propagated back to the parent.  The compiler
+-   is told about this with #include <vfork.h>, but some compilers
+-   (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
+-   static variable whose address is put into a register that is
+-   clobbered by the vfork.  */
+-static void
+-#ifdef __cplusplus
+-sparc_address_test (int arg)
+-# else
+-sparc_address_test (arg) int arg;
+-#endif
+-{
+-  static pid_t child;
+-  if (!child) {
+-    child = vfork ();
+-    if (child < 0) {
+-      perror ("vfork");
+-      _exit(2);
+-    }
+-    if (!child) {
+-      arg = getpid();
+-      write(-1, "", 0);
+-      _exit (arg);
+-    }
+-  }
+-}
+ 
+-int
+-main ()
+-{
+-  pid_t parent = getpid ();
+-  pid_t child;
+ 
+-  sparc_address_test (0);
+ 
+-  child = vfork ();
+ 
+-  if (child == 0) {
+-    /* Here is another test for sparc vfork register problems.  This
+-       test uses lots of local variables, at least as many local
+-       variables as main has allocated so far including compiler
+-       temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
+-       4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
+-       reuse the register of parent for one of the local variables,
+-       since it will think that parent can't possibly be used any more
+-       in this routine.  Assigning to the local variable will thus
+-       munge parent in the parent process.  */
+-    pid_t
+-      p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
+-      p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
+-    /* Convince the compiler that p..p7 are live; otherwise, it might
+-       use the same hardware register for all 8 local variables.  */
+-    if (p != p1 || p != p2 || p != p3 || p != p4
+-	|| p != p5 || p != p6 || p != p7)
+-      _exit(1);
++    mt_atomic_option_enabled=
++    mt_atomic_option_requested=no
++    if test "xdisable" = xdisable; then
++        mt_atomic_option_enabled=yes
++    else
++        mt_atomic_option_enabled=no
++    fi
+ 
+-    /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
+-       from child file descriptors.  If the child closes a descriptor
+-       before it execs or exits, this munges the parent's descriptor
+-       as well.  Test for this by closing stdout in the child.  */
+-    _exit(close(fileno(stdout)) != 0);
+-  } else {
+-    int status;
+-    struct stat st;
++    # Check whether --enable-atomic was given.
++if test "${enable_atomic+set}" = set; then :
++  enableval=$enable_atomic;
++            mt_atomic_option_enabled=$enableval
++            mt_atomic_option_requested=yes
+ 
+-    while (wait(&status) != child)
+-      ;
+-    return (
+-	 /* Was there some problem with vforking?  */
+-	 child < 0
+ 
+-	 /* Did the child fail?  (This shouldn't happen.)  */
+-	 || status
++fi
+ 
+-	 /* Did the vfork/compiler bug occur?  */
+-	 || parent != getpid()
+ 
+-	 /* Did the file descriptor bug occur?  */
+-	 || fstat(fileno(stdout), &st) != 0
+-	 );
+-  }
+-}
+-_ACEOF
 -rm -f conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -14499,63 +16487,100 @@ index f51d803..459bf70 100755
 -  ac_status=$?
 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
 -  (exit $ac_status); }; }; then
-+if ac_fn_c_try_run "$LINENO"; then :
-   ac_cv_func_vfork_works=yes
+-  ac_cv_func_vfork_works=yes
++    ATOMIC_OPTION_ENABLED=${mt_atomic_option_enabled}
++    ATOMIC_OPTION_REQUESTED=${mt_atomic_option_requested}
++
++
++
++
++    if test "x${mt_atomic_option_enabled}" = xyes; then :
++
  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
--
+ 
 -( exit $ac_status )
 -ac_cv_func_vfork_works=no
-+  ac_cv_func_vfork_works=no
- fi
+-fi
 -rm -rf conftest.dSYM
 -rm -f core *.core core.conftest.* 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
++              ATOMIC_X86=0
++              ATOMIC_X86_SMP=0
++              { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You disabled the use of atomic arithmetics! You have been warned!" >&5
++$as_echo "$as_me: WARNING: You disabled the use of atomic arithmetics! You have been warned!" >&2;}
++
++$as_echo "#define ATOMIC_TORTURE 1" >>confdefs.h
++
++
  fi
  
--
++if ((test $ATOMIC_X86_SMP -eq 1) && (test $ATOMIC_X86 -eq 1)); then
++    as_fn_error $? "Cannot use atomic-x86-smp and atomic-x86 options at the same time!" "$LINENO" 5
++fi
+ 
++if (((test $ATOMIC_X86_SMP -eq 1) || (test $ATOMIC_X86 -eq 1)) &&
++     (test "$X86" -eq 0)); then
++    as_fn_error $? "Cannot use x86 specific code on a non a $host_cpu system!" "$LINENO" 5
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
- $as_echo "$ac_cv_func_vfork_works" >&6; }
+-$as_echo "$ac_cv_func_vfork_works" >&6; }
  
- fi;
- if test "x$ac_cv_func_fork_works" = xcross; then
-   ac_cv_func_vfork_works=$ac_cv_func_vfork
+-fi;
+-if test "x$ac_cv_func_fork_works" = xcross; then
+-  ac_cv_func_vfork_works=$ac_cv_func_vfork
 -  { $as_echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
- $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
+-$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
++if test $ATOMIC_X86_SMP -eq 1; then
++
++$as_echo "#define ATOMIC_X86_SMP 1" >>confdefs.h
++
++elif test $ATOMIC_X86 -eq 1; then
++
++$as_echo "#define ATOMIC_X86 1" >>confdefs.h
++
++    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You specified to use atomic arithmetics code for x86 single processor systems! The resulting binary must not be used on SMP machines!" >&5
++$as_echo "$as_me: WARNING: You specified to use atomic arithmetics code for x86 single processor systems! The resulting binary must not be used on SMP machines!" >&2;}
  fi
  
- if test "x$ac_cv_func_vfork_works" = xyes; then
+-if test "x$ac_cv_func_vfork_works" = xyes; then
  
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_WORKING_VFORK 1
 -_ACEOF
-+$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
++SIGHUP=0
++if test $X86 -eq 1; then
++    SIGHUP=1
++fi
  
- else
+-else
++# Check whether --enable-sighup was given.
++if test "${enable_sighup+set}" = set; then :
++  enableval=$enable_sighup;
++                if test "x$enableval" = xno; then
++                    SIGHUP=0
++                else
++                    SIGHUP=1
++                fi
  
 -cat >>confdefs.h <<\_ACEOF
 -#define vfork fork
 -_ACEOF
-+$as_echo "#define vfork fork" >>confdefs.h
  
  fi
- if test "x$ac_cv_func_fork_works" = xyes; then
+-if test "x$ac_cv_func_fork_works" = xyes; then
  
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_WORKING_FORK 1
 -_ACEOF
-+$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
  
- fi
+-fi
++if test $SIGHUP -eq 1; then
  
--
- for ac_header in stdlib.h
++$as_echo "#define ENABLE_SIGHUP 1" >>confdefs.h
+ 
+-for ac_header in stdlib.h
 -do
 -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
@@ -14563,7 +16588,7 @@ index f51d803..459bf70 100755
 -$as_echo_n "checking for $ac_header... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 -  $as_echo_n "(cached) " >&6
--fi
+ fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -14603,14 +16628,14 @@ index f51d803..459bf70 100755
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	ac_header_compiler=no
 -fi
--
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 -$as_echo "$ac_header_compiler" >&6; }
--
+ 
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
 -$as_echo_n "checking $ac_header presence... " >&6; }
@@ -14643,14 +16668,26 @@ index f51d803..459bf70 100755
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++    mt_mrreg_service_option_enabled=
++    mt_mrreg_service_option_requested=no
++    if test "xenable" = xdisable; then
++        mt_mrreg_service_option_enabled=yes
++    else
++        mt_mrreg_service_option_enabled=no
++    fi
+ 
 -  ac_header_preproc=no
 -fi
--
++    # Check whether --enable-mrreg-service was given.
++if test "${enable_mrreg_service+set}" = set; then :
++  enableval=$enable_mrreg_service;
++            mt_mrreg_service_option_enabled=$enableval
++            mt_mrreg_service_option_requested=yes
+ 
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$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: )
@@ -14687,52 +16724,54 @@ index f51d803..459bf70 100755
 -  $as_echo_n "(cached) " >&6
 -else
 -  eval "$as_ac_Header=\$ac_header_preproc"
--fi
+ fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
--
+ 
 -fi
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+do :
-+  ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
-+if test "x$ac_cv_header_stdlib_h" = x""yes; then :
-   cat >>confdefs.h <<_ACEOF
+-  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-+#define HAVE_STDLIB_H 1
- _ACEOF
+-_ACEOF
  
- fi
+-fi
++    MRREG_SERVICE_OPTION_ENABLED=${mt_mrreg_service_option_enabled}
++    MRREG_SERVICE_OPTION_REQUESTED=${mt_mrreg_service_option_requested}
  
- done
+-done
  
 -{ $as_echo "$as_me:$LINENO: checking for GNU libc compatible malloc" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
- $as_echo_n "checking for GNU libc compatible malloc... " >&6; }
+-$as_echo_n "checking for GNU libc compatible malloc... " >&6; }
 -if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then
-+if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
+-  $as_echo_n "(cached) " >&6
+-else
 -  if test "$cross_compiling" = yes; then
-+  if test "$cross_compiling" = yes; then :
-   ac_cv_func_malloc_0_nonnull=no
- else
+-  ac_cv_func_malloc_0_nonnull=no
+-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.  */
- #if defined STDC_HEADERS || defined HAVE_STDLIB_H
- # include <stdlib.h>
-@@ -15458,55 +9278,24 @@ return ! malloc (0);
-   return 0;
- }
- _ACEOF
+-/* end confdefs.h.  */
+-#if defined STDC_HEADERS || defined HAVE_STDLIB_H
+-# include <stdlib.h>
+-#else
+-char *malloc ();
+-#endif
+ 
+-int
+-main ()
+-{
+-return ! malloc (0);
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -14755,81 +16794,114 @@ index f51d803..459bf70 100755
 -  ac_status=$?
 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
 -  (exit $ac_status); }; }; then
-+if ac_fn_c_try_run "$LINENO"; then :
-   ac_cv_func_malloc_0_nonnull=yes
- else
+-  ac_cv_func_malloc_0_nonnull=yes
+-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
--
+ 
 -( exit $ac_status )
 -ac_cv_func_malloc_0_nonnull=no
-+  ac_cv_func_malloc_0_nonnull=no
- fi
+-fi
 -rm -rf conftest.dSYM
 -rm -f core *.core core.conftest.* 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
++    if test "x${mt_mrreg_service_option_enabled}" = xyes; then :
++
++
++$as_echo "#define ENABLE_MRREG 1" >>confdefs.h
+ 
  
--
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_malloc_0_nonnull" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
- $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
+-$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
 -if test $ac_cv_func_malloc_0_nonnull = yes; then
-+if test $ac_cv_func_malloc_0_nonnull = yes; then :
  
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_MALLOC 1
 -_ACEOF
-+$as_echo "#define HAVE_MALLOC 1" >>confdefs.h
  
- else
+-else
 -  cat >>confdefs.h <<\_ACEOF
 -#define HAVE_MALLOC 0
 -_ACEOF
-+  $as_echo "#define HAVE_MALLOC 0" >>confdefs.h
  
-    case " $LIBOBJS " in
-   *" malloc.$ac_objext "* ) ;;
-@@ -15515,27 +9304,20 @@ _ACEOF
- esac
+-   case " $LIBOBJS " in
+-  *" malloc.$ac_objext "* ) ;;
+-  *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
+- ;;
+-esac
++    mt_external_transcoding_option_enabled=
++    mt_external_transcoding_option_requested=no
++    if test "xdisable" = xdisable; then
++        mt_external_transcoding_option_enabled=yes
++    else
++        mt_external_transcoding_option_enabled=no
++    fi
  
++    # Check whether --enable-external-transcoding was given.
++if test "${enable_external_transcoding+set}" = set; then :
++  enableval=$enable_external_transcoding;
++            mt_external_transcoding_option_enabled=$enableval
++            mt_external_transcoding_option_requested=yes
  
 -cat >>confdefs.h <<\_ACEOF
 -#define malloc rpl_malloc
 -_ACEOF
-+$as_echo "#define malloc rpl_malloc" >>confdefs.h
  
  fi
  
  
--
++    EXTERNAL_TRANSCODING_OPTION_ENABLED=${mt_external_transcoding_option_enabled}
++    EXTERNAL_TRANSCODING_OPTION_REQUESTED=${mt_external_transcoding_option_requested}
+ 
 -{ $as_echo "$as_me:$LINENO: checking for working memcmp" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working memcmp" >&5
- $as_echo_n "checking for working memcmp... " >&6; }
+-$as_echo_n "checking for working memcmp... " >&6; }
 -if test "${ac_cv_func_memcmp_working+set}" = set; then
-+if test "${ac_cv_func_memcmp_working+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
+-  $as_echo_n "(cached) " >&6
+-else
 -  if test "$cross_compiling" = yes; then
-+  if test "$cross_compiling" = yes; then :
-   ac_cv_func_memcmp_working=no
- else
+-  ac_cv_func_memcmp_working=no
+-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.  */
- $ac_includes_default
- int
-@@ -15570,44 +9352,17 @@ main ()
-   return 0;
- }
- _ACEOF
+-/* end confdefs.h.  */
+-$ac_includes_default
+-int
+-main ()
+-{
+ 
+-  /* Some versions of memcmp are not 8-bit clean.  */
+-  char c0 = '\100', c1 = '\200', c2 = '\201';
+-  if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
+-    return 1;
+ 
+-  /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
+-     or more and with at least one buffer not starting on a 4-byte boundary.
+-     William Lewis provided this test program.   */
+-  {
+-    char foo[21];
+-    char bar[21];
+-    int i;
+-    for (i = 0; i < 4; i++)
+-      {
+-	char *a = foo + i;
+-	char *b = bar + i;
+-	strcpy (a, "--------01111111");
+-	strcpy (b, "--------10000000");
+-	if (memcmp (a, b, 16) >= 0)
+-	  return 1;
+-      }
+-    return 0;
+-  }
+ 
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -14852,36 +16924,47 @@ index f51d803..459bf70 100755
 -  ac_status=$?
 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
 -  (exit $ac_status); }; }; then
-+if ac_fn_c_try_run "$LINENO"; then :
-   ac_cv_func_memcmp_working=yes
- else
+-  ac_cv_func_memcmp_working=yes
+-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
--
++    if test "x${mt_external_transcoding_option_enabled}" = xyes; then :
+ 
 -( exit $ac_status )
 -ac_cv_func_memcmp_working=no
-+  ac_cv_func_memcmp_working=no
- fi
+-fi
 -rm -rf conftest.dSYM
 -rm -f core *.core core.conftest.* 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
++else
++  EXTERNAL_TRANSCODING_OPTION_ENABLED=disabled
  fi
  
--
- fi
+ 
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_memcmp_working" >&5
- $as_echo "$ac_cv_func_memcmp_working" >&6; }
- test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in
-   *" memcmp.$ac_objext "* ) ;;
-@@ -15616,170 +9371,27 @@ test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in
- esac
+-$as_echo "$ac_cv_func_memcmp_working" >&6; }
+-test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in
+-  *" memcmp.$ac_objext "* ) ;;
+-  *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
+- ;;
+-esac
+ 
++    mt_youtube_option_enabled=
++    mt_youtube_option_requested=no
++    if test "xdisable" = xdisable; then
++        mt_youtube_option_enabled=yes
++    else
++        mt_youtube_option_enabled=no
++    fi
  
++    # Check whether --enable-youtube was given.
++if test "${enable_youtube+set}" = set; then :
++  enableval=$enable_youtube;
++            mt_youtube_option_enabled=$enableval
++            mt_youtube_option_requested=yes
  
--
- for ac_header in stdlib.h
+-for ac_header in stdlib.h
 -do
 -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
@@ -14929,14 +17012,14 @@ index f51d803..459bf70 100755
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	ac_header_compiler=no
--fi
--
+ fi
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 -$as_echo "$ac_header_compiler" >&6; }
--
+ 
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
 -$as_echo_n "checking $ac_header presence... " >&6; }
@@ -14969,14 +17052,16 @@ index f51d803..459bf70 100755
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++    YOUTUBE_OPTION_ENABLED=${mt_youtube_option_enabled}
++    YOUTUBE_OPTION_REQUESTED=${mt_youtube_option_requested}
+ 
 -  ac_header_preproc=no
 -fi
--
+ 
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$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: )
@@ -15011,54 +17096,74 @@ index f51d803..459bf70 100755
 -$as_echo_n "checking for $ac_header... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 -  $as_echo_n "(cached) " >&6
--else
++
++    if test "x${mt_youtube_option_enabled}" = xyes; then :
++
+ else
 -  eval "$as_ac_Header=\$ac_header_preproc"
--fi
++  YOUTUBE_OPTION_ENABLED=disabled
+ fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
--
+ 
 -fi
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+do :
-+  ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
-+if test "x$ac_cv_header_stdlib_h" = x""yes; then :
-   cat >>confdefs.h <<_ACEOF
+-  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-+#define HAVE_STDLIB_H 1
- _ACEOF
+-_ACEOF
++#MT_OPTION([weborama], [disable],
++#          [Weborama service support],
++#          [],[WEBORAMA_OPTION_ENABLED=disabled])
  
- fi
+-fi
  
- done
+-done
  
 -{ $as_echo "$as_me:$LINENO: checking for GNU libc compatible realloc" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible realloc" >&5
- $as_echo_n "checking for GNU libc compatible realloc... " >&6; }
+-$as_echo_n "checking for GNU libc compatible realloc... " >&6; }
 -if test "${ac_cv_func_realloc_0_nonnull+set}" = set; then
-+if test "${ac_cv_func_realloc_0_nonnull+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
+-  $as_echo_n "(cached) " >&6
+-else
 -  if test "$cross_compiling" = yes; then
-+  if test "$cross_compiling" = yes; then :
-   ac_cv_func_realloc_0_nonnull=no
- else
+-  ac_cv_func_realloc_0_nonnull=no
+-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.  */
- #if defined STDC_HEADERS || defined HAVE_STDLIB_H
- # include <stdlib.h>
-@@ -15795,55 +9407,24 @@ return ! realloc (0, 0);
-   return 0;
- }
- _ACEOF
+-/* end confdefs.h.  */
+-#if defined STDC_HEADERS || defined HAVE_STDLIB_H
+-# include <stdlib.h>
+-#else
+-char *realloc ();
+-#endif
++    mt_sqlite_backup_defaults_option_enabled=
++    mt_sqlite_backup_defaults_option_requested=no
++    if test "xenable" = xdisable; then
++        mt_sqlite_backup_defaults_option_enabled=yes
++    else
++        mt_sqlite_backup_defaults_option_enabled=no
++    fi
++
++    # Check whether --enable-sqlite-backup-defaults was given.
++if test "${enable_sqlite_backup_defaults+set}" = set; then :
++  enableval=$enable_sqlite_backup_defaults;
++            mt_sqlite_backup_defaults_option_enabled=$enableval
++            mt_sqlite_backup_defaults_option_requested=yes
+ 
+-int
+-main ()
+-{
+-return ! realloc (0, 0);
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -15081,60 +17186,74 @@ index f51d803..459bf70 100755
 -  ac_status=$?
 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
 -  (exit $ac_status); }; }; then
-+if ac_fn_c_try_run "$LINENO"; then :
-   ac_cv_func_realloc_0_nonnull=yes
- else
+-  ac_cv_func_realloc_0_nonnull=yes
+-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
--
+ 
 -( exit $ac_status )
 -ac_cv_func_realloc_0_nonnull=no
-+  ac_cv_func_realloc_0_nonnull=no
- fi
+-fi
 -rm -rf conftest.dSYM
 -rm -f core *.core core.conftest.* 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
  
--
+ 
++    SQLITE_BACKUP_DEFAULTS_OPTION_ENABLED=${mt_sqlite_backup_defaults_option_enabled}
++    SQLITE_BACKUP_DEFAULTS_OPTION_REQUESTED=${mt_sqlite_backup_defaults_option_requested}
++
++
++
++
++    if test "x${mt_sqlite_backup_defaults_option_enabled}" = xyes; then :
++
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_realloc_0_nonnull" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5
- $as_echo "$ac_cv_func_realloc_0_nonnull" >&6; }
+-$as_echo "$ac_cv_func_realloc_0_nonnull" >&6; }
 -if test $ac_cv_func_realloc_0_nonnull = yes; then
-+if test $ac_cv_func_realloc_0_nonnull = yes; then :
  
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_REALLOC 1
 -_ACEOF
-+$as_echo "#define HAVE_REALLOC 1" >>confdefs.h
  
- else
+-else
 -  cat >>confdefs.h <<\_ACEOF
 -#define HAVE_REALLOC 0
 -_ACEOF
-+  $as_echo "#define HAVE_REALLOC 0" >>confdefs.h
  
-    case " $LIBOBJS " in
-   *" realloc.$ac_objext "* ) ;;
-@@ -15852,158 +9433,16 @@ _ACEOF
- esac
+-   case " $LIBOBJS " in
+-  *" realloc.$ac_objext "* ) ;;
+-  *) LIBOBJS="$LIBOBJS realloc.$ac_objext"
+- ;;
+-esac
++    mt_protocolinfo_extension_option_enabled=
++    mt_protocolinfo_extension_option_requested=no
++    if test "xdisable" = xdisable; then
++        mt_protocolinfo_extension_option_enabled=yes
++    else
++        mt_protocolinfo_extension_option_enabled=no
++    fi
  
++    # Check whether --enable-protocolinfo-extension was given.
++if test "${enable_protocolinfo_extension+set}" = set; then :
++  enableval=$enable_protocolinfo_extension;
++            mt_protocolinfo_extension_option_enabled=$enableval
++            mt_protocolinfo_extension_option_requested=yes
  
 -cat >>confdefs.h <<\_ACEOF
 -#define realloc rpl_realloc
 -_ACEOF
-+$as_echo "#define realloc rpl_realloc" >>confdefs.h
  
  fi
  
  
--
--
--
- for ac_header in sys/select.h sys/socket.h
++    PROTOCOLINFO_EXTENSION_OPTION_ENABLED=${mt_protocolinfo_extension_option_enabled}
++    PROTOCOLINFO_EXTENSION_OPTION_REQUESTED=${mt_protocolinfo_extension_option_requested}
+ 
+ 
+ 
+-for ac_header in sys/select.h sys/socket.h
 -do
 -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
@@ -15182,14 +17301,15 @@ index f51d803..459bf70 100755
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	ac_header_compiler=no
 -fi
--
++    if test "x${mt_protocolinfo_extension_option_enabled}" = xyes; then :
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 -$as_echo "$ac_header_compiler" >&6; }
--
+ 
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
 -$as_echo_n "checking $ac_header presence... " >&6; }
@@ -15222,14 +17342,29 @@ index f51d803..459bf70 100755
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++$as_echo "#define EXTEND_PROTOCOLINFO 1" >>confdefs.h
++
+ 
 -  ac_header_preproc=no
--fi
--
+ fi
+ 
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 -$as_echo "$ac_header_preproc" >&6; }
--
++USE_CURL=1
++CURL_REQUESTED=0
++# Check whether --enable-curl was given.
++if test "${enable_curl+set}" = set; then :
++  enableval=$enable_curl;
++                if test "x$enableval" = xno; then
++                    USE_CURL=0
++                    CURL_REQUESTED=1
++                else
++                    CURL_REQUESTED=1
++                    USE_CURL=1
++                fi
++
+ 
 -# So?  What about this header?
 -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 -  yes:no: )
@@ -15266,50 +17401,88 @@ index f51d803..459bf70 100755
 -  $as_echo_n "(cached) " >&6
 -else
 -  eval "$as_ac_Header=\$ac_header_preproc"
--fi
+ fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
--
--fi
++
++
++
++# Check whether --with-curl-cfg was given.
++if test "${with_curl_cfg+set}" = set; then :
++  withval=$with_curl_cfg;
++                CURL_SEARCH_CONFIG="$withval"
++                { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for curl-config in $withval" >&5
++$as_echo "$as_me: Will search for curl-config in $withval" >&6;}
++
+ 
+ fi
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+do :
-+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
-   cat >>confdefs.h <<_ACEOF
- #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
- _ACEOF
-@@ -16012,19 +9451,15 @@ fi
+-  cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+-_ACEOF
++
++
++
++
++    mt_fseeko_check_option_enabled=
++    mt_fseeko_check_option_requested=no
++    if test "xdisable" = xdisable; then
++        mt_fseeko_check_option_enabled=yes
++    else
++        mt_fseeko_check_option_enabled=no
++    fi
++
++    # Check whether --enable-fseeko-check was given.
++if test "${enable_fseeko_check+set}" = set; then :
++  enableval=$enable_fseeko_check;
++            mt_fseeko_check_option_enabled=$enableval
++            mt_fseeko_check_option_requested=yes
++
  
- done
+ fi
+ 
+-done
  
 -{ $as_echo "$as_me:$LINENO: checking types of arguments for select" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for select" >&5
- $as_echo_n "checking types of arguments for select... " >&6; }
+-$as_echo_n "checking types of arguments for select... " >&6; }
 -if test "${ac_cv_func_select_args+set}" = set; then
-+if test "${ac_cv_func_select_args+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
-   for ac_arg234 in 'fd_set *' 'int *' 'void *'; do
-  for ac_arg1 in 'int' 'size_t' 'unsigned long int' 'unsigned int'; do
-   for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do
+-  $as_echo_n "(cached) " >&6
+-else
+-  for ac_arg234 in 'fd_set *' 'int *' 'void *'; do
+- for ac_arg1 in 'int' 'size_t' 'unsigned long int' 'unsigned int'; do
+-  for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do
 -   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.  */
- $ac_includes_default
- #ifdef HAVE_SYS_SELECT_H
-@@ -16044,32 +9479,9 @@ extern int select ($ac_arg1,
-   return 0;
- }
- _ACEOF
+-/* end confdefs.h.  */
+-$ac_includes_default
+-#ifdef HAVE_SYS_SELECT_H
+-# include <sys/select.h>
+-#endif
+-#ifdef HAVE_SYS_SOCKET_H
+-# include <sys/socket.h>
+-#endif
++    FSEEKO_CHECK_OPTION_ENABLED=${mt_fseeko_check_option_enabled}
++    FSEEKO_CHECK_OPTION_REQUESTED=${mt_fseeko_check_option_requested}
++
++
+ 
+-int
+-main ()
+-{
+-extern int select ($ac_arg1,
+-					    $ac_arg234, $ac_arg234, $ac_arg234,
+-					    $ac_arg5);
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -15328,67 +17501,108 @@ index f51d803..459bf70 100755
 -	 test -z "$ac_c_werror_flag" ||
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
-+if ac_fn_c_try_compile "$LINENO"; then :
-   ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3
+-  ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
--
- fi
--
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-   done
-  done
-@@ -16078,7 +9490,7 @@ done
- : ${ac_cv_func_select_args='int,int *,struct timeval *'}
+ 
++    if test "x${mt_fseeko_check_option_enabled}" = xyes; then :
  
  fi
+ 
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-  done
+- done
+-done
+-# Provide a safe default value.
+-: ${ac_cv_func_select_args='int,int *,struct timeval *'}
++###############################################################################
++# The following block is derived from the configure.ac script from the
++# libupnp-1.3.1 package
++# (C) Copyright 2005-2006 Remi Turboult <r3mi at users.sourceforge.net>
++upnpmaj=0
++upnpmin=4
++upnppatch=1
++
++cat >>confdefs.h <<_ACEOF
++#define UPNP_VERSION_STRING "$PACKAGE_VERSION"
++_ACEOF
+ 
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_select_args" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_select_args" >&5
- $as_echo "$ac_cv_func_select_args" >&6; }
- ac_save_IFS=$IFS; IFS=','
- set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'`
-@@ -16101,29 +9513,25 @@ _ACEOF
+-$as_echo "$ac_cv_func_select_args" >&6; }
+-ac_save_IFS=$IFS; IFS=','
+-set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'`
+-IFS=$ac_save_IFS
+-shift
+ 
+ cat >>confdefs.h <<_ACEOF
+-#define SELECT_TYPE_ARG1 $1
++#define UPNP_VERSION_MAJOR $upnpmaj
+ _ACEOF
+ 
+ 
+ cat >>confdefs.h <<_ACEOF
+-#define SELECT_TYPE_ARG234 ($2)
++#define UPNP_VERSION_MINOR $upnpmin
+ _ACEOF
  
- rm -f conftest*
+ 
+ cat >>confdefs.h <<_ACEOF
+-#define SELECT_TYPE_ARG5 ($3)
++#define UPNP_VERSION_PATCH $upnppatch
+ _ACEOF
+ 
+-rm -f conftest*
++###############################################################################
  
 -{ $as_echo "$as_me:$LINENO: checking whether lstat dereferences a symlink specified with a trailing slash" >&5
 -$as_echo_n "checking whether lstat dereferences a symlink specified with a trailing slash... " >&6; }
 -if test "${ac_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
-+$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
-+if test "${ac_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then :
++ac_ext=cpp
++ac_cpp='$CXXCPP $CPPFLAGS'
++ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
++ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
++ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
++if test -z "$CXX"; then
++  if test -n "$CCC"; then
++    CXX=$CCC
++  else
++    if test -n "$ac_tool_prefix"; then
++  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
++  do
++    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
++set dummy $ac_tool_prefix$ac_prog; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_CXX+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
-   rm -f conftest.sym conftest.file
- echo >conftest.file
- if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
+-  rm -f conftest.sym conftest.file
+-echo >conftest.file
+-if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
 -  if test "$cross_compiling" = yes; then
-+  if test "$cross_compiling" = yes; then :
-   ac_cv_func_lstat_dereferences_slashed_symlink=no
- else
+-  ac_cv_func_lstat_dereferences_slashed_symlink=no
+-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.  */
- $ac_includes_default
- int
- main ()
- {
- struct stat sbuf;
+-/* end confdefs.h.  */
+-$ac_includes_default
+-int
+-main ()
+-{
+-struct stat sbuf;
 -     /* Linux will dereference the symlink and fail.
-+     /* Linux will dereference the symlink and fail, as required by POSIX.
- 	That is better in the sense that it means we will not
- 	have to compile and use the lstat wrapper.  */
-      return lstat ("conftest.sym/", &sbuf) == 0;
-@@ -16131,42 +9539,15 @@ struct stat sbuf;
-   return 0;
- }
- _ACEOF
+-	That is better in the sense that it means we will not
+-	have to compile and use the lstat wrapper.  */
+-     return lstat ("conftest.sym/", &sbuf) == 0;
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -15411,79 +17625,204 @@ index f51d803..459bf70 100755
 -  ac_status=$?
 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
 -  (exit $ac_status); }; }; then
-+if ac_fn_c_try_run "$LINENO"; then :
-   ac_cv_func_lstat_dereferences_slashed_symlink=yes
+-  ac_cv_func_lstat_dereferences_slashed_symlink=yes
++  if test -n "$CXX"; then
++  ac_cv_prog_CXX="$CXX" # Let the user override the test.
  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=.
++    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"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
+ 
 -( exit $ac_status )
 -ac_cv_func_lstat_dereferences_slashed_symlink=no
-+  ac_cv_func_lstat_dereferences_slashed_symlink=no
  fi
 -rm -rf conftest.dSYM
 -rm -f core *.core core.conftest.* 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
- 
 -
+-
++CXX=$ac_cv_prog_CXX
++if test -n "$CXX"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
++$as_echo "$CXX" >&6; }
  else
-   # If the `ln -s' command failed, then we probably don't even
-   # have an lstat function.
-@@ -16175,7 +9556,7 @@ fi
- rm -f conftest.sym conftest.file
+-  # If the `ln -s' command failed, then we probably don't even
+-  # have an lstat function.
+-  ac_cv_func_lstat_dereferences_slashed_symlink=no
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+ fi
+-rm -f conftest.sym conftest.file
  
++
++    test -n "$CXX" && break
++  done
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5
- $as_echo "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; }
+-$as_echo "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; }
++if test -z "$CXX"; then
++  ac_ct_CXX=$CXX
++  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
++do
++  # Extract the first word of "$ac_prog", so it can be a program name with args.
++set dummy $ac_prog; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_ac_ct_CXX+set}" = set; 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.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++    ac_cv_prog_ac_ct_CXX="$ac_prog"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
  
- test $ac_cv_func_lstat_dereferences_slashed_symlink = yes &&
-@@ -16185,7 +9566,7 @@ cat >>confdefs.h <<_ACEOF
- _ACEOF
+-test $ac_cv_func_lstat_dereferences_slashed_symlink = yes &&
++fi
++fi
++ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
++if test -n "$ac_ct_CXX"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
++$as_echo "$ac_ct_CXX" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
  
+-cat >>confdefs.h <<_ACEOF
+-#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
+-_ACEOF
+ 
++  test -n "$ac_ct_CXX" && break
++done
  
 -if test $ac_cv_func_lstat_dereferences_slashed_symlink = no; then
-+if test "x$ac_cv_func_lstat_dereferences_slashed_symlink" = xno; then
-   case " $LIBOBJS " in
-   *" lstat.$ac_objext "* ) ;;
-   *) LIBOBJS="$LIBOBJS lstat.$ac_objext"
-@@ -16194,19 +9575,15 @@ esac
+-  case " $LIBOBJS " in
+-  *" lstat.$ac_objext "* ) ;;
+-  *) LIBOBJS="$LIBOBJS lstat.$ac_objext"
+- ;;
++  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.
++$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=$?
++  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:$LINENO: checking whether stat accepts an empty string" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat accepts an empty string" >&5
- $as_echo_n "checking whether stat accepts an empty string... " >&6; }
+-$as_echo_n "checking whether stat accepts an empty string... " >&6; }
 -if test "${ac_cv_func_stat_empty_string_bug+set}" = set; then
-+if test "${ac_cv_func_stat_empty_string_bug+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
+-  $as_echo_n "(cached) " >&6
+-else
 -  if test "$cross_compiling" = yes; then
-+  if test "$cross_compiling" = yes; then :
-   ac_cv_func_stat_empty_string_bug=yes
- else
+-  ac_cv_func_stat_empty_string_bug=yes
+-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
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
- $ac_includes_default
+-$ac_includes_default
++
  int
-@@ -16218,44 +9595,17 @@ struct stat sbuf;
+ main ()
+ {
+-struct stat sbuf;
+-  return stat ("", &sbuf) == 0;
++
+   ;
    return 0;
  }
  _ACEOF
 -rm -f conftest$ac_exeext
 -if { (ac_try="$ac_link"
--case "(($ac_try" in
--  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
--  *) ac_try_echo=$ac_try;;
--esac
++ac_clean_files_save=$ac_clean_files
++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.
++{ $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:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
 -  (eval "$ac_link") 2>&5
@@ -15497,128 +17836,283 @@ index f51d803..459bf70 100755
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
 -  (eval "$ac_try") 2>&5
--  ac_status=$?
++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:$LINENO: \$? = $ac_status" >&5
 -  (exit $ac_status); }; }; then
-+if ac_fn_c_try_run "$LINENO"; then :
-   ac_cv_func_stat_empty_string_bug=no
+-  ac_cv_func_stat_empty_string_bug=no
++  $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 | *.map | *.inf | *.dSYM | *.o | *.obj )
++	;;
++    [ab].out )
++	# We found the default executable, but exeext='' is most
++	# certainly right.
++	break;;
++    *.* )
++	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
++	then :; else
++	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
++	fi
++	# We set ac_cv_exeext here because the later test for it is not
++	# safe: cross compilers may not add the suffix if given an `-o'
++	# argument, so we may need to know it at that point already.
++	# Even if this section looks crufty: it has the advantage of
++	# actually working.
++	break;;
++    * )
++	break;;
++  esac
++done
++test "$ac_cv_exeext" = no && ac_cv_exeext=
++
  else
 -  $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
--
++  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
+ 
 -( exit $ac_status )
 -ac_cv_func_stat_empty_string_bug=yes
-+  ac_cv_func_stat_empty_string_bug=yes
- fi
+-fi
 -rm -rf conftest.dSYM
 -rm -f core *.core core.conftest.* 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
+-
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_stat_empty_string_bug" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_stat_empty_string_bug" >&5
- $as_echo "$ac_cv_func_stat_empty_string_bug" >&6; }
- if test $ac_cv_func_stat_empty_string_bug = yes; then
-   case " $LIBOBJS " in
-@@ -16271,19 +9621,15 @@ _ACEOF
- 
+-$as_echo "$ac_cv_func_stat_empty_string_bug" >&6; }
+-if test $ac_cv_func_stat_empty_string_bug = yes; then
+-  case " $LIBOBJS " in
+-  *" stat.$ac_objext "* ) ;;
+-  *) LIBOBJS="$LIBOBJS stat.$ac_objext"
+- ;;
+-esac
+-
+-
+-cat >>confdefs.h <<_ACEOF
+-#define HAVE_STAT_EMPTY_STRING_BUG 1
+-_ACEOF
+-
++{ { $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
  
 -{ $as_echo "$as_me:$LINENO: checking for working strtod" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strtod" >&5
- $as_echo_n "checking for working strtod... " >&6; }
+-$as_echo_n "checking for working strtod... " >&6; }
 -if test "${ac_cv_func_strtod+set}" = set; then
-+if test "${ac_cv_func_strtod+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
+-  $as_echo_n "(cached) " >&6
+-else
 -  if test "$cross_compiling" = yes; then
-+  if test "$cross_compiling" = yes; then :
-   ac_cv_func_strtod=no
+-  ac_cv_func_strtod=no
++rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
++ac_clean_files=$ac_clean_files_save
++{ $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=$?
++  $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
++# `rm'.
++for ac_file in conftest.exe conftest conftest.*; do
++  test -f "$ac_file" || continue
++  case $ac_file in
++    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
++    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
++	  break;;
++    * ) break;;
++  esac
++done
  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.  */
+-/* end confdefs.h.  */
++  { { $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; }
  
- $ac_includes_default
-@@ -16316,44 +9662,17 @@ main()
- }
+-$ac_includes_default
+-#ifndef strtod
+-double strtod ();
+-#endif
++rm -f conftest.$ac_ext
++EXEEXT=$ac_cv_exeext
++ac_exeext=$EXEEXT
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <stdio.h>
+ int
+-main()
++main ()
+ {
+-  {
+-    /* Some versions of Linux strtod mis-parse strings with leading '+'.  */
+-    char *string = " +69";
+-    char *term;
+-    double value;
+-    value = strtod (string, &term);
+-    if (value != 69 || term != (string + 4))
+-      return 1;
+-  }
++FILE *f = fopen ("conftest.out", "w");
++ return ferror (f) || fclose (f) != 0;
  
+-  {
+-    /* Under Solaris 2.4, strtod returns the wrong value for the
+-       terminating character under some conditions.  */
+-    char *string = "NaN";
+-    char *term;
+-    strtod (string, &term);
+-    if (term != string && *(term - 1) == 0)
+-      return 1;
+-  }
++  ;
+   return 0;
+ }
+-
  _ACEOF
 -rm -f conftest$ac_exeext
 -if { (ac_try="$ac_link"
--case "(($ac_try" in
--  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
--  *) ac_try_echo=$ac_try;;
--esac
++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:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
--  (eval "$ac_link") 2>&5
--  ac_status=$?
++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:$LINENO: \$? = $ac_status" >&5
 -  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
 -  { (case "(($ac_try" in
--  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
--  *) ac_try_echo=$ac_try;;
--esac
++  $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:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
--  (eval "$ac_try") 2>&5
--  ac_status=$?
++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:$LINENO: \$? = $ac_status" >&5
 -  (exit $ac_status); }; }; then
-+if ac_fn_c_try_run "$LINENO"; then :
-   ac_cv_func_strtod=yes
- else
+-  ac_cv_func_strtod=yes
+-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
 -
 -( exit $ac_status )
 -ac_cv_func_strtod=no
-+  ac_cv_func_strtod=no
- fi
+-fi
 -rm -rf conftest.dSYM
 -rm -f core *.core core.conftest.* 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
 -
+-
++  $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:$LINENO: result: $ac_cv_func_strtod" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strtod" >&5
- $as_echo "$ac_cv_func_strtod" >&6; }
- if test $ac_cv_func_strtod = no; then
-   case " $LIBOBJS " in
-@@ -16362,105 +9681,20 @@ if test $ac_cv_func_strtod = no; then
-  ;;
- esac
+-$as_echo "$ac_cv_func_strtod" >&6; }
+-if test $ac_cv_func_strtod = no; then
+-  case " $LIBOBJS " in
+-  *" strtod.$ac_objext "* ) ;;
+-  *) LIBOBJS="$LIBOBJS strtod.$ac_objext"
+- ;;
+-esac
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
++$as_echo "$cross_compiling" >&6; }
  
 -{ $as_echo "$as_me:$LINENO: checking for pow" >&5
 -$as_echo_n "checking for pow... " >&6; }
 -if test "${ac_cv_func_pow+set}" = set; then
--  $as_echo_n "(cached) " >&6
--else
++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 test "${ac_cv_objext+set}" = set; 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
--/* end confdefs.h.  */
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
 -/* Define pow to an innocuous variant, in case <limits.h> declares pow.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define pow innocuous_pow
-+ac_fn_c_check_func "$LINENO" "pow" "ac_cv_func_pow"
-+if test "x$ac_cv_func_pow" = x""yes; then :
- 
+-
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char pow (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
@@ -15645,25 +18139,31 @@ index f51d803..459bf70 100755
 -#if defined __stub_pow || defined __stub___pow
 -choke me
 -#endif
--
--int
--main ()
--{
+ 
+ int
+ main ()
+ {
 -return pow ();
--  ;
--  return 0;
--}
--_ACEOF
++
+   ;
+   return 0;
+ }
+ _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
--case "(($ac_try" in
--  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
--  *) ac_try_echo=$ac_try;;
--esac
++rm -f conftest.o conftest.obj
++if { { ac_try="$ac_compile"
+ case "(($ac_try" in
+   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+   *) ac_try_echo=$ac_try;;
+ esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
 -  (eval "$ac_link") 2>conftest.er1
--  ac_status=$?
++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=$?
 -  grep -v '^ *+' conftest.er1 >conftest.err
 -  rm -f conftest.er1
 -  cat conftest.err >&5
@@ -15676,40 +18176,74 @@ index f51d803..459bf70 100755
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  ac_cv_func_pow=yes
--else
--  $as_echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
--
++  $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 | *.map | *.inf | *.dSYM ) ;;
++    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
++       break;;
++  esac
++done
+ else
+   $as_echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+ 
 -	ac_cv_func_pow=no
--fi
++{ { $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 -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
++rm -f conftest.$ac_cv_objext conftest.$ac_ext
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_pow" >&5
 -$as_echo "$ac_cv_func_pow" >&6; }
- 
- if test $ac_cv_func_pow = no; then
+-
+-if test $ac_cv_func_pow = no; then
 -  { $as_echo "$as_me:$LINENO: checking for pow in -lm" >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pow in -lm" >&5
- $as_echo_n "checking for pow in -lm... " >&6; }
+-$as_echo_n "checking for pow in -lm... " >&6; }
 -if test "${ac_cv_lib_m_pow+set}" = set; then
-+if test "${ac_cv_lib_m_pow+set}" = set; then :
++{ $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
++{ $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 test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
-   ac_check_lib_save_LIBS=$LIBS
- LIBS="-lm  $LIBS"
+-  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
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
- /* Override any GCC internal prototype to avoid an error.
-@@ -16478,46 +9712,21 @@ return pow ();
+-/* 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 pow ();
+ int
+ main ()
+ {
+-return pow ();
++#ifndef __GNUC__
++       choke me
++#endif
++
+   ;
    return 0;
  }
  _ACEOF
@@ -15734,48 +18268,56 @@ index f51d803..459bf70 100755
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
-+if ac_fn_c_try_link "$LINENO"; then :
-   ac_cv_lib_m_pow=yes
+-  ac_cv_lib_m_pow=yes
++if ac_fn_cxx_try_compile "$LINENO"; then :
++  ac_compiler_gnu=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_lib_m_pow=no
-+  ac_cv_lib_m_pow=no
++  ac_compiler_gnu=no
  fi
--
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      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
+-LIBS=$ac_check_lib_save_LIBS
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_m_pow" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_pow" >&5
- $as_echo "$ac_cv_lib_m_pow" >&6; }
+-$as_echo "$ac_cv_lib_m_pow" >&6; }
 -if test "x$ac_cv_lib_m_pow" = x""yes; then
-+if test "x$ac_cv_lib_m_pow" = x""yes; then :
-   POW_LIB=-lm
+-  POW_LIB=-lm
++{ $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
 -  { $as_echo "$as_me:$LINENO: WARNING: cannot find library containing definition of pow" >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find library containing definition of pow" >&5
- $as_echo "$as_me: WARNING: cannot find library containing definition of pow" >&2;}
- fi
- 
-@@ -16525,194 +9734,18 @@ fi
- 
+-$as_echo "$as_me: WARNING: cannot find library containing definition of pow" >&2;}
+-fi
+-
+-fi
+-
++  GXX=
  fi
- 
 -
- for ac_func in vprintf
+-
+-for ac_func in vprintf
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
--  $as_echo_n "(cached) " >&6
--else
++ac_test_CXXFLAGS=${CXXFLAGS+set}
++ac_save_CXXFLAGS=$CXXFLAGS
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
++$as_echo_n "checking whether $CXX accepts -g... " >&6; }
++if test "${ac_cv_prog_cxx_g+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
@@ -15846,10 +18388,19 @@ index f51d803..459bf70 100755
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++  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.  */
+ 
 -	eval "$as_ac_var=no"
 -fi
--
++int
++main ()
++{
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
@@ -15861,25 +18412,28 @@ index f51d803..459bf70 100755
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+do :
-+  ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf"
-+if test "x$ac_cv_func_vprintf" = x""yes; then :
-   cat >>confdefs.h <<_ACEOF
+-  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+#define HAVE_VPRINTF 1
++  ;
++  return 0;
++}
  _ACEOF
- 
+-
 -{ $as_echo "$as_me:$LINENO: checking for _doprnt" >&5
 -$as_echo_n "checking for _doprnt... " >&6; }
 -if test "${ac_cv_func__doprnt+set}" = set; then
 -  $as_echo_n "(cached) " >&6
--else
++if ac_fn_cxx_try_compile "$LINENO"; then :
++  ac_cv_prog_cxx_g=yes
+ else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++  CXXFLAGS=""
++      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
 -/* Define _doprnt to an innocuous variant, in case <limits.h> declares _doprnt.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define _doprnt innocuous__doprnt
@@ -15888,15 +18442,23 @@ index f51d803..459bf70 100755
 -    which can conflict with char _doprnt (); 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
--
++int
++main ()
++{
+ 
 -#undef _doprnt
--
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_cxx_try_compile "$LINENO"; then :
+ 
 -/* 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.  */
@@ -15910,15 +18472,21 @@ index f51d803..459bf70 100755
 -#if defined __stub__doprnt || defined __stub____doprnt
 -choke me
 -#endif
--
--int
--main ()
--{
++else
++  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
++	 CXXFLAGS="-g"
++	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
+ 
+ int
+ main ()
+ {
 -return _doprnt ();
--  ;
--  return 0;
--}
--_ACEOF
++
+   ;
+   return 0;
+ }
+ _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -15941,39 +18509,125 @@ index f51d803..459bf70 100755
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  ac_cv_func__doprnt=yes
--else
++if ac_fn_cxx_try_compile "$LINENO"; then :
++  ac_cv_prog_cxx_g=yes
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
++fi
++{ $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
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_func__doprnt=no
--fi
-+ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt"
-+if test "x$ac_cv_func__doprnt" = x""yes; then :
++  if test "$GXX" = yes; then
++    CXXFLAGS="-O2"
++  else
++    CXXFLAGS=
++  fi
+ fi
++ac_ext=c
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
++ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
++ac_compiler_gnu=$ac_cv_c_compiler_gnu
++DEPDIR="${am__leading_dot}deps"
++
++ac_config_commands="$ac_config_commands depfiles"
++
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
--fi
++am_make=${MAKE-make}
++cat > confinc << 'END'
++am__doit:
++	@echo this is the am__doit target
++.PHONY: am__doit
++END
++# If we don't find an include directive, just comment out the code.
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
++$as_echo_n "checking for style of include used by $am_make... " >&6; }
++am__include="#"
++am__quote=
++_am_result=none
++# First try GNU make style include.
++echo "include confinc" > confmf
++# Ignore all kinds of additional output from `make'.
++case `$am_make -s -f confmf 2> /dev/null` in #(
++*the\ am__doit\ target*)
++  am__include=include
++  am__quote=
++  _am_result=GNU
++  ;;
++esac
++# Now try BSD make style include.
++if test "$am__include" = "#"; then
++   echo '.include "confinc"' > confmf
++   case `$am_make -s -f confmf 2> /dev/null` in #(
++   *the\ am__doit\ target*)
++     am__include=.include
++     am__quote="\""
++     _am_result=BSD
++     ;;
++   esac
+ fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5
 -$as_echo "$ac_cv_func__doprnt" >&6; }
 -if test "x$ac_cv_func__doprnt" = x""yes; then
--
+ 
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_DOPRNT 1
 -_ACEOF
-+$as_echo "#define HAVE_DOPRNT 1" >>confdefs.h
  
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
++$as_echo "$_am_result" >&6; }
++rm -f confinc confmf
++
++# Check whether --enable-dependency-tracking was given.
++if test "${enable_dependency_tracking+set}" = set; then :
++  enableval=$enable_dependency_tracking;
  fi
  
-@@ -16720,189 +9753,37 @@ fi
- done
++if test "x$enable_dependency_tracking" != xno; then
++  am_depcomp="$ac_aux_dir/depcomp"
++  AMDEPBACKSLASH='\'
+ fi
+-done
++ if test "x$enable_dependency_tracking" != xno; then
++  AMDEP_TRUE=
++  AMDEP_FALSE='#'
++else
++  AMDEP_TRUE='#'
++  AMDEP_FALSE=
++fi
++
++
  
++depcc="$CXX"  am_compiler_list=
  
 -{ $as_echo "$as_me:$LINENO: checking whether strerror_r is declared" >&5
 -$as_echo_n "checking whether strerror_r is declared... " >&6; }
 -if test "${ac_cv_have_decl_strerror_r+set}" = set; then
--  $as_echo_n "(cached) " >&6
--else
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
++$as_echo_n "checking dependency style of $depcc... " >&6; }
++if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
@@ -15987,7 +18641,25 @@ index f51d803..459bf70 100755
 -#ifndef strerror_r
 -  (void) strerror_r;
 -#endif
--
++  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
++  # We make a subdir and do the tests there.  Otherwise we can end up
++  # making bogus files that we don't know about and never remove.  For
++  # instance it was reported that on HP-UX the gcc test will end up
++  # making a dummy file named `D' -- because `-MD' means `put the output
++  # in D'.
++  mkdir conftest.dir
++  # Copy depcomp to subdir because otherwise we won't find it if we're
++  # using a relative directory.
++  cp "$am_depcomp" conftest.dir
++  cd conftest.dir
++  # We will build objects and dependencies in a subdirectory because
++  # it helps to detect inapplicable dependency modes.  For instance
++  # both Tru64's cc and ICC support -MD to output dependencies as a
++  # side effect of compilation, but ICC will put the dependencies in
++  # the current directory while Tru64 will put them in the object
++  # directory.
++  mkdir sub
+ 
 -  ;
 -  return 0;
 -}
@@ -16011,47 +18683,145 @@ index f51d803..459bf70 100755
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_cv_have_decl_strerror_r=yes
-+ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
-+if test "x$ac_cv_have_decl_strerror_r" = x""yes; then :
-+  ac_have_decl=1
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++  am_cv_CXX_dependencies_compiler_type=none
++  if test "$am_compiler_list" = ""; then
++     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
++  fi
++  am__universal=false
++  case " $depcc " in #(
++     *\ -arch\ *\ -arch\ *) am__universal=true ;;
++     esac
++
++  for depmode in $am_compiler_list; do
++    # Setup a source with many dependencies, because some compilers
++    # like to wrap large dependency lists on column 80 (with \), and
++    # we should not choose a depcomp mode which is confused by this.
++    #
++    # We need to recreate these files for each test, as the compiler may
++    # overwrite some of them when testing with obscure command lines.
++    # This happens at least with the AIX C compiler.
++    : > sub/conftest.c
++    for i in 1 2 3 4 5 6; do
++      echo '#include "conftst'$i'.h"' >> sub/conftest.c
++      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
++      # Solaris 8's {/usr,}/bin/sh.
++      touch sub/conftst$i.h
++    done
++    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
++
++    # We check with `-c' and `-o' for the sake of the "dashmstdout"
++    # mode.  It turns out that the SunPro C++ compiler does not properly
++    # handle `-M -o', and we need to detect this.  Also, some Intel
++    # versions had trouble with output in subdirs
++    am__obj=sub/conftest.${OBJEXT-o}
++    am__minus_obj="-o $am__obj"
++    case $depmode in
++    gcc)
++      # This depmode causes a compiler race in universal mode.
++      test "$am__universal" = false || continue
++      ;;
++    nosideeffect)
++      # after this tag, mechanisms are not by side-effect, so they'll
++      # only be used when explicitly requested
++      if test "x$enable_dependency_tracking" = xyes; then
++	continue
++      else
++	break
++      fi
++      ;;
++    msvisualcpp | msvcmsys)
++      # This compiler won't grok `-c -o', but also, the minuso test has
++      # not run yet.  These depmodes are late enough in the game, and
++      # so weak that their functioning should not be impacted.
++      am__obj=conftest.${OBJEXT-o}
++      am__minus_obj=
++      ;;
++    none) break ;;
++    esac
++    if depmode=$depmode \
++       source=sub/conftest.c object=$am__obj \
++       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
++       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
++         >/dev/null 2>conftest.err &&
++       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
++       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
++       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
++       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
++      # icc doesn't choke on unknown options, it will just issue warnings
++      # or remarks (even with -Werror).  So we grep stderr for any message
++      # that says an option was ignored or not supported.
++      # When given -MP, icc 7.0 and 7.1 complain thusly:
++      #   icc: Command line warning: ignoring option '-M'; no argument required
++      # The diagnosis changed in icc 8.0:
++      #   icc: Command line remark: option '-MP' not supported
++      if (grep 'ignoring option' conftest.err ||
++          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
++        am_cv_CXX_dependencies_compiler_type=$depmode
++        break
++      fi
++    fi
++  done
+ 
 -	ac_cv_have_decl_strerror_r=no
-+  ac_have_decl=0
++  cd ..
++  rm -rf conftest.dir
++else
++  am_cv_CXX_dependencies_compiler_type=none
  fi
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--fi
+ fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_strerror_r" >&5
 -$as_echo "$ac_cv_have_decl_strerror_r" >&6; }
 -if test "x$ac_cv_have_decl_strerror_r" = x""yes; then
 -
- cat >>confdefs.h <<_ACEOF
+-cat >>confdefs.h <<_ACEOF
 -#define HAVE_DECL_STRERROR_R 1
-+#define HAVE_DECL_STRERROR_R $ac_have_decl
- _ACEOF
- 
+-_ACEOF
 -
--else
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5
++$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; }
++CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
+ 
++ if
++  test "x$enable_dependency_tracking" != xno \
++  && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
++  am__fastdepCXX_TRUE=
++  am__fastdepCXX_FALSE='#'
+ else
 -  cat >>confdefs.h <<_ACEOF
 -#define HAVE_DECL_STRERROR_R 0
 -_ACEOF
 -
 -
--fi
--
--
++  am__fastdepCXX_TRUE='#'
++  am__fastdepCXX_FALSE=
+ fi
+ 
+ 
 -
- for ac_func in strerror_r
+-for ac_func in strerror_r
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
--  $as_echo_n "(cached) " >&6
--else
++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
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_CC+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
@@ -16119,7 +18889,9 @@ index f51d803..459bf70 100755
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
--else
++  if test -n "$CC"; then
++  ac_cv_prog_CC="$CC" # Let the user override the test.
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
@@ -16137,40 +18909,52 @@ index f51d803..459bf70 100755
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+do :
-+  ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
-+if test "x$ac_cv_func_strerror_r" = x""yes; then :
-   cat >>confdefs.h <<_ACEOF
+-  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+#define HAVE_STRERROR_R 1
- _ACEOF
- 
- fi
+-_ACEOF
+-
+-fi
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++    ac_cv_prog_CC="${ac_tool_prefix}gcc"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
  done
- 
+-
 -{ $as_echo "$as_me:$LINENO: checking whether strerror_r returns char *" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
- $as_echo_n "checking whether strerror_r returns char *... " >&6; }
+-$as_echo_n "checking whether strerror_r returns char *... " >&6; }
 -if test "${ac_cv_func_strerror_r_char_p+set}" = set; then
-+if test "${ac_cv_func_strerror_r_char_p+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
- 
-     ac_cv_func_strerror_r_char_p=no
-     if test $ac_cv_have_decl_strerror_r = yes; then
+-  $as_echo_n "(cached) " >&6
+-else
+-
+-    ac_cv_func_strerror_r_char_p=no
+-    if test $ac_cv_have_decl_strerror_r = yes; then
 -      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.  */
- $ac_includes_default
- int
-@@ -16918,32 +9799,9 @@ main ()
-   return 0;
- }
- _ACEOF
+-/* end confdefs.h.  */
+-$ac_includes_default
+-int
+-main ()
+-{
+-
+-	  char buf[100];
+-	  char x = *strerror_r (0, buf, sizeof buf);
+-	  char *p = strerror_r (0, buf, sizeof buf);
+-	  return !p || x;
+-
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -16189,39 +18973,43 @@ index f51d803..459bf70 100755
 -	 test -z "$ac_c_werror_flag" ||
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
-+if ac_fn_c_try_compile "$LINENO"; then :
-   ac_cv_func_strerror_r_char_p=yes
+-  ac_cv_func_strerror_r_char_p=yes
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -
- fi
+-fi
 -
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-     else
-       # strerror_r is not declared.  Choose between
-@@ -16952,14 +9810,10 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-       # former has a strerror_r that returns char*, while the latter
-       # has a strerror_r that returns `int'.
-       # This test should segfault on the DEC system.
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-    else
+-      # strerror_r is not declared.  Choose between
+-      # systems that have relatively inaccessible declarations for the
+-      # function.  BeOS and DEC UNIX 4.0 fall in this category, but the
+-      # former has a strerror_r that returns char*, while the latter
+-      # has a strerror_r that returns `int'.
+-      # This test should segfault on the DEC system.
 -      if test "$cross_compiling" = yes; then
-+      if test "$cross_compiling" = yes; then :
-   :
- else
+-  :
+-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.  */
- $ac_includes_default
- 	extern char *strerror_r ();
-@@ -16973,165 +9827,42 @@ char buf[100];
-   return 0;
- }
- _ACEOF
+-/* end confdefs.h.  */
+-$ac_includes_default
+-	extern char *strerror_r ();
+-int
+-main ()
+-{
+-char buf[100];
+-	  char x = *strerror_r (0, buf, sizeof buf);
+-	  return ! isalpha (x);
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -16244,45 +19032,56 @@ index f51d803..459bf70 100755
 -  ac_status=$?
 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
 -  (exit $ac_status); }; }; then
-+if ac_fn_c_try_run "$LINENO"; then :
-   ac_cv_func_strerror_r_char_p=yes
+-  ac_cv_func_strerror_r_char_p=yes
 -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
--
++  done
++IFS=$as_save_IFS
+ 
  fi
 -rm -rf conftest.dSYM
 -rm -f core *.core core.conftest.* 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
+-
++CC=$ac_cv_prog_CC
++if test -n "$CC"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
++$as_echo "$CC" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_strerror_r_char_p" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
- $as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
- if test $ac_cv_func_strerror_r_char_p = yes; then
+-$as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
+-if test $ac_cv_func_strerror_r_char_p = yes; then
  
 -cat >>confdefs.h <<\_ACEOF
 -#define STRERROR_R_CHAR_P 1
 -_ACEOF
-+$as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h
  
  fi
- 
 -
- for ac_func in strftime
+-
+-for ac_func in strftime
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
--  $as_echo_n "(cached) " >&6
--else
++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
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
@@ -16350,17 +19149,33 @@ index f51d803..459bf70 100755
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
--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_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=.
++    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"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
+ 
 -	eval "$as_ac_var=no"
--fi
+ fi
 -
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
--fi
+ fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -16368,38 +19183,70 @@ index f51d803..459bf70 100755
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+do :
-+  ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
-+if test "x$ac_cv_func_strftime" = x""yes; then :
-   cat >>confdefs.h <<_ACEOF
+-  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+#define HAVE_STRFTIME 1
- _ACEOF
+-_ACEOF
++ac_ct_CC=$ac_cv_prog_ac_ct_CC
++if test -n "$ac_ct_CC"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
++$as_echo "$ac_ct_CC" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
  
++  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
-   # strftime is in -lintl on SCO UNIX.
+-  # strftime is in -lintl on SCO UNIX.
 -{ $as_echo "$as_me:$LINENO: checking for strftime in -lintl" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for strftime in -lintl" >&5
- $as_echo_n "checking for strftime in -lintl... " >&6; }
+-$as_echo_n "checking for strftime in -lintl... " >&6; }
 -if test "${ac_cv_lib_intl_strftime+set}" = set; then
-+if test "${ac_cv_lib_intl_strftime+set}" = set; then :
++  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
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_CC+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
-   ac_check_lib_save_LIBS=$LIBS
- LIBS="-lintl  $LIBS"
+-  ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lintl  $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 GCC internal prototype to avoid an error.
-@@ -17149,46 +9880,19 @@ return strftime ();
-   return 0;
- }
- _ACEOF
+-/* end confdefs.h.  */
+-
+-/* Override any GCC internal prototype to avoid an error.
+-   Use char because int might match the return type of a GCC
+-   builtin and then its argument prototype would still apply.  */
+-#ifdef __cplusplus
+-extern "C"
+-#endif
+-char strftime ();
+-int
+-main ()
+-{
+-return strftime ();
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -16421,52 +19268,140 @@ index f51d803..459bf70 100755
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
-+if ac_fn_c_try_link "$LINENO"; then :
-   ac_cv_lib_intl_strftime=yes
+-  ac_cv_lib_intl_strftime=yes
++  if test -n "$CC"; then
++  ac_cv_prog_CC="$CC" # Let the user override the test.
  else
 -  $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=.
++    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"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
+ 
 -	ac_cv_lib_intl_strftime=no
-+  ac_cv_lib_intl_strftime=no
  fi
 -
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      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
+-LIBS=$ac_check_lib_save_LIBS
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_intl_strftime" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_strftime" >&5
- $as_echo "$ac_cv_lib_intl_strftime" >&6; }
+-$as_echo "$ac_cv_lib_intl_strftime" >&6; }
 -if test "x$ac_cv_lib_intl_strftime" = x""yes; then
 -  cat >>confdefs.h <<\_ACEOF
 -#define HAVE_STRFTIME 1
 -_ACEOF
-+if test "x$ac_cv_lib_intl_strftime" = x""yes; then :
-+  $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h
- 
- LIBS="-lintl $LIBS"
+-
+-LIBS="-lintl $LIBS"
++CC=$ac_cv_prog_CC
++if test -n "$CC"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
++$as_echo "$CC" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
  fi
-@@ -17205,547 +9909,75 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
- 
  
++
++  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
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_CC+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test -n "$CC"; then
++  ac_cv_prog_CC="$CC" # Let the user override the test.
++else
++  ac_prog_rejected=no
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_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"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
+ done
++  done
++IFS=$as_save_IFS
  
 -
+-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
+-
 -
 -
 -
 -
- for ac_func in gethostname gettimeofday localtime_r memmove memset
+-
++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
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
++$as_echo "$CC" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
+ 
+ 
+-for ac_func in gethostname gettimeofday localtime_r memmove memset
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
--  $as_echo_n "(cached) " >&6
--else
++fi
++if test -z "$CC"; then
++  if test -n "$ac_tool_prefix"; then
++  for ac_prog in cl.exe
++  do
++    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
++set dummy $ac_tool_prefix$ac_prog; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_CC+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
@@ -16487,9 +19422,36 @@ index f51d803..459bf70 100755
 -#else
 -# include <assert.h>
 -#endif
--
++  if test -n "$CC"; then
++  ac_cv_prog_CC="$CC" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
+ 
 -#undef $ac_func
--
++fi
++fi
++CC=$ac_cv_prog_CC
++if test -n "$CC"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
++$as_echo "$CC" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
+ 
 -/* 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.  */
@@ -16503,7 +19465,7 @@ index f51d803..459bf70 100755
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
--
+ 
 -int
 -main ()
 -{
@@ -16534,17 +19496,47 @@ index f51d803..459bf70 100755
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
--else
++    test -n "$CC" && break
++  done
++fi
++if test -z "$CC"; then
++  ac_ct_CC=$CC
++  for ac_prog in cl.exe
++do
++  # Extract the first word of "$ac_prog", so it can be a program name with args.
++set dummy $ac_prog; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++  if test -n "$ac_ct_CC"; then
++  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++    ac_cv_prog_ac_ct_CC="$ac_prog"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
+ 
 -	eval "$as_ac_var=no"
--fi
+ fi
 -
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
--fi
+ fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -16552,43 +19544,91 @@ index f51d803..459bf70 100755
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+do :
-+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-+ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var"
-+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
-   cat >>confdefs.h <<_ACEOF
- #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
- _ACEOF
- 
+-  cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+-_ACEOF
+-
++ac_ct_CC=$ac_cv_prog_ac_ct_CC
++if test -n "$ac_ct_CC"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
++$as_echo "$ac_ct_CC" >&6; }
  else
 -  { { $as_echo "$as_me:$LINENO: error: required library function not found" >&5
 -$as_echo "$as_me: error: required library function not found" >&2;}
 -   { (exit 1); exit 1; }; }
-+  as_fn_error $? "required library function not found" "$LINENO" 5
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
  fi
- done
+-done
  
--
--
--
--
--
--
--
- for ac_func in regcomp select strcasecmp strchr strdup strerror strncasecmp
+ 
++  test -n "$ac_ct_CC" && break
++done
+ 
++  if test "x$ac_ct_CC" = x; then
++    CC=""
++  else
++    case $cross_compiling:$ac_tool_warned in
++yes:)
++{ $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" && { { $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.
++$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=$?
++  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
+ 
+-for ac_func in regcomp select strcasecmp strchr strdup strerror strncasecmp
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
--  $as_echo_n "(cached) " >&6
--else
++{ $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 test "${ac_cv_c_compiler_gnu+set}" = set; 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
--/* end confdefs.h.  */
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
@@ -16619,15 +19659,19 @@ index f51d803..459bf70 100755
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
--
--int
--main ()
--{
+ 
+ int
+ main ()
+ {
 -return $ac_func ();
--  ;
--  return 0;
--}
--_ACEOF
++#ifndef __GNUC__
++       choke me
++#endif
++
+   ;
+   return 0;
+ }
+ _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -16650,17 +19694,22 @@ index f51d803..459bf70 100755
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
--else
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_compiler_gnu=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	eval "$as_ac_var=no"
--fi
--
++  ac_compiler_gnu=no
+ fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++ac_cv_c_compiler_gnu=$ac_compiler_gnu
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
--fi
+ fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -16668,41 +19717,51 @@ index f51d803..459bf70 100755
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+do :
-+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-+ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var"
-+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
-   cat >>confdefs.h <<_ACEOF
- #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
- _ACEOF
- 
+-  cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+-_ACEOF
+-
++{ $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
 -  { { $as_echo "$as_me:$LINENO: error: required library function not found" >&5
 -$as_echo "$as_me: error: required library function not found" >&2;}
 -   { (exit 1); exit 1; }; }
-+  as_fn_error $? "required library function not found" "$LINENO" 5
++  GCC=
  fi
- done
- 
+-done
+-
 -
 -
 -
 -
 -
- for ac_func in strrchr strstr strtol strtoul uname
+-for ac_func in strrchr strstr strtol strtoul uname
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
--  $as_echo_n "(cached) " >&6
--else
++ac_test_CFLAGS=${CFLAGS+set}
++ac_save_CFLAGS=$CFLAGS
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
++$as_echo_n "checking whether $CC accepts -g... " >&6; }
++if test "${ac_cv_prog_cc_g+set}" = set; 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
--/* end confdefs.h.  */
++  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.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
@@ -16733,15 +19792,16 @@ index f51d803..459bf70 100755
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
--
--int
--main ()
--{
+ 
+ int
+ main ()
+ {
 -return $ac_func ();
--  ;
--  return 0;
--}
--_ACEOF
++
+   ;
+   return 0;
+ }
+ _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -16764,13 +19824,21 @@ index f51d803..459bf70 100755
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
--else
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_cv_prog_cc_g=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++  CFLAGS=""
++      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
+ 
 -	eval "$as_ac_var=no"
 -fi
--
++int
++main ()
++{
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
@@ -16782,26 +19850,25 @@ index f51d803..459bf70 100755
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+do :
-+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-+ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var"
-+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
-   cat >>confdefs.h <<_ACEOF
- #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+-  cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++  ;
++  return 0;
++}
  _ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
  
  else
 -  { { $as_echo "$as_me:$LINENO: error: required library function not found" >&5
 -$as_echo "$as_me: error: required library function not found" >&2;}
 -   { (exit 1); exit 1; }; }
-+  as_fn_error $? "required library function not found" "$LINENO" 5
- fi
- done
- 
- 
+-fi
+-done
+-
+-
 -
 -
- for ac_func in sigaction sigprocmask
+-for ac_func in sigaction sigprocmask
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -16814,7 +19881,10 @@ index f51d803..459bf70 100755
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++  ac_c_werror_flag=$ac_save_c_werror_flag
++	 CFLAGS="-g"
++	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
@@ -16845,15 +19915,16 @@ index f51d803..459bf70 100755
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
--
--int
--main ()
--{
+ 
+ int
+ main ()
+ {
 -return $ac_func ();
--  ;
--  return 0;
--}
--_ACEOF
++
+   ;
+   return 0;
+ }
+ _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -16881,12 +19952,15 @@ index f51d803..459bf70 100755
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	eval "$as_ac_var=no"
--fi
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_cv_prog_cc_g=yes
+ fi
 -
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
--fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -16894,40 +19968,62 @@ index f51d803..459bf70 100755
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+do :
-+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-+ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var"
-+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
-   cat >>confdefs.h <<_ACEOF
- #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
- _ACEOF
- 
- else
+-  cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+-_ACEOF
+-
+-else
 -  { { $as_echo "$as_me:$LINENO: error: required library function not found" >&5
 -$as_echo "$as_me: error: required library function not found" >&2;}
 -   { (exit 1); exit 1; }; }
-+  as_fn_error $? "required library function not found" "$LINENO" 5
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
- done
- 
- 
+-done
 -
 -
 -
- for ac_func in ioctl tolower toupper
+-
+-
+-for ac_func in ioctl tolower toupper
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
--  $as_echo_n "(cached) " >&6
--else
++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
++  if test "$GCC" = yes; then
++    CFLAGS="-g -O2"
++  else
++    CFLAGS="-g"
++  fi
++else
++  if test "$GCC" = yes; then
++    CFLAGS="-O2"
++  else
++    CFLAGS=
++  fi
++fi
++{ $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 test "${ac_cv_prog_cc_c89+set}" = set; 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
--/* end confdefs.h.  */
++  ac_cv_prog_cc_c89=no
++ac_save_CC=$CC
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
@@ -16942,9 +20038,39 @@ index f51d803..459bf70 100755
 -#else
 -# include <assert.h>
 -#endif
--
++#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;
++}
+ 
 -#undef $ac_func
--
++/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
++   function prototypes and stuff, but not '\xHH' hex character constants.
++   These don't provoke an error unfortunately, instead are silently treated
++   as 'x'.  The following induces an error, until -std is added to get
++   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
++   array size at least.  It's necessary to write '\x00'==0 to get something
++   that's true only with -std.  */
++int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+ 
 -/* 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.  */
@@ -16958,15 +20084,26 @@ index f51d803..459bf70 100755
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
--
--int
--main ()
--{
++/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
++   inside strings and character constants.  */
++#define FOO(x) 'x'
++int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+ 
++int test (int i, double x);
++struct s1 {int (*f) (int a);};
++struct s2 {int (*f) (double a);};
++int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
++int argc;
++char **argv;
+ int
+ main ()
+ {
 -return $ac_func ();
--  ;
--  return 0;
--}
--_ACEOF
++return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
+   ;
+   return 0;
+ }
+ _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -16994,12 +20131,23 @@ index f51d803..459bf70 100755
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	eval "$as_ac_var=no"
--fi
--
++for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
++	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
++do
++  CC="$ac_save_CC $ac_arg"
++  if ac_fn_c_try_compile "$LINENO"; then :
++  ac_cv_prog_cc_c89=$ac_arg
+ fi
++rm -f core conftest.err conftest.$ac_objext
++  test "x$ac_cv_prog_cc_c89" != "xno" && break
++done
++rm -f conftest.$ac_ext
++CC=$ac_save_CC
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
--fi
+ fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -17007,74 +20155,235 @@ index f51d803..459bf70 100755
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+do :
-+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-+ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var"
-+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
-   cat >>confdefs.h <<_ACEOF
- #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
- _ACEOF
+-  cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+-_ACEOF
++# 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; } ;;
++  *)
++    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 :
  
- else
+-else
 -  { { $as_echo "$as_me:$LINENO: error: required library function not found" >&5
 -$as_echo "$as_me: error: required library function not found" >&2;}
 -   { (exit 1); exit 1; }; }
-+  as_fn_error $? "required library function not found" "$LINENO" 5
  fi
- done
+-done
  
-@@ -17777,13 +10009,13 @@ _ACEOF
-     case $ac_val in #(
-     *${as_nl}*)
-       case $ac_var in #(
++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
+ 
+-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.
++depcc="$CC"   am_compiler_list=
+ 
+-_ACEOF
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
++$as_echo_n "checking dependency style of $depcc... " >&6; }
++if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
++  # We make a subdir and do the tests there.  Otherwise we can end up
++  # making bogus files that we don't know about and never remove.  For
++  # instance it was reported that on HP-UX the gcc test will end up
++  # making a dummy file named `D' -- because `-MD' means `put the output
++  # in D'.
++  mkdir conftest.dir
++  # Copy depcomp to subdir because otherwise we won't find it if we're
++  # using a relative directory.
++  cp "$am_depcomp" conftest.dir
++  cd conftest.dir
++  # We will build objects and dependencies in a subdirectory because
++  # it helps to detect inapplicable dependency modes.  For instance
++  # both Tru64's cc and ICC support -MD to output dependencies as a
++  # side effect of compilation, but ICC will put the dependencies in
++  # the current directory while Tru64 will put them in the object
++  # directory.
++  mkdir sub
+ 
+-# The following way of writing the cache mishandles newlines in values,
+-# but we know of no workaround that is simple, portable, and efficient.
+-# So, we kill variables containing newlines.
+-# Ultrix sh set writes to stderr and can't be redirected directly,
+-# and sets the high bit in the cache file unless we assign to the vars.
+-(
+-  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+-    eval ac_val=\$$ac_var
+-    case $ac_val in #(
+-    *${as_nl}*)
+-      case $ac_var in #(
 -      *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
-+      *_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= ;; #(
+-$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= ;; #(
 -      *) $as_unset $ac_var ;;
-+      *) { eval $ac_var=; unset $ac_var;} ;;
-       esac ;;
-     esac
-   done
-@@ -17791,8 +10023,8 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
-   (set) 2>&1 |
-     case $as_nl`(ac_space=' '; set) 2>&1` in #(
-     *${as_nl}ac_space=\ *)
+-      esac ;;
+-    esac
+-  done
++  am_cv_CC_dependencies_compiler_type=none
++  if test "$am_compiler_list" = ""; then
++     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
++  fi
++  am__universal=false
++  case " $depcc " in #(
++     *\ -arch\ *\ -arch\ *) am__universal=true ;;
++     esac
+ 
+-  (set) 2>&1 |
+-    case $as_nl`(ac_space=' '; set) 2>&1` in #(
+-    *${as_nl}ac_space=\ *)
 -      # `set' does not quote correctly, so add quotes (double-quote
 -      # substitution turns \\\\ into \\, and sed turns \\ into \).
-+      # `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"
-@@ -17815,129 +10047,34 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
- if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
-   if test -w "$cache_file"; then
-     test "x$cache_file" != "x/dev/null" &&
+-      sed -n \
+-	"s/'/'\\\\''/g;
+-	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+-      ;; #(
+-    *)
+-      # `set' quotes correctly as required by POSIX, so do not add quotes.
+-      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
++  for depmode in $am_compiler_list; do
++    # Setup a source with many dependencies, because some compilers
++    # like to wrap large dependency lists on column 80 (with \), and
++    # we should not choose a depcomp mode which is confused by this.
++    #
++    # We need to recreate these files for each test, as the compiler may
++    # overwrite some of them when testing with obscure command lines.
++    # This happens at least with the AIX C compiler.
++    : > sub/conftest.c
++    for i in 1 2 3 4 5 6; do
++      echo '#include "conftst'$i'.h"' >> sub/conftest.c
++      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
++      # Solaris 8's {/usr,}/bin/sh.
++      touch sub/conftst$i.h
++    done
++    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
++
++    # We check with `-c' and `-o' for the sake of the "dashmstdout"
++    # mode.  It turns out that the SunPro C++ compiler does not properly
++    # handle `-M -o', and we need to detect this.  Also, some Intel
++    # versions had trouble with output in subdirs
++    am__obj=sub/conftest.${OBJEXT-o}
++    am__minus_obj="-o $am__obj"
++    case $depmode in
++    gcc)
++      # This depmode causes a compiler race in universal mode.
++      test "$am__universal" = false || continue
+       ;;
+-    esac |
+-    sort
+-) |
+-  sed '
+-     /^ac_cv_env_/b end
+-     t clear
+-     :clear
+-     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+-     t end
+-     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+-     :end' >>confcache
+-if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+-  if test -w "$cache_file"; then
+-    test "x$cache_file" != "x/dev/null" &&
 -      { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5
-+      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
- $as_echo "$as_me: updating cache $cache_file" >&6;}
-     cat confcache >$cache_file
-   else
+-$as_echo "$as_me: updating cache $cache_file" >&6;}
+-    cat confcache >$cache_file
+-  else
 -    { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
-+    { $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
+-$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+-  fi
++    nosideeffect)
++      # after this tag, mechanisms are not by side-effect, so they'll
++      # only be used when explicitly requested
++      if test "x$enable_dependency_tracking" = xyes; then
++	continue
++      else
++	break
++      fi
++      ;;
++    msvisualcpp | msvcmsys)
++      # This compiler won't grok `-c -o', but also, the minuso test has
++      # not run yet.  These depmodes are late enough in the game, and
++      # so weak that their functioning should not be impacted.
++      am__obj=conftest.${OBJEXT-o}
++      am__minus_obj=
++      ;;
++    none) break ;;
++    esac
++    if depmode=$depmode \
++       source=sub/conftest.c object=$am__obj \
++       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
++       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
++         >/dev/null 2>conftest.err &&
++       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
++       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
++       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
++       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
++      # icc doesn't choke on unknown options, it will just issue warnings
++      # or remarks (even with -Werror).  So we grep stderr for any message
++      # that says an option was ignored or not supported.
++      # When given -MP, icc 7.0 and 7.1 complain thusly:
++      #   icc: Command line warning: ignoring option '-M'; no argument required
++      # The diagnosis changed in icc 8.0:
++      #   icc: Command line remark: option '-MP' not supported
++      if (grep 'ignoring option' conftest.err ||
++          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
++        am_cv_CC_dependencies_compiler_type=$depmode
++        break
++      fi
++    fi
++  done
++
++  cd ..
++  rm -rf conftest.dir
++else
++  am_cv_CC_dependencies_compiler_type=none
  fi
- rm -f confcache
+-rm -f confcache
  
--
- for ac_func in inet_ntoa
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
++$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
++CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+ 
+-for ac_func in inet_ntoa
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
 -  $as_echo_n "(cached) " >&6
--else
++ if
++  test "x$enable_dependency_tracking" != xno \
++  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
++  am__fastdepCC_TRUE=
++  am__fastdepCC_FALSE='#'
+ else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
@@ -17084,20 +20393,58 @@ index f51d803..459bf70 100755
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
--
++  am__fastdepCC_TRUE='#'
++  am__fastdepCC_FALSE=
++fi
+ 
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
--
+ 
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
--
++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
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_RANLIB+set}" = set; then :
++  $as_echo_n "(cached) " >&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 { 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"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
+ 
 -#undef $ac_func
--
++fi
++fi
++RANLIB=$ac_cv_prog_RANLIB
++if test -n "$RANLIB"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
++$as_echo "$RANLIB" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
+ 
 -/* 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.  */
@@ -17111,7 +20458,7 @@ index f51d803..459bf70 100755
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
--
+ 
 -int
 -main ()
 -{
@@ -17142,17 +20489,43 @@ index f51d803..459bf70 100755
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
--else
++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
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++  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 { 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"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
+ 
 -	eval "$as_ac_var=no"
--fi
+ fi
 -
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
--fi
+ fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -17160,38 +20533,93 @@ index f51d803..459bf70 100755
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+do :
-+  ac_fn_cxx_check_func "$LINENO" "inet_ntoa" "ac_cv_func_inet_ntoa"
-+if test "x$ac_cv_func_inet_ntoa" = x""yes; then :
-   cat >>confdefs.h <<_ACEOF
+-  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+#define HAVE_INET_NTOA 1
- _ACEOF
+-_ACEOF
++ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
++if test -n "$ac_ct_RANLIB"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
++$as_echo "$ac_ct_RANLIB" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
  
++  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
+ 
  
--
 -{ $as_echo "$as_me:$LINENO: checking for inet_ntoa in -lnsl" >&5
-+                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_ntoa in -lnsl" >&5
- $as_echo_n "checking for inet_ntoa in -lnsl... " >&6; }
+-$as_echo_n "checking for inet_ntoa in -lnsl... " >&6; }
 -if test "${ac_cv_lib_nsl_inet_ntoa+set}" = set; then
-+if test "${ac_cv_lib_nsl_inet_ntoa+set}" = set; then :
++ac_ext=c
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
++ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
++ac_compiler_gnu=$ac_cv_c_compiler_gnu
++{ $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 :
    $as_echo_n "(cached) " >&6
  else
-   ac_check_lib_save_LIBS=$LIBS
- LIBS="-lnsl  $LIBS"
+-  ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lnsl  $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++      # 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 confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
- 
- /* Override any GCC internal prototype to avoid an error.
-@@ -17955,43 +10092,18 @@ return inet_ntoa ();
-   return 0;
- }
+-
+-/* 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"
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
+ #endif
+-char inet_ntoa ();
+-int
+-main ()
+-{
+-return inet_ntoa ();
+-  ;
+-  return 0;
+-}
++		     Syntax error
  _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -17214,48 +20642,67 @@ index f51d803..459bf70 100755
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
-+if ac_fn_cxx_try_link "$LINENO"; then :
-   ac_cv_lib_nsl_inet_ntoa=yes
- else
+-  ac_cv_lib_nsl_inet_ntoa=yes
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++if ac_fn_c_try_cpp "$LINENO"; then :
+ 
 -	ac_cv_lib_nsl_inet_ntoa=no
-+  ac_cv_lib_nsl_inet_ntoa=no
++else
++  # Broken: fails on valid input.
++continue
  fi
--
++rm -f conftest.err conftest.i conftest.$ac_ext
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      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
+-LIBS=$ac_check_lib_save_LIBS
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_inet_ntoa" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_inet_ntoa" >&5
- $as_echo "$ac_cv_lib_nsl_inet_ntoa" >&6; }
+-$as_echo "$ac_cv_lib_nsl_inet_ntoa" >&6; }
 -if test "x$ac_cv_lib_nsl_inet_ntoa" = x""yes; then
-+if test "x$ac_cv_lib_nsl_inet_ntoa" = x""yes; then :
-   cat >>confdefs.h <<_ACEOF
- #define HAVE_LIBNSL 1
+-  cat >>confdefs.h <<_ACEOF
+-#define HAVE_LIBNSL 1
++  # OK, works on sane cases.  Now check whether nonexistent headers
++  # can be detected and how.
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <ac_nonexistent.h>
  _ACEOF
-@@ -18000,9 +10112,7 @@ _ACEOF
- 
+-
+-  LIBS="-lnsl $LIBS"
+-
++if ac_fn_c_try_cpp "$LINENO"; then :
++  # Broken: success on invalid input.
++continue
  else
- 
+-
 -                                    { { $as_echo "$as_me:$LINENO: error: required library function not found" >&5
 -$as_echo "$as_me: error: required library function not found" >&2;}
 -   { (exit 1); exit 1; }; }
-+                                    as_fn_error $? "required library function not found" "$LINENO" 5
- 
+-
++  # Passes both tests.
++ac_preproc_ok=:
++break
  fi
++rm -f conftest.err conftest.i conftest.$ac_ext
  
-@@ -18011,118 +10121,23 @@ fi
+-
+-fi
  done
++# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
++rm -f conftest.i conftest.err conftest.$ac_ext
++if $ac_preproc_ok; then :
++  break
++fi
  
++    done
++    ac_cv_prog_CPP=$CPP
  
 -
- for ac_func in socket
+-for ac_func in socket
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -17278,12 +20725,33 @@ index f51d803..459bf70 100755
 -    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
--
++fi
++  CPP=$ac_cv_prog_CPP
++else
++  ac_cv_prog_CPP=$CPP
++fi
++{ $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
++  # 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 confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
+ #ifdef __STDC__
+ # include <limits.h>
+ #else
+ # include <assert.h>
+ #endif
++		     Syntax error
++_ACEOF
++if ac_fn_c_try_cpp "$LINENO"; then :
+ 
 -#undef $ac_func
 -
 -/* Override any GCC internal prototype to avoid an error.
@@ -17299,7 +20767,12 @@ index f51d803..459bf70 100755
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
--
++else
++  # Broken: fails on valid input.
++continue
++fi
++rm -f conftest.err conftest.i conftest.$ac_ext
+ 
 -int
 -main ()
 -{
@@ -17307,7 +20780,12 @@ index f51d803..459bf70 100755
 -  ;
 -  return 0;
 -}
--_ACEOF
++  # OK, works on sane cases.  Now check whether nonexistent headers
++  # can be detected and how.
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <ac_nonexistent.h>
+ _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -17330,13 +20808,20 @@ index f51d803..459bf70 100755
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
--else
++if ac_fn_c_try_cpp "$LINENO"; then :
++  # Broken: success on invalid input.
++continue
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	eval "$as_ac_var=no"
--fi
--
++  # Passes both tests.
++ac_preproc_ok=:
++break
+ fi
++rm -f conftest.err conftest.i conftest.$ac_ext
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
@@ -17348,44 +20833,104 @@ index f51d803..459bf70 100755
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+do :
-+  ac_fn_cxx_check_func "$LINENO" "socket" "ac_cv_func_socket"
-+if test "x$ac_cv_func_socket" = x""yes; then :
-   cat >>confdefs.h <<_ACEOF
+-  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+#define HAVE_SOCKET 1
- _ACEOF
+-_ACEOF
++done
++# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
++rm -f conftest.i conftest.err conftest.$ac_ext
++if $ac_preproc_ok; then :
  
  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 $? "C preprocessor \"$CPP\" fails sanity check
++See \`config.log' for more details" "$LINENO" 5 ; }
++fi
+ 
 -{ $as_echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
- $as_echo_n "checking for socket in -lsocket... " >&6; }
+-$as_echo_n "checking for socket in -lsocket... " >&6; }
 -if test "${ac_cv_lib_socket_socket+set}" = set; then
-+if test "${ac_cv_lib_socket_socket+set}" = set; then :
++ac_ext=c
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
++ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
++ac_compiler_gnu=$ac_cv_c_compiler_gnu
++
++
++{ $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 test "${ac_cv_path_GREP+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
-   ac_check_lib_save_LIBS=$LIBS
- LIBS="-lsocket  $LIBS"
+-  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.  */
- 
- /* Override any GCC internal prototype to avoid an error.
-@@ -18140,43 +10155,18 @@ return socket ();
-   return 0;
- }
- _ACEOF
+-/* end confdefs.h.  */
+-
+-/* Override any GCC internal prototype to avoid an error.
+-   Use char because int might match the return type of a GCC
+-   builtin and then its argument prototype would still apply.  */
+-#ifdef __cplusplus
+-extern "C"
+-#endif
+-char socket ();
+-int
+-main ()
+-{
+-return socket ();
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
 -  *) ac_try_echo=$ac_try;;
--esac
++  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
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
 -  (eval "$ac_link") 2>conftest.er1
@@ -17401,61 +20946,176 @@ index f51d803..459bf70 100755
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
-+if ac_fn_cxx_try_link "$LINENO"; then :
-   ac_cv_lib_socket_socket=yes
- else
+-  ac_cv_lib_socket_socket=yes
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	ac_cv_lib_socket_socket=no
-+  ac_cv_lib_socket_socket=no
++      $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
--
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      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
+-LIBS=$ac_check_lib_save_LIBS
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
- $as_echo "$ac_cv_lib_socket_socket" >&6; }
+-$as_echo "$ac_cv_lib_socket_socket" >&6; }
 -if test "x$ac_cv_lib_socket_socket" = x""yes; then
-+if test "x$ac_cv_lib_socket_socket" = x""yes; then :
-   cat >>confdefs.h <<_ACEOF
- #define HAVE_LIBSOCKET 1
- _ACEOF
-@@ -18185,9 +10175,7 @@ _ACEOF
+-  cat >>confdefs.h <<_ACEOF
+-#define HAVE_LIBSOCKET 1
+-_ACEOF
++{ $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"
+ 
+-  LIBS="-lsocket $LIBS"
  
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
++$as_echo_n "checking for egrep... " >&6; }
++if test "${ac_cv_path_EGREP+set}" = set; then :
++  $as_echo_n "(cached) " >&6
  else
++  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
  
 -                                    { { $as_echo "$as_me:$LINENO: error: required library function not found" >&5
 -$as_echo "$as_me: error: required library function not found" >&2;}
 -   { (exit 1); exit 1; }; }
-+                                    as_fn_error $? "required library function not found" "$LINENO" 5
++      $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"
  
+ 
++if test $ac_cv_c_compiler_gnu = yes; then
++    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5
++$as_echo_n "checking whether $CC needs -traditional... " >&6; }
++if test "${ac_cv_prog_gcc_traditional+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++    ac_pattern="Autoconf.*'x'"
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <sgtty.h>
++Autoconf TIOCGETP
++_ACEOF
++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
++  $EGREP "$ac_pattern" >/dev/null 2>&1; then :
++  ac_cv_prog_gcc_traditional=yes
++else
++  ac_cv_prog_gcc_traditional=no
  fi
+-done
+-
++rm -f conftest*
  
-@@ -18198,119 +10186,24 @@ done
  
++  if test $ac_cv_prog_gcc_traditional = no; then
++    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <termio.h>
++Autoconf TCGETA
++_ACEOF
++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
++  $EGREP "$ac_pattern" >/dev/null 2>&1; then :
++  ac_cv_prog_gcc_traditional=yes
++fi
++rm -f conftest*
  
++  fi
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5
++$as_echo "$ac_cv_prog_gcc_traditional" >&6; }
++  if test $ac_cv_prog_gcc_traditional = yes; then
++    CC="$CC -traditional"
++  fi
++fi
  
--
- for ac_func in gethostbyname
+-for ac_func in gethostbyname
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
--  $as_echo_n "(cached) " >&6
--else
++ac_header_dirent=no
++for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
++  as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
++$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
++if eval "test \"\${$as_ac_Header+set}\"" = set; 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
--/* end confdefs.h.  */
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
@@ -17486,15 +21146,19 @@ index f51d803..459bf70 100755
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
--
--int
--main ()
--{
++#include <sys/types.h>
++#include <$ac_hdr>
+ 
+ int
+ main ()
+ {
 -return $ac_func ();
--  ;
--  return 0;
--}
--_ACEOF
++if ((DIR *) 0)
++return 0;
+   ;
+   return 0;
+ }
+ _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -17517,54 +21181,76 @@ index f51d803..459bf70 100755
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
--else
++if ac_fn_c_try_compile "$LINENO"; then :
++  eval "$as_ac_Header=yes"
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	eval "$as_ac_var=no"
--fi
++  eval "$as_ac_Header=no"
+ fi
 -
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
--fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
--$as_echo "$ac_res" >&6; }
++eval ac_res=\$$as_ac_Header
++	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+ $as_echo "$ac_res" >&6; }
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+do :
-+  ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
-+if test "x$ac_cv_func_gethostbyname" = x""yes; then :
++if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
    cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+#define HAVE_GETHOSTBYNAME 1
++#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
  _ACEOF
  
- else
- 
+-else
 -
++ac_header_dirent=$ac_hdr; break
++fi
+ 
 -{ $as_echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
-+                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
- $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
+-$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
 -if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
-+if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then :
++done
++# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
++if test $ac_header_dirent = dirent.h; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
++$as_echo_n "checking for library containing opendir... " >&6; }
++if test "${ac_cv_search_opendir+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
-   ac_check_lib_save_LIBS=$LIBS
- LIBS="-lnsl  $LIBS"
+-  ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lnsl  $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
++  ac_func_search_save_LIBS=$LIBS
 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -18328,43 +10221,18 @@ return gethostbyname ();
+@@ -18319,1091 +6304,944 @@
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-char gethostbyname ();
++char opendir ();
+ int
+ main ()
+ {
+-return gethostbyname ();
++return opendir ();
+   ;
    return 0;
  }
  _ACEOF
@@ -17589,85 +21275,114 @@ index f51d803..459bf70 100755
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
-+if ac_fn_cxx_try_link "$LINENO"; then :
-   ac_cv_lib_nsl_gethostbyname=yes
- else
+-  ac_cv_lib_nsl_gethostbyname=yes
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_lib_nsl_gethostbyname=no
-+  ac_cv_lib_nsl_gethostbyname=no
++for ac_lib in '' dir; do
++  if test -z "$ac_lib"; then
++    ac_res="none required"
++  else
++    ac_res=-l$ac_lib
++    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
++  fi
++  if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_search_opendir=$ac_res
  fi
 -
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
+-LIBS=$ac_check_lib_save_LIBS
 +rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext conftest.$ac_ext
- LIBS=$ac_check_lib_save_LIBS
++    conftest$ac_exeext
++  if test "${ac_cv_search_opendir+set}" = set; then :
++  break
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
- $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
+-$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
 -if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then
-+if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then :
-   cat >>confdefs.h <<_ACEOF
- #define HAVE_LIBNSL 1
- _ACEOF
-@@ -18373,9 +10241,7 @@ _ACEOF
+-  cat >>confdefs.h <<_ACEOF
+-#define HAVE_LIBNSL 1
+-_ACEOF
+-
+-  LIBS="-lnsl $LIBS"
++done
++if test "${ac_cv_search_opendir+set}" = set; then :
  
  else
- 
+-
 -                                    { { $as_echo "$as_me:$LINENO: error: required library function not found" >&5
 -$as_echo "$as_me: error: required library function not found" >&2;}
 -   { (exit 1); exit 1; }; }
-+                                    as_fn_error $? "required library function not found" "$LINENO" 5
- 
+-
++  ac_cv_search_opendir=no
  fi
+-
+-
++rm conftest.$ac_ext
++LIBS=$ac_func_search_save_LIBS
+ fi
+-done
+-
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
++$as_echo "$ac_cv_search_opendir" >&6; }
++ac_res=$ac_cv_search_opendir
++if test "$ac_res" != no; then :
++  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
  
-@@ -18385,10 +10251,10 @@ done
- 
- 
- if test $DARWIN_OS -eq 1 ; then
+-if test $DARWIN_OS -eq 1 ; then
 -        { $as_echo "$as_me:$LINENO: You are running OSX, assuming threadsafe gethostbyname version" >&5
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: You are running OSX, assuming threadsafe gethostbyname version" >&5
- $as_echo "$as_me: You are running OSX, assuming threadsafe gethostbyname version" >&6;}
- elif test $CYGWIN_OS -eq 1; then
+-$as_echo "$as_me: You are running OSX, assuming threadsafe gethostbyname version" >&6;}
+-elif test $CYGWIN_OS -eq 1; then
 -        { $as_echo "$as_me:$LINENO: Your are building under Cygwin, assuming threadsafe gethostbyname implementation" >&5
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: Your are building under Cygwin, assuming threadsafe gethostbyname implementation" >&5
- $as_echo "$as_me: Your are building under Cygwin, assuming threadsafe gethostbyname implementation" >&6;}
+-$as_echo "$as_me: Your are building under Cygwin, assuming threadsafe gethostbyname implementation" >&6;}
  fi
  
-@@ -18397,10 +10263,10 @@ ac_cpp='$CXXCPP $CPPFLAGS'
- ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
- ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
- ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+-ac_ext=cpp
+-ac_cpp='$CXXCPP $CPPFLAGS'
+-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 -{ $as_echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5
-+{ $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; }
- if test -z "$CXXCPP"; then
+-$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
+-if test -z "$CXXCPP"; then
 -  if test "${ac_cv_prog_CXXCPP+set}" = set; then
-+  if test "${ac_cv_prog_CXXCPP+set}" = set; then :
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
++$as_echo_n "checking for library containing opendir... " >&6; }
++if test "${ac_cv_search_opendir+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
-       # Double quotes because CXXCPP needs to be expanded
-@@ -18415,11 +10281,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.
+-      # Double quotes because CXXCPP needs to be expanded
+-    for CXXCPP in "$CXX -E" "/lib/cpp"
+-    do
+-      ac_preproc_ok=false
+-for ac_cxx_preproc_warn_flag in '' yes
+-do
+-  # Use a header file that comes with gcc, so configuring glibc
+-  # with a fresh cross-compiler works.
+-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+-  # <limits.h> exists even on freestanding compilers.
+-  # On the NeXT, cc -E runs the code through the compiler's parser,
+-  # not just through cpp. "Syntax error" is here to catch this case.
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++  ac_func_search_save_LIBS=$LIBS
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
- #ifdef __STDC__
- # include <limits.h>
-@@ -18428,78 +10290,34 @@ cat >>conftest.$ac_ext <<_ACEOF
- #endif
- 		     Syntax error
- _ACEOF
+-#ifdef __STDC__
+-# include <limits.h>
+-#else
+-# include <assert.h>
+-#endif
+-		     Syntax error
+-_ACEOF
 -if { (ac_try="$ac_cpp conftest.$ac_ext"
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -17689,26 +21404,36 @@ index f51d803..459bf70 100755
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+if ac_fn_cxx_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
+-  # Broken: fails on valid input.
+-continue
+-fi
  
-   # OK, works on sane cases.  Now check whether nonexistent headers
-   # can be detected and how.
+-rm -f conftest.err conftest.$ac_ext
+-
+-  # OK, works on sane cases.  Now check whether nonexistent headers
+-  # can be detected and how.
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
- #include <ac_nonexistent.h>
+-/* end confdefs.h.  */
+-#include <ac_nonexistent.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 opendir ();
++int
++main ()
++{
++return opendir ();
++  ;
++  return 0;
++}
  _ACEOF
 -if { (ac_try="$ac_cpp conftest.$ac_ext"
 -case "(($ac_try" in
@@ -17727,56 +21452,73 @@ index f51d803..459bf70 100755
 -	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
 -	 test ! -s conftest.err
 -       }; then
-+if ac_fn_cxx_try_cpp "$LINENO"; then :
-   # Broken: success on invalid input.
- continue
- else
+-  # Broken: success on invalid input.
+-continue
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
-   # Passes both tests.
- ac_preproc_ok=:
- break
+-  # Passes both tests.
+-ac_preproc_ok=:
+-break
++for ac_lib in '' x; do
++  if test -z "$ac_lib"; then
++    ac_res="none required"
++  else
++    ac_res=-l$ac_lib
++    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
++  fi
++  if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_search_opendir=$ac_res
  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.
+-
+-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 :
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext
++  if test "${ac_cv_search_opendir+set}" = set; then :
    break
  fi
++done
++if test "${ac_cv_search_opendir+set}" = set; then :
  
-@@ -18511,7 +10329,7 @@ fi
+-    done
+-    ac_cv_prog_CXXCPP=$CXXCPP
+-
+-fi
+-  CXXCPP=$ac_cv_prog_CXXCPP
  else
-   ac_cv_prog_CXXCPP=$CXXCPP
+-  ac_cv_prog_CXXCPP=$CXXCPP
++  ac_cv_search_opendir=no
  fi
 -{ $as_echo "$as_me:$LINENO: result: $CXXCPP" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
- $as_echo "$CXXCPP" >&6; }
- ac_preproc_ok=false
- for ac_cxx_preproc_warn_flag in '' yes
-@@ -18522,11 +10340,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.
+-$as_echo "$CXXCPP" >&6; }
+-ac_preproc_ok=false
+-for ac_cxx_preproc_warn_flag in '' yes
+-do
+-  # Use a header file that comes with gcc, so configuring glibc
+-  # with a fresh cross-compiler works.
+-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+-  # <limits.h> exists even on freestanding compilers.
+-  # On the NeXT, cc -E runs the code through the compiler's parser,
+-  # not just through cpp. "Syntax error" is here to catch this case.
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
- #ifdef __STDC__
- # include <limits.h>
-@@ -18535,87 +10349,40 @@ cat >>conftest.$ac_ext <<_ACEOF
- #endif
- 		     Syntax error
- _ACEOF
+-/* end confdefs.h.  */
+-#ifdef __STDC__
+-# include <limits.h>
+-#else
+-# include <assert.h>
+-#endif
+-		     Syntax error
+-_ACEOF
 -if { (ac_try="$ac_cpp conftest.$ac_ext"
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -17798,26 +21540,49 @@ index f51d803..459bf70 100755
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+if ac_fn_cxx_try_cpp "$LINENO"; then :
++rm conftest.$ac_ext
++LIBS=$ac_func_search_save_LIBS
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
++$as_echo "$ac_cv_search_opendir" >&6; }
++ac_res=$ac_cv_search_opendir
++if test "$ac_res" != no; then :
++  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
  
-+else
-   # Broken: fails on valid input.
- continue
+-  # Broken: fails on valid input.
+-continue
  fi
--
+ 
 -rm -f conftest.err conftest.$ac_ext
-+rm -f conftest.err conftest.i conftest.$ac_ext
++fi
  
-   # OK, works on sane cases.  Now check whether nonexistent headers
-   # can be detected and how.
+-  # 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
++{ $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 test "${ac_cv_header_stdc+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
 +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
- #include <ac_nonexistent.h>
+-#include <ac_nonexistent.h>
++#include <stdlib.h>
++#include <stdarg.h>
++#include <string.h>
++#include <float.h>
++
++int
++main ()
++{
++
++  ;
++  return 0;
++}
  _ACEOF
 -if { (ac_try="$ac_cpp conftest.$ac_ext"
 -case "(($ac_try" in
@@ -17836,56 +21601,74 @@ index f51d803..459bf70 100755
 -	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
 -	 test ! -s conftest.err
 -       }; then
-+if ac_fn_cxx_try_cpp "$LINENO"; then :
-   # Broken: success on invalid input.
- continue
+-  # Broken: success on invalid input.
+-continue
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_cv_header_stdc=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
-   # Passes both tests.
- ac_preproc_ok=:
- break
+-  # Passes both tests.
+-ac_preproc_ok=:
+-break
++  ac_cv_header_stdc=no
  fi
--
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ 
 -rm -f conftest.err conftest.$ac_ext
-+rm -f conftest.err conftest.i conftest.$ac_ext
++if test $ac_cv_header_stdc = yes; then
++  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
++  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 :
  
- done
- # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+-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
 -  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-+  { { $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: error: in \`$ac_pwd':" >&2;}
 -{ { $as_echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check
 -See \`config.log' for more details." >&5
 -$as_echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check
 -See \`config.log' for more details." >&2;}
 -   { (exit 1); exit 1; }; }; }
-+as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
-+See \`config.log' for more details" "$LINENO" 5 ; }
++  ac_cv_header_stdc=no
  fi
++rm -f conftest*
  
- ac_ext=cpp
-@@ -18625,265 +10392,32 @@ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ex
- ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+-ac_ext=cpp
+-ac_cpp='$CXXCPP $CPPFLAGS'
+-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
++fi
  
++if test $ac_cv_header_stdc = yes; then
++  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <stdlib.h>
  
--
- for ac_func in gethostbyname_r
++_ACEOF
++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
++  $EGREP "free" >/dev/null 2>&1; then :
+ 
+-for ac_func in gethostbyname_r
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
 -  $as_echo_n "(cached) " >&6
--else
+ else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
@@ -17895,42 +21678,109 @@ index f51d803..459bf70 100755
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
--
++  ac_cv_header_stdc=no
++fi
++rm -f conftest*
+ 
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
--
++fi
+ 
 -#ifdef __STDC__
 -# include <limits.h>
--#else
++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 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))
+ #else
 -# include <assert.h>
--#endif
--
++# define ISLOWER(c) \
++		   (('a' <= (c) && (c) <= 'i') \
++		     || ('j' <= (c) && (c) <= 'r') \
++		     || ('s' <= (c) && (c) <= 'z'))
++# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+ #endif
+ 
 -#undef $ac_func
--
++#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
++int
++main ()
++{
++  int i;
++  for (i = 0; i < 256; i++)
++    if (XOR (islower (i), ISLOWER (i))
++	|| toupper (i) != TOUPPER (i))
++      return 2;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_run "$LINENO"; then :
+ 
 -/* 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
++else
++  ac_cv_header_stdc=no
++fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
++fi
++
++fi
++fi
++{ $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
++
++$as_echo "#define STDC_HEADERS 1" >>confdefs.h
++
++fi
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
++$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
++if test "${ac_cv_header_sys_wait_h+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <sys/types.h>
++#include <sys/wait.h>
++#ifndef WEXITSTATUS
++# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
+ #endif
 -char $ac_func ();
 -/* The GNU C library defines this for functions which it implements
 -    to always fail with ENOSYS.  Some functions are actually named
 -    something starting with __ and the normal name is an alias.  */
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
--#endif
--
--int
--main ()
--{
++#ifndef WIFEXITED
++# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
+ #endif
+ 
+ int
+ main ()
+ {
 -return $ac_func ();
--  ;
--  return 0;
--}
--_ACEOF
++  int s;
++  wait (&s);
++  s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
+   ;
+   return 0;
+ }
+ _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -17953,17 +21803,27 @@ index f51d803..459bf70 100755
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
--else
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_cv_header_sys_wait_h=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	eval "$as_ac_var=no"
--fi
--
++  ac_cv_header_sys_wait_h=no
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
++$as_echo "$ac_cv_header_sys_wait_h" >&6; }
++if test $ac_cv_header_sys_wait_h = yes; then
++
++$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
--fi
+ fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -17971,17 +21831,25 @@ index f51d803..459bf70 100755
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
++
++# On IRIX 5.3, sys/types and inttypes.h are conflicting.
++for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
++		  inttypes.h stdint.h unistd.h
 +do :
-+  ac_fn_cxx_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
-+if test "x$ac_cv_func_gethostbyname_r" = x""yes; then :
++  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 `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+#define HAVE_GETHOSTBYNAME_R 1
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
  
- else
+-else
++fi
+ 
++done
  
--
 -for ac_header in lwres/netdb.h
 -do
 -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -17989,13 +21857,17 @@ index f51d803..459bf70 100755
 -  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
 -$as_echo_n "checking for $ac_header... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
--  $as_echo_n "(cached) " >&6
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
++$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
++if test "${ac_cv_header_stdbool_h+set}" = set; then :
+   $as_echo_n "(cached) " >&6
 -fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
--else
+ else
 -  # Is the header compilable?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
 -$as_echo_n "checking $ac_header usability... " >&6; }
@@ -18004,10 +21876,88 @@ index f51d803..459bf70 100755
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
 -$ac_includes_default
 -#include <$ac_header>
--_ACEOF
++
++#include <stdbool.h>
++#ifndef bool
++ "error: bool is not defined"
++#endif
++#ifndef false
++ "error: false is not defined"
++#endif
++#if false
++ "error: false is not 0"
++#endif
++#ifndef true
++ "error: true is not defined"
++#endif
++#if true != 1
++ "error: true is not 1"
++#endif
++#ifndef __bool_true_false_are_defined
++ "error: __bool_true_false_are_defined is not defined"
++#endif
++
++	struct s { _Bool s: 1; _Bool t; } s;
++
++	char a[true == 1 ? 1 : -1];
++	char b[false == 0 ? 1 : -1];
++	char c[__bool_true_false_are_defined == 1 ? 1 : -1];
++	char d[(bool) 0.5 == true ? 1 : -1];
++	bool e = &s;
++	char f[(_Bool) 0.0 == false ? 1 : -1];
++	char g[true];
++	char h[sizeof (_Bool)];
++	char i[sizeof s.t];
++	enum { j = false, k = true, l = false * true, m = true * 256 };
++	/* The following fails for
++	   HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
++	_Bool n[m];
++	char o[sizeof n == m * sizeof n[0] ? 1 : -1];
++	char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
++#	if defined __xlc__ || defined __GNUC__
++	 /* Catch a bug in IBM AIX xlc compiler version 6.0.0.0
++	    reported by James Lemley on 2005-10-05; see
++	    http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html
++	    This test is not quite right, since xlc is allowed to
++	    reject this program, as the initializer for xlcbug is
++	    not one of the forms that C requires support for.
++	    However, doing the test right would require a runtime
++	    test, and that would make cross-compilation harder.
++	    Let us hope that IBM fixes the xlc bug, and also adds
++	    support for this kind of constant expression.  In the
++	    meantime, this test will reject xlc, which is OK, since
++	    our stdbool.h substitute should suffice.  We also test
++	    this with GCC, where it should work, to detect more
++	    quickly whether someone messes up the test in the
++	    future.  */
++	 char digs[] = "0123456789";
++	 int xlcbug = 1 / (&(digs + 5)[-2 + (bool) 1] == &digs[4] ? 1 : -1);
++#	endif
++	/* Catch a bug in an HP-UX C compiler.  See
++	   http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
++	   http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
++	 */
++	_Bool q = true;
++	_Bool *pq = &q;
++
++int
++main ()
++{
++
++	*pq |= q;
++	*pq |= ! q;
++	/* Refer to every declared value, to avoid compiler optimizations.  */
++	return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
++		+ !m + !n + !o + !p + !q + !pq);
++
++  ;
++  return 0;
++}
+ _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -18027,17 +21977,25 @@ index f51d803..459bf70 100755
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_header_compiler=yes
--else
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_cv_header_stdbool_h=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_header_compiler=no
--fi
++  ac_cv_header_stdbool_h=no
+ fi
 -
--rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 -$as_echo "$ac_header_compiler" >&6; }
--
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
++$as_echo "$ac_cv_header_stdbool_h" >&6; }
++ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
++if test "x$ac_cv_type__Bool" = x""yes; then :
+ 
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
 -$as_echo_n "checking $ac_header presence... " >&6; }
@@ -18048,7 +22006,9 @@ index f51d803..459bf70 100755
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -#include <$ac_header>
--_ACEOF
++cat >>confdefs.h <<_ACEOF
++#define HAVE__BOOL 1
+ _ACEOF
 -if { (ac_try="$ac_cpp conftest.$ac_ext"
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -18070,14 +22030,16 @@ index f51d803..459bf70 100755
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -  ac_header_preproc=no
--fi
--
++
+ fi
+ 
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 -$as_echo "$ac_header_preproc" >&6; }
--
++if test $ac_cv_header_stdbool_h = yes; then
+ 
 -# So?  What about this header?
 -case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
 -  yes:no: )
@@ -18119,39 +22081,51 @@ index f51d803..459bf70 100755
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
--
--fi
++$as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
+ 
+ fi
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+            for ac_header in lwres/netdb.h
-+do :
-+  ac_fn_cxx_check_header_mongrel "$LINENO" "lwres/netdb.h" "ac_cv_header_lwres_netdb_h" "$ac_includes_default"
-+if test "x$ac_cv_header_lwres_netdb_h" = x""yes; then :
-   cat >>confdefs.h <<_ACEOF
+-  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-+#define HAVE_LWRES_NETDB_H 1
- _ACEOF
+-_ACEOF
  
 -                    { $as_echo "$as_me:$LINENO: checking for lwres_gethostbyname_r in -llwres" >&5
-+                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwres_gethostbyname_r in -llwres" >&5
- $as_echo_n "checking for lwres_gethostbyname_r in -llwres... " >&6; }
+-$as_echo_n "checking for lwres_gethostbyname_r in -llwres... " >&6; }
 -if test "${ac_cv_lib_lwres_lwres_gethostbyname_r+set}" = set; then
-+if test "${ac_cv_lib_lwres_lwres_gethostbyname_r+set}" = set; then :
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
++$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
++if test "${ac_cv_header_time+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
-   ac_check_lib_save_LIBS=$LIBS
- LIBS="-llwres  $LIBS"
+-  ac_check_lib_save_LIBS=$LIBS
+-LIBS="-llwres  $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
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
++#include <sys/types.h>
++#include <sys/time.h>
++#include <time.h>
  
- /* Override any GCC internal prototype to avoid an error.
-@@ -18901,65 +10435,34 @@ return lwres_gethostbyname_r ();
+-/* 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 lwres_gethostbyname_r ();
+ int
+ main ()
+ {
+-return lwres_gethostbyname_r ();
++if ((struct tm *) 0)
++return 0;
+   ;
    return 0;
  }
  _ACEOF
@@ -18176,75 +22150,127 @@ index f51d803..459bf70 100755
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
-+if ac_fn_cxx_try_link "$LINENO"; then :
-   ac_cv_lib_lwres_lwres_gethostbyname_r=yes
+-  ac_cv_lib_lwres_lwres_gethostbyname_r=yes
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_cv_header_time=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_lib_lwres_lwres_gethostbyname_r=no
-+  ac_cv_lib_lwres_lwres_gethostbyname_r=no
++  ac_cv_header_time=no
  fi
 -
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      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
+-LIBS=$ac_check_lib_save_LIBS
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_lwres_lwres_gethostbyname_r" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lwres_lwres_gethostbyname_r" >&5
- $as_echo "$ac_cv_lib_lwres_lwres_gethostbyname_r" >&6; }
+-$as_echo "$ac_cv_lib_lwres_lwres_gethostbyname_r" >&6; }
 -if test "x$ac_cv_lib_lwres_lwres_gethostbyname_r" = x""yes; then
-+if test "x$ac_cv_lib_lwres_lwres_gethostbyname_r" = x""yes; then :
- 
-                                     LWRES_LIBS="-llwres"
- 
+-
+-                                    LWRES_LIBS="-llwres"
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_LIBLWRES 1
 -_ACEOF
-+$as_echo "#define HAVE_LIBLWRES 1" >>confdefs.h
- 
+-
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
++$as_echo "$ac_cv_header_time" >&6; }
++if test $ac_cv_header_time = yes; then
  
++$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
  
- else
+-else
 -  { { $as_echo "$as_me:$LINENO: error: required library function not found" >&5
 -$as_echo "$as_me: error: required library function not found" >&2;}
 -   { (exit 1); exit 1; }; }
-+  as_fn_error $? "required library function not found" "$LINENO" 5
  fi
  
- 
+-
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
++$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
++if test "${ac_cv_header_stat_broken+set}" = set; then :
++  $as_echo_n "(cached) " >&6
  else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <sys/types.h>
++#include <sys/stat.h>
  
-                     if ((test $DARWIN_OS -eq 0) && (test $CYGWIN_OS -eq 0) && (test $OPENBSD_OS -eq 0)) ; then
+-                    if ((test $DARWIN_OS -eq 0) && (test $CYGWIN_OS -eq 0) && (test $OPENBSD_OS -eq 0)) ; then
 -                        { { $as_echo "$as_me:$LINENO: error: required header not found" >&5
 -$as_echo "$as_me: error: required header not found" >&2;}
 -   { (exit 1); exit 1; }; }
-+                        as_fn_error $? "required header not found" "$LINENO" 5
-                     fi
+-                    fi
++#if defined S_ISBLK && defined S_IFDIR
++extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
++#endif
+ 
+-fi
++#if defined S_ISBLK && defined S_IFCHR
++extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
++#endif
+ 
+-done
++#if defined S_ISLNK && defined S_IFREG
++extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
++#endif
+ 
++#if defined S_ISSOCK && defined S_IFREG
++extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
++#endif
  
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_cv_header_stat_broken=no
++else
++  ac_cv_header_stat_broken=yes
  fi
-@@ -18971,118 +10474,24 @@ fi
- done
+-done
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
++$as_echo "$ac_cv_header_stat_broken" >&6; }
++if test $ac_cv_header_stat_broken = yes; then
  
++$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
  
--
- for ac_func in if_nameindex
++fi
+ 
+-for ac_func in if_nameindex
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
--  $as_echo_n "(cached) " >&6
--else
++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 "x$CC" != xcc; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
++$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
++$as_echo_n "checking whether cc understands -c and -o together... " >&6; }
++fi
++set dummy $CC; ac_cc=`$as_echo "$2" |
++		      sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
++if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\"" = set; 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
--/* end confdefs.h.  */
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
@@ -18275,25 +22301,35 @@ index f51d803..459bf70 100755
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
--
--int
--main ()
--{
+ 
+ int
+ main ()
+ {
 -return $ac_func ();
--  ;
--  return 0;
--}
--_ACEOF
++
+   ;
+   return 0;
+ }
+ _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
--  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
--  *) ac_try_echo=$ac_try;;
--esac
++# Make sure it works both with $CC and with simple cc.
++# We do the test twice because some compilers refuse to overwrite an
++# existing .o file with -o, though they will create one.
++ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
++rm -f conftest2.*
++if { { case "(($ac_try" in
+   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+   *) ac_try_echo=$ac_try;;
+ esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
 -  (eval "$ac_link") 2>conftest.er1
--  ac_status=$?
++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=$?
 -  grep -v '^ *+' conftest.er1 >conftest.err
 -  rm -f conftest.er1
 -  cat conftest.err >&5
@@ -18306,13 +22342,113 @@ index f51d803..459bf70 100755
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
--else
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; } &&
++   test -f conftest2.$ac_objext && { { 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
++  eval ac_cv_prog_cc_${ac_cc}_c_o=yes
++  if test "x$CC" != xcc; then
++    # Test first that cc exists at all.
++    if { ac_try='cc -c conftest.$ac_ext >&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_try") 2>&5
++  ac_status=$?
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; }; }; then
++      ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
++      rm -f conftest2.*
++      if { { 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; } &&
++	 test -f conftest2.$ac_objext && { { 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
++	# cc works too.
++	:
++      else
++	# cc exists but doesn't like -o.
++	eval ac_cv_prog_cc_${ac_cc}_c_o=no
++      fi
++    fi
++  fi
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++  eval ac_cv_prog_cc_${ac_cc}_c_o=no
++fi
++rm -f core conftest*
++
++fi
++if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
++
++fi
++
++# FIXME: we rely on the cache variable name because
++# there is no other way.
++set dummy $CC
++am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
++eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
++if test "$am_t" != yes; then
++   # Losing compiler, so override with the script.
++   # FIXME: It is wrong to rewrite CC.
++   # But if we don't then we get into trouble of one sort or another.
++   # A longer-term fix would be to have automake use am__CC in this case,
++   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
++   CC="$am_aux_dir/compile $CC"
++fi
++
++
++
++for ac_header in time.h syslog.h stddef.h unistd.h arpa/inet.h fcntl.h
++do :
++  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
++ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
++if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
++_ACEOF
+ 
 -	eval "$as_ac_var=no"
--fi
--
++else
++  as_fn_error $? "required header not found" "$LINENO" 5
+ fi
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
@@ -18324,37 +22460,59 @@ index f51d803..459bf70 100755
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
++done
++
++
++for ac_header in limits.h netdb.h netinet/in.h stdlib.h string.h sys/file.h
 +do :
-+  ac_fn_cxx_check_func "$LINENO" "if_nameindex" "ac_cv_func_if_nameindex"
-+if test "x$ac_cv_func_if_nameindex" = x""yes; then :
++  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
++ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
++if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
    cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+#define HAVE_IF_NAMEINDEX 1
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
  
  else
++  as_fn_error $? "required header not found" "$LINENO" 5
++fi
  
 -            { $as_echo "$as_me:$LINENO: checking for if_nameindex in -lnsl" >&5
-+            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for if_nameindex in -lnsl" >&5
- $as_echo_n "checking for if_nameindex in -lnsl... " >&6; }
+-$as_echo_n "checking for if_nameindex in -lnsl... " >&6; }
 -if test "${ac_cv_lib_nsl_if_nameindex+set}" = set; then
-+if test "${ac_cv_lib_nsl_if_nameindex+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
-   ac_check_lib_save_LIBS=$LIBS
- LIBS="-lnsl  $LIBS"
+-  $as_echo_n "(cached) " >&6
+-else
+-  ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lnsl  $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+-/* end confdefs.h.  */
++done
  
- /* Override any GCC internal prototype to avoid an error.
-@@ -19100,43 +10509,18 @@ return if_nameindex ();
-   return 0;
- }
+-/* 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 if_nameindex ();
+-int
+-main ()
+-{
+-return if_nameindex ();
+-  ;
+-  return 0;
+-}
++for ac_header in sys/ioctl.h sys/socket.h sys/time.h sys/types.h sys/wait.h
++do :
++  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
++ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
++if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -18377,48 +22535,90 @@ index f51d803..459bf70 100755
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
-+if ac_fn_cxx_try_link "$LINENO"; then :
-   ac_cv_lib_nsl_if_nameindex=yes
- else
+-  ac_cv_lib_nsl_if_nameindex=yes
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	ac_cv_lib_nsl_if_nameindex=no
-+  ac_cv_lib_nsl_if_nameindex=no
++else
++  as_fn_error $? "required header not found" "$LINENO" 5
  fi
--
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      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
+-LIBS=$ac_check_lib_save_LIBS
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_if_nameindex" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_if_nameindex" >&5
- $as_echo "$ac_cv_lib_nsl_if_nameindex" >&6; }
+-$as_echo "$ac_cv_lib_nsl_if_nameindex" >&6; }
 -if test "x$ac_cv_lib_nsl_if_nameindex" = x""yes; then
-+if test "x$ac_cv_lib_nsl_if_nameindex" = x""yes; then :
++done
  
-                     NSL_LIBS="-lnsl"
+-                    NSL_LIBS="-lnsl"
+ 
++for ac_header in langinfo.h locale.h
++do :
++  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
++ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
++if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
++_ACEOF
  
-@@ -19144,9 +10528,7 @@ if test "x$ac_cv_lib_nsl_if_nameindex" = x""yes; then
  else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Header that is required to retrieve system locale not found" >&5
++$as_echo "$as_me: WARNING: Header that is required to retrieve system locale not found" >&2;}
++fi
  
-                     if test $CYGWIN_OS -eq 0; then
+-                    if test $CYGWIN_OS -eq 0; then
 -                        { { $as_echo "$as_me:$LINENO: error: required library function not found" >&5
 -$as_echo "$as_me: error: required library function not found" >&2;}
 -   { (exit 1); exit 1; }; }
-+                        as_fn_error $? "required library function not found" "$LINENO" 5
-                     fi
+-                    fi
++done
+ 
+ 
++for ac_header in sys/utsname.h
++do :
++  ac_fn_c_check_header_mongrel "$LINENO" "sys/utsname.h" "ac_cv_header_sys_utsname_h" "$ac_includes_default"
++if test "x$ac_cv_header_sys_utsname_h" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_SYS_UTSNAME_H 1
++_ACEOF
++
+ fi
  
++done
++
+ 
++for ac_header in sched.h ctype.h
++do :
++  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
++ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
++if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
++_ACEOF
  
-@@ -19158,119 +10540,24 @@ fi
+ fi
++
  done
  
++for ac_func in sched_getparam sched_setparam sched_get_priority_min sched_get_priority_max
++do :
++  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
++ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
++if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
++
++fi
++done
  
--
- for ac_func in if_freenameindex
+ 
+-for ac_func in if_freenameindex
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -18428,7 +22628,13 @@ index f51d803..459bf70 100755
 -else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
--_ACEOF
++for ac_func in mkdir
++do :
++  ac_fn_c_check_func "$LINENO" "mkdir" "ac_cv_func_mkdir"
++if test "x$ac_cv_func_mkdir" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_MKDIR 1
+ _ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
@@ -18440,15 +22646,19 @@ index f51d803..459bf70 100755
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
--
+ 
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
--
++else
++  as_fn_error $? "required function not found" "$LINENO" 5
++fi
++done
+ 
 -#undef $ac_func
--
+ 
 -/* Override any GCC internal prototype to avoid an error.
 -   Use char because int might match the return type of a GCC
 -   builtin and then its argument prototype would still apply.  */
@@ -18462,7 +22672,14 @@ index f51d803..459bf70 100755
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
--
++for ac_header in getopt.h
++do :
++  ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
++if test "x$ac_cv_header_getopt_h" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_GETOPT_H 1
++_ACEOF
+ 
 -int
 -main ()
 -{
@@ -18470,7 +22687,13 @@ index f51d803..459bf70 100755
 -  ;
 -  return 0;
 -}
--_ACEOF
++            for ac_func in getopt_long
++do :
++  ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
++if test "x$ac_cv_func_getopt_long" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_GETOPT_LONG 1
+ _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -18493,13 +22716,18 @@ index f51d803..459bf70 100755
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
--else
++
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: getopt_long not found - all command line options disabled" >&5
++$as_echo "$as_me: WARNING: getopt_long not found - all command line options disabled" >&2;}
+ 
 -	eval "$as_ac_var=no"
--fi
--
+ fi
++done
++
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
@@ -18511,38 +22739,61 @@ index f51d803..459bf70 100755
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+do :
-+  ac_fn_cxx_check_func "$LINENO" "if_freenameindex" "ac_cv_func_if_freenameindex"
-+if test "x$ac_cv_func_if_freenameindex" = x""yes; then :
-   cat >>confdefs.h <<_ACEOF
+-  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+#define HAVE_IF_FREENAMEINDEX 1
- _ACEOF
+-_ACEOF
  
  else
  
--
++    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: getopt.h not found - all command line options disabled" >&5
++$as_echo "$as_me: WARNING: getopt.h not found - all command line options disabled" >&2;}
+ 
 -{ $as_echo "$as_me:$LINENO: checking for if_freenameindex in -lnsl" >&5
-+            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for if_freenameindex in -lnsl" >&5
- $as_echo_n "checking for if_freenameindex in -lnsl... " >&6; }
+-$as_echo_n "checking for if_freenameindex in -lnsl... " >&6; }
 -if test "${ac_cv_lib_nsl_if_freenameindex+set}" = set; then
-+if test "${ac_cv_lib_nsl_if_freenameindex+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
-   ac_check_lib_save_LIBS=$LIBS
- LIBS="-lnsl  $LIBS"
+-  $as_echo_n "(cached) " >&6
+-else
+-  ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lnsl  $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+-/* end confdefs.h.  */
++fi
++
++done
++
++
++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.
  
- /* Override any GCC internal prototype to avoid an error.
-@@ -19288,43 +10575,18 @@ return if_freenameindex ();
-   return 0;
- }
+-/* 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 if_freenameindex ();
+-int
+-main ()
+-{
+-return if_freenameindex ();
+-  ;
+-  return 0;
+-}
  _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -18565,95 +22816,259 @@ index f51d803..459bf70 100755
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
-+if ac_fn_cxx_try_link "$LINENO"; then :
-   ac_cv_lib_nsl_if_freenameindex=yes
+-  ac_cv_lib_nsl_if_freenameindex=yes
++
++# The following way of writing the cache mishandles newlines in values,
++# but we know of no workaround that is simple, portable, and efficient.
++# So, we kill variables containing newlines.
++# Ultrix sh set writes to stderr and can't be redirected directly,
++# and sets the high bit in the cache file unless we assign to the vars.
++(
++  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
++    eval ac_val=\$$ac_var
++    case $ac_val in #(
++    *${as_nl}*)
++      case $ac_var in #(
++      *_cv_*) { $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 $as_nl`(ac_space=' '; set) 2>&1` in #(
++    *${as_nl}ac_space=\ *)
++      # `set' does not quote correctly, so add quotes: double-quote
++      # substitution turns \\\\ into \\, and sed turns \\ into \.
++      sed -n \
++	"s/'/'\\\\''/g;
++	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
++      ;; #(
++    *)
++      # `set' quotes correctly as required by POSIX, so do not add quotes.
++      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
++      ;;
++    esac |
++    sort
++) |
++  sed '
++     /^ac_cv_env_/b end
++     t clear
++     :clear
++     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
++     t end
++     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
++     :end' >>confcache
++if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
++  if test -w "$cache_file"; then
++    test "x$cache_file" != "x/dev/null" &&
++      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
++$as_echo "$as_me: updating cache $cache_file" >&6;}
++    cat confcache >$cache_file
++  else
++    { $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
++
++
++
++CPPFLAGS_SAVE="$CPPFLAGS"
++CFLAGS_SAVE="$CFLAGS"
++CXXFLAGS_SAVE="$CXXFLAGS"
++LDFLAGS_SAVE="$LDFLAGS"
++
++if test "x$EXTERNAL_TRANSCODING_OPTION_ENABLED" = xyes; then
++    for ac_func in mkfifo
++do :
++  ac_fn_c_check_func "$LINENO" "mkfifo" "ac_cv_func_mkfifo"
++if test "x$ac_cv_func_mkfifo" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_MKFIFO 1
++_ACEOF
++
++
++$as_echo "#define EXTERNAL_TRANSCODING 1" >>confdefs.h
++
++
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	ac_cv_lib_nsl_if_freenameindex=no
-+  ac_cv_lib_nsl_if_freenameindex=no
++           if test "x$EXTERNAL_TRANSCODING_OPTION_REQUESTED" = xyes; then
++               as_fn_error $? "mkfifo is required by the external transcoding feature" "$LINENO" 5
++           else
++               { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: mkfifo is required by the external transcoding feature" >&5
++$as_echo "$as_me: WARNING: mkfifo is required by the external transcoding feature" >&2;}
++               EXTERNAL_TRANSCODING_OPTION_ENABLED=disabled
++
++           fi
++
++
  fi
--
++done
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      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
+-LIBS=$ac_check_lib_save_LIBS
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_if_freenameindex" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_if_freenameindex" >&5
- $as_echo "$ac_cv_lib_nsl_if_freenameindex" >&6; }
+-$as_echo "$ac_cv_lib_nsl_if_freenameindex" >&6; }
 -if test "x$ac_cv_lib_nsl_if_freenameindex" = x""yes; then
-+if test "x$ac_cv_lib_nsl_if_freenameindex" = x""yes; then :
-   cat >>confdefs.h <<_ACEOF
- #define HAVE_LIBNSL 1
- _ACEOF
-@@ -19334,9 +10596,7 @@ _ACEOF
+-  cat >>confdefs.h <<_ACEOF
+-#define HAVE_LIBNSL 1
+-_ACEOF
+ 
+-  LIBS="-lnsl $LIBS"
++ICONV_CXXFLAGS=
++ICONV_LIBS=
++
++if test -n "$ICONV_SEARCH_HEADERS"; then
++as_ac_Header=`$as_echo "ac_cv_header_$ICONV_SEARCH_HEADERS/iconv.h" | $as_tr_sh`
++ac_fn_c_check_header_mongrel "$LINENO" "$ICONV_SEARCH_HEADERS/iconv.h" "$as_ac_Header" "$ac_includes_default"
++if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
++
++            ICONV_CXXFLAGS="-I$ICONV_SEARCH_HEADERS"
+ 
  else
  
-                     if ((test $CYGWIN_OS -eq 0) && (test $OPENBSD_OS -eq 0)); then
+-                    if ((test $CYGWIN_OS -eq 0) && (test $OPENBSD_OS -eq 0)); then
 -                        { { $as_echo "$as_me:$LINENO: error: required library function not found" >&5
 -$as_echo "$as_me: error: required library function not found" >&2;}
 -   { (exit 1); exit 1; }; }
-+                        as_fn_error $? "required library function not found" "$LINENO" 5
-                     fi
+-                    fi
++            as_fn_error $? "iconv.h not found in requested location $ICONV_SEARCH_HEADERS" "$LINENO" 5
  
  
-@@ -19351,14 +10611,10 @@ done
+ fi
+ 
  
- # this is not optional, we need the device and the internal webserver
+ 
+-fi
+-done
++else
++ac_fn_c_check_header_mongrel "$LINENO" "iconv.h" "ac_cv_header_iconv_h" "$ac_includes_default"
++if test "x$ac_cv_header_iconv_h" = x""yes; then :
++  ICONV_OK=yes
++else
+ 
++            unset ac_cv_header_iconv_h
++            ac_fn_c_check_header_mongrel "$LINENO" "/usr/local/include/iconv.h" "ac_cv_header__usr_local_include_iconv_h" "$ac_includes_default"
++if test "x$ac_cv_header__usr_local_include_iconv_h" = x""yes; then :
+ 
++                    ICONV_CXXFLAGS="-I/usr/local/include"
++                    if test -z "$ICONV_SEARCH_LIBS"; then
++                        LDFLAGS="-L/usr/local/lib"
++                    fi
+ 
+-# this is not optional, we need the device and the internal webserver
++else
  
 -cat >>confdefs.h <<\_ACEOF
 -#define UPNP_HAVE_DEVICE 1
 -_ACEOF
-+$as_echo "#define UPNP_HAVE_DEVICE 1" >>confdefs.h
++                    unset ac_cv_header_iconv_h
++                    as_ac_Header=`$as_echo "ac_cv_header_$SEARCH_DIR_HEADERS/iconv.h" | $as_tr_sh`
++ac_fn_c_check_header_mongrel "$LINENO" "$SEARCH_DIR_HEADERS/iconv.h" "$as_ac_Header" "$ac_includes_default"
++if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
  
++                            ICONV_CXXFLAGS="-I$SEARCH_DIR_HEADERS"
++                            if test -z "$ICONV_SEARCH_LIBS"; then
++                                LDFLAGS="-L$SEARCH_DIR_LIBS"
++                            fi
  
 -cat >>confdefs.h <<\_ACEOF
 -#define UPNP_HAVE_WEBSERVER 1
 -_ACEOF
-+$as_echo "#define UPNP_HAVE_WEBSERVER 1" >>confdefs.h
++else
++  as_fn_error $? "required header iconv.h not found on your system" "$LINENO" 5
+ 
++fi
+ 
+ 
+-ADD_PTHREAD_CFLAGS=
  
+-# see acinclude.m4 for the definition of ACX_PTHREAD
+-if test "x$PTHREAD_LIB_OPTION_ENABLED" = xyes; then
  
++fi
+ 
+-    mt_pthread_arg_default=yes
+-    mt_pthread_library_status=yes
  
-@@ -19379,10 +10635,10 @@ if test "x$PTHREAD_LIB_OPTION_ENABLED" = xyes; then
+-    LIBS_SAVE=$LIBS
+-    LDFLAGS_SAVE=$LDFLAGS
+-    CFLAGS_SAVE=$CFLAGS
+-    CXXFLAGS_SAVE=$CXXFLAGS
+-    CPPFLAGS_SAVE=$CPPFLAGS
  
  
- # Check whether --with-pthread-libs was given.
+-# Check whether --with-pthread-libs was given.
 -if test "${with_pthread_libs+set}" = set; then
-+if test "${with_pthread_libs+set}" = set; then :
-   withval=$with_pthread_libs;
-             mt_pthread_search_libs="$withval"
+-  withval=$with_pthread_libs;
+-            mt_pthread_search_libs="$withval"
 -            { $as_echo "$as_me:$LINENO: Will search for pthread libs in $withval" >&5
-+            { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for pthread libs in $withval" >&5
- $as_echo "$as_me: Will search for pthread libs in $withval" >&6;}
+-$as_echo "$as_me: Will search for pthread libs in $withval" >&6;}
++fi
+ 
  
+ fi
  
-@@ -19392,18 +10648,14 @@ fi
-     if test "$mt_pthread_search_libs" ; then
-         unset ac_cv_lib_pthread_pthread_create
-         LDFLAGS="$LDFLAGS -L$mt_pthread_search_libs"
++LIBICONV=0
++if test -n "$ICONV_SEARCH_LIBS"; then
++    if test "x$ICONV_LIB_OPTION_ENABLED" = xno; then
++        LDFLAGS="-L$ICONV_SEARCH_LIBS"
++        ac_fn_c_check_func "$LINENO" "iconv" "ac_cv_func_iconv"
++if test "x$ac_cv_func_iconv" = x""yes; then :
+ 
+-    if test "$mt_pthread_search_libs" ; then
+-        unset ac_cv_lib_pthread_pthread_create
+-        LDFLAGS="$LDFLAGS -L$mt_pthread_search_libs"
 -        { $as_echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
- $as_echo_n "checking for pthread_create in -lpthread... " >&6; }
+-$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
 -if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
-+if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then :
++                ICONV_LIBS="-L$ICONV_SEARCH_LIBS"
++
++else
++
++                LDFLAGS="-L$ICONV_SEARCH_LIBS -liconv"
++                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv in -liconv" >&5
++$as_echo_n "checking for iconv in -liconv... " >&6; }
++if test "${ac_cv_lib_iconv_iconv+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
    ac_check_lib_save_LIBS=$LIBS
- LIBS="-lpthread  $LIBS"
+-LIBS="-lpthread  $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
++LIBS="-liconv  $LIBS"
 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -19421,43 +10673,18 @@ return pthread_create ();
+@@ -19412,85 +7250,41 @@
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-char pthread_create ();
++char iconv ();
+ int
+ main ()
+ {
+-return pthread_create ();
++return iconv ();
+   ;
    return 0;
  }
  _ACEOF
@@ -18678,14 +23093,15 @@ index f51d803..459bf70 100755
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
-+if ac_fn_cxx_try_link "$LINENO"; then :
-   ac_cv_lib_pthread_pthread_create=yes
+-  ac_cv_lib_pthread_pthread_create=yes
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_iconv_iconv=yes
  else
 -  $as_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
++  ac_cv_lib_iconv_iconv=no
  fi
 -
 -rm -rf conftest.dSYM
@@ -18696,51 +23112,66 @@ index f51d803..459bf70 100755
  LIBS=$ac_check_lib_save_LIBS
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5
- $as_echo "$ac_cv_lib_pthread_pthread_create" >&6; }
+-$as_echo "$ac_cv_lib_pthread_pthread_create" >&6; }
 -if test "x$ac_cv_lib_pthread_pthread_create" = x""yes; then
-+if test "x$ac_cv_lib_pthread_pthread_create" = x""yes; then :
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iconv_iconv" >&5
++$as_echo "$ac_cv_lib_iconv_iconv" >&6; }
++if test "x$ac_cv_lib_iconv_iconv" = x""yes; then :
  
-                 mt_pthread_libs="-lpthread"
-                 mt_pthread_ldflags="-L$mt_pthread_search_libs"
-@@ -19466,12 +10693,10 @@ else
+-                mt_pthread_libs="-lpthread"
+-                mt_pthread_ldflags="-L$mt_pthread_search_libs"
++                        ICONV_LIBS="-L$ICONV_SEARCH_LIBS -liconv"
++                        LIBICONV=1
  
-                 mt_pthread_library_status=missing
-                 if test "" = "pass"; then
+ else
+ 
+-                mt_pthread_library_status=missing
+-                if test "" = "pass"; then
 -                    { $as_echo "$as_me:$LINENO: pthread library not found in requested location $mt_pthread_search_libs" >&5
-+                    { $as_echo "$as_me:${as_lineno-$LINENO}: pthread library not found in requested location $mt_pthread_search_libs" >&5
- $as_echo "$as_me: pthread library not found in requested location $mt_pthread_search_libs" >&6;}
-                 else
+-$as_echo "$as_me: pthread library not found in requested location $mt_pthread_search_libs" >&6;}
+-                else
 -                    { { $as_echo "$as_me:$LINENO: error: pthread library not found in requested location $mt_pthread_search_libs" >&5
 -$as_echo "$as_me: error: pthread library not found in requested location $mt_pthread_search_libs" >&2;}
 -   { (exit 1); exit 1; }; }
-+                    as_fn_error $? "pthread library not found in requested location $mt_pthread_search_libs" "$LINENO" 5
-                 fi
- 
- 
-@@ -19479,18 +10704,14 @@ fi
- 
-     else
-         unset ac_cv_lib_pthread_pthread_create
+-                fi
+-
+-
+-fi
+-
+-    else
+-        unset ac_cv_lib_pthread_pthread_create
 -        { $as_echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
- $as_echo_n "checking for pthread_create in -lpthread... " >&6; }
+-$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
 -if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
-+if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then :
++                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libiconv in -liconv" >&5
++$as_echo_n "checking for libiconv in -liconv... " >&6; }
++if test "${ac_cv_lib_iconv_libiconv+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
    ac_check_lib_save_LIBS=$LIBS
- LIBS="-lpthread  $LIBS"
+-LIBS="-lpthread  $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
++LIBS="-liconv  $LIBS"
 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -19508,43 +10729,18 @@ return pthread_create ();
+@@ -19499,71 +7293,54 @@
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-char pthread_create ();
++char libiconv ();
+ int
+ main ()
+ {
+-return pthread_create ();
++return libiconv ();
+   ;
    return 0;
  }
  _ACEOF
@@ -18765,14 +23196,15 @@ index f51d803..459bf70 100755
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
-+if ac_fn_cxx_try_link "$LINENO"; then :
-   ac_cv_lib_pthread_pthread_create=yes
+-  ac_cv_lib_pthread_pthread_create=yes
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_iconv_libiconv=yes
  else
 -  $as_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
++  ac_cv_lib_iconv_libiconv=no
  fi
 -
 -rm -rf conftest.dSYM
@@ -18783,36 +23215,65 @@ index f51d803..459bf70 100755
  LIBS=$ac_check_lib_save_LIBS
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5
- $as_echo "$ac_cv_lib_pthread_pthread_create" >&6; }
+-$as_echo "$ac_cv_lib_pthread_pthread_create" >&6; }
 -if test "x$ac_cv_lib_pthread_pthread_create" = x""yes; then
-+if test "x$ac_cv_lib_pthread_pthread_create" = x""yes; then :
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iconv_libiconv" >&5
++$as_echo "$ac_cv_lib_iconv_libiconv" >&6; }
++if test "x$ac_cv_lib_iconv_libiconv" = x""yes; then :
  
-                 mt_pthread_libs="-lpthread"
+-                mt_pthread_libs="-lpthread"
++                                ICONV_LIBS="-L$ICONV_SEARCH_LIBS -liconv"
++                                LIBICONV=1
  
-@@ -19552,18 +10748,14 @@ else
+ else
++  as_fn_error $? "required library iconv not found in requested location $ICONV_SEARCH_LIBS" "$LINENO" 5
  
-                 LDFLAGS="$LDFLAGS -L$MT_SEARCHPATH_LIBS"
-                 unset ac_cv_lib_pthread_pthread_create
+-                LDFLAGS="$LDFLAGS -L$MT_SEARCHPATH_LIBS"
+-                unset ac_cv_lib_pthread_pthread_create
 -                { $as_echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
-+                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
- $as_echo_n "checking for pthread_create in -lpthread... " >&6; }
+-$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
 -if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
-+if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then :
++fi
++
++
++
++fi
++
++
++
++fi
++
++    else
++        LDFLAGS="-L$ICONV_SEARCH_LIBS -liconv"
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv in -liconv" >&5
++$as_echo_n "checking for iconv in -liconv... " >&6; }
++if test "${ac_cv_lib_iconv_iconv+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
    ac_check_lib_save_LIBS=$LIBS
- LIBS="-lpthread  $LIBS"
+-LIBS="-lpthread  $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
++LIBS="-liconv  $LIBS"
 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -19581,43 +10773,18 @@ return pthread_create ();
+@@ -19572,125 +7349,56 @@
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-char pthread_create ();
++char iconv ();
+ int
+ main ()
+ {
+-return pthread_create ();
++return iconv ();
+   ;
    return 0;
  }
  _ACEOF
@@ -18837,14 +23298,15 @@ index f51d803..459bf70 100755
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
-+if ac_fn_cxx_try_link "$LINENO"; then :
-   ac_cv_lib_pthread_pthread_create=yes
+-  ac_cv_lib_pthread_pthread_create=yes
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_iconv_iconv=yes
  else
 -  $as_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
++  ac_cv_lib_iconv_iconv=no
  fi
 -
 -rm -rf conftest.dSYM
@@ -18855,41 +23317,120 @@ index f51d803..459bf70 100755
  LIBS=$ac_check_lib_save_LIBS
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5
- $as_echo "$ac_cv_lib_pthread_pthread_create" >&6; }
+-$as_echo "$ac_cv_lib_pthread_pthread_create" >&6; }
 -if test "x$ac_cv_lib_pthread_pthread_create" = x""yes; then
-+if test "x$ac_cv_lib_pthread_pthread_create" = x""yes; then :
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iconv_iconv" >&5
++$as_echo "$ac_cv_lib_iconv_iconv" >&6; }
++if test "x$ac_cv_lib_iconv_iconv" = x""yes; then :
  
-                         mt_pthread_libs="-lpthread"
-                         mt_pthread_ldflags="-L$MT_SEARCHPATH_LIBS"
-@@ -19656,9 +10823,7 @@ fi
+-                        mt_pthread_libs="-lpthread"
+-                        mt_pthread_ldflags="-L$MT_SEARCHPATH_LIBS"
++                    ICONV_LIBS="-L$ICONV_SEARCH_LIBS -liconv"
++                    LIBICONV=1
+ 
+ else
+-
+-                        mt_pthread_library_status=missing
+-
+-
+-fi
+-
+-
++  as_fn_error $? "You specified to use libiconv but it was not found in the requested location $ICONV_SEARCH_LIBS" "$LINENO" 5
  
+ fi
  
-     if test "x$PTHREAD_STATUS" != xyes; then
+     fi
+-
+-    if test "x$mt_pthread_library_status" != xyes; then
+-        mt_pthread_libs=""
+-        mt_pthread_ldflags=""
+-    fi
+-
+-    LIBS=$LIBS_SAVE
+-    LDFLAGS=$LDFLAGS_SAVE
+-    CFLAGS=$CFLAGS_SAVE
+-    CXXFLAGS=$CXXFLAGS_SAVE
+-    CPPFLAGS=$CPPFLAGS_SAVE
+-
+-
+-    PTHREAD_LIBS=${mt_pthread_libs}
+-    PTHREAD_LDFLAGS=${mt_pthread_ldflags}
+-    PTHREAD_STATUS=${mt_pthread_library_status}
+-
+-
+-
+-
+-
+-    if test "x$PTHREAD_STATUS" != xyes; then
 -        { { $as_echo "$as_me:$LINENO: error: pthread library not found, try running configure without the --enable-pthread-lib option" >&5
 -$as_echo "$as_me: error: pthread library not found, try running configure without the --enable-pthread-lib option" >&2;}
 -   { (exit 1); exit 1; }; }
-+        as_fn_error $? "pthread library not found, try running configure without the --enable-pthread-lib option" "$LINENO" 5
-     fi
+-    fi
  else
- 
-@@ -19684,13 +10849,9 @@ if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
-         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-         save_LIBS="$LIBS"
-         LIBS="$PTHREAD_LIBS $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
+-
+-acx_pthread_ok=no
+-
+-# We used to check for pthread.h first, but this fails if pthread.h
+-# requires special compiler flags (e.g. on True64 or Sequent).
+-# It gets checked for in the link test anyway.
+-
+-# First of all, check if the user has set any of the PTHREAD_LIBS,
+-# etcetera environment variables, and if threads linking works using
+-# them:
+-if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
+-        save_CFLAGS="$CFLAGS"
+-        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+-        save_LIBS="$LIBS"
+-        LIBS="$PTHREAD_LIBS $LIBS"
 -        { $as_echo "$as_me:$LINENO: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
- $as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; }
+-$as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&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
++    if test "x$ICONV_LIB_OPTION_ENABLED" = xno; then
++        ac_fn_c_check_func "$LINENO" "iconv" "ac_cv_func_iconv"
++if test "x$ac_cv_func_iconv" = x""yes; then :
++
++                ICONV_LIBS="$LDFLAGS"
++
++else
++
++
++                LDFLAGS="$LDFLAGS -liconv"
++                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv in -liconv" >&5
++$as_echo_n "checking for iconv in -liconv... " >&6; }
++if test "${ac_cv_lib_iconv_iconv+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-liconv  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -19708,39 +10869,12 @@ return pthread_join ();
+@@ -19699,2491 +7407,2294 @@
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-char pthread_join ();
++char iconv ();
+ int
+ main ()
+ {
+-return pthread_join ();
++return iconv ();
+   ;
    return 0;
  }
  _ACEOF
@@ -18914,106 +23455,195 @@ index f51d803..459bf70 100755
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
+-  acx_pthread_ok=yes
 +if ac_fn_c_try_link "$LINENO"; then :
-   acx_pthread_ok=yes
--else
++  ac_cv_lib_iconv_iconv=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -
++  ac_cv_lib_iconv_iconv=no
  fi
 -
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
 -        { $as_echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
+-$as_echo "$acx_pthread_ok" >&6; }
+-        if test x"$acx_pthread_ok" = xno; then
+-                PTHREAD_LIBS=""
+-                PTHREAD_CFLAGS=""
+-        fi
+-        LIBS="$save_LIBS"
+-        CFLAGS="$save_CFLAGS"
 +rm -f core conftest.err conftest.$ac_objext \
 +    conftest$ac_exeext conftest.$ac_ext
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_ok" >&5
- $as_echo "$acx_pthread_ok" >&6; }
-         if test x"$acx_pthread_ok" = xno; then
-                 PTHREAD_LIBS=""
-@@ -19802,12 +10936,12 @@ for flag in $acx_pthread_flags; do
++LIBS=$ac_check_lib_save_LIBS
+ fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iconv_iconv" >&5
++$as_echo "$ac_cv_lib_iconv_iconv" >&6; }
++if test "x$ac_cv_lib_iconv_iconv" = x""yes; then :
  
-         case $flag in
-                 none)
+-# We must check for the threads library under a number of different
+-# names; the ordering is very important because some systems
+-# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
+-# libraries is broken (non-POSIX).
+-
+-# Create a list of thread flags to try.  Items starting with a "-" are
+-# C compiler flags, and other items are library names, except for "none"
+-# which indicates that we try without any flags at all, and "pthread-config"
+-# which is a program returning the flags for the Pth emulation library.
+-
+-acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
+-
+-# The ordering *is* (sometimes) important.  Some notes on the
+-# individual items follow:
+-
+-# pthreads: AIX (must check this before -lpthread)
+-# none: in case threads are in libc; should be tried before -Kthread and
+-#       other compiler flags to prevent continual compiler warnings
+-# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
+-# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
+-# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
+-# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
+-# -pthreads: Solaris/gcc
+-# -mthreads: Mingw32/gcc, Lynx/gcc
+-# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
+-#      doesn't hurt to check since this sometimes defines pthreads too;
+-#      also defines -D_REENTRANT)
+-#      ... -mt is also the pthreads flag for HP/aCC
+-# pthread: Linux, etcetera
+-# --thread-safe: KAI C++
+-# pthread-config: use pthread-config program (for GNU Pth library)
+-
+-case "${host_cpu}-${host_os}" in
+-        *solaris*)
+-
+-        # On Solaris (at least, for some versions), libc contains stubbed
+-        # (non-functional) versions of the pthreads routines, so link-based
+-        # tests will erroneously succeed.  (We need to link with -pthreads/-mt/
+-        # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
+-        # a function called by this macro, so we could check for that, but
+-        # who knows whether they'll stub that too in a future libc.)  So,
+-        # we'll just look for -pthreads and -lpthread first:
+-
+-        acx_pthread_flags="-pthreads pthread -mt -pthread $acx_pthread_flags"
+-        ;;
+-esac
+-
+-if test x"$acx_pthread_ok" = xno; then
+-for flag in $acx_pthread_flags; do
+-
+-        case $flag in
+-                none)
 -                { $as_echo "$as_me:$LINENO: checking whether pthreads work without any flags" >&5
-+                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
- $as_echo_n "checking whether pthreads work without any flags... " >&6; }
-                 ;;
- 
-                 -*)
+-$as_echo_n "checking whether pthreads work without any flags... " >&6; }
+-                ;;
+-
+-                -*)
 -                { $as_echo "$as_me:$LINENO: checking whether pthreads work with $flag" >&5
-+                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
- $as_echo_n "checking whether pthreads work with $flag... " >&6; }
-                 PTHREAD_CFLAGS="$flag"
-                 ;;
-@@ -19815,9 +10949,9 @@ $as_echo_n "checking whether pthreads work with $flag... " >&6; }
-                 pthread-config)
-                 # Extract the first word of "pthread-config", so it can be a program name with args.
- set dummy pthread-config; ac_word=$2
+-$as_echo_n "checking whether pthreads work with $flag... " >&6; }
+-                PTHREAD_CFLAGS="$flag"
+-                ;;
++                        ICONV_LIBS="$LDFLAGS"
++                        LIBICONV=1
+ 
+-                pthread-config)
+-                # Extract the first word of "pthread-config", so it can be a program name with args.
+-set dummy pthread-config; ac_word=$2
 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
- $as_echo_n "checking for $ac_word... " >&6; }
+-$as_echo_n "checking for $ac_word... " >&6; }
 -if test "${ac_cv_prog_acx_pthread_config+set}" = set; then
-+if test "${ac_cv_prog_acx_pthread_config+set}" = set; then :
-   $as_echo_n "(cached) " >&6
+-  $as_echo_n "(cached) " >&6
  else
-   if test -n "$acx_pthread_config"; then
-@@ -19828,14 +10962,14 @@ for as_dir in $PATH
- do
-   IFS=$as_save_IFS
-   test -z "$as_dir" && as_dir=.
+-  if test -n "$acx_pthread_config"; then
+-  ac_cv_prog_acx_pthread_config="$acx_pthread_config" # 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
-+    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_acx_pthread_config="yes"
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+-    ac_cv_prog_acx_pthread_config="yes"
 -    $as_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
+-    break 2
+-  fi
 -done
-+  done
- IFS=$as_save_IFS
+-done
+-IFS=$as_save_IFS
  
-   test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no"
-@@ -19843,10 +10977,10 @@ fi
- fi
- acx_pthread_config=$ac_cv_prog_acx_pthread_config
- if test -n "$acx_pthread_config"; then
+-  test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no"
+-fi
+-fi
+-acx_pthread_config=$ac_cv_prog_acx_pthread_config
+-if test -n "$acx_pthread_config"; then
 -  { $as_echo "$as_me:$LINENO: result: $acx_pthread_config" >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_config" >&5
- $as_echo "$acx_pthread_config" >&6; }
+-$as_echo "$acx_pthread_config" >&6; }
++                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libiconv in -liconv" >&5
++$as_echo_n "checking for libiconv in -liconv... " >&6; }
++if test "${ac_cv_lib_iconv_libiconv+set}" = set; then :
++  $as_echo_n "(cached) " >&6
  else
 -  { $as_echo "$as_me:$LINENO: result: no" >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
- $as_echo "no" >&6; }
- fi
- 
-@@ -19857,7 +10991,7 @@ fi
-                 ;;
- 
-                 *)
+-$as_echo "no" >&6; }
+-fi
+-
+-
+-                if test x"$acx_pthread_config" = xno; then continue; fi
+-                PTHREAD_CFLAGS="`pthread-config --cflags`"
+-                PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
+-                ;;
+-
+-                *)
 -                { $as_echo "$as_me:$LINENO: checking for the pthreads library -l$flag" >&5
-+                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
- $as_echo_n "checking for the pthreads library -l$flag... " >&6; }
-                 PTHREAD_LIBS="-l$flag"
-                 ;;
-@@ -19877,11 +11011,7 @@ $as_echo_n "checking for the pthreads library -l$flag... " >&6; }
-         # pthread_cleanup_push because it is one of the few pthread
-         # functions on Solaris that doesn't have a non-functional libc stub.
-         # We try pthread_create on general principles.
+-$as_echo_n "checking for the pthreads library -l$flag... " >&6; }
+-                PTHREAD_LIBS="-l$flag"
+-                ;;
+-        esac
+-
+-        save_LIBS="$LIBS"
+-        save_CFLAGS="$CFLAGS"
+-        LIBS="$PTHREAD_LIBS $LIBS"
+-        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+-
+-        # Check for various functions.  We must include pthread.h,
+-        # since some functions may be macros.  (On the Sequent, we
+-        # need a special flag -Kthread to make this header compile.)
+-        # We check for pthread_join because it is in -lpthread on IRIX
+-        # while pthread_create is in libc.  We check for pthread_attr_init
+-        # due to DEC craziness with -lpthreads.  We check for
+-        # pthread_cleanup_push because it is one of the few pthread
+-        # functions on Solaris that doesn't have a non-functional libc stub.
+-        # We try pthread_create on general principles.
 -        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
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-liconv  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
- #include <pthread.h>
+-#include <pthread.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 libiconv ();
  int
-@@ -19894,43 +11024,16 @@ pthread_t th; pthread_join(th, 0);
+ main ()
+ {
+-pthread_t th; pthread_join(th, 0);
+-                     pthread_attr_init(0); pthread_cleanup_push(0, 0);
+-                     pthread_create(0,0,0,0); pthread_cleanup_pop(0);
++return libiconv ();
+   ;
    return 0;
  }
  _ACEOF
@@ -19038,51 +23668,96 @@ index f51d803..459bf70 100755
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
+-  acx_pthread_ok=yes
 +if ac_fn_c_try_link "$LINENO"; then :
-   acx_pthread_ok=yes
--else
++  ac_cv_lib_iconv_libiconv=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
--
++  ac_cv_lib_iconv_libiconv=no
++fi
++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_iconv_libiconv" >&5
++$as_echo "$ac_cv_lib_iconv_libiconv" >&6; }
++if test "x$ac_cv_lib_iconv_libiconv" = x""yes; then :
++
++                                ICONV_LIBS="$LDFLAGS"
++                                LIBICONV=1
+ 
++else
++  as_fn_error $? "required library iconv not found on your system" "$LINENO" 5
+ 
  fi
--
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext conftest.$ac_ext
- 
-         LIBS="$save_LIBS"
-         CFLAGS="$save_CFLAGS"
+-
+-        LIBS="$save_LIBS"
+-        CFLAGS="$save_CFLAGS"
  
 -        { $as_echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_ok" >&5
- $as_echo "$acx_pthread_ok" >&6; }
-         if test "x$acx_pthread_ok" = xyes; then
-                 break;
-@@ -19949,15 +11052,11 @@ if test "x$acx_pthread_ok" = xyes; then
-         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+-$as_echo "$acx_pthread_ok" >&6; }
+-        if test "x$acx_pthread_ok" = xyes; then
+-                break;
+-        fi
+ 
+-        PTHREAD_LIBS=""
+-        PTHREAD_CFLAGS=""
+-done
+ fi
  
-         # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
+-# Various other checks:
+-if test "x$acx_pthread_ok" = xyes; then
+-        save_LIBS="$LIBS"
+-        LIBS="$PTHREAD_LIBS $LIBS"
+-        save_CFLAGS="$CFLAGS"
+-        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+ 
+-        # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
 -        { $as_echo "$as_me:$LINENO: checking for joinable pthread attribute" >&5
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
- $as_echo_n "checking for joinable pthread attribute... " >&6; }
-         attr_name=unknown
-         for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
+-$as_echo_n "checking for joinable pthread attribute... " >&6; }
+-        attr_name=unknown
+-        for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
 -            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
++
++fi
++
++    else
++        LDFLAGS="$LDFLAGS -liconv"
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv in -liconv" >&5
++$as_echo_n "checking for iconv in -liconv... " >&6; }
++if test "${ac_cv_lib_iconv_iconv+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-liconv  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
- #include <pthread.h>
+-#include <pthread.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 iconv ();
  int
-@@ -19968,40 +11067,13 @@ int attr=$attr; return attr;
-   return 0;
- }
- _ACEOF
+-main ()
+-{
+-int attr=$attr; return attr;
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -19104,140 +23779,409 @@ index f51d803..459bf70 100755
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
+-  attr_name=$attr; break
++main ()
++{
++return iconv ();
++  ;
++  return 0;
++}
++_ACEOF
 +if ac_fn_c_try_link "$LINENO"; then :
-   attr_name=$attr; break
--else
++  ac_cv_lib_iconv_iconv=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
--
- fi
--
++  ac_cv_lib_iconv_iconv=no
++fi
++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_iconv_iconv" >&5
++$as_echo "$ac_cv_lib_iconv_iconv" >&6; }
++if test "x$ac_cv_lib_iconv_iconv" = x""yes; then :
+ 
++                    ICONV_LIBS="$LDFLAGS"
++                    LIBICONV=1
+ 
+-fi
++else
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
-+rm -f core conftest.err conftest.$ac_objext \
-+    conftest$ac_exeext conftest.$ac_ext
-         done
+-        done
 -        { $as_echo "$as_me:$LINENO: result: $attr_name" >&5
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $attr_name" >&5
- $as_echo "$attr_name" >&6; }
-         if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
+-$as_echo "$attr_name" >&6; }
+-        if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
++                    as_fn_error $? "You specified to use libiconv but the library was not found" "$LINENO" 5
  
-@@ -20011,14 +11083,14 @@ _ACEOF
+-cat >>confdefs.h <<_ACEOF
+-#define PTHREAD_CREATE_JOINABLE $attr_name
+-_ACEOF
  
-         fi
+-        fi
++fi
  
 -        { $as_echo "$as_me:$LINENO: checking if more special flags are required for pthreads" >&5
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
- $as_echo_n "checking if more special flags are required for pthreads... " >&6; }
-         flag=no
-         case "${host_cpu}-${host_os}" in
-             *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
-             *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
-         esac
+-$as_echo_n "checking if more special flags are required for pthreads... " >&6; }
+-        flag=no
+-        case "${host_cpu}-${host_os}" in
+-            *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
+-            *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
+-        esac
 -        { $as_echo "$as_me:$LINENO: result: ${flag}" >&5
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${flag}" >&5
- $as_echo "${flag}" >&6; }
-         if test "x$flag" != xno; then
-             PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
-@@ -20033,9 +11105,9 @@ $as_echo "${flag}" >&6; }
- do
-   # Extract the first word of "$ac_prog", so it can be a program name with args.
- set dummy $ac_prog; ac_word=$2
+-$as_echo "${flag}" >&6; }
+-        if test "x$flag" != xno; then
+-            PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
+-        fi
++    fi
++fi
+ 
+-        LIBS="$save_LIBS"
+-        CFLAGS="$save_CFLAGS"
++if test $LIBICONV -eq 1; then
+ 
+-        # More AIX lossage: must compile with xlc_r or cc_r
+-        if test x"$GCC" != xyes; then
+-          for ac_prog in xlc_r cc_r
+-do
+-  # Extract the first word of "$ac_prog", so it can be a program name with args.
+-set dummy $ac_prog; ac_word=$2
 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
- $as_echo_n "checking for $ac_word... " >&6; }
+-$as_echo_n "checking for $ac_word... " >&6; }
 -if test "${ac_cv_prog_PTHREAD_CC+set}" = set; then
-+if test "${ac_cv_prog_PTHREAD_CC+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
-   if test -n "$PTHREAD_CC"; then
-@@ -20046,24 +11118,24 @@ for as_dir in $PATH
- do
-   IFS=$as_save_IFS
-   test -z "$as_dir" && as_dir=.
+-  $as_echo_n "(cached) " >&6
+-else
+-  if test -n "$PTHREAD_CC"; then
+-  ac_cv_prog_PTHREAD_CC="$PTHREAD_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
-+    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_PTHREAD_CC="$ac_prog"
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+-    ac_cv_prog_PTHREAD_CC="$ac_prog"
 -    $as_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
+-    break 2
+-  fi
 -done
-+  done
- IFS=$as_save_IFS
+-done
+-IFS=$as_save_IFS
++$as_echo "#define HAVE_LIBICONV 1" >>confdefs.h
  
  fi
- fi
- PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
- if test -n "$PTHREAD_CC"; then
+-fi
+-PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
+-if test -n "$PTHREAD_CC"; then
 -  { $as_echo "$as_me:$LINENO: result: $PTHREAD_CC" >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
- $as_echo "$PTHREAD_CC" >&6; }
- else
+-$as_echo "$PTHREAD_CC" >&6; }
+-else
 -  { $as_echo "$as_me:$LINENO: result: no" >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
- $as_echo "no" >&6; }
- fi
+-$as_echo "no" >&6; }
+-fi
+ 
+ 
+-  test -n "$PTHREAD_CC" && break
+-done
+-test -n "$PTHREAD_CC" || PTHREAD_CC="${CC}"
  
-@@ -20086,16 +11158,12 @@ fi
- # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
- if test x"$acx_pthread_ok" = xyes; then
+-        else
+-          PTHREAD_CC=$CC
+-        fi
+-else
+-        PTHREAD_CC="$CC"
+-fi
+ 
++CFLAGS="$CFLAGS $ICONV_CXXFLAGS -Werror"
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if iconv declaration requires const char cast" >&5
++$as_echo_n "checking if iconv declaration requires const char cast... " >&6; }
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
+ 
++             #include <stdlib.h>
++             #include <iconv.h>
+ 
++int
++main ()
++{
+ 
++            char **ptr = NULL;
++            size_t len;
++            iconv_t cd = NULL;
++            (void)iconv(cd, ptr, &len, ptr, &len);
+ 
+-# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
+-if test x"$acx_pthread_ok" = xyes; then
  
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_PTHREAD 1
--_ACEOF
-+$as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
++  ;
++  return 0;
++}
+ _ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++
++         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
  
-         :
+-        :
  else
-         acx_pthread_ok=no
+-        acx_pthread_ok=no
 -        { { $as_echo "$as_me:$LINENO: error: POSIX threads missing" >&5
 -$as_echo "$as_me: error: POSIX threads missing" >&2;}
 -   { (exit 1); exit 1; }; }
-+        as_fn_error $? "POSIX threads missing" "$LINENO" 5
++
++
++$as_echo "#define ICONV_CONST 1" >>confdefs.h
++
++
++         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++
+ fi
+-ac_ext=cpp
+-ac_cpp='$CXXCPP $CPPFLAGS'
+-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ 
+ 
++CFLAGS="$CFLAGS_SAVE"
++CXXFLAGS="$CXXFLAGS_SAVE"
++LDFLAGS="$LDFLAGS_SAVE"
+ 
+-    if test $FREEBSD_OS -eq 1; then
+-        ADD_PTHREAD_CFLAGS="$PTHREAD_CFLAGS $PTHREAD_LIBS"
+-    fi
++for ac_header in execinfo.h
++do :
++  ac_fn_c_check_header_mongrel "$LINENO" "execinfo.h" "ac_cv_header_execinfo_h" "$ac_includes_default"
++if test "x$ac_cv_header_execinfo_h" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_EXECINFO_H 1
++_ACEOF
+ 
+-    if test "x$STATIC_OPTION_ENABLED" = xyes; then
+-        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+-        LIBS="$LIBS $PTHREAD_LIBS"
+-        CFLAGS_SAVE="$CFLAGS_SAVE $PTHREAD_CFLAGS"
+-        LIBS_SAVE="$LIBS_SAVE $PTHREAD_LIBS"
+-    fi
++fi
++
++done
+ 
+ 
++ac_fn_c_check_type "$LINENO" "time_t" "ac_cv_type_time_t" "#include <sys/types.h>
++"
++if test "x$ac_cv_type_time_t" = x""yes; then :
++
++cat >>confdefs.h <<_ACEOF
++#define HAVE_TIME_T 1
++_ACEOF
++
+ 
  fi
- ac_ext=cpp
- ac_cpp='$CXXCPP $CPPFLAGS'
-@@ -20136,10 +11204,10 @@ unset LIBS
  
+-unset LIBS
  
- # Check whether --with-rt-libs was given.
+-# we might need librt for sqlite
++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
+ 
+-    mt_rt_arg_default=yes
+-    mt_rt_library_status=yes
++# The following way of writing the cache mishandles newlines in values,
++# but we know of no workaround that is simple, portable, and efficient.
++# So, we kill variables containing newlines.
++# Ultrix sh set writes to stderr and can't be redirected directly,
++# and sets the high bit in the cache file unless we assign to the vars.
++(
++  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
++    eval ac_val=\$$ac_var
++    case $ac_val in #(
++    *${as_nl}*)
++      case $ac_var in #(
++      *_cv_*) { $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
+ 
+-    LIBS_SAVE=$LIBS
+-    LDFLAGS_SAVE=$LDFLAGS
+-    CFLAGS_SAVE=$CFLAGS
+-    CXXFLAGS_SAVE=$CXXFLAGS
+-    CPPFLAGS_SAVE=$CPPFLAGS
++  (set) 2>&1 |
++    case $as_nl`(ac_space=' '; set) 2>&1` in #(
++    *${as_nl}ac_space=\ *)
++      # `set' does not quote correctly, so add quotes: double-quote
++      # substitution turns \\\\ into \\, and sed turns \\ into \.
++      sed -n \
++	"s/'/'\\\\''/g;
++	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
++      ;; #(
++    *)
++      # `set' quotes correctly as required by POSIX, so do not add quotes.
++      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
++      ;;
++    esac |
++    sort
++) |
++  sed '
++     /^ac_cv_env_/b end
++     t clear
++     :clear
++     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
++     t end
++     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
++     :end' >>confcache
++if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
++  if test -w "$cache_file"; then
++    test "x$cache_file" != "x/dev/null" &&
++      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
++$as_echo "$as_me: updating cache $cache_file" >&6;}
++    cat confcache >$cache_file
++  else
++    { $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
+ 
++# Check whether --enable-largefile was given.
++if test "${enable_largefile+set}" = set; then :
++  enableval=$enable_largefile;
++fi
+ 
+-# Check whether --with-rt-libs was given.
 -if test "${with_rt_libs+set}" = set; then
-+if test "${with_rt_libs+set}" = set; then :
-   withval=$with_rt_libs;
-             mt_rt_search_libs="$withval"
+-  withval=$with_rt_libs;
+-            mt_rt_search_libs="$withval"
 -            { $as_echo "$as_me:$LINENO: Will search for rt libs in $withval" >&5
-+            { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for rt libs in $withval" >&5
- $as_echo "$as_me: Will search for rt libs in $withval" >&6;}
+-$as_echo "$as_me: Will search for rt libs in $withval" >&6;}
++if test "$enable_largefile" != no; then
  
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
++$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
++if test "${ac_cv_sys_largefile_CC+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  ac_cv_sys_largefile_CC=no
++     if test "$GCC" != yes; then
++       ac_save_CC=$CC
++       while :; do
++	 # IRIX 6.2 and later do not support large files by default,
++	 # so use the C compiler's -n32 option if that helps.
++	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <sys/types.h>
++ /* Check that off_t can represent 2**63 - 1 correctly.
++    We can't simply define LARGE_OFF_T to be 9223372036854775807,
++    since some C++ compilers masquerading as C compilers
++    incorrectly reject 9223372036854775807.  */
++#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
++  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
++		       && LARGE_OFF_T % 2147483647 == 1)
++		      ? 1 : -1];
++int
++main ()
++{
  
-@@ -20149,18 +11217,14 @@ fi
-     if test "$mt_rt_search_libs" ; then
-         unset ac_cv_lib_rt_clock_gettime
-         LDFLAGS="$LDFLAGS -L$mt_rt_search_libs"
++  ;
++  return 0;
++}
++_ACEOF
++	 if ac_fn_c_try_compile "$LINENO"; then :
++  break
++fi
++rm -f core conftest.err conftest.$ac_objext
++	 CC="$CC -n32"
++	 if ac_fn_c_try_compile "$LINENO"; then :
++  ac_cv_sys_largefile_CC=' -n32'; break
++fi
++rm -f core conftest.err conftest.$ac_objext
++	 break
++       done
++       CC=$ac_save_CC
++       rm -f conftest.$ac_ext
++    fi
+ fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
++$as_echo "$ac_cv_sys_largefile_CC" >&6; }
++  if test "$ac_cv_sys_largefile_CC" != no; then
++    CC=$CC$ac_cv_sys_largefile_CC
++  fi
+ 
+-
+-    if test "$mt_rt_search_libs" ; then
+-        unset ac_cv_lib_rt_clock_gettime
+-        LDFLAGS="$LDFLAGS -L$mt_rt_search_libs"
 -        { $as_echo "$as_me:$LINENO: checking for clock_gettime in -lrt" >&5
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
- $as_echo_n "checking for clock_gettime in -lrt... " >&6; }
+-$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
 -if test "${ac_cv_lib_rt_clock_gettime+set}" = set; then
-+if test "${ac_cv_lib_rt_clock_gettime+set}" = set; then :
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
++$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
++if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
-   ac_check_lib_save_LIBS=$LIBS
- LIBS="-lrt  $LIBS"
+-  ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lrt  $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
++  while :; do
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
- 
- /* Override any GCC internal prototype to avoid an error.
-@@ -20178,43 +11242,18 @@ return clock_gettime ();
+-
+-/* 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 clock_gettime ();
++#include <sys/types.h>
++ /* Check that off_t can represent 2**63 - 1 correctly.
++    We can't simply define LARGE_OFF_T to be 9223372036854775807,
++    since some C++ compilers masquerading as C compilers
++    incorrectly reject 9223372036854775807.  */
++#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
++  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
++		       && LARGE_OFF_T % 2147483647 == 1)
++		      ? 1 : -1];
+ int
+ main ()
+ {
+-return clock_gettime ();
++
+   ;
    return 0;
  }
  _ACEOF
@@ -19262,69 +24206,147 @@ index f51d803..459bf70 100755
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
-+if ac_fn_cxx_try_link "$LINENO"; then :
-   ac_cv_lib_rt_clock_gettime=yes
- else
+-  ac_cv_lib_rt_clock_gettime=yes
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_lib_rt_clock_gettime=no
-+  ac_cv_lib_rt_clock_gettime=no
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_cv_sys_file_offset_bits=no; break
  fi
--
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#define _FILE_OFFSET_BITS 64
++#include <sys/types.h>
++ /* Check that off_t can represent 2**63 - 1 correctly.
++    We can't simply define LARGE_OFF_T to be 9223372036854775807,
++    since some C++ compilers masquerading as C compilers
++    incorrectly reject 9223372036854775807.  */
++#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
++  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
++		       && LARGE_OFF_T % 2147483647 == 1)
++		      ? 1 : -1];
++int
++main ()
++{
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      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
+-LIBS=$ac_check_lib_save_LIBS
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_cv_sys_file_offset_bits=64; break
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_rt_clock_gettime" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
- $as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
+-$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
 -if test "x$ac_cv_lib_rt_clock_gettime" = x""yes; then
-+if test "x$ac_cv_lib_rt_clock_gettime" = x""yes; then :
- 
-                 mt_rt_libs="-lrt"
-                 mt_rt_ldflags="-L$mt_rt_search_libs"
-@@ -20223,12 +11262,10 @@ else
- 
-                 mt_rt_library_status=missing
-                 if test "" = "pass"; then
+-
+-                mt_rt_libs="-lrt"
+-                mt_rt_ldflags="-L$mt_rt_search_libs"
+-
+-else
+-
+-                mt_rt_library_status=missing
+-                if test "" = "pass"; then
 -                    { $as_echo "$as_me:$LINENO: rt library not found in requested location $mt_rt_search_libs" >&5
-+                    { $as_echo "$as_me:${as_lineno-$LINENO}: rt library not found in requested location $mt_rt_search_libs" >&5
- $as_echo "$as_me: rt library not found in requested location $mt_rt_search_libs" >&6;}
-                 else
+-$as_echo "$as_me: rt library not found in requested location $mt_rt_search_libs" >&6;}
+-                else
 -                    { { $as_echo "$as_me:$LINENO: error: rt library not found in requested location $mt_rt_search_libs" >&5
 -$as_echo "$as_me: error: rt library not found in requested location $mt_rt_search_libs" >&2;}
 -   { (exit 1); exit 1; }; }
-+                    as_fn_error $? "rt library not found in requested location $mt_rt_search_libs" "$LINENO" 5
-                 fi
- 
- 
-@@ -20236,18 +11273,14 @@ fi
- 
-     else
-         unset ac_cv_lib_rt_clock_gettime
+-                fi
+-
+-
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++  ac_cv_sys_file_offset_bits=unknown
++  break
++done
+ fi
+-
+-    else
+-        unset ac_cv_lib_rt_clock_gettime
 -        { $as_echo "$as_me:$LINENO: checking for clock_gettime in -lrt" >&5
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
- $as_echo_n "checking for clock_gettime in -lrt... " >&6; }
+-$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
 -if test "${ac_cv_lib_rt_clock_gettime+set}" = set; then
-+if test "${ac_cv_lib_rt_clock_gettime+set}" = set; then :
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
++$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
++case $ac_cv_sys_file_offset_bits in #(
++  no | unknown) ;;
++  *)
++cat >>confdefs.h <<_ACEOF
++#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
++_ACEOF
++;;
++esac
++rm -rf conftest*
++  if test $ac_cv_sys_file_offset_bits = unknown; then
++    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
++$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
++if test "${ac_cv_sys_large_files+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
-   ac_check_lib_save_LIBS=$LIBS
- LIBS="-lrt  $LIBS"
+-  ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lrt  $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
++  while :; do
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
++#include <sys/types.h>
++ /* Check that off_t can represent 2**63 - 1 correctly.
++    We can't simply define LARGE_OFF_T to be 9223372036854775807,
++    since some C++ compilers masquerading as C compilers
++    incorrectly reject 9223372036854775807.  */
++#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
++  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
++		       && LARGE_OFF_T % 2147483647 == 1)
++		      ? 1 : -1];
++int
++main ()
++{
  
- /* Override any GCC internal prototype to avoid an error.
-@@ -20265,43 +11298,18 @@ return clock_gettime ();
+-/* 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 clock_gettime ();
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_cv_sys_large_files=no; break
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#define _LARGE_FILES 1
++#include <sys/types.h>
++ /* Check that off_t can represent 2**63 - 1 correctly.
++    We can't simply define LARGE_OFF_T to be 9223372036854775807,
++    since some C++ compilers masquerading as C compilers
++    incorrectly reject 9223372036854775807.  */
++#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
++  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
++		       && LARGE_OFF_T % 2147483647 == 1)
++		      ? 1 : -1];
+ int
+ main ()
+ {
+-return clock_gettime ();
++
+   ;
    return 0;
  }
  _ACEOF
@@ -19333,7 +24355,24 @@ index f51d803..459bf70 100755
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
 -  *) ac_try_echo=$ac_try;;
--esac
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_cv_sys_large_files=1; break
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++  ac_cv_sys_large_files=unknown
++  break
++done
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
++$as_echo "$ac_cv_sys_large_files" >&6; }
++case $ac_cv_sys_large_files in #(
++  no | unknown) ;;
++  *)
++cat >>confdefs.h <<_ACEOF
++#define _LARGE_FILES $ac_cv_sys_large_files
++_ACEOF
++;;
+ esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
 -  (eval "$ac_link") 2>conftest.er1
@@ -19349,54 +24388,103 @@ index f51d803..459bf70 100755
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
-+if ac_fn_cxx_try_link "$LINENO"; then :
-   ac_cv_lib_rt_clock_gettime=yes
+-  ac_cv_lib_rt_clock_gettime=yes
++rm -rf conftest*
++  fi
++fi
++
++ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
++if test "x$ac_cv_type_off_t" = x""yes; then :
++
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	ac_cv_lib_rt_clock_gettime=no
-+  ac_cv_lib_rt_clock_gettime=no
- fi
--
+-fi
++cat >>confdefs.h <<_ACEOF
++#define off_t long int
++_ACEOF
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      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
+-LIBS=$ac_check_lib_save_LIBS
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_rt_clock_gettime" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
- $as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
+-$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
 -if test "x$ac_cv_lib_rt_clock_gettime" = x""yes; then
-+if test "x$ac_cv_lib_rt_clock_gettime" = x""yes; then :
  
-                 mt_rt_libs="-lrt"
+-                mt_rt_libs="-lrt"
++ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
++if test "x$ac_cv_type_size_t" = x""yes; then :
  
-@@ -20309,18 +11317,14 @@ else
+ else
  
-                 LDFLAGS="$LDFLAGS -L$MT_SEARCHPATH_LIBS"
-                 unset ac_cv_lib_rt_clock_gettime
+-                LDFLAGS="$LDFLAGS -L$MT_SEARCHPATH_LIBS"
+-                unset ac_cv_lib_rt_clock_gettime
 -                { $as_echo "$as_me:$LINENO: checking for clock_gettime in -lrt" >&5
-+                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
- $as_echo_n "checking for clock_gettime in -lrt... " >&6; }
+-$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
 -if test "${ac_cv_lib_rt_clock_gettime+set}" = set; then
-+if test "${ac_cv_lib_rt_clock_gettime+set}" = set; then :
++cat >>confdefs.h <<_ACEOF
++#define size_t unsigned int
++_ACEOF
++
++fi
++
++#AC_CHECK_TYPES([ssize_t], [], [], [#include <sys/types.h>])
++
++if test "x$FSEEKO_CHECK_OPTION_ENABLED" = xyes; then
++    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
++$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
++if test "${ac_cv_sys_largefile_source+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
-   ac_check_lib_save_LIBS=$LIBS
- LIBS="-lrt  $LIBS"
+-  ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lrt  $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
--_ACEOF
++  while :; do
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <sys/types.h> /* for off_t */
++     #include <stdio.h>
++int
++main ()
++{
++int (*fp) (FILE *, off_t, int) = fseeko;
++     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
++  ;
++  return 0;
++}
+ _ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_sys_largefile_source=no; break
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
- 
- /* Override any GCC internal prototype to avoid an error.
-@@ -20338,43 +11342,18 @@ return clock_gettime ();
+-
+-/* 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 clock_gettime ();
++#define _LARGEFILE_SOURCE 1
++#include <sys/types.h> /* for off_t */
++     #include <stdio.h>
+ int
+ main ()
+ {
+-return clock_gettime ();
++int (*fp) (FILE *, off_t, int) = fseeko;
++     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
+   ;
    return 0;
  }
  _ACEOF
@@ -19421,40 +24509,161 @@ index f51d803..459bf70 100755
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
-+if ac_fn_cxx_try_link "$LINENO"; then :
-   ac_cv_lib_rt_clock_gettime=yes
- else
+-  ac_cv_lib_rt_clock_gettime=yes
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_sys_largefile_source=1; break
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++  ac_cv_sys_largefile_source=unknown
++  break
++done
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
++$as_echo "$ac_cv_sys_largefile_source" >&6; }
++case $ac_cv_sys_largefile_source in #(
++  no | unknown) ;;
++  *)
++cat >>confdefs.h <<_ACEOF
++#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
++_ACEOF
++;;
++esac
++rm -rf conftest*
+ 
 -	ac_cv_lib_rt_clock_gettime=no
-+  ac_cv_lib_rt_clock_gettime=no
- fi
--
+-fi
++# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
++# in glibc 2.1.3, but that breaks too many other things.
++# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
++if test $ac_cv_sys_largefile_source != unknown; then
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      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
+-LIBS=$ac_check_lib_save_LIBS
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_rt_clock_gettime" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
- $as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
+-$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
 -if test "x$ac_cv_lib_rt_clock_gettime" = x""yes; then
-+if test "x$ac_cv_lib_rt_clock_gettime" = x""yes; then :
++$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
  
-                         mt_rt_libs="-lrt"
-                         mt_rt_ldflags="-L$MT_SEARCHPATH_LIBS"
-@@ -20414,92 +11393,11 @@ fi
+-                        mt_rt_libs="-lrt"
+-                        mt_rt_ldflags="-L$MT_SEARCHPATH_LIBS"
++fi
+ 
+-else
+ 
+-                        mt_rt_library_status=missing
++    if test "$ac_cv_func_fseeko" = no || test "$ac_cv_sys_largefile_source" = unknown; then
++        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: fseeko has not been found on your system, will use fseek instead." >&5
++$as_echo "$as_me: WARNING: fseeko has not been found on your system, will use fseek instead." >&2;}
++        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This has not been tested, please report if you have any problems." >&5
++$as_echo "$as_me: WARNING: This has not been tested, please report if you have any problems." >&2;}
+ 
++$as_echo "#define fseeko fseek" >>confdefs.h
  
++    fi
++else
++    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Skipping fseeko test! (requested by user)" >&5
++$as_echo "$as_me: WARNING: Skipping fseeko test! (requested by user)" >&2;}
+ fi
+ 
++# The cast to long int works around a bug in the HP C Compiler
++# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
++# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
++# This bug is HP SR number 8606223364.
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
++$as_echo_n "checking size of off_t... " >&6; }
++if test "${ac_cv_sizeof_off_t+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t"        "$ac_includes_default"; then :
+ 
++else
++  if test "$ac_cv_type_off_t" = yes; then
++     { { $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 "cannot compute sizeof (off_t)
++See \`config.log' for more details" "$LINENO" 5 ; }
++   else
++     ac_cv_sizeof_off_t=0
++   fi
++fi
+ 
+ fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
++$as_echo "$ac_cv_sizeof_off_t" >&6; }
+ 
+-    fi
  
- if test "x$RT_STATUS" != xyes; then
+-    if test "x$mt_rt_library_status" != xyes; then
+-        mt_rt_libs=""
+-        mt_rt_ldflags=""
+-    fi
+ 
+-    LIBS=$LIBS_SAVE
+-    LDFLAGS=$LDFLAGS_SAVE
+-    CFLAGS=$CFLAGS_SAVE
+-    CXXFLAGS=$CXXFLAGS_SAVE
+-    CPPFLAGS=$CPPFLAGS_SAVE
++cat >>confdefs.h <<_ACEOF
++#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
++_ACEOF
+ 
+ 
+-    RT_LIBS=${mt_rt_libs}
+-    RT_LDFLAGS=${mt_rt_ldflags}
+-    RT_STATUS=${mt_rt_library_status}
++# The cast to long int works around a bug in the HP C Compiler
++# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
++# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
++# This bug is HP SR number 8606223364.
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
++$as_echo_n "checking size of size_t... " >&6; }
++if test "${ac_cv_sizeof_size_t+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t"        "$ac_includes_default"; then :
++
++else
++  if test "$ac_cv_type_size_t" = yes; then
++     { { $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 "cannot compute sizeof (size_t)
++See \`config.log' for more details" "$LINENO" 5 ; }
++   else
++     ac_cv_sizeof_size_t=0
++   fi
++fi
+ 
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
++$as_echo "$ac_cv_sizeof_size_t" >&6; }
+ 
+ 
+ 
++cat >>confdefs.h <<_ACEOF
++#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
++_ACEOF
+ 
+ 
+-if test "x$RT_STATUS" != xyes; then
 -    { $as_echo "$as_me:$LINENO: checking for clock_gettime" >&5
 -$as_echo_n "checking for clock_gettime... " >&6; }
 -if test "${ac_cv_func_clock_gettime+set}" = set; then
--  $as_echo_n "(cached) " >&6
--else
++# The cast to long int works around a bug in the HP C Compiler
++# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
++# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
++# This bug is HP SR number 8606223364.
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
++$as_echo_n "checking size of time_t... " >&6; }
++if test "${ac_cv_sizeof_time_t+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
 -  cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
@@ -19464,22 +24673,34 @@ index f51d803..459bf70 100755
 -/* Define clock_gettime to an innocuous variant, in case <limits.h> declares clock_gettime.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define clock_gettime innocuous_clock_gettime
--
++  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t"        "$ac_includes_default"; then :
+ 
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char clock_gettime (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
--
++else
++  if test "$ac_cv_type_time_t" = yes; then
++     { { $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 "cannot compute sizeof (time_t)
++See \`config.log' for more details" "$LINENO" 5 ; }
++   else
++     ac_cv_sizeof_time_t=0
++   fi
++fi
+ 
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
-+    ac_fn_cxx_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
-+if test "x$ac_cv_func_clock_gettime" = x""yes; then :
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
++$as_echo "$ac_cv_sizeof_time_t" >&6; }
  
 -#undef clock_gettime
--
+ 
 -/* 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.  */
@@ -19493,7 +24714,7 @@ index f51d803..459bf70 100755
 -#if defined __stub_clock_gettime || defined __stub___clock_gettime
 -choke me
 -#endif
--
+ 
 -int
 -main ()
 -{
@@ -19501,7 +24722,9 @@ index f51d803..459bf70 100755
 -  ;
 -  return 0;
 -}
--_ACEOF
++cat >>confdefs.h <<_ACEOF
++#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
+ _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -19527,9 +24750,9 @@ index f51d803..459bf70 100755
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	ac_cv_func_clock_gettime=no
- fi
+-fi
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
@@ -19537,57 +24760,229 @@ index f51d803..459bf70 100755
 -fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_clock_gettime" >&5
 -$as_echo "$ac_cv_func_clock_gettime" >&6; }
--
++# The cast to long int works around a bug in the HP C Compiler
++# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
++# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
++# This bug is HP SR number 8606223364.
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned int" >&5
++$as_echo_n "checking size of unsigned int... " >&6; }
++if test "${ac_cv_sizeof_unsigned_int+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned int))" "ac_cv_sizeof_unsigned_int"        "$ac_includes_default"; then :
+ 
++else
++  if test "$ac_cv_type_unsigned_int" = yes; then
++     { { $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 "cannot compute sizeof (unsigned int)
++See \`config.log' for more details" "$LINENO" 5 ; }
++   else
++     ac_cv_sizeof_unsigned_int=0
++   fi
  fi
  
- ############ zlib
-@@ -20518,7 +11416,7 @@ fi
-     fi
+-############ zlib
+-
+-
+-    mt_zlib_status=yes
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_int" >&5
++$as_echo "$ac_cv_sizeof_unsigned_int" >&6; }
+ 
  
-     # Check whether --enable-zlib was given.
+ 
+-    mt_zlib_option_enabled=
+-    mt_zlib_option_requested=no
+-    if test "xdisable" = xdisable; then
+-        mt_zlib_option_enabled=yes
+-    else
+-        mt_zlib_option_enabled=no
+-    fi
++cat >>confdefs.h <<_ACEOF
++#define SIZEOF_UNSIGNED_INT $ac_cv_sizeof_unsigned_int
++_ACEOF
+ 
+-    # Check whether --enable-zlib was given.
 -if test "${enable_zlib+set}" = set; then
-+if test "${enable_zlib+set}" = set; then :
-   enableval=$enable_zlib;
-             mt_zlib_option_enabled=$enableval
-             mt_zlib_option_requested=yes
-@@ -20533,7 +11431,9 @@ fi
+-  enableval=$enable_zlib;
+-            mt_zlib_option_enabled=$enableval
+-            mt_zlib_option_requested=yes
+ 
++# The cast to long int works around a bug in the HP C Compiler
++# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
++# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
++# This bug is HP SR number 8606223364.
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
++$as_echo_n "checking size of unsigned long... " >&6; }
++if test "${ac_cv_sizeof_unsigned_long+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long"        "$ac_includes_default"; then :
+ 
++else
++  if test "$ac_cv_type_unsigned_long" = yes; then
++     { { $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 "cannot compute sizeof (unsigned long)
++See \`config.log' for more details" "$LINENO" 5 ; }
++   else
++     ac_cv_sizeof_unsigned_long=0
++   fi
+ fi
  
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
++$as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
  
+-    ZLIB_OPTION_ENABLED=${mt_zlib_option_enabled}
+-    ZLIB_OPTION_REQUESTED=${mt_zlib_option_requested}
+ 
+ 
++cat >>confdefs.h <<_ACEOF
++#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
++_ACEOF
  
-+    if test "x${mt_zlib_option_enabled}" = xyes; then :
+ 
++for ac_func in strtoll nl_langinfo setlocale
++do :
++  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
++ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
++if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
  
 +fi
++done
  
-     if test "x${ZLIB_OPTION_ENABLED}" = xyes; then
+-    if test "x${ZLIB_OPTION_ENABLED}" = xyes; then
++for ac_func in backtrace backtrace_symbols
++do :
++  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
++ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
++if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
+ 
++fi
++done
  
-@@ -20548,10 +11448,10 @@ fi
+-    LIBS_SAVE=$LIBS
+-    LDFLAGS_SAVE=$LDFLAGS
+-    CFLAGS_SAVE=$CFLAGS
+-    CXXFLAGS_SAVE=$CXXFLAGS
+-    CPPFLAGS_SAVE=$CPPFLAGS
++# Checks for typedefs, structures, and compiler characteristics.
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
++$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
++if test "${ac_cv_c_const+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
  
+-    mt_zlib_header_status=yes
++int
++main ()
++{
++/* FIXME: Include the comments suggested by Paul. */
++#ifndef __cplusplus
++  /* Ultrix mips cc rejects this.  */
++  typedef int charset[2];
++  const charset cs;
++  /* SunOS 4.1.1 cc rejects this.  */
++  char const *const *pcpcc;
++  char **ppc;
++  /* NEC SVR4.0.2 mips cc rejects this.  */
++  struct point {int x, y;};
++  static struct point const zero = {0,0};
++  /* AIX XL C 1.02.0.0 rejects this.
++     It does not let you subtract one const X* pointer from another in
++     an arm of an if-expression whose if-part is not a constant
++     expression */
++  const char *g = "string";
++  pcpcc = &g + (g ? g-g : 0);
++  /* HPUX 7.0 cc rejects these. */
++  ++pcpcc;
++  ppc = (char**) pcpcc;
++  pcpcc = (char const *const *) ppc;
++  { /* SCO 3.2v4 cc rejects this.  */
++    char *t;
++    char const *s = 0 ? (char *) 0 : (char const *) 0;
+ 
++    *t++ = 0;
++    if (s) return 0;
++  }
++  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
++    int x[] = {25, 17};
++    const int *foo = &x[0];
++    ++foo;
++  }
++  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
++    typedef const int *iptr;
++    iptr p = 0;
++    ++p;
++  }
++  { /* AIX XL C 1.02.0.0 rejects this saying
++       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
++    struct s { int j; const int *ap[3]; };
++    struct s *b; b->j = 5;
++  }
++  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
++    const int foo = 10;
++    if (!foo) return 0;
++  }
++  return !cs[0] && !zero.x;
++#endif
  
- # Check whether --with-zlib-h was given.
+-# Check whether --with-zlib-h was given.
 -if test "${with_zlib_h+set}" = set; then
-+if test "${with_zlib_h+set}" = set; then :
-   withval=$with_zlib_h;
-             mt_zlib_search_headers="$withval"
+-  withval=$with_zlib_h;
+-            mt_zlib_search_headers="$withval"
 -            { $as_echo "$as_me:$LINENO: Will search for zlib headers in $withval" >&5
-+            { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for zlib headers in $withval" >&5
- $as_echo "$as_me: Will search for zlib headers in $withval" >&6;}
+-$as_echo "$as_me: Will search for zlib headers in $withval" >&6;}
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_cv_c_const=yes
++else
++  ac_cv_c_const=no
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
++$as_echo "$ac_cv_c_const" >&6; }
++if test $ac_cv_c_const = no; then
  
++$as_echo "#define const /**/" >>confdefs.h
+ 
+ fi
  
-@@ -20564,145 +11464,8 @@ fi
-         CXXFLAGS="$CXXFLAGS -I${mt_zlib_search_headers}"
-         CPPFLAGS="$CPPFLAGS -I${mt_zlib_search_headers}"
-         as_ac_Header=`$as_echo "ac_cv_header_$mt_zlib_search_headers/zlib.h" | $as_tr_sh`
+-
+-    if test "$mt_zlib_search_headers" ; then
+-        unset ac_cv_header_zlib_h
+-        CFLAGS="$CFLAGS -I${mt_zlib_search_headers}"
+-        CXXFLAGS="$CXXFLAGS -I${mt_zlib_search_headers}"
+-        CPPFLAGS="$CPPFLAGS -I${mt_zlib_search_headers}"
+-        as_ac_Header=`$as_echo "ac_cv_header_$mt_zlib_search_headers/zlib.h" | $as_tr_sh`
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 -  { $as_echo "$as_me:$LINENO: checking for $mt_zlib_search_headers/zlib.h" >&5
 -$as_echo_n "checking for $mt_zlib_search_headers/zlib.h... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
--  $as_echo_n "(cached) " >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
++$as_echo_n "checking for inline... " >&6; }
++if test "${ac_cv_c_inline+set}" = set; then :
+   $as_echo_n "(cached) " >&6
 -fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
--else
+ else
 -  # Is the header compilable?
 -{ $as_echo "$as_me:$LINENO: checking $mt_zlib_search_headers/zlib.h usability" >&5
 -$as_echo_n "checking $mt_zlib_search_headers/zlib.h usability... " >&6; }
@@ -19596,7 +24991,10 @@ index f51d803..459bf70 100755
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++  ac_cv_c_inline=no
++for ac_kw in inline __inline__ __inline; do
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
 -$ac_includes_default
 -#include <$mt_zlib_search_headers/zlib.h>
 -_ACEOF
@@ -19622,11 +25020,19 @@ index f51d803..459bf70 100755
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++#ifndef __cplusplus
++typedef int foo_t;
++static $ac_kw foo_t static_foo () {return 0; }
++$ac_kw foo_t foo () {return 0; }
++#endif
+ 
 -	ac_header_compiler=no
--fi
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_cv_c_inline=$ac_kw
+ fi
 -
--rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 -$as_echo "$ac_header_compiler" >&6; }
 -
@@ -19662,10 +25068,14 @@ index f51d803..459bf70 100755
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++  test "$ac_cv_c_inline" != no && break
++done
+ 
 -  ac_header_preproc=no
--fi
--
+ fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
++$as_echo "$ac_cv_c_inline" >&6; }
+ 
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 -$as_echo "$ac_header_preproc" >&6; }
@@ -19698,13 +25108,29 @@ index f51d803..459bf70 100755
 -## ------------------------------- ##
 -_ASBOX
 -     ) | sed "s/^/$as_me: WARNING:     /" >&2
--    ;;
--esac
++case $ac_cv_c_inline in
++  inline | yes) ;;
++  *)
++    case $ac_cv_c_inline in
++      no) ac_val=;;
++      *) ac_val=$ac_cv_c_inline;;
++    esac
++    cat >>confdefs.h <<_ACEOF
++#ifndef __cplusplus
++#define inline $ac_val
++#endif
++_ACEOF
+     ;;
+ esac
 -{ $as_echo "$as_me:$LINENO: checking for $mt_zlib_search_headers/zlib.h" >&5
 -$as_echo_n "checking for $mt_zlib_search_headers/zlib.h... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
--  $as_echo_n "(cached) " >&6
--else
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
++$as_echo_n "checking for working volatile... " >&6; }
++if test "${ac_cv_c_volatile+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
 -  eval "$as_ac_Header=\$ac_header_preproc"
 -fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
@@ -19716,39 +25142,61 @@ index f51d803..459bf70 100755
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+ac_fn_cxx_check_header_mongrel "$LINENO" "$mt_zlib_search_headers/zlib.h" "$as_ac_Header" "$ac_includes_default"
-+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
  
-                 mt_zlib_cxxflags="-I${mt_zlib_search_headers}"
+-                mt_zlib_cxxflags="-I${mt_zlib_search_headers}"
++int
++main ()
++{
  
-@@ -20710,12 +11473,10 @@ else
++volatile int x;
++int * volatile y = (int *) 0;
++return !x && !y;
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_cv_c_volatile=yes
+ else
++  ac_cv_c_volatile=no
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5
++$as_echo "$ac_cv_c_volatile" >&6; }
++if test $ac_cv_c_volatile = no; then
  
-                 mt_zlib_header_status=missing
-                 if test "" = "pass"; then
+-                mt_zlib_header_status=missing
+-                if test "" = "pass"; then
 -                    { $as_echo "$as_me:$LINENO: zlib headers not found in requested location $mt_zlib_search_headers" >&5
-+                    { $as_echo "$as_me:${as_lineno-$LINENO}: zlib headers not found in requested location $mt_zlib_search_headers" >&5
- $as_echo "$as_me: zlib headers not found in requested location $mt_zlib_search_headers" >&6;}
-                 else
+-$as_echo "$as_me: zlib headers not found in requested location $mt_zlib_search_headers" >&6;}
+-                else
 -                    { { $as_echo "$as_me:$LINENO: error: zlib headers not found in requested location $mt_zlib_search_headers" >&5
 -$as_echo "$as_me: error: zlib headers not found in requested location $mt_zlib_search_headers" >&2;}
 -   { (exit 1); exit 1; }; }
-+                    as_fn_error $? "zlib headers not found in requested location $mt_zlib_search_headers" "$LINENO" 5
-                 fi
- 
+-                fi
+-
++$as_echo "#define volatile /**/" >>confdefs.h
  
-@@ -20724,140 +11485,9 @@ fi
+ fi
  
-     else
-         unset ac_cv_header_zlib_h
+-
+-    else
+-        unset ac_cv_header_zlib_h
 -        if test "${ac_cv_header_zlib_h+set}" = set; then
 -  { $as_echo "$as_me:$LINENO: checking for zlib.h" >&5
 -$as_echo_n "checking for zlib.h... " >&6; }
 -if test "${ac_cv_header_zlib_h+set}" = set; then
--  $as_echo_n "(cached) " >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
++$as_echo_n "checking return type of signal handlers... " >&6; }
++if test "${ac_cv_type_signal+set}" = set; then :
+   $as_echo_n "(cached) " >&6
 -fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
 -$as_echo "$ac_cv_header_zlib_h" >&6; }
--else
+ else
 -  # Is the header compilable?
 -{ $as_echo "$as_me:$LINENO: checking zlib.h usability" >&5
 -$as_echo_n "checking zlib.h usability... " >&6; }
@@ -19757,10 +25205,21 @@ index f51d803..459bf70 100755
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
 -$ac_includes_default
 -#include <zlib.h>
--_ACEOF
++#include <sys/types.h>
++#include <signal.h>
++
++int
++main ()
++{
++return *(signal (0, 0)) (0) == 1;
++  ;
++  return 0;
++}
+ _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -19780,19 +25239,23 @@ index f51d803..459bf70 100755
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_header_compiler=yes
--else
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_cv_type_signal=int
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_header_compiler=no
--fi
-+        ac_fn_cxx_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
-+if test "x$ac_cv_header_zlib_h" = x""yes; then :
- 
--rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++  ac_cv_type_signal=void
+ fi
+-
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 -$as_echo "$ac_header_compiler" >&6; }
--
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
++$as_echo "$ac_cv_type_signal" >&6; }
+ 
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking zlib.h presence" >&5
 -$as_echo_n "checking zlib.h presence... " >&6; }
@@ -19803,7 +25266,9 @@ index f51d803..459bf70 100755
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -#include <zlib.h>
--_ACEOF
++cat >>confdefs.h <<_ACEOF
++#define RETSIGTYPE $ac_cv_type_signal
+ _ACEOF
 -if { (ac_try="$ac_cpp conftest.$ac_ext"
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -19825,14 +25290,14 @@ index f51d803..459bf70 100755
 -else
 -  $as_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
 -{ $as_echo "$as_me:$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_cxx_preproc_warn_flag in
 -  yes:no: )
@@ -19872,17 +25337,19 @@ index f51d803..459bf70 100755
 -fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
 -$as_echo "$ac_cv_header_zlib_h" >&6; }
--
++ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
++if test "x$ac_cv_type_pid_t" = x""yes; then :
+ 
 -fi
 -if test "x$ac_cv_header_zlib_h" = x""yes; then
 -  :
  else
  
-                 CFLAGS="$CFLAGS -I$MT_SEARCHPATH_HEADERS"
-@@ -20865,145 +11495,8 @@ else
-                 CPPFLAGS="$CPPFLAGS -I$MT_SEARCHPATH_HEADERS"
-                 unset ac_cv_header_zlib_h
-                 as_ac_Header=`$as_echo "ac_cv_header_$MT_SEARCHPATH_HEADERS/zlib.h" | $as_tr_sh`
+-                CFLAGS="$CFLAGS -I$MT_SEARCHPATH_HEADERS"
+-                CXXFLAGS="$CXXFLAGS -I$MT_SEARCHPATH_HEADERS"
+-                CPPFLAGS="$CPPFLAGS -I$MT_SEARCHPATH_HEADERS"
+-                unset ac_cv_header_zlib_h
+-                as_ac_Header=`$as_echo "ac_cv_header_$MT_SEARCHPATH_HEADERS/zlib.h" | $as_tr_sh`
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 -  { $as_echo "$as_me:$LINENO: checking for $MT_SEARCHPATH_HEADERS/zlib.h" >&5
 -$as_echo_n "checking for $MT_SEARCHPATH_HEADERS/zlib.h... " >&6; }
@@ -19905,7 +25372,9 @@ index f51d803..459bf70 100755
 -/* end confdefs.h.  */
 -$ac_includes_default
 -#include <$MT_SEARCHPATH_HEADERS/zlib.h>
--_ACEOF
++cat >>confdefs.h <<_ACEOF
++#define pid_t int
+ _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -19928,14 +25397,16 @@ index f51d803..459bf70 100755
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	ac_header_compiler=no
--fi
--
+ fi
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 -$as_echo "$ac_header_compiler" >&6; }
--
++ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
++if test "x$ac_cv_type_size_t" = x""yes; then :
+ 
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking $MT_SEARCHPATH_HEADERS/zlib.h presence" >&5
 -$as_echo_n "checking $MT_SEARCHPATH_HEADERS/zlib.h presence... " >&6; }
@@ -19965,17 +25436,20 @@ index f51d803..459bf70 100755
 -	 test ! -s conftest.err
 -       }; then
 -  ac_header_preproc=yes
--else
+ else
 -  $as_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
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 -$as_echo "$ac_header_preproc" >&6; }
--
++cat >>confdefs.h <<_ACEOF
++#define size_t unsigned int
++_ACEOF
+ 
 -# So?  What about this header?
 -case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
 -  yes:no: )
@@ -20012,57 +25486,295 @@ index f51d803..459bf70 100755
 -  $as_echo_n "(cached) " >&6
 -else
 -  eval "$as_ac_Header=\$ac_header_preproc"
--fi
+ fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
--
+ 
 -fi
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+ac_fn_cxx_check_header_mongrel "$LINENO" "$MT_SEARCHPATH_HEADERS/zlib.h" "$as_ac_Header" "$ac_includes_default"
-+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
++ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
++case $ac_cv_c_int64_t in #(
++  no|yes) ;; #(
++  *)
++
++cat >>confdefs.h <<_ACEOF
++#define int64_t $ac_cv_c_int64_t
++_ACEOF
++;;
++esac
+ 
+-                        mt_zlib_cxxflags="-I${MT_SEARCHPATH_HEADERS}"
++ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
++if test "x$ac_cv_type_ssize_t" = x""yes; then :
+ 
+ else
+ 
+-                        mt_zlib_header_status=missing
+-
++cat >>confdefs.h <<_ACEOF
++#define ssize_t int
++_ACEOF
+ 
+ fi
+ 
++ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
++case $ac_cv_c_uint32_t in #(
++  no|yes) ;; #(
++  *)
+ 
++$as_echo "#define _UINT32_T 1" >>confdefs.h
+ 
+ 
+-fi
+-
++cat >>confdefs.h <<_ACEOF
++#define uint32_t $ac_cv_c_uint32_t
++_ACEOF
++;;
++  esac
+ 
+-    fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
++$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
++if test "${ac_cv_struct_tm+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <sys/types.h>
++#include <time.h>
+ 
+-    if test "x$mt_zlib_header_status" != xyes; then
+-        mt_zlib_cxxflags=""
+-    fi
++int
++main ()
++{
++struct tm tm;
++				     int *p = &tm.tm_sec;
++				     return !p;
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_cv_struct_tm=time.h
++else
++  ac_cv_struct_tm=sys/time.h
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
++$as_echo "$ac_cv_struct_tm" >&6; }
++if test $ac_cv_struct_tm = sys/time.h; then
+ 
+-    LIBS=$LIBS_SAVE
+-    LDFLAGS=$LDFLAGS_SAVE
+-    CFLAGS=$CFLAGS_SAVE
+-    CXXFLAGS=$CXXFLAGS_SAVE
+-    CPPFLAGS=$CPPFLAGS_SAVE
++$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
  
-                         mt_zlib_cxxflags="-I${MT_SEARCHPATH_HEADERS}"
+-    mt_zlib_package_status=${mt_zlib_header_status}
++fi
  
-@@ -21047,10 +11540,10 @@ fi
+-    if test "x$mt_zlib_package_status" = xyes; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
++$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
++if test "${ac_cv_c_bigendian+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  ac_cv_c_bigendian=unknown
++    # See if we're dealing with a universal compiler.
++    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#ifndef __APPLE_CC__
++	       not a universal capable compiler
++	     #endif
++	     typedef int dummy;
+ 
+-    mt_zlib_arg_default=yes
+-    mt_zlib_library_status=yes
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
+ 
+-    LIBS_SAVE=$LIBS
+-    LDFLAGS_SAVE=$LDFLAGS
+-    CFLAGS_SAVE=$CFLAGS
+-    CXXFLAGS_SAVE=$CXXFLAGS
+-    CPPFLAGS_SAVE=$CPPFLAGS
++	# Check for potential -arch flags.  It is not universal unless
++	# there are at least two -arch flags with different values.
++	ac_arch=
++	ac_prev=
++	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
++	 if test -n "$ac_prev"; then
++	   case $ac_word in
++	     i?86 | x86_64 | ppc | ppc64)
++	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
++		 ac_arch=$ac_word
++	       else
++		 ac_cv_c_bigendian=universal
++		 break
++	       fi
++	       ;;
++	   esac
++	   ac_prev=
++	 elif test "x$ac_word" = "x-arch"; then
++	   ac_prev=arch
++	 fi
++       done
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++    if test $ac_cv_c_bigendian = unknown; then
++      # See if sys/param.h defines the BYTE_ORDER macro.
++      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <sys/types.h>
++	     #include <sys/param.h>
  
++int
++main ()
++{
++#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
++		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
++		     && LITTLE_ENDIAN)
++	      bogus endian macros
++	     #endif
  
- # Check whether --with-zlib-libs was given.
+-# Check whether --with-zlib-libs was given.
 -if test "${with_zlib_libs+set}" = set; then
-+if test "${with_zlib_libs+set}" = set; then :
-   withval=$with_zlib_libs;
-             mt_zlib_search_libs="$withval"
+-  withval=$with_zlib_libs;
+-            mt_zlib_search_libs="$withval"
 -            { $as_echo "$as_me:$LINENO: Will search for zlib libs in $withval" >&5
-+            { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for zlib libs in $withval" >&5
- $as_echo "$as_me: Will search for zlib libs in $withval" >&6;}
+-$as_echo "$as_me: Will search for zlib libs in $withval" >&6;}
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++  # It does; now see whether it defined to BIG_ENDIAN or not.
++	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <sys/types.h>
++		#include <sys/param.h>
  
++int
++main ()
++{
++#if BYTE_ORDER != BIG_ENDIAN
++		 not big endian
++		#endif
  
-@@ -21060,18 +11553,14 @@ fi
-     if test "$mt_zlib_search_libs" ; then
-         unset ac_cv_lib_z_uncompress
-         LDFLAGS="$LDFLAGS -L$mt_zlib_search_libs"
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_cv_c_bigendian=yes
++else
++  ac_cv_c_bigendian=no
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++    fi
++    if test $ac_cv_c_bigendian = unknown; then
++      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
++      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <limits.h>
++
++int
++main ()
++{
++#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
++	      bogus endian macros
++	     #endif
+ 
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++  # It does; now see whether it defined to _BIG_ENDIAN or not.
++	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <limits.h>
+ 
+-    if test "$mt_zlib_search_libs" ; then
+-        unset ac_cv_lib_z_uncompress
+-        LDFLAGS="$LDFLAGS -L$mt_zlib_search_libs"
 -        { $as_echo "$as_me:$LINENO: checking for uncompress in -lz" >&5
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uncompress in -lz" >&5
- $as_echo_n "checking for uncompress in -lz... " >&6; }
+-$as_echo_n "checking for uncompress in -lz... " >&6; }
 -if test "${ac_cv_lib_z_uncompress+set}" = set; then
-+if test "${ac_cv_lib_z_uncompress+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
-   ac_check_lib_save_LIBS=$LIBS
- LIBS="-lz  $LIBS"
+-  $as_echo_n "(cached) " >&6
+-else
+-  ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lz  $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
--_ACEOF
++int
++main ()
++{
++#ifndef _BIG_ENDIAN
++		 not big endian
++		#endif
++
++  ;
++  return 0;
++}
+ _ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_cv_c_bigendian=yes
++else
++  ac_cv_c_bigendian=no
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++    fi
++    if test $ac_cv_c_bigendian = unknown; then
++      # Compile a test program.
++      if test "$cross_compiling" = yes; then :
++  # Try to guess by grepping values from an object file.
++	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
++short int ascii_mm[] =
++		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
++		short int ascii_ii[] =
++		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
++		int use_ascii (int i) {
++		  return ascii_mm[i] + ascii_ii[i];
++		}
++		short int ebcdic_ii[] =
++		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
++		short int ebcdic_mm[] =
++		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
++		int use_ebcdic (int i) {
++		  return ebcdic_mm[i] + ebcdic_ii[i];
++		}
++		extern int foo;
  
- /* Override any GCC internal prototype to avoid an error.
-@@ -21089,43 +11578,18 @@ return uncompress ();
+-/* 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 uncompress ();
+ int
+ main ()
+ {
+-return uncompress ();
++return use_ascii (foo) == use_ebcdic (foo);
+   ;
    return 0;
  }
  _ACEOF
@@ -20087,69 +25799,196 @@ index f51d803..459bf70 100755
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
-+if ac_fn_cxx_try_link "$LINENO"; then :
-   ac_cv_lib_z_uncompress=yes
+-  ac_cv_lib_z_uncompress=yes
++if ac_fn_c_try_compile "$LINENO"; then :
++  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
++	      ac_cv_c_bigendian=yes
++	    fi
++	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
++	      if test "$ac_cv_c_bigendian" = unknown; then
++		ac_cv_c_bigendian=no
++	      else
++		# finding both strings is unlikely to happen, but who knows?
++		ac_cv_c_bigendian=unknown
++	      fi
++	    fi
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++$ac_includes_default
++int
++main ()
++{
++
++	     /* Are we little or big endian?  From Harbison&Steele.  */
++	     union
++	     {
++	       long int l;
++	       char c[sizeof (long int)];
++	     } u;
++	     u.l = 1;
++	     return u.c[sizeof (long int) - 1] == 1;
++
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_run "$LINENO"; then :
++  ac_cv_c_bigendian=no
++else
++  ac_cv_c_bigendian=yes
++fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
++fi
++
++    fi
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
++$as_echo "$ac_cv_c_bigendian" >&6; }
++ case $ac_cv_c_bigendian in #(
++   yes)
++     $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
++;; #(
++   no)
++      ;; #(
++   universal)
++
++$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
++
++     ;; #(
++   *)
++     as_fn_error $? "unknown endianness
++ presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5  ;;
++ esac
+ 
 -	ac_cv_lib_z_uncompress=no
-+  ac_cv_lib_z_uncompress=no
- fi
--
+-fi
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      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
+-LIBS=$ac_check_lib_save_LIBS
++ac_fn_c_check_decl "$LINENO" "LONG_MAX" "ac_cv_have_decl_LONG_MAX" "#include <limits.h>
++"
++if test "x$ac_cv_have_decl_LONG_MAX" = x""yes; then :
++
++
++$as_echo "#define HAVE_LONG_MAX 1" >>confdefs.h
++
++            have_long_max=1
++
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_z_uncompress" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_uncompress" >&5
- $as_echo "$ac_cv_lib_z_uncompress" >&6; }
+-$as_echo "$ac_cv_lib_z_uncompress" >&6; }
 -if test "x$ac_cv_lib_z_uncompress" = x""yes; then
-+if test "x$ac_cv_lib_z_uncompress" = x""yes; then :
  
-                 mt_zlib_libs="-lz"
-                 mt_zlib_ldflags="-L$mt_zlib_search_libs"
-@@ -21134,12 +11598,10 @@ else
+-                mt_zlib_libs="-lz"
+-                mt_zlib_ldflags="-L$mt_zlib_search_libs"
++
++
++ac_fn_c_check_decl "$LINENO" "LLONG_MAX" "ac_cv_have_decl_LLONG_MAX" "#include <limits.h>
++"
++if test "x$ac_cv_have_decl_LLONG_MAX" = x""yes; then :
++
++
++$as_echo "#define MAXLLONG LLONG_MAX" >>confdefs.h
++
+ 
+ else
  
-                 mt_zlib_library_status=missing
-                 if test "" = "pass"; then
+-                mt_zlib_library_status=missing
+-                if test "" = "pass"; then
 -                    { $as_echo "$as_me:$LINENO: zlib library not found in requested location $mt_zlib_search_libs" >&5
-+                    { $as_echo "$as_me:${as_lineno-$LINENO}: zlib library not found in requested location $mt_zlib_search_libs" >&5
- $as_echo "$as_me: zlib library not found in requested location $mt_zlib_search_libs" >&6;}
-                 else
+-$as_echo "$as_me: zlib library not found in requested location $mt_zlib_search_libs" >&6;}
+-                else
 -                    { { $as_echo "$as_me:$LINENO: error: zlib library not found in requested location $mt_zlib_search_libs" >&5
 -$as_echo "$as_me: error: zlib library not found in requested location $mt_zlib_search_libs" >&2;}
 -   { (exit 1); exit 1; }; }
-+                    as_fn_error $? "zlib library not found in requested location $mt_zlib_search_libs" "$LINENO" 5
-                 fi
+-                fi
++            ac_fn_c_check_decl "$LINENO" "__LONG_LONG_MAX__" "ac_cv_have_decl___LONG_LONG_MAX__" "#include <limits.h>
++"
++if test "x$ac_cv_have_decl___LONG_LONG_MAX__" = x""yes; then :
++
++
++$as_echo "#define MAXLLONG __LONG_LONG_MAX__" >>confdefs.h
++
++else
++
++                    if test "$have_long_max" -eq 1; then
  
++$as_echo "#define MAXLLONG LONG_MAX" >>confdefs.h
++
++                    fi
  
-@@ -21147,18 +11609,14 @@ fi
+ fi
  
-     else
-         unset ac_cv_lib_z_uncompress
+-    else
+-        unset ac_cv_lib_z_uncompress
 -        { $as_echo "$as_me:$LINENO: checking for uncompress in -lz" >&5
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uncompress in -lz" >&5
- $as_echo_n "checking for uncompress in -lz... " >&6; }
+-$as_echo_n "checking for uncompress in -lz... " >&6; }
 -if test "${ac_cv_lib_z_uncompress+set}" = set; then
-+if test "${ac_cv_lib_z_uncompress+set}" = set; then :
++
++
++fi
++
++
++# Check whether --enable-rpl-malloc was given.
++if test "${enable_rpl_malloc+set}" = set; then :
++  enableval=$enable_rpl_malloc;
++            if test "x$enableval" = xno; then
++                ac_cv_func_malloc_0_nonnull=yes
++                ac_cv_func_realloc_0_nonnull=yes
++                { $as_echo "$as_me:${as_lineno-$LINENO}: Disabling redefinition of malloc to rpl_malloc" >&5
++$as_echo "$as_me: Disabling redefinition of malloc to rpl_malloc" >&6;}
++                { $as_echo "$as_me:${as_lineno-$LINENO}: Disabling redefinition of realloc to rpl_realloc" >&5
++$as_echo "$as_me: Disabling redefinition of realloc to rpl_realloc" >&6;}
++                { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Use this feature only if you are sure that you are building for GNU C!" >&5
++$as_echo "$as_me: WARNING: Use this feature only if you are sure that you are building for GNU C!" >&2;}
++            fi
++
++
++fi
++
++
++
++# Checks for library functions.
++# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
++# for constant arguments.  Useless!
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
++$as_echo_n "checking for working alloca.h... " >&6; }
++if test "${ac_cv_working_alloca_h+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
-   ac_check_lib_save_LIBS=$LIBS
- LIBS="-lz  $LIBS"
+-  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
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
- 
- /* Override any GCC internal prototype to avoid an error.
-@@ -21176,43 +11634,18 @@ return uncompress ();
+-
+-/* 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 uncompress ();
++#include <alloca.h>
+ int
+ main ()
+ {
+-return uncompress ();
++char *p = (char *) alloca (2 * sizeof (int));
++			  if (p) return 0;
+   ;
    return 0;
  }
  _ACEOF
@@ -20174,54 +26013,91 @@ index f51d803..459bf70 100755
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
-+if ac_fn_cxx_try_link "$LINENO"; then :
-   ac_cv_lib_z_uncompress=yes
+-  ac_cv_lib_z_uncompress=yes
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_working_alloca_h=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_lib_z_uncompress=no
-+  ac_cv_lib_z_uncompress=no
++  ac_cv_working_alloca_h=no
  fi
 -
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
+-LIBS=$ac_check_lib_save_LIBS
 +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:$LINENO: result: $ac_cv_lib_z_uncompress" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_uncompress" >&5
- $as_echo "$ac_cv_lib_z_uncompress" >&6; }
+-$as_echo "$ac_cv_lib_z_uncompress" >&6; }
 -if test "x$ac_cv_lib_z_uncompress" = x""yes; then
-+if test "x$ac_cv_lib_z_uncompress" = x""yes; then :
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
++$as_echo "$ac_cv_working_alloca_h" >&6; }
++if test $ac_cv_working_alloca_h = yes; then
  
-                 mt_zlib_libs="-lz"
+-                mt_zlib_libs="-lz"
++$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
  
-@@ -21220,18 +11653,14 @@ else
+-else
++fi
  
-                 LDFLAGS="$LDFLAGS -L$MT_SEARCHPATH_LIBS"
-                 unset ac_cv_lib_z_uncompress
+-                LDFLAGS="$LDFLAGS -L$MT_SEARCHPATH_LIBS"
+-                unset ac_cv_lib_z_uncompress
 -                { $as_echo "$as_me:$LINENO: checking for uncompress in -lz" >&5
-+                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uncompress in -lz" >&5
- $as_echo_n "checking for uncompress in -lz... " >&6; }
+-$as_echo_n "checking for uncompress in -lz... " >&6; }
 -if test "${ac_cv_lib_z_uncompress+set}" = set; then
-+if test "${ac_cv_lib_z_uncompress+set}" = set; then :
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
++$as_echo_n "checking for alloca... " >&6; }
++if test "${ac_cv_func_alloca_works+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
-   ac_check_lib_save_LIBS=$LIBS
- LIBS="-lz  $LIBS"
+-  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
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
- 
- /* Override any GCC internal prototype to avoid an error.
-@@ -21249,43 +11678,18 @@ return uncompress ();
+-
+-/* 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"
++#ifdef __GNUC__
++# define alloca __builtin_alloca
++#else
++# ifdef _MSC_VER
++#  include <malloc.h>
++#  define alloca _alloca
++# else
++#  ifdef HAVE_ALLOCA_H
++#   include <alloca.h>
++#  else
++#   ifdef _AIX
++ #pragma alloca
++#   else
++#    ifndef alloca /* predefined by HP cc +Olibcalls */
++char *alloca ();
++#    endif
++#   endif
++#  endif
++# endif
+ #endif
+-char uncompress ();
++
+ int
+ main ()
+ {
+-return uncompress ();
++char *p = (char *) alloca (1);
++				    if (p) return 0;
+   ;
    return 0;
  }
  _ACEOF
@@ -20246,150 +26122,563 @@ index f51d803..459bf70 100755
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
-+if ac_fn_cxx_try_link "$LINENO"; then :
-   ac_cv_lib_z_uncompress=yes
+-  ac_cv_lib_z_uncompress=yes
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_func_alloca_works=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_lib_z_uncompress=no
-+  ac_cv_lib_z_uncompress=no
++  ac_cv_func_alloca_works=no
  fi
 -
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
+-LIBS=$ac_check_lib_save_LIBS
 +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:$LINENO: result: $ac_cv_lib_z_uncompress" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_uncompress" >&5
- $as_echo "$ac_cv_lib_z_uncompress" >&6; }
+-$as_echo "$ac_cv_lib_z_uncompress" >&6; }
 -if test "x$ac_cv_lib_z_uncompress" = x""yes; then
-+if test "x$ac_cv_lib_z_uncompress" = x""yes; then :
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
++$as_echo "$ac_cv_func_alloca_works" >&6; }
+ 
+-                        mt_zlib_libs="-lz"
+-                        mt_zlib_ldflags="-L$MT_SEARCHPATH_LIBS"
++if test $ac_cv_func_alloca_works = yes; then
+ 
+-else
++$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
+ 
+-                        mt_zlib_library_status=missing
++else
++  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
++# that cause trouble.  Some versions do not even contain alloca or
++# contain a buggy version.  If you still want to use their alloca,
++# use ar to extract alloca.o from them instead of compiling alloca.c.
+ 
++ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
+ 
+-fi
++$as_echo "#define C_ALLOCA 1" >>confdefs.h
+ 
+ 
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
++$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
++if test "${ac_cv_os_cray+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#if defined CRAY && ! defined CRAY2
++webecray
++#else
++wenotbecray
++#endif
  
-                         mt_zlib_libs="-lz"
-                         mt_zlib_ldflags="-L$MT_SEARCHPATH_LIBS"
-@@ -21331,16 +11735,12 @@ fi
-     if ((test "x${ZLIB_OPTION_ENABLED}" = xyes) &&
-         (test "x${ZLIB_OPTION_REQUESTED}" = xyes) &&
-         (test "x$mt_zlib_status" != xyes) && (test "" != "pass")); then
++_ACEOF
++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
++  $EGREP "webecray" >/dev/null 2>&1; then :
++  ac_cv_os_cray=yes
++else
++  ac_cv_os_cray=no
+ fi
++rm -f conftest*
+ 
+-    fi
+-
+-    if test "x$mt_zlib_library_status" != xyes; then
+-        mt_zlib_libs=""
+-        mt_zlib_ldflags=""
+-    fi
+-
+-    LIBS=$LIBS_SAVE
+-    LDFLAGS=$LDFLAGS_SAVE
+-    CFLAGS=$CFLAGS_SAVE
+-    CXXFLAGS=$CXXFLAGS_SAVE
+-    CPPFLAGS=$CPPFLAGS_SAVE
+-
+-        mt_zlib_package_status=${mt_zlib_library_status}
+-    fi
+-
+-    if test "x$mt_zlib_package_status" = xyes; then
+-        ZLIB_CFLAGS=${mt_zlib_cxxflags}
+-        ZLIB_LIBS=${mt_zlib_libs}
+-        ZLIB_LDFLAGS=${mt_zlib_ldflags}
+-    fi
+-
+-        mt_zlib_status=${mt_zlib_package_status}
+-    else
+-        mt_zlib_status=disabled
+-    fi
+-
+-    if ((test "x${ZLIB_OPTION_ENABLED}" = xyes) &&
+-        (test "x${ZLIB_OPTION_REQUESTED}" = xyes) &&
+-        (test "x$mt_zlib_status" != xyes) && (test "" != "pass")); then
 -        { { $as_echo "$as_me:$LINENO: error: unable to configure zlib support" >&5
 -$as_echo "$as_me: error: unable to configure zlib support" >&2;}
 -   { (exit 1); exit 1; }; }
-+        as_fn_error $? "unable to configure zlib support" "$LINENO" 5
-     fi
- 
-     if test "x$mt_zlib_status" = xyes; then
+-    fi
+-
+-    if test "x$mt_zlib_status" = xyes; then
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
++$as_echo "$ac_cv_os_cray" >&6; }
++if test $ac_cv_os_cray = yes; then
++  for ac_func in _getb67 GETB67 getb67; do
++    as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
++ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
++if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
  
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_ZLIB 1
--_ACEOF
-+$as_echo "#define HAVE_ZLIB 1" >>confdefs.h
++cat >>confdefs.h <<_ACEOF
++#define CRAY_STACKSEG_END $ac_func
+ _ACEOF
  
-     fi
+-    fi
+-
+-    ZLIB_STATUS=${mt_zlib_status}
+-
+-
+-
+-
+-
+-
++    break
++fi
  
-@@ -21356,19 +11756,15 @@ _ACEOF
- if test "x$ZLIB_STATUS" = xyes; then
-     if test "x$DB_AUTOCREATE_OPTION_ENABLED" = xyes; then
++  done
++fi
+ 
+-if test "x$ZLIB_STATUS" = xyes; then
+-    if test "x$DB_AUTOCREATE_OPTION_ENABLED" = xyes; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
++$as_echo_n "checking stack direction for C alloca... " >&6; }
++if test "${ac_cv_c_stack_direction+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test "$cross_compiling" = yes; then :
++  ac_cv_c_stack_direction=0
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++$ac_includes_default
++int
++find_stack_direction ()
++{
++  static char *addr = 0;
++  auto char dummy;
++  if (addr == 0)
++    {
++      addr = &dummy;
++      return find_stack_direction ();
++    }
++  else
++    return (&dummy > addr) ? 1 : -1;
++}
  
 -cat >>confdefs.h <<\_ACEOF
 -#define AUTO_CREATE_DATABASE 1
--_ACEOF
-+$as_echo "#define AUTO_CREATE_DATABASE 1" >>confdefs.h
- 
-     fi
++int
++main ()
++{
++  return find_stack_direction () < 0;
++}
+ _ACEOF
+-
+-    fi
++if ac_fn_c_try_run "$LINENO"; then :
++  ac_cv_c_stack_direction=1
  else
-     if test "x$DB_AUTOCREATE_OPTION_ENABLED" = xyes; then
-         if test "x$DB_AUTOCREATE_OPTION_REQUESTED" = xyes; then
+-    if test "x$DB_AUTOCREATE_OPTION_ENABLED" = xyes; then
+-        if test "x$DB_AUTOCREATE_OPTION_REQUESTED" = xyes; then
 -            { { $as_echo "$as_me:$LINENO: error: Automatic database creation not possible due to missing zlib headers/libraries" >&5
 -$as_echo "$as_me: error: Automatic database creation not possible due to missing zlib headers/libraries" >&2;}
 -   { (exit 1); exit 1; }; }
-+            as_fn_error $? "Automatic database creation not possible due to missing zlib headers/libraries" "$LINENO" 5
-         else
+-        else
 -            { $as_echo "$as_me:$LINENO: WARNING: Automatic database creation not possible due to missing zlib headers/libraries" >&5
-+            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Automatic database creation not possible due to missing zlib headers/libraries" >&5
- $as_echo "$as_me: WARNING: Automatic database creation not possible due to missing zlib headers/libraries" >&2;}
-             DB_AUTOCREATE_OPTION_ENABLED=disabled
-         fi
-@@ -21402,13 +11798,13 @@ _ACEOF
-     case $ac_val in #(
-     *${as_nl}*)
-       case $ac_var in #(
+-$as_echo "$as_me: WARNING: Automatic database creation not possible due to missing zlib headers/libraries" >&2;}
+-            DB_AUTOCREATE_OPTION_ENABLED=disabled
+-        fi
+-    fi
++  ac_cv_c_stack_direction=-1
++fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
+ fi
+ 
+-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.
+-
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
++$as_echo "$ac_cv_c_stack_direction" >&6; }
++cat >>confdefs.h <<_ACEOF
++#define STACK_DIRECTION $ac_cv_c_stack_direction
+ _ACEOF
+ 
+-# The following way of writing the cache mishandles newlines in values,
+-# but we know of no workaround that is simple, portable, and efficient.
+-# So, we kill variables containing newlines.
+-# Ultrix sh set writes to stderr and can't be redirected directly,
+-# and sets the high bit in the cache file unless we assign to the vars.
+-(
+-  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+-    eval ac_val=\$$ac_var
+-    case $ac_val in #(
+-    *${as_nl}*)
+-      case $ac_var in #(
 -      *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
-+      *_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= ;; #(
+-$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= ;; #(
 -      *) $as_unset $ac_var ;;
-+      *) { eval $ac_var=; unset $ac_var;} ;;
-       esac ;;
-     esac
-   done
-@@ -21416,8 +11812,8 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
-   (set) 2>&1 |
-     case $as_nl`(ac_space=' '; set) 2>&1` in #(
-     *${as_nl}ac_space=\ *)
+-      esac ;;
+-    esac
+-  done
+ 
+-  (set) 2>&1 |
+-    case $as_nl`(ac_space=' '; set) 2>&1` in #(
+-    *${as_nl}ac_space=\ *)
 -      # `set' does not quote correctly, so add quotes (double-quote
 -      # substitution turns \\\\ into \\, and sed turns \\ into \).
-+      # `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"
-@@ -21440,11 +11836,11 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
- if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
-   if test -w "$cache_file"; then
-     test "x$cache_file" != "x/dev/null" &&
+-      sed -n \
+-	"s/'/'\\\\''/g;
+-	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+-      ;; #(
+-    *)
+-      # `set' quotes correctly as required by POSIX, so do not add quotes.
+-      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+-      ;;
+-    esac |
+-    sort
+-) |
+-  sed '
+-     /^ac_cv_env_/b end
+-     t clear
+-     :clear
+-     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+-     t end
+-     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+-     :end' >>confcache
+-if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+-  if test -w "$cache_file"; then
+-    test "x$cache_file" != "x/dev/null" &&
 -      { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5
-+      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
- $as_echo "$as_me: updating cache $cache_file" >&6;}
-     cat confcache >$cache_file
-   else
+-$as_echo "$as_me: updating cache $cache_file" >&6;}
+-    cat confcache >$cache_file
+-  else
 -    { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
-+    { $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
+-$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+-  fi
  fi
-@@ -21470,7 +11866,7 @@ fi
-     fi
+-rm -f confcache
+ 
+-######### SQLite3
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether closedir returns void" >&5
++$as_echo_n "checking whether closedir returns void... " >&6; }
++if test "${ac_cv_func_closedir_void+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test "$cross_compiling" = yes; then :
++  ac_cv_func_closedir_void=yes
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++$ac_includes_default
++#include <$ac_header_dirent>
++#ifndef __cplusplus
++int closedir ();
++#endif
+ 
+-if test "x$RT_STATUS" = xyes; then
+-    LDFLAGS="$LDFLAGS $RT_LDFLAGS $RT_LIBS"
++int
++main ()
++{
++return closedir (opendir (".")) != 0;
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_run "$LINENO"; then :
++  ac_cv_func_closedir_void=no
++else
++  ac_cv_func_closedir_void=yes
++fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
+ fi
+ 
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_closedir_void" >&5
++$as_echo "$ac_cv_func_closedir_void" >&6; }
++if test $ac_cv_func_closedir_void = yes; then
  
-     # Check whether --enable-sqlite3 was given.
+-    mt_sqlite3_status=yes
+-
++$as_echo "#define CLOSEDIR_VOID 1" >>confdefs.h
+ 
++fi
+ 
+-    mt_sqlite3_option_enabled=
+-    mt_sqlite3_option_requested=no
+-    if test "xdisable" = xdisable; then
+-        mt_sqlite3_option_enabled=yes
+-    else
+-        mt_sqlite3_option_enabled=no
+-    fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
++$as_echo_n "checking for error_at_line... " >&6; }
++if test "${ac_cv_lib_error_at_line+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <error.h>
++int
++main ()
++{
++error_at_line (0, 0, "", 0, "an error occurred");
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_error_at_line=yes
++else
++  ac_cv_lib_error_at_line=no
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
++$as_echo "$ac_cv_lib_error_at_line" >&6; }
++if test $ac_cv_lib_error_at_line = no; then
++  case " $LIBOBJS " in
++  *" error.$ac_objext "* ) ;;
++  *) LIBOBJS="$LIBOBJS error.$ac_objext"
++ ;;
++esac
+ 
+-    # Check whether --enable-sqlite3 was given.
 -if test "${enable_sqlite3+set}" = set; then
-+if test "${enable_sqlite3+set}" = set; then :
-   enableval=$enable_sqlite3;
-             mt_sqlite3_option_enabled=$enableval
-             mt_sqlite3_option_requested=yes
-@@ -21485,7 +11881,9 @@ fi
+-  enableval=$enable_sqlite3;
+-            mt_sqlite3_option_enabled=$enableval
+-            mt_sqlite3_option_requested=yes
++fi
  
++for ac_header in vfork.h
++do :
++  ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
++if test "x$ac_cv_header_vfork_h" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_VFORK_H 1
++_ACEOF
  
+ fi
  
-+    if test "x${mt_sqlite3_option_enabled}" = xyes; then :
++done
+ 
+-    SQLITE3_OPTION_ENABLED=${mt_sqlite3_option_enabled}
+-    SQLITE3_OPTION_REQUESTED=${mt_sqlite3_option_requested}
++for ac_func in fork vfork
++do :
++  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
++ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
++if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
  
 +fi
++done
  
-     if test "x${SQLITE3_OPTION_ENABLED}" = xyes; then
++if test "x$ac_cv_func_fork" = xyes; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
++$as_echo_n "checking for working fork... " >&6; }
++if test "${ac_cv_func_fork_works+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test "$cross_compiling" = yes; then :
++  ac_cv_func_fork_works=cross
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++$ac_includes_default
++int
++main ()
++{
  
-@@ -21500,10 +11898,10 @@ fi
++	  /* By Ruediger Kuhlmann. */
++	  return fork () < 0;
  
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_run "$LINENO"; then :
++  ac_cv_func_fork_works=yes
++else
++  ac_cv_func_fork_works=no
++fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
++fi
  
- # Check whether --with-sqlite3-h was given.
--if test "${with_sqlite3_h+set}" = set; then
-+if test "${with_sqlite3_h+set}" = set; then :
-   withval=$with_sqlite3_h;
-             mt_sqlite3_search_headers="$withval"
--            { $as_echo "$as_me:$LINENO: Will search for sqlite3 headers in $withval" >&5
-+            { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for sqlite3 headers in $withval" >&5
- $as_echo "$as_me: Will search for sqlite3 headers in $withval" >&6;}
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
++$as_echo "$ac_cv_func_fork_works" >&6; }
  
+-    if test "x${SQLITE3_OPTION_ENABLED}" = xyes; then
++else
++  ac_cv_func_fork_works=$ac_cv_func_fork
++fi
++if test "x$ac_cv_func_fork_works" = xcross; then
++  case $host in
++    *-*-amigaos* | *-*-msdosdjgpp*)
++      # Override, as these systems have only a dummy fork() stub
++      ac_cv_func_fork_works=no
++      ;;
++    *)
++      ac_cv_func_fork_works=yes
++      ;;
++  esac
++  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
++$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
++fi
++ac_cv_func_vfork_works=$ac_cv_func_vfork
++if test "x$ac_cv_func_vfork" = xyes; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
++$as_echo_n "checking for working vfork... " >&6; }
++if test "${ac_cv_func_vfork_works+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test "$cross_compiling" = yes; then :
++  ac_cv_func_vfork_works=cross
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++/* Thanks to Paul Eggert for this test.  */
++$ac_includes_default
++#include <sys/wait.h>
++#ifdef HAVE_VFORK_H
++# include <vfork.h>
++#endif
++/* On some sparc systems, changes by the child to local and incoming
++   argument registers are propagated back to the parent.  The compiler
++   is told about this with #include <vfork.h>, but some compilers
++   (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
++   static variable whose address is put into a register that is
++   clobbered by the vfork.  */
++static void
++#ifdef __cplusplus
++sparc_address_test (int arg)
++# else
++sparc_address_test (arg) int arg;
++#endif
++{
++  static pid_t child;
++  if (!child) {
++    child = vfork ();
++    if (child < 0) {
++      perror ("vfork");
++      _exit(2);
++    }
++    if (!child) {
++      arg = getpid();
++      write(-1, "", 0);
++      _exit (arg);
++    }
++  }
++}
  
-@@ -21516,145 +11914,8 @@ fi
-         CXXFLAGS="$CXXFLAGS -I${mt_sqlite3_search_headers}"
-         CPPFLAGS="$CPPFLAGS -I${mt_sqlite3_search_headers}"
-         as_ac_Header=`$as_echo "ac_cv_header_$mt_sqlite3_search_headers/sqlite3.h" | $as_tr_sh`
++int
++main ()
++{
++  pid_t parent = getpid ();
++  pid_t child;
+ 
+-    LIBS_SAVE=$LIBS
+-    LDFLAGS_SAVE=$LDFLAGS
+-    CFLAGS_SAVE=$CFLAGS
+-    CXXFLAGS_SAVE=$CXXFLAGS
+-    CPPFLAGS_SAVE=$CPPFLAGS
++  sparc_address_test (0);
+ 
+-    mt_sqlite3_header_status=yes
++  child = vfork ();
+ 
++  if (child == 0) {
++    /* Here is another test for sparc vfork register problems.  This
++       test uses lots of local variables, at least as many local
++       variables as main has allocated so far including compiler
++       temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
++       4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
++       reuse the register of parent for one of the local variables,
++       since it will think that parent can't possibly be used any more
++       in this routine.  Assigning to the local variable will thus
++       munge parent in the parent process.  */
++    pid_t
++      p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
++      p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
++    /* Convince the compiler that p..p7 are live; otherwise, it might
++       use the same hardware register for all 8 local variables.  */
++    if (p != p1 || p != p2 || p != p3 || p != p4
++	|| p != p5 || p != p6 || p != p7)
++      _exit(1);
+ 
+-# Check whether --with-sqlite3-h was given.
+-if test "${with_sqlite3_h+set}" = set; then
+-  withval=$with_sqlite3_h;
+-            mt_sqlite3_search_headers="$withval"
+-            { $as_echo "$as_me:$LINENO: Will search for sqlite3 headers in $withval" >&5
+-$as_echo "$as_me: Will search for sqlite3 headers in $withval" >&6;}
++    /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
++       from child file descriptors.  If the child closes a descriptor
++       before it execs or exits, this munges the parent's descriptor
++       as well.  Test for this by closing stdout in the child.  */
++    _exit(close(fileno(stdout)) != 0);
++  } else {
++    int status;
++    struct stat st;
+ 
++    while (wait(&status) != child)
++      ;
++    return (
++	 /* Was there some problem with vforking?  */
++	 child < 0
+ 
+-fi
++	 /* Did the child fail?  (This shouldn't happen.)  */
++	 || status
+ 
++	 /* Did the vfork/compiler bug occur?  */
++	 || parent != getpid()
+ 
+-    if test "$mt_sqlite3_search_headers" ; then
+-        unset ac_cv_header_sqlite3_h
+-        CFLAGS="$CFLAGS -I${mt_sqlite3_search_headers}"
+-        CXXFLAGS="$CXXFLAGS -I${mt_sqlite3_search_headers}"
+-        CPPFLAGS="$CPPFLAGS -I${mt_sqlite3_search_headers}"
+-        as_ac_Header=`$as_echo "ac_cv_header_$mt_sqlite3_search_headers/sqlite3.h" | $as_tr_sh`
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 -  { $as_echo "$as_me:$LINENO: checking for $mt_sqlite3_search_headers/sqlite3.h" >&5
 -$as_echo_n "checking for $mt_sqlite3_search_headers/sqlite3.h... " >&6; }
@@ -20412,7 +26701,12 @@ index f51d803..459bf70 100755
 -/* end confdefs.h.  */
 -$ac_includes_default
 -#include <$mt_sqlite3_search_headers/sqlite3.h>
--_ACEOF
++	 /* Did the file descriptor bug occur?  */
++	 || fstat(fileno(stdout), &st) != 0
++	 );
++  }
++}
+ _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -20432,13 +26726,19 @@ index f51d803..459bf70 100755
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_header_compiler=yes
--else
++if ac_fn_c_try_run "$LINENO"; then :
++  ac_cv_func_vfork_works=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_header_compiler=no
--fi
--
++  ac_cv_func_vfork_works=no
++fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
+ fi
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 -$as_echo "$ac_header_compiler" >&6; }
@@ -20475,14 +26775,25 @@ index f51d803..459bf70 100755
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
++$as_echo "$ac_cv_func_vfork_works" >&6; }
+ 
 -  ac_header_preproc=no
--fi
--
++fi;
++if test "x$ac_cv_func_fork_works" = xcross; then
++  ac_cv_func_vfork_works=$ac_cv_func_vfork
++  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
++$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
+ fi
+ 
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 -$as_echo "$ac_header_preproc" >&6; }
--
++if test "x$ac_cv_func_vfork_works" = xyes; then
++
++$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
+ 
 -# So?  What about this header?
 -case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
 -  yes:no: )
@@ -20517,51 +26828,64 @@ index f51d803..459bf70 100755
 -$as_echo_n "checking for $mt_sqlite3_search_headers/sqlite3.h... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 -  $as_echo_n "(cached) " >&6
--else
+ else
 -  eval "$as_ac_Header=\$ac_header_preproc"
 -fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
--
+ 
 -fi
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+ac_fn_cxx_check_header_mongrel "$LINENO" "$mt_sqlite3_search_headers/sqlite3.h" "$as_ac_Header" "$ac_includes_default"
-+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
++$as_echo "#define vfork fork" >>confdefs.h
  
-                 mt_sqlite3_cxxflags="-I${mt_sqlite3_search_headers}"
+-                mt_sqlite3_cxxflags="-I${mt_sqlite3_search_headers}"
++fi
++if test "x$ac_cv_func_fork_works" = xyes; then
  
-@@ -21662,12 +11923,10 @@ else
+-else
++$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
  
-                 mt_sqlite3_header_status=missing
-                 if test "" = "pass"; then
+-                mt_sqlite3_header_status=missing
+-                if test "" = "pass"; then
 -                    { $as_echo "$as_me:$LINENO: sqlite3 headers not found in requested location $mt_sqlite3_search_headers" >&5
-+                    { $as_echo "$as_me:${as_lineno-$LINENO}: sqlite3 headers not found in requested location $mt_sqlite3_search_headers" >&5
- $as_echo "$as_me: sqlite3 headers not found in requested location $mt_sqlite3_search_headers" >&6;}
-                 else
+-$as_echo "$as_me: sqlite3 headers not found in requested location $mt_sqlite3_search_headers" >&6;}
+-                else
 -                    { { $as_echo "$as_me:$LINENO: error: sqlite3 headers not found in requested location $mt_sqlite3_search_headers" >&5
 -$as_echo "$as_me: error: sqlite3 headers not found in requested location $mt_sqlite3_search_headers" >&2;}
 -   { (exit 1); exit 1; }; }
-+                    as_fn_error $? "sqlite3 headers not found in requested location $mt_sqlite3_search_headers" "$LINENO" 5
-                 fi
+-                fi
++fi
  
++for ac_header in stdlib.h
++do :
++  ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
++if test "x$ac_cv_header_stdlib_h" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_STDLIB_H 1
++_ACEOF
  
-@@ -21676,140 +11935,9 @@ fi
+ fi
  
-     else
-         unset ac_cv_header_sqlite3_h
++done
+ 
+-    else
+-        unset ac_cv_header_sqlite3_h
 -        if test "${ac_cv_header_sqlite3_h+set}" = set; then
 -  { $as_echo "$as_me:$LINENO: checking for sqlite3.h" >&5
 -$as_echo_n "checking for sqlite3.h... " >&6; }
 -if test "${ac_cv_header_sqlite3_h+set}" = set; then
--  $as_echo_n "(cached) " >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
++$as_echo_n "checking for GNU libc compatible malloc... " >&6; }
++if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then :
+   $as_echo_n "(cached) " >&6
 -fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sqlite3_h" >&5
 -$as_echo "$ac_cv_header_sqlite3_h" >&6; }
--else
+ else
 -  # Is the header compilable?
 -{ $as_echo "$as_me:$LINENO: checking sqlite3.h usability" >&5
 -$as_echo_n "checking sqlite3.h usability... " >&6; }
@@ -20570,10 +26894,27 @@ index f51d803..459bf70 100755
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++  if test "$cross_compiling" = yes; then :
++  ac_cv_func_malloc_0_nonnull=no
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
 -$ac_includes_default
 -#include <sqlite3.h>
--_ACEOF
++#if defined STDC_HEADERS || defined HAVE_STDLIB_H
++# include <stdlib.h>
++#else
++char *malloc ();
++#endif
++
++int
++main ()
++{
++return ! malloc (0);
++  ;
++  return 0;
++}
+ _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -20593,17 +26934,28 @@ index f51d803..459bf70 100755
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_header_compiler=yes
--else
++if ac_fn_c_try_run "$LINENO"; then :
++  ac_cv_func_malloc_0_nonnull=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++  ac_cv_func_malloc_0_nonnull=no
++fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
++fi
+ 
 -	ac_header_compiler=no
--fi
--
+ fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
++$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
++if test $ac_cv_func_malloc_0_nonnull = yes; then :
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 -$as_echo "$ac_header_compiler" >&6; }
--
++$as_echo "#define HAVE_MALLOC 1" >>confdefs.h
+ 
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking sqlite3.h presence" >&5
 -$as_echo_n "checking sqlite3.h presence... " >&6; }
@@ -20633,17 +26985,23 @@ index f51d803..459bf70 100755
 -	 test ! -s conftest.err
 -       }; then
 -  ac_header_preproc=yes
--else
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++  $as_echo "#define HAVE_MALLOC 0" >>confdefs.h
+ 
 -  ac_header_preproc=no
 -fi
--
++   case " $LIBOBJS " in
++  *" malloc.$ac_objext "* ) ;;
++  *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
++ ;;
++esac
+ 
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$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_cxx_preproc_warn_flag in
 -  yes:no: )
@@ -20683,30 +27041,33 @@ index f51d803..459bf70 100755
 -fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sqlite3_h" >&5
 -$as_echo "$ac_cv_header_sqlite3_h" >&6; }
-+        ac_fn_cxx_check_header_mongrel "$LINENO" "sqlite3.h" "ac_cv_header_sqlite3_h" "$ac_includes_default"
-+if test "x$ac_cv_header_sqlite3_h" = x""yes; then :
++$as_echo "#define malloc rpl_malloc" >>confdefs.h
  
--fi
+ fi
 -if test "x$ac_cv_header_sqlite3_h" = x""yes; then
 -  :
- else
+-else
  
-                 CFLAGS="$CFLAGS -I$MT_SEARCHPATH_HEADERS"
-@@ -21817,145 +11945,8 @@ else
-                 CPPFLAGS="$CPPFLAGS -I$MT_SEARCHPATH_HEADERS"
-                 unset ac_cv_header_sqlite3_h
-                 as_ac_Header=`$as_echo "ac_cv_header_$MT_SEARCHPATH_HEADERS/sqlite3.h" | $as_tr_sh`
+-                CFLAGS="$CFLAGS -I$MT_SEARCHPATH_HEADERS"
+-                CXXFLAGS="$CXXFLAGS -I$MT_SEARCHPATH_HEADERS"
+-                CPPFLAGS="$CPPFLAGS -I$MT_SEARCHPATH_HEADERS"
+-                unset ac_cv_header_sqlite3_h
+-                as_ac_Header=`$as_echo "ac_cv_header_$MT_SEARCHPATH_HEADERS/sqlite3.h" | $as_tr_sh`
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 -  { $as_echo "$as_me:$LINENO: checking for $MT_SEARCHPATH_HEADERS/sqlite3.h" >&5
 -$as_echo_n "checking for $MT_SEARCHPATH_HEADERS/sqlite3.h... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
--  $as_echo_n "(cached) " >&6
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working memcmp" >&5
++$as_echo_n "checking for working memcmp... " >&6; }
++if test "${ac_cv_func_memcmp_working+set}" = set; then :
+   $as_echo_n "(cached) " >&6
 -fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
--else
+ else
 -  # Is the header compilable?
 -{ $as_echo "$as_me:$LINENO: checking $MT_SEARCHPATH_HEADERS/sqlite3.h usability" >&5
 -$as_echo_n "checking $MT_SEARCHPATH_HEADERS/sqlite3.h usability... " >&6; }
@@ -20715,10 +27076,45 @@ index f51d803..459bf70 100755
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
--$ac_includes_default
++  if test "$cross_compiling" = yes; then :
++  ac_cv_func_memcmp_working=no
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ $ac_includes_default
 -#include <$MT_SEARCHPATH_HEADERS/sqlite3.h>
--_ACEOF
++int
++main ()
++{
++
++  /* Some versions of memcmp are not 8-bit clean.  */
++  char c0 = '\100', c1 = '\200', c2 = '\201';
++  if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
++    return 1;
++
++  /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
++     or more and with at least one buffer not starting on a 4-byte boundary.
++     William Lewis provided this test program.   */
++  {
++    char foo[21];
++    char bar[21];
++    int i;
++    for (i = 0; i < 4; i++)
++      {
++	char *a = foo + i;
++	char *b = bar + i;
++	strcpy (a, "--------01111111");
++	strcpy (b, "--------10000000");
++	if (memcmp (a, b, 16) >= 0)
++	  return 1;
++      }
++    return 0;
++  }
++
++  ;
++  return 0;
++}
+ _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -20738,17 +27134,31 @@ index f51d803..459bf70 100755
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_header_compiler=yes
--else
++if ac_fn_c_try_run "$LINENO"; then :
++  ac_cv_func_memcmp_working=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++  ac_cv_func_memcmp_working=no
++fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
++fi
+ 
 -	ac_header_compiler=no
--fi
--
+ fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_memcmp_working" >&5
++$as_echo "$ac_cv_func_memcmp_working" >&6; }
++test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in
++  *" memcmp.$ac_objext "* ) ;;
++  *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
++ ;;
++esac
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 -$as_echo "$ac_header_compiler" >&6; }
--
+ 
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking $MT_SEARCHPATH_HEADERS/sqlite3.h presence" >&5
 -$as_echo_n "checking $MT_SEARCHPATH_HEADERS/sqlite3.h presence... " >&6; }
@@ -20759,7 +27169,13 @@ index f51d803..459bf70 100755
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -#include <$MT_SEARCHPATH_HEADERS/sqlite3.h>
--_ACEOF
++for ac_header in stdlib.h
++do :
++  ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
++if test "x$ac_cv_header_stdlib_h" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_STDLIB_H 1
+ _ACEOF
 -if { (ac_try="$ac_cpp conftest.$ac_ext"
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -20781,14 +27197,15 @@ index f51d803..459bf70 100755
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -  ac_header_preproc=no
--fi
--
+ fi
+ 
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 -$as_echo "$ac_header_preproc" >&6; }
--
++done
+ 
 -# So?  What about this header?
 -case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
 -  yes:no: )
@@ -20822,60 +27239,220 @@ index f51d803..459bf70 100755
 -{ $as_echo "$as_me:$LINENO: checking for $MT_SEARCHPATH_HEADERS/sqlite3.h" >&5
 -$as_echo_n "checking for $MT_SEARCHPATH_HEADERS/sqlite3.h... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
--  $as_echo_n "(cached) " >&6
--else
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible realloc" >&5
++$as_echo_n "checking for GNU libc compatible realloc... " >&6; }
++if test "${ac_cv_func_realloc_0_nonnull+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
 -  eval "$as_ac_Header=\$ac_header_preproc"
--fi
++  if test "$cross_compiling" = yes; then :
++  ac_cv_func_realloc_0_nonnull=no
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#if defined STDC_HEADERS || defined HAVE_STDLIB_H
++# include <stdlib.h>
++#else
++char *realloc ();
++#endif
++
++int
++main ()
++{
++return ! realloc (0, 0);
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_run "$LINENO"; then :
++  ac_cv_func_realloc_0_nonnull=yes
++else
++  ac_cv_func_realloc_0_nonnull=no
++fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
+ fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
--
--fi
+ 
+ fi
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+ac_fn_cxx_check_header_mongrel "$LINENO" "$MT_SEARCHPATH_HEADERS/sqlite3.h" "$as_ac_Header" "$ac_includes_default"
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5
++$as_echo "$ac_cv_func_realloc_0_nonnull" >&6; }
++if test $ac_cv_func_realloc_0_nonnull = yes; then :
+ 
+-                        mt_sqlite3_cxxflags="-I${MT_SEARCHPATH_HEADERS}"
++$as_echo "#define HAVE_REALLOC 1" >>confdefs.h
+ 
+ else
++  $as_echo "#define HAVE_REALLOC 0" >>confdefs.h
+ 
+-                        mt_sqlite3_header_status=missing
+-
+-
+-fi
+-
++   case " $LIBOBJS " in
++  *" realloc.$ac_objext "* ) ;;
++  *) LIBOBJS="$LIBOBJS realloc.$ac_objext"
++ ;;
++esac
+ 
+ 
++$as_echo "#define realloc rpl_realloc" >>confdefs.h
+ 
+ fi
+ 
+ 
+-    fi
++for ac_header in sys/select.h sys/socket.h
++do :
++  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
++ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
 +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
++_ACEOF
  
-                         mt_sqlite3_cxxflags="-I${MT_SEARCHPATH_HEADERS}"
+-    if test "x$mt_sqlite3_header_status" != xyes; then
+-        mt_sqlite3_cxxflags=""
+-    fi
++fi
  
-@@ -21999,10 +11990,10 @@ fi
+-    LIBS=$LIBS_SAVE
+-    LDFLAGS=$LDFLAGS_SAVE
+-    CFLAGS=$CFLAGS_SAVE
+-    CXXFLAGS=$CXXFLAGS_SAVE
+-    CPPFLAGS=$CPPFLAGS_SAVE
++done
  
+-    mt_sqlite3_package_status=${mt_sqlite3_header_status}
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for select" >&5
++$as_echo_n "checking types of arguments for select... " >&6; }
++if test "${ac_cv_func_select_args+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  for ac_arg234 in 'fd_set *' 'int *' 'void *'; do
++ for ac_arg1 in 'int' 'size_t' 'unsigned long int' 'unsigned int'; do
++  for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do
++   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++$ac_includes_default
++#ifdef HAVE_SYS_SELECT_H
++# include <sys/select.h>
++#endif
++#ifdef HAVE_SYS_SOCKET_H
++# include <sys/socket.h>
++#endif
  
- # Check whether --with-sqlite3-libs was given.
+-    if test "x$mt_sqlite3_package_status" = xyes; then
++int
++main ()
++{
++extern int select ($ac_arg1,
++					    $ac_arg234, $ac_arg234, $ac_arg234,
++					    $ac_arg5);
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++  done
++ done
++done
++# Provide a safe default value.
++: ${ac_cv_func_select_args='int,int *,struct timeval *'}
+ 
+-    mt_sqlite3_arg_default=yes
+-    mt_sqlite3_library_status=yes
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_select_args" >&5
++$as_echo "$ac_cv_func_select_args" >&6; }
++ac_save_IFS=$IFS; IFS=','
++set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'`
++IFS=$ac_save_IFS
++shift
+ 
+-    LIBS_SAVE=$LIBS
+-    LDFLAGS_SAVE=$LDFLAGS
+-    CFLAGS_SAVE=$CFLAGS
+-    CXXFLAGS_SAVE=$CXXFLAGS
+-    CPPFLAGS_SAVE=$CPPFLAGS
++cat >>confdefs.h <<_ACEOF
++#define SELECT_TYPE_ARG1 $1
++_ACEOF
+ 
+ 
+-# Check whether --with-sqlite3-libs was given.
 -if test "${with_sqlite3_libs+set}" = set; then
-+if test "${with_sqlite3_libs+set}" = set; then :
-   withval=$with_sqlite3_libs;
-             mt_sqlite3_search_libs="$withval"
+-  withval=$with_sqlite3_libs;
+-            mt_sqlite3_search_libs="$withval"
 -            { $as_echo "$as_me:$LINENO: Will search for sqlite3 libs in $withval" >&5
-+            { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for sqlite3 libs in $withval" >&5
- $as_echo "$as_me: Will search for sqlite3 libs in $withval" >&6;}
+-$as_echo "$as_me: Will search for sqlite3 libs in $withval" >&6;}
++cat >>confdefs.h <<_ACEOF
++#define SELECT_TYPE_ARG234 ($2)
++_ACEOF
+ 
+ 
+-fi
++cat >>confdefs.h <<_ACEOF
++#define SELECT_TYPE_ARG5 ($3)
++_ACEOF
  
++rm -f conftest*
  
-@@ -22012,18 +12003,14 @@ fi
-     if test "$mt_sqlite3_search_libs" ; then
-         unset ac_cv_lib_sqlite3_sqlite3_open
-         LDFLAGS="$LDFLAGS -L$mt_sqlite3_search_libs"
+-    if test "$mt_sqlite3_search_libs" ; then
+-        unset ac_cv_lib_sqlite3_sqlite3_open
+-        LDFLAGS="$LDFLAGS -L$mt_sqlite3_search_libs"
 -        { $as_echo "$as_me:$LINENO: checking for sqlite3_open in -lsqlite3" >&5
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqlite3_open in -lsqlite3" >&5
- $as_echo_n "checking for sqlite3_open in -lsqlite3... " >&6; }
+-$as_echo_n "checking for sqlite3_open in -lsqlite3... " >&6; }
 -if test "${ac_cv_lib_sqlite3_sqlite3_open+set}" = set; then
-+if test "${ac_cv_lib_sqlite3_sqlite3_open+set}" = set; then :
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
++$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
++if test "${ac_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
-   ac_check_lib_save_LIBS=$LIBS
- LIBS="-lsqlite3  $LIBS"
+-  ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lsqlite3  $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
++  rm -f conftest.sym conftest.file
++echo >conftest.file
++if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
++  if test "$cross_compiling" = yes; then :
++  ac_cv_func_lstat_dereferences_slashed_symlink=no
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
- 
- /* Override any GCC internal prototype to avoid an error.
-@@ -22041,43 +12028,18 @@ return sqlite3_open ();
+-
+-/* 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 sqlite3_open ();
++$ac_includes_default
+ int
+ main ()
+ {
+-return sqlite3_open ();
++struct stat sbuf;
++     /* Linux will dereference the symlink and fail, as required by POSIX.
++	That is better in the sense that it means we will not
++	have to compile and use the lstat wrapper.  */
++     return lstat ("conftest.sym/", &sbuf) == 0;
+   ;
    return 0;
  }
  _ACEOF
@@ -20900,71 +27477,171 @@ index f51d803..459bf70 100755
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
-+if ac_fn_cxx_try_link "$LINENO"; then :
-   ac_cv_lib_sqlite3_sqlite3_open=yes
+-  ac_cv_lib_sqlite3_sqlite3_open=yes
++if ac_fn_c_try_run "$LINENO"; then :
++  ac_cv_func_lstat_dereferences_slashed_symlink=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++  ac_cv_func_lstat_dereferences_slashed_symlink=no
++fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
++fi
+ 
 -	ac_cv_lib_sqlite3_sqlite3_open=no
-+  ac_cv_lib_sqlite3_sqlite3_open=no
++else
++  # If the `ln -s' command failed, then we probably don't even
++  # have an lstat function.
++  ac_cv_func_lstat_dereferences_slashed_symlink=no
  fi
--
++rm -f conftest.sym conftest.file
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      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
+-LIBS=$ac_check_lib_save_LIBS
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_sqlite3_sqlite3_open" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_open" >&5
- $as_echo "$ac_cv_lib_sqlite3_sqlite3_open" >&6; }
+-$as_echo "$ac_cv_lib_sqlite3_sqlite3_open" >&6; }
 -if test "x$ac_cv_lib_sqlite3_sqlite3_open" = x""yes; then
-+if test "x$ac_cv_lib_sqlite3_sqlite3_open" = x""yes; then :
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5
++$as_echo "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; }
  
-                 mt_sqlite3_libs="-lsqlite3"
-                 mt_sqlite3_ldflags="-L$mt_sqlite3_search_libs"
-@@ -22086,12 +12048,10 @@ else
+-                mt_sqlite3_libs="-lsqlite3"
+-                mt_sqlite3_ldflags="-L$mt_sqlite3_search_libs"
++test $ac_cv_func_lstat_dereferences_slashed_symlink = yes &&
  
-                 mt_sqlite3_library_status=missing
-                 if test "" = "pass"; then
++cat >>confdefs.h <<_ACEOF
++#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
++_ACEOF
++
++
++if test "x$ac_cv_func_lstat_dereferences_slashed_symlink" = xno; then
++  case " $LIBOBJS " in
++  *" lstat.$ac_objext "* ) ;;
++  *) LIBOBJS="$LIBOBJS lstat.$ac_objext"
++ ;;
++esac
++
++fi
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat accepts an empty string" >&5
++$as_echo_n "checking whether stat accepts an empty string... " >&6; }
++if test "${ac_cv_func_stat_empty_string_bug+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test "$cross_compiling" = yes; then :
++  ac_cv_func_stat_empty_string_bug=yes
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++$ac_includes_default
++int
++main ()
++{
++struct stat sbuf;
++  return stat ("", &sbuf) == 0;
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_run "$LINENO"; then :
++  ac_cv_func_stat_empty_string_bug=no
+ else
++  ac_cv_func_stat_empty_string_bug=yes
++fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
++fi
+ 
+-                mt_sqlite3_library_status=missing
+-                if test "" = "pass"; then
 -                    { $as_echo "$as_me:$LINENO: sqlite3 library not found in requested location $mt_sqlite3_search_libs" >&5
-+                    { $as_echo "$as_me:${as_lineno-$LINENO}: sqlite3 library not found in requested location $mt_sqlite3_search_libs" >&5
- $as_echo "$as_me: sqlite3 library not found in requested location $mt_sqlite3_search_libs" >&6;}
-                 else
+-$as_echo "$as_me: sqlite3 library not found in requested location $mt_sqlite3_search_libs" >&6;}
+-                else
 -                    { { $as_echo "$as_me:$LINENO: error: sqlite3 library not found in requested location $mt_sqlite3_search_libs" >&5
 -$as_echo "$as_me: error: sqlite3 library not found in requested location $mt_sqlite3_search_libs" >&2;}
 -   { (exit 1); exit 1; }; }
-+                    as_fn_error $? "sqlite3 library not found in requested location $mt_sqlite3_search_libs" "$LINENO" 5
-                 fi
+-                fi
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_stat_empty_string_bug" >&5
++$as_echo "$ac_cv_func_stat_empty_string_bug" >&6; }
++if test $ac_cv_func_stat_empty_string_bug = yes; then
++  case " $LIBOBJS " in
++  *" stat.$ac_objext "* ) ;;
++  *) LIBOBJS="$LIBOBJS stat.$ac_objext"
++ ;;
++esac
  
  
-@@ -22099,18 +12059,14 @@ fi
++cat >>confdefs.h <<_ACEOF
++#define HAVE_STAT_EMPTY_STRING_BUG 1
++_ACEOF
++
+ fi
  
-     else
-         unset ac_cv_lib_sqlite3_sqlite3_open
+-    else
+-        unset ac_cv_lib_sqlite3_sqlite3_open
 -        { $as_echo "$as_me:$LINENO: checking for sqlite3_open in -lsqlite3" >&5
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqlite3_open in -lsqlite3" >&5
- $as_echo_n "checking for sqlite3_open in -lsqlite3... " >&6; }
+-$as_echo_n "checking for sqlite3_open in -lsqlite3... " >&6; }
 -if test "${ac_cv_lib_sqlite3_sqlite3_open+set}" = set; then
-+if test "${ac_cv_lib_sqlite3_sqlite3_open+set}" = set; then :
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strtod" >&5
++$as_echo_n "checking for working strtod... " >&6; }
++if test "${ac_cv_func_strtod+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
-   ac_check_lib_save_LIBS=$LIBS
- LIBS="-lsqlite3  $LIBS"
+-  ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lsqlite3  $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
++  if test "$cross_compiling" = yes; then :
++  ac_cv_func_strtod=no
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
- /* Override any GCC internal prototype to avoid an error.
-@@ -22128,43 +12084,18 @@ return sqlite3_open ();
+-/* 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"
++$ac_includes_default
++#ifndef strtod
++double strtod ();
+ #endif
+-char sqlite3_open ();
+ int
+-main ()
++main()
+ {
+-return sqlite3_open ();
+-  ;
++  {
++    /* Some versions of Linux strtod mis-parse strings with leading '+'.  */
++    char *string = " +69";
++    char *term;
++    double value;
++    value = strtod (string, &term);
++    if (value != 69 || term != (string + 4))
++      return 1;
++  }
++
++  {
++    /* Under Solaris 2.4, strtod returns the wrong value for the
++       terminating character under some conditions.  */
++    char *string = "NaN";
++    char *term;
++    strtod (string, &term);
++    if (term != string && *(term - 1) == 0)
++      return 1;
++  }
    return 0;
  }
++
  _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
@@ -20987,54 +27664,79 @@ index f51d803..459bf70 100755
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
-+if ac_fn_cxx_try_link "$LINENO"; then :
-   ac_cv_lib_sqlite3_sqlite3_open=yes
+-  ac_cv_lib_sqlite3_sqlite3_open=yes
++if ac_fn_c_try_run "$LINENO"; then :
++  ac_cv_func_strtod=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_lib_sqlite3_sqlite3_open=no
-+  ac_cv_lib_sqlite3_sqlite3_open=no
++  ac_cv_func_strtod=no
++fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
  fi
--
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      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
+-LIBS=$ac_check_lib_save_LIBS
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_sqlite3_sqlite3_open" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_open" >&5
- $as_echo "$ac_cv_lib_sqlite3_sqlite3_open" >&6; }
+-$as_echo "$ac_cv_lib_sqlite3_sqlite3_open" >&6; }
 -if test "x$ac_cv_lib_sqlite3_sqlite3_open" = x""yes; then
-+if test "x$ac_cv_lib_sqlite3_sqlite3_open" = x""yes; then :
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strtod" >&5
++$as_echo "$ac_cv_func_strtod" >&6; }
++if test $ac_cv_func_strtod = no; then
++  case " $LIBOBJS " in
++  *" strtod.$ac_objext "* ) ;;
++  *) LIBOBJS="$LIBOBJS strtod.$ac_objext"
++ ;;
++esac
  
-                 mt_sqlite3_libs="-lsqlite3"
+-                mt_sqlite3_libs="-lsqlite3"
++ac_fn_c_check_func "$LINENO" "pow" "ac_cv_func_pow"
++if test "x$ac_cv_func_pow" = x""yes; then :
  
-@@ -22172,18 +12103,14 @@ else
+-else
++fi
  
-                 LDFLAGS="$LDFLAGS -L$MT_SEARCHPATH_LIBS"
-                 unset ac_cv_lib_sqlite3_sqlite3_open
+-                LDFLAGS="$LDFLAGS -L$MT_SEARCHPATH_LIBS"
+-                unset ac_cv_lib_sqlite3_sqlite3_open
 -                { $as_echo "$as_me:$LINENO: checking for sqlite3_open in -lsqlite3" >&5
-+                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqlite3_open in -lsqlite3" >&5
- $as_echo_n "checking for sqlite3_open in -lsqlite3... " >&6; }
+-$as_echo_n "checking for sqlite3_open in -lsqlite3... " >&6; }
 -if test "${ac_cv_lib_sqlite3_sqlite3_open+set}" = set; then
-+if test "${ac_cv_lib_sqlite3_sqlite3_open+set}" = set; then :
++if test $ac_cv_func_pow = no; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pow in -lm" >&5
++$as_echo_n "checking for pow in -lm... " >&6; }
++if test "${ac_cv_lib_m_pow+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
    ac_check_lib_save_LIBS=$LIBS
- LIBS="-lsqlite3  $LIBS"
+-LIBS="-lsqlite3  $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
++LIBS="-lm  $LIBS"
 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -22201,43 +12128,18 @@ return sqlite3_open ();
+@@ -22192,537 +9703,508 @@
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-char sqlite3_open ();
++char pow ();
+ int
+ main ()
+ {
+-return sqlite3_open ();
++return pow ();
+   ;
    return 0;
  }
  _ACEOF
@@ -21059,14 +27761,15 @@ index f51d803..459bf70 100755
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
-+if ac_fn_cxx_try_link "$LINENO"; then :
-   ac_cv_lib_sqlite3_sqlite3_open=yes
+-  ac_cv_lib_sqlite3_sqlite3_open=yes
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_m_pow=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_lib_sqlite3_sqlite3_open=no
-+  ac_cv_lib_sqlite3_sqlite3_open=no
++  ac_cv_lib_m_pow=no
  fi
 -
 -rm -rf conftest.dSYM
@@ -21077,236 +27780,580 @@ index f51d803..459bf70 100755
  LIBS=$ac_check_lib_save_LIBS
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_sqlite3_sqlite3_open" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_open" >&5
- $as_echo "$ac_cv_lib_sqlite3_sqlite3_open" >&6; }
+-$as_echo "$ac_cv_lib_sqlite3_sqlite3_open" >&6; }
 -if test "x$ac_cv_lib_sqlite3_sqlite3_open" = x""yes; then
-+if test "x$ac_cv_lib_sqlite3_sqlite3_open" = x""yes; then :
+-
+-                        mt_sqlite3_libs="-lsqlite3"
+-                        mt_sqlite3_ldflags="-L$MT_SEARCHPATH_LIBS"
+-
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_pow" >&5
++$as_echo "$ac_cv_lib_m_pow" >&6; }
++if test "x$ac_cv_lib_m_pow" = x""yes; then :
++  POW_LIB=-lm
+ else
+-
+-                        mt_sqlite3_library_status=missing
+-
+-
++  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find library containing definition of pow" >&5
++$as_echo "$as_me: WARNING: cannot find library containing definition of pow" >&2;}
+ fi
+ 
+-
+-
+ fi
  
-                         mt_sqlite3_libs="-lsqlite3"
-                         mt_sqlite3_ldflags="-L$MT_SEARCHPATH_LIBS"
-@@ -22283,16 +12185,12 @@ fi
-     if ((test "x${SQLITE3_OPTION_ENABLED}" = xyes) &&
-         (test "x${SQLITE3_OPTION_REQUESTED}" = xyes) &&
-         (test "x$mt_sqlite3_status" != xyes) && (test "" != "pass")); then
+-    fi
+-
+-    if test "x$mt_sqlite3_library_status" != xyes; then
+-        mt_sqlite3_libs=""
+-        mt_sqlite3_ldflags=""
+-    fi
+-
+-    LIBS=$LIBS_SAVE
+-    LDFLAGS=$LDFLAGS_SAVE
+-    CFLAGS=$CFLAGS_SAVE
+-    CXXFLAGS=$CXXFLAGS_SAVE
+-    CPPFLAGS=$CPPFLAGS_SAVE
+-
+-        mt_sqlite3_package_status=${mt_sqlite3_library_status}
+-    fi
+-
+-    if test "x$mt_sqlite3_package_status" = xyes; then
+-        SQLITE3_CFLAGS=${mt_sqlite3_cxxflags}
+-        SQLITE3_LIBS=${mt_sqlite3_libs}
+-        SQLITE3_LDFLAGS=${mt_sqlite3_ldflags}
+-    fi
+-
+-        mt_sqlite3_status=${mt_sqlite3_package_status}
+-    else
+-        mt_sqlite3_status=disabled
+-    fi
+-
+-    if ((test "x${SQLITE3_OPTION_ENABLED}" = xyes) &&
+-        (test "x${SQLITE3_OPTION_REQUESTED}" = xyes) &&
+-        (test "x$mt_sqlite3_status" != xyes) && (test "" != "pass")); then
 -        { { $as_echo "$as_me:$LINENO: error: unable to configure sqlite3 support" >&5
 -$as_echo "$as_me: error: unable to configure sqlite3 support" >&2;}
 -   { (exit 1); exit 1; }; }
-+        as_fn_error $? "unable to configure sqlite3 support" "$LINENO" 5
-     fi
- 
-     if test "x$mt_sqlite3_status" = xyes; then
+-    fi
+-
+-    if test "x$mt_sqlite3_status" = xyes; then
++fi
  
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_SQLITE3 1
--_ACEOF
-+$as_echo "#define HAVE_SQLITE3 1" >>confdefs.h
++for ac_func in vprintf
++do :
++  ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf"
++if test "x$ac_cv_func_vprintf" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_VPRINTF 1
+ _ACEOF
  
-     fi
+-    fi
+-
+-    SQLITE3_STATUS=${mt_sqlite3_status}
++ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt"
++if test "x$ac_cv_func__doprnt" = x""yes; then :
  
-@@ -22315,17 +12213,13 @@ if test "x$SQLITE3_STATUS" = xyes; then
++$as_echo "#define HAVE_DOPRNT 1" >>confdefs.h
  
-     if test "x$SQLITE_BACKUP_OPTION_ENABLED" = xyes; then
++fi
+ 
++fi
++done
+ 
+ 
++ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
++if test "x$ac_cv_have_decl_strerror_r" = x""yes; then :
++  ac_have_decl=1
++else
++  ac_have_decl=0
++fi
+ 
++cat >>confdefs.h <<_ACEOF
++#define HAVE_DECL_STRERROR_R $ac_have_decl
++_ACEOF
+ 
+-if test "x$SQLITE3_STATUS" = xyes; then
+-    if test "x$RT_STATUS" = xyes; then
+-        SQLITE_LDFLAGS="$SQLITE_LDFLAGS $RT_LDFLAGS"
+-        SQLITE_LIBS="$SQLITE_LIBS $RT_LIBS"
+-    fi
++for ac_func in strerror_r
++do :
++  ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
++if test "x$ac_cv_func_strerror_r" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_STRERROR_R 1
++_ACEOF
+ 
++fi
++done
+ 
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
++$as_echo_n "checking whether strerror_r returns char *... " >&6; }
++if test "${ac_cv_func_strerror_r_char_p+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
+ 
++    ac_cv_func_strerror_r_char_p=no
++    if test $ac_cv_have_decl_strerror_r = yes; then
++      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++$ac_includes_default
++int
++main ()
++{
+ 
+-    if test "x$SQLITE_BACKUP_OPTION_ENABLED" = xyes; then
++	  char buf[100];
++	  char x = *strerror_r (0, buf, sizeof buf);
++	  char *p = strerror_r (0, buf, sizeof buf);
++	  return !p || x;
  
 -cat >>confdefs.h <<\_ACEOF
 -#define SQLITE_BACKUP_ENABLED 1
--_ACEOF
-+$as_echo "#define SQLITE_BACKUP_ENABLED 1" >>confdefs.h
- 
-     fi
++  ;
++  return 0;
++}
+ _ACEOF
+-
+-    fi
++if ac_fn_c_try_compile "$LINENO"; then :
++  ac_cv_func_strerror_r_char_p=yes
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++    else
++      # strerror_r is not declared.  Choose between
++      # systems that have relatively inaccessible declarations for the
++      # function.  BeOS and DEC UNIX 4.0 fall in this category, but the
++      # former has a strerror_r that returns char*, while the latter
++      # has a strerror_r that returns `int'.
++      # This test should segfault on the DEC system.
++      if test "$cross_compiling" = yes; then :
++  :
  else
-     if (test "x$SQLITE_BACKUP_OPTION_ENABLED" = xyes) &&
-        (test "x$SQLITE_BACKUP_OPTION_REQUESTED" = xyes); then
+-    if (test "x$SQLITE_BACKUP_OPTION_ENABLED" = xyes) &&
+-       (test "x$SQLITE_BACKUP_OPTION_REQUESTED" = xyes); then
 -        { { $as_echo "$as_me:$LINENO: error: You specified the option to use sqlite backup settings but the sqlite support could not be configured" >&5
 -$as_echo "$as_me: error: You specified the option to use sqlite backup settings but the sqlite support could not be configured" >&2;}
 -   { (exit 1); exit 1; }; }
-+        as_fn_error $? "You specified the option to use sqlite backup settings but the sqlite support could not be configured" "$LINENO" 5
-     fi
- 
+-    fi
+-
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++$ac_includes_default
++	extern char *strerror_r ();
++int
++main ()
++{
++char buf[100];
++	  char x = *strerror_r (0, buf, sizeof buf);
++	  return ! isalpha (x);
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_run "$LINENO"; then :
++  ac_cv_func_strerror_r_char_p=yes
++fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
  fi
-@@ -22351,7 +12245,7 @@ CXXFLAGS="$CXXFLAGS_SAVE"
-     fi
  
-     # Check whether --enable-mysql was given.
+-LDFLAGS="$LDFLAGS_SAVE"
+-CPPFLAGS="$CPPFLAGS_SAVE"
+-CXXFLAGS="$CXXFLAGS_SAVE"
+-
+-########## MySQL
+-
+-
+-    mt_mysql_status=yes
+-    mt_mysql_requested=no
++    fi
+ 
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
++$as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
++if test $ac_cv_func_strerror_r_char_p = yes; then
+ 
++$as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h
+ 
+-    mt_mysql_option_enabled=
+-    mt_mysql_option_requested=no
+-    if test "xdisable" = xdisable; then
+-        mt_mysql_option_enabled=yes
+-    else
+-        mt_mysql_option_enabled=no
+-    fi
++fi
+ 
+-    # Check whether --enable-mysql was given.
 -if test "${enable_mysql+set}" = set; then
-+if test "${enable_mysql+set}" = set; then :
-   enableval=$enable_mysql;
-             mt_mysql_option_enabled=$enableval
-             mt_mysql_option_requested=yes
-@@ -22366,7 +12260,9 @@ fi
+-  enableval=$enable_mysql;
+-            mt_mysql_option_enabled=$enableval
+-            mt_mysql_option_requested=yes
++for ac_func in strftime
++do :
++  ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
++if test "x$ac_cv_func_strftime" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_STRFTIME 1
++_ACEOF
  
++else
++  # strftime is in -lintl on SCO UNIX.
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for strftime in -lintl" >&5
++$as_echo_n "checking for strftime in -lintl... " >&6; }
++if test "${ac_cv_lib_intl_strftime+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-lintl  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
  
++/* Override any GCC internal prototype to avoid an error.
++   Use char because int might match the return type of a GCC
++   builtin and then its argument prototype would still apply.  */
++#ifdef __cplusplus
++extern "C"
++#endif
++char strftime ();
++int
++main ()
++{
++return strftime ();
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_lib_intl_strftime=yes
++else
++  ac_cv_lib_intl_strftime=no
+ fi
++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_intl_strftime" >&5
++$as_echo "$ac_cv_lib_intl_strftime" >&6; }
++if test "x$ac_cv_lib_intl_strftime" = x""yes; then :
++  $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h
  
-+    if test "x${mt_mysql_option_enabled}" = xyes; then :
++LIBS="-lintl $LIBS"
++fi
  
+-    MYSQL_OPTION_ENABLED=${mt_mysql_option_enabled}
+-    MYSQL_OPTION_REQUESTED=${mt_mysql_option_requested}
+-
+-
+-
 +fi
++done
  
-     if test "x${MYSQL_OPTION_ENABLED}" = xyes; then
  
-@@ -22382,10 +12278,10 @@ fi
++ac_ext=cpp
++ac_cpp='$CXXCPP $CPPFLAGS'
++ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
++ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
++ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
  
+-    if test "x${MYSQL_OPTION_ENABLED}" = xyes; then
  
- # Check whether --with-mysql-cfg was given.
+-    LIBS_SAVE=$LIBS
+-    LDFLAGS_SAVE=$LDFLAGS
+-    CFLAGS_SAVE=$CFLAGS
+-    CXXFLAGS_SAVE=$CXXFLAGS
+-    CPPFLAGS_SAVE=$CPPFLAGS
+ 
++for ac_func in gethostname gettimeofday localtime_r memmove memset
++do :
++  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
++ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var"
++if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
+ 
+-    mt_mysql_config=none
+-    mt_mysql_package_status=yes
++else
++  as_fn_error $? "required library function not found" "$LINENO" 5
++fi
++done
+ 
++for ac_func in regcomp select strcasecmp strchr strdup strerror strncasecmp
++do :
++  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
++ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var"
++if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
+ 
+-# Check whether --with-mysql-cfg was given.
 -if test "${with_mysql_cfg+set}" = set; then
-+if test "${with_mysql_cfg+set}" = set; then :
-   withval=$with_mysql_cfg;
-             mt_mysql_search_config="$withval"
+-  withval=$with_mysql_cfg;
+-            mt_mysql_search_config="$withval"
 -            { $as_echo "$as_me:$LINENO: Will search for mysql config in $withval" >&5
-+            { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for mysql config in $withval" >&5
- $as_echo "$as_me: Will search for mysql config in $withval" >&6;}
+-$as_echo "$as_me: Will search for mysql config in $withval" >&6;}
++else
++  as_fn_error $? "required library function not found" "$LINENO" 5
++fi
++done
  
++for ac_func in strrchr strstr strtol strtoul uname
++do :
++  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
++ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var"
++if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
  
-@@ -22393,28 +12289,24 @@ fi
++else
++  as_fn_error $? "required library function not found" "$LINENO" 5
+ fi
++done
  
  
-     if test -n "$mt_mysql_search_config"; then
+-    if test -n "$mt_mysql_search_config"; then
 -        { $as_echo "$as_me:$LINENO: You specified ${mt_mysql_search_config} for mysql_config" >&5
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: You specified ${mt_mysql_search_config} for mysql_config" >&5
- $as_echo "$as_me: You specified ${mt_mysql_search_config} for mysql_config" >&6;}
-         if test -f "$mt_mysql_search_config"; then
-             mt_mysql_config=${mt_mysql_search_config}
-         else
+-$as_echo "$as_me: You specified ${mt_mysql_search_config} for mysql_config" >&6;}
+-        if test -f "$mt_mysql_search_config"; then
+-            mt_mysql_config=${mt_mysql_search_config}
+-        else
 -            { { $as_echo "$as_me:$LINENO: error: ${mt_mysql_search_config} not found" >&5
 -$as_echo "$as_me: error: ${mt_mysql_search_config} not found" >&2;}
 -   { (exit 1); exit 1; }; }
-+            as_fn_error $? "${mt_mysql_search_config} not found" "$LINENO" 5
-         fi
+-        fi
++for ac_func in sigaction sigprocmask
++do :
++  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
++ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var"
++if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
  
-         mt_mysql_version=`${mt_mysql_config} --version 2>/dev/null`
-         if test -z "$mt_mysql_version"; then
+-        mt_mysql_version=`${mt_mysql_config} --version 2>/dev/null`
+-        if test -z "$mt_mysql_version"; then
 -            { { $as_echo "$as_me:$LINENO: error: ${mt_mysql_search_config} could not be executed or returned invalid values" >&5
 -$as_echo "$as_me: error: ${mt_mysql_search_config} could not be executed or returned invalid values" >&2;}
 -   { (exit 1); exit 1; }; }
-+            as_fn_error $? "${mt_mysql_search_config} could not be executed or returned invalid values" "$LINENO" 5
-         fi
-     else
-         # Extract the first word of "mysql_config", so it can be a program name with args.
- set dummy mysql_config; ac_word=$2
+-        fi
+-    else
+-        # Extract the first word of "mysql_config", so it can be a program name with args.
+-set dummy mysql_config; ac_word=$2
 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
- $as_echo_n "checking for $ac_word... " >&6; }
+-$as_echo_n "checking for $ac_word... " >&6; }
 -if test "${ac_cv_path_mt_mysql_config+set}" = set; then
-+if test "${ac_cv_path_mt_mysql_config+set}" = set; then :
-   $as_echo_n "(cached) " >&6
+-  $as_echo_n "(cached) " >&6
  else
-   case $mt_mysql_config in
-@@ -22427,14 +12319,14 @@ for as_dir in $PATH
- do
-   IFS=$as_save_IFS
-   test -z "$as_dir" && as_dir=.
+-  case $mt_mysql_config in
+-  [\\/]* | ?:[\\/]*)
+-  ac_cv_path_mt_mysql_config="$mt_mysql_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
-+    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_mt_mysql_config="$as_dir/$ac_word$ac_exec_ext"
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+-    ac_cv_path_mt_mysql_config="$as_dir/$ac_word$ac_exec_ext"
 -    $as_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
+-    break 2
+-  fi
 -done
-+  done
- IFS=$as_save_IFS
++  as_fn_error $? "required library function not found" "$LINENO" 5
++fi
+ done
+-IFS=$as_save_IFS
  
-   test -z "$ac_cv_path_mt_mysql_config" && ac_cv_path_mt_mysql_config="none"
-@@ -22443,10 +12335,10 @@ esac
- fi
- mt_mysql_config=$ac_cv_path_mt_mysql_config
- if test -n "$mt_mysql_config"; then
+-  test -z "$ac_cv_path_mt_mysql_config" && ac_cv_path_mt_mysql_config="none"
+-  ;;
+-esac
+-fi
+-mt_mysql_config=$ac_cv_path_mt_mysql_config
+-if test -n "$mt_mysql_config"; then
 -  { $as_echo "$as_me:$LINENO: result: $mt_mysql_config" >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $mt_mysql_config" >&5
- $as_echo "$mt_mysql_config" >&6; }
- else
+-$as_echo "$mt_mysql_config" >&6; }
+-else
 -  { $as_echo "$as_me:$LINENO: result: no" >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
- $as_echo "no" >&6; }
- fi
+-$as_echo "no" >&6; }
+-fi
  
-@@ -22455,9 +12347,9 @@ fi
-             unset ac_cv_path_mt_mysql_config
-             # Extract the first word of "mysql_config", so it can be a program name with args.
- set dummy mysql_config; ac_word=$2
++for ac_func in ioctl tolower toupper
++do :
++  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
++ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var"
++if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++_ACEOF
+ 
+-        if test "x$mt_mysql_config" = xnone; then
+-            unset ac_cv_path_mt_mysql_config
+-            # Extract the first word of "mysql_config", so it can be a program name with args.
+-set dummy mysql_config; ac_word=$2
 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
- $as_echo_n "checking for $ac_word... " >&6; }
+-$as_echo_n "checking for $ac_word... " >&6; }
 -if test "${ac_cv_path_mt_mysql_config+set}" = set; then
-+if test "${ac_cv_path_mt_mysql_config+set}" = set; then :
-   $as_echo_n "(cached) " >&6
+-  $as_echo_n "(cached) " >&6
  else
-   case $mt_mysql_config in
-@@ -22470,14 +12362,14 @@ for as_dir in $MT_SEARCHPATH_PROGS
- do
-   IFS=$as_save_IFS
-   test -z "$as_dir" && as_dir=.
+-  case $mt_mysql_config in
+-  [\\/]* | ?:[\\/]*)
+-  ac_cv_path_mt_mysql_config="$mt_mysql_config" # Let the user override the test with a path.
+-  ;;
+-  *)
+-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+-for as_dir in $MT_SEARCHPATH_PROGS
+-do
+-  IFS=$as_save_IFS
+-  test -z "$as_dir" && as_dir=.
 -  for ac_exec_ext in '' $ac_executable_extensions; do
-+    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_mt_mysql_config="$as_dir/$ac_word$ac_exec_ext"
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+-    ac_cv_path_mt_mysql_config="$as_dir/$ac_word$ac_exec_ext"
 -    $as_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
+-    break 2
+-  fi
 -done
-+  done
- IFS=$as_save_IFS
++  as_fn_error $? "required library function not found" "$LINENO" 5
++fi
+ done
+-IFS=$as_save_IFS
  
-   test -z "$ac_cv_path_mt_mysql_config" && ac_cv_path_mt_mysql_config="none"
-@@ -22486,43 +12378,43 @@ esac
- fi
- mt_mysql_config=$ac_cv_path_mt_mysql_config
- if test -n "$mt_mysql_config"; then
+-  test -z "$ac_cv_path_mt_mysql_config" && ac_cv_path_mt_mysql_config="none"
+-  ;;
+-esac
+-fi
+-mt_mysql_config=$ac_cv_path_mt_mysql_config
+-if test -n "$mt_mysql_config"; then
 -  { $as_echo "$as_me:$LINENO: result: $mt_mysql_config" >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $mt_mysql_config" >&5
- $as_echo "$mt_mysql_config" >&6; }
- else
+-$as_echo "$mt_mysql_config" >&6; }
+-else
 -  { $as_echo "$as_me:$LINENO: result: no" >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
- $as_echo "no" >&6; }
- fi
+-$as_echo "no" >&6; }
+-fi
  
++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.
  
-             if test "x$mt_mysql_config" = xnone; then
-                 mt_mysql_package_status=missing
+-            if test "x$mt_mysql_config" = xnone; then
+-                mt_mysql_package_status=missing
 -                { $as_echo "$as_me:$LINENO: result: mysql_config not found, please install the mysql devel package" >&5
-+                { $as_echo "$as_me:${as_lineno-$LINENO}: result: mysql_config not found, please install the mysql devel package" >&5
- $as_echo "mysql_config not found, please install the mysql devel package" >&6; }
-             fi
-         fi
+-$as_echo "mysql_config not found, please install the mysql devel package" >&6; }
+-            fi
+-        fi
++_ACEOF
  
-         mt_mysql_version=`${mt_mysql_config} --version 2>/dev/null`
-         if test -z "$mt_mysql_version"; then
+-        mt_mysql_version=`${mt_mysql_config} --version 2>/dev/null`
+-        if test -z "$mt_mysql_version"; then
 -            { $as_echo "$as_me:$LINENO: ${mt_mysql_config} could not be executed or returned invalid values" >&5
-+            { $as_echo "$as_me:${as_lineno-$LINENO}: ${mt_mysql_config} could not be executed or returned invalid values" >&5
- $as_echo "$as_me: ${mt_mysql_config} could not be executed or returned invalid values" >&6;}
-             mt_mysql_package_status=missing
-         fi
-     fi
-     if test "x$mt_mysql_package_status" = xyes; then
+-$as_echo "$as_me: ${mt_mysql_config} could not be executed or returned invalid values" >&6;}
+-            mt_mysql_package_status=missing
+-        fi
+-    fi
+-    if test "x$mt_mysql_package_status" = xyes; then
 -        { $as_echo "$as_me:$LINENO: checking mysql cflags" >&5
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking mysql cflags" >&5
- $as_echo_n "checking mysql cflags... " >&6; }
-         mt_mysql_cxxflags=`${mt_mysql_config} --cflags`
+-$as_echo_n "checking mysql cflags... " >&6; }
+-        mt_mysql_cxxflags=`${mt_mysql_config} --cflags`
 -        { $as_echo "$as_me:$LINENO: result: $mt_mysql_cxxflags" >&5
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $mt_mysql_cxxflags" >&5
- $as_echo "$mt_mysql_cxxflags" >&6; }
-         mt_mysql_libs=
+-$as_echo "$mt_mysql_cxxflags" >&6; }
+-        mt_mysql_libs=
 -        { $as_echo "$as_me:$LINENO: checking mysql libs" >&5
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking mysql libs" >&5
- $as_echo_n "checking mysql libs... " >&6; }
-         if test -z "--libs_r";  then
-             mt_mysql_libs=`${mt_mysql_config} --libs`
-         else
-             mt_mysql_libs=`${mt_mysql_config} --libs_r`
-         fi
+-$as_echo_n "checking mysql libs... " >&6; }
+-        if test -z "--libs_r";  then
+-            mt_mysql_libs=`${mt_mysql_config} --libs`
+-        else
+-            mt_mysql_libs=`${mt_mysql_config} --libs_r`
+-        fi
 -        { $as_echo "$as_me:$LINENO: result: $mt_mysql_libs" >&5
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $mt_mysql_libs" >&5
- $as_echo "$mt_mysql_libs" >&6; }
-     fi
+-$as_echo "$mt_mysql_libs" >&6; }
+-    fi
++# The following way of writing the cache mishandles newlines in values,
++# but we know of no workaround that is simple, portable, and efficient.
++# So, we kill variables containing newlines.
++# Ultrix sh set writes to stderr and can't be redirected directly,
++# and sets the high bit in the cache file unless we assign to the vars.
++(
++  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
++    eval ac_val=\$$ac_var
++    case $ac_val in #(
++    *${as_nl}*)
++      case $ac_var in #(
++      *_cv_*) { $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
+ 
+-    if test "x$mt_mysql_package_status" = xyes; then
+-        CPPFLAGS="$CPPFLAGS $mt_mysql_cxxflags"
+-        CXXFLAGS="$CXXFLAGS $mt_mysql_cxxflags"
+-        CFLAGS="$CFLAGS $mt_mysql_cxxflags"
+-        for mt_u_header in mysql_h; do
+-            unset ac_cv_header_${mt_u_header}
+-        done
++  (set) 2>&1 |
++    case $as_nl`(ac_space=' '; set) 2>&1` in #(
++    *${as_nl}ac_space=\ *)
++      # `set' does not quote correctly, so add quotes: double-quote
++      # substitution turns \\\\ into \\, and sed turns \\ into \.
++      sed -n \
++	"s/'/'\\\\''/g;
++	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
++      ;; #(
++    *)
++      # `set' quotes correctly as required by POSIX, so do not add quotes.
++      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
++      ;;
++    esac |
++    sort
++) |
++  sed '
++     /^ac_cv_env_/b end
++     t clear
++     :clear
++     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
++     t end
++     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
++     :end' >>confcache
++if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
++  if test -w "$cache_file"; then
++    test "x$cache_file" != "x/dev/null" &&
++      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
++$as_echo "$as_me: updating cache $cache_file" >&6;}
++    cat confcache >$cache_file
++  else
++    { $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
  
-@@ -22533,151 +12425,12 @@ $as_echo "$mt_mysql_libs" >&6; }
-         for mt_u_header in mysql_h; do
-             unset ac_cv_header_${mt_u_header}
-         done
--
 -for ac_header in mysql.h
 -do
 -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -21314,13 +28361,26 @@ index f51d803..459bf70 100755
 -  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
 -$as_echo_n "checking for $ac_header... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
--  $as_echo_n "(cached) " >&6
++for ac_func in inet_ntoa
++do :
++  ac_fn_cxx_check_func "$LINENO" "inet_ntoa" "ac_cv_func_inet_ntoa"
++if test "x$ac_cv_func_inet_ntoa" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_INET_NTOA 1
++_ACEOF
++
++else
++
++                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_ntoa in -lnsl" >&5
++$as_echo_n "checking for inet_ntoa in -lnsl... " >&6; }
++if test "${ac_cv_lib_nsl_inet_ntoa+set}" = set; then :
+   $as_echo_n "(cached) " >&6
 -fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
--else
+ else
 -  # Is the header compilable?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
 -$as_echo_n "checking $ac_header usability... " >&6; }
@@ -21329,10 +28389,28 @@ index f51d803..459bf70 100755
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-lnsl  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
 -$ac_includes_default
 -#include <$ac_header>
--_ACEOF
++
++/* 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 inet_ntoa ();
++int
++main ()
++{
++return inet_ntoa ();
++  ;
++  return 0;
++}
+ _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -21352,17 +28430,31 @@ index f51d803..459bf70 100755
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_header_compiler=yes
--else
++if ac_fn_cxx_try_link "$LINENO"; then :
++  ac_cv_lib_nsl_inet_ntoa=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_header_compiler=no
--fi
--
++  ac_cv_lib_nsl_inet_ntoa=no
+ fi
++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_nsl_inet_ntoa" >&5
++$as_echo "$ac_cv_lib_nsl_inet_ntoa" >&6; }
++if test "x$ac_cv_lib_nsl_inet_ntoa" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_LIBNSL 1
++_ACEOF
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 -$as_echo "$ac_header_compiler" >&6; }
--
++  LIBS="-lnsl $LIBS"
+ 
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
 -$as_echo_n "checking $ac_header presence... " >&6; }
@@ -21392,17 +28484,19 @@ index f51d803..459bf70 100755
 -	 test ! -s conftest.err
 -       }; then
 -  ac_header_preproc=yes
--else
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -  ac_header_preproc=no
--fi
--
++                                    as_fn_error $? "required library function not found" "$LINENO" 5
++
+ fi
+ 
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$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_cxx_preproc_warn_flag in
 -  yes:no: )
@@ -21436,34 +28530,90 @@ index f51d803..459bf70 100755
 -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
 -$as_echo_n "checking for $ac_header... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
--  $as_echo_n "(cached) " >&6
--else
++fi
++done
++
++
++for ac_func in socket
++do :
++  ac_fn_cxx_check_func "$LINENO" "socket" "ac_cv_func_socket"
++if test "x$ac_cv_func_socket" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_SOCKET 1
++_ACEOF
++
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
++$as_echo_n "checking for socket in -lsocket... " >&6; }
++if test "${ac_cv_lib_socket_socket+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
 -  eval "$as_ac_Header=\$ac_header_preproc"
 -fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
--
--fi
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-lsocket  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
+ 
++/* Override any GCC internal prototype to avoid an error.
++   Use char because int might match the return type of a GCC
++   builtin and then its argument prototype would still apply.  */
++#ifdef __cplusplus
++extern "C"
++#endif
++char socket ();
++int
++main ()
++{
++return socket ();
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_cxx_try_link "$LINENO"; then :
++  ac_cv_lib_socket_socket=yes
++else
++  ac_cv_lib_socket_socket=no
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
+ fi
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+        for ac_header in mysql.h
-+do :
-+  ac_fn_cxx_check_header_mongrel "$LINENO" "mysql.h" "ac_cv_header_mysql_h" "$ac_includes_default"
-+if test "x$ac_cv_header_mysql_h" = x""yes; then :
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
++$as_echo "$ac_cv_lib_socket_socket" >&6; }
++if test "x$ac_cv_lib_socket_socket" = x""yes; then :
    cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-+#define HAVE_MYSQL_H 1
++#define HAVE_LIBSOCKET 1
  _ACEOF
  
++  LIBS="-lsocket $LIBS"
++
  else
-@@ -22692,102 +12445,12 @@ done
-         LIBS="$mt_mysql_libs $LIBS"
-         if test -z ""; then
-             unset ac_cv_func_mysql_init
--
+-  mt_mysql_package_status=missing
++
++                                    as_fn_error $? "required library function not found" "$LINENO" 5
++
+ fi
+ 
++
++fi
+ done
+ 
+-    fi
+ 
+-    if test "x$mt_mysql_package_status" = xyes; then
+-        LIBS="$mt_mysql_libs $LIBS"
+-        if test -z ""; then
+-            unset ac_cv_func_mysql_init
+ 
 -for ac_func in mysql_init
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -21481,26 +28631,43 @@ index f51d803..459bf70 100755
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
--
+ 
 -/* System header to define __stub macros and hopefully few prototypes,
 -    which can conflict with char $ac_func (); below.
 -    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 -    <limits.h> exists even on freestanding compilers.  */
--
++for ac_func in gethostbyname
++do :
++  ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
++if test "x$ac_cv_func_gethostbyname" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_GETHOSTBYNAME 1
++_ACEOF
+ 
 -#ifdef __STDC__
 -# include <limits.h>
 -#else
 -# include <assert.h>
 -#endif
--
++else
+ 
 -#undef $ac_func
--
--/* Override any GCC internal prototype to avoid an error.
--   Use char because int might match the return type of a GCC
--   builtin and then its argument prototype would still apply.  */
--#ifdef __cplusplus
--extern "C"
--#endif
++                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
++$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
++if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-lnsl  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
+ 
+ /* Override any GCC internal prototype to avoid an error.
+    Use char because int might match the return type of a GCC
+@@ -22730,86 +10212,212 @@
+ #ifdef __cplusplus
+ extern "C"
+ #endif
 -char $ac_func ();
 -/* The GNU C library defines this for functions which it implements
 -    to always fail with ENOSYS.  Some functions are actually named
@@ -21509,14 +28676,16 @@ index f51d803..459bf70 100755
 -choke me
 -#endif
 -
--int
--main ()
--{
++char gethostbyname ();
+ int
+ main ()
+ {
 -return $ac_func ();
--  ;
--  return 0;
--}
--_ACEOF
++return gethostbyname ();
+   ;
+   return 0;
+ }
+ _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -21539,17 +28708,175 @@ index f51d803..459bf70 100755
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
--else
++if ac_fn_cxx_try_link "$LINENO"; then :
++  ac_cv_lib_nsl_gethostbyname=yes
++else
++  ac_cv_lib_nsl_gethostbyname=no
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
++$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
++if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_LIBNSL 1
++_ACEOF
++
++  LIBS="-lnsl $LIBS"
++
++else
++
++                                    as_fn_error $? "required library function not found" "$LINENO" 5
++
++fi
++
++
++fi
++done
++
++
++if test $DARWIN_OS -eq 1 ; then
++        { $as_echo "$as_me:${as_lineno-$LINENO}: You are running OSX, assuming threadsafe gethostbyname version" >&5
++$as_echo "$as_me: You are running OSX, assuming threadsafe gethostbyname version" >&6;}
++elif test $CYGWIN_OS -eq 1; then
++        { $as_echo "$as_me:${as_lineno-$LINENO}: Your are building under Cygwin, assuming threadsafe gethostbyname implementation" >&5
++$as_echo "$as_me: Your are building under Cygwin, assuming threadsafe gethostbyname implementation" >&6;}
++fi
++
++ac_ext=cpp
++ac_cpp='$CXXCPP $CPPFLAGS'
++ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
++ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
++ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
++{ $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; }
++if test -z "$CXXCPP"; then
++  if test "${ac_cv_prog_CXXCPP+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++      # Double quotes because CXXCPP needs to be expanded
++    for CXXCPP in "$CXX -E" "/lib/cpp"
++    do
++      ac_preproc_ok=false
++for ac_cxx_preproc_warn_flag in '' yes
++do
++  # Use a header file that comes with gcc, so configuring glibc
++  # with a fresh cross-compiler works.
++  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++  # <limits.h> exists even on freestanding compilers.
++  # On the NeXT, cc -E runs the code through the compiler's parser,
++  # not just through cpp. "Syntax error" is here to catch this case.
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
++		     Syntax error
++_ACEOF
++if ac_fn_cxx_try_cpp "$LINENO"; then :
++
++else
++  # Broken: fails on valid input.
++continue
++fi
++rm -f conftest.err conftest.i conftest.$ac_ext
++
++  # OK, works on sane cases.  Now check whether nonexistent headers
++  # can be detected and how.
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <ac_nonexistent.h>
++_ACEOF
++if ac_fn_cxx_try_cpp "$LINENO"; then :
++  # Broken: success on invalid input.
++continue
++else
++  # Passes both tests.
++ac_preproc_ok=:
++break
++fi
++rm -f conftest.err conftest.i conftest.$ac_ext
++
++done
++# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
++rm -f conftest.i conftest.err conftest.$ac_ext
++if $ac_preproc_ok; then :
++  break
++fi
++
++    done
++    ac_cv_prog_CXXCPP=$CXXCPP
++
++fi
++  CXXCPP=$ac_cv_prog_CXXCPP
++else
++  ac_cv_prog_CXXCPP=$CXXCPP
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
++$as_echo "$CXXCPP" >&6; }
++ac_preproc_ok=false
++for ac_cxx_preproc_warn_flag in '' yes
++do
++  # Use a header file that comes with gcc, so configuring glibc
++  # with a fresh cross-compiler works.
++  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++  # <limits.h> exists even on freestanding compilers.
++  # On the NeXT, cc -E runs the code through the compiler's parser,
++  # not just through cpp. "Syntax error" is here to catch this case.
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
++		     Syntax error
++_ACEOF
++if ac_fn_cxx_try_cpp "$LINENO"; then :
++
+ else
 -  $as_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.i conftest.$ac_ext
+ 
 -	eval "$as_ac_var=no"
--fi
--
++  # OK, works on sane cases.  Now check whether nonexistent headers
++  # can be detected and how.
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <ac_nonexistent.h>
++_ACEOF
++if ac_fn_cxx_try_cpp "$LINENO"; then :
++  # Broken: success on invalid input.
++continue
++else
++  # Passes both tests.
++ac_preproc_ok=:
++break
+ fi
++rm -f conftest.err conftest.i conftest.$ac_ext
++
++done
++# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
++rm -f conftest.i conftest.err conftest.$ac_ext
++if $ac_preproc_ok; then :
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
--fi
++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 $? "C++ preprocessor \"$CXXCPP\" fails sanity check
++See \`config.log' for more details" "$LINENO" 5 ; }
+ fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -21557,40 +28884,70 @@ index f51d803..459bf70 100755
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+            for ac_func in mysql_init
++
++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
++
++
++for ac_func in gethostbyname_r
 +do :
-+  ac_fn_cxx_check_func "$LINENO" "mysql_init" "ac_cv_func_mysql_init"
-+if test "x$ac_cv_func_mysql_init" = x""yes; then :
++  ac_fn_cxx_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
++if test "x$ac_cv_func_gethostbyname_r" = x""yes; then :
    cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+#define HAVE_MYSQL_INIT 1
++#define HAVE_GETHOSTBYNAME_R 1
  _ACEOF
  
  else
-@@ -22797,19 +12460,14 @@ done
+-  mt_mysql_package_status=missing
+-fi
+-done
+ 
+-        else
+-            unset ac_cv_lib__mysql_init
++            for ac_header in lwres/netdb.h
++do :
++  ac_fn_cxx_check_header_mongrel "$LINENO" "lwres/netdb.h" "ac_cv_header_lwres_netdb_h" "$ac_includes_default"
++if test "x$ac_cv_header_lwres_netdb_h" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_LWRES_NETDB_H 1
++_ACEOF
  
-         else
-             unset ac_cv_lib__mysql_init
--
 -{ $as_echo "$as_me:$LINENO: checking for mysql_init in -l" >&5
-+            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mysql_init in -l" >&5
- $as_echo_n "checking for mysql_init in -l... " >&6; }
+-$as_echo_n "checking for mysql_init in -l... " >&6; }
 -if test "${ac_cv_lib__mysql_init+set}" = set; then
-+if test "${ac_cv_lib__mysql_init+set}" = set; then :
++                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwres_gethostbyname_r in -llwres" >&5
++$as_echo_n "checking for lwres_gethostbyname_r in -llwres... " >&6; }
++if test "${ac_cv_lib_lwres_lwres_gethostbyname_r+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
    ac_check_lib_save_LIBS=$LIBS
- LIBS="-l  $LIBS"
+-LIBS="-l  $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
++LIBS="-llwres  $LIBS"
 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -22827,43 +12485,18 @@ return mysql_init ();
+@@ -22818,173 +10426,73 @@
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-char mysql_init ();
++char lwres_gethostbyname_r ();
+ int
+ main ()
+ {
+-return mysql_init ();
++return lwres_gethostbyname_r ();
+   ;
    return 0;
  }
  _ACEOF
@@ -21615,14 +28972,15 @@ index f51d803..459bf70 100755
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
+-  ac_cv_lib__mysql_init=yes
 +if ac_fn_cxx_try_link "$LINENO"; then :
-   ac_cv_lib__mysql_init=yes
++  ac_cv_lib_lwres_lwres_gethostbyname_r=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_lib__mysql_init=no
-+  ac_cv_lib__mysql_init=no
++  ac_cv_lib_lwres_lwres_gethostbyname_r=no
  fi
 -
 -rm -rf conftest.dSYM
@@ -21633,64 +28991,119 @@ index f51d803..459bf70 100755
  LIBS=$ac_check_lib_save_LIBS
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib__mysql_init" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib__mysql_init" >&5
- $as_echo "$ac_cv_lib__mysql_init" >&6; }
+-$as_echo "$ac_cv_lib__mysql_init" >&6; }
 -if test "x$ac_cv_lib__mysql_init" = x""yes; then
-+if test "x$ac_cv_lib__mysql_init" = x""yes; then :
-   cat >>confdefs.h <<_ACEOF
- #define HAVE_LIB 1
- _ACEOF
-@@ -22898,16 +12531,12 @@ fi
-     if ((test "x${MYSQL_OPTION_ENABLED}" = xyes) &&
-         (test "x${MYSQL_OPTION_REQUESTED}" = xyes) &&
-         (test "x$mt_mysql_status" != xyes)); then
+-  cat >>confdefs.h <<_ACEOF
+-#define HAVE_LIB 1
+-_ACEOF
+-
+-  LIBS="-l $LIBS"
+-
+-else
+-  mt_mysql_package_status=missing
+-fi
+-
+-        fi
+-    fi
+-
+-    if test "x$mt_mysql_package_status" = xyes; then
+-        MYSQL_CFLAGS=${mt_mysql_cxxflags}
+-        MYSQL_LIBS=${mt_mysql_libs}
+-        MYSQL_VERSION=${mt_mysql_version}
+-    fi
+-
+-
+-    LIBS=$LIBS_SAVE
+-    LDFLAGS=$LDFLAGS_SAVE
+-    CFLAGS=$CFLAGS_SAVE
+-    CXXFLAGS=$CXXFLAGS_SAVE
+-    CPPFLAGS=$CPPFLAGS_SAVE
+-
+-        mt_mysql_status=${mt_mysql_package_status}
+-    else
+-        mt_mysql_status=disabled
+-    fi
+-
+-    if ((test "x${MYSQL_OPTION_ENABLED}" = xyes) &&
+-        (test "x${MYSQL_OPTION_REQUESTED}" = xyes) &&
+-        (test "x$mt_mysql_status" != xyes)); then
 -        { { $as_echo "$as_me:$LINENO: error: unable to configure mysql support" >&5
 -$as_echo "$as_me: error: unable to configure mysql support" >&2;}
 -   { (exit 1); exit 1; }; }
-+        as_fn_error $? "unable to configure mysql support" "$LINENO" 5
-     fi
- 
-     if test "x$mt_mysql_status" = xyes; then
+-    fi
+-
+-    if test "x$mt_mysql_status" = xyes; then
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lwres_lwres_gethostbyname_r" >&5
++$as_echo "$ac_cv_lib_lwres_lwres_gethostbyname_r" >&6; }
++if test "x$ac_cv_lib_lwres_lwres_gethostbyname_r" = x""yes; then :
  
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_MYSQL 1
 -_ACEOF
-+$as_echo "#define HAVE_MYSQL 1" >>confdefs.h
++                                    LWRES_LIBS="-llwres"
+ 
+-    fi
++$as_echo "#define HAVE_LIBLWRES 1" >>confdefs.h
+ 
+-    MYSQL_STATUS=${mt_mysql_status}
+ 
+ 
++else
++  as_fn_error $? "required library function not found" "$LINENO" 5
++fi
  
-     fi
  
-@@ -22923,18 +12552,18 @@ _ACEOF
++else
+ 
++                    if ((test $DARWIN_OS -eq 0) && (test $CYGWIN_OS -eq 0) && (test $OPENBSD_OS -eq 0)) ; then
++                        as_fn_error $? "required header not found" "$LINENO" 5
++                    fi
+ 
++fi
+ 
+-#    AS_IF([test x"$mt_mysql_status" = xyes], [--libs_r], [])[]dnl
++done
  
  
- if test "x$MYSQL_STATUS" = xyes; then
+-if test "x$MYSQL_STATUS" = xyes; then
 -    { $as_echo "$as_me:$LINENO: checking mysql version" >&5
-+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking mysql version" >&5
- $as_echo_n "checking mysql version... " >&6; }
-     MYSQL_VERSION_MAJOR=`echo $MYSQL_VERSION | sed 's/^\([0-9]\{1,\}\)\.\([0-9]\{1,\}\).\([0-9]\{1,\}\).*$/\1/'`
-     MYSQL_VERSION_MINOR=`echo $MYSQL_VERSION | sed 's/^\([0-9]\{1,\}\)\.\([0-9]\{1,\}\).\([0-9]\{1,\}\).*$/\2/'`
+-$as_echo_n "checking mysql version... " >&6; }
+-    MYSQL_VERSION_MAJOR=`echo $MYSQL_VERSION | sed 's/^\([0-9]\{1,\}\)\.\([0-9]\{1,\}\).\([0-9]\{1,\}\).*$/\1/'`
+-    MYSQL_VERSION_MINOR=`echo $MYSQL_VERSION | sed 's/^\([0-9]\{1,\}\)\.\([0-9]\{1,\}\).\([0-9]\{1,\}\).*$/\2/'`
 -    { $as_echo "$as_me:$LINENO: result: $MYSQL_VERSION" >&5
-+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MYSQL_VERSION" >&5
- $as_echo "$MYSQL_VERSION" >&6; }
-     if test -z $MYSQL_VERSION_MAJOR || test -z $MYSQL_VERSION_MINOR; then
+-$as_echo "$MYSQL_VERSION" >&6; }
+-    if test -z $MYSQL_VERSION_MAJOR || test -z $MYSQL_VERSION_MINOR; then
 -        { $as_echo "$as_me:$LINENO: WARNING: could not parse mysql version string" >&5
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not parse mysql version string" >&5
- $as_echo "$as_me: WARNING: could not parse mysql version string" >&2;}
-         MYSQL_STATUS=missing
-     elif test $MYSQL_VERSION_MAJOR -le 3 ; then
+-$as_echo "$as_me: WARNING: could not parse mysql version string" >&2;}
+-        MYSQL_STATUS=missing
+-    elif test $MYSQL_VERSION_MAJOR -le 3 ; then
 -       { $as_echo "$as_me:$LINENO: WARNING: MySQL version too old" >&5
-+       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MySQL version too old" >&5
- $as_echo "$as_me: WARNING: MySQL version too old" >&2;}
-        MYSQL_STATUS=missing
-     fi
-@@ -22948,121 +12577,25 @@ CPPFLAGS="$CFLAGS $MYSQL_CFLAGS"
+-$as_echo "$as_me: WARNING: MySQL version too old" >&2;}
+-       MYSQL_STATUS=missing
+-    fi
+ fi
++done
  
- if test "x$MYSQL_STATUS" = xyes; then
+-LDFLAGS="$LDFLAGS_SAVE"
+-LIBS="$LIBS $MYSQL_LIBS"
+-CFLAGS="$CFLAGS $MYSQL_CFLAGS"
+-CXXFLAGS="$CXXFLAGS $MYSQL_CFLAGS"
+-CPPFLAGS="$CFLAGS $MYSQL_CFLAGS"
+-
+-if test "x$MYSQL_STATUS" = xyes; then
  
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_MYSQL 1
--_ACEOF
--
--
++for ac_func in if_nameindex
++do :
++  ac_fn_cxx_check_func "$LINENO" "if_nameindex" "ac_cv_func_if_nameindex"
++if test "x$ac_cv_func_if_nameindex" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_IF_NAMEINDEX 1
+ _ACEOF
+ 
++else
+ 
 -
 -
 -for ac_func in mysql_stmt_init
@@ -21699,14 +29112,20 @@ index f51d803..459bf70 100755
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
--  $as_echo_n "(cached) " >&6
--else
++            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for if_nameindex in -lnsl" >&5
++$as_echo_n "checking for if_nameindex in -lnsl... " >&6; }
++if test "${ac_cv_lib_nsl_if_nameindex+set}" = set; 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
--/* end confdefs.h.  */
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-lnsl  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
@@ -21723,13 +29142,13 @@ index f51d803..459bf70 100755
 -#endif
 -
 -#undef $ac_func
--
--/* Override any GCC internal prototype to avoid an error.
--   Use char because int might match the return type of a GCC
--   builtin and then its argument prototype would still apply.  */
--#ifdef __cplusplus
--extern "C"
--#endif
+ 
+ /* Override any GCC internal prototype to avoid an error.
+    Use char because int might match the return type of a GCC
+@@ -22992,665 +10500,358 @@
+ #ifdef __cplusplus
+ extern "C"
+ #endif
 -char $ac_func ();
 -/* The GNU C library defines this for functions which it implements
 -    to always fail with ENOSYS.  Some functions are actually named
@@ -21737,16 +29156,17 @@ index f51d803..459bf70 100755
 -#if defined __stub_$ac_func || defined __stub___$ac_func
 -choke me
 -#endif
-+$as_echo "#define HAVE_MYSQL 1" >>confdefs.h
- 
--int
--main ()
--{
+-
++char if_nameindex ();
+ int
+ main ()
+ {
 -return $ac_func ();
--  ;
--  return 0;
--}
--_ACEOF
++return if_nameindex ();
+   ;
+   return 0;
+ }
+ _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -21769,17 +29189,37 @@ index f51d803..459bf70 100755
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
--else
++if ac_fn_cxx_try_link "$LINENO"; then :
++  ac_cv_lib_nsl_if_nameindex=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
+-
 -	eval "$as_ac_var=no"
--fi
++  ac_cv_lib_nsl_if_nameindex=no
++fi
++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_nsl_if_nameindex" >&5
++$as_echo "$ac_cv_lib_nsl_if_nameindex" >&6; }
++if test "x$ac_cv_lib_nsl_if_nameindex" = x""yes; then :
++
++                    NSL_LIBS="-lnsl"
++
++
++else
++
++                    if test $CYGWIN_OS -eq 0; then
++                        as_fn_error $? "required library function not found" "$LINENO" 5
++                    fi
++
  
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
--fi
+ fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -21787,32 +29227,60 @@ index f51d803..459bf70 100755
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+    for ac_func in mysql_stmt_init
-+do :
-+  ac_fn_cxx_check_func "$LINENO" "mysql_stmt_init" "ac_cv_func_mysql_stmt_init"
-+if test "x$ac_cv_func_mysql_stmt_init" = x""yes; then :
-   cat >>confdefs.h <<_ACEOF
+-  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+#define HAVE_MYSQL_STMT_INIT 1
- _ACEOF
+-_ACEOF
++
++
  
  fi
  done
  
  
 -    { $as_echo "$as_me:$LINENO: checking MYSQL_OPT_RECONNECT" >&5
-+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking MYSQL_OPT_RECONNECT" >&5
- $as_echo_n "checking MYSQL_OPT_RECONNECT... " >&6; }
+-$as_echo_n "checking MYSQL_OPT_RECONNECT... " >&6; }
 -    cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
--_ACEOF
++for ac_func in if_freenameindex
++do :
++  ac_fn_cxx_check_func "$LINENO" "if_freenameindex" "ac_cv_func_if_freenameindex"
++if test "x$ac_cv_func_if_freenameindex" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_IF_FREENAMEINDEX 1
+ _ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+-/* end confdefs.h.  */
  
-                 #include <mysql.h>
-@@ -23078,44 +12611,21 @@ main ()
+-                #include <mysql.h>
++else
++
++            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for if_freenameindex in -lnsl" >&5
++$as_echo_n "checking for if_freenameindex in -lnsl... " >&6; }
++if test "${ac_cv_lib_nsl_if_freenameindex+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-lnsl  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
+ 
++/* Override any GCC internal prototype to avoid an error.
++   Use char because int might match the return type of a GCC
++   builtin and then its argument prototype would still apply.  */
++#ifdef __cplusplus
++extern "C"
++#endif
++char if_freenameindex ();
+ int
+ main ()
+ {
+-
+-                (int)mysql_options(0, MYSQL_OPT_RECONNECT, 0);
+-
+-
++return if_freenameindex ();
+   ;
    return 0;
  }
  _ACEOF
@@ -21834,59 +29302,103 @@ index f51d803..459bf70 100755
 -	 test -z "$ac_cxx_werror_flag" ||
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
-+if ac_fn_cxx_try_compile "$LINENO"; then :
- 
+-
 -            { $as_echo "$as_me:$LINENO: result: yes" >&5
-+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
- $as_echo "yes" >&6; }
- 
+-$as_echo "yes" >&6; }
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_MYSQL_OPT_RECONNECT 1
--_ACEOF
-+$as_echo "#define HAVE_MYSQL_OPT_RECONNECT 1" >>confdefs.h
++if ac_fn_cxx_try_link "$LINENO"; then :
++  ac_cv_lib_nsl_if_freenameindex=yes
++else
++  ac_cv_lib_nsl_if_freenameindex=no
++fi
++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_nsl_if_freenameindex" >&5
++$as_echo "$ac_cv_lib_nsl_if_freenameindex" >&6; }
++if test "x$ac_cv_lib_nsl_if_freenameindex" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_LIBNSL 1
+ _ACEOF
  
++  LIBS="-lnsl $LIBS"
  
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
- 
+-
 -            { $as_echo "$as_me:$LINENO: result: no" >&5
-+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
- $as_echo "no" >&6; }
+-$as_echo "no" >&6; }
  
++                    if ((test $CYGWIN_OS -eq 0) && (test $OPENBSD_OS -eq 0)); then
++                        as_fn_error $? "required library function not found" "$LINENO" 5
++                    fi
+ 
+-fi
  
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-else
+-    MYSQL_CFLAGS=
+-    MYSQL_LIBS=
  fi
--
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- else
-     MYSQL_CFLAGS=
-@@ -23131,15 +12641,13 @@ LIBS="$LIBS_SAVE"
- #########  check if at least one database available
  
- if ((test "x$SQLITE3_STATUS" != xyes) && (test "x$MYSQL_STATUS" != xyes)); then
+-CPPFLAGS="$CPPFLAGS_SAVE"
+-CXXFLAGS="$CXXFLAGS_SAVE"
+-CFLAGS="$CFLAGS_SAVE"
+-LDFLAGS="$LDFLAGS_SAVE"
+-LIBS="$LIBS_SAVE"
+ 
+-#########  check if at least one database available
+ 
+-if ((test "x$SQLITE3_STATUS" != xyes) && (test "x$MYSQL_STATUS" != xyes)); then
 -    { { $as_echo "$as_me:$LINENO: error: Support of at least one of mysql or sqlite3 must be configured" >&5
 -$as_echo "$as_me: error: Support of at least one of mysql or sqlite3 must be configured" >&2;}
 -   { (exit 1); exit 1; }; }
-+    as_fn_error $? "Support of at least one of mysql or sqlite3 must be configured" "$LINENO" 5
  fi
++done
  
- ######### javascript
+-######### javascript
  
- # Check whether --enable-libjs was given.
+-# Check whether --enable-libjs was given.
 -if test "${enable_libjs+set}" = set; then
-+if test "${enable_libjs+set}" = set; then :
-   enableval=$enable_libjs;
-                 JS_EN=$enableval
-                 if test "x$enableval" = xno; then
-@@ -23165,156 +12673,17 @@ if test "x$JS_OK" = xyes; then
-     CPPFLAGS="$CPPFLAGS $XP_ADD"
+-  enableval=$enable_libjs;
+-                JS_EN=$enableval
+-                if test "x$enableval" = xno; then
+-                    JS_OK=disabled
+-                else
+-                    JS_OK=yes
+-                fi
+ 
+-else
++# this is not optional, we need the device and the internal webserver
+ 
+-                JS_OK=yes
++$as_echo "#define UPNP_HAVE_DEVICE 1" >>confdefs.h
+ 
  
-     if test -n "$JS_SEARCH_HEADERS" ; then
+-fi
++$as_echo "#define UPNP_HAVE_WEBSERVER 1" >>confdefs.h
+ 
+ 
+-XP_ADD=""
+ 
+-if test "x$JS_OK" = xyes; then
+-        XP_ADD="-DXP_UNIX"
++ADD_PTHREAD_CFLAGS=
+ 
+-    CXXFLAGS="$CXXFLAGS $XP_ADD"
+-    CPPFLAGS="$CPPFLAGS $XP_ADD"
++# see acinclude.m4 for the definition of ACX_PTHREAD
++if test "x$PTHREAD_LIB_OPTION_ENABLED" = xyes; then
+ 
+-    if test -n "$JS_SEARCH_HEADERS" ; then
 -        { $as_echo "$as_me:$LINENO: Will search for js (spidermonkey) headers in $JS_SEARCH_HEADERS" >&5
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for js (spidermonkey) headers in $JS_SEARCH_HEADERS" >&5
- $as_echo "$as_me: Will search for js (spidermonkey) headers in $JS_SEARCH_HEADERS" >&6;}
-         as_ac_Header=`$as_echo "ac_cv_header_$JS_SEARCH_HEADERS/jsapi.h" | $as_tr_sh`
+-$as_echo "$as_me: Will search for js (spidermonkey) headers in $JS_SEARCH_HEADERS" >&6;}
+-        as_ac_Header=`$as_echo "ac_cv_header_$JS_SEARCH_HEADERS/jsapi.h" | $as_tr_sh`
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 -  { $as_echo "$as_me:$LINENO: checking for $JS_SEARCH_HEADERS/jsapi.h" >&5
 -$as_echo_n "checking for $JS_SEARCH_HEADERS/jsapi.h... " >&6; }
@@ -21932,14 +29444,29 @@ index f51d803..459bf70 100755
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	ac_header_compiler=no
 -fi
--
++    mt_pthread_arg_default=yes
++    mt_pthread_library_status=yes
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 -$as_echo "$ac_header_compiler" >&6; }
--
++    LIBS_SAVE=$LIBS
++    LDFLAGS_SAVE=$LDFLAGS
++    CFLAGS_SAVE=$CFLAGS
++    CXXFLAGS_SAVE=$CXXFLAGS
++    CPPFLAGS_SAVE=$CPPFLAGS
++
++
++# Check whether --with-pthread-libs was given.
++if test "${with_pthread_libs+set}" = set; then :
++  withval=$with_pthread_libs;
++            mt_pthread_search_libs="$withval"
++            { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for pthread libs in $withval" >&5
++$as_echo "$as_me: Will search for pthread libs in $withval" >&6;}
+ 
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking $JS_SEARCH_HEADERS/jsapi.h presence" >&5
 -$as_echo_n "checking $JS_SEARCH_HEADERS/jsapi.h presence... " >&6; }
@@ -21972,14 +29499,14 @@ index f51d803..459bf70 100755
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -  ac_header_preproc=no
--fi
--
+ fi
+ 
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$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_cxx_preproc_warn_flag in
 -  yes:no: )
@@ -22013,46 +29540,92 @@ index f51d803..459bf70 100755
 -{ $as_echo "$as_me:$LINENO: checking for $JS_SEARCH_HEADERS/jsapi.h" >&5
 -$as_echo_n "checking for $JS_SEARCH_HEADERS/jsapi.h... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
--  $as_echo_n "(cached) " >&6
--else
++    if test "$mt_pthread_search_libs" ; then
++        unset ac_cv_lib_pthread_pthread_create
++        LDFLAGS="$LDFLAGS -L$mt_pthread_search_libs"
++        { $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 test "${ac_cv_lib_pthread_pthread_create+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
 -  eval "$as_ac_Header=\$ac_header_preproc"
 -fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
--
--fi
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-lpthread  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
+ 
++/* Override any GCC internal prototype to avoid an error.
++   Use char because int might match the return type of a GCC
++   builtin and then its argument prototype would still apply.  */
++#ifdef __cplusplus
++extern "C"
++#endif
++char pthread_create ();
++int
++main ()
++{
++return pthread_create ();
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_cxx_try_link "$LINENO"; then :
++  ac_cv_lib_pthread_pthread_create=yes
++else
++  ac_cv_lib_pthread_pthread_create=no
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
+ fi
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+ac_fn_cxx_check_header_mongrel "$LINENO" "$JS_SEARCH_HEADERS/jsapi.h" "$as_ac_Header" "$ac_includes_default"
-+if eval test \"x\$"$as_ac_Header"\" = x"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" = x""yes; then :
  
-                     JS_CXXFLAGS="-I$JS_SEARCH_HEADERS"
+-                    JS_CXXFLAGS="-I$JS_SEARCH_HEADERS"
++                mt_pthread_libs="-lpthread"
++                mt_pthread_ldflags="-L$mt_pthread_search_libs"
  
  else
  
 -                    { { $as_echo "$as_me:$LINENO: error: jsapi.h not found in requested location $JS_SEARCH_HEADERS" >&5
 -$as_echo "$as_me: error: jsapi.h not found in requested location $JS_SEARCH_HEADERS" >&2;}
 -   { (exit 1); exit 1; }; }
-+                    as_fn_error $? "jsapi.h not found in requested location $JS_SEARCH_HEADERS" "$LINENO" 5
++                mt_pthread_library_status=missing
++                if test "" = "pass"; then
++                    { $as_echo "$as_me:${as_lineno-$LINENO}: pthread library not found in requested location $mt_pthread_search_libs" >&5
++$as_echo "$as_me: pthread library not found in requested location $mt_pthread_search_libs" >&6;}
++                else
++                    as_fn_error $? "pthread library not found in requested location $mt_pthread_search_libs" "$LINENO" 5
++                fi
  
  
  fi
-@@ -23322,140 +12691,9 @@ fi
- 
  
+-
+-
      else
 -    if test "${ac_cv_header_jsapi_h+set}" = set; then
 -  { $as_echo "$as_me:$LINENO: checking for jsapi.h" >&5
 -$as_echo_n "checking for jsapi.h... " >&6; }
 -if test "${ac_cv_header_jsapi_h+set}" = set; then
--  $as_echo_n "(cached) " >&6
++        unset ac_cv_lib_pthread_pthread_create
++        { $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 test "${ac_cv_lib_pthread_pthread_create+set}" = set; then :
+   $as_echo_n "(cached) " >&6
 -fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_jsapi_h" >&5
 -$as_echo "$ac_cv_header_jsapi_h" >&6; }
--else
+ else
 -  # Is the header compilable?
 -{ $as_echo "$as_me:$LINENO: checking jsapi.h usability" >&5
 -$as_echo_n "checking jsapi.h usability... " >&6; }
@@ -22061,7 +29634,10 @@ index f51d803..459bf70 100755
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-lpthread  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
 -$ac_includes_default
 -#include <jsapi.h>
 -_ACEOF
@@ -22087,12 +29663,10 @@ index f51d803..459bf70 100755
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	ac_header_compiler=no
 -fi
-+    ac_fn_cxx_check_header_mongrel "$LINENO" "jsapi.h" "ac_cv_header_jsapi_h" "$ac_includes_default"
-+if test "x$ac_cv_header_jsapi_h" = x""yes; then :
- 
+-
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 -$as_echo "$ac_header_compiler" >&6; }
@@ -22107,7 +29681,21 @@ index f51d803..459bf70 100755
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -#include <jsapi.h>
--_ACEOF
++/* 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 pthread_create ();
++int
++main ()
++{
++return pthread_create ();
++  ;
++  return 0;
++}
+ _ACEOF
 -if { (ac_try="$ac_cpp conftest.$ac_ext"
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -22126,12 +29714,15 @@ index f51d803..459bf70 100755
 -	 test ! -s conftest.err
 -       }; then
 -  ac_header_preproc=yes
--else
++if ac_fn_cxx_try_link "$LINENO"; then :
++  ac_cv_lib_pthread_pthread_create=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -  ac_header_preproc=no
--fi
++  ac_cv_lib_pthread_pthread_create=no
+ fi
 -
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
@@ -22173,35 +29764,56 @@ index f51d803..459bf70 100755
 -  $as_echo_n "(cached) " >&6
 -else
 -  ac_cv_header_jsapi_h=$ac_header_preproc
--fi
++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:$LINENO: result: $ac_cv_header_jsapi_h" >&5
 -$as_echo "$ac_cv_header_jsapi_h" >&6; }
--
++{ $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" = x""yes; then :
++
++                mt_pthread_libs="-lpthread"
+ 
 -fi
 -if test "x$ac_cv_header_jsapi_h" = x""yes; then
 -  :
  else
  
-             for sm_path in $SEARCH_DIR_HEADERS \
-@@ -23472,147 +12710,16 @@ else
-                            $SEARCH_DIR_HEADERS/mozjs \
-                            $SEARCH_DIR_HEADERS/spidermonkey; do
-                 if test "x$ac_cv_header_jsapi_h" != xyes ; then
+-            for sm_path in $SEARCH_DIR_HEADERS \
+-                           /usr/include/js \
+-                           /usr/include/smjs \
+-                           /usr/include/mozjs \
+-                           /usr/local/include/js \
+-                           /usr/local/include/smjs \
+-                           /usr/local/include/mozjs \
+-                           /usr/include/spidermonkey \
+-                           /usr/local/include/spidermonkey \
+-                           $SEARCH_DIR_HEADERS/js \
+-                           $SEARCH_DIR_HEADERS/smjs \
+-                           $SEARCH_DIR_HEADERS/mozjs \
+-                           $SEARCH_DIR_HEADERS/spidermonkey; do
+-                if test "x$ac_cv_header_jsapi_h" != xyes ; then
 -                    { $as_echo "$as_me:$LINENO: checking checking alternative libjs header location: $sm_path" >&5
-+                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking checking alternative libjs header location: $sm_path" >&5
- $as_echo_n "checking checking alternative libjs header location: $sm_path... " >&6; }
-                     CXXFLAGS="$XP_ADD -I$sm_path"
-                     CPPFLAGS="$XP_ADD -I$sm_path"
-                     unset ac_cv_header_jsapi_h
+-$as_echo_n "checking checking alternative libjs header location: $sm_path... " >&6; }
+-                    CXXFLAGS="$XP_ADD -I$sm_path"
+-                    CPPFLAGS="$XP_ADD -I$sm_path"
+-                    unset ac_cv_header_jsapi_h
 -                    if test "${ac_cv_header_jsapi_h+set}" = set; then
 -  { $as_echo "$as_me:$LINENO: checking for jsapi.h" >&5
 -$as_echo_n "checking for jsapi.h... " >&6; }
 -if test "${ac_cv_header_jsapi_h+set}" = set; then
--  $as_echo_n "(cached) " >&6
++                LDFLAGS="$LDFLAGS -L$MT_SEARCHPATH_LIBS"
++                unset ac_cv_lib_pthread_pthread_create
++                { $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 test "${ac_cv_lib_pthread_pthread_create+set}" = set; then :
+   $as_echo_n "(cached) " >&6
 -fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_jsapi_h" >&5
 -$as_echo "$ac_cv_header_jsapi_h" >&6; }
--else
+ else
 -  # Is the header compilable?
 -{ $as_echo "$as_me:$LINENO: checking jsapi.h usability" >&5
 -$as_echo_n "checking jsapi.h usability... " >&6; }
@@ -22210,10 +29822,28 @@ index f51d803..459bf70 100755
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-lpthread  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
 -$ac_includes_default
 -#include <jsapi.h>
--_ACEOF
++
++/* 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 pthread_create ();
++int
++main ()
++{
++return pthread_create ();
++  ;
++  return 0;
++}
+ _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -22233,17 +29863,29 @@ index f51d803..459bf70 100755
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_header_compiler=yes
--else
++if ac_fn_cxx_try_link "$LINENO"; then :
++  ac_cv_lib_pthread_pthread_create=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_header_compiler=no
--fi
--
++  ac_cv_lib_pthread_pthread_create=no
++fi
++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_pthread_pthread_create" >&5
++$as_echo "$ac_cv_lib_pthread_pthread_create" >&6; }
++if test "x$ac_cv_lib_pthread_pthread_create" = x""yes; then :
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 -$as_echo "$ac_header_compiler" >&6; }
--
++                        mt_pthread_libs="-lpthread"
++                        mt_pthread_ldflags="-L$MT_SEARCHPATH_LIBS"
+ 
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking jsapi.h presence" >&5
 -$as_echo_n "checking jsapi.h presence... " >&6; }
@@ -22273,17 +29915,18 @@ index f51d803..459bf70 100755
 -	 test ! -s conftest.err
 -       }; then
 -  ac_header_preproc=yes
--else
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -  ac_header_preproc=no
 -fi
--
++                        mt_pthread_library_status=missing
+ 
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$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_cxx_preproc_warn_flag in
 -  yes:no: )
@@ -22320,57 +29963,268 @@ index f51d803..459bf70 100755
 -  $as_echo_n "(cached) " >&6
 -else
 -  ac_cv_header_jsapi_h=$ac_header_preproc
--fi
+ fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_jsapi_h" >&5
 -$as_echo "$ac_cv_header_jsapi_h" >&6; }
--
+ 
 -fi
 -if test "x$ac_cv_header_jsapi_h" = x""yes; then
-+                    ac_fn_cxx_check_header_mongrel "$LINENO" "jsapi.h" "ac_cv_header_jsapi_h" "$ac_includes_default"
-+if test "x$ac_cv_header_jsapi_h" = x""yes; then :
  
-                                         JS_CXXFLAGS="-I$sm_path"
+-                                        JS_CXXFLAGS="-I$sm_path"
 -                                        { $as_echo "$as_me:$LINENO: result: jsapi.h found in $sm_path" >&5
-+                                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: jsapi.h found in $sm_path" >&5
- $as_echo "jsapi.h found in $sm_path" >&6; }
+-$as_echo "jsapi.h found in $sm_path" >&6; }
  
  fi
-@@ -23627,7 +12734,7 @@ fi
  
-         if test "x$ac_cv_header_jsapi_h" != xyes ; then
-                 JS_OK=missing
++    fi
+ 
+-               fi
+-            done
++    if test "x$mt_pthread_library_status" != xyes; then
++        mt_pthread_libs=""
++        mt_pthread_ldflags=""
++    fi
+ 
+-fi
++    LIBS=$LIBS_SAVE
++    LDFLAGS=$LDFLAGS_SAVE
++    CFLAGS=$CFLAGS_SAVE
++    CXXFLAGS=$CXXFLAGS_SAVE
++    CPPFLAGS=$CPPFLAGS_SAVE
+ 
+ 
++    PTHREAD_LIBS=${mt_pthread_libs}
++    PTHREAD_LDFLAGS=${mt_pthread_ldflags}
++    PTHREAD_STATUS=${mt_pthread_library_status}
+ 
+-        if test "x$ac_cv_header_jsapi_h" != xyes ; then
+-                JS_OK=missing
 -                { $as_echo "$as_me:$LINENO: result: not found, giving up" >&5
-+                { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, giving up" >&5
- $as_echo "not found, giving up" >&6; }
-         fi
-     fi
-@@ -23636,21 +12743,17 @@ fi
- MOZLIB=
- if test "x$JS_OK" = xyes; then
-     if test -n "$JS_SEARCH_LIBS" ; then
+-$as_echo "not found, giving up" >&6; }
+-        fi
+-    fi
+-fi
+ 
+-MOZLIB=
+-if test "x$JS_OK" = xyes; then
+-    if test -n "$JS_SEARCH_LIBS" ; then
 -        { $as_echo "$as_me:$LINENO: Will search for js (spidermonkey) libraries in $JS_SEARCH_LIBS" >&5
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for js (spidermonkey) libraries in $JS_SEARCH_LIBS" >&5
- $as_echo "$as_me: Will search for js (spidermonkey) libraries in $JS_SEARCH_LIBS" >&6;}
-         LDFLAGS="-L$JS_SEARCH_LIBS $LDFLAGS_SAVE -ljs $ADD_PTHREAD_CFLAGS"
+-$as_echo "$as_me: Will search for js (spidermonkey) libraries in $JS_SEARCH_LIBS" >&6;}
+-        LDFLAGS="-L$JS_SEARCH_LIBS $LDFLAGS_SAVE -ljs $ADD_PTHREAD_CFLAGS"
 -        { $as_echo "$as_me:$LINENO: checking for JS_NewObject in -ljs" >&5
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JS_NewObject in -ljs" >&5
- $as_echo_n "checking for JS_NewObject in -ljs... " >&6; }
+-$as_echo_n "checking for JS_NewObject in -ljs... " >&6; }
 -if test "${ac_cv_lib_js_JS_NewObject+set}" = set; then
-+if test "${ac_cv_lib_js_JS_NewObject+set}" = set; then :
-   $as_echo_n "(cached) " >&6
+-  $as_echo_n "(cached) " >&6
++
++
++
++    if test "x$PTHREAD_STATUS" != xyes; then
++        as_fn_error $? "pthread library not found, try running configure without the --enable-pthread-lib option" "$LINENO" 5
++    fi
  else
-   ac_check_lib_save_LIBS=$LIBS
- LIBS="-ljs  $LIBS"
+-  ac_check_lib_save_LIBS=$LIBS
+-LIBS="-ljs  $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
++
++
++
++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
++
++acx_pthread_ok=no
++
++# We used to check for pthread.h first, but this fails if pthread.h
++# requires special compiler flags (e.g. on True64 or Sequent).
++# It gets checked for in the link test anyway.
++
++# First of all, check if the user has set any of the PTHREAD_LIBS,
++# etcetera environment variables, and if threads linking works using
++# them:
++if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
++        save_CFLAGS="$CFLAGS"
++        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
++        save_LIBS="$LIBS"
++        LIBS="$PTHREAD_LIBS $LIBS"
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
++$as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; }
++        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -23668,43 +12771,18 @@ return JS_NewObject ();
+@@ -23659,233 +10860,371 @@
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-char JS_NewObject ();
++char pthread_join ();
+ int
+ main ()
+ {
+-return JS_NewObject ();
++return pthread_join ();
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_link "$LINENO"; then :
++  acx_pthread_ok=yes
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_ok" >&5
++$as_echo "$acx_pthread_ok" >&6; }
++        if test x"$acx_pthread_ok" = xno; then
++                PTHREAD_LIBS=""
++                PTHREAD_CFLAGS=""
++        fi
++        LIBS="$save_LIBS"
++        CFLAGS="$save_CFLAGS"
++fi
++
++# We must check for the threads library under a number of different
++# names; the ordering is very important because some systems
++# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
++# libraries is broken (non-POSIX).
++
++# Create a list of thread flags to try.  Items starting with a "-" are
++# C compiler flags, and other items are library names, except for "none"
++# which indicates that we try without any flags at all, and "pthread-config"
++# which is a program returning the flags for the Pth emulation library.
++
++acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
++
++# The ordering *is* (sometimes) important.  Some notes on the
++# individual items follow:
++
++# pthreads: AIX (must check this before -lpthread)
++# none: in case threads are in libc; should be tried before -Kthread and
++#       other compiler flags to prevent continual compiler warnings
++# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
++# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
++# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
++# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
++# -pthreads: Solaris/gcc
++# -mthreads: Mingw32/gcc, Lynx/gcc
++# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
++#      doesn't hurt to check since this sometimes defines pthreads too;
++#      also defines -D_REENTRANT)
++#      ... -mt is also the pthreads flag for HP/aCC
++# pthread: Linux, etcetera
++# --thread-safe: KAI C++
++# pthread-config: use pthread-config program (for GNU Pth library)
++
++case "${host_cpu}-${host_os}" in
++        *solaris*)
++
++        # On Solaris (at least, for some versions), libc contains stubbed
++        # (non-functional) versions of the pthreads routines, so link-based
++        # tests will erroneously succeed.  (We need to link with -pthreads/-mt/
++        # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
++        # a function called by this macro, so we could check for that, but
++        # who knows whether they'll stub that too in a future libc.)  So,
++        # we'll just look for -pthreads and -lpthread first:
++
++        acx_pthread_flags="-pthreads pthread -mt -pthread $acx_pthread_flags"
++        ;;
++esac
++
++if test x"$acx_pthread_ok" = xno; then
++for flag in $acx_pthread_flags; do
++
++        case $flag in
++                none)
++                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
++$as_echo_n "checking whether pthreads work without any flags... " >&6; }
++                ;;
++
++                -*)
++                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
++$as_echo_n "checking whether pthreads work with $flag... " >&6; }
++                PTHREAD_CFLAGS="$flag"
++                ;;
++
++                pthread-config)
++                # Extract the first word of "pthread-config", so it can be a program name with args.
++set dummy pthread-config; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_acx_pthread_config+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test -n "$acx_pthread_config"; then
++  ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++    ac_cv_prog_acx_pthread_config="yes"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
++
++  test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no"
++fi
++fi
++acx_pthread_config=$ac_cv_prog_acx_pthread_config
++if test -n "$acx_pthread_config"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_config" >&5
++$as_echo "$acx_pthread_config" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++
++                if test x"$acx_pthread_config" = xno; then continue; fi
++                PTHREAD_CFLAGS="`pthread-config --cflags`"
++                PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
++                ;;
++
++                *)
++                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
++$as_echo_n "checking for the pthreads library -l$flag... " >&6; }
++                PTHREAD_LIBS="-l$flag"
++                ;;
++        esac
++
++        save_LIBS="$LIBS"
++        save_CFLAGS="$CFLAGS"
++        LIBS="$PTHREAD_LIBS $LIBS"
++        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
++
++        # Check for various functions.  We must include pthread.h,
++        # since some functions may be macros.  (On the Sequent, we
++        # need a special flag -Kthread to make this header compile.)
++        # We check for pthread_join because it is in -lpthread on IRIX
++        # while pthread_create is in libc.  We check for pthread_attr_init
++        # due to DEC craziness with -lpthreads.  We check for
++        # pthread_cleanup_push because it is one of the few pthread
++        # functions on Solaris that doesn't have a non-functional libc stub.
++        # We try pthread_create on general principles.
++        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <pthread.h>
++int
++main ()
++{
++pthread_t th; pthread_join(th, 0);
++                     pthread_attr_init(0); pthread_cleanup_push(0, 0);
++                     pthread_create(0,0,0,0); pthread_cleanup_pop(0);
+   ;
    return 0;
  }
  _ACEOF
@@ -22395,54 +30249,85 @@ index f51d803..459bf70 100755
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
-+if ac_fn_cxx_try_link "$LINENO"; then :
-   ac_cv_lib_js_JS_NewObject=yes
- else
+-  ac_cv_lib_js_JS_NewObject=yes
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_lib_js_JS_NewObject=no
-+  ac_cv_lib_js_JS_NewObject=no
++if ac_fn_c_try_link "$LINENO"; then :
++  acx_pthread_ok=yes
  fi
--
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      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
+-LIBS=$ac_check_lib_save_LIBS
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_js_JS_NewObject" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_js_JS_NewObject" >&5
- $as_echo "$ac_cv_lib_js_JS_NewObject" >&6; }
+-$as_echo "$ac_cv_lib_js_JS_NewObject" >&6; }
 -if test "x$ac_cv_lib_js_JS_NewObject" = x""yes; then
-+if test "x$ac_cv_lib_js_JS_NewObject" = x""yes; then :
++        LIBS="$save_LIBS"
++        CFLAGS="$save_CFLAGS"
  
-                     JS_LIBS="-L$JS_SEARCH_LIBS -ljs"
-                     MOZLIB=js
-@@ -23712,18 +12790,14 @@ if test "x$ac_cv_lib_js_JS_NewObject" = x""yes; then
- else
+-                    JS_LIBS="-L$JS_SEARCH_LIBS -ljs"
+-                    MOZLIB=js
++        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_ok" >&5
++$as_echo "$acx_pthread_ok" >&6; }
++        if test "x$acx_pthread_ok" = xyes; then
++                break;
++        fi
+ 
+-else
++        PTHREAD_LIBS=""
++        PTHREAD_CFLAGS=""
++done
++fi
  
-                     LDFLAGS="-L$JS_SEARCH_LIBS $LDFLAGS_SAVE -lsmjs $ADD_PTHREAD_CFLAGS"
+-                    LDFLAGS="-L$JS_SEARCH_LIBS $LDFLAGS_SAVE -lsmjs $ADD_PTHREAD_CFLAGS"
 -                    { $as_echo "$as_me:$LINENO: checking for JS_NewObject in -lsmjs" >&5
-+                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JS_NewObject in -lsmjs" >&5
- $as_echo_n "checking for JS_NewObject in -lsmjs... " >&6; }
+-$as_echo_n "checking for JS_NewObject in -lsmjs... " >&6; }
 -if test "${ac_cv_lib_smjs_JS_NewObject+set}" = set; then
-+if test "${ac_cv_lib_smjs_JS_NewObject+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
-   ac_check_lib_save_LIBS=$LIBS
- LIBS="-lsmjs  $LIBS"
+-  $as_echo_n "(cached) " >&6
+-else
+-  ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lsmjs  $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.  */
+-/* end confdefs.h.  */
++# Various other checks:
++if test "x$acx_pthread_ok" = xyes; then
++        save_LIBS="$LIBS"
++        LIBS="$PTHREAD_LIBS $LIBS"
++        save_CFLAGS="$CFLAGS"
++        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
  
- /* Override any GCC internal prototype to avoid an error.
-@@ -23741,43 +12815,18 @@ return JS_NewObject ();
+-/* 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 JS_NewObject ();
++        # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
++$as_echo_n "checking for joinable pthread attribute... " >&6; }
++        attr_name=unknown
++        for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
++            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++#include <pthread.h>
+ int
+ main ()
+ {
+-return JS_NewObject ();
++int attr=$attr; return attr;
+   ;
    return 0;
  }
  _ACEOF
@@ -22467,57 +30352,94 @@ index f51d803..459bf70 100755
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
-+if ac_fn_cxx_try_link "$LINENO"; then :
-   ac_cv_lib_smjs_JS_NewObject=yes
- else
+-  ac_cv_lib_smjs_JS_NewObject=yes
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_lib_smjs_JS_NewObject=no
-+  ac_cv_lib_smjs_JS_NewObject=no
++if ac_fn_c_try_link "$LINENO"; then :
++  attr_name=$attr; break
  fi
--
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++        done
++        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $attr_name" >&5
++$as_echo "$attr_name" >&6; }
++        if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      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
+-LIBS=$ac_check_lib_save_LIBS
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_smjs_JS_NewObject" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_smjs_JS_NewObject" >&5
- $as_echo "$ac_cv_lib_smjs_JS_NewObject" >&6; }
+-$as_echo "$ac_cv_lib_smjs_JS_NewObject" >&6; }
 -if test "x$ac_cv_lib_smjs_JS_NewObject" = x""yes; then
-+if test "x$ac_cv_lib_smjs_JS_NewObject" = x""yes; then :
++cat >>confdefs.h <<_ACEOF
++#define PTHREAD_CREATE_JOINABLE $attr_name
++_ACEOF
  
-                             JS_LIBS="-L$JS_SEARCH_LIBS $LDFLAGS_SAVE -lsmjs $ADD_PTHREAD_CFLAGS"
-                             MOZLIB=smjs
-@@ -23785,18 +12834,14 @@ if test "x$ac_cv_lib_smjs_JS_NewObject" = x""yes; then
- else
+-                            JS_LIBS="-L$JS_SEARCH_LIBS $LDFLAGS_SAVE -lsmjs $ADD_PTHREAD_CFLAGS"
+-                            MOZLIB=smjs
++        fi
  
-                             LDFLAGS="-L$JS_SEARCH_LIBS $LDFLAGS_SAVE -lmozjs $ADD_PTHREAD_CFLAGS"
+-else
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
++$as_echo_n "checking if more special flags are required for pthreads... " >&6; }
++        flag=no
++        case "${host_cpu}-${host_os}" in
++            *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
++            *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
++        esac
++        { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${flag}" >&5
++$as_echo "${flag}" >&6; }
++        if test "x$flag" != xno; then
++            PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
++        fi
+ 
+-                            LDFLAGS="-L$JS_SEARCH_LIBS $LDFLAGS_SAVE -lmozjs $ADD_PTHREAD_CFLAGS"
 -                            { $as_echo "$as_me:$LINENO: checking for JS_NewObject in -lmozjs" >&5
-+                            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JS_NewObject in -lmozjs" >&5
- $as_echo_n "checking for JS_NewObject in -lmozjs... " >&6; }
+-$as_echo_n "checking for JS_NewObject in -lmozjs... " >&6; }
 -if test "${ac_cv_lib_mozjs_JS_NewObject+set}" = set; then
-+if test "${ac_cv_lib_mozjs_JS_NewObject+set}" = set; then :
++        LIBS="$save_LIBS"
++        CFLAGS="$save_CFLAGS"
++
++        # More AIX lossage: must compile with xlc_r or cc_r
++        if test x"$GCC" != xyes; then
++          for ac_prog in xlc_r cc_r
++do
++  # Extract the first word of "$ac_prog", so it can be a program name with args.
++set dummy $ac_prog; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_PTHREAD_CC+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
-   ac_check_lib_save_LIBS=$LIBS
- LIBS="-lmozjs  $LIBS"
+-  ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lmozjs  $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 GCC internal prototype to avoid an error.
-@@ -23814,52 +12859,25 @@ return JS_NewObject ();
-   return 0;
- }
- _ACEOF
+-/* end confdefs.h.  */
+-
+-/* Override any GCC internal prototype to avoid an error.
+-   Use char because int might match the return type of a GCC
+-   builtin and then its argument prototype would still apply.  */
+-#ifdef __cplusplus
+-extern "C"
+-#endif
+-char JS_NewObject ();
+-int
+-main ()
+-{
+-return JS_NewObject ();
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -22539,67 +30461,167 @@ index f51d803..459bf70 100755
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
-+if ac_fn_cxx_try_link "$LINENO"; then :
-   ac_cv_lib_mozjs_JS_NewObject=yes
+-  ac_cv_lib_mozjs_JS_NewObject=yes
++  if test -n "$PTHREAD_CC"; then
++  ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
  else
 -  $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=.
++    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_PTHREAD_CC="$ac_prog"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
+ 
 -	ac_cv_lib_mozjs_JS_NewObject=no
-+  ac_cv_lib_mozjs_JS_NewObject=no
  fi
 -
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      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
+-LIBS=$ac_check_lib_save_LIBS
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_mozjs_JS_NewObject" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mozjs_JS_NewObject" >&5
- $as_echo "$ac_cv_lib_mozjs_JS_NewObject" >&6; }
+-$as_echo "$ac_cv_lib_mozjs_JS_NewObject" >&6; }
 -if test "x$ac_cv_lib_mozjs_JS_NewObject" = x""yes; then
-+if test "x$ac_cv_lib_mozjs_JS_NewObject" = x""yes; then :
++PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
++if test -n "$PTHREAD_CC"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
++$as_echo "$PTHREAD_CC" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
  
-                                     JS_LIBS="-L$JS_SEARCH_LIBS -lmozjs"
-                                     MOZLIB=mozjs
+-                                    JS_LIBS="-L$JS_SEARCH_LIBS -lmozjs"
+-                                    MOZLIB=mozjs
  
++  test -n "$PTHREAD_CC" && break
++done
++test -n "$PTHREAD_CC" || PTHREAD_CC="${CC}"
++
++        else
++          PTHREAD_CC=$CC
++        fi
  else
++        PTHREAD_CC="$CC"
++fi
++
  
 -                                    { { $as_echo "$as_me:$LINENO: error: Spidermonkey not found in requested location $JS_SEARCH_LIBS" >&5
 -$as_echo "$as_me: error: Spidermonkey not found in requested location $JS_SEARCH_LIBS" >&2;}
 -   { (exit 1); exit 1; }; }
-+                                    as_fn_error $? "Spidermonkey not found in requested location $JS_SEARCH_LIBS" "$LINENO" 5
  
  
++
++# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
++if test x"$acx_pthread_ok" = xyes; then
++
++$as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
++
++        :
++else
++        acx_pthread_ok=no
++        as_fn_error $? "POSIX threads missing" "$LINENO" 5
  fi
-@@ -23874,18 +12892,14 @@ fi
++ac_ext=cpp
++ac_cpp='$CXXCPP $CPPFLAGS'
++ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
++ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
++ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
++
++
++
++    if test $FREEBSD_OS -eq 1; then
++        ADD_PTHREAD_CFLAGS="$PTHREAD_CFLAGS $PTHREAD_LIBS"
++    fi
++
++    if test "x$STATIC_OPTION_ENABLED" = xyes; then
++        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
++        LIBS="$LIBS $PTHREAD_LIBS"
++        CFLAGS_SAVE="$CFLAGS_SAVE $PTHREAD_CFLAGS"
++        LIBS_SAVE="$LIBS_SAVE $PTHREAD_LIBS"
++    fi
  
-     else
-     LDFLAGS="$LDFLAGS_SAVE $ADD_PTHREAD_CFLAGS"
+ 
+ 
+ fi
+ 
++unset LIBS
++
++# we might need librt for sqlite
++
++
++    mt_rt_arg_default=yes
++    mt_rt_library_status=yes
++
++    LIBS_SAVE=$LIBS
++    LDFLAGS_SAVE=$LDFLAGS
++    CFLAGS_SAVE=$CFLAGS
++    CXXFLAGS_SAVE=$CXXFLAGS
++    CPPFLAGS_SAVE=$CPPFLAGS
++
++
++# Check whether --with-rt-libs was given.
++if test "${with_rt_libs+set}" = set; then :
++  withval=$with_rt_libs;
++            mt_rt_search_libs="$withval"
++            { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for rt libs in $withval" >&5
++$as_echo "$as_me: Will search for rt libs in $withval" >&6;}
+ 
+ 
+ fi
+ 
+-    else
+-    LDFLAGS="$LDFLAGS_SAVE $ADD_PTHREAD_CFLAGS"
 -    { $as_echo "$as_me:$LINENO: checking for JS_NewObject in -ljs" >&5
-+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JS_NewObject in -ljs" >&5
- $as_echo_n "checking for JS_NewObject in -ljs... " >&6; }
+-$as_echo_n "checking for JS_NewObject in -ljs... " >&6; }
 -if test "${ac_cv_lib_js_JS_NewObject+set}" = set; then
-+if test "${ac_cv_lib_js_JS_NewObject+set}" = set; then :
++
++    if test "$mt_rt_search_libs" ; then
++        unset ac_cv_lib_rt_clock_gettime
++        LDFLAGS="$LDFLAGS -L$mt_rt_search_libs"
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
++$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
++if test "${ac_cv_lib_rt_clock_gettime+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
    ac_check_lib_save_LIBS=$LIBS
- LIBS="-ljs  $LIBS"
+-LIBS="-ljs  $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
++LIBS="-lrt  $LIBS"
 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -23903,43 +12917,18 @@ return JS_NewObject ();
+@@ -23894,71 +11233,54 @@
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-char JS_NewObject ();
++char clock_gettime ();
+ int
+ main ()
+ {
+-return JS_NewObject ();
++return clock_gettime ();
+   ;
    return 0;
  }
- _ACEOF
+-_ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -22621,14 +30643,16 @@ index f51d803..459bf70 100755
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
+-  ac_cv_lib_js_JS_NewObject=yes
++_ACEOF
 +if ac_fn_cxx_try_link "$LINENO"; then :
-   ac_cv_lib_js_JS_NewObject=yes
++  ac_cv_lib_rt_clock_gettime=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_lib_js_JS_NewObject=no
-+  ac_cv_lib_js_JS_NewObject=no
++  ac_cv_lib_rt_clock_gettime=no
  fi
 -
 -rm -rf conftest.dSYM
@@ -22639,36 +30663,65 @@ index f51d803..459bf70 100755
  LIBS=$ac_check_lib_save_LIBS
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_js_JS_NewObject" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_js_JS_NewObject" >&5
- $as_echo "$ac_cv_lib_js_JS_NewObject" >&6; }
+-$as_echo "$ac_cv_lib_js_JS_NewObject" >&6; }
 -if test "x$ac_cv_lib_js_JS_NewObject" = x""yes; then
-+if test "x$ac_cv_lib_js_JS_NewObject" = x""yes; then :
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
++$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
++if test "x$ac_cv_lib_rt_clock_gettime" = x""yes; then :
+ 
+-            MOZLIB=js
+-            JS_LIBS="-ljs"
++                mt_rt_libs="-lrt"
++                mt_rt_ldflags="-L$mt_rt_search_libs"
  
-             MOZLIB=js
-             JS_LIBS="-ljs"
-@@ -23947,18 +12936,14 @@ if test "x$ac_cv_lib_js_JS_NewObject" = x""yes; then
  else
  
-             unset ac_cv_lib_js_JS_NewObject
+-            unset ac_cv_lib_js_JS_NewObject
 -            { $as_echo "$as_me:$LINENO: checking for JS_NewObject in -lsmjs" >&5
-+            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JS_NewObject in -lsmjs" >&5
- $as_echo_n "checking for JS_NewObject in -lsmjs... " >&6; }
+-$as_echo_n "checking for JS_NewObject in -lsmjs... " >&6; }
 -if test "${ac_cv_lib_smjs_JS_NewObject+set}" = set; then
-+if test "${ac_cv_lib_smjs_JS_NewObject+set}" = set; then :
++                mt_rt_library_status=missing
++                if test "" = "pass"; then
++                    { $as_echo "$as_me:${as_lineno-$LINENO}: rt library not found in requested location $mt_rt_search_libs" >&5
++$as_echo "$as_me: rt library not found in requested location $mt_rt_search_libs" >&6;}
++                else
++                    as_fn_error $? "rt library not found in requested location $mt_rt_search_libs" "$LINENO" 5
++                fi
++
++
++fi
++
++    else
++        unset ac_cv_lib_rt_clock_gettime
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
++$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
++if test "${ac_cv_lib_rt_clock_gettime+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
    ac_check_lib_save_LIBS=$LIBS
- LIBS="-lsmjs  $LIBS"
+-LIBS="-lsmjs  $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
++LIBS="-lrt  $LIBS"
 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -23976,43 +12961,18 @@ return JS_NewObject ();
+@@ -23967,71 +11289,42 @@
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-char JS_NewObject ();
++char clock_gettime ();
+ int
+ main ()
+ {
+-return JS_NewObject ();
++return clock_gettime ();
+   ;
    return 0;
  }
  _ACEOF
@@ -22693,14 +30746,15 @@ index f51d803..459bf70 100755
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
+-  ac_cv_lib_smjs_JS_NewObject=yes
 +if ac_fn_cxx_try_link "$LINENO"; then :
-   ac_cv_lib_smjs_JS_NewObject=yes
++  ac_cv_lib_rt_clock_gettime=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_lib_smjs_JS_NewObject=no
-+  ac_cv_lib_smjs_JS_NewObject=no
++  ac_cv_lib_rt_clock_gettime=no
  fi
 -
 -rm -rf conftest.dSYM
@@ -22711,36 +30765,53 @@ index f51d803..459bf70 100755
  LIBS=$ac_check_lib_save_LIBS
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_smjs_JS_NewObject" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_smjs_JS_NewObject" >&5
- $as_echo "$ac_cv_lib_smjs_JS_NewObject" >&6; }
+-$as_echo "$ac_cv_lib_smjs_JS_NewObject" >&6; }
 -if test "x$ac_cv_lib_smjs_JS_NewObject" = x""yes; then
-+if test "x$ac_cv_lib_smjs_JS_NewObject" = x""yes; then :
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
++$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
++if test "x$ac_cv_lib_rt_clock_gettime" = x""yes; then :
+ 
+-                    JS_LIBS="-lsmjs"
+-                    MOZLIB=smjs
++                mt_rt_libs="-lrt"
  
-                     JS_LIBS="-lsmjs"
-                     MOZLIB=smjs
-@@ -24020,18 +12980,14 @@ if test "x$ac_cv_lib_smjs_JS_NewObject" = x""yes; then
  else
  
-                     unset ac_cv_lib_smjs_JS_NewObject
+-                    unset ac_cv_lib_smjs_JS_NewObject
 -                    { $as_echo "$as_me:$LINENO: checking for JS_NewObject in -lmozjs" >&5
-+                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JS_NewObject in -lmozjs" >&5
- $as_echo_n "checking for JS_NewObject in -lmozjs... " >&6; }
+-$as_echo_n "checking for JS_NewObject in -lmozjs... " >&6; }
 -if test "${ac_cv_lib_mozjs_JS_NewObject+set}" = set; then
-+if test "${ac_cv_lib_mozjs_JS_NewObject+set}" = set; then :
++                LDFLAGS="$LDFLAGS -L$MT_SEARCHPATH_LIBS"
++                unset ac_cv_lib_rt_clock_gettime
++                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
++$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
++if test "${ac_cv_lib_rt_clock_gettime+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
    ac_check_lib_save_LIBS=$LIBS
- LIBS="-lmozjs  $LIBS"
+-LIBS="-lmozjs  $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
++LIBS="-lrt  $LIBS"
 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -24049,43 +13005,18 @@ return JS_NewObject ();
+@@ -24040,72 +11333,234 @@
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-char JS_NewObject ();
++char clock_gettime ();
+ int
+ main ()
+ {
+-return JS_NewObject ();
++return clock_gettime ();
+   ;
    return 0;
  }
  _ACEOF
@@ -22765,54 +30836,267 @@ index f51d803..459bf70 100755
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
+-  ac_cv_lib_mozjs_JS_NewObject=yes
 +if ac_fn_cxx_try_link "$LINENO"; then :
-   ac_cv_lib_mozjs_JS_NewObject=yes
++  ac_cv_lib_rt_clock_gettime=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++  ac_cv_lib_rt_clock_gettime=no
++fi
++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_rt_clock_gettime" >&5
++$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
++if test "x$ac_cv_lib_rt_clock_gettime" = x""yes; then :
++
++                        mt_rt_libs="-lrt"
++                        mt_rt_ldflags="-L$MT_SEARCHPATH_LIBS"
++
++else
++
++                        mt_rt_library_status=missing
++
++
++fi
++
++
++
++fi
++
++    fi
++
++    if test "x$mt_rt_library_status" != xyes; then
++        mt_rt_libs=""
++        mt_rt_ldflags=""
++    fi
++
++    LIBS=$LIBS_SAVE
++    LDFLAGS=$LDFLAGS_SAVE
++    CFLAGS=$CFLAGS_SAVE
++    CXXFLAGS=$CXXFLAGS_SAVE
++    CPPFLAGS=$CPPFLAGS_SAVE
++
++
++    RT_LIBS=${mt_rt_libs}
++    RT_LDFLAGS=${mt_rt_ldflags}
++    RT_STATUS=${mt_rt_library_status}
++
++
++
++
++
++
++if test "x$RT_STATUS" != xyes; then
++    ac_fn_cxx_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
++if test "x$ac_cv_func_clock_gettime" = x""yes; then :
++
++fi
++
++fi
++
++############ zlib
++
++
++    mt_zlib_status=yes
++
++
++
++    mt_zlib_option_enabled=
++    mt_zlib_option_requested=no
++    if test "xdisable" = xdisable; then
++        mt_zlib_option_enabled=yes
++    else
++        mt_zlib_option_enabled=no
++    fi
++
++    # Check whether --enable-zlib was given.
++if test "${enable_zlib+set}" = set; then :
++  enableval=$enable_zlib;
++            mt_zlib_option_enabled=$enableval
++            mt_zlib_option_requested=yes
++
++
++fi
++
++
++    ZLIB_OPTION_ENABLED=${mt_zlib_option_enabled}
++    ZLIB_OPTION_REQUESTED=${mt_zlib_option_requested}
++
++
++
++
++    if test "x${mt_zlib_option_enabled}" = xyes; then :
++
++fi
++
++    if test "x${ZLIB_OPTION_ENABLED}" = xyes; then
++
++
++    LIBS_SAVE=$LIBS
++    LDFLAGS_SAVE=$LDFLAGS
++    CFLAGS_SAVE=$CFLAGS
++    CXXFLAGS_SAVE=$CXXFLAGS
++    CPPFLAGS_SAVE=$CPPFLAGS
++
++    mt_zlib_header_status=yes
++
++
++# Check whether --with-zlib-h was given.
++if test "${with_zlib_h+set}" = set; then :
++  withval=$with_zlib_h;
++            mt_zlib_search_headers="$withval"
++            { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for zlib headers in $withval" >&5
++$as_echo "$as_me: Will search for zlib headers in $withval" >&6;}
++
++
++fi
++
++
++    if test "$mt_zlib_search_headers" ; then
++        unset ac_cv_header_zlib_h
++        CFLAGS="$CFLAGS -I${mt_zlib_search_headers}"
++        CXXFLAGS="$CXXFLAGS -I${mt_zlib_search_headers}"
++        CPPFLAGS="$CPPFLAGS -I${mt_zlib_search_headers}"
++        as_ac_Header=`$as_echo "ac_cv_header_$mt_zlib_search_headers/zlib.h" | $as_tr_sh`
++ac_fn_cxx_check_header_mongrel "$LINENO" "$mt_zlib_search_headers/zlib.h" "$as_ac_Header" "$ac_includes_default"
++if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
++
++                mt_zlib_cxxflags="-I${mt_zlib_search_headers}"
++
++else
++
++                mt_zlib_header_status=missing
++                if test "" = "pass"; then
++                    { $as_echo "$as_me:${as_lineno-$LINENO}: zlib headers not found in requested location $mt_zlib_search_headers" >&5
++$as_echo "$as_me: zlib headers not found in requested location $mt_zlib_search_headers" >&6;}
++                else
++                    as_fn_error $? "zlib headers not found in requested location $mt_zlib_search_headers" "$LINENO" 5
++                fi
++
++
++fi
++
++
++    else
++        unset ac_cv_header_zlib_h
++        ac_fn_cxx_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
++if test "x$ac_cv_header_zlib_h" = x""yes; then :
++
++else
++
++                CFLAGS="$CFLAGS -I$MT_SEARCHPATH_HEADERS"
++                CXXFLAGS="$CXXFLAGS -I$MT_SEARCHPATH_HEADERS"
++                CPPFLAGS="$CPPFLAGS -I$MT_SEARCHPATH_HEADERS"
++                unset ac_cv_header_zlib_h
++                as_ac_Header=`$as_echo "ac_cv_header_$MT_SEARCHPATH_HEADERS/zlib.h" | $as_tr_sh`
++ac_fn_cxx_check_header_mongrel "$LINENO" "$MT_SEARCHPATH_HEADERS/zlib.h" "$as_ac_Header" "$ac_includes_default"
++if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
++
++                        mt_zlib_cxxflags="-I${MT_SEARCHPATH_HEADERS}"
++
++else
++
++                        mt_zlib_header_status=missing
++
++
++fi
++
++
++
++
++fi
++
++
++    fi
++
++    if test "x$mt_zlib_header_status" != xyes; then
++        mt_zlib_cxxflags=""
++    fi
++
++    LIBS=$LIBS_SAVE
++    LDFLAGS=$LDFLAGS_SAVE
++    CFLAGS=$CFLAGS_SAVE
++    CXXFLAGS=$CXXFLAGS_SAVE
++    CPPFLAGS=$CPPFLAGS_SAVE
++
++    mt_zlib_package_status=${mt_zlib_header_status}
++
++    if test "x$mt_zlib_package_status" = xyes; then
++
++    mt_zlib_arg_default=yes
++    mt_zlib_library_status=yes
++
++    LIBS_SAVE=$LIBS
++    LDFLAGS_SAVE=$LDFLAGS
++    CFLAGS_SAVE=$CFLAGS
++    CXXFLAGS_SAVE=$CXXFLAGS
++    CPPFLAGS_SAVE=$CPPFLAGS
++
++
++# Check whether --with-zlib-libs was given.
++if test "${with_zlib_libs+set}" = set; then :
++  withval=$with_zlib_libs;
++            mt_zlib_search_libs="$withval"
++            { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for zlib libs in $withval" >&5
++$as_echo "$as_me: Will search for zlib libs in $withval" >&6;}
+ 
 -	ac_cv_lib_mozjs_JS_NewObject=no
-+  ac_cv_lib_mozjs_JS_NewObject=no
- fi
--
+-fi
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      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
+-LIBS=$ac_check_lib_save_LIBS
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_mozjs_JS_NewObject" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mozjs_JS_NewObject" >&5
- $as_echo "$ac_cv_lib_mozjs_JS_NewObject" >&6; }
+-$as_echo "$ac_cv_lib_mozjs_JS_NewObject" >&6; }
 -if test "x$ac_cv_lib_mozjs_JS_NewObject" = x""yes; then
-+if test "x$ac_cv_lib_mozjs_JS_NewObject" = x""yes; then :
+-
+-                            MOZLIB=mozjs
+-                            JS_LIBS="-lmozjs"
  
-                             MOZLIB=mozjs
-                             JS_LIBS="-lmozjs"
-@@ -24094,18 +13025,14 @@ else
+-else
  
-                             LDFLAGS="-L$SEARCH_DIR_LIBS $LDFLAGS_SAVE $ADD_PTHREAD_CFLAGS"
-                             unset ac_cv_lib_js_JS_NewObject
+-                            LDFLAGS="-L$SEARCH_DIR_LIBS $LDFLAGS_SAVE $ADD_PTHREAD_CFLAGS"
+-                            unset ac_cv_lib_js_JS_NewObject
 -                            { $as_echo "$as_me:$LINENO: checking for JS_NewObject in -ljs" >&5
-+                            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JS_NewObject in -ljs" >&5
- $as_echo_n "checking for JS_NewObject in -ljs... " >&6; }
+-$as_echo_n "checking for JS_NewObject in -ljs... " >&6; }
 -if test "${ac_cv_lib_js_JS_NewObject+set}" = set; then
-+if test "${ac_cv_lib_js_JS_NewObject+set}" = set; then :
++    if test "$mt_zlib_search_libs" ; then
++        unset ac_cv_lib_z_uncompress
++        LDFLAGS="$LDFLAGS -L$mt_zlib_search_libs"
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uncompress in -lz" >&5
++$as_echo_n "checking for uncompress in -lz... " >&6; }
++if test "${ac_cv_lib_z_uncompress+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
    ac_check_lib_save_LIBS=$LIBS
- LIBS="-ljs  $LIBS"
+-LIBS="-ljs  $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
++LIBS="-lz  $LIBS"
 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -24123,43 +13050,18 @@ return JS_NewObject ();
+@@ -24114,71 +11569,54 @@
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-char JS_NewObject ();
++char uncompress ();
+ int
+ main ()
+ {
+-return JS_NewObject ();
++return uncompress ();
+   ;
    return 0;
  }
  _ACEOF
@@ -22837,14 +31121,15 @@ index f51d803..459bf70 100755
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
+-  ac_cv_lib_js_JS_NewObject=yes
 +if ac_fn_cxx_try_link "$LINENO"; then :
-   ac_cv_lib_js_JS_NewObject=yes
++  ac_cv_lib_z_uncompress=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_lib_js_JS_NewObject=no
-+  ac_cv_lib_js_JS_NewObject=no
++  ac_cv_lib_z_uncompress=no
  fi
 -
 -rm -rf conftest.dSYM
@@ -22855,36 +31140,65 @@ index f51d803..459bf70 100755
  LIBS=$ac_check_lib_save_LIBS
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_js_JS_NewObject" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_js_JS_NewObject" >&5
- $as_echo "$ac_cv_lib_js_JS_NewObject" >&6; }
+-$as_echo "$ac_cv_lib_js_JS_NewObject" >&6; }
 -if test "x$ac_cv_lib_js_JS_NewObject" = x""yes; then
-+if test "x$ac_cv_lib_js_JS_NewObject" = x""yes; then :
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_uncompress" >&5
++$as_echo "$ac_cv_lib_z_uncompress" >&6; }
++if test "x$ac_cv_lib_z_uncompress" = x""yes; then :
+ 
+-                                    JS_LIBS="-L$SEARCH_DIR_LIBS -ljs"
+-                                    MOZLIB=js
++                mt_zlib_libs="-lz"
++                mt_zlib_ldflags="-L$mt_zlib_search_libs"
  
-                                     JS_LIBS="-L$SEARCH_DIR_LIBS -ljs"
-                                     MOZLIB=js
-@@ -24167,18 +13069,14 @@ if test "x$ac_cv_lib_js_JS_NewObject" = x""yes; then
  else
  
-                                     unset ac_cv_lib_smjs_JS_NewObject
+-                                    unset ac_cv_lib_smjs_JS_NewObject
 -                                    { $as_echo "$as_me:$LINENO: checking for JS_NewObject in -lsmjs" >&5
-+                                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JS_NewObject in -lsmjs" >&5
- $as_echo_n "checking for JS_NewObject in -lsmjs... " >&6; }
+-$as_echo_n "checking for JS_NewObject in -lsmjs... " >&6; }
 -if test "${ac_cv_lib_smjs_JS_NewObject+set}" = set; then
-+if test "${ac_cv_lib_smjs_JS_NewObject+set}" = set; then :
++                mt_zlib_library_status=missing
++                if test "" = "pass"; then
++                    { $as_echo "$as_me:${as_lineno-$LINENO}: zlib library not found in requested location $mt_zlib_search_libs" >&5
++$as_echo "$as_me: zlib library not found in requested location $mt_zlib_search_libs" >&6;}
++                else
++                    as_fn_error $? "zlib library not found in requested location $mt_zlib_search_libs" "$LINENO" 5
++                fi
++
++
++fi
++
++    else
++        unset ac_cv_lib_z_uncompress
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uncompress in -lz" >&5
++$as_echo_n "checking for uncompress in -lz... " >&6; }
++if test "${ac_cv_lib_z_uncompress+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
    ac_check_lib_save_LIBS=$LIBS
- LIBS="-lsmjs  $LIBS"
+-LIBS="-lsmjs  $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
++LIBS="-lz  $LIBS"
 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -24196,43 +13094,18 @@ return JS_NewObject ();
+@@ -24187,72 +11625,42 @@
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-char JS_NewObject ();
++char uncompress ();
+ int
+ main ()
+ {
+-return JS_NewObject ();
++return uncompress ();
+   ;
    return 0;
  }
  _ACEOF
@@ -22909,14 +31223,15 @@ index f51d803..459bf70 100755
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
+-  ac_cv_lib_smjs_JS_NewObject=yes
 +if ac_fn_cxx_try_link "$LINENO"; then :
-   ac_cv_lib_smjs_JS_NewObject=yes
++  ac_cv_lib_z_uncompress=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_lib_smjs_JS_NewObject=no
-+  ac_cv_lib_smjs_JS_NewObject=no
++  ac_cv_lib_z_uncompress=no
  fi
 -
 -rm -rf conftest.dSYM
@@ -22927,36 +31242,54 @@ index f51d803..459bf70 100755
  LIBS=$ac_check_lib_save_LIBS
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_smjs_JS_NewObject" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_smjs_JS_NewObject" >&5
- $as_echo "$ac_cv_lib_smjs_JS_NewObject" >&6; }
+-$as_echo "$ac_cv_lib_smjs_JS_NewObject" >&6; }
 -if test "x$ac_cv_lib_smjs_JS_NewObject" = x""yes; then
-+if test "x$ac_cv_lib_smjs_JS_NewObject" = x""yes; then :
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_uncompress" >&5
++$as_echo "$ac_cv_lib_z_uncompress" >&6; }
++if test "x$ac_cv_lib_z_uncompress" = x""yes; then :
+ 
+-                                            JS_LIBS="-L$SEARCH_DIR_LIBS -lsmjs"
+-                                            MOZLIB=smjs
++                mt_zlib_libs="-lz"
  
-                                             JS_LIBS="-L$SEARCH_DIR_LIBS -lsmjs"
-                                             MOZLIB=smjs
-@@ -24241,18 +13114,14 @@ else
+ else
  
-                                             LDFLAGS="-L$SEARCH_DIR_LIBS $LDFLAGS_SAVE -lmozjs"
-                                             unset ac_cv_lib_mozjs_JS_NewObject
+-                                            LDFLAGS="-L$SEARCH_DIR_LIBS $LDFLAGS_SAVE -lmozjs"
+-                                            unset ac_cv_lib_mozjs_JS_NewObject
 -                                            { $as_echo "$as_me:$LINENO: checking for JS_NewObject in -lmozjs" >&5
-+                                            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JS_NewObject in -lmozjs" >&5
- $as_echo_n "checking for JS_NewObject in -lmozjs... " >&6; }
+-$as_echo_n "checking for JS_NewObject in -lmozjs... " >&6; }
 -if test "${ac_cv_lib_mozjs_JS_NewObject+set}" = set; then
-+if test "${ac_cv_lib_mozjs_JS_NewObject+set}" = set; then :
++                LDFLAGS="$LDFLAGS -L$MT_SEARCHPATH_LIBS"
++                unset ac_cv_lib_z_uncompress
++                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uncompress in -lz" >&5
++$as_echo_n "checking for uncompress in -lz... " >&6; }
++if test "${ac_cv_lib_z_uncompress+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
    ac_check_lib_save_LIBS=$LIBS
- LIBS="-lmozjs  $LIBS"
+-LIBS="-lmozjs  $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
++LIBS="-lz  $LIBS"
 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -24270,43 +13139,18 @@ return JS_NewObject ();
+@@ -24261,77 +11669,34 @@
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-char JS_NewObject ();
++char uncompress ();
+ int
+ main ()
+ {
+-return JS_NewObject ();
++return uncompress ();
+   ;
    return 0;
  }
  _ACEOF
@@ -22981,14 +31314,15 @@ index f51d803..459bf70 100755
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
+-  ac_cv_lib_mozjs_JS_NewObject=yes
 +if ac_fn_cxx_try_link "$LINENO"; then :
-   ac_cv_lib_mozjs_JS_NewObject=yes
++  ac_cv_lib_z_uncompress=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_lib_mozjs_JS_NewObject=no
-+  ac_cv_lib_mozjs_JS_NewObject=no
++  ac_cv_lib_z_uncompress=no
  fi
 -
 -rm -rf conftest.dSYM
@@ -22999,59 +31333,90 @@ index f51d803..459bf70 100755
  LIBS=$ac_check_lib_save_LIBS
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_mozjs_JS_NewObject" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mozjs_JS_NewObject" >&5
- $as_echo "$ac_cv_lib_mozjs_JS_NewObject" >&6; }
+-$as_echo "$ac_cv_lib_mozjs_JS_NewObject" >&6; }
 -if test "x$ac_cv_lib_mozjs_JS_NewObject" = x""yes; then
-+if test "x$ac_cv_lib_mozjs_JS_NewObject" = x""yes; then :
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_uncompress" >&5
++$as_echo "$ac_cv_lib_z_uncompress" >&6; }
++if test "x$ac_cv_lib_z_uncompress" = x""yes; then :
+ 
+-                                                    JS_LIBS="-L$SEARCH_DIR_LIBS -lmozjs"
+-                                                    MOZLIB=mozjs
++                        mt_zlib_libs="-lz"
++                        mt_zlib_ldflags="-L$MT_SEARCHPATH_LIBS"
  
-                                                     JS_LIBS="-L$SEARCH_DIR_LIBS -lmozjs"
-                                                     MOZLIB=mozjs
-@@ -24314,7 +13158,7 @@ if test "x$ac_cv_lib_mozjs_JS_NewObject" = x""yes; then
  else
  
-                                                     JS_OK=missing
+-                                                    JS_OK=missing
 -                                                    { $as_echo "$as_me:$LINENO: result: libjs/libsmjs link failed" >&5
-+                                                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: libjs/libsmjs link failed" >&5
- $as_echo "libjs/libsmjs link failed" >&6; }
+-$as_echo "libjs/libsmjs link failed" >&6; }
+-
+-
+-fi
+-
+-
+-
+-fi
+-
+-
+-
+-fi
+-
+-
+-
+-fi
+-
++                        mt_zlib_library_status=missing
  
  
-@@ -24344,9 +13188,7 @@ fi
  fi
- if test "x$JS_OK" = xyes; then
+@@ -24341,620 +11706,253 @@
+ fi
  
+     fi
+-fi
+-if test "x$JS_OK" = xyes; then
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_JS 1
 -_ACEOF
-+$as_echo "#define HAVE_JS 1" >>confdefs.h
- 
- 
- 
-@@ -24356,18 +13198,14 @@ _ACEOF
-     CXXFLAGS="$CXXFLAGS $JS_CXXFLAGS"
- 
-     as_ac_Lib=`$as_echo "ac_cv_lib_$MOZLIB''_JS_ClearContextThread" | $as_tr_sh`
+-
+-
+-
+-
+-    LDFLAGS="$LDFLAGS $JS_LIBS"
+-    CFLAGS="$CFLAGS $JS_CXXFLAGS"
+-    CXXFLAGS="$CXXFLAGS $JS_CXXFLAGS"
+-
+-    as_ac_Lib=`$as_echo "ac_cv_lib_$MOZLIB''_JS_ClearContextThread" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for JS_ClearContextThread in -l$MOZLIB" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for JS_ClearContextThread in -l$MOZLIB" >&5
- $as_echo_n "checking for JS_ClearContextThread in -l$MOZLIB... " >&6; }
+-$as_echo_n "checking for JS_ClearContextThread in -l$MOZLIB... " >&6; }
 -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then
-+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
-   $as_echo_n "(cached) " >&6
- else
-   ac_check_lib_save_LIBS=$LIBS
- LIBS="-l$MOZLIB  $LIBS"
+-  $as_echo_n "(cached) " >&6
+-else
+-  ac_check_lib_save_LIBS=$LIBS
+-LIBS="-l$MOZLIB  $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 GCC internal prototype to avoid an error.
-@@ -24385,61 +13223,29 @@ return JS_ClearContextThread ();
-   return 0;
- }
- _ACEOF
+-/* end confdefs.h.  */
+-
+-/* Override any GCC internal prototype to avoid an error.
+-   Use char because int might match the return type of a GCC
+-   builtin and then its argument prototype would still apply.  */
+-#ifdef __cplusplus
+-extern "C"
+-#endif
+-char JS_ClearContextThread ();
+-int
+-main ()
+-{
+-return JS_ClearContextThread ();
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -23073,88 +31438,138 @@ index f51d803..459bf70 100755
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
-+if ac_fn_cxx_try_link "$LINENO"; then :
-   eval "$as_ac_Lib=yes"
- else
+-  eval "$as_ac_Lib=yes"
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	eval "$as_ac_Lib=no"
-+  eval "$as_ac_Lib=no"
- fi
+-fi
 -
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      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
+-LIBS=$ac_check_lib_save_LIBS
+-fi
 -ac_res=`eval 'as_val=${'$as_ac_Lib'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-+eval ac_res=\$$as_ac_Lib
-+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
- $as_echo "$ac_res" >&6; }
+-$as_echo "$ac_res" >&6; }
 -as_val=`eval 'as_val=${'$as_ac_Lib'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
- 
- 
+-
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define JS_THREADSAFE 1
 -_ACEOF
-+$as_echo "#define JS_THREADSAFE 1" >>confdefs.h
- 
- 
- fi
- 
- else
-     if test "x$JS_EN" = xyes; then
+-
+-
+-fi
+-
+-else
+-    if test "x$JS_EN" = xyes; then
 -        { { $as_echo "$as_me:$LINENO: error: unable to configure libjs support" >&5
 -$as_echo "$as_me: error: unable to configure libjs support" >&2;}
 -   { (exit 1); exit 1; }; }
-+        as_fn_error $? "unable to configure libjs support" "$LINENO" 5
++    if test "x$mt_zlib_library_status" != xyes; then
++        mt_zlib_libs=""
++        mt_zlib_ldflags=""
      fi
- fi
+-fi
+ 
+-CXXFLAGS="$CXXFLAGS_SAVE"
+-CPPFLAGS="$CPPFLAGS_SAVE"
+-LDFLAGS="$LDFLAGS_SAVE"
++    LIBS=$LIBS_SAVE
++    LDFLAGS=$LDFLAGS_SAVE
++    CFLAGS=$CFLAGS_SAVE
++    CXXFLAGS=$CXXFLAGS_SAVE
++    CPPFLAGS=$CPPFLAGS_SAVE
+ 
+-########### libmagic
++        mt_zlib_package_status=${mt_zlib_library_status}
++    fi
  
-@@ -24459,7 +13265,7 @@ LDFLAGS="$LDFLAGS_SAVE"
++    if test "x$mt_zlib_package_status" = xyes; then
++        ZLIB_CFLAGS=${mt_zlib_cxxflags}
++        ZLIB_LIBS=${mt_zlib_libs}
++        ZLIB_LDFLAGS=${mt_zlib_ldflags}
++    fi
+ 
+-    mt_libmagic_option_enabled=
+-    mt_libmagic_option_requested=no
+-    if test "xdisable" = xdisable; then
+-        mt_libmagic_option_enabled=yes
++        mt_zlib_status=${mt_zlib_package_status}
+     else
+-        mt_libmagic_option_enabled=no
++        mt_zlib_status=disabled
      fi
  
-     # Check whether --enable-libmagic was given.
+-    # Check whether --enable-libmagic was given.
 -if test "${enable_libmagic+set}" = set; then
-+if test "${enable_libmagic+set}" = set; then :
-   enableval=$enable_libmagic;
-             mt_libmagic_option_enabled=$enableval
-             mt_libmagic_option_requested=yes
-@@ -24474,7 +13280,9 @@ fi
+-  enableval=$enable_libmagic;
+-            mt_libmagic_option_enabled=$enableval
+-            mt_libmagic_option_requested=yes
+-
+-
+-fi
+-
+-
+-    LIBMAGIC_OPTION_ENABLED=${mt_libmagic_option_enabled}
+-    LIBMAGIC_OPTION_REQUESTED=${mt_libmagic_option_requested}
+-
+-
+-
++    if ((test "x${ZLIB_OPTION_ENABLED}" = xyes) &&
++        (test "x${ZLIB_OPTION_REQUESTED}" = xyes) &&
++        (test "x$mt_zlib_status" != xyes) && (test "" != "pass")); then
++        as_fn_error $? "unable to configure zlib support" "$LINENO" 5
++    fi
+ 
++    if test "x$mt_zlib_status" = xyes; then
  
++$as_echo "#define HAVE_ZLIB 1" >>confdefs.h
  
+-if test "x$LIBMAGIC_OPTION_ENABLED" = xyes; then
++    fi
  
-+    if test "x${mt_libmagic_option_enabled}" = xyes; then :
+-    mt_libmagic_status=yes
++    ZLIB_STATUS=${mt_zlib_status}
  
-+fi
+-    if test "x$mt_libmagic_status" = xyes; then
  
- if test "x$LIBMAGIC_OPTION_ENABLED" = xyes; then
  
-@@ -24493,10 +13301,10 @@ if test "x$LIBMAGIC_OPTION_ENABLED" = xyes; then
+-    LIBS_SAVE=$LIBS
+-    LDFLAGS_SAVE=$LDFLAGS
+-    CFLAGS_SAVE=$CFLAGS
+-    CXXFLAGS_SAVE=$CXXFLAGS
+-    CPPFLAGS_SAVE=$CPPFLAGS
  
+-    mt_libmagic_header_status=yes
  
- # Check whether --with-libmagic-h was given.
+ 
+-# Check whether --with-libmagic-h was given.
 -if test "${with_libmagic_h+set}" = set; then
-+if test "${with_libmagic_h+set}" = set; then :
-   withval=$with_libmagic_h;
-             mt_libmagic_search_headers="$withval"
+-  withval=$with_libmagic_h;
+-            mt_libmagic_search_headers="$withval"
 -            { $as_echo "$as_me:$LINENO: Will search for libmagic headers in $withval" >&5
-+            { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for libmagic headers in $withval" >&5
- $as_echo "$as_me: Will search for libmagic headers in $withval" >&6;}
+-$as_echo "$as_me: Will search for libmagic headers in $withval" >&6;}
  
  
-@@ -24509,145 +13317,8 @@ fi
-         CXXFLAGS="$CXXFLAGS -I${mt_libmagic_search_headers}"
-         CPPFLAGS="$CPPFLAGS -I${mt_libmagic_search_headers}"
-         as_ac_Header=`$as_echo "ac_cv_header_$mt_libmagic_search_headers/magic.h" | $as_tr_sh`
+-fi
++if test "x$ZLIB_STATUS" = xyes; then
++    if test "x$DB_AUTOCREATE_OPTION_ENABLED" = xyes; then
+ 
++$as_echo "#define AUTO_CREATE_DATABASE 1" >>confdefs.h
+ 
+-    if test "$mt_libmagic_search_headers" ; then
+-        unset ac_cv_header_magic_h
+-        CFLAGS="$CFLAGS -I${mt_libmagic_search_headers}"
+-        CXXFLAGS="$CXXFLAGS -I${mt_libmagic_search_headers}"
+-        CPPFLAGS="$CPPFLAGS -I${mt_libmagic_search_headers}"
+-        as_ac_Header=`$as_echo "ac_cv_header_$mt_libmagic_search_headers/magic.h" | $as_tr_sh`
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 -  { $as_echo "$as_me:$LINENO: checking for $mt_libmagic_search_headers/magic.h" >&5
 -$as_echo_n "checking for $mt_libmagic_search_headers/magic.h... " >&6; }
@@ -23197,23 +31612,46 @@ index f51d803..459bf70 100755
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_header_compiler=yes
--else
++    fi
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_header_compiler=no
--fi
--
++    if test "x$DB_AUTOCREATE_OPTION_ENABLED" = xyes; then
++        if test "x$DB_AUTOCREATE_OPTION_REQUESTED" = xyes; then
++            as_fn_error $? "Automatic database creation not possible due to missing zlib headers/libraries" "$LINENO" 5
++        else
++            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Automatic database creation not possible due to missing zlib headers/libraries" >&5
++$as_echo "$as_me: WARNING: Automatic database creation not possible due to missing zlib headers/libraries" >&2;}
++            DB_AUTOCREATE_OPTION_ENABLED=disabled
++        fi
++    fi
+ fi
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 -$as_echo "$ac_header_compiler" >&6; }
--
++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.
+ 
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking $mt_libmagic_search_headers/magic.h presence" >&5
 -$as_echo_n "checking $mt_libmagic_search_headers/magic.h presence... " >&6; }
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
--_ACEOF
+ _ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
@@ -23240,14 +31678,72 @@ index f51d803..459bf70 100755
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -  ac_header_preproc=no
--fi
--
++# The following way of writing the cache mishandles newlines in values,
++# but we know of no workaround that is simple, portable, and efficient.
++# So, we kill variables containing newlines.
++# Ultrix sh set writes to stderr and can't be redirected directly,
++# and sets the high bit in the cache file unless we assign to the vars.
++(
++  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
++    eval ac_val=\$$ac_var
++    case $ac_val in #(
++    *${as_nl}*)
++      case $ac_var in #(
++      *_cv_*) { $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 $as_nl`(ac_space=' '; set) 2>&1` in #(
++    *${as_nl}ac_space=\ *)
++      # `set' does not quote correctly, so add quotes: double-quote
++      # substitution turns \\\\ into \\, and sed turns \\ into \.
++      sed -n \
++	"s/'/'\\\\''/g;
++	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
++      ;; #(
++    *)
++      # `set' quotes correctly as required by POSIX, so do not add quotes.
++      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
++      ;;
++    esac |
++    sort
++) |
++  sed '
++     /^ac_cv_env_/b end
++     t clear
++     :clear
++     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
++     t end
++     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
++     :end' >>confcache
++if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
++  if test -w "$cache_file"; then
++    test "x$cache_file" != "x/dev/null" &&
++      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
++$as_echo "$as_me: updating cache $cache_file" >&6;}
++    cat confcache >$cache_file
++  else
++    { $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
+ 
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 -$as_echo "$ac_header_preproc" >&6; }
--
++######### SQLite3
+ 
 -# So?  What about this header?
 -case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
 -  yes:no: )
@@ -23284,46 +31780,58 @@ index f51d803..459bf70 100755
 -  $as_echo_n "(cached) " >&6
 -else
 -  eval "$as_ac_Header=\$ac_header_preproc"
--fi
++if test "x$RT_STATUS" = xyes; then
++    LDFLAGS="$LDFLAGS $RT_LDFLAGS $RT_LIBS"
+ fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
--
+ 
 -fi
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+ac_fn_cxx_check_header_mongrel "$LINENO" "$mt_libmagic_search_headers/magic.h" "$as_ac_Header" "$ac_includes_default"
-+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
  
-                 mt_libmagic_cxxflags="-I${mt_libmagic_search_headers}"
+-                mt_libmagic_cxxflags="-I${mt_libmagic_search_headers}"
++    mt_sqlite3_status=yes
  
-@@ -24655,12 +13326,10 @@ else
+-else
  
-                 mt_libmagic_header_status=missing
-                 if test "" = "pass"; then
+-                mt_libmagic_header_status=missing
+-                if test "" = "pass"; then
 -                    { $as_echo "$as_me:$LINENO: libmagic headers not found in requested location $mt_libmagic_search_headers" >&5
-+                    { $as_echo "$as_me:${as_lineno-$LINENO}: libmagic headers not found in requested location $mt_libmagic_search_headers" >&5
- $as_echo "$as_me: libmagic headers not found in requested location $mt_libmagic_search_headers" >&6;}
-                 else
+-$as_echo "$as_me: libmagic headers not found in requested location $mt_libmagic_search_headers" >&6;}
+-                else
 -                    { { $as_echo "$as_me:$LINENO: error: libmagic headers not found in requested location $mt_libmagic_search_headers" >&5
 -$as_echo "$as_me: error: libmagic headers not found in requested location $mt_libmagic_search_headers" >&2;}
 -   { (exit 1); exit 1; }; }
-+                    as_fn_error $? "libmagic headers not found in requested location $mt_libmagic_search_headers" "$LINENO" 5
-                 fi
+-                fi
  
++    mt_sqlite3_option_enabled=
++    mt_sqlite3_option_requested=no
++    if test "xdisable" = xdisable; then
++        mt_sqlite3_option_enabled=yes
++    else
++        mt_sqlite3_option_enabled=no
++    fi
+ 
+-fi
++    # Check whether --enable-sqlite3 was given.
++if test "${enable_sqlite3+set}" = set; then :
++  enableval=$enable_sqlite3;
++            mt_sqlite3_option_enabled=$enableval
++            mt_sqlite3_option_requested=yes
  
-@@ -24669,140 +13338,9 @@ fi
  
-     else
-         unset ac_cv_header_magic_h
+-    else
+-        unset ac_cv_header_magic_h
 -        if test "${ac_cv_header_magic_h+set}" = set; then
 -  { $as_echo "$as_me:$LINENO: checking for magic.h" >&5
 -$as_echo_n "checking for magic.h... " >&6; }
 -if test "${ac_cv_header_magic_h+set}" = set; then
 -  $as_echo_n "(cached) " >&6
--fi
+ fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_magic_h" >&5
 -$as_echo "$ac_cv_header_magic_h" >&6; }
 -else
@@ -23361,14 +31869,16 @@ index f51d803..459bf70 100755
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	ac_header_compiler=no
 -fi
--
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 -$as_echo "$ac_header_compiler" >&6; }
--
++    SQLITE3_OPTION_ENABLED=${mt_sqlite3_option_enabled}
++    SQLITE3_OPTION_REQUESTED=${mt_sqlite3_option_requested}
+ 
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking magic.h presence" >&5
 -$as_echo_n "checking magic.h presence... " >&6; }
@@ -23401,16 +31911,14 @@ index f51d803..459bf70 100755
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+        ac_fn_cxx_check_header_mongrel "$LINENO" "magic.h" "ac_cv_header_magic_h" "$ac_includes_default"
-+if test "x$ac_cv_header_magic_h" = x""yes; then :
  
 -  ac_header_preproc=no
 -fi
--
+ 
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$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_cxx_preproc_warn_flag in
 -  yes:no: )
@@ -23450,17 +31958,18 @@ index f51d803..459bf70 100755
 -fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_magic_h" >&5
 -$as_echo "$ac_cv_header_magic_h" >&6; }
--
--fi
++    if test "x${mt_sqlite3_option_enabled}" = xyes; then :
+ 
+ fi
 -if test "x$ac_cv_header_magic_h" = x""yes; then
 -  :
- else
+-else
  
-                 CFLAGS="$CFLAGS -I$MT_SEARCHPATH_HEADERS"
-@@ -24810,145 +13348,8 @@ else
-                 CPPFLAGS="$CPPFLAGS -I$MT_SEARCHPATH_HEADERS"
-                 unset ac_cv_header_magic_h
-                 as_ac_Header=`$as_echo "ac_cv_header_$MT_SEARCHPATH_HEADERS/magic.h" | $as_tr_sh`
+-                CFLAGS="$CFLAGS -I$MT_SEARCHPATH_HEADERS"
+-                CXXFLAGS="$CXXFLAGS -I$MT_SEARCHPATH_HEADERS"
+-                CPPFLAGS="$CPPFLAGS -I$MT_SEARCHPATH_HEADERS"
+-                unset ac_cv_header_magic_h
+-                as_ac_Header=`$as_echo "ac_cv_header_$MT_SEARCHPATH_HEADERS/magic.h" | $as_tr_sh`
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 -  { $as_echo "$as_me:$LINENO: checking for $MT_SEARCHPATH_HEADERS/magic.h" >&5
 -$as_echo_n "checking for $MT_SEARCHPATH_HEADERS/magic.h... " >&6; }
@@ -23506,14 +32015,33 @@ index f51d803..459bf70 100755
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++    if test "x${SQLITE3_OPTION_ENABLED}" = xyes; then
++
++
++    LIBS_SAVE=$LIBS
++    LDFLAGS_SAVE=$LDFLAGS
++    CFLAGS_SAVE=$CFLAGS
++    CXXFLAGS_SAVE=$CXXFLAGS
++    CPPFLAGS_SAVE=$CPPFLAGS
++
++    mt_sqlite3_header_status=yes
++
++
++# Check whether --with-sqlite3-h was given.
++if test "${with_sqlite3_h+set}" = set; then :
++  withval=$with_sqlite3_h;
++            mt_sqlite3_search_headers="$withval"
++            { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for sqlite3 headers in $withval" >&5
++$as_echo "$as_me: Will search for sqlite3 headers in $withval" >&6;}
++
+ 
 -	ac_header_compiler=no
--fi
--
+ fi
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 -$as_echo "$ac_header_compiler" >&6; }
--
+ 
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking $MT_SEARCHPATH_HEADERS/magic.h presence" >&5
 -$as_echo_n "checking $MT_SEARCHPATH_HEADERS/magic.h presence... " >&6; }
@@ -23543,17 +32071,37 @@ index f51d803..459bf70 100755
 -	 test ! -s conftest.err
 -       }; then
 -  ac_header_preproc=yes
--else
++    if test "$mt_sqlite3_search_headers" ; then
++        unset ac_cv_header_sqlite3_h
++        CFLAGS="$CFLAGS -I${mt_sqlite3_search_headers}"
++        CXXFLAGS="$CXXFLAGS -I${mt_sqlite3_search_headers}"
++        CPPFLAGS="$CPPFLAGS -I${mt_sqlite3_search_headers}"
++        as_ac_Header=`$as_echo "ac_cv_header_$mt_sqlite3_search_headers/sqlite3.h" | $as_tr_sh`
++ac_fn_cxx_check_header_mongrel "$LINENO" "$mt_sqlite3_search_headers/sqlite3.h" "$as_ac_Header" "$ac_includes_default"
++if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
++
++                mt_sqlite3_cxxflags="-I${mt_sqlite3_search_headers}"
++
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -  ac_header_preproc=no
--fi
--
++                mt_sqlite3_header_status=missing
++                if test "" = "pass"; then
++                    { $as_echo "$as_me:${as_lineno-$LINENO}: sqlite3 headers not found in requested location $mt_sqlite3_search_headers" >&5
++$as_echo "$as_me: sqlite3 headers not found in requested location $mt_sqlite3_search_headers" >&6;}
++                else
++                    as_fn_error $? "sqlite3 headers not found in requested location $mt_sqlite3_search_headers" "$LINENO" 5
++                fi
++
++
+ fi
+ 
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$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_cxx_preproc_warn_flag in
 -  yes:no: )
@@ -23588,59 +32136,128 @@ index f51d803..459bf70 100755
 -$as_echo_n "checking for $MT_SEARCHPATH_HEADERS/magic.h... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 -  $as_echo_n "(cached) " >&6
--else
++    else
++        unset ac_cv_header_sqlite3_h
++        ac_fn_cxx_check_header_mongrel "$LINENO" "sqlite3.h" "ac_cv_header_sqlite3_h" "$ac_includes_default"
++if test "x$ac_cv_header_sqlite3_h" = x""yes; then :
++
+ else
 -  eval "$as_ac_Header=\$ac_header_preproc"
 -fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
--
+ 
 -fi
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+ac_fn_cxx_check_header_mongrel "$LINENO" "$MT_SEARCHPATH_HEADERS/magic.h" "$as_ac_Header" "$ac_includes_default"
++                CFLAGS="$CFLAGS -I$MT_SEARCHPATH_HEADERS"
++                CXXFLAGS="$CXXFLAGS -I$MT_SEARCHPATH_HEADERS"
++                CPPFLAGS="$CPPFLAGS -I$MT_SEARCHPATH_HEADERS"
++                unset ac_cv_header_sqlite3_h
++                as_ac_Header=`$as_echo "ac_cv_header_$MT_SEARCHPATH_HEADERS/sqlite3.h" | $as_tr_sh`
++ac_fn_cxx_check_header_mongrel "$LINENO" "$MT_SEARCHPATH_HEADERS/sqlite3.h" "$as_ac_Header" "$ac_includes_default"
 +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
  
-                         mt_libmagic_cxxflags="-I${MT_SEARCHPATH_HEADERS}"
+-                        mt_libmagic_cxxflags="-I${MT_SEARCHPATH_HEADERS}"
++                        mt_sqlite3_cxxflags="-I${MT_SEARCHPATH_HEADERS}"
+ 
+ else
  
-@@ -24992,10 +13393,10 @@ fi
+-                        mt_libmagic_header_status=missing
++                        mt_sqlite3_header_status=missing
  
  
- # Check whether --with-libmagic-libs was given.
+ fi
+@@ -24967,8 +11965,8 @@
+ 
+     fi
+ 
+-    if test "x$mt_libmagic_header_status" != xyes; then
+-        mt_libmagic_cxxflags=""
++    if test "x$mt_sqlite3_header_status" != xyes; then
++        mt_sqlite3_cxxflags=""
+     fi
+ 
+     LIBS=$LIBS_SAVE
+@@ -24977,12 +11975,12 @@
+     CXXFLAGS=$CXXFLAGS_SAVE
+     CPPFLAGS=$CPPFLAGS_SAVE
+ 
+-    mt_libmagic_package_status=${mt_libmagic_header_status}
++    mt_sqlite3_package_status=${mt_sqlite3_header_status}
+ 
+-    if test "x$mt_libmagic_package_status" = xyes; then
++    if test "x$mt_sqlite3_package_status" = xyes; then
+ 
+-    mt_libmagic_arg_default=yes
+-    mt_libmagic_library_status=yes
++    mt_sqlite3_arg_default=yes
++    mt_sqlite3_library_status=yes
+ 
+     LIBS_SAVE=$LIBS
+     LDFLAGS_SAVE=$LDFLAGS
+@@ -24991,32 +11989,28 @@
+     CPPFLAGS_SAVE=$CPPFLAGS
+ 
+ 
+-# Check whether --with-libmagic-libs was given.
 -if test "${with_libmagic_libs+set}" = set; then
-+if test "${with_libmagic_libs+set}" = set; then :
-   withval=$with_libmagic_libs;
-             mt_libmagic_search_libs="$withval"
+-  withval=$with_libmagic_libs;
+-            mt_libmagic_search_libs="$withval"
 -            { $as_echo "$as_me:$LINENO: Will search for libmagic libs in $withval" >&5
-+            { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for libmagic libs in $withval" >&5
- $as_echo "$as_me: Will search for libmagic libs in $withval" >&6;}
+-$as_echo "$as_me: Will search for libmagic libs in $withval" >&6;}
++# Check whether --with-sqlite3-libs was given.
++if test "${with_sqlite3_libs+set}" = set; then :
++  withval=$with_sqlite3_libs;
++            mt_sqlite3_search_libs="$withval"
++            { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for sqlite3 libs in $withval" >&5
++$as_echo "$as_me: Will search for sqlite3 libs in $withval" >&6;}
  
  
-@@ -25005,18 +13406,14 @@ fi
-     if test "$mt_libmagic_search_libs" ; then
-         unset ac_cv_lib_magic_magic_load
-         LDFLAGS="$LDFLAGS -L$mt_libmagic_search_libs"
+ fi
+ 
+ 
+-    if test "$mt_libmagic_search_libs" ; then
+-        unset ac_cv_lib_magic_magic_load
+-        LDFLAGS="$LDFLAGS -L$mt_libmagic_search_libs"
 -        { $as_echo "$as_me:$LINENO: checking for magic_load in -lmagic" >&5
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for magic_load in -lmagic" >&5
- $as_echo_n "checking for magic_load in -lmagic... " >&6; }
+-$as_echo_n "checking for magic_load in -lmagic... " >&6; }
 -if test "${ac_cv_lib_magic_magic_load+set}" = set; then
-+if test "${ac_cv_lib_magic_magic_load+set}" = set; then :
++    if test "$mt_sqlite3_search_libs" ; then
++        unset ac_cv_lib_sqlite3_sqlite3_open
++        LDFLAGS="$LDFLAGS -L$mt_sqlite3_search_libs"
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqlite3_open in -lsqlite3" >&5
++$as_echo_n "checking for sqlite3_open in -lsqlite3... " >&6; }
++if test "${ac_cv_lib_sqlite3_sqlite3_open+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
    ac_check_lib_save_LIBS=$LIBS
- LIBS="-lmagic  $LIBS"
+-LIBS="-lmagic  $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
++LIBS="-lsqlite3  $LIBS"
 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -25034,43 +13431,18 @@ return magic_load ();
+@@ -25025,85 +12019,54 @@
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-char magic_load ();
++char sqlite3_open ();
+ int
+ main ()
+ {
+-return magic_load ();
++return sqlite3_open ();
+   ;
    return 0;
  }
  _ACEOF
@@ -23665,14 +32282,15 @@ index f51d803..459bf70 100755
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
+-  ac_cv_lib_magic_magic_load=yes
 +if ac_fn_cxx_try_link "$LINENO"; then :
-   ac_cv_lib_magic_magic_load=yes
++  ac_cv_lib_sqlite3_sqlite3_open=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_lib_magic_magic_load=no
-+  ac_cv_lib_magic_magic_load=no
++  ac_cv_lib_sqlite3_sqlite3_open=no
  fi
 -
 -rm -rf conftest.dSYM
@@ -23683,51 +32301,71 @@ index f51d803..459bf70 100755
  LIBS=$ac_check_lib_save_LIBS
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_magic_magic_load" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_magic_magic_load" >&5
- $as_echo "$ac_cv_lib_magic_magic_load" >&6; }
+-$as_echo "$ac_cv_lib_magic_magic_load" >&6; }
 -if test "x$ac_cv_lib_magic_magic_load" = x""yes; then
-+if test "x$ac_cv_lib_magic_magic_load" = x""yes; then :
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_open" >&5
++$as_echo "$ac_cv_lib_sqlite3_sqlite3_open" >&6; }
++if test "x$ac_cv_lib_sqlite3_sqlite3_open" = x""yes; then :
  
-                 mt_libmagic_libs="-lmagic"
-                 mt_libmagic_ldflags="-L$mt_libmagic_search_libs"
-@@ -25079,12 +13451,10 @@ else
+-                mt_libmagic_libs="-lmagic"
+-                mt_libmagic_ldflags="-L$mt_libmagic_search_libs"
++                mt_sqlite3_libs="-lsqlite3"
++                mt_sqlite3_ldflags="-L$mt_sqlite3_search_libs"
  
-                 mt_libmagic_library_status=missing
+ else
+ 
+-                mt_libmagic_library_status=missing
++                mt_sqlite3_library_status=missing
                  if test "" = "pass"; then
 -                    { $as_echo "$as_me:$LINENO: libmagic library not found in requested location $mt_libmagic_search_libs" >&5
-+                    { $as_echo "$as_me:${as_lineno-$LINENO}: libmagic library not found in requested location $mt_libmagic_search_libs" >&5
- $as_echo "$as_me: libmagic library not found in requested location $mt_libmagic_search_libs" >&6;}
+-$as_echo "$as_me: libmagic library not found in requested location $mt_libmagic_search_libs" >&6;}
++                    { $as_echo "$as_me:${as_lineno-$LINENO}: sqlite3 library not found in requested location $mt_sqlite3_search_libs" >&5
++$as_echo "$as_me: sqlite3 library not found in requested location $mt_sqlite3_search_libs" >&6;}
                  else
 -                    { { $as_echo "$as_me:$LINENO: error: libmagic library not found in requested location $mt_libmagic_search_libs" >&5
 -$as_echo "$as_me: error: libmagic library not found in requested location $mt_libmagic_search_libs" >&2;}
 -   { (exit 1); exit 1; }; }
-+                    as_fn_error $? "libmagic library not found in requested location $mt_libmagic_search_libs" "$LINENO" 5
++                    as_fn_error $? "sqlite3 library not found in requested location $mt_sqlite3_search_libs" "$LINENO" 5
                  fi
  
  
-@@ -25092,18 +13462,14 @@ fi
+ fi
  
      else
-         unset ac_cv_lib_magic_magic_load
+-        unset ac_cv_lib_magic_magic_load
 -        { $as_echo "$as_me:$LINENO: checking for magic_load in -lmagic" >&5
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for magic_load in -lmagic" >&5
- $as_echo_n "checking for magic_load in -lmagic... " >&6; }
+-$as_echo_n "checking for magic_load in -lmagic... " >&6; }
 -if test "${ac_cv_lib_magic_magic_load+set}" = set; then
-+if test "${ac_cv_lib_magic_magic_load+set}" = set; then :
++        unset ac_cv_lib_sqlite3_sqlite3_open
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqlite3_open in -lsqlite3" >&5
++$as_echo_n "checking for sqlite3_open in -lsqlite3... " >&6; }
++if test "${ac_cv_lib_sqlite3_sqlite3_open+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
    ac_check_lib_save_LIBS=$LIBS
- LIBS="-lmagic  $LIBS"
+-LIBS="-lmagic  $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
++LIBS="-lsqlite3  $LIBS"
 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -25121,43 +13487,18 @@ return magic_load ();
+@@ -25112,71 +12075,42 @@
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-char magic_load ();
++char sqlite3_open ();
+ int
+ main ()
+ {
+-return magic_load ();
++return sqlite3_open ();
+   ;
    return 0;
  }
  _ACEOF
@@ -23752,14 +32390,15 @@ index f51d803..459bf70 100755
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
+-  ac_cv_lib_magic_magic_load=yes
 +if ac_fn_cxx_try_link "$LINENO"; then :
-   ac_cv_lib_magic_magic_load=yes
++  ac_cv_lib_sqlite3_sqlite3_open=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_lib_magic_magic_load=no
-+  ac_cv_lib_magic_magic_load=no
++  ac_cv_lib_sqlite3_sqlite3_open=no
  fi
 -
 -rm -rf conftest.dSYM
@@ -23770,36 +32409,52 @@ index f51d803..459bf70 100755
  LIBS=$ac_check_lib_save_LIBS
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_magic_magic_load" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_magic_magic_load" >&5
- $as_echo "$ac_cv_lib_magic_magic_load" >&6; }
+-$as_echo "$ac_cv_lib_magic_magic_load" >&6; }
 -if test "x$ac_cv_lib_magic_magic_load" = x""yes; then
-+if test "x$ac_cv_lib_magic_magic_load" = x""yes; then :
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_open" >&5
++$as_echo "$ac_cv_lib_sqlite3_sqlite3_open" >&6; }
++if test "x$ac_cv_lib_sqlite3_sqlite3_open" = x""yes; then :
  
-                 mt_libmagic_libs="-lmagic"
+-                mt_libmagic_libs="-lmagic"
++                mt_sqlite3_libs="-lsqlite3"
  
-@@ -25165,18 +13506,14 @@ else
+ else
  
                  LDFLAGS="$LDFLAGS -L$MT_SEARCHPATH_LIBS"
-                 unset ac_cv_lib_magic_magic_load
+-                unset ac_cv_lib_magic_magic_load
 -                { $as_echo "$as_me:$LINENO: checking for magic_load in -lmagic" >&5
-+                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for magic_load in -lmagic" >&5
- $as_echo_n "checking for magic_load in -lmagic... " >&6; }
+-$as_echo_n "checking for magic_load in -lmagic... " >&6; }
 -if test "${ac_cv_lib_magic_magic_load+set}" = set; then
-+if test "${ac_cv_lib_magic_magic_load+set}" = set; then :
++                unset ac_cv_lib_sqlite3_sqlite3_open
++                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqlite3_open in -lsqlite3" >&5
++$as_echo_n "checking for sqlite3_open in -lsqlite3... " >&6; }
++if test "${ac_cv_lib_sqlite3_sqlite3_open+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
    ac_check_lib_save_LIBS=$LIBS
- LIBS="-lmagic  $LIBS"
+-LIBS="-lmagic  $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
++LIBS="-lsqlite3  $LIBS"
 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -25194,43 +13531,18 @@ return magic_load ();
+@@ -25185,59 +12119,34 @@
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-char magic_load ();
++char sqlite3_open ();
+ int
+ main ()
+ {
+-return magic_load ();
++return sqlite3_open ();
+   ;
    return 0;
  }
  _ACEOF
@@ -23824,14 +32479,15 @@ index f51d803..459bf70 100755
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
+-  ac_cv_lib_magic_magic_load=yes
 +if ac_fn_cxx_try_link "$LINENO"; then :
-   ac_cv_lib_magic_magic_load=yes
++  ac_cv_lib_sqlite3_sqlite3_open=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_lib_magic_magic_load=no
-+  ac_cv_lib_magic_magic_load=no
++  ac_cv_lib_sqlite3_sqlite3_open=no
  fi
 -
 -rm -rf conftest.dSYM
@@ -23842,69 +32498,261 @@ index f51d803..459bf70 100755
  LIBS=$ac_check_lib_save_LIBS
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_magic_magic_load" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_magic_magic_load" >&5
- $as_echo "$ac_cv_lib_magic_magic_load" >&6; }
+-$as_echo "$ac_cv_lib_magic_magic_load" >&6; }
 -if test "x$ac_cv_lib_magic_magic_load" = x""yes; then
-+if test "x$ac_cv_lib_magic_magic_load" = x""yes; then :
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_open" >&5
++$as_echo "$ac_cv_lib_sqlite3_sqlite3_open" >&6; }
++if test "x$ac_cv_lib_sqlite3_sqlite3_open" = x""yes; then :
  
-                         mt_libmagic_libs="-lmagic"
-                         mt_libmagic_ldflags="-L$MT_SEARCHPATH_LIBS"
-@@ -25273,9 +13585,7 @@ fi
+-                        mt_libmagic_libs="-lmagic"
+-                        mt_libmagic_ldflags="-L$MT_SEARCHPATH_LIBS"
++                        mt_sqlite3_libs="-lsqlite3"
++                        mt_sqlite3_ldflags="-L$MT_SEARCHPATH_LIBS"
  
-     if test "x$mt_libmagic_status" = xyes; then
+ else
+ 
+-                        mt_libmagic_library_status=missing
++                        mt_sqlite3_library_status=missing
+ 
+ 
+ fi
+@@ -25248,9 +12157,9 @@
+ 
+     fi
+ 
+-    if test "x$mt_libmagic_library_status" != xyes; then
+-        mt_libmagic_libs=""
+-        mt_libmagic_ldflags=""
++    if test "x$mt_sqlite3_library_status" != xyes; then
++        mt_sqlite3_libs=""
++        mt_sqlite3_ldflags=""
+     fi
+ 
+     LIBS=$LIBS_SAVE
+@@ -25259,40 +12168,103 @@
+     CXXFLAGS=$CXXFLAGS_SAVE
+     CPPFLAGS=$CPPFLAGS_SAVE
+ 
+-        mt_libmagic_package_status=${mt_libmagic_library_status}
++        mt_sqlite3_package_status=${mt_sqlite3_library_status}
++    fi
++
++    if test "x$mt_sqlite3_package_status" = xyes; then
++        SQLITE3_CFLAGS=${mt_sqlite3_cxxflags}
++        SQLITE3_LIBS=${mt_sqlite3_libs}
++        SQLITE3_LDFLAGS=${mt_sqlite3_ldflags}
++    fi
++
++        mt_sqlite3_status=${mt_sqlite3_package_status}
++    else
++        mt_sqlite3_status=disabled
++    fi
++
++    if ((test "x${SQLITE3_OPTION_ENABLED}" = xyes) &&
++        (test "x${SQLITE3_OPTION_REQUESTED}" = xyes) &&
++        (test "x$mt_sqlite3_status" != xyes) && (test "" != "pass")); then
++        as_fn_error $? "unable to configure sqlite3 support" "$LINENO" 5
++    fi
++
++    if test "x$mt_sqlite3_status" = xyes; then
++
++$as_echo "#define HAVE_SQLITE3 1" >>confdefs.h
++
+     fi
+ 
+-    if test "x$mt_libmagic_package_status" = xyes; then
+-        LIBMAGIC_CFLAGS=${mt_libmagic_cxxflags}
+-        LIBMAGIC_LIBS=${mt_libmagic_libs}
+-        LIBMAGIC_LDFLAGS=${mt_libmagic_ldflags}
+-    fi
++    SQLITE3_STATUS=${mt_sqlite3_status}
++
++
++
++
++
++
++
++if test "x$SQLITE3_STATUS" = xyes; then
++    if test "x$RT_STATUS" = xyes; then
++        SQLITE_LDFLAGS="$SQLITE_LDFLAGS $RT_LDFLAGS"
++        SQLITE_LIBS="$SQLITE_LIBS $RT_LIBS"
++    fi
++
++
++
++
++    if test "x$SQLITE_BACKUP_OPTION_ENABLED" = xyes; then
++
++$as_echo "#define SQLITE_BACKUP_ENABLED 1" >>confdefs.h
++
++    fi
++else
++    if (test "x$SQLITE_BACKUP_OPTION_ENABLED" = xyes) &&
++       (test "x$SQLITE_BACKUP_OPTION_REQUESTED" = xyes); then
++        as_fn_error $? "You specified the option to use sqlite backup settings but the sqlite support could not be configured" "$LINENO" 5
++    fi
++
++fi
++
++LDFLAGS="$LDFLAGS_SAVE"
++CPPFLAGS="$CPPFLAGS_SAVE"
++CXXFLAGS="$CXXFLAGS_SAVE"
++
++########## MySQL
+ 
+-        mt_libmagic_status=${mt_libmagic_package_status}
+-    fi
+ 
+-    if test "x$mt_libmagic_status" = xyes; then
++    mt_mysql_status=yes
++    mt_mysql_requested=no
  
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_LIBMAGIC 1
 -_ACEOF
-+$as_echo "#define HAVE_LIBMAGIC 1" >>confdefs.h
  
++
++    mt_mysql_option_enabled=
++    mt_mysql_option_requested=no
++    if test "xdisable" = xdisable; then
++        mt_mysql_option_enabled=yes
++    else
++        mt_mysql_option_enabled=no
      fi
  
-@@ -25302,10 +13612,10 @@ _ACEOF
+-    LIBMAGIC_STATUS=${mt_libmagic_status}
++    # Check whether --enable-mysql was given.
++if test "${enable_mysql+set}" = set; then :
++  enableval=$enable_mysql;
++            mt_mysql_option_enabled=$enableval
++            mt_mysql_option_requested=yes
+ 
+ 
++fi
+ 
+ 
++    MYSQL_OPTION_ENABLED=${mt_mysql_option_enabled}
++    MYSQL_OPTION_REQUESTED=${mt_mysql_option_requested}
+ 
+ 
+ 
+-    if test "x$LIBMAGIC_STATUS" != xyes; then
+-        if test "x$ZLIB_STATUS" != xyes; then
+ 
++    if test "x${mt_mysql_option_enabled}" = xyes; then :
+ 
+-    mt_zlib_arg_default=yes
+-    mt_zlib_library_status=yes
++fi
++
++    if test "x${MYSQL_OPTION_ENABLED}" = xyes; then
+ 
+     LIBS_SAVE=$LIBS
+     LDFLAGS_SAVE=$LDFLAGS
+@@ -25301,192 +12273,201 @@
+     CPPFLAGS_SAVE=$CPPFLAGS
  
  
- # Check whether --with-zlib-libs was given.
+-# Check whether --with-zlib-libs was given.
 -if test "${with_zlib_libs+set}" = set; then
-+if test "${with_zlib_libs+set}" = set; then :
-   withval=$with_zlib_libs;
-             mt_zlib_search_libs="$withval"
+-  withval=$with_zlib_libs;
+-            mt_zlib_search_libs="$withval"
 -            { $as_echo "$as_me:$LINENO: Will search for zlib libs in $withval" >&5
-+            { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for zlib libs in $withval" >&5
- $as_echo "$as_me: Will search for zlib libs in $withval" >&6;}
+-$as_echo "$as_me: Will search for zlib libs in $withval" >&6;}
++    mt_mysql_config=none
++    mt_mysql_package_status=yes
++
++
++# Check whether --with-mysql-cfg was given.
++if test "${with_mysql_cfg+set}" = set; then :
++  withval=$with_mysql_cfg;
++            mt_mysql_search_config="$withval"
++            { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for mysql config in $withval" >&5
++$as_echo "$as_me: Will search for mysql config in $withval" >&6;}
  
  
-@@ -25315,18 +13625,14 @@ fi
-     if test "$mt_zlib_search_libs" ; then
-         unset ac_cv_lib_z_compress
-         LDFLAGS="$LDFLAGS -L$mt_zlib_search_libs"
+ fi
+ 
+ 
+-    if test "$mt_zlib_search_libs" ; then
+-        unset ac_cv_lib_z_compress
+-        LDFLAGS="$LDFLAGS -L$mt_zlib_search_libs"
 -        { $as_echo "$as_me:$LINENO: checking for compress in -lz" >&5
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
- $as_echo_n "checking for compress in -lz... " >&6; }
+-$as_echo_n "checking for compress in -lz... " >&6; }
 -if test "${ac_cv_lib_z_compress+set}" = set; then
-+if test "${ac_cv_lib_z_compress+set}" = set; then :
++    if test -n "$mt_mysql_search_config"; then
++        { $as_echo "$as_me:${as_lineno-$LINENO}: You specified ${mt_mysql_search_config} for mysql_config" >&5
++$as_echo "$as_me: You specified ${mt_mysql_search_config} for mysql_config" >&6;}
++        if test -f "$mt_mysql_search_config"; then
++            mt_mysql_config=${mt_mysql_search_config}
++        else
++            as_fn_error $? "${mt_mysql_search_config} not found" "$LINENO" 5
++        fi
++
++        mt_mysql_version=`${mt_mysql_config} --version 2>/dev/null`
++        if test -z "$mt_mysql_version"; then
++            as_fn_error $? "${mt_mysql_search_config} could not be executed or returned invalid values" "$LINENO" 5
++        fi
++    else
++        # Extract the first word of "mysql_config", so it can be a program name with args.
++set dummy mysql_config; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_path_mt_mysql_config+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
-   ac_check_lib_save_LIBS=$LIBS
- LIBS="-lz  $LIBS"
+-  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.  */
+-/* end confdefs.h.  */
++  case $mt_mysql_config in
++  [\\/]* | ?:[\\/]*)
++  ac_cv_path_mt_mysql_config="$mt_mysql_config" # Let the user override the test with a path.
++  ;;
++  *)
++  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++    ac_cv_path_mt_mysql_config="$as_dir/$ac_word$ac_exec_ext"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
  
- /* Override any GCC internal prototype to avoid an error.
-@@ -25344,43 +13650,18 @@ return compress ();
-   return 0;
- }
- _ACEOF
+-/* 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 compress ();
+-int
+-main ()
+-{
+-return compress ();
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
 -  *) ac_try_echo=$ac_try;;
--esac
++  test -z "$ac_cv_path_mt_mysql_config" && ac_cv_path_mt_mysql_config="none"
++  ;;
+ esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
 -  (eval "$ac_link") 2>conftest.er1
@@ -23920,72 +32768,161 @@ index f51d803..459bf70 100755
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
-+if ac_fn_cxx_try_link "$LINENO"; then :
-   ac_cv_lib_z_compress=yes
+-  ac_cv_lib_z_compress=yes
++fi
++mt_mysql_config=$ac_cv_path_mt_mysql_config
++if test -n "$mt_mysql_config"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $mt_mysql_config" >&5
++$as_echo "$mt_mysql_config" >&6; }
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_lib_z_compress=no
-+  ac_cv_lib_z_compress=no
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
  fi
--
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      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
+-LIBS=$ac_check_lib_save_LIBS
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_z_compress" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
- $as_echo "$ac_cv_lib_z_compress" >&6; }
+-$as_echo "$ac_cv_lib_z_compress" >&6; }
 -if test "x$ac_cv_lib_z_compress" = x""yes; then
-+if test "x$ac_cv_lib_z_compress" = x""yes; then :
  
-                 mt_zlib_libs="-lz"
-                 mt_zlib_ldflags="-L$mt_zlib_search_libs"
-@@ -25389,12 +13670,10 @@ else
+-                mt_zlib_libs="-lz"
+-                mt_zlib_ldflags="-L$mt_zlib_search_libs"
++        if test "x$mt_mysql_config" = xnone; then
++            unset ac_cv_path_mt_mysql_config
++            # Extract the first word of "mysql_config", so it can be a program name with args.
++set dummy mysql_config; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_path_mt_mysql_config+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  case $mt_mysql_config in
++  [\\/]* | ?:[\\/]*)
++  ac_cv_path_mt_mysql_config="$mt_mysql_config" # Let the user override the test with a path.
++  ;;
++  *)
++  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $MT_SEARCHPATH_PROGS
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++    ac_cv_path_mt_mysql_config="$as_dir/$ac_word$ac_exec_ext"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
  
-                 mt_zlib_library_status=missing
-                 if test "" = "pass"; then
++  test -z "$ac_cv_path_mt_mysql_config" && ac_cv_path_mt_mysql_config="none"
++  ;;
++esac
++fi
++mt_mysql_config=$ac_cv_path_mt_mysql_config
++if test -n "$mt_mysql_config"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $mt_mysql_config" >&5
++$as_echo "$mt_mysql_config" >&6; }
+ else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
+ 
+-                mt_zlib_library_status=missing
+-                if test "" = "pass"; then
 -                    { $as_echo "$as_me:$LINENO: zlib library not found in requested location $mt_zlib_search_libs" >&5
-+                    { $as_echo "$as_me:${as_lineno-$LINENO}: zlib library not found in requested location $mt_zlib_search_libs" >&5
- $as_echo "$as_me: zlib library not found in requested location $mt_zlib_search_libs" >&6;}
-                 else
+-$as_echo "$as_me: zlib library not found in requested location $mt_zlib_search_libs" >&6;}
+-                else
 -                    { { $as_echo "$as_me:$LINENO: error: zlib library not found in requested location $mt_zlib_search_libs" >&5
 -$as_echo "$as_me: error: zlib library not found in requested location $mt_zlib_search_libs" >&2;}
 -   { (exit 1); exit 1; }; }
-+                    as_fn_error $? "zlib library not found in requested location $mt_zlib_search_libs" "$LINENO" 5
-                 fi
+-                fi
  
++            if test "x$mt_mysql_config" = xnone; then
++                mt_mysql_package_status=missing
++                { $as_echo "$as_me:${as_lineno-$LINENO}: result: mysql_config not found, please install the mysql devel package" >&5
++$as_echo "mysql_config not found, please install the mysql devel package" >&6; }
++            fi
++        fi
  
-@@ -25402,18 +13681,14 @@ fi
+-fi
++        mt_mysql_version=`${mt_mysql_config} --version 2>/dev/null`
++        if test -z "$mt_mysql_version"; then
++            { $as_echo "$as_me:${as_lineno-$LINENO}: ${mt_mysql_config} could not be executed or returned invalid values" >&5
++$as_echo "$as_me: ${mt_mysql_config} could not be executed or returned invalid values" >&6;}
++            mt_mysql_package_status=missing
++        fi
++    fi
++    if test "x$mt_mysql_package_status" = xyes; then
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking mysql cflags" >&5
++$as_echo_n "checking mysql cflags... " >&6; }
++        mt_mysql_cxxflags=`${mt_mysql_config} --cflags`
++        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $mt_mysql_cxxflags" >&5
++$as_echo "$mt_mysql_cxxflags" >&6; }
++        mt_mysql_libs=
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking mysql libs" >&5
++$as_echo_n "checking mysql libs... " >&6; }
++        if test -z "--libs_r";  then
++            mt_mysql_libs=`${mt_mysql_config} --libs`
++        else
++            mt_mysql_libs=`${mt_mysql_config} --libs_r`
++        fi
++        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $mt_mysql_libs" >&5
++$as_echo "$mt_mysql_libs" >&6; }
++    fi
  
-     else
-         unset ac_cv_lib_z_compress
+-    else
+-        unset ac_cv_lib_z_compress
 -        { $as_echo "$as_me:$LINENO: checking for compress in -lz" >&5
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
- $as_echo_n "checking for compress in -lz... " >&6; }
+-$as_echo_n "checking for compress in -lz... " >&6; }
 -if test "${ac_cv_lib_z_compress+set}" = set; then
-+if test "${ac_cv_lib_z_compress+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
-   ac_check_lib_save_LIBS=$LIBS
- LIBS="-lz  $LIBS"
+-  $as_echo_n "(cached) " >&6
+-else
+-  ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lz  $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
--_ACEOF
++    if test "x$mt_mysql_package_status" = xyes; then
++        CPPFLAGS="$CPPFLAGS $mt_mysql_cxxflags"
++        CXXFLAGS="$CXXFLAGS $mt_mysql_cxxflags"
++        CFLAGS="$CFLAGS $mt_mysql_cxxflags"
++        for mt_u_header in mysql_h; do
++            unset ac_cv_header_${mt_u_header}
++        done
++        for ac_header in mysql.h
++do :
++  ac_fn_cxx_check_header_mongrel "$LINENO" "mysql.h" "ac_cv_header_mysql_h" "$ac_includes_default"
++if test "x$ac_cv_header_mysql_h" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_MYSQL_H 1
+ _ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+-/* end confdefs.h.  */
  
- /* Override any GCC internal prototype to avoid an error.
-@@ -25431,43 +13706,18 @@ return compress ();
-   return 0;
- }
- _ACEOF
+-/* 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 compress ();
+-int
+-main ()
+-{
+-return compress ();
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -24007,54 +32944,81 @@ index f51d803..459bf70 100755
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
-+if ac_fn_cxx_try_link "$LINENO"; then :
-   ac_cv_lib_z_compress=yes
+-  ac_cv_lib_z_compress=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_lib_z_compress=no
-+  ac_cv_lib_z_compress=no
++  mt_mysql_package_status=missing
  fi
--
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      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
+-LIBS=$ac_check_lib_save_LIBS
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_z_compress" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
- $as_echo "$ac_cv_lib_z_compress" >&6; }
+-$as_echo "$ac_cv_lib_z_compress" >&6; }
 -if test "x$ac_cv_lib_z_compress" = x""yes; then
-+if test "x$ac_cv_lib_z_compress" = x""yes; then :
++done
  
-                 mt_zlib_libs="-lz"
+-                mt_zlib_libs="-lz"
++    fi
++
++    if test "x$mt_mysql_package_status" = xyes; then
++        LIBS="$mt_mysql_libs $LIBS"
++        if test -z ""; then
++            unset ac_cv_func_mysql_init
++            for ac_func in mysql_init
++do :
++  ac_fn_cxx_check_func "$LINENO" "mysql_init" "ac_cv_func_mysql_init"
++if test "x$ac_cv_func_mysql_init" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_MYSQL_INIT 1
++_ACEOF
  
-@@ -25475,18 +13725,14 @@ else
+ else
++  mt_mysql_package_status=missing
++fi
++done
  
-                 LDFLAGS="$LDFLAGS -L$MT_SEARCHPATH_LIBS"
-                 unset ac_cv_lib_z_compress
+-                LDFLAGS="$LDFLAGS -L$MT_SEARCHPATH_LIBS"
+-                unset ac_cv_lib_z_compress
 -                { $as_echo "$as_me:$LINENO: checking for compress in -lz" >&5
-+                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
- $as_echo_n "checking for compress in -lz... " >&6; }
+-$as_echo_n "checking for compress in -lz... " >&6; }
 -if test "${ac_cv_lib_z_compress+set}" = set; then
-+if test "${ac_cv_lib_z_compress+set}" = set; then :
++        else
++            unset ac_cv_lib__mysql_init
++            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mysql_init in -l" >&5
++$as_echo_n "checking for mysql_init in -l... " >&6; }
++if test "${ac_cv_lib__mysql_init+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
    ac_check_lib_save_LIBS=$LIBS
- LIBS="-lz  $LIBS"
+-LIBS="-lz  $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
++LIBS="-l  $LIBS"
 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -25504,43 +13750,18 @@ return compress ();
+@@ -25495,633 +12476,518 @@
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-char compress ();
++char mysql_init ();
+ int
+ main ()
+ {
+-return compress ();
++return mysql_init ();
+   ;
    return 0;
  }
  _ACEOF
@@ -24079,14 +33043,15 @@ index f51d803..459bf70 100755
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
+-  ac_cv_lib_z_compress=yes
 +if ac_fn_cxx_try_link "$LINENO"; then :
-   ac_cv_lib_z_compress=yes
++  ac_cv_lib__mysql_init=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_lib_z_compress=no
-+  ac_cv_lib_z_compress=no
++  ac_cv_lib__mysql_init=no
  fi
 -
 -rm -rf conftest.dSYM
@@ -24097,39 +33062,132 @@ index f51d803..459bf70 100755
  LIBS=$ac_check_lib_save_LIBS
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_z_compress" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
- $as_echo "$ac_cv_lib_z_compress" >&6; }
+-$as_echo "$ac_cv_lib_z_compress" >&6; }
 -if test "x$ac_cv_lib_z_compress" = x""yes; then
-+if test "x$ac_cv_lib_z_compress" = x""yes; then :
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib__mysql_init" >&5
++$as_echo "$ac_cv_lib__mysql_init" >&6; }
++if test "x$ac_cv_lib__mysql_init" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_LIB 1
++_ACEOF
  
-                         mt_zlib_libs="-lz"
-                         mt_zlib_ldflags="-L$MT_SEARCHPATH_LIBS"
-@@ -25580,7 +13801,7 @@ fi
+-                        mt_zlib_libs="-lz"
+-                        mt_zlib_ldflags="-L$MT_SEARCHPATH_LIBS"
++  LIBS="-l $LIBS"
  
-             LDFLAGS="$LDFLAGS $ZLIB_LDFLAGS"
-             LIBS="$LIBS $ZLIB_LIBS"
+ else
+-
+-                        mt_zlib_library_status=missing
+-
+-
+-fi
+-
+-
+-
++  mt_mysql_package_status=missing
+ fi
+ 
++        fi
+     fi
+ 
+-    if test "x$mt_zlib_library_status" != xyes; then
+-        mt_zlib_libs=""
+-        mt_zlib_ldflags=""
++    if test "x$mt_mysql_package_status" = xyes; then
++        MYSQL_CFLAGS=${mt_mysql_cxxflags}
++        MYSQL_LIBS=${mt_mysql_libs}
++        MYSQL_VERSION=${mt_mysql_version}
+     fi
+ 
++
+     LIBS=$LIBS_SAVE
+     LDFLAGS=$LDFLAGS_SAVE
+     CFLAGS=$CFLAGS_SAVE
+     CXXFLAGS=$CXXFLAGS_SAVE
+     CPPFLAGS=$CPPFLAGS_SAVE
+ 
++        mt_mysql_status=${mt_mysql_package_status}
++    else
++        mt_mysql_status=disabled
++    fi
+ 
+-    ZLIB_LIBS=${mt_zlib_libs}
+-    ZLIB_LDFLAGS=${mt_zlib_ldflags}
+-    ZLIB_STATUS=${mt_zlib_library_status}
+-
++    if ((test "x${MYSQL_OPTION_ENABLED}" = xyes) &&
++        (test "x${MYSQL_OPTION_REQUESTED}" = xyes) &&
++        (test "x$mt_mysql_status" != xyes)); then
++        as_fn_error $? "unable to configure mysql support" "$LINENO" 5
++    fi
+ 
++    if test "x$mt_mysql_status" = xyes; then
+ 
++$as_echo "#define HAVE_MYSQL 1" >>confdefs.h
+ 
++    fi
+ 
+-            LDFLAGS="$LDFLAGS $ZLIB_LDFLAGS"
+-            LIBS="$LIBS $ZLIB_LIBS"
 -            { $as_echo "$as_me:$LINENO: retrying libmagic check with zlib flags" >&5
-+            { $as_echo "$as_me:${as_lineno-$LINENO}: retrying libmagic check with zlib flags" >&5
- $as_echo "$as_me: retrying libmagic check with zlib flags" >&6;}
+-$as_echo "$as_me: retrying libmagic check with zlib flags" >&6;}
++    MYSQL_STATUS=${mt_mysql_status}
  
-     mt_libmagic_status=yes
-@@ -25598,10 +13819,10 @@ $as_echo "$as_me: retrying libmagic check with zlib flags" >&6;}
+-    mt_libmagic_status=yes
  
+-    if test "x$mt_libmagic_status" = xyes; then
  
- # Check whether --with-libmagic-h was given.
+ 
+-    LIBS_SAVE=$LIBS
+-    LDFLAGS_SAVE=$LDFLAGS
+-    CFLAGS_SAVE=$CFLAGS
+-    CXXFLAGS_SAVE=$CXXFLAGS
+-    CPPFLAGS_SAVE=$CPPFLAGS
+ 
+-    mt_libmagic_header_status=yes
+ 
+ 
+-# Check whether --with-libmagic-h was given.
 -if test "${with_libmagic_h+set}" = set; then
-+if test "${with_libmagic_h+set}" = set; then :
-   withval=$with_libmagic_h;
-             mt_libmagic_search_headers="$withval"
+-  withval=$with_libmagic_h;
+-            mt_libmagic_search_headers="$withval"
 -            { $as_echo "$as_me:$LINENO: Will search for libmagic headers in $withval" >&5
-+            { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for libmagic headers in $withval" >&5
- $as_echo "$as_me: Will search for libmagic headers in $withval" >&6;}
+-$as_echo "$as_me: Will search for libmagic headers in $withval" >&6;}
++#    AS_IF([test x"$mt_mysql_status" = xyes], [--libs_r], [])[]dnl
  
  
-@@ -25614,145 +13835,8 @@ fi
-         CXXFLAGS="$CXXFLAGS -I${mt_libmagic_search_headers}"
-         CPPFLAGS="$CPPFLAGS -I${mt_libmagic_search_headers}"
-         as_ac_Header=`$as_echo "ac_cv_header_$mt_libmagic_search_headers/magic.h" | $as_tr_sh`
++if test "x$MYSQL_STATUS" = xyes; then
++    { $as_echo "$as_me:${as_lineno-$LINENO}: checking mysql version" >&5
++$as_echo_n "checking mysql version... " >&6; }
++    MYSQL_VERSION_MAJOR=`echo $MYSQL_VERSION | sed 's/^\([0-9]\{1,\}\)\.\([0-9]\{1,\}\).\([0-9]\{1,\}\).*$/\1/'`
++    MYSQL_VERSION_MINOR=`echo $MYSQL_VERSION | sed 's/^\([0-9]\{1,\}\)\.\([0-9]\{1,\}\).\([0-9]\{1,\}\).*$/\2/'`
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MYSQL_VERSION" >&5
++$as_echo "$MYSQL_VERSION" >&6; }
++    if test -z $MYSQL_VERSION_MAJOR || test -z $MYSQL_VERSION_MINOR; then
++        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not parse mysql version string" >&5
++$as_echo "$as_me: WARNING: could not parse mysql version string" >&2;}
++        MYSQL_STATUS=missing
++    elif test $MYSQL_VERSION_MAJOR -le 3 ; then
++       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MySQL version too old" >&5
++$as_echo "$as_me: WARNING: MySQL version too old" >&2;}
++       MYSQL_STATUS=missing
++    fi
+ fi
+ 
++LDFLAGS="$LDFLAGS_SAVE"
++LIBS="$LIBS $MYSQL_LIBS"
++CFLAGS="$CFLAGS $MYSQL_CFLAGS"
++CXXFLAGS="$CXXFLAGS $MYSQL_CFLAGS"
++CPPFLAGS="$CFLAGS $MYSQL_CFLAGS"
++
++if test "x$MYSQL_STATUS" = xyes; then
+ 
+-    if test "$mt_libmagic_search_headers" ; then
+-        unset ac_cv_header_magic_h
+-        CFLAGS="$CFLAGS -I${mt_libmagic_search_headers}"
+-        CXXFLAGS="$CXXFLAGS -I${mt_libmagic_search_headers}"
+-        CPPFLAGS="$CPPFLAGS -I${mt_libmagic_search_headers}"
+-        as_ac_Header=`$as_echo "ac_cv_header_$mt_libmagic_search_headers/magic.h" | $as_tr_sh`
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 -  { $as_echo "$as_me:$LINENO: checking for $mt_libmagic_search_headers/magic.h" >&5
 -$as_echo_n "checking for $mt_libmagic_search_headers/magic.h... " >&6; }
@@ -24146,13 +33204,44 @@ index f51d803..459bf70 100755
 -$as_echo_n "checking $mt_libmagic_search_headers/magic.h usability... " >&6; }
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
--_ACEOF
++$as_echo "#define HAVE_MYSQL 1" >>confdefs.h
++
++
++
++    for ac_func in mysql_stmt_init
++do :
++  ac_fn_cxx_check_func "$LINENO" "mysql_stmt_init" "ac_cv_func_mysql_stmt_init"
++if test "x$ac_cv_func_mysql_stmt_init" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_MYSQL_STMT_INIT 1
+ _ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++
++fi
++done
++
++
++    { $as_echo "$as_me:${as_lineno-$LINENO}: checking MYSQL_OPT_RECONNECT" >&5
++$as_echo_n "checking MYSQL_OPT_RECONNECT... " >&6; }
++    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
 -$ac_includes_default
 -#include <$mt_libmagic_search_headers/magic.h>
--_ACEOF
++
++                #include <mysql.h>
++
++int
++main ()
++{
++
++                (int)mysql_options(0, MYSQL_OPT_RECONNECT, 0);
++
++
++  ;
++  return 0;
++}
+ _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -24172,17 +33261,57 @@ index f51d803..459bf70 100755
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_header_compiler=yes
--else
++if ac_fn_cxx_try_compile "$LINENO"; then :
++
++            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++
++$as_echo "#define HAVE_MYSQL_OPT_RECONNECT 1" >>confdefs.h
++
++
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	ac_header_compiler=no
 -fi
--
--rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
+ 
++fi
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 -$as_echo "$ac_header_compiler" >&6; }
--
++else
++    MYSQL_CFLAGS=
++    MYSQL_LIBS=
++fi
++
++CPPFLAGS="$CPPFLAGS_SAVE"
++CXXFLAGS="$CXXFLAGS_SAVE"
++CFLAGS="$CFLAGS_SAVE"
++LDFLAGS="$LDFLAGS_SAVE"
++LIBS="$LIBS_SAVE"
++
++#########  check if at least one database available
++
++if ((test "x$SQLITE3_STATUS" != xyes) && (test "x$MYSQL_STATUS" != xyes)); then
++    as_fn_error $? "Support of at least one of mysql or sqlite3 must be configured" "$LINENO" 5
++fi
++
++######### javascript
++
++# Check whether --enable-libjs was given.
++if test "${enable_libjs+set}" = set; then :
++  enableval=$enable_libjs;
++                JS_EN=$enableval
++                if test "x$enableval" = xno; then
++                    JS_OK=disabled
++                else
++                    JS_OK=yes
++                fi
+ 
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking $mt_libmagic_search_headers/magic.h presence" >&5
 -$as_echo_n "checking $mt_libmagic_search_headers/magic.h presence... " >&6; }
@@ -24212,17 +33341,20 @@ index f51d803..459bf70 100755
 -	 test ! -s conftest.err
 -       }; then
 -  ac_header_preproc=yes
--else
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -  ac_header_preproc=no
--fi
--
++                JS_OK=yes
++
++
+ fi
+ 
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$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_cxx_preproc_warn_flag in
 -  yes:no: )
@@ -24257,51 +33389,122 @@ index f51d803..459bf70 100755
 -$as_echo_n "checking for $mt_libmagic_search_headers/magic.h... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 -  $as_echo_n "(cached) " >&6
--else
++XP_ADD=""
++
++if test "x$JS_OK" = xyes; then
++        XP_ADD="-DXP_UNIX"
++
++    CXXFLAGS="$CXXFLAGS $XP_ADD"
++    CPPFLAGS="$CPPFLAGS $XP_ADD"
++
++    if test -n "$JS_SEARCH_HEADERS" ; then
++        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for js (spidermonkey) headers in $JS_SEARCH_HEADERS" >&5
++$as_echo "$as_me: Will search for js (spidermonkey) headers in $JS_SEARCH_HEADERS" >&6;}
++        as_ac_Header=`$as_echo "ac_cv_header_$JS_SEARCH_HEADERS/jsapi.h" | $as_tr_sh`
++ac_fn_cxx_check_header_mongrel "$LINENO" "$JS_SEARCH_HEADERS/jsapi.h" "$as_ac_Header" "$ac_includes_default"
++if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
++
++                    JS_CXXFLAGS="-I$JS_SEARCH_HEADERS"
++
+ else
 -  eval "$as_ac_Header=\$ac_header_preproc"
--fi
++
++                    as_fn_error $? "jsapi.h not found in requested location $JS_SEARCH_HEADERS" "$LINENO" 5
++
++
+ fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
--
--fi
++
++
++
++    else
++    ac_fn_cxx_check_header_mongrel "$LINENO" "jsapi.h" "ac_cv_header_jsapi_h" "$ac_includes_default"
++if test "x$ac_cv_header_jsapi_h" = x""yes; then :
++
++else
++
++            for sm_path in $SEARCH_DIR_HEADERS \
++                           /usr/include/js \
++                           /usr/include/smjs \
++                           /usr/include/mozjs \
++                           /usr/local/include/js \
++                           /usr/local/include/smjs \
++                           /usr/local/include/mozjs \
++                           /usr/include/spidermonkey \
++                           /usr/local/include/spidermonkey \
++                           $SEARCH_DIR_HEADERS/js \
++                           $SEARCH_DIR_HEADERS/smjs \
++                           $SEARCH_DIR_HEADERS/mozjs \
++                           $SEARCH_DIR_HEADERS/spidermonkey; do
++                if test "x$ac_cv_header_jsapi_h" != xyes ; then
++                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking checking alternative libjs header location: $sm_path" >&5
++$as_echo_n "checking checking alternative libjs header location: $sm_path... " >&6; }
++                    CXXFLAGS="$XP_ADD -I$sm_path"
++                    CPPFLAGS="$XP_ADD -I$sm_path"
++                    unset ac_cv_header_jsapi_h
++                    ac_fn_cxx_check_header_mongrel "$LINENO" "jsapi.h" "ac_cv_header_jsapi_h" "$ac_includes_default"
++if test "x$ac_cv_header_jsapi_h" = x""yes; then :
++
++                                        JS_CXXFLAGS="-I$sm_path"
++                                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: jsapi.h found in $sm_path" >&5
++$as_echo "jsapi.h found in $sm_path" >&6; }
+ 
+ fi
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+ac_fn_cxx_check_header_mongrel "$LINENO" "$mt_libmagic_search_headers/magic.h" "$as_ac_Header" "$ac_includes_default"
-+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
  
-                 mt_libmagic_cxxflags="-I${mt_libmagic_search_headers}"
+-                mt_libmagic_cxxflags="-I${mt_libmagic_search_headers}"
  
-@@ -25760,12 +13844,10 @@ else
+-else
++               fi
++            done
  
-                 mt_libmagic_header_status=missing
-                 if test "" = "pass"; then
+-                mt_libmagic_header_status=missing
+-                if test "" = "pass"; then
 -                    { $as_echo "$as_me:$LINENO: libmagic headers not found in requested location $mt_libmagic_search_headers" >&5
-+                    { $as_echo "$as_me:${as_lineno-$LINENO}: libmagic headers not found in requested location $mt_libmagic_search_headers" >&5
- $as_echo "$as_me: libmagic headers not found in requested location $mt_libmagic_search_headers" >&6;}
-                 else
+-$as_echo "$as_me: libmagic headers not found in requested location $mt_libmagic_search_headers" >&6;}
+-                else
 -                    { { $as_echo "$as_me:$LINENO: error: libmagic headers not found in requested location $mt_libmagic_search_headers" >&5
 -$as_echo "$as_me: error: libmagic headers not found in requested location $mt_libmagic_search_headers" >&2;}
 -   { (exit 1); exit 1; }; }
-+                    as_fn_error $? "libmagic headers not found in requested location $mt_libmagic_search_headers" "$LINENO" 5
-                 fi
+-                fi
++fi
  
  
-@@ -25774,140 +13856,9 @@ fi
+-fi
  
-     else
-         unset ac_cv_header_magic_h
++        if test "x$ac_cv_header_jsapi_h" != xyes ; then
++                JS_OK=missing
++                { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, giving up" >&5
++$as_echo "not found, giving up" >&6; }
++        fi
++    fi
++fi
+ 
+-    else
+-        unset ac_cv_header_magic_h
 -        if test "${ac_cv_header_magic_h+set}" = set; then
 -  { $as_echo "$as_me:$LINENO: checking for magic.h" >&5
 -$as_echo_n "checking for magic.h... " >&6; }
 -if test "${ac_cv_header_magic_h+set}" = set; then
--  $as_echo_n "(cached) " >&6
++MOZLIB=
++if test "x$JS_OK" = xyes; then
++    if test -n "$JS_SEARCH_LIBS" ; then
++        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for js (spidermonkey) libraries in $JS_SEARCH_LIBS" >&5
++$as_echo "$as_me: Will search for js (spidermonkey) libraries in $JS_SEARCH_LIBS" >&6;}
++        LDFLAGS="-L$JS_SEARCH_LIBS $LDFLAGS_SAVE -ljs $ADD_PTHREAD_CFLAGS"
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JS_NewObject in -ljs" >&5
++$as_echo_n "checking for JS_NewObject in -ljs... " >&6; }
++if test "${ac_cv_lib_js_JS_NewObject+set}" = set; then :
+   $as_echo_n "(cached) " >&6
 -fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_magic_h" >&5
 -$as_echo "$ac_cv_header_magic_h" >&6; }
--else
+ else
 -  # Is the header compilable?
 -{ $as_echo "$as_me:$LINENO: checking magic.h usability" >&5
 -$as_echo_n "checking magic.h usability... " >&6; }
@@ -24310,7 +33513,10 @@ index f51d803..459bf70 100755
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-ljs  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
 -$ac_includes_default
 -#include <magic.h>
 -_ACEOF
@@ -24343,7 +33549,7 @@ index f51d803..459bf70 100755
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 -$as_echo "$ac_header_compiler" >&6; }
--
+ 
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking magic.h presence" >&5
 -$as_echo_n "checking magic.h presence... " >&6; }
@@ -24354,7 +33560,21 @@ index f51d803..459bf70 100755
 -cat >>conftest.$ac_ext <<_ACEOF
 -/* end confdefs.h.  */
 -#include <magic.h>
--_ACEOF
++/* 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 JS_NewObject ();
++int
++main ()
++{
++return JS_NewObject ();
++  ;
++  return 0;
++}
+ _ACEOF
 -if { (ac_try="$ac_cpp conftest.$ac_ext"
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -24373,12 +33593,15 @@ index f51d803..459bf70 100755
 -	 test ! -s conftest.err
 -       }; then
 -  ac_header_preproc=yes
--else
++if ac_fn_cxx_try_link "$LINENO"; then :
++  ac_cv_lib_js_JS_NewObject=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -  ac_header_preproc=no
--fi
++  ac_cv_lib_js_JS_NewObject=no
+ fi
 -
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
@@ -24420,33 +33643,44 @@ index f51d803..459bf70 100755
 -  $as_echo_n "(cached) " >&6
 -else
 -  ac_cv_header_magic_h=$ac_header_preproc
--fi
++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:$LINENO: result: $ac_cv_header_magic_h" >&5
 -$as_echo "$ac_cv_header_magic_h" >&6; }
-+        ac_fn_cxx_check_header_mongrel "$LINENO" "magic.h" "ac_cv_header_magic_h" "$ac_includes_default"
-+if test "x$ac_cv_header_magic_h" = x""yes; then :
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_js_JS_NewObject" >&5
++$as_echo "$ac_cv_lib_js_JS_NewObject" >&6; }
++if test "x$ac_cv_lib_js_JS_NewObject" = x""yes; then :
++
++                    JS_LIBS="-L$JS_SEARCH_LIBS -ljs"
++                    MOZLIB=js
  
 -fi
 -if test "x$ac_cv_header_magic_h" = x""yes; then
 -  :
  else
  
-                 CFLAGS="$CFLAGS -I$MT_SEARCHPATH_HEADERS"
-@@ -25915,145 +13866,8 @@ else
-                 CPPFLAGS="$CPPFLAGS -I$MT_SEARCHPATH_HEADERS"
-                 unset ac_cv_header_magic_h
-                 as_ac_Header=`$as_echo "ac_cv_header_$MT_SEARCHPATH_HEADERS/magic.h" | $as_tr_sh`
+-                CFLAGS="$CFLAGS -I$MT_SEARCHPATH_HEADERS"
+-                CXXFLAGS="$CXXFLAGS -I$MT_SEARCHPATH_HEADERS"
+-                CPPFLAGS="$CPPFLAGS -I$MT_SEARCHPATH_HEADERS"
+-                unset ac_cv_header_magic_h
+-                as_ac_Header=`$as_echo "ac_cv_header_$MT_SEARCHPATH_HEADERS/magic.h" | $as_tr_sh`
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 -  { $as_echo "$as_me:$LINENO: checking for $MT_SEARCHPATH_HEADERS/magic.h" >&5
 -$as_echo_n "checking for $MT_SEARCHPATH_HEADERS/magic.h... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
--  $as_echo_n "(cached) " >&6
++                    LDFLAGS="-L$JS_SEARCH_LIBS $LDFLAGS_SAVE -lsmjs $ADD_PTHREAD_CFLAGS"
++                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JS_NewObject in -lsmjs" >&5
++$as_echo_n "checking for JS_NewObject in -lsmjs... " >&6; }
++if test "${ac_cv_lib_smjs_JS_NewObject+set}" = set; then :
+   $as_echo_n "(cached) " >&6
 -fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
--else
+ else
 -  # Is the header compilable?
 -{ $as_echo "$as_me:$LINENO: checking $MT_SEARCHPATH_HEADERS/magic.h usability" >&5
 -$as_echo_n "checking $MT_SEARCHPATH_HEADERS/magic.h usability... " >&6; }
@@ -24455,10 +33689,28 @@ index f51d803..459bf70 100755
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-lsmjs  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
 -$ac_includes_default
 -#include <$MT_SEARCHPATH_HEADERS/magic.h>
--_ACEOF
++
++/* 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 JS_NewObject ();
++int
++main ()
++{
++return JS_NewObject ();
++  ;
++  return 0;
++}
+ _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -24478,17 +33730,29 @@ index f51d803..459bf70 100755
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_header_compiler=yes
--else
++if ac_fn_cxx_try_link "$LINENO"; then :
++  ac_cv_lib_smjs_JS_NewObject=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_header_compiler=no
--fi
--
++  ac_cv_lib_smjs_JS_NewObject=no
++fi
++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_smjs_JS_NewObject" >&5
++$as_echo "$ac_cv_lib_smjs_JS_NewObject" >&6; }
++if test "x$ac_cv_lib_smjs_JS_NewObject" = x""yes; then :
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 -$as_echo "$ac_header_compiler" >&6; }
--
++                            JS_LIBS="-L$JS_SEARCH_LIBS $LDFLAGS_SAVE -lsmjs $ADD_PTHREAD_CFLAGS"
++                            MOZLIB=smjs
+ 
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking $MT_SEARCHPATH_HEADERS/magic.h presence" >&5
 -$as_echo_n "checking $MT_SEARCHPATH_HEADERS/magic.h presence... " >&6; }
@@ -24518,7 +33782,7 @@ index f51d803..459bf70 100755
 -	 test ! -s conftest.err
 -       }; then
 -  ac_header_preproc=yes
--else
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
@@ -24528,7 +33792,7 @@ index f51d803..459bf70 100755
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$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_cxx_preproc_warn_flag in
 -  yes:no: )
@@ -24562,60 +33826,227 @@ index f51d803..459bf70 100755
 -{ $as_echo "$as_me:$LINENO: checking for $MT_SEARCHPATH_HEADERS/magic.h" >&5
 -$as_echo_n "checking for $MT_SEARCHPATH_HEADERS/magic.h... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
--  $as_echo_n "(cached) " >&6
--else
++                            LDFLAGS="-L$JS_SEARCH_LIBS $LDFLAGS_SAVE -lmozjs $ADD_PTHREAD_CFLAGS"
++                            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JS_NewObject in -lmozjs" >&5
++$as_echo_n "checking for JS_NewObject in -lmozjs... " >&6; }
++if test "${ac_cv_lib_mozjs_JS_NewObject+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
 -  eval "$as_ac_Header=\$ac_header_preproc"
 -fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
--
--fi
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-lmozjs  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
+ 
++/* Override any GCC internal prototype to avoid an error.
++   Use char because int might match the return type of a GCC
++   builtin and then its argument prototype would still apply.  */
++#ifdef __cplusplus
++extern "C"
++#endif
++char JS_NewObject ();
++int
++main ()
++{
++return JS_NewObject ();
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_cxx_try_link "$LINENO"; then :
++  ac_cv_lib_mozjs_JS_NewObject=yes
++else
++  ac_cv_lib_mozjs_JS_NewObject=no
+ fi
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+ac_fn_cxx_check_header_mongrel "$LINENO" "$MT_SEARCHPATH_HEADERS/magic.h" "$as_ac_Header" "$ac_includes_default"
-+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
++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_mozjs_JS_NewObject" >&5
++$as_echo "$ac_cv_lib_mozjs_JS_NewObject" >&6; }
++if test "x$ac_cv_lib_mozjs_JS_NewObject" = x""yes; then :
  
-                         mt_libmagic_cxxflags="-I${MT_SEARCHPATH_HEADERS}"
+-                        mt_libmagic_cxxflags="-I${MT_SEARCHPATH_HEADERS}"
++                                    JS_LIBS="-L$JS_SEARCH_LIBS -lmozjs"
++                                    MOZLIB=mozjs
  
-@@ -26097,10 +13911,10 @@ fi
+ else
+ 
+-                        mt_libmagic_header_status=missing
++                                    as_fn_error $? "Spidermonkey not found in requested location $JS_SEARCH_LIBS" "$LINENO" 5
  
  
- # Check whether --with-libmagic-libs was given.
+ fi
+ 
+ 
+ 
+-
+ fi
+ 
+ 
+-    fi
+-
+-    if test "x$mt_libmagic_header_status" != xyes; then
+-        mt_libmagic_cxxflags=""
+-    fi
+-
+-    LIBS=$LIBS_SAVE
+-    LDFLAGS=$LDFLAGS_SAVE
+-    CFLAGS=$CFLAGS_SAVE
+-    CXXFLAGS=$CXXFLAGS_SAVE
+-    CPPFLAGS=$CPPFLAGS_SAVE
+-
+-    mt_libmagic_package_status=${mt_libmagic_header_status}
+ 
+-    if test "x$mt_libmagic_package_status" = xyes; then
++fi
+ 
+-    mt_libmagic_arg_default=yes
+-    mt_libmagic_library_status=yes
++    else
++    LDFLAGS="$LDFLAGS_SAVE $ADD_PTHREAD_CFLAGS"
++    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JS_NewObject in -ljs" >&5
++$as_echo_n "checking for JS_NewObject in -ljs... " >&6; }
++if test "${ac_cv_lib_js_JS_NewObject+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-ljs  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
+ 
+-    LIBS_SAVE=$LIBS
+-    LDFLAGS_SAVE=$LDFLAGS
+-    CFLAGS_SAVE=$CFLAGS
+-    CXXFLAGS_SAVE=$CXXFLAGS
+-    CPPFLAGS_SAVE=$CPPFLAGS
++/* 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 JS_NewObject ();
++int
++main ()
++{
++return JS_NewObject ();
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_cxx_try_link "$LINENO"; then :
++  ac_cv_lib_js_JS_NewObject=yes
++else
++  ac_cv_lib_js_JS_NewObject=no
++fi
++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_js_JS_NewObject" >&5
++$as_echo "$ac_cv_lib_js_JS_NewObject" >&6; }
++if test "x$ac_cv_lib_js_JS_NewObject" = x""yes; then :
+ 
++            MOZLIB=js
++            JS_LIBS="-ljs"
+ 
+-# Check whether --with-libmagic-libs was given.
 -if test "${with_libmagic_libs+set}" = set; then
-+if test "${with_libmagic_libs+set}" = set; then :
-   withval=$with_libmagic_libs;
-             mt_libmagic_search_libs="$withval"
+-  withval=$with_libmagic_libs;
+-            mt_libmagic_search_libs="$withval"
 -            { $as_echo "$as_me:$LINENO: Will search for libmagic libs in $withval" >&5
-+            { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for libmagic libs in $withval" >&5
- $as_echo "$as_me: Will search for libmagic libs in $withval" >&6;}
+-$as_echo "$as_me: Will search for libmagic libs in $withval" >&6;}
++else
+ 
++            unset ac_cv_lib_js_JS_NewObject
++            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JS_NewObject in -lsmjs" >&5
++$as_echo_n "checking for JS_NewObject in -lsmjs... " >&6; }
++if test "${ac_cv_lib_smjs_JS_NewObject+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-lsmjs  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
  
++/* Override any GCC internal prototype to avoid an error.
++   Use char because int might match the return type of a GCC
++   builtin and then its argument prototype would still apply.  */
++#ifdef __cplusplus
++extern "C"
++#endif
++char JS_NewObject ();
++int
++main ()
++{
++return JS_NewObject ();
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_cxx_try_link "$LINENO"; then :
++  ac_cv_lib_smjs_JS_NewObject=yes
++else
++  ac_cv_lib_smjs_JS_NewObject=no
++fi
++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_smjs_JS_NewObject" >&5
++$as_echo "$ac_cv_lib_smjs_JS_NewObject" >&6; }
++if test "x$ac_cv_lib_smjs_JS_NewObject" = x""yes; then :
  
-@@ -26110,18 +13924,14 @@ fi
-     if test "$mt_libmagic_search_libs" ; then
-         unset ac_cv_lib_magic_magic_load
-         LDFLAGS="$LDFLAGS -L$mt_libmagic_search_libs"
++                    JS_LIBS="-lsmjs"
++                    MOZLIB=smjs
+ 
+-    if test "$mt_libmagic_search_libs" ; then
+-        unset ac_cv_lib_magic_magic_load
+-        LDFLAGS="$LDFLAGS -L$mt_libmagic_search_libs"
 -        { $as_echo "$as_me:$LINENO: checking for magic_load in -lmagic" >&5
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for magic_load in -lmagic" >&5
- $as_echo_n "checking for magic_load in -lmagic... " >&6; }
+-$as_echo_n "checking for magic_load in -lmagic... " >&6; }
 -if test "${ac_cv_lib_magic_magic_load+set}" = set; then
-+if test "${ac_cv_lib_magic_magic_load+set}" = set; then :
++else
++
++                    unset ac_cv_lib_smjs_JS_NewObject
++                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JS_NewObject in -lmozjs" >&5
++$as_echo_n "checking for JS_NewObject in -lmozjs... " >&6; }
++if test "${ac_cv_lib_mozjs_JS_NewObject+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
    ac_check_lib_save_LIBS=$LIBS
- LIBS="-lmagic  $LIBS"
+-LIBS="-lmagic  $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
++LIBS="-lmozjs  $LIBS"
 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -26139,43 +13949,18 @@ return magic_load ();
+@@ -26130,85 +12996,87 @@
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-char magic_load ();
++char JS_NewObject ();
+ int
+ main ()
+ {
+-return magic_load ();
++return JS_NewObject ();
+   ;
    return 0;
  }
  _ACEOF
@@ -24640,14 +34071,15 @@ index f51d803..459bf70 100755
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
+-  ac_cv_lib_magic_magic_load=yes
 +if ac_fn_cxx_try_link "$LINENO"; then :
-   ac_cv_lib_magic_magic_load=yes
++  ac_cv_lib_mozjs_JS_NewObject=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_lib_magic_magic_load=no
-+  ac_cv_lib_magic_magic_load=no
++  ac_cv_lib_mozjs_JS_NewObject=no
  fi
 -
 -rm -rf conftest.dSYM
@@ -24658,51 +34090,109 @@ index f51d803..459bf70 100755
  LIBS=$ac_check_lib_save_LIBS
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_magic_magic_load" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_magic_magic_load" >&5
- $as_echo "$ac_cv_lib_magic_magic_load" >&6; }
+-$as_echo "$ac_cv_lib_magic_magic_load" >&6; }
 -if test "x$ac_cv_lib_magic_magic_load" = x""yes; then
-+if test "x$ac_cv_lib_magic_magic_load" = x""yes; then :
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mozjs_JS_NewObject" >&5
++$as_echo "$ac_cv_lib_mozjs_JS_NewObject" >&6; }
++if test "x$ac_cv_lib_mozjs_JS_NewObject" = x""yes; then :
  
-                 mt_libmagic_libs="-lmagic"
-                 mt_libmagic_ldflags="-L$mt_libmagic_search_libs"
-@@ -26184,12 +13969,10 @@ else
+-                mt_libmagic_libs="-lmagic"
+-                mt_libmagic_ldflags="-L$mt_libmagic_search_libs"
++                            MOZLIB=mozjs
++                            JS_LIBS="-lmozjs"
  
-                 mt_libmagic_library_status=missing
-                 if test "" = "pass"; then
+ else
+ 
+-                mt_libmagic_library_status=missing
+-                if test "" = "pass"; then
 -                    { $as_echo "$as_me:$LINENO: libmagic library not found in requested location $mt_libmagic_search_libs" >&5
-+                    { $as_echo "$as_me:${as_lineno-$LINENO}: libmagic library not found in requested location $mt_libmagic_search_libs" >&5
- $as_echo "$as_me: libmagic library not found in requested location $mt_libmagic_search_libs" >&6;}
-                 else
+-$as_echo "$as_me: libmagic library not found in requested location $mt_libmagic_search_libs" >&6;}
+-                else
 -                    { { $as_echo "$as_me:$LINENO: error: libmagic library not found in requested location $mt_libmagic_search_libs" >&5
 -$as_echo "$as_me: error: libmagic library not found in requested location $mt_libmagic_search_libs" >&2;}
 -   { (exit 1); exit 1; }; }
-+                    as_fn_error $? "libmagic library not found in requested location $mt_libmagic_search_libs" "$LINENO" 5
-                 fi
- 
+-                fi
+-
++                            LDFLAGS="-L$SEARCH_DIR_LIBS $LDFLAGS_SAVE $ADD_PTHREAD_CFLAGS"
++                            unset ac_cv_lib_js_JS_NewObject
++                            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JS_NewObject in -ljs" >&5
++$as_echo_n "checking for JS_NewObject in -ljs... " >&6; }
++if test "${ac_cv_lib_js_JS_NewObject+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-ljs  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
  
-@@ -26197,18 +13980,14 @@ fi
++/* 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 JS_NewObject ();
++int
++main ()
++{
++return JS_NewObject ();
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_cxx_try_link "$LINENO"; then :
++  ac_cv_lib_js_JS_NewObject=yes
++else
++  ac_cv_lib_js_JS_NewObject=no
++fi
++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_js_JS_NewObject" >&5
++$as_echo "$ac_cv_lib_js_JS_NewObject" >&6; }
++if test "x$ac_cv_lib_js_JS_NewObject" = x""yes; then :
  
-     else
-         unset ac_cv_lib_magic_magic_load
+-    else
+-        unset ac_cv_lib_magic_magic_load
 -        { $as_echo "$as_me:$LINENO: checking for magic_load in -lmagic" >&5
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for magic_load in -lmagic" >&5
- $as_echo_n "checking for magic_load in -lmagic... " >&6; }
+-$as_echo_n "checking for magic_load in -lmagic... " >&6; }
 -if test "${ac_cv_lib_magic_magic_load+set}" = set; then
-+if test "${ac_cv_lib_magic_magic_load+set}" = set; then :
++                                    JS_LIBS="-L$SEARCH_DIR_LIBS -ljs"
++                                    MOZLIB=js
++
++else
++
++                                    unset ac_cv_lib_smjs_JS_NewObject
++                                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JS_NewObject in -lsmjs" >&5
++$as_echo_n "checking for JS_NewObject in -lsmjs... " >&6; }
++if test "${ac_cv_lib_smjs_JS_NewObject+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
    ac_check_lib_save_LIBS=$LIBS
- LIBS="-lmagic  $LIBS"
+-LIBS="-lmagic  $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
++LIBS="-lsmjs  $LIBS"
 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -26226,43 +14005,18 @@ return magic_load ();
+@@ -26217,71 +13085,43 @@
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-char magic_load ();
++char JS_NewObject ();
+ int
+ main ()
+ {
+-return magic_load ();
++return JS_NewObject ();
+   ;
    return 0;
  }
  _ACEOF
@@ -24727,14 +34217,15 @@ index f51d803..459bf70 100755
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
+-  ac_cv_lib_magic_magic_load=yes
 +if ac_fn_cxx_try_link "$LINENO"; then :
-   ac_cv_lib_magic_magic_load=yes
++  ac_cv_lib_smjs_JS_NewObject=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_lib_magic_magic_load=no
-+  ac_cv_lib_magic_magic_load=no
++  ac_cv_lib_smjs_JS_NewObject=no
  fi
 -
 -rm -rf conftest.dSYM
@@ -24745,36 +34236,54 @@ index f51d803..459bf70 100755
  LIBS=$ac_check_lib_save_LIBS
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_magic_magic_load" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_magic_magic_load" >&5
- $as_echo "$ac_cv_lib_magic_magic_load" >&6; }
+-$as_echo "$ac_cv_lib_magic_magic_load" >&6; }
 -if test "x$ac_cv_lib_magic_magic_load" = x""yes; then
-+if test "x$ac_cv_lib_magic_magic_load" = x""yes; then :
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_smjs_JS_NewObject" >&5
++$as_echo "$ac_cv_lib_smjs_JS_NewObject" >&6; }
++if test "x$ac_cv_lib_smjs_JS_NewObject" = x""yes; then :
  
-                 mt_libmagic_libs="-lmagic"
+-                mt_libmagic_libs="-lmagic"
++                                            JS_LIBS="-L$SEARCH_DIR_LIBS -lsmjs"
++                                            MOZLIB=smjs
  
-@@ -26270,18 +14024,14 @@ else
+ else
  
-                 LDFLAGS="$LDFLAGS -L$MT_SEARCHPATH_LIBS"
-                 unset ac_cv_lib_magic_magic_load
+-                LDFLAGS="$LDFLAGS -L$MT_SEARCHPATH_LIBS"
+-                unset ac_cv_lib_magic_magic_load
 -                { $as_echo "$as_me:$LINENO: checking for magic_load in -lmagic" >&5
-+                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for magic_load in -lmagic" >&5
- $as_echo_n "checking for magic_load in -lmagic... " >&6; }
+-$as_echo_n "checking for magic_load in -lmagic... " >&6; }
 -if test "${ac_cv_lib_magic_magic_load+set}" = set; then
-+if test "${ac_cv_lib_magic_magic_load+set}" = set; then :
++                                            LDFLAGS="-L$SEARCH_DIR_LIBS $LDFLAGS_SAVE -lmozjs"
++                                            unset ac_cv_lib_mozjs_JS_NewObject
++                                            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JS_NewObject in -lmozjs" >&5
++$as_echo_n "checking for JS_NewObject in -lmozjs... " >&6; }
++if test "${ac_cv_lib_mozjs_JS_NewObject+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
    ac_check_lib_save_LIBS=$LIBS
- LIBS="-lmagic  $LIBS"
+-LIBS="-lmagic  $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
++LIBS="-lmozjs  $LIBS"
 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -26299,43 +14049,18 @@ return magic_load ();
+@@ -26290,59 +13130,52 @@
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-char magic_load ();
++char JS_NewObject ();
+ int
+ main ()
+ {
+-return magic_load ();
++return JS_NewObject ();
+   ;
    return 0;
  }
  _ACEOF
@@ -24799,14 +34308,15 @@ index f51d803..459bf70 100755
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
+-  ac_cv_lib_magic_magic_load=yes
 +if ac_fn_cxx_try_link "$LINENO"; then :
-   ac_cv_lib_magic_magic_load=yes
++  ac_cv_lib_mozjs_JS_NewObject=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_lib_magic_magic_load=no
-+  ac_cv_lib_magic_magic_load=no
++  ac_cv_lib_mozjs_JS_NewObject=no
  fi
 -
 -rm -rf conftest.dSYM
@@ -24817,34 +34327,181 @@ index f51d803..459bf70 100755
  LIBS=$ac_check_lib_save_LIBS
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_magic_magic_load" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_magic_magic_load" >&5
- $as_echo "$ac_cv_lib_magic_magic_load" >&6; }
+-$as_echo "$ac_cv_lib_magic_magic_load" >&6; }
 -if test "x$ac_cv_lib_magic_magic_load" = x""yes; then
-+if test "x$ac_cv_lib_magic_magic_load" = x""yes; then :
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mozjs_JS_NewObject" >&5
++$as_echo "$ac_cv_lib_mozjs_JS_NewObject" >&6; }
++if test "x$ac_cv_lib_mozjs_JS_NewObject" = x""yes; then :
  
-                         mt_libmagic_libs="-lmagic"
-                         mt_libmagic_ldflags="-L$MT_SEARCHPATH_LIBS"
-@@ -26378,9 +14103,7 @@ fi
+-                        mt_libmagic_libs="-lmagic"
+-                        mt_libmagic_ldflags="-L$MT_SEARCHPATH_LIBS"
++                                                    JS_LIBS="-L$SEARCH_DIR_LIBS -lmozjs"
++                                                    MOZLIB=mozjs
  
-     if test "x$mt_libmagic_status" = xyes; then
+ else
+ 
+-                        mt_libmagic_library_status=missing
++                                                    JS_OK=missing
++                                                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: libjs/libsmjs link failed" >&5
++$as_echo "libjs/libsmjs link failed" >&6; }
++
++
++fi
++
++
++
++fi
++
++
++
++fi
++
++
++
++fi
++
+ 
+ 
+ fi
+@@ -26352,54 +13185,106 @@
+ fi
+ 
+     fi
++fi
++if test "x$JS_OK" = xyes; then
+ 
+-    if test "x$mt_libmagic_library_status" != xyes; then
+-        mt_libmagic_libs=""
+-        mt_libmagic_ldflags=""
++$as_echo "#define HAVE_JS 1" >>confdefs.h
++
++
++
++
++    LDFLAGS="$LDFLAGS $JS_LIBS"
++    CFLAGS="$CFLAGS $JS_CXXFLAGS"
++    CXXFLAGS="$CXXFLAGS $JS_CXXFLAGS"
++
++    as_ac_Lib=`$as_echo "ac_cv_lib_$MOZLIB''_JS_ClearContextThread" | $as_tr_sh`
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for JS_ClearContextThread in -l$MOZLIB" >&5
++$as_echo_n "checking for JS_ClearContextThread in -l$MOZLIB... " >&6; }
++if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-l$MOZLIB  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++
++/* Override any GCC internal prototype to avoid an error.
++   Use char because int might match the return type of a GCC
++   builtin and then its argument prototype would still apply.  */
++#ifdef __cplusplus
++extern "C"
++#endif
++char JS_ClearContextThread ();
++int
++main ()
++{
++return JS_ClearContextThread ();
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_cxx_try_link "$LINENO"; then :
++  eval "$as_ac_Lib=yes"
++else
++  eval "$as_ac_Lib=no"
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++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 :
++
++
++$as_echo "#define JS_THREADSAFE 1" >>confdefs.h
++
++
++fi
++
++else
++    if test "x$JS_EN" = xyes; then
++        as_fn_error $? "unable to configure libjs support" "$LINENO" 5
+     fi
++fi
++
++CXXFLAGS="$CXXFLAGS_SAVE"
++CPPFLAGS="$CPPFLAGS_SAVE"
++LDFLAGS="$LDFLAGS_SAVE"
+ 
+-    LIBS=$LIBS_SAVE
+-    LDFLAGS=$LDFLAGS_SAVE
+-    CFLAGS=$CFLAGS_SAVE
+-    CXXFLAGS=$CXXFLAGS_SAVE
+-    CPPFLAGS=$CPPFLAGS_SAVE
++########### libmagic
+ 
+-        mt_libmagic_package_status=${mt_libmagic_library_status}
+-    fi
+ 
+-    if test "x$mt_libmagic_package_status" = xyes; then
+-        LIBMAGIC_CFLAGS=${mt_libmagic_cxxflags}
+-        LIBMAGIC_LIBS=${mt_libmagic_libs}
+-        LIBMAGIC_LDFLAGS=${mt_libmagic_ldflags}
++    mt_libmagic_option_enabled=
++    mt_libmagic_option_requested=no
++    if test "xdisable" = xdisable; then
++        mt_libmagic_option_enabled=yes
++    else
++        mt_libmagic_option_enabled=no
+     fi
+ 
+-        mt_libmagic_status=${mt_libmagic_package_status}
+-    fi
++    # Check whether --enable-libmagic was given.
++if test "${enable_libmagic+set}" = set; then :
++  enableval=$enable_libmagic;
++            mt_libmagic_option_enabled=$enableval
++            mt_libmagic_option_requested=yes
+ 
+-    if test "x$mt_libmagic_status" = xyes; then
  
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_LIBMAGIC 1
 -_ACEOF
-+$as_echo "#define HAVE_LIBMAGIC 1" >>confdefs.h
++fi
  
-     fi
+-    fi
  
-@@ -26398,7 +14121,7 @@ _ACEOF
-         else
-             LDFLAGS="$LDFLAGS $ZLIB_LDFLAGS"
-             LIBS="$LIBS $ZLIB_LIBS"
+-    LIBMAGIC_STATUS=${mt_libmagic_status}
++    LIBMAGIC_OPTION_ENABLED=${mt_libmagic_option_enabled}
++    LIBMAGIC_OPTION_REQUESTED=${mt_libmagic_option_requested}
+ 
+ 
+ 
+ 
++    if test "x${mt_libmagic_option_enabled}" = xyes; then :
+ 
++fi
+ 
+-            if test "x$LIBMAGIC_STATUS" = xyes; then
+-                LIBMAGIC_LIBS="$LIBMAGIC_LIBS $ZLIB_LIBS"
+-                LIBMAGIC_LDFLAGS="$LIBMAGIC_LDFLAGS $ZLIB_LDFLAGS"
+-            fi
+-        else
+-            LDFLAGS="$LDFLAGS $ZLIB_LDFLAGS"
+-            LIBS="$LIBS $ZLIB_LIBS"
 -            { $as_echo "$as_me:$LINENO: retrying libmagic check with zlib flags" >&5
-+            { $as_echo "$as_me:${as_lineno-$LINENO}: retrying libmagic check with zlib flags" >&5
- $as_echo "$as_me: retrying libmagic check with zlib flags" >&6;}
+-$as_echo "$as_me: retrying libmagic check with zlib flags" >&6;}
++if test "x$LIBMAGIC_OPTION_ENABLED" = xyes; then
  
      mt_libmagic_status=yes
-@@ -26416,10 +14139,10 @@ $as_echo "$as_me: retrying libmagic check with zlib flags" >&6;}
+ 
+@@ -26416,10 +13301,10 @@
  
  
  # Check whether --with-libmagic-h was given.
@@ -24857,7 +34514,7 @@ index f51d803..459bf70 100755
  $as_echo "$as_me: Will search for libmagic headers in $withval" >&6;}
  
  
-@@ -26432,145 +14155,8 @@ fi
+@@ -26432,145 +13317,8 @@
          CXXFLAGS="$CXXFLAGS -I${mt_libmagic_search_headers}"
          CPPFLAGS="$CPPFLAGS -I${mt_libmagic_search_headers}"
          as_ac_Header=`$as_echo "ac_cv_header_$mt_libmagic_search_headers/magic.h" | $as_tr_sh`
@@ -25005,7 +34662,7 @@ index f51d803..459bf70 100755
  
                  mt_libmagic_cxxflags="-I${mt_libmagic_search_headers}"
  
-@@ -26578,12 +14164,10 @@ else
+@@ -26578,12 +13326,10 @@
  
                  mt_libmagic_header_status=missing
                  if test "" = "pass"; then
@@ -25020,7 +34677,7 @@ index f51d803..459bf70 100755
                  fi
  
  
-@@ -26592,140 +14176,9 @@ fi
+@@ -26592,140 +13338,9 @@
  
      else
          unset ac_cv_header_magic_h
@@ -25163,7 +34820,7 @@ index f51d803..459bf70 100755
  else
  
                  CFLAGS="$CFLAGS -I$MT_SEARCHPATH_HEADERS"
-@@ -26733,145 +14186,8 @@ else
+@@ -26733,145 +13348,8 @@
                  CPPFLAGS="$CPPFLAGS -I$MT_SEARCHPATH_HEADERS"
                  unset ac_cv_header_magic_h
                  as_ac_Header=`$as_echo "ac_cv_header_$MT_SEARCHPATH_HEADERS/magic.h" | $as_tr_sh`
@@ -25311,7 +34968,7 @@ index f51d803..459bf70 100755
  
                          mt_libmagic_cxxflags="-I${MT_SEARCHPATH_HEADERS}"
  
-@@ -26915,10 +14231,10 @@ fi
+@@ -26915,10 +13393,10 @@
  
  
  # Check whether --with-libmagic-libs was given.
@@ -25324,7 +34981,7 @@ index f51d803..459bf70 100755
  $as_echo "$as_me: Will search for libmagic libs in $withval" >&6;}
  
  
-@@ -26928,18 +14244,14 @@ fi
+@@ -26928,18 +13406,14 @@
      if test "$mt_libmagic_search_libs" ; then
          unset ac_cv_lib_magic_magic_load
          LDFLAGS="$LDFLAGS -L$mt_libmagic_search_libs"
@@ -25346,7 +35003,7 @@ index f51d803..459bf70 100755
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -26957,43 +14269,18 @@ return magic_load ();
+@@ -26957,43 +13431,18 @@
    return 0;
  }
  _ACEOF
@@ -25396,7 +35053,7 @@ index f51d803..459bf70 100755
  
                  mt_libmagic_libs="-lmagic"
                  mt_libmagic_ldflags="-L$mt_libmagic_search_libs"
-@@ -27002,12 +14289,10 @@ else
+@@ -27002,12 +13451,10 @@
  
                  mt_libmagic_library_status=missing
                  if test "" = "pass"; then
@@ -25411,7 +35068,7 @@ index f51d803..459bf70 100755
                  fi
  
  
-@@ -27015,18 +14300,14 @@ fi
+@@ -27015,18 +13462,14 @@
  
      else
          unset ac_cv_lib_magic_magic_load
@@ -25433,7 +35090,7 @@ index f51d803..459bf70 100755
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -27044,43 +14325,18 @@ return magic_load ();
+@@ -27044,43 +13487,18 @@
    return 0;
  }
  _ACEOF
@@ -25460,11 +35117,12 @@ index f51d803..459bf70 100755
 -       }; then
 +if ac_fn_cxx_try_link "$LINENO"; then :
    ac_cv_lib_magic_magic_load=yes
- else
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_lib_magic_magic_load=no
++else
 +  ac_cv_lib_magic_magic_load=no
  fi
 -
@@ -25483,7 +35141,7 @@ index f51d803..459bf70 100755
  
                  mt_libmagic_libs="-lmagic"
  
-@@ -27088,18 +14344,14 @@ else
+@@ -27088,18 +13506,14 @@
  
                  LDFLAGS="$LDFLAGS -L$MT_SEARCHPATH_LIBS"
                  unset ac_cv_lib_magic_magic_load
@@ -25505,7 +35163,7 @@ index f51d803..459bf70 100755
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -27117,43 +14369,18 @@ return magic_load ();
+@@ -27117,43 +13531,18 @@
    return 0;
  }
  _ACEOF
@@ -25555,7 +35213,7 @@ index f51d803..459bf70 100755
  
                          mt_libmagic_libs="-lmagic"
                          mt_libmagic_ldflags="-L$MT_SEARCHPATH_LIBS"
-@@ -27196,9 +14423,7 @@ fi
+@@ -27196,9 +13585,7 @@
  
      if test "x$mt_libmagic_status" = xyes; then
  
@@ -25566,37 +35224,98 @@ index f51d803..459bf70 100755
  
      fi
  
-@@ -27221,7 +14446,7 @@ _ACEOF
- fi
+@@ -27209,222 +13596,218 @@
+ 
+ 
+ 
+-            if test "x$LIBMAGIC_STATUS" = xyes; then
+-                LIBMAGIC_LIBS="$LIBMAGIC_LIBS $ZLIB_LIBS"
+-                LIBMAGIC_LDFLAGS="$LIBMAGIC_LDFLAGS $ZLIB_LDFLAGS"
+-            fi
+-        fi
  
- if test "x$LIBMAGIC_STATUS" = xyes; then
++    if test "x$LIBMAGIC_STATUS" != xyes; then
++        if test "x$ZLIB_STATUS" != xyes; then
+ 
+ 
+-    fi
+-fi
++    mt_zlib_arg_default=yes
++    mt_zlib_library_status=yes
+ 
+-if test "x$LIBMAGIC_STATUS" = xyes; then
 -    { $as_echo "$as_me:$LINENO: checking if libmagic is broken (Slackware check)" >&5
-+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libmagic is broken (Slackware check)" >&5
- $as_echo_n "checking if libmagic is broken (Slackware check)... " >&6; }
-     CFLAGS="$CFLAGS $LIBMAGIC_CXXLAGS"
-     CXXFLAGS="$CXXFLAGS $LIBMAGIC_CFLAGS"
-@@ -27233,17 +14458,13 @@ 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
+-$as_echo_n "checking if libmagic is broken (Slackware check)... " >&6; }
+-    CFLAGS="$CFLAGS $LIBMAGIC_CXXLAGS"
+-    CXXFLAGS="$CXXFLAGS $LIBMAGIC_CFLAGS"
+-    LDFLAGS="$LDFLAGS $LIBMAGIC_LDFLAGS $LIBMAGIC_LIBS"
++    LIBS_SAVE=$LIBS
++    LDFLAGS_SAVE=$LDFLAGS
++    CFLAGS_SAVE=$CFLAGS
++    CXXFLAGS_SAVE=$CXXFLAGS
++    CPPFLAGS_SAVE=$CPPFLAGS
+ 
+-    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 "$cross_compiling" = yes; then
-+    if test "$cross_compiling" = yes; then :
++# Check whether --with-zlib-libs was given.
++if test "${with_zlib_libs+set}" = set; then :
++  withval=$with_zlib_libs;
++            mt_zlib_search_libs="$withval"
++            { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for zlib libs in $withval" >&5
++$as_echo "$as_me: Will search for zlib libs in $withval" >&6;}
++
++
++fi
  
 -            { $as_echo "$as_me:$LINENO: result: passing for cross compiling" >&5
-+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: passing for cross compiling" >&5
- $as_echo "passing for cross compiling" >&6; }
+-$as_echo "passing for cross compiling" >&6; }
  
++    if test "$mt_zlib_search_libs" ; then
++        unset ac_cv_lib_z_compress
++        LDFLAGS="$LDFLAGS -L$mt_zlib_search_libs"
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
++$as_echo_n "checking for compress in -lz... " >&6; }
++if test "${ac_cv_lib_z_compress+set}" = set; 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
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-lz  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
-  #include <magic.h>
+- #include <magic.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 compress ();
  int
-@@ -27263,52 +14484,25 @@ main ()
+ main ()
+ {
+-
+-            struct magic_set *ms;
+-            ms = magic_open(MAGIC_MIME);
+-            if (ms == 0)
+-                return 0;
+-            magic_load(ms, 0);
+-            magic_close(ms);
+-            return 0;
+-
+-
++return compress ();
+   ;
    return 0;
  }
  _ACEOF
@@ -25622,286 +35341,482 @@ index f51d803..459bf70 100755
 -  ac_status=$?
 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
 -  (exit $ac_status); }; }; then
-+if ac_fn_c_try_run "$LINENO"; then :
- 
+-
 -            { $as_echo "$as_me:$LINENO: result: no" >&5
-+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
- $as_echo "no" >&6; };
- 
+-$as_echo "no" >&6; };
+-
++if ac_fn_cxx_try_link "$LINENO"; then :
++  ac_cv_lib_z_compress=yes
  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
- 
+-
 -( exit $ac_status )
 -
 -            { $as_echo "$as_me:$LINENO: result: yes" >&5
-+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
- $as_echo "yes" >&6; }
-             MAGIC_OK=broken
+-$as_echo "yes" >&6; }
+-            MAGIC_OK=broken
 -            { $as_echo "$as_me:$LINENO: WARNING: your magic library is broken, if you are using Slackware install the 'file' package manually" >&5
-+            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: your magic library is broken, if you are using Slackware install the 'file' package manually" >&5
- $as_echo "$as_me: WARNING: your magic library is broken, if you are using Slackware install the 'file' package manually" >&2;}
- 
+-$as_echo "$as_me: WARNING: your magic library is broken, if you are using Slackware install the 'file' package manually" >&2;}
+-
++  ac_cv_lib_z_compress=no
  fi
 -rm -rf conftest.dSYM
 -rm -f core *.core core.conftest.* 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
++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_z_compress" >&5
++$as_echo "$ac_cv_lib_z_compress" >&6; }
++if test "x$ac_cv_lib_z_compress" = x""yes; then :
  
++                mt_zlib_libs="-lz"
++                mt_zlib_ldflags="-L$mt_zlib_search_libs"
  
--
-    ac_ext=cpp
- ac_cpp='$CXXCPP $CPPFLAGS'
- ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-@@ -27319,16 +14513,12 @@ fi
++else
++
++                mt_zlib_library_status=missing
++                if test "" = "pass"; then
++                    { $as_echo "$as_me:${as_lineno-$LINENO}: zlib library not found in requested location $mt_zlib_search_libs" >&5
++$as_echo "$as_me: zlib library not found in requested location $mt_zlib_search_libs" >&6;}
++                else
++                    as_fn_error $? "zlib library not found in requested location $mt_zlib_search_libs" "$LINENO" 5
++                fi
+ 
+-   ac_ext=cpp
+-ac_cpp='$CXXCPP $CPPFLAGS'
+-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
  
- if test "x$LIBMAGIC_STATUS" = xyes; then
+ fi
+ 
+-if test "x$LIBMAGIC_STATUS" = xyes; then
++    else
++        unset ac_cv_lib_z_compress
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
++$as_echo_n "checking for compress in -lz... " >&6; }
++if test "${ac_cv_lib_z_compress+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-lz  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
  
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_MAGIC 1
--_ACEOF
-+$as_echo "#define HAVE_MAGIC 1" >>confdefs.h
- 
++/* Override any GCC internal prototype to avoid an error.
++   Use char because int might match the return type of a GCC
++   builtin and then its argument prototype would still apply.  */
++#ifdef __cplusplus
++extern "C"
++#endif
++char compress ();
++int
++main ()
++{
++return compress ();
++  ;
++  return 0;
++}
+ _ACEOF
+-
++if ac_fn_cxx_try_link "$LINENO"; then :
++  ac_cv_lib_z_compress=yes
  else
-     if (test "x$LIBMAGIC_OPTION_REQUESTED" = xyes) &&
-        (test "x$LIBMAGIC_OPTION_ENABLED" = xyes); then
+-    if (test "x$LIBMAGIC_OPTION_REQUESTED" = xyes) &&
+-       (test "x$LIBMAGIC_OPTION_ENABLED" = xyes); then
 -        { { $as_echo "$as_me:$LINENO: error: unable to configure libmagic support" >&5
 -$as_echo "$as_me: error: unable to configure libmagic support" >&2;}
 -   { (exit 1); exit 1; }; }
-+        as_fn_error $? "unable to configure libmagic support" "$LINENO" 5
-     fi
+-    fi
++  ac_cv_lib_z_compress=no
  fi
- 
-@@ -27353,7 +14543,7 @@ ID3LIB_STATUS=
-     fi
- 
-     # Check whether --enable-id3lib was given.
+-
+-CFLAGS="$CFLAGS_SAVE"
+-CXXFLAGS="$CXXFLAGS_SAVE"
+-CPPFLAFS="$CPPFLAFS_SAVE"
+-LDFLGAS="$LDFLAGS_SAVE"
+-
+-######### taglib or id3lib selection
+-
+-TAGLIB_STATUS=
+-ID3LIB_STATUS=
+-
+-
+-
+-    mt_id3lib_option_enabled=
+-    mt_id3lib_option_requested=no
+-    if test "xdisable" = xdisable; then
+-        mt_id3lib_option_enabled=yes
+-    else
+-        mt_id3lib_option_enabled=no
+-    fi
+-
+-    # Check whether --enable-id3lib was given.
 -if test "${enable_id3lib+set}" = set; then
-+if test "${enable_id3lib+set}" = set; then :
-   enableval=$enable_id3lib;
-             mt_id3lib_option_enabled=$enableval
-             mt_id3lib_option_requested=yes
-@@ -27368,7 +14558,9 @@ fi
+-  enableval=$enable_id3lib;
+-            mt_id3lib_option_enabled=$enableval
+-            mt_id3lib_option_requested=yes
+-
+-
++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_z_compress" >&5
++$as_echo "$ac_cv_lib_z_compress" >&6; }
++if test "x$ac_cv_lib_z_compress" = x""yes; then :
  
++                mt_zlib_libs="-lz"
  
+-    ID3LIB_OPTION_ENABLED=${mt_id3lib_option_enabled}
+-    ID3LIB_OPTION_REQUESTED=${mt_id3lib_option_requested}
+-
+-
+-
+-
++else
  
-+    if test "x${mt_id3lib_option_enabled}" = xyes; then :
++                LDFLAGS="$LDFLAGS -L$MT_SEARCHPATH_LIBS"
++                unset ac_cv_lib_z_compress
++                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
++$as_echo_n "checking for compress in -lz... " >&6; }
++if test "${ac_cv_lib_z_compress+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-lz  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
  
++/* Override any GCC internal prototype to avoid an error.
++   Use char because int might match the return type of a GCC
++   builtin and then its argument prototype would still apply.  */
++#ifdef __cplusplus
++extern "C"
++#endif
++char compress ();
++int
++main ()
++{
++return compress ();
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_cxx_try_link "$LINENO"; then :
++  ac_cv_lib_z_compress=yes
++else
++  ac_cv_lib_z_compress=no
 +fi
++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_z_compress" >&5
++$as_echo "$ac_cv_lib_z_compress" >&6; }
++if test "x$ac_cv_lib_z_compress" = x""yes; then :
  
++                        mt_zlib_libs="-lz"
++                        mt_zlib_ldflags="-L$MT_SEARCHPATH_LIBS"
  
+-    mt_taglib_option_enabled=
+-    mt_taglib_option_requested=no
+-    if test "xdisable" = xdisable; then
+-        mt_taglib_option_enabled=yes
+-    else
+-        mt_taglib_option_enabled=no
+-    fi
++else
  
-@@ -27381,7 +14573,7 @@ fi
-     fi
- 
-     # Check whether --enable-taglib was given.
+-    # Check whether --enable-taglib was given.
 -if test "${enable_taglib+set}" = set; then
-+if test "${enable_taglib+set}" = set; then :
-   enableval=$enable_taglib;
-             mt_taglib_option_enabled=$enableval
-             mt_taglib_option_requested=yes
-@@ -27396,23 +14588,23 @@ fi
+-  enableval=$enable_taglib;
+-            mt_taglib_option_enabled=$enableval
+-            mt_taglib_option_requested=yes
++                        mt_zlib_library_status=missing
+ 
  
+ fi
  
  
-+    if test "x${mt_taglib_option_enabled}" = xyes; then :
+-    TAGLIB_OPTION_ENABLED=${mt_taglib_option_enabled}
+-    TAGLIB_OPTION_REQUESTED=${mt_taglib_option_requested}
+-
+-
+-
  
 +fi
  
- if ((test "x$TAGLIB_OPTION_ENABLED" = xno) && (test "x$ID3LIB_OPTION_ENABLED" = xyes)) ; then
-     TAGLIB_STATUS=disabled
-     TAGLIB_OPTION_ENABLED=no
++    fi
+ 
+-if ((test "x$TAGLIB_OPTION_ENABLED" = xno) && (test "x$ID3LIB_OPTION_ENABLED" = xyes)) ; then
+-    TAGLIB_STATUS=disabled
+-    TAGLIB_OPTION_ENABLED=no
 -    { $as_echo "$as_me:$LINENO: WARNING: taglib disabled" >&5
-+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: taglib disabled" >&5
- $as_echo "$as_me: WARNING: taglib disabled" >&2;}
- elif ((test "x$TAGLIB_OPTION_ENABLED" = xyes) && (test "x$ID3LIB_OPTION_ENABLED" = xno)) ; then
-     ID3LIB_STATUS=disabled
-     ID3LIB_OPTION_ENABLED=no
+-$as_echo "$as_me: WARNING: taglib disabled" >&2;}
+-elif ((test "x$TAGLIB_OPTION_ENABLED" = xyes) && (test "x$ID3LIB_OPTION_ENABLED" = xno)) ; then
+-    ID3LIB_STATUS=disabled
+-    ID3LIB_OPTION_ENABLED=no
 -    { $as_echo "$as_me:$LINENO: WARNING: id3lib disabled" >&5
-+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: id3lib disabled" >&5
- $as_echo "$as_me: WARNING: id3lib disabled" >&2;}
- elif ((test "x$TAGLIB_OPTION_ENABLED" = xyes) && (test "x$ID3LIB_OPTION_ENABLED" = xyes)) ; then
-     if ((test "x$TAGLIB_OPTION_REQUESTED" = xyes) && (test "x$ID3LIB_OPTION_REQUESTED" = xyes)); then
+-$as_echo "$as_me: WARNING: id3lib disabled" >&2;}
+-elif ((test "x$TAGLIB_OPTION_ENABLED" = xyes) && (test "x$ID3LIB_OPTION_ENABLED" = xyes)) ; then
+-    if ((test "x$TAGLIB_OPTION_REQUESTED" = xyes) && (test "x$ID3LIB_OPTION_REQUESTED" = xyes)); then
 -        { { $as_echo "$as_me:$LINENO: error: Please select either taglib or id3lib, but not both." >&5
 -$as_echo "$as_me: error: Please select either taglib or id3lib, but not both." >&2;}
 -   { (exit 1); exit 1; }; }
-+        as_fn_error $? "Please select either taglib or id3lib, but not both." "$LINENO" 5
-     elif ((test "x$TAGLIB_OPTION_REQUESTED" = xyes) && (test "x$ID3LIB_OPTION_REQUESTED" != xyes)); then
-         ID3LIB_OPTION_ENABLED=no
-     elif ((test "x$TAGLIB_OPTION_REQUESTED" != xyes) && (test "x$ID3LIB_OPTION_REQUESTED" = xyes)); then
-@@ -27438,10 +14630,10 @@ if test "x$TAGLIB_OPTION_ENABLED" = xyes; then
+-    elif ((test "x$TAGLIB_OPTION_REQUESTED" = xyes) && (test "x$ID3LIB_OPTION_REQUESTED" != xyes)); then
+-        ID3LIB_OPTION_ENABLED=no
+-    elif ((test "x$TAGLIB_OPTION_REQUESTED" != xyes) && (test "x$ID3LIB_OPTION_REQUESTED" = xyes)); then
+-        TAGLIB_OPTION_ENABLED=no
++    if test "x$mt_zlib_library_status" != xyes; then
++        mt_zlib_libs=""
++        mt_zlib_ldflags=""
+     fi
+-fi
  
+-if test "x$TAGLIB_OPTION_ENABLED" = xyes; then
++    LIBS=$LIBS_SAVE
++    LDFLAGS=$LDFLAGS_SAVE
++    CFLAGS=$CFLAGS_SAVE
++    CXXFLAGS=$CXXFLAGS_SAVE
++    CPPFLAGS=$CPPFLAGS_SAVE
++
  
- # Check whether --with-taglib-cfg was given.
+-    mt_taglib_status=yes
++    ZLIB_LIBS=${mt_zlib_libs}
++    ZLIB_LDFLAGS=${mt_zlib_ldflags}
++    ZLIB_STATUS=${mt_zlib_library_status}
++
++
++
++
++
++            LDFLAGS="$LDFLAGS $ZLIB_LDFLAGS"
++            LIBS="$LIBS $ZLIB_LIBS"
++            { $as_echo "$as_me:${as_lineno-$LINENO}: retrying libmagic check with zlib flags" >&5
++$as_echo "$as_me: retrying libmagic check with zlib flags" >&6;}
++
++    mt_libmagic_status=yes
++
++    if test "x$mt_libmagic_status" = xyes; then
+ 
+-    if test "x$mt_taglib_status" = xyes; then
+ 
+     LIBS_SAVE=$LIBS
+     LDFLAGS_SAVE=$LDFLAGS
+@@ -27432,359 +13815,124 @@
+     CXXFLAGS_SAVE=$CXXFLAGS
+     CPPFLAGS_SAVE=$CPPFLAGS
+ 
+-
+-    mt_taglib_config=none
+-    mt_taglib_package_status=yes
++    mt_libmagic_header_status=yes
+ 
+ 
+-# Check whether --with-taglib-cfg was given.
 -if test "${with_taglib_cfg+set}" = set; then
-+if test "${with_taglib_cfg+set}" = set; then :
-   withval=$with_taglib_cfg;
-             mt_taglib_search_config="$withval"
+-  withval=$with_taglib_cfg;
+-            mt_taglib_search_config="$withval"
 -            { $as_echo "$as_me:$LINENO: Will search for taglib config in $withval" >&5
-+            { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for taglib config in $withval" >&5
- $as_echo "$as_me: Will search for taglib config in $withval" >&6;}
+-$as_echo "$as_me: Will search for taglib config in $withval" >&6;}
++# Check whether --with-libmagic-h was given.
++if test "${with_libmagic_h+set}" = set; then :
++  withval=$with_libmagic_h;
++            mt_libmagic_search_headers="$withval"
++            { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for libmagic headers in $withval" >&5
++$as_echo "$as_me: Will search for libmagic headers in $withval" >&6;}
  
  
-@@ -27449,28 +14641,24 @@ fi
+ fi
  
  
-     if test -n "$mt_taglib_search_config"; then
+-    if test -n "$mt_taglib_search_config"; then
 -        { $as_echo "$as_me:$LINENO: You specified ${mt_taglib_search_config} for taglib-config" >&5
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: You specified ${mt_taglib_search_config} for taglib-config" >&5
- $as_echo "$as_me: You specified ${mt_taglib_search_config} for taglib-config" >&6;}
-         if test -f "$mt_taglib_search_config"; then
-             mt_taglib_config=${mt_taglib_search_config}
-         else
+-$as_echo "$as_me: You specified ${mt_taglib_search_config} for taglib-config" >&6;}
+-        if test -f "$mt_taglib_search_config"; then
+-            mt_taglib_config=${mt_taglib_search_config}
+-        else
 -            { { $as_echo "$as_me:$LINENO: error: ${mt_taglib_search_config} not found" >&5
 -$as_echo "$as_me: error: ${mt_taglib_search_config} not found" >&2;}
 -   { (exit 1); exit 1; }; }
-+            as_fn_error $? "${mt_taglib_search_config} not found" "$LINENO" 5
-         fi
+-        fi
++    if test "$mt_libmagic_search_headers" ; then
++        unset ac_cv_header_magic_h
++        CFLAGS="$CFLAGS -I${mt_libmagic_search_headers}"
++        CXXFLAGS="$CXXFLAGS -I${mt_libmagic_search_headers}"
++        CPPFLAGS="$CPPFLAGS -I${mt_libmagic_search_headers}"
++        as_ac_Header=`$as_echo "ac_cv_header_$mt_libmagic_search_headers/magic.h" | $as_tr_sh`
++ac_fn_cxx_check_header_mongrel "$LINENO" "$mt_libmagic_search_headers/magic.h" "$as_ac_Header" "$ac_includes_default"
++if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
  
-         mt_taglib_version=`${mt_taglib_config} --version 2>/dev/null`
-         if test -z "$mt_taglib_version"; then
+-        mt_taglib_version=`${mt_taglib_config} --version 2>/dev/null`
+-        if test -z "$mt_taglib_version"; then
 -            { { $as_echo "$as_me:$LINENO: error: ${mt_taglib_search_config} could not be executed or returned invalid values" >&5
 -$as_echo "$as_me: error: ${mt_taglib_search_config} could not be executed or returned invalid values" >&2;}
 -   { (exit 1); exit 1; }; }
-+            as_fn_error $? "${mt_taglib_search_config} could not be executed or returned invalid values" "$LINENO" 5
-         fi
-     else
-         # Extract the first word of "taglib-config", so it can be a program name with args.
- set dummy taglib-config; ac_word=$2
+-        fi
+-    else
+-        # Extract the first word of "taglib-config", so it can be a program name with args.
+-set dummy taglib-config; ac_word=$2
 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
- $as_echo_n "checking for $ac_word... " >&6; }
+-$as_echo_n "checking for $ac_word... " >&6; }
 -if test "${ac_cv_path_mt_taglib_config+set}" = set; then
-+if test "${ac_cv_path_mt_taglib_config+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
-   case $mt_taglib_config in
-@@ -27483,14 +14671,14 @@ for as_dir in $PATH
- do
-   IFS=$as_save_IFS
-   test -z "$as_dir" && as_dir=.
+-  $as_echo_n "(cached) " >&6
+-else
+-  case $mt_taglib_config in
+-  [\\/]* | ?:[\\/]*)
+-  ac_cv_path_mt_taglib_config="$mt_taglib_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
-+    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_mt_taglib_config="$as_dir/$ac_word$ac_exec_ext"
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+-    ac_cv_path_mt_taglib_config="$as_dir/$ac_word$ac_exec_ext"
 -    $as_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
+-    break 2
+-  fi
 -done
-+  done
- IFS=$as_save_IFS
+-done
+-IFS=$as_save_IFS
++                mt_libmagic_cxxflags="-I${mt_libmagic_search_headers}"
  
-   test -z "$ac_cv_path_mt_taglib_config" && ac_cv_path_mt_taglib_config="none"
-@@ -27499,10 +14687,10 @@ esac
- fi
- mt_taglib_config=$ac_cv_path_mt_taglib_config
- if test -n "$mt_taglib_config"; then
+-  test -z "$ac_cv_path_mt_taglib_config" && ac_cv_path_mt_taglib_config="none"
+-  ;;
+-esac
+-fi
+-mt_taglib_config=$ac_cv_path_mt_taglib_config
+-if test -n "$mt_taglib_config"; then
 -  { $as_echo "$as_me:$LINENO: result: $mt_taglib_config" >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $mt_taglib_config" >&5
- $as_echo "$mt_taglib_config" >&6; }
+-$as_echo "$mt_taglib_config" >&6; }
  else
 -  { $as_echo "$as_me:$LINENO: result: no" >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
- $as_echo "no" >&6; }
- fi
+-$as_echo "no" >&6; }
+-fi
+ 
++                mt_libmagic_header_status=missing
++                if test "" = "pass"; then
++                    { $as_echo "$as_me:${as_lineno-$LINENO}: libmagic headers not found in requested location $mt_libmagic_search_headers" >&5
++$as_echo "$as_me: libmagic headers not found in requested location $mt_libmagic_search_headers" >&6;}
++                else
++                    as_fn_error $? "libmagic headers not found in requested location $mt_libmagic_search_headers" "$LINENO" 5
++                fi
  
-@@ -27511,9 +14699,9 @@ fi
-             unset ac_cv_path_mt_taglib_config
-             # Extract the first word of "taglib-config", so it can be a program name with args.
- set dummy taglib-config; ac_word=$2
+-        if test "x$mt_taglib_config" = xnone; then
+-            unset ac_cv_path_mt_taglib_config
+-            # Extract the first word of "taglib-config", so it can be a program name with args.
+-set dummy taglib-config; ac_word=$2
 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
- $as_echo_n "checking for $ac_word... " >&6; }
+-$as_echo_n "checking for $ac_word... " >&6; }
 -if test "${ac_cv_path_mt_taglib_config+set}" = set; then
-+if test "${ac_cv_path_mt_taglib_config+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
-   case $mt_taglib_config in
-@@ -27526,14 +14714,14 @@ for as_dir in $MT_SEARCHPATH_PROGS
- do
-   IFS=$as_save_IFS
-   test -z "$as_dir" && as_dir=.
+-  $as_echo_n "(cached) " >&6
+-else
+-  case $mt_taglib_config in
+-  [\\/]* | ?:[\\/]*)
+-  ac_cv_path_mt_taglib_config="$mt_taglib_config" # Let the user override the test with a path.
+-  ;;
+-  *)
+-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+-for as_dir in $MT_SEARCHPATH_PROGS
+-do
+-  IFS=$as_save_IFS
+-  test -z "$as_dir" && as_dir=.
 -  for ac_exec_ext in '' $ac_executable_extensions; do
-+    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_mt_taglib_config="$as_dir/$ac_word$ac_exec_ext"
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+-    ac_cv_path_mt_taglib_config="$as_dir/$ac_word$ac_exec_ext"
 -    $as_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
+-    break 2
+-  fi
 -done
-+  done
- IFS=$as_save_IFS
+-done
+-IFS=$as_save_IFS
  
-   test -z "$ac_cv_path_mt_taglib_config" && ac_cv_path_mt_taglib_config="none"
-@@ -27542,43 +14730,43 @@ esac
- fi
- mt_taglib_config=$ac_cv_path_mt_taglib_config
- if test -n "$mt_taglib_config"; then
+-  test -z "$ac_cv_path_mt_taglib_config" && ac_cv_path_mt_taglib_config="none"
+-  ;;
+-esac
+-fi
+-mt_taglib_config=$ac_cv_path_mt_taglib_config
+-if test -n "$mt_taglib_config"; then
 -  { $as_echo "$as_me:$LINENO: result: $mt_taglib_config" >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $mt_taglib_config" >&5
- $as_echo "$mt_taglib_config" >&6; }
- else
+-$as_echo "$mt_taglib_config" >&6; }
+-else
 -  { $as_echo "$as_me:$LINENO: result: no" >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
- $as_echo "no" >&6; }
+-$as_echo "no" >&6; }
  fi
  
  
-             if test "x$mt_taglib_config" = xnone; then
-                 mt_taglib_package_status=missing
+-            if test "x$mt_taglib_config" = xnone; then
+-                mt_taglib_package_status=missing
 -                { $as_echo "$as_me:$LINENO: result: taglib-config not found, please install the taglib devel package" >&5
-+                { $as_echo "$as_me:${as_lineno-$LINENO}: result: taglib-config not found, please install the taglib devel package" >&5
- $as_echo "taglib-config not found, please install the taglib devel package" >&6; }
-             fi
-         fi
+-$as_echo "taglib-config not found, please install the taglib devel package" >&6; }
+-            fi
+-        fi
++    else
++        unset ac_cv_header_magic_h
++        ac_fn_cxx_check_header_mongrel "$LINENO" "magic.h" "ac_cv_header_magic_h" "$ac_includes_default"
++if test "x$ac_cv_header_magic_h" = x""yes; then :
  
-         mt_taglib_version=`${mt_taglib_config} --version 2>/dev/null`
-         if test -z "$mt_taglib_version"; then
+-        mt_taglib_version=`${mt_taglib_config} --version 2>/dev/null`
+-        if test -z "$mt_taglib_version"; then
 -            { $as_echo "$as_me:$LINENO: ${mt_taglib_config} could not be executed or returned invalid values" >&5
-+            { $as_echo "$as_me:${as_lineno-$LINENO}: ${mt_taglib_config} could not be executed or returned invalid values" >&5
- $as_echo "$as_me: ${mt_taglib_config} could not be executed or returned invalid values" >&6;}
-             mt_taglib_package_status=missing
-         fi
-     fi
-     if test "x$mt_taglib_package_status" = xyes; then
+-$as_echo "$as_me: ${mt_taglib_config} could not be executed or returned invalid values" >&6;}
+-            mt_taglib_package_status=missing
+-        fi
+-    fi
+-    if test "x$mt_taglib_package_status" = xyes; then
 -        { $as_echo "$as_me:$LINENO: checking taglib cflags" >&5
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking taglib cflags" >&5
- $as_echo_n "checking taglib cflags... " >&6; }
-         mt_taglib_cxxflags=`${mt_taglib_config} --cflags`
+-$as_echo_n "checking taglib cflags... " >&6; }
+-        mt_taglib_cxxflags=`${mt_taglib_config} --cflags`
 -        { $as_echo "$as_me:$LINENO: result: $mt_taglib_cxxflags" >&5
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $mt_taglib_cxxflags" >&5
- $as_echo "$mt_taglib_cxxflags" >&6; }
-         mt_taglib_libs=
+-$as_echo "$mt_taglib_cxxflags" >&6; }
+-        mt_taglib_libs=
 -        { $as_echo "$as_me:$LINENO: checking taglib libs" >&5
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking taglib libs" >&5
- $as_echo_n "checking taglib libs... " >&6; }
-         if test -z "";  then
-             mt_taglib_libs=`${mt_taglib_config} --libs`
-         else
-             mt_taglib_libs=`${mt_taglib_config} `
-         fi
+-$as_echo_n "checking taglib libs... " >&6; }
+-        if test -z "";  then
+-            mt_taglib_libs=`${mt_taglib_config} --libs`
+-        else
+-            mt_taglib_libs=`${mt_taglib_config} `
+-        fi
 -        { $as_echo "$as_me:$LINENO: result: $mt_taglib_libs" >&5
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $mt_taglib_libs" >&5
- $as_echo "$mt_taglib_libs" >&6; }
-     fi
+-$as_echo "$mt_taglib_libs" >&6; }
+-    fi
++else
+ 
+-    if test "x$mt_taglib_package_status" = xyes; then
+-        CPPFLAGS="$CPPFLAGS $mt_taglib_cxxflags"
+-        CXXFLAGS="$CXXFLAGS $mt_taglib_cxxflags"
+-        CFLAGS="$CFLAGS $mt_taglib_cxxflags"
+-        for mt_u_header in taglib_h fileref_h tag_h audioproperties_h tstring_h textidentificationframe_h attachedpictureframe_h; do
+-            unset ac_cv_header_${mt_u_header}
+-        done
++                CFLAGS="$CFLAGS -I$MT_SEARCHPATH_HEADERS"
++                CXXFLAGS="$CXXFLAGS -I$MT_SEARCHPATH_HEADERS"
++                CPPFLAGS="$CPPFLAGS -I$MT_SEARCHPATH_HEADERS"
++                unset ac_cv_header_magic_h
++                as_ac_Header=`$as_echo "ac_cv_header_$MT_SEARCHPATH_HEADERS/magic.h" | $as_tr_sh`
++ac_fn_cxx_check_header_mongrel "$LINENO" "$MT_SEARCHPATH_HEADERS/magic.h" "$as_ac_Header" "$ac_includes_default"
++if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
++
++                        mt_libmagic_cxxflags="-I${MT_SEARCHPATH_HEADERS}"
+ 
++else
+ 
++                        mt_libmagic_header_status=missing
+ 
+ 
++fi
+ 
+ 
  
-@@ -27589,155 +14777,11 @@ $as_echo "$mt_taglib_libs" >&6; }
-         for mt_u_header in taglib_h fileref_h tag_h audioproperties_h tstring_h textidentificationframe_h attachedpictureframe_h; do
-             unset ac_cv_header_${mt_u_header}
-         done
--
--
--
--
--
--
--
 -for ac_header in taglib.h fileref.h tag.h audioproperties.h tstring.h textidentificationframe.h attachedpictureframe.h
 -do
 -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -25950,14 +35865,14 @@ index f51d803..459bf70 100755
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	ac_header_compiler=no
--fi
--
+ fi
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 -$as_echo "$ac_header_compiler" >&6; }
--
+ 
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
 -$as_echo_n "checking $ac_header presence... " >&6; }
@@ -25990,14 +35905,23 @@ index f51d803..459bf70 100755
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++    fi
+ 
 -  ac_header_preproc=no
 -fi
--
++    if test "x$mt_libmagic_header_status" != xyes; then
++        mt_libmagic_cxxflags=""
++    fi
+ 
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 -$as_echo "$ac_header_preproc" >&6; }
--
++    LIBS=$LIBS_SAVE
++    LDFLAGS=$LDFLAGS_SAVE
++    CFLAGS=$CFLAGS_SAVE
++    CXXFLAGS=$CXXFLAGS_SAVE
++    CPPFLAGS=$CPPFLAGS_SAVE
+ 
 -# So?  What about this header?
 -case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
 -  yes:no: )
@@ -26039,38 +35963,70 @@ index f51d803..459bf70 100755
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
--
++    mt_libmagic_package_status=${mt_libmagic_header_status}
+ 
 -fi
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+        for ac_header in taglib.h fileref.h tag.h audioproperties.h tstring.h textidentificationframe.h attachedpictureframe.h
-+do :
-+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-+ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
-   cat >>confdefs.h <<_ACEOF
- #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
- _ACEOF
-@@ -27754,102 +14798,12 @@ done
-         LIBS="$mt_taglib_libs $LIBS"
-         if test -z "tag"; then
-             unset ac_cv_func_main
--
+-  cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+-_ACEOF
++    if test "x$mt_libmagic_package_status" = xyes; then
+ 
+-else
+-  mt_taglib_package_status=missing
+-fi
++    mt_libmagic_arg_default=yes
++    mt_libmagic_library_status=yes
+ 
+-done
++    LIBS_SAVE=$LIBS
++    LDFLAGS_SAVE=$LDFLAGS
++    CFLAGS_SAVE=$CFLAGS
++    CXXFLAGS_SAVE=$CXXFLAGS
++    CPPFLAGS_SAVE=$CPPFLAGS
+ 
+-    fi
+ 
+-    if test "x$mt_taglib_package_status" = xyes; then
+-        LIBS="$mt_taglib_libs $LIBS"
+-        if test -z "tag"; then
+-            unset ac_cv_func_main
++# Check whether --with-libmagic-libs was given.
++if test "${with_libmagic_libs+set}" = set; then :
++  withval=$with_libmagic_libs;
++            mt_libmagic_search_libs="$withval"
++            { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for libmagic libs in $withval" >&5
++$as_echo "$as_me: Will search for libmagic libs in $withval" >&6;}
++
++
++fi
+ 
 -for ac_func in main
 -do
 -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
 -$as_echo_n "checking for $ac_func... " >&6; }
 -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
--  $as_echo_n "(cached) " >&6
--else
++
++    if test "$mt_libmagic_search_libs" ; then
++        unset ac_cv_lib_magic_magic_load
++        LDFLAGS="$LDFLAGS -L$mt_libmagic_search_libs"
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for magic_load in -lmagic" >&5
++$as_echo_n "checking for magic_load in -lmagic... " >&6; }
++if test "${ac_cv_lib_magic_magic_load+set}" = set; 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
--/* end confdefs.h.  */
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-lmagic  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
 -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 -   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 -#define $ac_func innocuous_$ac_func
@@ -26087,13 +36043,13 @@ index f51d803..459bf70 100755
 -#endif
 -
 -#undef $ac_func
--
--/* Override any GCC internal prototype to avoid an error.
--   Use char because int might match the return type of a GCC
--   builtin and then its argument prototype would still apply.  */
--#ifdef __cplusplus
--extern "C"
--#endif
+ 
+ /* Override any GCC internal prototype to avoid an error.
+    Use char because int might match the return type of a GCC
+@@ -27792,683 +13940,260 @@
+ #ifdef __cplusplus
+ extern "C"
+ #endif
 -char $ac_func ();
 -/* The GNU C library defines this for functions which it implements
 -    to always fail with ENOSYS.  Some functions are actually named
@@ -26102,14 +36058,16 @@ index f51d803..459bf70 100755
 -choke me
 -#endif
 -
--int
--main ()
--{
++char magic_load ();
+ int
+ main ()
+ {
 -return $ac_func ();
--  ;
--  return 0;
--}
--_ACEOF
++return magic_load ();
+   ;
+   return 0;
+ }
+ _ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -26132,17 +36090,23 @@ index f51d803..459bf70 100755
 -	 $as_test_x conftest$ac_exeext
 -       }; then
 -  eval "$as_ac_var=yes"
--else
++if ac_fn_cxx_try_link "$LINENO"; then :
++  ac_cv_lib_magic_magic_load=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	eval "$as_ac_var=no"
--fi
++  ac_cv_lib_magic_magic_load=no
+ fi
 -
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      conftest$ac_exeext conftest.$ac_ext
--fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
+ fi
 -ac_res=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -26150,40 +36114,69 @@ index f51d803..459bf70 100755
 -as_val=`eval 'as_val=${'$as_ac_var'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+            for ac_func in main
-+do :
-+  ac_fn_cxx_check_func "$LINENO" "main" "ac_cv_func_main"
-+if test "x$ac_cv_func_main" = x""yes; then :
-   cat >>confdefs.h <<_ACEOF
+-  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-+#define HAVE_MAIN 1
- _ACEOF
+-_ACEOF
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_magic_magic_load" >&5
++$as_echo "$ac_cv_lib_magic_magic_load" >&6; }
++if test "x$ac_cv_lib_magic_magic_load" = x""yes; then :
++
++                mt_libmagic_libs="-lmagic"
++                mt_libmagic_ldflags="-L$mt_libmagic_search_libs"
  
  else
-@@ -27859,19 +14813,14 @@ done
+-  mt_taglib_package_status=missing
+-fi
+-done
+ 
+-        else
+-            unset ac_cv_lib_tag_main
++                mt_libmagic_library_status=missing
++                if test "" = "pass"; then
++                    { $as_echo "$as_me:${as_lineno-$LINENO}: libmagic library not found in requested location $mt_libmagic_search_libs" >&5
++$as_echo "$as_me: libmagic library not found in requested location $mt_libmagic_search_libs" >&6;}
++                else
++                    as_fn_error $? "libmagic library not found in requested location $mt_libmagic_search_libs" "$LINENO" 5
++                fi
  
-         else
-             unset ac_cv_lib_tag_main
--
 -{ $as_echo "$as_me:$LINENO: checking for main in -ltag" >&5
-+            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ltag" >&5
- $as_echo_n "checking for main in -ltag... " >&6; }
+-$as_echo_n "checking for main in -ltag... " >&6; }
 -if test "${ac_cv_lib_tag_main+set}" = set; then
-+if test "${ac_cv_lib_tag_main+set}" = set; then :
++
++fi
++
++    else
++        unset ac_cv_lib_magic_magic_load
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for magic_load in -lmagic" >&5
++$as_echo_n "checking for magic_load in -lmagic... " >&6; }
++if test "${ac_cv_lib_magic_magic_load+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
    ac_check_lib_save_LIBS=$LIBS
- LIBS="-ltag  $LIBS"
+-LIBS="-ltag  $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
++LIBS="-lmagic  $LIBS"
 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
- 
-@@ -27883,43 +14832,18 @@ return main ();
+-
++/* 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 magic_load ();
+ int
+ main ()
+ {
+-return main ();
++return magic_load ();
+   ;
    return 0;
  }
  _ACEOF
@@ -26208,14 +36201,15 @@ index f51d803..459bf70 100755
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
+-  ac_cv_lib_tag_main=yes
 +if ac_fn_cxx_try_link "$LINENO"; then :
-   ac_cv_lib_tag_main=yes
++  ac_cv_lib_magic_magic_load=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_lib_tag_main=no
-+  ac_cv_lib_tag_main=no
++  ac_cv_lib_magic_magic_load=no
  fi
 -
 -rm -rf conftest.dSYM
@@ -26226,62 +36220,153 @@ index f51d803..459bf70 100755
  LIBS=$ac_check_lib_save_LIBS
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_tag_main" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tag_main" >&5
- $as_echo "$ac_cv_lib_tag_main" >&6; }
+-$as_echo "$ac_cv_lib_tag_main" >&6; }
 -if test "x$ac_cv_lib_tag_main" = x""yes; then
-+if test "x$ac_cv_lib_tag_main" = x""yes; then :
-   cat >>confdefs.h <<_ACEOF
- #define HAVE_LIBTAG 1
- _ACEOF
-@@ -27951,9 +14875,7 @@ fi
+-  cat >>confdefs.h <<_ACEOF
+-#define HAVE_LIBTAG 1
+-_ACEOF
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_magic_magic_load" >&5
++$as_echo "$ac_cv_lib_magic_magic_load" >&6; }
++if test "x$ac_cv_lib_magic_magic_load" = x""yes; then :
  
-     if test "x$mt_taglib_status" = xyes; then
+-  LIBS="-ltag $LIBS"
++                mt_libmagic_libs="-lmagic"
  
+ else
+-  mt_taglib_package_status=missing
+-fi
+-
+-        fi
+-    fi
+-
+-    if test "x$mt_taglib_package_status" = xyes; then
+-        TAGLIB_CFLAGS=${mt_taglib_cxxflags}
+-        TAGLIB_LIBS=${mt_taglib_libs}
+-        TAGLIB_VERSION=${mt_taglib_version}
+-    fi
+-
+-
+-    LIBS=$LIBS_SAVE
+-    LDFLAGS=$LDFLAGS_SAVE
+-    CFLAGS=$CFLAGS_SAVE
+-    CXXFLAGS=$CXXFLAGS_SAVE
+-    CPPFLAGS=$CPPFLAGS_SAVE
+-
+-        mt_taglib_status=${mt_taglib_package_status}
+-    fi
+-
+-    if test "x$mt_taglib_status" = xyes; then
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_TAGLIB 1
 -_ACEOF
-+$as_echo "#define HAVE_TAGLIB 1" >>confdefs.h
- 
-     fi
- 
-@@ -27973,18 +14895,14 @@ fi
+-
+-    fi
+-
+-    TAGLIB_STATUS=${mt_taglib_status}
+-
+-
+-
+-
+-
  
- if test "x$TAGLIB_STATUS" = xyes; then
++                LDFLAGS="$LDFLAGS -L$MT_SEARCHPATH_LIBS"
++                unset ac_cv_lib_magic_magic_load
++                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for magic_load in -lmagic" >&5
++$as_echo_n "checking for magic_load in -lmagic... " >&6; }
++if test "${ac_cv_lib_magic_magic_load+set}" = set; then :
++  $as_echo_n "(cached) " >&6
+ else
+-    TAGLIB_STATUS=disabled
+-    if test "x$ID3_OPTION_REQUESTED" = no; then
+-        ID3_OPTION_ENABLED=yes
+-    fi
+-fi
+-
+-if test "x$TAGLIB_STATUS" = xyes; then
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-lmagic  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
  
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_ID3_ALBUMART 1
--_ACEOF
-+$as_echo "#define HAVE_ID3_ALBUMART 1" >>confdefs.h
- 
-     ID3LIB_STATUS=disabled
-     ID3LIB_OPTION_ENABLED=no
++/* 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 magic_load ();
++int
++main ()
++{
++return magic_load ();
++  ;
++  return 0;
++}
+ _ACEOF
+-
+-    ID3LIB_STATUS=disabled
+-    ID3LIB_OPTION_ENABLED=no
++if ac_fn_cxx_try_link "$LINENO"; then :
++  ac_cv_lib_magic_magic_load=yes
  else
-     if (test "x$TAGLIB_OPTION_REQUESTED" = xyes) &&
-        (test "x$TAGLIB_OPTION_ENABLED" = xyes); then
+-    if (test "x$TAGLIB_OPTION_REQUESTED" = xyes) &&
+-       (test "x$TAGLIB_OPTION_ENABLED" = xyes); then
 -        { { $as_echo "$as_me:$LINENO: error: unable to configure taglib support" >&5
 -$as_echo "$as_me: error: unable to configure taglib support" >&2;}
 -   { (exit 1); exit 1; }; }
-+        as_fn_error $? "unable to configure taglib support" "$LINENO" 5
-     fi
+-    fi
++  ac_cv_lib_magic_magic_load=no
  fi
++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_magic_magic_load" >&5
++$as_echo "$ac_cv_lib_magic_magic_load" >&6; }
++if test "x$ac_cv_lib_magic_magic_load" = x""yes; then :
  
-@@ -28007,10 +14925,10 @@ if test "x$ID3LIB_OPTION_ENABLED" = xyes; then
+-######### id3lib
+-
+-if test "x$ID3LIB_OPTION_ENABLED" = xyes; then
+-
+-    mt_id3lib_status=yes
+-
+-    if test "x$mt_id3lib_status" = xyes; then
+-
+-
+-    LIBS_SAVE=$LIBS
+-    LDFLAGS_SAVE=$LDFLAGS
+-    CFLAGS_SAVE=$CFLAGS
+-    CXXFLAGS_SAVE=$CXXFLAGS
+-    CPPFLAGS_SAVE=$CPPFLAGS
+-
+-    mt_id3lib_header_status=yes
++                        mt_libmagic_libs="-lmagic"
++                        mt_libmagic_ldflags="-L$MT_SEARCHPATH_LIBS"
  
++else
  
- # Check whether --with-id3lib-h was given.
+-# Check whether --with-id3lib-h was given.
 -if test "${with_id3lib_h+set}" = set; then
-+if test "${with_id3lib_h+set}" = set; then :
-   withval=$with_id3lib_h;
-             mt_id3lib_search_headers="$withval"
+-  withval=$with_id3lib_h;
+-            mt_id3lib_search_headers="$withval"
 -            { $as_echo "$as_me:$LINENO: Will search for id3lib headers in $withval" >&5
-+            { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for id3lib headers in $withval" >&5
- $as_echo "$as_me: Will search for id3lib headers in $withval" >&6;}
+-$as_echo "$as_me: Will search for id3lib headers in $withval" >&6;}
++                        mt_libmagic_library_status=missing
  
  
-@@ -28023,145 +14941,8 @@ fi
-         CXXFLAGS="$CXXFLAGS -I${mt_id3lib_search_headers}"
-         CPPFLAGS="$CPPFLAGS -I${mt_id3lib_search_headers}"
-         as_ac_Header=`$as_echo "ac_cv_header_$mt_id3lib_search_headers/id3/tag.h" | $as_tr_sh`
+ fi
+ 
+ 
+-    if test "$mt_id3lib_search_headers" ; then
+-        unset ac_cv_header_id3_tag_h
+-        CFLAGS="$CFLAGS -I${mt_id3lib_search_headers}"
+-        CXXFLAGS="$CXXFLAGS -I${mt_id3lib_search_headers}"
+-        CPPFLAGS="$CPPFLAGS -I${mt_id3lib_search_headers}"
+-        as_ac_Header=`$as_echo "ac_cv_header_$mt_id3lib_search_headers/id3/tag.h" | $as_tr_sh`
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 -  { $as_echo "$as_me:$LINENO: checking for $mt_id3lib_search_headers/id3/tag.h" >&5
 -$as_echo_n "checking for $mt_id3lib_search_headers/id3/tag.h... " >&6; }
@@ -26327,14 +36412,15 @@ index f51d803..459bf70 100755
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	ac_header_compiler=no
--fi
--
+ fi
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 -$as_echo "$ac_header_compiler" >&6; }
--
++    fi
+ 
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking $mt_id3lib_search_headers/id3/tag.h presence" >&5
 -$as_echo_n "checking $mt_id3lib_search_headers/id3/tag.h presence... " >&6; }
@@ -26367,14 +36453,31 @@ index f51d803..459bf70 100755
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++    if test "x$mt_libmagic_library_status" != xyes; then
++        mt_libmagic_libs=""
++        mt_libmagic_ldflags=""
++    fi
++
++    LIBS=$LIBS_SAVE
++    LDFLAGS=$LDFLAGS_SAVE
++    CFLAGS=$CFLAGS_SAVE
++    CXXFLAGS=$CXXFLAGS_SAVE
++    CPPFLAGS=$CPPFLAGS_SAVE
+ 
 -  ac_header_preproc=no
 -fi
--
++        mt_libmagic_package_status=${mt_libmagic_library_status}
++    fi
+ 
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 -$as_echo "$ac_header_preproc" >&6; }
--
++    if test "x$mt_libmagic_package_status" = xyes; then
++        LIBMAGIC_CFLAGS=${mt_libmagic_cxxflags}
++        LIBMAGIC_LIBS=${mt_libmagic_libs}
++        LIBMAGIC_LDFLAGS=${mt_libmagic_ldflags}
++    fi
+ 
 -# So?  What about this header?
 -case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
 -  yes:no: )
@@ -26416,35 +36519,38 @@ index f51d803..459bf70 100755
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
--
++        mt_libmagic_status=${mt_libmagic_package_status}
++    fi
+ 
 -fi
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+ac_fn_cxx_check_header_mongrel "$LINENO" "$mt_id3lib_search_headers/id3/tag.h" "$as_ac_Header" "$ac_includes_default"
-+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
++    if test "x$mt_libmagic_status" = xyes; then
  
-                 mt_id3lib_cxxflags="-I${mt_id3lib_search_headers}"
+-                mt_id3lib_cxxflags="-I${mt_id3lib_search_headers}"
++$as_echo "#define HAVE_LIBMAGIC 1" >>confdefs.h
  
-@@ -28169,12 +14950,10 @@ else
+-else
++    fi
  
-                 mt_id3lib_header_status=missing
-                 if test "" = "pass"; then
+-                mt_id3lib_header_status=missing
+-                if test "" = "pass"; then
 -                    { $as_echo "$as_me:$LINENO: id3lib headers not found in requested location $mt_id3lib_search_headers" >&5
-+                    { $as_echo "$as_me:${as_lineno-$LINENO}: id3lib headers not found in requested location $mt_id3lib_search_headers" >&5
- $as_echo "$as_me: id3lib headers not found in requested location $mt_id3lib_search_headers" >&6;}
-                 else
+-$as_echo "$as_me: id3lib headers not found in requested location $mt_id3lib_search_headers" >&6;}
+-                else
 -                    { { $as_echo "$as_me:$LINENO: error: id3lib headers not found in requested location $mt_id3lib_search_headers" >&5
 -$as_echo "$as_me: error: id3lib headers not found in requested location $mt_id3lib_search_headers" >&2;}
 -   { (exit 1); exit 1; }; }
-+                    as_fn_error $? "id3lib headers not found in requested location $mt_id3lib_search_headers" "$LINENO" 5
-                 fi
+-                fi
++    LIBMAGIC_STATUS=${mt_libmagic_status}
  
  
-@@ -28183,140 +14962,9 @@ fi
+-fi
  
-     else
-         unset ac_cv_header_id3_tag_h
+ 
+-    else
+-        unset ac_cv_header_id3_tag_h
 -        if test "${ac_cv_header_id3_tag_h+set}" = set; then
 -  { $as_echo "$as_me:$LINENO: checking for id3/tag.h" >&5
 -$as_echo_n "checking for id3/tag.h... " >&6; }
@@ -26488,16 +36594,23 @@ index f51d803..459bf70 100755
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+        ac_fn_cxx_check_header_mongrel "$LINENO" "id3/tag.h" "ac_cv_header_id3_tag_h" "$ac_includes_default"
-+if test "x$ac_cv_header_id3_tag_h" = x""yes; then :
  
 -	ac_header_compiler=no
 -fi
--
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 -$as_echo "$ac_header_compiler" >&6; }
--
++            if test "x$LIBMAGIC_STATUS" = xyes; then
++                LIBMAGIC_LIBS="$LIBMAGIC_LIBS $ZLIB_LIBS"
++                LIBMAGIC_LDFLAGS="$LIBMAGIC_LDFLAGS $ZLIB_LDFLAGS"
++            fi
++        else
++            LDFLAGS="$LDFLAGS $ZLIB_LDFLAGS"
++            LIBS="$LIBS $ZLIB_LIBS"
++            { $as_echo "$as_me:${as_lineno-$LINENO}: retrying libmagic check with zlib flags" >&5
++$as_echo "$as_me: retrying libmagic check with zlib flags" >&6;}
+ 
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking id3/tag.h presence" >&5
 -$as_echo_n "checking id3/tag.h presence... " >&6; }
@@ -26530,14 +36643,16 @@ index f51d803..459bf70 100755
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++    mt_libmagic_status=yes
+ 
 -  ac_header_preproc=no
 -fi
--
++    if test "x$mt_libmagic_status" = xyes; then
+ 
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$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_cxx_preproc_warn_flag in
 -  yes:no: )
@@ -26577,17 +36692,31 @@ index f51d803..459bf70 100755
 -fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_id3_tag_h" >&5
 -$as_echo "$ac_cv_header_id3_tag_h" >&6; }
--
++    LIBS_SAVE=$LIBS
++    LDFLAGS_SAVE=$LDFLAGS
++    CFLAGS_SAVE=$CFLAGS
++    CXXFLAGS_SAVE=$CXXFLAGS
++    CPPFLAGS_SAVE=$CPPFLAGS
+ 
 -fi
 -if test "x$ac_cv_header_id3_tag_h" = x""yes; then
 -  :
- else
+-else
++    mt_libmagic_header_status=yes
++
++
++# Check whether --with-libmagic-h was given.
++if test "${with_libmagic_h+set}" = set; then :
++  withval=$with_libmagic_h;
++            mt_libmagic_search_headers="$withval"
++            { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for libmagic headers in $withval" >&5
++$as_echo "$as_me: Will search for libmagic headers in $withval" >&6;}
  
-                 CFLAGS="$CFLAGS -I$MT_SEARCHPATH_HEADERS"
-@@ -28324,145 +14972,8 @@ else
-                 CPPFLAGS="$CPPFLAGS -I$MT_SEARCHPATH_HEADERS"
-                 unset ac_cv_header_id3_tag_h
-                 as_ac_Header=`$as_echo "ac_cv_header_$MT_SEARCHPATH_HEADERS/id3/tag.h" | $as_tr_sh`
+-                CFLAGS="$CFLAGS -I$MT_SEARCHPATH_HEADERS"
+-                CXXFLAGS="$CXXFLAGS -I$MT_SEARCHPATH_HEADERS"
+-                CPPFLAGS="$CPPFLAGS -I$MT_SEARCHPATH_HEADERS"
+-                unset ac_cv_header_id3_tag_h
+-                as_ac_Header=`$as_echo "ac_cv_header_$MT_SEARCHPATH_HEADERS/id3/tag.h" | $as_tr_sh`
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 -  { $as_echo "$as_me:$LINENO: checking for $MT_SEARCHPATH_HEADERS/id3/tag.h" >&5
 -$as_echo_n "checking for $MT_SEARCHPATH_HEADERS/id3/tag.h... " >&6; }
@@ -26633,14 +36762,14 @@ index f51d803..459bf70 100755
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	ac_header_compiler=no
--fi
--
+ fi
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 -$as_echo "$ac_header_compiler" >&6; }
--
+ 
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking $MT_SEARCHPATH_HEADERS/id3/tag.h presence" >&5
 -$as_echo_n "checking $MT_SEARCHPATH_HEADERS/id3/tag.h presence... " >&6; }
@@ -26670,17 +36799,37 @@ index f51d803..459bf70 100755
 -	 test ! -s conftest.err
 -       }; then
 -  ac_header_preproc=yes
--else
++    if test "$mt_libmagic_search_headers" ; then
++        unset ac_cv_header_magic_h
++        CFLAGS="$CFLAGS -I${mt_libmagic_search_headers}"
++        CXXFLAGS="$CXXFLAGS -I${mt_libmagic_search_headers}"
++        CPPFLAGS="$CPPFLAGS -I${mt_libmagic_search_headers}"
++        as_ac_Header=`$as_echo "ac_cv_header_$mt_libmagic_search_headers/magic.h" | $as_tr_sh`
++ac_fn_cxx_check_header_mongrel "$LINENO" "$mt_libmagic_search_headers/magic.h" "$as_ac_Header" "$ac_includes_default"
++if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
++
++                mt_libmagic_cxxflags="-I${mt_libmagic_search_headers}"
++
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -  ac_header_preproc=no
--fi
--
++                mt_libmagic_header_status=missing
++                if test "" = "pass"; then
++                    { $as_echo "$as_me:${as_lineno-$LINENO}: libmagic headers not found in requested location $mt_libmagic_search_headers" >&5
++$as_echo "$as_me: libmagic headers not found in requested location $mt_libmagic_search_headers" >&6;}
++                else
++                    as_fn_error $? "libmagic headers not found in requested location $mt_libmagic_search_headers" "$LINENO" 5
++                fi
++
++
+ fi
+ 
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$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_cxx_preproc_warn_flag in
 -  yes:no: )
@@ -26715,62 +36864,131 @@ index f51d803..459bf70 100755
 -$as_echo_n "checking for $MT_SEARCHPATH_HEADERS/id3/tag.h... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 -  $as_echo_n "(cached) " >&6
--else
++    else
++        unset ac_cv_header_magic_h
++        ac_fn_cxx_check_header_mongrel "$LINENO" "magic.h" "ac_cv_header_magic_h" "$ac_includes_default"
++if test "x$ac_cv_header_magic_h" = x""yes; then :
++
+ else
 -  eval "$as_ac_Header=\$ac_header_preproc"
 -fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
--
+ 
 -fi
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+ac_fn_cxx_check_header_mongrel "$LINENO" "$MT_SEARCHPATH_HEADERS/id3/tag.h" "$as_ac_Header" "$ac_includes_default"
++                CFLAGS="$CFLAGS -I$MT_SEARCHPATH_HEADERS"
++                CXXFLAGS="$CXXFLAGS -I$MT_SEARCHPATH_HEADERS"
++                CPPFLAGS="$CPPFLAGS -I$MT_SEARCHPATH_HEADERS"
++                unset ac_cv_header_magic_h
++                as_ac_Header=`$as_echo "ac_cv_header_$MT_SEARCHPATH_HEADERS/magic.h" | $as_tr_sh`
++ac_fn_cxx_check_header_mongrel "$LINENO" "$MT_SEARCHPATH_HEADERS/magic.h" "$as_ac_Header" "$ac_includes_default"
 +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
  
-                         mt_id3lib_cxxflags="-I${MT_SEARCHPATH_HEADERS}"
+-                        mt_id3lib_cxxflags="-I${MT_SEARCHPATH_HEADERS}"
++                        mt_libmagic_cxxflags="-I${MT_SEARCHPATH_HEADERS}"
  
-@@ -28506,10 +15017,10 @@ fi
+ else
  
+-                        mt_id3lib_header_status=missing
++                        mt_libmagic_header_status=missing
  
- # Check whether --with-id3lib-libs was given.
+ 
+ fi
+@@ -28481,8 +14206,8 @@
+ 
+     fi
+ 
+-    if test "x$mt_id3lib_header_status" != xyes; then
+-        mt_id3lib_cxxflags=""
++    if test "x$mt_libmagic_header_status" != xyes; then
++        mt_libmagic_cxxflags=""
+     fi
+ 
+     LIBS=$LIBS_SAVE
+@@ -28491,12 +14216,12 @@
+     CXXFLAGS=$CXXFLAGS_SAVE
+     CPPFLAGS=$CPPFLAGS_SAVE
+ 
+-    mt_id3lib_package_status=${mt_id3lib_header_status}
++    mt_libmagic_package_status=${mt_libmagic_header_status}
+ 
+-    if test "x$mt_id3lib_package_status" = xyes; then
++    if test "x$mt_libmagic_package_status" = xyes; then
+ 
+-    mt_id3lib_arg_default=yes
+-    mt_id3lib_library_status=yes
++    mt_libmagic_arg_default=yes
++    mt_libmagic_library_status=yes
+ 
+     LIBS_SAVE=$LIBS
+     LDFLAGS_SAVE=$LDFLAGS
+@@ -28505,235 +14230,164 @@
+     CPPFLAGS_SAVE=$CPPFLAGS
+ 
+ 
+-# Check whether --with-id3lib-libs was given.
 -if test "${with_id3lib_libs+set}" = set; then
-+if test "${with_id3lib_libs+set}" = set; then :
-   withval=$with_id3lib_libs;
-             mt_id3lib_search_libs="$withval"
+-  withval=$with_id3lib_libs;
+-            mt_id3lib_search_libs="$withval"
 -            { $as_echo "$as_me:$LINENO: Will search for id3lib libs in $withval" >&5
-+            { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for id3lib libs in $withval" >&5
- $as_echo "$as_me: Will search for id3lib libs in $withval" >&6;}
+-$as_echo "$as_me: Will search for id3lib libs in $withval" >&6;}
++# Check whether --with-libmagic-libs was given.
++if test "${with_libmagic_libs+set}" = set; then :
++  withval=$with_libmagic_libs;
++            mt_libmagic_search_libs="$withval"
++            { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for libmagic libs in $withval" >&5
++$as_echo "$as_me: Will search for libmagic libs in $withval" >&6;}
  
  
-@@ -28519,18 +15030,14 @@ fi
-     if test "$mt_id3lib_search_libs" ; then
-         unset ac_cv_lib_id3_main
-         LDFLAGS="$LDFLAGS -L$mt_id3lib_search_libs"
+ fi
+ 
+ 
+-    if test "$mt_id3lib_search_libs" ; then
+-        unset ac_cv_lib_id3_main
+-        LDFLAGS="$LDFLAGS -L$mt_id3lib_search_libs"
 -        { $as_echo "$as_me:$LINENO: checking for main in -lid3" >&5
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lid3" >&5
- $as_echo_n "checking for main in -lid3... " >&6; }
+-$as_echo_n "checking for main in -lid3... " >&6; }
 -if test "${ac_cv_lib_id3_main+set}" = set; then
-+if test "${ac_cv_lib_id3_main+set}" = set; then :
++    if test "$mt_libmagic_search_libs" ; then
++        unset ac_cv_lib_magic_magic_load
++        LDFLAGS="$LDFLAGS -L$mt_libmagic_search_libs"
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for magic_load in -lmagic" >&5
++$as_echo_n "checking for magic_load in -lmagic... " >&6; }
++if test "${ac_cv_lib_magic_magic_load+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
    ac_check_lib_save_LIBS=$LIBS
- LIBS="-lid3  $LIBS"
+-LIBS="-lid3  $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
++LIBS="-lmagic  $LIBS"
 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
- 
-@@ -28542,43 +15049,18 @@ return main ();
-   return 0;
- }
- _ACEOF
+-
++/* 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 magic_load ();
+ int
+ main ()
+ {
+-return main ();
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -26792,14 +37010,20 @@ index f51d803..459bf70 100755
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
+-  ac_cv_lib_id3_main=yes
++return magic_load ();
++  ;
++  return 0;
++}
++_ACEOF
 +if ac_fn_cxx_try_link "$LINENO"; then :
-   ac_cv_lib_id3_main=yes
++  ac_cv_lib_magic_magic_load=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_lib_id3_main=no
-+  ac_cv_lib_id3_main=no
++  ac_cv_lib_magic_magic_load=no
  fi
 -
 -rm -rf conftest.dSYM
@@ -26810,51 +37034,72 @@ index f51d803..459bf70 100755
  LIBS=$ac_check_lib_save_LIBS
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_id3_main" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_id3_main" >&5
- $as_echo "$ac_cv_lib_id3_main" >&6; }
+-$as_echo "$ac_cv_lib_id3_main" >&6; }
 -if test "x$ac_cv_lib_id3_main" = x""yes; then
-+if test "x$ac_cv_lib_id3_main" = x""yes; then :
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_magic_magic_load" >&5
++$as_echo "$ac_cv_lib_magic_magic_load" >&6; }
++if test "x$ac_cv_lib_magic_magic_load" = x""yes; then :
  
-                 mt_id3lib_libs="-lid3"
-                 mt_id3lib_ldflags="-L$mt_id3lib_search_libs"
-@@ -28587,12 +15069,10 @@ else
+-                mt_id3lib_libs="-lid3"
+-                mt_id3lib_ldflags="-L$mt_id3lib_search_libs"
++                mt_libmagic_libs="-lmagic"
++                mt_libmagic_ldflags="-L$mt_libmagic_search_libs"
  
-                 mt_id3lib_library_status=missing
+ else
+ 
+-                mt_id3lib_library_status=missing
++                mt_libmagic_library_status=missing
                  if test "" = "pass"; then
 -                    { $as_echo "$as_me:$LINENO: id3lib library not found in requested location $mt_id3lib_search_libs" >&5
-+                    { $as_echo "$as_me:${as_lineno-$LINENO}: id3lib library not found in requested location $mt_id3lib_search_libs" >&5
- $as_echo "$as_me: id3lib library not found in requested location $mt_id3lib_search_libs" >&6;}
+-$as_echo "$as_me: id3lib library not found in requested location $mt_id3lib_search_libs" >&6;}
++                    { $as_echo "$as_me:${as_lineno-$LINENO}: libmagic library not found in requested location $mt_libmagic_search_libs" >&5
++$as_echo "$as_me: libmagic library not found in requested location $mt_libmagic_search_libs" >&6;}
                  else
 -                    { { $as_echo "$as_me:$LINENO: error: id3lib library not found in requested location $mt_id3lib_search_libs" >&5
 -$as_echo "$as_me: error: id3lib library not found in requested location $mt_id3lib_search_libs" >&2;}
 -   { (exit 1); exit 1; }; }
-+                    as_fn_error $? "id3lib library not found in requested location $mt_id3lib_search_libs" "$LINENO" 5
++                    as_fn_error $? "libmagic library not found in requested location $mt_libmagic_search_libs" "$LINENO" 5
                  fi
  
  
-@@ -28600,18 +15080,14 @@ fi
+ fi
  
      else
-         unset ac_cv_lib_id3_main
+-        unset ac_cv_lib_id3_main
 -        { $as_echo "$as_me:$LINENO: checking for main in -lid3" >&5
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lid3" >&5
- $as_echo_n "checking for main in -lid3... " >&6; }
+-$as_echo_n "checking for main in -lid3... " >&6; }
 -if test "${ac_cv_lib_id3_main+set}" = set; then
-+if test "${ac_cv_lib_id3_main+set}" = set; then :
++        unset ac_cv_lib_magic_magic_load
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for magic_load in -lmagic" >&5
++$as_echo_n "checking for magic_load in -lmagic... " >&6; }
++if test "${ac_cv_lib_magic_magic_load+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
    ac_check_lib_save_LIBS=$LIBS
- LIBS="-lid3  $LIBS"
+-LIBS="-lid3  $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
++LIBS="-lmagic  $LIBS"
 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
- 
-@@ -28623,43 +15099,18 @@ return main ();
+-
++/* 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 magic_load ();
+ int
+ main ()
+ {
+-return main ();
++return magic_load ();
+   ;
    return 0;
  }
  _ACEOF
@@ -26879,14 +37124,15 @@ index f51d803..459bf70 100755
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
+-  ac_cv_lib_id3_main=yes
 +if ac_fn_cxx_try_link "$LINENO"; then :
-   ac_cv_lib_id3_main=yes
++  ac_cv_lib_magic_magic_load=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_lib_id3_main=no
-+  ac_cv_lib_id3_main=no
++  ac_cv_lib_magic_magic_load=no
  fi
 -
 -rm -rf conftest.dSYM
@@ -26897,36 +37143,53 @@ index f51d803..459bf70 100755
  LIBS=$ac_check_lib_save_LIBS
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_id3_main" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_id3_main" >&5
- $as_echo "$ac_cv_lib_id3_main" >&6; }
+-$as_echo "$ac_cv_lib_id3_main" >&6; }
 -if test "x$ac_cv_lib_id3_main" = x""yes; then
-+if test "x$ac_cv_lib_id3_main" = x""yes; then :
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_magic_magic_load" >&5
++$as_echo "$ac_cv_lib_magic_magic_load" >&6; }
++if test "x$ac_cv_lib_magic_magic_load" = x""yes; then :
  
-                 mt_id3lib_libs="-lid3"
+-                mt_id3lib_libs="-lid3"
++                mt_libmagic_libs="-lmagic"
  
-@@ -28667,18 +15118,14 @@ else
+ else
  
                  LDFLAGS="$LDFLAGS -L$MT_SEARCHPATH_LIBS"
-                 unset ac_cv_lib_id3_main
+-                unset ac_cv_lib_id3_main
 -                { $as_echo "$as_me:$LINENO: checking for main in -lid3" >&5
-+                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lid3" >&5
- $as_echo_n "checking for main in -lid3... " >&6; }
+-$as_echo_n "checking for main in -lid3... " >&6; }
 -if test "${ac_cv_lib_id3_main+set}" = set; then
-+if test "${ac_cv_lib_id3_main+set}" = set; then :
++                unset ac_cv_lib_magic_magic_load
++                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for magic_load in -lmagic" >&5
++$as_echo_n "checking for magic_load in -lmagic... " >&6; }
++if test "${ac_cv_lib_magic_magic_load+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
    ac_check_lib_save_LIBS=$LIBS
- LIBS="-lid3  $LIBS"
+-LIBS="-lid3  $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
++LIBS="-lmagic  $LIBS"
 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
- 
-@@ -28690,43 +15137,18 @@ return main ();
+-
++/* 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 magic_load ();
+ int
+ main ()
+ {
+-return main ();
++return magic_load ();
+   ;
    return 0;
  }
  _ACEOF
@@ -26951,14 +37214,15 @@ index f51d803..459bf70 100755
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
+-  ac_cv_lib_id3_main=yes
 +if ac_fn_cxx_try_link "$LINENO"; then :
-   ac_cv_lib_id3_main=yes
++  ac_cv_lib_magic_magic_load=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_lib_id3_main=no
-+  ac_cv_lib_id3_main=no
++  ac_cv_lib_magic_magic_load=no
  fi
 -
 -rm -rf conftest.dSYM
@@ -26969,69 +37233,369 @@ index f51d803..459bf70 100755
  LIBS=$ac_check_lib_save_LIBS
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_id3_main" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_id3_main" >&5
- $as_echo "$ac_cv_lib_id3_main" >&6; }
+-$as_echo "$ac_cv_lib_id3_main" >&6; }
 -if test "x$ac_cv_lib_id3_main" = x""yes; then
-+if test "x$ac_cv_lib_id3_main" = x""yes; then :
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_magic_magic_load" >&5
++$as_echo "$ac_cv_lib_magic_magic_load" >&6; }
++if test "x$ac_cv_lib_magic_magic_load" = x""yes; then :
  
-                         mt_id3lib_libs="-lid3"
-                         mt_id3lib_ldflags="-L$MT_SEARCHPATH_LIBS"
-@@ -28769,9 +15191,7 @@ fi
+-                        mt_id3lib_libs="-lid3"
+-                        mt_id3lib_ldflags="-L$MT_SEARCHPATH_LIBS"
++                        mt_libmagic_libs="-lmagic"
++                        mt_libmagic_ldflags="-L$MT_SEARCHPATH_LIBS"
  
-     if test "x$mt_id3lib_status" = xyes; then
+ else
+ 
+-                        mt_id3lib_library_status=missing
++                        mt_libmagic_library_status=missing
+ 
+ 
+ fi
+@@ -28744,9 +14398,9 @@
+ 
+     fi
+ 
+-    if test "x$mt_id3lib_library_status" != xyes; then
+-        mt_id3lib_libs=""
+-        mt_id3lib_ldflags=""
++    if test "x$mt_libmagic_library_status" != xyes; then
++        mt_libmagic_libs=""
++        mt_libmagic_ldflags=""
+     fi
+ 
+     LIBS=$LIBS_SAVE
+@@ -28755,40 +14409,214 @@
+     CXXFLAGS=$CXXFLAGS_SAVE
+     CPPFLAGS=$CPPFLAGS_SAVE
+ 
+-        mt_id3lib_package_status=${mt_id3lib_library_status}
++        mt_libmagic_package_status=${mt_libmagic_library_status}
+     fi
+ 
+-    if test "x$mt_id3lib_package_status" = xyes; then
+-        ID3LIB_CFLAGS=${mt_id3lib_cxxflags}
+-        ID3LIB_LIBS=${mt_id3lib_libs}
+-        ID3LIB_LDFLAGS=${mt_id3lib_ldflags}
++    if test "x$mt_libmagic_package_status" = xyes; then
++        LIBMAGIC_CFLAGS=${mt_libmagic_cxxflags}
++        LIBMAGIC_LIBS=${mt_libmagic_libs}
++        LIBMAGIC_LDFLAGS=${mt_libmagic_ldflags}
+     fi
+ 
+-        mt_id3lib_status=${mt_id3lib_package_status}
++        mt_libmagic_status=${mt_libmagic_package_status}
+     fi
+ 
+-    if test "x$mt_id3lib_status" = xyes; then
++    if test "x$mt_libmagic_status" = xyes; then
++
++$as_echo "#define HAVE_LIBMAGIC 1" >>confdefs.h
++
++    fi
++
++    LIBMAGIC_STATUS=${mt_libmagic_status}
++
++
++
++
++
++
++            if test "x$LIBMAGIC_STATUS" = xyes; then
++                LIBMAGIC_LIBS="$LIBMAGIC_LIBS $ZLIB_LIBS"
++                LIBMAGIC_LDFLAGS="$LIBMAGIC_LDFLAGS $ZLIB_LDFLAGS"
++            fi
++        fi
++
++
++
++    fi
++fi
++
++if test "x$LIBMAGIC_STATUS" = xyes; then
++    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libmagic is broken (Slackware check)" >&5
++$as_echo_n "checking if libmagic is broken (Slackware check)... " >&6; }
++    CFLAGS="$CFLAGS $LIBMAGIC_CXXLAGS"
++    CXXFLAGS="$CXXFLAGS $LIBMAGIC_CFLAGS"
++    LDFLAGS="$LDFLAGS $LIBMAGIC_LDFLAGS $LIBMAGIC_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
++
++    if test "$cross_compiling" = yes; then :
++
++            { $as_echo "$as_me:${as_lineno-$LINENO}: result: passing for cross compiling" >&5
++$as_echo "passing for cross compiling" >&6; }
++
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++ #include <magic.h>
++int
++main ()
++{
  
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_ID3LIB 1
--_ACEOF
-+$as_echo "#define HAVE_ID3LIB 1" >>confdefs.h
++            struct magic_set *ms;
++            ms = magic_open(MAGIC_MIME);
++            if (ms == 0)
++                return 0;
++            magic_load(ms, 0);
++            magic_close(ms);
++            return 0;
++
++
++  ;
++  return 0;
++}
+ _ACEOF
++if ac_fn_c_try_run "$LINENO"; then :
++
++            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; };
++
++else
++
++            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++            MAGIC_OK=broken
++            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: your magic library is broken, if you are using Slackware install the 'file' package manually" >&5
++$as_echo "$as_me: WARNING: your magic library is broken, if you are using Slackware install the 'file' package manually" >&2;}
++
++fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
++fi
++
++
++   ac_ext=cpp
++ac_cpp='$CXXCPP $CPPFLAGS'
++ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
++ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
++ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
++
++fi
  
++if test "x$LIBMAGIC_STATUS" = xyes; then
++
++$as_echo "#define HAVE_MAGIC 1" >>confdefs.h
++
++else
++    if (test "x$LIBMAGIC_OPTION_REQUESTED" = xyes) &&
++       (test "x$LIBMAGIC_OPTION_ENABLED" = xyes); then
++        as_fn_error $? "unable to configure libmagic support" "$LINENO" 5
++    fi
++fi
++
++CFLAGS="$CFLAGS_SAVE"
++CXXFLAGS="$CXXFLAGS_SAVE"
++CPPFLAFS="$CPPFLAFS_SAVE"
++LDFLGAS="$LDFLAGS_SAVE"
++
++######### taglib or id3lib selection
++
++TAGLIB_STATUS=
++ID3LIB_STATUS=
++
++
++
++    mt_id3lib_option_enabled=
++    mt_id3lib_option_requested=no
++    if test "xdisable" = xdisable; then
++        mt_id3lib_option_enabled=yes
++    else
++        mt_id3lib_option_enabled=no
++    fi
++
++    # Check whether --enable-id3lib was given.
++if test "${enable_id3lib+set}" = set; then :
++  enableval=$enable_id3lib;
++            mt_id3lib_option_enabled=$enableval
++            mt_id3lib_option_requested=yes
++
++
++fi
++
++
++    ID3LIB_OPTION_ENABLED=${mt_id3lib_option_enabled}
++    ID3LIB_OPTION_REQUESTED=${mt_id3lib_option_requested}
++
++
++
++
++    if test "x${mt_id3lib_option_enabled}" = xyes; then :
++
++fi
++
++
++
++    mt_taglib_option_enabled=
++    mt_taglib_option_requested=no
++    if test "xdisable" = xdisable; then
++        mt_taglib_option_enabled=yes
++    else
++        mt_taglib_option_enabled=no
      fi
  
-@@ -28798,10 +15218,10 @@ _ACEOF
+-    ID3LIB_STATUS=${mt_id3lib_status}
++    # Check whether --enable-taglib was given.
++if test "${enable_taglib+set}" = set; then :
++  enableval=$enable_taglib;
++            mt_taglib_option_enabled=$enableval
++            mt_taglib_option_requested=yes
++
++
++fi
++
++
++    TAGLIB_OPTION_ENABLED=${mt_taglib_option_enabled}
++    TAGLIB_OPTION_REQUESTED=${mt_taglib_option_requested}
+ 
+ 
+ 
  
++    if test "x${mt_taglib_option_enabled}" = xyes; then :
+ 
++fi
  
- # Check whether --with-zlib-libs was given.
++if ((test "x$TAGLIB_OPTION_ENABLED" = xno) && (test "x$ID3LIB_OPTION_ENABLED" = xyes)) ; then
++    TAGLIB_STATUS=disabled
++    TAGLIB_OPTION_ENABLED=no
++    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: taglib disabled" >&5
++$as_echo "$as_me: WARNING: taglib disabled" >&2;}
++elif ((test "x$TAGLIB_OPTION_ENABLED" = xyes) && (test "x$ID3LIB_OPTION_ENABLED" = xno)) ; then
++    ID3LIB_STATUS=disabled
++    ID3LIB_OPTION_ENABLED=no
++    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: id3lib disabled" >&5
++$as_echo "$as_me: WARNING: id3lib disabled" >&2;}
++elif ((test "x$TAGLIB_OPTION_ENABLED" = xyes) && (test "x$ID3LIB_OPTION_ENABLED" = xyes)) ; then
++    if ((test "x$TAGLIB_OPTION_REQUESTED" = xyes) && (test "x$ID3LIB_OPTION_REQUESTED" = xyes)); then
++        as_fn_error $? "Please select either taglib or id3lib, but not both." "$LINENO" 5
++    elif ((test "x$TAGLIB_OPTION_REQUESTED" = xyes) && (test "x$ID3LIB_OPTION_REQUESTED" != xyes)); then
++        ID3LIB_OPTION_ENABLED=no
++    elif ((test "x$TAGLIB_OPTION_REQUESTED" != xyes) && (test "x$ID3LIB_OPTION_REQUESTED" = xyes)); then
++        TAGLIB_OPTION_ENABLED=no
++    fi
++fi
+ 
+-    if test "x$ID3LIB_STATUS" != xyes; then
+-        if test "x$ZLIB_STATUS" != xyes; then
++if test "x$TAGLIB_OPTION_ENABLED" = xyes; then
+ 
++    mt_taglib_status=yes
+ 
+-    mt_zlib_arg_default=yes
+-    mt_zlib_library_status=yes
++    if test "x$mt_taglib_status" = xyes; then
+ 
+     LIBS_SAVE=$LIBS
+     LDFLAGS_SAVE=$LDFLAGS
+@@ -28797,287 +14625,290 @@
+     CPPFLAGS_SAVE=$CPPFLAGS
+ 
+ 
+-# Check whether --with-zlib-libs was given.
 -if test "${with_zlib_libs+set}" = set; then
-+if test "${with_zlib_libs+set}" = set; then :
-   withval=$with_zlib_libs;
-             mt_zlib_search_libs="$withval"
+-  withval=$with_zlib_libs;
+-            mt_zlib_search_libs="$withval"
 -            { $as_echo "$as_me:$LINENO: Will search for zlib libs in $withval" >&5
-+            { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for zlib libs in $withval" >&5
- $as_echo "$as_me: Will search for zlib libs in $withval" >&6;}
+-$as_echo "$as_me: Will search for zlib libs in $withval" >&6;}
++    mt_taglib_config=none
++    mt_taglib_package_status=yes
++
++
++# Check whether --with-taglib-cfg was given.
++if test "${with_taglib_cfg+set}" = set; then :
++  withval=$with_taglib_cfg;
++            mt_taglib_search_config="$withval"
++            { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for taglib config in $withval" >&5
++$as_echo "$as_me: Will search for taglib config in $withval" >&6;}
+ 
+ 
+ fi
  
  
-@@ -28811,18 +15231,14 @@ fi
-     if test "$mt_zlib_search_libs" ; then
-         unset ac_cv_lib_z_compress
-         LDFLAGS="$LDFLAGS -L$mt_zlib_search_libs"
+-    if test "$mt_zlib_search_libs" ; then
+-        unset ac_cv_lib_z_compress
+-        LDFLAGS="$LDFLAGS -L$mt_zlib_search_libs"
 -        { $as_echo "$as_me:$LINENO: checking for compress in -lz" >&5
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
- $as_echo_n "checking for compress in -lz... " >&6; }
+-$as_echo_n "checking for compress in -lz... " >&6; }
 -if test "${ac_cv_lib_z_compress+set}" = set; then
-+if test "${ac_cv_lib_z_compress+set}" = set; then :
++    if test -n "$mt_taglib_search_config"; then
++        { $as_echo "$as_me:${as_lineno-$LINENO}: You specified ${mt_taglib_search_config} for taglib-config" >&5
++$as_echo "$as_me: You specified ${mt_taglib_search_config} for taglib-config" >&6;}
++        if test -f "$mt_taglib_search_config"; then
++            mt_taglib_config=${mt_taglib_search_config}
++        else
++            as_fn_error $? "${mt_taglib_search_config} not found" "$LINENO" 5
++        fi
++
++        mt_taglib_version=`${mt_taglib_config} --version 2>/dev/null`
++        if test -z "$mt_taglib_version"; then
++            as_fn_error $? "${mt_taglib_search_config} could not be executed or returned invalid values" "$LINENO" 5
++        fi
++    else
++        # Extract the first word of "taglib-config", so it can be a program name with args.
++set dummy taglib-config; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_path_mt_taglib_config+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
-   ac_check_lib_save_LIBS=$LIBS
- LIBS="-lz  $LIBS"
+-  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.  */
+-/* end confdefs.h.  */
++  case $mt_taglib_config in
++  [\\/]* | ?:[\\/]*)
++  ac_cv_path_mt_taglib_config="$mt_taglib_config" # Let the user override the test with a path.
++  ;;
++  *)
++  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++    ac_cv_path_mt_taglib_config="$as_dir/$ac_word$ac_exec_ext"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
  
- /* Override any GCC internal prototype to avoid an error.
-@@ -28840,43 +15256,18 @@ return compress ();
-   return 0;
- }
- _ACEOF
+-/* 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 compress ();
+-int
+-main ()
+-{
+-return compress ();
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
 -  *) ac_try_echo=$ac_try;;
--esac
++  test -z "$ac_cv_path_mt_taglib_config" && ac_cv_path_mt_taglib_config="none"
++  ;;
+ esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
 -  (eval "$ac_link") 2>conftest.er1
@@ -27047,72 +37611,162 @@ index f51d803..459bf70 100755
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
-+if ac_fn_cxx_try_link "$LINENO"; then :
-   ac_cv_lib_z_compress=yes
+-  ac_cv_lib_z_compress=yes
++fi
++mt_taglib_config=$ac_cv_path_mt_taglib_config
++if test -n "$mt_taglib_config"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $mt_taglib_config" >&5
++$as_echo "$mt_taglib_config" >&6; }
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_lib_z_compress=no
-+  ac_cv_lib_z_compress=no
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
  fi
--
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      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
+-LIBS=$ac_check_lib_save_LIBS
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_z_compress" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
- $as_echo "$ac_cv_lib_z_compress" >&6; }
+-$as_echo "$ac_cv_lib_z_compress" >&6; }
 -if test "x$ac_cv_lib_z_compress" = x""yes; then
-+if test "x$ac_cv_lib_z_compress" = x""yes; then :
  
-                 mt_zlib_libs="-lz"
-                 mt_zlib_ldflags="-L$mt_zlib_search_libs"
-@@ -28885,12 +15276,10 @@ else
+-                mt_zlib_libs="-lz"
+-                mt_zlib_ldflags="-L$mt_zlib_search_libs"
++        if test "x$mt_taglib_config" = xnone; then
++            unset ac_cv_path_mt_taglib_config
++            # Extract the first word of "taglib-config", so it can be a program name with args.
++set dummy taglib-config; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_path_mt_taglib_config+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  case $mt_taglib_config in
++  [\\/]* | ?:[\\/]*)
++  ac_cv_path_mt_taglib_config="$mt_taglib_config" # Let the user override the test with a path.
++  ;;
++  *)
++  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $MT_SEARCHPATH_PROGS
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++    ac_cv_path_mt_taglib_config="$as_dir/$ac_word$ac_exec_ext"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
  
-                 mt_zlib_library_status=missing
-                 if test "" = "pass"; then
++  test -z "$ac_cv_path_mt_taglib_config" && ac_cv_path_mt_taglib_config="none"
++  ;;
++esac
++fi
++mt_taglib_config=$ac_cv_path_mt_taglib_config
++if test -n "$mt_taglib_config"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $mt_taglib_config" >&5
++$as_echo "$mt_taglib_config" >&6; }
+ else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
+ 
+-                mt_zlib_library_status=missing
+-                if test "" = "pass"; then
 -                    { $as_echo "$as_me:$LINENO: zlib library not found in requested location $mt_zlib_search_libs" >&5
-+                    { $as_echo "$as_me:${as_lineno-$LINENO}: zlib library not found in requested location $mt_zlib_search_libs" >&5
- $as_echo "$as_me: zlib library not found in requested location $mt_zlib_search_libs" >&6;}
-                 else
+-$as_echo "$as_me: zlib library not found in requested location $mt_zlib_search_libs" >&6;}
+-                else
 -                    { { $as_echo "$as_me:$LINENO: error: zlib library not found in requested location $mt_zlib_search_libs" >&5
 -$as_echo "$as_me: error: zlib library not found in requested location $mt_zlib_search_libs" >&2;}
 -   { (exit 1); exit 1; }; }
-+                    as_fn_error $? "zlib library not found in requested location $mt_zlib_search_libs" "$LINENO" 5
-                 fi
+-                fi
  
++            if test "x$mt_taglib_config" = xnone; then
++                mt_taglib_package_status=missing
++                { $as_echo "$as_me:${as_lineno-$LINENO}: result: taglib-config not found, please install the taglib devel package" >&5
++$as_echo "taglib-config not found, please install the taglib devel package" >&6; }
++            fi
++        fi
  
-@@ -28898,18 +15287,14 @@ fi
+-fi
++        mt_taglib_version=`${mt_taglib_config} --version 2>/dev/null`
++        if test -z "$mt_taglib_version"; then
++            { $as_echo "$as_me:${as_lineno-$LINENO}: ${mt_taglib_config} could not be executed or returned invalid values" >&5
++$as_echo "$as_me: ${mt_taglib_config} could not be executed or returned invalid values" >&6;}
++            mt_taglib_package_status=missing
++        fi
++    fi
++    if test "x$mt_taglib_package_status" = xyes; then
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking taglib cflags" >&5
++$as_echo_n "checking taglib cflags... " >&6; }
++        mt_taglib_cxxflags=`${mt_taglib_config} --cflags`
++        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $mt_taglib_cxxflags" >&5
++$as_echo "$mt_taglib_cxxflags" >&6; }
++        mt_taglib_libs=
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking taglib libs" >&5
++$as_echo_n "checking taglib libs... " >&6; }
++        if test -z "";  then
++            mt_taglib_libs=`${mt_taglib_config} --libs`
++        else
++            mt_taglib_libs=`${mt_taglib_config} `
++        fi
++        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $mt_taglib_libs" >&5
++$as_echo "$mt_taglib_libs" >&6; }
++    fi
  
-     else
-         unset ac_cv_lib_z_compress
+-    else
+-        unset ac_cv_lib_z_compress
 -        { $as_echo "$as_me:$LINENO: checking for compress in -lz" >&5
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
- $as_echo_n "checking for compress in -lz... " >&6; }
+-$as_echo_n "checking for compress in -lz... " >&6; }
 -if test "${ac_cv_lib_z_compress+set}" = set; then
-+if test "${ac_cv_lib_z_compress+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
-   ac_check_lib_save_LIBS=$LIBS
- LIBS="-lz  $LIBS"
+-  $as_echo_n "(cached) " >&6
+-else
+-  ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lz  $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
--_ACEOF
++    if test "x$mt_taglib_package_status" = xyes; then
++        CPPFLAGS="$CPPFLAGS $mt_taglib_cxxflags"
++        CXXFLAGS="$CXXFLAGS $mt_taglib_cxxflags"
++        CFLAGS="$CFLAGS $mt_taglib_cxxflags"
++        for mt_u_header in taglib_h fileref_h tag_h audioproperties_h tstring_h textidentificationframe_h attachedpictureframe_h; do
++            unset ac_cv_header_${mt_u_header}
++        done
++        for ac_header in taglib.h fileref.h tag.h audioproperties.h tstring.h textidentificationframe.h attachedpictureframe.h
++do :
++  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
++ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
++if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
++  cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+ _ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
+-/* end confdefs.h.  */
  
- /* Override any GCC internal prototype to avoid an error.
-@@ -28927,43 +15312,18 @@ return compress ();
-   return 0;
- }
- _ACEOF
+-/* 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 compress ();
+-int
+-main ()
+-{
+-return compress ();
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext conftest$ac_exeext
 -if { (ac_try="$ac_link"
 -case "(($ac_try" in
@@ -27134,54 +37788,82 @@ index f51d803..459bf70 100755
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
-+if ac_fn_cxx_try_link "$LINENO"; then :
-   ac_cv_lib_z_compress=yes
+-  ac_cv_lib_z_compress=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_lib_z_compress=no
-+  ac_cv_lib_z_compress=no
++  mt_taglib_package_status=missing
  fi
--
+ 
 -rm -rf conftest.dSYM
 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 -      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
+-LIBS=$ac_check_lib_save_LIBS
+-fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_z_compress" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
- $as_echo "$ac_cv_lib_z_compress" >&6; }
+-$as_echo "$ac_cv_lib_z_compress" >&6; }
 -if test "x$ac_cv_lib_z_compress" = x""yes; then
-+if test "x$ac_cv_lib_z_compress" = x""yes; then :
++done
  
-                 mt_zlib_libs="-lz"
+-                mt_zlib_libs="-lz"
++    fi
++
++    if test "x$mt_taglib_package_status" = xyes; then
++        LIBS="$mt_taglib_libs $LIBS"
++        if test -z "tag"; then
++            unset ac_cv_func_main
++            for ac_func in main
++do :
++  ac_fn_cxx_check_func "$LINENO" "main" "ac_cv_func_main"
++if test "x$ac_cv_func_main" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_MAIN 1
++_ACEOF
  
-@@ -28971,18 +15331,14 @@ else
+ else
++  mt_taglib_package_status=missing
++fi
++done
  
-                 LDFLAGS="$LDFLAGS -L$MT_SEARCHPATH_LIBS"
-                 unset ac_cv_lib_z_compress
+-                LDFLAGS="$LDFLAGS -L$MT_SEARCHPATH_LIBS"
+-                unset ac_cv_lib_z_compress
 -                { $as_echo "$as_me:$LINENO: checking for compress in -lz" >&5
-+                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
- $as_echo_n "checking for compress in -lz... " >&6; }
+-$as_echo_n "checking for compress in -lz... " >&6; }
 -if test "${ac_cv_lib_z_compress+set}" = set; then
-+if test "${ac_cv_lib_z_compress+set}" = set; then :
++        else
++            unset ac_cv_lib_tag_main
++            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ltag" >&5
++$as_echo_n "checking for main in -ltag... " >&6; }
++if test "${ac_cv_lib_tag_main+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
    ac_check_lib_save_LIBS=$LIBS
- LIBS="-lz  $LIBS"
+-LIBS="-lz  $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
++LIBS="-ltag  $LIBS"
 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
- /* Override any GCC internal prototype to avoid an error.
-@@ -29000,43 +15356,18 @@ return compress ();
+-/* 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 compress ();
++
+ int
+ main ()
+ {
+-return compress ();
++return main ();
+   ;
    return 0;
  }
  _ACEOF
@@ -27206,14 +37888,15 @@ index f51d803..459bf70 100755
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
+-  ac_cv_lib_z_compress=yes
 +if ac_fn_cxx_try_link "$LINENO"; then :
-   ac_cv_lib_z_compress=yes
++  ac_cv_lib_tag_main=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_lib_z_compress=no
-+  ac_cv_lib_z_compress=no
++  ac_cv_lib_tag_main=no
  fi
 -
 -rm -rf conftest.dSYM
@@ -27224,23 +37907,100 @@ index f51d803..459bf70 100755
  LIBS=$ac_check_lib_save_LIBS
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_z_compress" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
- $as_echo "$ac_cv_lib_z_compress" >&6; }
+-$as_echo "$ac_cv_lib_z_compress" >&6; }
 -if test "x$ac_cv_lib_z_compress" = x""yes; then
-+if test "x$ac_cv_lib_z_compress" = x""yes; then :
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tag_main" >&5
++$as_echo "$ac_cv_lib_tag_main" >&6; }
++if test "x$ac_cv_lib_tag_main" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_LIBTAG 1
++_ACEOF
  
-                         mt_zlib_libs="-lz"
-                         mt_zlib_ldflags="-L$MT_SEARCHPATH_LIBS"
-@@ -29076,7 +15407,7 @@ fi
+-                        mt_zlib_libs="-lz"
+-                        mt_zlib_ldflags="-L$MT_SEARCHPATH_LIBS"
++  LIBS="-ltag $LIBS"
  
-             LDFLAGS="$LDFLAGS $ZLIB_LDFLAGS"
-             LIBS="$LIBS $ZLIB_LIBS"
+ else
+-
+-                        mt_zlib_library_status=missing
+-
+-
+-fi
+-
+-
+-
++  mt_taglib_package_status=missing
+ fi
+ 
++        fi
+     fi
+ 
+-    if test "x$mt_zlib_library_status" != xyes; then
+-        mt_zlib_libs=""
+-        mt_zlib_ldflags=""
++    if test "x$mt_taglib_package_status" = xyes; then
++        TAGLIB_CFLAGS=${mt_taglib_cxxflags}
++        TAGLIB_LIBS=${mt_taglib_libs}
++        TAGLIB_VERSION=${mt_taglib_version}
+     fi
+ 
++
+     LIBS=$LIBS_SAVE
+     LDFLAGS=$LDFLAGS_SAVE
+     CFLAGS=$CFLAGS_SAVE
+     CXXFLAGS=$CXXFLAGS_SAVE
+     CPPFLAGS=$CPPFLAGS_SAVE
+ 
++        mt_taglib_status=${mt_taglib_package_status}
++    fi
+ 
+-    ZLIB_LIBS=${mt_zlib_libs}
+-    ZLIB_LDFLAGS=${mt_zlib_ldflags}
+-    ZLIB_STATUS=${mt_zlib_library_status}
++    if test "x$mt_taglib_status" = xyes; then
+ 
++$as_echo "#define HAVE_TAGLIB 1" >>confdefs.h
++
++    fi
++
++    TAGLIB_STATUS=${mt_taglib_status}
+ 
+ 
+ 
+ 
+-            LDFLAGS="$LDFLAGS $ZLIB_LDFLAGS"
+-            LIBS="$LIBS $ZLIB_LIBS"
 -            { $as_echo "$as_me:$LINENO: retrying id3lib check with zlib flags" >&5
-+            { $as_echo "$as_me:${as_lineno-$LINENO}: retrying id3lib check with zlib flags" >&5
- $as_echo "$as_me: retrying id3lib check with zlib flags" >&6;}
+-$as_echo "$as_me: retrying id3lib check with zlib flags" >&6;}
++
++
++else
++    TAGLIB_STATUS=disabled
++    if test "x$ID3_OPTION_REQUESTED" = no; then
++        ID3_OPTION_ENABLED=yes
++    fi
++fi
++
++if test "x$TAGLIB_STATUS" = xyes; then
++
++$as_echo "#define HAVE_ID3_ALBUMART 1" >>confdefs.h
++
++    ID3LIB_STATUS=disabled
++    ID3LIB_OPTION_ENABLED=no
++else
++    if (test "x$TAGLIB_OPTION_REQUESTED" = xyes) &&
++       (test "x$TAGLIB_OPTION_ENABLED" = xyes); then
++        as_fn_error $? "unable to configure taglib support" "$LINENO" 5
++    fi
++fi
++
++######### id3lib
++
++if test "x$ID3LIB_OPTION_ENABLED" = xyes; then
  
      mt_id3lib_status=yes
-@@ -29094,10 +15425,10 @@ $as_echo "$as_me: retrying id3lib check with zlib flags" >&6;}
+ 
+@@ -29094,10 +14925,10 @@
  
  
  # Check whether --with-id3lib-h was given.
@@ -27253,7 +38013,7 @@ index f51d803..459bf70 100755
  $as_echo "$as_me: Will search for id3lib headers in $withval" >&6;}
  
  
-@@ -29110,145 +15441,8 @@ fi
+@@ -29110,446 +14941,39 @@
          CXXFLAGS="$CXXFLAGS -I${mt_id3lib_search_headers}"
          CPPFLAGS="$CPPFLAGS -I${mt_id3lib_search_headers}"
          as_ac_Header=`$as_echo "ac_cv_header_$mt_id3lib_search_headers/id3/tag.h" | $as_tr_sh`
@@ -27396,30 +38156,27 @@ index f51d803..459bf70 100755
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+ac_fn_cxx_check_header_mongrel "$LINENO" "$mt_id3lib_search_headers/id3/tag.h" "$as_ac_Header" "$ac_includes_default"
-+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- 
-                 mt_id3lib_cxxflags="-I${mt_id3lib_search_headers}"
- 
-@@ -29256,12 +15450,10 @@ else
- 
-                 mt_id3lib_header_status=missing
-                 if test "" = "pass"; then
+-
+-                mt_id3lib_cxxflags="-I${mt_id3lib_search_headers}"
+-
+-else
+-
+-                mt_id3lib_header_status=missing
+-                if test "" = "pass"; then
 -                    { $as_echo "$as_me:$LINENO: id3lib headers not found in requested location $mt_id3lib_search_headers" >&5
-+                    { $as_echo "$as_me:${as_lineno-$LINENO}: id3lib headers not found in requested location $mt_id3lib_search_headers" >&5
- $as_echo "$as_me: id3lib headers not found in requested location $mt_id3lib_search_headers" >&6;}
-                 else
+-$as_echo "$as_me: id3lib headers not found in requested location $mt_id3lib_search_headers" >&6;}
+-                else
 -                    { { $as_echo "$as_me:$LINENO: error: id3lib headers not found in requested location $mt_id3lib_search_headers" >&5
 -$as_echo "$as_me: error: id3lib headers not found in requested location $mt_id3lib_search_headers" >&2;}
 -   { (exit 1); exit 1; }; }
-+                    as_fn_error $? "id3lib headers not found in requested location $mt_id3lib_search_headers" "$LINENO" 5
-                 fi
- 
- 
-@@ -29270,140 +15462,9 @@ fi
- 
-     else
-         unset ac_cv_header_id3_tag_h
+-                fi
+-
+-
+-fi
+-
+-
+-    else
+-        unset ac_cv_header_id3_tag_h
 -        if test "${ac_cv_header_id3_tag_h+set}" = set; then
 -  { $as_echo "$as_me:$LINENO: checking for id3/tag.h" >&5
 -$as_echo_n "checking for id3/tag.h... " >&6; }
@@ -27510,9 +38267,7 @@ index f51d803..459bf70 100755
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 -$as_echo "$ac_header_preproc" >&6; }
-+        ac_fn_cxx_check_header_mongrel "$LINENO" "id3/tag.h" "ac_cv_header_id3_tag_h" "$ac_includes_default"
-+if test "x$ac_cv_header_id3_tag_h" = x""yes; then :
- 
+-
 -# So?  What about this header?
 -case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
 -  yes:no: )
@@ -27556,13 +38311,13 @@ index f51d803..459bf70 100755
 -fi
 -if test "x$ac_cv_header_id3_tag_h" = x""yes; then
 -  :
- else
- 
-                 CFLAGS="$CFLAGS -I$MT_SEARCHPATH_HEADERS"
-@@ -29411,145 +15472,8 @@ else
-                 CPPFLAGS="$CPPFLAGS -I$MT_SEARCHPATH_HEADERS"
-                 unset ac_cv_header_id3_tag_h
-                 as_ac_Header=`$as_echo "ac_cv_header_$MT_SEARCHPATH_HEADERS/id3/tag.h" | $as_tr_sh`
+-else
+-
+-                CFLAGS="$CFLAGS -I$MT_SEARCHPATH_HEADERS"
+-                CXXFLAGS="$CXXFLAGS -I$MT_SEARCHPATH_HEADERS"
+-                CPPFLAGS="$CPPFLAGS -I$MT_SEARCHPATH_HEADERS"
+-                unset ac_cv_header_id3_tag_h
+-                as_ac_Header=`$as_echo "ac_cv_header_$MT_SEARCHPATH_HEADERS/id3/tag.h" | $as_tr_sh`
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 -  { $as_echo "$as_me:$LINENO: checking for $MT_SEARCHPATH_HEADERS/id3/tag.h" >&5
 -$as_echo_n "checking for $MT_SEARCHPATH_HEADERS/id3/tag.h... " >&6; }
@@ -27611,11 +38366,14 @@ index f51d803..459bf70 100755
 -
 -	ac_header_compiler=no
 -fi
--
++ac_fn_cxx_check_header_mongrel "$LINENO" "$mt_id3lib_search_headers/id3/tag.h" "$as_ac_Header" "$ac_includes_default"
++if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 -$as_echo "$ac_header_compiler" >&6; }
--
++                mt_id3lib_cxxflags="-I${mt_id3lib_search_headers}"
+ 
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking $MT_SEARCHPATH_HEADERS/id3/tag.h presence" >&5
 -$as_echo_n "checking $MT_SEARCHPATH_HEADERS/id3/tag.h presence... " >&6; }
@@ -27645,17 +38403,26 @@ index f51d803..459bf70 100755
 -	 test ! -s conftest.err
 -       }; then
 -  ac_header_preproc=yes
--else
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -  ac_header_preproc=no
--fi
--
++                mt_id3lib_header_status=missing
++                if test "" = "pass"; then
++                    { $as_echo "$as_me:${as_lineno-$LINENO}: id3lib headers not found in requested location $mt_id3lib_search_headers" >&5
++$as_echo "$as_me: id3lib headers not found in requested location $mt_id3lib_search_headers" >&6;}
++                else
++                    as_fn_error $? "id3lib headers not found in requested location $mt_id3lib_search_headers" "$LINENO" 5
++                fi
++
++
+ fi
+ 
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$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_cxx_preproc_warn_flag in
 -  yes:no: )
@@ -27690,24 +38457,34 @@ index f51d803..459bf70 100755
 -$as_echo_n "checking for $MT_SEARCHPATH_HEADERS/id3/tag.h... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 -  $as_echo_n "(cached) " >&6
--else
++    else
++        unset ac_cv_header_id3_tag_h
++        ac_fn_cxx_check_header_mongrel "$LINENO" "id3/tag.h" "ac_cv_header_id3_tag_h" "$ac_includes_default"
++if test "x$ac_cv_header_id3_tag_h" = x""yes; then :
++
+ else
 -  eval "$as_ac_Header=\$ac_header_preproc"
 -fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
--
+ 
 -fi
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
++                CFLAGS="$CFLAGS -I$MT_SEARCHPATH_HEADERS"
++                CXXFLAGS="$CXXFLAGS -I$MT_SEARCHPATH_HEADERS"
++                CPPFLAGS="$CPPFLAGS -I$MT_SEARCHPATH_HEADERS"
++                unset ac_cv_header_id3_tag_h
++                as_ac_Header=`$as_echo "ac_cv_header_$MT_SEARCHPATH_HEADERS/id3/tag.h" | $as_tr_sh`
 +ac_fn_cxx_check_header_mongrel "$LINENO" "$MT_SEARCHPATH_HEADERS/id3/tag.h" "$as_ac_Header" "$ac_includes_default"
 +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
  
                          mt_id3lib_cxxflags="-I${MT_SEARCHPATH_HEADERS}"
  
-@@ -29593,10 +15517,10 @@ fi
+@@ -29593,10 +15017,10 @@
  
  
  # Check whether --with-id3lib-libs was given.
@@ -27720,7 +38497,7 @@ index f51d803..459bf70 100755
  $as_echo "$as_me: Will search for id3lib libs in $withval" >&6;}
  
  
-@@ -29606,18 +15530,14 @@ fi
+@@ -29606,18 +15030,14 @@
      if test "$mt_id3lib_search_libs" ; then
          unset ac_cv_lib_id3_main
          LDFLAGS="$LDFLAGS -L$mt_id3lib_search_libs"
@@ -27742,7 +38519,7 @@ index f51d803..459bf70 100755
  /* end confdefs.h.  */
  
  
-@@ -29629,43 +15549,18 @@ return main ();
+@@ -29629,43 +15049,18 @@
    return 0;
  }
  _ACEOF
@@ -27792,7 +38569,7 @@ index f51d803..459bf70 100755
  
                  mt_id3lib_libs="-lid3"
                  mt_id3lib_ldflags="-L$mt_id3lib_search_libs"
-@@ -29674,12 +15569,10 @@ else
+@@ -29674,12 +15069,10 @@
  
                  mt_id3lib_library_status=missing
                  if test "" = "pass"; then
@@ -27807,7 +38584,7 @@ index f51d803..459bf70 100755
                  fi
  
  
-@@ -29687,18 +15580,14 @@ fi
+@@ -29687,18 +15080,14 @@
  
      else
          unset ac_cv_lib_id3_main
@@ -27829,7 +38606,7 @@ index f51d803..459bf70 100755
  /* end confdefs.h.  */
  
  
-@@ -29710,43 +15599,18 @@ return main ();
+@@ -29710,43 +15099,18 @@
    return 0;
  }
  _ACEOF
@@ -27879,7 +38656,7 @@ index f51d803..459bf70 100755
  
                  mt_id3lib_libs="-lid3"
  
-@@ -29754,18 +15618,14 @@ else
+@@ -29754,73 +15118,263 @@
  
                  LDFLAGS="$LDFLAGS -L$MT_SEARCHPATH_LIBS"
                  unset ac_cv_lib_id3_main
@@ -27894,14 +38671,238 @@ index f51d803..459bf70 100755
  LIBS="-lid3  $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
--_ACEOF
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++
++
++int
++main ()
++{
++return main ();
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_cxx_try_link "$LINENO"; then :
++  ac_cv_lib_id3_main=yes
++else
++  ac_cv_lib_id3_main=no
++fi
++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_id3_main" >&5
++$as_echo "$ac_cv_lib_id3_main" >&6; }
++if test "x$ac_cv_lib_id3_main" = x""yes; then :
++
++                        mt_id3lib_libs="-lid3"
++                        mt_id3lib_ldflags="-L$MT_SEARCHPATH_LIBS"
++
++else
++
++                        mt_id3lib_library_status=missing
++
++
++fi
++
++
++
++fi
++
++    fi
++
++    if test "x$mt_id3lib_library_status" != xyes; then
++        mt_id3lib_libs=""
++        mt_id3lib_ldflags=""
++    fi
++
++    LIBS=$LIBS_SAVE
++    LDFLAGS=$LDFLAGS_SAVE
++    CFLAGS=$CFLAGS_SAVE
++    CXXFLAGS=$CXXFLAGS_SAVE
++    CPPFLAGS=$CPPFLAGS_SAVE
++
++        mt_id3lib_package_status=${mt_id3lib_library_status}
++    fi
++
++    if test "x$mt_id3lib_package_status" = xyes; then
++        ID3LIB_CFLAGS=${mt_id3lib_cxxflags}
++        ID3LIB_LIBS=${mt_id3lib_libs}
++        ID3LIB_LDFLAGS=${mt_id3lib_ldflags}
++    fi
++
++        mt_id3lib_status=${mt_id3lib_package_status}
++    fi
++
++    if test "x$mt_id3lib_status" = xyes; then
++
++$as_echo "#define HAVE_ID3LIB 1" >>confdefs.h
++
++    fi
++
++    ID3LIB_STATUS=${mt_id3lib_status}
++
++
++
++
++
++
++
++    if test "x$ID3LIB_STATUS" != xyes; then
++        if test "x$ZLIB_STATUS" != xyes; then
++
++
++    mt_zlib_arg_default=yes
++    mt_zlib_library_status=yes
++
++    LIBS_SAVE=$LIBS
++    LDFLAGS_SAVE=$LDFLAGS
++    CFLAGS_SAVE=$CFLAGS
++    CXXFLAGS_SAVE=$CXXFLAGS
++    CPPFLAGS_SAVE=$CPPFLAGS
++
++
++# Check whether --with-zlib-libs was given.
++if test "${with_zlib_libs+set}" = set; then :
++  withval=$with_zlib_libs;
++            mt_zlib_search_libs="$withval"
++            { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for zlib libs in $withval" >&5
++$as_echo "$as_me: Will search for zlib libs in $withval" >&6;}
++
++
++fi
++
++
++    if test "$mt_zlib_search_libs" ; then
++        unset ac_cv_lib_z_compress
++        LDFLAGS="$LDFLAGS -L$mt_zlib_search_libs"
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
++$as_echo_n "checking for compress in -lz... " >&6; }
++if test "${ac_cv_lib_z_compress+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-lz  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++
++/* Override any GCC internal prototype to avoid an error.
++   Use char because int might match the return type of a GCC
++   builtin and then its argument prototype would still apply.  */
++#ifdef __cplusplus
++extern "C"
++#endif
++char compress ();
++int
++main ()
++{
++return compress ();
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_cxx_try_link "$LINENO"; then :
++  ac_cv_lib_z_compress=yes
++else
++  ac_cv_lib_z_compress=no
++fi
++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_z_compress" >&5
++$as_echo "$ac_cv_lib_z_compress" >&6; }
++if test "x$ac_cv_lib_z_compress" = x""yes; then :
++
++                mt_zlib_libs="-lz"
++                mt_zlib_ldflags="-L$mt_zlib_search_libs"
++
++else
++
++                mt_zlib_library_status=missing
++                if test "" = "pass"; then
++                    { $as_echo "$as_me:${as_lineno-$LINENO}: zlib library not found in requested location $mt_zlib_search_libs" >&5
++$as_echo "$as_me: zlib library not found in requested location $mt_zlib_search_libs" >&6;}
++                else
++                    as_fn_error $? "zlib library not found in requested location $mt_zlib_search_libs" "$LINENO" 5
++                fi
++
++
++fi
++
++    else
++        unset ac_cv_lib_z_compress
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
++$as_echo_n "checking for compress in -lz... " >&6; }
++if test "${ac_cv_lib_z_compress+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-lz  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++
++/* Override any GCC internal prototype to avoid an error.
++   Use char because int might match the return type of a GCC
++   builtin and then its argument prototype would still apply.  */
++#ifdef __cplusplus
++extern "C"
++#endif
++char compress ();
++int
++main ()
++{
++return compress ();
++  ;
++  return 0;
++}
+ _ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
++if ac_fn_cxx_try_link "$LINENO"; then :
++  ac_cv_lib_z_compress=yes
++else
++  ac_cv_lib_z_compress=no
++fi
++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_z_compress" >&5
++$as_echo "$ac_cv_lib_z_compress" >&6; }
++if test "x$ac_cv_lib_z_compress" = x""yes; then :
++
++                mt_zlib_libs="-lz"
++
++else
++
++                LDFLAGS="$LDFLAGS -L$MT_SEARCHPATH_LIBS"
++                unset ac_cv_lib_z_compress
++                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
++$as_echo_n "checking for compress in -lz... " >&6; }
++if test "${ac_cv_lib_z_compress+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-lz  $LIBS"
 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
- 
-@@ -29777,43 +15637,18 @@ return main ();
+-
++/* 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 compress ();
+ int
+ main ()
+ {
+-return main ();
++return compress ();
+   ;
    return 0;
  }
  _ACEOF
@@ -27926,14 +38927,15 @@ index f51d803..459bf70 100755
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
+-  ac_cv_lib_id3_main=yes
 +if ac_fn_cxx_try_link "$LINENO"; then :
-   ac_cv_lib_id3_main=yes
++  ac_cv_lib_z_compress=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_lib_id3_main=no
-+  ac_cv_lib_id3_main=no
++  ac_cv_lib_z_compress=no
  fi
 -
 -rm -rf conftest.dSYM
@@ -27944,26 +38946,76 @@ index f51d803..459bf70 100755
  LIBS=$ac_check_lib_save_LIBS
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_id3_main" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_id3_main" >&5
- $as_echo "$ac_cv_lib_id3_main" >&6; }
+-$as_echo "$ac_cv_lib_id3_main" >&6; }
 -if test "x$ac_cv_lib_id3_main" = x""yes; then
-+if test "x$ac_cv_lib_id3_main" = x""yes; then :
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
++$as_echo "$ac_cv_lib_z_compress" >&6; }
++if test "x$ac_cv_lib_z_compress" = x""yes; then :
  
-                         mt_id3lib_libs="-lid3"
-                         mt_id3lib_ldflags="-L$MT_SEARCHPATH_LIBS"
-@@ -29856,9 +15691,7 @@ fi
+-                        mt_id3lib_libs="-lid3"
+-                        mt_id3lib_ldflags="-L$MT_SEARCHPATH_LIBS"
++                        mt_zlib_libs="-lz"
++                        mt_zlib_ldflags="-L$MT_SEARCHPATH_LIBS"
  
-     if test "x$mt_id3lib_status" = xyes; then
+ else
  
+-                        mt_id3lib_library_status=missing
++                        mt_zlib_library_status=missing
+ 
+ 
+ fi
+@@ -29831,9 +15385,9 @@
+ 
+     fi
+ 
+-    if test "x$mt_id3lib_library_status" != xyes; then
+-        mt_id3lib_libs=""
+-        mt_id3lib_ldflags=""
++    if test "x$mt_zlib_library_status" != xyes; then
++        mt_zlib_libs=""
++        mt_zlib_ldflags=""
+     fi
+ 
+     LIBS=$LIBS_SAVE
+@@ -29842,41 +15396,18 @@
+     CXXFLAGS=$CXXFLAGS_SAVE
+     CPPFLAGS=$CPPFLAGS_SAVE
+ 
+-        mt_id3lib_package_status=${mt_id3lib_library_status}
+-    fi
+-
+-    if test "x$mt_id3lib_package_status" = xyes; then
+-        ID3LIB_CFLAGS=${mt_id3lib_cxxflags}
+-        ID3LIB_LIBS=${mt_id3lib_libs}
+-        ID3LIB_LDFLAGS=${mt_id3lib_ldflags}
+-    fi
+-
+-        mt_id3lib_status=${mt_id3lib_package_status}
+-    fi
+-
+-    if test "x$mt_id3lib_status" = xyes; then
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_ID3LIB 1
 -_ACEOF
-+$as_echo "#define HAVE_ID3LIB 1" >>confdefs.h
+-
+-    fi
+-
+-    ID3LIB_STATUS=${mt_id3lib_status}
+ 
++    ZLIB_LIBS=${mt_zlib_libs}
++    ZLIB_LDFLAGS=${mt_zlib_ldflags}
++    ZLIB_STATUS=${mt_zlib_library_status}
+ 
  
-     fi
  
-@@ -29876,7 +15709,7 @@ _ACEOF
-         else
+ 
+ 
+-            if test "x$ID3LIB_STATUS" = xyes; then
+-                ID3LIB_LIBS="$ID3LIB_LIBS $ZLIB_LIBS"
+-                ID3LIB_LDFLAGS="$ID3LIB_LDFLAGS $ZLIB_LDFLAGS"
+-            fi
+-        else
              LDFLAGS="$LDFLAGS $ZLIB_LDFLAGS"
              LIBS="$LIBS $ZLIB_LIBS"
 -            { $as_echo "$as_me:$LINENO: retrying id3lib check with zlib flags" >&5
@@ -27971,7 +39023,7 @@ index f51d803..459bf70 100755
  $as_echo "$as_me: retrying id3lib check with zlib flags" >&6;}
  
      mt_id3lib_status=yes
-@@ -29894,10 +15727,10 @@ $as_echo "$as_me: retrying id3lib check with zlib flags" >&6;}
+@@ -29894,10 +15425,10 @@
  
  
  # Check whether --with-id3lib-h was given.
@@ -27984,7 +39036,7 @@ index f51d803..459bf70 100755
  $as_echo "$as_me: Will search for id3lib headers in $withval" >&6;}
  
  
-@@ -29910,145 +15743,8 @@ fi
+@@ -29910,145 +15441,8 @@
          CXXFLAGS="$CXXFLAGS -I${mt_id3lib_search_headers}"
          CPPFLAGS="$CPPFLAGS -I${mt_id3lib_search_headers}"
          as_ac_Header=`$as_echo "ac_cv_header_$mt_id3lib_search_headers/id3/tag.h" | $as_tr_sh`
@@ -28132,7 +39184,7 @@ index f51d803..459bf70 100755
  
                  mt_id3lib_cxxflags="-I${mt_id3lib_search_headers}"
  
-@@ -30056,12 +15752,10 @@ else
+@@ -30056,12 +15450,10 @@
  
                  mt_id3lib_header_status=missing
                  if test "" = "pass"; then
@@ -28147,7 +39199,7 @@ index f51d803..459bf70 100755
                  fi
  
  
-@@ -30070,140 +15764,9 @@ fi
+@@ -30070,286 +15462,18 @@
  
      else
          unset ac_cv_header_id3_tag_h
@@ -28234,9 +39286,7 @@ index f51d803..459bf70 100755
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+        ac_fn_cxx_check_header_mongrel "$LINENO" "id3/tag.h" "ac_cv_header_id3_tag_h" "$ac_includes_default"
-+if test "x$ac_cv_header_id3_tag_h" = x""yes; then :
- 
+-
 -  ac_header_preproc=no
 -fi
 -
@@ -28283,17 +39333,19 @@ index f51d803..459bf70 100755
 -fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_id3_tag_h" >&5
 -$as_echo "$ac_cv_header_id3_tag_h" >&6; }
--
++        ac_fn_cxx_check_header_mongrel "$LINENO" "id3/tag.h" "ac_cv_header_id3_tag_h" "$ac_includes_default"
++if test "x$ac_cv_header_id3_tag_h" = x""yes; then :
+ 
 -fi
 -if test "x$ac_cv_header_id3_tag_h" = x""yes; then
 -  :
  else
  
                  CFLAGS="$CFLAGS -I$MT_SEARCHPATH_HEADERS"
-@@ -30211,145 +15774,8 @@ else
-                 CPPFLAGS="$CPPFLAGS -I$MT_SEARCHPATH_HEADERS"
-                 unset ac_cv_header_id3_tag_h
-                 as_ac_Header=`$as_echo "ac_cv_header_$MT_SEARCHPATH_HEADERS/id3/tag.h" | $as_tr_sh`
+-                CXXFLAGS="$CXXFLAGS -I$MT_SEARCHPATH_HEADERS"
+-                CPPFLAGS="$CPPFLAGS -I$MT_SEARCHPATH_HEADERS"
+-                unset ac_cv_header_id3_tag_h
+-                as_ac_Header=`$as_echo "ac_cv_header_$MT_SEARCHPATH_HEADERS/id3/tag.h" | $as_tr_sh`
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 -  { $as_echo "$as_me:$LINENO: checking for $MT_SEARCHPATH_HEADERS/id3/tag.h" >&5
 -$as_echo_n "checking for $MT_SEARCHPATH_HEADERS/id3/tag.h... " >&6; }
@@ -28433,12 +39485,16 @@ index f51d803..459bf70 100755
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
++                CXXFLAGS="$CXXFLAGS -I$MT_SEARCHPATH_HEADERS"
++                CPPFLAGS="$CPPFLAGS -I$MT_SEARCHPATH_HEADERS"
++                unset ac_cv_header_id3_tag_h
++                as_ac_Header=`$as_echo "ac_cv_header_$MT_SEARCHPATH_HEADERS/id3/tag.h" | $as_tr_sh`
 +ac_fn_cxx_check_header_mongrel "$LINENO" "$MT_SEARCHPATH_HEADERS/id3/tag.h" "$as_ac_Header" "$ac_includes_default"
 +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
  
                          mt_id3lib_cxxflags="-I${MT_SEARCHPATH_HEADERS}"
  
-@@ -30393,10 +15819,10 @@ fi
+@@ -30393,10 +15517,10 @@
  
  
  # Check whether --with-id3lib-libs was given.
@@ -28451,7 +39507,7 @@ index f51d803..459bf70 100755
  $as_echo "$as_me: Will search for id3lib libs in $withval" >&6;}
  
  
-@@ -30406,18 +15832,14 @@ fi
+@@ -30406,18 +15530,14 @@
      if test "$mt_id3lib_search_libs" ; then
          unset ac_cv_lib_id3_main
          LDFLAGS="$LDFLAGS -L$mt_id3lib_search_libs"
@@ -28473,7 +39529,7 @@ index f51d803..459bf70 100755
  /* end confdefs.h.  */
  
  
-@@ -30429,43 +15851,18 @@ return main ();
+@@ -30429,43 +15549,18 @@
    return 0;
  }
  _ACEOF
@@ -28523,7 +39579,7 @@ index f51d803..459bf70 100755
  
                  mt_id3lib_libs="-lid3"
                  mt_id3lib_ldflags="-L$mt_id3lib_search_libs"
-@@ -30474,12 +15871,10 @@ else
+@@ -30474,12 +15569,10 @@
  
                  mt_id3lib_library_status=missing
                  if test "" = "pass"; then
@@ -28538,7 +39594,7 @@ index f51d803..459bf70 100755
                  fi
  
  
-@@ -30487,18 +15882,14 @@ fi
+@@ -30487,18 +15580,14 @@
  
      else
          unset ac_cv_lib_id3_main
@@ -28560,7 +39616,7 @@ index f51d803..459bf70 100755
  /* end confdefs.h.  */
  
  
-@@ -30510,43 +15901,18 @@ return main ();
+@@ -30510,43 +15599,18 @@
    return 0;
  }
  _ACEOF
@@ -28610,7 +39666,7 @@ index f51d803..459bf70 100755
  
                  mt_id3lib_libs="-lid3"
  
-@@ -30554,18 +15920,14 @@ else
+@@ -30554,18 +15618,14 @@
  
                  LDFLAGS="$LDFLAGS -L$MT_SEARCHPATH_LIBS"
                  unset ac_cv_lib_id3_main
@@ -28632,7 +39688,7 @@ index f51d803..459bf70 100755
  /* end confdefs.h.  */
  
  
-@@ -30577,43 +15939,18 @@ return main ();
+@@ -30577,43 +15637,18 @@
    return 0;
  }
  _ACEOF
@@ -28682,7 +39738,7 @@ index f51d803..459bf70 100755
  
                          mt_id3lib_libs="-lid3"
                          mt_id3lib_ldflags="-L$MT_SEARCHPATH_LIBS"
-@@ -30656,9 +15993,7 @@ fi
+@@ -30656,9 +15691,7 @@
  
      if test "x$mt_id3lib_status" = xyes; then
  
@@ -28693,26 +39749,51 @@ index f51d803..459bf70 100755
  
      fi
  
-@@ -30691,13 +16026,9 @@ 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
- 
+@@ -30673,1681 +15706,850 @@
+                 ID3LIB_LIBS="$ID3LIB_LIBS $ZLIB_LIBS"
+                 ID3LIB_LDFLAGS="$ID3LIB_LDFLAGS $ZLIB_LDFLAGS"
+             fi
+-        fi
+-
+-
+-
+-    fi
+-fi
+-
+-if test "x$ID3LIB_STATUS" = xyes; then
+-   CFLAGS="$CFLAGS $ID3_CFLAGS"
+-   CXXFLAGS="$CXXFLAGS $ID3_CFLAGS"
+-   LDFLAGS="$LDFLAGS $ID3LIB_LDFLAGS $ID3LIB_LIBS"
+-
+-   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
+-
 -   { $as_echo "$as_me:$LINENO: checking for album art support in id3lib" >&5
-+   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for album art support in id3lib" >&5
- $as_echo_n "checking for album art support in id3lib... " >&6; }
+-$as_echo_n "checking for album art support in id3lib... " >&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 <id3/tag.h>
-@@ -30714,43 +16045,20 @@ main ()
-   return 0;
- }
- _ACEOF
+-/* end confdefs.h.  */
+-
+-                #include <id3/tag.h>
+-                #include <id3/misc_support.h>
+-
+-int
+-main ()
+-{
+-
+-                (void)ID3_HasPicture(0);
+-
+-
+-  ;
+-  return 0;
+-}
+-_ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -28731,233 +39812,283 @@ index f51d803..459bf70 100755
 -	 test -z "$ac_cxx_werror_flag" ||
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
-+if ac_fn_cxx_try_compile "$LINENO"; then :
- 
+-
 -            { $as_echo "$as_me:$LINENO: result: yes" >&5
-+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
- $as_echo "yes" >&6; }
- 
+-$as_echo "yes" >&6; }
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_ID3_ALBUMART 1
 -_ACEOF
-+$as_echo "#define HAVE_ID3_ALBUMART 1" >>confdefs.h
- 
- 
- else
+-
+-
+-else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
- 
+-
 -            { $as_echo "$as_me:$LINENO: result: no" >&5
-+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
- $as_echo "no" >&6; }
+-$as_echo "no" >&6; }
++        else
++            LDFLAGS="$LDFLAGS $ZLIB_LDFLAGS"
++            LIBS="$LIBS $ZLIB_LIBS"
++            { $as_echo "$as_me:${as_lineno-$LINENO}: retrying id3lib check with zlib flags" >&5
++$as_echo "$as_me: retrying id3lib check with zlib flags" >&6;}
  
- fi
--
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-    ac_ext=cpp
- ac_cpp='$CXXCPP $CPPFLAGS'
-@@ -30762,13 +16070,9 @@ else
-     if (test "x$ID3LIB_OPTION_REQUESTED" = xyes) &&
-        (test "x$ID3LIB_OPTION_ENABLED" = xyes); then
-         if test "x$TAGLIB_STATUS" = xyes; then
+-fi
++    mt_id3lib_status=yes
+ 
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-   ac_ext=cpp
+-ac_cpp='$CXXCPP $CPPFLAGS'
+-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
++    if test "x$mt_id3lib_status" = xyes; then
+ 
+-else
+-    if (test "x$ID3LIB_OPTION_REQUESTED" = xyes) &&
+-       (test "x$ID3LIB_OPTION_ENABLED" = xyes); then
+-        if test "x$TAGLIB_STATUS" = xyes; then
 -            { { $as_echo "$as_me:$LINENO: error: Please select either taglib or id3lib, but not both." >&5
 -$as_echo "$as_me: error: Please select either taglib or id3lib, but not both." >&2;}
 -   { (exit 1); exit 1; }; }
-+            as_fn_error $? "Please select either taglib or id3lib, but not both." "$LINENO" 5
-         else
+-        else
 -            { { $as_echo "$as_me:$LINENO: error: unable to configure id3lib support" >&5
 -$as_echo "$as_me: error: unable to configure id3lib support" >&2;}
 -   { (exit 1); exit 1; }; }
-+            as_fn_error $? "unable to configure id3lib support" "$LINENO" 5
-         fi
-     else
-         ID3LIB_STATUS=disabled
-@@ -30787,29 +16091,21 @@ CURL_CFLAGS=
- CURL_OK=no
+-        fi
+-    else
+-        ID3LIB_STATUS=disabled
+-    fi
+-fi
  
- if ((test "x$YOUTUBE_OPTION_ENABLED" = xyes) && (test "x$YOUTUBE_OPTION_REQUESTED" = xyes) && (test $USE_CURL -eq 0) && (test $CURL_REQUESTED -eq 1)); then
+-LDFLAGS="$LDFLAGS_SAVE"
+-LIBS="$LIBS_SAVE"
+-CXXFLAGS="$CXXFLAGS_SAVE"
+-CPPFLAGS="$CPPFLAGS_SAVE"
+-######## curl
++    LIBS_SAVE=$LIBS
++    LDFLAGS_SAVE=$LDFLAGS
++    CFLAGS_SAVE=$CFLAGS
++    CXXFLAGS_SAVE=$CXXFLAGS
++    CPPFLAGS_SAVE=$CPPFLAGS
+ 
+-CURL_PROG_FOUND=0
+-CURL_LIBS=
+-CURL_CFLAGS=
+-CURL_OK=no
++    mt_id3lib_header_status=yes
+ 
+-if ((test "x$YOUTUBE_OPTION_ENABLED" = xyes) && (test "x$YOUTUBE_OPTION_REQUESTED" = xyes) && (test $USE_CURL -eq 0) && (test $CURL_REQUESTED -eq 1)); then
 -    { { $as_echo "$as_me:$LINENO: error: You enabled YouTube but disabled curl, however curl is required by the YouTube feature" >&5
 -$as_echo "$as_me: error: You enabled YouTube but disabled curl, however curl is required by the YouTube feature" >&2;}
 -   { (exit 1); exit 1; }; }
-+    as_fn_error $? "You enabled YouTube but disabled curl, however curl is required by the YouTube feature" "$LINENO" 5
- fi
+-fi
  
- if ((test "x$WEBORAMA_OPTION_ENABLED" = xyes) && (test "x$WEBORAMA_OPTION_REQUESTED" = xyes) && (test $USE_CURL -eq 0) && (test $CURL_REQUESTED -eq 1)); then
+-if ((test "x$WEBORAMA_OPTION_ENABLED" = xyes) && (test "x$WEBORAMA_OPTION_REQUESTED" = xyes) && (test $USE_CURL -eq 0) && (test $CURL_REQUESTED -eq 1)); then
 -    { { $as_echo "$as_me:$LINENO: error: You enabled Weborama but disabled curl, however curl is required by the Weborama feature" >&5
 -$as_echo "$as_me: error: You enabled Weborama but disabled curl, however curl is required by the Weborama feature" >&2;}
 -   { (exit 1); exit 1; }; }
-+    as_fn_error $? "You enabled Weborama but disabled curl, however curl is required by the Weborama feature" "$LINENO" 5
- fi
+-fi
++# Check whether --with-id3lib-h was given.
++if test "${with_id3lib_h+set}" = set; then :
++  withval=$with_id3lib_h;
++            mt_id3lib_search_headers="$withval"
++            { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for id3lib headers in $withval" >&5
++$as_echo "$as_me: Will search for id3lib headers in $withval" >&6;}
  
- if ((test "x$ATRAILERS_OPTION_ENABLED" = xyes) && (test "x$ATRAILERS_OPTION_REQUESTED" = xyes) && (test $USE_CURL -eq 0) && (test $CURL_REQUESTED -eq 1)); then
+-if ((test "x$ATRAILERS_OPTION_ENABLED" = xyes) && (test "x$ATRAILERS_OPTION_REQUESTED" = xyes) && (test $USE_CURL -eq 0) && (test $CURL_REQUESTED -eq 1)); then
 -    { { $as_echo "$as_me:$LINENO: error: You enabled Apple Trailers but disabled curl, however curl is required by the Apple Trailers feature" >&5
 -$as_echo "$as_me: error: You enabled Apple Trailers but disabled curl, however curl is required by the Apple Trailers feature" >&2;}
 -   { (exit 1); exit 1; }; }
-+    as_fn_error $? "You enabled Apple Trailers but disabled curl, however curl is required by the Apple Trailers feature" "$LINENO" 5
- fi
+-fi
  
- if ((test "x$YOUTUBE_OPTION_ENABLED" != xyes) && (test "x$SOPCAST_OPTION_ENABLED" != xyes) && (test "x$EXTERNAL_TRANSCODING_OPTION" != xyes) && (test "x$ATRAILERS_OPTION_ENABLED" != xyes) && (test "x$WEBORAMA_OPTION_ENABLED" != xyes)); then
-     if test $USE_CURL -eq 1; then
-         if test $CURL_REQUESTED -eq 1; then
+-if ((test "x$YOUTUBE_OPTION_ENABLED" != xyes) && (test "x$SOPCAST_OPTION_ENABLED" != xyes) && (test "x$EXTERNAL_TRANSCODING_OPTION" != xyes) && (test "x$ATRAILERS_OPTION_ENABLED" != xyes) && (test "x$WEBORAMA_OPTION_ENABLED" != xyes)); then
+-    if test $USE_CURL -eq 1; then
+-        if test $CURL_REQUESTED -eq 1; then
 -            { { $as_echo "$as_me:$LINENO: error: You enabled curl support but the external transcoding, YouTube and SopCast features are disabled - curl is not needed without it" >&5
 -$as_echo "$as_me: error: You enabled curl support but the external transcoding, YouTube and SopCast features are disabled - curl is not needed without it" >&2;}
 -   { (exit 1); exit 1; }; }
-+            as_fn_error $? "You enabled curl support but the external transcoding, YouTube and SopCast features are disabled - curl is not needed without it" "$LINENO" 5
-         else
-             CURL_OK=no
-             USE_CURL=0
-@@ -30818,11 +16114,11 @@ $as_echo "$as_me: error: You enabled curl support but the external transcoding,
+-        else
+-            CURL_OK=no
+-            USE_CURL=0
+-        fi
+-    fi
  fi
  
- if (((test "x$YOUTUBE_OPTION_ENABLED" = xyes) || (test "x$SOPCAST_OPTION_ENABLED" = xyes) || (test "x$ATRAILERS_OPTION_ENABLED" = xyes) || (test "x$WEBORAMA_OPTION_ENABLED" = xyes) || (test "x$EXTERNAL_TRANSCODING_OPTION" = xyes)) && (test $USE_CURL -eq 1)); then
+-if (((test "x$YOUTUBE_OPTION_ENABLED" = xyes) || (test "x$SOPCAST_OPTION_ENABLED" = xyes) || (test "x$ATRAILERS_OPTION_ENABLED" = xyes) || (test "x$WEBORAMA_OPTION_ENABLED" = xyes) || (test "x$EXTERNAL_TRANSCODING_OPTION" = xyes)) && (test $USE_CURL -eq 1)); then
 -    { $as_echo "$as_me:$LINENO: Checking for curl (needed for extended external transcoding/YouTube support)" >&5
-+    { $as_echo "$as_me:${as_lineno-$LINENO}: Checking for curl (needed for extended external transcoding/YouTube support)" >&5
- $as_echo "$as_me: Checking for curl (needed for extended external transcoding/YouTube support)" >&6;}
-     CURL_OK=yes
-     if test -n "$CURL_SEARCH_CONFIG"; then
+-$as_echo "$as_me: Checking for curl (needed for extended external transcoding/YouTube support)" >&6;}
+-    CURL_OK=yes
+-    if test -n "$CURL_SEARCH_CONFIG"; then
 -        { $as_echo "$as_me:$LINENO: You specified $CURL_SEARCH_CONFIG for curl-config" >&5
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: You specified $CURL_SEARCH_CONFIG for curl-config" >&5
- $as_echo "$as_me: You specified $CURL_SEARCH_CONFIG for curl-config" >&6;}
- 
-         if test -f "$CURL_SEARCH_CONFIG"; then
-@@ -30832,24 +16128,20 @@ $as_echo "$as_me: You specified $CURL_SEARCH_CONFIG for curl-config" >&6;}
-         fi
+-$as_echo "$as_me: You specified $CURL_SEARCH_CONFIG for curl-config" >&6;}
+ 
+-        if test -f "$CURL_SEARCH_CONFIG"; then
+-            curlconfig="$CURL_SEARCH_CONFIG"
+-        else
+-            curlconfig="no"
+-        fi
++    if test "$mt_id3lib_search_headers" ; then
++        unset ac_cv_header_id3_tag_h
++        CFLAGS="$CFLAGS -I${mt_id3lib_search_headers}"
++        CXXFLAGS="$CXXFLAGS -I${mt_id3lib_search_headers}"
++        CPPFLAGS="$CPPFLAGS -I${mt_id3lib_search_headers}"
++        as_ac_Header=`$as_echo "ac_cv_header_$mt_id3lib_search_headers/id3/tag.h" | $as_tr_sh`
++ac_fn_cxx_check_header_mongrel "$LINENO" "$mt_id3lib_search_headers/id3/tag.h" "$as_ac_Header" "$ac_includes_default"
++if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
  
-         if test "x$curlconfig" = xno; then
+-        if test "x$curlconfig" = xno; then
 -            { { $as_echo "$as_me:$LINENO: error: $CURL_SEARCH_CONFIG not found" >&5
 -$as_echo "$as_me: error: $CURL_SEARCH_CONFIG not found" >&2;}
 -   { (exit 1); exit 1; }; }
-+            as_fn_error $? "$CURL_SEARCH_CONFIG not found" "$LINENO" 5
-         else
-             CURL_TEST=`${curlconfig} --version 2>/dev/null`
-             if test -z "$CURL_TEST"; then
+-        else
+-            CURL_TEST=`${curlconfig} --version 2>/dev/null`
+-            if test -z "$CURL_TEST"; then
 -                { { $as_echo "$as_me:$LINENO: error: ${curlconfig} could not be executed or returned invalid values" >&5
 -$as_echo "$as_me: error: ${curlconfig} could not be executed or returned invalid values" >&2;}
 -   { (exit 1); exit 1; }; }
-+                as_fn_error $? "${curlconfig} could not be executed or returned invalid values" "$LINENO" 5
-             fi
-             CURL_PROG_FOUND=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
+-            fi
+-            CURL_PROG_FOUND=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
 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
- $as_echo_n "checking for $ac_word... " >&6; }
+-$as_echo_n "checking for $ac_word... " >&6; }
 -if test "${ac_cv_path_curlconfig+set}" = set; then
-+if test "${ac_cv_path_curlconfig+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
-   case $curlconfig in
-@@ -30862,14 +16154,14 @@ for as_dir in $PATH
- do
-   IFS=$as_save_IFS
-   test -z "$as_dir" && as_dir=.
+-  $as_echo_n "(cached) " >&6
+-else
+-  case $curlconfig in
+-  [\\/]* | ?:[\\/]*)
+-  ac_cv_path_curlconfig="$curlconfig" # Let the user override the test with a path.
+-  ;;
+-  *)
+-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+-for as_dir in $PATH
+-do
+-  IFS=$as_save_IFS
+-  test -z "$as_dir" && as_dir=.
 -  for ac_exec_ext in '' $ac_executable_extensions; do
-+    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_curlconfig="$as_dir/$ac_word$ac_exec_ext"
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+-    ac_cv_path_curlconfig="$as_dir/$ac_word$ac_exec_ext"
 -    $as_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
+-    break 2
+-  fi
 -done
-+  done
- IFS=$as_save_IFS
+-done
+-IFS=$as_save_IFS
++                mt_id3lib_cxxflags="-I${mt_id3lib_search_headers}"
  
-   test -z "$ac_cv_path_curlconfig" && ac_cv_path_curlconfig="no"
-@@ -30878,10 +16170,10 @@ esac
- fi
- curlconfig=$ac_cv_path_curlconfig
- if test -n "$curlconfig"; then
+-  test -z "$ac_cv_path_curlconfig" && ac_cv_path_curlconfig="no"
+-  ;;
+-esac
+-fi
+-curlconfig=$ac_cv_path_curlconfig
+-if test -n "$curlconfig"; then
 -  { $as_echo "$as_me:$LINENO: result: $curlconfig" >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $curlconfig" >&5
- $as_echo "$curlconfig" >&6; }
+-$as_echo "$curlconfig" >&6; }
  else
 -  { $as_echo "$as_me:$LINENO: result: no" >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
- $as_echo "no" >&6; }
- fi
+-$as_echo "no" >&6; }
+-fi
+-
  
-@@ -30890,9 +16182,9 @@ fi
-             unset ac_cv_path_curlconfig
-             # Extract the first word of "curl-config", so it can be a program name with args.
- set dummy curl-config; ac_word=$2
+-        if test "x$curlconfig" = xno; then
+-            unset ac_cv_path_curlconfig
+-            # Extract the first word of "curl-config", so it can be a program name with args.
+-set dummy curl-config; ac_word=$2
 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
- $as_echo_n "checking for $ac_word... " >&6; }
+-$as_echo_n "checking for $ac_word... " >&6; }
 -if test "${ac_cv_path_curlconfig+set}" = set; then
-+if test "${ac_cv_path_curlconfig+set}" = set; then :
-   $as_echo_n "(cached) " >&6
- else
-   case $curlconfig in
-@@ -30905,14 +16197,14 @@ for as_dir in $SEARCH_DIR_PROGS
- do
-   IFS=$as_save_IFS
-   test -z "$as_dir" && as_dir=.
+-  $as_echo_n "(cached) " >&6
+-else
+-  case $curlconfig in
+-  [\\/]* | ?:[\\/]*)
+-  ac_cv_path_curlconfig="$curlconfig" # Let the user override the test with a path.
+-  ;;
+-  *)
+-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+-for as_dir in $SEARCH_DIR_PROGS
+-do
+-  IFS=$as_save_IFS
+-  test -z "$as_dir" && as_dir=.
 -  for ac_exec_ext in '' $ac_executable_extensions; do
-+    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_curlconfig="$as_dir/$ac_word$ac_exec_ext"
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+-    ac_cv_path_curlconfig="$as_dir/$ac_word$ac_exec_ext"
 -    $as_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
+-    break 2
+-  fi
 -done
-+  done
- IFS=$as_save_IFS
+-done
+-IFS=$as_save_IFS
++                mt_id3lib_header_status=missing
++                if test "" = "pass"; then
++                    { $as_echo "$as_me:${as_lineno-$LINENO}: id3lib headers not found in requested location $mt_id3lib_search_headers" >&5
++$as_echo "$as_me: id3lib headers not found in requested location $mt_id3lib_search_headers" >&6;}
++                else
++                    as_fn_error $? "id3lib headers not found in requested location $mt_id3lib_search_headers" "$LINENO" 5
++                fi
++
  
-   test -z "$ac_cv_path_curlconfig" && ac_cv_path_curlconfig="no"
-@@ -30921,17 +16213,17 @@ esac
- fi
- curlconfig=$ac_cv_path_curlconfig
- if test -n "$curlconfig"; then
+-  test -z "$ac_cv_path_curlconfig" && ac_cv_path_curlconfig="no"
+-  ;;
+-esac
+-fi
+-curlconfig=$ac_cv_path_curlconfig
+-if test -n "$curlconfig"; then
 -  { $as_echo "$as_me:$LINENO: result: $curlconfig" >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $curlconfig" >&5
- $as_echo "$curlconfig" >&6; }
- else
+-$as_echo "$curlconfig" >&6; }
+-else
 -  { $as_echo "$as_me:$LINENO: result: no" >&5
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
- $as_echo "no" >&6; }
+-$as_echo "no" >&6; }
  fi
  
  
-             if test "x$curlconfig" = xno; then
-                 CURL_OK=missing
+-            if test "x$curlconfig" = xno; then
+-                CURL_OK=missing
 -                { $as_echo "$as_me:$LINENO: result: curl-config not found, please install the curl-devel package" >&5
-+                { $as_echo "$as_me:${as_lineno-$LINENO}: result: curl-config not found, please install the curl-devel package" >&5
- $as_echo "curl-config not found, please install the curl-devel package" >&6; }
-             else
-                 CURL_PROG_FOUND=1
-@@ -30942,16 +16234,16 @@ $as_echo "curl-config not found, please install the curl-devel package" >&6; }
-    fi
+-$as_echo "curl-config not found, please install the curl-devel package" >&6; }
+-            else
+-                CURL_PROG_FOUND=1
+-            fi
+-        else
+-            CURL_PROG_FOUND=1
+-        fi
+-   fi
++    else
++        unset ac_cv_header_id3_tag_h
++        ac_fn_cxx_check_header_mongrel "$LINENO" "id3/tag.h" "ac_cv_header_id3_tag_h" "$ac_includes_default"
++if test "x$ac_cv_header_id3_tag_h" = x""yes; then :
  
-    if test $CURL_PROG_FOUND -eq 1 ; then
+-   if test $CURL_PROG_FOUND -eq 1 ; then
 -        { $as_echo "$as_me:$LINENO: checking curl cflags" >&5
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking curl cflags" >&5
- $as_echo_n "checking curl cflags... " >&6; }
-         CURL_CFLAGS=`${curlconfig} --cflags`
+-$as_echo_n "checking curl cflags... " >&6; }
+-        CURL_CFLAGS=`${curlconfig} --cflags`
 -        { $as_echo "$as_me:$LINENO: result: $CURL_CFLAGS" >&5
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CURL_CFLAGS" >&5
- $as_echo "$CURL_CFLAGS" >&6; }
+-$as_echo "$CURL_CFLAGS" >&6; }
++else
  
 -        { $as_echo "$as_me:$LINENO: checking curl libraries" >&5
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking curl libraries" >&5
- $as_echo_n "checking curl libraries... " >&6; }
-         CURL_LIBS=`${curlconfig} --libs`
+-$as_echo_n "checking curl libraries... " >&6; }
+-        CURL_LIBS=`${curlconfig} --libs`
 -        { $as_echo "$as_me:$LINENO: result: $CURL_LIBS" >&5
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CURL_LIBS" >&5
- $as_echo "$CURL_LIBS" >&6; }
-     fi
- fi
-@@ -30959,151 +16251,12 @@ fi
- if test "x$CURL_OK" = xyes; then
-     CPPFLAGS="$CPPFLAGS $CURL_CFLAGS"
-     CXXFLAGS="$CXXFLAGS $CURL_CFLAGS"
--
+-$as_echo "$CURL_LIBS" >&6; }
+-    fi
+-fi
++                CFLAGS="$CFLAGS -I$MT_SEARCHPATH_HEADERS"
++                CXXFLAGS="$CXXFLAGS -I$MT_SEARCHPATH_HEADERS"
++                CPPFLAGS="$CPPFLAGS -I$MT_SEARCHPATH_HEADERS"
++                unset ac_cv_header_id3_tag_h
++                as_ac_Header=`$as_echo "ac_cv_header_$MT_SEARCHPATH_HEADERS/id3/tag.h" | $as_tr_sh`
++ac_fn_cxx_check_header_mongrel "$LINENO" "$MT_SEARCHPATH_HEADERS/id3/tag.h" "$as_ac_Header" "$ac_includes_default"
++if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ 
+-if test "x$CURL_OK" = xyes; then
+-    CPPFLAGS="$CPPFLAGS $CURL_CFLAGS"
+-    CXXFLAGS="$CXXFLAGS $CURL_CFLAGS"
++                        mt_id3lib_cxxflags="-I${MT_SEARCHPATH_HEADERS}"
+ 
 -for ac_header in curl/curl.h
 -do
 -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -29003,17 +40134,20 @@ index f51d803..459bf70 100755
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_header_compiler=yes
--else
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	ac_header_compiler=no
--fi
--
++                        mt_id3lib_header_status=missing
++
++
+ fi
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 -$as_echo "$ac_header_compiler" >&6; }
--
+ 
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
 -$as_echo_n "checking $ac_header presence... " >&6; }
@@ -29046,14 +40180,15 @@ index f51d803..459bf70 100755
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -  ac_header_preproc=no
--fi
--
++
+ fi
+ 
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$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_cxx_preproc_warn_flag in
 -  yes:no: )
@@ -29095,45 +40230,92 @@ index f51d803..459bf70 100755
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
--
++    fi
+ 
 -fi
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+    for ac_header in curl/curl.h
-+do :
-+  ac_fn_cxx_check_header_mongrel "$LINENO" "curl/curl.h" "ac_cv_header_curl_curl_h" "$ac_includes_default"
-+if test "x$ac_cv_header_curl_curl_h" = x""yes; then :
-   cat >>confdefs.h <<_ACEOF
+-  cat >>confdefs.h <<_ACEOF
 -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-+#define HAVE_CURL_CURL_H 1
- _ACEOF
+-_ACEOF
++    if test "x$mt_id3lib_header_status" != xyes; then
++        mt_id3lib_cxxflags=""
++    fi
  
- else
-@@ -31117,19 +16270,14 @@ fi
+-else
+-  CURL_OK=missing
++    LIBS=$LIBS_SAVE
++    LDFLAGS=$LDFLAGS_SAVE
++    CFLAGS=$CFLAGS_SAVE
++    CXXFLAGS=$CXXFLAGS_SAVE
++    CPPFLAGS=$CPPFLAGS_SAVE
+ 
+-fi
++    mt_id3lib_package_status=${mt_id3lib_header_status}
++
++    if test "x$mt_id3lib_package_status" = xyes; then
++
++    mt_id3lib_arg_default=yes
++    mt_id3lib_library_status=yes
++
++    LIBS_SAVE=$LIBS
++    LDFLAGS_SAVE=$LDFLAGS
++    CFLAGS_SAVE=$CFLAGS
++    CXXFLAGS_SAVE=$CXXFLAGS
++    CPPFLAGS_SAVE=$CPPFLAGS
++
++
++# Check whether --with-id3lib-libs was given.
++if test "${with_id3lib_libs+set}" = set; then :
++  withval=$with_id3lib_libs;
++            mt_id3lib_search_libs="$withval"
++            { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for id3lib libs in $withval" >&5
++$as_echo "$as_me: Will search for id3lib libs in $withval" >&6;}
+ 
+-done
+ 
+ fi
+ 
+-if test "x$CURL_OK" = xyes; then
+-    LDFLAGS="$CURL_LIBS"
  
- if test "x$CURL_OK" = xyes; then
-     LDFLAGS="$CURL_LIBS"
--
 -{ $as_echo "$as_me:$LINENO: checking for curl_easy_init in -lcurl" >&5
-+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for curl_easy_init in -lcurl" >&5
- $as_echo_n "checking for curl_easy_init in -lcurl... " >&6; }
+-$as_echo_n "checking for curl_easy_init in -lcurl... " >&6; }
 -if test "${ac_cv_lib_curl_curl_easy_init+set}" = set; then
-+if test "${ac_cv_lib_curl_curl_easy_init+set}" = set; then :
++    if test "$mt_id3lib_search_libs" ; then
++        unset ac_cv_lib_id3_main
++        LDFLAGS="$LDFLAGS -L$mt_id3lib_search_libs"
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lid3" >&5
++$as_echo_n "checking for main in -lid3... " >&6; }
++if test "${ac_cv_lib_id3_main+set}" = set; then :
    $as_echo_n "(cached) " >&6
  else
    ac_check_lib_save_LIBS=$LIBS
- LIBS="-lcurl  $LIBS"
+-LIBS="-lcurl  $LIBS"
 -cat >conftest.$ac_ext <<_ACEOF
 -/* confdefs.h.  */
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
++LIBS="-lid3  $LIBS"
 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
- /* Override any GCC internal prototype to avoid an error.
-@@ -31147,43 +16295,18 @@ return curl_easy_init ();
+-/* 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 curl_easy_init ();
++
+ int
+ main ()
+ {
+-return curl_easy_init ();
++return main ();
+   ;
    return 0;
  }
  _ACEOF
@@ -29158,14 +40340,15 @@ index f51d803..459bf70 100755
 -	 test "$cross_compiling" = yes ||
 -	 $as_test_x conftest$ac_exeext
 -       }; then
+-  ac_cv_lib_curl_curl_easy_init=yes
 +if ac_fn_cxx_try_link "$LINENO"; then :
-   ac_cv_lib_curl_curl_easy_init=yes
++  ac_cv_lib_id3_main=yes
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_cv_lib_curl_curl_easy_init=no
-+  ac_cv_lib_curl_curl_easy_init=no
++  ac_cv_lib_id3_main=no
  fi
 -
 -rm -rf conftest.dSYM
@@ -29176,181 +40359,402 @@ index f51d803..459bf70 100755
  LIBS=$ac_check_lib_save_LIBS
  fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_curl_curl_easy_init" >&5
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curl_curl_easy_init" >&5
- $as_echo "$ac_cv_lib_curl_curl_easy_init" >&6; }
+-$as_echo "$ac_cv_lib_curl_curl_easy_init" >&6; }
 -if test "x$ac_cv_lib_curl_curl_easy_init" = x""yes; then
-+if test "x$ac_cv_lib_curl_curl_easy_init" = x""yes; then :
-   cat >>confdefs.h <<_ACEOF
- #define HAVE_LIBCURL 1
- _ACEOF
-@@ -31199,71 +16322,59 @@ fi
+-  cat >>confdefs.h <<_ACEOF
+-#define HAVE_LIBCURL 1
+-_ACEOF
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_id3_main" >&5
++$as_echo "$ac_cv_lib_id3_main" >&6; }
++if test "x$ac_cv_lib_id3_main" = x""yes; then :
  
- if test "x$CURL_OK" = xyes; then
+-  LIBS="-lcurl $LIBS"
++                mt_id3lib_libs="-lid3"
++                mt_id3lib_ldflags="-L$mt_id3lib_search_libs"
  
+ else
+-  CURL_OK=missing
+ 
+-fi
+-
+-fi
+-
+-if test "x$CURL_OK" = xyes; then
+-
 -cat >>confdefs.h <<\_ACEOF
 -#define HAVE_CURL 1
 -_ACEOF
-+$as_echo "#define HAVE_CURL 1" >>confdefs.h
++                mt_id3lib_library_status=missing
++                if test "" = "pass"; then
++                    { $as_echo "$as_me:${as_lineno-$LINENO}: id3lib library not found in requested location $mt_id3lib_search_libs" >&5
++$as_echo "$as_me: id3lib library not found in requested location $mt_id3lib_search_libs" >&6;}
++                else
++                    as_fn_error $? "id3lib library not found in requested location $mt_id3lib_search_libs" "$LINENO" 5
++                fi
  
  
++fi
  
++    else
++        unset ac_cv_lib_id3_main
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lid3" >&5
++$as_echo_n "checking for main in -lid3... " >&6; }
++if test "${ac_cv_lib_id3_main+set}" = set; then :
++  $as_echo_n "(cached) " >&6
  else
-     if (test "x$YOUTUBE_OPTION_ENABLED" = xyes) && (test "x$YOUTUBE_OPTION_REQUESTED" = xyes); then
+-    if (test "x$YOUTUBE_OPTION_ENABLED" = xyes) && (test "x$YOUTUBE_OPTION_REQUESTED" = xyes); then
 -        { { $as_echo "$as_me:$LINENO: error: unable to configure curl which is required for YouTube support!" >&5
 -$as_echo "$as_me: error: unable to configure curl which is required for YouTube support!" >&2;}
 -   { (exit 1); exit 1; }; }
-+        as_fn_error $? "unable to configure curl which is required for YouTube support!" "$LINENO" 5
-     fi
- 
-     if (test "x$YOUTUBE_OPTION_ENABLED" = xyes) && (test "x$YOUTUBE_OPTION_REQUESTED" != xyes); then
+-    fi
+-
+-    if (test "x$YOUTUBE_OPTION_ENABLED" = xyes) && (test "x$YOUTUBE_OPTION_REQUESTED" != xyes); then
 -        { $as_echo "$as_me:$LINENO: WARNING: curl not found, disabling YouTube" >&5
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: curl not found, disabling YouTube" >&5
- $as_echo "$as_me: WARNING: curl not found, disabling YouTube" >&2;}
-         YOUTUBE_OPTION_ENABLED="missing"
-     fi
- 
-     if (test "x$WEBORAMA_OPTION_ENABLED" = xyes) && (test "x$WEBORAMA_OPTION_REQUESTED" = xyes); then
+-$as_echo "$as_me: WARNING: curl not found, disabling YouTube" >&2;}
+-        YOUTUBE_OPTION_ENABLED="missing"
+-    fi
+-
+-    if (test "x$WEBORAMA_OPTION_ENABLED" = xyes) && (test "x$WEBORAMA_OPTION_REQUESTED" = xyes); then
 -        { { $as_echo "$as_me:$LINENO: error: unable to configure curl which is required for Weborama support!" >&5
 -$as_echo "$as_me: error: unable to configure curl which is required for Weborama support!" >&2;}
 -   { (exit 1); exit 1; }; }
-+        as_fn_error $? "unable to configure curl which is required for Weborama support!" "$LINENO" 5
-     fi
- 
-     if (test "x$WEBORAMA_OPTION_ENABLED" = xyes) && (test "x$WEBORAMA_OPTION_REQUESTED" != xyes); then
+-    fi
+-
+-    if (test "x$WEBORAMA_OPTION_ENABLED" = xyes) && (test "x$WEBORAMA_OPTION_REQUESTED" != xyes); then
 -        { $as_echo "$as_me:$LINENO: WARNING: curl not found, disabling Weborama" >&5
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: curl not found, disabling Weborama" >&5
- $as_echo "$as_me: WARNING: curl not found, disabling Weborama" >&2;}
-         WEBORAMA_OPTION_ENABLED="missing"
-     fi
+-$as_echo "$as_me: WARNING: curl not found, disabling Weborama" >&2;}
+-        WEBORAMA_OPTION_ENABLED="missing"
+-    fi
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-lid3  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
  
-     if (test "x$ATRAILERS_OPTION_ENABLED" = xyes) && (test "x$ATRAILERS_OPTION_REQUESTED" = xyes); then
+-    if (test "x$ATRAILERS_OPTION_ENABLED" = xyes) && (test "x$ATRAILERS_OPTION_REQUESTED" = xyes); then
 -        { { $as_echo "$as_me:$LINENO: error: unable to configure curl which is required for Apple Trailers support!" >&5
 -$as_echo "$as_me: error: unable to configure curl which is required for Apple Trailers support!" >&2;}
 -   { (exit 1); exit 1; }; }
-+        as_fn_error $? "unable to configure curl which is required for Apple Trailers support!" "$LINENO" 5
-     fi
+-    fi
  
-     if (test "x$ATRAILERS_OPTION_ENABLED" = xyes) && (test "x$ATRAILERS_OPTION_REQUESTED" != xyes); then
+-    if (test "x$ATRAILERS_OPTION_ENABLED" = xyes) && (test "x$ATRAILERS_OPTION_REQUESTED" != xyes); then
 -        { $as_echo "$as_me:$LINENO: WARNING: curl not found, disabling Apple Trailers" >&5
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: curl not found, disabling Apple Trailers" >&5
- $as_echo "$as_me: WARNING: curl not found, disabling Apple Trailers" >&2;}
-         ATRAILERS_OPTION_ENABLED="missing"
-     fi
+-$as_echo "$as_me: WARNING: curl not found, disabling Apple Trailers" >&2;}
+-        ATRAILERS_OPTION_ENABLED="missing"
+-    fi
++int
++main ()
++{
++return main ();
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_cxx_try_link "$LINENO"; then :
++  ac_cv_lib_id3_main=yes
++else
++  ac_cv_lib_id3_main=no
++fi
++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_id3_main" >&5
++$as_echo "$ac_cv_lib_id3_main" >&6; }
++if test "x$ac_cv_lib_id3_main" = x""yes; then :
  
-     if (test "x$SOPCAST_OPTION_ENABLED" = xyes) && (test "x$SOPCAST_OPTION_REQUESTED" = xyes); then
+-    if (test "x$SOPCAST_OPTION_ENABLED" = xyes) && (test "x$SOPCAST_OPTION_REQUESTED" = xyes); then
 -        { { $as_echo "$as_me:$LINENO: error: unable to configure curl which is required for SopCast support!" >&5
 -$as_echo "$as_me: error: unable to configure curl which is required for SopCast support!" >&2;}
 -   { (exit 1); exit 1; }; }
-+        as_fn_error $? "unable to configure curl which is required for SopCast support!" "$LINENO" 5
-     fi
+-    fi
++                mt_id3lib_libs="-lid3"
  
-     if (test "x$SOPCAST_OPTION_ENABLED" = xyes) && (test "x$SOPCAST_OPTION_REQUESTED" != xyes); then
+-    if (test "x$SOPCAST_OPTION_ENABLED" = xyes) && (test "x$SOPCAST_OPTION_REQUESTED" != xyes); then
 -        { $as_echo "$as_me:$LINENO: WARNING: curl not found, disabling SopCast" >&5
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: curl not found, disabling SopCast" >&5
- $as_echo "$as_me: WARNING: curl not found, disabling SopCast" >&2;}
-         SOPCAST_OPTION_ENABLED="missing"
-     fi
+-$as_echo "$as_me: WARNING: curl not found, disabling SopCast" >&2;}
+-        SOPCAST_OPTION_ENABLED="missing"
+-    fi
++else
  
-     if test "x$EXTERNAL_TRANSCODING_OPTION" = xyes; then
-         if ((test $USE_CURL -eq 1) && (test $CURL_REQUESTED -eq 0)); then
+-    if test "x$EXTERNAL_TRANSCODING_OPTION" = xyes; then
+-        if ((test $USE_CURL -eq 1) && (test $CURL_REQUESTED -eq 0)); then
 -            { $as_echo "$as_me:$LINENO: WARNING: unable to configure curl, external transcoding will have limited functionality!" >&5
-+            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unable to configure curl, external transcoding will have limited functionality!" >&5
- $as_echo "$as_me: WARNING: unable to configure curl, external transcoding will have limited functionality!" >&2;}
-         fi
+-$as_echo "$as_me: WARNING: unable to configure curl, external transcoding will have limited functionality!" >&2;}
+-        fi
++                LDFLAGS="$LDFLAGS -L$MT_SEARCHPATH_LIBS"
++                unset ac_cv_lib_id3_main
++                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lid3" >&5
++$as_echo_n "checking for main in -lid3... " >&6; }
++if test "${ac_cv_lib_id3_main+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-lid3  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
  
-         if ((test $USE_CURL -eq 1) && (test $CURL_REQUESTED -eq 1)); then
+-        if ((test $USE_CURL -eq 1) && (test $CURL_REQUESTED -eq 1)); then
 -            { { $as_echo "$as_me:$LINENO: error: You enabled curl support but the curl library could not be configured" >&5
 -$as_echo "$as_me: error: You enabled curl support but the curl library could not be configured" >&2;}
 -   { (exit 1); exit 1; }; }
-+            as_fn_error $? "You enabled curl support but the curl library could not be configured" "$LINENO" 5
-         fi
-     fi
+-        fi
+-    fi
  
-@@ -31292,7 +16403,7 @@ LIBEXTRACTOR_STATUS=
-     fi
+-    if (test "x$YOUTUBE_OPTION_ENABLED" != xyes) && (test "x$WEBORAMA_OPTION_ENABLED" != xyes) && (test "x$ATRAILERS_OPTION_ENABLED" != xyes) && (test "x$EXTERNAL_TRANSCODING_OPTION" = !xyes) && (test "x$SOPCAST_OPTION_ENABLED" != xyes); then
+-        CURL_CFLAGS=
+-        CURL_LIBS=
+-    fi
++int
++main ()
++{
++return main ();
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_cxx_try_link "$LINENO"; then :
++  ac_cv_lib_id3_main=yes
++else
++  ac_cv_lib_id3_main=no
+ fi
+-CPPFLAGS="$CPPFLAGS_SAVE"
+-CXXFLAGS="$CXXFLAGS_SAVE"
+-LDFLAGS="$LDFLAGS_SAVE"
++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_id3_main" >&5
++$as_echo "$ac_cv_lib_id3_main" >&6; }
++if test "x$ac_cv_lib_id3_main" = x""yes; then :
  
-     # Check whether --enable-libextractor was given.
--if test "${enable_libextractor+set}" = set; then
-+if test "${enable_libextractor+set}" = set; then :
-   enableval=$enable_libextractor;
-             mt_libextractor_option_enabled=$enableval
-             mt_libextractor_option_requested=yes
-@@ -31307,7 +16418,9 @@ fi
+-######## ffmpeg or extractor?
++                        mt_id3lib_libs="-lid3"
++                        mt_id3lib_ldflags="-L$MT_SEARCHPATH_LIBS"
  
+-FFMPEG_STATUS=
+-LIBEXTRACTOR_STATUS=
++else
  
++                        mt_id3lib_library_status=missing
  
-+    if test "x${mt_libextractor_option_enabled}" = xyes; then :
  
+-    mt_libextractor_option_enabled=
+-    mt_libextractor_option_requested=no
+-    if test "xenable" = xdisable; then
+-        mt_libextractor_option_enabled=yes
+-    else
+-        mt_libextractor_option_enabled=no
+-    fi
 +fi
  
+-    # Check whether --enable-libextractor was given.
+-if test "${enable_libextractor+set}" = set; then
+-  enableval=$enable_libextractor;
+-            mt_libextractor_option_enabled=$enableval
+-            mt_libextractor_option_requested=yes
+ 
+ 
+ fi
+ 
++    fi
+ 
+-    LIBEXTRACTOR_OPTION_ENABLED=${mt_libextractor_option_enabled}
+-    LIBEXTRACTOR_OPTION_REQUESTED=${mt_libextractor_option_requested}
+-
++    if test "x$mt_id3lib_library_status" != xyes; then
++        mt_id3lib_libs=""
++        mt_id3lib_ldflags=""
++    fi
+ 
++    LIBS=$LIBS_SAVE
++    LDFLAGS=$LDFLAGS_SAVE
++    CFLAGS=$CFLAGS_SAVE
++    CXXFLAGS=$CXXFLAGS_SAVE
++    CPPFLAGS=$CPPFLAGS_SAVE
+ 
++        mt_id3lib_package_status=${mt_id3lib_library_status}
++    fi
+ 
++    if test "x$mt_id3lib_package_status" = xyes; then
++        ID3LIB_CFLAGS=${mt_id3lib_cxxflags}
++        ID3LIB_LIBS=${mt_id3lib_libs}
++        ID3LIB_LDFLAGS=${mt_id3lib_ldflags}
++    fi
+ 
++        mt_id3lib_status=${mt_id3lib_package_status}
++    fi
+ 
++    if test "x$mt_id3lib_status" = xyes; then
  
++$as_echo "#define HAVE_ID3LIB 1" >>confdefs.h
  
-@@ -31320,7 +16433,7 @@ fi
+-    mt_ffmpeg_option_enabled=
+-    mt_ffmpeg_option_requested=no
+-    if test "xdisable" = xdisable; then
+-        mt_ffmpeg_option_enabled=yes
+-    else
+-        mt_ffmpeg_option_enabled=no
      fi
  
-     # Check whether --enable-ffmpeg was given.
+-    # Check whether --enable-ffmpeg was given.
 -if test "${enable_ffmpeg+set}" = set; then
-+if test "${enable_ffmpeg+set}" = set; then :
-   enableval=$enable_ffmpeg;
-             mt_ffmpeg_option_enabled=$enableval
-             mt_ffmpeg_option_requested=yes
-@@ -31335,28 +16448,28 @@ fi
+-  enableval=$enable_ffmpeg;
+-            mt_ffmpeg_option_enabled=$enableval
+-            mt_ffmpeg_option_requested=yes
+-
++    ID3LIB_STATUS=${mt_id3lib_status}
  
+-fi
  
  
-+    if test "x${mt_ffmpeg_option_enabled}" = xyes; then :
+-    FFMPEG_OPTION_ENABLED=${mt_ffmpeg_option_enabled}
+-    FFMPEG_OPTION_REQUESTED=${mt_ffmpeg_option_requested}
  
-+fi
  
- if ((test "x$FFMPEG_OPTION_ENABLED" = xno) && (test "x$LIBEXTRACTOR_OPTION_ENABLED" = xyes)) ; then
-     FFMPEG_STATUS=disabled
-     FFMPEG_OPTION_ENABLED=no
+ 
++            if test "x$ID3LIB_STATUS" = xyes; then
++                ID3LIB_LIBS="$ID3LIB_LIBS $ZLIB_LIBS"
++                ID3LIB_LDFLAGS="$ID3LIB_LDFLAGS $ZLIB_LDFLAGS"
++            fi
++        fi
+ 
+ 
+ 
+-if ((test "x$FFMPEG_OPTION_ENABLED" = xno) && (test "x$LIBEXTRACTOR_OPTION_ENABLED" = xyes)) ; then
+-    FFMPEG_STATUS=disabled
+-    FFMPEG_OPTION_ENABLED=no
 -    { $as_echo "$as_me:$LINENO: WARNING: ffmpeg disabled" >&5
-+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ffmpeg disabled" >&5
- $as_echo "$as_me: WARNING: ffmpeg disabled" >&2;}
- elif ((test "x$FFMPEG_OPTION_ENABLED" = xyes) && (test "x$LIBEXTRACTOR_OPTION_ENABLED" = xno)) ; then
-     LIBEXTRACTOR_STATUS=disabled
-     LIBEXTRACTOR_OPTION_ENABLED=no
- elif ((test "x$FFMPEG_OPTION_ENABLED" = xyes) && (test "x$LIBEXTRACTOR_OPTION_ENABLED" = xyes)) ; then
-     if ((test "x$FFMPEG_OPTION_REQUESTED" = xyes) && (test "x$LIBEXTRACTOR_OPTION_REQUESTED" = xyes)); then
+-$as_echo "$as_me: WARNING: ffmpeg disabled" >&2;}
+-elif ((test "x$FFMPEG_OPTION_ENABLED" = xyes) && (test "x$LIBEXTRACTOR_OPTION_ENABLED" = xno)) ; then
+-    LIBEXTRACTOR_STATUS=disabled
+-    LIBEXTRACTOR_OPTION_ENABLED=no
+-elif ((test "x$FFMPEG_OPTION_ENABLED" = xyes) && (test "x$LIBEXTRACTOR_OPTION_ENABLED" = xyes)) ; then
+-    if ((test "x$FFMPEG_OPTION_REQUESTED" = xyes) && (test "x$LIBEXTRACTOR_OPTION_REQUESTED" = xyes)); then
 -    { { $as_echo "$as_me:$LINENO: error: Please select either ffmpeg or libextractor, but not both." >&5
 -$as_echo "$as_me: error: Please select either ffmpeg or libextractor, but not both." >&2;}
 -   { (exit 1); exit 1; }; }
-+    as_fn_error $? "Please select either ffmpeg or libextractor, but not both." "$LINENO" 5
-     elif ((test "x$FFMPEG_OPTION_REQUESTED" = xyes) && (test "x$LIBEXTRACTOR_OPTION_REQUESTED" = xno)); then
-        LIBEXTRACTOR_STATUS=disabled
-        LIBEXTRACTOR_OPTION_ENABLED=no
-     elif ((test "x$FFMPEG_OPTION_REQUESTED" = xno) && (test "x$LIBEXTRACTOR_OPTION_REQUESTED" = xyes)); then
-        FFMPEG_STATUS=disabled
-        FFMPEG_OPTION_ENABLED=no
+-    elif ((test "x$FFMPEG_OPTION_REQUESTED" = xyes) && (test "x$LIBEXTRACTOR_OPTION_REQUESTED" = xno)); then
+-       LIBEXTRACTOR_STATUS=disabled
+-       LIBEXTRACTOR_OPTION_ENABLED=no
+-    elif ((test "x$FFMPEG_OPTION_REQUESTED" = xno) && (test "x$LIBEXTRACTOR_OPTION_REQUESTED" = xyes)); then
+-       FFMPEG_STATUS=disabled
+-       FFMPEG_OPTION_ENABLED=no
 -       { $as_echo "$as_me:$LINENO: WARNING: ffmpeg disabled" >&5
-+       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ffmpeg disabled" >&5
- $as_echo "$as_me: WARNING: ffmpeg disabled" >&2;}
+-$as_echo "$as_me: WARNING: ffmpeg disabled" >&2;}
      fi
  fi
-@@ -31388,10 +16501,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
  
+-######## ffmpeg
++if test "x$ID3LIB_STATUS" = xyes; then
++   CFLAGS="$CFLAGS $ID3_CFLAGS"
++   CXXFLAGS="$CXXFLAGS $ID3_CFLAGS"
++   LDFLAGS="$LDFLAGS $ID3LIB_LDFLAGS $ID3LIB_LIBS"
+ 
+-if test "x$FFMPEG_OPTION_ENABLED" = xyes; then
++   ac_ext=cpp
++ac_cpp='$CXXCPP $CPPFLAGS'
++ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
++ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
++ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+ 
+-    ac_ext=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
++   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for album art support in id3lib" >&5
++$as_echo_n "checking for album art support in id3lib... " >&6; }
++   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
  
- # Check whether --with-avformat-h was given.
++                #include <id3/tag.h>
++                #include <id3/misc_support.h>
+ 
++int
++main ()
++{
+ 
+-    FFMPEG_EXTRA_CFLAGS=""
++                (void)ID3_HasPicture(0);
+ 
+-    # the header location of the older and newer ffmpeg version is different
+ 
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_cxx_try_compile "$LINENO"; then :
+ 
+-    LIBS_SAVE=$LIBS
+-    LDFLAGS_SAVE=$LDFLAGS
+-    CFLAGS_SAVE=$CFLAGS
+-    CXXFLAGS_SAVE=$CXXFLAGS
+-    CPPFLAGS_SAVE=$CPPFLAGS
++            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
+ 
+-    mt_avformat_header_status=yes
++$as_echo "#define HAVE_ID3_ALBUMART 1" >>confdefs.h
+ 
+ 
+-# Check whether --with-avformat-h was given.
 -if test "${with_avformat_h+set}" = set; then
-+if test "${with_avformat_h+set}" = set; then :
-   withval=$with_avformat_h;
-             mt_avformat_search_headers="$withval"
+-  withval=$with_avformat_h;
+-            mt_avformat_search_headers="$withval"
 -            { $as_echo "$as_me:$LINENO: Will search for avformat headers in $withval" >&5
-+            { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for avformat headers in $withval" >&5
- $as_echo "$as_me: Will search for avformat headers in $withval" >&6;}
+-$as_echo "$as_me: Will search for avformat headers in $withval" >&6;}
++else
++
++            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
  
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++   ac_ext=cpp
++ac_cpp='$CXXCPP $CPPFLAGS'
++ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
++ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
++ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
  
-@@ -31404,145 +16517,8 @@ fi
-         CXXFLAGS="$CXXFLAGS -I${mt_avformat_search_headers}"
-         CPPFLAGS="$CPPFLAGS -I${mt_avformat_search_headers}"
-         as_ac_Header=`$as_echo "ac_cv_header_$mt_avformat_search_headers/ffmpeg/avformat.h" | $as_tr_sh`
++else
++    if (test "x$ID3LIB_OPTION_REQUESTED" = xyes) &&
++       (test "x$ID3LIB_OPTION_ENABLED" = xyes); then
++        if test "x$TAGLIB_STATUS" = xyes; then
++            as_fn_error $? "Please select either taglib or id3lib, but not both." "$LINENO" 5
++        else
++            as_fn_error $? "unable to configure id3lib support" "$LINENO" 5
++        fi
++    else
++        ID3LIB_STATUS=disabled
++    fi
+ fi
+ 
++LDFLAGS="$LDFLAGS_SAVE"
++LIBS="$LIBS_SAVE"
++CXXFLAGS="$CXXFLAGS_SAVE"
++CPPFLAGS="$CPPFLAGS_SAVE"
++######## curl
+ 
+-    if test "$mt_avformat_search_headers" ; then
+-        unset ac_cv_header_ffmpeg_avformat_h
+-        CFLAGS="$CFLAGS -I${mt_avformat_search_headers}"
+-        CXXFLAGS="$CXXFLAGS -I${mt_avformat_search_headers}"
+-        CPPFLAGS="$CPPFLAGS -I${mt_avformat_search_headers}"
+-        as_ac_Header=`$as_echo "ac_cv_header_$mt_avformat_search_headers/ffmpeg/avformat.h" | $as_tr_sh`
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 -  { $as_echo "$as_me:$LINENO: checking for $mt_avformat_search_headers/ffmpeg/avformat.h" >&5
 -$as_echo_n "checking for $mt_avformat_search_headers/ffmpeg/avformat.h... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 -  $as_echo_n "(cached) " >&6
--fi
++CURL_PROG_FOUND=0
++CURL_LIBS=
++CURL_CFLAGS=
++CURL_OK=no
++
++if ((test "x$YOUTUBE_OPTION_ENABLED" = xyes) && (test "x$YOUTUBE_OPTION_REQUESTED" = xyes) && (test $USE_CURL -eq 0) && (test $CURL_REQUESTED -eq 1)); then
++    as_fn_error $? "You enabled YouTube but disabled curl, however curl is required by the YouTube feature" "$LINENO" 5
+ fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -29390,14 +40794,19 @@ index f51d803..459bf70 100755
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	ac_header_compiler=no
--fi
--
++if ((test "x$WEBORAMA_OPTION_ENABLED" = xyes) && (test "x$WEBORAMA_OPTION_REQUESTED" = xyes) && (test $USE_CURL -eq 0) && (test $CURL_REQUESTED -eq 1)); then
++    as_fn_error $? "You enabled Weborama but disabled curl, however curl is required by the Weborama feature" "$LINENO" 5
+ fi
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 -$as_echo "$ac_header_compiler" >&6; }
--
++if ((test "x$ATRAILERS_OPTION_ENABLED" = xyes) && (test "x$ATRAILERS_OPTION_REQUESTED" = xyes) && (test $USE_CURL -eq 0) && (test $CURL_REQUESTED -eq 1)); then
++    as_fn_error $? "You enabled Apple Trailers but disabled curl, however curl is required by the Apple Trailers feature" "$LINENO" 5
++fi
+ 
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking $mt_avformat_search_headers/ffmpeg/avformat.h presence" >&5
 -$as_echo_n "checking $mt_avformat_search_headers/ffmpeg/avformat.h presence... " >&6; }
@@ -29413,7 +40822,71 @@ index f51d803..459bf70 100755
 -case "(($ac_try" in
 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
 -  *) ac_try_echo=$ac_try;;
--esac
++if ((test "x$YOUTUBE_OPTION_ENABLED" != xyes) && (test "x$SOPCAST_OPTION_ENABLED" != xyes) && (test "x$EXTERNAL_TRANSCODING_OPTION" != xyes) && (test "x$ATRAILERS_OPTION_ENABLED" != xyes) && (test "x$WEBORAMA_OPTION_ENABLED" != xyes)); then
++    if test $USE_CURL -eq 1; then
++        if test $CURL_REQUESTED -eq 1; then
++            as_fn_error $? "You enabled curl support but the external transcoding, YouTube and SopCast features are disabled - curl is not needed without it" "$LINENO" 5
++        else
++            CURL_OK=no
++            USE_CURL=0
++        fi
++    fi
++fi
++
++if (((test "x$YOUTUBE_OPTION_ENABLED" = xyes) || (test "x$SOPCAST_OPTION_ENABLED" = xyes) || (test "x$ATRAILERS_OPTION_ENABLED" = xyes) || (test "x$WEBORAMA_OPTION_ENABLED" = xyes) || (test "x$EXTERNAL_TRANSCODING_OPTION" = xyes)) && (test $USE_CURL -eq 1)); then
++    { $as_echo "$as_me:${as_lineno-$LINENO}: Checking for curl (needed for extended external transcoding/YouTube support)" >&5
++$as_echo "$as_me: Checking for curl (needed for extended external transcoding/YouTube support)" >&6;}
++    CURL_OK=yes
++    if test -n "$CURL_SEARCH_CONFIG"; then
++        { $as_echo "$as_me:${as_lineno-$LINENO}: You specified $CURL_SEARCH_CONFIG for curl-config" >&5
++$as_echo "$as_me: You specified $CURL_SEARCH_CONFIG for curl-config" >&6;}
++
++        if test -f "$CURL_SEARCH_CONFIG"; then
++            curlconfig="$CURL_SEARCH_CONFIG"
++        else
++            curlconfig="no"
++        fi
++
++        if test "x$curlconfig" = xno; then
++            as_fn_error $? "$CURL_SEARCH_CONFIG not found" "$LINENO" 5
++        else
++            CURL_TEST=`${curlconfig} --version 2>/dev/null`
++            if test -z "$CURL_TEST"; then
++                as_fn_error $? "${curlconfig} could not be executed or returned invalid values" "$LINENO" 5
++            fi
++            CURL_PROG_FOUND=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
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_path_curlconfig+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  case $curlconfig in
++  [\\/]* | ?:[\\/]*)
++  ac_cv_path_curlconfig="$curlconfig" # Let the user override the test with a path.
++  ;;
++  *)
++  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++    ac_cv_path_curlconfig="$as_dir/$ac_word$ac_exec_ext"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
++
++  test -z "$ac_cv_path_curlconfig" && ac_cv_path_curlconfig="no"
++  ;;
+ esac
 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 -$as_echo "$ac_try_echo") >&5
 -  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
@@ -29427,17 +40900,24 @@ index f51d803..459bf70 100755
 -	 test ! -s conftest.err
 -       }; then
 -  ac_header_preproc=yes
--else
++fi
++curlconfig=$ac_cv_path_curlconfig
++if test -n "$curlconfig"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $curlconfig" >&5
++$as_echo "$curlconfig" >&6; }
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -  ac_header_preproc=no
--fi
--
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+ fi
+ 
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$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: )
@@ -29471,52 +40951,131 @@ index f51d803..459bf70 100755
 -{ $as_echo "$as_me:$LINENO: checking for $mt_avformat_search_headers/ffmpeg/avformat.h" >&5
 -$as_echo_n "checking for $mt_avformat_search_headers/ffmpeg/avformat.h... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
--  $as_echo_n "(cached) " >&6
--else
++        if test "x$curlconfig" = xno; then
++            unset ac_cv_path_curlconfig
++            # Extract the first word of "curl-config", so it can be a program name with args.
++set dummy curl-config; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_path_curlconfig+set}" = set; then :
+   $as_echo_n "(cached) " >&6
+ else
 -  eval "$as_ac_Header=\$ac_header_preproc"
--fi
++  case $curlconfig in
++  [\\/]* | ?:[\\/]*)
++  ac_cv_path_curlconfig="$curlconfig" # Let the user override the test with a path.
++  ;;
++  *)
++  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $SEARCH_DIR_PROGS
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++    ac_cv_path_curlconfig="$as_dir/$ac_word$ac_exec_ext"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
++
++  test -z "$ac_cv_path_curlconfig" && ac_cv_path_curlconfig="no"
++  ;;
++esac
++fi
++curlconfig=$ac_cv_path_curlconfig
++if test -n "$curlconfig"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $curlconfig" >&5
++$as_echo "$curlconfig" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+ fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
--
--fi
+ 
++
++            if test "x$curlconfig" = xno; then
++                CURL_OK=missing
++                { $as_echo "$as_me:${as_lineno-$LINENO}: result: curl-config not found, please install the curl-devel package" >&5
++$as_echo "curl-config not found, please install the curl-devel package" >&6; }
++            else
++                CURL_PROG_FOUND=1
++            fi
++        else
++            CURL_PROG_FOUND=1
++        fi
++   fi
++
++   if test $CURL_PROG_FOUND -eq 1 ; then
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking curl cflags" >&5
++$as_echo_n "checking curl cflags... " >&6; }
++        CURL_CFLAGS=`${curlconfig} --cflags`
++        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CURL_CFLAGS" >&5
++$as_echo "$CURL_CFLAGS" >&6; }
++
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking curl libraries" >&5
++$as_echo_n "checking curl libraries... " >&6; }
++        CURL_LIBS=`${curlconfig} --libs`
++        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CURL_LIBS" >&5
++$as_echo "$CURL_LIBS" >&6; }
++    fi
+ fi
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+ac_fn_c_check_header_mongrel "$LINENO" "$mt_avformat_search_headers/ffmpeg/avformat.h" "$as_ac_Header" "$ac_includes_default"
-+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
  
-                 mt_avformat_cxxflags="-I${mt_avformat_search_headers}"
+-                mt_avformat_cxxflags="-I${mt_avformat_search_headers}"
++if test "x$CURL_OK" = xyes; then
++    CPPFLAGS="$CPPFLAGS $CURL_CFLAGS"
++    CXXFLAGS="$CXXFLAGS $CURL_CFLAGS"
++    for ac_header in curl/curl.h
++do :
++  ac_fn_cxx_check_header_mongrel "$LINENO" "curl/curl.h" "ac_cv_header_curl_curl_h" "$ac_includes_default"
++if test "x$ac_cv_header_curl_curl_h" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_CURL_CURL_H 1
++_ACEOF
  
-@@ -31550,12 +16526,10 @@ else
+ else
++  CURL_OK=missing
  
-                 mt_avformat_header_status=missing
-                 if test "pass" = "pass"; then
+-                mt_avformat_header_status=missing
+-                if test "pass" = "pass"; then
 -                    { $as_echo "$as_me:$LINENO: avformat headers not found in requested location $mt_avformat_search_headers" >&5
-+                    { $as_echo "$as_me:${as_lineno-$LINENO}: avformat headers not found in requested location $mt_avformat_search_headers" >&5
- $as_echo "$as_me: avformat headers not found in requested location $mt_avformat_search_headers" >&6;}
-                 else
+-$as_echo "$as_me: avformat headers not found in requested location $mt_avformat_search_headers" >&6;}
+-                else
 -                    { { $as_echo "$as_me:$LINENO: error: avformat headers not found in requested location $mt_avformat_search_headers" >&5
 -$as_echo "$as_me: error: avformat headers not found in requested location $mt_avformat_search_headers" >&2;}
 -   { (exit 1); exit 1; }; }
-+                    as_fn_error $? "avformat headers not found in requested location $mt_avformat_search_headers" "$LINENO" 5
-                 fi
+-                fi
++fi
  
++done
  
-@@ -31564,140 +16538,9 @@ fi
+ fi
  
-     else
-         unset ac_cv_header_ffmpeg_avformat_h
+-
+-    else
+-        unset ac_cv_header_ffmpeg_avformat_h
 -        if test "${ac_cv_header_ffmpeg_avformat_h+set}" = set; then
 -  { $as_echo "$as_me:$LINENO: checking for ffmpeg/avformat.h" >&5
 -$as_echo_n "checking for ffmpeg/avformat.h... " >&6; }
 -if test "${ac_cv_header_ffmpeg_avformat_h+set}" = set; then
--  $as_echo_n "(cached) " >&6
++if test "x$CURL_OK" = xyes; then
++    LDFLAGS="$CURL_LIBS"
++    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for curl_easy_init in -lcurl" >&5
++$as_echo_n "checking for curl_easy_init in -lcurl... " >&6; }
++if test "${ac_cv_lib_curl_curl_easy_init+set}" = set; then :
+   $as_echo_n "(cached) " >&6
 -fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_ffmpeg_avformat_h" >&5
 -$as_echo "$ac_cv_header_ffmpeg_avformat_h" >&6; }
--else
+ else
 -  # Is the header compilable?
 -{ $as_echo "$as_me:$LINENO: checking ffmpeg/avformat.h usability" >&5
 -$as_echo_n "checking ffmpeg/avformat.h usability... " >&6; }
@@ -29525,10 +41084,28 @@ index f51d803..459bf70 100755
 -_ACEOF
 -cat confdefs.h >>conftest.$ac_ext
 -cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h.  */
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-lcurl  $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
 -$ac_includes_default
 -#include <ffmpeg/avformat.h>
--_ACEOF
++
++/* 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 curl_easy_init ();
++int
++main ()
++{
++return curl_easy_init ();
++  ;
++  return 0;
++}
+ _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -29548,19 +41125,31 @@ index f51d803..459bf70 100755
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_header_compiler=yes
--else
++if ac_fn_cxx_try_link "$LINENO"; then :
++  ac_cv_lib_curl_curl_easy_init=yes
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -	ac_header_compiler=no
--fi
-+        ac_fn_c_check_header_mongrel "$LINENO" "ffmpeg/avformat.h" "ac_cv_header_ffmpeg_avformat_h" "$ac_includes_default"
-+if test "x$ac_cv_header_ffmpeg_avformat_h" = x""yes; then :
++  ac_cv_lib_curl_curl_easy_init=no
++fi
++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_curl_curl_easy_init" >&5
++$as_echo "$ac_cv_lib_curl_curl_easy_init" >&6; }
++if test "x$ac_cv_lib_curl_curl_easy_init" = x""yes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_LIBCURL 1
++_ACEOF
  
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 -$as_echo "$ac_header_compiler" >&6; }
--
++  LIBS="-lcurl $LIBS"
+ 
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking ffmpeg/avformat.h presence" >&5
 -$as_echo_n "checking ffmpeg/avformat.h presence... " >&6; }
@@ -29590,13 +41179,14 @@ index f51d803..459bf70 100755
 -	 test ! -s conftest.err
 -       }; then
 -  ac_header_preproc=yes
--else
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++  CURL_OK=missing
+ 
 -  ac_header_preproc=no
--fi
--
+ fi
+ 
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 -$as_echo "$ac_header_preproc" >&6; }
@@ -29637,20 +41227,21 @@ index f51d803..459bf70 100755
 -  $as_echo_n "(cached) " >&6
 -else
 -  ac_cv_header_ffmpeg_avformat_h=$ac_header_preproc
--fi
+ fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_ffmpeg_avformat_h" >&5
 -$as_echo "$ac_cv_header_ffmpeg_avformat_h" >&6; }
--
+ 
 -fi
 -if test "x$ac_cv_header_ffmpeg_avformat_h" = x""yes; then
 -  :
- else
+-else
++if test "x$CURL_OK" = xyes; then
  
-                 CFLAGS="$CFLAGS -I$MT_SEARCHPATH_HEADERS"
-@@ -31705,145 +16548,8 @@ else
-                 CPPFLAGS="$CPPFLAGS -I$MT_SEARCHPATH_HEADERS"
-                 unset ac_cv_header_ffmpeg_avformat_h
-                 as_ac_Header=`$as_echo "ac_cv_header_$MT_SEARCHPATH_HEADERS/ffmpeg/avformat.h" | $as_tr_sh`
+-                CFLAGS="$CFLAGS -I$MT_SEARCHPATH_HEADERS"
+-                CXXFLAGS="$CXXFLAGS -I$MT_SEARCHPATH_HEADERS"
+-                CPPFLAGS="$CPPFLAGS -I$MT_SEARCHPATH_HEADERS"
+-                unset ac_cv_header_ffmpeg_avformat_h
+-                as_ac_Header=`$as_echo "ac_cv_header_$MT_SEARCHPATH_HEADERS/ffmpeg/avformat.h" | $as_tr_sh`
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 -  { $as_echo "$as_me:$LINENO: checking for $MT_SEARCHPATH_HEADERS/ffmpeg/avformat.h" >&5
 -$as_echo_n "checking for $MT_SEARCHPATH_HEADERS/ffmpeg/avformat.h... " >&6; }
@@ -29696,14 +41287,15 @@ index f51d803..459bf70 100755
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++$as_echo "#define HAVE_CURL 1" >>confdefs.h
+ 
 -	ac_header_compiler=no
 -fi
--
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 -$as_echo "$ac_header_compiler" >&6; }
--
+ 
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking $MT_SEARCHPATH_HEADERS/ffmpeg/avformat.h presence" >&5
 -$as_echo_n "checking $MT_SEARCHPATH_HEADERS/ffmpeg/avformat.h presence... " >&6; }
@@ -29733,17 +41325,25 @@ index f51d803..459bf70 100755
 -	 test ! -s conftest.err
 -       }; then
 -  ac_header_preproc=yes
--else
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -  ac_header_preproc=no
 -fi
--
++    if (test "x$YOUTUBE_OPTION_ENABLED" = xyes) && (test "x$YOUTUBE_OPTION_REQUESTED" = xyes); then
++        as_fn_error $? "unable to configure curl which is required for YouTube support!" "$LINENO" 5
++    fi
+ 
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 -$as_echo "$ac_header_preproc" >&6; }
--
++    if (test "x$YOUTUBE_OPTION_ENABLED" = xyes) && (test "x$YOUTUBE_OPTION_REQUESTED" != xyes); then
++        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: curl not found, disabling YouTube" >&5
++$as_echo "$as_me: WARNING: curl not found, disabling YouTube" >&2;}
++        YOUTUBE_OPTION_ENABLED="missing"
++    fi
+ 
 -# So?  What about this header?
 -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 -  yes:no: )
@@ -29785,39 +41385,153 @@ index f51d803..459bf70 100755
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
--
++    if (test "x$WEBORAMA_OPTION_ENABLED" = xyes) && (test "x$WEBORAMA_OPTION_REQUESTED" = xyes); then
++        as_fn_error $? "unable to configure curl which is required for Weborama support!" "$LINENO" 5
++    fi
+ 
 -fi
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+ac_fn_c_check_header_mongrel "$LINENO" "$MT_SEARCHPATH_HEADERS/ffmpeg/avformat.h" "$as_ac_Header" "$ac_includes_default"
-+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
++    if (test "x$WEBORAMA_OPTION_ENABLED" = xyes) && (test "x$WEBORAMA_OPTION_REQUESTED" != xyes); then
++        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: curl not found, disabling Weborama" >&5
++$as_echo "$as_me: WARNING: curl not found, disabling Weborama" >&2;}
++        WEBORAMA_OPTION_ENABLED="missing"
++    fi
  
-                         mt_avformat_cxxflags="-I${MT_SEARCHPATH_HEADERS}"
+-                        mt_avformat_cxxflags="-I${MT_SEARCHPATH_HEADERS}"
++    if (test "x$ATRAILERS_OPTION_ENABLED" = xyes) && (test "x$ATRAILERS_OPTION_REQUESTED" = xyes); then
++        as_fn_error $? "unable to configure curl which is required for Apple Trailers support!" "$LINENO" 5
++    fi
  
-@@ -31892,10 +16598,10 @@ fi
+-else
++    if (test "x$ATRAILERS_OPTION_ENABLED" = xyes) && (test "x$ATRAILERS_OPTION_REQUESTED" != xyes); then
++        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: curl not found, disabling Apple Trailers" >&5
++$as_echo "$as_me: WARNING: curl not found, disabling Apple Trailers" >&2;}
++        ATRAILERS_OPTION_ENABLED="missing"
++    fi
  
+-                        mt_avformat_header_status=missing
++    if (test "x$SOPCAST_OPTION_ENABLED" = xyes) && (test "x$SOPCAST_OPTION_REQUESTED" = xyes); then
++        as_fn_error $? "unable to configure curl which is required for SopCast support!" "$LINENO" 5
++    fi
  
- # Check whether --with-avformat-h was given.
++    if (test "x$SOPCAST_OPTION_ENABLED" = xyes) && (test "x$SOPCAST_OPTION_REQUESTED" != xyes); then
++        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: curl not found, disabling SopCast" >&5
++$as_echo "$as_me: WARNING: curl not found, disabling SopCast" >&2;}
++        SOPCAST_OPTION_ENABLED="missing"
++    fi
+ 
+-fi
++    if test "x$EXTERNAL_TRANSCODING_OPTION" = xyes; then
++        if ((test $USE_CURL -eq 1) && (test $CURL_REQUESTED -eq 0)); then
++            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unable to configure curl, external transcoding will have limited functionality!" >&5
++$as_echo "$as_me: WARNING: unable to configure curl, external transcoding will have limited functionality!" >&2;}
++        fi
+ 
++        if ((test $USE_CURL -eq 1) && (test $CURL_REQUESTED -eq 1)); then
++            as_fn_error $? "You enabled curl support but the curl library could not be configured" "$LINENO" 5
++        fi
++    fi
+ 
++    if (test "x$YOUTUBE_OPTION_ENABLED" != xyes) && (test "x$WEBORAMA_OPTION_ENABLED" != xyes) && (test "x$ATRAILERS_OPTION_ENABLED" != xyes) && (test "x$EXTERNAL_TRANSCODING_OPTION" = !xyes) && (test "x$SOPCAST_OPTION_ENABLED" != xyes); then
++        CURL_CFLAGS=
++        CURL_LIBS=
++    fi
++fi
++CPPFLAGS="$CPPFLAGS_SAVE"
++CXXFLAGS="$CXXFLAGS_SAVE"
++LDFLAGS="$LDFLAGS_SAVE"
+ 
++######## ffmpeg or extractor?
+ 
+-fi
++FFMPEG_STATUS=
++LIBEXTRACTOR_STATUS=
+ 
+ 
+-    fi
+ 
+-    if test "x$mt_avformat_header_status" != xyes; then
+-        mt_avformat_cxxflags=""
++    mt_libextractor_option_enabled=
++    mt_libextractor_option_requested=no
++    if test "xenable" = xdisable; then
++        mt_libextractor_option_enabled=yes
++    else
++        mt_libextractor_option_enabled=no
+     fi
+ 
+-    LIBS=$LIBS_SAVE
+-    LDFLAGS=$LDFLAGS_SAVE
+-    CFLAGS=$CFLAGS_SAVE
+-    CXXFLAGS=$CXXFLAGS_SAVE
+-    CPPFLAGS=$CPPFLAGS_SAVE
++    # Check whether --enable-libextractor was given.
++if test "${enable_libextractor+set}" = set; then :
++  enableval=$enable_libextractor;
++            mt_libextractor_option_enabled=$enableval
++            mt_libextractor_option_requested=yes
+ 
+ 
+-    AVFORMAT_CFLAGS=${mt_avformat_cxxflags}
+-    AVFORMAT_STATUS=${mt_avformat_header_status}
++fi
+ 
+ 
++    LIBEXTRACTOR_OPTION_ENABLED=${mt_libextractor_option_enabled}
++    LIBEXTRACTOR_OPTION_REQUESTED=${mt_libextractor_option_requested}
+ 
+ 
+-    if test "x$AVFORMAT_STATUS" != xyes; then
+ 
+ 
+-    LIBS_SAVE=$LIBS
+-    LDFLAGS_SAVE=$LDFLAGS
+-    CFLAGS_SAVE=$CFLAGS
+-    CXXFLAGS_SAVE=$CXXFLAGS
+-    CPPFLAGS_SAVE=$CPPFLAGS
++    if test "x${mt_libextractor_option_enabled}" = xyes; then :
+ 
+-    mt_avformat_header_status=yes
++fi
+ 
+ 
+-# Check whether --with-avformat-h was given.
 -if test "${with_avformat_h+set}" = set; then
-+if test "${with_avformat_h+set}" = set; then :
-   withval=$with_avformat_h;
-             mt_avformat_search_headers="$withval"
+-  withval=$with_avformat_h;
+-            mt_avformat_search_headers="$withval"
 -            { $as_echo "$as_me:$LINENO: Will search for avformat headers in $withval" >&5
-+            { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for avformat headers in $withval" >&5
- $as_echo "$as_me: Will search for avformat headers in $withval" >&6;}
+-$as_echo "$as_me: Will search for avformat headers in $withval" >&6;}
  
++    mt_ffmpeg_option_enabled=
++    mt_ffmpeg_option_requested=no
++    if test "xdisable" = xdisable; then
++        mt_ffmpeg_option_enabled=yes
++    else
++        mt_ffmpeg_option_enabled=no
++    fi
  
-@@ -31908,145 +16614,8 @@ fi
-         CXXFLAGS="$CXXFLAGS -I${mt_avformat_search_headers}"
-         CPPFLAGS="$CPPFLAGS -I${mt_avformat_search_headers}"
-         as_ac_Header=`$as_echo "ac_cv_header_$mt_avformat_search_headers/libavformat/avformat.h" | $as_tr_sh`
+-fi
++    # Check whether --enable-ffmpeg was given.
++if test "${enable_ffmpeg+set}" = set; then :
++  enableval=$enable_ffmpeg;
++            mt_ffmpeg_option_enabled=$enableval
++            mt_ffmpeg_option_requested=yes
+ 
+ 
+-    if test "$mt_avformat_search_headers" ; then
+-        unset ac_cv_header_libavformat_avformat_h
+-        CFLAGS="$CFLAGS -I${mt_avformat_search_headers}"
+-        CXXFLAGS="$CXXFLAGS -I${mt_avformat_search_headers}"
+-        CPPFLAGS="$CPPFLAGS -I${mt_avformat_search_headers}"
+-        as_ac_Header=`$as_echo "ac_cv_header_$mt_avformat_search_headers/libavformat/avformat.h" | $as_tr_sh`
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 -  { $as_echo "$as_me:$LINENO: checking for $mt_avformat_search_headers/libavformat/avformat.h" >&5
 -$as_echo_n "checking for $mt_avformat_search_headers/libavformat/avformat.h... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 -  $as_echo_n "(cached) " >&6
--fi
+ fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -29857,14 +41571,16 @@ index f51d803..459bf70 100755
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	ac_header_compiler=no
 -fi
--
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 -$as_echo "$ac_header_compiler" >&6; }
--
++    FFMPEG_OPTION_ENABLED=${mt_ffmpeg_option_enabled}
++    FFMPEG_OPTION_REQUESTED=${mt_ffmpeg_option_requested}
+ 
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking $mt_avformat_search_headers/libavformat/avformat.h presence" >&5
 -$as_echo_n "checking $mt_avformat_search_headers/libavformat/avformat.h presence... " >&6; }
@@ -29897,14 +41613,14 @@ index f51d803..459bf70 100755
 -else
 -  $as_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
 -{ $as_echo "$as_me:$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: )
@@ -29946,35 +41662,61 @@ index f51d803..459bf70 100755
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
--
--fi
++    if test "x${mt_ffmpeg_option_enabled}" = xyes; then :
+ 
+ fi
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+ac_fn_c_check_header_mongrel "$LINENO" "$mt_avformat_search_headers/libavformat/avformat.h" "$as_ac_Header" "$ac_includes_default"
-+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
  
-                 mt_avformat_cxxflags="-I${mt_avformat_search_headers}"
- 
-@@ -32054,12 +16623,10 @@ else
+-                mt_avformat_cxxflags="-I${mt_avformat_search_headers}"
+-
+-else
++if ((test "x$FFMPEG_OPTION_ENABLED" = xno) && (test "x$LIBEXTRACTOR_OPTION_ENABLED" = xyes)) ; then
++    FFMPEG_STATUS=disabled
++    FFMPEG_OPTION_ENABLED=no
++    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ffmpeg disabled" >&5
++$as_echo "$as_me: WARNING: ffmpeg disabled" >&2;}
++elif ((test "x$FFMPEG_OPTION_ENABLED" = xyes) && (test "x$LIBEXTRACTOR_OPTION_ENABLED" = xno)) ; then
++    LIBEXTRACTOR_STATUS=disabled
++    LIBEXTRACTOR_OPTION_ENABLED=no
++elif ((test "x$FFMPEG_OPTION_ENABLED" = xyes) && (test "x$LIBEXTRACTOR_OPTION_ENABLED" = xyes)) ; then
++    if ((test "x$FFMPEG_OPTION_REQUESTED" = xyes) && (test "x$LIBEXTRACTOR_OPTION_REQUESTED" = xyes)); then
++    as_fn_error $? "Please select either ffmpeg or libextractor, but not both." "$LINENO" 5
++    elif ((test "x$FFMPEG_OPTION_REQUESTED" = xyes) && (test "x$LIBEXTRACTOR_OPTION_REQUESTED" = xno)); then
++       LIBEXTRACTOR_STATUS=disabled
++       LIBEXTRACTOR_OPTION_ENABLED=no
++    elif ((test "x$FFMPEG_OPTION_REQUESTED" = xno) && (test "x$LIBEXTRACTOR_OPTION_REQUESTED" = xyes)); then
++       FFMPEG_STATUS=disabled
++       FFMPEG_OPTION_ENABLED=no
++       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ffmpeg disabled" >&5
++$as_echo "$as_me: WARNING: ffmpeg disabled" >&2;}
++    fi
++fi
  
-                 mt_avformat_header_status=missing
-                 if test "pass" = "pass"; then
+-                mt_avformat_header_status=missing
+-                if test "pass" = "pass"; then
 -                    { $as_echo "$as_me:$LINENO: avformat headers not found in requested location $mt_avformat_search_headers" >&5
-+                    { $as_echo "$as_me:${as_lineno-$LINENO}: avformat headers not found in requested location $mt_avformat_search_headers" >&5
- $as_echo "$as_me: avformat headers not found in requested location $mt_avformat_search_headers" >&6;}
-                 else
+-$as_echo "$as_me: avformat headers not found in requested location $mt_avformat_search_headers" >&6;}
+-                else
 -                    { { $as_echo "$as_me:$LINENO: error: avformat headers not found in requested location $mt_avformat_search_headers" >&5
 -$as_echo "$as_me: error: avformat headers not found in requested location $mt_avformat_search_headers" >&2;}
 -   { (exit 1); exit 1; }; }
-+                    as_fn_error $? "avformat headers not found in requested location $mt_avformat_search_headers" "$LINENO" 5
-                 fi
+-                fi
++######## ffmpeg
  
++if test "x$FFMPEG_OPTION_ENABLED" = xyes; then
  
-@@ -32068,140 +16635,9 @@ fi
+-fi
++    ac_ext=c
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
++ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
++ac_compiler_gnu=$ac_cv_c_compiler_gnu
  
-     else
-         unset ac_cv_header_libavformat_avformat_h
+ 
+-    else
+-        unset ac_cv_header_libavformat_avformat_h
 -        if test "${ac_cv_header_libavformat_avformat_h+set}" = set; then
 -  { $as_echo "$as_me:$LINENO: checking for libavformat/avformat.h" >&5
 -$as_echo_n "checking for libavformat/avformat.h... " >&6; }
@@ -30018,16 +41760,16 @@ index f51d803..459bf70 100755
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+        ac_fn_c_check_header_mongrel "$LINENO" "libavformat/avformat.h" "ac_cv_header_libavformat_avformat_h" "$ac_includes_default"
-+if test "x$ac_cv_header_libavformat_avformat_h" = x""yes; then :
  
 -	ac_header_compiler=no
 -fi
--
++    FFMPEG_EXTRA_CFLAGS=""
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 -$as_echo "$ac_header_compiler" >&6; }
--
++    # the header location of the older and newer ffmpeg version is different
+ 
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking libavformat/avformat.h presence" >&5
 -$as_echo_n "checking libavformat/avformat.h presence... " >&6; }
@@ -30060,14 +41802,20 @@ index f51d803..459bf70 100755
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -  ac_header_preproc=no
 -fi
--
++    LIBS_SAVE=$LIBS
++    LDFLAGS_SAVE=$LDFLAGS
++    CFLAGS_SAVE=$CFLAGS
++    CXXFLAGS_SAVE=$CXXFLAGS
++    CPPFLAGS_SAVE=$CPPFLAGS
+ 
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 -$as_echo "$ac_header_preproc" >&6; }
--
++    mt_avformat_header_status=yes
+ 
 -# So?  What about this header?
 -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 -  yes:no: )
@@ -30107,17 +41855,23 @@ index f51d803..459bf70 100755
 -fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_libavformat_avformat_h" >&5
 -$as_echo "$ac_cv_header_libavformat_avformat_h" >&6; }
--
+ 
 -fi
 -if test "x$ac_cv_header_libavformat_avformat_h" = x""yes; then
 -  :
- else
+-else
++# Check whether --with-avformat-h was given.
++if test "${with_avformat_h+set}" = set; then :
++  withval=$with_avformat_h;
++            mt_avformat_search_headers="$withval"
++            { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for avformat headers in $withval" >&5
++$as_echo "$as_me: Will search for avformat headers in $withval" >&6;}
  
-                 CFLAGS="$CFLAGS -I$MT_SEARCHPATH_HEADERS"
-@@ -32209,145 +16645,8 @@ else
-                 CPPFLAGS="$CPPFLAGS -I$MT_SEARCHPATH_HEADERS"
-                 unset ac_cv_header_libavformat_avformat_h
-                 as_ac_Header=`$as_echo "ac_cv_header_$MT_SEARCHPATH_HEADERS/libavformat/avformat.h" | $as_tr_sh`
+-                CFLAGS="$CFLAGS -I$MT_SEARCHPATH_HEADERS"
+-                CXXFLAGS="$CXXFLAGS -I$MT_SEARCHPATH_HEADERS"
+-                CPPFLAGS="$CPPFLAGS -I$MT_SEARCHPATH_HEADERS"
+-                unset ac_cv_header_libavformat_avformat_h
+-                as_ac_Header=`$as_echo "ac_cv_header_$MT_SEARCHPATH_HEADERS/libavformat/avformat.h" | $as_tr_sh`
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 -  { $as_echo "$as_me:$LINENO: checking for $MT_SEARCHPATH_HEADERS/libavformat/avformat.h" >&5
 -$as_echo_n "checking for $MT_SEARCHPATH_HEADERS/libavformat/avformat.h... " >&6; }
@@ -30163,14 +41917,14 @@ index f51d803..459bf70 100755
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	ac_header_compiler=no
--fi
--
+ fi
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 -$as_echo "$ac_header_compiler" >&6; }
--
+ 
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking $MT_SEARCHPATH_HEADERS/libavformat/avformat.h presence" >&5
 -$as_echo_n "checking $MT_SEARCHPATH_HEADERS/libavformat/avformat.h presence... " >&6; }
@@ -30200,17 +41954,37 @@ index f51d803..459bf70 100755
 -	 test ! -s conftest.err
 -       }; then
 -  ac_header_preproc=yes
--else
++    if test "$mt_avformat_search_headers" ; then
++        unset ac_cv_header_ffmpeg_avformat_h
++        CFLAGS="$CFLAGS -I${mt_avformat_search_headers}"
++        CXXFLAGS="$CXXFLAGS -I${mt_avformat_search_headers}"
++        CPPFLAGS="$CPPFLAGS -I${mt_avformat_search_headers}"
++        as_ac_Header=`$as_echo "ac_cv_header_$mt_avformat_search_headers/ffmpeg/avformat.h" | $as_tr_sh`
++ac_fn_c_check_header_mongrel "$LINENO" "$mt_avformat_search_headers/ffmpeg/avformat.h" "$as_ac_Header" "$ac_includes_default"
++if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
++
++                mt_avformat_cxxflags="-I${mt_avformat_search_headers}"
++
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -  ac_header_preproc=no
--fi
--
++                mt_avformat_header_status=missing
++                if test "pass" = "pass"; then
++                    { $as_echo "$as_me:${as_lineno-$LINENO}: avformat headers not found in requested location $mt_avformat_search_headers" >&5
++$as_echo "$as_me: avformat headers not found in requested location $mt_avformat_search_headers" >&6;}
++                else
++                    as_fn_error $? "avformat headers not found in requested location $mt_avformat_search_headers" "$LINENO" 5
++                fi
++
++
+ fi
+ 
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$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: )
@@ -30245,24 +42019,51 @@ index f51d803..459bf70 100755
 -$as_echo_n "checking for $MT_SEARCHPATH_HEADERS/libavformat/avformat.h... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 -  $as_echo_n "(cached) " >&6
--else
++    else
++        unset ac_cv_header_ffmpeg_avformat_h
++        ac_fn_c_check_header_mongrel "$LINENO" "ffmpeg/avformat.h" "ac_cv_header_ffmpeg_avformat_h" "$ac_includes_default"
++if test "x$ac_cv_header_ffmpeg_avformat_h" = x""yes; then :
++
+ else
 -  eval "$as_ac_Header=\$ac_header_preproc"
 -fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
--
+ 
 -fi
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
-+ac_fn_c_check_header_mongrel "$LINENO" "$MT_SEARCHPATH_HEADERS/libavformat/avformat.h" "$as_ac_Header" "$ac_includes_default"
++                CFLAGS="$CFLAGS -I$MT_SEARCHPATH_HEADERS"
++                CXXFLAGS="$CXXFLAGS -I$MT_SEARCHPATH_HEADERS"
++                CPPFLAGS="$CPPFLAGS -I$MT_SEARCHPATH_HEADERS"
++                unset ac_cv_header_ffmpeg_avformat_h
++                as_ac_Header=`$as_echo "ac_cv_header_$MT_SEARCHPATH_HEADERS/ffmpeg/avformat.h" | $as_tr_sh`
++ac_fn_c_check_header_mongrel "$LINENO" "$MT_SEARCHPATH_HEADERS/ffmpeg/avformat.h" "$as_ac_Header" "$ac_includes_default"
 +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
  
                          mt_avformat_cxxflags="-I${MT_SEARCHPATH_HEADERS}"
  
-@@ -32404,10 +16703,10 @@ _ACEOF
+@@ -32383,15 +16585,7 @@
+ 
+ 
+ 
+-        if test "x$AVFORMAT_STATUS" = xyes; then
+-
+-cat >>confdefs.h <<_ACEOF
+-#define AVFORMAT_INCLUDE <libavformat/avformat.h>
+-_ACEOF
+-
+-        else
+-            CFLAGS="$CFLAGS -I/usr/include/ffmpeg"
+-            CPPFLAGS="$CPPFLAGS -I/usr/include/ffmpeg"
++    if test "x$AVFORMAT_STATUS" != xyes; then
+ 
+ 
+     LIBS_SAVE=$LIBS
+@@ -32404,10 +16598,10 @@
  
  
  # Check whether --with-avformat-h was given.
@@ -30275,7 +42076,7 @@ index f51d803..459bf70 100755
  $as_echo "$as_me: Will search for avformat headers in $withval" >&6;}
  
  
-@@ -32420,145 +16719,8 @@ fi
+@@ -32420,145 +16614,8 @@
          CXXFLAGS="$CXXFLAGS -I${mt_avformat_search_headers}"
          CPPFLAGS="$CPPFLAGS -I${mt_avformat_search_headers}"
          as_ac_Header=`$as_echo "ac_cv_header_$mt_avformat_search_headers/libavformat/avformat.h" | $as_tr_sh`
@@ -30423,7 +42224,7 @@ index f51d803..459bf70 100755
  
                  mt_avformat_cxxflags="-I${mt_avformat_search_headers}"
  
-@@ -32566,12 +16728,10 @@ else
+@@ -32566,12 +16623,10 @@
  
                  mt_avformat_header_status=missing
                  if test "pass" = "pass"; then
@@ -30438,7 +42239,7 @@ index f51d803..459bf70 100755
                  fi
  
  
-@@ -32580,140 +16740,9 @@ fi
+@@ -32580,286 +16635,123 @@
  
      else
          unset ac_cv_header_libavformat_avformat_h
@@ -30482,18 +42283,27 @@ index f51d803..459bf70 100755
 -	 test ! -s conftest.err
 -       } && test -s conftest.$ac_objext; then
 -  ac_header_compiler=yes
--else
++        ac_fn_c_check_header_mongrel "$LINENO" "libavformat/avformat.h" "ac_cv_header_libavformat_avformat_h" "$ac_includes_default"
++if test "x$ac_cv_header_libavformat_avformat_h" = x""yes; then :
++
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	ac_header_compiler=no
 -fi
--
++                CFLAGS="$CFLAGS -I$MT_SEARCHPATH_HEADERS"
++                CXXFLAGS="$CXXFLAGS -I$MT_SEARCHPATH_HEADERS"
++                CPPFLAGS="$CPPFLAGS -I$MT_SEARCHPATH_HEADERS"
++                unset ac_cv_header_libavformat_avformat_h
++                as_ac_Header=`$as_echo "ac_cv_header_$MT_SEARCHPATH_HEADERS/libavformat/avformat.h" | $as_tr_sh`
++ac_fn_c_check_header_mongrel "$LINENO" "$MT_SEARCHPATH_HEADERS/libavformat/avformat.h" "$as_ac_Header" "$ac_includes_default"
++if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 -$as_echo "$ac_header_compiler" >&6; }
-+        ac_fn_c_check_header_mongrel "$LINENO" "libavformat/avformat.h" "ac_cv_header_libavformat_avformat_h" "$ac_includes_default"
-+if test "x$ac_cv_header_libavformat_avformat_h" = x""yes; then :
++                        mt_avformat_cxxflags="-I${MT_SEARCHPATH_HEADERS}"
  
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking libavformat/avformat.h presence" >&5
@@ -30524,17 +42334,18 @@ index f51d803..459bf70 100755
 -	 test ! -s conftest.err
 -       }; then
 -  ac_header_preproc=yes
--else
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -  ac_header_preproc=no
 -fi
--
++                        mt_avformat_header_status=missing
+ 
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$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: )
@@ -30571,26 +42382,28 @@ index f51d803..459bf70 100755
 -  $as_echo_n "(cached) " >&6
 -else
 -  ac_cv_header_libavformat_avformat_h=$ac_header_preproc
--fi
+ fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_libavformat_avformat_h" >&5
 -$as_echo "$ac_cv_header_libavformat_avformat_h" >&6; }
--
+ 
 -fi
 -if test "x$ac_cv_header_libavformat_avformat_h" = x""yes; then
 -  :
- else
+-else
  
-                 CFLAGS="$CFLAGS -I$MT_SEARCHPATH_HEADERS"
-@@ -32721,145 +16750,8 @@ else
-                 CPPFLAGS="$CPPFLAGS -I$MT_SEARCHPATH_HEADERS"
-                 unset ac_cv_header_libavformat_avformat_h
-                 as_ac_Header=`$as_echo "ac_cv_header_$MT_SEARCHPATH_HEADERS/libavformat/avformat.h" | $as_tr_sh`
+-                CFLAGS="$CFLAGS -I$MT_SEARCHPATH_HEADERS"
+-                CXXFLAGS="$CXXFLAGS -I$MT_SEARCHPATH_HEADERS"
+-                CPPFLAGS="$CPPFLAGS -I$MT_SEARCHPATH_HEADERS"
+-                unset ac_cv_header_libavformat_avformat_h
+-                as_ac_Header=`$as_echo "ac_cv_header_$MT_SEARCHPATH_HEADERS/libavformat/avformat.h" | $as_tr_sh`
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 -  { $as_echo "$as_me:$LINENO: checking for $MT_SEARCHPATH_HEADERS/libavformat/avformat.h" >&5
 -$as_echo_n "checking for $MT_SEARCHPATH_HEADERS/libavformat/avformat.h... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 -  $as_echo_n "(cached) " >&6
--fi
++
++
+ fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -30607,7 +42420,32 @@ index f51d803..459bf70 100755
 -/* end confdefs.h.  */
 -$ac_includes_default
 -#include <$MT_SEARCHPATH_HEADERS/libavformat/avformat.h>
--_ACEOF
++
++
++    fi
++
++    if test "x$mt_avformat_header_status" != xyes; then
++        mt_avformat_cxxflags=""
++    fi
++
++    LIBS=$LIBS_SAVE
++    LDFLAGS=$LDFLAGS_SAVE
++    CFLAGS=$CFLAGS_SAVE
++    CXXFLAGS=$CXXFLAGS_SAVE
++    CPPFLAGS=$CPPFLAGS_SAVE
++
++
++    AVFORMAT_CFLAGS=${mt_avformat_cxxflags}
++    AVFORMAT_STATUS=${mt_avformat_header_status}
++
++
++
++
++        if test "x$AVFORMAT_STATUS" = xyes; then
++
++cat >>confdefs.h <<_ACEOF
++#define AVFORMAT_INCLUDE <libavformat/avformat.h>
+ _ACEOF
 -rm -f conftest.$ac_objext
 -if { (ac_try="$ac_compile"
 -case "(($ac_try" in
@@ -30630,14 +42468,36 @@ index f51d803..459bf70 100755
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -	ac_header_compiler=no
--fi
--
++        else
++            CFLAGS="$CFLAGS -I/usr/include/ffmpeg"
++            CPPFLAGS="$CPPFLAGS -I/usr/include/ffmpeg"
++
++
++    LIBS_SAVE=$LIBS
++    LDFLAGS_SAVE=$LDFLAGS
++    CFLAGS_SAVE=$CFLAGS
++    CXXFLAGS_SAVE=$CXXFLAGS
++    CPPFLAGS_SAVE=$CPPFLAGS
++
++    mt_avformat_header_status=yes
++
++
++# Check whether --with-avformat-h was given.
++if test "${with_avformat_h+set}" = set; then :
++  withval=$with_avformat_h;
++            mt_avformat_search_headers="$withval"
++            { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for avformat headers in $withval" >&5
++$as_echo "$as_me: Will search for avformat headers in $withval" >&6;}
++
++
+ fi
+ 
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 -$as_echo "$ac_header_compiler" >&6; }
--
+ 
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking $MT_SEARCHPATH_HEADERS/libavformat/avformat.h presence" >&5
 -$as_echo_n "checking $MT_SEARCHPATH_HEADERS/libavformat/avformat.h presence... " >&6; }
@@ -30667,17 +42527,37 @@ index f51d803..459bf70 100755
 -	 test ! -s conftest.err
 -       }; then
 -  ac_header_preproc=yes
--else
++    if test "$mt_avformat_search_headers" ; then
++        unset ac_cv_header_libavformat_avformat_h
++        CFLAGS="$CFLAGS -I${mt_avformat_search_headers}"
++        CXXFLAGS="$CXXFLAGS -I${mt_avformat_search_headers}"
++        CPPFLAGS="$CPPFLAGS -I${mt_avformat_search_headers}"
++        as_ac_Header=`$as_echo "ac_cv_header_$mt_avformat_search_headers/libavformat/avformat.h" | $as_tr_sh`
++ac_fn_c_check_header_mongrel "$LINENO" "$mt_avformat_search_headers/libavformat/avformat.h" "$as_ac_Header" "$ac_includes_default"
++if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
++
++                mt_avformat_cxxflags="-I${mt_avformat_search_headers}"
++
+ else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
+ 
 -  ac_header_preproc=no
--fi
--
++                mt_avformat_header_status=missing
++                if test "pass" = "pass"; then
++                    { $as_echo "$as_me:${as_lineno-$LINENO}: avformat headers not found in requested location $mt_avformat_search_headers" >&5
++$as_echo "$as_me: avformat headers not found in requested location $mt_avformat_search_headers" >&6;}
++                else
++                    as_fn_error $? "avformat headers not found in requested location $mt_avformat_search_headers" "$LINENO" 5
++                fi
++
++
+ fi
+ 
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$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: )
@@ -30712,24 +42592,34 @@ index f51d803..459bf70 100755
 -$as_echo_n "checking for $MT_SEARCHPATH_HEADERS/libavformat/avformat.h... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 -  $as_echo_n "(cached) " >&6
--else
++    else
++        unset ac_cv_header_libavformat_avformat_h
++        ac_fn_c_check_header_mongrel "$LINENO" "libavformat/avformat.h" "ac_cv_header_libavformat_avformat_h" "$ac_includes_default"
++if test "x$ac_cv_header_libavformat_avformat_h" = x""yes; then :
++
+ else
 -  eval "$as_ac_Header=\$ac_header_preproc"
 -fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
--
+ 
 -fi
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
++                CFLAGS="$CFLAGS -I$MT_SEARCHPATH_HEADERS"
++                CXXFLAGS="$CXXFLAGS -I$MT_SEARCHPATH_HEADERS"
++                CPPFLAGS="$CPPFLAGS -I$MT_SEARCHPATH_HEADERS"
++                unset ac_cv_header_libavformat_avformat_h
++                as_ac_Header=`$as_echo "ac_cv_header_$MT_SEARCHPATH_HEADERS/libavformat/avformat.h" | $as_tr_sh`
 +ac_fn_c_check_header_mongrel "$LINENO" "$MT_SEARCHPATH_HEADERS/libavformat/avformat.h" "$as_ac_Header" "$ac_includes_default"
 +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
  
                          mt_avformat_cxxflags="-I${MT_SEARCHPATH_HEADERS}"
  
-@@ -32919,10 +16811,10 @@ _ACEOF
+@@ -32919,10 +16811,10 @@
  
  
  # Check whether --with-avformat-h was given.
@@ -30742,7 +42632,7 @@ index f51d803..459bf70 100755
  $as_echo "$as_me: Will search for avformat headers in $withval" >&6;}
  
  
-@@ -32935,145 +16827,8 @@ fi
+@@ -32935,145 +16827,8 @@
          CXXFLAGS="$CXXFLAGS -I${mt_avformat_search_headers}"
          CPPFLAGS="$CPPFLAGS -I${mt_avformat_search_headers}"
          as_ac_Header=`$as_echo "ac_cv_header_$mt_avformat_search_headers/libavformat/avformat.h" | $as_tr_sh`
@@ -30890,7 +42780,7 @@ index f51d803..459bf70 100755
  
                  mt_avformat_cxxflags="-I${mt_avformat_search_headers}"
  
-@@ -33081,12 +16836,10 @@ else
+@@ -33081,12 +16836,10 @@
  
                  mt_avformat_header_status=missing
                  if test "" = "pass"; then
@@ -30905,7 +42795,7 @@ index f51d803..459bf70 100755
                  fi
  
  
-@@ -33095,140 +16848,9 @@ fi
+@@ -33095,140 +16848,9 @@
  
      else
          unset ac_cv_header_libavformat_avformat_h
@@ -30992,9 +42882,7 @@ index f51d803..459bf70 100755
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+        ac_fn_c_check_header_mongrel "$LINENO" "libavformat/avformat.h" "ac_cv_header_libavformat_avformat_h" "$ac_includes_default"
-+if test "x$ac_cv_header_libavformat_avformat_h" = x""yes; then :
- 
+-
 -  ac_header_preproc=no
 -fi
 -
@@ -31041,14 +42929,16 @@ index f51d803..459bf70 100755
 -fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_libavformat_avformat_h" >&5
 -$as_echo "$ac_cv_header_libavformat_avformat_h" >&6; }
--
++        ac_fn_c_check_header_mongrel "$LINENO" "libavformat/avformat.h" "ac_cv_header_libavformat_avformat_h" "$ac_includes_default"
++if test "x$ac_cv_header_libavformat_avformat_h" = x""yes; then :
+ 
 -fi
 -if test "x$ac_cv_header_libavformat_avformat_h" = x""yes; then
 -  :
  else
  
                  CFLAGS="$CFLAGS -I$MT_SEARCHPATH_HEADERS"
-@@ -33236,145 +16858,8 @@ else
+@@ -33236,145 +16858,8 @@
                  CPPFLAGS="$CPPFLAGS -I$MT_SEARCHPATH_HEADERS"
                  unset ac_cv_header_libavformat_avformat_h
                  as_ac_Header=`$as_echo "ac_cv_header_$MT_SEARCHPATH_HEADERS/libavformat/avformat.h" | $as_tr_sh`
@@ -31196,7 +43086,7 @@ index f51d803..459bf70 100755
  
                          mt_avformat_cxxflags="-I${MT_SEARCHPATH_HEADERS}"
  
-@@ -33442,10 +16927,10 @@ _ACEOF
+@@ -33442,10 +16927,10 @@
  
  
  # Check whether --with-avformat-libs was given.
@@ -31209,7 +43099,7 @@ index f51d803..459bf70 100755
  $as_echo "$as_me: Will search for avformat libs in $withval" >&6;}
  
  
-@@ -33455,18 +16940,14 @@ fi
+@@ -33455,18 +16940,14 @@
      if test "$mt_avformat_search_libs" ; then
          unset ac_cv_lib_avformat_av_register_all
          LDFLAGS="$LDFLAGS -L$mt_avformat_search_libs"
@@ -31231,7 +43121,7 @@ index f51d803..459bf70 100755
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -33484,43 +16965,18 @@ return av_register_all ();
+@@ -33484,43 +16965,18 @@
    return 0;
  }
  _ACEOF
@@ -31281,7 +43171,7 @@ index f51d803..459bf70 100755
  
                  mt_avformat_libs="-lavformat"
                  mt_avformat_ldflags="-L$mt_avformat_search_libs"
-@@ -33529,12 +16985,10 @@ else
+@@ -33529,12 +16985,10 @@
  
                  mt_avformat_library_status=missing
                  if test "" = "pass"; then
@@ -31296,7 +43186,7 @@ index f51d803..459bf70 100755
                  fi
  
  
-@@ -33542,18 +16996,14 @@ fi
+@@ -33542,18 +16996,14 @@
  
      else
          unset ac_cv_lib_avformat_av_register_all
@@ -31318,7 +43208,7 @@ index f51d803..459bf70 100755
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -33571,43 +17021,18 @@ return av_register_all ();
+@@ -33571,43 +17021,18 @@
    return 0;
  }
  _ACEOF
@@ -31368,7 +43258,7 @@ index f51d803..459bf70 100755
  
                  mt_avformat_libs="-lavformat"
  
-@@ -33615,18 +17040,14 @@ else
+@@ -33615,18 +17040,14 @@
  
                  LDFLAGS="$LDFLAGS -L$MT_SEARCHPATH_LIBS"
                  unset ac_cv_lib_avformat_av_register_all
@@ -31390,7 +43280,7 @@ index f51d803..459bf70 100755
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -33644,43 +17065,18 @@ return av_register_all ();
+@@ -33644,43 +17065,18 @@
    return 0;
  }
  _ACEOF
@@ -31440,7 +43330,7 @@ index f51d803..459bf70 100755
  
                          mt_avformat_libs="-lavformat"
                          mt_avformat_ldflags="-L$MT_SEARCHPATH_LIBS"
-@@ -33731,10 +17127,10 @@ fi
+@@ -33731,10 +17127,10 @@
  
  
  # Check whether --with-avutil-libs was given.
@@ -31453,7 +43343,7 @@ index f51d803..459bf70 100755
  $as_echo "$as_me: Will search for avutil libs in $withval" >&6;}
  
  
-@@ -33744,18 +17140,14 @@ fi
+@@ -33744,18 +17140,14 @@
      if test "$mt_avutil_search_libs" ; then
          unset ac_cv_lib_avutil_av_log_set_callback
          LDFLAGS="$LDFLAGS -L$mt_avutil_search_libs"
@@ -31475,7 +43365,7 @@ index f51d803..459bf70 100755
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -33773,43 +17165,18 @@ return av_log_set_callback ();
+@@ -33773,43 +17165,18 @@
    return 0;
  }
  _ACEOF
@@ -31525,7 +43415,7 @@ index f51d803..459bf70 100755
  
                  mt_avutil_libs="-lavutil"
                  mt_avutil_ldflags="-L$mt_avutil_search_libs"
-@@ -33818,12 +17185,10 @@ else
+@@ -33818,12 +17185,10 @@
  
                  mt_avutil_library_status=missing
                  if test "" = "pass"; then
@@ -31540,7 +43430,7 @@ index f51d803..459bf70 100755
                  fi
  
  
-@@ -33831,18 +17196,14 @@ fi
+@@ -33831,18 +17196,14 @@
  
      else
          unset ac_cv_lib_avutil_av_log_set_callback
@@ -31562,7 +43452,7 @@ index f51d803..459bf70 100755
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -33860,43 +17221,18 @@ return av_log_set_callback ();
+@@ -33860,43 +17221,18 @@
    return 0;
  }
  _ACEOF
@@ -31612,7 +43502,7 @@ index f51d803..459bf70 100755
  
                  mt_avutil_libs="-lavutil"
  
-@@ -33904,18 +17240,14 @@ else
+@@ -33904,18 +17240,14 @@
  
                  LDFLAGS="$LDFLAGS -L$MT_SEARCHPATH_LIBS"
                  unset ac_cv_lib_avutil_av_log_set_callback
@@ -31634,7 +43524,7 @@ index f51d803..459bf70 100755
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -33933,43 +17265,18 @@ return av_log_set_callback ();
+@@ -33933,43 +17265,18 @@
    return 0;
  }
  _ACEOF
@@ -31684,7 +43574,7 @@ index f51d803..459bf70 100755
  
                          mt_avutil_libs="-lavutil"
                          mt_avutil_ldflags="-L$MT_SEARCHPATH_LIBS"
-@@ -34024,9 +17331,7 @@ fi
+@@ -34024,9 +17331,7 @@
  
  if test "x$FFMPEG_STATUS" = xyes; then
  
@@ -31695,7 +43585,7 @@ index f51d803..459bf70 100755
  
      FFMPEG_CFLAGS="$FFMPEG_EXTRA_CFLAGS $AVFORMAT_CFLAGS $AVUTIL_CFLAGS"
      FFMPEG_LDFLAGS="$AVFORMAT_LDFLAGS $AVUTIL_LDFLAGS"
-@@ -34041,9 +17346,7 @@ else
+@@ -34041,9 +17346,7 @@
  
      if (test "x$FFMPEG_OPTION_REQUESTED" = xyes) &&
         (test "x$FFMPEG_OPTION_ENABLED" = xyes); then
@@ -31706,7 +43596,7 @@ index f51d803..459bf70 100755
      fi
  fi
  
-@@ -34063,7 +17366,7 @@ FFMPEGTHUMBNAILER_USES_OLD_API=
+@@ -34063,7 +17366,7 @@
      fi
  
      # Check whether --enable-ffmpegthumbnailer was given.
@@ -31715,7 +43605,7 @@ index f51d803..459bf70 100755
    enableval=$enable_ffmpegthumbnailer;
              mt_ffmpegthumbnailer_option_enabled=$enableval
              mt_ffmpegthumbnailer_option_requested=yes
-@@ -34078,7 +17381,9 @@ fi
+@@ -34078,7 +17381,9 @@
  
  
  
@@ -31725,7 +43615,7 @@ index f51d803..459bf70 100755
  
      if test "x${FFMPEGTHUMBNAILER_OPTION_ENABLED}" = xyes; then
  
-@@ -34093,10 +17398,10 @@ fi
+@@ -34093,10 +17398,10 @@
  
  
  # Check whether --with-ffmpegthumbnailer-h was given.
@@ -31738,7 +43628,7 @@ index f51d803..459bf70 100755
  $as_echo "$as_me: Will search for ffmpegthumbnailer headers in $withval" >&6;}
  
  
-@@ -34109,145 +17414,8 @@ fi
+@@ -34109,145 +17414,8 @@
          CXXFLAGS="$CXXFLAGS -I${mt_ffmpegthumbnailer_search_headers}"
          CPPFLAGS="$CPPFLAGS -I${mt_ffmpegthumbnailer_search_headers}"
          as_ac_Header=`$as_echo "ac_cv_header_$mt_ffmpegthumbnailer_search_headers/libffmpegthumbnailer/videothumbnailerc.h" | $as_tr_sh`
@@ -31886,25 +43776,25 @@ index f51d803..459bf70 100755
  
                  mt_ffmpegthumbnailer_cxxflags="-I${mt_ffmpegthumbnailer_search_headers}"
  
-@@ -34255,12 +17423,10 @@ else
+@@ -34255,300 +17423,30 @@
  
                  mt_ffmpegthumbnailer_header_status=missing
                  if test "pass" = "pass"; then
 -                    { $as_echo "$as_me:$LINENO: ffmpegthumbnailer headers not found in requested location $mt_ffmpegthumbnailer_search_headers" >&5
 +                    { $as_echo "$as_me:${as_lineno-$LINENO}: ffmpegthumbnailer headers not found in requested location $mt_ffmpegthumbnailer_search_headers" >&5
  $as_echo "$as_me: ffmpegthumbnailer headers not found in requested location $mt_ffmpegthumbnailer_search_headers" >&6;}
-                 else
+-                else
 -                    { { $as_echo "$as_me:$LINENO: error: ffmpegthumbnailer headers not found in requested location $mt_ffmpegthumbnailer_search_headers" >&5
 -$as_echo "$as_me: error: ffmpegthumbnailer headers not found in requested location $mt_ffmpegthumbnailer_search_headers" >&2;}
 -   { (exit 1); exit 1; }; }
-+                    as_fn_error $? "ffmpegthumbnailer headers not found in requested location $mt_ffmpegthumbnailer_search_headers" "$LINENO" 5
-                 fi
- 
- 
-@@ -34269,140 +17435,9 @@ fi
- 
-     else
-         unset ac_cv_header_libffmpegthumbnailer_videothumbnailerc_h
+-                fi
+-
+-
+-fi
+-
+-
+-    else
+-        unset ac_cv_header_libffmpegthumbnailer_videothumbnailerc_h
 -        if test "${ac_cv_header_libffmpegthumbnailer_videothumbnailerc_h+set}" = set; then
 -  { $as_echo "$as_me:$LINENO: checking for libffmpegthumbnailer/videothumbnailerc.h" >&5
 -$as_echo_n "checking for libffmpegthumbnailer/videothumbnailerc.h... " >&6; }
@@ -31991,9 +43881,7 @@ index f51d803..459bf70 100755
 -
 -  ac_header_preproc=no
 -fi
-+        ac_fn_cxx_check_header_mongrel "$LINENO" "libffmpegthumbnailer/videothumbnailerc.h" "ac_cv_header_libffmpegthumbnailer_videothumbnailerc_h" "$ac_includes_default"
-+if test "x$ac_cv_header_libffmpegthumbnailer_videothumbnailerc_h" = x""yes; then :
- 
+-
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 -$as_echo "$ac_header_preproc" >&6; }
@@ -32041,13 +43929,13 @@ index f51d803..459bf70 100755
 -fi
 -if test "x$ac_cv_header_libffmpegthumbnailer_videothumbnailerc_h" = x""yes; then
 -  :
- else
- 
-                 CFLAGS="$CFLAGS -I$MT_SEARCHPATH_HEADERS"
-@@ -34410,145 +17445,8 @@ else
-                 CPPFLAGS="$CPPFLAGS -I$MT_SEARCHPATH_HEADERS"
-                 unset ac_cv_header_libffmpegthumbnailer_videothumbnailerc_h
-                 as_ac_Header=`$as_echo "ac_cv_header_$MT_SEARCHPATH_HEADERS/libffmpegthumbnailer/videothumbnailerc.h" | $as_tr_sh`
+-else
+-
+-                CFLAGS="$CFLAGS -I$MT_SEARCHPATH_HEADERS"
+-                CXXFLAGS="$CXXFLAGS -I$MT_SEARCHPATH_HEADERS"
+-                CPPFLAGS="$CPPFLAGS -I$MT_SEARCHPATH_HEADERS"
+-                unset ac_cv_header_libffmpegthumbnailer_videothumbnailerc_h
+-                as_ac_Header=`$as_echo "ac_cv_header_$MT_SEARCHPATH_HEADERS/libffmpegthumbnailer/videothumbnailerc.h" | $as_tr_sh`
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 -  { $as_echo "$as_me:$LINENO: checking for $MT_SEARCHPATH_HEADERS/libffmpegthumbnailer/videothumbnailerc.h" >&5
 -$as_echo_n "checking for $MT_SEARCHPATH_HEADERS/libffmpegthumbnailer/videothumbnailerc.h... " >&6; }
@@ -32133,14 +44021,18 @@ index f51d803..459bf70 100755
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++                else
++                    as_fn_error $? "ffmpegthumbnailer headers not found in requested location $mt_ffmpegthumbnailer_search_headers" "$LINENO" 5
++                fi
++
+ 
 -  ac_header_preproc=no
--fi
--
+ fi
+ 
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$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_cxx_preproc_warn_flag in
 -  yes:no: )
@@ -32175,24 +44067,34 @@ index f51d803..459bf70 100755
 -$as_echo_n "checking for $MT_SEARCHPATH_HEADERS/libffmpegthumbnailer/videothumbnailerc.h... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 -  $as_echo_n "(cached) " >&6
--else
++    else
++        unset ac_cv_header_libffmpegthumbnailer_videothumbnailerc_h
++        ac_fn_cxx_check_header_mongrel "$LINENO" "libffmpegthumbnailer/videothumbnailerc.h" "ac_cv_header_libffmpegthumbnailer_videothumbnailerc_h" "$ac_includes_default"
++if test "x$ac_cv_header_libffmpegthumbnailer_videothumbnailerc_h" = x""yes; then :
++
+ else
 -  eval "$as_ac_Header=\$ac_header_preproc"
 -fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
--
+ 
 -fi
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
++                CFLAGS="$CFLAGS -I$MT_SEARCHPATH_HEADERS"
++                CXXFLAGS="$CXXFLAGS -I$MT_SEARCHPATH_HEADERS"
++                CPPFLAGS="$CPPFLAGS -I$MT_SEARCHPATH_HEADERS"
++                unset ac_cv_header_libffmpegthumbnailer_videothumbnailerc_h
++                as_ac_Header=`$as_echo "ac_cv_header_$MT_SEARCHPATH_HEADERS/libffmpegthumbnailer/videothumbnailerc.h" | $as_tr_sh`
 +ac_fn_cxx_check_header_mongrel "$LINENO" "$MT_SEARCHPATH_HEADERS/libffmpegthumbnailer/videothumbnailerc.h" "$as_ac_Header" "$ac_includes_default"
 +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
  
                          mt_ffmpegthumbnailer_cxxflags="-I${MT_SEARCHPATH_HEADERS}"
  
-@@ -34592,10 +17490,10 @@ fi
+@@ -34592,10 +17490,10 @@
  
  
  # Check whether --with-ffmpegthumbnailer-libs was given.
@@ -32205,7 +44107,7 @@ index f51d803..459bf70 100755
  $as_echo "$as_me: Will search for ffmpegthumbnailer libs in $withval" >&6;}
  
  
-@@ -34605,18 +17503,14 @@ fi
+@@ -34605,18 +17503,14 @@
      if test "$mt_ffmpegthumbnailer_search_libs" ; then
          unset ac_cv_lib_ffmpegthumbnailer_video_thumbnailer_create
          LDFLAGS="$LDFLAGS -L$mt_ffmpegthumbnailer_search_libs"
@@ -32227,7 +44129,7 @@ index f51d803..459bf70 100755
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -34634,43 +17528,18 @@ return video_thumbnailer_create ();
+@@ -34634,43 +17528,18 @@
    return 0;
  }
  _ACEOF
@@ -32277,7 +44179,7 @@ index f51d803..459bf70 100755
  
                  mt_ffmpegthumbnailer_libs="-lffmpegthumbnailer"
                  mt_ffmpegthumbnailer_ldflags="-L$mt_ffmpegthumbnailer_search_libs"
-@@ -34679,12 +17548,10 @@ else
+@@ -34679,12 +17548,10 @@
  
                  mt_ffmpegthumbnailer_library_status=missing
                  if test "pass" = "pass"; then
@@ -32292,7 +44194,7 @@ index f51d803..459bf70 100755
                  fi
  
  
-@@ -34692,18 +17559,14 @@ fi
+@@ -34692,18 +17559,14 @@
  
      else
          unset ac_cv_lib_ffmpegthumbnailer_video_thumbnailer_create
@@ -32314,7 +44216,7 @@ index f51d803..459bf70 100755
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -34721,43 +17584,18 @@ return video_thumbnailer_create ();
+@@ -34721,43 +17584,18 @@
    return 0;
  }
  _ACEOF
@@ -32364,7 +44266,7 @@ index f51d803..459bf70 100755
  
                  mt_ffmpegthumbnailer_libs="-lffmpegthumbnailer"
  
-@@ -34765,18 +17603,14 @@ else
+@@ -34765,18 +17603,14 @@
  
                  LDFLAGS="$LDFLAGS -L$MT_SEARCHPATH_LIBS"
                  unset ac_cv_lib_ffmpegthumbnailer_video_thumbnailer_create
@@ -32386,7 +44288,7 @@ index f51d803..459bf70 100755
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -34794,43 +17628,18 @@ return video_thumbnailer_create ();
+@@ -34794,43 +17628,18 @@
    return 0;
  }
  _ACEOF
@@ -32436,7 +44338,7 @@ index f51d803..459bf70 100755
  
                          mt_ffmpegthumbnailer_libs="-lffmpegthumbnailer"
                          mt_ffmpegthumbnailer_ldflags="-L$MT_SEARCHPATH_LIBS"
-@@ -34876,16 +17685,12 @@ fi
+@@ -34876,16 +17685,12 @@
      if ((test "x${FFMPEGTHUMBNAILER_OPTION_ENABLED}" = xyes) &&
          (test "x${FFMPEGTHUMBNAILER_OPTION_REQUESTED}" = xyes) &&
          (test "x$mt_ffmpegthumbnailer_status" != xyes) && (test "pass" != "pass")); then
@@ -32455,7 +44357,7 @@ index f51d803..459bf70 100755
  
      fi
  
-@@ -34912,7 +17717,7 @@ if (test "x$FFMPEGTHUMBNAILER_STATUS" != xyes); then
+@@ -34912,7 +17717,7 @@
      fi
  
      # Check whether --enable-ffmpegthumbnailer was given.
@@ -32464,7 +44366,7 @@ index f51d803..459bf70 100755
    enableval=$enable_ffmpegthumbnailer;
              mt_ffmpegthumbnailer_option_enabled=$enableval
              mt_ffmpegthumbnailer_option_requested=yes
-@@ -34927,7 +17732,9 @@ fi
+@@ -34927,7 +17732,9 @@
  
  
  
@@ -32474,7 +44376,7 @@ index f51d803..459bf70 100755
  
      if test "x${FFMPEGTHUMBNAILER_OPTION_ENABLED}" = xyes; then
  
-@@ -34942,10 +17749,10 @@ fi
+@@ -34942,10 +17749,10 @@
  
  
  # Check whether --with-ffmpegthumbnailer-h was given.
@@ -32487,7 +44389,7 @@ index f51d803..459bf70 100755
  $as_echo "$as_me: Will search for ffmpegthumbnailer headers in $withval" >&6;}
  
  
-@@ -34958,145 +17765,8 @@ fi
+@@ -34958,446 +17765,39 @@
          CXXFLAGS="$CXXFLAGS -I${mt_ffmpegthumbnailer_search_headers}"
          CPPFLAGS="$CPPFLAGS -I${mt_ffmpegthumbnailer_search_headers}"
          as_ac_Header=`$as_echo "ac_cv_header_$mt_ffmpegthumbnailer_search_headers/libffmpegthumbnailer/videothumbnailerc.h" | $as_tr_sh`
@@ -32635,25 +44537,24 @@ index f51d803..459bf70 100755
  
                  mt_ffmpegthumbnailer_cxxflags="-I${mt_ffmpegthumbnailer_search_headers}"
  
-@@ -35104,12 +17774,10 @@ else
+ else
  
-                 mt_ffmpegthumbnailer_header_status=missing
-                 if test "" = "pass"; then
+-                mt_ffmpegthumbnailer_header_status=missing
+-                if test "" = "pass"; then
 -                    { $as_echo "$as_me:$LINENO: ffmpegthumbnailer headers not found in requested location $mt_ffmpegthumbnailer_search_headers" >&5
-+                    { $as_echo "$as_me:${as_lineno-$LINENO}: ffmpegthumbnailer headers not found in requested location $mt_ffmpegthumbnailer_search_headers" >&5
- $as_echo "$as_me: ffmpegthumbnailer headers not found in requested location $mt_ffmpegthumbnailer_search_headers" >&6;}
-                 else
+-$as_echo "$as_me: ffmpegthumbnailer headers not found in requested location $mt_ffmpegthumbnailer_search_headers" >&6;}
+-                else
 -                    { { $as_echo "$as_me:$LINENO: error: ffmpegthumbnailer headers not found in requested location $mt_ffmpegthumbnailer_search_headers" >&5
 -$as_echo "$as_me: error: ffmpegthumbnailer headers not found in requested location $mt_ffmpegthumbnailer_search_headers" >&2;}
 -   { (exit 1); exit 1; }; }
-+                    as_fn_error $? "ffmpegthumbnailer headers not found in requested location $mt_ffmpegthumbnailer_search_headers" "$LINENO" 5
-                 fi
- 
- 
-@@ -35118,140 +17786,9 @@ fi
- 
-     else
-         unset ac_cv_header_libffmpegthumbnailer_videothumbnailerc_h
+-                fi
+-
+-
+-fi
+-
+-
+-    else
+-        unset ac_cv_header_libffmpegthumbnailer_videothumbnailerc_h
 -        if test "${ac_cv_header_libffmpegthumbnailer_videothumbnailerc_h+set}" = set; then
 -  { $as_echo "$as_me:$LINENO: checking for libffmpegthumbnailer/videothumbnailerc.h" >&5
 -$as_echo_n "checking for libffmpegthumbnailer/videothumbnailerc.h... " >&6; }
@@ -32704,9 +44605,7 @@ index f51d803..459bf70 100755
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 -$as_echo "$ac_header_compiler" >&6; }
-+        ac_fn_cxx_check_header_mongrel "$LINENO" "libffmpegthumbnailer/videothumbnailerc.h" "ac_cv_header_libffmpegthumbnailer_videothumbnailerc_h" "$ac_includes_default"
-+if test "x$ac_cv_header_libffmpegthumbnailer_videothumbnailerc_h" = x""yes; then :
- 
+-
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking libffmpegthumbnailer/videothumbnailerc.h presence" >&5
 -$as_echo_n "checking libffmpegthumbnailer/videothumbnailerc.h presence... " >&6; }
@@ -32790,13 +44689,13 @@ index f51d803..459bf70 100755
 -fi
 -if test "x$ac_cv_header_libffmpegthumbnailer_videothumbnailerc_h" = x""yes; then
 -  :
- else
- 
-                 CFLAGS="$CFLAGS -I$MT_SEARCHPATH_HEADERS"
-@@ -35259,145 +17796,8 @@ else
-                 CPPFLAGS="$CPPFLAGS -I$MT_SEARCHPATH_HEADERS"
-                 unset ac_cv_header_libffmpegthumbnailer_videothumbnailerc_h
-                 as_ac_Header=`$as_echo "ac_cv_header_$MT_SEARCHPATH_HEADERS/libffmpegthumbnailer/videothumbnailerc.h" | $as_tr_sh`
+-else
+-
+-                CFLAGS="$CFLAGS -I$MT_SEARCHPATH_HEADERS"
+-                CXXFLAGS="$CXXFLAGS -I$MT_SEARCHPATH_HEADERS"
+-                CPPFLAGS="$CPPFLAGS -I$MT_SEARCHPATH_HEADERS"
+-                unset ac_cv_header_libffmpegthumbnailer_videothumbnailerc_h
+-                as_ac_Header=`$as_echo "ac_cv_header_$MT_SEARCHPATH_HEADERS/libffmpegthumbnailer/videothumbnailerc.h" | $as_tr_sh`
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 -  { $as_echo "$as_me:$LINENO: checking for $MT_SEARCHPATH_HEADERS/libffmpegthumbnailer/videothumbnailerc.h" >&5
 -$as_echo_n "checking for $MT_SEARCHPATH_HEADERS/libffmpegthumbnailer/videothumbnailerc.h... " >&6; }
@@ -32882,14 +44781,22 @@ index f51d803..459bf70 100755
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++                mt_ffmpegthumbnailer_header_status=missing
++                if test "" = "pass"; then
++                    { $as_echo "$as_me:${as_lineno-$LINENO}: ffmpegthumbnailer headers not found in requested location $mt_ffmpegthumbnailer_search_headers" >&5
++$as_echo "$as_me: ffmpegthumbnailer headers not found in requested location $mt_ffmpegthumbnailer_search_headers" >&6;}
++                else
++                    as_fn_error $? "ffmpegthumbnailer headers not found in requested location $mt_ffmpegthumbnailer_search_headers" "$LINENO" 5
++                fi
++
+ 
 -  ac_header_preproc=no
--fi
--
+ fi
+ 
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$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_cxx_preproc_warn_flag in
 -  yes:no: )
@@ -32924,24 +44831,34 @@ index f51d803..459bf70 100755
 -$as_echo_n "checking for $MT_SEARCHPATH_HEADERS/libffmpegthumbnailer/videothumbnailerc.h... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 -  $as_echo_n "(cached) " >&6
--else
++    else
++        unset ac_cv_header_libffmpegthumbnailer_videothumbnailerc_h
++        ac_fn_cxx_check_header_mongrel "$LINENO" "libffmpegthumbnailer/videothumbnailerc.h" "ac_cv_header_libffmpegthumbnailer_videothumbnailerc_h" "$ac_includes_default"
++if test "x$ac_cv_header_libffmpegthumbnailer_videothumbnailerc_h" = x""yes; then :
++
+ else
 -  eval "$as_ac_Header=\$ac_header_preproc"
 -fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
--
+ 
 -fi
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
++                CFLAGS="$CFLAGS -I$MT_SEARCHPATH_HEADERS"
++                CXXFLAGS="$CXXFLAGS -I$MT_SEARCHPATH_HEADERS"
++                CPPFLAGS="$CPPFLAGS -I$MT_SEARCHPATH_HEADERS"
++                unset ac_cv_header_libffmpegthumbnailer_videothumbnailerc_h
++                as_ac_Header=`$as_echo "ac_cv_header_$MT_SEARCHPATH_HEADERS/libffmpegthumbnailer/videothumbnailerc.h" | $as_tr_sh`
 +ac_fn_cxx_check_header_mongrel "$LINENO" "$MT_SEARCHPATH_HEADERS/libffmpegthumbnailer/videothumbnailerc.h" "$as_ac_Header" "$ac_includes_default"
 +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
  
                          mt_ffmpegthumbnailer_cxxflags="-I${MT_SEARCHPATH_HEADERS}"
  
-@@ -35441,10 +17841,10 @@ fi
+@@ -35441,10 +17841,10 @@
  
  
  # Check whether --with-ffmpegthumbnailer-libs was given.
@@ -32954,7 +44871,7 @@ index f51d803..459bf70 100755
  $as_echo "$as_me: Will search for ffmpegthumbnailer libs in $withval" >&6;}
  
  
-@@ -35454,18 +17854,14 @@ fi
+@@ -35454,18 +17854,14 @@
      if test "$mt_ffmpegthumbnailer_search_libs" ; then
          unset ac_cv_lib_ffmpegthumbnailer_create_thumbnailer
          LDFLAGS="$LDFLAGS -L$mt_ffmpegthumbnailer_search_libs"
@@ -32976,7 +44893,7 @@ index f51d803..459bf70 100755
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -35483,43 +17879,18 @@ return create_thumbnailer ();
+@@ -35483,43 +17879,18 @@
    return 0;
  }
  _ACEOF
@@ -33026,7 +44943,7 @@ index f51d803..459bf70 100755
  
                  mt_ffmpegthumbnailer_libs="-lffmpegthumbnailer"
                  mt_ffmpegthumbnailer_ldflags="-L$mt_ffmpegthumbnailer_search_libs"
-@@ -35528,12 +17899,10 @@ else
+@@ -35528,12 +17899,10 @@
  
                  mt_ffmpegthumbnailer_library_status=missing
                  if test "" = "pass"; then
@@ -33041,7 +44958,7 @@ index f51d803..459bf70 100755
                  fi
  
  
-@@ -35541,18 +17910,14 @@ fi
+@@ -35541,18 +17910,14 @@
  
      else
          unset ac_cv_lib_ffmpegthumbnailer_create_thumbnailer
@@ -33063,7 +44980,7 @@ index f51d803..459bf70 100755
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -35570,43 +17935,18 @@ return create_thumbnailer ();
+@@ -35570,43 +17935,18 @@
    return 0;
  }
  _ACEOF
@@ -33113,7 +45030,7 @@ index f51d803..459bf70 100755
  
                  mt_ffmpegthumbnailer_libs="-lffmpegthumbnailer"
  
-@@ -35614,18 +17954,14 @@ else
+@@ -35614,18 +17954,14 @@
  
                  LDFLAGS="$LDFLAGS -L$MT_SEARCHPATH_LIBS"
                  unset ac_cv_lib_ffmpegthumbnailer_create_thumbnailer
@@ -33135,7 +45052,7 @@ index f51d803..459bf70 100755
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -35643,43 +17979,18 @@ return create_thumbnailer ();
+@@ -35643,43 +17979,18 @@
    return 0;
  }
  _ACEOF
@@ -33185,7 +45102,7 @@ index f51d803..459bf70 100755
  
                          mt_ffmpegthumbnailer_libs="-lffmpegthumbnailer"
                          mt_ffmpegthumbnailer_ldflags="-L$MT_SEARCHPATH_LIBS"
-@@ -35725,16 +18036,12 @@ fi
+@@ -35725,16 +18036,12 @@
      if ((test "x${FFMPEGTHUMBNAILER_OPTION_ENABLED}" = xyes) &&
          (test "x${FFMPEGTHUMBNAILER_OPTION_REQUESTED}" = xyes) &&
          (test "x$mt_ffmpegthumbnailer_status" != xyes) && (test "" != "pass")); then
@@ -33204,7 +45121,7 @@ index f51d803..459bf70 100755
  
      fi
  
-@@ -35748,9 +18055,7 @@ _ACEOF
+@@ -35748,9 +18055,7 @@
  
      if (test "x$FFMPEGTHUMBNAILER_STATUS" = xyes); then
  
@@ -33215,7 +45132,7 @@ index f51d803..459bf70 100755
  
          FFMPEGTHUMBNAILER_USES_OLD_API=yes
      fi
-@@ -35758,11 +18063,9 @@ fi
+@@ -35758,11 +18063,9 @@
  
  if ((test "x$FFMPEG_STATUS" != xyes) && (test "x$FFMPEGTHUMBNAILER_STATUS" = xyes)); then
      if test "x$FFMPEGTHUMBNAILER_OPTION_REQUESTED" = xyes; then
@@ -33229,7 +45146,7 @@ index f51d803..459bf70 100755
  $as_echo "$as_me: WARNING: ffmpegthumbnailer disabled: ffmpeg libraries required" >&2;}
        FFMPEGTHUMBNAILER_STATUS="disabled"
        FFMPEGTHUMBNAILER_CFLAGS=""
-@@ -35790,7 +18093,7 @@ CPPFLAGS="$CPPFLAGS_SAVE"
+@@ -35790,7 +18093,7 @@
      fi
  
      # Check whether --enable-lastfmlib was given.
@@ -33238,7 +45155,7 @@ index f51d803..459bf70 100755
    enableval=$enable_lastfmlib;
              mt_lastfmlib_option_enabled=$enableval
              mt_lastfmlib_option_requested=yes
-@@ -35805,7 +18108,9 @@ fi
+@@ -35805,7 +18108,9 @@
  
  
  
@@ -33248,7 +45165,7 @@ index f51d803..459bf70 100755
  
      if test "x${LASTFMLIB_OPTION_ENABLED}" = xyes; then
  
-@@ -35820,10 +18125,10 @@ fi
+@@ -35820,10 +18125,10 @@
  
  
  # Check whether --with-lastfmlib-h was given.
@@ -33261,7 +45178,7 @@ index f51d803..459bf70 100755
  $as_echo "$as_me: Will search for lastfmlib headers in $withval" >&6;}
  
  
-@@ -35836,145 +18141,8 @@ fi
+@@ -35836,145 +18141,8 @@
          CXXFLAGS="$CXXFLAGS -I${mt_lastfmlib_search_headers}"
          CPPFLAGS="$CPPFLAGS -I${mt_lastfmlib_search_headers}"
          as_ac_Header=`$as_echo "ac_cv_header_$mt_lastfmlib_search_headers/lastfmlib/lastfmscrobbler.h" | $as_tr_sh`
@@ -33409,7 +45326,7 @@ index f51d803..459bf70 100755
  
                  mt_lastfmlib_cxxflags="-I${mt_lastfmlib_search_headers}"
  
-@@ -35982,12 +18150,10 @@ else
+@@ -35982,300 +18150,30 @@
  
                  mt_lastfmlib_header_status=missing
                  if test "" = "pass"; then
@@ -33420,14 +45337,14 @@ index f51d803..459bf70 100755
 -                    { { $as_echo "$as_me:$LINENO: error: lastfmlib headers not found in requested location $mt_lastfmlib_search_headers" >&5
 -$as_echo "$as_me: error: lastfmlib headers not found in requested location $mt_lastfmlib_search_headers" >&2;}
 -   { (exit 1); exit 1; }; }
-+                    as_fn_error $? "lastfmlib headers not found in requested location $mt_lastfmlib_search_headers" "$LINENO" 5
-                 fi
- 
- 
-@@ -35996,140 +18162,9 @@ fi
- 
-     else
-         unset ac_cv_header_lastfmlib_lastfmscrobbler_h
+-                fi
+-
+-
+-fi
+-
+-
+-    else
+-        unset ac_cv_header_lastfmlib_lastfmscrobbler_h
 -        if test "${ac_cv_header_lastfmlib_lastfmscrobbler_h+set}" = set; then
 -  { $as_echo "$as_me:$LINENO: checking for lastfmlib/lastfmscrobbler.h" >&5
 -$as_echo_n "checking for lastfmlib/lastfmscrobbler.h... " >&6; }
@@ -33471,9 +45388,7 @@ index f51d803..459bf70 100755
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+        ac_fn_cxx_check_header_mongrel "$LINENO" "lastfmlib/lastfmscrobbler.h" "ac_cv_header_lastfmlib_lastfmscrobbler_h" "$ac_includes_default"
-+if test "x$ac_cv_header_lastfmlib_lastfmscrobbler_h" = x""yes; then :
- 
+-
 -	ac_header_compiler=no
 -fi
 -
@@ -33564,13 +45479,13 @@ index f51d803..459bf70 100755
 -fi
 -if test "x$ac_cv_header_lastfmlib_lastfmscrobbler_h" = x""yes; then
 -  :
- else
- 
-                 CFLAGS="$CFLAGS -I$MT_SEARCHPATH_HEADERS"
-@@ -36137,145 +18172,8 @@ else
-                 CPPFLAGS="$CPPFLAGS -I$MT_SEARCHPATH_HEADERS"
-                 unset ac_cv_header_lastfmlib_lastfmscrobbler_h
-                 as_ac_Header=`$as_echo "ac_cv_header_$MT_SEARCHPATH_HEADERS/lastfmlib/lastfmscrobbler.h" | $as_tr_sh`
+-else
+-
+-                CFLAGS="$CFLAGS -I$MT_SEARCHPATH_HEADERS"
+-                CXXFLAGS="$CXXFLAGS -I$MT_SEARCHPATH_HEADERS"
+-                CPPFLAGS="$CPPFLAGS -I$MT_SEARCHPATH_HEADERS"
+-                unset ac_cv_header_lastfmlib_lastfmscrobbler_h
+-                as_ac_Header=`$as_echo "ac_cv_header_$MT_SEARCHPATH_HEADERS/lastfmlib/lastfmscrobbler.h" | $as_tr_sh`
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 -  { $as_echo "$as_me:$LINENO: checking for $MT_SEARCHPATH_HEADERS/lastfmlib/lastfmscrobbler.h" >&5
 -$as_echo_n "checking for $MT_SEARCHPATH_HEADERS/lastfmlib/lastfmscrobbler.h... " >&6; }
@@ -33656,14 +45571,17 @@ index f51d803..459bf70 100755
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
--
++                    as_fn_error $? "lastfmlib headers not found in requested location $mt_lastfmlib_search_headers" "$LINENO" 5
++                fi
++
+ 
 -  ac_header_preproc=no
--fi
--
+ fi
+ 
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$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_cxx_preproc_warn_flag in
 -  yes:no: )
@@ -33698,24 +45616,34 @@ index f51d803..459bf70 100755
 -$as_echo_n "checking for $MT_SEARCHPATH_HEADERS/lastfmlib/lastfmscrobbler.h... " >&6; }
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 -  $as_echo_n "(cached) " >&6
--else
++    else
++        unset ac_cv_header_lastfmlib_lastfmscrobbler_h
++        ac_fn_cxx_check_header_mongrel "$LINENO" "lastfmlib/lastfmscrobbler.h" "ac_cv_header_lastfmlib_lastfmscrobbler_h" "$ac_includes_default"
++if test "x$ac_cv_header_lastfmlib_lastfmscrobbler_h" = x""yes; then :
++
+ else
 -  eval "$as_ac_Header=\$ac_header_preproc"
 -fi
 -ac_res=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
--
+ 
 -fi
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
++                CFLAGS="$CFLAGS -I$MT_SEARCHPATH_HEADERS"
++                CXXFLAGS="$CXXFLAGS -I$MT_SEARCHPATH_HEADERS"
++                CPPFLAGS="$CPPFLAGS -I$MT_SEARCHPATH_HEADERS"
++                unset ac_cv_header_lastfmlib_lastfmscrobbler_h
++                as_ac_Header=`$as_echo "ac_cv_header_$MT_SEARCHPATH_HEADERS/lastfmlib/lastfmscrobbler.h" | $as_tr_sh`
 +ac_fn_cxx_check_header_mongrel "$LINENO" "$MT_SEARCHPATH_HEADERS/lastfmlib/lastfmscrobbler.h" "$as_ac_Header" "$ac_includes_default"
 +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
  
                          mt_lastfmlib_cxxflags="-I${MT_SEARCHPATH_HEADERS}"
  
-@@ -36319,10 +18217,10 @@ fi
+@@ -36319,10 +18217,10 @@
  
  
  # Check whether --with-lastfmlib-libs was given.
@@ -33728,7 +45656,7 @@ index f51d803..459bf70 100755
  $as_echo "$as_me: Will search for lastfmlib libs in $withval" >&6;}
  
  
-@@ -36332,18 +18230,14 @@ fi
+@@ -36332,18 +18230,14 @@
      if test "$mt_lastfmlib_search_libs" ; then
          unset ac_cv_lib_lastfmlib_create_scrobbler
          LDFLAGS="$LDFLAGS -L$mt_lastfmlib_search_libs"
@@ -33750,7 +45678,7 @@ index f51d803..459bf70 100755
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -36361,43 +18255,18 @@ return create_scrobbler ();
+@@ -36361,43 +18255,18 @@
    return 0;
  }
  _ACEOF
@@ -33800,7 +45728,7 @@ index f51d803..459bf70 100755
  
                  mt_lastfmlib_libs="-llastfmlib"
                  mt_lastfmlib_ldflags="-L$mt_lastfmlib_search_libs"
-@@ -36406,12 +18275,10 @@ else
+@@ -36406,12 +18275,10 @@
  
                  mt_lastfmlib_library_status=missing
                  if test "" = "pass"; then
@@ -33815,7 +45743,7 @@ index f51d803..459bf70 100755
                  fi
  
  
-@@ -36419,18 +18286,14 @@ fi
+@@ -36419,18 +18286,14 @@
  
      else
          unset ac_cv_lib_lastfmlib_create_scrobbler
@@ -33837,7 +45765,7 @@ index f51d803..459bf70 100755
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -36448,43 +18311,18 @@ return create_scrobbler ();
+@@ -36448,43 +18311,18 @@
    return 0;
  }
  _ACEOF
@@ -33887,7 +45815,7 @@ index f51d803..459bf70 100755
  
                  mt_lastfmlib_libs="-llastfmlib"
  
-@@ -36492,18 +18330,14 @@ else
+@@ -36492,18 +18330,14 @@
  
                  LDFLAGS="$LDFLAGS -L$MT_SEARCHPATH_LIBS"
                  unset ac_cv_lib_lastfmlib_create_scrobbler
@@ -33909,7 +45837,7 @@ index f51d803..459bf70 100755
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -36521,43 +18355,18 @@ return create_scrobbler ();
+@@ -36521,43 +18355,18 @@
    return 0;
  }
  _ACEOF
@@ -33959,7 +45887,7 @@ index f51d803..459bf70 100755
  
                          mt_lastfmlib_libs="-llastfmlib"
                          mt_lastfmlib_ldflags="-L$MT_SEARCHPATH_LIBS"
-@@ -36603,16 +18412,12 @@ fi
+@@ -36603,16 +18412,12 @@
      if ((test "x${LASTFMLIB_OPTION_ENABLED}" = xyes) &&
          (test "x${LASTFMLIB_OPTION_REQUESTED}" = xyes) &&
          (test "x$mt_lastfmlib_status" != xyes) && (test "" != "pass")); then
@@ -33978,7 +45906,7 @@ index f51d803..459bf70 100755
  
      fi
  
-@@ -36643,10 +18448,10 @@ if test "x$LIBEXTRACTOR_OPTION_ENABLED" = xyes; then
+@@ -36643,10 +18448,10 @@
  
  
  # Check whether --with-libextractor-h was given.
@@ -33991,7 +45919,7 @@ index f51d803..459bf70 100755
  $as_echo "$as_me: Will search for libextractor headers in $withval" >&6;}
  
  
-@@ -36659,145 +18464,8 @@ fi
+@@ -36659,145 +18464,8 @@
          CXXFLAGS="$CXXFLAGS -I${mt_libextractor_search_headers}"
          CPPFLAGS="$CPPFLAGS -I${mt_libextractor_search_headers}"
          as_ac_Header=`$as_echo "ac_cv_header_$mt_libextractor_search_headers/extractor.h" | $as_tr_sh`
@@ -34139,7 +46067,7 @@ index f51d803..459bf70 100755
  
                  mt_libextractor_cxxflags="-I${mt_libextractor_search_headers}"
  
-@@ -36805,12 +18473,10 @@ else
+@@ -36805,12 +18473,10 @@
  
                  mt_libextractor_header_status=missing
                  if test "" = "pass"; then
@@ -34154,7 +46082,7 @@ index f51d803..459bf70 100755
                  fi
  
  
-@@ -36819,140 +18485,9 @@ fi
+@@ -36819,140 +18485,9 @@
  
      else
          unset ac_cv_header_extractor_h
@@ -34297,7 +46225,7 @@ index f51d803..459bf70 100755
  else
  
                  CFLAGS="$CFLAGS -I$MT_SEARCHPATH_HEADERS"
-@@ -36960,145 +18495,8 @@ else
+@@ -36960,145 +18495,8 @@
                  CPPFLAGS="$CPPFLAGS -I$MT_SEARCHPATH_HEADERS"
                  unset ac_cv_header_extractor_h
                  as_ac_Header=`$as_echo "ac_cv_header_$MT_SEARCHPATH_HEADERS/extractor.h" | $as_tr_sh`
@@ -34445,7 +46373,7 @@ index f51d803..459bf70 100755
  
                          mt_libextractor_cxxflags="-I${MT_SEARCHPATH_HEADERS}"
  
-@@ -37142,10 +18540,10 @@ fi
+@@ -37142,10 +18540,10 @@
  
  
  # Check whether --with-libextractor-libs was given.
@@ -34458,7 +46386,7 @@ index f51d803..459bf70 100755
  $as_echo "$as_me: Will search for libextractor libs in $withval" >&6;}
  
  
-@@ -37155,18 +18553,14 @@ fi
+@@ -37155,18 +18553,14 @@
      if test "$mt_libextractor_search_libs" ; then
          unset ac_cv_lib_extractor_EXTRACTOR_getKeywords
          LDFLAGS="$LDFLAGS -L$mt_libextractor_search_libs"
@@ -34480,7 +46408,7 @@ index f51d803..459bf70 100755
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -37184,43 +18578,18 @@ return EXTRACTOR_getKeywords ();
+@@ -37184,43 +18578,18 @@
    return 0;
  }
  _ACEOF
@@ -34530,7 +46458,7 @@ index f51d803..459bf70 100755
  
                  mt_libextractor_libs="-lextractor"
                  mt_libextractor_ldflags="-L$mt_libextractor_search_libs"
-@@ -37229,12 +18598,10 @@ else
+@@ -37229,12 +18598,10 @@
  
                  mt_libextractor_library_status=missing
                  if test "" = "pass"; then
@@ -34545,7 +46473,7 @@ index f51d803..459bf70 100755
                  fi
  
  
-@@ -37242,18 +18609,14 @@ fi
+@@ -37242,18 +18609,14 @@
  
      else
          unset ac_cv_lib_extractor_EXTRACTOR_getKeywords
@@ -34567,7 +46495,7 @@ index f51d803..459bf70 100755
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -37271,43 +18634,18 @@ return EXTRACTOR_getKeywords ();
+@@ -37271,43 +18634,18 @@
    return 0;
  }
  _ACEOF
@@ -34617,7 +46545,7 @@ index f51d803..459bf70 100755
  
                  mt_libextractor_libs="-lextractor"
  
-@@ -37315,18 +18653,14 @@ else
+@@ -37315,18 +18653,14 @@
  
                  LDFLAGS="$LDFLAGS -L$MT_SEARCHPATH_LIBS"
                  unset ac_cv_lib_extractor_EXTRACTOR_getKeywords
@@ -34639,7 +46567,7 @@ index f51d803..459bf70 100755
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -37344,43 +18678,18 @@ return EXTRACTOR_getKeywords ();
+@@ -37344,43 +18678,18 @@
    return 0;
  }
  _ACEOF
@@ -34689,7 +46617,7 @@ index f51d803..459bf70 100755
  
                          mt_libextractor_libs="-lextractor"
                          mt_libextractor_ldflags="-L$MT_SEARCHPATH_LIBS"
-@@ -37423,9 +18732,7 @@ fi
+@@ -37423,9 +18732,7 @@
  
      if test "x$mt_libextractor_status" = xyes; then
  
@@ -34700,7 +46628,7 @@ index f51d803..459bf70 100755
  
      fi
  
-@@ -37444,9 +18751,7 @@ if test "x$LIBEXTRACTOR_STATUS" = xyes; then
+@@ -37444,9 +18751,7 @@
  else
      if (test "x$LIBEXTRACTOR_OPTION_REQUESTED" = xyes) &&
         (test "x$LIBEXTRACTOR_OPTION_ENABLED" = xyes); then
@@ -34711,7 +46639,7 @@ index f51d803..459bf70 100755
      fi
  fi
  
-@@ -37466,7 +18771,7 @@ fi
+@@ -37466,7 +18771,7 @@
      fi
  
      # Check whether --enable-libexif was given.
@@ -34720,7 +46648,7 @@ index f51d803..459bf70 100755
    enableval=$enable_libexif;
              mt_libexif_option_enabled=$enableval
              mt_libexif_option_requested=yes
-@@ -37481,7 +18786,9 @@ fi
+@@ -37481,7 +18786,9 @@
  
  
  
@@ -34730,7 +46658,7 @@ index f51d803..459bf70 100755
  
      if test "x${LIBEXIF_OPTION_ENABLED}" = xyes; then
  
-@@ -37496,10 +18803,10 @@ fi
+@@ -37496,10 +18803,10 @@
  
  
  # Check whether --with-libexif-h was given.
@@ -34743,7 +46671,7 @@ index f51d803..459bf70 100755
  $as_echo "$as_me: Will search for libexif headers in $withval" >&6;}
  
  
-@@ -37512,145 +18819,8 @@ fi
+@@ -37512,145 +18819,8 @@
          CXXFLAGS="$CXXFLAGS -I${mt_libexif_search_headers}"
          CPPFLAGS="$CPPFLAGS -I${mt_libexif_search_headers}"
          as_ac_Header=`$as_echo "ac_cv_header_$mt_libexif_search_headers/libexif/exif-content.h" | $as_tr_sh`
@@ -34891,7 +46819,7 @@ index f51d803..459bf70 100755
  
                  mt_libexif_cxxflags="-I${mt_libexif_search_headers}"
  
-@@ -37658,12 +18828,10 @@ else
+@@ -37658,12 +18828,10 @@
  
                  mt_libexif_header_status=missing
                  if test "" = "pass"; then
@@ -34906,7 +46834,7 @@ index f51d803..459bf70 100755
                  fi
  
  
-@@ -37672,140 +18840,9 @@ fi
+@@ -37672,140 +18840,9 @@
  
      else
          unset ac_cv_header_libexif_exif_content_h
@@ -34960,9 +46888,7 @@ index f51d803..459bf70 100755
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 -$as_echo "$ac_header_compiler" >&6; }
-+        ac_fn_cxx_check_header_mongrel "$LINENO" "libexif/exif-content.h" "ac_cv_header_libexif_exif_content_h" "$ac_includes_default"
-+if test "x$ac_cv_header_libexif_exif_content_h" = x""yes; then :
- 
+-
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking libexif/exif-content.h presence" >&5
 -$as_echo_n "checking libexif/exif-content.h presence... " >&6; }
@@ -35042,14 +46968,16 @@ index f51d803..459bf70 100755
 -fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_libexif_exif_content_h" >&5
 -$as_echo "$ac_cv_header_libexif_exif_content_h" >&6; }
--
++        ac_fn_cxx_check_header_mongrel "$LINENO" "libexif/exif-content.h" "ac_cv_header_libexif_exif_content_h" "$ac_includes_default"
++if test "x$ac_cv_header_libexif_exif_content_h" = x""yes; then :
+ 
 -fi
 -if test "x$ac_cv_header_libexif_exif_content_h" = x""yes; then
 -  :
  else
  
                  CFLAGS="$CFLAGS -I$MT_SEARCHPATH_HEADERS"
-@@ -37813,145 +18850,8 @@ else
+@@ -37813,145 +18850,8 @@
                  CPPFLAGS="$CPPFLAGS -I$MT_SEARCHPATH_HEADERS"
                  unset ac_cv_header_libexif_exif_content_h
                  as_ac_Header=`$as_echo "ac_cv_header_$MT_SEARCHPATH_HEADERS/libexif/exif-content.h" | $as_tr_sh`
@@ -35197,7 +47125,7 @@ index f51d803..459bf70 100755
  
                          mt_libexif_cxxflags="-I${MT_SEARCHPATH_HEADERS}"
  
-@@ -37995,10 +18895,10 @@ fi
+@@ -37995,10 +18895,10 @@
  
  
  # Check whether --with-libexif-libs was given.
@@ -35210,7 +47138,7 @@ index f51d803..459bf70 100755
  $as_echo "$as_me: Will search for libexif libs in $withval" >&6;}
  
  
-@@ -38008,18 +18908,14 @@ fi
+@@ -38008,18 +18908,14 @@
      if test "$mt_libexif_search_libs" ; then
          unset ac_cv_lib_exif_exif_data_new_from_file
          LDFLAGS="$LDFLAGS -L$mt_libexif_search_libs"
@@ -35232,7 +47160,7 @@ index f51d803..459bf70 100755
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -38037,43 +18933,18 @@ return exif_data_new_from_file ();
+@@ -38037,43 +18933,18 @@
    return 0;
  }
  _ACEOF
@@ -35282,7 +47210,7 @@ index f51d803..459bf70 100755
  
                  mt_libexif_libs="-lexif"
                  mt_libexif_ldflags="-L$mt_libexif_search_libs"
-@@ -38082,12 +18953,10 @@ else
+@@ -38082,12 +18953,10 @@
  
                  mt_libexif_library_status=missing
                  if test "" = "pass"; then
@@ -35297,7 +47225,7 @@ index f51d803..459bf70 100755
                  fi
  
  
-@@ -38095,18 +18964,14 @@ fi
+@@ -38095,18 +18964,14 @@
  
      else
          unset ac_cv_lib_exif_exif_data_new_from_file
@@ -35319,7 +47247,7 @@ index f51d803..459bf70 100755
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -38124,43 +18989,18 @@ return exif_data_new_from_file ();
+@@ -38124,43 +18989,18 @@
    return 0;
  }
  _ACEOF
@@ -35369,7 +47297,7 @@ index f51d803..459bf70 100755
  
                  mt_libexif_libs="-lexif"
  
-@@ -38168,18 +19008,14 @@ else
+@@ -38168,18 +19008,14 @@
  
                  LDFLAGS="$LDFLAGS -L$MT_SEARCHPATH_LIBS"
                  unset ac_cv_lib_exif_exif_data_new_from_file
@@ -35391,7 +47319,7 @@ index f51d803..459bf70 100755
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -38197,43 +19033,18 @@ return exif_data_new_from_file ();
+@@ -38197,43 +19033,18 @@
    return 0;
  }
  _ACEOF
@@ -35441,7 +47369,7 @@ index f51d803..459bf70 100755
  
                          mt_libexif_libs="-lexif"
                          mt_libexif_ldflags="-L$MT_SEARCHPATH_LIBS"
-@@ -38279,16 +19090,12 @@ fi
+@@ -38279,16 +19090,12 @@
      if ((test "x${LIBEXIF_OPTION_ENABLED}" = xyes) &&
          (test "x${LIBEXIF_OPTION_REQUESTED}" = xyes) &&
          (test "x$mt_libexif_status" != xyes) && (test "" != "pass")); then
@@ -35460,7 +47388,7 @@ index f51d803..459bf70 100755
  
      fi
  
-@@ -38306,13 +19113,9 @@ if test "x$LIBEXIF_STATUS" = xyes; then
+@@ -38306,13 +19113,9 @@
      LDFLAGS="$LDFLAGS $LIBEXIF_LDFLAGS $LIBEXIF_LIBS"
  
      # try 1 argument signature
@@ -35476,7 +47404,7 @@ index f51d803..459bf70 100755
  /* end confdefs.h.  */
  
                  #include <libexif/exif-data.h>
-@@ -38329,40 +19132,16 @@ main ()
+@@ -38329,40 +19132,16 @@
    return 0;
  }
  _ACEOF
@@ -35520,7 +47448,7 @@ index f51d803..459bf70 100755
  /* end confdefs.h.  */
  
                          #include <libexif/exif-data.h>
-@@ -38379,60 +19158,34 @@ main ()
+@@ -38379,60 +19158,34 @@
    return 0;
  }
  _ACEOF
@@ -35552,8 +47480,8 @@ index f51d803..459bf70 100755
  else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
- 
 -
+ 
 -                    { $as_echo "$as_me:$LINENO: result: unsupported, disabling" >&5
 +                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported, disabling" >&5
  $as_echo "unsupported, disabling" >&6; }
@@ -35586,7 +47514,7 @@ index f51d803..459bf70 100755
  
      fi
  fi
-@@ -38456,10 +19209,10 @@ CXXFLAGS="$CXXFLAGS_SAVE"
+@@ -38456,10 +19209,10 @@
  
  
  # Check whether --with-expat-h was given.
@@ -35599,7 +47527,7 @@ index f51d803..459bf70 100755
  $as_echo "$as_me: Will search for expat headers in $withval" >&6;}
  
  
-@@ -38472,145 +19225,8 @@ fi
+@@ -38472,145 +19225,8 @@
          CXXFLAGS="$CXXFLAGS -I${mt_expat_search_headers}"
          CPPFLAGS="$CPPFLAGS -I${mt_expat_search_headers}"
          as_ac_Header=`$as_echo "ac_cv_header_$mt_expat_search_headers/expat.h" | $as_tr_sh`
@@ -35747,7 +47675,7 @@ index f51d803..459bf70 100755
  
                  mt_expat_cxxflags="-I${mt_expat_search_headers}"
  
-@@ -38618,12 +19234,10 @@ else
+@@ -38618,12 +19234,10 @@
  
                  mt_expat_header_status=missing
                  if test "" = "pass"; then
@@ -35762,7 +47690,7 @@ index f51d803..459bf70 100755
                  fi
  
  
-@@ -38632,140 +19246,9 @@ fi
+@@ -38632,140 +19246,9 @@
  
      else
          unset ac_cv_header_expat_h
@@ -35856,9 +47784,7 @@ index f51d803..459bf70 100755
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 -$as_echo "$ac_header_preproc" >&6; }
-+        ac_fn_cxx_check_header_mongrel "$LINENO" "expat.h" "ac_cv_header_expat_h" "$ac_includes_default"
-+if test "x$ac_cv_header_expat_h" = x""yes; then :
- 
+-
 -# So?  What about this header?
 -case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
 -  yes:no: )
@@ -35898,14 +47824,16 @@ index f51d803..459bf70 100755
 -fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_expat_h" >&5
 -$as_echo "$ac_cv_header_expat_h" >&6; }
--
++        ac_fn_cxx_check_header_mongrel "$LINENO" "expat.h" "ac_cv_header_expat_h" "$ac_includes_default"
++if test "x$ac_cv_header_expat_h" = x""yes; then :
+ 
 -fi
 -if test "x$ac_cv_header_expat_h" = x""yes; then
 -  :
  else
  
                  CFLAGS="$CFLAGS -I$MT_SEARCHPATH_HEADERS"
-@@ -38773,145 +19256,8 @@ else
+@@ -38773,145 +19256,8 @@
                  CPPFLAGS="$CPPFLAGS -I$MT_SEARCHPATH_HEADERS"
                  unset ac_cv_header_expat_h
                  as_ac_Header=`$as_echo "ac_cv_header_$MT_SEARCHPATH_HEADERS/expat.h" | $as_tr_sh`
@@ -36053,7 +47981,7 @@ index f51d803..459bf70 100755
  
                          mt_expat_cxxflags="-I${MT_SEARCHPATH_HEADERS}"
  
-@@ -38955,10 +19301,10 @@ fi
+@@ -38955,10 +19301,10 @@
  
  
  # Check whether --with-expat-libs was given.
@@ -36066,7 +47994,7 @@ index f51d803..459bf70 100755
  $as_echo "$as_me: Will search for expat libs in $withval" >&6;}
  
  
-@@ -38968,18 +19314,14 @@ fi
+@@ -38968,18 +19314,14 @@
      if test "$mt_expat_search_libs" ; then
          unset ac_cv_lib_expat_XML_ParserCreate
          LDFLAGS="$LDFLAGS -L$mt_expat_search_libs"
@@ -36088,7 +48016,7 @@ index f51d803..459bf70 100755
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -38997,43 +19339,18 @@ return XML_ParserCreate ();
+@@ -38997,43 +19339,18 @@
    return 0;
  }
  _ACEOF
@@ -36138,7 +48066,7 @@ index f51d803..459bf70 100755
  
                  mt_expat_libs="-lexpat"
                  mt_expat_ldflags="-L$mt_expat_search_libs"
-@@ -39042,12 +19359,10 @@ else
+@@ -39042,12 +19359,10 @@
  
                  mt_expat_library_status=missing
                  if test "" = "pass"; then
@@ -36153,7 +48081,7 @@ index f51d803..459bf70 100755
                  fi
  
  
-@@ -39055,18 +19370,14 @@ fi
+@@ -39055,18 +19370,14 @@
  
      else
          unset ac_cv_lib_expat_XML_ParserCreate
@@ -36175,7 +48103,7 @@ index f51d803..459bf70 100755
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -39084,43 +19395,18 @@ return XML_ParserCreate ();
+@@ -39084,43 +19395,18 @@
    return 0;
  }
  _ACEOF
@@ -36225,7 +48153,7 @@ index f51d803..459bf70 100755
  
                  mt_expat_libs="-lexpat"
  
-@@ -39128,18 +19414,14 @@ else
+@@ -39128,18 +19414,14 @@
  
                  LDFLAGS="$LDFLAGS -L$MT_SEARCHPATH_LIBS"
                  unset ac_cv_lib_expat_XML_ParserCreate
@@ -36247,7 +48175,7 @@ index f51d803..459bf70 100755
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -39157,43 +19439,18 @@ return XML_ParserCreate ();
+@@ -39157,43 +19439,18 @@
    return 0;
  }
  _ACEOF
@@ -36297,7 +48225,7 @@ index f51d803..459bf70 100755
  
                          mt_expat_libs="-lexpat"
                          mt_expat_ldflags="-L$MT_SEARCHPATH_LIBS"
-@@ -39232,15 +19489,11 @@ fi
+@@ -39232,15 +19489,11 @@
      fi
  
      if test "x$mt_expat_package_status" != xyes; then
@@ -36315,7 +48243,7 @@ index f51d803..459bf70 100755
  
  
      EXPAT_STATUS=${mt_expat_package_status}
-@@ -39268,10 +19521,10 @@ MP4_HEADER="mp4"
+@@ -39268,10 +19521,10 @@
  
  
  # Check whether --with-libmp4v2-h was given.
@@ -36328,7 +48256,7 @@ index f51d803..459bf70 100755
  $as_echo "$as_me: Will search for libmp4v2 headers in $withval" >&6;}
  
  
-@@ -39284,145 +19537,8 @@ fi
+@@ -39284,145 +19537,8 @@
          CXXFLAGS="$CXXFLAGS -I${mt_libmp4v2_search_headers}"
          CPPFLAGS="$CPPFLAGS -I${mt_libmp4v2_search_headers}"
          as_ac_Header=`$as_echo "ac_cv_header_$mt_libmp4v2_search_headers/mp4v2/mp4v2.h" | $as_tr_sh`
@@ -36476,7 +48404,7 @@ index f51d803..459bf70 100755
  
                  mt_libmp4v2_cxxflags="-I${mt_libmp4v2_search_headers}"
  
-@@ -39430,12 +19546,10 @@ else
+@@ -39430,12 +19546,10 @@
  
                  mt_libmp4v2_header_status=missing
                  if test "pass" = "pass"; then
@@ -36491,7 +48419,7 @@ index f51d803..459bf70 100755
                  fi
  
  
-@@ -39444,140 +19558,9 @@ fi
+@@ -39444,140 +19558,9 @@
  
      else
          unset ac_cv_header_mp4v2_mp4v2_h
@@ -36578,9 +48506,7 @@ index f51d803..459bf70 100755
 -else
 -  $as_echo "$as_me: failed program was:" >&5
 -sed 's/^/| /' conftest.$ac_ext >&5
-+        ac_fn_cxx_check_header_mongrel "$LINENO" "mp4v2/mp4v2.h" "ac_cv_header_mp4v2_mp4v2_h" "$ac_includes_default"
-+if test "x$ac_cv_header_mp4v2_mp4v2_h" = x""yes; then :
- 
+-
 -  ac_header_preproc=no
 -fi
 -
@@ -36627,14 +48553,16 @@ index f51d803..459bf70 100755
 -fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_mp4v2_mp4v2_h" >&5
 -$as_echo "$ac_cv_header_mp4v2_mp4v2_h" >&6; }
--
++        ac_fn_cxx_check_header_mongrel "$LINENO" "mp4v2/mp4v2.h" "ac_cv_header_mp4v2_mp4v2_h" "$ac_includes_default"
++if test "x$ac_cv_header_mp4v2_mp4v2_h" = x""yes; then :
+ 
 -fi
 -if test "x$ac_cv_header_mp4v2_mp4v2_h" = x""yes; then
 -  :
  else
  
                  CFLAGS="$CFLAGS -I$MT_SEARCHPATH_HEADERS"
-@@ -39585,145 +19568,8 @@ else
+@@ -39585,145 +19568,8 @@
                  CPPFLAGS="$CPPFLAGS -I$MT_SEARCHPATH_HEADERS"
                  unset ac_cv_header_mp4v2_mp4v2_h
                  as_ac_Header=`$as_echo "ac_cv_header_$MT_SEARCHPATH_HEADERS/mp4v2/mp4v2.h" | $as_tr_sh`
@@ -36782,7 +48710,7 @@ index f51d803..459bf70 100755
  
                          mt_libmp4v2_cxxflags="-I${MT_SEARCHPATH_HEADERS}"
  
-@@ -39780,7 +19626,7 @@ LIBMP4V2_STATUS=
+@@ -39780,7 +19626,7 @@
      fi
  
      # Check whether --enable-libmp4v2 was given.
@@ -36791,33 +48719,42 @@ index f51d803..459bf70 100755
    enableval=$enable_libmp4v2;
              mt_libmp4v2_option_enabled=$enableval
              mt_libmp4v2_option_requested=yes
-@@ -39795,7 +19641,9 @@ fi
+@@ -39795,176 +19641,41 @@
  
  
  
 +    if test "x${mt_libmp4v2_option_enabled}" = xyes; then :
  
-+fi
- 
-     if test "x${LIBMP4V2_OPTION_ENABLED}" = xyes; then
- 
-@@ -39810,10 +19658,10 @@ fi
- 
- 
- # Check whether --with-libmp4v2-h was given.
+-
+-    if test "x${LIBMP4V2_OPTION_ENABLED}" = xyes; then
+-
+-
+-    LIBS_SAVE=$LIBS
+-    LDFLAGS_SAVE=$LDFLAGS
+-    CFLAGS_SAVE=$CFLAGS
+-    CXXFLAGS_SAVE=$CXXFLAGS
+-    CPPFLAGS_SAVE=$CPPFLAGS
+-
+-    mt_libmp4v2_header_status=yes
+-
+-
+-# Check whether --with-libmp4v2-h was given.
 -if test "${with_libmp4v2_h+set}" = set; then
-+if test "${with_libmp4v2_h+set}" = set; then :
-   withval=$with_libmp4v2_h;
-             mt_libmp4v2_search_headers="$withval"
+-  withval=$with_libmp4v2_h;
+-            mt_libmp4v2_search_headers="$withval"
 -            { $as_echo "$as_me:$LINENO: Will search for libmp4v2 headers in $withval" >&5
-+            { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for libmp4v2 headers in $withval" >&5
- $as_echo "$as_me: Will search for libmp4v2 headers in $withval" >&6;}
- 
- 
-@@ -39826,145 +19674,8 @@ fi
-         CXXFLAGS="$CXXFLAGS -I${mt_libmp4v2_search_headers}"
-         CPPFLAGS="$CPPFLAGS -I${mt_libmp4v2_search_headers}"
-         as_ac_Header=`$as_echo "ac_cv_header_$mt_libmp4v2_search_headers/$MP4_HEADER.h" | $as_tr_sh`
+-$as_echo "$as_me: Will search for libmp4v2 headers in $withval" >&6;}
+-
+-
+-fi
+-
+-
+-    if test "$mt_libmp4v2_search_headers" ; then
+-        unset ac_cv_header_$MP4_HEADER_h
+-        CFLAGS="$CFLAGS -I${mt_libmp4v2_search_headers}"
+-        CXXFLAGS="$CXXFLAGS -I${mt_libmp4v2_search_headers}"
+-        CPPFLAGS="$CPPFLAGS -I${mt_libmp4v2_search_headers}"
+-        as_ac_Header=`$as_echo "ac_cv_header_$mt_libmp4v2_search_headers/$MP4_HEADER.h" | $as_tr_sh`
 -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 -  { $as_echo "$as_me:$LINENO: checking for $mt_libmp4v2_search_headers/$MP4_HEADER.h" >&5
 -$as_echo_n "checking for $mt_libmp4v2_search_headers/$MP4_HEADER.h... " >&6; }
@@ -36905,12 +48842,30 @@ index f51d803..459bf70 100755
 -sed 's/^/| /' conftest.$ac_ext >&5
 -
 -  ac_header_preproc=no
--fi
--
+ fi
+ 
 -rm -f conftest.err conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 -$as_echo "$ac_header_preproc" >&6; }
--
++    if test "x${LIBMP4V2_OPTION_ENABLED}" = xyes; then
++
++
++    LIBS_SAVE=$LIBS
++    LDFLAGS_SAVE=$LDFLAGS
++    CFLAGS_SAVE=$CFLAGS
++    CXXFLAGS_SAVE=$CXXFLAGS
++    CPPFLAGS_SAVE=$CPPFLAGS
++
++    mt_libmp4v2_header_status=yes
++
++
++# Check whether --with-libmp4v2-h was given.
++if test "${with_libmp4v2_h+set}" = set; then :
++  withval=$with_libmp4v2_h;
++            mt_libmp4v2_search_headers="$withval"
++            { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for libmp4v2 headers in $withval" >&5
++$as_echo "$as_me: Will search for libmp4v2 headers in $withval" >&6;}
+ 
 -# So?  What about this header?
 -case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
 -  yes:no: )
@@ -36952,17 +48907,25 @@ index f51d803..459bf70 100755
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
--
--fi
+ 
+ fi
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
 -   if test "x$as_val" = x""yes; then
++
++
++    if test "$mt_libmp4v2_search_headers" ; then
++        unset ac_cv_header_$MP4_HEADER_h
++        CFLAGS="$CFLAGS -I${mt_libmp4v2_search_headers}"
++        CXXFLAGS="$CXXFLAGS -I${mt_libmp4v2_search_headers}"
++        CPPFLAGS="$CPPFLAGS -I${mt_libmp4v2_search_headers}"
++        as_ac_Header=`$as_echo "ac_cv_header_$mt_libmp4v2_search_headers/$MP4_HEADER.h" | $as_tr_sh`
 +ac_fn_cxx_check_header_mongrel "$LINENO" "$mt_libmp4v2_search_headers/$MP4_HEADER.h" "$as_ac_Header" "$ac_includes_default"
 +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
  
                  mt_libmp4v2_cxxflags="-I${mt_libmp4v2_search_headers}"
  
-@@ -39972,12 +19683,10 @@ else
+@@ -39972,12 +19683,10 @@
  
                  mt_libmp4v2_header_status=missing
                  if test "" = "pass"; then
@@ -36977,7 +48940,7 @@ index f51d803..459bf70 100755
                  fi
  
  
-@@ -39987,146 +19696,9 @@ fi
+@@ -39987,146 +19696,9 @@
      else
          unset ac_cv_header_$MP4_HEADER_h
          as_ac_Header=`$as_echo "ac_cv_header_$MP4_HEADER.h" | $as_tr_sh`
@@ -37033,9 +48996,7 @@ index f51d803..459bf70 100755
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 -$as_echo "$ac_header_compiler" >&6; }
-+ac_fn_cxx_check_header_mongrel "$LINENO" "$MP4_HEADER.h" "$as_ac_Header" "$ac_includes_default"
-+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- 
+-
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking $MP4_HEADER.h presence" >&5
 -$as_echo_n "checking $MP4_HEADER.h presence... " >&6; }
@@ -37117,7 +49078,9 @@ index f51d803..459bf70 100755
 -		 $as_echo "$as_val"'`
 -	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 -$as_echo "$ac_res" >&6; }
--
++ac_fn_cxx_check_header_mongrel "$LINENO" "$MP4_HEADER.h" "$as_ac_Header" "$ac_includes_default"
++if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ 
 -fi
 -as_val=`eval 'as_val=${'$as_ac_Header'}
 -		 $as_echo "$as_val"'`
@@ -37126,7 +49089,7 @@ index f51d803..459bf70 100755
  else
  
                  CFLAGS="$CFLAGS -I$MT_SEARCHPATH_HEADERS"
-@@ -40134,145 +19706,8 @@ else
+@@ -40134,145 +19706,8 @@
                  CPPFLAGS="$CPPFLAGS -I$MT_SEARCHPATH_HEADERS"
                  unset ac_cv_header_$MP4_HEADER_h
                  as_ac_Header=`$as_echo "ac_cv_header_$MT_SEARCHPATH_HEADERS/$MP4_HEADER.h" | $as_tr_sh`
@@ -37274,7 +49237,7 @@ index f51d803..459bf70 100755
  
                          mt_libmp4v2_cxxflags="-I${MT_SEARCHPATH_HEADERS}"
  
-@@ -40316,10 +19751,10 @@ fi
+@@ -40316,10 +19751,10 @@
  
  
  # Check whether --with-libmp4v2-libs was given.
@@ -37287,7 +49250,7 @@ index f51d803..459bf70 100755
  $as_echo "$as_me: Will search for libmp4v2 libs in $withval" >&6;}
  
  
-@@ -40329,18 +19764,14 @@ fi
+@@ -40329,18 +19764,14 @@
      if test "$mt_libmp4v2_search_libs" ; then
          unset ac_cv_lib_mp4v2_MP4Read
          LDFLAGS="$LDFLAGS -L$mt_libmp4v2_search_libs"
@@ -37309,7 +49272,7 @@ index f51d803..459bf70 100755
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -40358,43 +19789,18 @@ return MP4Read ();
+@@ -40358,43 +19789,18 @@
    return 0;
  }
  _ACEOF
@@ -37359,7 +49322,7 @@ index f51d803..459bf70 100755
  
                  mt_libmp4v2_libs="-lmp4v2"
                  mt_libmp4v2_ldflags="-L$mt_libmp4v2_search_libs"
-@@ -40403,12 +19809,10 @@ else
+@@ -40403,12 +19809,10 @@
  
                  mt_libmp4v2_library_status=missing
                  if test "" = "pass"; then
@@ -37374,7 +49337,7 @@ index f51d803..459bf70 100755
                  fi
  
  
-@@ -40416,18 +19820,14 @@ fi
+@@ -40416,18 +19820,14 @@
  
      else
          unset ac_cv_lib_mp4v2_MP4Read
@@ -37396,7 +49359,7 @@ index f51d803..459bf70 100755
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -40445,43 +19845,18 @@ return MP4Read ();
+@@ -40445,43 +19845,18 @@
    return 0;
  }
  _ACEOF
@@ -37446,7 +49409,7 @@ index f51d803..459bf70 100755
  
                  mt_libmp4v2_libs="-lmp4v2"
  
-@@ -40489,18 +19864,14 @@ else
+@@ -40489,18 +19864,14 @@
  
                  LDFLAGS="$LDFLAGS -L$MT_SEARCHPATH_LIBS"
                  unset ac_cv_lib_mp4v2_MP4Read
@@ -37468,7 +49431,7 @@ index f51d803..459bf70 100755
  /* end confdefs.h.  */
  
  /* Override any GCC internal prototype to avoid an error.
-@@ -40518,43 +19889,18 @@ return MP4Read ();
+@@ -40518,43 +19889,18 @@
    return 0;
  }
  _ACEOF
@@ -37518,7 +49481,7 @@ index f51d803..459bf70 100755
  
                          mt_libmp4v2_libs="-lmp4v2"
                          mt_libmp4v2_ldflags="-L$MT_SEARCHPATH_LIBS"
-@@ -40600,16 +19946,12 @@ fi
+@@ -40600,16 +19946,12 @@
      if ((test "x${LIBMP4V2_OPTION_ENABLED}" = xyes) &&
          (test "x${LIBMP4V2_OPTION_REQUESTED}" = xyes) &&
          (test "x$mt_libmp4v2_status" != xyes) && (test "" != "pass")); then
@@ -37537,7 +49500,7 @@ index f51d803..459bf70 100755
  
      fi
  
-@@ -40637,13 +19979,9 @@ ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+@@ -40637,13 +19979,9 @@
  ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
  ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
  
@@ -37553,7 +49516,7 @@ index f51d803..459bf70 100755
  /* end confdefs.h.  */
  
                  #include <$MP4_HEADER.h>
-@@ -40659,52 +19997,25 @@ main ()
+@@ -40659,52 +19997,25 @@
    return 0;
  }
  _ACEOF
@@ -37612,7 +49575,7 @@ index f51d803..459bf70 100755
  /* end confdefs.h.  */
  
                  #include <$MP4_HEADER.h>
-@@ -40720,43 +20031,20 @@ main ()
+@@ -40720,43 +20031,20 @@
    return 0;
  }
  _ACEOF
@@ -37660,7 +49623,7 @@ index f51d803..459bf70 100755
  rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  
     ac_ext=cpp
-@@ -40780,7 +20068,7 @@ fi
+@@ -40780,7 +20068,7 @@
      fi
  
      # Check whether --enable-inotify was given.
@@ -37669,7 +49632,7 @@ index f51d803..459bf70 100755
    enableval=$enable_inotify;
              mt_inotify_option_enabled=$enableval
              mt_inotify_option_requested=yes
-@@ -40795,13 +20083,12 @@ fi
+@@ -40795,13 +20083,12 @@
  
  
  
@@ -37685,7 +49648,7 @@ index f51d803..459bf70 100755
  if test "x$INOTIFY_OPTION_ENABLED" = xyes; then
  
  
-@@ -40815,10 +20102,10 @@ if test "x$INOTIFY_OPTION_ENABLED" = xyes; then
+@@ -40815,10 +20102,10 @@
  
  
  # Check whether --with-inotify-h was given.
@@ -37698,7 +49661,7 @@ index f51d803..459bf70 100755
  $as_echo "$as_me: Will search for inotify headers in $withval" >&6;}
  
  
-@@ -40831,145 +20118,8 @@ fi
+@@ -40831,145 +20118,8 @@
          CXXFLAGS="$CXXFLAGS -I${mt_inotify_search_headers}"
          CPPFLAGS="$CPPFLAGS -I${mt_inotify_search_headers}"
          as_ac_Header=`$as_echo "ac_cv_header_$mt_inotify_search_headers/sys/inotify.h" | $as_tr_sh`
@@ -37846,7 +49809,7 @@ index f51d803..459bf70 100755
  
                  mt_inotify_cxxflags="-I${mt_inotify_search_headers}"
  
-@@ -40977,12 +20127,10 @@ else
+@@ -40977,12 +20127,10 @@
  
                  mt_inotify_header_status=missing
                  if test "" = "pass"; then
@@ -37861,7 +49824,7 @@ index f51d803..459bf70 100755
                  fi
  
  
-@@ -40991,140 +20139,9 @@ fi
+@@ -40991,140 +20139,9 @@
  
      else
          unset ac_cv_header_sys_inotify_h
@@ -37915,9 +49878,7 @@ index f51d803..459bf70 100755
 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 -$as_echo "$ac_header_compiler" >&6; }
-+        ac_fn_cxx_check_header_mongrel "$LINENO" "sys/inotify.h" "ac_cv_header_sys_inotify_h" "$ac_includes_default"
-+if test "x$ac_cv_header_sys_inotify_h" = x""yes; then :
- 
+-
 -# Is the header present?
 -{ $as_echo "$as_me:$LINENO: checking sys/inotify.h presence" >&5
 -$as_echo_n "checking sys/inotify.h presence... " >&6; }
@@ -37997,14 +49958,16 @@ index f51d803..459bf70 100755
 -fi
 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_inotify_h" >&5
 -$as_echo "$ac_cv_header_sys_inotify_h" >&6; }
--
++        ac_fn_cxx_check_header_mongrel "$LINENO" "sys/inotify.h" "ac_cv_header_sys_inotify_h" "$ac_includes_default"
++if test "x$ac_cv_header_sys_inotify_h" = x""yes; then :
+ 
 -fi
 -if test "x$ac_cv_header_sys_inotify_h" = x""yes; then
 -  :
  else
  
                  CFLAGS="$CFLAGS -I$MT_SEARCHPATH_HEADERS"
-@@ -41132,145 +20149,8 @@ else
+@@ -41132,145 +20149,8 @@
                  CPPFLAGS="$CPPFLAGS -I$MT_SEARCHPATH_HEADERS"
                  unset ac_cv_header_sys_inotify_h
                  as_ac_Header=`$as_echo "ac_cv_header_$MT_SEARCHPATH_HEADERS/sys/inotify.h" | $as_tr_sh`
@@ -38152,7 +50115,7 @@ index f51d803..459bf70 100755
  
                          mt_inotify_cxxflags="-I${MT_SEARCHPATH_HEADERS}"
  
-@@ -41309,102 +20189,12 @@ fi
+@@ -41309,102 +20189,12 @@
  fi
  
  if test "x$INOTIFY_STATUS" = xyes; then
@@ -38260,7 +50223,7 @@ index f51d803..459bf70 100755
  _ACEOF
  
  else
-@@ -41417,27 +20207,23 @@ fi
+@@ -41417,27 +20207,23 @@
  if test "x$INOTIFY_STATUS" = xyes; then
      CXXFLAGS="$CXXFLAGS $INOTIFY_CFLAGS"
      CFLAGS="$CFLAGS $INOTIFY_CFLAGS"
@@ -38293,7 +50256,7 @@ index f51d803..459bf70 100755
  /* end confdefs.h.  */
  #include <sys/inotify.h>
  int
-@@ -41449,66 +20235,34 @@ return (-1 == inotify_init());
+@@ -41449,66 +20235,34 @@
    return 0;
  }
  _ACEOF
@@ -38369,7 +50332,7 @@ index f51d803..459bf70 100755
  /* end confdefs.h.  */
  #include "src/inotify-nosys.h"
  int
-@@ -41520,90 +20274,56 @@ return (-1 == inotify_init());
+@@ -41520,90 +20274,56 @@
    return 0;
  }
  _ACEOF
@@ -38472,7 +50435,7 @@ index f51d803..459bf70 100755
  
  
          INOTIFY_STATUS=yes
-@@ -41615,14 +20335,10 @@ CPPFLAGS="$CPPFLAGS_SAVE"
+@@ -41615,14 +20335,10 @@
  CXXFLAGS="$CXXFLAGS_SAVE"
  
  
@@ -38489,7 +50452,7 @@ index f51d803..459bf70 100755
  
  
  #MT_CHECK_OPTIONAL_PACKAGE_CFG([libdvdnav], [enable],
-@@ -41642,7 +20358,7 @@ _ACEOF
+@@ -41642,7 +20358,7 @@
      fi
  
      # Check whether --enable-tombdebug was given.
@@ -38498,7 +50461,7 @@ index f51d803..459bf70 100755
    enableval=$enable_tombdebug;
              mt_tombdebug_option_enabled=$enableval
              mt_tombdebug_option_requested=yes
-@@ -41657,19 +20373,16 @@ fi
+@@ -41657,19 +20373,16 @@
  
  
  
@@ -38520,7 +50483,7 @@ index f51d803..459bf70 100755
      mt_upnpdebug_option_enabled=
      mt_upnpdebug_option_requested=no
      if test "xenable" = xdisable; then
-@@ -41679,7 +20392,7 @@ fi
+@@ -41679,7 +20392,7 @@
      fi
  
      # Check whether --enable-upnpdebug was given.
@@ -38529,7 +50492,7 @@ index f51d803..459bf70 100755
    enableval=$enable_upnpdebug;
              mt_upnpdebug_option_enabled=$enableval
              mt_upnpdebug_option_requested=yes
-@@ -41694,28 +20407,21 @@ fi
+@@ -41694,28 +20407,21 @@
  
  
  
@@ -38562,7 +50525,7 @@ index f51d803..459bf70 100755
  
  fi
  
-@@ -41730,7 +20436,7 @@ fi
+@@ -41730,7 +20436,7 @@
      fi
  
      # Check whether --enable-log was given.
@@ -38571,7 +50534,7 @@ index f51d803..459bf70 100755
    enableval=$enable_log;
              mt_log_option_enabled=$enableval
              mt_log_option_requested=yes
-@@ -41745,19 +20451,16 @@ fi
+@@ -41745,19 +20451,16 @@
  
  
  
@@ -38593,7 +50556,7 @@ index f51d803..459bf70 100755
      mt_debug_log_option_enabled=
      mt_debug_log_option_requested=no
      if test "xdisable" = xdisable; then
-@@ -41767,7 +20470,7 @@ fi
+@@ -41767,7 +20470,7 @@
      fi
  
      # Check whether --enable-debug-log was given.
@@ -38602,7 +50565,7 @@ index f51d803..459bf70 100755
    enableval=$enable_debug_log;
              mt_debug_log_option_enabled=$enableval
              mt_debug_log_option_requested=yes
-@@ -41782,18 +20485,15 @@ fi
+@@ -41782,18 +20485,15 @@
  
  
  
@@ -38623,7 +50586,7 @@ index f51d803..459bf70 100755
  eval PACKAGE_DATADIR="${datadir}/${PACKAGE}"
  eval PACKAGE_DATADIR="${PACKAGE_DATADIR}"
  
-@@ -41804,41 +20504,31 @@ _ACEOF
+@@ -41804,41 +20504,31 @@
  
  if (test "x$YOUTUBE_OPTION_ENABLED" = xyes) || (test "x$WEBORAMA_OPTION_ENABLED" = xyes) || (test "x$ATRAILERS_OPTION_ENABLED" = xyes) || (test "x$SOPCAST_OPTION_ENABLED" = xyes); then
  
@@ -38670,7 +50633,7 @@ index f51d803..459bf70 100755
  
  fi
  
-@@ -41879,13 +20569,13 @@ _ACEOF
+@@ -41879,13 +20569,13 @@
      case $ac_val in #(
      *${as_nl}*)
        case $ac_var in #(
@@ -38686,7 +50649,7 @@ index f51d803..459bf70 100755
        esac ;;
      esac
    done
-@@ -41893,8 +20583,8 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+@@ -41893,8 +20583,8 @@
    (set) 2>&1 |
      case $as_nl`(ac_space=' '; set) 2>&1` in #(
      *${as_nl}ac_space=\ *)
@@ -38697,7 +50660,7 @@ index f51d803..459bf70 100755
        sed -n \
  	"s/'/'\\\\''/g;
  	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
-@@ -41917,11 +20607,11 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+@@ -41917,11 +20607,11 @@
  if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
    if test -w "$cache_file"; then
      test "x$cache_file" != "x/dev/null" &&
@@ -38711,7 +50674,7 @@ index f51d803..459bf70 100755
  $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
    fi
  fi
-@@ -41935,14 +20625,15 @@ DEFS=-DHAVE_CONFIG_H
+@@ -41935,14 +20625,15 @@
  
  ac_libobjs=
  ac_ltlibobjs=
@@ -38729,7 +50692,7 @@ index f51d803..459bf70 100755
  done
  LIBOBJS=$ac_libobjs
  
-@@ -41958,25 +20649,16 @@ else
+@@ -41958,25 +20649,16 @@
  fi
  
  if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
@@ -38761,7 +50724,7 @@ index f51d803..459bf70 100755
  fi
  
  
-@@ -41984,9 +20666,10 @@ fi
+@@ -41984,9 +20666,10 @@
  ac_write_fail=0
  ac_clean_files_save=$ac_clean_files
  ac_clean_files="$ac_clean_files $CONFIG_STATUS"
@@ -38774,7 +50737,7 @@ index f51d803..459bf70 100755
  #! $SHELL
  # Generated by $as_me.
  # Run this file to recreate the current configuration.
-@@ -41996,17 +20679,18 @@ cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+@@ -41996,17 +20679,18 @@
  debug=false
  ac_cs_recheck=false
  ac_cs_silent=false
@@ -38800,7 +50763,7 @@ index f51d803..459bf70 100755
    emulate sh
    NULLCMD=:
    # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
-@@ -42014,23 +20698,15 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+@@ -42014,23 +20698,15 @@
    alias -g '${1+"$@"}'='"$@"'
    setopt NO_GLOB_SUBST
  else
@@ -38829,7 +50792,7 @@ index f51d803..459bf70 100755
  as_nl='
  '
  export as_nl
-@@ -42038,7 +20714,13 @@ export as_nl
+@@ -42038,7 +20714,13 @@
  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
@@ -38844,7 +50807,7 @@ index f51d803..459bf70 100755
    as_echo='printf %s\n'
    as_echo_n='printf %s'
  else
-@@ -42049,7 +20731,7 @@ else
+@@ -42049,7 +20731,7 @@
      as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
      as_echo_n_body='eval
        arg=$1;
@@ -38853,7 +50816,7 @@ index f51d803..459bf70 100755
        *"$as_nl"*)
  	expr "X$arg" : "X\\(.*\\)$as_nl";
  	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
-@@ -42072,13 +20754,6 @@ if test "${PATH_SEPARATOR+set}" != set; then
+@@ -42072,13 +20754,6 @@
    }
  fi
  
@@ -38867,7 +50830,7 @@ index f51d803..459bf70 100755
  
  # IFS
  # We need space, tab and new line, in precisely that order.  Quoting is
-@@ -42088,15 +20763,15 @@ fi
+@@ -42088,15 +20763,15 @@
  IFS=" ""	$as_nl"
  
  # Find who we are.  Look in the path if we contain no directory separator.
@@ -38886,7 +50849,7 @@ index f51d803..459bf70 100755
  IFS=$as_save_IFS
  
       ;;
-@@ -42108,12 +20783,16 @@ if test "x$as_myself" = x; then
+@@ -42108,12 +20783,16 @@
  fi
  if test ! -f "$as_myself"; then
    $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
@@ -38907,7 +50870,7 @@ index f51d803..459bf70 100755
  done
  PS1='$ '
  PS2='> '
-@@ -42125,7 +20804,89 @@ export LC_ALL
+@@ -42125,7 +20804,89 @@
  LANGUAGE=C
  export LANGUAGE
  
@@ -38998,7 +50961,7 @@ index f51d803..459bf70 100755
  if expr a : '\(a\)' >/dev/null 2>&1 &&
     test "X`expr 00001 : '.*\(...\)'`" = X001; then
    as_expr=expr
-@@ -42139,8 +20900,12 @@ else
+@@ -42139,8 +20900,12 @@
    as_basename=false
  fi
  
@@ -39012,7 +50975,7 @@ index f51d803..459bf70 100755
  as_me=`$as_basename -- "$0" ||
  $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
  	 X"$0" : 'X\(//\)$' \| \
-@@ -42160,76 +20925,25 @@ $as_echo X/"$0" |
+@@ -42160,76 +20925,25 @@
  	  }
  	  s/.*/./; q'`
  
@@ -39100,7 +51063,7 @@ index f51d803..459bf70 100755
  
  rm -f conf$$ conf$$.exe conf$$.file
  if test -d conf$$.dir; then
-@@ -42258,8 +20972,56 @@ fi
+@@ -42258,8 +20972,56 @@
  rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
  rmdir conf$$.dir 2>/dev/null
  
@@ -39158,7 +51121,7 @@ index f51d803..459bf70 100755
  else
    test -d ./-p && rmdir ./-p
    as_mkdir_p=false
-@@ -42278,10 +21040,10 @@ else
+@@ -42278,10 +21040,10 @@
        if test -d "$1"; then
  	test -d "$1/.";
        else
@@ -39171,7 +51134,7 @@ index f51d803..459bf70 100755
  	???[sx]*):;;*)false;;esac;fi
      '\'' sh
    '
-@@ -42296,13 +21058,19 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+@@ -42296,13 +21058,19 @@
  
  
  exec 6>&1
@@ -39193,7 +51156,7 @@ index f51d803..459bf70 100755
  
    CONFIG_FILES    = $CONFIG_FILES
    CONFIG_HEADERS  = $CONFIG_HEADERS
-@@ -42334,13 +21102,15 @@ _ACEOF
+@@ -42334,13 +21102,15 @@
  
  cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
  ac_cs_usage="\
@@ -39212,7 +51175,7 @@ index f51d803..459bf70 100755
    -q, --quiet, --silent
                     do not print progress messages
    -d, --debug      don't remove temporary files
-@@ -42359,16 +21129,17 @@ $config_headers
+@@ -42359,16 +21129,17 @@
  Configuration commands:
  $config_commands
  
@@ -39234,7 +51197,7 @@ index f51d803..459bf70 100755
  This config.status script is free software; the Free Software Foundation
  gives unlimited permission to copy, distribute and modify it."
  
-@@ -42386,11 +21157,16 @@ ac_need_defaults=:
+@@ -42386,11 +21157,16 @@
  while test $# != 0
  do
    case $1 in
@@ -39252,7 +51215,7 @@ index f51d803..459bf70 100755
    *)
      ac_option=$1
      ac_optarg=$2
-@@ -42404,27 +21180,29 @@ do
+@@ -42404,27 +21180,29 @@
      ac_cs_recheck=: ;;
    --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
      $as_echo "$ac_cs_version"; exit ;;
@@ -39287,7 +51250,7 @@ index f51d803..459bf70 100755
    --help | --hel | -h )
      $as_echo "$ac_cs_usage"; exit ;;
    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-@@ -42432,11 +21210,10 @@ Try \`$0 --help' for more information." >&2
+@@ -42432,11 +21210,10 @@
      ac_cs_silent=: ;;
  
    # This is an error.
@@ -39302,7 +51265,7 @@ index f51d803..459bf70 100755
       ac_need_defaults=false ;;
  
    esac
-@@ -42503,9 +21280,7 @@ do
+@@ -42503,9 +21280,7 @@
      "artwork/Makefile") CONFIG_FILES="$CONFIG_FILES artwork/Makefile" ;;
      "mediatomb.spec") CONFIG_FILES="$CONFIG_FILES mediatomb.spec" ;;
  
@@ -39313,7 +51276,7 @@ index f51d803..459bf70 100755
    esac
  done
  
-@@ -42532,7 +21307,7 @@ $debug ||
+@@ -42532,7 +21307,7 @@
    trap 'exit_status=$?
    { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
  ' 0
@@ -39322,7 +51285,7 @@ index f51d803..459bf70 100755
  }
  # Create a (secure) tmp directory for tmp files.
  
-@@ -42543,11 +21318,7 @@ $debug ||
+@@ -42543,11 +21318,7 @@
  {
    tmp=./conf$$-$RANDOM
    (umask 077 && mkdir "$tmp")
@@ -39335,7 +51298,7 @@ index f51d803..459bf70 100755
  
  # Set up the scripts for CONFIG_FILES section.
  # No need to generate them if there are no CONFIG_FILES.
-@@ -42555,7 +21326,13 @@ $debug ||
+@@ -42555,7 +21326,13 @@
  if test -n "$CONFIG_FILES"; then
  
  
@@ -39350,7 +51313,7 @@ index f51d803..459bf70 100755
  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'
-@@ -42572,24 +21349,18 @@ _ACEOF
+@@ -42572,24 +21349,18 @@
    echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
    echo "_ACEOF"
  } >conf$$subs.sh ||
@@ -39379,7 +51342,7 @@ index f51d803..459bf70 100755
    else
      ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
    fi
-@@ -42611,7 +21382,7 @@ s/'"$ac_delim"'$//
+@@ -42611,7 +21382,7 @@
  t delim
  :nl
  h
@@ -39388,7 +51351,7 @@ index f51d803..459bf70 100755
  t more1
  s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
  p
-@@ -42625,7 +21396,7 @@ s/.\{148\}//
+@@ -42625,7 +21396,7 @@
  t nl
  :delim
  h
@@ -39397,7 +51360,7 @@ index f51d803..459bf70 100755
  t more2
  s/["\\]/\\&/g; s/^/"/; s/$/"/
  p
-@@ -42678,22 +21449,28 @@ if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+@@ -42678,22 +21449,28 @@
  else
    cat
  fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
@@ -39436,7 +51399,7 @@ index f51d803..459bf70 100755
  s/^[^=]*=[	 ]*$//
  }'
  fi
-@@ -42721,9 +21498,7 @@ for ac_last_try in false false :; do
+@@ -42721,9 +21498,7 @@
    if test -z "$ac_t"; then
      break
    elif $ac_last_try; then
@@ -39447,7 +51410,7 @@ index f51d803..459bf70 100755
    else
      ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
    fi
-@@ -42808,9 +21583,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+@@ -42808,9 +21583,7 @@
  _ACAWK
  _ACEOF
  cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
@@ -39458,7 +51421,7 @@ index f51d803..459bf70 100755
  fi # test -n "$CONFIG_HEADERS"
  
  
-@@ -42823,9 +21596,7 @@ do
+@@ -42823,9 +21596,7 @@
    esac
    case $ac_mode$ac_tag in
    :[FHL]*:*);;
@@ -39469,7 +51432,7 @@ index f51d803..459bf70 100755
    :[FH]-) ac_tag=-:-;;
    :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
    esac
-@@ -42853,12 +21624,10 @@ $as_echo "$as_me: error: invalid tag $ac_tag" >&2;}
+@@ -42853,12 +21624,10 @@
  	   [\\/$]*) false;;
  	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
  	   esac ||
@@ -39484,7 +51447,7 @@ index f51d803..459bf70 100755
      done
  
      # Let's still pretend it is `configure' which instantiates (i.e., don't
-@@ -42869,7 +21638,7 @@ $as_echo "$as_me: error: cannot find input file: $ac_f" >&2;}
+@@ -42869,7 +21638,7 @@
  	`' by configure.'
      if test x"$ac_file" != x-; then
        configure_input="$ac_file.  $configure_input"
@@ -39493,7 +51456,7 @@ index f51d803..459bf70 100755
  $as_echo "$as_me: creating $ac_file" >&6;}
      fi
      # Neutralize special characters interpreted by sed in replacement strings.
-@@ -42882,9 +21651,7 @@ $as_echo "$as_me: creating $ac_file" >&6;}
+@@ -42882,9 +21651,7 @@
  
      case $ac_tag in
      *:-:* | *:-) cat >"$tmp/stdin" \
@@ -39504,7 +51467,7 @@ index f51d803..459bf70 100755
      esac
      ;;
    esac
-@@ -42912,47 +21679,7 @@ $as_echo X"$ac_file" |
+@@ -42912,47 +21679,7 @@
  	    q
  	  }
  	  s/.*/./; q'`
@@ -39553,7 +51516,7 @@ index f51d803..459bf70 100755
    ac_builddir=.
  
  case "$ac_dir" in
-@@ -43009,7 +21736,6 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+@@ -43009,7 +21736,6 @@
  # 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=
@@ -39561,7 +51524,7 @@ index f51d803..459bf70 100755
  ac_sed_dataroot='
  /datarootdir/ {
    p
-@@ -43019,12 +21745,11 @@ ac_sed_dataroot='
+@@ -43019,12 +21745,11 @@
  /@docdir@/p
  /@infodir@/p
  /@localedir@/p
@@ -39576,7 +51539,7 @@ index f51d803..459bf70 100755
  $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
  _ACEOF
  cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-@@ -43034,7 +21759,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+@@ -43034,7 +21759,7 @@
    s&@infodir@&$infodir&g
    s&@localedir@&$localedir&g
    s&@mandir@&$mandir&g
@@ -39585,7 +51548,7 @@ index f51d803..459bf70 100755
  esac
  _ACEOF
  
-@@ -43063,26 +21788,22 @@ s&@MKDIR_P@&$ac_MKDIR_P&;t t
+@@ -43063,26 +21788,22 @@
  $ac_datarootdir_hack
  "
  eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
@@ -39617,7 +51580,7 @@ index f51d803..459bf70 100755
   ;;
    :H)
    #
-@@ -43093,25 +21814,19 @@ $as_echo "$as_me: error: could not create $ac_file" >&2;}
+@@ -43093,25 +21814,19 @@
        $as_echo "/* $configure_input  */" \
        && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
      } >"$tmp/config.h" \
@@ -39647,7 +51610,7 @@ index f51d803..459bf70 100755
    fi
  # Compute "$ac_file"'s index in $config_headers.
  _am_arg="$ac_file"
-@@ -43149,7 +21864,7 @@ $as_echo X"$_am_arg" |
+@@ -43149,7 +21864,7 @@
  	  s/.*/./; q'`/stamp-h$_am_stamp_count
   ;;
  
@@ -39656,7 +51619,7 @@ index f51d803..459bf70 100755
  $as_echo "$as_me: executing $ac_file commands" >&6;}
   ;;
    esac
-@@ -43244,47 +21959,7 @@ $as_echo X"$file" |
+@@ -43244,47 +21959,7 @@
  	    q
  	  }
  	  s/.*/./; q'`
@@ -39705,7 +51668,7 @@ index f51d803..459bf70 100755
        # echo "creating $dirpart/$file"
        echo '# dummy' > "$dirpart/$file"
      done
-@@ -43296,15 +21971,12 @@ $as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
+@@ -43296,15 +21971,12 @@
  done # for ac_tag
  
  
@@ -39723,7 +51686,7 @@ index f51d803..459bf70 100755
  
  
  # configure is writing to config.log, and then calls config.status.
-@@ -43325,10 +21997,10 @@ if test "$no_create" != yes; then
+@@ -43325,10 +21997,10 @@
    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.
@@ -39736,8 +51699,6 @@ index f51d803..459bf70 100755
  $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
  fi
  
-diff --git a/configure_aux/config.guess b/configure_aux/config.guess
-index dc84c68..c2246a4 100755
 --- a/configure_aux/config.guess
 +++ b/configure_aux/config.guess
 @@ -1,10 +1,10 @@
@@ -39753,7 +51714,7 @@ index dc84c68..c2246a4 100755
  
  # This file is free software; you can redistribute it and/or modify it
  # under the terms of the GNU General Public License as published by
-@@ -56,8 +56,9 @@ version="\
+@@ -56,8 +56,9 @@
  GNU config.guess ($timestamp)
  
  Originally written by Per Bothner.
@@ -39765,8 +51726,6 @@ index dc84c68..c2246a4 100755
  
  This is free software; see the source for copying conditions.  There is NO
  warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-diff --git a/configure_aux/config.sub b/configure_aux/config.sub
-index 2a55a50..c2d1257 100755
 --- a/configure_aux/config.sub
 +++ b/configure_aux/config.sub
 @@ -1,10 +1,10 @@
@@ -39782,7 +51741,7 @@ index 2a55a50..c2d1257 100755
  
  # This file is (in principle) common to ALL GNU software.
  # The presence of a machine in this file suggests that SOME GNU software
-@@ -75,8 +75,9 @@ Report bugs and patches to <config-patches at gnu.org>."
+@@ -75,8 +75,9 @@
  version="\
  GNU config.sub ($timestamp)
  
@@ -39794,7 +51753,7 @@ index 2a55a50..c2d1257 100755
  
  This is free software; see the source for copying conditions.  There is NO
  warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-@@ -380,7 +381,8 @@ case $basic_machine in
+@@ -380,7 +381,8 @@
  	| sparclite-* \
  	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
  	| tahoe-* | thumb-* \
@@ -39804,7 +51763,7 @@ index 2a55a50..c2d1257 100755
  	| tron-* \
  	| ubicom32-* \
  	| v850-* | v850e-* | vax-* \
-@@ -1085,6 +1087,11 @@ case $basic_machine in
+@@ -1085,6 +1087,11 @@
  		basic_machine=tic6x-unknown
  		os=-coff
  		;;
@@ -39816,7 +51775,7 @@ index 2a55a50..c2d1257 100755
  	tile*)
  		basic_machine=tile-unknown
  		os=-linux-gnu
-@@ -1435,6 +1442,8 @@ case $os in
+@@ -1435,6 +1442,8 @@
  	-dicos*)
  		os=-dicos
  		;;
@@ -39825,11 +51784,9 @@ index 2a55a50..c2d1257 100755
  	-none)
  		;;
  	*)
-diff --git a/doc/Makefile.in b/doc/Makefile.in
-index eaff5ae..eb7841a 100644
 --- a/doc/Makefile.in
 +++ b/doc/Makefile.in
-@@ -217,6 +217,7 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+@@ -217,6 +217,7 @@
  PACKAGE_NAME = @PACKAGE_NAME@
  PACKAGE_STRING = @PACKAGE_STRING@
  PACKAGE_TARNAME = @PACKAGE_TARNAME@
@@ -39837,11 +51794,9 @@ index eaff5ae..eb7841a 100644
  PACKAGE_VERSION = @PACKAGE_VERSION@
  PATH_SEPARATOR = @PATH_SEPARATOR@
  POW_LIB = @POW_LIB@
-diff --git a/scripts/Makefile.in b/scripts/Makefile.in
-index 75d296b..7833173 100644
 --- a/scripts/Makefile.in
 +++ b/scripts/Makefile.in
-@@ -233,6 +233,7 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+@@ -233,6 +233,7 @@
  PACKAGE_NAME = @PACKAGE_NAME@
  PACKAGE_STRING = @PACKAGE_STRING@
  PACKAGE_TARNAME = @PACKAGE_TARNAME@
@@ -39849,11 +51804,9 @@ index 75d296b..7833173 100644
  PACKAGE_VERSION = @PACKAGE_VERSION@
  PATH_SEPARATOR = @PATH_SEPARATOR@
  POW_LIB = @POW_LIB@
-diff --git a/scripts/js/Makefile.in b/scripts/js/Makefile.in
-index 1f38362..b1c543d 100644
 --- a/scripts/js/Makefile.in
 +++ b/scripts/js/Makefile.in
-@@ -217,6 +217,7 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+@@ -217,6 +217,7 @@
  PACKAGE_NAME = @PACKAGE_NAME@
  PACKAGE_STRING = @PACKAGE_STRING@
  PACKAGE_TARNAME = @PACKAGE_TARNAME@
@@ -39861,11 +51814,9 @@ index 1f38362..b1c543d 100644
  PACKAGE_VERSION = @PACKAGE_VERSION@
  PATH_SEPARATOR = @PATH_SEPARATOR@
  POW_LIB = @POW_LIB@
-diff --git a/tombupnp/Makefile.in b/tombupnp/Makefile.in
-index d80d770..8d4cd6d 100644
 --- a/tombupnp/Makefile.in
 +++ b/tombupnp/Makefile.in
-@@ -233,6 +233,7 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+@@ -233,6 +233,7 @@
  PACKAGE_NAME = @PACKAGE_NAME@
  PACKAGE_STRING = @PACKAGE_STRING@
  PACKAGE_TARNAME = @PACKAGE_TARNAME@
@@ -39873,11 +51824,9 @@ index d80d770..8d4cd6d 100644
  PACKAGE_VERSION = @PACKAGE_VERSION@
  PATH_SEPARATOR = @PATH_SEPARATOR@
  POW_LIB = @POW_LIB@
-diff --git a/tombupnp/build/Makefile.in b/tombupnp/build/Makefile.in
-index eec0e67..c50e9d3 100644
 --- a/tombupnp/build/Makefile.in
 +++ b/tombupnp/build/Makefile.in
-@@ -252,6 +252,7 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+@@ -252,6 +252,7 @@
  PACKAGE_NAME = @PACKAGE_NAME@
  PACKAGE_STRING = @PACKAGE_STRING@
  PACKAGE_TARNAME = @PACKAGE_TARNAME@
@@ -39885,11 +51834,9 @@ index eec0e67..c50e9d3 100644
  PACKAGE_VERSION = @PACKAGE_VERSION@
  PATH_SEPARATOR = @PATH_SEPARATOR@
  POW_LIB = @POW_LIB@
-diff --git a/web/Makefile.in b/web/Makefile.in
-index 1a67b17..b9ed01b 100644
 --- a/web/Makefile.in
 +++ b/web/Makefile.in
-@@ -219,6 +219,7 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+@@ -219,6 +219,7 @@
  PACKAGE_NAME = @PACKAGE_NAME@
  PACKAGE_STRING = @PACKAGE_STRING@
  PACKAGE_TARNAME = @PACKAGE_TARNAME@

-- 
MediaTomb packaging



More information about the pkg-multimedia-commits mailing list