]> err.no Git - mapper/blob - configure.ac
Import fork of maemo-mapper.
[mapper] / configure.ac
1 #
2 # This file is part of maemo-mapper
3 #
4 # Copyright (C) 2006 John Costigan.
5 #
6 # This program 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 2 of the License, or
9 # (at your option) any later version.
10 #
11 # This program 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 along
17 # with this program; if not, write to the Free Software Foundation, Inc.,
18 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 #
20
21 AC_INIT(Makefile.am)
22 AM_INIT_AUTOMAKE(mapper, 1.0.0)
23
24 AC_PROG_CPP
25 AC_CONFIG_HEADERS(src/config.h)
26 AC_PROG_INSTALL
27 AC_PROG_LIBTOOL
28
29 PKG_CHECK_MODULES(GTK, gtk+-2.0)
30 AC_SUBST(GTK_LIBS)
31 AC_SUBST(GTK_CFLAGS)
32
33 dnl Ckeck for hildon-libs
34 PKG_CHECK_MODULES(HILDON, hildon-libs libosso, HAVE_HILDON=yes, HAVE_HILDON=no)
35
36 if test "x$HAVE_HILDON" = "xyes"; then
37   AC_DEFINE(WITH_HILDON, 1, [build with Maemo/Hildon user interface])
38 else
39   AC_MSG_RESULT(no)
40 fi
41
42 AM_CONDITIONAL(WITH_HILDON, test "x$HAVE_HILDON" = "xyes")
43
44 dnl make HILDON_CFLAGS and HILDON_LIBS available
45 if test "x$HAVE_HILDON" = "xyes"; then
46  AC_SUBST(HILDON_CFLAGS)
47  AC_SUBST(HILDON_LIBS)
48
49  PKG_CHECK_MODULES(OSSO, libosso >= 1 libossohelp osso-ic)
50  AC_SUBST(OSSO_LIBS)
51  AC_SUBST(OSSO_CFLAGS)
52
53  PKG_CHECK_MODULES(HILDON, hildon-libs >= 0.9.50 hildon-fm)
54  AC_SUBST(HILDON_LIBS)
55  AC_SUBST(HILDON_CFLAGS)
56 else
57  PKG_CHECK_MODULES(BLUEZ, bluez)
58  AC_SUBST(BLUEZ_LIBS)
59  AC_SUBST(BLUEZ_CFLAGS)
60 fi
61
62 PKG_CHECK_MODULES(GNOME_VFS, gnome-vfs-2.0 >= 2.8.4.11 gnome-vfs-module-2.0 >= 2.8.4.11)
63 AC_SUBST(GNOME_VFS_LIBS)
64 AC_SUBST(GNOME_VFS_CFLAGS)
65
66 PKG_CHECK_MODULES(GCONF, gconf-2.0 >= 2.6.2)
67 AC_SUBST(GCONF_LIBS)
68 AC_SUBST(GCONF_CFLAGS)
69
70 PKG_CHECK_MODULES(LIBXML2, libxml-2.0 >= 2.6.16)
71 AC_SUBST(LIBXML2_LIBS)
72 AC_SUBST(LIBXML2_CFLAGS)
73
74 PKG_CHECK_MODULES(DBUS_GLIB, dbus-glib-1)
75 AC_SUBST(DBUS_GLIB_LIBS)
76 AC_SUBST(DBUS_GLIB_CFLAGS)
77
78 PKG_CHECK_MODULES(LIBCURL, libcurl)
79 AC_SUBST(LIBCURL_LIBS)
80 AC_SUBST(LIBCURL_CFLAGS)
81
82 PKG_CHECK_MODULES(SQLITE, sqlite3)
83 AC_SUBST(SQLITE_LIBS)
84 AC_SUBST(SQLITE_CFLAGS)
85
86 # Localisation
87 if test "x$HAVE_HILDON" = "xyes"; then
88  localedir=`$PKG_CONFIG osso-af-settings --variable=localedir`
89 else
90  localedir=
91 fi
92 AC_PROG_INTLTOOL([0.23])
93 GETTEXT_PACKAGE=$PACKAGE
94 AC_SUBST(GETTEXT_PACKAGE)
95 AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], "${GETTEXT_PACKAGE}", [Name of gettext package])
96 ALL_LINGUAS="en_US en_GB nl_NL it_IT bg_BG fi_FI"
97 AM_GLIB_GNU_GETTEXT
98
99 if test "x$HAVE_HILDON" = "xyes"; then
100 # To make application visible in maemo Task Navigator it needs a Desktop
101 # file for the application.
102 # D-BUS service file is needed to be able to launch the maemo application
103 # and connect it to D-BUS services.
104 # The following line defines install directories for these files.
105  desktopentrydir=`$PKG_CONFIG osso-af-settings --variable=desktopentrydir`
106  serviceentrydir=`$PKG_CONFIG osso-af-settings --variable=dbusservicedir`
107
108 # Application pixmaps install directory
109  pixmapdir=`$PKG_CONFIG osso-af-settings --variable=hildonpixmapdir`
110
111 # Help file install directory
112  helpfile_engbdir=$datadir/osso-help/en_US
113
114 # Hildon control panel plugin install directories
115  pluginlibdir=`$PKG_CONFIG hildon-control-panel --variable=plugindir`
116  plugindesktopentrydir=`$PKG_CONFIG hildon-control-panel --variable=plugindesktopentrydir`
117
118 else
119  desktopentrydir=
120  serviceentrydir=
121  pixmapdir=
122  pluginlibdir=
123  plugindesktopentrydir=
124 fi
125
126 # Application icon install directories
127 icon_26x26dir=$datadir/icons/hicolor/26x26/hildon
128 icon_34x34dir=$datadir/icons/hicolor/34x34/hildon
129 icon_40x40dir=$datadir/icons/hicolor/40x40/hildon
130 icon_50x50dir=$datadir/icons/hicolor/50x50/hildon
131 icon_scalabledir=$datadir/icons/hicolor/scalable/hildon
132
133 # Help file install directory
134 helpfile_enusdir=$datadir/osso-help/en_US
135 AC_SUBST(helpfile_enusdir)
136 helpfile_engbdir=$datadir/osso-help/en_GB
137 AC_SUBST(helpfile_engbdir)
138
139 # Define as variables in Makefiles
140 AC_SUBST(desktopentrydir)
141 AC_SUBST(serviceentrydir)
142 AC_SUBST(localedir)
143 AC_SUBST(pixmapdir)
144 AC_SUBST(icon_26x26dir)
145 AC_SUBST(icon_34x34dir)
146 AC_SUBST(icon_40x40dir)
147 AC_SUBST(icon_50x50dir)
148 AC_SUBST(icon_scalabledir)
149 AC_SUBST(pluginlibdir)
150 AC_SUBST(plugindesktopentrydir)
151
152 AC_DEFINE_UNQUOTED([LOCALEDIR], "${localedir}", [Runtime locale catalog files path])
153 AC_DEFINE_UNQUOTED([PIXMAPDIR], "${pixmapdir}", [Runtime pixmap files path])
154
155 # Produce output files
156 AC_OUTPUT(
157           Makefile \
158           src/Makefile \
159           data/Makefile \
160           data/help/Makefile \
161           po/Makefile.in \
162           po/Makefile
163 )
164