--- configure.orig	2014-05-18 07:58:22.000000000 +0200
+++ configure	2014-05-18 08:00:00.000000000 +0200
@@ -713,6 +713,10 @@
 LDFLAGS
 CXXFLAGS
 CXX
+AM_BACKSLASH
+AM_DEFAULT_VERBOSITY
+AM_DEFAULT_V
+AM_V
 am__untar
 am__tar
 AMTAR
@@ -777,6 +781,7 @@
 ac_subst_files=''
 ac_user_opts='
 enable_option_checking
+enable_silent_rules
 enable_dependency_tracking
 enable_static
 enable_shared
@@ -790,6 +795,8 @@
 enable_single_compilation_unit
 with_doxygen
 with_mysql
+with_mysql_libs
+with_mysql_includes
 with_qore_dir
 enable_profile
 enable_debug
@@ -1427,6 +1434,8 @@
   --disable-option-checking  ignore unrecognized --enable/--with options
   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --enable-silent-rules   less verbose build output (undo: "make V=1")
+  --disable-silent-rules  verbose build output (undo: "make V=0")
   --enable-dependency-tracking
                           do not reject slow dependency extractors
   --disable-dependency-tracking
@@ -1455,6 +1464,9 @@
   --with-lib-prefix[=DIR] generic search prefix for libraries, includes, etc
   --with-doxygen[=PATH]   path to doxygen binary
   --with-mysql[=DIR]      MySQL base directory
+  --with-mysql-libs[=DIR] MySQL library base directory
+  --with-mysql-includes[=DIR]
+                          MySQL includes base directory
   --with-qore-dir[=DIR]   Qore directory
 
 Some influential environment variables:
@@ -2394,7 +2406,7 @@
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
-am__api_version='1.12'
+am__api_version='1.14'
 
 ac_aux_dir=
 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
@@ -2607,8 +2619,8 @@
   esac
 fi
 # Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
-  am_missing_run="$MISSING --run "
+if eval "$MISSING --is-lightweight"; then
+  am_missing_run="$MISSING "
 else
   am_missing_run=
   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
@@ -2848,6 +2860,45 @@
 fi
 rmdir .tst 2>/dev/null
 
+# Check whether --enable-silent-rules was given.
+if test "${enable_silent_rules+set}" = set; then :
+  enableval=$enable_silent_rules;
+fi
+
+case $enable_silent_rules in # (((
+  yes) AM_DEFAULT_VERBOSITY=0;;
+   no) AM_DEFAULT_VERBOSITY=1;;
+    *) AM_DEFAULT_VERBOSITY=1;;
+esac
+am_make=${MAKE-make}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
+$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
+if ${am_cv_make_support_nested_variables+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if $as_echo 'TRUE=$(BAR$(V))
+BAR0=false
+BAR1=true
+V=1
+am__doit:
+	@$(TRUE)
+.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
+  am_cv_make_support_nested_variables=yes
+else
+  am_cv_make_support_nested_variables=no
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
+$as_echo "$am_cv_make_support_nested_variables" >&6; }
+if test $am_cv_make_support_nested_variables = yes; then
+    AM_V='$(V)'
+  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
+else
+  AM_V=$AM_DEFAULT_VERBOSITY
+  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+fi
+AM_BACKSLASH='\'
+
 if test "`cd $srcdir && pwd`" != "`pwd`"; then
   # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
   # is not polluted with repeated "-I."
@@ -2911,92 +2962,173 @@
 AMTAR='$${TAR-tar}'
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a ustar tar archive" >&5
-$as_echo_n "checking how to create a ustar tar archive... " >&6; }
-# Loop over all known methods to create a tar archive until one works.
+# We'll loop over all known methods to create a tar archive until one works.
 _am_tools='gnutar plaintar pax cpio none'
