]> git.itanic.dy.fi Git - maemo-mapper/blob - configure.ac
Made administrative changes in preparation for release of Maemo Mapper
[maemo-mapper] / configure.ac
1 #
2 # Copyright (C) 2006, 2007 John Costigan.
3 #
4 # This file is part of Maemo Mapper.
5 #
6 # Maemo Mapper is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation, either version 3 of the License, or
9 # (at your option) any later version.
10 #
11 # Maemo Mapper is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 # GNU General Public License for more details.
15 #
16 # You should have received a copy of the GNU General Public License
17 # along with Maemo Mapper.  If not, see <http://www.gnu.org/licenses/>.
18 #
19
20 AC_INIT(Makefile.am)
21 AM_INIT_AUTOMAKE(maemo-mapper, 2.1.1)
22
23 AC_PROG_CPP
24 AC_CONFIG_HEADERS(src/config.h)
25 AC_PROG_INSTALL
26 AC_PROG_LIBTOOL
27
28 PKG_CHECK_MODULES(GTK, gtk+-2.0)
29 AC_SUBST(GTK_LIBS)
30 AC_SUBST(GTK_CFLAGS)
31
32 PKG_CHECK_MODULES(OSSO, libosso >= 1 libossohelp)
33 AC_SUBST(OSSO_LIBS)
34 AC_SUBST(OSSO_CFLAGS)
35
36 PKG_CHECK_MODULES(HILDON, hildon-libs >= 0.9.50 hildon-fm)
37 AC_SUBST(HILDON_LIBS)
38 AC_SUBST(HILDON_CFLAGS)
39
40 PKG_CHECK_MODULES(GNOME_VFS, gnome-vfs-2.0 >= 2.8.4.11 gnome-vfs-module-2.0 >= 2.8.4.11)
41 AC_SUBST(GNOME_VFS_LIBS)
42 AC_SUBST(GNOME_VFS_CFLAGS)
43
44 PKG_CHECK_MODULES(GCONF, gconf-2.0 >= 2.6.2)
45 AC_SUBST(GCONF_LIBS)
46 AC_SUBST(GCONF_CFLAGS)
47
48 PKG_CHECK_MODULES(LIBXML2, libxml-2.0 >= 2.6.16)
49 AC_SUBST(LIBXML2_LIBS)
50 AC_SUBST(LIBXML2_CFLAGS)
51
52 PKG_CHECK_MODULES(SQLITE, sqlite3)
53 AC_SUBST(SQLITE_LIBS)
54 AC_SUBST(SQLITE_CFLAGS)
55
56 PKG_CHECK_MODULES(CONIC, conic)
57 AC_SUBST(CONIC_LIBS)
58 AC_SUBST(CONIC_CFLAGS)
59
60 AC_CHECK_HEADER(gpsmgr.h, , AC_MSG_ERROR(gpsmgr.h not found. Please install libgpsmgr-dev.))
61 AC_CHECK_LIB(gpsmgr, gpsmgr_start, LIBS="$LIBS -lgpsmgr", AC_MSG_ERROR(libgpsmgr.so not found. Please install libgpsmgr.), -ldbus-glib-1 -ldbus-1 -lgobject-2.0 -lglib-2.0)
62
63 AC_CHECK_HEADER(gdbm.h, , AC_MSG_ERROR(gdbm.h not found. Please install libgdbm-dev.))
64 AC_CHECK_LIB(gdbm, gdbm_open, , AC_MSG_ERROR(libgdbm.so not found. Please install libgdbm.))
65
66
67 # Localisation
68 localedir=`$PKG_CONFIG osso-af-settings --variable=localedir`
69 AC_PROG_INTLTOOL([0.23])
70 GETTEXT_PACKAGE=$PACKAGE
71 AC_SUBST(GETTEXT_PACKAGE)
72 AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], "${GETTEXT_PACKAGE}", [Name of gettext package])
73 ALL_LINGUAS="en_US en_GB nl_NL it_IT bg_BG fi_FI"
74 AM_GLIB_GNU_GETTEXT
75
76
77 # To make application visible in maemo Task Navigator it needs a Desktop
78 # file for the application.
79 # D-BUS service file is needed to be able to launch the maemo application
80 # and connect it to D-BUS services.
81 # The following line defines install directories for these files.
82 desktopentrydir=`$PKG_CONFIG osso-af-settings --variable=desktopentrydir`
83 serviceentrydir=`$PKG_CONFIG osso-af-settings --variable=dbusservicedir`
84
85 # Application pixmaps install directory
86 pixmapdir=`$PKG_CONFIG osso-af-settings --variable=hildonpixmapdir`
87
88 # Application icon install directories
89 icon_26x26dir=$datadir/icons/hicolor/26x26/hildon
90 icon_34x34dir=$datadir/icons/hicolor/34x34/hildon
91 icon_40x40dir=$datadir/icons/hicolor/40x40/hildon
92 icon_50x50dir=$datadir/icons/hicolor/50x50/hildon
93 icon_scalabledir=$datadir/icons/hicolor/scalable/hildon
94
95 # Help file install directory
96 helpfile_enusdir=$datadir/osso-help/en_US
97 AC_SUBST(helpfile_enusdir)
98 helpfile_engbdir=$datadir/osso-help/en_GB
99 AC_SUBST(helpfile_engbdir)
100 helpfile_fifidir=$datadir/osso-help/fi_FI
101 AC_SUBST(helpfile_fifidir)
102
103 # Hildon control panel plugin install directories
104 pluginlibdir=`$PKG_CONFIG hildon-control-panel --variable=plugindir`
105 plugindesktopentrydir=`$PKG_CONFIG hildon-control-panel --variable=plugindesktopentrydir`
106
107 # Define as variables in Makefiles
108 AC_SUBST(desktopentrydir)
109 AC_SUBST(serviceentrydir)
110 AC_SUBST(localedir)
111 AC_SUBST(pixmapdir)
112 AC_SUBST(icon_26x26dir)
113 AC_SUBST(icon_34x34dir)
114 AC_SUBST(icon_40x40dir)
115 AC_SUBST(icon_50x50dir)
116 AC_SUBST(icon_scalabledir)
117 AC_SUBST(pluginlibdir)
118 AC_SUBST(plugindesktopentrydir)
119
120 AC_DEFINE_UNQUOTED([LOCALEDIR], "${localedir}", [Runtime locale catalog files path])
121 AC_DEFINE_UNQUOTED([PIXMAPDIR], "${pixmapdir}", [Runtime pixmap files path])
122
123 # Produce output files
124 AC_OUTPUT(
125           Makefile \
126           src/Makefile \
127           data/Makefile \
128           data/help/Makefile \
129           po/Makefile.in \
130           po/Makefile
131 )
132