diff -r 000000000000 -r 3eeb6b565018 myth-dbus/configure.ac --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/myth-dbus/configure.ac Wed Oct 24 20:01:02 2007 +0100 @@ -0,0 +1,90 @@ +# -*- Autoconf -*- +# Process this file with autoconf to produce a configure script. + +AC_PREREQ(2.50) + +AC_INIT([myth-dbus],[0.1]) + +AC_CONFIG_MACRO_DIR([m4]) +AC_CONFIG_HEADER(config.h) + +dnl AM_MAINTAINER_MODE provides the option to enable maintainer mode +AM_MAINTAINER_MODE +dnl make aclocal work in maintainer mode +AC_SUBST(ACLOCAL_AMFLAGS, "-I m4") + +AM_INIT_AUTOMAKE($PACKAGE, $VERSION) + +# Checks for programs. +# check for tools +# Make sure CFLAGS is defined to stop AC_PROC_CC adding -g +CFLAGS="$CFLAGS -Wall" +AC_PROG_CC +AC_PROG_LIBTOOL + +# Checks for libraries. + +# Checks for header files. +AC_HEADER_STDC + +#Test if --disable-debug given +AC_ARG_ENABLE(debug, + AC_HELP_STRING([--disable-debug], [enable debugging mode])) +if test x"$enable_debug" != xno; then + CFLAGS="$CFLAGS -g -DMYTH_STREAM_USE_DEBUG" +else + CFLAGS="$CFLAGS -O2 -DG_DISABLE_CHECKS" +fi + + +AS_AC_EXPAND(DATADIR, $datadir) + +DBUS_SERVICES_DIR="$DATADIR/dbus-1/services" +AC_SUBST(DBUS_SERVICES_DIR) +AC_DEFINE_UNQUOTED(DBUS_SERVICES_DIR, "$DBUS_SERVICES_DIR", [Where services dir for DBUS is]) + + +# Checks required packages #################################################### +############################################################################### + +AC_PATH_PROG(DBUSBINDINGTOOL, dbus-binding-tool, no) +if test "x$DBUSBINDINGTOOL" = "xno"; then + AC_MSG_ERROR([dbus-binding-tool not found in your PATH. Please correct this]) +fi +AC_SUBST(DBUS_BINDING_TOOL) + +AC_CHECK_PROG(HAVE_PKGCONFIG, pkg-config, yes, no) +if test "x$HAVE_PKGCONFIG" = "xno"; then + AC_MSG_ERROR(you need to have pkgconfig installed !) +fi + +PKG_CHECK_MODULES(DBUS, dbus-glib-1, HAVE_DBUS=yes, HAVE_DBUS=no) +if test "x$HAVE_DBUS" = "xno"; then + AC_MSG_ERROR(you need dbus-glib-1-dev installed) +fi +AC_SUBST(DBUS_CFLAGS) +AC_SUBST(DBUS_LIBS) + +PKG_CHECK_MODULES(GMYTH, gmyth, HAVE_GMYTH=yes, HAVE_GMYTH=no) +if test "x$HAVE_GMYTH" = "xno"; then + AC_MSG_ERROR(you need libgmyth-dev installed) +fi +AC_SUBST(GMYTH_CFLAGS) +AC_SUBST(GMYTH_LIBS) + +AC_SUBST(CFLAGS) +AC_SUBST(LDFLAGS) +AC_SUBST(LIBS) + +AC_OUTPUT([ +Makefile +src/Makefile +data/Makefile +data/br.org.indt.GMyth.service +]) + +if test "x$enable_debug" != "xno"; then + AC_MSG_NOTICE([Debug: Enabled]) +else + AC_MSG_NOTICE([Debug: Disabled]) +fi