Whamcloud - gitweb
e2scan: a tool for fast namespace/inode scanning
authorAndreas Dilger <andreas.dilger@intel.com>
Fri, 13 Apr 2012 19:17:37 +0000 (13:17 -0600)
committerAndreas Dilger <andreas.dilger@intel.com>
Tue, 10 May 2016 05:12:33 +0000 (23:12 -0600)
e2scan is a tool for efficiently scanning inodes for changes,
or all inodes, and then generating pathnames for the inodes
of interest.

  LU-3612 e2scan: fix missing header for e2scan to enable SQLite
    SQLite function is always disabled due to missing config.h
Signed-off-by: Shuichi Ihara <sihara@ddn.com>
  Change-Id: Ie4b49bd6d04a6f1e25610df51d17b97d3dc4fe5f

  LU-4328 e2scan: Missing copyright attribution
    Copyright headers are added to the files for e2scan.
    A minor correction was made to the header of tst_read_ea.c
Signed-off-by: James Nunez <james.a.nunez@intel.com>
  Change-Id: Icc359e717a0177b83a08f2471d84e68487dafee3

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
19 files changed:
.gitignore
Makefile.in
configure
configure.in
e2fsprogs-RHEL-6.spec.in
e2fsprogs-SUSE_LINUX-11.spec.in
e2fsprogs.spec.in
e2scan/Makefile.in [new file with mode: 0644]
e2scan/db.c [new file with mode: 0644]
e2scan/e2scan.8.in [new file with mode: 0644]
e2scan/e2scan.c [new file with mode: 0644]
e2scan/filelist.c [new file with mode: 0644]
install-utils/compile_manpages
install-utils/remove_preformat_manpages
lib/config.h.in
lib/ext2fs/tst_read_ea.c
patches/sles/11/rpm/e2fsprogs-1.41.1-splash_support.patch
util/subset.exclude
util/subst.conf.in

index 68b046d..0a39607 100644 (file)
@@ -54,6 +54,8 @@ e2fsck/tst_refcount
 e2fsck/tst_region
 e2fsprogs-RHEL-6.spec
 e2fsprogs-SUSE_LINUX-11.spec
+e2scan/e2scan
+e2scan/e2scan.8
 ext2ed/ext2ed.conf
 ext2ed/ext2ed.8
 intl/charset.alias
index 832f44e..1666d67 100644 (file)
@@ -13,10 +13,11 @@ INSTALL = @INSTALL@
 @DEBUGFS_CMT@DEBUGFS_DIR= debugfs
 @UUID_CMT@UUID_LIB_SUBDIR= lib/uuid
 @BLKID_CMT@BLKID_LIB_SUBDIR= lib/blkid
-QUOTA_LIB_SUBDIR= lib/quota
+@QUOTA_CMT@QUOTA_LIB_SUBDIR= lib/quota
+@E2SCAN_CMT@E2SCAN_DIR= e2scan
 
 LIB_SUBDIRS=lib/et lib/ss lib/e2p $(UUID_LIB_SUBDIR) $(BLKID_LIB_SUBDIR) $(QUOTA_LIB_SUBDIR) lib/ext2fs intl
-PROG_SUBDIRS=e2fsck $(DEBUGFS_DIR) misc $(RESIZE_DIR) tests/progs po
+PROG_SUBDIRS=e2fsck $(DEBUGFS_DIR) misc $(RESIZE_DIR) $(E2SCAN_DIR) tests/progs po
 SUBDIRS=util $(LIB_SUBDIRS) $(PROG_SUBDIRS) tests
 
 SUBS= util/subst.conf lib/config.h lib/dirpaths.h \
@@ -68,7 +69,7 @@ distclean-doc:
 
 install: subs all-libs-recursive install-progs-recursive \
   install-shlibs-libs-recursive install-doc-libs
-       if test ! -d e2fsck && test ! -d debugfs && test ! -d misc && test ! -d ext2ed ; then $(MAKE) install-libs ; fi
+       if test ! -d e2fsck && test ! -d debugfs && test ! -d e2scan && test ! -d misc && test ! -d ext2ed ; then $(MAKE) install-libs ; fi
 
 install-strip: subs all-libs-recursive install-strip-progs-recursive \
   install-shlibs-strip-libs-recursive install-doc-libs
index c73a1bf..97493d9 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,11 +1,9 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.65.
+# Generated by GNU Autoconf 2.69.
 #
 #
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
+# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
 #
 #
 # This configure script is free software; the Free Software Foundation
@@ -89,6 +87,7 @@ fi
 IFS=" ""       $as_nl"
 
 # Find who we are.  Look in the path if we contain no directory separator.
+as_myself=
 case $0 in #((
   *[\\/]* ) as_myself=$0 ;;
   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -133,6 +132,31 @@ export LANGUAGE
 # CDPATH.
 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
+# Use a proper internal environment variable to ensure we don't fall
+  # into an infinite loop, continuously re-executing ourselves.
+  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
+    _as_can_reexec=no; export _as_can_reexec;
+    # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+  *v*x* | *x*v* ) as_opts=-vx ;;
+  *v* ) as_opts=-v ;;
+  *x* ) as_opts=-x ;;
+  * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+as_fn_exit 255
+  fi
+  # We don't want this to propagate to other subprocesses.
+          { _as_can_reexec=; unset _as_can_reexec;}
 if test "x$CONFIG_SHELL" = x; then
   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
   emulate sh
@@ -166,7 +190,8 @@ if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
 else
   exitcode=1; echo positional parameters were not saved.
 fi
-test x\$exitcode = x0 || exit 1"
+test x\$exitcode = x0 || exit 1
+test -x / || exit 1"
   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
@@ -211,14 +236,25 @@ IFS=$as_save_IFS
 
 
       if test "x$CONFIG_SHELL" != x; then :
-  # We cannot yet assume a decent shell, so we have to provide a
-       # neutralization value for shells without unset; and this also
-       # works around shells that cannot unset nonexistent variables.
-       BASH_ENV=/dev/null
-       ENV=/dev/null
-       (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
-       export CONFIG_SHELL
-       exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+  export CONFIG_SHELL
+             # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+  *v*x* | *x*v* ) as_opts=-vx ;;
+  *v* ) as_opts=-v ;;
+  *x* ) as_opts=-x ;;
+  * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
 fi
 
     if test x$as_have_required = xno; then :
@@ -316,10 +352,18 @@ $as_echo X"$as_dir" |
       test -d "$as_dir" && break
     done
     test -z "$as_dirs" || eval "mkdir $as_dirs"
-  } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
+  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
 
 
 } # as_fn_mkdir_p
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+  test -f "$1" && test -x "$1"
+} # as_fn_executable_p
 # as_fn_append VAR VALUE
 # ----------------------
 # Append the text in VALUE to the end of the definition contained in VAR. Take
@@ -356,19 +400,19 @@ else
 fi # as_fn_arith
 
 
-# as_fn_error ERROR [LINENO LOG_FD]
-# ---------------------------------
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-# script with status $?, using 1 if that was 0.
+# script with STATUS, using 1 if that was 0.
 as_fn_error ()
 {
-  as_status=$?; test $as_status -eq 0 && as_status=1
-  if test "$3"; then
-    as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-    $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
+  as_status=$1; test $as_status -eq 0 && as_status=1
+  if test "$4"; then
+    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
   fi
-  $as_echo "$as_me: error: $1" >&2
+  $as_echo "$as_me: error: $2" >&2
   as_fn_exit $as_status
 } # as_fn_error
 
@@ -441,6 +485,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
   chmod +x "$as_me.lineno" ||
     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
 
+  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+  # already done that, so ensure we don't try to do so again and fall
+  # in an infinite loop.  This has already happened in practice.
+  _as_can_reexec=no; export _as_can_reexec
   # Don't try to exec as it changes $[0], causing all sort of problems
   # (the dirname of $[0] is not the place where we might find the
   # original and so on.  Autoconf is especially sensitive to this).
@@ -475,16 +523,16 @@ if (echo >conf$$.file) 2>/dev/null; then
     # ... but there are two gotchas:
     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
-    # In both cases, we have to default to `cp -p'.
+    # In both cases, we have to default to `cp -pR'.
     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
-      as_ln_s='cp -p'
+      as_ln_s='cp -pR'
   elif ln conf$$.file conf$$ 2>/dev/null; then
     as_ln_s=ln
   else
-    as_ln_s='cp -p'
+    as_ln_s='cp -pR'
   fi
 else
-  as_ln_s='cp -p'
+  as_ln_s='cp -pR'
 fi
 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
 rmdir conf$$.dir 2>/dev/null
@@ -496,28 +544,8 @@ else
   as_mkdir_p=false
 fi
 
-if test -x / >/dev/null 2>&1; then
-  as_test_x='test -x'
-else
-  if ls -dL / >/dev/null 2>&1; then
-    as_ls_L_option=L
-  else
-    as_ls_L_option=
-  fi
-  as_test_x='
-    eval sh -c '\''
-      if test -d "$1"; then
-       test -d "$1/.";
-      else
-       case $1 in #(
-       -*)set "./$1";;
-       esac;
-       case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
-       ???[sx]*):;;*)false;;esac;fi
-    '\'' sh
-  '
-fi
-as_executable_p=$as_test_x
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
 
 # Sed expression to map a string onto a valid CPP name.
 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -530,7 +558,7 @@ test -n "$DJDIR" || exec 7<&0 </dev/null
 exec 6>&1
 
 # Name of the host.
-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
 # so uname gets run too.
 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
 
@@ -611,6 +639,7 @@ CYGWIN_CMT
 LINUX_CMT
 UNI_DIFF_OPTS
 SEM_INIT_LIB
+SQLITE3_LIB
 SOCKET_LIB
 SIZEOF_OFF_T
 SIZEOF_LONG_LONG
@@ -679,6 +708,8 @@ FSCK_PROG
 DEFRAG_CMT
 RESIZER_CMT
 IMAGER_CMT
+E2SCAN_MAN
+E2SCAN_CMT
 DEBUGFS_CMT
 QUOTA_CMT
 DEPPROFILED_LIBQUOTA
@@ -815,6 +846,7 @@ enable_libblkid
 enable_quota
 enable_backtrace
 enable_debugfs
+enable_e2scan
 enable_imager
 enable_resizer
 enable_defrag
@@ -828,6 +860,7 @@ enable_rpath
 with_libiconv_prefix
 with_included_gettext
 with_libintl_prefix
+with_sqlite3
 with_multiarch
 '
       ac_precious_vars='build_alias
@@ -902,8 +935,9 @@ do
   fi
 
   case $ac_option in
-  *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
-  *)   ac_optarg=yes ;;
+  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+  *=)   ac_optarg= ;;
+  *)    ac_optarg=yes ;;
   esac
 
   # Accept the important Cygnus configure options, so we can diagnose typos.
@@ -948,7 +982,7 @@ do
     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 &&
-      as_fn_error "invalid feature name: $ac_useropt"
+      as_fn_error $? "invalid feature name: $ac_useropt"
     ac_useropt_orig=$ac_useropt
     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
     case $ac_user_opts in
@@ -974,7 +1008,7 @@ do
     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 &&
-      as_fn_error "invalid feature name: $ac_useropt"
+      as_fn_error $? "invalid feature name: $ac_useropt"
     ac_useropt_orig=$ac_useropt
     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
     case $ac_user_opts in
@@ -1178,7 +1212,7 @@ do
     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 &&
-      as_fn_error "invalid package name: $ac_useropt"
+      as_fn_error $? "invalid package name: $ac_useropt"
     ac_useropt_orig=$ac_useropt
     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
     case $ac_user_opts in
@@ -1194,7 +1228,7 @@ do
     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 &&
-      as_fn_error "invalid package name: $ac_useropt"
+      as_fn_error $? "invalid package name: $ac_useropt"
     ac_useropt_orig=$ac_useropt
     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
     case $ac_user_opts in
@@ -1224,8 +1258,8 @@ do
   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
     x_libraries=$ac_optarg ;;
 
-  -*) as_fn_error "unrecognized option: \`$ac_option'
-Try \`$0 --help' for more information."
+  -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
     ;;
 
   *=*)
@@ -1233,7 +1267,7 @@ Try \`$0 --help' for more information."
     # Reject names that are not valid shell variable names.
     case $ac_envvar in #(
       '' | [0-9]* | *[!_$as_cr_alnum]* )
-      as_fn_error "invalid variable name: \`$ac_envvar'" ;;
+      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
     esac
     eval $ac_envvar=\$ac_optarg
     export $ac_envvar ;;
@@ -1243,7 +1277,7 @@ Try \`$0 --help' for more information."
     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
-    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
     ;;
 
   esac
@@ -1251,13 +1285,13 @@ done
 
 if test -n "$ac_prev"; then
   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
-  as_fn_error "missing argument to $ac_option"
+  as_fn_error $? "missing argument to $ac_option"
 fi
 
 if test -n "$ac_unrecognized_opts"; then
   case $enable_option_checking in
     no) ;;
-    fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
+    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
   esac
 fi
@@ -1280,7 +1314,7 @@ do
     [\\/$]* | ?:[\\/]* )  continue;;
     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
   esac
-  as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
+  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
 done
 
 # There might be people who depend on the old broken behavior: `$host'
@@ -1294,8 +1328,6 @@ target=$target_alias
 if test "x$host_alias" != x; then
   if test "x$build_alias" = x; then
     cross_compiling=maybe
-    $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
-    If a cross compiler is detected then cross compile mode will be used." >&2
   elif test "x$build_alias" != "x$host_alias"; then
     cross_compiling=yes
   fi
@@ -1310,9 +1342,9 @@ test "$silent" = yes && exec 6>/dev/null
 ac_pwd=`pwd` && test -n "$ac_pwd" &&
 ac_ls_di=`ls -di .` &&
 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
-  as_fn_error "working directory cannot be determined"
+  as_fn_error $? "working directory cannot be determined"
 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
-  as_fn_error "pwd does not report name of working directory"
+  as_fn_error $? "pwd does not report name of working directory"
 
 
 # Find the source files, if location was not specified.
@@ -1351,11 +1383,11 @@ else
 fi
 if test ! -r "$srcdir/$ac_unique_file"; then
   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
-  as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
+  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
 fi
 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
 ac_abs_confdir=`(
-       cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
+       cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
        pwd)`
 # When building in place, set srcdir=.
 if test "$ac_abs_confdir" = "$ac_pwd"; then
@@ -1395,7 +1427,7 @@ Configuration:
       --help=short        display options specific to this package
       --help=recursive    display the short help of all the included packages
   -V, --version           display version information and exit
