1 dnl Process this file with autoconf to produce a configure script.
3 AC_INIT([libgsignon-glib],
5 [http://code.google.com/p/accounts-sso/issues/entry],
7 [http://code.google.com/p/accounts-sso/])
9 AC_CONFIG_AUX_DIR([build-aux])
10 AC_CONFIG_HEADERS([config.h])
11 AC_CONFIG_SRCDIR([libgsignon-glib.pc.in])
12 AC_CONFIG_MACRO_DIR([m4])
14 AM_INIT_AUTOMAKE([1.11 nostdinc silent-rules subdir-objects tar-pax -Wno-portability])
21 if test "x$ifGNUmake" = "x#" ; then
22 AC_MSG_ERROR("GNUmake is required")
26 LT_INIT([disable-static])
28 # Gobject Introspection
29 GOBJECT_INTROSPECTION_CHECK([1.30.0])
41 AC_ARG_ENABLE(dbus-type,
42 [ --enable-dbus-type=dbus-type specify daemon dbus type:
43 p2p(default): uses peer to peer dbus
44 session: uses session message bus
45 system: uses system message bus],
46 [enable_dbus_type=$enableval], [enable_dbus_type=p2p])
48 echo "----------------------"
49 echo " DBUS TYPE : '$enable_dbus_type'"
50 echo "-----------------------"
51 if test "x$enable_dbus_type" = "xp2p" ; then
52 AC_DEFINE(USE_P2P, [1], [Use peer to peer dbus])
53 AC_DEFINE(SIGNOND_BUS_ADDRESS, ["unix:path=%s/gsignond/bus-sock"], [signond daemon server socket address])
54 elif test "x$enable_dbus_type" = "xsession" ; then
55 AC_DEFINE(SIGNOND_BUS_TYPE, [G_BUS_TYPE_SESSION], [Use session bus])
58 PKG_CHECK_MODULES(GTestDBus, glib-2.0 >= 2.34, [gtestdbus=yes], [gtestdbus=no])
59 if test "x$gtestdbus" = xyes; then
60 AC_DEFINE(HAVE_GTESTDBUS, [1], [Define if GTestDBus exists.])
62 AC_DEFINE(HAVE_GTESTDBUS, [0], [GTestDBus does not exist.])
64 elif test "x$enable_dbus_type" = "xsystem" ; then
65 AC_DEFINE(SIGNOND_BUS_TYPE, [G_BUS_TYPE_SYSTEM], [Use system bus])
67 if test "x$enable_dbus_type" != "xp2p" ; then
68 DBUS_INTERFACES_DIR="`pkg-config --variable interfaces_dir dbus-1`"
71 AM_CONDITIONAL(HAVE_GTESTDBUS, [test x$gtestdbus = xyes])
73 CHECK_REQUIRED="check >= 0.9.4"
75 AC_ARG_ENABLE([tests],
76 [AS_HELP_STRING([--disable-tests], [build with testing support disabled])])
78 AS_IF([test "x$enable_tests" != "xno"],
79 [PKG_CHECK_EXISTS([$CHECK_REQUIRED], [have_check=yes], [have_check=no])],
82 AS_IF([test "x$have_check" = "xyes"],
83 [PKG_CHECK_MODULES([CHECK], [$CHECK_REQUIRED])
84 AC_SUBST([CHECK_CFLAGS])
85 AC_SUBST([CHECK_LIBS])],
86 [AS_IF([test "x$enable_tests" = "xyes"],
87 [AC_MSG_ERROR([tests enabled but required dependencies were not found])])])
89 AM_CONDITIONAL([ENABLE_TESTS], [test "x$have_check" = "xyes"])
91 m4_ifdef([GTK_DOC_CHECK], [
92 GTK_DOC_CHECK([1.14],[--flavour no-tmpl])
94 AM_CONDITIONAL([ENABLE_GTK_DOC], false)
97 AC_ARG_ENABLE([cast-checks],
98 [AS_HELP_STRING([--disable-cast-checks], [compile with GLib cast checks disabled])])
99 AS_IF([test "x$enable_cast_checks" = "xno"],
100 [CFLAGS="$CFLAGS -DG_DISABLE_CAST_CHECKS"])
102 AC_ARG_ENABLE([asserts],
103 [AS_HELP_STRING([--disable-asserts], [compile with GLib assertions disabled])])
104 AS_IF([test "x$enable_asserts" = "xno"],
105 [CFLAGS="$CFLAGS -DG_DISABLE_ASSERTS"])
107 AC_ARG_ENABLE([checks],
108 [AS_HELP_STRING([--disable-checks], [compile with GLib checks disabled])])
109 AS_IF([test "x$checks" = "xno"],
110 [CFLAGS="$CFLAGS -DG_DISABLE_CHECKS"])
112 AC_ARG_ENABLE([debug],
113 [AS_HELP_STRING([--enable-debug], [enable printing of debug messages])])
114 AS_IF([test "x$enable_debug" = "xyes"],
115 [CFLAGS="$CFLAGS -DENABLE_DEBUG"])
117 AC_ARG_ENABLE([coverage],
118 [AS_HELP_STRING([--enable-coverage], [compile with coverage info])])
119 AS_IF([test "x$enable_coverage" = "xyes"],
120 [CFLAGS="$CFLAGS -g -fprofile-arcs -ftest-coverage"])
123 PYGOBJECT_REQUIRED=2.90
125 AC_ARG_ENABLE([python],
126 [AS_HELP_STRING([--enable-python], [Build with python support])])
128 AS_IF([test "x$enable_python" != "xno"],
129 [PKG_CHECK_EXISTS([pygobject-3.0 >= $PYGOBJECT_REQUIRED],
130 [have_python=yes], [have_python=no])])
132 AS_IF([test "x$have_python" = "xyes"],
134 AC_SUBST([pyoverridesdir], [`$PYTHON -c "import gi;print (gi._overridesdir)" 2>/dev/null`])])
136 AM_CONDITIONAL([ENABLE_PYTHON], [test "x$have_python" = "xyes"])
140 libgsignon-glib/Makefile
143 docs/reference/Makefile
144 docs/reference/version.xml