summaryrefslogtreecommitdiffstats
path: root/configure.ac
blob: ebbe6c08d7d4353cbad3a88e488f13502e7ab87e (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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
EFL_VERSION([0], [0], [1], [dev])
AC_INIT([engagement], [efl_version], [oliver@schinagl.nl])

AC_PREREQ([2.65])
AC_CONFIG_SRCDIR([configure.ac])
AC_CONFIG_HEADERS([config.h])

AC_CANONICAL_BUILD
AC_CANONICAL_HOST

AM_INIT_AUTOMAKE([1.10 dist-bzip2 -Wall color-tests])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AM_PROG_AR

# this will speed up libtool checks
LT_PREREQ([2.2])
LT_INIT([pic-only])
EFL_INIT

AC_PROG_CC
AM_PROG_CC_C_O
EFL_ATTRIBUTE_UNUSED
ELM_QUICKLAUNCH
EFL_COMPILER_FLAG([-Wall])
EFL_COMPILER_FLAG([-W])

# Checks for header files.
EFL_CHECK_PATH_MAX

# Check for EFL
PKG_CHECK_MODULES([EFL],
[
 eina >= 1.8.0
 evas >= 1.8.0
 ecore >= 1.8.0
 edje >= 1.8.0
 elementary >= 1.8.0
])

# Check for tests and coverage
AC_ARG_WITH([tests],
   [AS_HELP_STRING([--with-tests=none|regular|coverage],
                   [choose testing method: regular, coverage or none.
                    @<:@default=none@:>@])],
   [build_tests=${withval}],
   [build_tests=auto])

EFL_TESTS([${build_tests}])

# doxygen program for documentation building
EFL_CHECK_DOXYGEN([build_doc="yes"], [build_doc="no"])

# Check edje_cc
EFL_WITH_BIN([edje], [edje-cc], [edje_cc])

# Checks for typedefs, structures, and compiler characteristics.
AC_CHECK_HEADERS([stdint.h stdbool.h])
AC_CHECK_HEADER_STDBOOL
AC_TYPE_SIZE_T
AC_TYPE_INT8_T
AC_TYPE_INT16_T
AC_TYPE_INT32_T
AC_TYPE_INT64_T
AC_TYPE_UINT8_T
AC_TYPE_UINT16_T
AC_TYPE_UINT32_T
AC_TYPE_UINT64_T

# Check locale
AC_CHECK_FUNCS([setlocale])
AC_CHECK_HEADERS([locale.h])

AM_GNU_GETTEXT_VERSION([0.17])
AM_GNU_GETTEXT([external])
AC_CHECK_HEADERS([libintl.h])
AC_C_INLINE
AC_FUNC_MALLOC

# FreeBSD doesn't have libdl, dlopen is provided by libc
AC_CHECK_FUNC(dlopen, LIBDL="", [AC_CHECK_LIB([dl], [dlopen], LIBDL="-ldl")])
AC_SUBST(LIBDL)

# Check for libical
AC_ARG_WITH([ical], AS_HELP_STRING([--without-ical],
				   [Disable iCalendar/caldav support \
				    (default is with)]))
AS_IF([test "x${with_ical}" != "xno" ],
	AC_CHECK_LIB([ical], [icalparser_new],
		AC_CHECK_HEADERS([libical/ical.h],
			LIBICAL="-lical" [have_ical=yes],
			[have_ical=no]),
		[have_ical=no])
	AC_SUBST(LIBICAL),
	[have_ical=no]
)
AS_IF([test "x${have_ical}" = "xyes"],
	[],
	[AS_IF([test "x${with_ical}" = "xyes"],
		[AC_MSG_ERROR([Please install libical and its headers])]
	)]
)

AC_CONFIG_FILES([
Makefile
data/Makefile
data/desktop/Makefile
data/desktop/engagement.desktop
data/themes/Makefile
data/themes/default/Makefile
doc/Makefile
packaging/Makefile
packaging/slackware/Makefile
packaging/pkgbuild/Makefile
po/Makefile.in
src/Makefile
src/bin/Makefile
src/include/Makefile
src/lib/Makefile
src/plugins/Makefile
src/tests/Makefile
doc/engagement.1
])
AC_OUTPUT

echo
echo
echo "------------------------------------------------------------------------"
echo "$PACKAGE_NAME $PACKAGE_VERSION"
echo "------------------------------------------------------------------------"
echo
echo "Compilation..............: make (or gmake)"
echo "  CFLAGS.................: $CFLAGS"
echo "  edje_cc................: ${edje_cc}"
echo
echo "Building documentation...: ${build_doc}"
echo "Building tests...........: ${have_tests}"
echo "Generate coverage .......: ${have_lcov}"
echo
echo "Using libical ...........: ${have_ical}"
echo
echo "Installation.............: make install (as root if needed, with 'su' or 'sudo')"
echo "  prefix.................: $prefix"
echo