[cig-commits] r13748 - in cs/cigma/trunk: . config

luis at geodynamics.org luis at geodynamics.org
Wed Dec 17 02:33:00 PST 2008


Author: luis
Date: 2008-12-17 02:33:00 -0800 (Wed, 17 Dec 2008)
New Revision: 13748

Added:
   cs/cigma/trunk/config/cigma_cxxtl.m4
Modified:
   cs/cigma/trunk/Makefile.am
   cs/cigma/trunk/configure.ac
Log:
Added --with-logger option to ./configure script

Modified: cs/cigma/trunk/Makefile.am
===================================================================
--- cs/cigma/trunk/Makefile.am	2008-12-17 10:32:58 UTC (rev 13747)
+++ cs/cigma/trunk/Makefile.am	2008-12-17 10:33:00 UTC (rev 13748)
@@ -60,11 +60,10 @@
 
 
 ###############################################################################
-# Trivial logger
-
-# XXX: determine these from a ./configure option
+# Trivial logger (cxxtl)
+# These are now determined by CIGMA_OPTIONS_CXXTL (example values below)
 #LOGGER_FLAGS = -DTLOG
-LOGGER_FLAGS = -DETLOG
+#LOGGER_FLAGS = -DETLOG
 #LOGGER_FLAGS = -DFTLOG=cigma
 
 

Added: cs/cigma/trunk/config/cigma_cxxtl.m4
===================================================================
--- cs/cigma/trunk/config/cigma_cxxtl.m4	                        (rev 0)
+++ cs/cigma/trunk/config/cigma_cxxtl.m4	2008-12-17 10:33:00 UTC (rev 13748)
@@ -0,0 +1,41 @@
+###############################################################################
+# -*- Autoconf -*-
+#
+
+###############################################################################
+# 
+# CIGMA_OPTIONS_CXXTL
+#
+# Adds the --with-logger=VAL option to the configure script
+#
+AC_DEFUN([CIGMA_OPTIONS_CXXTL],[
+
+    LOGGER_FLAGS=""
+
+    AC_ARG_WITH([logger],
+        [AC_HELP_STRING([--with-logger],[One of stderr, stdout, or FILE @<:@default=stderr@:>@])],
+        [with_logger="$withval"],
+        [with_logger="stderr"])
+
+    if [[ $with_logger = "yes" ]]; then
+        with_logger="stderr"
+    fi
+
+    if [[ $with_logger = "no" ]]; then
+        LOGGER_FLAGS="-DCLEANTLOG"
+    else
+        if [[ $with_logger = "stdout" ]]; then
+            LOGGER_FLAGS="-DTLOG"
+        else
+            if [[ $with_logger = "stderr" ]]; then
+                LOGGER_FLAGS="-DETLOG"
+            else
+                LOGGER_FLAGS="-DFTLOG=\"${with_logger}\""
+            fi
+        fi
+    fi
+
+    AC_SUBST(LOGGER_FLAGS)
+])
+
+# vim: syntax=config

Modified: cs/cigma/trunk/configure.ac
===================================================================
--- cs/cigma/trunk/configure.ac	2008-12-17 10:32:58 UTC (rev 13747)
+++ cs/cigma/trunk/configure.ac	2008-12-17 10:33:00 UTC (rev 13748)
@@ -70,7 +70,6 @@
 fi
 AM_CONDITIONAL([COND_BOOST_PYTHON], [test -n "$BOOST_PYTHON_LIB"])
 
-
 dnl Check whether to use distutils (XXX: change default to yes)
 AC_ARG_WITH([distutils],
     [AC_HELP_STRING([--with-distutils], [Use distutils for compiling the cigma python extension module.@<:@default=no@:>@])],
@@ -97,6 +96,10 @@
 AM_CONDITIONAL(COND_VTK, [test "x${with_vtk}" = xyes])
 
 
+dnl Configure cxxtl
+CIGMA_OPTIONS_CXXTL
+
+
 dnl Determine whether to enable unit testing
 AC_ARG_ENABLE([testing],
     [AC_HELP_STRING([--enable-testing], [enable unit testing with cppunit (requires cppunit) @<:@default=yes@:>@])],
@@ -133,7 +136,7 @@
 dnl Print out some configuration information
 echo "********************************************************************"
 echo "Cigma is configured with"
-echo "- OS : $UNAME"
+echo "- OS           : $UNAME"
 echo "- C compiler   : $CC"
 echo "- C++ compiler : $CXX"
 
@@ -172,4 +175,8 @@
 echo "- CPPUNIT_CFLAGS : $CPPUNIT_CFLAGS"
 echo "- CPPUNIT_LIBS   : $CPPUNIT_LIBS"
 
+# Other flags
+echo "-"
+echo "- LOGGER_FLAGS   : $LOGGER_FLAGS"
+
 # vim:foldmethod=marker foldlevel=2



More information about the CIG-COMMITS mailing list