Build Fix -- compatibility issue with newer autoconf
[sxemacs] / src / ui / lwlib / lwlib-config.c
1 /* Flags indicating how lwlib was compiled.
2    Copyright (C) 1994 Lucid, Inc.
3
4 This file is part of the Lucid Widget Library.
5
6 The Lucid Widget Library is free software: you can redistribute it
7 and/or modify it under the terms of the GNU General Public License as
8 published by the Free Software Foundation, either version 3 of the
9 License, or (at your option) any later version.
10
11 The Lucid Widget Library is distributed in the hope that it will be
12 useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program.  If not, see <http://www.gnu.org/licenses/>. */
18
19 /* This is a kludge to make sure emacs can only link against a version of
20    lwlib that was compiled in the right way.  Emacs references symbols which
21    correspond to the way it thinks lwlib was compiled, and if lwlib wasn't
22    compiled in that way, then somewhat meaningful link errors will result.
23    The alternatives to this range from obscure link errors, to obscure
24    runtime errors that look a lot like bugs. */
25
26 #include <config.h>
27 #include "lwlib.h"
28
29 #include <X11/Xlib.h>           /* to get XlibSpecificationRelease */
30 #ifdef NEED_MOTIF
31 #include <Xm/Xm.h>              /* to get XmVersion */
32 #endif  /* NEED_MOTIF */
33
34 #if (XlibSpecificationRelease == 4)
35 int lwlib_uses_x11r4;
36 #elif (XlibSpecificationRelease == 5)
37 int lwlib_uses_x11r5;
38 #elif (XlibSpecificationRelease == 6)
39 int lwlib_uses_x11r6;
40 #else
41 int lwlib_uses_unknown_x11;
42 #endif
43
44 #ifdef NEED_MOTIF
45 int lwlib_uses_motif;
46 #if (XmVersion >= 1002 )
47 int lwlib_uses_motif_1_2;
48 #else
49 int lwlib_does_not_use_motif_1_2;
50 #endif
51 #else
52 int lwlib_does_not_use_motif;
53 int lwlib_does_not_use_motif_1_2;
54 #endif  /* NEED_MOTIF */
55
56 #ifdef LWLIB_MENUBARS_LUCID
57 int lwlib_menubars_lucid;
58 #else
59 # ifdef LWLIB_MENUBARS_MOTIF
60 int lwlib_menubars_motif;
61 # else
62 int lwlib_does_not_support_menubars;
63 # endif
64 #endif
65
66 #ifdef LWLIB_SCROLLBARS_LUCID
67 int lwlib_scrollbars_lucid;
68 #else
69 # ifdef LWLIB_SCROLLBARS_MOTIF
70 int lwlib_scrollbars_motif;
71 # else
72 #  ifdef LWLIB_SCROLLBARS_ATHENA
73 int lwlib_scrollbars_athena;
74 #  else
75 int lwlib_does_not_support_scrollbars;
76 #  endif
77 # endif
78 #endif
79
80 #ifdef LWLIB_DIALOGS_MOTIF
81 int lwlib_dialogs_motif;
82 #else
83 # ifdef LWLIB_DIALOGS_ATHENA
84 int lwlib_dialogs_athena;
85 # else
86 int lwlib_does_not_support_dialogs;
87 # endif
88 #endif
89
90 #ifdef LWLIB_WIDGETS_MOTIF
91 int lwlib_widgets_motif;
92 #else
93 # ifdef LWLIB_WIDGETS_ATHENA
94 int lwlib_widgets_athena;
95 # else
96 int lwlib_does_not_support_widgets;
97 # endif
98 #endif