diff --git a/FL/Enumerations.H b/FL/Enumerations.H
index 941a6a5..8b1544c 100644
--- a/FL/Enumerations.H
+++ b/FL/Enumerations.H
@@ -29,6 +29,10 @@
  */
 //#define FLTK_ABI_VERSION 10303
 
+#ifndef FLTK_ABI_VERSION
+#  define FLTK_ABI_VERSION 0
+#endif
+
 #  include "Fl_Export.H"
 #  include "fl_types.h"
 
diff --git a/FL/Fl_Table.H b/FL/Fl_Table.H
index 15accb2..9f0eb6c 100644
--- a/FL/Fl_Table.H
+++ b/FL/Fl_Table.H
@@ -964,7 +964,7 @@ public:
     Fl_Widget::do_callback();
   }
   
-#if FL_DOXYGEN
+#ifdef FL_DOXYGEN
   /**
    The Fl_Widget::when() function is used to set a group of flags, determining
    when the widget callback is called:
@@ -996,7 +996,7 @@ public:
   void when(Fl_When flags);
 #endif
   
-#if FL_DOXYGEN
+#ifdef FL_DOXYGEN
   /**
    Callbacks will be called depending on the setting of Fl_Widget::when().
    
diff --git a/configh.cmake.in b/configh.cmake.in
index 701e29e..e41b18b 100644
--- a/configh.cmake.in
+++ b/configh.cmake.in
@@ -56,7 +56,7 @@
  * (many broken Mesa RPMs do not...)
  */
 
-#cmakedefine01 HAVE_GL_GLU_H
+#cmakedefine HAVE_GL_GLU_H
 
 /*
  * HAVE_GLXGETPROCADDRESSARB:
@@ -64,7 +64,7 @@
  * Do you have the OpenGL glXGetProcAddressARB() function?
  */
 
-#cmakedefine HAVE_GLXGETPROCADDRESSARB %HAVE_GLXGETPROCADDRESSARB%
+#cmakedefine HAVE_GLXGETPROCADDRESSARB
 
 /*
  * USE_COLORMAP:
@@ -123,7 +123,7 @@
  * other operating systems than Mac OS X.
  */
 
-#cmakedefine __APPLE_QUARTZ__ @__APPLE_QUARTZ__@
+#cmakedefine __APPLE_QUARTZ__
 
 
 /*
@@ -133,7 +133,7 @@
  *
  */
 
-#cmakedefine USE_X11 @USE_X11@
+#cmakedefine USE_X11
 
 /*
  * HAVE_OVERLAY:
@@ -181,35 +181,35 @@
  * Where is <dirent.h> (used only by fl_file_chooser and scandir).
  */
 
-#cmakedefine HAVE_DIRENT_H @HAVE_DIRENT_H@
-#cmakedefine HAVE_SYS_NDIR_H @HAVE_SYS_NDIR_H@
-#cmakedefine HAVE_SYS_DIR_H @HAVE_SYS_DIR_H@
-#cmakedefine HAVE_NDIR_H @HAVE_NDIR_H@
-#cmakedefine HAVE_SCANDIR @HAVE_SCANDIR@
-#cmakedefine HAVE_SCANDIR_POSIX @HAVE_SCANDIR_POSIX@
+#cmakedefine HAVE_DIRENT_H
+#cmakedefine HAVE_SYS_NDIR_H
+#cmakedefine HAVE_SYS_DIR_H
+#cmakedefine HAVE_NDIR_H
+#cmakedefine HAVE_SCANDIR
+#cmakedefine HAVE_SCANDIR_POSIX
 
 /*
  * Possibly missing sprintf-style functions:
  */
 
-#cmakedefine HAVE_VSNPRINTF @HAVE_VSNPRINTF@
-#cmakedefine HAVE_SNPRINTF @HAVE_SNPRINTF@
+#cmakedefine HAVE_VSNPRINTF
+#cmakedefine HAVE_SNPRINTF
 
 /*
  * String functions and headers...
  */
 