-  -q, --quiet, --silent   do not print \`checking...' messages
+  -q, --quiet, --silent   do not print \`checking ...' messages
       --cache-file=FILE   cache test results in FILE [disabled]
   -C, --config-cache      alias for \`--cache-file=config.cache'
   -n, --no-create         do not create output files
@@ -1472,6 +1504,7 @@ Optional Features:
   --enable-quota         enable quota support
   --disable-backtrace    disable use backtrace
   --disable-debugfs      disable support of debugfs program
+  --disable-e2scan       disable support of e2scan program
   --disable-imager       disable support of e2image program
   --disable-resizer      disable support of e2resize program
   --disable-defrag       disable support of e4defrag program
@@ -1496,6 +1529,7 @@ Optional Packages:
   --with-included-gettext use the GNU gettext library included here
   --with-libintl-prefix[=DIR]  search for libintl in DIR/include and DIR/lib
   --without-libintl-prefix     don't search for libintl in includedir and libdir
+  --with-sqlite3=DIR      location of sqlite3 library (default /usr/lib)
   --with-multiarch=ARCH specify the multiarch triplet
 
 Some influential environment variables:
@@ -1576,9 +1610,9 @@ test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
 configure
-generated by GNU Autoconf 2.65
+generated by GNU Autoconf 2.69
 
-Copyright (C) 2009 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
 This configure script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it.
 _ACEOF
@@ -1622,7 +1656,7 @@ 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;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_c_try_compile
@@ -1654,7 +1688,7 @@ $as_echo "$ac_try_echo"; } >&5
         test ! -s conftest.err
        } && test -s conftest$ac_exeext && {
         test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
+        test -x conftest$ac_exeext
        }; then :
   ac_retval=0
 else
@@ -1668,7 +1702,7 @@ fi
   # interfere with the next link command; also delete a directory that is
   # left behind by Apple's compiler.  We do this before executing the actions.
   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_c_try_link
@@ -1694,7 +1728,7 @@ $as_echo "$ac_try_echo"; } >&5
     mv -f conftest.er1 conftest.err
   fi
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } >/dev/null && {
+  test $ac_status = 0; } > conftest.i && {
         test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
         test ! -s conftest.err
        }; then :
@@ -1705,7 +1739,7 @@ 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;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_c_try_cpp
@@ -1747,7 +1781,7 @@ 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;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_c_try_run
@@ -1761,7 +1795,7 @@ ac_fn_c_check_type ()
   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
 $as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${$3+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   eval "$3=no"
@@ -1802,7 +1836,7 @@ fi
 eval ac_res=\$$3
               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
 $as_echo "$ac_res" >&6; }
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
 } # ac_fn_c_check_type
 
@@ -1815,7 +1849,7 @@ ac_fn_c_check_header_compile ()
   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
 $as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${$3+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -1833,7 +1867,7 @@ fi
 eval ac_res=\$$3
               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
 $as_echo "$ac_res" >&6; }
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
 } # ac_fn_c_check_header_compile
 
@@ -1845,7 +1879,7 @@ ac_fn_c_check_func ()
   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
 $as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${$3+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -1900,7 +1934,7 @@ fi
 eval ac_res=\$$3
               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
 $as_echo "$ac_res" >&6; }
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
 } # ac_fn_c_check_func
 
@@ -1912,10 +1946,10 @@ $as_echo "$ac_res" >&6; }
 ac_fn_c_check_header_mongrel ()
 {
   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+  if eval \${$3+:} false; then :
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
 $as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${$3+:} false; then :
   $as_echo_n "(cached) " >&6
 fi
 eval ac_res=\$$3
@@ -1951,7 +1985,7 @@ if ac_fn_c_try_cpp "$LINENO"; then :
 else
   ac_header_preproc=no
 fi
-rm -f conftest.err conftest.$ac_ext
+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; }
 
@@ -1978,7 +2012,7 @@ $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
 esac
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
 $as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${$3+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   eval "$3=\$ac_header_compiler"
@@ -1987,7 +2021,7 @@ eval ac_res=\$$3
               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
 $as_echo "$ac_res" >&6; }
 fi
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
 } # ac_fn_c_check_header_mongrel
 
@@ -2008,7 +2042,8 @@ int
 main ()
 {
 static int test_array [1 - 2 * !(($2) >= 0)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
 
   ;
   return 0;
@@ -2024,7 +2059,8 @@ int
 main ()
 {
 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
 
   ;
   return 0;
@@ -2050,7 +2086,8 @@ int
 main ()
 {
 static int test_array [1 - 2 * !(($2) < 0)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
 
   ;
   return 0;
@@ -2066,7 +2103,8 @@ int
 main ()
 {
 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
 
   ;
   return 0;
@@ -2100,7 +2138,8 @@ int
 main ()
 {
 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
 
   ;
   return 0;
@@ -2164,7 +2203,7 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
 rm -f conftest.val
 
   fi
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_c_compute_int
@@ -2178,7 +2217,7 @@ ac_fn_c_check_member ()
   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
 $as_echo_n "checking for $2.$3... " >&6; }
-if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${$4+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -2222,19 +2261,22 @@ fi
 eval ac_res=\$$4
               { $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;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
 } # ac_fn_c_check_member
 
-# ac_fn_c_check_decl LINENO SYMBOL VAR
-# ------------------------------------
-# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
+# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
+# ---------------------------------------------
+# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
+# accordingly.
 ac_fn_c_check_decl ()
 {
   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
-$as_echo_n "checking whether $2 is declared... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+  as_decl_name=`echo $2|sed 's/ *(.*//'`
+  as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
+$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
+if eval \${$3+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -2243,8 +2285,12 @@ $4
 int
 main ()
 {
-#ifndef $2
-  (void) $2;
+#ifndef $as_decl_name
+#ifdef __cplusplus
+  (void) $as_decl_use;
+#else
+  (void) $as_decl_name;
+#endif
 #endif
 
   ;
@@ -2261,7 +2307,7 @@ fi
 eval ac_res=\$$3
               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
 $as_echo "$ac_res" >&6; }
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
 } # ac_fn_c_check_decl
 cat >config.log <<_ACEOF
@@ -2269,7 +2315,7 @@ This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
 It was created by $as_me, which was
-generated by GNU Autoconf 2.65.  Invocation command line was
+generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
 
@@ -2379,11 +2425,9 @@ trap 'exit_status=$?
   {
     echo
 
-    cat <<\_ASBOX
-## ---------------- ##
+    $as_echo "## ---------------- ##
 ## Cache variables. ##
-## ---------------- ##
-_ASBOX
+## ---------------- ##"
     echo
     # The following way of writing the cache mishandles newlines in values,
 (
@@ -2417,11 +2461,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
@@ -2434,11 +2476,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
@@ -2452,11 +2492,9 @@ _ASBOX
     fi
 
     if test -s confdefs.h; then
-      cat <<\_ASBOX
-## ----------- ##
+      $as_echo "## ----------- ##
 ## confdefs.h. ##
-## ----------- ##
-_ASBOX
+## ----------- ##"
       echo
       cat confdefs.h
       echo
@@ -2511,7 +2549,12 @@ _ACEOF
 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
@@ -2526,7 +2569,11 @@ do
     { $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
 
@@ -2605,7 +2652,7 @@ if $ac_cache_corrupted; then
 $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
+  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
 fi
 ## -------------------- ##
 ## Main body of script. ##
@@ -2621,16 +2668,22 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 ac_aux_dir=
 for ac_dir in config "$srcdir"/config; do
-  for ac_t in install-sh install.sh shtool; do
-    if test -f "$ac_dir/$ac_t"; then
-      ac_aux_dir=$ac_dir
-      ac_install_sh="$ac_aux_dir/$ac_t -c"
-      break 2
-    fi
-  done
+  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 config \"$srcdir\"/config" "$LINENO" 5
+  as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5
 fi
 
 # These three variables are undocumented and unsupported,
@@ -2722,27 +2775,27 @@ $as_echo "CC=$CC" >&6; }
 fi
 # 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_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
 
 { $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 :
+if ${ac_cv_build+:} false; 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_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
+  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
+  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
 
 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;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
 esac
 build=$ac_cv_build
 ac_save_IFS=$IFS; IFS='-'
@@ -2760,14 +2813,14 @@ case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
 
 { $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 :
+if ${ac_cv_host+:} false; 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
+    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
 fi
 
 fi
@@ -2775,7 +2828,7 @@ fi
 $as_echo "$ac_cv_host" >&6; }
 case $ac_cv_host in
 *-*-*) ;;
-*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
 esac
 host=$ac_cv_host
 ac_save_IFS=$IFS; IFS='-'
@@ -2802,7 +2855,7 @@ if test -n "$ac_tool_prefix"; then
 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 :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -2814,7 +2867,7 @@ 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 as_fn_executable_p "$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
@@ -2842,7 +2895,7 @@ if test -z "$ac_cv_prog_CC"; then
 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 :
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_CC"; then
@@ -2854,7 +2907,7 @@ 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 as_fn_executable_p "$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
@@ -2895,7 +2948,7 @@ if test -z "$CC"; then
 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 :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -2907,7 +2960,7 @@ 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 as_fn_executable_p "$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
@@ -2935,7 +2988,7 @@ if test -z "$CC"; then
 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 :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -2948,7 +3001,7 @@ 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
        ac_prog_rejected=yes
        continue
@@ -2994,7 +3047,7 @@ if test -z "$CC"; then
 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 :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -3006,7 +3059,7 @@ 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 as_fn_executable_p "$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
@@ -3038,7 +3091,7 @@ do
 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 :
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_CC"; then
@@ -3050,7 +3103,7 @@ 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 as_fn_executable_p "$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
@@ -3092,8 +3145,8 @@ 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; }
+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
@@ -3207,9 +3260,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
 
 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ as_fn_set_status 77
-as_fn_error "C compiler cannot create executables
-See \`config.log' for more details." "$LINENO" 5; }; }
+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; }
@@ -3251,8 +3303,8 @@ done
 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 compute suffix of executables: cannot compile and link
-See \`config.log' for more details." "$LINENO" 5; }
+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
@@ -3309,9 +3361,9 @@ $as_echo "$ac_try_echo"; } >&5
     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.
+as_fn_error $? "cannot run C compiled programs.
 If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." "$LINENO" 5; }
+See \`config.log' for more details" "$LINENO" 5; }
     fi
   fi
 fi
@@ -3322,7 +3374,7 @@ 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 :
+if ${ac_cv_objext+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -3362,8 +3414,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
 
 { { $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; }
+as_fn_error $? "cannot compute suffix of object files: cannot compile
+See \`config.log' for more details" "$LINENO" 5; }
 fi
 rm -f conftest.$ac_cv_objext conftest.$ac_ext
 fi
@@ -3373,7 +3425,7 @@ 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_c_compiler_gnu+set}" = set; then :
+if ${ac_cv_c_compiler_gnu+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -3410,7 +3462,7 @@ 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 :
+if ${ac_cv_prog_cc_g+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_save_c_werror_flag=$ac_c_werror_flag
@@ -3488,7 +3540,7 @@ else
 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 :
+if ${ac_cv_prog_cc_c89+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_cv_prog_cc_c89=no
@@ -3497,8 +3549,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <stdarg.h>
 #include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
+struct stat;
 /* 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);
@@ -3586,7 +3637,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
 $as_echo_n "checking for dlopen in -ldl... " >&6; }
-if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
+if ${ac_cv_lib_dl_dlopen+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -3620,7 +3671,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
-if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
+if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
   DLOPEN_LIB=-ldl
 
 $as_echo "#define HAVE_DLOPEN 1" >>confdefs.h
@@ -3631,19 +3682,19 @@ fi
 
 # Check whether --with-cc was given.
 if test "${with_cc+set}" = set; then :
-  withval=$with_cc; as_fn_error "--with-cc no longer supported; use CC= instead" "$LINENO" 5
+  withval=$with_cc; as_fn_error $? "--with-cc no longer supported; use CC= instead" "$LINENO" 5
 fi
 
 
 # Check whether --with-ccopts was given.
 if test "${with_ccopts+set}" = set; then :
-  withval=$with_ccopts; as_fn_error "--with-ccopts no longer supported; use CFLAGS= instead" "$LINENO" 5
+  withval=$with_ccopts; as_fn_error $? "--with-ccopts no longer supported; use CFLAGS= instead" "$LINENO" 5
 fi
 
 
 # Check whether --with-ldopts was given.
 if test "${with_ldopts+set}" = set; then :
-  withval=$with_ldopts; as_fn_error "--with-ldopts no longer supported; use LDFLAGS= instead" "$LINENO" 5
+  withval=$with_ldopts; as_fn_error $? "--with-ldopts no longer supported; use LDFLAGS= instead" "$LINENO" 5
 fi
 
 ac_ext=c
@@ -3656,7 +3707,7 @@ if test -n "$ac_tool_prefix"; then
 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 :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -3668,7 +3719,7 @@ 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 as_fn_executable_p "$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
@@ -3696,7 +3747,7 @@ if test -z "$ac_cv_prog_CC"; then
 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 :
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_CC"; then
@@ -3708,7 +3759,7 @@ 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 as_fn_executable_p "$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
@@ -3749,7 +3800,7 @@ if test -z "$CC"; then
 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 :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -3761,7 +3812,7 @@ 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 as_fn_executable_p "$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
@@ -3789,7 +3840,7 @@ if test -z "$CC"; then
 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 :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -3802,7 +3853,7 @@ 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
        ac_prog_rejected=yes
        continue
@@ -3848,7 +3899,7 @@ if test -z "$CC"; then
 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 :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -3860,7 +3911,7 @@ 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 as_fn_executable_p "$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
@@ -3892,7 +3943,7 @@ do
 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 :
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_CC"; then
@@ -3904,7 +3955,7 @@ 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 as_fn_executable_p "$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
@@ -3946,8 +3997,8 @@ 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; }
+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
@@ -3976,7 +4027,7 @@ done
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
-if test "${ac_cv_c_compiler_gnu+set}" = set; then :
+if ${ac_cv_c_compiler_gnu+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -4013,7 +4064,7 @@ 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 :
+if ${ac_cv_prog_cc_g+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_save_c_werror_flag=$ac_c_werror_flag
@@ -4091,7 +4142,7 @@ else
 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 :
+if ${ac_cv_prog_cc_c89+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_cv_prog_cc_c89=no
@@ -4100,8 +4151,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <stdarg.h>
 #include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
+struct stat;
 /* 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);
@@ -4202,7 +4252,7 @@ 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 ${ac_cv_prog_CPP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
       # Double quotes because CPP needs to be expanded
@@ -4232,7 +4282,7 @@ else
   # Broken: fails on valid input.
 continue
 fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
 
   # OK, works on sane cases.  Now check whether nonexistent headers
   # can be detected and how.
@@ -4248,11 +4298,11 @@ else
 ac_preproc_ok=:
 break
 fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
 
 done
 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.i conftest.err conftest.$ac_ext
 if $ac_preproc_ok; then :
   break
 fi
@@ -4291,7 +4341,7 @@ else
   # Broken: fails on valid input.
 continue
 fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
 
   # OK, works on sane cases.  Now check whether nonexistent headers
   # can be detected and how.
@@ -4307,18 +4357,18 @@ else
 ac_preproc_ok=:
 break
 fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
 
 done
 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
+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; }
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
 fi
 
 ac_ext=c
@@ -4724,7 +4774,7 @@ if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
 set dummy ${ac_tool_prefix}pkg-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_PKG_CONFIG+set}" = set; then :
+if ${ac_cv_path_PKG_CONFIG+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $PKG_CONFIG in
@@ -4738,7 +4788,7 @@ 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_PKG_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
@@ -4767,7 +4817,7 @@ if test -z "$ac_cv_path_PKG_CONFIG"; then
 set dummy pkg-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_ac_pt_PKG_CONFIG+set}" = set; then :
+if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $ac_pt_PKG_CONFIG in
@@ -4781,7 +4831,7 @@ 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_ac_pt_PKG_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
@@ -4844,12 +4894,12 @@ if test "${enable_libuuid+set}" = set; then :
   enableval=$enable_libuuid; if test "$enableval" = "no"
 then
        if test -z "$PKG_CONFIG"; then
-               as_fn_error "pkg-config not installed; please install it." "$LINENO" 5
+               as_fn_error $? "pkg-config not installed; please install it." "$LINENO" 5
        fi
 
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
 $as_echo_n "checking for uuid_generate in -luuid... " >&6; }
-if test "${ac_cv_lib_uuid_uuid_generate+set}" = set; then :
+if ${ac_cv_lib_uuid_uuid_generate+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -4883,11 +4933,11 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
 $as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
-if test "x$ac_cv_lib_uuid_uuid_generate" = x""yes; then :
+if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then :
   LIBUUID=`$PKG_CONFIG --libs uuid`;
                 STATIC_LIBUUID=`$PKG_CONFIG --static --libs uuid`
 else
-  as_fn_error "external uuid library not found" "$LINENO" 5
+  as_fn_error $? "external uuid library not found" "$LINENO" 5
 fi
 
        PROFILED_LIBUUID=$LIBUUID
@@ -4932,7 +4982,7 @@ if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
 set dummy ${ac_tool_prefix}pkg-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_PKG_CONFIG+set}" = set; then :
+if ${ac_cv_path_PKG_CONFIG+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $PKG_CONFIG in
@@ -4946,7 +4996,7 @@ 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_PKG_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
@@ -4975,7 +5025,7 @@ if test -z "$ac_cv_path_PKG_CONFIG"; then
 set dummy pkg-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_ac_pt_PKG_CONFIG+set}" = set; then :
+if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $ac_pt_PKG_CONFIG in
@@ -4989,7 +5039,7 @@ 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_ac_pt_PKG_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
@@ -5053,12 +5103,12 @@ if test "${enable_libblkid+set}" = set; then :
   enableval=$enable_libblkid; if test "$enableval" = "no"
 then
        if test -z "$PKG_CONFIG"; then
-               as_fn_error "pkg-config not installed; please install it." "$LINENO" 5
+               as_fn_error $? "pkg-config not installed; please install it." "$LINENO" 5
        fi
 
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for blkid_get_cache in -lblkid" >&5
 $as_echo_n "checking for blkid_get_cache in -lblkid... " >&6; }
-if test "${ac_cv_lib_blkid_blkid_get_cache+set}" = set; then :
+if ${ac_cv_lib_blkid_blkid_get_cache+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -5092,11 +5142,11 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_blkid_blkid_get_cache" >&5
 $as_echo "$ac_cv_lib_blkid_blkid_get_cache" >&6; }
-if test "x$ac_cv_lib_blkid_blkid_get_cache" = x""yes; then :
+if test "x$ac_cv_lib_blkid_blkid_get_cache" = xyes; then :
   LIBBLKID=`$PKG_CONFIG --libs blkid`;
                 STATIC_LIBBLKID=`$PKG_CONFIG --static --libs blkid`
 else
-  as_fn_error "external blkid library not found" "$LINENO" 5
+  as_fn_error $? "external blkid library not found" "$LINENO" 5
 fi
 
        BLKID_CMT=#
@@ -5148,7 +5198,7 @@ if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
 set dummy ${ac_tool_prefix}pkg-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_PKG_CONFIG+set}" = set; then :
+if ${ac_cv_path_PKG_CONFIG+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $PKG_CONFIG in
@@ -5162,7 +5212,7 @@ 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_PKG_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
@@ -5191,7 +5241,7 @@ if test -z "$ac_cv_path_PKG_CONFIG"; then
 set dummy pkg-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_ac_pt_PKG_CONFIG+set}" = set; then :
+if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $ac_pt_PKG_CONFIG in
@@ -5205,7 +5255,7 @@ 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_ac_pt_PKG_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
@@ -5335,6 +5385,28 @@ DEBUGFS_CMT=
 fi
 
 
+# Check whether --enable-e2scan was given.
+if test "${enable_e2scan+set}" = set; then :
+  enableval=$enable_e2scan; if test "$enableval" = "no"
+then
+       echo "Disabling e2scan support"
+       E2SCAN_CMT="#"
+       E2SCAN_MAN='.\"'
+else
+       E2SCAN_CMT=
+       E2SCAN_MAN=
+       echo "Enabling e2scan support"
+fi
+
+else
+  echo "Enabling e2scan support by default"
+E2SCAN_CMT=
+E2SCAN_MAN=
+
+fi
+
+
+
 # Check whether --enable-imager was given.
 if test "${enable_imager+set}" = set; then :
   enableval=$enable_imager; if test "$enableval" = "no"
@@ -5489,7 +5561,7 @@ then
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread local storage (TLS) class" >&5
 $as_echo_n "checking for thread local storage (TLS) class... " >&6; }
-  if test "${ac_cv_tls+set}" = set; then :
+  if ${ac_cv_tls+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -5595,7 +5667,7 @@ _ACEOF
 $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 \${ac_cv_prog_make_${ac_make}_set+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat >conftest.make <<\_ACEOF
@@ -5603,7 +5675,7 @@ 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;;
@@ -5639,7 +5711,7 @@ fi
 { $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 ${ac_cv_path_install+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -5659,7 +5731,7 @@ case $as_dir/ in #((
     # 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 as_fn_executable_p "$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.
@@ -5778,7 +5850,7 @@ rm -f conf$$.file
 set dummy msgfmt; 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_MSGFMT+set}" = set; then :
+if ${ac_cv_path_MSGFMT+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case "$MSGFMT" in
@@ -5818,7 +5890,7 @@ fi
 set dummy gmsgfmt; 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_GMSGFMT+set}" = set; then :
+if ${ac_cv_path_GMSGFMT+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $GMSGFMT in
@@ -5832,7 +5904,7 @@ 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_GMSGFMT="$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
@@ -5889,7 +5961,7 @@ rm -f conf$$.file
 set dummy xgettext; 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_XGETTEXT+set}" = set; then :
+if ${ac_cv_path_XGETTEXT+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case "$XGETTEXT" in
@@ -5960,7 +6032,7 @@ rm -f conf$$.file
 set dummy msgmerge; 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_MSGMERGE+set}" = set; then :
+if ${ac_cv_path_MSGMERGE+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case "$MSGMERGE" in
@@ -6028,7 +6100,7 @@ if test -n "$ac_tool_prefix"; then
 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 :
+if ${ac_cv_prog_RANLIB+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$RANLIB"; then
@@ -6040,7 +6112,7 @@ 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 as_fn_executable_p "$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
@@ -6068,7 +6140,7 @@ if test -z "$ac_cv_prog_RANLIB"; then
 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 :
+if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_RANLIB"; then
@@ -6080,7 +6152,7 @@ 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 as_fn_executable_p "$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
@@ -6118,7 +6190,7 @@ fi
 
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strerror in -lcposix" >&5
 $as_echo_n "checking for strerror in -lcposix... " >&6; }
-if test "${ac_cv_lib_cposix_strerror+set}" = set; then :
+if ${ac_cv_lib_cposix_strerror+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -6152,7 +6224,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cposix_strerror" >&5
 $as_echo "$ac_cv_lib_cposix_strerror" >&6; }
-if test "x$ac_cv_lib_cposix_strerror" = x""yes; then :
+if test "x$ac_cv_lib_cposix_strerror" = xyes; then :
   LIBS="$LIBS -lcposix"
 fi
 
@@ -6161,7 +6233,7 @@ fi
 
 { $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 :
+if ${ac_cv_path_GREP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -z "$GREP"; then
@@ -6175,7 +6247,7 @@ 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
+      as_fn_executable_p "$ac_path_GREP" || continue
 # Check for GNU ac_path_GREP and select it if it is found.
   # Check for GNU $ac_path_GREP
 case `"$ac_path_GREP" --version 2>&1` in
@@ -6210,7 +6282,7 @@ esac
   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
+    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
@@ -6224,7 +6296,7 @@ $as_echo "$ac_cv_path_GREP" >&6; }
 
 { $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 :
+if ${ac_cv_path_EGREP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
@@ -6241,7 +6313,7 @@ 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
+      as_fn_executable_p "$ac_path_EGREP" || continue
 # Check for GNU ac_path_EGREP and select it if it is found.
   # Check for GNU $ac_path_EGREP
 case `"$ac_path_EGREP" --version 2>&1` in
@@ -6276,7 +6348,7 @@ esac
   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
+    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
@@ -6291,7 +6363,7 @@ $as_echo "$ac_cv_path_EGREP" >&6; }
 
 { $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 :
+if ${ac_cv_header_stdc+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -6403,7 +6475,7 @@ fi
 
 { $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 :
+if ${ac_cv_c_const+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -6412,11 +6484,11 @@ else
 int
 main ()
 {
-/* FIXME: Include the comments suggested by Paul. */
+
 #ifndef __cplusplus
-  /* Ultrix mips cc rejects this.  */
+  /* Ultrix mips cc rejects this sort of thing.  */
   typedef int charset[2];
-  const charset cs;
+  const charset cs = { 0, 0 };
   /* SunOS 4.1.1 cc rejects this.  */
   char const *const *pcpcc;
   char **ppc;
@@ -6433,8 +6505,9 @@ main ()
   ++pcpcc;
   ppc = (char**) pcpcc;
   pcpcc = (char const *const *) ppc;
-  { /* SCO 3.2v4 cc rejects this.  */
-    char *t;
+  { /* SCO 3.2v4 cc rejects this sort of thing.  */
+    char tx;
+    char *t = &tx;
     char const *s = 0 ? (char *) 0 : (char const *) 0;
 
     *t++ = 0;
@@ -6450,10 +6523,10 @@ main ()
     iptr p = 0;
     ++p;
   }
-  { /* AIX XL C 1.02.0.0 rejects this saying
+  { /* AIX XL C 1.02.0.0 rejects this sort of thing, 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;
+    struct s { int j; const int *ap[3]; } bx;
+    struct s *b = &bx; b->j = 5;
   }
   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
     const int foo = 10;
@@ -6484,7 +6557,7 @@ fi
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signed" >&5
 $as_echo_n "checking for signed... " >&6; }
-if test "${bh_cv_c_signed+set}" = set; then :
+if ${bh_cv_c_signed+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -6515,7 +6588,7 @@ $as_echo "#define signed /**/" >>confdefs.h
 
 { $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 :
+if ${ac_cv_c_inline+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_cv_c_inline=no
@@ -6562,8 +6635,7 @@ 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
 "
-eval as_val=\$$as_ac_Header
-   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_header" | $as_tr_cpp` 1
 _ACEOF
