From 503fec523d155d8111ea933579ff0e4466a39aaf Mon Sep 17 00:00:00 2001 From: Eliot Horowitz Date: Thu, 12 Mar 2009 09:30:14 -0400 Subject: [PATCH 1/2] build mongosniff anywhere pcap is installed --- SConstruct | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/SConstruct b/SConstruct index 38148b4e69d..c318912e061 100644 --- a/SConstruct +++ b/SConstruct @@ -408,6 +408,8 @@ def doConfigure( myenv , needJava=True , needPcre=True , shell=False ): myCheckLib( "pcrecpp" , True ) myCheckLib( "pcre" , True ) + myenv["_HAVEPCAP"] = myCheckLib( "pcap" ) + if shell: haveReadLine = False if darwin: @@ -546,7 +548,7 @@ perftest = testEnv.Program( "perftest", "dbtests/perf/perftest.cpp" ) clientTests += [ clientEnv.Program( "clientTest" , [ "client/examples/clientTest.cpp" ] ) ] # --- sniffer --- -if nix and darwin: +if darwin or clientEnv["_HAVEPCAP"]: sniffEnv = clientEnv.Clone() sniffEnv.Append( LIBS=[ "pcap" ] ) sniffEnv.Program( "mongosniff" , "tools/sniffer.cpp" ) From e2d87d8b1fbbdee7f77b9f7d6cecbf853e47d1de Mon Sep 17 00:00:00 2001 From: Eliot Horowitz Date: Thu, 12 Mar 2009 09:54:21 -0400 Subject: [PATCH 2/2] debugBuild adds DEV --- stdafx.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/stdafx.h b/stdafx.h index adcfe89e881..caab527aa50 100644 --- a/stdafx.h +++ b/stdafx.h @@ -280,13 +280,17 @@ namespace mongo { use this to log things just there. */ #if defined(_WIN32) -#define DEV if( 0 ) #define WIN if( 1 ) #else -#define DEV if( 0 ) #define WIN if( 0 ) #endif +#if defined(_DEBUG) +#define DEV if( 1 ) +#else +#define DEV if( 0 ) +#endif + #define DEBUGGING if( 0 ) extern unsigned occasion;