summaryrefslogtreecommitdiff
path: root/configure.ac
blob: 119884c1aeb5a36d26e7d4608a21ecec71f9f55c (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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
# get rid of that stupid cache mechanism
rm -f config.cache

AC_INIT([elementary], [0.6.0.063], [enlightenment-devel@lists.sourceforge.net])
release="ver-pre-svn-05"
AC_PREREQ(2.52)
AC_CONFIG_SRCDIR([configure.ac])
AC_CONFIG_MACRO_DIR([m4])
AC_CANONICAL_BUILD
AC_CANONICAL_HOST

AM_INIT_AUTOMAKE([1.6 dist-bzip2])
AM_CONFIG_HEADER([elementary_config.h])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])

AC_CANONICAL_BUILD
AC_CANONICAL_HOST
AC_C_BIGENDIAN
AC_ISC_POSIX
AC_PROG_CC
AM_PROG_CC_STDC
AC_HEADER_STDC
AC_C_CONST
AC_FUNC_ALLOCA

AC_LIBTOOL_WIN32_DLL
define([AC_LIBTOOL_LANG_CXX_CONFIG], [:])dnl
define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl
AC_PROG_LIBTOOL

VMAJ=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $1);}'`
VMIN=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $2);}'`
VMIC=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $3);}'`
SNAP=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $4);}'`
version_info=`expr $VMAJ + $VMIN`":$VMIC:$VMIN"
AC_SUBST(version_info)

case "$host_os" in
  mingw32ce* | cegcc*)
    MODULE_ARCH="$host_os-$host_cpu"
    ;;
  *)
    release_info="-release $release"
    MODULE_ARCH="$host_os-$host_cpu-$release"
    ;;
esac
AC_SUBST(release_info)
AC_SUBST(MODULE_ARCH)
AC_DEFINE_UNQUOTED(MODULE_ARCH, "$MODULE_ARCH", "Module architecture")

EFL_SHARED_EXTENSION="${shrext_cmds}"
AC_DEFINE_UNQUOTED(EFL_SHARED_EXTENSION, "${EFL_SHARED_EXTENSION}", "Shared extension")

requirement_elm=""

PKG_PROG_PKG_CONFIG

# Check whether pkg-config supports Requires.private
if $PKG_CONFIG --atleast-pkgconfig-version 0.22; then
   pkgconfig_requires_private="Requires.private"
else
   pkgconfig_requires_private="Requires"
fi
AC_SUBST(pkgconfig_requires_private)

lt_enable_auto_import=""
ELM_UNIX_DEF="#undef"
ELM_WIN32_DEF="#undef"
ELM_WINCE_DEF="#undef"
have_windows="no"
case "$host_os" in
   mingw32ce* | cegcc*)
      PKG_CHECK_MODULES([EVIL], [evil])
      AC_DEFINE(HAVE_EVIL, 1, [Set to 1 if evil package is installed.])
      lt_enable_auto_import="-Wl,--enable-auto-import"
      ELM_WINCE_DEF="#define"
      have_windows="yes"
dnl managed by evil
      AC_DEFINE(HAVE_DLADDR)
      requirement_elm="evil"
      have_socket="no"
    ;;
   mingw*)
      PKG_CHECK_MODULES([EVIL], [evil])
      AC_DEFINE(HAVE_EVIL, 1, [Set to 1 if evil package is installed.])
      lt_enable_auto_import="-Wl,--enable-auto-import"
      ELM_WIN32_DEF="#define"
      have_windows="yes"
      requirement_elm="evil"
      have_socket="no"
      ;;
   *solaris*)
      ELM_UNIX_DEF="#define"
      have_socket="yes"
      AC_CHECK_LIB([socket], [connect], [], [have_socket="no"])
      ;;
   *)
      ELM_UNIX_DEF="#define"
      AC_CHECK_FUNCS(dlopen, res=yes, res=no)
      if test "x$res" = "xyes"; then
	AC_CHECK_FUNCS(dladdr, AC_DEFINE(HAVE_DLADDR))
      else
	AC_CHECK_LIB(dl, dlopen, res=yes, res=no)
	if test "x$res" = "xyes"; then
	  AC_CHECK_LIB(dl, dladdr, AC_DEFINE(HAVE_DLADDR))
	  dlopen_libs=-ldl
	else
	  AC_MSG_ERROR(Cannot find dlopen)
	fi
      fi
      have_socket="yes"
      ;;
