Index: /m4/ax_log4cxx.m4
===================================================================
--- /m4/ax_log4cxx.m4	(revision 7536)
+++ /m4/ax_log4cxx.m4	(revision 7727)
@@ -11,5 +11,5 @@
 # LAST MODIFICATION
 #
-#   2008-12-11
+#   2010-03-09
 
 AC_DEFUN([AX_LOG4CXX],
@@ -17,35 +17,38 @@
   AC_LANG_PUSH([C++])
 
-  AC_CHECK_HEADERS([[log4cxx/logger.h]],,
-    [AC_MSG_ERROR([Could not find log4cxx headers (http://logging.apache.org/log4cxx/index.html)])
-  ])
+  AC_CHECK_HEADERS([[log4cxx/logger.h]],
+  [
 
-  AC_MSG_CHECKING([log4cxx library files (version >=0.10.0)])
+    AC_MSG_CHECKING([log4cxx library files (version >=0.10.0)])
 
-  dnl Save old $LIBS to eventually restore it.
-  ax_log4cxx_save_libs="$LIBS"
-  LIBS="$LIBS -llog4cxx"
+    dnl Save old $LIBS to eventually restore it.
+    ax_log4cxx_save_libs="$LIBS"
+    LIBS="$LIBS -llog4cxx"
   
-  AC_LINK_IFELSE([AC_LANG_PROGRAM(
-    [[
-#include <log4cxx/logger.h>
-#include <log4cxx/basicconfigurator.h>
-    ]], [
-    log4cxx::BasicConfigurator::configure();
-    log4cxx::LoggerPtr logger = log4cxx::Logger::getRootLogger();
-    logger->setLevel(log4cxx::Level::getDebug());
-    LOG4CXX_INFO(logger, "Simple message text.");])],
-    dnl Success
-    AC_MSG_RESULT(yes)
-    [LIBS="-llog4cxx $LIBS"]
-    AC_DEFINE(HAVE_LIBLOG4CXX, [1], "Define to 1 if you have log4cxx library installed")
-    , dnl failed
-    AC_MSG_RESULT(no)
-    AC_MSG_FAILURE([[Could not find log4cxx library.
+    AC_LINK_IFELSE([AC_LANG_PROGRAM(
+      [[
+        #include <log4cxx/logger.h>
+        #include <log4cxx/basicconfigurator.h>
+      ]], [
+      log4cxx::BasicConfigurator::configure();
+      log4cxx::LoggerPtr logger = log4cxx::Logger::getRootLogger();
+      logger->setLevel(log4cxx::Level::getDebug());
+      LOG4CXX_INFO(logger, "Simple message text.");])],
+      dnl Success
+      AC_MSG_RESULT(yes)
+      [LIBS="-llog4cxx $LIBS"]
+      AC_DEFINE(HAVE_LIBLOG4CXX, [1], "Define to 1 if you have log4cxx library installed")
+      , dnl failed
+      AC_MSG_RESULT(no)
+      AC_MSG_ERROR([[Could not find log4cxx library.
 Version 0.10.0 or greater is required.
 (http://logging.apache.org/log4cxx/index.html)]])
-    dnl restore old lib state
-    LIBS="$ax_log4cxx_save_libs")
+      dnl restore old lib state
+      LIBS="$ax_log4cxx_save_libs")
     
-  AC_LANG_POP
+    AC_LANG_POP
+  ]
+
+  ,[AC_MSG_WARN([Could not find log4cxx headers (http://logging.apache.org/log4cxx/index.html), logging will be directly to STDOUT])])
+
 ])
Index: /source/ariba/utility/logging/Logging.h
===================================================================
--- /source/ariba/utility/logging/Logging.h	(revision 7536)
+++ /source/ariba/utility/logging/Logging.h	(revision 7727)
@@ -42,7 +42,9 @@
 #include <iostream>
 #include <cstdlib>
+
+#ifdef HAVE_LOG4CXX_LOGGER_H
 #include <log4cxx/logger.h>
 #include <log4cxx/basicconfigurator.h>
-
+#endif // HAVE_LOG4CXX_LOGGER_H
 
 #ifdef LOGCOLORS
@@ -64,16 +66,36 @@
 #endif // ENABLE_LOGCOLORS
 
-#define use_logging_h(x) \
-	private: static log4cxx::LoggerPtr logger;
 
-#define use_logging_cpp(x) \
+#ifdef HAVE_LOG4CXX_LOGGER_H
+
+  #define use_logging_h(x) \
+  	private: static log4cxx::LoggerPtr logger;
+
+  #define use_logging_cpp(x) \
 	log4cxx::LoggerPtr x::logger(log4cxx::Logger::getLogger(#x));
 
-#define logging_trace(x)  {            LOG4CXX_TRACE(logger,x);                         }
-#define logging_debug(x)  {colorDebug; LOG4CXX_DEBUG(logger,x); colorDefault;           }
-#define logging_info(x)   {colorInfo;  LOG4CXX_INFO(logger,x);  colorDefault;           }
-#define logging_warn(x)   {colorWarn;  LOG4CXX_WARN(logger,x);  colorDefault;           }
-#define logging_error(x)  {colorError; LOG4CXX_ERROR(logger,x); colorDefault;           }
-#define logging_fatal(x)  {colorError; LOG4CXX_FATAL(logger,x); colorDefault; exit(-1); }
+  #define logging_trace(x)  {            LOG4CXX_TRACE(logger,x);                         }
+  #define logging_debug(x)  {colorDebug; LOG4CXX_DEBUG(logger,x); colorDefault;           }
+  #define logging_info(x)   {colorInfo;  LOG4CXX_INFO(logger,x);  colorDefault;           }
+  #define logging_warn(x)   {colorWarn;  LOG4CXX_WARN(logger,x);  colorDefault;           }
+  #define logging_error(x)  {colorError; LOG4CXX_ERROR(logger,x); colorDefault;           }
+  #define logging_fatal(x)  {colorError; LOG4CXX_FATAL(logger,x); colorDefault; exit(-1); }
+
+#else // HAVE_LOG4CXX_LOGGER_H
+
+  #define use_logging_h(x)
+
+  #define use_logging_cpp(x)
+
+  #define logging_stdout(x) std::cout << x << std::endl;
+
+  #define logging_trace(x)
+  #define logging_debug(x)  {colorDebug; logging_stdout(x); colorDefault;           }
+  #define logging_info(x)   {colorInfo;  logging_stdout(x);  colorDefault;           }
+  #define logging_warn(x)   {colorWarn;  logging_stdout(x);  colorDefault;           }
+  #define logging_error(x)  {colorError; logging_stdout(x); colorDefault;           }
+  #define logging_fatal(x)  {colorError; logging_stdout(x); colorDefault; exit(-1); }
+
+#endif // HAVE_LOG4CXX_LOGGER_H
 
 #endif //LOGGING_H__
Index: /source/ariba/utility/system/StartupWrapper.cpp
===================================================================
--- /source/ariba/utility/system/StartupWrapper.cpp	(revision 7536)
+++ /source/ariba/utility/system/StartupWrapper.cpp	(revision 7727)
@@ -39,4 +39,9 @@
 #include "StartupWrapper.h"
 #include "ariba/config.h"
+
+#ifdef HAVE_LOG4CXX_LOGGER_H
+#include <log4cxx/logger.h>
+#include <log4cxx/basicconfigurator.h>
+#endif // HAVE_LOG4CXX_LOGGER_H
 
 namespace ariba {
@@ -93,5 +98,6 @@
 	// configure the logging
 	//
-
+        
+#ifdef HAVE_LOG4CXX_LOGGER_H
 	log4cxx::BasicConfigurator::configure();
 
@@ -109,4 +115,5 @@
 	}
 #endif //HAVE_MAEMO
+#endif //HAVE_LOG4CXX_LOGGER_H
 }
 
