2001-07-30 21:44:15 +00:00
|
|
|
|
dnl
|
|
|
|
|
|
dnl Window Maker autoconf input.
|
|
|
|
|
|
dnl
|
|
|
|
|
|
dnl Process with:
|
|
|
|
|
|
dnl aclocal
|
|
|
|
|
|
dnl autoheader
|
|
|
|
|
|
dnl autoconf
|
|
|
|
|
|
dnl libtoolize --force --automake
|
|
|
|
|
|
dnl automake -a --gnu --include-deps
|
|
|
|
|
|
dnl
|
|
|
|
|
|
dnl
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-08-29 19:36:52 +01:00
|
|
|
|
AC_INIT(WindowMaker, 0.95.5, , WindowMaker, http://www.windowmaker.org/)
|
2010-08-24 16:04:33 +02:00
|
|
|
|
AC_CONFIG_SRCDIR(src/WindowMaker.h)
|
2010-04-08 21:38:03 +02:00
|
|
|
|
AC_CONFIG_MACRO_DIR([m4])
|
2013-01-03 23:07:00 +01:00
|
|
|
|
AC_CONFIG_HEADERS(config.h)
|
2010-08-24 17:06:27 +02:00
|
|
|
|
AM_INIT_AUTOMAKE([1.11 silent-rules])
|
2001-07-30 21:44:15 +00:00
|
|
|
|
|
2010-09-29 16:12:33 -04:00
|
|
|
|
AH_BOTTOM([#include "config-paths.h"])
|
|
|
|
|
|
|
2010-08-29 16:13:39 +02:00
|
|
|
|
dnl libtool library versioning
|
|
|
|
|
|
dnl =======================
|
|
|
|
|
|
dnl
|
|
|
|
|
|
dnl current
|
|
|
|
|
|
dnl revision
|
|
|
|
|
|
dnl age
|
|
|
|
|
|
dnl
|
|
|
|
|
|
dnl 1. Start with version information of ‘0:0:0’ for each libtool library.
|
|
|
|
|
|
dnl 2. Update the version information only immediately before a public
|
|
|
|
|
|
dnl release of your software. More frequent updates are unnecessary, and
|
|
|
|
|
|
dnl only guarantee that the current interface number gets larger faster.
|
|
|
|
|
|
dnl 3. If the library source code has changed at all since the last
|
|
|
|
|
|
dnl update, then increment revision (‘c:r:a’ becomes ‘c:r+1:a’).
|
|
|
|
|
|
dnl 4. If any interfaces have been added, removed, or changed since the
|
|
|
|
|
|
dnl last update, increment current, and set revision to 0.
|
|
|
|
|
|
dnl 5. If any interfaces have been added since the last public release,
|
|
|
|
|
|
dnl then increment age.
|
|
|
|
|
|
dnl 6. If any interfaces have been removed or changed since the last
|
|
|
|
|
|
dnl public release, then set age to 0.
|
|
|
|
|
|
dnl
|
|
|
|
|
|
dnl libwraster
|
|
|
|
|
|
WRASTER_CURRENT=4
|
2013-05-01 20:26:36 +02:00
|
|
|
|
WRASTER_REVISION=1
|
2010-08-29 16:13:39 +02:00
|
|
|
|
WRASTER_AGE=1
|
|
|
|
|
|
WRASTER_VERSION=$WRASTER_CURRENT:$WRASTER_REVISION:$WRASTER_AGE
|
|
|
|
|
|
AC_SUBST(WRASTER_VERSION)
|
|
|
|
|
|
dnl
|
|
|
|
|
|
dnl libWINGs
|
|
|
|
|
|
WINGS_CURRENT=2
|
|
|
|
|
|
WINGS_REVISION=1
|
|
|
|
|
|
WINGS_AGE=0
|
|
|
|
|
|
WINGS_VERSION=$WINGS_CURRENT:$WINGS_REVISION:$WINGS_AGE
|
|
|
|
|
|
AC_SUBST(WINGS_VERSION)
|
|
|
|
|
|
dnl
|
|
|
|
|
|
dnl libWUtil
|
2013-11-08 21:18:19 +01:00
|
|
|
|
WUTIL_CURRENT=4
|
2010-09-23 02:46:00 +02:00
|
|
|
|
WUTIL_REVISION=0
|
2010-08-29 16:13:39 +02:00
|
|
|
|
WUTIL_AGE=0
|
|
|
|
|
|
WUTIL_VERSION=$WUTIL_CURRENT:$WUTIL_REVISION:$WUTIL_AGE
|
|
|
|
|
|
AC_SUBST(WUTIL_VERSION)
|
|
|
|
|
|
|
|
|
|
|
|
|
2001-07-30 21:44:15 +00:00
|
|
|
|
dnl Checks for host/os name
|
|
|
|
|
|
dnl =======================
|
2002-03-03 20:33:44 +00:00
|
|
|
|
dnl AC_CANONICAL_HOST -- already done by AC_PROG_LIBTOOL
|
2001-07-30 21:44:15 +00:00
|
|
|
|
|
|
|
|
|
|
dnl Checks for programs.
|
|
|
|
|
|
dnl ===================
|
|
|
|
|
|
AC_PROG_CC
|
2013-11-08 23:08:21 +01:00
|
|
|
|
WM_PROG_CC_C11
|
2001-07-30 21:44:15 +00:00
|
|
|
|
AC_PROG_LN_S
|
|
|
|
|
|
AC_PROG_GCC_TRADITIONAL
|
2010-04-08 21:38:03 +02:00
|
|
|
|
AC_PROG_LIBTOOL
|
2001-07-30 21:44:15 +00:00
|
|
|
|
|
2012-11-16 01:24:07 +01:00
|
|
|
|
|
|
|
|
|
|
dnl Debugging Options
|
|
|
|
|
|
dnl =================
|
|
|
|
|
|
AC_ARG_ENABLE(debug,
|
|
|
|
|
|
[AS_HELP_STRING([--enable-debug], [enable debugging options, @<:@default=no@:>@])],
|
|
|
|
|
|
[AS_CASE(["$enableval"],
|
|
|
|
|
|
[yes], [debug=yes],
|
|
|
|
|
|
[no], [debug=no],
|
|
|
|
|
|
[AC_MSG_ERROR([bad value $enableval for --enable-debug])] )],
|
|
|
|
|
|
[debug=no])
|
|
|
|
|
|
AS_IF([test "x$debug" = "xyes"],
|
2013-11-08 23:08:19 +01:00
|
|
|
|
[dnl This flag should have already been detected and added, but if user
|
|
|
|
|
|
dnl provided an explicit CFLAGS it may not be the case
|
|
|
|
|
|
AS_IF([echo " $CFLAGS " | grep " -g " 2>&1 > /dev/null],
|
|
|
|
|
|
[@%:@ Debug symbol already activated],
|
|
|
|
|
|
[AX_CFLAGS_GCC_OPTION([-g])])
|
|
|
|
|
|
dnl
|
|
|
|
|
|
dnl This flag generally makes debugging nightmarish, remove it if present
|
|
|
|
|
|
CFLAGS="`echo "$CFLAGS" | sed -e 's/-fomit-frame-pointer *//' `"
|
|
|
|
|
|
dnl
|
|
|
|
|
|
dnl Enable internal debug code
|
|
|
|
|
|
CPPFLAGS="$CPPFLAGS -DDEBUG"
|
2013-11-08 23:08:20 +01:00
|
|
|
|
], [dnl
|
|
|
|
|
|
dnl When debug is not enabled, the user probably does not wants to keep
|
|
|
|
|
|
dnl assertions in the final program
|
|
|
|
|
|
CPPFLAGS="$CPPFLAGS -DNDEBUG"
|
2013-11-08 23:08:19 +01:00
|
|
|
|
])
|
2012-11-16 01:24:07 +01:00
|
|
|
|
|
|
|
|
|
|
|
2010-03-31 04:54:11 +02:00
|
|
|
|
AX_CFLAGS_GCC_OPTION(-Wall)
|
2013-11-01 16:06:52 +01:00
|
|
|
|
AX_CFLAGS_GCC_OPTION(-Wextra -Wno-sign-compare)
|
2013-05-11 00:07:20 +02:00
|
|
|
|
AS_IF([test "x$debug" = "xyes"],
|
|
|
|
|
|
[dnl When debug is enabled, we try to activate more checks from
|
|
|
|
|
|
dnl the compiler. They are on independant check because the
|
|
|
|
|
|
dnl macro checks all the options at once, but we may have cases
|
|
|
|
|
|
dnl where some options are not supported and we don't want to
|
|
|
|
|
|
dnl loose all of them.
|
|
|
|
|
|
dnl
|
|
|
|
|
|
dnl Floating-point comparison is not a good idea
|
|
|
|
|
|
AX_CFLAGS_GCC_OPTION([-Wfloat-equal])
|
|
|
|
|
|
dnl
|
|
|
|
|
|
dnl Try to report misuses of '&' versus '&&' and similar
|
|
|
|
|
|
AX_CFLAGS_GCC_OPTION([-Wlogical-op])
|
|
|
|
|
|
dnl
|
2013-10-10 23:55:56 +02:00
|
|
|
|
dnl Reports declaration of global things that are done inside
|
|
|
|
|
|
dnl a local environment, instead of using the appropriate
|
|
|
|
|
|
dnl header
|
|
|
|
|
|
AX_CFLAGS_GCC_OPTION([-Wnested-externs])
|
|
|
|
|
|
dnl
|
2013-05-11 00:07:20 +02:00
|
|
|
|
dnl Use of 'sizeof()' on inappropriate pointer types
|
|
|
|
|
|
AX_CFLAGS_GCC_OPTION([-Wpointer-arith])
|
2013-11-10 17:41:04 +01:00
|
|
|
|
dnl
|
|
|
|
|
|
dnl Having more than 1 prototype for a function makes code updates
|
|
|
|
|
|
dnl more difficult, so try to avoid it
|
|
|
|
|
|
AX_CFLAGS_GCC_OPTION([-Wredundant-decls])
|
2013-11-15 18:46:38 +01:00
|
|
|
|
dnl
|
|
|
|
|
|
dnl Proper attributes helps the compiler to produce better code
|
|
|
|
|
|
WM_CFLAGS_CHECK_FIRST([format attribute suggest],
|
|
|
|
|
|
[-Wsuggest-attribute=format dnl new gcc syntax
|
|
|
|
|
|
-Wmissing-format-attribute dnl old gcc syntax, clang
|
|
|
|
|
|
])
|
2013-11-15 18:46:39 +01:00
|
|
|
|
WM_CFLAGS_CHECK_FIRST([no-return attribute suggest],
|
|
|
|
|
|
[-Wsuggest-attribute=noreturn dnl gcc syntax
|
|
|
|
|
|
-Wmissing-noreturn dnl clang syntax
|
|
|
|
|
|
])
|
2013-11-16 20:14:25 +01:00
|
|
|
|
dnl
|
|
|
|
|
|
dnl The use of trampolines cause code that can crash on some
|
|
|
|
|
|
dnl secured OS, and in a more general way generate binary code
|
|
|
|
|
|
dnl that may not be optimal
|
|
|
|
|
|
AX_CFLAGS_GCC_OPTION([-Wtrampolines])
|
2013-12-30 18:43:29 +01:00
|
|
|
|
dnl
|
|
|
|
|
|
dnl GCC provides a couple of checks to detect incorrect macro uses
|
|
|
|
|
|
AX_CFLAGS_GCC_OPTION([-Wundef])
|
|
|
|
|
|
AX_CFLAGS_GCC_OPTION([-Wunused-macros])
|
2013-06-15 14:38:45 +02:00
|
|
|
|
], [dnl
|
|
|
|
|
|
dnl When debug not enabled, we try to avoid some non-necessary
|
|
|
|
|
|
dnl messages from the compiler
|
|
|
|
|
|
dnl
|
|
|
|
|
|
dnl To support legacy X servers, we have sometime to use
|
|
|
|
|
|
dnl functions marked as deprecated. We do not wish our users
|
|
|
|
|
|
dnl to be worried about it
|
|
|
|
|
|
AX_CFLAGS_GCC_OPTION([-Wno-deprecated])
|
|
|
|
|
|
AX_CFLAGS_GCC_OPTION([-Wno-deprecated-declarations])
|
2013-05-11 00:07:20 +02:00
|
|
|
|
])
|
2010-03-31 04:54:11 +02:00
|
|
|
|
|
2013-11-04 20:52:28 +01:00
|
|
|
|
|
|
|
|
|
|
dnl Tracking on what is detected for final status
|
|
|
|
|
|
dnl =============================================
|
|
|
|
|
|
unsupported=""
|
2013-11-17 18:51:14 +01:00
|
|
|
|
supported_xext=""
|
2013-11-08 18:49:58 +01:00
|
|
|
|
supported_gfx=""
|
2013-11-04 20:52:28 +01:00
|
|
|
|
|
|
|
|
|
|
|
2010-03-23 20:27:53 +01:00
|
|
|
|
dnl Platform-specific Makefile setup
|
|
|
|
|
|
dnl ================================
|
2013-05-10 18:35:41 +02:00
|
|
|
|
AS_CASE(["$host"],
|
2013-05-11 00:07:11 +02:00
|
|
|
|
[*-*-linux*|*-*-cygwin*|*-gnu*], [WM_OSDEP="linux" ; CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=600"],
|
|
|
|
|
|
[*-*-freebsd*|*-k*bsd-gnu*], [WM_OSDEP="bsd" ; CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=600 -DFREEBSD"],
|
|
|
|
|
|
[*-*-netbsd*], [WM_OSDEP="bsd" ; CPPFLAGS="$CPPFLAGS -DNETBSD"],
|
|
|
|
|
|
[*-*-openbsd*], [WM_OSDEP="bsd" ; CPPFLAGS="$CPPFLAGS -DOPENBSD"],
|
|
|
|
|
|
[*-*-dragonfly*], [WM_OSDEP="bsd" ; CPPFLAGS="$CPPFLAGS -DDRAGONFLYBSD"],
|
2013-05-10 18:35:41 +02:00
|
|
|
|
[*-apple-darwin*], [WM_OSDEP="darwin"],
|
|
|
|
|
|
[*-*-solaris*], [WM_OSDEP="stub"], dnl solaris.c when done
|
|
|
|
|
|
[WM_OSDEP="stub"])
|
2013-05-10 18:35:42 +02:00
|
|
|
|
AM_CONDITIONAL([WM_OSDEP_LINUX], [test "x$WM_OSDEP" = "xlinux"])
|
|
|
|
|
|
AM_CONDITIONAL([WM_OSDEP_BSD], [test "x$WM_OSDEP" = "xbsd"])
|
|
|
|
|
|
AM_CONDITIONAL([WM_OSDEP_DARWIN], [test "x$WM_OSDEP" = "xdarwin"])
|
|
|
|
|
|
AM_CONDITIONAL([WM_OSDEP_GENERIC], [test "x$WM_OSDEP" = "xstub"])
|
2010-03-23 20:27:53 +01:00
|
|
|
|
|
2001-07-30 21:44:15 +00:00
|
|
|
|
|
|
|
|
|
|
dnl the prefix
|
|
|
|
|
|
dnl ==========
|
|
|
|
|
|
dnl
|
|
|
|
|
|
dnl move this earlier in the script... anyone know why this is handled
|
|
|
|
|
|
dnl in such a bizarre way?
|
|
|
|
|
|
|
|
|
|
|
|
test "x$prefix" = xNONE && prefix=$ac_default_prefix
|
|
|
|
|
|
dnl Let make expand exec_prefix.
|
|
|
|
|
|
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_bindir=`eval echo $bindir`
|
|
|
|
|
|
_bindir=`eval echo $_bindir`
|
|
|
|
|
|
|
2010-09-29 16:12:33 -04:00
|
|
|
|
lib_search_path='-L${libdir}'
|
2001-07-30 21:44:15 +00:00
|
|
|
|
|
2010-09-29 16:12:33 -04:00
|
|
|
|
inc_search_path='-I${includedir}'
|
2001-07-30 21:44:15 +00:00
|
|
|
|
|
2010-08-24 15:10:44 +02:00
|
|
|
|
dnl ===============================================
|
2001-07-30 21:44:15 +00:00
|
|
|
|
dnl Specify paths to look for libraries and headers
|
|
|
|
|
|
dnl ===============================================
|
2010-08-24 15:10:44 +02:00
|
|
|
|
AC_ARG_WITH(libs-from, AS_HELP_STRING([--with-libs-from], [pass compiler flags to look for libraries]),
|
2001-07-30 21:44:15 +00:00
|
|
|
|
[lib_search_path="$withval $lib_search_path"])
|
|
|
|
|
|
|
2010-08-24 15:10:44 +02:00
|
|
|
|
AC_ARG_WITH(incs-from, AS_HELP_STRING([--with-incs-from], [pass compiler flags to look for header files]),
|
2001-07-30 21:44:15 +00:00
|
|
|
|
[inc_search_path="$withval $inc_search_path"])
|
|
|
|
|
|
|
2010-09-22 18:00:34 +02:00
|
|
|
|
|
|
|
|
|
|
dnl Boehm GC
|
|
|
|
|
|
dnl ========
|
|
|
|
|
|
AC_ARG_ENABLE([boehm-gc],
|
|
|
|
|
|
[AS_HELP_STRING([--enable-boehm-gc], [use Boehm GC instead of the default libc malloc() [default=no]])],
|
2013-11-10 17:41:03 +01:00
|
|
|
|
[AS_CASE(["$enableval"],
|
|
|
|
|
|
[yes], [with_boehm_gc=yes],
|
|
|
|
|
|
[no], [with_boehm_gc=no],
|
|
|
|
|
|
[AC_MSG_ERROR([bad value $enableval for --enable-boehm-gc])] )],
|
|
|
|
|
|
[with_boehm_gc=no])
|
2010-09-22 18:00:34 +02:00
|
|
|
|
AS_IF([test "x$with_boehm_gc" = "xyes"],
|
|
|
|
|
|
AC_SEARCH_LIBS([GC_malloc], [gc],
|
|
|
|
|
|
[AC_DEFINE(USE_BOEHM_GC, 1, [Define if Boehm GC is to be used])],
|
2013-11-10 17:41:03 +01:00
|
|
|
|
[AC_MSG_FAILURE([--enable-boehm-gc specified but test for libgc failed])]))
|
|
|
|
|
|
|
2010-09-22 18:00:34 +02:00
|
|
|
|
|
2010-09-29 17:15:55 +02:00
|
|
|
|
dnl LCOV
|
|
|
|
|
|
dnl ====
|
|
|
|
|
|
AC_ARG_ENABLE([lcov],
|
|
|
|
|
|
[AS_HELP_STRING([--enable-lcov[=output-directory]], [enable coverage data generation using LCOV (GCC only) [default=no]])],
|
|
|
|
|
|
[],
|
|
|
|
|
|
[enable_lcov=no])
|
|
|
|
|
|
|
|
|
|
|
|
AS_IF([test "x$enable_lcov" != "xno"],
|
|
|
|
|
|
[AX_CFLAGS_GCC_OPTION(-fprofile-arcs -ftest-coverage)
|
2013-11-10 17:41:03 +01:00
|
|
|
|
AS_IF([test "x$enable_lcov" = "xyes"],
|
|
|
|
|
|
[lcov_output_directory="coverage-report"],
|
|
|
|
|
|
[lcov_output_directory="${enable_lcov}/coverage-report"])
|
|
|
|
|
|
AC_SUBST(lcov_output_directory)])
|
|
|
|
|
|
|
2010-09-29 17:15:55 +02:00
|
|
|
|
AM_CONDITIONAL([USE_LCOV], [test "x$enable_lcov" != "xno"])
|
|
|
|
|
|
|
2010-09-22 18:00:34 +02:00
|
|
|
|
dnl
|
2010-08-24 15:10:44 +02:00
|
|
|
|
dnl ============================
|
|
|
|
|
|
dnl Checks for library functions
|
2001-07-30 21:44:15 +00:00
|
|
|
|
dnl ============================
|
|
|
|
|
|
dnl not used anywhere
|
2010-09-20 14:31:43 +02:00
|
|
|
|
AC_FUNC_MEMCMP
|
2001-07-30 21:44:15 +00:00
|
|
|
|
AC_FUNC_VPRINTF
|
2010-09-23 02:19:42 +02:00
|
|
|
|
AC_CHECK_FUNCS(gethostname select poll strcasecmp strncasecmp \
|
2010-09-29 00:02:03 +02:00
|
|
|
|
setsid mallinfo mkstemp sysconf)
|
2013-11-16 20:14:26 +01:00
|
|
|
|
AC_SEARCH_LIBS([strerror], [cposix])
|
2001-07-30 21:44:15 +00:00
|
|
|
|
|
2010-09-23 23:23:29 +02:00
|
|
|
|
dnl Check for strlcat/strlcpy
|
|
|
|
|
|
dnl =========================
|
2010-09-24 14:37:57 -04:00
|
|
|
|
AC_ARG_WITH([libbsd],
|
|
|
|
|
|
[AS_HELP_STRING([--without-libbsd], [do not use libbsd for strlcat and strlcpy [default=check]])],
|
|
|
|
|
|
[AS_IF([test "x$with_libbsd" != "xno"],
|
|
|
|
|
|
[with_libbsd=bsd]
|
|
|
|
|
|
[with_libbsd=]
|
|
|
|
|
|
)],
|
|
|
|
|
|
[with_libbsd=bsd])
|
|
|
|
|
|
|
|
|
|
|
|
tmp_libs=$LIBS
|
|
|
|
|
|
AC_SEARCH_LIBS([strlcat],[$with_libbsd],
|
|
|
|
|
|
[AC_DEFINE(HAVE_STRLCAT, 1, [Define if strlcat is available])],
|
2013-01-26 00:00:36 -07:00
|
|
|
|
[],
|
2010-09-24 14:37:57 -04:00
|
|
|
|
[]
|
|
|
|
|
|
)
|
|
|
|
|
|
AC_SEARCH_LIBS([strlcpy],[$with_libbsd],
|
|
|
|
|
|
[AC_DEFINE(HAVE_STRLCAT, 1, [Define if strlcpy is available])],
|
2013-01-26 00:00:36 -07:00
|
|
|
|
[],
|
2010-09-24 14:37:57 -04:00
|
|
|
|
[]
|
|
|
|
|
|
)
|
|
|
|
|
|
LIBS=$tmp_libs
|
|
|
|
|
|
|
|
|
|
|
|
LIBBSD=
|
|
|
|
|
|
AS_IF([test "x$ac_cv_search_strlcat" = "x-lbsd" -o "x$ac_cv_search_strlcpy" = "x-lbsd"],
|
|
|
|
|
|
[LIBBSD=-lbsd
|
|
|
|
|
|
AC_CHECK_HEADERS([bsd/string.h])]
|
|
|
|
|
|
)
|
|
|
|
|
|
AC_SUBST(LIBBSD)
|
2010-09-23 23:23:29 +02:00
|
|
|
|
|
2013-04-09 08:54:48 +02:00
|
|
|
|
dnl Check for OpenBSD kernel memory interface - kvm(3)
|
|
|
|
|
|
dnl ==================================================
|
|
|
|
|
|
AS_IF([test "x$WM_OSDEP" = "xbsd"],
|
|
|
|
|
|
AC_SEARCH_LIBS([kvm_openfiles], [kvm]) )
|
|
|
|
|
|
|
2010-03-18 19:18:18 +01:00
|
|
|
|
dnl Check for inotify
|
|
|
|
|
|
dnl =================
|
|
|
|
|
|
AC_CHECK_HEADERS(sys/inotify.h, AC_DEFINE(HAVE_INOTIFY, 1, Check for inotify))
|
2001-07-30 21:44:15 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dnl Checks for header files.
|
|
|
|
|
|
dnl =======================
|
|
|
|
|
|
AC_HEADER_SYS_WAIT
|
|
|
|
|
|
AC_HEADER_TIME
|
2010-09-29 02:52:19 +02:00
|
|
|
|
AC_CHECK_HEADERS(fcntl.h limits.h sys/ioctl.h libintl.h poll.h malloc.h ctype.h \
|
|
|
|
|
|
string.h strings.h)
|
2001-07-30 21:44:15 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dnl Checks for typedefs, structures, and compiler characteristics.
|
|
|
|
|
|
dnl ==============================================================
|
|
|
|
|
|
AC_DECL_SYS_SIGLIST
|
|
|
|
|
|
AC_C_CONST
|
2013-05-11 00:07:13 +02:00
|
|
|
|
AC_C_INLINE
|
2013-06-09 19:21:15 +02:00
|
|
|
|
WM_C_NORETURN
|
2010-09-23 17:09:46 +02:00
|
|
|
|
AC_TYPE_SIZE_T
|
|
|
|
|
|
AC_TYPE_PID_T
|
2001-07-30 21:44:15 +00:00
|
|
|
|
AC_TYPE_SIGNAL
|
|
|
|
|
|
|
2002-09-30 12:39:22 +00:00
|
|
|
|
|
2003-06-10 01:56:26 +00:00
|
|
|
|
dnl pkg-config
|
2010-08-24 15:10:44 +02:00
|
|
|
|
dnl ==========
|
2003-06-10 01:56:26 +00:00
|
|
|
|
dnl AC_ARG_VAR(PKGCONFIG, [pkg-config command])
|
|
|
|
|
|
AC_CHECK_PROG(PKGCONFIG, pkg-config, pkg-config)
|
|
|
|
|
|
|
2001-07-30 21:44:15 +00:00
|
|
|
|
dnl gettext
|
2010-08-24 15:10:44 +02:00
|
|
|
|
dnl =======
|
2001-07-30 21:44:15 +00:00
|
|
|
|
|
|
|
|
|
|
dnl AM_GNU_GETTEXT
|
|
|
|
|
|
|
|
|
|
|
|
INTLIBS=""
|
|
|
|
|
|
|
|
|
|
|
|
AC_CHECK_FUNC(gettext, [HAVEGETTEXT="yes"],
|
|
|
|
|
|
AC_CHECK_LIB(intl, gettext, [INTLIBS="-lintl" HAVEGETTEXT="yes"],
|
|
|
|
|
|
INTLIBS="" ))
|
|
|
|
|
|
|
|
|
|
|
|
AC_CHECK_PROG(XGETTEXT, xgettext, xgettext)
|
|
|
|
|
|
|
|
|
|
|
|
if test "$XGETTEXT" != ""; then
|
|
|
|
|
|
if $XGETTEXT --help 2>&1 | grep illegal >/dev/null ; then
|
|
|
|
|
|
echo "xgettext isn't GNU version"
|
|
|
|
|
|
XGETTEXT=""
|
|
|
|
|
|
fi
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
if test "$LINGUAS" != ""; then
|
|
|
|
|
|
if test "$XGETTEXT" != "" -a "$HAVEGETTEXT" != ""; then
|
2002-10-08 08:26:06 +00:00
|
|
|
|
AC_DEFINE(I18N, 1, [Internationalization (I18N) support (set by configure)])
|
2001-07-30 21:44:15 +00:00
|
|
|
|
PO=""
|
|
|
|
|
|
echo "xgettext and gettext() exist; will build i18n support for $LINGUAS"
|
|
|
|
|
|
else
|
|
|
|
|
|
LINGUAS=""
|
|
|
|
|
|
PO=""
|
|
|
|
|
|
echo "xgettext and libintl.a don't both exist; will not build i18n support"
|
|
|
|
|
|
fi
|
|
|
|
|
|
else
|
|
|
|
|
|
INTLIBS=""
|
|
|
|
|
|
MOFILES=""
|
|
|
|
|
|
WPMOFILES=""
|
2010-01-25 10:55:33 +01:00
|
|
|
|
UTILMOFILES=""
|
2001-07-30 21:44:15 +00:00
|
|
|
|
PO=""
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dnl The Tower of Babel
|
|
|
|
|
|
dnl ==================
|
|
|
|
|
|
|
|
|
|
|
|
dnl List of supported locales
|
2010-08-24 15:10:44 +02:00
|
|
|
|
dnl =========================
|
2009-09-21 12:28:24 +05:00
|
|
|
|
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"
|
2004-10-27 02:54:32 +00:00
|
|
|
|
supported_wprefs_locales="bg ca cs de es et fi fr hr hu it ja ko pt ru sk zh_CN zh_TW"
|
2003-04-06 23:18:07 +00:00
|
|
|
|
supported_wings_locales="bg ca cs de fr sk"
|
2012-02-22 03:17:53 -02:00
|
|
|
|
supported_util_locales="de es fr pt"
|
2001-07-30 21:44:15 +00:00
|
|
|
|
|
|
|
|
|
|
for lang in $LINGUAS; do
|
|
|
|
|
|
ok=0
|
|
|
|
|
|
for l in $supported_locales; do
|
|
|
|
|
|
if test "$l" = "$lang"; then
|
|
|
|
|
|
ok=1
|
|
|
|
|
|
break
|
|
|
|
|
|
fi
|
|
|
|
|
|
done
|
|
|
|
|
|
if test "$ok" = 1; then
|
|
|
|
|
|
MOFILES="$MOFILES $lang.mo"
|
|
|
|
|
|
else
|
|
|
|
|
|
echo "Locale $lang is not supported."
|
|
|
|
|
|
fi
|
|
|
|
|
|
ok=0
|
|
|
|
|
|
for l in $supported_wprefs_locales; do
|
|
|
|
|
|
if test "$l" = "$lang"; then
|
|
|
|
|
|
ok=1
|
|
|
|
|
|
break
|
|
|
|
|
|
fi
|
|
|
|
|
|
done
|
|
|
|
|
|
if test "$ok" = 1; then
|
|
|
|
|
|
WPMOFILES="$WPMOFILES $lang.mo"
|
|
|
|
|
|
fi
|
|
|
|
|
|
ok=0
|
2010-01-25 10:55:33 +01:00
|
|
|
|
for l in $supported_util_locales; do
|
|
|
|
|
|
if test "$l" = "$lang"; then
|
|
|
|
|
|
ok=1
|
|
|
|
|
|
break
|
|
|
|
|
|
fi
|
|
|
|
|
|
done
|
|
|
|
|
|
if test "$ok" = 1; then
|
|
|
|
|
|
UTILMOFILES="$UTILMOFILES $lang.mo"
|
|
|
|
|
|
fi
|
|
|
|
|
|
ok=0
|
2001-07-30 21:44:15 +00:00
|
|
|
|
for l in $supported_wings_locales; do
|
|
|
|
|
|
if test "$l" = "$lang"; then
|
|
|
|
|
|
ok=1
|
|
|
|
|
|
break
|
|
|
|
|
|
fi
|
|
|
|
|
|
done
|
|
|
|
|
|
if test "$ok" = 1; then
|
|
|
|
|
|
WINGSMOFILES="$WINGSMOFILES $lang.mo"
|
|
|
|
|
|
fi
|
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-08-24 15:10:44 +02:00
|
|
|
|
dnl Added by Oliver - Support for NLSDIR option
|
2001-07-30 21:44:15 +00:00
|
|
|
|
dnl ===========================================
|
2010-08-24 15:10:44 +02:00
|
|
|
|
AC_ARG_WITH(nlsdir, AS_HELP_STRING([--with-nlsdir=PATH], [specify where the locale stuff should go]))
|
2001-07-30 21:44:15 +00:00
|
|
|
|
|
|
|
|
|
|
if test "x$NLSDIR" = "x"; then
|
|
|
|
|
|
if test "x$with_nlsdir" != "x"; then
|
|
|
|
|
|
NLSDIR=$with_nlsdir
|
|
|
|
|
|
else
|
|
|
|
|
|
NLSDIR='$(prefix)/lib/locale'
|
|
|
|
|
|
fi
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
2010-09-29 16:12:33 -04:00
|
|
|
|
menutextdomain=
|
2010-09-10 20:51:02 +04:00
|
|
|
|
AC_ARG_WITH(menu-textdomain, AS_HELP_STRING([--with-menu-textdomain=DOMAIN], [specify gettext domain used for menu translations]),
|
|
|
|
|
|
[if test "x$withval" != "xno"; then
|
2010-09-29 16:12:33 -04:00
|
|
|
|
menutextdomain=$withval
|
2010-09-10 20:51:02 +04:00
|
|
|
|
fi])
|
2010-09-29 16:12:33 -04:00
|
|
|
|
AC_SUBST(menutextdomain)
|
2010-09-10 20:51:02 +04:00
|
|
|
|
|
2001-07-30 21:44:15 +00:00
|
|
|
|
AC_SUBST(INTLIBS)
|
|
|
|
|
|
AC_SUBST(NLSDIR)
|
|
|
|
|
|
AC_SUBST(MOFILES)
|
|
|
|
|
|
AC_SUBST(WPMOFILES)
|
2010-01-25 10:55:33 +01:00
|
|
|
|
AC_SUBST(UTILMOFILES)
|
2001-07-30 21:44:15 +00:00
|
|
|
|
AC_SUBST(WINGSMOFILES)
|
|
|
|
|
|
AC_SUBST(supported_locales)
|
|
|
|
|
|
|
|
|
|
|
|
dnl ===========================================
|
|
|
|
|
|
dnl Stuff that uses X
|
|
|
|
|
|
dnl ===========================================
|
|
|
|
|
|
|
|
|
|
|
|
AC_PATH_XTRA
|
|
|
|
|
|
|
|
|
|
|
|
if test $no_x; then
|
|
|
|
|
|
AC_MSG_ERROR([The path for the X11 files not found!
|
|
|
|
|
|
Make sure you have X and it's headers and libraries (the -devel packages
|
|
|
|
|
|
in Linux) installed.])
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
X_LIBRARY_PATH=$x_libraries
|
|
|
|
|
|
XCFLAGS="$X_CFLAGS"
|
|
|
|
|
|
XLFLAGS="$X_LIBS"
|
2010-09-24 16:08:12 -04:00
|
|
|
|
XLIBS="-lX11 $X_EXTRA_LIBS"
|
2001-07-30 21:44:15 +00:00
|
|
|
|
|
|
|
|
|
|
lib_search_path="$lib_search_path $XLFLAGS"
|
|
|
|
|
|
inc_search_path="$inc_search_path $XCFLAGS"
|
|
|
|
|
|
|
|
|
|
|
|
AC_SUBST(X_LIBRARY_PATH)
|
|
|
|
|
|
|
|
|
|
|
|
dnl Decide which locale function to use, setlocale() or _Xsetlocale()
|
|
|
|
|
|
dnl by MANOME Tomonori
|
|
|
|
|
|
dnl ===========================================
|
|
|
|
|
|
use_locale=yes
|
2010-08-24 15:10:44 +02:00
|
|
|
|
AC_ARG_ENABLE(locale, AS_HELP_STRING([--disable-locale], [disable use of X locale support]),
|
|
|
|
|
|
use_locale=no)
|
2001-07-30 21:44:15 +00:00
|
|
|
|
|
|
|
|
|
|
if test "$use_locale" = yes; then
|
2002-10-08 08:26:06 +00:00
|
|
|
|
AC_CHECK_LIB(X11, _Xsetlocale,
|
|
|
|
|
|
AC_DEFINE(X_LOCALE, 1, [define if you want support for X window's X_LOCALE (set by configure)]),,
|
|
|
|
|
|
$XLFLAGS $XLIBS)
|
2001-07-30 21:44:15 +00:00
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
dnl Check whether XInternAtoms() exist
|
|
|
|
|
|
dnl ==================================
|
2002-10-08 08:26:06 +00:00
|
|
|
|
AC_CHECK_LIB(X11, XInternAtoms,
|
|
|
|
|
|
AC_DEFINE(HAVE_XINTERNATOMS, 1, [define if your X server has XInternAtoms() (set by configure)]),,
|
|
|
|
|
|
$XLFLAGS $XLIBS)
|
2001-07-30 21:44:15 +00:00
|
|
|
|
|
2001-09-06 21:42:28 +00:00
|
|
|
|
dnl Check whether XConvertCase() exist
|
|
|
|
|
|
dnl ==================================
|
2002-10-08 08:26:06 +00:00
|
|
|
|
AC_CHECK_LIB(X11, XConvertCase,
|
|
|
|
|
|
AC_DEFINE(HAVE_XCONVERTCASE, 1, [define if your X server has XConvertCase() (set by configure)]),,
|
|
|
|
|
|
$XLFLAGS $XLIBS)
|
2001-09-06 21:42:28 +00:00
|
|
|
|
|
2001-07-30 21:44:15 +00:00
|
|
|
|
dnl XKB keyboard language status
|
|
|
|
|
|
dnl ============================
|
2010-08-24 15:10:44 +02:00
|
|
|
|
AC_ARG_ENABLE(modelock, AS_HELP_STRING([--enable-modelock], [XKB keyboard language status support]),
|
2002-10-08 08:26:06 +00:00
|
|
|
|
AC_DEFINE(XKB_MODELOCK, 1, [whether XKB language MODELOCK should be enabled]))
|
2001-07-30 21:44:15 +00:00
|
|
|
|
|
2013-11-18 00:51:57 +01:00
|
|
|
|
dnl XShape support
|
|
|
|
|
|
dnl ==============
|
2013-11-17 18:51:14 +01:00
|
|
|
|
AC_ARG_ENABLE([shape],
|
|
|
|
|
|
[AS_HELP_STRING([--disable-shape], [disable shaped window extension support])],
|
|
|
|
|
|
[AS_CASE(["$enableval"],
|
|
|
|
|
|
[yes|no], [],
|
|
|
|
|
|
[AC_MSG_ERROR([bad value $enableval for --enable-shape]) ]) ],
|
|
|
|
|
|
[enable_shape=auto])
|
|
|
|
|
|
WM_XEXT_CHECK_XSHAPE
|
2001-07-30 21:44:15 +00:00
|
|
|
|
|
2013-11-17 18:51:20 +01:00
|
|
|
|
dnl MIT-SHM support
|
|
|
|
|
|
dnl ===============
|
|
|
|
|
|
AC_ARG_ENABLE([shm],
|
|
|
|
|
|
[AS_HELP_STRING([--disable-shm], [disable usage of MIT-SHM extension])],
|
|
|
|
|
|
[AS_CASE(["$enableval"],
|
|
|
|
|
|
[yes|no], [],
|
|
|
|
|
|
[AC_MSG_ERROR([bad value $enableval for --enable-shm]) ]) ],
|
|
|
|
|
|
[enable_shm=auto])
|
|
|
|
|
|
WM_XEXT_CHECK_XSHM
|
|
|
|
|
|
|
2013-11-17 18:51:21 +01:00
|
|
|
|
dnl X Misceleanous Utility
|
|
|
|
|
|
dnl ======================
|
|
|
|
|
|
# the libXmu is used in WRaster
|
|
|
|
|
|
WM_EXT_CHECK_XMU
|
|
|
|
|
|
|
2013-11-17 18:51:16 +01:00
|
|
|
|
dnl XINERAMA support
|
|
|
|
|
|
dnl ================
|
|
|
|
|
|
AC_ARG_ENABLE([xinerama],
|
|
|
|
|
|
[AS_HELP_STRING([--enable-xinerama], [enable Xinerama extension support])],
|
|
|
|
|
|
[AS_CASE(["$enableval"],
|
|
|
|
|
|
[yes|no], [],
|
|
|
|
|
|
[AC_MSG_ERROR([bad value $enableval for --enable-xinerama]) ]) ],
|
|
|
|
|
|
[enable_xinerama=auto])
|
|
|
|
|
|
WM_XEXT_CHECK_XINERAMA
|
|
|
|
|
|
|
2010-08-22 19:05:07 +02:00
|
|
|
|
dnl XRandR support
|
2010-09-23 17:09:46 +02:00
|
|
|
|
dnl ==============
|
2013-11-17 18:51:18 +01:00
|
|
|
|
AC_ARG_ENABLE([xrandr],
|
|
|
|
|
|
[AS_HELP_STRING([--enable-xrandr], [enable XRandR extension support (NOT recommended, buggy)])],
|
|
|
|
|
|
[AS_CASE(["$enableval"],
|
|
|
|
|
|
[yes|no], [],
|
|
|
|
|
|
[AC_MSG_ERROR([bad value $enableval for --enable-xrandr]) ]) ],
|
|
|
|
|
|
[enable_xrandr=no])
|
|
|
|
|
|
WM_XEXT_CHECK_XRANDR
|
2001-07-30 21:44:15 +00:00
|
|
|
|
|
2010-08-01 16:07:22 +02:00
|
|
|
|
dnl
|
|
|
|
|
|
dnl libWINGS uses math functions, check whether usage requires linking
|
|
|
|
|
|
dnl against libm
|
|
|
|
|
|
dnl
|
2013-06-16 21:50:56 +02:00
|
|
|
|
WM_CHECK_LIBM
|
2010-08-01 16:07:22 +02:00
|
|
|
|
|
2010-08-01 15:19:27 +02:00
|
|
|
|
dnl
|
|
|
|
|
|
dnl libWINGS uses FcPatternDel from libfontconfig
|
|
|
|
|
|
dnl
|
|
|
|
|
|
AC_MSG_CHECKING([for fontconfig library])
|
|
|
|
|
|
FCLIBS=`$PKGCONFIG fontconfig --libs`
|
|
|
|
|
|
if test "x$FCLIBS" = "x" ; then
|
|
|
|
|
|
AC_MSG_RESULT([not found])
|
|
|
|
|
|
else
|
|
|
|
|
|
AC_MSG_RESULT([found])
|
|
|
|
|
|
fi
|
|
|
|
|
|
AC_SUBST(FCLIBS)
|
|
|
|
|
|
|
|
|
|
|
|
|
2004-10-23 02:26:13 +00:00
|
|
|
|
dnl Xft2 antialiased font support
|
|
|
|
|
|
dnl =============================
|
2004-10-12 01:34:32 +00:00
|
|
|
|
|
2002-10-09 05:14:28 +00:00
|
|
|
|
xft=yes
|
|
|
|
|
|
XFTLIBS=""
|
2004-10-12 01:34:32 +00:00
|
|
|
|
|
|
|
|
|
|
if test "x$PKGCONFIG" != x -a "`$PKGCONFIG xft; echo $?`" = 0; then
|
|
|
|
|
|
XFTCONFIG="$PKGCONFIG xft"
|
|
|
|
|
|
pkgconfig_xft=yes
|
|
|
|
|
|
else
|
|
|
|
|
|
AC_CHECK_PROG(XFTCONFIG, xft-config, xft-config)
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
AC_MSG_CHECKING([for the Xft2 library])
|
|
|
|
|
|
|
|
|
|
|
|
if test "x$XFTCONFIG" != x; then
|
|
|
|
|
|
XFTLIBS=`$XFTCONFIG --libs`
|
|
|
|
|
|
XFTFLAGS=`$XFTCONFIG --cflags`
|
|
|
|
|
|
AC_MSG_RESULT([found])
|
|
|
|
|
|
else
|
|
|
|
|
|
AC_MSG_RESULT([not found])
|
|
|
|
|
|
echo
|
|
|
|
|
|
echo "ERROR!!! libXft2 is not installed or could not be found."
|
|
|
|
|
|
echo " Xft2 is a requirement for building Window Maker."
|
|
|
|
|
|
echo " Please install it (along with fontconfig) before continuing."
|
|
|
|
|
|
echo
|
|
|
|
|
|
exit 1
|
2004-07-16 18:18:36 +00:00
|
|
|
|
fi
|
|
|
|
|
|
|
2004-10-31 00:57:25 +00:00
|
|
|
|
minXFT="2.1.0"
|
2004-10-12 01:34:32 +00:00
|
|
|
|
goodxft="no"
|
|
|
|
|
|
|
|
|
|
|
|
dnl
|
|
|
|
|
|
dnl The macro below will use $XFTFLAGS (defined above) to find Xft.h
|
|
|
|
|
|
dnl
|
|
|
|
|
|
WM_CHECK_XFT_VERSION($minXFT, goodxft=yes, goodxft=no)
|
|
|
|
|
|
|
|
|
|
|
|
if test "$goodxft" = no; then
|
|
|
|
|
|
echo
|
|
|
|
|
|
echo "ERROR!!! libXft on this system is an old version."
|
|
|
|
|
|
echo " Please consider upgrading to at least version ${minXFT}."
|
|
|
|
|
|
echo
|
|
|
|
|
|
exit 1
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
AC_SUBST(XFTFLAGS)
|
|
|
|
|
|
AC_SUBST(XFTLIBS)
|
|
|
|
|
|
|
|
|
|
|
|
|
2001-07-30 21:44:15 +00:00
|
|
|
|
dnl ==============================================
|
|
|
|
|
|
dnl Graphic Format Libraries
|
|
|
|
|
|
dnl ==============================================
|
|
|
|
|
|
|
|
|
|
|
|
dnl XPM Support
|
|
|
|
|
|
dnl ===========
|
2013-11-08 18:49:58 +01:00
|
|
|
|
AC_ARG_ENABLE([xpm],
|
|
|
|
|
|
[AS_HELP_STRING([--disable-xpm], [disable use of XPM pixmaps through libXpm])],
|
|
|
|
|
|
[AS_CASE(["$enableval"],
|
|
|
|
|
|
[yes|no], [],
|
|
|
|
|
|
[AC_MSG_ERROR([bad value $enableval for --enable-xpm])] )],
|
|
|
|
|
|
[enable_xpm=auto])
|
|
|
|
|
|
WM_IMGFMT_CHECK_XPM
|
|
|
|
|
|
|
2001-07-30 21:44:15 +00:00
|
|
|
|
|
2012-02-26 19:14:23 +00:00
|
|
|
|
# for wmlib
|
|
|
|
|
|
AC_SUBST(XCFLAGS)
|
|
|
|
|
|
# for test
|
2001-07-30 21:44:15 +00:00
|
|
|
|
AC_SUBST(XLFLAGS)
|
|
|
|
|
|
AC_SUBST(XLIBS)
|
|
|
|
|
|
AC_SUBST(X_EXTRA_LIBS)
|
|
|
|
|
|
|
|
|
|
|
|
dnl ===============================================
|
|
|
|
|
|
dnl End of stuff that uses X
|
|
|
|
|
|
dnl ===============================================
|
|
|
|
|
|
|
|
|
|
|
|
dnl PNG Support
|
|
|
|
|
|
dnl ===========
|
2013-11-04 20:52:30 +01:00
|
|
|
|
AC_ARG_ENABLE([png],
|
|
|
|
|
|
[AS_HELP_STRING([--disable-png], [disable PNG support through libpng])],
|
|
|
|
|
|
[AS_CASE(["$enableval"],
|
|
|
|
|
|
[yes|no], [],
|
|
|
|
|
|
[AC_MSG_ERROR([bad value $enableval for --enable-png])] )],
|
|
|
|
|
|
[enable_png=auto])
|
|
|
|
|
|
WM_IMGFMT_CHECK_PNG
|
2001-07-30 21:44:15 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dnl JPEG Support
|
|
|
|
|
|
dnl ============
|
2013-11-04 20:52:29 +01:00
|
|
|
|
AC_ARG_ENABLE([jpeg],
|
|
|
|
|
|
[AS_HELP_STRING([--disable-jpeg], [disable JPEG support through libjpeg])],
|
|
|
|
|
|
[AS_CASE(["$enableval"],
|
|
|
|
|
|
[yes|no], [],
|
|
|
|
|
|
[AC_MSG_ERROR([bad value $enableval for --enable-jpeg])] )],
|
|
|
|
|
|
[enable_jpeg=auto])
|
|
|
|
|
|
WM_IMGFMT_CHECK_JPEG
|
2001-07-30 21:44:15 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dnl GIF Support
|
|
|
|
|
|
dnl ============
|
2013-11-04 20:52:28 +01:00
|
|
|
|
AC_ARG_ENABLE(gif,
|
|
|
|
|
|
[AS_HELP_STRING([--disable-gif], [disable GIF support through libgif or libungif])],
|
|
|
|
|
|
[AS_CASE(["$enableval"],
|
|
|
|
|
|
[yes|no], [],
|
|
|
|
|
|
[AC_MSG_ERROR([bad value $enableval for --enable-gif])] )],
|
|
|
|
|
|
[enable_gif=auto])
|
|
|
|
|
|
WM_IMGFMT_CHECK_GIF
|
2001-07-30 21:44:15 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dnl TIFF Support
|
|
|
|
|
|
dnl ============
|
2013-11-04 20:52:31 +01:00
|
|
|
|
AC_ARG_ENABLE([tiff],
|
|
|
|
|
|
[AS_HELP_STRING([--disable-tiff], [disable use of TIFF images through libtiff])],
|
|
|
|
|
|
[AS_CASE(["$enableval"],
|
|
|
|
|
|
[yes|no], [],
|
|
|
|
|
|
[AC_MSG_ERROR([bad value $enableval for --enable-tiff])] )],
|
|
|
|
|
|
[enable_tiff=auto])
|
|
|
|
|
|
WM_IMGFMT_CHECK_TIFF
|
2001-07-30 21:44:15 +00:00
|
|
|
|
|
|
|
|
|
|
|
2013-11-08 18:49:59 +01:00
|
|
|
|
dnl PPM Support
|
|
|
|
|
|
dnl ===========
|
|
|
|
|
|
# The PPM format is always enabled because we have built-in support for the format
|
|
|
|
|
|
# We are not using any external library like libppm
|
|
|
|
|
|
supported_gfx="$supported_gfx builtin-PPM"
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-11-04 20:52:31 +01:00
|
|
|
|
# Choice of the default format for icons
|
|
|
|
|
|
AS_IF([test "x$enable_tiff" != "xno"],
|
|
|
|
|
|
[ICONEXT="tiff"],
|
|
|
|
|
|
[ICONEXT="xpm"])
|
2001-07-30 21:44:15 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LIBRARY_SEARCH_PATH="$lib_search_path"
|
|
|
|
|
|
HEADER_SEARCH_PATH="$inc_search_path"
|
|
|
|
|
|
|
|
|
|
|
|
AC_SUBST(LIBRARY_SEARCH_PATH)
|
|
|
|
|
|
AC_SUBST(HEADER_SEARCH_PATH)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
AC_SUBST(GFXLIBS)
|
|
|
|
|
|
AC_SUBST(ICONEXT)
|
2013-06-09 13:49:23 +02:00
|
|
|
|
AM_CONDITIONAL([ICON_EXT_XPM], [test "x$ICONEXT" = "xxpm"])
|
|
|
|
|
|
AM_CONDITIONAL([ICON_EXT_TIFF], [test "x$ICONEXT" = "xtiff"])
|
2001-07-30 21:44:15 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dnl ==============================================
|
|
|
|
|
|
dnl End of Graphic Format Libraries
|
|
|
|
|
|
dnl ==============================================
|
|
|
|
|
|
|
|
|
|
|
|
|
2001-09-18 11:48:15 +00:00
|
|
|
|
dnl
|
|
|
|
|
|
dnl stdlib.h is checked here, because of conflict in jpeglib.h
|
|
|
|
|
|
AC_CHECK_HEADERS(stdlib.h)
|
|
|
|
|
|
|
2001-07-30 21:44:15 +00:00
|
|
|
|
# AC_PREFIX_PROGRAM(wmaker)
|
|
|
|
|
|
|
|
|
|
|
|
dnl Support for PIXMAPDIR option
|
|
|
|
|
|
dnl ============================
|
2010-08-24 15:10:44 +02:00
|
|
|
|
AC_ARG_WITH(pixmapdir, AS_HELP_STRING([--with-pixmapdir=PATH], [specify where pixmaps are located [DATADIR/pixmaps]]))
|
2001-07-30 21:44:15 +00:00
|
|
|
|
|
|
|
|
|
|
if test "x$with_pixmapdir" != "x"; then
|
|
|
|
|
|
pixmapdir=$with_pixmapdir
|
|
|
|
|
|
else
|
2010-09-29 16:12:33 -04:00
|
|
|
|
pixmapdir='${datadir}/pixmaps'
|
2001-07-30 21:44:15 +00:00
|
|
|
|
fi
|
2010-09-29 16:12:33 -04:00
|
|
|
|
AC_SUBST(pixmapdir)
|
2001-07-30 21:44:15 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dnl Support for GNUSTEP_LOCAL_ROOT, for WPrefs.app
|
|
|
|
|
|
dnl ==============================================
|
|
|
|
|
|
|
2010-09-22 10:24:46 -04:00
|
|
|
|
AC_ARG_WITH(gnustepdir, AS_HELP_STRING([--with-gnustepdir=PATH], [specify the directory for GNUstep applications]))
|
2004-11-14 00:11:20 +00:00
|
|
|
|
|
2005-07-05 08:44:00 +00:00
|
|
|
|
if test "x`echo $with_gnustepdir | grep ^/`" != "x"; then
|
|
|
|
|
|
appspath=$with_gnustepdir
|
|
|
|
|
|
fi
|
2001-07-30 21:44:15 +00:00
|
|
|
|
|
2004-11-14 00:11:20 +00:00
|
|
|
|
if test "x$appspath$GNUSTEP_LOCAL_ROOT" = "x"; then
|
2004-11-06 20:20:05 +00:00
|
|
|
|
wprefs_base_dir=${prefix}
|
2004-11-01 00:50:19 +00:00
|
|
|
|
wprefs_datadir="${datadir}/WPrefs"
|
|
|
|
|
|
wprefs_bindir="${bindir}"
|
|
|
|
|
|
else
|
|
|
|
|
|
gnustepdir=$appspath
|
2001-07-30 21:44:15 +00:00
|
|
|
|
|
|
|
|
|
|
if test "x$GNUSTEP_LOCAL_ROOT" != "x" ; then
|
|
|
|
|
|
gnustepdir=`echo "$GNUSTEP_LOCAL_ROOT" | sed -e "s|^${prefix}|prefix|"`
|
|
|
|
|
|
gnustepdir=`echo $gnustepdir | sed -e 's|^prefix|${prefix}|'`
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
2004-11-06 20:20:05 +00:00
|
|
|
|
wprefs_base_dir=$gnustepdir/Applications
|
|
|
|
|
|
wprefs_datadir=$wprefs_base_dir/WPrefs.app
|
|
|
|
|
|
wprefs_bindir=$wprefs_base_dir/WPrefs.app
|
2001-07-30 21:44:15 +00:00
|
|
|
|
fi
|
|
|
|
|
|
|
2004-11-01 00:50:19 +00:00
|
|
|
|
AC_SUBST(wprefs_datadir)
|
|
|
|
|
|
AC_SUBST(wprefs_bindir)
|
2001-07-30 21:44:15 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dnl Enable User Defined Menu thing
|
2010-09-23 17:09:46 +02:00
|
|
|
|
dnl ==============================
|
2010-08-24 15:10:44 +02:00
|
|
|
|
AC_ARG_ENABLE(usermenu, AS_HELP_STRING([--enable-usermenu], [user defined menus for applications]),
|
2001-07-30 21:44:15 +00:00
|
|
|
|
if test "$enableval" = yes; then
|
2002-10-08 08:26:06 +00:00
|
|
|
|
AC_DEFINE(USER_MENU, 1, [define if you want user defined menus for applications])
|
2001-07-30 21:44:15 +00:00
|
|
|
|
fi
|
|
|
|
|
|
)
|
|
|
|
|
|
|
2010-08-29 16:13:41 +02:00
|
|
|
|
gl_LD_VERSION_SCRIPT
|
|
|
|
|
|
|
2012-02-26 19:14:23 +00:00
|
|
|
|
AC_OUTPUT(Makefile po/Makefile util/Makefile util/po/Makefile test/Makefile \
|
2001-07-30 21:44:15 +00:00
|
|
|
|
WINGs/Makefile WINGs/WINGs/Makefile WINGs/Documentation/Makefile \
|
|
|
|
|
|
WINGs/Examples/Makefile WINGs/Resources/Makefile WINGs/Tests/Makefile \
|
|
|
|
|
|
WINGs/Extras/Makefile WINGs/po/Makefile \
|
2012-02-26 19:14:23 +00:00
|
|
|
|
wmlib/Makefile wrlib/Makefile wrlib/tests/Makefile \
|
2005-01-06 15:48:42 +00:00
|
|
|
|
src/Makefile src/wconfig.h \
|
2010-04-09 10:40:51 -04:00
|
|
|
|
doc/Makefile doc/sk/Makefile doc/cs/Makefile \
|
2010-08-18 18:44:37 +04:00
|
|
|
|
doc/ru/Makefile \
|
2001-07-30 21:44:15 +00:00
|
|
|
|
WindowMaker/Makefile WindowMaker/Backgrounds/Makefile \
|
|
|
|
|
|
WindowMaker/Defaults/Makefile WindowMaker/IconSets/Makefile \
|
|
|
|
|
|
WindowMaker/Icons/Makefile WindowMaker/Pixmaps/Makefile \
|
|
|
|
|
|
WindowMaker/Styles/Makefile WindowMaker/Themes/Makefile \
|
|
|
|
|
|
WPrefs.app/Makefile WPrefs.app/tiff/Makefile WPrefs.app/xpm/Makefile \
|
2010-04-09 03:44:23 +02:00
|
|
|
|
WPrefs.app/po/Makefile )
|
2001-07-30 21:44:15 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dnl Output some helpful data for compiling wraster and WINGs/WUtil apps
|
|
|
|
|
|
dnl ===================================================================
|
|
|
|
|
|
|
|
|
|
|
|
dnl echo "WFLAGS=\"$LIBPL_INC_PATH -I$prefix/include\"" > WINGs-flags
|
|
|
|
|
|
dnl echo "WLIBS=\"-L$exec_prefix/lib -lWINGs -lwraster $LIBPL_LIBS $GFXLIBS -lm\""\
|
|
|
|
|
|
dnl | sed -e 's|\$(prefix)|'"$prefix|" >> WINGs-flags
|
|
|
|
|
|
|
|
|
|
|
|
dnl The #lp# and #rp# stuff below is a hack because [ and ] get lost when
|
|
|
|
|
|
dnl parsed by m4
|
|
|
|
|
|
|
2010-09-29 16:12:33 -04:00
|
|
|
|
AC_SUBST(lib_search_path)
|
|
|
|
|
|
AC_SUBST(inc_search_path)
|
2001-07-30 21:44:15 +00:00
|
|
|
|
|
|
|
|
|
|
dnl
|
|
|
|
|
|
dnl Spit out the configuration
|
|
|
|
|
|
dnl ==========================
|
|
|
|
|
|
|
|
|
|
|
|
if test "x$MOFILES" = "x"; then
|
2004-10-12 01:34:32 +00:00
|
|
|
|
mof=None
|
2001-07-30 21:44:15 +00:00
|
|
|
|
else
|
2002-12-02 04:42:13 +00:00
|
|
|
|
mof=`echo $MOFILES`
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
if test "x$MOFILES" = "x"; then
|
2004-10-12 01:34:32 +00:00
|
|
|
|
languages=None
|
2002-12-02 04:42:13 +00:00
|
|
|
|
else
|
|
|
|
|
|
languages=`echo $MOFILES | sed 's/.mo//g'`
|
2001-07-30 21:44:15 +00:00
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
echo
|
|
|
|
|
|
echo "Window Maker was configured as follows:"
|
|
|
|
|
|
echo
|
2002-12-02 04:42:13 +00:00
|
|
|
|
echo "Installation path prefix : $prefix"
|
|
|
|
|
|
echo "Installation path for binaries : $_bindir"
|
2012-01-15 23:27:15 +00:00
|
|
|
|
echo "Installation path for libraries : $libdir"
|
2004-11-06 20:20:05 +00:00
|
|
|
|
echo "Installation path for WPrefs.app : $wprefs_base_dir" | sed -e 's|\${prefix}|'"$prefix|"
|
2013-11-17 18:51:14 +01:00
|
|
|
|
echo "Supported X extensions: :$supported_xext"
|
2013-11-08 18:49:58 +01:00
|
|
|
|
echo "Supported graphic format libraries :$supported_gfx"
|
2013-11-04 20:52:28 +01:00
|
|
|
|
echo "Unsupported features :$unsupported"
|
2004-10-12 01:34:32 +00:00
|
|
|
|
echo "Antialiased text support in WINGs : $xft"
|
2002-12-02 04:42:13 +00:00
|
|
|
|
echo "Translated message files to install : $mof"
|
|
|
|
|
|
dnl echo "Supported languages beside English : $languages"
|
2001-07-30 21:44:15 +00:00
|
|
|
|
if test "x$MOFILES" != "x"; then
|
2002-12-02 04:42:13 +00:00
|
|
|
|
echo "Installation path for translations : $NLSDIR" | sed -e 's|\$(prefix)|'"$prefix|"
|
2001-07-30 21:44:15 +00:00
|
|
|
|
fi
|
2013-11-08 23:08:19 +01:00
|
|
|
|
AS_IF([test "x$debug" = "xyes"],
|
|
|
|
|
|
[AS_ECHO(["Debug enabled: CFLAGS = $CFLAGS"]) ])
|
2002-12-02 04:42:13 +00:00
|
|
|
|
echo
|
2001-07-30 21:44:15 +00:00
|
|
|
|
|
|
|
|
|
|
dnl WM_PRINT_REDCRAP_BUG_STATUS
|
|
|
|
|
|
|
2013-11-04 20:52:29 +01:00
|
|
|
|
AS_IF([test "x$enable_jpeg" = xno], [dnl
|
|
|
|
|
|
AS_ECHO(["WARNING WARNING WARNING WARNING WARNING WARNING WARNING"])
|
|
|
|
|
|
AS_ECHO([])
|
|
|
|
|
|
AS_ECHO(["JPEG support will not be included because the JPEG library is"])
|
|
|
|
|
|
AS_ECHO(["not installed correctly or was not found. Background images"])
|
|
|
|
|
|
AS_ECHO(["from themes will not display as they usually are JPEG files."])
|
|
|
|
|
|
AS_ECHO([])
|
|
|
|
|
|
AS_ECHO(["To fix, download and install the jpeg library and/or make sure you"])
|
|
|
|
|
|
AS_ECHO(["installed all jpeg related packages, SPECIALLY the development packages"])
|
|
|
|
|
|
AS_ECHO(["like jpeg-dev (if you use some prepackaged version of libjpeg)."])
|
|
|
|
|
|
AS_ECHO([])
|
|
|
|
|
|
AS_ECHO(["WARNING WARNING WARNING WARNING WARNING WARNING WARNING"])dnl
|
|
|
|
|
|
])
|
2001-07-30 21:44:15 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dnl This is for Emacs. I'm lazy, I know... (nicolai)
|
|
|
|
|
|
dnl ================================================
|
|
|
|
|
|
dnl Local Variables:
|
|
|
|
|
|
dnl compile-command: "autoconf"
|
|
|
|
|
|
dnl End:
|
|
|
|
|
|
|