-#cmakedefine HAVE_STRINGS_H @HAVE_STRINGS_H@
-#cmakedefine HAVE_STRCASECMP @HAVE_STRCASECMP@
-#cmakedefine HAVE_STRLCAT @HAVE_STRLCAT@
-#cmakedefine HAVE_STRLCPY @HAVE_STRLCPY@
+#cmakedefine HAVE_STRINGS_H
+#cmakedefine HAVE_STRCASECMP
+#cmakedefine HAVE_STRLCAT
+#cmakedefine HAVE_STRLCPY
 
 /*
  * Do we have POSIX locale support?
  */
 
-#cmakedefine HAVE_LOCALE_H @HAVE_LOCALE_H@
-#cmakedefine HAVE_LOCALECONV @HAVE_LOCALECONV@
+#cmakedefine HAVE_LOCALE_H
+#cmakedefine HAVE_LOCALECONV
 
 /*
  * HAVE_SYS_SELECT_H:
@@ -217,7 +217,7 @@
  * Whether or not select() call has its own header file.
  */
 
-#cmakedefine01 HAVE_SYS_SELECT_H
+#cmakedefine HAVE_SYS_SELECT_H
 
 /*
  * HAVE_SYS_STDTYPES_H:
@@ -225,7 +225,7 @@
  * Whether or not we have the <sys/stdtypes.h> header file.
  */
 
-#cmakedefine HAVE_SYS_STDTYPES_H @HAVE_SYS_STDTYPES_H@
+#cmakedefine HAVE_SYS_STDTYPES_H
 
 /*
  * USE_POLL:
@@ -239,9 +239,9 @@
  * Do we have various image libraries?
  */
 
-#cmakedefine HAVE_LIBPNG @HAVE_LIBPNG@
-#cmakedefine HAVE_LIBZ @HAVE_LIBZ@
-#cmakedefine HAVE_LIBJPEG @HAVE_LIBJPEG@
+#cmakedefine HAVE_LIBPNG
+#cmakedefine HAVE_LIBZ
+#cmakedefine HAVE_LIBJPEG
 
 /*
  * FLTK_USE_CAIRO
@@ -250,7 +250,7 @@
  * will implies to link cairo.lib in all fltk based apps.
  */
 
-#cmakedefine FLTK_USE_CAIRO @FLTK_USE_CAIRO@
+#cmakedefine FLTK_USE_CAIRO
 
 /*
  * FLTK_HAVE_CAIRO
@@ -258,39 +258,39 @@
  * Do we have the cairo library available?
  */
 
-#cmakedefine FLTK_HAVE_CAIRO @FLTK_HAVE_CAIRO@
+#cmakedefine FLTK_HAVE_CAIRO
 
 /*
  * Which header file do we include for libpng?
  */
 
-#cmakedefine HAVE_PNG_H @HAVE_PNG_H@
-#cmakedefine HAVE_LIBPNG_PNG_H @HAVE_LIBPNG_PNG_H@
+#cmakedefine HAVE_PNG_H
+#cmakedefine HAVE_LIBPNG
 
 /*
  * Do we have the png_xyz() functions?
  */
 
-#cmakedefine HAVE_PNG_GET_VALID @HAVE_PNG_GET_VALID@
-#cmakedefine HAVE_PNG_SET_TRNS_TO_ALPHA @HAVE_PNG_SET_TRNS_TO_ALPHA@
+#cmakedefine HAVE_PNG_GET_VALID
+#cmakedefine HAVE_PNG_SET_TRNS_TO_ALPHA
 
 /*
  * Do we have POSIX threading?
  */
 
-#cmakedefine HAVE_PTHREAD @HAVE_PTHREAD@
-#cmakedefine01 HAVE_PTHREAD_H
+#cmakedefine HAVE_PTHREAD
+#cmakedefine HAVE_PTHREAD_H
 
 /*
  * Do we have the ALSA library?
  */
 
