forked from bbidulock/icewm
-
Notifications
You must be signed in to change notification settings - Fork 2
/
configure.ac
580 lines (517 loc) · 19.5 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
AC_INIT([icewm],[3.4.6.130],
[https://github.com/bbidulock/icewm/issues],
[icewm],[https://ice-wm.org])
AC_REVISION([3.4.6.130])
# set better defaults
AC_PREFIX_DEFAULT([/usr])
if test "$prefix" = /usr -o "$prefix" = NONE; then
test "$sysconfdir" = '${prefix}/etc' && sysconfdir=/etc
test "$sharedstatedir" = '${prefix}/com' && sharedstatedir=/var
test "$localstatedir" = '${prefix}/var' && localstatedir=/var
fi
AC_CONFIG_SRCDIR([src/ysmapp.cc])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_AUX_DIR([scripts])
AC_USE_SYSTEM_EXTENSIONS
AC_CANONICAL_TARGET
DATE='2024-09-24'
AC_SUBST([DATE])
MDOCDATE='September 24, 2024'
AC_SUBST([MDOCDATE])
BRANCH='icewm-1-4-BRANCH'
AC_SUBST([BRANCH])
APPLICATIONS='icewm icewm-session icesh icewmhint icewmbg icehelp'
TESTCASES=`echo src/test*.cc | sed 's%src/\([[^ ]]*\)\.cc%\1%g'`
TESTCASES="$TESTCASES iceview icesame iceicon icerun icelist icebar" # iceclock
features=''
# Initialize Automake
AM_INIT_AUTOMAKE([1.12 dist-lzip no-dist-gzip std-options -Wall color-tests silent-rules tar-pax])
AM_MAINTAINER_MODE
AM_SILENT_RULES([yes])
# Checks for programs.
AC_LANG([C++])
AC_PROG_SED
AC_PROG_AWK
AC_PROG_CC
AC_PROG_CXX
AC_PROG_CPP
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
AM_PROG_AR
AC_PROG_MKDIR_P
AC_ARG_VAR([LD], [Linker loader command])
AC_ARG_VAR([MKFONTDIR],[mkfontdir command. @<:@default=mkfontdir@:>@])
AC_CHECK_PROGS([MKFONTDIR],[mkfontdir],[${am_missing_run}mkfontdir],[$PATH$PATH_SEPARATOR/usr/X11R6/bin])
AC_ARG_VAR([MARKDOWN],[markdown command. @<:@default=markdown@:>@])
AC_CHECK_PROGS([MARKDOWN],[markdown markdown_py discount-markdown Markdown.pl],
[${am_missing_run}markdown],[$PATH])
AC_ARG_VAR([ASCIIDOC],[asciidoc command. @<:@default=asciidoctor@:>@])
AC_CHECK_PROGS([ASCIIDOC],[asciidoc asciidoctor],[${am_missing_run}asciidoc],[$PATH])
AC_ARG_VAR([ASCIIDOC_BACKEND],[asciidoc backend @<:@default=NONE@:>@])
if test -z "$ASCIIDOC_BACKEND"; then
case "$ASCIIDOC" in
asciidoc) ASCIIDOC_BACKEND="--backend=html4" ;;
asciidoctor) ASCIIDOC_BACKEND="--backend=html5" ;;
*) AC_MSG_NOTICE([ASCIIDOC $ASCIIDOC is not supported.]) ;;
esac
fi
AC_ARG_VAR([LINKS],[links command. @<:@default=lynx@:>@])
AC_CHECK_PROGS([LINKS],[lynx links],[${am_missing_run}lynx],[$PATH])
if test "$LINKS" = "links"; then
LINKS="links -codepage utf-8"
fi
AC_DISABLE_STATIC
LT_PATH_LD
LT_PREREQ([2.4.2])
LT_INIT([dlopen])
LT_LANG([C++])
AC_SUBST([LIBTOOL_DEPS])
AM_GNU_GETTEXT_VERSION([0.22])
AM_GNU_GETTEXT([external])
AC_ARG_ENABLE([i18n],
AS_HELP_STRING([--disable-i18n],[Disable internationalization.]))
if test x$enable_i18n != xno; then
AC_DEFINE([CONFIG_I18N], [1], [Define to enable internationalization.])
features="$features i18n"
AM_ICONV
else
unset LIBICONV LTLIBICONV
fi
AC_ARG_WITH([unicode-set],
AS_HELP_STRING([--with-unicode-set=CODESET],[Your iconv unicode set in
machine endian encoding (e.g. WCHAR_T, UCS-4-INTERNAL, UCS-4LE,
UCS-4BE)]),
[AC_DEFINE_UNQUOTED([CONFIG_UNICODE_SET],"$with_unicode_set",[Preferred unicode set.])])
PKG_PROG_PKG_CONFIG
# Checks for libraries.
AC_CHECK_FUNCS(clock_gettime, [], [AC_CHECK_LIB(rt, clock_gettime)])
case "${target_os}" in
*solaris*)
AC_CHECK_LIB(socket, socketpair)
AC_CHECK_LIB(nsl, gethostbyname)
;;
*openbsd*)
test x$enable_i18n != xno -a -z "$EXTRA_LIBS" && EXTRA_LIBS=-liconv
;;
*)
:
;;
esac
# Checks for header files.
AS_BOX([Header Files])
AC_PATH_X
AC_PATH_XTRA
AC_CHECK_HEADERS([execinfo.h sched.h sys/sched.h])
AC_CHECK_HEADERS([sys/soundcard.h sys/sysctl.h uvm/uvm_param.h])
# Checks for typedefs, structures, and compiler characteristics.
AS_BOX([Typedefs, Structures, Compiler])
AC_CHECK_HEADER_STDBOOL
AC_C_INLINE
AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_STRUCT_TM
AC_CHECK_SIZEOF(char, 1)
AC_CHECK_SIZEOF(short, 2)
AC_CHECK_SIZEOF(int, 4)
AC_CHECK_SIZEOF(long, 4)
# Checks for library functions.
if test x$cross_compling != xyes ; then :; AC_FUNC_FORK fi
if test x$cross_compling != xyes ; then :; AC_FUNC_MALLOC fi
if test x$cross_compling != xyes ; then :; AC_FUNC_REALLOC fi
AC_CHECK_FUNCS([backtrace_symbols_fd memrchr sysctl sysctlbyname])
AC_FUNC_SELECT_ARGTYPES
AC_MSG_CHECKING([for strlcpy])
AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <string.h>]],[[
char a[2];
if (strlcpy(a, "yes", 2) != 3)
return 1;]])],
[
AC_MSG_RESULT([yes])
AC_DEFINE([HAVE_STRLCPY], 1,
[Define to 1 if you have the strlcpy function.])
],
[
AC_MSG_RESULT([no])
AH_TEMPLATE([HAVE_STRLCPY],
[Define to 1 if you have the strlcpy function.])
])
AC_MSG_CHECKING([for strlcat])
AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <string.h>]],[[
char a[4] = "no";
if (strlcat(a, "yes", 4) != 5)
return 1;]])],
[
AC_MSG_RESULT([yes])
AC_DEFINE([HAVE_STRLCAT], 1,
[Define to 1 if you have the strlcat function.])
],
[
AC_MSG_RESULT([no])
AH_TEMPLATE([HAVE_STRLCAT],
[Define to 1 if you have the strlcat function.])
])
AC_MSG_CHECKING([for C++11 by default])
AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <regex>]],[[
if (__cplusplus < 201103L) return 1;]])],
[AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])
AC_MSG_CHECKING([for C++11 when forced])
CXXFLAGS="$CXXFLAGS -std=c++11"
AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <regex>]],[[
if (__cplusplus < 201103L) return 1;]])],
[AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])
AC_MSG_ERROR([Need C++11. Please set CXXFLAGS.])
])
])
PKG_CHECK_MODULES([CORE],[fontconfig xrender xcomposite xdamage xfixes xext x11])
AC_SUBST([CORE_CFLAGS])
AC_SUBST([CORE_LIBS])
AC_CHECK_LIB([X11],[XInternAtoms],
[AC_DEFINE([HAVE_XINTERNATOMS],[1],[Define to enable XInternAtoms])])
AC_ARG_ENABLE([sm],
AS_HELP_STRING([--disable-sm],[Disable X session management.]))
if test x$enable_sm != xno ; then
PKG_CHECK_MODULES([XSM],[sm ice],[
AC_DEFINE([CONFIG_SESSION],[1],[Define to enable X session management])],
[AC_MSG_ERROR([Packages SM and ICE are required for session mgmt.])])
fi
AC_ARG_ENABLE([shape],
AS_HELP_STRING([--disable-shape],[Disable use of SHAPE extension.]))
if test x$enable_shape != xno ; then
PKG_CHECK_MODULES([SHAPE],[xext],[
CORE_CFLAGS="$SHAPE_CFLAGS $CORE_CFLAGS"
CORE_LIBS="$SHAPE_LIBS $CORE_LIBS"
AC_DEFINE([CONFIG_SHAPE],[1],[Define to enable X shape extension])
features="$features shape"],
[AC_MSG_ERROR([Package SHAPE is required for X Shape extension.])])
else
AC_MSG_WARN([SHAPE disabled.])
fi
AC_ARG_ENABLE([xrandr],
AS_HELP_STRING([--disable-xrandr],[Disable use of RANDR extension.]))
if test x$enable_xrandr != xno; then
PKG_CHECK_MODULES([RANDR],[xrandr],[
CORE_CFLAGS="$RANDR_CFLAGS $CORE_CFLAGS"
CORE_LIBS="$RANDR_LIBS $CORE_LIBS"
AC_DEFINE([CONFIG_XRANDR],[1],[Define to enable RANDR extension.])
features="$features xrandr"],
[AC_MSG_ERROR([Package XRANDR is required for X RandR extension.])])
else
AC_MSG_WARN([RANDR disabled.])
fi
AC_ARG_ENABLE([xfreetype],
AS_HELP_STRING([--disable-xfreetype],[Disable use of XFT for text rendering.]))
if test x$enable_xfreetype != xno; then
PKG_CHECK_MODULES([XFT2],[xft >= 2.0.0],[
CORE_CFLAGS="$XFT2_CFLAGS $CORE_CFLAGS"
CORE_LIBS="$XFT2_LIBS $CORE_LIBS"
AC_DEFINE([CONFIG_XFREETYPE],[2],[Define to enable XFT support.])
features="$features xfreetype"],
[AC_MSG_ERROR([Package XFT 2+ is required for X FreeType rendering.])
enable_corefonts=yes])
else
enable_corefonts=yes
fi
AC_ARG_ENABLE([corefonts],
AS_HELP_STRING([--enable-corefonts],[Support X11 core fonts.]))
if test x$enable_corefonts = xyes; then
AC_DEFINE([CONFIG_COREFONTS],[1],[Define to enable X11 core fonts.])
features="$features corefonts"
fi
if test x"${features#*xfreetype}" = x"$features" &&
test x"${features#*corefonts}" = x"$features"
then
AC_MSG_ERROR([Either xfreetype or corefonts must be enabled])
fi
AC_ARG_WITH([icesound],
AS_HELP_STRING([--with-icesound=INTERFACES],[List of audio interfaces for icesound. @<:@default: ALSA,AO,OSS@:>@]),[],
[with_icesound='ALSA,AO,OSS'])
audio_support=
for iface in `echo "$with_icesound"|sed 's|,| |g'` ; do
case $iface in
(ALSA|alsa)
PKG_CHECK_MODULES([ALSA],[sndfile alsa],[
AUDIO_CFLAGS="$AUDIO_CFLAGS $ALSA_CFLAGS"
AUDIO_LIBS="$AUDIO_LIBS $ALSA_LIBS"
AC_DEFINE([ENABLE_ALSA],[1],[Define to enable ALSA support.])
CONFIG_ALSA=yes; audio_support=$iface; break],
[AC_MSG_WARN([ALSA is not supported])])
;;
(AO|ao)
PKG_CHECK_MODULES([AO],[sndfile ao],[
AUDIO_CFLAGS="$AUDIO_CFLAGS $AO_CFLAGS"
AUDIO_LIBS="$AUDIO_LIBS $AO_LIBS"
AC_DEFINE([ENABLE_AO],[1],[Define to enable AO support.])
CONFIG_AO=yes; audio_support=$iface; break],
[AC_MSG_WARN([AO is not supported])])
;;
(OSS|oss)
PKG_CHECK_MODULES([OSS],[sndfile],[
AUDIO_CFLAGS="$AUDIO_CFLAGS $OSS_CFLAGS"
AUDIO_LIBS="$AUDIO_LIBS $OSS_LIBS"
AC_DEFINE([ENABLE_OSS],[1],[Define to enable OSS support.])
CONFIG_OSS=yes; audio_support=$iface; break],
[AC_MSG_WARN([OSS is not supported])])
;;
(*)
AC_MSG_WARN([Invalid audio interface: $iface])
;;
esac
done
if test "x$CONFIG_ALSA" = "xyes" ||
test "x$CONFIG_AO" = "xyes" ||
test "x$CONFIG_OSS" = "xyes"
then
BUILD_SOUND=yes
APPLICATIONS="${APPLICATIONS} icesound"
else
AC_MSG_WARN([No valid sound interface, not building icesound.])
fi
AC_SUBST([AUDIO_CFLAGS])
AC_SUBST([AUDIO_LIBS])
AC_ARG_ENABLE([xinerama],
AS_HELP_STRING([--disable-xinerama],[Disable XINERAMA support.]))
if test x$enable_xinerama != xno ; then
PKG_CHECK_MODULES([XINERAMA],[xinerama],[
CORE_CFLAGS="$XINERAMA_CFLAGS $CORE_CFLAGS"
CORE_LIBS="$XINERAMA_LIBS $CORE_LIBS"
AC_DEFINE([XINERAMA],[1],[Define to enable Xinerama support.])
features="$features xinerama"],
[AC_MSG_ERROR([Package XINERAMA is required for Xinerama extension.])])
fi
AC_ARG_ENABLE([fribidi],
AS_HELP_STRING([--disable-fribidi],[Disable right to left support.]))
if test "$enable_fribidi" != "no" && test "$enable_i18n" != "no"; then
PKG_CHECK_MODULES([FRIBIDI], [fribidi],[
CORE_CFLAGS="$FRIBIDI_CFLAGS $CORE_CFLAGS"
CORE_LIBS="$FRIBIDI_LIBS $CORE_LIBS"
AC_DEFINE([CONFIG_FRIBIDI],[1],[Define to enable fribidi support.])
features="$features fribidi"],
[AC_MSG_ERROR([Package FRIBIDI is required for FriBidi support.])])
fi
AC_ARG_ENABLE([menus-fdo],
AS_HELP_STRING([--disable-menus-fdo],[Disable support of freedesktop.org style menus.]))
if test x$enable_menus_fdo != xno; then
PKG_CHECK_MODULES([GIO],[gio-2.0 gio-unix-2.0],[
AC_DEFINE([CONFIG_FDO_MENUS],[1],[Define to support freedesktop.org style menus.])
BUILD_MENU_FDO=yes
APPLICATIONS="${APPLICATIONS} icewm-menu-fdo"],
[AC_MSG_WARN([Freedesktop style menus not supported.])])
fi
AC_SUBST([GIO_CFLAGS])
AC_SUBST([GIO_LIBS])
AC_ARG_ENABLE([rsvg],
AS_HELP_STRING([--disable-librsvg],[Disable SVG using librsvg.]))
AC_ARG_ENABLE([imlib2],
AS_HELP_STRING([--disable-imlib2],[Disable imlib2 rendering.
@<:@default=enabled@:>@]))
AC_ARG_ENABLE([nanosvg],
AS_HELP_STRING([--enable-nanosvg],[Enable SVG using nanosvg.]))
AC_ARG_ENABLE([gdk-pixbuf],
AS_HELP_STRING([--enable-gdk-pixbuf],[Enable gdk-pixbuf rendering.
@<:@default=disabled@:>@]))
image_library=
if test "x$enable_gdk_pixbuf" = xyes
then
PKG_CHECK_MODULES([PIXBUF],[gdk-pixbuf-xlib-2.0],[
IMAGE_CFLAGS="$PIXBUF_CFLAGS"
IMAGE_LIBS="$PIXBUF_LIBS"
AC_DEFINE([CONFIG_GDK_PIXBUF_XLIB],[1],
[Define to enable gdk-pixbuf rendering.])
image_library="gdk-pixbuf-xlib-2.0"])
fi
if test "x$enable_gdk_pixbuf" != xyes &&
test "x$enable_imlib2" != xno
then
PKG_CHECK_MODULES([IMLIB2],[imlib2],[
IMAGE_CFLAGS="$IMLIB2_CFLAGS"
IMAGE_LIBS="$IMLIB2_LIBS"
AC_DEFINE([CONFIG_IMLIB2],[1],[Define to enable imlib2 rendering.])
image_library="imlib2"])
fi
if test "x$image_library" = "xgdk-pixbuf-xlib-2.0" ||
test "x$image_library" = "ximlib2"
then
if test "x$enable_nanosvg" = xyes
then
if ! test -f src/nanosvg.h ||
! test -s src/nanosvg.h ||
! test -f src/nanosvgrast.h ||
! test -s src/nanosvgrast.h
then
hub=https://raw.githubusercontent.com/memononen/nanosvg/master/src/
if command -v wget >/dev/null
then
AC_MSG_NOTICE([downloading nanosvg using wget])
if ! wget -q --timeout=3 -e robots=off -e noclobber=off \
-P src $hub/nanosvg.h $hub/nanosvgrast.h
then
AC_MSG_WARN([Download of nanosvg failed.])
fi
fi
fi
if test -f src/nanosvg.h &&
test -s src/nanosvg.h &&
test -f src/nanosvgrast.h &&
test -s src/nanosvgrast.h
then
AC_DEFINE([CONFIG_NANOSVG],[1],[Define to enable nanosvg rendering.])
else
AC_MSG_WARN([Nanosvg includes are missing. SVG is not supported.])
fi
fi
if test "x$enable_nanosvg" != xyes &&
test "x$enable_librsvg" != xno
then
PKG_CHECK_MODULES([LIBRSVG],[librsvg-2.0],[
IMAGE_CFLAGS="$LIBRSVG_CFLAGS $IMAGE_CFLAGS"
IMAGE_LIBS="$LIBRSVG_LIBS $IMAGE_LIBS"
AC_DEFINE([CONFIG_LIBRSVG],[1],[Define to enable librsvg rendering.])
image_library="$image_library librsvg-2.0"],
[AC_MSG_WARN([Package librsvg is missing. SVG is not supported.])])
fi
PKG_CHECK_MODULES([XPM],[xpm],[
IMAGE_CFLAGS="$IMAGE_CFLAGS $XPM_CFLAGS"
IMAGE_LIBS="$IMAGE_LIBS $XPM_LIBS"
AC_DEFINE([CONFIG_XPM],[1],[Define to enable libxpm rendering.])
image_library="$image_library libxpm"],
[AC_MSG_ERROR([Package libXpm is required for themable cursors.])])
fi
if test "x$enable_gdk_pixbuf" != xyes &&
test "x$enable_imlib2" = xno
then
PKG_CHECK_MODULES([XPM],[xpm],[
IMAGE_CFLAGS="$XPM_CFLAGS"
IMAGE_LIBS="$XPM_LIBS"
AC_DEFINE([CONFIG_XPM],[1],[Define to enable libxpm rendering.])
image_library=libxpm],
[AC_MSG_ERROR([Package libXpm is required for themable cursors.])])
PKG_CHECK_MODULES([LIBPNG],[libpng >= 1.2],[
IMAGE_CFLAGS="$LIBPNG_CFLAGS $IMAGE_CFLAGS"
IMAGE_LIBS="$LIBPNG_LIBS $IMAGE_LIBS"
AC_DEFINE([CONFIG_LIBPNG],[1],[Define to enable libpng rendering.])
image_library="$image_library libpng"],
[AC_MSG_ERROR([Package libpng is required to load icewm themes.])])
PKG_CHECK_MODULES([LIBJPEG],[libjpeg],[
IMAGE_CFLAGS="$LIBJPEG_CFLAGS $IMAGE_CFLAGS"
IMAGE_LIBS="$LIBJPEG_LIBS $IMAGE_LIBS"
AC_DEFINE([CONFIG_LIBJPEG],[1],[Define to enable libjpeg rendering.])
image_library="$image_library libjpeg"],
[if test -f /usr/include/jpeglib.h &&
test -x /usr/lib64/libjpeg.so ; then
IMAGE_LIBS="-ljpeg $IMAGE_LIBS"
AC_DEFINE([CONFIG_LIBJPEG],[1],[Define to enable libjpeg rendering.])
fi])
fi
AC_SUBST([IMAGE_CFLAGS])
AC_SUBST([IMAGE_LIBS])
AM_CONDITIONAL([BUILD_TESTS],[test x$BUILD_TESTS = xyes])
AM_CONDITIONAL([BUILD_SOUND],[test x$BUILD_SOUND = xyes])
AM_CONDITIONAL([BUILD_MENU_FDO],[test x$BUILD_MENU_FDO = xyes])
AM_CONDITIONAL([BUILD_ICEWMTRAY],[test x$BUILD_ICEWMTRAY = xyes])
test "x$prefix" = xNONE && prefix="$ac_default_prefix"
AC_ARG_WITH([libdir],
AS_HELP_STRING([--with-libdir=PATH],[Package data directory.
@<:@default=DATADIR/icewm@:>@]))
if test -z "$with_libdir" -o "x$with_libdir" = xyes ; then
with_libdir='${datadir}/icewm'
fi
ICE_EXPAND([LIBDIR],[${with_libdir}])
AC_DEFINE_UNQUOTED([LIBDIR],["${LIBDIR}"],
[Define to package data directory.])
AC_SUBST([LIBDIR])
AC_ARG_WITH([cfgdir],
AS_HELP_STRING([--with-cfgdir=PATH],[Package configuration directory.
@<:@default=SYSCONFDIR/icewm@:>@]))
if test -z "$with_cfgdir" -o "x$with_cfgdir" = xyes ; then
with_cfgdir='${sysconfdir}/icewm'
fi
ICE_EXPAND([CFGDIR],[${with_cfgdir}])
AC_DEFINE_UNQUOTED([CFGDIR],["${CFGDIR}"],
[Define to package configuration directory.])
AC_SUBST([CFGDIR])
AC_ARG_WITH([docdir],
AS_HELP_STRING([--with-docdir=PATH],[Package documentation directory.
@<:@default=DOCDIR@:>@]))
if test -z "$with_docdir" -o "x$with_docdir" = xyes ; then
with_docdir='${docdir}'
fi
ICE_EXPAND([DOCDIR],[${with_docdir}])
AC_DEFINE_UNQUOTED([DOCDIR],["${DOCDIR}"],
[Define to package documentation directory.])
ICE_EXPAND([LOCDIR],[${localedir}])
AC_DEFINE_UNQUOTED([LOCDIR],["${LOCDIR}"],
[Define to locale directory.])
AC_ARG_WITH([theme],
AS_HELP_STRING([--with-theme=NAME],[Default theme.
[default="default/default.theme"]]),,
with_theme="default/default.theme")
AC_DEFINE_UNQUOTED([CONFIG_DEFAULT_THEME],
"${with_theme}",[Name of default theme])
AC_ARG_WITH([background],
AS_HELP_STRING([--with-background=PATH],
[Default background image or directory.]),
[],[with_background=""])
AC_DEFINE_UNQUOTED([CONFIG_DEFAULT_BACKGROUND], "${with_background}",
[Path of default background image or directory.])
AC_ARG_WITH([xterm],
AS_HELP_STRING([--with-xterm=xterm],[Default X11 terminal emulator.]),
[],[with_xterm=xterm])
AC_SUBST([XTERMCMD],[${with_xterm}])
AC_DEFINE_UNQUOTED([XTERMCMD],[${with_xterm}],[Name of terminal emulator.])
AC_DEFINE_UNQUOTED([HOSTOS],["${host_os}"],
[Define to the host operating system.])
AC_DEFINE_UNQUOTED([HOSTCPU],["${host_cpu}"],
[Define to the host CPU.])
AC_DEFINE_UNQUOTED([ICEHELPIDX],["${DOCDIR}/icewm.html"],
[Define to the IceWM help index file.])
AC_ARG_ENABLE([debug],
AS_HELP_STRING([--enable-debug],[Enable debugging of IceWM.]))
if test x$enable_debug = xyes ; then
AC_DEFINE([DEBUG],[1],[Define if you want to debug IceWM.])
CXXFLAGS="$CXXFLAGS -g -DDEBUG"
features="$features debugging-symbols"
fi
AC_ARG_ENABLE([logevents],
AS_HELP_STRING([--enable-logevents],[Support logging of X11 events.]))
if test x$enable_logevents = xyes ; then
AC_DEFINE([LOGEVENTS],[1],[Define to enable X11 event logging support.])
features="$features logevents"
fi
CORE_LIBS="$CORE_LIBS -lm"
AC_ARG_VAR([EXTRA_LIBS], [Extra core libraries.])
CORE_LIBS="$CORE_LIBS "'$(EXTRA_LIBS)'
AC_CONFIG_FILES([Makefile
src/Makefile
po/Makefile.in
doc/Makefile
man/Makefile
lib/Makefile
lib/keys
lib/menu
lib/programs
lib/toolbar
lib/winoptions])
AC_OUTPUT
# Display results
AC_MSG_RESULT([])
ICE_MSG_VALUE([Applications], APPLICATIONS)
ICE_MSG_VALUE([Image library], image_library)
ICE_MSG_VALUE([Audio support], audio_support)
ICE_MSG_VALUE([Features], features)
ICE_MSG_VALUE([Paths: PREFIX], prefix)
ICE_MSG_VALUE([ BINDIR], bindir)
ICE_MSG_VALUE([ LOCDIR], localedir)
ICE_MSG_VALUE([ LIBDIR], LIBDIR)
ICE_MSG_VALUE([ CFGDIR], CFGDIR)
ICE_MSG_VALUE([ DOCDIR], DOCDIR)
ICE_MSG_VALUE([ MANDIR], mandir)
ICE_MSG_VALUE([ XTERMCMD], XTERMCMD)
AC_MSG_RESULT([])
# vim: set ft=config sw=4: