Include .service.in file for activation, and adapt the project
[mmediamanager.git] / configure.ac
blob842d1668fd59d7147be1c9e0be498ee6069e9741
1 # Copyright © 2008 Cosimo Cecchi <cosimoc@gnome.org>
3 # This program is free software; you can redistribute it and/or modify it
4 # under the terms of the GNU General Public License as published by the
5 # Free Software Foundation; either version 2 of the License, or (at your
6 # option) any later version.
8 # This program is distributed in the hope that it will be useful, but
9 # WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 # General Public License for more details.
13 # You should have received a copy of the GNU General Public License along
14 # with this program; if not, write to the Free Software Foundation, Inc.,
15 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
17 dnl Process this file with autoconf to produce a configure script.
19 AC_INIT(mmediamanager, 0.1.0)
21 AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
22 AM_CONFIG_HEADER(config.h)
23 AM_MAINTAINER_MODE
25 AC_ISC_POSIX
26 AC_PROG_CC
27 AM_PROG_CC_STDC
28 AC_HEADER_STDC
30 AC_PATH_PROG([GLIB_MKENUMS],[glib-mkenums])
31 AC_PATH_PROG([DBUS_BINDING_TOOL],[dbus-binding-tool],[no])
33 if test "$DBUS_BINDING_TOOL" = "no"; then
34         AC_MSG_ERROR([dbus-binding-tool not found])
37 AS_AC_EXPAND(DATADIR, $datadir)
38 DBUS_SERVICES_DIR="$DATADIR/dbus-1/services"
39 AC_SUBST(DBUS_SERVICES_DIR)
40 AC_DEFINE_UNQUOTED(DBUS_SERVICES_DIR, "$DBUS_SERVICES_DIR", [Where 
41 services dir for DBUS is])
43 dnl ***************************************************************************
44 dnl Internationalization
45 dnl ***************************************************************************
46 GETTEXT_PACKAGE=mmediamanager
47 AC_SUBST(GETTEXT_PACKAGE)
48 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [GETTEXT package name])
49 AM_GLIB_GNU_GETTEXT
50 IT_PROG_INTLTOOL([0.35.0])
52 AM_PROG_LIBTOOL
54 PKG_CHECK_MODULES(MMEDIAMANAGER, [glib-2.0
55                                   gthread-2.0
56                                   gio-unix-2.0 
57                                   gobject-2.0 
58                                   gmodule-2.0
59                                   dbus-glib-1
60                                   libxml-2.0
62 AC_SUBST(MMEDIAMANAGER_CFLAGS)
63 AC_SUBST(MMEDIAMANAGER_LIBS)
65 ########
66 # DBus
67 ########
69 PKG_CHECK_MODULES(DBUS, [dbus-glib-1
70                          gthread-2.0
72 AC_SUBST(DBUS_CFLAGS)
73 AC_SUBST(DBUS_LIBS)
75 ##################################################
76 # Check for gtk-doc.
77 ##################################################
78 AC_ARG_WITH(html-dir, [  --with-html-dir=PATH path to installed docs ])
79 if test "x$with_html_dir" = "x" ; then
80   HTML_DIR='${datadir}/gtk-doc/html'
81 else
82   HTML_DIR=$with_html_dir
84 AC_SUBST(HTML_DIR)
86 gtk_doc_min_version=1.0
87 AC_MSG_CHECKING([gtk-doc version >= $gtk_doc_min_version])
88 if pkg-config --atleast-version=$gtk_doc_min_version gtk-doc; then
89   AC_MSG_RESULT(yes)
90   GTKDOC=true
91 else
92   AC_MSG_RESULT(no)
93   GTKDOC=false
95 dnl Let people disable the gtk-doc stuff.
96 AC_ARG_ENABLE(gtk-doc,
97               [  --enable-gtk-doc  Use gtk-doc to build documentation [default=auto]],
98               enable_gtk_doc="$enableval", enable_gtk_doc=auto)
99 if test x$enable_gtk_doc = xauto ; then
100   if test x$GTKDOC = xtrue ; then
101     enable_gtk_doc=yes
102   else
103     enable_gtk_doc=no
104   fi
106 AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes)
109 AC_OUTPUT([
110 Makefile
111 data/Makefile
112 src/libmmanager.pc
113 src/Makefile
114 test/Makefile
115 test/clients/Makefile
116 po/Makefile.in