-#cmakedefine HAVE_ALSA_ASOUNDLIB_H @HAVE_ALSA_ASOUNDLIB_H@
+#cmakedefine HAVE_ALSA_ASOUNDLIB_H
 /*
  * Do we have the long long type?
  */
 
-#cmakedefine HAVE_LONG_LONG @HAVE_LONG_LONG@
+#cmakedefine HAVE_LONG_LONG
 
 #ifdef HAVE_LONG_LONG
 #  define FLTK_LLFMT	"%lld"
@@ -304,8 +304,8 @@
  * Do we have the dlsym() function and header?
  */
 
-#cmakedefine HAVE_DLFCN_H @HAVE_DLFCN_H@
-#cmakedefine HAVE_DLSYM @HAVE_DLSYM@
+#cmakedefine HAVE_DLFCN_H
+#cmakedefine HAVE_DLSYM
 
 /*
  * End of "$Id: configh.cmake.in 9974 2013-09-11 12:54:40Z ossman $".
diff --git a/fluid/factory.cxx b/fluid/factory.cxx
index 4bf92d6..b1e6629 100644
--- a/fluid/factory.cxx
+++ b/fluid/factory.cxx
@@ -37,7 +37,7 @@
 
 extern Fl_Pixmap *pixmap[];
 
-#if !HAVE_STRCASECMP
+#ifndef HAVE_STRCASECMP
 //
 // 'strcasecmp()' - Do a case-insensitive compare...
 //
diff --git a/src/Fl_Input.cxx b/src/Fl_Input.cxx
index 60c38ed..a05a39a 100644
--- a/src/Fl_Input.cxx
+++ b/src/Fl_Input.cxx
@@ -717,7 +717,7 @@ int Fl_Input::handle(int event) {
       // fall through:
     case FL_DND_DRAG: 
       //int p = mouse_position(X, Y, W, H);
-#if DND_OUT_XXXX
+#ifdef DND_OUT_XXXX
       if (Fl::focus()==this && (p>=dnd_save_position && p<=dnd_save_mark ||
                                 p>=dnd_save_mark && p<=dnd_save_position)) {
         position(dnd_save_position, dnd_save_mark);
@@ -733,7 +733,7 @@ int Fl_Input::handle(int event) {
       
     case FL_DND_LEAVE:
       position(dnd_save_position, dnd_save_mark);
-#if DND_OUT_XXXX
+#ifdef DND_OUT_XXXX
       if (!focused())
 #endif
         if (dnd_save_focus != this) {
diff --git a/src/Fl_grab.cxx b/src/Fl_grab.cxx
index 20e13f1..bd95bab 100644
--- a/src/Fl_grab.cxx
+++ b/src/Fl_grab.cxx
@@ -42,7 +42,7 @@ extern void *fl_capture;
 #endif
 
 void Fl::grab(Fl_Window* win) {
-#if USE_X11
+#ifdef USE_X11
     Fl_Window *fullscreen_win = NULL;
     for (Fl_Window *W = Fl::first_window(); W; W = Fl::next_window(W)) {
       if (W->fullscreen_active()) {
diff --git a/src/Fl_lock.cxx b/src/Fl_lock.cxx
index db9965a..73abd22 100644
--- a/src/Fl_lock.cxx
+++ b/src/Fl_lock.cxx
@@ -246,7 +246,7 @@ void Fl::awake(void* msg) {
 
 ////////////////////////////////////////////////////////////////
 // POSIX threading...
-#elif HAVE_PTHREAD
+#elif defined(HAVE_PTHREAD)
 #  include <unistd.h>
 #  include <fcntl.h>
 #  include <pthread.h>
diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx
index f03da46..d2fedcc 100644
--- a/src/Fl_x.cxx
+++ b/src/Fl_x.cxx
@@ -43,7 +43,7 @@
 #  include <X11/Xlocale.h>
 #  include <X11/Xlib.h>
 #  include <X11/keysym.h>
-#define USE_XRANDR (HAVE_DLSYM && HAVE_DLFCN_H) // means attempt to dynamically load libXrandr.so
+#define USE_XRANDR (defined(HAVE_DLSYM) && defined(HAVE_DLFCN_H)) // means attempt to dynamically load libXrandr.so
 #if USE_XRANDR
 #include <dlfcn.h>
 #define RRScreenChangeNotifyMask  (1L << 0) // from X11/extensions/Xrandr.h
@@ -72,7 +72,7 @@ Fl_Display_Device *Fl_Display_Device::_display = &fl_xlib_display;// the platfor
 static pollfd *pollfds = 0;
 
 #  else
-#    if HAVE_SYS_SELECT_H
+#    ifdef HAVE_SYS_SELECT_H
 #      include <sys/select.h>
 #    endif /* HAVE_SYS_SELECT_H */
 
