changed versio nro.
[irreco.git] / irreco / configure.ac
blob031f26a41e833f29d6324be9112f7c9ba978fe56
3 AC_INIT([irreco], [0.6.9.4])
4 AM_INIT_AUTOMAKE
5 AM_CONFIG_HEADER(config.h)
6 AC_CANONICAL_HOST
7 AC_PROG_CC
8 AC_PROG_CPP
9 AC_PROG_INSTALL
10 AC_PROG_LIBTOOL
11 AC_PROG_INTLTOOL([0.23])
12 AC_HEADER_STDC
16 # Debug option
18 AC_ARG_ENABLE([debug],
19         [AC_HELP_STRING([--enable-debug=ARG],
20         [Enable / disable debugging. Disabled by default])],
21         [enable_debug=$enableval],
22         [enable_debug=no])
23 AS_IF(  [test "$enable_debug" != "yes"], [enable_debug=no])
24 AS_IF(  [test "$enable_debug" = "yes"],
25         [CFLAGS="$CFLAGS -O0 -Wall -Werror -ansi -pedantic -ggdb -DDEBUG"],
26         [CFLAGS="$CFLAGS -O0 -Wall -Werror -ansi -pedantic"])
27 AC_SUBST(enable_debug)
31 # Pkg-config install option
33 AC_ARG_ENABLE([dev],
34         [AC_HELP_STRING([--enable-dev=ARG],
35         [Install irreco backend dev files. Disabled by default])],
36         [enable_dev=$enableval],
37         [enable_dev=no])
38 AS_IF(  [test "$enable_dev" != "yes"], [enable_dev=no])
39 AC_SUBST(enable_dev)
40 AM_CONDITIONAL([IRRECO_DEV], [test x$enable_dev = xyes])
44 # Irreco Core dependencies
46 PKG_CHECK_MODULES(IRRECO_CORE, hildon-fm-2 hildon-1 gnome-vfs-2.0 libosso libsoup-2.2)
47 AC_SUBST(IRRECO_CORE_LIBS)
48 AC_SUBST(IRRECO_CORE_CFLAGS)
52 # Irreco Util dependencies
54 PKG_CHECK_MODULES(IRRECO_UTIL, gtk+-2.0)
55 AC_SUBST(IRRECO_UTIL_LIBS)
56 AC_SUBST(IRRECO_UTIL_CFLAGS)
60 # Irreco Webdb dependencies
62 PKG_CHECK_MODULES(IRRECO_WEBDB, gtk+-2.0 libsoup-2.2)
63 AC_SUBST(IRRECO_WEBDB_LIBS)
64 AC_SUBST(IRRECO_WEBDB_CFLAGS)
68 # Localisation
70 GETTEXT_PACKAGE=$PACKAGE
71 AC_SUBST(GETTEXT_PACKAGE)
72 AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], "${GETTEXT_PACKAGE}", \
73                    [Name of gettext package])
74 ALL_LINGUAS="en_GB"
75 AM_GLIB_GNU_GETTEXT
79 # Application locale install directory
81 localedir=`$PKG_CONFIG osso-af-settings --variable=localedir`
82 AC_SUBST(localedir)
83 AC_DEFINE_UNQUOTED([LOCALEDIR], "${localedir}", \
84                    [Runtime locale catalog files path])
87 # To make application visible in maemo Task Navigator it needs a Desktop
88 # file for the application.
89 # D-BUS service file is needed to be able to launch the maemo application
90 # and connect it to D-BUS services.
91 # The following line defines install directories for these files.
92 #desktopentrydir=`$PKG_CONFIG osso-af-settings --variable=desktopentrydir`
93 #serviceentrydir=`$PKG_CONFIG osso-af-settings --variable=dbusservicedir`
94 #AC_SUBST(desktopentrydir)
95 #AC_SUBST(serviceentrydir)
99 # D-Bus name
101 AC_DEFINE_UNQUOTED([PACKAGE_DBUS_NAME], ["org.maemo." PACKAGE_NAME], [D-Bus name])
105 # Application pixmaps install directory
107 pixmapdir=`$PKG_CONFIG osso-af-settings --variable=hildonpixmapdir`
108 AC_SUBST(pixmapdir)
109 AC_DEFINE_UNQUOTED([PIXMAPDIR], "${pixmapdir}", [Runtime pixmap files path])
113 # Application icon install directories
115 icon_26x26dir=$datadir/icons/hicolor/26x26/hildon
116 icon_32x32dir=$datadir/icons/hicolor/32x32/hildon
117 icon_40x40dir=$datadir/icons/hicolor/40x40/hildon
118 icon_64x64dir=$datadir/icons/hicolor/64x64/hildon
119 icon_scalabledir=$datadir/icons/hicolor/scalable/hildon
120 AC_SUBST(icon_26x26dir)
121 AC_SUBST(icon_32x32dir)
122 AC_SUBST(icon_40x40dir)
123 AC_SUBST(icon_64x64dir)
124 AC_SUBST(icon_scalabledir)
128 # Irreco icon.
130 irreco_icon=${prefix}/share/icons/hicolor/64x64/hildon/irreco.png
131 AC_SUBST(irreco_icon)
132 AC_DEFINE_UNQUOTED([IRRECO_ICON], "${irreco_icon}", \
133                    [Irreco icon.])
137 # Button style install directory.
139 # It would be nicer to use '$libdir/irreco/buttons/', but due to the way
140 # autoconf expands variable name, that would lead to config.h having
141 # something like '$prefix/lib/irreco/buttons/'. So one must use use $prefix
142 # directly.
143 # buttonstyledir_suffix=/lib/irreco/buttons/
144 # AC_SUBST(buttonstyledir_suffix)
145 # buttonstyledir=${prefix}${buttonstyledir_suffix}
146 # AC_SUBST(buttonstyledir)
147 # AC_DEFINE_UNQUOTED([IRRECO_BUTTON_STYLE_DIR], "${buttonstyledir}", \
148 #                  [Button style directory])
151 # Theme install directory.
153 # It would be nicer to use '$libdir/irreco/themes/', but due to the way
154 # autoconf expands variable name, that would lead to config.h having
155 # something like '$prefix/lib/irreco/themes/'. So one must use use $prefix
156 # directly.
157 themedir_suffix=/lib/irreco/themes/
158 AC_SUBST(themedir_suffix)
159 themedir=${prefix}${themedir_suffix}
160 AC_SUBST(themedir)
161 AC_DEFINE_UNQUOTED([IRRECO_THEME_DIR], "${themedir}", \
162                    [Theme directory])
164 buttonstyledir_suffix=/lib/irreco/buttonnames/
165 AC_SUBST(buttonstyledir_suffix)
166 buttonstyledir=${prefix}${buttonstyledir_suffix}
167 AC_SUBST(buttonstyledir)
168 AC_DEFINE_UNQUOTED([BUTTONLIST], "${buttonstyledir}", \
169                    [Buttonlist directory])
171 # Backend install directory.
173 irrecobackenddir_suffix=/lib/irreco/backends/
174 irrecobackenddir=${prefix}${irrecobackenddir_suffix}
175 AC_SUBST(irrecobackenddir)
176 AC_SUBST(irrecobackenddir_suffix)
177 AC_DEFINE_UNQUOTED([IRRECO_BACKEND_DIR], "${irrecobackenddir}", \
178                    [Backend Directory])
182 # Image style install directories.
184 irreco_image_dir=$prefix/lib/irreco/images
185 irreco_bg_image_dir=$prefix/lib/irreco/images/bg
186 irreco_icon_hardkeydir=${prefix}/lib/irreco/images/icon/hardkeys
187 irreco_default_bg_image="Irreco Logo.png"
188 AC_SUBST(irreco_image_dir)
189 AC_SUBST(irreco_bg_image_dir)
190 AC_SUBST(irreco_icon_hardkeydir)
191 AC_SUBST(irreco_default_bg_image)
192 AC_DEFINE_UNQUOTED([IRRECO_IMAGE_DIR], "${irreco_image_dir}", \
193                    [Irreco Image directory])
194 AC_DEFINE_UNQUOTED([IRRECO_BG_IMAGE_DIR], "${irreco_bg_image_dir}", \
195                    [Irreco background image directory])
196 AC_DEFINE_UNQUOTED([IRRECO_DEFAULT_BG_IMAGE], "${irreco_default_bg_image}", \
197                    [Default irreco background image])
198 AC_DEFINE_UNQUOTED([IRRECO_ICON_HARDKEY_DIR], "${irreco_icon_hardkeydir}", \
199                    [Hardkey icon directory])
202 # Irreco header dir
204 irreco_header_dir_suffix=/irreco
205 irreco_header_dir=${includedir}${irreco_header_dir_suffix}
206 AC_SUBST(irreco_header_dir)
207 AC_SUBST(irreco_header_dir_suffix)
210 # Webdb database
212 AC_ARG_WITH([database],
213         [AS_HELP_STRING([--with-database=DIR],
214         [Location of Webdb database])],
215         [irreco_webdb_url=$withval],
216         [irreco_webdb_url="http://mercury.wipsl.com/irreco/webdb/"])
217 AC_DEFINE_UNQUOTED([IRRECO_WEBDB_URL], "${irreco_webdb_url}", \
218                    [Webdb database url])
221 # Irreco app name
223 irreco_app_name_short="Irreco"
224 irreco_app_name_long="Ir Remote Controller"
225 irreco_app_name_conbined="Irreco - Ir Remote Controller"
226 AC_SUBST(irreco_app_name_short)
227 AC_SUBST(irreco_app_name_long)
228 AC_SUBST(irreco_app_name_conbined)
229 AC_DEFINE_UNQUOTED([IRRECO_APP_NAME_SHORT], "${irreco_app_name_short}", \
230                    [Irreco applicatio name])
231 AC_DEFINE_UNQUOTED([IRRECO_APP_NAME_LONG], "${irreco_app_name_long}", \
232                    [Irreco applicatio name])
233 AC_DEFINE_UNQUOTED([IRRECO_APP_NAME_CONBINED], "${irreco_app_name_conbined}", \
234                    [Irreco applicatio name])
238 # Produce output files
240 AC_OUTPUT(                              \
241         Makefile                        \
242         data/Makefile                   \
243         data/images/Makefile            \
244         data/images/bg/Makefile         \
245         data/icons/Makefile             \
246         data/icons/hardkeys/Makefile    \
247         data/irreco.desktop             \
248         data/org.maemo.irreco.service   \
249         data/irreco.pc                  \
250         data/irreco-util.pc             \
251         po/Makefile.in                  \
252         po/Makefile                     \
253         src/Makefile                    \
254         src/util/Makefile               \
255         src/webdb/Makefile              \
256         src/core/Makefile               \
257         src/api/Makefile