@@ -6574,7 +6646,7 @@ done
 
 
 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 :
+if test "x$ac_cv_type_off_t" = xyes; then :
 
 else
 
@@ -6585,7 +6657,7 @@ _ACEOF
 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 :
+if test "x$ac_cv_type_size_t" = xyes; then :
 
 else
 
@@ -6598,7 +6670,7 @@ fi
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long" >&5
 $as_echo_n "checking for long long... " >&6; }
-if test "${ac_cv_type_long_long+set}" = set; then :
+if ${ac_cv_type_long_long+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -6632,7 +6704,7 @@ $as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
 $as_echo_n "checking for long double... " >&6; }
-if test "${gt_cv_c_long_double+set}" = set; then :
+if ${gt_cv_c_long_double+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test "$GCC" = yes; then
@@ -6673,7 +6745,7 @@ $as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
 $as_echo_n "checking for wchar_t... " >&6; }
-if test "${gt_cv_c_wchar_t+set}" = set; then :
+if ${gt_cv_c_wchar_t+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -6706,7 +6778,7 @@ $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
 $as_echo_n "checking for wint_t... " >&6; }
-if test "${gt_cv_c_wint_t+set}" = set; then :
+if ${gt_cv_c_wint_t+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -6739,7 +6811,7 @@ $as_echo "#define HAVE_WINT_T 1" >>confdefs.h
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5
 $as_echo_n "checking for inttypes.h... " >&6; }
-if test "${jm_ac_cv_header_inttypes_h+set}" = set; then :
+if ${jm_ac_cv_header_inttypes_h+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -6774,7 +6846,7 @@ _ACEOF
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5
 $as_echo_n "checking for stdint.h... " >&6; }
-if test "${jm_ac_cv_header_stdint_h+set}" = set; then :
+if ${jm_ac_cv_header_stdint_h+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -6811,7 +6883,7 @@ _ACEOF
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5
 $as_echo_n "checking for intmax_t... " >&6; }
-if test "${gt_cv_c_intmax_t+set}" = set; then :
+if ${gt_cv_c_intmax_t+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -6853,7 +6925,7 @@ $as_echo "#define HAVE_INTMAX_T 1" >>confdefs.h
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf() supports POSIX/XSI format strings" >&5
 $as_echo_n "checking whether printf() supports POSIX/XSI format strings... " >&6; }
