Added warning about temporary shell surface 'raise' request.
[profile/ivi/wayland.git] / configure.ac
1 AC_PREREQ([2.64])
2
3 m4_define([wayland_major_version], [1])
4 m4_define([wayland_minor_version], [0])
5 m4_define([wayland_micro_version], [6])
6 m4_define([wayland_version],
7           [wayland_major_version.wayland_minor_version.wayland_micro_version])
8
9 AC_INIT([wayland],
10         [wayland_version],
11         [https://bugs.freedesktop.org/enter_bug.cgi?product=Wayland&component=wayland&version=wayland_version],
12         [wayland],
13         [http://wayland.freedesktop.org/])
14
15 AC_SUBST([WAYLAND_VERSION_MAJOR], [wayland_major_version])
16 AC_SUBST([WAYLAND_VERSION_MINOR], [wayland_minor_version])
17 AC_SUBST([WAYLAND_VERSION_MICRO], [wayland_micro_version])
18 AC_SUBST([WAYLAND_VERSION], [wayland_version])
19
20 AC_CONFIG_HEADERS([config.h])
21 AC_CONFIG_MACRO_DIR([m4])
22
23 AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz])
24
25 AM_SILENT_RULES([yes])
26
27 # Check for programs
28 AC_PROG_CC
29
30 # Initialize libtool
31 LT_PREREQ([2.2])
32 LT_INIT
33
34 PKG_PROG_PKG_CONFIG()
35 PKG_CHECK_MODULES(FFI, [libffi])
36
37 if test "x$GCC" = "xyes"; then
38         GCC_CFLAGS="-Wall -Wextra -Wno-unused-parameter -g -Wstrict-prototypes -Wmissing-prototypes -fvisibility=hidden"
39 fi
40 AC_SUBST(GCC_CFLAGS)
41
42 AC_CHECK_FUNCS([accept4 mkostemp])
43
44 AC_ARG_ENABLE([scanner],
45               [AC_HELP_STRING([--disable-scanner],
46                               [Disable compilation of wayland-scanner])],
47               [],
48               [enable_scanner=yes])
49
50 AC_ARG_ENABLE([documentation],
51               [AC_HELP_STRING([--disable-documentation],
52                               [Disable building the documentation])],
53               [],
54               [enable_documentation=yes])
55
56 AM_CONDITIONAL(ENABLE_SCANNER, test "x$enable_scanner" = xyes)
57
58 AC_ARG_WITH(icondir, [  --with-icondir=<dir>    Look for cursor icons here],
59                      [  ICONDIR=$withval],
60                      [  ICONDIR=${datadir}/icons])
61 AC_SUBST([ICONDIR])
62
63 EXPAT_LIB=""
64 AC_ARG_WITH(expat, [  --with-expat=<dir>      Use expat from here],
65                    [ expat=$withval
66                      CPPFLAGS="$CPPFLAGS -I$withval/include"
67                      LDFLAGS="$LDFLAGS -L$withval/lib" ] )
68 if test "x$enable_scanner" = "xyes"; then
69         AC_CHECK_HEADERS(expat.h, [AC_DEFINE(HAVE_EXPAT_H)],
70                          [AC_MSG_ERROR([Can't find expat.h. Please install expat.])])
71         AC_CHECK_LIB(expat, XML_ParserCreate, [EXPAT_LIBS="-lexpat"],
72                      [AC_MSG_ERROR([Can't find expat library. Please install expat.])])
73         AC_SUBST(EXPAT_LIBS)
74 fi
75
76 AC_PATH_PROG(XSLTPROC, xsltproc)
77 AM_CONDITIONAL([HAVE_XSLTPROC], [test "x$XSLTPROC" != "x"])
78
79 AC_MSG_CHECKING([for docbook manpages stylesheet])
80 MANPAGES_STYLESHEET=http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl
81 AC_PATH_PROGS_FEATURE_CHECK([XSLTPROC_TMP], [xsltproc],
82                             AS_IF([`"$ac_path_XSLTPROC_TMP" --nonet "$MANPAGES_STYLESHEET" > /dev/null 2>&1`],
83                                   [HAVE_MANPAGES_STYLESHEET=yes]))
84 if test "x$HAVE_MANPAGES_STYLESHEET" = "xyes"; then
85         AM_CONDITIONAL([HAVE_MANPAGES_STYLESHEET], true)
86         AC_SUBST(MANPAGES_STYLESHEET)
87         AC_MSG_RESULT([yes])
88 else
89         AM_CONDITIONAL([HAVE_MANPAGES_STYLESHEET], false)
90         AC_MSG_RESULT([no])
91 fi
92
93 AM_CONDITIONAL(BUILD_DOCS, [test x$enable_documentation = xyes])
94 if test "x$enable_documentation" = "xyes"; then
95         AC_PATH_PROG(DOXYGEN, doxygen)
96
97         if test "x$DOXYGEN" = "x"; then
98                 AC_MSG_ERROR([Documentation build requested but doxygen not found. Install doxygen or disable the documentation using --disable-documentation])
99         fi
100
101         AC_PATH_PROG(PUBLICAN, publican)
102
103         if test "x$PUBLICAN" != "x"; then
104                 PUBLICAN_VERSION=`$PUBLICAN -v | cut -d'=' -f2`
105
106                 if test [ 1 -eq `echo "${PUBLICAN_VERSION} < 2.8" | bc` ]; then
107                         AC_MSG_ERROR([Publican version is not supported. Install publican >= 2.8 or disable the documentation using --disable-documentation])
108                 fi
109         fi
110
111         AC_CONFIG_FILES([
112         doc/doxygen/wayland.doxygen
113         ])
114
115 fi
116 AM_CONDITIONAL([HAVE_PUBLICAN], [test "x$PUBLICAN" != "x"])
117
118 AC_CONFIG_FILES([Makefile
119                  wayland-scanner.m4
120                  cursor/Makefile
121                  cursor/wayland-cursor.pc
122                  cursor/wayland-cursor-uninstalled.pc
123                  doc/Makefile
124                  doc/Wayland/Makefile
125                  doc/doxygen/Makefile
126                  doc/man/Makefile
127                  src/Makefile
128                  src/wayland-server-uninstalled.pc
129                  src/wayland-client-uninstalled.pc
130                  src/wayland-server.pc
131                  src/wayland-client.pc
132                  src/wayland-version.h
133                  protocol/Makefile
134                  tests/Makefile])
135 AC_OUTPUT