summaryrefslogtreecommitdiff
path: root/configure.ac
blob: be6c425a3e81bb6c6c2b701785e1ebd772faeb90 (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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
EWE_VERSION([0], [2], [2])

AC_INIT([ewe], [ewe_version], [enlightenment-devel@lists.sourceforge.net])
AC_PREREQ([2.60])
AC_CONFIG_SRCDIR([configure.ac])
AC_CONFIG_MACRO_DIR([m4])

AC_CONFIG_HEADERS([ewe_config.h])
AH_TOP([
#ifndef EWE_CONFIG_H
#define EWE_CONFIG_H
])
AH_BOTTOM([
#endif /* EWE_CONFIG_H */
])

AM_INIT_AUTOMAKE([1.13 dist-bzip2 dist-xz subdir-objects color-tests])
AM_SILENT_RULES([yes])


### Additional options to configure

AC_ARG_ENABLE([debug],
   [AS_HELP_STRING([--enable-debug], [enable Ewe debug support. @<:@default=disabled@:>@])],
   [want_ewe_debug=$enableval],
   [want_ewe_debug="no"])

if test "x$want_ewe_debug" = "xyes"; then
   AC_DEFINE([HAVE_EWE_DEBUG], [1], [Set to 1 if debug is requested.])
fi


### Default options with respect to host and global variables

EWE_INIT

m4_define([efl_version], [1.12.2])
m4_define([elm_version], [1.12.2])


### Checks for programs

LT_INIT([win32-dll disable-static pic-only])

m4_ifdef([AM_GNU_GETTEXT_VERSION], [
AM_GNU_GETTEXT_VERSION([0.17])
])

AC_PROG_CC

AC_PROG_RANLIB

PKG_PROG_PKG_CONFIG

AC_CHECK_PROGS([DOXYGEN], [doxygen])
AM_CONDITIONAL([HAVE_DOXYGEN], [test -n "$DOXYGEN"])

EWE_WITH_BIN([edje], [edje_cc], [edje_cc])

EWE_WITH_BIN([eolian], [eolian-gen], [eolian_gen])

DEPS_EOLIAN_FLAGS=`${PKG_CONFIG} --variable=eolian_flags eo efl evas edje ecore elementary`
AC_SUBST([DEPS_EOLIAN_FLAGS])

# Force the helper to try external eolian-gen
AM_CONDITIONAL([HAVE_EOLIAN_GEN], [true])

EFL_ENABLE_BIN([ewe-test])


### Checks for libraries

requirement_ewe="\
eina >= efl_version \
eet >= efl_version \
evas >= efl_version \
ecore >= efl_version \
ecore-input >= efl_version \
edje >= efl_version \
eo >= efl_version \
ecore-imf >= efl_version \
ecore-con >= efl_version \
eio >= efl_version \
eldbus >= efl_version \
efreet >= efl_version \
efreet-mime >= efl_version \
"

AC_SUBST([requirement_ewe])

PKG_CHECK_MODULES([EFL], [${requirement_ewe}])

PKG_CHECK_MODULES([ELEMENTARY], [elementary >= elm_version])

requirement_ewe="elementary >= elm_version ${requirement_ewe}"

elmthemedir=`${PKG_CONFIG} --variable=themes elementary`
AC_SUBST([elmthemedir])

PKG_CHECK_MODULES([CHECK], [check],
   [have_check="${GREEN}yes${RESET}"],
   [have_check="${RED}no${RESET}"])
AM_CONDITIONAL([CHECK_FOUND], [test "x$have_check" = "x${GREEN}yes${RESET}"])
AC_SUBST([CHECK_FOUND])
AM_COND_IF([CHECK_FOUND],
   [run_test="make check"],
   [run_test="to compile tests you should install the check unit testing library"])


### Checks for header files


### Checks for types


### Checks for structures


### Checks for compiler characteristics

AC_PROG_CC_C_O


### Checks for linker characteristics


### Checks for library functions


AC_CONFIG_FILES([
Makefile
data/Makefile
data/themes/Makefile
doc/Makefile
doc/Doxyfile
src/Makefile
src/lib/Makefile
src/bin/Makefile
tests/Makefile
tests/Doxyfile
])


AC_OUTPUT

echo ""
echo ""
echo ""
echo "------------------------------------------------------------------------"
echo "Elementary Widgets Extension ${PACKAGE_VERSION}"
echo "------------------------------------------------------------------------"
echo ""
echo "Configuration Options Summary:"
echo
echo "  edje-cc path...: ${edje_cc}"
echo
echo "Testing:"
echo "  check..........: ${have_check}"
echo "  run tests......: ${run_test}"
echo "  tests report...: make report"
echo
echo "Debug output.....: ${want_ewe_debug}"
echo
echo "Installation.....: make install (as root if needed, with 'su' or 'sudo')"
echo "  CFLAGS.........: ${CFLAGS}"
echo "  LDFLAGS........: ${LDFLAGS}"
echo "  prefix.........: ${prefix}"
echo