summaryrefslogtreecommitdiff
path: root/configure.ac
blob: 839a4b467ab55206b5316b043eaf4e9b7865a8e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
AC_INIT(monorail, 0.3)

AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
AM_CONFIG_HEADER(config.h)

AC_ISC_POSIX
AC_PROG_CC
AM_PROG_CC_STDC
AC_HEADER_STDC
AC_PROG_LIBTOOL

PKG_CHECK_MODULES(TELEPATHY_GLIB, telepathy-glib)
AC_SUBST(TELEPATHY_GLIB_LIBS)
AC_SUBST(TELEPATHY_GLIB_CFLAGS)

PKG_CHECK_MODULES(GIO, gio-2.0 gio-unix-2.0)
AC_SUBST(GIO_LIBS)
AC_SUBST(GIO_CFLAGS)

PKG_CHECK_MODULES(GTK, gtk+-2.0)
AC_SUBST(GTK_LIBS)
AC_SUBST(GTK_CFLAGS)

PKG_CHECK_MODULES(GLIB, gthread-2.0)
AC_SUBST(GLIB_LIBS)
AC_SUBST(GLIB_CFLAGS)

PKG_CHECK_MODULES(HILDON, hildon-1)
AC_SUBST(HILDON_LIBS)
AC_SUBST(HILDON_CFLAGS)

PKG_CHECK_MODULES(ABOOK, libosso-abook-1.0 >= 4.20100302)
AC_SUBST(ABOOK_LIBS)
AC_SUBST(ABOOK_CFLAGS)

PKG_CHECK_MODULES(UNIQUE, unique-1.0)
AC_SUBST(UNIQUE_LIBS)
AC_SUBST(UNIQUE_CFLAGS)

PKG_CHECK_MODULES(HILDON_DESKTOP, libhildondesktop-1)
AC_SUBST(UNIQUE_LIBS)
AC_SUBST(UNIQUE_CFLAGS)

PKG_CHECK_MODULES(SHARING, libsharing)
AC_SUBST(SHARING_LIBS)
AC_SUBST(SHARING_CFLAGS)

dnl Localization
GETTEXT_PACKAGE=monorail
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "${GETTEXT_PACKAGE}", [gettext package])

ERROR_CFLAGS="-Wall -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -Wdeclaration-after-statement -Wshadow -Wmissing-prototypes -Wmissing-declarations"

AC_ARG_ENABLE(Werror,
  AC_HELP_STRING([--disable-Werror],[compile without -Werror (normally enabled in development builds)]),
    werror=$enableval, werror=yes)

if test "x$werror" = "xyes"; then
   ERROR_CFLAGS="$ERROR_CFLAGS -Werror"
fi

AC_SUBST(ERROR_CFLAGS)

GLIB_GENMARSHAL=`$PKG_CONFIG glib-2.0 --variable=glib_genmarshal`
AC_SUBST(GLIB_GENMARSHAL)

servicedir=`$PKG_CONFIG dbus-1 --variable=session_bus_services_dir`
AC_SUBST(servicedir)

sharingservicesdir=`$PKG_CONFIG libsharing --variable=servicesdir`
AC_SUBST(sharingservicesdir)

sharingpluginsdir=`$PKG_CONFIG libsharing --variable=pluginsdir`
AC_SUBST(sharingpluginsdir)

AC_CHECK_PROGS([XSLTPROC], [xsltproc])
if test -z "$XSLTPROC"; then
  AC_MSG_ERROR([xsltproc (from libxslt) is required])
fi

HILDON_HOME_DESKTOP_DIR=`pkg-config libhildondesktop-1 --variable=hildonstatusmenudesktopentrydir`
AC_SUBST(HILDON_HOME_DESKTOP_DIR)

HILDON_DESKTOP_LIB_DIR=`pkg-config libhildondesktop-1 --variable=hildondesktoplibdir`
AC_SUBST(HILDON_DESKTOP_LIB_DIR)

AC_ARG_ENABLE(cast-checks,  [  --disable-cast-checks   compile with GLIB cast checks disabled],[cchecks=${enableval}],cchecks=yes)
if test "x$cchecks" = "xno"; then
    CFLAGS="$CFLAGS -DG_DISABLE_CAST_CHECKS"
fi

AC_ARG_ENABLE(asserts,      [  --disable-asserts       compile with GLIB assertions disabled],[asserts=${enableval}],asserts=yes)
if test "x$asserts" = "xno"; then
    CFLAGS="$CFLAGS -DG_DISABLE_ASSERTS"
fi

AC_ARG_ENABLE(checks,       [  --disable-checks        compile with GLIB checks disabled],[checks=${enableval}],checks=yes)
if test "x$checks" = "xno"; then
    CFLAGS="$CFLAGS -DG_DISABLE_CHECKS"
fi

AC_ARG_ENABLE(debug,     [  --enable-debug          enable printing of debug messages],[ddebug=${enableval}],ddebug=no)
if test "x$ddebug" != "xyes"; then
    CFLAGS="$CFLAGS -DG_DEBUG_DISABLE"
fi

AC_OUTPUT([
	Makefile
	src/Makefile
	tools/Makefile
	extensions/Makefile
	status/Makefile
	sharing/Makefile
	sharing-dialog/Makefile
	data/Makefile
	abook-funsharing/Makefile
])