Add sections' names.
[tweakr] / configure.ac
1 AC_INIT(maemo-tweaks, 0.0.1)
2
3 AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
4 AM_CONFIG_HEADER(config.h)
5
6 AC_ISC_POSIX
7 AC_PROG_CC
8 AM_PROG_CC_STDC
9 AC_HEADER_STDC
10 AC_PROG_LIBTOOL
11
12 PKG_CHECK_MODULES(GLIB, glib-2.0)
13 AC_SUBST(GLIB_LIBS)
14 AC_SUBST(GLIB_CFLAGS)
15
16 PKG_CHECK_MODULES(GTK, gtk+-2.0)
17 AC_SUBST(GTK_LIBS)
18 AC_SUBST(GTK_CFLAGS)
19
20 PKG_CHECK_MODULES(HILDON, hildon-1)
21 AC_SUBST(HILDON_LIBS)
22 AC_SUBST(HILDON_CFLAGS)
23
24 PKG_CHECK_MODULES(OSSO, libosso)
25 AC_SUBST(OSSO_LIBS)
26 AC_SUBST(OSSO_CFLAGS)
27
28 AC_ARG_ENABLE(cast-checks,  [  --disable-cast-checks   compile with GLIB cast checks disabled],[cchecks=${enableval}],cchecks=yes)
29 if test "x$cchecks" = "xno"; then
30     CFLAGS="$CFLAGS -DG_DISABLE_CAST_CHECKS"
31 fi
32
33 AC_ARG_ENABLE(asserts,      [  --disable-asserts       compile with GLIB assertions disabled],[asserts=${enableval}],asserts=yes)
34 if test "x$asserts" = "xno"; then
35     CFLAGS="$CFLAGS -DG_DISABLE_ASSERTS"
36 fi
37
38 AC_ARG_ENABLE(checks,       [  --disable-checks        compile with GLIB checks disabled],[checks=${enableval}],checks=yes) 
39 if test "x$checks" = "xno"; then
40     CFLAGS="$CFLAGS -DG_DISABLE_CHECKS"
41 fi
42
43 AC_ARG_ENABLE(debug,     [  --enable-debug          enable printing of debug messages],[ddebug=${enableval}],ddebug=no)
44 if test "x$ddebug" != "xyes"; then
45     CFLAGS="$CFLAGS -DG_DEBUG_DISABLE"
46 fi
47
48 AC_ARG_ENABLE(coverage, [  --enable-coverage      compile with coverage info],[coverage=${enableval}],coverage=no)
49 if test "x$coverage" = "xyes"; then
50     CFLAGS="$CFLAGS -g -fprofile-arcs -ftest-coverage"
51 fi
52
53 AC_ARG_WITH(modules_dir, AS_HELP_STRING([--with-modules-dir=<path>],[Directory for storing maemo-tweaks modules]))
54 if test -z "$with_modules_dir" ; then
55     modulesdir=$libdir/maemo-tweaks/modules
56 else
57     modulesdir=$with_modules_dir
58 fi
59 AC_SUBST(modulesdir)
60
61 AC_OUTPUT([
62            Makefile
63            libmaemo-tweaks-section/Makefile
64            libmaemo-tweaks-section/maemo-tweaks-section.pc
65            modules/Makefile
66            ])
67