Index: /OpenSceneGraph/trunk/include/osg/Notify
===================================================================
--- /OpenSceneGraph/trunk/include/osg/Notify (revision 11047)
+++ /OpenSceneGraph/trunk/include/osg/Notify (revision 11057)
@@ -46,9 +46,13 @@
 extern OSG_EXPORT NotifySeverity getNotifyLevel();
 
-/** is notification enabled, given the current setNotifyLevel() setting? */
-extern OSG_EXPORT bool isNotifyEnabled(NotifySeverity severity);
-
 /** initialize notify level. */
 extern OSG_EXPORT bool initNotifyLevel();
+
+#ifdef OSG_NOTIFY_DISABLED
+    inline bool isNotifyEnabled(NotifySeverity) { return false; }
+#else
+    /** is notification enabled, given the current setNotifyLevel() setting? */
+    extern OSG_EXPORT bool isNotifyEnabled(NotifySeverity severity);
+#endif
 
 /** notify messaging function for providing fatal through to verbose
@@ -77,11 +81,9 @@
 
 #define OSG_NOTIFY(level) if (isNotifyEnabled(level)) osg::notify(level)
-
-#if _DEBUG
-    #define OSG_DEBUG_NOTIFY(level) if (isNotifyEnabled(level)) osg::notify(level)
-#else
-    // when using an optimized build use if (false) to tell the compiler to ignore the rest of the notify.
-    #define OSG_DEBUG_NOTIFY(level) if (false) osg::notify(level)
-#endif
+#define OSG_FATAL OSG_NOTIFY(osg::FALTAL)
+#define OSG_WARN OSG_NOTIFY(osg::WARN)
+#define OSG_NOTICE OSG_NOTIFY(osg::NOTICE)
+#define OSG_INFO OSG_NOTIFY(osg::INFO)
+#define OSG_DEBUG OSG_NOTIFY(osg::DEBUG_INFO)
 
 /** Handler processing output of notification stream. It acts as a sink to 
Index: /OpenSceneGraph/trunk/src/osg/Notify.cpp
===================================================================
--- /OpenSceneGraph/trunk/src/osg/Notify.cpp (revision 10764)
+++ /OpenSceneGraph/trunk/src/osg/Notify.cpp (revision 11057)
@@ -115,4 +115,5 @@
 static osg::ApplicationUsageProxy Notify_e0(osg::ApplicationUsage::ENVIRONMENTAL_VARIABLE, "OSG_NOTIFY_LEVEL <mode>", "FATAL | WARN | NOTICE | DEBUG_INFO | DEBUG_FP | DEBUG | INFO | ALWAYS");
 
+static bool s_NeedNotifyInit = true;
 static osg::NotifySeverity g_NotifyLevel = osg::NOTICE;
 static osg::NullStream *g_NullStream;
@@ -121,5 +122,5 @@
 void osg::setNotifyLevel(osg::NotifySeverity severity)
 {
-    osg::initNotifyLevel();
+    if (s_NeedNotifyInit) osg::initNotifyLevel();
     g_NotifyLevel = severity;
 }
@@ -128,5 +129,5 @@
 osg::NotifySeverity osg::getNotifyLevel()
 {
-    osg::initNotifyLevel();
+    if (s_NeedNotifyInit) osg::initNotifyLevel();
     return g_NotifyLevel;
 }
@@ -141,5 +142,5 @@
 osg::NotifyHandler* osg::getNotifyHandler()
 {
-    osg::initNotifyLevel();
+    if (s_NeedNotifyInit) osg::initNotifyLevel();
     osg::NotifyStreamBuffer *buffer = static_cast<osg::NotifyStreamBuffer *>(g_NotifyStream->rdbuf());
     return buffer ? buffer->getNotifyHandler() : 0;
@@ -148,9 +149,6 @@
 bool osg::initNotifyLevel()
 {
-    static bool s_NotifyInit = false;
     static osg::NullStream s_NullStream;
     static osg::NotifyStream s_NotifyStream;
-
-    if (s_NotifyInit) return true;
 
     g_NullStream = &s_NullStream;
@@ -194,5 +192,5 @@
         buffer->setNotifyHandler(new StandardNotifyHandler);
 
-    s_NotifyInit = true;
+    s_NeedNotifyInit = false;
 
     return true;
@@ -200,18 +198,17 @@
 }
 
+#ifndef OSG_NOTIFY_DISABLED
 bool osg::isNotifyEnabled( osg::NotifySeverity severity )
 {
+    if (s_NeedNotifyInit) osg::initNotifyLevel();
     return severity<=g_NotifyLevel;
 }
+#endif
 
 std::ostream& osg::notify(const osg::NotifySeverity severity)
 {
-    static bool initialized = false;
-    if (!initialized) 
-    {
-        initialized = osg::initNotifyLevel();
-    }
-
-    if (severity<=g_NotifyLevel)
+    if (s_NeedNotifyInit) osg::initNotifyLevel();
+
+    if (osg::isNotifyEnabled(severity))
     {
         g_NotifyStream->setCurrentSeverity(severity);
Index: /OpenSceneGraph/trunk/src/osg/Config.in
===================================================================
--- /OpenSceneGraph/trunk/src/osg/Config.in (revision 10772)
+++ /OpenSceneGraph/trunk/src/osg/Config.in (revision 11057)
@@ -24,4 +24,5 @@
 #define OSG_CONFIG 1
 
+#cmakedefine OSG_NOTIFY_DISABLED
 #cmakedefine OSG_USE_FLOAT_MATRIX
 #cmakedefine OSG_USE_FLOAT_PLANE
Index: /OpenSceneGraph/trunk/CMakeLists.txt
===================================================================
--- /OpenSceneGraph/trunk/CMakeLists.txt (revision 11055)
+++ /OpenSceneGraph/trunk/CMakeLists.txt (revision 11057)
@@ -264,4 +264,6 @@
 #luigi#ENDIF(UNIX)
 ########################################################################################################
+
+OPTION(OSG_NOTIFY_DISABLED "Set to ON to build OpenSceneGraph with the noitfy() disabled." OFF)
 
 OPTION(OSG_USE_FLOAT_MATRIX "Set to ON to build OpenSceneGraph with float Matrix instead of double." OFF)
