Index: trunk/FACT++/configure
===================================================================
--- trunk/FACT++/configure	(revision 12490)
+++ trunk/FACT++/configure	(revision 12756)
@@ -1021,4 +1021,6 @@
 ac_user_opts='
 enable_option_checking
+enable_optimization
+enable_debug
 enable_static
 enable_shared
@@ -1731,4 +1733,8 @@
   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --disable-optimization  Compile with -O0 instead of -O3
+
+  --enable-debug          Compile with debugging symbols (-g)
+
   --enable-static[=PKGS]  build static libraries [default=no]
   --enable-shared[=PKGS]  build shared libraries [default=yes]
@@ -2968,4 +2974,28 @@
 
 
+# Make sure none of the following will set -O2
+# Check whether --enable-optimization was given.
+if test "${enable_optimization+set}" = set; then :
+  enableval=$enable_optimization;
+fi
+
+if test "x$enable_optimization" != "xno"; then :
+  MYFLAGS+=" -O3"
+else
+  MYFLAGS+=" -O0"
+fi
+
+# Check whether --enable-debug was given.
+if test "${enable_debug+set}" = set; then :
+  enableval=$enable_debug;
+fi
+
+if test "x$enable_debug" = "xyes"; then :
+  MYFLAGS+=" -g"
+fi
+
+CFLAGS+=$MYFLAGS
+CXXFLAGS+=$MYFLAGS
+
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
@@ -3823,4 +3853,6 @@
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
+
+#AC_PROG_CC_C99
    case $ac_cv_prog_cc_stdc in #(
   no) :
@@ -4116,8 +4148,7 @@
 esac
 
-#AC_PROG_CC_C99
 
 ######################################################################
-# GNUC extension support (needed for the evnt builder)
+# GNUC extension support (needed for the event builder)
 ######################################################################
 
@@ -4581,4 +4612,193 @@
 
 
+
+######################################################################
+# Check for right C++ standard
+######################################################################
+
+#AC_CXX_HEADER_STDCXX_0X
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if g++ supports C++0x features without additional flags" >&5
+$as_echo_n "checking if g++ supports C++0x features without additional flags... " >&6; }
+if test "${ac_cv_cxx_compile_cxx0x_native+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+  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
+
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+  template <typename T>
+    struct check
+    {
+      static_assert(sizeof(int) <= sizeof(T), "not big enough");
+    };
+
+    typedef check<check<bool>> right_angle_brackets;
+
+    int a;
+    decltype(a) b;
+
+    typedef check<int> check_type;
+    check_type c;
+    check_type&& cr = c;
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_cv_cxx_compile_cxx0x_native=yes
+else
+  ac_cv_cxx_compile_cxx0x_native=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compile_cxx0x_native" >&5
+$as_echo "$ac_cv_cxx_compile_cxx0x_native" >&6; }
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if g++ supports C++0x features with -std=c++0x" >&5
+$as_echo_n "checking if g++ supports C++0x features with -std=c++0x... " >&6; }
+if test "${ac_cv_cxx_compile_cxx0x_cxx+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+  ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+  ac_save_CXXFLAGS="$CXXFLAGS"
+  CXXFLAGS="$CXXFLAGS -std=c++0x"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+  template <typename T>
+    struct check
+    {
+      static_assert(sizeof(int) <= sizeof(T), "not big enough");
+    };
+
+    typedef check<check<bool>> right_angle_brackets;
+
+    int a;
+    decltype(a) b;
+
+    typedef check<int> check_type;
+    check_type c;
+    check_type&& cr = c;
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_cv_cxx_compile_cxx0x_cxx=yes
+else
+  ac_cv_cxx_compile_cxx0x_cxx=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  CXXFLAGS="$ac_save_CXXFLAGS"
+  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
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compile_cxx0x_cxx" >&5
+$as_echo "$ac_cv_cxx_compile_cxx0x_cxx" >&6; }
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if g++ supports C++0x features with -std=gnu++0x" >&5
+$as_echo_n "checking if g++ supports C++0x features with -std=gnu++0x... " >&6; }
+if test "${ac_cv_cxx_compile_cxx0x_gxx+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+  ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+  ac_save_CXXFLAGS="$CXXFLAGS"
+  CXXFLAGS="$CXXFLAGS -std=gnu++0x"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+  template <typename T>
+    struct check
+    {
+      static_assert(sizeof(int) <= sizeof(T), "not big enough");
+    };
+
+    typedef check<check<bool>> right_angle_brackets;
+
+    int a;
+    decltype(a) b;
+
+    typedef check<int> check_type;
+    check_type c;
+    check_type&& cr = c;
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_cv_cxx_compile_cxx0x_gxx=yes
+else
+  ac_cv_cxx_compile_cxx0x_gxx=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  CXXFLAGS="$ac_save_CXXFLAGS"
+  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
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compile_cxx0x_gxx" >&5
+$as_echo "$ac_cv_cxx_compile_cxx0x_gxx" >&6; }
+
+  if test "$ac_cv_cxx_compile_cxx0x_native" = yes ||
+     test "$ac_cv_cxx_compile_cxx0x_cxx" = yes ||
+     test "$ac_cv_cxx_compile_cxx0x_gxx" = yes; then
+
+$as_echo "#define HAVE_STDCXX_0X /**/" >>confdefs.h
+
+  fi
+
+if test "$ac_cv_cxx_compile_cxx0x_cxx" != yes; then
+   as_fn_error $? "C++0x standard (-std=c++0x) not supported by compiler." "$LINENO" 5
+fi
+
+CXXFLAGS+=" -std=c++0x"
 
 ######################################################################
