File: configure.ac

package info (click to toggle)
dates 0.4.8-3
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 3,072 kB
  • sloc: sh: 10,234; ansic: 10,012; makefile: 120
file content (116 lines) | stat: -rw-r--r-- 2,924 bytes parent folder | download | duplicates (2)
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
AC_PREREQ(2.53)
AC_INIT(Dates, 0.4.8, http://www.pimlico-project.org/)
AM_INIT_AUTOMAKE()
AC_CONFIG_SRCDIR(src/dates_main.c)
AM_CONFIG_HEADER(src/config.h)

AC_ISC_POSIX
AC_PROG_CC
AC_PROG_CC_STDC
AC_STDC_HEADERS
AC_PROG_LIBTOOL
IT_PROG_INTLTOOL([0.35.0])

dnl I18n support
GETTEXT_PACKAGE=AC_PACKAGE_NAME
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Gettext package])
AC_SUBST(GETTEXT_PACKAGE)
AM_GLIB_GNU_GETTEXT

PKG_CHECK_MODULES(DATES, glib-2.0 gtk+-2.0 libecal-1.2 gconf-2.0)

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

# -- Hildon stuff for Maemo 
# we will use WITH_HILDON for #ifdef's in .c files and for any makefile conditionals
hildon=false
HILDON_CFLAGS=""
HILDON_LIBS=""

AC_ARG_ENABLE(hildon,AS_HELP_STRING([--enable-hildon],[Turn on hildon support]),[
	if test "x$enableval" = "xyes"; then
	   hildon=true
	   PKG_CHECK_MODULES(HILDON,[
				hildon-1,
				dbus-1, 
				libosso 
				], 
				HAVE_HILDON=yes,HAVE_HILDON=no)

	   HILDON_CFLAGS="$HILDON_CFLAGS -DWITH_HILDON=1"
	   DATES_CFLAGS="$DATES_CFLAGS $HILDON_CFLAGS"
	   DATES_LIBS="$DATES_LIBS $HILDON_LIBS"
	   PLATFORM=hildon
	fi
])

AM_CONDITIONAL(WITH_HILDON, test "x$hildon" = "xtrue")

AC_ARG_ENABLE(owl, [AC_HELP_STRING([--enable-owl], 
	      [Use the OWL colour widgets])],
	      owl="$enableval",
	      owl=false)

AM_CONDITIONAL(USE_OWL, test "x$owl" = "xtrue")

# -- End of Hildon Stuff --

old_cflags=$CFLAGS
CFLAGS=$DATES_CFLAGS
AC_CHECK_TYPE(ECalComponentId, [], [], [#include <libecal/e-cal.h>])
CFLAGS=$old_cflags

if test $ac_cv_type_ECalComponentId = yes; then
        AC_DEFINE(HAVE_CID_TYPE, 1, [Defined if ECalComponentId exists])
fi

AC_ARG_ENABLE(debug,AS_HELP_STRING([--disable-debug],[disable debugging output]),[enable_debug=$enableval],[enable_debug=yes])
if test x"$enable_debug" = "xyes"; then
	AC_DEFINE(DEBUG, 1, [Defined to enable debugging output])
fi

AC_ARG_ENABLE(dnd,AS_HELP_STRING([--disable-dnd],[disable drag and drop support]),[enable_dnd=$enableval],[enable_dnd=yes])
if test x"$enable_dnd" = "xyes"; then
        AC_DEFINE(WITH_DND, 1, [Defined to enable drag and drop support])
fi

AC_SUBST(DATES_CFLAGS)
AC_SUBST(DATES_LIBS)

#default platform
if test x$PLATFORM = x ; then
   PLATFORM=gtk
fi

AM_CONDITIONAL(PLATFORM_GTK, test x$PLATFORM = xgtk)
AM_CONDITIONAL(PLATFORM_HILDON, test x$PLATFORM = xhildon)

AC_CONFIG_FILES([
		Makefile
		data/Makefile
		po/Makefile.in
		data/com.openedhand.dates.service
		src/Makefile
		src/libgtkdatesview.pc
		libowl/Makefile
])

AC_OUTPUT

echo " "
AC_MSG_RESULT([Installing in: ${prefix}])

AC_MSG_RESULT([Platform front-end: ${PLATFORM}])

if test x"$enable_debug" = "xyes"; then
	AC_MSG_RESULT([Debugging output enabled.])
else
	AC_MSG_RESULT([Debugging output disabled.])
fi
if test x"$enable_dnd" = "xyes"; then
	AC_MSG_RESULT([Drag and drop support enabled.])
else
	AC_MSG_RESULT([Drag and drop support disabled.])
fi