1 AC_INIT(publish-position, 0.1)
3 AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
4 AM_CONFIG_HEADER(config.h)
12 PKG_CHECK_MODULES(TELEPATHY_GLIB, telepathy-glib)
13 AC_SUBST(TELEPATHY_GLIB_LIBS)
14 AC_SUBST(TELEPATHY_GLIB_CFLAGS)
16 PKG_CHECK_MODULES(GTK, gtk+-2.0)
20 PKG_CHECK_MODULES(LOCATION, liblocation)
21 AC_SUBST(LOCATION_LIBS)
22 AC_SUBST(LOCATION_CFLAGS)
24 PKG_CHECK_MODULES(HILDON, hildon-1)
26 AC_SUBST(HILDON_CFLAGS)
29 GETTEXT_PACKAGE=publish-position
30 AC_SUBST(GETTEXT_PACKAGE)
31 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "${GETTEXT_PACKAGE}", [gettext package])
33 ERROR_CFLAGS="-Wall -Wno-missing-field-initializers -Wno-unused-parameter -Wdeclaration-after-statement -Wshadow -Wmissing-prototypes -Wmissing-declarations"
36 AC_HELP_STRING([--disable-Werror],[compile without -Werror (normally enabled in development builds)]),
37 werror=$enableval, werror=yes)
39 if test "x$werror" = "xyes"; then
40 ERROR_CFLAGS="$ERROR_CFLAGS -Werror"
43 AC_SUBST(ERROR_CFLAGS)
45 GLIB_GENMARSHAL=`$PKG_CONFIG glib-2.0 --variable=glib_genmarshal`
46 AC_SUBST(GLIB_GENMARSHAL)
48 servicedir=`$PKG_CONFIG dbus-1 --variable=session_bus_services_dir`
51 AC_CHECK_PROGS([XSLTPROC], [xsltproc])
52 if test -z "$XSLTPROC"; then
53 AC_MSG_ERROR([xsltproc (from libxslt) is required])
56 HILDON_HOME_DESKTOP_DIR=`pkg-config libhildondesktop-1 --variable=hildonstatusmenudesktopentrydir`
57 AC_SUBST(HILDON_HOME_DESKTOP_DIR)
59 HILDON_DESKTOP_LIB_DIR=`pkg-config libhildondesktop-1 --variable=hildondesktoplibdir`
60 AC_SUBST(HILDON_DESKTOP_LIB_DIR)
62 AC_ARG_ENABLE(cast-checks, [ --disable-cast-checks compile with GLIB cast checks disabled],[cchecks=${enableval}],cchecks=yes)
63 if test "x$cchecks" = "xno"; then
64 CFLAGS="$CFLAGS -DG_DISABLE_CAST_CHECKS"
67 AC_ARG_ENABLE(asserts, [ --disable-asserts compile with GLIB assertions disabled],[asserts=${enableval}],asserts=yes)
68 if test "x$asserts" = "xno"; then
69 CFLAGS="$CFLAGS -DG_DISABLE_ASSERTS"
72 AC_ARG_ENABLE(checks, [ --disable-checks compile with GLIB checks disabled],[checks=${enableval}],checks=yes)
73 if test "x$checks" = "xno"; then
74 CFLAGS="$CFLAGS -DG_DISABLE_CHECKS"
77 AC_ARG_ENABLE(debug, [ --enable-debug enable printing of debug messages],[ddebug=${enableval}],ddebug=no)
78 if test "x$ddebug" != "xyes"; then
79 CFLAGS="$CFLAGS -DG_DEBUG_DISABLE"