myth-dbus/configure.ac
branchtrunk
changeset 865 3eeb6b565018
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/myth-dbus/configure.ac	Wed Oct 24 20:01:02 2007 +0100
     1.3 @@ -0,0 +1,90 @@
     1.4 +#                                               -*- Autoconf -*-
     1.5 +# Process this file with autoconf to produce a configure script.
     1.6 +
     1.7 +AC_PREREQ(2.50)
     1.8 +
     1.9 +AC_INIT([myth-dbus],[0.1])
    1.10 +
    1.11 +AC_CONFIG_MACRO_DIR([m4])
    1.12 +AC_CONFIG_HEADER(config.h)
    1.13 +
    1.14 +dnl AM_MAINTAINER_MODE provides the option to enable maintainer mode
    1.15 +AM_MAINTAINER_MODE
    1.16 +dnl make aclocal work in maintainer mode
    1.17 +AC_SUBST(ACLOCAL_AMFLAGS, "-I m4")
    1.18 +
    1.19 +AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
    1.20 +
    1.21 +# Checks for programs.
    1.22 +# check for tools
    1.23 +# Make sure CFLAGS is defined to stop AC_PROC_CC adding -g
    1.24 +CFLAGS="$CFLAGS -Wall"
    1.25 +AC_PROG_CC
    1.26 +AC_PROG_LIBTOOL
    1.27 +
    1.28 +# Checks for libraries.
    1.29 +
    1.30 +# Checks for header files.
    1.31 +AC_HEADER_STDC
    1.32 +
    1.33 +#Test if --disable-debug given
    1.34 +AC_ARG_ENABLE(debug,
    1.35 +    AC_HELP_STRING([--disable-debug], [enable debugging mode]))
    1.36 +if test x"$enable_debug" != xno; then
    1.37 +    CFLAGS="$CFLAGS -g -DMYTH_STREAM_USE_DEBUG"
    1.38 +else
    1.39 +    CFLAGS="$CFLAGS -O2 -DG_DISABLE_CHECKS"
    1.40 +fi
    1.41 +
    1.42 +
    1.43 +AS_AC_EXPAND(DATADIR, $datadir)
    1.44 +
    1.45 +DBUS_SERVICES_DIR="$DATADIR/dbus-1/services"
    1.46 +AC_SUBST(DBUS_SERVICES_DIR)
    1.47 +AC_DEFINE_UNQUOTED(DBUS_SERVICES_DIR, "$DBUS_SERVICES_DIR", [Where services dir for DBUS is])
    1.48 +
    1.49 +
    1.50 +# Checks required packages ####################################################
    1.51 +###############################################################################
    1.52 +
    1.53 +AC_PATH_PROG(DBUSBINDINGTOOL, dbus-binding-tool, no)
    1.54 +if test "x$DBUSBINDINGTOOL" = "xno"; then
    1.55 +    AC_MSG_ERROR([dbus-binding-tool not found in your PATH. Please correct this])
    1.56 +fi
    1.57 +AC_SUBST(DBUS_BINDING_TOOL)
    1.58 +
    1.59 +AC_CHECK_PROG(HAVE_PKGCONFIG, pkg-config, yes, no)
    1.60 +if test "x$HAVE_PKGCONFIG" = "xno"; then
    1.61 +  AC_MSG_ERROR(you need to have pkgconfig installed !)
    1.62 +fi
    1.63 +
    1.64 +PKG_CHECK_MODULES(DBUS, dbus-glib-1, HAVE_DBUS=yes, HAVE_DBUS=no)
    1.65 +if test "x$HAVE_DBUS" = "xno"; then
    1.66 +  AC_MSG_ERROR(you need dbus-glib-1-dev installed)
    1.67 +fi
    1.68 +AC_SUBST(DBUS_CFLAGS)
    1.69 +AC_SUBST(DBUS_LIBS)
    1.70 +
    1.71 +PKG_CHECK_MODULES(GMYTH, gmyth, HAVE_GMYTH=yes, HAVE_GMYTH=no)
    1.72 +if test "x$HAVE_GMYTH" = "xno"; then
    1.73 +  AC_MSG_ERROR(you need libgmyth-dev installed)
    1.74 +fi
    1.75 +AC_SUBST(GMYTH_CFLAGS)
    1.76 +AC_SUBST(GMYTH_LIBS)
    1.77 +
    1.78 +AC_SUBST(CFLAGS)
    1.79 +AC_SUBST(LDFLAGS)
    1.80 +AC_SUBST(LIBS)
    1.81 +
    1.82 +AC_OUTPUT([
    1.83 +Makefile
    1.84 +src/Makefile
    1.85 +data/Makefile
    1.86 +data/br.org.indt.GMyth.service
    1.87 +])
    1.88 +
    1.89 +if test "x$enable_debug" != "xno"; then
    1.90 +    AC_MSG_NOTICE([Debug: Enabled])
    1.91 +else
    1.92 +    AC_MSG_NOTICE([Debug: Disabled])
    1.93 +fi