2 dnl Window Maker autoconf input.
8 dnl libtoolize --force --automake
9 dnl automake -a --gnu --include-deps
13 dnl Due to a bug in Autoconf 2.68 (apparently a regression), we need at least
14 dnl version 2.68b which includes this patch:
15 dnl http://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commit;h=2b0d95faef68d7ed7c08b0edb9ff1c38728376fa
17 dnl Because the 2.69 was released only a few month later, let's just ask for it
21 AC_INIT(WindowMaker, 0.95.6, , WindowMaker, http://www.windowmaker.org/)
22 AC_CONFIG_SRCDIR(src/WindowMaker.h)
23 AC_CONFIG_MACRO_DIR([m4])
24 AC_CONFIG_HEADERS(config.h)
25 AM_INIT_AUTOMAKE([1.11 silent-rules])
27 AH_BOTTOM([#include "config-paths.h"])
29 dnl libtool library versioning
30 dnl =======================
36 dnl 1. Start with version information of ‘0:0:0’ for each libtool library.
37 dnl 2. Update the version information only immediately before a public
38 dnl release of your software. More frequent updates are unnecessary, and
39 dnl only guarantee that the current interface number gets larger faster.
40 dnl 3. If the library source code has changed at all since the last
41 dnl update, then increment revision (‘c:r:a’ becomes ‘c:r+1:a’).
42 dnl 4. If any interfaces have been added, removed, or changed since the
43 dnl last update, increment current, and set revision to 0.
44 dnl 5. If any interfaces have been added since the last public release,
45 dnl then increment age.
46 dnl 6. If any interfaces have been removed or changed since the last
47 dnl public release, then set age to 0.
53 WRASTER_VERSION=$WRASTER_CURRENT:$WRASTER_REVISION:$WRASTER_AGE
54 AC_SUBST(WRASTER_VERSION)
60 WINGS_VERSION=$WINGS_CURRENT:$WINGS_REVISION:$WINGS_AGE
61 AC_SUBST(WINGS_VERSION)
67 WUTIL_VERSION=$WUTIL_CURRENT:$WUTIL_REVISION:$WUTIL_AGE
68 AC_SUBST(WUTIL_VERSION)
71 dnl Checks for host/os name
72 dnl =======================
73 dnl AC_CANONICAL_HOST -- already done by AC_PROG_LIBTOOL
75 dnl Checks for programs.
76 dnl ===================
80 AC_PROG_GCC_TRADITIONAL
87 [AS_HELP_STRING([--enable-debug], [enable debugging options, @<:@default=no@:>@])],
88 [AS_CASE(["$enableval"],
91 [AC_MSG_ERROR([bad value $enableval for --enable-debug])] )],
93 AS_IF([test "x$debug" = "xyes"],
94 [dnl This flag should have already been detected and added, but if user
95 dnl provided an explicit CFLAGS it may not be the case
96 AS_IF([echo " $CFLAGS " | grep " -g " 2>&1 > /dev/null],
97 [@%:@ Debug symbol already activated],
98 [AX_CFLAGS_GCC_OPTION([-g])])
100 dnl This flag generally makes debugging nightmarish, remove it if present
101 CFLAGS="`echo "$CFLAGS" | sed -e 's/-fomit-frame-pointer *//' `"
103 dnl Enable internal debug code
104 CPPFLAGS="$CPPFLAGS -DDEBUG"
106 dnl When debug is not enabled, the user probably does not wants to keep
107 dnl assertions in the final program
108 CPPFLAGS="$CPPFLAGS -DNDEBUG"
112 AX_CFLAGS_GCC_OPTION(-Wall)
113 AX_CFLAGS_GCC_OPTION(-Wextra -Wno-sign-compare)
115 dnl The use of trampolines cause code that can crash on some secured OS, it is
116 dnl also known to be a source of crash if not used properly, in a more general
117 dnl way it tends to generate binary code that may not be optimal, and it is
118 dnl not compatible with the 'nested-func-to-macro' workaround
119 WM_CFLAGS_CHECK_FIRST([-Wtrampolines],
120 [-Werror=trampolines dnl try to generate an error if possible
121 -Wtrampolines dnl if not, try to fall back to a simple warning
124 AS_IF([test "x$debug" = "xyes"],
125 [dnl When debug is enabled, we try to activate more checks from
126 dnl the compiler. They are on independant check because the
127 dnl macro checks all the options at once, but we may have cases
128 dnl where some options are not supported and we don't want to
129 dnl loose all of them.
131 dnl clang, suggest parenthesis on bit operations that could be
132 dnl misunderstood due to C operator precedence
133 AX_CFLAGS_GCC_OPTION([-Wbitwise-op-parentheses])
135 dnl Points at code that gcc thinks is so complicated that gcc
136 dnl gives up trying to optimize, which probably also means it is
137 dnl too complicated to maintain
138 AX_CFLAGS_GCC_OPTION([-Wdisabled-optimization])
140 dnl Floating-point comparison is not a good idea
141 AX_CFLAGS_GCC_OPTION([-Wfloat-equal])
143 dnl clang warns about constants that may have portability issues due
144 dnl to the endianness of the host
145 AX_CFLAGS_GCC_OPTION([-Wfour-char-constants])
147 dnl clang warns about constant that may be too big to be portable
148 AX_CFLAGS_GCC_OPTION([-Wliteral-range])
150 dnl Try to report misuses of '&' versus '&&' and similar
151 AX_CFLAGS_GCC_OPTION([-Wlogical-op])
153 dnl clang, reports cases where the code assumes everyone is an
154 dnl expert in C operator precedence... which is unlikely!
155 AX_CFLAGS_GCC_OPTION([-Wlogical-op-parentheses])
157 dnl Reports declaration of global things that are done inside
158 dnl a local environment, instead of using the appropriate
160 AX_CFLAGS_GCC_OPTION([-Wnested-externs])
162 dnl Warn about constant strings that could pose portability issues
163 AX_CFLAGS_GCC_OPTION([-Woverlength-strings])
165 dnl Use of 'sizeof()' on inappropriate pointer types
166 AX_CFLAGS_GCC_OPTION([-Wpointer-arith])
168 dnl Having more than 1 prototype for a function makes code updates
169 dnl more difficult, so try to avoid it
170 AX_CFLAGS_GCC_OPTION([-Wredundant-decls])
172 dnl clang, detect some misuses of sizeof. We also count in our code
173 dnl on the use of the macro 'wlength' which contains a check if the
174 dnl compiler support C11's static_assert
175 AX_CFLAGS_GCC_OPTION([-Wsizeof-array-argument])
177 dnl Prototype of function must be explicit, no deprecated K&R syntax
178 dnl and no empty argument list which prevents compiler from doing
179 dnl type checking when using the function
180 WM_CFLAGS_GCC_OPTION_STRICTPROTO
182 dnl Proper attributes helps the compiler to produce better code
183 WM_CFLAGS_CHECK_FIRST([format attribute suggest],
184 [-Wsuggest-attribute=format dnl new gcc syntax
185 -Wmissing-format-attribute dnl old gcc syntax, clang
187 WM_CFLAGS_CHECK_FIRST([no-return attribute suggest],
188 [-Wsuggest-attribute=noreturn dnl gcc syntax
189 -Wmissing-noreturn dnl clang syntax
192 dnl GCC provides a couple of checks to detect incorrect macro uses
193 AX_CFLAGS_GCC_OPTION([-Wundef])
194 WM_CFLAGS_GCC_OPTION_UNUSEDMACROS
196 dnl clang reports stuff marked unused but which is actually used
197 AX_CFLAGS_GCC_OPTION([-Wused-but-marked-unused])
199 dnl When debug not enabled, we try to avoid some non-necessary
200 dnl messages from the compiler
202 dnl To support legacy X servers, we have sometime to use
203 dnl functions marked as deprecated. We do not wish our users
204 dnl to be worried about it
205 AX_CFLAGS_GCC_OPTION([-Wno-deprecated])
206 AX_CFLAGS_GCC_OPTION([-Wno-deprecated-declarations])
210 dnl Support for Nested Functions by the compiler
211 dnl ============================================
212 WM_PROG_CC_NESTEDFUNC
216 dnl =================
220 dnl Tracking on what is detected for final status
221 dnl =============================================
227 dnl Platform-specific Makefile setup
228 dnl ================================
230 [*-*-linux*|*-*-cygwin*|*-gnu*], [WM_OSDEP="linux" ; CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=600"],
231 [*-*-freebsd*|*-k*bsd-gnu*], [WM_OSDEP="bsd" ; CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=600 -DFREEBSD"],
232 [*-*-netbsd*], [WM_OSDEP="bsd" ; CPPFLAGS="$CPPFLAGS -DNETBSD"],
233 [*-*-openbsd*], [WM_OSDEP="bsd" ; CPPFLAGS="$CPPFLAGS -DOPENBSD"],
234 [*-*-dragonfly*], [WM_OSDEP="bsd" ; CPPFLAGS="$CPPFLAGS -DDRAGONFLYBSD"],
235 [*-apple-darwin*], [WM_OSDEP="darwin"],
236 [*-*-solaris*], [WM_OSDEP="stub"], dnl solaris.c when done
238 AM_CONDITIONAL([WM_OSDEP_LINUX], [test "x$WM_OSDEP" = "xlinux"])
239 AM_CONDITIONAL([WM_OSDEP_BSD], [test "x$WM_OSDEP" = "xbsd"])
240 AM_CONDITIONAL([WM_OSDEP_DARWIN], [test "x$WM_OSDEP" = "xdarwin"])
241 AM_CONDITIONAL([WM_OSDEP_GENERIC], [test "x$WM_OSDEP" = "xstub"])
247 dnl move this earlier in the script... anyone know why this is handled
248 dnl in such a bizarre way?
250 test "x$prefix" = xNONE && prefix=$ac_default_prefix
251 dnl Let make expand exec_prefix.
252 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
255 _bindir=`eval echo $bindir`
256 _bindir=`eval echo $_bindir`
258 lib_search_path='-L${libdir}'
260 inc_search_path='-I${includedir}'
262 dnl ===============================================
263 dnl Specify paths to look for libraries and headers
264 dnl ===============================================
265 AC_ARG_WITH(libs-from, AS_HELP_STRING([--with-libs-from], [pass compiler flags to look for libraries]),
266 [lib_search_path="$withval $lib_search_path"])
268 AC_ARG_WITH(incs-from, AS_HELP_STRING([--with-incs-from], [pass compiler flags to look for header files]),
269 [inc_search_path="$withval $inc_search_path"])
274 AC_ARG_ENABLE([boehm-gc],
275 [AS_HELP_STRING([--enable-boehm-gc], [use Boehm GC instead of the default libc malloc() [default=no]])],
276 [AS_CASE(["$enableval"],
277 [yes], [with_boehm_gc=yes],
278 [no], [with_boehm_gc=no],
279 [AC_MSG_ERROR([bad value $enableval for --enable-boehm-gc])] )],
281 AS_IF([test "x$with_boehm_gc" = "xyes"],
282 AC_SEARCH_LIBS([GC_malloc], [gc],
283 [AC_DEFINE(USE_BOEHM_GC, 1, [Define if Boehm GC is to be used])],
284 [AC_MSG_FAILURE([--enable-boehm-gc specified but test for libgc failed])]))
289 AC_ARG_ENABLE([lcov],
290 [AS_HELP_STRING([--enable-lcov[=output-directory]], [enable coverage data generation using LCOV (GCC only) [default=no]])],
294 AS_IF([test "x$enable_lcov" != "xno"],
295 [AX_CFLAGS_GCC_OPTION(-fprofile-arcs -ftest-coverage)
296 AS_IF([test "x$enable_lcov" = "xyes"],
297 [lcov_output_directory="coverage-report"],
298 [lcov_output_directory="${enable_lcov}/coverage-report"])
299 AC_SUBST(lcov_output_directory)])
301 AM_CONDITIONAL([USE_LCOV], [test "x$enable_lcov" != "xno"])
304 dnl ============================
305 dnl Checks for library functions
306 dnl ============================
307 dnl not used anywhere
310 WM_FUNC_SECURE_GETENV
311 AC_CHECK_FUNCS(gethostname select poll strcasecmp strncasecmp \
312 setsid mallinfo mkstemp sysconf)
313 AC_SEARCH_LIBS([strerror], [cposix])
315 dnl nanosleep is generally available in standard libc, although not always the
316 dnl case. One known example is Solaris which needs -lrt
317 AC_SEARCH_LIBS([nanosleep], [rt], [],
318 [AC_MSG_ERROR([function 'nanosleep' not found, please report to wmaker-dev@lists.windowmaker.org])])
321 dnl Check for strlcat/strlcpy
322 dnl =========================
323 AC_ARG_WITH([libbsd],
324 [AS_HELP_STRING([--without-libbsd], [do not use libbsd for strlcat and strlcpy [default=check]])],
325 [AS_IF([test "x$with_libbsd" != "xno"],
332 AC_SEARCH_LIBS([strlcat],[$with_libbsd],
333 [AC_DEFINE(HAVE_STRLCAT, 1, [Define if strlcat is available])],
337 AC_SEARCH_LIBS([strlcpy],[$with_libbsd],
338 [AC_DEFINE(HAVE_STRLCAT, 1, [Define if strlcpy is available])],
345 AS_IF([test "x$ac_cv_search_strlcat" = "x-lbsd" -o "x$ac_cv_search_strlcpy" = "x-lbsd"],
347 AC_CHECK_HEADERS([bsd/string.h])]
351 dnl Check for OpenBSD kernel memory interface - kvm(3)
352 dnl ==================================================
353 AS_IF([test "x$WM_OSDEP" = "xbsd"],
354 AC_SEARCH_LIBS([kvm_openfiles], [kvm]) )
356 dnl Check for inotify
357 dnl =================
358 AC_CHECK_HEADERS(sys/inotify.h, AC_DEFINE(HAVE_INOTIFY, 1, Check for inotify))
362 dnl =================
363 AC_CHECK_HEADERS([syslog.h], [AC_DEFINE([HAVE_SYSLOG], [1], [Check for syslog])])
366 dnl Checks for header files.
367 dnl =======================
370 AC_CHECK_HEADERS(fcntl.h limits.h sys/ioctl.h libintl.h poll.h malloc.h ctype.h \
374 dnl Checks for typedefs, structures, and compiler characteristics.
375 dnl ==============================================================
387 dnl AC_ARG_VAR(PKGCONFIG, [pkg-config command])
388 AC_CHECK_PROG(PKGCONFIG, pkg-config, pkg-config)
397 AC_CHECK_FUNC(gettext, [HAVEGETTEXT="yes"],
398 AC_CHECK_LIB(intl, gettext, [INTLIBS="-lintl" HAVEGETTEXT="yes"],
401 AC_CHECK_PROG(XGETTEXT, xgettext, xgettext)
403 if test "$XGETTEXT" != ""; then
404 if $XGETTEXT --help 2>&1 | grep illegal >/dev/null ; then
405 echo "xgettext isn't GNU version"
410 if test "$LINGUAS" != ""; then
411 if test "$XGETTEXT" != "" -a "$HAVEGETTEXT" != ""; then
412 AC_DEFINE(I18N, 1, [Internationalization (I18N) support (set by configure)])
414 echo "xgettext and gettext() exist; will build i18n support for $LINGUAS"
418 echo "xgettext and libintl.a don't both exist; will not build i18n support"
429 dnl The Tower of Babel
430 dnl ==================
432 dnl List of supported locales
433 dnl =========================
434 supported_locales="be bg bs ca cs da de el es et fi fr gl hr hu hy it ja ko ms nl no pl pt ro ru sk sv tr zh_CN zh_TW"
435 supported_wprefs_locales="bg ca cs de es et fi fr hr hu it ja ko nl pt ru sk zh_CN zh_TW"
436 supported_wings_locales="bg ca cs de fr hu nl sk"
437 supported_util_locales="de es fr nl pt"
439 for lang in $LINGUAS; do
441 for l in $supported_locales; do
442 if test "$l" = "$lang"; then
447 if test "$ok" = 1; then
448 MOFILES="$MOFILES $lang.mo"
450 echo "Locale $lang is not supported."
453 for l in $supported_wprefs_locales; do
454 if test "$l" = "$lang"; then
459 if test "$ok" = 1; then
460 WPMOFILES="$WPMOFILES $lang.mo"
463 for l in $supported_util_locales; do
464 if test "$l" = "$lang"; then
469 if test "$ok" = 1; then
470 UTILMOFILES="$UTILMOFILES $lang.mo"
473 for l in $supported_wings_locales; do
474 if test "$l" = "$lang"; then
479 if test "$ok" = 1; then
480 WINGSMOFILES="$WINGSMOFILES $lang.mo"
485 dnl Added by Oliver - Support for NLSDIR option
486 dnl ===========================================
487 AC_ARG_WITH(nlsdir, AS_HELP_STRING([--with-nlsdir=PATH], [specify where the locale stuff should go]))
489 if test "x$NLSDIR" = "x"; then
490 if test "x$with_nlsdir" != "x"; then
493 NLSDIR='$(prefix)/lib/locale'
498 AC_ARG_WITH(menu-textdomain, AS_HELP_STRING([--with-menu-textdomain=DOMAIN], [specify gettext domain used for menu translations]),
499 [if test "x$withval" != "xno"; then
500 menutextdomain=$withval
502 AC_SUBST(menutextdomain)
508 AC_SUBST(UTILMOFILES)
509 AC_SUBST(WINGSMOFILES)
510 AC_SUBST(supported_locales)
512 dnl ===========================================
513 dnl Stuff that uses X
514 dnl ===========================================
519 AC_MSG_ERROR([The path for the X11 files not found!
520 Make sure you have X and it's headers and libraries (the -devel packages
521 in Linux) installed.])
524 X_LIBRARY_PATH=$x_libraries
527 XLIBS="-lX11 $X_EXTRA_LIBS"
529 lib_search_path="$lib_search_path $XLFLAGS"
530 inc_search_path="$inc_search_path $XCFLAGS"
532 AC_SUBST(X_LIBRARY_PATH)
534 dnl Decide which locale function to use, setlocale() or _Xsetlocale()
535 dnl by MANOME Tomonori
536 dnl ===========================================
538 AC_ARG_ENABLE(locale, AS_HELP_STRING([--disable-locale], [disable use of X locale support]),
541 if test "$use_locale" = yes; then
542 AC_CHECK_LIB(X11, _Xsetlocale,
543 AC_DEFINE(X_LOCALE, 1, [define if you want support for X window's X_LOCALE (set by configure)]),,
547 dnl Check whether XInternAtoms() exist
548 dnl ==================================
549 AC_CHECK_LIB(X11, XInternAtoms,
550 AC_DEFINE(HAVE_XINTERNATOMS, 1, [define if your X server has XInternAtoms() (set by configure)]),,
553 dnl Check whether XConvertCase() exist
554 dnl ==================================
555 AC_CHECK_LIB(X11, XConvertCase,
556 AC_DEFINE(HAVE_XCONVERTCASE, 1, [define if your X server has XConvertCase() (set by configure)]),,
559 dnl XKB keyboard language status
560 dnl ============================
561 AC_ARG_ENABLE(modelock, AS_HELP_STRING([--enable-modelock], [XKB keyboard language status support]),
562 AC_DEFINE(XKB_MODELOCK, 1, [whether XKB language MODELOCK should be enabled]))
564 dnl XDND Drag-nd-Drop support
565 dnl ============================
566 AC_ARG_ENABLE([xdnd],
567 [AS_HELP_STRING([--disable-xdnd], [disable Drag-nd-Drop support])],
568 [AS_CASE(["$enableval"],
570 [AC_MSG_ERROR([bad value $enableval for --disable-xdnd]) ]) ],
572 supported_xext="$supported_xext XDnD"
573 AC_DEFINE(XDND, 1, [whether Drag-nd-Drop support should be enabled])
578 AC_ARG_ENABLE([shape],
579 [AS_HELP_STRING([--disable-shape], [disable shaped window extension support])],
580 [AS_CASE(["$enableval"],
582 [AC_MSG_ERROR([bad value $enableval for --enable-shape]) ]) ],
589 [AS_HELP_STRING([--disable-shm], [disable usage of MIT-SHM extension])],
590 [AS_CASE(["$enableval"],
592 [AC_MSG_ERROR([bad value $enableval for --enable-shm]) ]) ],
596 dnl X Misceleanous Utility
597 dnl ======================
598 # the libXmu is used in WRaster
603 AC_ARG_ENABLE([xinerama],
604 [AS_HELP_STRING([--enable-xinerama], [enable Xinerama extension support])],
605 [AS_CASE(["$enableval"],
607 [AC_MSG_ERROR([bad value $enableval for --enable-xinerama]) ]) ],
608 [enable_xinerama=auto])
609 WM_XEXT_CHECK_XINERAMA
613 AC_ARG_ENABLE([randr],
614 [AS_HELP_STRING([--enable-randr], [enable RandR extension support (NOT recommended, buggy)])],
615 [AS_CASE(["$enableval"],
617 [AC_MSG_ERROR([bad value $enableval for --enable-randr]) ]) ],
622 dnl libWINGS uses math functions, check whether usage requires linking
628 dnl libWINGS uses FcPatternDel from libfontconfig
630 AC_MSG_CHECKING([for fontconfig library])
631 FCLIBS=`$PKGCONFIG fontconfig --libs`
632 if test "x$FCLIBS" = "x" ; then
633 AC_MSG_RESULT([not found])
635 AC_MSG_RESULT([found])
640 dnl Xft2 antialiased font support
641 dnl =============================
646 if test "x$PKGCONFIG" != x -a "`$PKGCONFIG xft; echo $?`" = 0; then
647 XFTCONFIG="$PKGCONFIG xft"
650 AC_CHECK_PROG(XFTCONFIG, xft-config, xft-config)
653 AC_MSG_CHECKING([for the Xft2 library])
655 if test "x$XFTCONFIG" != x; then
656 XFTLIBS=`$XFTCONFIG --libs`
657 XFTFLAGS=`$XFTCONFIG --cflags`
658 AC_MSG_RESULT([found])
660 AC_MSG_RESULT([not found])
662 echo "ERROR!!! libXft2 is not installed or could not be found."
663 echo " Xft2 is a requirement for building Window Maker."
664 echo " Please install it (along with fontconfig) before continuing."
673 dnl The macro below will use $XFTFLAGS (defined above) to find Xft.h
675 WM_CHECK_XFT_VERSION($minXFT, goodxft=yes, goodxft=no)
677 if test "$goodxft" = no; then
679 echo "ERROR!!! libXft on this system is an old version."
680 echo " Please consider upgrading to at least version ${minXFT}."
691 AC_ARG_ENABLE(pango, AS_HELP_STRING([--enable-pango], [enable Pango text layout support]),
692 pango=$enableval, pango=no)
696 if test "$pango" = yes; then
697 PANGOLIBS=`$PKGCONFIG pangoxft --libs`
698 PANGOFLAGS=`$PKGCONFIG pangoxft --cflags`
699 if test "x$PANGOLIBS" = "x" ; then
700 AC_MSG_RESULT([not found])
702 AC_DEFINE(USE_PANGO, 1, [Define if Pango is to be used])
703 AC_MSG_RESULT([found])
706 inc_search_path="$inc_search_path $PANGOFLAGS"
709 dnl ==============================================
710 dnl Graphic Format Libraries
711 dnl ==============================================
716 [AS_HELP_STRING([--disable-xpm], [disable use of XPM pixmaps through libXpm])],
717 [AS_CASE(["$enableval"],
719 [AC_MSG_ERROR([bad value $enableval for --enable-xpm])] )],
729 AC_SUBST(X_EXTRA_LIBS)
731 dnl ===============================================
732 dnl End of stuff that uses X
733 dnl ===============================================
738 AS_IF([test "x$LIBEXIF" != "x"],
739 [AC_DEFINE(HAVE_EXIF, 1, [Define if EXIF can be used])])
744 [AS_HELP_STRING([--disable-png], [disable PNG support through libpng])],
745 [AS_CASE(["$enableval"],
747 [AC_MSG_ERROR([bad value $enableval for --enable-png])] )],
754 AC_ARG_ENABLE([jpeg],
755 [AS_HELP_STRING([--disable-jpeg], [disable JPEG support through libjpeg])],
756 [AS_CASE(["$enableval"],
758 [AC_MSG_ERROR([bad value $enableval for --enable-jpeg])] )],
766 [AS_HELP_STRING([--disable-gif], [disable GIF support through libgif or libungif])],
767 [AS_CASE(["$enableval"],
769 [AC_MSG_ERROR([bad value $enableval for --enable-gif])] )],
776 AC_ARG_ENABLE([tiff],
777 [AS_HELP_STRING([--disable-tiff], [disable use of TIFF images through libtiff])],
778 [AS_CASE(["$enableval"],
780 [AC_MSG_ERROR([bad value $enableval for --enable-tiff])] )],
787 AC_ARG_ENABLE([webp],
788 [AS_HELP_STRING([--disable-webp], [disable WEBP support through libwebp])],
789 [AS_CASE(["$enableval"],
791 [AC_MSG_ERROR([bad value $enableval for --enable-webp])] )],
798 AC_ARG_ENABLE([magick],
799 [AS_HELP_STRING([--disable-magick], [disable MAGICK support through libMagickWand])],
800 [AS_CASE(["$enableval"],
802 [AC_MSG_ERROR([bad value $enableval for --enable-magick])] )],
803 [enable_magick=auto])
804 WM_IMGFMT_CHECK_MAGICK
809 # The PPM format is always enabled because we have built-in support for the format
810 # We are not using any external library like libppm
811 supported_gfx="$supported_gfx builtin-PPM"
814 # Choice of the default format for icons
815 AS_IF([test "x$enable_tiff" != "xno"],
820 LIBRARY_SEARCH_PATH="$lib_search_path"
821 HEADER_SEARCH_PATH="$inc_search_path"
823 AC_SUBST(LIBRARY_SEARCH_PATH)
824 AC_SUBST(HEADER_SEARCH_PATH)
829 AM_CONDITIONAL([ICON_EXT_XPM], [test "x$ICONEXT" = "xxpm"])
830 AM_CONDITIONAL([ICON_EXT_TIFF], [test "x$ICONEXT" = "xtiff"])
833 dnl ==============================================
834 dnl End of Graphic Format Libraries
835 dnl ==============================================
839 dnl stdlib.h is checked here, because of conflict in jpeglib.h
840 AC_CHECK_HEADERS(stdlib.h)
842 # AC_PREFIX_PROGRAM(wmaker)
844 dnl Support for PIXMAPDIR option
845 dnl ============================
846 AC_ARG_WITH(pixmapdir, AS_HELP_STRING([--with-pixmapdir=PATH], [specify where pixmaps are located [DATADIR/pixmaps]]))
848 if test "x$with_pixmapdir" != "x"; then
849 pixmapdir=$with_pixmapdir
851 pixmapdir='${datadir}/pixmaps'
856 dnl Support for GNUSTEP_LOCAL_ROOT, for WPrefs.app
857 dnl ==============================================
859 AC_ARG_WITH(gnustepdir, AS_HELP_STRING([--with-gnustepdir=PATH], [specify the directory for GNUstep applications]))
861 if test "x`echo $with_gnustepdir | grep ^/`" != "x"; then
862 appspath=$with_gnustepdir
865 if test "x$appspath$GNUSTEP_LOCAL_ROOT" = "x"; then
866 wprefs_base_dir=${prefix}
867 wprefs_datadir="${datadir}/WPrefs"
868 wprefs_bindir="${bindir}"
872 if test "x$GNUSTEP_LOCAL_ROOT" != "x" ; then
873 gnustepdir=`echo "$GNUSTEP_LOCAL_ROOT" | sed -e "s|^${prefix}|prefix|"`
874 gnustepdir=`echo $gnustepdir | sed -e 's|^prefix|${prefix}|'`
877 wprefs_base_dir=$gnustepdir/Applications
878 wprefs_datadir=$wprefs_base_dir/WPrefs.app
879 wprefs_bindir=$wprefs_base_dir/WPrefs.app
882 AC_SUBST(wprefs_datadir)
883 AC_SUBST(wprefs_bindir)
886 dnl Enable User Defined Menu thing
887 dnl ==============================
888 AC_ARG_ENABLE(usermenu, AS_HELP_STRING([--enable-usermenu], [user defined menus for applications]),
889 if test "$enableval" = yes; then
890 AC_DEFINE(USER_MENU, 1, [define if you want user defined menus for applications])
897 dnl Add the post-poned compilation options
898 dnl ======================================
899 WM_CFLAGS_GCC_OPTION_POSTPONED
902 AC_OUTPUT(Makefile po/Makefile util/Makefile util/po/Makefile test/Makefile \
903 WINGs/Makefile WINGs/WINGs/Makefile WINGs/Documentation/Makefile \
904 WINGs/Examples/Makefile WINGs/Resources/Makefile WINGs/Tests/Makefile \
905 WINGs/Extras/Makefile WINGs/po/Makefile \
906 wmlib/Makefile wrlib/Makefile wrlib/tests/Makefile \
907 src/Makefile src/wconfig.h \
908 doc/Makefile doc/sk/Makefile doc/cs/Makefile \
910 WindowMaker/Makefile WindowMaker/Backgrounds/Makefile \
911 WindowMaker/Defaults/Makefile WindowMaker/IconSets/Makefile \
912 WindowMaker/Icons/Makefile WindowMaker/Pixmaps/Makefile \
913 WindowMaker/Styles/Makefile WindowMaker/Themes/Makefile \
914 WPrefs.app/Makefile WPrefs.app/tiff/Makefile WPrefs.app/xpm/Makefile \
915 WPrefs.app/po/Makefile )
918 dnl Output some helpful data for compiling wraster and WINGs/WUtil apps
919 dnl ===================================================================
921 dnl echo "WFLAGS=\"$LIBPL_INC_PATH -I$prefix/include\"" > WINGs-flags
922 dnl echo "WLIBS=\"-L$exec_prefix/lib -lWINGs -lwraster $LIBPL_LIBS $GFXLIBS -lm\""\
923 dnl | sed -e 's|\$(prefix)|'"$prefix|" >> WINGs-flags
925 dnl The #lp# and #rp# stuff below is a hack because [ and ] get lost when
928 AC_SUBST(lib_search_path)
929 AC_SUBST(inc_search_path)
932 dnl Spit out the configuration
933 dnl ==========================
935 if test "x$MOFILES" = "x"; then
941 if test "x$MOFILES" = "x"; then
944 languages=`echo $MOFILES | sed 's/.mo//g'`
948 echo "Window Maker was configured as follows:"
950 echo "Installation path prefix : $prefix"
951 echo "Installation path for binaries : $_bindir"
952 echo "Installation path for libraries : $libdir"
953 echo "Installation path for WPrefs.app : $wprefs_base_dir" | sed -e 's|\${prefix}|'"$prefix|"
954 echo "Supported X extensions: :$supported_xext"
955 echo "Supported graphic format libraries :$supported_gfx"
956 echo "Unsupported features :$unsupported"
957 echo "Antialiased text support in WINGs : $xft"
958 echo "Pango text layout support in WINGs : $pango"
959 echo "Translated message files to install : $mof"
960 dnl echo "Supported languages beside English : $languages"
961 if test "x$MOFILES" != "x"; then
962 echo "Installation path for translations : $NLSDIR" | sed -e 's|\$(prefix)|'"$prefix|"
964 AS_IF([test "x$debug" = "xyes"],
965 [AS_ECHO(["Debug enabled: CFLAGS = $CFLAGS"]) ])
968 AS_IF([test "x$wm_cv_prog_cc_nestedfunc" != "xyes"],
969 [AC_MSG_WARN([[Your compiler does not support Nested Function, work-around enabled]])])
971 dnl WM_PRINT_REDCRAP_BUG_STATUS
973 AS_IF([test "x$enable_jpeg" = xno], [dnl
974 AS_ECHO(["WARNING WARNING WARNING WARNING WARNING WARNING WARNING"])
976 AS_ECHO(["JPEG support will not be included because the JPEG library is"])
977 AS_ECHO(["not installed correctly or was not found. Background images"])
978 AS_ECHO(["from themes will not display as they usually are JPEG files."])
980 AS_ECHO(["To fix, download and install the jpeg library and/or make sure you"])
981 AS_ECHO(["installed all jpeg related packages, SPECIALLY the development packages"])
982 AS_ECHO(["like jpeg-dev (if you use some prepackaged version of libjpeg)."])
984 AS_ECHO(["WARNING WARNING WARNING WARNING WARNING WARNING WARNING"])dnl
988 dnl This is for Emacs. I'm lazy, I know... (nicolai)
989 dnl ================================================
991 dnl compile-command: "autoconf"