Adding upstream version 0.5.0.
[debian/menu-cache.git] / configure.in
1 AC_INIT([menu-cache], [0.5.0],
2         [http://lxde.org/])
3 AC_CONFIG_SRCDIR(menu-cache-gen/gmenu-tree.h)
4
5 AM_INIT_AUTOMAKE
6 AM_CONFIG_HEADER(config.h)
7
8 # Support silent build rules. Disable by either passing --disable-silent-rules
9 # to configure or passing V=1 to make
10 AM_SILENT_RULES([yes])
11
12 AM_MAINTAINER_MODE
13
14 AC_ISC_POSIX
15 AC_PROG_CC
16 AM_PROG_CC_C_O
17 AC_STDC_HEADERS
18 dnl AC_ARG_PROGRAM
19 AM_PROG_LIBTOOL
20
21 dnl make sure we keep ACLOCAL_FLAGS around for maintainer builds to work
22 AC_SUBST(ACLOCAL_AMFLAGS, "$ACLOCAL_FLAGS")
23
24 PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.16.0 gio-2.0 >= 2.15.2)
25 AC_SUBST(GLIB_CFLAGS)
26 AC_SUBST(GLIB_LIBS)
27
28 AC_ARG_ENABLE(more_warnings,
29        [AC_HELP_STRING([--enable-more-warnings],
30                [Add more warnings @<:@default=no@:>@])],
31        [enable_more_warnings="${enableval}"],
32        [enable_more_warnings=no]
33 )
34
35 if test x"$enable_more_warnings" = x"yes"; then
36   ADDITIONAL_FLAGS="-Wall -Wextra -Werror -Wno-missing-field-initializers -Wno-unused-parameter -Wmissing-declarations -Wredundant-decls -Wmissing-noreturn -Wpointer-arith -Wcast-align -Wwrite-strings -Werror=inline -Wformat-nonliteral -Wformat-security -Winit-self -Wmissing-include-dirs -Wundef -Waggregate-return -Wmissing-format-attribute -Wnested-externs -fno-strict-aliasing -fmessage-length=0 -Wp,-D_FORTIFY_SOURCE=2 -DG_DISABLE_DEPRECATED -DG_DISABLE_SINGLE_INCLUDES -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_SINGLE_INCLUDES -DGTK_DISABLE_DEPRECATED -DGTK_DISABLE_SINGLE_INCLUDES"
37 fi
38 AC_SUBST(ADDITIONAL_FLAGS)
39
40 dnl --enable-debug=(yes|minimum|no)
41 AC_ARG_ENABLE(debug, [  --enable-debug=[no/yes] turn on debugging [default=no]],,enable_debug=yes)
42 if test "$enable_debug" = "yes"; then
43   DEBUG_CFLAGS="-DG_ENABLE_DEBUG"
44 else
45   if test "x$enable_debug" = "xno"; then
46     DEBUG_CFLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS"
47   else
48     DEBUG_CFLAGS=""
49   fi
50 fi
51 AC_SUBST(DEBUG_CFLAGS)
52
53 dnl check for gtk-doc
54 m4_ifdef([GTK_DOC_CHECK], [
55 GTK_DOC_CHECK([1.14],[--flavour no-tmpl])
56 ],[
57 AM_CONDITIONAL([ENABLE_GTK_DOC], false)
58 ])
59
60 dnl Make version subfields for MENU_CACHE_CHECK_VERSION macro
61 ac_version_subst_str=`echo $VERSION | awk -F '.' '/.*/ { printf "MC_VERSION_MAJOR=%d MC_VERSION_MINOR=%d MC_VERSION_MICRO=%d", $1, $2, $3 }'`
62 eval ${ac_version_subst_str}
63 AC_SUBST(MC_VERSION_MAJOR)
64 AC_SUBST(MC_VERSION_MINOR)
65 AC_SUBST(MC_VERSION_MICRO)
66
67 AC_OUTPUT([
68 Makefile
69 libmenu-cache/Makefile
70 libmenu-cache/libmenu-cache.pc
71 libmenu-cache/libmenu-cache-uninstalled.pc
72 libmenu-cache/menu-cache.h
73 menu-cache-gen/Makefile
74 menu-cache-daemon/Makefile
75 docs/Makefile
76 docs/reference/Makefile
77 docs/reference/libmenu-cache/Makefile
78 ])