-_am_tools=${am_cv_prog_tar_ustar-$_am_tools}
-# Do not fold the above two line into one, because Tru64 sh and
-# Solaris sh will not grok spaces in the rhs of '-'.
-for _am_tool in $_am_tools
-do
-  case $_am_tool in
-  gnutar)
-    for _am_tar in tar gnutar gtar;
-    do
-      { echo "$as_me:$LINENO: $_am_tar --version" >&5
+
+# The POSIX 1988 'ustar' format is defined with fixed-size fields.
+      # There is notably a 21 bits limit for the UID and the GID.  In fact,
+      # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
+      # and bug#13588).
+      am_max_uid=2097151 # 2^21 - 1
+      am_max_gid=$am_max_uid
+      # The $UID and $GID variables are not portable, so we need to resort
+      # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
+      # below are definitely unexpected, so allow the users to see them
+      # (that is, avoid stderr redirection).
+      am_uid=`id -u || echo unknown`
+      am_gid=`id -g || echo unknown`
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UID '$am_uid' is supported by ustar format" >&5
+$as_echo_n "checking whether UID '$am_uid' is supported by ustar format... " >&6; }
+      if test $am_uid -le $am_max_uid; then
+         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+      else
+         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+         _am_tools=none
+      fi
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GID '$am_gid' is supported by ustar format" >&5
+$as_echo_n "checking whether GID '$am_gid' is supported by ustar format... " >&6; }
+      if test $am_gid -le $am_max_gid; then
+         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+      else
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+        _am_tools=none
+      fi
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a ustar tar archive" >&5
+$as_echo_n "checking how to create a ustar tar archive... " >&6; }
+
+  # Go ahead even if we have the value already cached.  We do so because we
+  # need to set the values for the 'am__tar' and 'am__untar' variables.
+  _am_tools=${am_cv_prog_tar_ustar-$_am_tools}
+
+  for _am_tool in $_am_tools; do
+    case $_am_tool in
+    gnutar)
+      for _am_tar in tar gnutar gtar; do
+        { echo "$as_me:$LINENO: $_am_tar --version" >&5
    ($_am_tar --version) >&5 2>&5
    ac_status=$?
    echo "$as_me:$LINENO: \$? = $ac_status" >&5
    (exit $ac_status); } && break
-    done
-    am__tar="$_am_tar --format=ustar -chf - "'"$$tardir"'
-    am__tar_="$_am_tar --format=ustar -chf - "'"$tardir"'
-    am__untar="$_am_tar -xf -"
-    ;;
-  plaintar)
-    # Must skip GNU tar: if it does not support --format= it doesn't create
-    # ustar tarball either.
-    (tar --version) >/dev/null 2>&1 && continue
-    am__tar='tar chf - "$$tardir"'
-    am__tar_='tar chf - "$tardir"'
-    am__untar='tar xf -'
-    ;;
-  pax)
-    am__tar='pax -L -x ustar -w "$$tardir"'
-    am__tar_='pax -L -x ustar -w "$tardir"'
-    am__untar='pax -r'
-    ;;
-  cpio)
-    am__tar='find "$$tardir" -print | cpio -o -H ustar -L'
-    am__tar_='find "$tardir" -print | cpio -o -H ustar -L'
-    am__untar='cpio -i -H ustar -d'
-    ;;
-  none)
-    am__tar=false
-    am__tar_=false
-    am__untar=false
-    ;;
-  esac
-
-  # If the value was cached, stop now.  We just wanted to have am__tar
-  # and am__untar set.
-  test -n "${am_cv_prog_tar_ustar}" && break
+      done
+      am__tar="$_am_tar --format=ustar -chf - "'"$$tardir"'
+      am__tar_="$_am_tar --format=ustar -chf - "'"$tardir"'
+      am__untar="$_am_tar -xf -"
+      ;;
+    plaintar)
+      # Must skip GNU tar: if it does not support --format= it doesn't create
+      # ustar tarball either.
+      (tar --version) >/dev/null 2>&1 && continue
+      am__tar='tar chf - "$$tardir"'
+      am__tar_='tar chf - "$tardir"'
+      am__untar='tar xf -'
+      ;;
+    pax)
+      am__tar='pax -L -x ustar -w "$$tardir"'
+      am__tar_='pax -L -x ustar -w "$tardir"'
+      am__untar='pax -r'
+      ;;
+    cpio)
+      am__tar='find "$$tardir" -print | cpio -o -H ustar -L'
+      am__tar_='find "$tardir" -print | cpio -o -H ustar -L'
+      am__untar='cpio -i -H ustar -d'
+      ;;
+    none)
+      am__tar=false
+      am__tar_=false
+      am__untar=false
+      ;;
+    esac
 
