when defining WITHOUT_BUTTON I got a compile error, bool accelerationEnabled undefined.
Looking at the code, the #endif included the declaration of accelerationEnabled;
by moving the #endif up one line, this fixed the problem.
#ifndef WITHOUT_BUTTON
volatile Button button;
bool doubleClickEnabled;
#endif
bool accelerationEnabled;
//#endif -- the was in the wrong place