arduino ethernet libraries macro selector

I've ran into a problem when doing something of this sort before. Let's say I have some code like so:

Sketch.ino:

#define SOME_MACRO
#include <Foo.h>

Foo.h:

#ifdef SOME_MACRO
//do something
#else
//do something else
#endif

Foo.cpp:

#include <Foo.h>

Now what happens is that when Foo.h is included from Sketch.ino SOME_MACRO is defined and so the "do something" code is executed but then Foo.h is included from Foo.cpp SOME_MACRO is not defined and so the "do something else" code is executed. This is a bit confusing because we're used to thinking that the Foo.h code will always be the same.

A useful technique for troubleshooting preprocessor conditionals is to use #warning to get some debug output. Make sure you have File > Preferences > Compiler warnings turned on so that you can see the #warning output.