From 3cb662755c58586c0fea64b9c4802a5ef6ee089a Mon Sep 17 00:00:00 2001 From: handa Date: Thu, 28 Apr 2005 02:03:14 +0000 Subject: [PATCH] Check HAVE_X11_XAW_COMMAND_H, and if it not defined, add dummy code. --- example/medit.c | 26 ++++++++++++++++++++++---- example/mview.c | 24 +++++++++++++++++++++--- 2 files changed, 43 insertions(+), 7 deletions(-) diff --git a/example/medit.c b/example/medit.c index 5b6aacc..f59f0d9 100644 --- a/example/medit.c +++ b/example/medit.c @@ -102,6 +102,15 @@ #include #include #include + +#include +#include +#include + +#include + +#ifdef HAVE_X11_XAW_COMMAND_H + #include #include #include @@ -113,10 +122,6 @@ #include #include -#include -#include -#include - #define VERSION "1.2.0" /* Global variables. */ @@ -3096,4 +3101,17 @@ main (int argc, char **argv) exit (0); } + +#else /* not HAVE_X11_XAW_COMMAND_H */ + +int +main (int argc, char **argv) +{ + fprintf (stderr, + "Building of this program failed (lack of some header files)\n"); + exit (1); +} + +#endif /* not HAVE_X11_XAW_COMMAND_H */ + #endif /* not FOR_DOXYGEN */ diff --git a/example/mview.c b/example/mview.c index 61aab92..dab7b66 100644 --- a/example/mview.c +++ b/example/mview.c @@ -104,14 +104,19 @@ #include #include #include -#include -#include -#include #include #include #include +#include + +#ifdef HAVE_X11_XAW_COMMAND_H + +#include +#include +#include + #define VERSION "1.2.0" /* Global m17n variables. */ @@ -420,4 +425,17 @@ main (int argc, char **argv) exit (0); } + +#else /* not HAVE_X11_XAW_COMMAND_H */ + +int +main (int argc, char **argv) +{ + fprintf (stderr, + "Building of this program failed (lack of some header files)\n"); + exit (1); +} + +#endif /* not HAVE_X11_XAW_COMMAND_H */ + #endif /* not FOR_DOXYGEN */ -- 1.7.10.4