Compile-time option for finger-friendly support
[maemopadplus.git] / configure.in
blobdc44f848528c2048fae775db992fc055130a11f6
1 AC_INIT(Makefile.am)
2 AM_INIT_AUTOMAKE(maemopadplus, 0.32-test2)
3 AM_CONFIG_HEADER(config.h)
5 AC_CANONICAL_HOST
7 AC_PROG_CC
8 AC_PROG_CPP
9 AC_PROG_INSTALL
10 AC_PROG_RANLIB
11 AC_PROG_LIBTOOL
12 AC_PROG_INTLTOOL([0.23])
13 AC_HEADER_STDC
15 # Option to enable debugging
16 AC_ARG_ENABLE(debug, 
17               [AC_HELP_STRING([  --enable-debug],[Debugging (default=no)])], 
18               [with_debug=yes], [with_debug=no])
20 if test "x$with_debug" == "xyes" ; then
21         CFLAGS="$CFLAGS -ggdb -O0 -DDEBUG -Wall -ansi -pedantic"
22 else
23 #       CFLAGS="$CFLAGS -O2 -Wall -ansi -pedantic"
24         CFLAGS="$CFLAGS -O2 -Wall -ansi"
27 # Hildon library dependencies
28 PKG_CHECK_MODULES(HILDON, hildon-1 >= 0.9.9 hildon-fm-2 libwpeditor-plus, \
29                   AC_DEFINE(HILDON, 1, [Version of hildon libraries]), \
30                   [AC_DEFINE(HILDON, 0, [Version of hildon libraries]) \
31                   PKG_CHECK_MODULES(HILDON, hildon-libs >= 0.12.0 hildon-fm libossohelp wpeditor)])
32 AC_SUBST(HILDON_CFLAGS)
33 AC_SUBST(HILDON_LIBS)
35 # Only used for the .service file path
36 PKG_CHECK_MODULES(DBUS, dbus-glib-1 >= 0.23.4)
38 # OSSO application framework dependencies
39 PKG_CHECK_MODULES(OSSO, osso-af-settings >= 0.8.5 libosso >= 0.9.17 gnome-vfs-2.0 >= 2.8.4.11 gnome-vfs-module-2.0 >= 2.8.4.11)
40 AC_SUBST(OSSO_LIBS)
41 AC_SUBST(OSSO_CFLAGS)
43 # libxml2
44 #PKG_CHECK_MODULES(XML2, libxml-2.0 >= 2.6.0)
45 #AC_SUBST(XML2_LIBS)
46 #AC_SUBST(XML2_CFLAGS)
48 # sqlite3
49 PKG_CHECK_MODULES(SQL3, sqlite3 >= 3.0)
50 AC_SUBST(SQL3_LIBS)
51 AC_SUBST(SQL3_CFLAGS)
53 # Localisation
54 GETTEXT_PACKAGE=$PACKAGE
55 AC_SUBST(GETTEXT_PACKAGE)
56 AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], "${GETTEXT_PACKAGE}", [Name of gettext package])
57 ALL_LINGUAS="en_GB fi_FI de_DE"
58 AM_GLIB_GNU_GETTEXT
60 # To make application visible in maemo Task Navigator it needs a Desktop
61 # file for the application.
62 # D-BUS service file is needed to be able to launch the maemo application
63 # and connect it to D-BUS services.
64 # The following line defines install directories for these files.
65 desktopentrydir=`$PKG_CONFIG osso-af-settings --variable=desktopentrydir`
66 serviceentrydir=/usr/share/dbus-1/services
68 # Application locale install directory
69 localedir=`$PKG_CONFIG osso-af-settings --variable=localedir`
71 # Application pixmaps install directory
72 pixmapdir=`$PKG_CONFIG osso-af-settings --variable=hildonpixmapdir`/$PACKAGE
74 # Application icon install directories
75 icon_26x26dir=$datadir/icons/hicolor/26x26/hildon
76 icon_34x34dir=$datadir/icons/hicolor/34x34/hildon
77 icon_40x40dir=$datadir/icons/hicolor/40x40/hildon
78 icon_50x50dir=$datadir/icons/hicolor/50x50/hildon
79 icon_scalabledir=$datadir/icons/hicolor/scalable/hildon
81 # Hildon control panel plugin install directories
82 pluginlibdir=`$PKG_CONFIG hildon-control-panel --variable=plugindir`
83 plugindesktopentrydir=`$PKG_CONFIG hildon-control-panel --variable=plugindesktopentrydir`
85 # Define as variables in Makefiles
86 AC_SUBST(desktopentrydir)
87 AC_SUBST(serviceentrydir)
88 AC_SUBST(localedir)
89 AC_SUBST(pixmapdir)
90 AC_SUBST(icon_26x26dir)
91 AC_SUBST(icon_34x34dir)
92 AC_SUBST(icon_40x40dir)
93 AC_SUBST(icon_50x50dir)
94 AC_SUBST(icon_scalabledir)
95 AC_SUBST(pluginlibdir)
96 AC_SUBST(plugindesktopentrydir)
98 # Application Installer uses alternative root prefix /var/lib/install
99 # where packages are installed. Build time and run time are different.
100 # Define runtime paths to applications in config.h.
101 #runtime_root=/var/lib/install
102 #runtime_localedir=$runtime_root$localedir
103 #runtime_pixmapdir=$runtime_root$pixmapdir
105 AC_DEFINE_UNQUOTED([LOCALEDIR], "${localedir}", [Locale catalog files path])
106 AC_DEFINE_UNQUOTED([PIXMAPDIR], "${pixmapdir}", [Pixmap files path])
108 # Produce output files
109 AC_OUTPUT(
110           Makefile \
111           src/Makefile \
112           data/Makefile \
113           po/Makefile.in \
114           po/Makefile