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" ) 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;