Fix EGL build issue when no X11 headers are available
[profile/ivi/ico-uxf-device-input-controller.git] / configure.ac
1 AC_PREREQ([2.68])
2 AC_INIT([ico-uxf-device-input-controller],
3         [0.9.03],
4         [https://BUG-REPORT-ADDRESS])
5
6 AC_CONFIG_HEADERS([config.h])
7
8 AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz])
9
10 AM_SILENT_RULES([yes])
11
12 # Check for programs
13 AC_PROG_CC
14 AC_PROG_CXX
15 AC_PROG_SED
16
17 # Initialize libtool
18 LT_PREREQ([2.2])
19 LT_INIT([disable-static])
20
21 PKG_PROG_PKG_CONFIG()
22
23 AC_CHECK_HEADERS([execinfo.h])
24
25 AC_CHECK_FUNCS([mkostemp strchrnul])
26
27 AC_ARG_ENABLE(setuid-install, [  --enable-setuid-install],,
28               enable_setuid_install=yes)
29 AM_CONDITIONAL(ENABLE_SETUID_INSTALL, test x$enable_setuid_install = xyes)
30
31 PKG_PROG_PKG_CONFIG
32
33 PKG_CHECK_MODULES([GLIB], [glib-2.0])
34 PKG_CHECK_MODULES([EGL], [egl])
35
36 CFLAGS="$CFLAGS $EGL_CFLAGS"
37 AC_SUBST(CFLAGS)
38
39 SHARED_LIBS=
40 SHARED_CFLAGS=
41 AC_SUBST(SHARED_LIBS)
42 AC_SUBST(SHARED_CFLAGS)
43
44 COMPOSITOR_LIBS="$COMPOSITOR_LIBS"
45 COMPOSITOR_CFLAGS="$COMPOSITOR_CFLAGS"
46
47 AM_CONDITIONAL(ENABLE_DESKTOP_SHELL, true)
48
49 if test "x$GCC" = "xyes"; then
50         my_common_gcc_flags="-Wall -Wextra -Wno-unused-parameter \
51                 -Wno-missing-field-initializers -g -fvisibility=hidden"
52         GCC_CFLAGS="$my_common_gcc_flags \
53                 -Wstrict-prototypes -Wmissing-prototypes"
54         GCC_CXXFLAGS="$my_common_gcc_flags"
55 fi
56 AC_SUBST(GCC_CFLAGS)
57 AC_SUBST(GCC_CXXFLAGS)
58
59 WAYLAND_SCANNER_RULES(['$(top_srcdir)/protocol'])
60
61 AC_CONFIG_FILES([Makefile
62                  gtforce/Makefile
63                  tests/Makefile])
64 AC_OUTPUT