-if test "${gt_cv_func_printf_posix+set}" = set; then :
+if ${gt_cv_func_printf_posix+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -6917,7 +6989,7 @@ $as_echo "#define HAVE_POSIX_PRINTF 1" >>confdefs.h
 # 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 :
+if ${ac_cv_working_alloca_h+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -6950,7 +7022,7 @@ fi
 
 { $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 :
+if ${ac_cv_func_alloca_works+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -6969,7 +7041,7 @@ else
  #pragma alloca
 #   else
 #    ifndef alloca /* predefined by HP cc +Olibcalls */
-char *alloca ();
+void *alloca (size_t);
 #    endif
 #   endif
 #  endif
@@ -7013,7 +7085,7 @@ $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 :
+if ${ac_cv_os_cray+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -7040,8 +7112,7 @@ 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"
-eval as_val=\$$as_ac_var
-   if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
 
 cat >>confdefs.h <<_ACEOF
 #define CRAY_STACKSEG_END $ac_func
@@ -7055,7 +7126,7 @@ fi
 
 { $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 :
+if ${ac_cv_c_stack_direction+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test "$cross_compiling" = yes; then :
@@ -7065,23 +7136,20 @@ else
 /* end confdefs.h.  */
 $ac_includes_default
 int
-find_stack_direction ()
+find_stack_direction (int *addr, int depth)
 {
-  static char *addr = 0;
-  auto char dummy;
-  if (addr == 0)
-    {
-      addr = &dummy;
-      return find_stack_direction ();
-    }
-  else
-    return (&dummy > addr) ? 1 : -1;
+  int dir, dummy = 0;
+  if (! addr)
+    addr = &dummy;
+  *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
+  dir = depth ? find_stack_direction (addr, depth - 1) : 0;
+  return dir + dummy;
 }
 
 int
-main ()
+main (int argc, char **argv)
 {
-  return find_stack_direction () < 0;
+  return find_stack_direction (0, argc + !argv + 20) < 0;
 }
 _ACEOF
 if ac_fn_c_try_run "$LINENO"; then :
@@ -7111,8 +7179,7 @@ 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
 "
-eval as_val=\$$as_ac_Header
-   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_header" | $as_tr_cpp` 1
 _ACEOF
@@ -7131,7 +7198,7 @@ done
 for ac_func in getpagesize
 do :
   ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
-if test "x$ac_cv_func_getpagesize" = x""yes; then :
+if test "x$ac_cv_func_getpagesize" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_GETPAGESIZE 1
 _ACEOF
@@ -7141,7 +7208,7 @@ done
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
 $as_echo_n "checking for working mmap... " >&6; }
-if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
+if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test "$cross_compiling" = yes; then :
@@ -7308,7 +7375,7 @@ rm -f conftest.mmap conftest.txt
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library 2.1 or newer" >&5
 $as_echo_n "checking whether we are using the GNU C Library 2.1 or newer... " >&6; }
-if test "${ac_cv_gnu_library_2_1+set}" = set; then :
+if ${ac_cv_gnu_library_2_1+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -7343,7 +7410,7 @@ $as_echo "$ac_cv_gnu_library_2_1" >&6; }
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether integer division by zero raises SIGFPE" >&5
 $as_echo_n "checking whether integer division by zero raises SIGFPE... " >&6; }
-if test "${gt_cv_int_divbyzero_sigfpe+set}" = set; then :
+if ${gt_cv_int_divbyzero_sigfpe+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -7424,7 +7491,7 @@ _ACEOF
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long" >&5
 $as_echo_n "checking for unsigned long long... " >&6; }
-if test "${ac_cv_type_unsigned_long_long+set}" = set; then :
+if ${ac_cv_type_unsigned_long_long+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -7477,7 +7544,7 @@ $as_echo "#define HAVE_UINTMAX_T 1" >>confdefs.h
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5
 $as_echo_n "checking for inttypes.h... " >&6; }
-if test "${gt_cv_header_inttypes_h+set}" = set; then :
+if ${gt_cv_header_inttypes_h+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -7516,7 +7583,7 @@ _ACEOF
   if test $gt_cv_header_inttypes_h = yes; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the inttypes.h PRIxNN macros are broken" >&5
 $as_echo_n "checking whether the inttypes.h PRIxNN macros are broken... " >&6; }
-if test "${gt_cv_inttypes_pri_broken+set}" = set; then :
+if ${gt_cv_inttypes_pri_broken+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -7558,7 +7625,7 @@ _ACEOF
   for ac_header in stdint.h
 do :
   ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
-if test "x$ac_cv_header_stdint_h" = x""yes; then :
+if test "x$ac_cv_header_stdint_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_STDINT_H 1
 _ACEOF
@@ -7655,7 +7722,7 @@ _ACEOF
   for ac_header in stdint.h
 do :
   ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
-if test "x$ac_cv_header_stdint_h" = x""yes; then :
+if test "x$ac_cv_header_stdint_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_STDINT_H 1
 _ACEOF
@@ -7741,7 +7808,7 @@ else
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
 $as_echo_n "checking for non-GNU ld... " >&6; }
 fi
-if test "${acl_cv_path_LD+set}" = set; then :
+if ${acl_cv_path_LD+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -z "$LD"; then
@@ -7775,10 +7842,10 @@ else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
-test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
+test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
-if test "${acl_cv_prog_gnu_ld+set}" = set; then :
+if ${acl_cv_prog_gnu_ld+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
@@ -7797,7 +7864,7 @@ with_gnu_ld=$acl_cv_prog_gnu_ld
 
                                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
 $as_echo_n "checking for shared library run path origin... " >&6; }
-if test "${acl_cv_rpath+set}" = set; then :
+if ${acl_cv_rpath+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -8215,7 +8282,7 @@ fi
 
 
   ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
-if test "x$ac_cv_type_ptrdiff_t" = x""yes; then :
+if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
 
 else
 
@@ -8229,8 +8296,7 @@ stdlib.h string.h unistd.h sys/param.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"
-eval as_val=\$$as_ac_Header
-   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_header" | $as_tr_cpp` 1
 _ACEOF
@@ -8246,8 +8312,7 @@ __fsetlocking
 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"
-eval as_val=\$$as_ac_var
-   if test "x$as_val" = x""yes; then :
+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
@@ -8259,7 +8324,7 @@ done
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _snprintf is declared" >&5
 $as_echo_n "checking whether _snprintf is declared... " >&6; }
-if test "${ac_cv_have_decl__snprintf+set}" = set; then :
+if ${ac_cv_have_decl__snprintf+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -8300,7 +8365,7 @@ _ACEOF
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _snwprintf is declared" >&5
 $as_echo_n "checking whether _snwprintf is declared... " >&6; }
-if test "${ac_cv_have_decl__snwprintf+set}" = set; then :
+if ${ac_cv_have_decl__snwprintf+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -8342,7 +8407,7 @@ _ACEOF
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether feof_unlocked is declared" >&5
 $as_echo_n "checking whether feof_unlocked is declared... " >&6; }
-if test "${ac_cv_have_decl_feof_unlocked+set}" = set; then :
+if ${ac_cv_have_decl_feof_unlocked+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -8383,7 +8448,7 @@ _ACEOF
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fgets_unlocked is declared" >&5
 $as_echo_n "checking whether fgets_unlocked is declared... " >&6; }
-if test "${ac_cv_have_decl_fgets_unlocked+set}" = set; then :
+if ${ac_cv_have_decl_fgets_unlocked+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -8424,7 +8489,7 @@ _ACEOF
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getc_unlocked is declared" >&5
 $as_echo_n "checking whether getc_unlocked is declared... " >&6; }
-if test "${ac_cv_have_decl_getc_unlocked+set}" = set; then :
+if ${ac_cv_have_decl_getc_unlocked+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -8519,7 +8584,7 @@ _ACEOF
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
 $as_echo_n "checking for iconv... " >&6; }
-if test "${am_cv_func_iconv+set}" = set; then :
+if ${am_cv_func_iconv+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -8594,7 +8659,7 @@ $as_echo "$LIBICONV" >&6; }
   if test "$am_cv_func_iconv" = yes; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
 $as_echo_n "checking for iconv declaration... " >&6; }
-    if test "${am_cv_proto_iconv+set}" = set; then :
+    if ${am_cv_proto_iconv+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -8645,7 +8710,7 @@ _ACEOF
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
-if test "${am_cv_langinfo_codeset+set}" = set; then :
+if ${am_cv_langinfo_codeset+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -8680,7 +8745,7 @@ $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
 $as_echo_n "checking for LC_MESSAGES... " >&6; }
-if test "${am_cv_val_LC_MESSAGES+set}" = set; then :
+if ${am_cv_val_LC_MESSAGES+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -8718,7 +8783,7 @@ do
 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_INTLBISON+set}" = set; then :
+if ${ac_cv_prog_INTLBISON+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$INTLBISON"; then
@@ -8730,7 +8795,7 @@ 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_INTLBISON="$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -8836,7 +8901,7 @@ $as_echo "$nls_cv_force_use_gnu_gettext" >&6; }
 
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5
 $as_echo_n "checking for GNU gettext in libc... " >&6; }
-if test "${gt_cv_func_gnugettext1_libc+set}" = set; then :
+if ${gt_cv_func_gnugettext1_libc+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -9246,7 +9311,7 @@ fi
 
           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5
 $as_echo_n "checking for GNU gettext in libintl... " >&6; }
-if test "${gt_cv_func_gnugettext1_libintl+set}" = set; then :
+if ${gt_cv_func_gnugettext1_libintl+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   gt_save_CPPFLAGS="$CPPFLAGS"
@@ -9461,7 +9526,7 @@ $as_echo "#define HAVE_DCGETTEXT 1" >>confdefs.h
 $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 \${ac_cv_prog_make_${ac_make}_set+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat >conftest.make <<\_ACEOF
@@ -9469,7 +9534,7 @@ 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;;
@@ -9490,7 +9555,7 @@ fi
 
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU make" >&5
 $as_echo_n "checking for GNU make... " >&6; }
-if test "${_cv_gnu_make_command+set}" = set; then :
+if ${_cv_gnu_make_command+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   _cv_gnu_make_command='' ;
@@ -9521,7 +9586,7 @@ $as_echo "\"Not found\"" >&6; };
 set dummy ln; 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_LN+set}" = set; then :
+if ${ac_cv_path_LN+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $LN in
@@ -9535,7 +9600,7 @@ 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_LN="$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
@@ -9573,7 +9638,7 @@ fi
 set dummy mv; 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_MV+set}" = set; then :
+if ${ac_cv_path_MV+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $MV in
@@ -9587,7 +9652,7 @@ 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_MV="$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
@@ -9614,7 +9679,7 @@ fi
 set dummy cp; 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_CP+set}" = set; then :
+if ${ac_cv_path_CP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $CP in
@@ -9628,7 +9693,7 @@ 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_CP="$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
@@ -9655,7 +9720,7 @@ fi
 set dummy rm; 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_RM+set}" = set; then :
+if ${ac_cv_path_RM+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $RM in
@@ -9669,7 +9734,7 @@ 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_RM="$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
@@ -9696,7 +9761,7 @@ fi
 set dummy chmod; 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_CHMOD+set}" = set; then :
+if ${ac_cv_path_CHMOD+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $CHMOD in
@@ -9710,7 +9775,7 @@ 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_CHMOD="$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
@@ -9739,7 +9804,7 @@ do
 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 :
+if ${ac_cv_prog_AWK+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$AWK"; then
@@ -9751,7 +9816,7 @@ 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 as_fn_executable_p "$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
@@ -9777,7 +9842,7 @@ done
 
 { $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 :
+if ${ac_cv_path_EGREP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
@@ -9794,7 +9859,7 @@ 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
+      as_fn_executable_p "$ac_path_EGREP" || continue
 # Check for GNU ac_path_EGREP and select it if it is found.
   # Check for GNU $ac_path_EGREP
 case `"$ac_path_EGREP" --version 2>&1` in
@@ -9829,7 +9894,7 @@ esac
   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
+    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
@@ -9846,7 +9911,7 @@ $as_echo "$ac_cv_path_EGREP" >&6; }
 set dummy sed; 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_SED+set}" = set; then :
+if ${ac_cv_path_SED+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $SED in
@@ -9860,7 +9925,7 @@ 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_SED="$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
@@ -9887,7 +9952,7 @@ fi
 set dummy perl; 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_PERL+set}" = set; then :
+if ${ac_cv_path_PERL+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $PERL in
@@ -9901,7 +9966,7 @@ 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_PERL="$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
@@ -9928,7 +9993,7 @@ fi
 set dummy ldconfig; 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_LDCONFIG+set}" = set; then :
+if ${ac_cv_path_LDCONFIG+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $LDCONFIG in
@@ -9942,7 +10007,7 @@ 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_LDCONFIG="$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
@@ -9970,7 +10035,7 @@ if test -n "$ac_tool_prefix"; then
 set dummy ${ac_tool_prefix}ar; 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_AR+set}" = set; then :
+if ${ac_cv_prog_AR+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$AR"; then
@@ -9982,7 +10047,7 @@ 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_AR="${ac_tool_prefix}ar"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -10010,7 +10075,7 @@ if test -z "$ac_cv_prog_AR"; then
 set dummy ar; 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_AR+set}" = set; then :
+if ${ac_cv_prog_ac_ct_AR+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_AR"; then
@@ -10022,7 +10087,7 @@ 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_AR="ar"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -10062,7 +10127,7 @@ if test -n "$ac_tool_prefix"; then
 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 :
+if ${ac_cv_prog_RANLIB+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$RANLIB"; then
@@ -10074,7 +10139,7 @@ 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 as_fn_executable_p "$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
@@ -10102,7 +10167,7 @@ if test -z "$ac_cv_prog_RANLIB"; then
 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 :
+if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_RANLIB"; then
@@ -10114,7 +10179,7 @@ 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 as_fn_executable_p "$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
@@ -10154,7 +10219,7 @@ if test -n "$ac_tool_prefix"; then
 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 :
+if ${ac_cv_prog_STRIP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$STRIP"; then
@@ -10166,7 +10231,7 @@ 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 as_fn_executable_p "$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
@@ -10194,7 +10259,7 @@ if test -z "$ac_cv_prog_STRIP"; then
 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 :
+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_STRIP"; then
@@ -10206,7 +10271,7 @@ 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 as_fn_executable_p "$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
@@ -10245,7 +10310,7 @@ fi
 set dummy makeinfo; 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_MAKEINFO+set}" = set; then :
+if ${ac_cv_prog_MAKEINFO+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$MAKEINFO"; then
@@ -10257,7 +10322,7 @@ 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_MAKEINFO="makeinfo"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -10305,7 +10370,7 @@ do
 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_BUILD_CC+set}" = set; then :
+if ${ac_cv_prog_BUILD_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$BUILD_CC"; then
@@ -10317,7 +10382,7 @@ 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_BUILD_CC="$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -10346,8 +10411,7 @@ for ac_header in        attr/xattr.h    dirent.h        errno.h         execinfo.h      getopt.h        malloc
 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"
-eval as_val=\$$as_ac_Header
-   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_header" | $as_tr_cpp` 1
 _ACEOF
@@ -10367,7 +10431,7 @@ do :
 #endif
 
 "
-if test "x$ac_cv_header_net_if_h" = x""yes; then :
+if test "x$ac_cv_header_net_if_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_NET_IF_H 1
 _ACEOF
 
 done
 
+if test x"$E2SCAN_CMT" == x; then
+for ac_header in sqlite3.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "sqlite3.h" "ac_cv_header_sqlite3_h" "$ac_includes_default"
+if test "x$ac_cv_header_sqlite3_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_SQLITE3_H 1
+_ACEOF
+
+fi
+
+done
+
+fi
 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 :
+if test "x$ac_cv_func_vprintf" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_VPRINTF 1
 _ACEOF
 
 ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt"
-if test "x$ac_cv_func__doprnt" = x""yes; then :
+if test "x$ac_cv_func__doprnt" = xyes; then :
 
 $as_echo "#define HAVE_DOPRNT 1" >>confdefs.h
 
@@ -10397,14 +10475,14 @@ done
 
 ac_fn_c_check_member "$LINENO" "struct dirent" "d_reclen" "ac_cv_member_struct_dirent_d_reclen" "#include <dirent.h>
 "
-if test "x$ac_cv_member_struct_dirent_d_reclen" = x""yes; then :
+if test "x$ac_cv_member_struct_dirent_d_reclen" = xyes; then :
 
 $as_echo "#define HAVE_RECLEN_DIRENT 1" >>confdefs.h
 
 fi
 
 ac_fn_c_check_member "$LINENO" "struct stat" "st_atim" "ac_cv_member_struct_stat_st_atim" "$ac_includes_default"
-if test "x$ac_cv_member_struct_stat_st_atim" = x""yes; then :
+if test "x$ac_cv_member_struct_stat_st_atim" = xyes; then :
 
 cat >>confdefs.h <<_ACEOF
 #define HAVE_STRUCT_STAT_ST_ATIM 1
@@ -10415,7 +10493,7 @@ fi
 
 ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "#include <sys/types.h>
 "
-if test "x$ac_cv_type_ssize_t" = x""yes; then :
+if test "x$ac_cv_type_ssize_t" = xyes; then :
 
 $as_echo "#define HAVE_TYPE_SSIZE_T 1" >>confdefs.h
 
@@ -10423,7 +10501,7 @@ fi
 
 ac_fn_c_check_decl "$LINENO" "llseek" "ac_cv_have_decl_llseek" "#include <unistd.h>
 "
-if test "x$ac_cv_have_decl_llseek" = x""yes; then :
+if test "x$ac_cv_have_decl_llseek" = xyes; then :
 
 $as_echo "#define HAVE_LLSEEK_PROTOTYPE 1" >>confdefs.h
 
@@ -10433,7 +10511,7 @@ ac_fn_c_check_decl "$LINENO" "lseek64" "ac_cv_have_decl_lseek64" "#define _LARGE
                 #define _LARGEFILE64_SOURCE
                 #include <unistd.h>
 "
-if test "x$ac_cv_have_decl_lseek64" = x""yes; then :
+if test "x$ac_cv_have_decl_lseek64" = xyes; then :
 
 $as_echo "#define HAVE_LSEEK64_PROTOTYPE 1" >>confdefs.h
 
@@ -10445,7 +10523,7 @@ fi
 # This bug is HP SR number 8606223364.
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
 $as_echo_n "checking size of short... " >&6; }
-if test "${ac_cv_sizeof_short+set}" = set; then :
+if ${ac_cv_sizeof_short+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short"        "$ac_includes_default"; then :
@@ -10454,9 +10532,8 @@ else
   if test "$ac_cv_type_short" = 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_set_status 77
-as_fn_error "cannot compute sizeof (short)
-See \`config.log' for more details." "$LINENO" 5; }; }
+as_fn_error 77 "cannot compute sizeof (short)
+See \`config.log' for more details" "$LINENO" 5; }
    else
      ac_cv_sizeof_short=0
    fi
@@ -10479,7 +10556,7 @@ _ACEOF
 # This bug is HP SR number 8606223364.
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
 $as_echo_n "checking size of int... " >&6; }
-if test "${ac_cv_sizeof_int+set}" = set; then :
+if ${ac_cv_sizeof_int+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int"        "$ac_includes_default"; then :
@@ -10488,9 +10565,8 @@ else
   if test "$ac_cv_type_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_set_status 77
-as_fn_error "cannot compute sizeof (int)
-See \`config.log' for more details." "$LINENO" 5; }; }
+as_fn_error 77 "cannot compute sizeof (int)
+See \`config.log' for more details" "$LINENO" 5; }
    else
      ac_cv_sizeof_int=0
    fi
@@ -10513,7 +10589,7 @@ _ACEOF
 # This bug is HP SR number 8606223364.
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
 $as_echo_n "checking size of long... " >&6; }
-if test "${ac_cv_sizeof_long+set}" = set; then :
+if ${ac_cv_sizeof_long+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
@@ -10522,9 +10598,8 @@ else
   if test "$ac_cv_type_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_set_status 77
-as_fn_error "cannot compute sizeof (long)
-See \`config.log' for more details." "$LINENO" 5; }; }
+as_fn_error 77 "cannot compute sizeof (long)
+See \`config.log' for more details" "$LINENO" 5; }
    else
      ac_cv_sizeof_long=0
    fi
@@ -10547,7 +10622,7 @@ _ACEOF
 # This bug is HP SR number 8606223364.
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
 $as_echo_n "checking size of long long... " >&6; }
-if test "${ac_cv_sizeof_long_long+set}" = set; then :
+if ${ac_cv_sizeof_long_long+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long"        "$ac_includes_default"; then :
@@ -10556,9 +10631,8 @@ else
   if test "$ac_cv_type_long_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_set_status 77
-as_fn_error "cannot compute sizeof (long long)
-See \`config.log' for more details." "$LINENO" 5; }; }
+as_fn_error 77 "cannot compute sizeof (long long)
+See \`config.log' for more details" "$LINENO" 5; }
    else
      ac_cv_sizeof_long_long=0
    fi
@@ -10581,7 +10655,7 @@ _ACEOF
 # 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 :
+if ${ac_cv_sizeof_off_t+:} false; 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 :
@@ -10590,9 +10664,8 @@ 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_set_status 77
-as_fn_error "cannot compute sizeof (off_t)
-See \`config.log' for more details." "$LINENO" 5; }; }
+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
@@ -10621,7 +10694,7 @@ SIZEOF_OFF_T=$ac_cv_sizeof_off_t
 
  { $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 :
+if ${ac_cv_c_bigendian+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_cv_c_bigendian=unknown
@@ -10839,7 +10912,7 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
 
      ;; #(
    *)
-     as_fn_error "unknown endianness
+     as_fn_error $? "unknown endianness
  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
  esac
 
@@ -10868,7 +10941,7 @@ PUBLIC_CONFIG_HEADER=./public_config.h
 for ac_header in inttypes.h
 do :
   ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
-if test "x$ac_cv_header_inttypes_h" = x""yes; then :
+if test "x$ac_cv_header_inttypes_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_INTTYPES_H 1
 _ACEOF
@@ -10878,7 +10951,7 @@ fi
 done
 
 ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
-if test "x$ac_cv_type_intptr_t" = x""yes; then :
+if test "x$ac_cv_type_intptr_t" = xyes; then :
 
 cat >>confdefs.h <<_ACEOF
 #define HAVE_INTPTR_T 1
@@ -10889,7 +10962,7 @@ fi
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat has a st_flags field" >&5
 $as_echo_n "checking whether struct stat has a st_flags field... " >&6; }
-if test "${e2fsprogs_cv_struct_st_flags+set}" = set; then :
+if ${e2fsprogs_cv_struct_st_flags+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -10916,7 +10989,7 @@ $as_echo "$e2fsprogs_cv_struct_st_flags" >&6; }
 if test "$e2fsprogs_cv_struct_st_flags" = yes; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether st_flags field is useful" >&5
 $as_echo_n "checking whether st_flags field is useful... " >&6; }
-  if test "${e2fsprogs_cv_struct_st_flags_immut+set}" = set; then :
+  if ${e2fsprogs_cv_struct_st_flags_immut+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -10949,7 +11022,7 @@ fi
 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/types.h>
         #include <sys/socket.h>
 "
-if test "x$ac_cv_member_struct_sockaddr_sa_len" = x""yes; then :
+if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
 
 cat >>confdefs.h <<_ACEOF
 #define HAVE_SA_LEN 1
@@ -10960,7 +11033,7 @@ fi
 if test -n "$BLKID_CMT"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing blkid_probe_all" >&5
 $as_echo_n "checking for library containing blkid_probe_all... " >&6; }
-if test "${ac_cv_search_blkid_probe_all+set}" = set; then :
+if ${ac_cv_search_blkid_probe_all+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_func_search_save_LIBS=$LIBS
@@ -10994,11 +11067,11 @@ for ac_lib in '' blkid; do
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext
-  if test "${ac_cv_search_blkid_probe_all+set}" = set; then :
+  if ${ac_cv_search_blkid_probe_all+:} false; then :
   break
 fi
 done
-if test "${ac_cv_search_blkid_probe_all+set}" = set; then :
+if ${ac_cv_search_blkid_probe_all+:} false; then :
 
 else
   ac_cv_search_blkid_probe_all=no
@@ -11019,8 +11092,7 @@ for ac_func in          __secure_getenv         backtrace       blkid_probe_get_topology        blkid_pro
 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"
-eval as_val=\$$as_ac_var
-   if test "x$as_val" = x""yes; then :
+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
@@ -11031,7 +11103,7 @@ done
 SOCKET_LIB=''
 { $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 :
+if ${ac_cv_lib_socket_socket+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -11065,14 +11137,133 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $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 :
+if test "x$ac_cv_lib_socket_socket" = xyes; then :
   SOCKET_LIB=-lsocket
 fi
 
 
+
+# Check whether --with-sqlite3 was given.
+if test "${with_sqlite3+set}" = set; then :
+  withval=$with_sqlite3; SQLITE3_LIBS="-L$with_sqlite3"
+fi
+
+
+if test x"$E2SCAN_CMT" == x; then
+
+CFLAGS_OLD=$CFLAGS
+SQLITE3_LIB=''
+CFLAGS="$CFLAGS_OLD $SQLITE3_LIBS -static -pthread"
+{ $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 ${ac_cv_lib_sqlite3_sqlite3_open+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsqlite3  $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 sqlite3_open ();
+int
+main ()
+{
+return sqlite3_open ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_sqlite3_sqlite3_open=yes
+else
+  ac_cv_lib_sqlite3_sqlite3_open=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_sqlite3_sqlite3_open" >&5
+$as_echo "$ac_cv_lib_sqlite3_sqlite3_open" >&6; }
+if test "x$ac_cv_lib_sqlite3_sqlite3_open" = xyes; then :
+
+       SQLITE3_LIB="$SQLITE3_LIBS -static -pthread -lsqlite3"
+
+$as_echo "#define HAVE_SQLITE3 1" >>confdefs.h
+
+
+fi
+
+
+if test x"$SQLITE3_LIB" == x; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no static sqlite3 - looking for dynamic one" >&5
+$as_echo "$as_me: WARNING: no static sqlite3 - looking for dynamic one" >&2;}
+       CFLAGS="$CFLAGS_OLD $SQLITE3_LIBS -pthread"
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqlite3_close in -lsqlite3" >&5
+$as_echo_n "checking for sqlite3_close in -lsqlite3... " >&6; }
+if ${ac_cv_lib_sqlite3_sqlite3_close+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsqlite3  $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 sqlite3_close ();
+int
+main ()
+{
+return sqlite3_close ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_sqlite3_sqlite3_close=yes
+else
+  ac_cv_lib_sqlite3_sqlite3_close=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_sqlite3_sqlite3_close" >&5
+$as_echo "$ac_cv_lib_sqlite3_sqlite3_close" >&6; }
+if test "x$ac_cv_lib_sqlite3_sqlite3_close" = xyes; then :
+
+               SQLITE3_LIB="$SQLITE3_LIBS -pthread -lsqlite3"
+
+$as_echo "#define HAVE_SQLITE3 1" >>confdefs.h
+
+
+fi
+
+fi
+
+
+CFLAGS=$CFLAGS_OLD
+
+if test x"$SQLITE3_LIB" == x; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no sqlite3 - e2scan will not support database based scanning" >&5
+$as_echo "$as_me: WARNING: no sqlite3 - e2scan will not support database based scanning" >&2;}
+fi
+
+fi
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for optreset" >&5
 $as_echo_n "checking for optreset... " >&6; }
-if test "${ac_cv_have_optreset+set}" = set; then :
+if ${ac_cv_have_optreset+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
 SEM_INIT_LIB=''
 ac_fn_c_check_func "$LINENO" "sem_init" "ac_cv_func_sem_init"
-if test "x$ac_cv_func_sem_init" = x""yes; then :
+if test "x$ac_cv_func_sem_init" = xyes; then :
 
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sem_init in -lpthread" >&5
 $as_echo_n "checking for sem_init in -lpthread... " >&6; }
-if test "${ac_cv_lib_pthread_sem_init+set}" = set; then :
+if ${ac_cv_lib_pthread_sem_init+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -11138,14 +11329,14 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_sem_init" >&5
 $as_echo "$ac_cv_lib_pthread_sem_init" >&6; }
-if test "x$ac_cv_lib_pthread_sem_init" = x""yes; then :
+if test "x$ac_cv_lib_pthread_sem_init" = xyes; then :
   $as_echo "#define HAVE_SEM_INIT 1" >>confdefs.h
 
        SEM_INIT_LIB=-lpthread
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sem_init in -lrt" >&5
 $as_echo_n "checking for sem_init in -lrt... " >&6; }
-if test "${ac_cv_lib_rt_sem_init+set}" = set; then :
+if ${ac_cv_lib_rt_sem_init+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -11179,14 +11370,14 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sem_init" >&5
 $as_echo "$ac_cv_lib_rt_sem_init" >&6; }
-if test "x$ac_cv_lib_rt_sem_init" = x""yes; then :
+if test "x$ac_cv_lib_rt_sem_init" = xyes; then :
   $as_echo "#define HAVE_SEM_INIT 1" >>confdefs.h
 
        SEM_INIT_LIB=-lrt
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sem_init in -lposix4" >&5
 $as_echo_n "checking for sem_init in -lposix4... " >&6; }
-if test "${ac_cv_lib_posix4_sem_init+set}" = set; then :
+if ${ac_cv_lib_posix4_sem_init+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -11220,7 +11411,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sem_init" >&5
 $as_echo "$ac_cv_lib_posix4_sem_init" >&6; }
-if test "x$ac_cv_lib_posix4_sem_init" = x""yes; then :
+if test "x$ac_cv_lib_posix4_sem_init" = xyes; then :
   $as_echo "#define HAVE_SEM_INIT 1" >>confdefs.h
 
        SEM_INIT_LIB=-lposix4
@@ -11342,7 +11533,7 @@ fi
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can link with -static" >&5
 $as_echo_n "checking whether we can link with -static... " >&6; }
-if test "${ac_cv_e2fsprogs_use_static+set}" = set; then :
+if ${ac_cv_e2fsprogs_use_static+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   SAVE_LDFLAGS=$LDFLAGS; LDFLAGS="$LDFLAGS -static"
@@ -11443,7 +11634,7 @@ for i in MCONFIG Makefile e2fsprogs.spec \
        lib/ss/ss.pc lib/uuid/uuid.pc lib/et/com_err.pc \
        lib/e2p/e2p.pc lib/blkid/blkid.pc lib/ext2fs/ext2fs.pc \
        misc/Makefile ext2ed/Makefile e2fsck/Makefile \
-       debugfs/Makefile tests/Makefile tests/progs/Makefile \
+       debugfs/Makefile e2scan/Makefile tests/Makefile tests/progs/Makefile \
        resize/Makefile doc/Makefile intl/Makefile \
        intl/libgnuintl.h po/Makefile.in ; do
        if test -d `dirname ${srcdir}/$i` ; then
@@ -11516,10 +11707,21 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&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" &&
+    if test "x$cache_file" != "x/dev/null"; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
 $as_echo "$as_me: updating cache $cache_file" >&6;}
-    cat confcache >$cache_file
+      if test ! -f "$cache_file" || test -h "$cache_file"; then
+       cat confcache >"$cache_file"
+      else
+        case $cache_file in #(
+        */* | ?:*)
+         mv -f confcache "$cache_file"$$ &&
+         mv -f "$cache_file"$$ "$cache_file" ;; #(
+        *)
+         mv -f confcache "$cache_file" ;;
+       esac
+      fi
+    fi
   else
     { $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;}
@@ -11535,6 +11737,7 @@ DEFS=-DHAVE_CONFIG_H
 
 ac_libobjs=
 ac_ltlibobjs=
+U=
 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
   # 1. Remove the extension, and $U if already installed.
   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
@@ -11551,7 +11754,7 @@ LTLIBOBJS=$ac_ltlibobjs
 
 
 
-: ${CONFIG_STATUS=./config.status}
+: "${CONFIG_STATUS=./config.status}"
 ac_write_fail=0
 ac_clean_files_save=$ac_clean_files
 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
@@ -11652,6 +11855,7 @@ fi
 IFS=" ""       $as_nl"
 
 # Find who we are.  Look in the path if we contain no directory separator.
+as_myself=
 case $0 in #((
   *[\\/]* ) as_myself=$0 ;;
   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -11697,19 +11901,19 @@ export LANGUAGE
 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
 
-# as_fn_error ERROR [LINENO LOG_FD]
-# ---------------------------------
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-# script with status $?, using 1 if that was 0.
+# script with STATUS, using 1 if that was 0.
 as_fn_error ()
 {
-  as_status=$?; test $as_status -eq 0 && as_status=1
-  if test "$3"; then
-    as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-    $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
+  as_status=$1; test $as_status -eq 0 && as_status=1
+  if test "$4"; then
+    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
   fi
-  $as_echo "$as_me: error: $1" >&2
+  $as_echo "$as_me: error: $2" >&2
   as_fn_exit $as_status
 } # as_fn_error
 
@@ -11847,16 +12051,16 @@ if (echo >conf$$.file) 2>/dev/null; then
     # ... but there are two gotchas:
     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
-    # In both cases, we have to default to `cp -p'.
+    # In both cases, we have to default to `cp -pR'.
     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
-      as_ln_s='cp -p'
+      as_ln_s='cp -pR'
   elif ln conf$$.file conf$$ 2>/dev/null; then
     as_ln_s=ln
   else
-    as_ln_s='cp -p'
+    as_ln_s='cp -pR'
   fi
 else
-  as_ln_s='cp -p'
+  as_ln_s='cp -pR'
 fi
 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
 rmdir conf$$.dir 2>/dev/null
@@ -11905,7 +12109,7 @@ $as_echo X"$as_dir" |
       test -d "$as_dir" && break
     done
     test -z "$as_dirs" || eval "mkdir $as_dirs"
-  } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
+  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
 
 
 } # as_fn_mkdir_p
@@ -11916,28 +12120,16 @@ else
   as_mkdir_p=false
 fi
 
-if test -x / >/dev/null 2>&1; then
-  as_test_x='test -x'
-else
-  if ls -dL / >/dev/null 2>&1; then
-    as_ls_L_option=L
-  else
-    as_ls_L_option=
-  fi
-  as_test_x='
-    eval sh -c '\''
-      if test -d "$1"; then
-       test -d "$1/.";
-      else
-       case $1 in #(
-       -*)set "./$1";;
-       esac;
-       case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
-       ???[sx]*):;;*)false;;esac;fi
-    '\'' sh
-  '
-fi
-as_executable_p=$as_test_x
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+  test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
 
 # Sed expression to map a string onto a valid CPP name.
 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -11959,7 +12151,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # values after options handling.
 ac_log="
 This file was extended by $as_me, which was
-generated by GNU Autoconf 2.65.  Invocation command line was
+generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
   CONFIG_HEADERS  = $CONFIG_HEADERS
@@ -12025,10 +12217,10 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
 config.status
-configured by $0, generated by GNU Autoconf 2.65,
+configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
-Copyright (C) 2009 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
 This config.status script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it."
 
@@ -12045,11 +12237,16 @@ ac_need_defaults=:
 while test $# != 0
 do
   case $1 in
-  --*=*)
+  --*=?*)
     ac_option=`expr "X$1" : 'X\([^=]*\)='`
     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
     ac_shift=:
     ;;
+  --*=)
+    ac_option=`expr "X$1" : 'X\([^=]*\)='`
+    ac_optarg=
+    ac_shift=:
+    ;;
   *)
     ac_option=$1
     ac_optarg=$2
@@ -12071,6 +12268,7 @@ do
     $ac_shift
     case $ac_optarg in
     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    '') as_fn_error $? "missing file argument" ;;
     esac
     as_fn_append CONFIG_FILES " '$ac_optarg'"
     ac_need_defaults=false;;
