gmyth-dbus/configure.ac
author renatofilho
Fri Feb 15 13:52:23 2008 +0000 (2008-02-15)
branchtrunk
changeset 915 e612ba1d16ab
parent 908 46205cce5b8e
child 930 bb5d61b14d41
permissions -rw-r--r--
[svn r924] created method gmyth_upnp_get_devices
     1 #                                               -*- Autoconf -*-
     2 # Process this file with autoconf to produce a configure script.
     3 
     4 AC_PREREQ(2.50)
     5 
     6 AC_INIT([gmyth-dbus],[0.7])
     7 
     8 AC_CONFIG_MACRO_DIR([m4])
     9 AC_CONFIG_HEADER(config.h)
    10 
    11 dnl AM_MAINTAINER_MODE provides the option to enable maintainer mode
    12 AM_MAINTAINER_MODE
    13 dnl make aclocal work in maintainer mode
    14 AC_SUBST(ACLOCAL_AMFLAGS, "-I m4")
    15 
    16 AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
    17 
    18 # Checks for programs.
    19 # check for tools
    20 # Make sure CFLAGS is defined to stop AC_PROC_CC adding -g
    21 CFLAGS="$CFLAGS -Wall"
    22 AC_PROG_CC
    23 AC_PROG_LIBTOOL
    24 
    25 # Checks for libraries.
    26 
    27 # Checks for header files.
    28 AC_HEADER_STDC
    29 
    30 #Test if --disable-debug given
    31 AC_ARG_ENABLE(debug,
    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"
    35 else
    36     CFLAGS="$CFLAGS -O2 -DG_DISABLE_CHECKS"
    37 fi
    38 
    39 
    40 AS_AC_EXPAND(DATADIR, $datadir)
    41 
    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])
    45 
    46 
    47 # Checks required packages ####################################################
    48 ###############################################################################
    49 
    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])
    53 fi
    54 AC_SUBST(DBUS_BINDING_TOOL)
    55 
    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 !)
    59 fi
    60 
    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)
    64 fi
    65 AC_SUBST(DBUS_CFLAGS)
    66 AC_SUBST(DBUS_LIBS)
    67 
    68 PKG_CHECK_MODULES(GMYTH, gmyth >= 0.7, HAVE_GMYTH=yes, HAVE_GMYTH=no)
    69 if test "x$HAVE_GMYTH" = "xno"; then
    70   AC_MSG_ERROR(you need libgmyth-dev >= 0.7 installed)
    71 fi
    72 AC_SUBST(GMYTH_CFLAGS)
    73 AC_SUBST(GMYTH_LIBS)
    74 
    75 AC_SUBST(CFLAGS)
    76 AC_SUBST(LDFLAGS)
    77 AC_SUBST(LIBS)
    78 
    79 AC_OUTPUT([
    80 Makefile
    81 src/Makefile
    82 data/Makefile
    83 data/br.org.indt.GMyth.service
    84 ])
    85 
    86 if test "x$enable_debug" != "xno"; then
    87     AC_MSG_NOTICE([Debug: Enabled])
    88 else
    89     AC_MSG_NOTICE([Debug: Disabled])
    90 fi