-  # tar/untar a dummy directory, and stop if the command works
-  rm -rf conftest.dir
-  mkdir conftest.dir
-  echo GrepMe > conftest.dir/file
-  { echo "$as_me:$LINENO: tardir=conftest.dir && eval $am__tar_ >conftest.tar" >&5
+    # If the value was cached, stop now.  We just wanted to have am__tar
+    # and am__untar set.
+    test -n "${am_cv_prog_tar_ustar}" && break
+
+    # tar/untar a dummy directory, and stop if the command works.
+    rm -rf conftest.dir
+    mkdir conftest.dir
+    echo GrepMe > conftest.dir/file
+    { echo "$as_me:$LINENO: tardir=conftest.dir && eval $am__tar_ >conftest.tar" >&5
    (tardir=conftest.dir && eval $am__tar_ >conftest.tar) >&5 2>&5
    ac_status=$?
    echo "$as_me:$LINENO: \$? = $ac_status" >&5
    (exit $ac_status); }
-  rm -rf conftest.dir
-  if test -s conftest.tar; then
-    { echo "$as_me:$LINENO: $am__untar <conftest.tar" >&5
+    rm -rf conftest.dir
+    if test -s conftest.tar; then
+      { echo "$as_me:$LINENO: $am__untar <conftest.tar" >&5
    ($am__untar <conftest.tar) >&5 2>&5
    ac_status=$?
    echo "$as_me:$LINENO: \$? = $ac_status" >&5
    (exit $ac_status); }
-    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
-  fi
-done
-rm -rf conftest.dir
+      { echo "$as_me:$LINENO: cat conftest.dir/file" >&5
+   (cat conftest.dir/file) >&5 2>&5
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); }
+      grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+    fi
+  done
+  rm -rf conftest.dir
 
-if ${am_cv_prog_tar_ustar+:} false; then :
+  if ${am_cv_prog_tar_ustar+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   am_cv_prog_tar_ustar=$_am_tool
 fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_ustar" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_ustar" >&5
 $as_echo "$am_cv_prog_tar_ustar" >&6; }
 
 
 
 
 
+
+# POSIX will say in a future version that running "rm -f" with no argument
+# is OK; and we want to be able to make that assumption in our Makefile
+# recipes.  So use an aggressive probe to check that the usage we want is
+# actually supported "in the wild" to an acceptable degree.
+# See automake bug#10828.
+# To make any issue more visible, cause the running configure to be aborted
+# by default if the 'rm' program in use doesn't match our expectations; the
+# user can still override this though.
+if rm -f && rm -fr && rm -rf; then : OK; else
+  cat >&2 <<'END'
+Oops!
+
+Your 'rm' program seems unable to run without file operands specified
+on the command line, even when the '-f' option is present.  This is contrary
+to the behaviour of most rm programs out there, and not conforming with
+the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
+
+Please tell bug-automake@gnu.org about your system, including the value
+of your $PATH and any error possibly output before this message.  This
+can help us improve future automake versions.
+
+END
+  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
+    echo 'Configuration will proceed anyway, since you have set the' >&2
+    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
+    echo >&2
+  else
+    cat >&2 <<'END'
+Aborting the configuration process, to ensure you take notice of the issue.
+
+You can download and install GNU coreutils to get an 'rm' implementation
+that behaves properly: <http://www.gnu.org/software/coreutils/>.
+
+If you want to complete the configuration process using your problematic
+'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
+to "yes", and re-run configure.
+
+END
+    as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
+  fi
+fi
 ac_config_headers="$ac_config_headers config.h"
 
 
@@ -4243,6 +4375,65 @@
 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
+$as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
+if ${am_cv_prog_cc_c_o+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+  # Make sure it works both with $CC and with simple cc.
+  # Following AC_PROG_CC_C_O, we do the test twice because some
+  # compilers refuse to overwrite an existing .o file with -o,
+  # though they will create one.
+  am_cv_prog_cc_c_o=yes
+  for am_i in 1 2; do
+    if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
+   ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); } \
+         && test -f conftest2.$ac_objext; then
+      : OK
+    else
+      am_cv_prog_cc_c_o=no
+      break
+    fi
+  done
+  rm -f core conftest*
+  unset am_i
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
+$as_echo "$am_cv_prog_cc_c_o" >&6; }
+if test "$am_cv_prog_cc_c_o" != yes; then
+   # Losing compiler, so override with the script.
+   # FIXME: It is wrong to rewrite CC.
+   # But if we don't then we get into trouble of one sort or another.
+   # A longer-term fix would be to have automake use am__CC in this case,
+   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+   CC="$am_aux_dir/compile $CC"
+fi
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+
 depcc="$CC"   am_compiler_list=
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
@@ -15849,6 +16040,29 @@
 fi
 
 
