Merge branch 'master' of ssh://pege77@mercury.wipsl.com/var/git/irreco
[irreco.git] / irreco / configure.ac
blobdca5cb48161f831d36b76f674ce31c546658862a
3 AC_INIT([irreco], [0.6.5.1])
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 -O2 -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
78
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)
98
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])
166 # Backend install directory.
168 irrecobackenddir_suffix=/lib/irreco/backends/
169 irrecobackenddir=${prefix}${irrecobackenddir_suffix}
170 AC_SUBST(irrecobackenddir)
171 AC_SUBST(irrecobackenddir_suffix)
172 AC_DEFINE_UNQUOTED([IRRECO_BACKEND_DIR], "${irrecobackenddir}", \
173                    [Backend Directory])
177 # Image style install directories.
179 irreco_image_dir=$prefix/lib/irreco/images
180 irreco_bg_image_dir=$prefix/lib/irreco/images/bg
181 irreco_icon_hardkeydir=${prefix}/lib/irreco/images/icon/hardkeys
182 irreco_default_bg_image="Irreco Logo.png"
183 AC_SUBST(irreco_image_dir)
184 AC_SUBST(irreco_bg_image_dir)
185 AC_SUBST(irreco_icon_hardkeydir)
186 AC_SUBST(irreco_default_bg_image)
187 AC_DEFINE_UNQUOTED([IRRECO_IMAGE_DIR], "${irreco_image_dir}", \
188                    [Irreco Image directory])
189 AC_DEFINE_UNQUOTED([IRRECO_BG_IMAGE_DIR], "${irreco_bg_image_dir}", \
190                    [Irreco background image directory])
191 AC_DEFINE_UNQUOTED([IRRECO_DEFAULT_BG_IMAGE], "${irreco_default_bg_image}", \
192                    [Default irreco background image])
193 AC_DEFINE_UNQUOTED([IRRECO_ICON_HARDKEY_DIR], "${irreco_icon_hardkeydir}", \
194                    [Hardkey icon directory])
197 # Irreco header dir
199 irreco_header_dir_suffix=/irreco
200 irreco_header_dir=${includedir}${irreco_header_dir_suffix}
201 AC_SUBST(irreco_header_dir)
202 AC_SUBST(irreco_header_dir_suffix)
205 # Webdb database
207 AC_ARG_WITH([database],
208         [AS_HELP_STRING([--with-database=DIR],
209         [Location of Webdb database])],
210         [irreco_webdb_url=$withval],
211         [irreco_webdb_url="http://mercury.wipsl.com/irreco/webdb/"])
212 AC_DEFINE_UNQUOTED([IRRECO_WEBDB_URL], "${irreco_webdb_url}", \
213                    [Webdb database url])
216 # Irreco app name
218 irreco_app_name_short="Irreco"
219 irreco_app_name_long="Ir Remote Controller"
220 irreco_app_name_conbined="Irreco - Ir Remote Controller"
221 AC_SUBST(irreco_app_name_short)
222 AC_SUBST(irreco_app_name_long)
223 AC_SUBST(irreco_app_name_conbined)
224 AC_DEFINE_UNQUOTED([IRRECO_APP_NAME_SHORT], "${irreco_app_name_short}", \
225                    [Irreco applicatio name])
226 AC_DEFINE_UNQUOTED([IRRECO_APP_NAME_LONG], "${irreco_app_name_long}", \
227                    [Irreco applicatio name])
228 AC_DEFINE_UNQUOTED([IRRECO_APP_NAME_CONBINED], "${irreco_app_name_conbined}", \
229                    [Irreco applicatio name])
233 # Produce output files
235 AC_OUTPUT(                              \
236         Makefile                        \
237         data/Makefile                   \
238         data/images/Makefile            \
239         data/images/bg/Makefile         \
240         data/icons/Makefile             \
241         data/icons/hardkeys/Makefile    \
242         data/irreco.desktop             \
243         data/org.maemo.irreco.service   \
244         data/irreco.pc                  \
245         data/irreco-util.pc             \
246         po/Makefile.in                  \
247         po/Makefile                     \
248         src/Makefile                    \
249         src/util/Makefile               \
250         src/webdb/Makefile              \
251         src/core/Makefile               \
252         src/api/Makefile