@@ -12083,7 +12281,7 @@ do
     ac_need_defaults=false;;
   --he | --h)
     # Conflict between --help and --header
-    as_fn_error "ambiguous option: \`$1'
+    as_fn_error $? "ambiguous option: \`$1'
 Try \`$0 --help' for more information.";;
   --help | --hel | -h )
     $as_echo "$ac_cs_usage"; exit ;;
@@ -12092,7 +12290,7 @@ Try \`$0 --help' for more information.";;
     ac_cs_silent=: ;;
 
   # This is an error.
-  -*) as_fn_error "unrecognized option: \`$1'
+  -*) as_fn_error $? "unrecognized option: \`$1'
 Try \`$0 --help' for more information." ;;
 
   *) as_fn_append ac_config_targets " $1"
@@ -12112,7 +12310,7 @@ fi
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 if \$ac_cs_recheck; then
-  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
   shift
   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
   CONFIG_SHELL='$SHELL'
@@ -12156,7 +12354,7 @@ do
     "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
     "$outlist") CONFIG_FILES="$CONFIG_FILES $outlist" ;;
 
-  *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
   esac
 done
 
 # after its creation but before its name has been assigned to `$tmp'.
 $debug ||
 {
-  tmp=
+  tmp= ac_tmp=
   trap 'exit_status=$?
-  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
+  : "${ac_tmp:=$tmp}"
+  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
 ' 0
   trap 'as_fn_exit 1' 1 2 13 15
 }
@@ -12189,12 +12388,13 @@ $debug ||
 
 {
   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
-  test -n "$tmp" && test -d "$tmp"
+  test -d "$tmp"
 }  ||
 {
   tmp=./conf$$-$RANDOM
   (umask 077 && mkdir "$tmp")
-} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
 
 # Set up the scripts for CONFIG_FILES section.
 # No need to generate them if there are no CONFIG_FILES.
@@ -12228,24 +12428,24 @@ if test "x$ac_cr" = x; then
 fi
 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
-  ac_cs_awk_cr='\r'
+  ac_cs_awk_cr='\\r'
 else
   ac_cs_awk_cr=$ac_cr
 fi
 
-echo 'BEGIN {' >"$tmp/subs1.awk" &&
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
 _ACEOF
 
 # Create commands to substitute file output variables.
 {
   echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
-  echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
+  echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' &&
   echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
   echo "_ACAWK" &&
   echo "_ACEOF"
 } >conf$$files.sh &&
 . ./conf$$files.sh ||
-  as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
+  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
 rm -f conf$$files.sh
 
 {
@@ -12253,18 +12453,18 @@ rm -f conf$$files.sh
   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
   echo "_ACEOF"
 } >conf$$subs.sh ||
-  as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
-ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
+  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
 ac_delim='%!_!# '
 for ac_last_try in false false false false false :; do
   . ./conf$$subs.sh ||
-    as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
+    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
 
   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
   if test $ac_delim_n = $ac_delim_num; then
     break
   elif $ac_last_try; then
-    as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
+    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
   else
     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
   fi
@@ -12272,7 +12472,7 @@ done
 rm -f conf$$subs.sh
 
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
 _ACEOF
 sed -n '
 h
@@ -12320,7 +12520,7 @@ t delim
 rm -f conf$$subs.awk
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 _ACAWK
-cat >>"\$tmp/subs1.awk" <<_ACAWK &&
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
   for (key in S) S_is_set[key] = 1
   FS = "\a"
   \$ac_cs_awk_pipe_init
@@ -12358,21 +12558,29 @@ if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
 else
   cat
-fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
-  || as_fn_error "could not setup config files machinery" "$LINENO" 5
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
+  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
 _ACEOF
 
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
 # trailing colons and then remove the whole line if VPATH becomes empty
 # (actually we leave an empty line to preserve line numbers).
 if test "x$srcdir" = x.; then
-  ac_vpsub='/^[         ]*VPATH[        ]*=/{
-s/:*\$(srcdir):*/:/
-s/:*\${srcdir}:*/:/
-s/:*@srcdir@:*/:/
-s/^\([^=]*=[    ]*\):*/\1/
+  ac_vpsub='/^[         ]*VPATH[        ]*=[    ]*/{
+h
+s///
+s/^/:/
+s/[     ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
 s/:*$//
+x
+s/\(=[  ]*\).*/\1/
+G
+s/\n//
 s/^[^=]*=[      ]*$//
 }'
 fi
@@ -12384,7 +12592,7 @@ fi # test -n "$CONFIG_FILES"
 # No need to generate them if there are no CONFIG_HEADERS.
 # This happens for instance with `./config.status Makefile'.
 if test -n "$CONFIG_HEADERS"; then
-cat >"$tmp/defines.awk" <<\_ACAWK ||
+cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
 BEGIN {
 _ACEOF
 
@@ -12396,11 +12604,11 @@ _ACEOF
 # handling of long lines.
 ac_delim='%!_!# '
 for ac_last_try in false false :; do
-  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
-  if test -z "$ac_t"; then
+  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
+  if test -z "$ac_tt"; then
     break
   elif $ac_last_try; then
-    as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
+    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
   else
     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
   fi
@@ -12485,7 +12693,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 _ACAWK
 _ACEOF
 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-  as_fn_error "could not setup config headers machinery" "$LINENO" 5
+  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
 fi # test -n "$CONFIG_HEADERS"
 
 
@@ -12498,7 +12706,7 @@ do
   esac
   case $ac_mode$ac_tag in
   :[FHL]*:*);;
-  :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
+  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
   :[FH]-) ac_tag=-:-;;
   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
   esac
@@ -12517,7 +12725,7 @@ do
     for ac_f
     do
       case $ac_f in
-      -) ac_f="$tmp/stdin";;
+      -) ac_f="$ac_tmp/stdin";;
       *) # Look for the file first in the build tree, then in the source tree
         # (if the path is not absolute).  The absolute path cannot be DOS-style,
         # because $ac_f cannot contain `:'.
@@ -12526,7 +12734,7 @@ do
           [\\/$]*) false;;
           *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
           esac ||
-          as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+          as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
       esac
       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
       as_fn_append ac_file_inputs " '$ac_f'"
@@ -12552,8 +12760,8 @@ $as_echo "$as_me: creating $ac_file" >&6;}
     esac
 
     case $ac_tag in
-    *:-:* | *:-) cat >"$tmp/stdin" \
-      || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
+    *:-:* | *:-) cat >"$ac_tmp/stdin" \
+      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
     esac
     ;;
   esac
@@ -12685,26 +12893,27 @@ $ac_datarootdir_hack
 "
 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
 if $ac_cs_awk_getline; then
-  $AWK -f "$tmp/subs.awk"
+  $AWK -f "$ac_tmp/subs.awk"
 else
-  $AWK -f "$tmp/subs.awk" | $SHELL
-fi >$tmp/out \
-  || as_fn_error "could not create $ac_file" "$LINENO" 5
+  $AWK -f "$ac_tmp/subs.awk" | $SHELL
+fi \
+  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
 
 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