+
+# Check whether --with-mysql-libs was given.
+if test "${with_mysql_libs+set}" = set; then :
+  withval=$with_mysql_libs; if test ! -d "${with_mysql_libs}"; then as_fn_error $? "directory ${with_mysql_livs} does not exist for --with-mysql-libs" "$LINENO" 5; unset with_mysql_libs; fi
+fi
+
+
+
+# Check whether --with-mysql-includes was given.
+if test "${with_mysql_includes+set}" = set; then :
+  withval=$with_mysql_includes; if test ! -d "${with_mysql_includes}"; then as_fn_error $? "directory ${with_mysql_includes} does not exist for --with-mysql-includes" "$LINENO" 5; unset with_mysql_includes; fi
+fi
+
+
+check_mysql_includes() {
+   if test "$with_mysql_includes" != "/usr/include"; then
+      mysql_app_includes=true
+   fi
+   if test "$with_mysql_libs" != "/lib${LIBSUFFIX}"; then
+      mysql_app_libs=true
+   fi
+}
+
 check_mysql() {
     a="$1"
     if test \( "$a" = "/" -o -z "$a" \) -a -h "$a/lib${LIBSUFFIX}"; then
@@ -15864,10 +16078,18 @@
        with_mysql_includes=$inc
     elif test -f "$inc/mysql/mysql.h"; then
        with_mysql_includes=$inc/mysql
+    elif test -f "$inc/mariadb/mysql/mysql.h"; then
+       with_mysql_includes=$inc/mariadb/mysql
+    elif test -f "$inc/percona/mysql/mysql.h"; then
+       with_mysql_includes=$inc/percona/mysql
     else
        mid=`ls -rdt $a/include/mysql* 2>/dev/null | tail -1`
        if test -n "$mid" -a -f "$mid/mysql/mysql.h"; then
 	  with_mysql_includes="$mid/mysql"
+       elif test -n "$mid" -a -f "$mid/mariadb/mysql/mysql.h"; then
+	  with_mysql_includes="$mid/mariadb/mysql"
+       elif test -n "$mid" -a -f "$mid/percona/mysql/mysql.h"; then
+	  with_mysql_includes="$mid/percona/mysql"
        fi
     fi
 
@@ -15880,6 +16102,10 @@
        with_mysql_libs=$lib
     elif test -f "$lib/mysql/libmysqlclient_r.${SHLIB_SUFFIX}"; then
        with_mysql_libs=$lib/mysql
+    elif test -f "$lib/mariadb/mysql/libmysqlclient_r.${SHLIB_SUFFIX}"; then
+       with_mysql_libs=$lib/mariadb/mysql
+    elif test -f "$lib/percona/mysql/libmysqlclient_r.${SHLIB_SUFFIX}"; then
+       with_mysql_libs=$lib/percona/mysql
     elif test -f "$lib/libmysqlclient_r.a"; then
        with_mysql_libs=$lib
        mysql_static=1
@@ -15894,6 +16120,10 @@
        if test -n "$mld"; then
           if test -f "$mld/mysql/libmysqlclient_r.${SHLIB_SUFFIX}"; then
 	     with_mysql_libs="$mld/mysql"
+          elif test -f "$mld/mariadb/mysql/libmysqlclient_r.${SHLIB_SUFFIX}"; then
+	     with_mysql_libs="$mld/mariadb/mysql"
+          elif test -f "$mld/percona/mysql/libmysqlclient_r.${SHLIB_SUFFIX}"; then
+	     with_mysql_libs="$mld/percona/mysql"
 	  elif test -f "$mld/mysql/libmysqlclient_r.a"; then
 	     with_mysql_libs="$mld/mysql"
 	     mysql_static=1
@@ -15904,12 +16134,7 @@
     if test -z "$with_mysql_libs"; then
        unset with_mysql_includes
     else
-	if test "$with_mysql_includes" != "/usr/include"; then
-	   mysql_app_includes=true
-        fi
-	if test "$with_mysql_libs" != "/lib${LIBSUFFIX}"; then
-	   mysql_app_libs=true
-	fi
+        check_mysql_includes
     fi
 }
 
@@ -15918,19 +16143,50 @@
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mysql includes and libraries" >&5
 $as_echo_n "checking for mysql includes and libraries... " >&6; }
 
