3e8e7c76f1cb3d413d0c5729f33900ce3728c1a7
[maemo-recorder] / configure.ac
1 AC_INIT(Makefile.am)
2 AM_INIT_AUTOMAKE(maemo-recorder, 0.2.0)
3
4 AC_PROG_CPP
5 AC_PROG_INSTALL
6 AC_PROG_LIBTOOL
7
8 GETTEXT_PACKAGE="$PACKAGE"
9 AC_SUBST(GETTEXT_PACKAGE)
10 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Define gettext package])
11
12 AM_GLIB_GNU_GETTEXT
13
14 dnl Debugging options to enable debug macros
15 DEBUG_FLAGS=
16 AC_ARG_ENABLE(debug,     [  --enable-debug                compile with DEBUG],,enable_debug=no)
17 AC_ARG_ENABLE(stdout,    [  --enable-stdout               compile with DEBUG to stdout],,enable_stdout=no)
18
19 if test "x$enable_debug" = "xyes"; then
20     DEBUG_FLAGS="$DEBUG_FLAGS -DDEBUG -g -fno-omit-frame-pointer"
21 else
22     DEBUG_FLAGS="$DEBUG_FLAGS -DG_DISABLE_CHECKS -DG_DISABLE_CAST_CHECKS -DG_DISABLE_ASSERT"
23 fi
24 if test "x$enable_stdout" = "xyes"; then
25     DEBUG_FLAGS="$DEBUG_FLAGS -DOSSOLOG_STDOUT"
26 fi
27
28 CFLAGS="$CFLAGS $DEBUG_FLAGS -Wall -std=c99 -Wmissing-prototypes -Wmissing-declarations"
29
30 dnl Set LOCALEDIR 
31 if test "x${prefix}" = "xNONE"; then
32         AC_DEFINE_UNQUOTED([LOCALEDIR], ["${ac_default_prefix}/${DATADIRNAME}/locale"],[Locale directory])
33 else
34         AC_DEFINE_UNQUOTED([LOCALEDIR], ["${prefix}/${DATADIRNAME}/locale"], [Locale directory])
35 fi
36
37 PKG_CHECK_MODULES(GTK, gtk+-2.0)
38 AC_SUBST(GTK_LIBS)
39 AC_SUBST(GTK_CFLAGS)
40
41 PKG_CHECK_MODULES(OSSO, libosso >= 0.8.4)
42 AC_SUBST(OSSO_LIBS)
43 AC_SUBST(OSSO_CFLAGS)
44
45 PKG_CHECK_MODULES(GCONF, gconf-2.0 >= 2.6)
46 AC_SUBST(GCONF_CFLAGS)
47 AC_SUBST(GCONF_LIBS)
48
49 PKG_CHECK_MODULES(HILDON_LGPL, hildon-1)
50 AC_SUBST(HILDON_LGPL_LIBS)
51 AC_SUBST(HILDON_LGPL_CFLAGS)
52
53 PKG_CHECK_MODULES(HILDON_HELP, hildon-help)
54 AC_SUBST(HILDON_HELP_LIBS)
55 AC_SUBST(HILDON_HELP_CFLAGS)
56
57 PKG_CHECK_MODULES(HILDON_FM, hildon-fm-2)
58 AC_SUBST(HILDON_FM_LIBS)
59 AC_SUBST(HILDON_FM_CFLAGS)
60
61 PKG_CHECK_MODULES(GSTREAMER, gstreamer-0.10)
62 AC_SUBST(GSTREAMER_LIBS)
63 AC_SUBST(GSTREAMER_CFLAGS)
64
65 PKG_CHECK_MODULES(GNOME_VFS, gnome-vfs-2.0)
66 AC_SUBST(GNOME_VFS_LIBS)
67 AC_SUBST(GNOME_VFS_CFLAGS)
68
69 PKG_CHECK_MODULES(OSSO_EMAIL, libossoemailinterface)
70 AC_SUBST(OSSO_EMAIL_LIBS)
71 AC_SUBST(OSSO_EMAIL_CFLAGS)
72
73 dnl MIME-type registration
74 AC_PATH_PROG(UPDATE_MIME_DATABASE, update-mime-database, no)
75 AM_CONDITIONAL(HAVE_26_MIME, test x$UPDATE_MIME_DATABASE != xno)
76
77 AC_PATH_PROG(UPDATE_DESKTOP_DATABASE, update-desktop-database, no)
78 AM_CONDITIONAL(HAVE_28_MIME, test x$UPDATE_DESKTOP_DATABASE != xno)
79
80 #AC_PATH_PROG(OSSO_UPDATE_MIME, osso-update-category-database, no)
81 #if test x"$OSSO_UPDATE_MIME" = xno; then
82 #       AC_MSG_ERROR([osso-update-category-database not found in your paths - should be installed with osso-update-category-database package])
83 #fi
84 #AC_SUBST(OSSO_UPDATE_MIME)
85
86
87 AC_OUTPUT([ Makefile \
88             src/Makefile \
89             mime/Makefile \
90             data/Makefile ])
91