2010-11-06 01:55:27 +01:00
|
|
|
AC_PREREQ([2.64])
|
2012-04-11 16:59:05 +01:00
|
|
|
|
2012-10-22 14:55:06 -04:00
|
|
|
m4_define([wayland_major_version], [1])
|
|
|
|
|
m4_define([wayland_minor_version], [0])
|
2012-07-24 15:45:00 -04:00
|
|
|
m4_define([wayland_micro_version], [0])
|
2012-04-11 16:59:05 +01:00
|
|
|
m4_define([wayland_version],
|
|
|
|
|
[wayland_major_version.wayland_minor_version.wayland_micro_version])
|
|
|
|
|
|
2010-11-06 01:55:27 +01:00
|
|
|
AC_INIT([wayland],
|
2012-04-11 16:59:05 +01:00
|
|
|
[wayland_version],
|
2010-11-06 01:55:27 +01:00
|
|
|
[https://bugs.freedesktop.org/enter_bug.cgi?product=wayland],
|
|
|
|
|
[wayland],
|
|
|
|
|
[http://wayland.freedesktop.org/])
|
|
|
|
|
|
2012-04-11 16:59:05 +01:00
|
|
|
AC_SUBST([WAYLAND_VERSION_MAJOR], [wayland_major_version])
|
|
|
|
|
AC_SUBST([WAYLAND_VERSION_MINOR], [wayland_minor_version])
|
|
|
|
|
AC_SUBST([WAYLAND_VERSION_MICRO], [wayland_micro_version])
|
|
|
|
|
AC_SUBST([WAYLAND_VERSION], [wayland_version])
|
|
|
|
|
|
2010-10-25 11:40:03 -04:00
|
|
|
AC_CONFIG_HEADERS([config.h])
|
2010-11-06 01:55:27 +01:00
|
|
|
AC_CONFIG_MACRO_DIR([m4])
|
|
|
|
|
|
2012-02-09 11:15:33 -05:00
|
|
|
AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz])
|
2010-11-06 01:55:27 +01:00
|
|
|
|
2010-10-12 17:24:20 -04:00
|
|
|
AM_SILENT_RULES([yes])
|
2008-12-04 22:48:50 -05:00
|
|
|
|
2010-11-06 01:55:27 +01:00
|
|
|
# Check for programs
|
|
|
|
|
AC_PROG_CC
|
|
|
|
|
|
|
|
|
|
# Initialize libtool
|
|
|
|
|
LT_PREREQ([2.2])
|
|
|
|
|
LT_INIT
|
|
|
|
|
|
2008-12-04 22:48:50 -05:00
|
|
|
PKG_PROG_PKG_CONFIG()
|
|
|
|
|
PKG_CHECK_MODULES(FFI, [libffi])
|
|
|
|
|
|
2011-01-28 13:47:21 +00:00
|
|
|
if test "x$GCC" = "xyes"; then
|
2012-03-22 11:30:35 +02:00
|
|
|
GCC_CFLAGS="-Wall -Wextra -Wno-unused-parameter -g -Wstrict-prototypes -Wmissing-prototypes -fvisibility=hidden"
|
2008-12-04 22:48:50 -05:00
|
|
|
fi
|
|
|
|
|
AC_SUBST(GCC_CFLAGS)
|
|
|
|
|
|
2012-07-10 13:05:02 +03:00
|
|
|
AC_CHECK_FUNCS([accept4 mkostemp])
|
2012-03-22 14:16:10 +02:00
|
|
|
|
2011-05-06 06:13:36 +00:00
|
|
|
AC_ARG_ENABLE([scanner],
|
|
|
|
|
[AC_HELP_STRING([--disable-scanner],
|
2012-10-12 20:54:45 +03:00
|
|
|
[Disable compilation of wayland-scanner])],
|
2011-05-06 06:13:36 +00:00
|
|
|
[],
|
|
|
|
|
[enable_scanner=yes])
|
|
|
|
|
|
2012-03-17 19:09:39 +02:00
|
|
|
AC_ARG_ENABLE([documentation],
|
|
|
|
|
[AC_HELP_STRING([--disable-documentation],
|
|
|
|
|
[Disable building the documentation])],
|
|
|
|
|
[],
|
|
|
|
|
[enable_documentation=yes])
|
|
|
|
|
|
2011-05-06 06:13:36 +00:00
|
|
|
AM_CONDITIONAL(ENABLE_SCANNER, test "x$enable_scanner" = xyes)
|
|
|
|
|
|
2012-06-08 11:58:02 +03:00
|
|
|
AC_ARG_WITH(icondir, [ --with-icondir=<dir> Look for cursor icons here],
|
|
|
|
|
[ ICONDIR=$withval],
|
|
|
|
|
[ ICONDIR=${datadir}/icons])
|
|
|
|
|
AC_SUBST([ICONDIR])
|
|
|
|
|
|
2010-08-03 09:26:44 -04:00
|
|
|
EXPAT_LIB=""
|
|
|
|
|
AC_ARG_WITH(expat, [ --with-expat=<dir> Use expat from here],
|
|
|
|
|
[ expat=$withval
|
|
|
|
|
CPPFLAGS="$CPPFLAGS -I$withval/include"
|
|
|
|
|
LDFLAGS="$LDFLAGS -L$withval/lib" ] )
|
2011-08-04 07:56:04 +02:00
|
|
|
if test "x$enable_scanner" = "xyes"; then
|
|
|
|
|
AC_CHECK_HEADERS(expat.h, [AC_DEFINE(HAVE_EXPAT_H)],
|
|
|
|
|
[AC_MSG_ERROR([Can't find expat.h. Please install expat.])])
|
|
|
|
|
AC_CHECK_LIB(expat, XML_ParserCreate, [EXPAT_LIBS="-lexpat"],
|
|
|
|
|
[AC_MSG_ERROR([Can't find expat library. Please install expat.])])
|
|
|
|
|
AC_SUBST(EXPAT_LIBS)
|
|
|
|
|
fi
|
2010-08-03 09:26:44 -04:00
|
|
|
|
2012-02-23 15:58:37 +10:00
|
|
|
AC_PATH_PROG(XSLTPROC, xsltproc)
|
2012-02-29 12:49:25 -05:00
|
|
|
AM_CONDITIONAL([HAVE_XSLTPROC], [test "x$XSLTPROC" != "x"])
|
2012-02-23 15:58:37 +10:00
|
|
|
|
2012-10-12 20:54:45 +03:00
|
|
|
AM_CONDITIONAL(BUILD_DOCS, [test x$enable_documentation = xyes])
|
2012-03-17 19:09:39 +02:00
|
|
|
if test "x$enable_documentation" = "xyes"; then
|
2012-10-12 20:54:45 +03:00
|
|
|
AC_PATH_PROG(DOXYGEN, doxygen)
|
|
|
|
|
|
|
|
|
|
if test "x$DOXYGEN" = "x"; then
|
|
|
|
|
AC_MSG_ERROR([Documentation build requested but doxygen not found. Install doxygen or disable the documentation using --disable-documentation])
|
|
|
|
|
fi
|
|
|
|
|
|
2012-03-17 19:09:39 +02:00
|
|
|
AC_PATH_PROG(PUBLICAN, publican)
|
2012-10-11 17:42:09 +03:00
|
|
|
|
2012-10-19 18:29:54 +03:00
|
|
|
if test "x$PUBLICAN" != "x"; then
|
|
|
|
|
PUBLICAN_VERSION=`$PUBLICAN -v | cut -d'=' -f2`
|
|
|
|
|
|
|
|
|
|
if test [ 1 -eq `echo "${PUBLICAN_VERSION} < 2.8" | bc` ]; then
|
|
|
|
|
AC_MSG_ERROR([Publican version is not supported. Install publican >= 2.8 or disable the documentation using --disable-documentation])
|
|
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|
|
2012-10-11 17:42:09 +03:00
|
|
|
AC_CONFIG_FILES([
|
|
|
|
|
doc/doxygen/wayland.doxygen
|
|
|
|
|
])
|
|
|
|
|
|
2012-03-17 19:09:39 +02:00
|
|
|
fi
|
2012-02-29 12:49:25 -05:00
|
|
|
AM_CONDITIONAL([HAVE_PUBLICAN], [test "x$PUBLICAN" != "x"])
|
2012-02-24 09:42:05 +10:00
|
|
|
|
2011-02-14 22:17:41 -05:00
|
|
|
AC_CONFIG_FILES([Makefile
|
|
|
|
|
wayland-scanner.m4
|
2012-05-22 15:39:41 +03:00
|
|
|
cursor/Makefile
|
|
|
|
|
cursor/wayland-cursor.pc
|
2012-05-29 16:53:20 +03:00
|
|
|
cursor/wayland-cursor-uninstalled.pc
|
2012-02-24 09:42:05 +10:00
|
|
|
doc/Makefile
|
|
|
|
|
doc/Wayland/Makefile
|
2012-10-11 17:42:09 +03:00
|
|
|
doc/doxygen/Makefile
|
2012-09-24 13:18:38 +02:00
|
|
|
doc/man/Makefile
|
2011-08-12 15:09:00 -04:00
|
|
|
src/Makefile
|
2012-05-29 16:53:20 +03:00
|
|
|
src/wayland-server-uninstalled.pc
|
|
|
|
|
src/wayland-client-uninstalled.pc
|
2011-08-12 15:09:00 -04:00
|
|
|
src/wayland-server.pc
|
2012-02-23 15:58:37 +10:00
|
|
|
src/wayland-client.pc
|
2012-04-11 16:59:05 +01:00
|
|
|
src/wayland-version.h
|
2012-11-19 17:11:58 -05:00
|
|
|
protocol/Makefile
|
2012-03-02 18:03:16 -05:00
|
|
|
tests/Makefile])
|
2008-12-10 13:44:23 -05:00
|
|
|
AC_OUTPUT
|