-  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
-  { ac_out=`sed -n '/^[         ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
+  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+  { ac_out=`sed -n '/^[         ]*datarootdir[  ]*:*=/p' \
+      "$ac_tmp/out"`; test -z "$ac_out"; } &&
   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined.  Please make sure it is defined." >&5
+which seems to be undefined.  Please make sure it is defined" >&5
 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined.  Please make sure it is defined." >&2;}
+which seems to be undefined.  Please make sure it is defined" >&2;}
 
-  rm -f "$tmp/stdin"
+  rm -f "$ac_tmp/stdin"
   case $ac_file in
-  -) cat "$tmp/out" && rm -f "$tmp/out";;
-  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
+  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
   esac \
-  || as_fn_error "could not create $ac_file" "$LINENO" 5
+  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
  ;;
   :H)
   #
@@ -12713,21 +12922,21 @@ which seems to be undefined.  Please make sure it is defined." >&2;}
   if test x"$ac_file" != x-; then
     {
       $as_echo "/* $configure_input  */" \
-      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
-    } >"$tmp/config.h" \
-      || as_fn_error "could not create $ac_file" "$LINENO" 5
-    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
+      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
+    } >"$ac_tmp/config.h" \
+      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
 $as_echo "$as_me: $ac_file is unchanged" >&6;}
     else
       rm -f "$ac_file"
-      mv "$tmp/config.h" "$ac_file" \
-       || as_fn_error "could not create $ac_file" "$LINENO" 5
+      mv "$ac_tmp/config.h" "$ac_file" \
+       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
     fi
   else
     $as_echo "/* $configure_input  */" \
-      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
-      || as_fn_error "could not create -" "$LINENO" 5
+      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
+      || as_fn_error $? "could not create -" "$LINENO" 5
   fi
  ;;
 
@@ -12857,7 +13066,7 @@ _ACEOF
 ac_clean_files=$ac_clean_files_save
 
 test $ac_write_fail = 0 ||
-  as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
+  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
 
 
 # configure is writing to config.log, and then calls config.status.
@@ -12878,7 +13087,7 @@ if test "$no_create" != yes; then
   exec 5>>config.log
   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
   # would make configure fail if this is the last instruction.
-  $ac_cs_success || as_fn_exit $?
+  $ac_cs_success || as_fn_exit 1
 fi
 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
index 1726bee..05cfbdf 100644 (file)
@@ -636,6 +636,28 @@ DEBUGFS_CMT=
 )
 AC_SUBST(DEBUGFS_CMT)
 dnl
+dnl handle --enable-e2scan
+dnl
+AC_ARG_ENABLE([e2scan],
+[  --disable-e2scan      disable support of e2scan program],
+if test "$enableval" = "no"
+then
+       echo "Disabling e2scan support"
+       E2SCAN_CMT="#"
+       E2SCAN_MAN='.\"'
+else
+       E2SCAN_CMT=
+       E2SCAN_MAN=
+       echo "Enabling e2scan support"
+fi
+,
+echo "Enabling e2scan support by default"
+E2SCAN_CMT=
+E2SCAN_MAN=
+)
+AC_SUBST(E2SCAN_CMT)
+AC_SUBST(E2SCAN_MAN)
+dnl
 dnl handle --enable-imager
 dnl
 AC_ARG_ENABLE([imager],
@@ -910,6 +932,10 @@ AC_CHECK_HEADERS(net/if.h,,,
 #include <sys/socket.h>
 #endif
 ]])
+dnl do not check sqlite3.h if e2scan is disabled
+if test x"$E2SCAN_CMT" == x; then
+AC_CHECK_HEADERS(sqlite3.h)
+fi
 AC_FUNC_VPRINTF
 dnl Check to see if dirent has member d_reclen. On cygwin those d_reclen
 dnl is not decleared.
@@ -1099,6 +1125,53 @@ SOCKET_LIB=''
 AC_CHECK_LIB(socket, socket, [SOCKET_LIB=-lsocket])
 AC_SUBST(SOCKET_LIB)
 dnl
+dnl
+dnl Check to see if static sqlite exists
+dnl
+AC_ARG_WITH(
+       [sqlite3],
+       [  --with-sqlite3=DIR      location of sqlite3 library (default /usr/lib)],
+       [SQLITE3_LIBS="-L$with_sqlite3"],,
+       [SQLITE3_LIBS="-L/usr/lib64 -L/usr/lib"])
+
+dnl do not check sqlite3 library if e2scan is disabled
+if test x"$E2SCAN_CMT" == x; then
+
+CFLAGS_OLD=$CFLAGS
+SQLITE3_LIB=''
+dnl
+dnl check static sqlite3 first
+dnl
+CFLAGS="$CFLAGS_OLD $SQLITE3_LIBS -static -pthread"
+AC_CHECK_LIB(sqlite3, sqlite3_open,
+       [
+       SQLITE3_LIB="$SQLITE3_LIBS -static -pthread -lsqlite3"
+       AC_DEFINE(HAVE_SQLITE3, 1, [Define to 1 if SQLite library is present])
+       ])
+
+if test x"$SQLITE3_LIB" == x; then
+dnl
+dnl static sqlite3 is not found, check dynamic sqlite3
+dnl
+       AC_MSG_WARN(no static sqlite3 - looking for dynamic one)
+       CFLAGS="$CFLAGS_OLD $SQLITE3_LIBS -pthread"
+       AC_CHECK_LIB(sqlite3, sqlite3_close,
+               [
+               SQLITE3_LIB="$SQLITE3_LIBS -pthread -lsqlite3"
+               AC_DEFINE(HAVE_SQLITE3, 1, [Define to 1 if SQLite library is present])
+               ])
+fi
+
+AC_SUBST(SQLITE3_LIB)
+CFLAGS=$CFLAGS_OLD
+
+if test x"$SQLITE3_LIB" == x; then
+       AC_MSG_WARN(no sqlite3 - e2scan will not support database based scanning)
+fi
+
+fi
+
+dnl
 dnl See if optreset exists
 dnl
 AC_MSG_CHECKING(for optreset)
@@ -1338,7 +1411,7 @@ for i in MCONFIG Makefile e2fsprogs.spec \
        lib/ss/ss.pc lib/uuid/uuid.pc lib/et/com_err.pc \
        lib/e2p/e2p.pc lib/blkid/blkid.pc lib/ext2fs/ext2fs.pc \
        misc/Makefile ext2ed/Makefile e2fsck/Makefile \
-       debugfs/Makefile tests/Makefile tests/progs/Makefile \
+       debugfs/Makefile e2scan/Makefile tests/Makefile tests/progs/Makefile \
        resize/Makefile doc/Makefile intl/Makefile \
        intl/libgnuintl.h po/Makefile.in ; do
        if test -d `dirname ${srcdir}/$i` ; then
index e886558..d0e6366 100644 (file)
@@ -234,6 +234,7 @@ exit 0
 %{_root_sbindir}/mkfs.ext4dev
 %{_root_sbindir}/resize2fs
 %{_root_sbindir}/tune2fs
+@E2SCAN_CMT@%{_sbindir}/e2scan
 %{_sbindir}/filefrag
 %{_sbindir}/e2freefrag
 %{_sbindir}/mklost+found
@@ -261,6 +262,7 @@ exit 0
 %{_mandir}/man8/fsck.ext4dev.8*
 %{_mandir}/man8/e2image.8*
 %{_mandir}/man8/e2label.8*
+@E2SCAN_CMT@%{_mandir}/man8/e2scan.8*
 %{_mandir}/man8/e2undo.8*
 %{_mandir}/man8/logsave.8*
 %{_mandir}/man8/mke2fs.8*
index 984ae98..5bcd218 100644 (file)
@@ -240,6 +240,7 @@ rm -rf $RPM_BUILD_ROOT
 /usr/sbin/mklost+found
 /usr/sbin/filefrag
 /usr/sbin/e2freefrag
+@E2SCAN_CMT@/usr/sbin/e2scan
 %{_infodir}/libext2fs.info.gz
 %{_mandir}/man1/chattr.1.gz
 %{_mandir}/man1/lsattr.1.gz
index 1cd014f..6da63f6 100644 (file)
@@ -142,6 +142,7 @@ exit 0
 %{_root_sbindir}/mkfs.ext4dev
 %{_root_sbindir}/resize2fs
 %{_root_sbindir}/tune2fs
+@E2SCAN_CMT@%{_sbindir}/e2scan
 %{_sbindir}/filefrag
 %{_sbindir}/mklost+found
 %{_sbindir}/e2freefrag
@@ -180,6 +181,7 @@ exit 0
 %{_mandir}/man8/fsck.ext4dev.8*
 %{_mandir}/man8/e2image.8*
 %{_mandir}/man8/e2label.8*
+@E2SCAN_CMT@%{_mandir}/man8/e2scan.8*
 %{_mandir}/man8/e2undo.8*
 %{_mandir}/man8/fsck.8*
 %{_mandir}/man8/logsave.8*
diff --git a/e2scan/Makefile.in b/e2scan/Makefile.in
new file mode 100644 (file)
index 0000000..68bebf2
--- /dev/null
@@ -0,0 +1,112 @@
+#
+# Standard e2fsprogs prologue....
+#
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+top_builddir = ..
+my_dir = e2scan
+INSTALL = @INSTALL@
+SQLITE3_LIB = @SQLITE3_LIB@
+
+@MCONFIG@
+
+PROGS=         e2scan
+MANPAGES=      e2scan.8
+
+MK_CMDS=       _SS_DIR_OVERRIDE=../lib/ss ../lib/ss/mk_cmds
+
+E2SCAN_OBJS=e2scan.o db.o filelist.o
+
+SRCS=$(srcdir)/e2scan.c $(srcdir)/filelist.c $(srcdir)/db.c
+
+LIBS=$(LIBEXT2FS) $(LIBE2P) $(LIBCOM_ERR) $(LIBBLKID) \
+       $(LIBUUID) $(SQLITE3_LIB)
+DEPLIBS=$(LIBEXT2FS) $(LIBE2P) $(LIBCOM_ERR) $(DEPLIBBLKID) \
+       $(DEPLIBUUID)
+
+STATIC_LIBS=$(LIBEXT2FS) $(LIBE2P) $(LIBCOM_ERR) $(LIBBLKID) \
+       $(LIBUUID) $(SQLITE3_LIB)
+STATIC_DEPLIBS=$(LIBEXT2FS) $(LIBE2P) $(LIBCOM_ERR) \
+       $(DEPLIBBLKID) $(DEPLIBUUID)
+
+.c.o:
+       $(E) "  CC $<"
+       $(Q) $(CC) -c $(ALL_CFLAGS) $< -o $@
+       $(Q) $(CHECK_CMD) $(ALL_CFLAGS) $<
+
+all:: $(PROGS) $(MANPAGES)
+
+e2scan: $(E2SCAN_OBJS) $(DEPLIBS)
+       $(E) "  LD $@"
+       $(Q) $(CC) $(ALL_LDFLAGS) -o e2scan $(E2SCAN_OBJS) $(LIBS)
+
+e2scan.static: $(E2SCAN_OBJS) $(STATIC_DEPLIBS)
+       $(E) "  LD $@"
+       $(Q) $(CC) $(LDFLAGS_STATIC) -o e2scan $(E2SCAN_OBJS) \
+               $(STATIC_LIBS)
+
+e2scan.8: $(DEP_SUBSTITUTE) $(srcdir)/e2scan.8.in
+       $(E) "  SUBST $@"
+       $(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/e2scan.8.in e2scan.8
+
+installdirs:
+       $(E) "  MKINSTALLDIRS $(sbindir) $(man8dir)"
+       $(Q) $(MKINSTALLDIRS) $(DESTDIR)$(sbindir) $(DESTDIR)$(man8dir)
+
+install: $(PROGS) $(MANPAGES) installdirs
+       $(Q) for i in $(PROGS); do \
+               $(E) "  INSTALL $(sbindir)/$$i"; \
+               $(INSTALL_PROGRAM) $$i $(DESTDIR)$(sbindir)/$$i; \
+       done
+       $(Q) for i in $(MANPAGES); do \
+               for j in $(COMPRESS_EXT); do \
+                       $(RM) -f $(DESTDIR)$(man8dir)/$$i.$$j; \
+               done; \
+               $(E) "  INSTALL_DATA $(man8dir)/$$i"; \
+               $(INSTALL_DATA) $$i $(DESTDIR)$(man8dir)/$$i; \
+       done
+
+install-strip: install
+       $(Q) for i in $(PROGS); do \
+               $(E) "  STRIP $(sbindir)/$$i"; \
+               $(STRIP) $(DESTDIR)$(sbindir)/$$i; \
+       done
+
+uninstall:
+       for i in $(PROGS); do \
+               $(RM) -f $(DESTDIR)$(sbindir)/$$i; \
+       done
+       for i in $(MANPAGES); do \
+               $(RM) -f $(DESTDIR)$(man8dir)/$$i; \
+       done
+
+clean::
+       $(RM) -f $(PROGS) e2scan.8 \#* *.s *.o *.a *~ core out
+
+mostlyclean: clean
+distclean: clean
+       $(RM) -f debug_cmds.c .depend Makefile $(srcdir)/TAGS \
+               $(srcdir)/Makefile.in.old
+
+# +++ Dependency line eater +++
+#
+# Makefile dependencies follow.  This must be the last section in
+# the Makefile.in file
+#
+filelist.o: $(srcdir)/filelist.c $(top_srcdir)/lib/ext2fs/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_srcdir)/lib/et/com_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h
+db.o: $(srcdir)/db.c $(top_srcdir)/lib/ext2fs/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_srcdir)/lib/et/com_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_srcdir)/lib/ext2fs/bitops.h
+e2scan.o: $(srcdir)/e2scan.c \
+ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
+ $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
+ $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
+ $(top_builddir)/lib/ext2fs/ext2_err.h $(top_srcdir)/lib/ext2fs/bitops.h
diff --git a/e2scan/db.c b/e2scan/db.c
new file mode 100644 (file)
index 0000000..49c6d41
--- /dev/null
@@ -0,0 +1,280 @@
+/*
+ * db.c
+ *
+ * Copyright (c) 2007, 2010 Oracle and/or its affiliates. All rights reserved.
+ * Use is subject to license terms.
+ *
+ * Author: Vladimir Saviliev <vladimir.saviliev@sun.com>
+ *         Andreas Dilger <adilger@sun.com>
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the
+ * GNU General Public License version 2.
+ * %End-Header%
+ */
+#define _GNU_SOURCE
+#define _FILE_OFFSET_BITS 64
+
+#include "config.h"
+#include <stdio.h>
+#include <time.h>
+#include <unistd.h>
+#include <ext2fs/ext2fs.h>
+#include <sys/stat.h>
+
+#if defined(HAVE_SQLITE3) && defined(HAVE_SQLITE3_H)
+
+#include <sqlite3.h>
+
+/* e2scan.c */
+extern ext2_filsys fs;
+extern struct {
+       int mode;
+       int nr;
+       union {
+               struct {
+                       int fd;
+                       int nr_commands;
+               } db;
+               struct {
+                       /* number of files newer than specified time */
+                       ext2_ino_t nr_files;
+                       /* number of files reported */
+                       ext2_ino_t nr_reported;
+                       time_t mtimestamp;
+                       time_t ctimestamp;
+               } fl;
+       };
+} scan_data;
+
+int block_iterate_cb(ext2_filsys fs, blk_t  *block_nr,
+                    e2_blkcnt_t blockcnt,
+                    blk_t ref_block EXT2FS_ATTR((unused)),
+                    int ref_offset EXT2FS_ATTR((unused)),
+                    void *priv_data);
+
+
+static long count = 10000;
+
+static void exec_one_sql_noreturn(sqlite3 *db, char *sqls)
+{
+       char *errmsg = NULL;
+
+       if (sqlite3_exec(db, sqls, NULL, NULL, &errmsg) != SQLITE_OK) {
+               fprintf(stderr, "SQL error: %s;\nrequest: %s", errmsg, sqls);
+               sqlite3_free(errmsg);
+               exit(1);
+       }
+}
+
+static void create_sql_table(sqlite3 *db, const char *table_name,
+                            const char *columns)
+{
+       char *sqls;
+
+       if (asprintf(&sqls, "create table %s (%s)", table_name, columns) < 0) {
+               perror("asprintf failed");
+               exit(1);
+       }
+
+       exec_one_sql_noreturn(db, sqls);
+       free(sqls);
+}
+
+static void begin_one_transaction(sqlite3 *db)
+{
+       exec_one_sql_noreturn(db, "BEGIN;");
+}
+
+static void commit_one_transaction(sqlite3 *db)
+{
+       exec_one_sql_noreturn(db, "COMMIT;");
+}
+
+static void batch_one_transaction(sqlite3 *db)
+{
+       static long num = 0;
+
+       num ++;
+       if (num % count == 0) {
+               commit_one_transaction(db);
+               begin_one_transaction(db);
+       }
+       /* else do nothing */
+}
+
+#define COLUMNS "ino, generation, parent, name, size, mtime, ctime, dtime"
+
+static void create_full_db(const char *name, int fd)
+{
+       sqlite3 *db;
+       int rd;
+       int nr;
+       char sqls[512];
+
+       if (sqlite3_open(name, &db) != SQLITE_OK) {
+               fprintf(stderr, "failed to sqlite3_open: %s\n", name);
+               sqlite3_close(db);
+               exit(1);
+       }
+       create_sql_table(db, "dirs", COLUMNS);
+       create_sql_table(db, "files", COLUMNS);
+
+       begin_one_transaction(db);
+
+       nr = 0;
+       while (1) {
+               rd = read(fd, sqls, 512);
+               if (rd == -1) {
+                       perror("read failed\n");
+                       exit(1);
+               }
+               if (rd != 512)
+                       break;
+               nr ++;
+               exec_one_sql_noreturn(db, sqls);
+               batch_one_transaction(db);
+       }
+       commit_one_transaction(db);
+       printf("database is created, %d records are inserted\n", nr);
+       sqlite3_close(db);
+}
+
+/* write sql command to pipe */
+#define PIPECMDLEN 512
+static void write_sql_command(int fd, const char *sqls)
+{
+       char buf[PIPECMDLEN];
+
+       if (strlen(sqls) + 1 > PIPECMDLEN) {
+               fprintf(stderr, "too long command");
+               exit(1);
+       }
+       strcpy(buf, sqls);
+       if (write(fd, buf, PIPECMDLEN) != PIPECMDLEN) {
+               perror("failed to write to pipe");
+               exit(1);
+       }
+       scan_data.db.nr_commands ++;
+}
+
+pid_t fork_db_creation(const char *database)
+{
+       int p[2];
+       struct stat st;
+       pid_t pid;
+
+       if (stat(database, &st) == 0) {
+               fprintf(stderr, "%s exists. remove it first\n", database);
+               exit(1);
+       }
+       if (pipe(p) == -1) {
+               fprintf(stderr, "failed to pipe");
+               exit(1);
+       }
+
+       pid = fork();
+       if (pid == (pid_t)-1) {
+               fprintf(stderr, "failed to fork");
+               exit(1);
+       }
+       if (pid == (pid_t)0) {
+               /* child, read data written by parent and write to
+                * database */
+               close(p[1]);
+               create_full_db(database, p[0]);
+               close(p[0]);
+               exit(0);
+       }
+
+       /* parent, read inodes and write them to pipe */
+       close(p[0]);
+       scan_data.db.fd = p[1];
+       return pid;
+}
+
+void database_iscan_action(ext2_ino_t ino, struct ext2_inode *inode,
+                          int fd, char *buf)
+{
+       char *sqls;
+
+       if (LINUX_S_ISDIR(inode->i_mode)) {
+               if (ino == EXT2_ROOT_INO) {
+                       sqls = sqlite3_mprintf("%s (%u,%u,%u,'%q',%u,%u,%u,%u)",
+                                              "insert into dirs values",
+                                              ino, inode->i_generation, ino, "/",
+                                              inode->i_size, inode->i_mtime,
+                                              inode->i_ctime, inode->i_dtime);
+                       write_sql_command(fd, sqls);
+                       sqlite3_free(sqls);
+               }
+
+               if (ext2fs_block_iterate2(fs, ino, 0, buf,
+                                         block_iterate_cb, &ino)) {
+                       fprintf(stderr, "ext2fs_block_iterate2 failed\n");
+                       exit(1);
+               }
+       }
+}
+
+/*
+ * callback for ext2fs_dblist_dir_iterate to be called for each
+ * directory entry
+ */
+int database_dblist_iterate_cb(ext2_ino_t dir, struct ext2_dir_entry *dirent,
+                              int namelen, int fd)
+{
+       struct ext2_inode inode;
+       char *table;
+       char *sqls;
+       errcode_t retval;
+       char str[256];
+
+       if (!ext2fs_fast_test_inode_bitmap2(fs->inode_map, dirent->inode))
+               /* entry of deleted file? can that ever happen */
+               return 0;
+
+       retval = ext2fs_read_inode(fs, dirent->inode, &inode);
+       if (retval) {
+               com_err("ext2fs_read_inode", retval, "while reading inode");
+               exit(1);
+       }
+
+       if (LINUX_S_ISDIR(inode.i_mode))
+               table = "dirs";
+       else
+               table = "files";
+
+       sprintf(str, "%.*s", namelen, dirent->name);
+       sqls = sqlite3_mprintf("%s %s %s (%u,%u,%u,'%q',%u,%u,%u,%u)",
+                              "insert into", table, "values",
+                              dirent->inode, inode.i_generation, dir,
+                              str,
+                              inode.i_size, inode.i_mtime,
+                              inode.i_ctime, inode.i_dtime);
+       write_sql_command(fd, sqls);
+       sqlite3_free(sqls);
+
+       return 0;
+}
+
+#else
+
+pid_t fork_db_creation(const char *database)
+{
+       return 0;
+}
+
+void database_iscan_action(ext2_ino_t ino, struct ext2_inode *inode,
+                          int fd, char *buf)
+{
+       return;
+}
+
+int database_dblist_iterate_cb(ext2_ino_t dir, struct ext2_dir_entry *dirent,
+                              int namelen, int fd)
+{
+       return 0;
+}
+
+#endif
diff --git a/e2scan/e2scan.8.in b/e2scan/e2scan.8.in
new file mode 100644 (file)
index 0000000..20ec93f
--- /dev/null
@@ -0,0 +1,116 @@
+.TH e2scan 1 "2006 Sep 26" Lustre "backup utilities"
+.SH NAME
+e2scan \- scan an Ext2-type filesystem for modified inodes
+.SH SYNOPSIS
+.br
+.B e2scan
+@E2SCAN_MAN@{
+.B -l
+@E2SCAN_MAN@|
+@E2SCAN_MAN@.B -f
+@E2SCAN_MAN@}
+[
+.BI -a " groups"
+] [
+.BI -b " blocks"
+] [
+.BI -C " chdir"
+] [
+@E2SCAN_MAN@.BI -d " database"
+@E2SCAN_MAN@] [
+.BI -n " filename"
+] [
+.BI -N " date"
+] [
+.BI -o " outfile"
+]
+.I device
+.br
+.SH DESCRIPTION
+.BR e2scan ,
+iterates all inodes on
+.IR device ,
+find inodes modified since the specified time (default 1 day), and prints
+their pathnames relative to the root of the filesystem.  This allows the
+pathnames to be used as input to a backup tool running in the mountpoint, like
+.BR "tar \-C" ,
+as the filesystem may be mounted at an arbitrary mountpoint.
+
+The
+.B e2scan
+program is optimized for scanning an entire filesystem for (modified) files,
+but is not efficient for smaller subdirectory scans.  Use
+.BR find (1)
+for that purpose instead.
+.SH OPTIONS
+.TP
+.BI \-a " groups"
+Set readahead for inode table blocks to get better performance when scanning
+.IR device .
+Default is 1 group of readahead.
+.TP
+.BI \-b " inode_buffer_blocks"
+Set number of inode blocks to read from disk at a time.
+.TP
+.BI \-C " directory"
+Specify the working directory (relative to the root of the filesystem
+being scanned) for the output pathnames.  Only directories underneath
+the root will be candidates for listing.  For Lustre MDT filesystems the
+pathname must be prefixed with "/ROOT" to dump the client visible filesystem.
+@E2SCAN_MAN@.TP
+@E2SCAN_MAN@.BI \-d " database_file"
+@E2SCAN_MAN@Specify output file for database when running in
+@E2SCAN_MAN@.B \-f
+@E2SCAN_MAN@mode.
+.TP
+.B \-D
+Also include directories in the output.  The default is to only list files,
+because tools like
+.BR tar (1)
+will recurse into directories and files that are also listed therein will be
+backed up twice.
+@E2SCAN_MAN@.TP
+@E2SCAN_MAN@.B \-f
+@E2SCAN_MAN@List files in the filesystem and insert them into the
+@E2SCAN_MAN@.BR sqlite3 (1)
+@E2SCAN_MAN@database named by the
+@E2SCAN_MAN@.B \-d
+@E2SCAN_MAN@option.
+.TP
+.B \-l
+List files in the filesystem to standard output, or to the file specified
+with the
+.B \-o
+option.  This is the default mode.
+.TP
+.BI \-n " filename"
+Dump only files newer than the specified
+.IR filename .
+.TP
+.BI \-N " date"
+Dump only files newer than the specified date.  This supports a wide
+variety of input formats like "YYYY-MM-DD HH:MM:SS".  Use a date of
+.R 0
+to dump all files.
+.TP
+.BI \-o " outfile"
+Record the files found into
+.I outfile
+instead of the default standard output.
+.SH EXAMPLES
+To dump all of the files in the filesystem into the file
+.IR myfilelist :
+.IP
+e2scan -N 0 -o myfilelist /dev/sdb1
+.PP
+To list files and directories newer than Feb 6, 2007 in the /home directory:
+.IP
+e2scan -D -N "Feb 6 00:00:00 2007" -C /home /dev/sdb1
+.PP
+.SH AUTHOR
+This version of
+.B e2scan
+was originally written by Vladimir Saviliev <vladimir.saviliev@sun.com>
+and Andreas Dilger <andreas.dilger@intel.com>.
+.SH SEE ALSO
+.BR find (1)
diff --git a/e2scan/e2scan.c b/e2scan/e2scan.c
new file mode 100644 (file)
index 0000000..36736b1
--- /dev/null
@@ -0,0 +1,655 @@
+/*
+ * e2scan.c --- Scan an ext2-type filesystem for modified inodes
+ *
+ * Copyright (c) 2007, 2010 Oracle and/or its affiliates. All rights reserved.
+ * Use is subject to license terms.
+ *
+ * Author: Vladimir Saviliev <vladimir.saviliev@sun.com>
+ *         Andreas Dilger <adilger@sun.com>
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the
+ * GNU General Public License version 2.
+ * %End-Header%
+ */
+#define _GNU_SOURCE
+#define _FILE_OFFSET_BITS 64
+#define _XOPEN_SOURCE          /* for getdate */
+#define _XOPEN_SOURCE_EXTENDED /* for getdate */
+
+#include "config.h"
+#include <stdio.h>
+#include <sys/stat.h>
+#include <time.h>
+#include <unistd.h>
+#include <ext2fs/ext2fs.h>
+#include <string.h>
+#include <limits.h>
+#include <sys/wait.h>
+#include <sys/errno.h>
+
+ext2_filsys fs;
+const char *database = "e2scan.db";
+int readahead_groups = 1; /* by default readahead one group inode table */
+FILE *outfile;
+
+void usage(char *prog)
+{
+       fprintf(stderr,
+#if defined(HAVE_SQLITE3) && defined(HAVE_SQLITE3_H)
+               "\nUsage: %s {-l | -f} [ options ] device-filename\nModes:"
+               "\t-f: create file database\n"
+#else
+               "\nUsage: %s -l [ options ] device-filename\nModes:"
+#endif
+               "\t-l: list recently changed files\n"
+               "Options:\n"
+               "\t-a groups: readahead 'groups' inode tables (default %d)\n"
+               "\t-b blocks: buffer 'blocks' inode table blocks\n"
+               "\t-C chdir: list files relative to 'chdir' in filesystem\n"
+               "\t-d database: output database filename (default %s)\n"
+               "\t-D: list not only files, but directories as well\n"
+               "\t-n filename: list files newer than 'filename'\n"
+               "\t-N date: list files newer than 'date' (default 1 day, "
+                                                        "0 for all files)\n"
+               "\t-o outfile: output file list to 'outfile'\n",
+               prog, readahead_groups, database);
+       exit(1);
+}
+
+#define SM_NONE 0
+#define SM_DATABASE 1 /* -f */
+#define SM_FILELIST 2 /* -l */
+
+struct {
+       int mode;
+       int nr;
+       union {
+               struct {
+                       int fd;
+                       int nr_commands;
+               } db;
+               struct {
+                       /* number of files newer than specified time */
+                       ext2_ino_t nr_files;
+                       ext2_ino_t nr_dirs;
+                       /* number of files reported */
+                       ext2_ino_t nr_reported;
+                       time_t mtimestamp;
+                       time_t ctimestamp;
+                       int with_dirs;
+               } fl;
+       };
+} scan_data = { .mode = SM_FILELIST, };
+
+/* db.c */
+pid_t fork_db_creation(const char *database);
+void database_iscan_action(ext2_ino_t ino,
+                          struct ext2_inode *inode, int fd, char *buf);
+int database_dblist_iterate_cb(ext2_ino_t dir, struct ext2_dir_entry *dirent,
+                              int namelen, int fd);
+
+/* filelist.c */
+void filelist_iscan_action(ext2_ino_t ino,
+                          struct ext2_inode *inode, char *buf);
+int filelist_dblist_iterate_cb(ext2_ino_t dirino,
+                              struct ext2_dir_entry *dirent,
+                              int namelen);
+int create_root_dentries(char *root);
+void report_root(void);
+
+
+static void get_timestamps(const char *filename)
+{
+       struct stat st;
+
+       if (stat(filename, &st) == -1) {
+               perror("failed to stat file");
+               exit(1);
+       }
+       scan_data.fl.mtimestamp = st.st_mtime;
+       scan_data.fl.ctimestamp = st.st_ctime;
+}
+
+/*
+ * callback for ext2fs_block_iterate2, it adds directory leaf blocks
+ * to dblist
+ */
+int block_iterate_cb(ext2_filsys fs, blk_t  *block_nr,
+                    e2_blkcnt_t blockcnt,
+                    blk_t ref_block EXT2FS_ATTR((unused)),
+                    int ref_offset EXT2FS_ATTR((unused)),
+                    void *priv_data)
+{
+       int ret;
+       ext2_ino_t *ino;
+
+       if ((int) blockcnt < 0)
+               /* skip indirect blocks */
+               return 0;
+       ret = 0;
+       ino = priv_data;
+       if (ext2fs_add_dir_block(fs->dblist, *ino, *block_nr, (int) blockcnt))
+               ret |= BLOCK_ABORT;
+
+       return ret;
+}
+
+/*
+ * done_group callback for inode scan.
+ * When i-th group of inodes is scanned over, readahead for i+2-th
+ * group is issued. Inode table readahead for two first groups is
+ * issued before scan begin.
+ */
+errcode_t done_group_callback(ext2_filsys fs, ext2_inode_scan scan,
+                             dgrp_t group, void *vp)
+{
+       dgrp_t ra_group;
+       blk64_t ra_start;
+       int ra_size;
+
+       if (readahead_groups <= 0)
+               return 0;
+
+       if (((group + 1) % readahead_groups) != 0)
+               return 0;
+
+       ra_group = group + 1 + readahead_groups;
+       if (ra_group >= fs->group_desc_count)
+               return 0;
+
+       ra_start = ext2fs_inode_table_loc(fs, ra_group);
+       if (ra_group + readahead_groups > fs->group_desc_count)
+               ra_size = fs->group_desc_count - ra_group;
+       else
+               ra_size = readahead_groups;
+
+       ra_size *= fs->inode_blocks_per_group;
+       io_channel_cache_readahead(fs->io, ra_start, ra_size);
+       return 0;
+}
+
+#define DEFAULT_CHUNK_SIZE 16
+__u32 chunk_size; /* in blocks */
+int nr_chunks;
+
+struct chunk {
+       __u64 start;
+       __u32 covered;
+       __u32 padding;
+} *cur_chunk, *ra_chunk, *chunks;
+
+/* callback for ext2fs_dblist_iterate */
+static int fill_chunks(ext2_filsys fs, struct ext2_db_entry *db_info,
+                      void *priv_data)
+{
+       __u32 cur;
+
+       cur = db_info->blk / chunk_size;
+       if (cur_chunk == NULL || cur != cur_chunk->start) {
+               /* new sweep starts */
+               if (cur_chunk == NULL)
+                       cur_chunk = chunks;
+               else
+                       cur_chunk++;
+
+               cur_chunk->start = cur;
+               cur_chunk->covered = 1;
+       } else
+               cur_chunk->covered++;
+
+       return 0;
+}
+
+/* callback for ext2fs_dblist_iterate */
+static int count_chunks(ext2_filsys fs, struct ext2_db_entry *db_info,
+                       void *priv_data)
+{
+       __u32 cur;
+       static __u32 prev = (__u32)-1;
+
+       cur = db_info->blk / chunk_size;
+       if (cur != prev) {
+               nr_chunks++;
+               prev = cur;
+       }
+       return 0;
+}
+
+/* create list of chunks, readahead two first of them */
+static void make_chunk_list(ext2_dblist dblist)
+{
+       chunk_size = readahead_groups * DEFAULT_CHUNK_SIZE;
+       if (chunk_size == 0)
+               return;
+
+       ext2fs_dblist_iterate(dblist, count_chunks, NULL);
+       chunks = malloc(sizeof(struct chunk) * nr_chunks);
+       if (chunks == NULL) {
+               fprintf(stderr, "malloc failed\n");
+               exit(1);
+       }
+       ext2fs_dblist_iterate(dblist, fill_chunks, NULL);
+
+       /* start readahead for two first chunks */
+       ra_chunk = chunks;
+       cur_chunk = NULL;
+
+       io_channel_cache_readahead(fs->io,
+                                  ra_chunk->start * chunk_size, chunk_size);
+       ra_chunk++;
+       if (ra_chunk < chunks + nr_chunks)
+               io_channel_cache_readahead(fs->io,
+                                          ra_chunk->start * chunk_size,
+                                          chunk_size);
+}
+
+/*
+ * this is called for each directory block when it is read by dblist
+ * iterator
+ */
+static int dblist_readahead(void *vp)
+{
+       if (chunk_size == 0)
+               return 0;
+       if (cur_chunk == NULL)
+               cur_chunk = chunks;
+       if (--cur_chunk->covered == 0) {
+               /*
+                * last block of current chunk is read, readahead
+                * chunk is under I/O, get new readahead chunk, move
+                * current chunk
+                */
+               cur_chunk++;
+               ra_chunk++;
+               if (ra_chunk < chunks + nr_chunks)
+                       io_channel_cache_readahead(fs->io,
+                                                  ra_chunk->start * chunk_size,
+                                                  chunk_size);
+       }
+       return 0;
+}
+
+/*
+ * callback for ext2fs_dblist_dir_iterate to be called for each
+ * directory entry, perform actions common for both database and
+ * filelist modes, call specific functions depending on the mode
+ */
+static int dblist_iterate_cb(ext2_ino_t dirino, int entry,
+                            struct ext2_dir_entry *dirent,
+                            int offset EXT2FS_ATTR((unused)),
+                            int blocksize EXT2FS_ATTR((unused)),
+                            char *buf EXT2FS_ATTR((unused)),
+                            void *private)
+{
+       int namelen;
+
+       if (offset == 0) {
+               /* new directory block is read */
+               scan_data.nr++;
+               dblist_readahead(NULL);
+       }
+
+       if (dirent->inode == 0)
+               return 0;
+
+       namelen = (dirent->name_len & 0xFF);
+       if (namelen == 2 && !strncmp(dirent->name, "..", 2))
+               return 0;
+
+       if (namelen == 1 && !strncmp(dirent->name, ".", 1))
+               return 0;
+
+       if (dirent->inode > fs->super->s_inodes_count) {
+               fprintf(stderr, "too big ino %u (%.*s)\n",
+                       dirent->inode, namelen, dirent->name);
+               exit(1);
+       }
+
+       if (scan_data.mode == SM_DATABASE)
+               return database_dblist_iterate_cb(dirino, dirent, namelen,
+                                                 scan_data.db.fd);
+
+       return filelist_dblist_iterate_cb(dirino, dirent, namelen);
+}
+
+int main(int argc, char **argv)
+{
+       char *root = "/";
+       int inode_buffer_blocks = 0;
+       errcode_t retval;
+       char *block_buf;
+       ext2_inode_scan scan;
+       struct ext2_inode inode;
+       ext2_ino_t ino;
+       dgrp_t nr;
+       time_t t;
+       pid_t pid = 0;
+       int c;
+
+       /*
+        * by default find for files which are modified less than one
+        * day ago
+        */
+       scan_data.fl.mtimestamp = time(NULL) - 60 * 60 * 24;
+       scan_data.fl.ctimestamp = scan_data.fl.mtimestamp;
+       outfile = stdout;
+
+       opterr = 0;
+#if defined(HAVE_SQLITE3) && defined(HAVE_SQLITE3_H)
+#define OPTF "f"
+#else
+#define OPTF ""
+#endif
+       while ((c = getopt(argc, argv, "a:b:C:d:D"OPTF"hln:N:o:")) != EOF) {
+               char *end;
+
+               switch (c) {
+               case 'a':
+                       if (optarg == NULL)
+                               usage(argv[0]);
+                       readahead_groups = strtoul(optarg, &end, 0);
+                       if (*end) {
+                               fprintf(stderr, "%s: bad -a argument '%s'\n",
+                                       argv[0], optarg);
+                               usage(argv[0]);
+                       }
+                       break;
+               case 'b':
+                       inode_buffer_blocks = strtoul(optarg, &end, 0);
+                       if (*end) {
+                               fprintf(stderr, "%s: bad -b argument '%s'\n",
+                                       argv[0], optarg);
+                               usage(argv[0]);
+                       }
+                       break;
+               case 'C':
+                       root = optarg;
+                       break;
+               case 'd':
+                       database = optarg;
+                       break;
+               case 'D':
+                       scan_data.fl.with_dirs = 1;
+                       break;
+               case 'f':
+#if !defined(HAVE_SQLITE3) || !defined(HAVE_SQLITE3_H)
+                       fprintf(stderr,
+                               "%s: sqlite3 was not detected on configure, "
+                               "database creation is not supported\n",argv[0]);
+                       return 1;
+#endif
+                       scan_data.mode = SM_DATABASE;
+                       break;
+               case 'l':
+                       scan_data.mode = SM_FILELIST;
+                       break;
+               case 'n':
+                       get_timestamps(optarg);
+                       break;
+               case 'N': {
+                       const char *fmts[] = {"%c", /*date/time current locale*/
+                                             "%Ec",/*date/time alt. locale*/
+                                             "%Y-%m-%d %H:%M:%S",
+                                             "%a %b %d, %Y %H:%M:%S",
+                                             "%a, %d %b %Y %H:%M:%S",
+                                             "%a %b %d %H:%M:%S %Z %Y",
+                                             "%a %b %d %H:%M:%S %Y",
+                                             "%b %d %H:%M:%S %Z %Y",
+                                             "%b %d %H:%M:%S %Y",
+                                             "%x %X",/*date time*/
+                                             "%Ex %EX",/*alternate date time*/
+                                             "%F", /*ISO 8601 date*/
+                                             "%+", /*`date` format*/
+                                             "%s", /*seconds since epoch */
+                                             NULL,
+                                           };
+                       const char **fmt;
+                       struct tm tmptm, *tm = NULL;
+                       time_t now = time(0);
+
+                       tmptm = *localtime(&now);
+
+                       for (fmt = &fmts[0]; *fmt != NULL; fmt++) {
+                               if (strptime(optarg, *fmt, &tmptm) != NULL) {
+                                       tm = &tmptm;
+                                       break;
+                               }
+                       }
+
+                       if (tm == NULL) {
+                               fprintf(stderr, "%s: bad -N argument '%s'\n",
+                                       argv[0], optarg);
+                               usage(argv[0]);
+                       }
+                       scan_data.fl.mtimestamp = mktime(tm);
+                       scan_data.fl.ctimestamp = scan_data.fl.mtimestamp;
+                       break;
+                       }
+               case 'o':
+                       outfile = fopen(optarg, "w");
+                       if (outfile == NULL) {
+                               fprintf(stderr, "%s: can't open '%s': %s\n",
+                                       argv[0], optarg, strerror(errno));
+                               usage(argv[0]);
+                       }
+                       break;
+               default:
+                       fprintf(stderr, "%s: unknown option '-%c'\n",
+                               argv[0], optopt);
+               case 'h':
+                       usage(argv[0]);
+               }
+       }
+
+       if (scan_data.mode == SM_NONE || argv[optind] == NULL)
+               usage(argv[0]);
+
+
+       fprintf(stderr, "generating list of files with\n"
+               "\tmtime newer than %s"
+               "\tctime newer than %s",
+               ctime(&scan_data.fl.mtimestamp),
+               ctime(&scan_data.fl.ctimestamp));
+
+       retval = ext2fs_open(argv[optind], EXT2_FLAG_SOFTSUPP_FEATURES,
+                            0, 0, unix_io_manager, &fs);
+       if (retval != 0) {
+               com_err("ext2fs_open", retval, "opening %s\n", argv[optind]);
+               return 1;
+       }
+
+       t = time(NULL);
+
+       for (nr = 0; nr < fs->group_desc_count; nr++)
+               io_channel_cache_readahead(fs->io,
+                                          ext2fs_inode_bitmap_loc(fs, nr), 1);
+       retval = ext2fs_read_inode_bitmap(fs);
+       if (retval) {
+               com_err("ext2fs_read_inode_bitmap", retval,
+                       "opening inode bitmap on %s\n", argv[optind]);
+               exit(1);
+       }
+       fprintf(stderr, "inode bitmap is read, %ld seconds\n", time(NULL) - t);
+
+
+       if (inode_buffer_blocks == 0)
+               inode_buffer_blocks = fs->inode_blocks_per_group;
+
+       retval = ext2fs_open_inode_scan(fs, inode_buffer_blocks, &scan);
+       if (retval) {
+               com_err("ext2fs_open_inode_scan", retval,
+                       "opening inode scan on %s\n", argv[optind]);
+               fprintf(stderr, "failed to open inode scan\n");
+               exit(1);
+       }
+       ext2fs_set_inode_callback(scan, done_group_callback, NULL);
+
+       retval = ext2fs_init_dblist(fs, NULL);
+       if (retval) {
+               com_err("ext2fs_init_dblist", retval,
+                       "initializing dblist\n");
+               exit(1);
+       }
+
+       block_buf = (char *)malloc(fs->blocksize * 3);
+       if (block_buf == NULL) {
+               fprintf(stderr, "%s: failed to allocate memory for block_buf\n",
+                       argv[0]);
+               exit(1);
+       }
+       memset(block_buf, 0, fs->blocksize * 3);
+
+       switch (scan_data.mode) {
+       case SM_DATABASE:
+               pid = fork_db_creation(database);
+               break;
+
+       case SM_FILELIST:
+               c = create_root_dentries(root);
+               if (c == ENOENT && strncmp(root, "/ROOT", 5) != 0) {
+                       /* Try again with prepending "/ROOT" */
+                       char newroot[PATH_MAX];
+                       if (snprintf(newroot, PATH_MAX, "/ROOT/%s", root) >=
+                           PATH_MAX) {
+                               fprintf(stderr, "%s: root path '%s' too long\n",
+                                       argv[0], root);
+                               exit(1);
+                       }
+                       if (create_root_dentries(newroot) == 0)
+                               c = 0;
+               }
+               if (c == ENOENT)
+                       fprintf(stderr,
+                               "%s: visible filesystem root '%s' not found\n",
+                               argv[0], root);
+               else if (c == EIO)
+                       fprintf(stderr,
+                               "%s: error reading visible root: '%s'\n",
+                               argv[0], root);
+               else if (c == ENOTDIR)
+                       fprintf(stderr,
+                              "%s: visible root '%s' not a directory\n",
+                              argv[0], root);
+               if (c)
+                       exit(1);
+               break;
+       default:
+               break;
+       }
+
+       t = time(NULL);
+       fprintf(stderr, "scanning inode tables .. ");
+       scan_data.nr = 0;
+
+       done_group_callback(fs, scan, -readahead_groups * 2, NULL);
+       done_group_callback(fs, scan, -readahead_groups, NULL);
+       while (ext2fs_get_next_inode(scan, &ino, &inode) == 0) {
+               if (ino == 0)
+                       break;
+
+               scan_data.nr++;
+               if (ext2fs_fast_test_inode_bitmap2(fs->inode_map, ino) == 0)
+                       /* deleted - always skip for now */
+                       continue;
+               switch (scan_data.mode) {
+               case SM_DATABASE:
+                       database_iscan_action(ino, &inode, scan_data.db.fd,
+                                             block_buf);
+                       break;
+
+               case SM_FILELIST:
+                       filelist_iscan_action(ino, &inode, block_buf);
+                       break;
+
+               default:
+                       break;
+               }
+       }
+
+       switch (scan_data.mode) {
+       case SM_DATABASE:
+               fprintf(stderr,
+                       "done\n\t%d inodes, %ld seconds\n",
+                       scan_data.nr, time(NULL) - t);
+               break;
+
+       case SM_FILELIST:
+               fprintf(stderr, "done\n\t%d inodes, %ld seconds, %d files, "
+                       "%d dirs to find\n",
+                       scan_data.nr, time(NULL) - t, scan_data.fl.nr_files,
+                       scan_data.fl.nr_dirs);
+               if (scan_data.fl.nr_files == 0 && scan_data.fl.nr_dirs == 0) {
+                       ext2fs_close_inode_scan(scan);
+                       ext2fs_close(fs);
+                       free(block_buf);
+                       return 0;
+               }
+               break;
+
+       default:
+               break;
+       }
+
+       t = time(NULL);
+       fprintf(stderr, "scanning directory blocks (%u).. ",
+               ext2fs_dblist_count(fs->dblist));
+
+       /* root directory does not have name, handle it separately */
+       report_root();
+       /*
+        * we have a list of directory leaf blocks, blocks are sorted,
+        * but can be not very sequential. If such blocks are close to
+        * each other, read throughput can be improved if blocks are
+        * read not sequentially, but all at once in a big
+        * chunk. Create list of those chunks, it will be then used to
+        * issue readahead
+        */
+       make_chunk_list(fs->dblist);
+
+       scan_data.nr = 0;
+       retval = ext2fs_dblist_dir_iterate(fs->dblist,
+                                          DIRENT_FLAG_INCLUDE_EMPTY,
+                                          block_buf,
+                                          dblist_iterate_cb, NULL);
+       if (retval) {
+               com_err("ext2fs_dblist_dir_iterate", retval,
+                       "dir iterating dblist\n");
+               exit(1);
+       }
+       if (chunk_size)
+               free(chunks);
+
+       switch (scan_data.mode) {
+       case SM_DATABASE:
+       {
+               int status;
+
+               fprintf(stderr,
+                       "done\n\t%d blocks, %ld seconds, "
+                       "%d records sent to database\n",
+                       scan_data.nr, time(NULL) - t, scan_data.db.nr_commands);
+               close(scan_data.db.fd);
+               waitpid(pid, &status, 0);
+               if (WIFEXITED(status))
+                       fprintf(stderr, "database creation exited with %d\n",
+                               WEXITSTATUS(status));
+               break;
+       }
+
+       case SM_FILELIST:
+               fprintf(stderr,
+                       "done\n\t%d blocks, %ld seconds, %d files reported\n",
+                       scan_data.nr, time(NULL) - t, scan_data.fl.nr_reported);
+               break;
+
+       default:
+               break;
+       }
+
+       ext2fs_close_inode_scan(scan);
+       ext2fs_close(fs);
+       free(block_buf);
+
+       return 0;
+}
diff --git a/e2scan/filelist.c b/e2scan/filelist.c
new file mode 100644 (file)
index 0000000..448d314
--- /dev/null
@@ -0,0 +1,471 @@
+/*
+ * filelist.c
+ *
+ * Copyright (c) 2007, 2010 Oracle and/or its affiliates. All rights reserved.
+ * Use is subject to license terms.
+ *
+ * Author: Vladimir Saviliev <vladimir.saviliev@sun.com>
+ *         Andreas Dilger <adilger@sun.com>
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the
+ * GNU General Public License version 2.
+ * %End-Header%
+ */
+#define _GNU_SOURCE
+#define _FILE_OFFSET_BITS 64
+
+#include <stdio.h>
+#include <assert.h>
+#include <sys/stat.h>
+#include <time.h>
+#include <unistd.h>
+#include <sys/errno.h>
+#include <search.h>
+#include <ext2fs/ext2fs.h>
+
+/* e2scan.c */
+extern ext2_filsys fs;
+extern FILE *outfile;
+extern struct {
+       int mode;
+       int nr;
+       union {
+               struct {
+                       int fd;
+                       int nr_commands;
+               } db;
+               struct {
+                       /* number of files newer than specified time */
+                       ext2_ino_t nr_files;
+                       ext2_ino_t nr_dirs;
+                       /* number of files reported */
+                       ext2_ino_t nr_reported;
+                       time_t mtimestamp;
+                       time_t ctimestamp;
+                       int with_dirs;
+               } fl;
+       };
+} scan_data;
+
+ext2_ino_t visible_root_ino;
+
+int block_iterate_cb(ext2_filsys fs, blk_t  *block_nr,
+                    e2_blkcnt_t blockcnt,
+                    blk_t ref_block EXT2FS_ATTR((unused)),
+                    int ref_offset EXT2FS_ATTR((unused)),
+                    void *priv_data);
+
+
+/*
+create root dentry
+    root->connected_to_root = 1
+    root->d_path = "/"
+for each directory block:
+    if (directory is not in memory)
+       create new directory dentry
+       set directory->connected_to_root = 0
+    for each entry found in directory block:
+       if (entry is a subdirectory)
+           if (subdir is in memory)
+               subdir->d_parent = directory
+               if (directory->connected_to_root)
+                   recurse for each subsubdir
+                       subsubdir->connected_to_root = 1
+                       subsubdir->d_parent = subdir
+                       subsubdir->d_path = subdir->d_path + name
+                       for each non-directory entry on subdir
+                           generate full pathname and output
+                           drop filename entry from RAM
+           else
+               create new subdir dentry
+               subdir->connected_to_root = directory->connected_to_root
+               subdir->d_parent = directory
+               if (directory->connected_to_root)
+                   subdir->d_path = directory->d_path + name
+       else if (file is interesting)
+           if (directory->connected_to_root)
+               generate full pathname and output
+           else
+               create filename entry
+               attach filename to directory
+*/
+
+struct e2scan_dentry {
+       ext2_ino_t ino;
+       struct e2scan_dentry *d_parent;
+       char *name;
+       struct e2scan_dentry *d_child; /* pointer to first of subdirs */
+       struct e2scan_dentry *d_next; /* pointer to next directory */
+       unsigned connected_to_root:1;
+       unsigned is_file:1;
+       unsigned is_dir:1;
+       unsigned not_in_root:1;
+       unsigned is_printed:1;
+};
+
+static void *dentry_tree = NULL;
+
+static int compare_ino(const void *a, const void *b)
+{
+       const struct e2scan_dentry *d1;
+       const struct e2scan_dentry *d2;
+
+       d1 = a;
+       d2 = b;
+       if (d1->ino > d2->ino)
+               return 1;
+       if (d1->ino < d2->ino)
+               return -1;
+       return 0;
+}
+
+static struct e2scan_dentry *find_dentry(ext2_ino_t ino)
+{
+       struct e2scan_dentry tmp, **pdentry;
+
+       tmp.ino = ino;
+       pdentry = tfind(&tmp, &dentry_tree, compare_ino);
+       return (pdentry == NULL) ? NULL : *pdentry;
+}
+
+static struct e2scan_dentry *find_or_create_dentry(ext2_ino_t ino, int *created)
+{
+       struct e2scan_dentry **dentry, *new;
+
+       new = calloc(1, sizeof(struct e2scan_dentry));
+       if (new == NULL) {
+               fprintf(stderr, "malloc failed");
+               exit(1);
+       }
+       new->ino = ino;
+
+       dentry = tsearch(new, &dentry_tree, compare_ino);
+       if (dentry == NULL) {
+               fprintf(stderr, "tsearch failed");
+               exit(1);
+       }
+       if (*dentry != new) {
+               *created = 0;
+               free(new);
+       } else {
+               *created = 1;
+       }
+
+       return *dentry;
+}
+
+static int is_file_interesting(ext2_ino_t ino)
+{
+       return ext2fs_fast_test_inode_bitmap2(fs->inode_map, ino);
+}
+
+static void link_to_parent(struct e2scan_dentry *parent,
+                          struct e2scan_dentry *child)
+{
+       child->d_next = parent->d_child;
+       parent->d_child = child;
+       child->d_parent = parent;
+}
+
+static void dentry_attach_name(struct e2scan_dentry *dentry, int namelen,
+                              const char *name)
+{
+       if (dentry->name) {
+               if (namelen == 1 && (!strcmp(name, ".") || !strcmp(name, "/")))
+                       return;
+               fprintf(stderr, "dentry name: %s, name %.*s\n",
+                       dentry->name, namelen, name);
+               exit(1);
+       }
+       if (asprintf(&dentry->name, "%.*s", namelen, name) == -1)
+               dentry->name = "unable to allocate filename"; /* XXX: handle */
+}
+
+/*
+  - look up $ROOT in the filesystem
+  - build dentry for each component of the path, starting at /
+  - for each component of the path except the last, mark dentry "not_in_root"
+*/
+int create_root_dentries(char *root)
+{
+       int created;
+       char *name;
+       ext2_ino_t ino;
+       struct e2scan_dentry *child, *parent;
+       struct ext2_inode inode;
+       char *copy, *p;
+
+       copy = p = strdup(root);
+
+       ino = EXT2_ROOT_INO;
+       name = "/";
+       parent = NULL;
+       do {
+               child = find_or_create_dentry(ino, &created);
+               dentry_attach_name(child, strlen(name), name);
+               child->connected_to_root = 1;
+               child->not_in_root = 1;
+               if (parent != NULL)
+                       link_to_parent(parent, child);
+               parent = child;
+
+               name = strtok(copy, "/");
+               if (name == NULL)
+                       break;
+               copy = NULL;
+
+               if (ext2fs_lookup(fs, ino, name, strlen(name), NULL, &ino))
+                       return ENOENT;
+       } while (1);
+
+       if (ext2fs_read_inode(fs, ino, &inode))
+               return EIO;
+
+       if (!LINUX_S_ISDIR(inode.i_mode)) {
+               return ENOTDIR;
+       }
+       child->not_in_root = 0;
+       visible_root_ino = ino;
+       fprintf(stderr, "visible root: \"%s\"\n", root);
+
+       free(p);
+
+       return 0;
+}
+
+static inline void output_dot(void)
+{
+       fprintf(outfile, ".");
+}
+
+static inline void output_dot_newline(void)
+{
+       fprintf(outfile, ".\n");
+}
+
+static inline void output_dir_name(const char *dirname)
+{
+       fprintf(outfile, "/%s", dirname);
+}
+
+static inline void output_file_name(const char *filename, int len)
+{
+       fprintf(outfile, "/%.*s\n", len, filename);
+}
+
+static int up_path(struct e2scan_dentry *dentry)
+{
+       int len;
+
+       len = 0;
+       while (dentry->ino != visible_root_ino) {
+               if (dentry->ino == EXT2_ROOT_INO)
+                       return -1;
+               dentry = dentry->d_parent;
+               len ++;
+       }
+       return len;
+}
+
+static void revert_dir_name(int path_length, struct e2scan_dentry *dentry)
+{
+       if (path_length > 0) {
+               path_length --;
+               revert_dir_name(path_length, dentry->d_parent);
+               output_dir_name(dentry->name);
+       }
+       return;
+}
+
+static void report_file_name(struct e2scan_dentry *dentry, ext2_ino_t ino,
+                            const char *name, int namelen)
+{
+       int path_up_length;
+
+       ext2fs_fast_unmark_inode_bitmap2(fs->inode_map, ino);
+
+       if (ino == visible_root_ino) {
+               /* visible root is to be reported */
+               output_dot_newline();
+               scan_data.fl.nr_reported ++;
+               return;
+       }
+
+       path_up_length = up_path(dentry);
+       if (path_up_length == -1)
+               /* file is not in visible root */
+               return;
+
+       output_dot();
+       revert_dir_name(path_up_length, dentry);
+       /* the file is under visible root */
+       scan_data.fl.nr_reported ++;
+       output_file_name(name, namelen);
+}
+
+void report_root(void)
+{
+       if (EXT2_ROOT_INO == visible_root_ino &&
+           is_file_interesting(EXT2_ROOT_INO)) {
+               output_dot_newline();
+               scan_data.fl.nr_reported ++;
+       }
+}
+
+static struct e2scan_dentry *connect_subtree_to_root(struct e2scan_dentry *dir,
+                                             int not_in_root)
+{
+       struct e2scan_dentry *subdir, *prev, *p;
+
+       assert(!dir->is_file);
+       dir->connected_to_root = 1;
+       dir->not_in_root = not_in_root;
+
+       subdir = dir->d_child;
+       prev = NULL;
+       while (subdir) {
+               if (subdir->is_file) {
+                       /* report filename and release dentry */
+                       report_file_name(dir, subdir->ino, subdir->name,
+                                        strlen(subdir->name));
+
+                       if (prev == NULL)
+                               dir->d_child = subdir->d_next;
+                       else
+                               prev->d_next = subdir->d_next;
+
+                       p = tdelete(subdir, &dentry_tree, compare_ino);
+                       assert(p != NULL);
+
+                       free(subdir->name);
+                       p = subdir->d_next;
+                       free(subdir);
+                       subdir = p;
+                       continue;
+               }
+               if (subdir->is_dir && subdir->is_printed == 0) {
+                       /* report directory name */
+                       report_file_name(dir, subdir->ino, subdir->name,
+                                        strlen(subdir->name));
+                       subdir->is_printed = 1;
+               }
+               connect_subtree_to_root(subdir, not_in_root);
+               prev = subdir;
+               subdir = subdir->d_next;
+       }
+       return NULL;
+}
+
+void filelist_iscan_action(ext2_ino_t ino,
+                          struct ext2_inode *inode, char *buf)
+{
+       int created;
+       struct e2scan_dentry *dentry;
+       int to_be_listed;
+
+       if (!LINUX_S_ISDIR(inode->i_mode) &&
+           (inode->i_flags & EXT2_NODUMP_FL)) {
+               /* skip files which are not to be backuped */
+               ext2fs_fast_unmark_inode_bitmap2(fs->inode_map, ino);
+               return;
+       }
+
+       to_be_listed = (inode->i_ctime < scan_data.fl.ctimestamp &&
+                       inode->i_mtime < scan_data.fl.mtimestamp) ? 0 : 1;
+       if (LINUX_S_ISDIR(inode->i_mode)) {
+               dentry = find_or_create_dentry(ino, &created);
+
+               if (ext2fs_block_iterate2(fs, ino, 0, buf,
+                                         block_iterate_cb, &ino)) {
+                       fprintf(stderr, "ext2fs_block_iterate2 failed\n");
+                       exit(1);
+               }
+               dentry->is_dir = to_be_listed;
+       }
+       if (!to_be_listed)
+               /* too old files are not interesting */
+               ext2fs_fast_unmark_inode_bitmap2(fs->inode_map, ino);
+       else {
+               /* files and directories to find names of */
+               if (LINUX_S_ISDIR(inode->i_mode)) {
+                       if (scan_data.fl.with_dirs)
+                               scan_data.fl.nr_dirs++;
+                       else
+                               ext2fs_fast_unmark_inode_bitmap2(fs->inode_map,
+                                                               ino);
+               } else
+                       scan_data.fl.nr_files++;
+       }
+}
+
+int filelist_dblist_iterate_cb(ext2_ino_t dirino,
+                              struct ext2_dir_entry *dirent,
+                              int namelen)
+{
+       struct e2scan_dentry *dir, *subdir = NULL;
+       int created;
+       int ret;
+       struct ext2_dir_entry_2 *dirent2;
+       int is_dirname;
+
+       dir = find_dentry(dirino);
+       assert(dir != NULL);
+
+       dirent2 = (struct ext2_dir_entry_2 *)dirent;
+       is_dirname = ((dirent2->file_type & EXT2_FT_MASK) == EXT2_FT_DIR) ?
+                    1 : 0;
+       if (is_dirname) {
+               subdir = find_dentry(dirent->inode);
+               if (subdir == NULL)
+                       /* new name is encountered, skip it */
+                       return 0;
+
+               if (subdir->d_parent == NULL) {
+                       dentry_attach_name(subdir, namelen, dirent->name);
+                       link_to_parent(dir, subdir);
+
+                       if (dir->connected_to_root)
+                               /*
+                                * go down and connect all subdirs to
+                                * root recursively
+                                */
+                               connect_subtree_to_root(subdir,
+                                                       dir->not_in_root);
+               }
+       }
+       if (is_file_interesting(dirent->inode)) {
+               if (dir->connected_to_root) {
+                       if (is_dirname && subdir->is_printed == 0) {
+                               report_file_name(dir, dirent->inode,
+                                                dirent->name, namelen);
+                               subdir->is_printed = 1;
+                       } else
+                               report_file_name(dir, dirent->inode,
+                                                dirent->name, namelen);
+               } else {
+                       subdir = find_or_create_dentry(dirent->inode, &created);
+                       if (created) {
+                               dentry_attach_name(subdir,namelen,dirent->name);
+
+                               link_to_parent(dir, subdir);
+                               subdir->is_file = 1;
+                       } else {
+                               /*
+                                * dentry exists already, hard link
+                                * encountered, nothing to do about it
+                                */
+                               ;
+                       }
+               }
+       }
+       ret = 0;
+       if (scan_data.fl.nr_reported ==
+           (scan_data.fl.nr_files + scan_data.fl.nr_dirs))
+               /*
+                * names of all recently modified files are
+                * generated, break dblist iteration
+                */
+               ret |= DIRENT_ABORT;
+       return ret;
+}
index fb3bbdb..5a203c8 100644 (file)
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 MAN8="debugfs badblocks e2fsck mke2fs dumpe2fs mklost+found \
-       fsck tune2fs"
+       fsck tune2fs e2scan"
 MAN1="lsattr chattr"
 
 for i in $MAN8
index 67dfff8..05a015f 100644 (file)
@@ -4,7 +4,7 @@ PREFORMAT_ROOT=/usr/man/preformat
 COMPILED_ROOT=/usr/man
 
 MAN8="debugfs.8 badblocks.8 e2fsck.8 mke2fs.8 dumpe2fs.8 mklost+found.8 \
-       fsck.8 tune2fs.8 e2label.8"
+       fsck.8 tune2fs.8 e2label.8 e2scan.8"
 MAN1="lsattr.1 chattr.1"
 
 for i in $MAN8
index 75aae51..e612003 100644 (file)
 /* Define to 1 if you have the `snprintf' function. */
 #undef HAVE_SNPRINTF
 
+/* Define to 1 if SQLite library is present */
+#undef HAVE_SQLITE3
+
+/* Define to 1 if you have the <sqlite3.h> header file. */
+#undef HAVE_SQLITE3_H
+
 /* Define to 1 if you have the `srandom' function. */
 #undef HAVE_SRANDOM
 
index 21fdf9b..27d72a1 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * tst_getsize.c --- this function tests the getsize function
+ * tst_read_ea.c --- tests the extended attribute functions
  *
  * %Begin-Header%
  * This file may be redistributed under the terms of the GNU Public
index 43d0442..8d886e7 100644 (file)
@@ -125,16 +125,15 @@ Index: e2fsprogs-1.42.3/e2fsck/Makefile.in
 ===================================================================
 --- e2fsprogs-1.42.3/e2fsck/Makefile.in
 +++ e2fsprogs-1.42.3/e2fsck/Makefile.in
-@@ -77,7 +77,7 @@ COMPILE_ET=$(top_builddir)/lib/et/compile_et --build-tree
+@@ -77,6 +77,6 @@ COMPILE_ET=$(top_builddir)/lib/et/compile_et --build-tree
  OBJS= crc32.o dict.o unix.o e2fsck.o super.o pass1.o pass1b.o pass2.o \
        pass3.o pass4.o pass5.o pass6.o journal.o badblocks.o util.o dirinfo.o \
        dx_dirinfo.o ehandler.o problem.o message.o quota.o recovery.o \
 -      region.o revoke.o ea_refcount.o rehash.o profile.o prof_err.o \
 +      region.o revoke.o ea_refcount.o rehash.o profile.o prof_err.o splash.o \
        logfile.o sigcatcher.o $(MTRACE_OBJ)
- @LFSCK_CMT@OBJS += lfsck_common.o
  
-@@ -90,7 +90,7 @@ PROFILED_OBJS= profiled/dict.o profiled/unix.o profiled/e2fsck.o \
+@@ -90,6 +90,6 @@ PROFILED_OBJS= profiled/dict.o profiled/unix.o profiled/e2fsck.o \
        profiled/dirinfo.o profiled/dx_dirinfo.o profiled/ehandler.o \
        profiled/message.o profiled/problem.o profiled/quota.o \
        profiled/recovery.o profiled/region.o profiled/revoke.o \
@@ -142,7 +141,6 @@ Index: e2fsprogs-1.42.3/e2fsck/Makefile.in
 +      profiled/ea_refcount.o profiled/rehash.o profiled/profile.o splash.o \
        profiled/crc32.o profiled/prof_err.o profiled/logfile.o \
        profiled/sigcatcher.o
- @LFSCK_CMT@PROFILED_OBJS += profiled/lfsck_common.o
 @@ -122,6 +122,7 @@ SRCS= $(srcdir)/e2fsck.c \
        $(srcdir)/rehash.c \
        $(srcdir)/region.c \
index b988fa8..15b76aa 100644 (file)
@@ -13,6 +13,7 @@ po/stamp-cat-id
 po/cat-id-tbl.c
 Meta
 e2fsck
+e2scan
 ext2ed
 debugfs
 misc
index 64fde7a..2c969b1 100644 (file)
@@ -5,6 +5,8 @@ SS_DIR                  @SS_DIR@
 E2FSPROGS_MONTH                @E2FSPROGS_MONTH@
 E2FSPROGS_YEAR         @E2FSPROGS_YEAR@
 E2FSPROGS_VERSION      @E2FSPROGS_VERSION@
+E2SCAN_CMT             @E2SCAN_CMT@
+E2SCAN_MAN             @E2SCAN_MAN@
 SIZEOF_LONG_LONG       @SIZEOF_LONG_LONG@
 SIZEOF_LONG            @SIZEOF_LONG@
 SIZEOF_INT             @SIZEOF_INT@