Version 0.27
[accounts-sso:accounts-glib.git] / configure.ac
1 dnl Process this file with autoconf to produce a configure script.
2
3 AC_INIT(libaccounts-glib, 0.27)
4
5 AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
6 AM_CONFIG_HEADER(config.h)
7
8 PKG_CHECK_MODULES(
9         LIBACCOUNTS,
10         dbus-1
11         dbus-glib-1
12         glib-2.0
13         gobject-2.0
14         libxml-2.0
15         sqlite3);
16 AC_SUBST(LIBACCOUNTS_CFLAGS)
17 AC_SUBST(LIBACCOUNTS_LIBS)
18
19 PKG_CHECK_MODULES([CHECK], [check >= 0.9.4])
20
21 AC_ISC_POSIX
22 AC_PROG_CC
23 AM_PROG_CC_STDC
24 AC_HEADER_STDC
25 AC_PROG_LIBTOOL
26
27 GTK_DOC_CHECK([1.3])
28
29 SERVICE_FILES_DIR="accounts/services"
30 AC_SUBST(SERVICE_FILES_DIR)
31 AC_DEFINE_UNQUOTED(SERVICE_FILES_DIR, "$SERVICE_FILES_DIR",
32                    [Directory for storing service files])
33
34 PROVIDER_FILES_DIR="accounts/providers"
35 AC_SUBST(PROVIDER_FILES_DIR)
36 AC_DEFINE_UNQUOTED(PROVIDER_FILES_DIR, "$PROVIDER_FILES_DIR",
37                    [Directory for storing provider files])
38
39 AC_ARG_ENABLE(cast-checks,  [  --disable-cast-checks   compile with GLIB cast checks disabled],[cchecks=${enableval}],cchecks=yes)
40 if test "x$cchecks" = "xno"; then
41     CFLAGS="$CFLAGS -DG_DISABLE_CAST_CHECKS"
42 fi
43
44 AC_ARG_ENABLE(asserts,      [  --disable-asserts       compile with GLIB assertions disabled],[asserts=${enableval}],asserts=yes)
45 if test "x$asserts" = "xno"; then
46     CFLAGS="$CFLAGS -DG_DISABLE_ASSERTS"
47 fi
48
49 AC_ARG_ENABLE(checks,       [  --disable-checks        compile with GLIB checks disabled],[checks=${enableval}],checks=yes) 
50 if test "x$checks" = "xno"; then
51     CFLAGS="$CFLAGS -DG_DISABLE_CHECKS"
52 fi
53
54 AC_ARG_ENABLE(debug,     [  --enable-debug          enable printing of debug messages],[ddebug=${enableval}],ddebug=no)
55 if test "x$ddebug" != "xyes"; then
56     CFLAGS="$CFLAGS -DG_DEBUG_DISABLE"
57 fi
58
59 AC_ARG_ENABLE(coverage, [  --enable-coverage      compile with coverage info],[coverage=${enableval}],coverage=no)
60 if test "x$coverage" = "xyes"; then
61     CFLAGS="$CFLAGS -g -fprofile-arcs -ftest-coverage"
62 fi
63
64 testdatadir=${datadir}/libaccounts-glib0-test
65 AC_SUBST(testdatadir)
66
67 AC_CONFIG_FILES([tests/accounts-glib-test.sh], [chmod +x tests/accounts-glib-test.sh])
68
69 AC_OUTPUT([
70         Makefile
71         libaccounts-glib/Makefile
72         libaccounts-glib.pc
73         docs/Makefile
74         docs/reference/Makefile
75         tests/Makefile
76 ])