3 AC_INIT([irreco], [0.8.10])
5 AM_CONFIG_HEADER(config.h)
11 AC_PROG_INTLTOOL([0.23])
18 AC_ARG_ENABLE([debug],
19 [AC_HELP_STRING([--enable-debug=ARG],
20 [Enable / disable debugging. Disabled by default])],
21 [enable_debug=$enableval],
23 AS_IF( [test "$enable_debug" != "yes"], [enable_debug=no])
24 AS_IF( [test "$enable_debug" = "yes"],
25 [CFLAGS="$CFLAGS -O0 -Wall -Werror -ggdb -DDEBUG"],
26 [CFLAGS="$CFLAGS -O0 -Wall -Werror"])
27 AC_SUBST(enable_debug)
29 # ^ Changed -ansi to -std=c99 to survive with libsoup2.4
30 # ^^ And removed -std=c99 -pedantic for x86 target compiling with libsoup2.4
34 # Pkg-config install option
37 [AC_HELP_STRING([--enable-dev=ARG],
38 [Install irreco backend dev files. Disabled by default])],
39 [enable_dev=$enableval],
41 AS_IF( [test "$enable_dev" != "yes"], [enable_dev=no])
43 AM_CONDITIONAL([IRRECO_DEV], [test x$enable_dev = xyes])
47 # Irreco Core dependencies
49 PKG_CHECK_MODULES(IRRECO_CORE, hildon-fm-2 hildon-1 gnome-vfs-2.0 libosso libsoup-2.4)
50 AC_SUBST(IRRECO_CORE_LIBS)
51 AC_SUBST(IRRECO_CORE_CFLAGS)
55 # Irreco Util dependencies
57 PKG_CHECK_MODULES(IRRECO_UTIL, gtk+-2.0)
58 AC_SUBST(IRRECO_UTIL_LIBS)
59 AC_SUBST(IRRECO_UTIL_CFLAGS)
63 # Irreco Webdb dependencies
65 PKG_CHECK_MODULES(IRRECO_WEBDB, gtk+-2.0 libsoup-2.4)
66 AC_SUBST(IRRECO_WEBDB_LIBS)
67 AC_SUBST(IRRECO_WEBDB_CFLAGS)
73 GETTEXT_PACKAGE=$PACKAGE
74 AC_SUBST(GETTEXT_PACKAGE)
75 AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], "${GETTEXT_PACKAGE}", \
76 [Name of gettext package])
82 # Application locale install directory
84 localedir=`$PKG_CONFIG osso-af-settings --variable=localedir`
86 AC_DEFINE_UNQUOTED([LOCALEDIR], "${localedir}", \
87 [Runtime locale catalog files path])
90 # To make application visible in maemo Task Navigator it needs a Desktop
91 # file for the application.
92 # D-BUS service file is needed to be able to launch the maemo application
93 # and connect it to D-BUS services.
94 # The following line defines install directories for these files.
95 #desktopentrydir=`$PKG_CONFIG osso-af-settings --variable=desktopentrydir`
96 #serviceentrydir=`$PKG_CONFIG osso-af-settings --variable=dbusservicedir`
97 #AC_SUBST(desktopentrydir)
98 #AC_SUBST(serviceentrydir)
104 AC_DEFINE_UNQUOTED([PACKAGE_DBUS_NAME], ["org.maemo." PACKAGE_NAME], [D-Bus name])
108 # Application pixmaps install directory
110 pixmapdir=`$PKG_CONFIG osso-af-settings --variable=hildonpixmapdir`
112 AC_DEFINE_UNQUOTED([PIXMAPDIR], "${pixmapdir}", [Runtime pixmap files path])
116 # Application icon install directories
118 icon_26x26dir=$datadir/icons/hicolor/26x26/hildon
119 icon_32x32dir=$datadir/icons/hicolor/32x32/hildon
120 icon_40x40dir=$datadir/icons/hicolor/40x40/hildon
121 icon_64x64dir=$datadir/icons/hicolor/64x64/hildon
122 icon_scalabledir=$datadir/icons/hicolor/scalable/hildon
123 AC_SUBST(icon_26x26dir)
124 AC_SUBST(icon_32x32dir)
125 AC_SUBST(icon_40x40dir)
126 AC_SUBST(icon_64x64dir)
127 AC_SUBST(icon_scalabledir)
133 irreco_icon=${prefix}/share/icons/hicolor/64x64/hildon/irreco.png
134 AC_SUBST(irreco_icon)
135 AC_DEFINE_UNQUOTED([IRRECO_ICON], "${irreco_icon}", \
140 # Button style install directory.
142 # It would be nicer to use '$libdir/irreco/buttons/', but due to the way
143 # autoconf expands variable name, that would lead to config.h having
144 # something like '$prefix/lib/irreco/buttons/'. So one must use use $prefix
146 # buttonstyledir_suffix=/lib/irreco/buttons/
147 # AC_SUBST(buttonstyledir_suffix)
148 # buttonstyledir=${prefix}${buttonstyledir_suffix}
149 # AC_SUBST(buttonstyledir)
150 # AC_DEFINE_UNQUOTED([IRRECO_BUTTON_STYLE_DIR], "${buttonstyledir}", \
151 # [Button style directory])
154 # Theme install directory.
156 # It would be nicer to use '$libdir/irreco/themes/', but due to the way
157 # autoconf expands variable name, that would lead to config.h having
158 # something like '$prefix/lib/irreco/themes/'. So one must use use $prefix
160 themedir_suffix=/lib/irreco/themes/
161 AC_SUBST(themedir_suffix)
162 themedir=${prefix}${themedir_suffix}
164 AC_DEFINE_UNQUOTED([IRRECO_THEME_DIR], "${themedir}", \
167 buttonstyledir_suffix=/lib/irreco/buttonnames/
168 AC_SUBST(buttonstyledir_suffix)
169 buttonstyledir=${prefix}${buttonstyledir_suffix}
170 AC_SUBST(buttonstyledir)
171 AC_DEFINE_UNQUOTED([BUTTONLIST], "${buttonstyledir}", \
172 [Buttonlist directory])
174 # Backend install directory.
176 irrecobackenddir_suffix=/lib/irreco/backends/
177 irrecobackenddir=${prefix}${irrecobackenddir_suffix}
178 AC_SUBST(irrecobackenddir)
179 AC_SUBST(irrecobackenddir_suffix)
180 AC_DEFINE_UNQUOTED([IRRECO_BACKEND_DIR], "${irrecobackenddir}", \
185 # Image style install directories.
187 irreco_image_dir=$prefix/lib/irreco/images
188 irreco_bg_image_dir=$prefix/lib/irreco/images/bg
189 irreco_icon_hardkeydir=${prefix}/lib/irreco/images/icon/hardkeys
190 irreco_default_bg_image="Irreco Logo.png"
191 AC_SUBST(irreco_image_dir)
192 AC_SUBST(irreco_bg_image_dir)
193 AC_SUBST(irreco_icon_hardkeydir)
194 AC_SUBST(irreco_default_bg_image)
195 AC_DEFINE_UNQUOTED([IRRECO_IMAGE_DIR], "${irreco_image_dir}", \
196 [Irreco Image directory])
197 AC_DEFINE_UNQUOTED([IRRECO_BG_IMAGE_DIR], "${irreco_bg_image_dir}", \
198 [Irreco background image directory])
199 AC_DEFINE_UNQUOTED([IRRECO_DEFAULT_BG_IMAGE], "${irreco_default_bg_image}", \
200 [Default irreco background image])
201 AC_DEFINE_UNQUOTED([IRRECO_ICON_HARDKEY_DIR], "${irreco_icon_hardkeydir}", \
202 [Hardkey icon directory])
207 irreco_header_dir_suffix=/irreco
208 irreco_header_dir=${includedir}${irreco_header_dir_suffix}
209 AC_SUBST(irreco_header_dir)
210 AC_SUBST(irreco_header_dir_suffix)
215 AC_ARG_WITH([database],
216 [AS_HELP_STRING([--with-database=DIR],
217 [Location of Webdb database])],
218 [irreco_webdb_url=$withval],
219 [irreco_webdb_url="http://mercury.wipsl.com/irreco/webdb/"])
220 AC_DEFINE_UNQUOTED([IRRECO_WEBDB_URL], "${irreco_webdb_url}", \
221 [Webdb database url])
226 irreco_app_name_short="Irreco"
227 irreco_app_name_long="Ir Remote Controller"
228 irreco_app_name_conbined="Irreco - Ir Remote Controller"
229 AC_SUBST(irreco_app_name_short)
230 AC_SUBST(irreco_app_name_long)
231 AC_SUBST(irreco_app_name_conbined)
232 AC_DEFINE_UNQUOTED([IRRECO_APP_NAME_SHORT], "${irreco_app_name_short}", \
233 [Irreco applicatio name])
234 AC_DEFINE_UNQUOTED([IRRECO_APP_NAME_LONG], "${irreco_app_name_long}", \
235 [Irreco applicatio name])
236 AC_DEFINE_UNQUOTED([IRRECO_APP_NAME_CONBINED], "${irreco_app_name_conbined}", \
237 [Irreco applicatio name])
241 # Produce output files
246 data/images/Makefile \
247 data/images/bg/Makefile \
248 data/icons/Makefile \
249 data/icons/hardkeys/Makefile \
250 data/irreco.desktop \
251 data/org.maemo.irreco.service \
253 data/irreco-util.pc \