@@ -5136,11 +5356,11 @@
   lt_cv_nm_interface="BSD nm"
   echo "int some_variable = 0;" > conftest.$ac_ext
-  (eval echo "\"\$as_me:5138: $ac_compile\"" >&5)
+  (eval echo "\"\$as_me:5358: $ac_compile\"" >&5)
   (eval "$ac_compile" 2>conftest.err)
   cat conftest.err >&5
-  (eval echo "\"\$as_me:5141: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+  (eval echo "\"\$as_me:5361: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
   cat conftest.err >&5
-  (eval echo "\"\$as_me:5144: output\"" >&5)
+  (eval echo "\"\$as_me:5364: output\"" >&5)
   cat conftest.out >&5
   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
@@ -6347,5 +6567,5 @@
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 6349 "configure"' > conftest.$ac_ext
+  echo '#line 6569 "configure"' > conftest.$ac_ext
   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   (eval $ac_compile) 2>&5
@@ -7508,5 +7728,4 @@
 
 
-
 # Set options
 # Check whether --enable-static was given.
@@ -8008,9 +8227,9 @@
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:8010: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8229: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:8014: \$? = $ac_status" >&5
+   echo "$as_me:8233: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
@@ -8347,9 +8566,9 @@
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:8349: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8568: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:8353: \$? = $ac_status" >&5
+   echo "$as_me:8572: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
@@ -8452,9 +8671,9 @@
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:8454: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8673: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:8458: \$? = $ac_status" >&5
+   echo "$as_me:8677: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
@@ -8507,9 +8726,9 @@
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:8509: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8728: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:8513: \$? = $ac_status" >&5
+   echo "$as_me:8732: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
@@ -10891,5 +11110,5 @@
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 10893 "configure"
+#line 11112 "configure"
 #include "confdefs.h"
 
@@ -10987,5 +11206,5 @@
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 10989 "configure"
+#line 11208 "configure"
 #include "confdefs.h"
 
@@ -12943,9 +13162,9 @@
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:12945: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:13164: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:12949: \$? = $ac_status" >&5
+   echo "$as_me:13168: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
@@ -13042,9 +13261,9 @@
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:13044: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:13263: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:13048: \$? = $ac_status" >&5
+   echo "$as_me:13267: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
@@ -13094,9 +13313,9 @@
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:13096: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:13315: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:13100: \$? = $ac_status" >&5
+   echo "$as_me:13319: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
@@ -14072,5 +14291,4 @@
 # Automake initial setup
 ######################################################################
-
 am__api_version='1.11'
 
@@ -14881,4 +15099,5 @@
 esac
 AM_BACKSLASH='\'
+
 
 if test "x$CC" != xcc; then
@@ -17357,6 +17576,6 @@
 
 
-CPPFLAGS+=" "$PTHREAD_CFLAGS" "
-LDFLAGS+=" "$PTHREAD_CFLAGS" "
+CPPFLAGS+=" "$PTHREAD_CFLAGS
+LDFLAGS+=" "$PTHREAD_CFLAGS
 
 
@@ -17432,6 +17651,6 @@
 fi
 
-CPPFLAGS+=" "$READLINE_INCLUDES" "
-LDFLAGS+=" "$READLINE_LIBS" "
+CPPFLAGS+=" "$READLINE_INCLUDES
+LDFLAGS+=" "$READLINE_LIBS
 
 # Needed to compile FACT++
@@ -18544,6 +18763,6 @@
 
 
-CPPFLAGS+=" "$MOTIF_INCL" "
-LDFLAGS+=" "$MOTIF_LDFLAGS" "
+CPPFLAGS+=" "$MOTIF_INCL
+LDFLAGS+=" "$MOTIF_LDFLAGS
 
 if test "$lt_cv_libxp" = "yes"; then
@@ -19315,5 +19534,5 @@
 
 
-LDFLAGS+=" -lmysqlpp "
+LDFLAGS+=" -lmysqlpp"
 
 ######################################################################
@@ -21180,7 +21399,7 @@
 LDFLAGS+=" "$BOOST_PROGRAM_OPTIONS_LIB
 LDFLAGS+=" "$BOOST_REGEX_LIB
-LDFLAGS+=" "$BOOST_THREAD_LIB" "
-
-CPPFLAGS+=" "$BOOST_CPPFLAGS" "
+LDFLAGS+=" "$BOOST_THREAD_LIB
+
+CPPFLAGS+=" "$BOOST_CPPFLAGS
 
 #AC_CHECK_HEADERS(
@@ -22384,5 +22603,5 @@
 
 		cat > conftest.$ac_ext <<EOF
-#line 22386 "configure"
+#line 22605 "configure"
 #include "confdefs.h"
 #include <qglobal.h>
@@ -23032,5 +23251,5 @@
 
    ROOTCPPFLAGS=$ROOTCFLAGS" "$ROOTAUXCFLAGS
-   ROOTLDFLAGS="-L"$ROOTLIBDIR" -lGQt "
+   ROOTLDFLAGS="-L"$ROOTLIBDIR" -lGQt"
 
    #AC_CHECK_PROG(HAVE_ROOT_QT, libGQt.so.$ROOTSOVERSION, yes, no, $ROOTLIBDIR)
@@ -26090,4 +26309,12 @@
 { $as_echo "$as_me:${as_lineno-$LINENO}: " >&5
 $as_echo "$as_me: " >&6;}
+{ $as_echo "$as_me:${as_lineno-$LINENO}:  CFLAGS   = $CFLAGS" >&5
+$as_echo "$as_me:  CFLAGS   = $CFLAGS" >&6;}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: " >&5
+$as_echo "$as_me: " >&6;}
+{ $as_echo "$as_me:${as_lineno-$LINENO}:  CXXFLAGS = $CXXFLAGS" >&5
+$as_echo "$as_me:  CXXFLAGS = $CXXFLAGS" >&6;}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: " >&5
+$as_echo "$as_me: " >&6;}
 { $as_echo "$as_me:${as_lineno-$LINENO}:  CPPFLAGS = $CPPFLAGS" >&5
 $as_echo "$as_me:  CPPFLAGS = $CPPFLAGS" >&6;}
