+if test x$USE_MAINTAINER_MODE = xyes
+then
+ # Maintainers have no choice ! I'm a BOFH, and I plainly assume. [Mt]
+ enable_compile_warnings=yes
+fi
+
+ # Check whether --enable-compile-warnings was given.
+if test "${enable_compile_warnings+set}" = set; then
+ enableval=$enable_compile_warnings; enable_compile_warnings=$enableval
+else
+ enable_compile_warnings=no
+fi
+
+
+ # Check whether --enable-compile-optimizations was given.
+if test "${enable_compile_optimizations+set}" = set; then
+ enableval=$enable_compile_optimizations; enable_compile_optimizations=$enableval
+else
+ enable_compile_optimizations=auto
+fi
+
+
+ if test "x$cflags_set" != "xyes" ; then
+ # if user didn't specify CFLAGS explicitely
+
+ # AC PROG CC tests whether -g is accepted.
+ # Cool, but it also tries to set -O2. I don't want it with gcc
+ saveCFLAGS="$CFLAGS"
+ CFLAGS=
+ case " $saveCFLAGS " in
+ *-g*) CFLAGS="-g" ;;
+ esac
+ case " $saveCFLAGS " in
+ *-O2*) test "x$CC" = xgcc || CFLAGS="$CFLAGS -O2" ;;
+ esac
+
+ # damn AC PROG CC, why did you set -O??
+ CFLAGS="-g"
+ fi
+
+ if test "x$enable_compile_warnings" = "xyes" ; then
+ { echo "$as_me:$LINENO: checking the warning flags for this compiler" >&5
+echo $ECHO_N "checking the warning flags for this compiler... $ECHO_C" >&6; }
+ warnCFLAGS=
+ if test "x$CC" = "xgcc" || test "x$GCC" = "xyes" ; then
+ case " $CFLAGS " in
+ *-Wall*) ;;
+ *) warnCFLAGS="-Wall -Wunused" ;;
+ esac
+
+ ## -W is not all that useful. And it cannot be controlled
+ ## with individual -Wno-xxx flags, unlike -Wall
+
+ ##Â -Wformat=2 chokes on the snprintf replacement because the format is passed to real sprintf
+ ## -Wshadow chokes on try{ try{} } constructs
+ if test "x$enable_compile_warnings" = "xyes"; then
+ warnCFLAGS=`echo $warnCFLAGS -Wmissing-prototypes -Wmissing-declarations \
+ -Wpointer-arith -Wchar-subscripts -Wcomment -Wformat -Wwrite-strings \
+ -Wno-unused-function \
+ -Werror \
+ | sed 's/ +/ /g'`
+ # -Wno-unused-variable -Wno-unused-label
+ fi
+ fi
+ { echo "$as_me:$LINENO: result: $warnCFLAGS" >&5
+echo "${ECHO_T}$warnCFLAGS" >&6; }
+ # placed before since gcc remembers the last one on conflict
+ CFLAGS="$warnCFLAGS $CFLAGS"
+ fi
+
+ if test "x$enable_compile_optimizations" = "xyes" ||
+ test "x$enable_compile_optimizations" = "xauto" ; then
+ { echo "$as_me:$LINENO: checking the optimization flags for this compiler" >&5
+echo $ECHO_N "checking the optimization flags for this compiler... $ECHO_C" >&6; }
+ optCFLAGS=
+ if test "x$CC" = "xgcc" || test "x$GCC" = "xyes" ; then
+ case " $CFLAGS " in
+ *-O*) ;;
+ *) optCFLAGS="$optCFLAGS -O3" ;;
+ esac
+ optCFLAGS="$optCFLAGS -finline-functions -ffast-math -funroll-loops -fno-strict-aliasing"
+
+ GCC_VER=`gcc --version | head -n 1 | sed 's/^^0-9*\(^ *\).*$/\1/'`
+ GCC_VER_MAJ=`echo $GCC_VER | sed 's/^\(.\).*$/\1/'`
+ if test "x$target_cpu" = "xpowerpc" && test "x$GCC_VER_MAJ" == "x3" ; then
+ # avoid gcc bug #12828, which apeared in 3.x branch and is fixed in 3.4.0
+ # but the check would be too complicated to get 3.4.
+ # Instead, rule out any 3.x compiler.
+
+ # Note that the flag didn't exist before gcc 3.0
+ optCFLAGS="$optCFLAGS -fno-loop-optimize"
+ fi
+ fi
+ { echo "$as_me:$LINENO: result: $optCFLAGS" >&5
+echo "${ECHO_T}$optCFLAGS" >&6; }
+ # Take it only if CFLAGS not explicitly set. Unless the flag was explicitly given
+ if test "x$cflags_set" != "xyes" ; then
+ CFLAGS="$optCFLAGS $CFLAGS"
+ fi
+ fi
+
+ if test x$lt_cv_prog_gnu_ld = xyes ; then
+ LD_DYNAMIC_FLAGS=-Wl,--export-dynamic
+ else
+ LD_DYNAMIC_FLAGS=
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { echo "$as_me:$LINENO: result: " >&5
+echo "${ECHO_T}" >&6; }
+ { echo "$as_me:$LINENO: result: ${T_MD}Check for Java bindings...${T_ME}" >&5
+echo "${ECHO_T}${T_MD}Check for Java bindings...${T_ME}" >&6; }
+
+# Java cruft
+# Check whether --enable-java was given.
+if test "${enable_java+set}" = set; then
+ enableval=$enable_java; want_java=$enableval
+else
+ want_java=yes
+fi
+
+if test "x$want_java" != "xyes" ; then
+ { echo "$as_me:$LINENO: checking whether to compile java bindings" >&5
+echo $ECHO_N "checking whether to compile java bindings... $ECHO_C" >&6; }
+ { echo "$as_me:$LINENO: result: disabled by user" >&5
+echo "${ECHO_T}disabled by user" >&6; }
+ use_java="disabled by user"
+else
+ # Extract the first word of "javac", so it can be a program name with args.
+set dummy javac; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_path_JAVAC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $JAVAC in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_JAVAC" && ac_cv_path_JAVAC="`which javac`"
+ ;;
+esac
+fi
+JAVAC=$ac_cv_path_JAVAC
+if test -n "$JAVAC"; then
+ { echo "$as_me:$LINENO: result: $JAVAC" >&5
+echo "${ECHO_T}$JAVAC" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+ # Extract the first word of "java ", so it can be a program name with args.
+set dummy java ; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_path_JAVA+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $JAVA in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_JAVA" && ac_cv_path_JAVA="`which java`"
+ ;;
+esac
+fi
+JAVA=$ac_cv_path_JAVA
+if test -n "$JAVA"; then
+ { echo "$as_me:$LINENO: result: $JAVA" >&5
+echo "${ECHO_T}$JAVA" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+ # Extract the first word of "jar ", so it can be a program name with args.
+set dummy jar ; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_path_JAR+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $JAR in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_JAR" && ac_cv_path_JAR="`which jar`"
+ ;;
+esac
+fi
+JAR=$ac_cv_path_JAR
+if test -n "$JAR"; then
+ { echo "$as_me:$LINENO: result: $JAR" >&5
+echo "${ECHO_T}$JAR" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+
+for ac_header in jni.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+else
+ # Is the header compilable?
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_compiler=no