esac
AM_CONDITIONAL([BUILD_RUN], [test "x$have_socket" = "xyes"])

have_fork="no"
AC_CHECK_FUNCS(fork, [
  have_fork="yes"
  AC_DEFINE(HAVE_FORK)
])
AM_CONDITIONAL([BUILD_QUICKLAUNCH], [test "x$have_fork" = "xyes"])

AC_SUBST(dlopen_libs)
AC_SUBST(lt_enable_auto_import)
AC_SUBST(ELM_UNIX_DEF)
AC_SUBST(ELM_WIN32_DEF)
AC_SUBST(ELM_WINCE_DEF)

AM_CONDITIONAL([ELEMENTARY_WINDOWS_BUILD], [test "x${have_windows}" = "xyes"])

PKG_CHECK_MODULES([ELEMENTARY],
   [
    eina-0 >= 0.0.1
    eet >= 1.2.3
    evas >= 0.9.9
    ecore >= 0.9.9
    ecore-evas >= 0.9.9
    ecore-file >= 0.9.9
    edje >= 0.9.91
   ]
)

AC_ARG_WITH(eet-eet,
[  --with-eet-eet=PATH              specify a specific path to eet utility],
[
  v=$withval;
  eet_eet=$v
  echo "  Elementary eet explicitly set to "$eet_eet;
],[
  eet_eet=$(pkg-config --variable=prefix eet)/bin/eet
])
AC_SUBST(eet_eet)
        
requirement_elm="edje ecore-file ecore-evas ecore evas eet eina-0 ${requirement_elm}"

have_elementary_x="no"
PKG_CHECK_MODULES([ELEMENTARY_X],
   [ecore-x],
   [
    AC_DEFINE(HAVE_ELEMENTARY_X, 1, [X11 support for Elementary])
    have_elementary_x="yes"
    requirement_elm="ecore-x ${requirement_elm}"
   ],
   [have_elementary_x="no"]
)

have_elementary_fb="no"
PKG_CHECK_MODULES([ELEMENTARY_FB],
   [ecore-fb],
   [
    AC_DEFINE(HAVE_ELEMENTARY_FB, 1, [FB support for Elementary])
    have_elementary_fb="yes"
    requirement_elm="ecore-fb ${requirement_elm}"
   ],
   [have_elementary_fb="no"]
)

have_elementary_sdl="no"
PKG_CHECK_MODULES([ELEMENTARY_SDL],
   [ecore-sdl],
   [
    AC_DEFINE(HAVE_ELEMENTARY_SDL, 1, [SDL support for Elementary])
    have_elementary_sdl="yes"
    requirement_elm="ecore-sdl ${requirement_elm}"
   ],
   [have_elementary_sdl="no"]
)

have_elementary_win32="no"
PKG_CHECK_MODULES([ELEMENTARY_WIN32],
   [ecore-win32],
   [
    AC_DEFINE(HAVE_ELEMENTARY_WIN32, 1, [Windows XP support for Elementary])
    have_elementary_win32="yes"
    requirement_elm="ecore-win32 ${requirement_elm}"
   ],
   [have_elementary_win32="no"]
)

have_elementary_wince="no"
PKG_CHECK_MODULES([ELEMENTARY_WINCE],
   [ecore-wince],
   [
    AC_DEFINE(HAVE_ELEMENTARY_WINCE, 1, [Windows CE support for Elementary])
    have_elementary_wince="yes"
    requirement_elm="ecore-wince ${requirement_elm}"
   ],
   [have_elementary_wince="no"]
)

ELM_EDBUS_DEF="#undef"
have_elementary_edbus="no"
PKG_CHECK_MODULES([ELEMENTARY_EDBUS],
   [
    edbus
    ehal
   ],
   [
    AC_DEFINE(HAVE_ELEMENTARY_EDBUS, 1, [EDBus support for Elementary])
    have_elementary_edbus="yes"
    ELM_EDBUS_DEF="#define"
    requirement_elm="ehal edbus ${requirement_elm}"
   ],
   [have_elementary_edbus="no"]
)
AC_SUBST(ELM_EDBUS_DEF)