-   if test -n "$with_mysql"; then
-      check_mysql "$with_mysql"
-      if test -z "$with_mysql_includes"; then
-	 as_fn_error $? "not found in $with_mysql" "$LINENO" 5
+   if test -n "${with_mysql_includes}"; then
+      if test ! -f "${with_mysql_includes}/mysql.h"; then
+         if test -f "${with_mysql_includes}/mysql/mysql.h"; then
+	    with_mysql_includes="${with_mysql_includes}/mysql"
+            check_mysql_includes
+         else
+            as_fn_error $? "mysql.h not found in $with_mysql_includes" "$LINENO" 5
+         fi
       fi
-   fi
-
-   for dir in $MYSQL_DIR "${with_lib_prefix}" "${find_prefix}" / /usr /usr/local/mysql /opt/mysql /usr/mysql /sw /opt/local /opt/sfw /usr/sfw; do
-      check_mysql $dir
-      if test -n "$with_mysql_includes"; then
-	 break;
+      if test -n "${with_mysql_libs}"; then
+         if test ! -f "${with_mysql_libs}/libmysqlclient_r.${SHLIB_SUFFIX}"; then
+	    if test ! -f "${with_mysql_libs}/mysql/libmysqlclient_r.${SHLIB_SUFFIX}"; then
+               with_mysql_libs="${with_mysql_libs}/mysql"
+            else
+               if test -f "${with_mysql_libs}/libmysqlclient_r.a"; then
+                  mysql_static=1
+               elif test -f "${with_mysql_libs}/mysql/libmysqlclient_r.a"; then
+                  with_mysql_libs="${with_mysql_libs}/mysql"
+                  mysql_static=1
+      	       else
+                  as_fn_error $? "mysql client library not found in $with_mysql_libs" "$LINENO" 5
+               fi
+            fi
+         fi
+      else
+         as_fn_error $? "--with-mysql-libs must also be used when --with-mysql-incudes is used" "$LINENO" 5
       fi
-   done
+   elif test -n "${with_mysql_libs}"; then
+      as_fn_error $? "--with-mysql-includes must also be used when --with-mysql-libs is used" "$LINENO" 5
+   else
+      if test -n "$with_mysql"; then
+         check_mysql "$with_mysql"
+         if test -z "$with_mysql_includes"; then
+	    as_fn_error $? "not found in $with_mysql" "$LINENO" 5
+         fi
+      else
+         for dir in $MYSQL_DIR "${with_lib_prefix}" "${find_prefix}" / /usr /usr/local/mysql /opt/mysql /usr/mysql /sw /opt/local /opt/sfw /usr/sfw; do
+            check_mysql $dir
+            if test -n "$with_mysql_includes"; then
+	       break;
+            fi
+         done
+      fi
+   fi
 
    if test -n "$with_mysql_includes"; then
       if test -n "$mysql_static"; then
@@ -16680,13 +16936,9 @@
     fi
 fi
 
-# turn on some build flags for non-debugging, non-profiling builds
-if test "$enable_debug" = "no" -a "$enable_profile" = "no"; then
-    # strip binaries and libraries on darwin with -x
-    if test "`echo $host_os|cut -b-6`" = "darwin"; then
-       LDFLAGS="$LDFLAGS -Wl,-x"
-    fi
-fi
+#if test "$enable_debug" = "no" -a "$enable_profile" = "no" -a "$enable_optimization" = "yes" ; then
+    # we can no longer strip binaries and libraries with non-debugging, non-profiling builds on Darwin with -Wl,-x because it breaks linking :(
+#fi
 
 # turn on warnings if we know how
 if test "$GXX" = "yes"; then
@@ -18504,7 +18756,7 @@
 
   case $ac_file$ac_mode in
     "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
-  # Autoconf 2.62 quotes --file arguments for eval, but not when files
+  # Older Autoconf quotes --file arguments for eval, but not when files
   # are listed without --file.  Let's play safe and only enable the eval
   # if we detect the quoting.
   case $CONFIG_FILES in
@@ -18555,7 +18807,7 @@
     DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
     test -z "$DEPDIR" && continue
     am__include=`sed -n 's/^am__include = //p' < "$mf"`
-    test -z "am__include" && continue
+    test -z "$am__include" && continue
     am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
     # Find all dependency output files, they are included files with
     # $(DEPDIR) in their names.  We invoke sed twice because it is the
