Split into a core repository that only holds the core Wayland libraries
[profile/ivi/wayland.git] / configure.ac
1 AC_PREREQ([2.64])
2 AC_INIT([wayland],
3         [0.1],
4         [https://bugs.freedesktop.org/enter_bug.cgi?product=wayland],
5         [wayland],
6         [http://wayland.freedesktop.org/])
7
8 AC_CONFIG_HEADERS([config.h])
9 AC_CONFIG_MACRO_DIR([m4])
10
11 AM_INIT_AUTOMAKE([1.11 foreign dist-bzip2])
12
13 AM_SILENT_RULES([yes])
14
15 # Check for programs
16 AC_PROG_CC
17
18 # Initialize libtool
19 LT_PREREQ([2.2])
20 LT_INIT
21
22 PKG_PROG_PKG_CONFIG()
23 PKG_CHECK_MODULES(FFI, [libffi])
24
25 if test "x$GCC" = "xyes"; then
26         GCC_CFLAGS="-Wall -g -Wstrict-prototypes -Wmissing-prototypes -fvisibility=hidden"
27 fi
28 AC_SUBST(GCC_CFLAGS)
29
30 EXPAT_LIB=""
31 AC_ARG_WITH(expat, [  --with-expat=<dir>      Use expat from here],
32                    [ expat=$withval
33                      CPPFLAGS="$CPPFLAGS -I$withval/include"
34                      LDFLAGS="$LDFLAGS -L$withval/lib" ] )
35 AC_CHECK_HEADERS(expat.h, [AC_DEFINE(HAVE_EXPAT_H)], 
36                  [AC_MSG_ERROR([Can't find expat.h. Please install expat.])])
37 AC_CHECK_LIB(expat, XML_ParserCreate, [EXPAT_LIBS="-lexpat"],
38              [AC_MSG_ERROR([Can't find expat library. Please install expat.])])
39 AC_SUBST(EXPAT_LIBS)
40
41 AC_CONFIG_FILES([Makefile
42                  wayland-scanner.m4
43                  wayland/Makefile
44                  wayland/wayland-server.pc
45                  wayland/wayland-client.pc])
46 AC_OUTPUT