Debian Codegraph @

configure.ac

raw ◀ ▶
Source reconstructed at patch state 0 of 5 — not the installed (fully patched) source.
5 Debian patches touch this file
1 dnl Process this file with autoconf to produce a configure script.
2 AC_PREREQ(2.59)
3 AC_INIT([motif], [2.3.8])
4 AC_CONFIG_SRCDIR([lib/Xm/Form.c])
5 AC_CONFIG_AUX_DIR(.)
6 AC_CANONICAL_TARGET
7
8 AM_INIT_AUTOMAKE([foreign no-define])
9 dnl AM_MAINTAINER_MODE
10
11 AS_IF([test -f "/usr/X/include/X11/X.h"],
12 AC_PREFIX_DEFAULT(/usr/X),
13 AC_PREFIX_DEFAULT(/usr))
14 AS_IF([test -f "/usr/X11R6/include/X11/X.h"],
15 AC_PREFIX_DEFAULT(/usr/X11R6),
16 AC_PREFIX_DEFAULT(/usr))
17
18 dnl The version of the Motif libraries
19 CURRENT=4
20 REVISION=4
21 AGE=0
22 AC_SUBST(CURRENT)
23 AC_SUBST(REVISION)
24 AC_SUBST(AGE)
25
26 LIBTOOL_VERSION=$CURRENT:$REVISION:$AGE
27
28 dnl
29 dnl Override a default in libtool.
30 dnl
31 dnl AC_DISABLE_STATIC
32
33 AC_CONFIG_HEADERS(include/config.h lib/Xm/Xm.h)
34
35 dnl Checks for programs.
36 AC_PROG_CC
37 AC_PROG_CPP
38 AM_PROG_LIBTOOL
39
40 AC_EXEEXT
41
42 dnl AC_PROG_YACC
43 dnl Do this the old fashioned way. 'bison -y' doesn't cut it
44 AC_CHECK_PROGS(YACC, byacc, yacc)
45
46 dnl AC_PROG_SPLINT
47 AC_CHECK_PROGS(SPLINT, splint)
48
49 AM_PROG_LEX
50 AC_PROG_INSTALL
51 AC_PROG_LN_S
52 AC_PROG_MAKE_SET
53
54
55 dnl Checks for libraries.
56
57 AC_PATH_X
58 AC_PATH_XTRA
59 LT_LIB_XTHREADS
60
61 dnl Checks for Xos_r.h
62
63 AC_CHECK_HEADERS([X11/Xos_r.h])
64 AC_CHECK_HEADERS([X11/Xpoll.h])
65
66 dnl Compile in EditRes support if we can find Xmu
67
68 save_LIBS="$LIBS"
69 save_CFLAGS="$CFLAGS"
70 LIBS="$X_LIBS $LIBS"
71 CFLAGS="$X_CFLAGS $CFLAGS"
72 AC_CHECK_HEADERS(X11/Xmu/Editres.h,
73 AC_CHECK_LIB(Xmu, _XEditResCheckMessages,
74 X_XMU=-lXmu
75 AC_DEFINE(HAVE_LIBXMU, 1, This System has libXmu)
76 , X_XMU="", -lXt -lX11)
77 AC_CHECK_LIB(Xmu,XmuNCopyISOLatin1Lowered ,
78 AC_DEFINE(HAVE_XMU_N_COPY_ISO,1,Have XmuNCopyISOLatin1Lowered)
79 , , -lXt -lX11)
80 ,,[[#include <X11/Intrinsic.h>]]
81 )
82
83
84 AC_SUBST(X_XMU)
85 LIBS="$save_LIBS"
86 CFLAGS="$save_CFLAGS"
87 AM_CONDITIONAL(OM_XMU, test x$X_XMU != x)
88
89 dnl Checks for header files.
90 AC_HEADER_DIRENT
91 AC_HEADER_STDC
92 AC_HEADER_SYS_WAIT
93 AC_CHECK_HEADERS(fcntl.h limits.h malloc.h sys/malloc.h strings.h sys/file.h sys/time.h unistd.h wchar.h)
94 AC_CHECK_HEADERS(wctype.h, AC_DEFINE(HAS_WIDECHAR_FUNCTIONS,1,System supports wchar))
95 AC_CHECK_HEADER(langinfo.h,,AC_DEFINE(CSRG_BASED,1,System Has langinfo.h))
96 AC_CHECK_HEADER(X11/Xos_r.h,,AC_DEFINE(NEED_XOS_R_H,1,System Missing Xos_r.h))
97 AC_CHECK_HEADER(X11/Xpoll.h,,AC_DEFINE(NEED_XPOLL_H,1,system Missing X11/Xpoll.h))
98 dnl Checks for typedefs, structures, and compiler characteristics.
99 AC_C_CONST
100 AC_TYPE_MODE_T
101 AC_TYPE_OFF_T
102 AC_TYPE_PID_T
103 AC_TYPE_SIZE_T
104 AC_HEADER_TIME
105 AC_STRUCT_TM
106 AC_TYPE_UID_T
107 WEAK_ALIAS_SUPPORT
108
109 dnl Checks for library functions.
110 AC_FUNC_ALLOCA
111 AC_FUNC_MEMCMP
112 AC_FUNC_SETPGRP
113 AC_TYPE_SIGNAL
114 AC_FUNC_STRCOLL
115 AC_FUNC_STRFTIME
116 AC_FUNC_FORK([])
117 AC_FUNC_VPRINTF
118 AC_CHECK_FUNCS(wcslen wcscpy wcsncpy wcschr wcscat wcsncat getcwd gettimeofday mkdir re_comp regcmp select strcspn strerror strstr strtod strtol uname)
119 AC_CHECK_FUNCS(strdup,,AC_DEFINE(NEED_STRDUP, 1, no strdup))
120 AC_CHECK_FUNCS(strcasecmp,,AC_DEFINE(NEED_STRCASECMP, 1, no strcasecmp))
121 AC_CHECK_FUNCS(putenv,,AC_DEFINE(NO_PUTENV, 1, No PUTENV))
122 AC_CHECK_FUNCS(regcomp,,AC_DEFINE(NO_REGCOMP, 1, no regcmp))
123 AC_CHECK_FUNCS(memmove,,AC_DEFINE(NO_MEMMOVE, 1, no memmove))
124 AC_CHECK_TYPE(XICProc,,AC_DEFINE(NO_XICPROC, 1, XICProc isn't defined), [#include <X11/Xlib.h>])
125
126 AC_ARG_ENABLE(message-catalog, [ --enable-message-catalog
127 Enable building of the message catalog (default=no)])
128 if test "$enable_message_catalog" != "yes"
129 then
130 AC_DEFINE(NO_MESSAGE_CATALOG, 1, No Defined Message Catalog)
131 fi
132 AM_CONDITIONAL(MessageCatalog, test x$enable_message_catalog = xyes)
133
134 AC_ARG_ENABLE(themes, [ --enable-themes Enable themes (default=no)])
135 if test "$enable_themes" = "yes"
136 then
137 if test -f $srcdir/lib/Xm/Theme.h
138 then
139 AC_DEFINE(USE_XMTHEMES, 1, "Use XmThemes")
140 XMTHEME_DIST = "Theme.h ThemeP.h DynLibP.h Theme.c DynLib.c"
141 else
142 AC_MSG_WARN([--enable-themes specified, but I don't have the code. Disabled])
143 enable_themes="no"
144 fi
145 fi
146 AC_SUBST(XMTHEME_DIST)
147 AM_CONDITIONAL(OM_XMTHEMES, test "$enable_themes" = "yes")
148
149 AC_ARG_ENABLE(debug-themes, [ --enable-debug-themes Enable themes debugging (default=no)])
150 if test "$enable_themes" = "yes"
151 then
152 if test "$enable_debug_themes" = "yes"
153 then
154 AC_DEFINE(DEBUGTHEMES, 1, "Debug Themes")
155 fi
156 fi
157
158 if test x$GCC = xyes
159 then
160 CFLAGS="$CFLAGS -Wall -g -fno-strict-aliasing -Wno-unused -Wno-comment"
161 if test ` $CC -dumpversion | sed -e 's/\(^.\).*/\1/'` = "4" ; then
162 CFLAGS="$CFLAGS -fno-tree-ter"
163 fi
164 fi
165 AC_DEFINE(NO_OL_COMPAT, 1, "No OL Compatability")
166
167 CDE_INSTALLATION_TOP="\${prefix}/dt"
168 AC_SUBST(CDE_INSTALLATION_TOP)
169
170 CDE_CONFIGURATION_TOP="\${prefix}/etc/dt"
171 AC_SUBST(CDE_CONFIGURATION_TOP)
172
173 LIBDIR="${libdir}/X11"
174 AC_SUBST(LIBDIR)
175
176 AC_ARG_WITH(mwmrcdir, [ --with-mwmrcdir=DIR mwm resources are located in DIR], mwmrcdir=$withval, mwmrcdir="${libdir}/X11")
177 MWMRCDIR="$mwmrcdir"
178 AC_SUBST(MWMRCDIR)
179
180 INCDIR="${includedir}/X11"
181 AC_SUBST(INCDIR)
182
183 AC_ARG_WITH(xmbinddir, [ --with-xmbinddir=DIR fallback bindings are located in DIR], xmbinddir=$withval, xmbinddir="${libdir}/X11/bindings")
184 XMBINDDIR_FALLBACK="$xmbinddir"
185 AC_SUBST(XMBINDDIR_FALLBACK)
186
187 AC_ARG_WITH(x11rgbdir, [ --with-x11rgbdir=DIR rgb.txt is located in DIR], x11rgbdir=$withval, x11rgbdir="/usr/lib/X11")
188 X11RGBPATH="$x11rgbdir/rgb.txt"
189 AC_SUBST(X11RGBPATH)
190
191 RM="rm -f"
192 AC_SUBST(RM)
193
194 AC_ARG_ENABLE(motif22-compatibility, [ --disable-motif22-compatibility
195 Disable binary compatibility with OpenMotif 2.2])
196 AC_ARG_ENABLE(utf8, [ --disable-utf8
197 Disable UTF-8 support])
198
199 case "$host_os" in
200 freebsd*) CFLAGS="$CFLAGS -DCSRG_BASED -DXNO_MTSAFE_API -DXNO_MTSAFE_PWDAPI";
201 LDFLAGS="$LDFLAGS -L/usr/local/lib";;
202 cygwin*) CFLAGS="$CFLAGS -DXNO_MTSAFE_DIRENTDAPI";;
203 solaris* | sunos*) X_LIBS="$X_LIBS -L/usr/X/lib" &&
204 if test x$enable_motif22_compatibility = x
205 then
206 enable_motif22_compatibility="no"
207 fi;
208 if test x$enable_utf8 = x
209 then
210 enable_utf8="no"
211 fi;
212 if test x$enable_xft = x
213 then
214 enable_xft="no"
215 fi;;
216 esac
217
218 if test x$enable_motif22_compatibility = x
219 then
220 enable_motif22_compatibility="yes"
221 fi
222
223 if test "$enable_motif22_compatibility" = "yes"
224 then
225 AC_DEFINE([OM22_COMPATIBILITY], [1], [Compatibility with OpenMotif 2.2])
226 OM22_COMPATIBILITY_FALSE=!
227 OM22_COMPATIBILITY_TRUE=
228 else
229 OM22_COMPATIBILITY_FALSE=
230 OM22_COMPATIBILITY_TRUE=!
231 fi
232 AC_SUBST(OM22_COMPATIBILITY_FALSE)
233 AC_SUBST(OM22_COMPATIBILITY_TRUE)
234
235 if test x$enable_utf8 = x
236 then
237 enable_utf8="yes"
238 fi
239
240 if test "$enable_utf8" = "yes"
241 then
242 AC_DEFINE([UTF8_SUPPORTED], [1], [UTF8 is supported])
243 AC_SEARCH_LIBS([iconv_open], [iconv], ,
244 AC_SEARCH_LIBS([libiconv_open], [iconv]))
245 fi
246
247 AC_ARG_ENABLE(printing, [ --disable-printing
248 Disable printing support])
249
250 if test x$enable_printing = x
251 then
252 enable_printing="yes"
253 fi
254
255 if test "$enable_printing" = "yes"
256 then
257 AC_MSG_CHECKING([for libXp])
258 AC_CHECK_HEADERS(X11/extensions/Print.h,
259 AC_CHECK_LIB(Xp, XpCreateContext, ,enable_printing="no"),
260 enable_printing="no")
261 fi
262
263 if test "$enable_printing" = "yes"
264 then
265 LIB_XP=-lXp
266 AC_DEFINE([PRINTING_SUPPORTED], [1], [Printing is supported])
267 PRINTING_SUPPORTED_FALSE=!
268 PRINTING_SUPPORTED_TRUE=
269 else
270 LIB_XP=
271 PRINTING_SUPPORTED_FALSE=
272 PRINTING_SUPPORTED_TRUE=!
273 fi
274 AC_SUBST(PRINTING_SUPPORTED_FALSE)
275 AC_SUBST(PRINTING_SUPPORTED_TRUE)
276
277 AM_CONDITIONAL(PRINTING, test "$enable_printing" = "yes")
278 AC_SUBST(LIB_XP)
279
280 AC_FIND_XFT
281 AC_IMAGE_SUPPORT
282
283
284
285 # AM_CONDITIONAL(Motif22Compatibility, test x$enable_motif22_compatibility = xyes)
286
287 AC_CONFIG_FILES([Makefile \
288 bindings/Makefile \
289 bitmaps/Makefile \
290 clients/Makefile \
291 clients/mwm/Makefile \
292 clients/mwm/WmWsmLib/Makefile \
293 clients/uil/Makefile \
294 clients/xmbind/Makefile \
295 config/Makefile \
296 config/util/Makefile \
297 include/Makefile \
298 include/Dt/Makefile \
299 lib/Makefile \
300 lib/Xm/Makefile \
301 lib/Mrm/Makefile \
302 localized/Makefile \
303 localized/util/Makefile \
304 doc/Makefile \
305 doc/man/Makefile \
306 doc/man/man1/Makefile \
307 doc/man/man3/Makefile \
308 doc/man/man4/Makefile \
309 doc/man/man5/Makefile \
310 tools/Makefile \
311 tools/wml/Makefile \
312 demos/Makefile \
313 demos/lib/Makefile \
314 demos/lib/Xmd/Makefile \
315 demos/lib/Wsm/Makefile \
316 demos/lib/Exm/Makefile \
317 demos/lib/Exm/wml/Makefile \
318 demos/programs/Makefile \
319 demos/programs/Exm/Makefile \
320 demos/programs/Exm/app_in_c/Makefile \
321 demos/programs/Exm/app_in_uil/Makefile \
322 demos/programs/Exm/simple_app/Makefile \
323 demos/programs/airport/Makefile \
324 demos/programs/animate/Makefile \
325 demos/programs/drag_and_drop/Makefile \
326 demos/programs/draw/Makefile \
327 demos/programs/earth/Makefile \
328 demos/programs/filemanager/Makefile \
329 demos/programs/fileview/Makefile \
330 demos/programs/getsubres/Makefile \
331 demos/programs/hellomotif/Makefile \
332 demos/programs/hellomotifi18n/Makefile \
333 demos/programs/hellomotifi18n/C/Makefile \
334 demos/programs/hellomotifi18n/C/uid/Makefile \
335 demos/programs/hellomotifi18n/english/Makefile \
336 demos/programs/hellomotifi18n/english/uid/Makefile \
337 demos/programs/hellomotifi18n/french/Makefile \
338 demos/programs/hellomotifi18n/french/uid/Makefile \
339 demos/programs/hellomotifi18n/hebrew/Makefile \
340 demos/programs/hellomotifi18n/hebrew/uid/Makefile \
341 demos/programs/hellomotifi18n/japan/Makefile \
342 demos/programs/hellomotifi18n/japan/uid/Makefile \
343 demos/programs/hellomotifi18n/japanese/Makefile \
344 demos/programs/hellomotifi18n/japanese/uid/Makefile \
345 demos/programs/hellomotifi18n/swedish/Makefile \
346 demos/programs/hellomotifi18n/swedish/uid/Makefile \
347 demos/programs/i18ninput/Makefile \
348 demos/programs/panner/Makefile \
349 demos/programs/periodic/Makefile \
350 demos/programs/piano/Makefile \
351 demos/programs/popups/Makefile \
352 demos/programs/sampler2_0/Makefile \
353 demos/programs/setdate/Makefile \
354 demos/programs/todo/Makefile \
355 demos/programs/workspace/Makefile \
356 demos/programs/tooltips/Makefile \
357 demos/programs/FontSel/Makefile \
358 demos/programs/ButtonBox/Makefile \
359 demos/programs/ColorSel/Makefile \
360 demos/programs/Column/Makefile \
361 demos/programs/Combo2/Makefile \
362 demos/programs/Ext18List/Makefile \
363 demos/programs/Ext18List/pixmaps/Makefile \
364 demos/programs/IconB/Makefile \
365 demos/programs/Outline/Makefile \
366 demos/programs/Paned/Makefile \
367 demos/programs/TabStack/Makefile \
368 demos/programs/Tree/Makefile \
369 demos/programs/pixmaps/Makefile \
370 demos/unsupported/Makefile \
371 demos/unsupported/Exm/Makefile \
372 demos/unsupported/aicon/Makefile \
373 demos/unsupported/dainput/Makefile \
374 demos/unsupported/dogs/Makefile \
375 demos/unsupported/hellomotif/Makefile \
376 demos/unsupported/motifshell/Makefile \
377 demos/unsupported/uilsymdump/Makefile \
378 demos/unsupported/xmapdef/Makefile \
379 demos/unsupported/xmfonts/Makefile \
380 demos/unsupported/xmforc/Makefile \
381 demos/unsupported/xmform/Makefile \
382 demos/doc/Makefile \
383 demos/doc/programGuide/Makefile \
384 demos/doc/programGuide/ch05/Makefile \
385 demos/doc/programGuide/ch05/Scale/Makefile \
386 demos/doc/programGuide/ch06/Makefile \
387 demos/doc/programGuide/ch06/spin_box/Makefile \
388 demos/doc/programGuide/ch06/combo_box/Makefile \
389 demos/doc/programGuide/ch08/Makefile \
390 demos/doc/programGuide/ch08/Notebook/Makefile \
391 demos/doc/programGuide/ch08/Container/Makefile \
392 demos/doc/programGuide/ch16/Makefile \
393 demos/doc/programGuide/ch17/Makefile \
394 demos/doc/programGuide/ch17/simple_drop/Makefile \
395 demos/doc/programGuide/ch17/simple_drag/Makefile \
396 lib/Xm/xmstring.list \
397 ])
398 AC_OUTPUT