2 dnl Window Maker autoconf input.
8 dnl libtoolize --force --automake
9 dnl automake -a --gnu --include-deps
14 AC_INIT(WindowMaker, 0.95.6, , WindowMaker, http://www.windowmaker.org/)
15 AC_CONFIG_SRCDIR(src/WindowMaker.h)
16 AC_CONFIG_MACRO_DIR([m4])
17 AC_CONFIG_HEADERS(config.h)
18 AM_INIT_AUTOMAKE([1.11 silent-rules])
20 AH_BOTTOM([#include "config-paths.h"])
22 dnl libtool library versioning
23 dnl =======================
29 dnl 1. Start with version information of ‘0:0:0’ for each libtool library.
30 dnl 2. Update the version information only immediately before a public
31 dnl release of your software. More frequent updates are unnecessary, and
32 dnl only guarantee that the current interface number gets larger faster.
33 dnl 3. If the library source code has changed at all since the last
34 dnl update, then increment revision (‘c:r:a’ becomes ‘c:r+1:a’).
35 dnl 4. If any interfaces have been added, removed, or changed since the
36 dnl last update, increment current, and set revision to 0.
37 dnl 5. If any interfaces have been added since the last public release,
38 dnl then increment age.
39 dnl 6. If any interfaces have been removed or changed since the last
40 dnl public release, then set age to 0.
46 WRASTER_VERSION=$WRASTER_CURRENT:$WRASTER_REVISION:$WRASTER_AGE
47 AC_SUBST(WRASTER_VERSION)
53 WINGS_VERSION=$WINGS_CURRENT:$WINGS_REVISION:$WINGS_AGE
54 AC_SUBST(WINGS_VERSION)
60 WUTIL_VERSION=$WUTIL_CURRENT:$WUTIL_REVISION:$WUTIL_AGE
61 AC_SUBST(WUTIL_VERSION)
64 dnl Checks for host/os name
65 dnl =======================
66 dnl AC_CANONICAL_HOST -- already done by AC_PROG_LIBTOOL
68 dnl Checks for programs.
69 dnl ===================
73 AC_PROG_GCC_TRADITIONAL
80 [AS_HELP_STRING([--enable-debug], [enable debugging options, @<:@default=no@:>@])],
81 [AS_CASE(["$enableval"],
84 [AC_MSG_ERROR([bad value $enableval for --enable-debug])] )],
86 AS_IF([test "x$debug" = "xyes"],
87 [dnl This flag should have already been detected and added, but if user
88 dnl provided an explicit CFLAGS it may not be the case
89 AS_IF([echo " $CFLAGS " | grep " -g " 2>&1 > /dev/null],
90 [@%:@ Debug symbol already activated],
91 [AX_CFLAGS_GCC_OPTION([-g])])
93 dnl This flag generally makes debugging nightmarish, remove it if present
94 CFLAGS="`echo "$CFLAGS" | sed -e 's/-fomit-frame-pointer *//' `"
96 dnl Enable internal debug code
97 CPPFLAGS="$CPPFLAGS -DDEBUG"
99 dnl When debug is not enabled, the user probably does not wants to keep
100 dnl assertions in the final program
101 CPPFLAGS="$CPPFLAGS -DNDEBUG"
105 AX_CFLAGS_GCC_OPTION(-Wall)
106 AX_CFLAGS_GCC_OPTION(-Wextra -Wno-sign-compare)
108 dnl The use of trampolines cause code that can crash on some secured OS, it is
109 dnl also known to be a source of crash if not used properly, in a more general
110 dnl way it tends to generate binary code that may not be optimal, and it is
111 dnl not compatible with the 'nested-func-to-macro' workaround
112 WM_CFLAGS_CHECK_FIRST([-Wtrampolines],
113 [-Werror=trampolines dnl try to generate an error if possible
114 -Wtrampolines dnl if not, try to fall back to a simple warning
117 AS_IF([test "x$debug" = "xyes"],
118 [dnl When debug is enabled, we try to activate more checks from
119 dnl the compiler. They are on independant check because the
120 dnl macro checks all the options at once, but we may have cases
121 dnl where some options are not supported and we don't want to
122 dnl loose all of them.
124 dnl clang, suggest parenthesis on bit operations that could be
125 dnl misunderstood due to C operator precedence
126 AX_CFLAGS_GCC_OPTION([-Wbitwise-op-parentheses])
128 dnl Points at code that gcc thinks is so complicated that gcc
129 dnl gives up trying to optimize, which probably also means it is
130 dnl too complicated to maintain
131 AX_CFLAGS_GCC_OPTION([-Wdisabled-optimization])
133 dnl Floating-point comparison is not a good idea
134 AX_CFLAGS_GCC_OPTION([-Wfloat-equal])
136 dnl clang warns about constants that may have portability issues due
137 dnl to the endianness of the host
138 AX_CFLAGS_GCC_OPTION([-Wfour-char-constants])
140 dnl clang warns about constant that may be too big to be portable
141 AX_CFLAGS_GCC_OPTION([-Wliteral-range])
143 dnl Try to report misuses of '&' versus '&&' and similar
144 AX_CFLAGS_GCC_OPTION([-Wlogical-op])
146 dnl clang, reports cases where the code assumes everyone is an
147 dnl expert in C operator precedence... which is unlikely!
148 AX_CFLAGS_GCC_OPTION([-Wlogical-op-parentheses])
150 dnl Reports declaration of global things that are done inside
151 dnl a local environment, instead of using the appropriate
153 AX_CFLAGS_GCC_OPTION([-Wnested-externs])
155 dnl Warn about constant strings that could pose portability issues
156 AX_CFLAGS_GCC_OPTION([-Woverlength-strings])
158 dnl Use of 'sizeof()' on inappropriate pointer types
159 AX_CFLAGS_GCC_OPTION([-Wpointer-arith])
161 dnl Having more than 1 prototype for a function makes code updates
162 dnl more difficult, so try to avoid it
163 AX_CFLAGS_GCC_OPTION([-Wredundant-decls])
165 dnl clang, detect some misuses of sizeof. We also count in our code
166 dnl on the use of the macro 'wlength' which contains a check if the
167 dnl compiler support C11's static_assert
168 AX_CFLAGS_GCC_OPTION([-Wsizeof-array-argument])
170 dnl Prototype of function must be explicit, no deprecated K&R syntax
171 dnl and no empty argument list which prevents compiler from doing
172 dnl type checking when using the function
173 WM_CFLAGS_GCC_OPTION_STRICTPROTO
175 dnl Proper attributes helps the compiler to produce better code
176 WM_CFLAGS_CHECK_FIRST([format attribute suggest],
177 [-Wsuggest-attribute=format dnl new gcc syntax
178 -Wmissing-format-attribute dnl old gcc syntax, clang
180 WM_CFLAGS_CHECK_FIRST([no-return attribute suggest],
181 [-Wsuggest-attribute=noreturn dnl gcc syntax
182 -Wmissing-noreturn dnl clang syntax
185 dnl GCC provides a couple of checks to detect incorrect macro uses
186 AX_CFLAGS_GCC_OPTION([-Wundef])
187 WM_CFLAGS_GCC_OPTION_UNUSEDMACROS
189 dnl clang reports stuff marked unused but which is actually used
190 AX_CFLAGS_GCC_OPTION([-Wused-but-marked-unused])
192 dnl When debug not enabled, we try to avoid some non-necessary
193 dnl messages from the compiler
195 dnl To support legacy X servers, we have sometime to use
196 dnl functions marked as deprecated. We do not wish our users
197 dnl to be worried about it
198 AX_CFLAGS_GCC_OPTION([-Wno-deprecated])
199 AX_CFLAGS_GCC_OPTION([-Wno-deprecated-declarations])
203 dnl Support for Nested Functions by the compiler
204 dnl ============================================
205 WM_PROG_CC_NESTEDFUNC
209 dnl =================
213 dnl Tracking on what is detected for final status
214 dnl =============================================
220 dnl Platform-specific Makefile setup
221 dnl ================================
223 [*-*-linux*|*-*-cygwin*|*-gnu*], [WM_OSDEP="linux" ; CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=600"],
224 [*-*-freebsd*|*-k*bsd-gnu*], [WM_OSDEP="bsd" ; CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=600 -DFREEBSD"],
225 [*-*-netbsd*], [WM_OSDEP="bsd" ; CPPFLAGS="$CPPFLAGS -DNETBSD"],
226 [*-*-openbsd*], [WM_OSDEP="bsd" ; CPPFLAGS="$CPPFLAGS -DOPENBSD"],
227 [*-*-dragonfly*], [WM_OSDEP="bsd" ; CPPFLAGS="$CPPFLAGS -DDRAGONFLYBSD"],
228 [*-apple-darwin*], [WM_OSDEP="darwin"],
229 [*-*-solaris*], [WM_OSDEP="stub"], dnl solaris.c when done
231 AM_CONDITIONAL([WM_OSDEP_LINUX], [test "x$WM_OSDEP" = "xlinux"])
232 AM_CONDITIONAL([WM_OSDEP_BSD], [test "x$WM_OSDEP" = "xbsd"])
233 AM_CONDITIONAL([WM_OSDEP_DARWIN], [test "x$WM_OSDEP" = "xdarwin"])
234 AM_CONDITIONAL([WM_OSDEP_GENERIC], [test "x$WM_OSDEP" = "xstub"])
240 dnl move this earlier in the script... anyone know why this is handled
241 dnl in such a bizarre way?
243 test "x$prefix" = xNONE && prefix=$ac_default_prefix
244 dnl Let make expand exec_prefix.
245 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
248 _bindir=`eval echo $bindir`
249 _bindir=`eval echo $_bindir`
251 lib_search_path='-L${libdir}'
253 inc_search_path='-I${includedir}'
255 dnl ===============================================
256 dnl Specify paths to look for libraries and headers
257 dnl ===============================================
258 AC_ARG_WITH(libs-from, AS_HELP_STRING([--with-libs-from], [pass compiler flags to look for libraries]),
259 [lib_search_path="$withval $lib_search_path"])
261 AC_ARG_WITH(incs-from, AS_HELP_STRING([--with-incs-from], [pass compiler flags to look for header files]),
262 [inc_search_path="$withval $inc_search_path"])
267 AC_ARG_ENABLE([boehm-gc],
268 [AS_HELP_STRING([--enable-boehm-gc], [use Boehm GC instead of the default libc malloc() [default=no]])],
269 [AS_CASE(["$enableval"],
270 [yes], [with_boehm_gc=yes],
271 [no], [with_boehm_gc=no],
272 [AC_MSG_ERROR([bad value $enableval for --enable-boehm-gc])] )],
274 AS_IF([test "x$with_boehm_gc" = "xyes"],
275 AC_SEARCH_LIBS([GC_malloc], [gc],
276 [AC_DEFINE(USE_BOEHM_GC, 1, [Define if Boehm GC is to be used])],
277 [AC_MSG_FAILURE([--enable-boehm-gc specified but test for libgc failed])]))
282 AC_ARG_ENABLE([lcov],
283 [AS_HELP_STRING([--enable-lcov[=output-directory]], [enable coverage data generation using LCOV (GCC only) [default=no]])],
287 AS_IF([test "x$enable_lcov" != "xno"],
288 [AX_CFLAGS_GCC_OPTION(-fprofile-arcs -ftest-coverage)
289 AS_IF([test "x$enable_lcov" = "xyes"],
290 [lcov_output_directory="coverage-report"],
291 [lcov_output_directory="${enable_lcov}/coverage-report"])
292 AC_SUBST(lcov_output_directory)])
294 AM_CONDITIONAL([USE_LCOV], [test "x$enable_lcov" != "xno"])
297 dnl ============================
298 dnl Checks for library functions
299 dnl ============================
300 dnl not used anywhere
303 WM_FUNC_SECURE_GETENV
304 AC_CHECK_FUNCS(gethostname select poll strcasecmp strncasecmp \
305 setsid mallinfo mkstemp sysconf)
306 AC_SEARCH_LIBS([strerror], [cposix])
308 dnl nanosleep is generally available in standard libc, although not always the
309 dnl case. One known example is Solaris which needs -lrt
310 AC_SEARCH_LIBS([nanosleep], [rt], [],
311 [AC_MSG_ERROR([function 'nanosleep' not found, please report to wmaker-dev@lists.windowmaker.org])])
314 dnl Check for strlcat/strlcpy
315 dnl =========================
316 AC_ARG_WITH([libbsd],
317 [AS_HELP_STRING([--without-libbsd], [do not use libbsd for strlcat and strlcpy [default=check]])],
318 [AS_IF([test "x$with_libbsd" != "xno"],
325 AC_SEARCH_LIBS([strlcat],[$with_libbsd],
326 [AC_DEFINE(HAVE_STRLCAT, 1, [Define if strlcat is available])],
330 AC_SEARCH_LIBS([strlcpy],[$with_libbsd],
331 [AC_DEFINE(HAVE_STRLCAT, 1, [Define if strlcpy is available])],
338 AS_IF([test "x$ac_cv_search_strlcat" = "x-lbsd" -o "x$ac_cv_search_strlcpy" = "x-lbsd"],
340 AC_CHECK_HEADERS([bsd/string.h])]
344 dnl Check for OpenBSD kernel memory interface - kvm(3)
345 dnl ==================================================
346 AS_IF([test "x$WM_OSDEP" = "xbsd"],
347 AC_SEARCH_LIBS([kvm_openfiles], [kvm]) )
349 dnl Check for inotify
350 dnl =================
351 AC_CHECK_HEADERS(sys/inotify.h, AC_DEFINE(HAVE_INOTIFY, 1, Check for inotify))
355 dnl =================
356 AC_CHECK_HEADERS([syslog.h], [AC_DEFINE([HAVE_SYSLOG], [1], [Check for syslog])])
359 dnl Checks for header files.
360 dnl =======================
363 AC_CHECK_HEADERS(fcntl.h limits.h sys/ioctl.h libintl.h poll.h malloc.h ctype.h \
367 dnl Checks for typedefs, structures, and compiler characteristics.
368 dnl ==============================================================
380 dnl AC_ARG_VAR(PKGCONFIG, [pkg-config command])
381 AC_CHECK_PROG(PKGCONFIG, pkg-config, pkg-config)
390 AC_CHECK_FUNC(gettext, [HAVEGETTEXT="yes"],
391 AC_CHECK_LIB(intl, gettext, [INTLIBS="-lintl" HAVEGETTEXT="yes"],
394 AC_CHECK_PROG(XGETTEXT, xgettext, xgettext)
396 if test "$XGETTEXT" != ""; then
397 if $XGETTEXT --help 2>&1 | grep illegal >/dev/null ; then
398 echo "xgettext isn't GNU version"
403 if test "$LINGUAS" != ""; then
404 if test "$XGETTEXT" != "" -a "$HAVEGETTEXT" != ""; then
405 AC_DEFINE(I18N, 1, [Internationalization (I18N) support (set by configure)])
407 echo "xgettext and gettext() exist; will build i18n support for $LINGUAS"
411 echo "xgettext and libintl.a don't both exist; will not build i18n support"
422 dnl The Tower of Babel
423 dnl ==================
425 dnl List of supported locales
426 dnl =========================
427 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"
428 supported_wprefs_locales="bg ca cs de es et fi fr hr hu it ja ko nl pt ru sk zh_CN zh_TW"
429 supported_wings_locales="bg ca cs de fr hu nl sk"
430 supported_util_locales="de es fr nl pt"
432 for lang in $LINGUAS; do
434 for l in $supported_locales; do
435 if test "$l" = "$lang"; then
440 if test "$ok" = 1; then
441 MOFILES="$MOFILES $lang.mo"
443 echo "Locale $lang is not supported."
446 for l in $supported_wprefs_locales; do
447 if test "$l" = "$lang"; then
452 if test "$ok" = 1; then
453 WPMOFILES="$WPMOFILES $lang.mo"
456 for l in $supported_util_locales; do
457 if test "$l" = "$lang"; then
462 if test "$ok" = 1; then
463 UTILMOFILES="$UTILMOFILES $lang.mo"
466 for l in $supported_wings_locales; do
467 if test "$l" = "$lang"; then
472 if test "$ok" = 1; then
473 WINGSMOFILES="$WINGSMOFILES $lang.mo"
478 dnl Added by Oliver - Support for NLSDIR option
479 dnl ===========================================
480 AC_ARG_WITH(nlsdir, AS_HELP_STRING([--with-nlsdir=PATH], [specify where the locale stuff should go]))
482 if test "x$NLSDIR" = "x"; then
483 if test "x$with_nlsdir" != "x"; then
486 NLSDIR='$(prefix)/lib/locale'
491 AC_ARG_WITH(menu-textdomain, AS_HELP_STRING([--with-menu-textdomain=DOMAIN], [specify gettext domain used for menu translations]),
492 [if test "x$withval" != "xno"; then
493 menutextdomain=$withval
495 AC_SUBST(menutextdomain)
501 AC_SUBST(UTILMOFILES)
502 AC_SUBST(WINGSMOFILES)
503 AC_SUBST(supported_locales)
505 dnl ===========================================
506 dnl Stuff that uses X
507 dnl ===========================================
512 AC_MSG_ERROR([The path for the X11 files not found!
513 Make sure you have X and it's headers and libraries (the -devel packages
514 in Linux) installed.])
517 X_LIBRARY_PATH=$x_libraries
520 XLIBS="-lX11 $X_EXTRA_LIBS"
522 lib_search_path="$lib_search_path $XLFLAGS"
523 inc_search_path="$inc_search_path $XCFLAGS"
525 AC_SUBST(X_LIBRARY_PATH)
527 dnl Decide which locale function to use, setlocale() or _Xsetlocale()
528 dnl by MANOME Tomonori
529 dnl ===========================================
531 AC_ARG_ENABLE(locale, AS_HELP_STRING([--disable-locale], [disable use of X locale support]),
534 if test "$use_locale" = yes; then
535 AC_CHECK_LIB(X11, _Xsetlocale,
536 AC_DEFINE(X_LOCALE, 1, [define if you want support for X window's X_LOCALE (set by configure)]),,
540 dnl Check whether XInternAtoms() exist
541 dnl ==================================
542 AC_CHECK_LIB(X11, XInternAtoms,
543 AC_DEFINE(HAVE_XINTERNATOMS, 1, [define if your X server has XInternAtoms() (set by configure)]),,
546 dnl Check whether XConvertCase() exist
547 dnl ==================================
548 AC_CHECK_LIB(X11, XConvertCase,
549 AC_DEFINE(HAVE_XCONVERTCASE, 1, [define if your X server has XConvertCase() (set by configure)]),,
552 dnl XKB keyboard language status
553 dnl ============================
554 AC_ARG_ENABLE(modelock, AS_HELP_STRING([--enable-modelock], [XKB keyboard language status support]),
555 AC_DEFINE(XKB_MODELOCK, 1, [whether XKB language MODELOCK should be enabled]))
557 dnl XDND Drag-nd-Drop support
558 dnl ============================
559 AC_ARG_ENABLE([xdnd],
560 [AS_HELP_STRING([--disable-xdnd], [disable Drag-nd-Drop support])],
561 [AS_CASE(["$enableval"],
563 [AC_MSG_ERROR([bad value $enableval for --disable-xdnd]) ]) ],
565 supported_xext="$supported_xext XDnD"
566 AC_DEFINE(XDND, 1, [whether Drag-nd-Drop support should be enabled])
571 AC_ARG_ENABLE([shape],
572 [AS_HELP_STRING([--disable-shape], [disable shaped window extension support])],
573 [AS_CASE(["$enableval"],
575 [AC_MSG_ERROR([bad value $enableval for --enable-shape]) ]) ],
582 [AS_HELP_STRING([--disable-shm], [disable usage of MIT-SHM extension])],
583 [AS_CASE(["$enableval"],
585 [AC_MSG_ERROR([bad value $enableval for --enable-shm]) ]) ],
589 dnl X Misceleanous Utility
590 dnl ======================
591 # the libXmu is used in WRaster
596 AC_ARG_ENABLE([xinerama],
597 [AS_HELP_STRING([--enable-xinerama], [enable Xinerama extension support])],
598 [AS_CASE(["$enableval"],
600 [AC_MSG_ERROR([bad value $enableval for --enable-xinerama]) ]) ],
601 [enable_xinerama=auto])
602 WM_XEXT_CHECK_XINERAMA
606 AC_ARG_ENABLE([randr],
607 [AS_HELP_STRING([--enable-randr], [enable RandR extension support (NOT recommended, buggy)])],
608 [AS_CASE(["$enableval"],
610 [AC_MSG_ERROR([bad value $enableval for --enable-randr]) ]) ],
615 dnl libWINGS uses math functions, check whether usage requires linking
621 dnl libWINGS uses FcPatternDel from libfontconfig
623 AC_MSG_CHECKING([for fontconfig library])
624 FCLIBS=`$PKGCONFIG fontconfig --libs`
625 if test "x$FCLIBS" = "x" ; then
626 AC_MSG_RESULT([not found])
628 AC_MSG_RESULT([found])
633 dnl Xft2 antialiased font support
634 dnl =============================
639 if test "x$PKGCONFIG" != x -a "`$PKGCONFIG xft; echo $?`" = 0; then
640 XFTCONFIG="$PKGCONFIG xft"
643 AC_CHECK_PROG(XFTCONFIG, xft-config, xft-config)
646 AC_MSG_CHECKING([for the Xft2 library])
648 if test "x$XFTCONFIG" != x; then
649 XFTLIBS=`$XFTCONFIG --libs`
650 XFTFLAGS=`$XFTCONFIG --cflags`
651 AC_MSG_RESULT([found])
653 AC_MSG_RESULT([not found])
655 echo "ERROR!!! libXft2 is not installed or could not be found."
656 echo " Xft2 is a requirement for building Window Maker."
657 echo " Please install it (along with fontconfig) before continuing."
666 dnl The macro below will use $XFTFLAGS (defined above) to find Xft.h
668 WM_CHECK_XFT_VERSION($minXFT, goodxft=yes, goodxft=no)
670 if test "$goodxft" = no; then
672 echo "ERROR!!! libXft on this system is an old version."
673 echo " Please consider upgrading to at least version ${minXFT}."
684 AC_ARG_ENABLE(pango, AS_HELP_STRING([--enable-pango], [enable Pango text layout support]),
685 pango=$enableval, pango=no)
689 if test "$pango" = yes; then
690 PANGOLIBS=`$PKGCONFIG pangoxft --libs`
691 PANGOFLAGS=`$PKGCONFIG pangoxft --cflags`
692 if test "x$PANGOLIBS" = "x" ; then
693 AC_MSG_RESULT([not found])
695 AC_DEFINE(USE_PANGO, 1, [Define if Pango is to be used])
696 AC_MSG_RESULT([found])
699 inc_search_path="$inc_search_path $PANGOFLAGS"
702 dnl ==============================================
703 dnl Graphic Format Libraries
704 dnl ==============================================
709 [AS_HELP_STRING([--disable-xpm], [disable use of XPM pixmaps through libXpm])],
710 [AS_CASE(["$enableval"],
712 [AC_MSG_ERROR([bad value $enableval for --enable-xpm])] )],
722 AC_SUBST(X_EXTRA_LIBS)
724 dnl ===============================================
725 dnl End of stuff that uses X
726 dnl ===============================================
731 AS_IF([test "x$LIBEXIF" != "x"],
732 [AC_DEFINE(HAVE_EXIF, 1, [Define if EXIF can be used])])
737 [AS_HELP_STRING([--disable-png], [disable PNG support through libpng])],
738 [AS_CASE(["$enableval"],
740 [AC_MSG_ERROR([bad value $enableval for --enable-png])] )],
747 AC_ARG_ENABLE([jpeg],
748 [AS_HELP_STRING([--disable-jpeg], [disable JPEG support through libjpeg])],
749 [AS_CASE(["$enableval"],
751 [AC_MSG_ERROR([bad value $enableval for --enable-jpeg])] )],
759 [AS_HELP_STRING([--disable-gif], [disable GIF support through libgif or libungif])],
760 [AS_CASE(["$enableval"],
762 [AC_MSG_ERROR([bad value $enableval for --enable-gif])] )],
769 AC_ARG_ENABLE([tiff],
770 [AS_HELP_STRING([--disable-tiff], [disable use of TIFF images through libtiff])],
771 [AS_CASE(["$enableval"],
773 [AC_MSG_ERROR([bad value $enableval for --enable-tiff])] )],
780 AC_ARG_ENABLE([webp],
781 [AS_HELP_STRING([--disable-webp], [disable WEBP support through libwebp])],
782 [AS_CASE(["$enableval"],
784 [AC_MSG_ERROR([bad value $enableval for --enable-webp])] )],
791 AC_ARG_ENABLE([magick],
792 [AS_HELP_STRING([--disable-magick], [disable MAGICK support through libMagickWand])],
793 [AS_CASE(["$enableval"],
795 [AC_MSG_ERROR([bad value $enableval for --enable-magick])] )],
796 [enable_magick=auto])
797 WM_IMGFMT_CHECK_MAGICK
802 # The PPM format is always enabled because we have built-in support for the format
803 # We are not using any external library like libppm
804 supported_gfx="$supported_gfx builtin-PPM"
807 # Choice of the default format for icons
808 AS_IF([test "x$enable_tiff" != "xno"],
813 LIBRARY_SEARCH_PATH="$lib_search_path"
814 HEADER_SEARCH_PATH="$inc_search_path"
816 AC_SUBST(LIBRARY_SEARCH_PATH)
817 AC_SUBST(HEADER_SEARCH_PATH)
822 AM_CONDITIONAL([ICON_EXT_XPM], [test "x$ICONEXT" = "xxpm"])
823 AM_CONDITIONAL([ICON_EXT_TIFF], [test "x$ICONEXT" = "xtiff"])
826 dnl ==============================================
827 dnl End of Graphic Format Libraries
828 dnl ==============================================
832 dnl stdlib.h is checked here, because of conflict in jpeglib.h
833 AC_CHECK_HEADERS(stdlib.h)
835 # AC_PREFIX_PROGRAM(wmaker)
837 dnl Support for PIXMAPDIR option
838 dnl ============================
839 AC_ARG_WITH(pixmapdir, AS_HELP_STRING([--with-pixmapdir=PATH], [specify where pixmaps are located [DATADIR/pixmaps]]))
841 if test "x$with_pixmapdir" != "x"; then
842 pixmapdir=$with_pixmapdir
844 pixmapdir='${datadir}/pixmaps'
849 dnl Support for GNUSTEP_LOCAL_ROOT, for WPrefs.app
850 dnl ==============================================
852 AC_ARG_WITH(gnustepdir, AS_HELP_STRING([--with-gnustepdir=PATH], [specify the directory for GNUstep applications]))
854 if test "x`echo $with_gnustepdir | grep ^/`" != "x"; then
855 appspath=$with_gnustepdir
858 if test "x$appspath$GNUSTEP_LOCAL_ROOT" = "x"; then
859 wprefs_base_dir=${prefix}
860 wprefs_datadir="${datadir}/WPrefs"
861 wprefs_bindir="${bindir}"
865 if test "x$GNUSTEP_LOCAL_ROOT" != "x" ; then
866 gnustepdir=`echo "$GNUSTEP_LOCAL_ROOT" | sed -e "s|^${prefix}|prefix|"`
867 gnustepdir=`echo $gnustepdir | sed -e 's|^prefix|${prefix}|'`
870 wprefs_base_dir=$gnustepdir/Applications
871 wprefs_datadir=$wprefs_base_dir/WPrefs.app
872 wprefs_bindir=$wprefs_base_dir/WPrefs.app
875 AC_SUBST(wprefs_datadir)
876 AC_SUBST(wprefs_bindir)
879 dnl Enable User Defined Menu thing
880 dnl ==============================
881 AC_ARG_ENABLE(usermenu, AS_HELP_STRING([--enable-usermenu], [user defined menus for applications]),
882 if test "$enableval" = yes; then
883 AC_DEFINE(USER_MENU, 1, [define if you want user defined menus for applications])
890 dnl Add the post-poned compilation options
891 dnl ======================================
892 WM_CFLAGS_GCC_OPTION_POSTPONED
895 AC_OUTPUT(Makefile po/Makefile util/Makefile util/po/Makefile test/Makefile \
896 WINGs/Makefile WINGs/WINGs/Makefile WINGs/Documentation/Makefile \
897 WINGs/Examples/Makefile WINGs/Resources/Makefile WINGs/Tests/Makefile \
898 WINGs/Extras/Makefile WINGs/po/Makefile \
899 wmlib/Makefile wrlib/Makefile wrlib/tests/Makefile \
900 src/Makefile src/wconfig.h \
901 doc/Makefile doc/sk/Makefile doc/cs/Makefile \
903 WindowMaker/Makefile WindowMaker/Backgrounds/Makefile \
904 WindowMaker/Defaults/Makefile WindowMaker/IconSets/Makefile \
905 WindowMaker/Icons/Makefile WindowMaker/Pixmaps/Makefile \
906 WindowMaker/Styles/Makefile WindowMaker/Themes/Makefile \
907 WPrefs.app/Makefile WPrefs.app/tiff/Makefile WPrefs.app/xpm/Makefile \
908 WPrefs.app/po/Makefile )
911 dnl Output some helpful data for compiling wraster and WINGs/WUtil apps
912 dnl ===================================================================
914 dnl echo "WFLAGS=\"$LIBPL_INC_PATH -I$prefix/include\"" > WINGs-flags
915 dnl echo "WLIBS=\"-L$exec_prefix/lib -lWINGs -lwraster $LIBPL_LIBS $GFXLIBS -lm\""\
916 dnl | sed -e 's|\$(prefix)|'"$prefix|" >> WINGs-flags
918 dnl The #lp# and #rp# stuff below is a hack because [ and ] get lost when
921 AC_SUBST(lib_search_path)
922 AC_SUBST(inc_search_path)
925 dnl Spit out the configuration
926 dnl ==========================
928 if test "x$MOFILES" = "x"; then
934 if test "x$MOFILES" = "x"; then
937 languages=`echo $MOFILES | sed 's/.mo//g'`
941 echo "Window Maker was configured as follows:"
943 echo "Installation path prefix : $prefix"
944 echo "Installation path for binaries : $_bindir"
945 echo "Installation path for libraries : $libdir"
946 echo "Installation path for WPrefs.app : $wprefs_base_dir" | sed -e 's|\${prefix}|'"$prefix|"
947 echo "Supported X extensions: :$supported_xext"
948 echo "Supported graphic format libraries :$supported_gfx"
949 echo "Unsupported features :$unsupported"
950 echo "Antialiased text support in WINGs : $xft"
951 echo "Pango text layout support in WINGs : $pango"
952 echo "Translated message files to install : $mof"
953 dnl echo "Supported languages beside English : $languages"
954 if test "x$MOFILES" != "x"; then
955 echo "Installation path for translations : $NLSDIR" | sed -e 's|\$(prefix)|'"$prefix|"
957 AS_IF([test "x$debug" = "xyes"],
958 [AS_ECHO(["Debug enabled: CFLAGS = $CFLAGS"]) ])
961 AS_IF([test "x$wm_cv_prog_cc_nestedfunc" != "xyes"],
962 [AC_MSG_WARN([[Your compiler does not support Nested Function, work-around enabled]])])
964 dnl WM_PRINT_REDCRAP_BUG_STATUS
966 AS_IF([test "x$enable_jpeg" = xno], [dnl
967 AS_ECHO(["WARNING WARNING WARNING WARNING WARNING WARNING WARNING"])
969 AS_ECHO(["JPEG support will not be included because the JPEG library is"])
970 AS_ECHO(["not installed correctly or was not found. Background images"])
971 AS_ECHO(["from themes will not display as they usually are JPEG files."])
973 AS_ECHO(["To fix, download and install the jpeg library and/or make sure you"])
974 AS_ECHO(["installed all jpeg related packages, SPECIALLY the development packages"])
975 AS_ECHO(["like jpeg-dev (if you use some prepackaged version of libjpeg)."])
977 AS_ECHO(["WARNING WARNING WARNING WARNING WARNING WARNING WARNING"])dnl
981 dnl This is for Emacs. I'm lazy, I know... (nicolai)
982 dnl ================================================
984 dnl compile-command: "autoconf"