Arduino configure script for conditional compilation of libraries
The problem here is that the Arduino IDE is not setup for doing this. Any real IDE has the possibility to set defines.  

If you want your library to be used by arduino IDE users you will have to go to dirty routes like the #include and config.h approach already mentioned.
If I'm not mistaken arduino IDE compiles libraries with the full include path so you can have the config.h next to your sketch.ino file.

If the library is not intended for arduino IDE users I would advice using a real IDE like my Arduino Eclipse Plugin.