Version 0.24
[accounts-sso:signon-glib.git] / configure.ac
1 dnl Process this file with autoconf to produce a configure script.
2
3 AC_INIT(libsignon-glib, 0.24)
4
5 AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
6 AM_CONFIG_HEADER(config.h)
7
8 PKG_CHECK_MODULES(
9         DEPS,
10         glib-2.0
11         gobject-2.0
12         dbus-1
13         dbus-glib-1
14         signond
15         libsignoncrypto-qt);
16 AC_SUBST(DEPS_CFLAGS)
17 AC_SUBST(DEPS_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 AM_CONDITIONAL(GENERATE_DOCS, [test x"$NO_DOCS" != xyes])
30
31 AC_ARG_ENABLE(cast-checks,  [  --disable-cast-checks   compile with GLIB cast checks disabled],[cchecks=${enableval}],cchecks=yes)
32 if test "x$cchecks" = "xno"; then
33     CFLAGS="$CFLAGS -DG_DISABLE_CAST_CHECKS"
34 fi
35
36 AC_ARG_ENABLE(asserts,      [  --disable-asserts       compile with GLIB assertions disabled],[asserts=${enableval}],asserts=yes)
37 if test "x$asserts" = "xno"; then
38     CFLAGS="$CFLAGS -DG_DISABLE_ASSERTS"
39 fi
40
41 AC_ARG_ENABLE(checks,       [  --disable-checks        compile with GLIB checks disabled],[checks=${enableval}],checks=yes) 
42 if test "x$checks" = "xno"; then
43     CFLAGS="$CFLAGS -DG_DISABLE_CHECKS"
44 fi
45
46 AC_ARG_ENABLE(debug,     [  --enable-debug          enable printing of debug messages],[ddebug=${enableval}],ddebug=no)
47 if test "x$ddebug" != "xyes"; then
48     CFLAGS="$CFLAGS -DG_DEBUG_DISABLE"
49 fi
50
51 AC_ARG_ENABLE(coverage, [  --enable-coverage      compile with coverage info],[coverage=${enableval}],coverage=no)
52 if test "x$coverage" = "xyes"; then
53     CFLAGS="$CFLAGS -g -fprofile-arcs -ftest-coverage"
54 fi
55
56 PKG_CHECK_MODULES(DBUS, [dbus-1 >= 0.51, dbus-glib-1 >= 0.51], have_dbus=yes, have_dbus=no)
57 AC_SUBST(DBUS_CFLAGS)
58 AC_SUBST(DBUS_LIBS)
59
60 testdatadir=${datadir}/libsignon-glib1-test
61 AC_SUBST(testdatadir)
62
63 AC_CONFIG_FILES([tests/signon-glib-test.sh], [chmod +x tests/signon-glib-test.sh])
64
65 AC_OUTPUT([
66         Makefile
67         libsignon-glib/Makefile
68         libsignon-glib.pc
69         docs/Makefile
70         docs/reference/Makefile
71         tests/Makefile
72 ])