@@ -1551,7 +1551,7 @@ int fl_handle(const XEvent& thisevent)
     case 149: keysym = FL_Menu; break;
     }
 #  endif
-#  if BACKSPACE_HACK
+#  ifdef BACKSPACE_HACK
     // Attempt to fix keyboards that send "delete" for the key in the
     // upper-right corner of the main keyboard.  But it appears that
     // very few of these remain?
diff --git a/src/fl_font_xft.cxx b/src/fl_font_xft.cxx
index 7e4824c..54a1867 100644
--- a/src/fl_font_xft.cxx
+++ b/src/fl_font_xft.cxx
@@ -542,7 +542,7 @@ XFontStruct* Fl_XFont_On_Demand::value() {
   return ptr;
 }
 
-#if USE_OVERLAY
+#ifdef USE_OVERLAY
 // Currently Xft does not work with colormapped visuals, so this probably
 // does not work unless you have a true-color overlay.
 extern bool fl_overlay;
@@ -556,7 +556,7 @@ extern XVisualInfo* fl_overlay_visual;
 
 static XftDraw* draw_;
 static Window draw_window;
-#if USE_OVERLAY
+#ifdef USE_OVERLAY
 static XftDraw* draw_overlay;
 static Window draw_overlay_window;
 #endif
@@ -564,7 +564,7 @@ static Window draw_overlay_window;
 void fl_destroy_xft_draw(Window id) {
   if (id == draw_window)
     XftDrawChange(draw_, draw_window = fl_message_window);
-#if USE_OVERLAY
+#ifdef USE_OVERLAY
   if (id == draw_overlay_window)
     XftDrawChange(draw_overlay, draw_overlay_window = fl_message_window);
 #endif
@@ -574,7 +574,7 @@ void Fl_Xlib_Graphics_Driver::draw(const char *str, int n, int x, int y) {
   if ( !this->font_descriptor() ) {
     this->font(FL_HELVETICA, FL_NORMAL_SIZE);
   }
-#if USE_OVERLAY
+#ifdef USE_OVERLAY
   XftDraw*& draw_ = fl_overlay ? draw_overlay : ::draw_;
   if (fl_overlay) {
     if (!draw_)
@@ -619,7 +619,7 @@ void Fl_Xlib_Graphics_Driver::draw(int angle, const char *str, int n, int x, int
 }
 
 static void fl_drawUCS4(Fl_Graphics_Driver *driver, const FcChar32 *str, int n, int x, int y) {
-#if USE_OVERLAY
+#ifdef USE_OVERLAY
   XftDraw*& draw_ = fl_overlay ? draw_overlay : ::draw_;
   if (fl_overlay) {
     if (!draw_)
diff --git a/src/flstring.h b/src/flstring.h
index cc0e1ee..f86db33 100644
--- a/src/flstring.h
+++ b/src/flstring.h
@@ -60,12 +60,12 @@ extern "C" {
 #  endif /* __cplusplus */
 
 FL_EXPORT extern int fl_snprintf(char *, size_t, const char *, ...);
-#  if !HAVE_SNPRINTF
+#  ifndef HAVE_SNPRINTF
 #    define snprintf fl_snprintf
 #  endif /* !HAVE_SNPRINTF */
 
 FL_EXPORT extern int fl_vsnprintf(char *, size_t, const char *, va_list ap);
-#  if !HAVE_VSNPRINTF
+#  ifndef HAVE_VSNPRINTF
 #    define vsnprintf fl_vsnprintf
 #  endif /* !HAVE_VSNPRINTF */
 
@@ -75,12 +75,12 @@ FL_EXPORT extern int fl_vsnprintf(char *, size_t, const char *, va_list ap);
  */
 
 FL_EXPORT extern size_t fl_strlcat(char *, const char *, size_t);
-#  if !HAVE_STRLCAT
+#  ifndef HAVE_STRLCAT
 #    define strlcat fl_strlcat
 #  endif /* !HAVE_STRLCAT */
 
 FL_EXPORT extern size_t fl_strlcpy(char *, const char *, size_t);
-#  if !HAVE_STRLCPY
+#  ifndef HAVE_STRLCPY
 #    define strlcpy fl_strlcpy
 #  endif /* !HAVE_STRLCPY */
 
diff --git a/src/numericsort.c b/src/numericsort.c
index 84172a3..1b5b527 100644
--- a/src/numericsort.c
+++ b/src/numericsort.c
@@ -29,13 +29,13 @@
 #    include <dirent.h>
 #  else
 #    define dirent direct
-#    if HAVE_SYS_NDIR_H
+#    ifdef HAVE_SYS_NDIR_H
 #      include <sys/ndir.h>
 #    endif /* HAVE_SYS_NDIR_H */
-#    if HAVE_SYS_DIR_H
+#    ifdef HAVE_SYS_DIR_H
 #      include <sys/dir.h>
 #    endif /* HAVE_SYS_DIR_H */
-#    if HAVE_NDIR_H
+#    ifdef HAVE_NDIR_H
 #      include <ndir.h>
 #    endif /* HAVE_NDIR_H */
 #  endif /* HAVE_DIRENT_H */
diff --git a/src/xutf8/utf8Input.c b/src/xutf8/utf8Input.c
index ee2c229..7fe33c4 100644
--- a/src/xutf8/utf8Input.c
+++ b/src/xutf8/utf8Input.c
@@ -24,7 +24,7 @@
 #include <string.h>
 #include <stdlib.h>
 
-#if HAVE_LIBC_ICONV
+#ifdef HAVE_LIBC_ICONV
 #include <iconv.h>
 #endif
 /*
@@ -55,7 +55,7 @@ typedef struct {
 int 
 XConvertEucTwToUtf8(char* buffer_return, int len) {
   /* FIXME */
-#if HAVE_LIBC_ICONV
+#ifdef HAVE_LIBC_ICONV
   iconv_t cd;
   int cdl;
 #else
@@ -68,7 +68,7 @@ XConvertEucTwToUtf8(char* buffer_return, int len) {
   /*b = */ buf = (char*) malloc((unsigned)len);
   memcpy(buf, buffer_return, (unsigned) len);
 
-#if HAVE_LIBC_ICONV
+#ifdef HAVE_LIBC_ICONV
   l = cdl = len;
   cd = iconv_open("EUC-TW", "UTF-8");
   iconv(cd, &b, &len, &buffer_return, &cdl);
diff --git a/test/fractals.cxx b/test/fractals.cxx
index ae9735a..a0dd2ec 100644
--- a/test/fractals.cxx
+++ b/test/fractals.cxx
@@ -21,7 +21,7 @@
 //
 
 #include <config.h>
-#if !HAVE_GL || !HAVE_GL_GLU_H
+#if !HAVE_GL || !defined(HAVE_GL_GLU_H)
 #include <FL/Fl.H>
 #include <FL/fl_message.H>
 int main(int, char**) {
diff --git a/test/fracviewer.cxx b/test/fracviewer.cxx
index bc45cc0..229fc98 100644
--- a/test/fracviewer.cxx
+++ b/test/fracviewer.cxx
@@ -14,7 +14,7 @@
 
 #include <config.h>
 
-#if HAVE_GL && HAVE_GL_GLU_H
+#if HAVE_GL && defined(HAVE_GL_GLU_H)
 #  include <FL/glut.H>
 #  include <FL/glu.h>
 
diff --git a/test/glpuzzle.cxx b/test/glpuzzle.cxx
index 670bd7d..69d7b7e 100644
--- a/test/glpuzzle.cxx
+++ b/test/glpuzzle.cxx
@@ -21,7 +21,7 @@
 
 // this block added for fltk's distribtion so it will compile w/o OpenGL:
 #include <config.h>
-#if !HAVE_GL || !HAVE_GL_GLU_H
+#if !HAVE_GL || !defined(HAVE_GL_GLU_H)
 #include <FL/Fl.H>
 #include <FL/fl_message.H>
 int main(int, char**) {
diff --git a/test/list_visuals.cxx b/test/list_visuals.cxx
index 8718c20..edfe04a 100644
--- a/test/list_visuals.cxx
+++ b/test/list_visuals.cxx
@@ -76,7 +76,7 @@ typedef struct _OverlayInfo {
   long layer;
 } OverlayInfo;
 
-#if HAVE_MULTIBUF
+#ifdef HAVE_MULTIBUF
 #include <X11/extensions/multibuf.h>
 #endif
 
@@ -137,7 +137,7 @@ void list_visuals() {
       numoverlayinfo = int(sizeData/4);
   }
 
-#if HAVE_MULTIBUF
+#ifdef HAVE_MULTIBUF
   int event_base, error_base;
   XmbufBufferInfo *mbuf, *sbuf;
   int nmbuf = 0, nsbuf = 0;
@@ -190,7 +190,7 @@ void list_visuals() {
       }
     }
 
-#if HAVE_MULTIBUF
+#ifdef HAVE_MULTIBUF
     for (j=0; j<nmbuf; j++) {
       XmbufBufferInfo *m = &mbuf[j];
       if (m->visualid == p->visualid)
diff --git a/test/threads.cxx b/test/threads.cxx
index 0a9c86f..9fb09be 100644
--- a/test/threads.cxx
+++ b/test/threads.cxx
@@ -18,7 +18,7 @@
 
 #include <config.h>
 
-#if HAVE_PTHREAD || defined(WIN32)
+#if defined(HAVE_PTHREAD) || defined(WIN32)
 #  include <FL/Fl.H>
 #  include <FL/Fl_Double_Window.H>
 #  include <FL/Fl_Browser.H>
diff --git a/test/threads.h b/test/threads.h
index c8f29e2..71f0d94 100644
--- a/test/threads.h
+++ b/test/threads.h
@@ -34,7 +34,7 @@
 #ifndef Threads_H
 #  define Threads_H
 
-#  if HAVE_PTHREAD_H
+#  ifdef HAVE_PTHREAD_H
 // Use POSIX threading...
 
 #    include <pthread.h>
diff --git a/test/utf8.cxx b/test/utf8.cxx
index 9732632..56d190e 100644
--- a/test/utf8.cxx
+++ b/test/utf8.cxx
@@ -421,7 +421,7 @@ int make_font_chooser(void)
   //	font_count = Fl::set_fonts("*");
 #ifdef WIN32
   font_count = Fl::set_fonts("*");
-#elif __APPLE__
+#elif defined(__APPLE__)
   font_count = Fl::set_fonts("*");
 #else
   // Load the systems available fonts - ask for everything that claims to be 
@@ -582,7 +582,7 @@ int main(int argc, char** argv)
   Fl::set_font(extra_font,
 #ifdef WIN32
                " Arial Unicode MS"
-#elif __APPLE__
+#elif defined(__APPLE__)
                "Monaco"
 #else
                "-*-*-*-*-*-*-*-*-*-*-*-*-iso10646-1"
