Setup GObject introspection
[platform/upstream/libgsignon-glib.git] / configure.ac
1 dnl Process this file with autoconf to produce a configure script.
2
3 AC_INIT(libsignon-glib, 1.1)
4
5 AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
6 AM_CONFIG_HEADER(config.h)
7
8 # Gobject Introspection
9 AC_CONFIG_MACRO_DIR([m4])
10 GOBJECT_INTROSPECTION_CHECK([1.30.0])
11
12 PKG_CHECK_MODULES(
13         DEPS,
14         glib-2.0
15         gobject-2.0
16         dbus-1
17         dbus-glib-1
18         signond);
19 AC_SUBST(DEPS_CFLAGS)
20 AC_SUBST(DEPS_LIBS)
21
22 PKG_CHECK_MODULES([CHECK], [check >= 0.9.4])
23
24 AC_ISC_POSIX
25 AC_PROG_CC
26 AM_PROG_CC_STDC
27 AC_HEADER_STDC
28 AC_PROG_LIBTOOL
29
30 GTK_DOC_CHECK([1.3])
31
32 AC_ARG_ENABLE(cast-checks,  [  --disable-cast-checks   compile with GLIB cast checks disabled],[cchecks=${enableval}],cchecks=yes)
33 if test "x$cchecks" = "xno"; then
34     CFLAGS="$CFLAGS -DG_DISABLE_CAST_CHECKS"
35 fi
36
37 AC_ARG_ENABLE(asserts,      [  --disable-asserts       compile with GLIB assertions disabled],[asserts=${enableval}],asserts=yes)
38 if test "x$asserts" = "xno"; then
39     CFLAGS="$CFLAGS -DG_DISABLE_ASSERTS"
40 fi
41
42 AC_ARG_ENABLE(checks,       [  --disable-checks        compile with GLIB checks disabled],[checks=${enableval}],checks=yes) 
43 if test "x$checks" = "xno"; then
44     CFLAGS="$CFLAGS -DG_DISABLE_CHECKS"
45 fi
46
47 AC_ARG_ENABLE(debug,     [  --enable-debug          enable printing of debug messages],[ddebug=${enableval}],ddebug=no)
48 if test "x$ddebug" != "xyes"; then
49     CFLAGS="$CFLAGS -DG_DEBUG_DISABLE"
50 fi
51
52 AC_ARG_ENABLE(coverage, [  --enable-coverage      compile with coverage info],[coverage=${enableval}],coverage=no)
53 if test "x$coverage" = "xyes"; then
54     CFLAGS="$CFLAGS -g -fprofile-arcs -ftest-coverage"
55 fi
56
57 PKG_CHECK_MODULES(DBUS, [dbus-1 >= 0.51, dbus-glib-1 >= 0.51], have_dbus=yes, have_dbus=no)
58 AC_SUBST(DBUS_CFLAGS)
59 AC_SUBST(DBUS_LIBS)
60
61 testdatadir=${datadir}/libsignon-glib1-test
62 AC_SUBST(testdatadir)
63
64 AC_CONFIG_FILES([tests/signon-glib-test.sh], [chmod +x tests/signon-glib-test.sh])
65
66 AC_OUTPUT([
67         Makefile
68         libsignon-glib/Makefile
69         libsignon-glib.pc
70         docs/Makefile
71         docs/reference/Makefile
72         tests/Makefile
73 ])