2 # Process this file with autoconf to produce a configure script.
6 AC_INIT([myth-dbus],[0.1])
8 AC_CONFIG_MACRO_DIR([m4])
9 AC_CONFIG_HEADER(config.h)
11 dnl AM_MAINTAINER_MODE provides the option to enable maintainer mode
13 dnl make aclocal work in maintainer mode
14 AC_SUBST(ACLOCAL_AMFLAGS, "-I m4")
16 AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
18 # Checks for programs.
20 # Make sure CFLAGS is defined to stop AC_PROC_CC adding -g
21 CFLAGS="$CFLAGS -Wall"
25 # Checks for libraries.
27 # Checks for header files.
30 #Test if --disable-debug given
32 AC_HELP_STRING([--disable-debug], [enable debugging mode]))
33 if test x"$enable_debug" != xno; then
34 CFLAGS="$CFLAGS -g -DMYTH_STREAM_USE_DEBUG"
36 CFLAGS="$CFLAGS -O2 -DG_DISABLE_CHECKS"
40 AS_AC_EXPAND(DATADIR, $datadir)
42 DBUS_SERVICES_DIR="$DATADIR/dbus-1/services"
43 AC_SUBST(DBUS_SERVICES_DIR)
44 AC_DEFINE_UNQUOTED(DBUS_SERVICES_DIR, "$DBUS_SERVICES_DIR", [Where services dir for DBUS is])
47 # Checks required packages ####################################################
48 ###############################################################################
50 AC_PATH_PROG(DBUSBINDINGTOOL, dbus-binding-tool, no)
51 if test "x$DBUSBINDINGTOOL" = "xno"; then
52 AC_MSG_ERROR([dbus-binding-tool not found in your PATH. Please correct this])
54 AC_SUBST(DBUS_BINDING_TOOL)
56 AC_CHECK_PROG(HAVE_PKGCONFIG, pkg-config, yes, no)
57 if test "x$HAVE_PKGCONFIG" = "xno"; then
58 AC_MSG_ERROR(you need to have pkgconfig installed !)
61 PKG_CHECK_MODULES(DBUS, dbus-glib-1, HAVE_DBUS=yes, HAVE_DBUS=no)
62 if test "x$HAVE_DBUS" = "xno"; then
63 AC_MSG_ERROR(you need dbus-glib-1-dev installed)
68 PKG_CHECK_MODULES(GMYTH, gmyth, HAVE_GMYTH=yes, HAVE_GMYTH=no)
69 if test "x$HAVE_GMYTH" = "xno"; then
70 AC_MSG_ERROR(you need libgmyth-dev installed)
72 AC_SUBST(GMYTH_CFLAGS)
83 data/br.org.indt.GMyth.service
86 if test "x$enable_debug" != "xno"; then
87 AC_MSG_NOTICE([Debug: Enabled])
89 AC_MSG_NOTICE([Debug: Disabled])