Use OpenMP by default
[ctsim.git] / configure.ac
index 80b048414203a67e4f9e2117a5a4c78a7565d127..930c62a2d65976362581aa3af73d07993f62c2cc 100644 (file)
@@ -46,6 +46,9 @@ AC_PROG_RANLIB
 
 AC_PROG_CC
 AC_PROG_CXX
+CFLAGS=""
+CXXFLAGS=""
+
 AC_C_BIGENDIAN
 
 AC_PATH_PROG(wxconfig,wx-config)
@@ -182,7 +185,7 @@ if test "$debug" = "true" ; then
   CFLAGS="$CFLAGS -g -O0 -DDEBUG"
   AC_DEFINE(DEBUG,1,[turn on debugging])
 else
-  CFLAGS="$CFLAGS -O2 -DNDEBUG -fomit-frame-pointer"
+  CFLAGS="$CFLAGS -g -O4 -DNDEBUG -fomit-frame-pointer"
   AC_DEFINE(NDEBUG,1,[no debugging])
 fi
 
@@ -204,9 +207,7 @@ AC_MSG_CHECKING(sstream)
 
 CFLAGS="$CFLAGS -Wall"
 AC_MSG_CHECKING(whether to enable verbose warnings)
-AC_ARG_ENABLE(verbose-warnings,
-[  --enable-verbose-warnings
-                          Enable verbose compiler warnings.],
+AC_ARG_ENABLE(verbose-warnings,AS_HELP_STRING([--enable-verbose-warnings],[Enable verbose compiler warnings.]),
 [ case "$enableval" in
   yes)
     AC_MSG_RESULT(yes)
@@ -219,9 +220,7 @@ AC_ARG_ENABLE(verbose-warnings,
 )
 
 AC_MSG_CHECKING(static executables)
-AC_ARG_ENABLE(static,
-[  --enable-static
-                            Enable static executables.],
+AC_ARG_ENABLE(static,AS_HELP_STRING([--enable-static],[Enable static executables]),
 [ case "$enableval" in
   yes)
     AC_MSG_RESULT(yes)
@@ -234,26 +233,15 @@ AC_ARG_ENABLE(static,
 )
 
 dnl Checking if use OpenMP
-AC_MSG_CHECKING(OpenMP)
-AC_ARG_ENABLE(openmp,
-[  --enable-openmp
-                            Enable use of OpenMP.],
-[ case "$enableval" in
-  yes)
-    AC_MSG_RESULT(yes)
+AC_ARG_ENABLE([openmp], AS_HELP_STRING([--disable-openmp],[Disable use of OpenMP]))
+AS_IF([test "x$enable_openmp" != "xno"], [
     AX_OPENMP
     CFLAGS="$CFLAGS $OPENMP_CFLAGS"
     CXXFLAGS="$CXXFLAGS $OPENMP_CXXFLAGS"
-    ;;
-  *)
-    AC_MSG_RESULT(no)
-    ;;
-  esac ], AC_MSG_RESULT(no)
-)
+])
 
 dnl Set LAM path
-AC_ARG_WITH(lam,
-[  --with-lam[=PATH]         Set path of LAM MPI ],
+AC_ARG_WITH(lam,AS_HELP_STRING([--with-lam[=PATH]],[Set path of LAM MPI ]),
 [    if test "$withval" != "no" ; then
          trylamdir=$withval
      fi ]
@@ -473,7 +461,7 @@ dnl Check for efence
 AC_CHECK_LIB(efence, main, [efence=true], [efence=false])
 AC_MSG_CHECKING([for enable-efence])
 AC_ARG_ENABLE(efence,
-[  --enable-efence        Use ElectricFence memory allocation],
+[--enable-efence],[Use ElectricFence memory allocation],
 [case "${enableval}" in
   yes) useefence=true 
        AC_MSG_RESULT(yes)