ELM_EFREET_DEF="#undef"
have_elementary_efreet="no"
PKG_CHECK_MODULES([ELEMENTARY_EFREET],
   [
    efreet
    efreet-mime
    efreet-trash
   ],
   [
    AC_DEFINE(HAVE_ELEMENTARY_EFREET, 1, [Efreet support for Elementary])
    have_elementary_efreet="yes"
    ELM_EFREET_DEF="#define"
    requirement_elm="efreet efreet-mime efreet-trash ${requirement_elm}"
   ],
   [have_elementary_efreet="no"]
)
AC_SUBST(ELM_EFREET_DEF)

ELM_EWEATHER_DEF="#undef"
have_elementary_eweather="no"
PKG_CHECK_MODULES([ELEMENTARY_EWEATHER],
   [
    eweather
   ],
   [
    AC_DEFINE(HAVE_ELEMENTARY_EWEATHER, 1, [EWeather support for Elementary])
    have_elementary_eweather="yes"
    ELM_EWEATHER_DEF="#define"
    requirement_elm="eweather ${requirement_elm}"
   ],
   [have_elementary_eweather="no"]
)
AC_SUBST(ELM_EWEATHER_DEF)

ELM_ALLOCA_H_DEF="#undef"
AC_CHECK_HEADER(alloca.h, [ELM_ALLOCA_H_DEF="#define"])
AC_SUBST(ELM_ALLOCA_H_DEF)

ELM_LIBINTL_H_DEF="#undef"
AC_CHECK_HEADER(libintl.h, [ELM_LIBINTL_H_DEF="#define"])
AC_SUBST(ELM_LIBINTL_H_DEF)

AC_ARG_WITH(edje-cc,
[  --with-edje-cc=PATH              specify a specific path to edje_cc],
[
  v=$withval;
  edje_cc=$v
  echo "  Elementary edje_cc explicitly set to "$edje_cc;
],[
  edje_cc=$(pkg-config --variable=prefix edje)/bin/edje_cc
])
AC_SUBST(edje_cc)

my_libs="-lm"
AC_SUBST(my_libs)
AC_SUBST(requirement_elm)

EFL_CHECK_DOXYGEN([build_doc="yes"], [build_doc="no"])

AC_OUTPUT([
Makefile
elementary.spec
elementary.pc
doc/elementary.dox
doc/Makefile
src/Makefile
src/lib/Makefile
src/lib/Elementary.h
src/bin/Makefile
src/modules/Makefile
src/modules/test_entry/Makefile
src/edje_externals/Makefile
data/Makefile
data/themes/Makefile
data/images/Makefile
data/objects/Makefile
data/desktop/Makefile
data/edje_externals/Makefile
config/Makefile
config/default/Makefile
config/standard/Makefile
config/illume/Makefile
])

#####################################################################
## Info

echo
echo
echo
echo "------------------------------------------------------------------------"
echo "$PACKAGE $VERSION"
echo "------------------------------------------------------------------------"
echo
echo "Configuration Options Summary:"
echo
echo "  Engines:"
echo "    X11................: ${have_elementary_x}"
echo "    Framebuffer........: ${have_elementary_fb}"
echo "    SDL................: ${have_elementary_sdl}"
echo "    Windows XP.........: ${have_elementary_win32}"
echo "    Windows CE.........: ${have_elementary_wince}"
echo
echo "  Features:"
echo "    EDBus..............: ${have_elementary_edbus}"
echo "    EFreet.............: ${have_elementary_efreet}"
echo "    EWeather...........: ${have_elementary_eweather}"
echo
echo "  edje_cc..............: ${edje_cc}"
echo
echo "Compilation............: make (or gmake)"
echo "  CPPFLAGS.............: $CPPFLAGS"
echo "  CFLAGS...............: $CFLAGS"
echo "  LDFLAGS..............: $LDFLAGS"
echo
echo "Installation...........: make install (as root if needed, with 'su' or 'sudo')"
echo "  prefix...............: $prefix"
echo