aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/eina/configure.ac
diff options
context:
space:
mode:
authorDavid Walter Seikel2013-01-13 17:29:19 +1000
committerDavid Walter Seikel2013-01-13 17:29:19 +1000
commit07274513e984f0b5544586c74508ccd16e7dcafa (patch)
treeb32ff2a9136fbc1a4a6a0ed1e4d79cde0f5f16d9 /libraries/eina/configure.ac
parentAdded Irrlicht 1.8, but without all the Windows binaries. (diff)
downloadSledjHamr-07274513e984f0b5544586c74508ccd16e7dcafa.zip
SledjHamr-07274513e984f0b5544586c74508ccd16e7dcafa.tar.gz
SledjHamr-07274513e984f0b5544586c74508ccd16e7dcafa.tar.bz2
SledjHamr-07274513e984f0b5544586c74508ccd16e7dcafa.tar.xz
Remove EFL, since it's been released now.
Diffstat (limited to '')
-rw-r--r--libraries/eina/configure.ac898
1 files changed, 0 insertions, 898 deletions
diff --git a/libraries/eina/configure.ac b/libraries/eina/configure.ac
deleted file mode 100644
index 38fb13d..0000000
--- a/libraries/eina/configure.ac
+++ /dev/null
@@ -1,898 +0,0 @@
1##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
2##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
3m4_define([v_maj], [1])
4m4_define([v_min], [2])
5m4_define([v_mic], [0])
6m4_define([v_rev], m4_esyscmd([(svnversion "${SVN_REPO_PATH:-.}" | grep -v '\(export\|Unversioned directory\)' || echo 0) | awk -F : '{printf("%s\n", $1);}' | tr -d ' :MSP\n']))
7m4_if(v_rev, [0], [m4_define([v_rev], m4_esyscmd([git log 2> /dev/null | (grep -m1 git-svn-id || echo 0) | sed -e 's/.*@\([0-9]*\).*/\1/' | tr -d '\n']))])
8##-- When released, remove the dnl on the below line
9m4_undefine([v_rev])
10##-- When doing snapshots - change soname. remove dnl on below line
11dnl m4_define([relname], [ver-pre-svn-07])
12dnl m4_define([v_rel], [-release relname])
13##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
14m4_ifdef([v_rev], [m4_define([v_ver], [v_maj.v_min.v_mic.v_rev])], [m4_define([v_ver], [v_maj.v_min.v_mic])])
15m4_define([lt_cur], m4_eval(v_maj + v_min))
16m4_define([lt_rev], v_mic)
17m4_define([lt_age], v_min)
18##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
19##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
20
21AC_INIT([eina], [v_ver]-alpha, [enlightenment-devel@lists.sourceforge.net])
22AC_PREREQ([2.59])
23AC_CONFIG_SRCDIR([configure.ac])
24AC_CONFIG_MACRO_DIR([m4])
25
26AC_CONFIG_HEADERS([config.h])
27AH_TOP([
28#ifndef EFL_CONFIG_H__
29#define EFL_CONFIG_H__
30])
31AH_BOTTOM([
32#endif /* EFL_CONFIG_H__ */
33])
34
35AM_INIT_AUTOMAKE([1.6 dist-bzip2])
36m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
37
38AC_GNU_SOURCE
39AC_SYS_LARGEFILE
40
41AC_LIBTOOL_WIN32_DLL
42define([AC_LIBTOOL_LANG_CXX_CONFIG], [:])dnl
43define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl
44AC_PROG_LIBTOOL
45
46##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
47##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
48m4_ifdef([v_rev], , [m4_define([v_rev], [0])])
49m4_ifdef([v_rel], , [m4_define([v_rel], [])])
50AC_DEFINE_UNQUOTED(VMAJ, [v_maj], [Major version])
51AC_DEFINE_UNQUOTED(VMIN, [v_min], [Minor version])
52AC_DEFINE_UNQUOTED(VMIC, [v_mic], [Micro version])
53AC_DEFINE_UNQUOTED(VREV, [v_rev], [Revison])
54version_info="lt_cur:lt_rev:lt_age"
55release_info="v_rel"
56AC_SUBST(version_info)
57AC_SUBST(release_info)
58##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
59##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
60VMAJ=v_maj
61AC_SUBST(VMAJ)
62
63
64### Needed information
65
66AC_CANONICAL_BUILD
67AC_CANONICAL_HOST
68
69requirement_eina=""
70
71case "$host_os" in
72 mingw32ce*)
73 MODULE_ARCH="$host_os-$host_cpu"
74 ;;
75 *)
76 MODULE_ARCH="$host_os-$host_cpu-v_maj.v_min.v_mic"
77 ;;
78esac
79AC_SUBST(MODULE_ARCH)
80AC_DEFINE_UNQUOTED(MODULE_ARCH, "${MODULE_ARCH}", "Module architecture")
81
82case "$host_os" in
83 mingw*)
84 MODULE_EXT=".dll"
85 ;;
86 *)
87 MODULE_EXT=".so"
88 ;;
89esac
90
91AC_DEFINE_UNQUOTED(SHARED_LIB_SUFFIX, "${MODULE_EXT}", [Suffix for shared objects])
92
93EFL_CHECK_CPU_MMX([have_mmx="yes"], [have_mmx="no"])
94EFL_CHECK_CPU_SSE([have_sse="yes"], [have_sse="no"])
95EFL_CHECK_CPU_SSE2([have_sse2="yes"], [have_sse2="no"])
96EFL_CHECK_CPU_ALTIVEC([have_altivec="yes"], [have_altivec="no"])
97
98EFL_CHECK_THREADS(
99 [
100 if test "x${_efl_have_posix_threads}" = "xyes" ; then
101 have_threads="POSIX"
102 else
103 if test "x${_efl_have_win32_threads}" = "xyes" ; then
104 have_threads="Win32"
105 else
106 have_threads="no"
107 fi
108 fi
109 ],
110 [have_threads="no"])
111EFL_CHECK_SPINLOCK([have_posix_threads_spinlock="yes"], [have_posix_threads_spinlock="no"])
112
113if ! test "x${have_threads}" = "xno" ; then
114 EINA_CONFIGURE_HAVE_THREADS="#define EINA_HAVE_THREADS"
115fi
116AC_SUBST(EINA_CONFIGURE_HAVE_THREADS)
117AM_CONDITIONAL([EINA_HAVE_THREADS], [! test "x${have_threads}" = "xno"])
118
119if ! test "x${have_debug_threads}" = "xno"; then
120 EINA_CONFIGURE_HAVE_DEBUG_THREADS="#define EINA_HAVE_DEBUG_THREADS"
121fi
122AC_SUBST(EINA_CONFIGURE_HAVE_DEBUG_THREADS)
123AM_CONDITIONAL([EINA_DEBUG_THREADS], [! test "x${have_debug_threads}" = "xno"])
124
125if ! test "x${have_on_off_threads}" = "xno"; then
126 EINA_CONFIGURE_HAVE_ON_OFF_THREADS="#define EINA_HAVE_ON_OFF_THREADS"
127fi
128AC_SUBST(EINA_CONFIGURE_HAVE_ON_OFF_THREADS)
129AM_CONDITIONAL([EINA_ON_OFF_THREADS], [! test "x${have_on_off_threads}" = "xno"])
130
131### Additional options to configure
132
133# Magic debug
134AC_ARG_ENABLE([magic-debug],
135 [AC_HELP_STRING([--disable-magic-debug], [disable magic debug of eina structure @<:@default=enabled@:>@])],
136 [
137 if test "x${enableval}" = "xyes" ; then
138 have_magic_debug="yes"
139 else
140 have_magic_debug="no"
141 fi
142 ],
143 [have_magic_debug="yes"])
144
145AC_MSG_CHECKING([whether magic debug is enable])
146AC_MSG_RESULT([${have_magic_debug}])
147
148if test "x${have_magic_debug}" = "xyes" ; then
149 EINA_CONFIGURE_MAGIC_DEBUG="#define EINA_MAGIC_DEBUG"
150fi
151AC_SUBST(EINA_CONFIGURE_MAGIC_DEBUG)
152
153# Safety checks (avoid crashes on wrong api usage)
154AC_ARG_ENABLE(safety-checks,
155 [AC_HELP_STRING([--disable-safety-checks], [disable safety checks for NULL pointers and like. @<:@default=enabled@:>@])],
156 [
157 if test "x${enableval}" = "xyes" ; then
158 have_safety_checks="yes"
159 else
160 have_safety_checks="no"
161 fi
162 ],
163 [have_safety_checks="yes"])
164
165AC_MSG_CHECKING(whether to do safety checking on api parameters)
166AC_MSG_RESULT($have_safety_checks)
167
168AM_CONDITIONAL(SAFETY_CHECKS, test "x$have_safety_checks" = "xyes")
169if test "x$have_safety_checks" = "xyes"; then
170 AC_DEFINE(EINA_SAFETY_CHECKS, 1, [disable safety checks for NULL pointers and like.])
171 EINA_CONFIGURE_SAFETY_CHECKS="#define EINA_SAFETY_CHECKS"
172fi
173AC_SUBST(EINA_CONFIGURE_SAFETY_CHECKS)
174
175with_max_log_level="<unset>"
176AC_ARG_WITH(internal-maximum-log-level,
177 [AC_HELP_STRING([--with-internal-maximum-log-level=NUMBER],
178 [limit eina internal log level to the given number, any call to EINA_LOG() with values greater than this will be compiled out, ignoring runtime settings, but saving function calls.])],
179 [
180 if test "x${withval}" != "xno"; then
181 if echo "${withval}" | grep -E '^[[0-9]]+$' >/dev/null 2>/dev/null; then
182 AC_MSG_NOTICE([ignoring any EINA_LOG() with level greater than ${withval}])
183 AC_DEFINE_UNQUOTED(EINA_LOG_LEVEL_MAXIMUM, ${withval}, [if set, logging is limited to this amount.])
184 with_max_log_level="${withval}"
185 else
186 AC_MSG_ERROR([--with-internal-maximum-log-level takes a decimal number, got "${withval}" instead.])
187 fi
188 fi
189 ], [:])
190
191AC_ARG_ENABLE([amalgamation],
192 [AC_HELP_STRING([--enable-amalgamation], [enable generation of one single file with all source code in it, helps compiler optimizations.])],
193 [if test "x${enableval}" = "xyes"; then
194 do_amalgamation="yes"
195 else
196 do_amalgamation="no"
197 fi
198 ],
199 [do_amalgamation="no"]
200)
201AM_CONDITIONAL(EINA_AMALGAMATION, test "x${do_amalgamation}" = "xyes")
202
203# Choose best memory pool
204AC_ARG_ENABLE([default-mempool],
205 [AC_HELP_STRING([--enable-default-mempool], [Default memory allocator could be faster for some computer. @<:@default=disabled@:>@])],
206 [
207 if test "x${enableval}" = "xyes"; then
208 have_default_mempool="yes"
209 else
210 have_default_mempool="no"
211 fi
212 ],
213 [have_default_mempool="no"]
214)
215AC_MSG_CHECKING([whether to use default mempool allocator])
216AC_MSG_RESULT([${have_default_mempool}])
217
218if test "x${have_default_mempool}" = "xyes" ; then
219 EINA_CONFIGURE_DEFAULT_MEMPOOL="#define EINA_DEFAULT_MEMPOOL"
220fi
221AC_SUBST(EINA_CONFIGURE_DEFAULT_MEMPOOL)
222
223# Report stringshare usage
224AC_ARG_ENABLE([stringshare-usage],
225 [AC_HELP_STRING([--enable-stringshare-usage], [Report stringshare usage on stringshare shutdown. @<:@default=disabled@:>@])],
226 [
227 if test "x${enableval}" = "xyes"; then
228 have_stringshare_usage="yes"
229 else
230 have_stringshare_usage="no"
231 fi
232 ],
233 [have_stringshare_usage="no"]
234)
235AC_MSG_CHECKING([whether to report stringshare usage])
236AC_MSG_RESULT([${have_stringshare_usage}])
237
238if test "x${have_stringshare_usage}" = "xyes"; then
239 AC_DEFINE(EINA_STRINGSHARE_USAGE, 1, [Report Eina stringshare usage pattern])
240fi
241
242# Check if we want to benchmark on real data
243enable_benchmark_e17="no"
244AC_ARG_ENABLE([e17],
245 [AC_HELP_STRING([--enable-e17], [enable heavy benchmark @<:@default=no@:>@])],
246 [
247 if test "x${enableval}" = "xyes" ; then
248 enable_benchmark_e17="yes"
249 else
250 enable_benchmark_e17="no"
251 fi
252 ],
253 [enable_benchmark_e17="no"])
254
255AC_MSG_CHECKING([whether e17 real data benchmark are built])
256AC_MSG_RESULT([${enable_benchmark_e17}])
257
258AM_CONDITIONAL(EINA_ENABLE_BENCHMARK_E17, test "x${enable_benchmark_e17}" = "xyes")
259
260
261### Checks for programs
262AC_PROG_CC
263AC_PROG_CXX
264
265# pkg-config
266PKG_PROG_PKG_CONFIG
267
268# Check whether pkg-config supports Requires.private
269if $PKG_CONFIG --atleast-pkgconfig-version 0.22; then
270 pkgconfig_requires_private="Requires.private"
271else
272 pkgconfig_requires_private="Requires"
273fi
274AC_SUBST(pkgconfig_requires_private)
275
276# doxygen program for documentation building
277
278EFL_CHECK_DOXYGEN([build_doc="yes"], [build_doc="no"])
279
280
281### Checks for libraries
282
283# Valgrind
284want_valgrind="auto"
285have_valgrind="no"
286
287AC_ARG_ENABLE([valgrind],
288 [AC_HELP_STRING([--enable-valgrind], [improve valgrind support by hinting it of our memory usages, having it to report proper mempool leaks.])],
289 [want_valgrind=$enableval])
290
291AC_MSG_CHECKING([whether to enable build with valgrind])
292AC_MSG_RESULT([${want_valgrind}])
293
294if test "x${want_valgrind}" = "xyes" || test "x${want_valgrind}" = "xauto"; then
295 PKG_CHECK_MODULES([VALGRIND],
296 [valgrind >= 2.4.0],
297 [
298 requirement_eina="valgrind ${requirement_eina}"
299 have_valgrind="yes"
300 ],
301 [
302 AC_DEFINE([NVALGRIND], [1], [Valgrind support disabled])
303 if test "x${want_valgrind}" = "xyes"; then
304 AC_MSG_ERROR([Valgrind >= 2.4.0 is required])
305 fi
306 ])
307else
308 AC_DEFINE([NVALGRIND], [1], [Valgrind support disabled])
309fi
310
311
312# Evil library for compilation on Windows CE
313
314EFL_EINA_BUILD=""
315case "$host_os" in
316 mingw*)
317 PKG_CHECK_MODULES([EVIL], [evil >= 1.0.0])
318 AC_DEFINE([HAVE_EVIL], [1], [Set to 1 if evil package is installed])
319 requirement_eina="${requirement_eina} evil"
320 EFL_EINA_BUILD="-DEFL_EINA_BUILD"
321 ;;
322esac
323AC_SUBST([EFL_EINA_BUILD])
324
325# Check ememoa memory pool library
326
327AC_ARG_ENABLE([ememoa],
328 [AC_HELP_STRING([--enable-ememoa], [build ememoa memory pool module @<:@default=yes@:>@])],
329 [
330 if test "x${enableval}" = "xyes" ; then
331 enable_ememoa="yes"
332 else
333 enable_ememoa="no"
334 fi
335 ],
336 [enable_ememoa="yes"])
337
338AC_MSG_CHECKING([whether to use ememoa for memory pool])
339AC_MSG_RESULT([$enable_ememoa])
340
341if test "x${enable_ememoa}" = "xyes" ; then
342 PKG_CHECK_MODULES([EMEMOA],
343 [ememoa >= 0.0.26 ],
344 [enable_ememoa="yes"],
345 [enable_ememoa="no"])
346fi
347
348PKG_CHECK_MODULES([ECORE_EVAS],
349 [ecore-evas ecore evas],
350 [build_tiler_example="yes"],
351 [build_tiler_example="no"])
352
353AM_CONDITIONAL([BUILD_TILER_EXAMPLE], [test "x${build_tiler_example}" = "xyes"])
354
355### Checks for compiler characteristics
356AC_C_CONST
357AC_C_BIGENDIAN
358AC_C_INLINE
359AC_PROG_CC_STDC
360EFL_ATTRIBUTE_UNUSED
361
362have_wince="no"
363have_win32="no"
364EINA_CFLAGS=""
365case "$host_os" in
366 mingw32ce*)
367 EINA_CFLAGS="${EVIL_CFLAGS}"
368 have_win32="yes"
369 have_wince="yes"
370 ;;
371 mingw*)
372 EINA_CFLAGS="${EVIL_CFLAGS}"
373 have_win32="yes"
374 ;;
375esac
376AM_CONDITIONAL([EINA_HAVE_WINCE], [test "x$have_wince" = "xyes"])
377AM_CONDITIONAL([EINA_HAVE_WIN32], [test "x$have_win32" = "xyes"])
378
379m4_ifdef([v_mic],
380 [
381 EFL_COMPILER_FLAG([-Wall])
382 EFL_COMPILER_FLAG([-W])
383 ])
384
385EFL_COMPILER_FLAG([-Wshadow])
386
387### Checks for portability layer
388
389PKG_CHECK_MODULES([EXOTIC],
390 [exotic],
391 [enable_exotic="yes"],
392 [enable_exotic="no"])
393
394if test "x${enable_exotic}" = "xyes"; then
395 requirement_eina="exotic ${requirement_eina}"
396 EINA_CFLAGS="${EINA_CFLAGS} ${EXOTIC_CFLAGS}"
397 EINA_LIBS="${EXOTIC_LIBS}"
398
399 EINA_CONFIGURE_HAVE_EXOTIC="#define EINA_HAVE_EXOTIC"
400 AC_DEFINE([HAVE_EXOTIC_H], [1], [Define to 1 if you have Exotic.])
401fi
402AM_CONDITIONAL([EINA_HAVE_EXOTIC], [test "x${enable_exotic}" = "xyes"])
403AC_SUBST([EINA_CONFIGURE_HAVE_EXOTIC])
404
405case "$host_vendor" in
406 ps3*)
407 PKG_CHECK_MODULES([ESCAPE], [escape])
408 AC_DEFINE(HAVE_ESCAPE, 1, [Set to 1 if Escape package is installed])
409 requirement_eina="${requirement_eina} escape"
410 EINA_CFLAGS="${ESCAPE_CFLAGS} ${EINA_CFLAGS}"
411 ;;
412esac
413
414AC_SUBST([EINA_CFLAGS])
415
416### Checks for linker characteristics
417EINA_LIBS=
418lt_enable_auto_import=""
419case "${host_os}" in
420 mingw*)
421 EINA_LIBS="${EINA_LIBS} -ldl ${EVIL_LIBS} -lm"
422 lt_enable_auto_import="-Wl,--enable-auto-import"
423 ;;
424 dragonfly*|openbsd*)
425 EINA_LIBS="${EINA_LIBS} -lm"
426 ;;
427 freebsd*|netbsd*)
428 EINA_LIBS="${EINA_LIBS} -lrt -lm"
429 ;;
430 darwin*)
431 EINA_LIBS="${EINA_LIBS} -lm"
432 ;;
433 cygwin*)
434 EINA_LIBS="${EINA_LIBS} -ldl -lm"
435 ;;
436 *)
437 EINA_LIBS="${EINA_LIBS} -lrt -ldl -lm"
438 ;;
439esac
440case "$host_vendor" in
441 ps3*)
442 # Escape had already been checked to exist
443 EINA_LIBS="${ESCAPE_LIBS}"
444 ;;
445esac
446AC_SUBST([EINA_LIBS])
447AC_SUBST([lt_enable_auto_import])
448
449EFL_LINKER_FLAG([-fno-strict-aliasing])
450
451CFLAGS="${CFLAGS} ${EINA_CFLAGS}"
452LDFLAGS="${LDFLAGS} ${EINA_LDFLAGS}"
453LIBS="${LIBS} ${EINA_LIBS}"
454
455### Checks for header files
456AC_HEADER_ASSERT
457AC_HEADER_TIME
458EFL_CHECK_PATH_MAX
459AC_CHECK_HEADERS([unistd.h libgen.h inttypes.h stdint.h sys/types.h siginfo.h strings.h sys/mman.h execinfo.h])
460
461if test "x${ac_cv_header_inttypes_h}" = "xyes" ; then
462 EINA_CONFIGURE_HAVE_INTTYPES_H="#define EINA_HAVE_INTTYPES_H"
463 AC_DEFINE([HAVE_INTTYPES_H], [1], [Define to 1 if you have the <inttypes.h> header file.])
464fi
465AC_SUBST([EINA_CONFIGURE_HAVE_INTTYPES_H])
466
467if test "x${ac_cv_header_inttypes_h}" = "xyes" ; then
468 EINA_CONFIGURE_HAVE_STDINT_H="#define EINA_HAVE_STDINT_H"
469 AC_DEFINE([HAVE_STDINT_H], [1], [Define to 1 if you have the <stdint.h> header file.])
470fi
471AC_SUBST([EINA_CONFIGURE_HAVE_STDINT_H])
472
473### Checks for types
474
475AC_CHECK_SIZEOF([wchar_t])
476EINA_SIZEOF_WCHAR_T=$ac_cv_sizeof_wchar_t
477AC_SUBST([EINA_SIZEOF_WCHAR_T])
478AC_CHECK_TYPES([siginfo_t], [], [],
479 [[#include <signal.h>
480 #if HAVE_SIGINFO_H
481 # include <siginfo.h>
482 #endif
483 ]])
484
485### Check if dirent.h is usable
486
487AC_CHECK_TYPES([struct dirent], [have_dirent="yes"], [have_dirent="no"],
488 [[#include <dirent.h>
489 ]])
490
491if test "x${have_dirent}" = "xyes" ; then
492 EINA_CONFIGURE_HAVE_DIRENT_H="#define EINA_HAVE_DIRENT_H"
493 AC_DEFINE([HAVE_DIRENT_H], [1], [Define to 1 if you have a valid <dirent.h> header file.])
494fi
495AC_SUBST([EINA_CONFIGURE_HAVE_DIRENT_H])
496
497### Checks for library functions
498AC_ISC_POSIX
499AC_FUNC_ALLOCA
500AC_CHECK_FUNCS([strlcpy openat fstatat fpathconf execvp backtrace backtrace_symbols])
501
502AC_MSG_CHECKING([for dirfd])
503AC_LINK_IFELSE(
504 [
505 AC_LANG_PROGRAM(
506 [[
507#include <dirent.h>
508 ]],
509 [[
510int main(void)
511{
512 DIR *dirp;
513 return dirfd(dirp);
514}
515 ]])
516 ],
517 [have_dirfd="yes"],
518 [have_dirfd="no"])
519
520AC_MSG_RESULT([${have_dirfd}])
521
522if test "x${have_dirfd}" = "xyes" ; then
523 AC_DEFINE([HAVE_DIRFD], [1], [ Define to 1 if you have the `dirfd' function or macro.])
524fi
525
526# check debug information for malloc
527AC_CHECK_FUNCS([malloc_usable_size], [malloc_true_size="yes"], [malloc_true_size="no"])
528if test "x${malloc_true_size}" = "xyes" ; then
529 AC_DEFINE([HAVE_MALLOC_USABLE_SIZE], [1], [We will be able to know the exact amount of wasted memory])
530fi
531
532want_debug_malloc="no"
533AC_ARG_ENABLE([debug-malloc],
534 [AC_HELP_STRING([--enable-debug-malloc], [enable debugging of malloc usage overhead in our allocator @<:@default=enabled@:>@])],
535 [
536 if test "x${enableval}" = "xyes" ; then
537 want_debug_malloc="yes"
538 else
539 want_debug_malloc="no"
540 fi
541 ], [want_debug_malloc="no"])
542
543if test "x${malloc_true_size}" = "xyes" -a "x${want_debug_malloc}" = "xyes"; then
544 AC_DEFINE([EINA_DEBUG_MALLOC], [1], [Turn on debugging overhead in mempool])
545fi
546
547# dlopen and dladdr
548dlopen_libs=""
549case "$host_os" in
550 mingw*)
551# managed by evil
552 AC_DEFINE([HAVE_DLADDR])
553 AC_DEFINE([HAVE_DLOPEN])
554 ;;
555 *)
556 AC_CHECK_FUNCS([dlopen], [res="yes"], [res="no"])
557 if test "x${res}" = "xyes" ; then
558 AC_CHECK_FUNCS([dladdr], [AC_DEFINE([HAVE_DLADDR])])
559 AC_DEFINE([HAVE_DLOPEN])
560 else
561 AC_CHECK_LIB([dl], [dlopen], [res="yes"], [res="no"])
562 if test "x${res}" = "xyes" ; then
563 AC_CHECK_LIB([dl], [dladdr], [AC_DEFINE([HAVE_DLADDR])])
564 AC_DEFINE(HAVE_DLOPEN)
565 dlopen_libs="-ldl"
566 fi
567 fi
568 ;;
569esac
570AC_SUBST([dlopen_libs])
571
572have_log="yes"
573EFL_CHECK_FNMATCH([have_log="yes"], [have_log="no"])
574
575want_log="yes"
576AC_ARG_ENABLE([log],
577 [AC_HELP_STRING([--disable-log], [disable Eina_Log infrastructure completly @<:@default=enabled@:>@])],
578 [
579 if test "x${enableval}" = "xyes" ; then
580 want_log="yes"
581 else
582 want_log="no"
583 fi
584 ],
585 [want_log="yes"])
586
587enable_log="no"
588if test "x${have_log}" = xyes -a "x${want_log}" = xyes; then
589 enable_log="yes"
590fi
591
592AC_MSG_CHECKING([wether to build Eina_Log infrastructure])
593AC_MSG_RESULT([${enable_log}])
594
595if test "x${enable_log}" = "xyes"; then
596 EINA_CONFIGURE_ENABLE_LOG="#define EINA_ENABLE_LOG"
597 AC_DEFINE([HAVE_LOG], [1], [Define to 1 if we log support is on])
598fi
599AC_SUBST([EINA_CONFIGURE_ENABLE_LOG])
600
601AC_CHECK_HEADERS([mcheck.h], [AC_DEFINE([HAVE_MCHECK], [1], [Have mcheck.h])])
602AC_CHECK_FUNCS([mtrace], [AC_DEFINE([HAVE_MTRACE], [1], [Have mtrace])])
603
604# iconv library
605have_iconv="no"
606AC_ARG_WITH([iconv-link],
607 AC_HELP_STRING([--with-iconv-link=ICONV_LINK], [explicitly specify an iconv link option]),
608 [
609 LIBS="$withval $LIBS"
610 have_iconv="yes"
611 iconv_libs=$withval
612 ])
613
614AC_MSG_CHECKING(for explicit iconv link options)
615if test "x${iconv_libs}" = "x" ; then
616 AC_MSG_RESULT([no explicit iconv link option])
617else
618 AC_MSG_RESULT([$iconv_libs])
619fi
620
621if test "x${have_iconv}" = "xno" ; then
622 AC_CHECK_HEADERS([iconv.h], [have_iconv="yes"])
623
624 if test "x${have_iconv}" = "xyes" ; then
625 AC_MSG_CHECKING([whether iconv() is in libc])
626
627 AC_LINK_IFELSE(
628 [AC_LANG_PROGRAM(
629 [[
630#include <stdlib.h>
631#include <iconv.h>
632 ]],
633 [[
634iconv_t ic;
635size_t count = iconv(ic, NULL, NULL, NULL, NULL);
636 ]])],
637 [have_iconv="yes"],
638 [have_iconv="no"])
639
640 AC_MSG_RESULT([${have_iconv}])
641 fi
642
643 if test "x${have_iconv}" = "xno" ; then
644 AC_MSG_CHECKING([whether iconv() is in libiconv.a])
645
646 LIBS_save="${LIBS}"
647 LIBS="-liconv $LIBS"
648 AC_LINK_IFELSE(
649 [AC_LANG_PROGRAM(
650 [[
651#include <stdlib.h>
652#include <iconv.h>
653 ]],
654 [[
655iconv_t ic;
656size_t count;
657count = iconv(ic, NULL, NULL, NULL, NULL);
658 ]])],
659 [
660 have_iconv="yes"
661 iconv_libs="-liconv"
662 ],
663 [
664 have_iconv="no"
665 LIBS=${LIBS_save}
666 ])
667
668 AC_MSG_RESULT([${have_iconv}])
669 fi
670
671 if test "x${have_iconv}" = "xno" ; then
672 AC_MSG_CHECKING([whether iconv() is in libiconv_plug.a])
673
674 LIBS_save="${LIBS}"
675 LIBS="-liconv_plug $LIBS"
676 AC_LINK_IFELSE(
677 [AC_LANG_PROGRAM(
678 [[
679#include <stdlib.h>
680#include <iconv.h>
681 ]],
682 [[
683iconv_t ic;
684size_t count = iconv(ic, NULL, NULL, NULL, NULL);
685 ]])],
686 [
687 have_iconv="yes"
688 iconv_libs="-liconv_plug"
689 ],
690 [
691 have_iconv="no"
692 LIBS=${LIBS_save}
693 ])
694
695 AC_MSG_RESULT([${have_iconv}])
696 fi
697fi
698
699AC_SUBST([iconv_libs])
700
701if test "x${have_iconv}" = "xyes" ; then
702 AC_DEFINE([HAVE_ICONV], [1], [Set to 1 if iconv library is installed])
703fi
704
705# shmopen
706have_shmopen=no
707AC_MSG_CHECKING([for shm_open availability])
708
709LIBS_save="${LIBS}"
710LIBS="${LIBS} -lrt"
711AC_LINK_IFELSE(
712 [AC_LANG_PROGRAM(
713 [[
714#include <sys/mman.h>
715#include <sys/stat.h> /* For mode constants */
716#include <fcntl.h> /* For O_* constants */
717 ]],
718 [[
719int fd;
720
721fd = shm_open("/dev/null", O_RDONLY, S_IRWXU | S_IRWXG | S_IRWXO);
722 ]])],
723 [have_shmopen="yes"],
724 [have_shmopen="no"])
725
726LIBS="${LIBS_save}"
727
728AC_MSG_RESULT([${have_shmopen}])
729
730if test "x${have_shmopen}" = "xyes"; then
731 AC_DEFINE([HAVE_SHMOPEN], [1], [Define to 1 if you have the `shm_open' function.])
732 rt_libs="-lrt"
733fi
734
735AC_SUBST([rt_libs])
736
737# extended attribute
738
739AC_MSG_CHECKING([for extended attributes])
740
741AC_COMPILE_IFELSE(
742 [AC_LANG_PROGRAM(
743 [[
744#include <stdlib.h>
745#include <sys/types.h>
746#include <sys/xattr.h>
747 ]],
748 [[
749size_t tmp = listxattr("/", NULL, 0);
750tmp = getxattr("/", "user.ethumb.md5", NULL, 0);
751setxattr("/", "user.ethumb.md5", NULL, 0, 0);
752 ]])],
753 [
754 AC_DEFINE([HAVE_XATTR], [1], [Define to 1 if you have the `listxattr', `setxattr' and `getxattr' functions.])
755 have_xattr="yes"
756 ],
757 [have_xattr="no"])
758
759AC_MSG_RESULT([${have_xattr}])
760
761### Modules
762
763if test "x${have_default_mempool}" = "xyes" ; then
764 enable_chained_pool="no"
765 enable_pass_through="static"
766else
767 enable_chained_pool="static"
768 enable_pass_through="no"
769fi
770
771enable_one_big="static"
772
773EINA_CHECK_MODULE([chained-pool], [${enable_chained_pool}], [chained pool])
774EINA_CHECK_MODULE([ememoa-fixed], [${enable_ememoa}], [ememoa fixed])
775EINA_CHECK_MODULE([ememoa-unknown], [${enable_ememoa}], [ememoa unknown])
776EINA_CHECK_MODULE([fixed-bitmap], [no], [fixed bitmap])
777EINA_CHECK_MODULE([pass-through], [${enable_pass_through}], [pass through])
778EINA_CHECK_MODULE([buddy], [no], [buddy])
779EINA_CHECK_MODULE([one-big], [${enable_one_big}], [one big])
780
781### Make the debug preprocessor configurable
782
783### Unit tests, coverage and benchmarking
784
785EFL_CHECK_TESTS([enable_tests="yes"], [enable_tests="no"])
786
787EFL_CHECK_COVERAGE([${enable_tests}], [enable_coverage="yes"], [enable_coverage="no"])
788EINA_CFLAGS="${EINA_CFLAGS} ${EFL_COVERAGE_CFLAGS}"
789EINA_LIBS="${EINA_LIBS} ${EFL_COVERAGE_LIBS}"
790if test "x$enable_coverage" = "xyes" ; then
791 EINA_CFLAGS="${EINA_CFLAGS} ${EFL_DEBUG_CFLAGS}"
792fi
793
794EFL_CHECK_BENCHMARK([enable_benchmark="yes"], [enable_benchmark="no"])
795EINA_BENCH_MODULE([glib], [${enable_benchmark}], [glib-2.0], [enable_benchmark_glib="yes"], [enable_benchmark_glib="no"])
796if test -n "$CXX" && test "x$enable_benchmark" = "xyes" ; then
797 AC_DEFINE_UNQUOTED([CITYHASH_BENCH], [1], [enable bench tests for google hash method])
798fi
799AM_CONDITIONAL([CITYHASH_BENCH], [test -n "$CXX" && test "x$enable_benchmark" = "xyes"])
800
801AC_SUBST([requirement_eina])
802
803### Build and install examples
804EFL_CHECK_BUILD_EXAMPLES([enable_build_examples="yes"], [enable_build_examples="no"])
805EFL_CHECK_INSTALL_EXAMPLES([enable_install_examples="yes"], [enable_install_examples="no"])
806
807AC_CONFIG_FILES([
808Makefile
809eina.pc
810eina.spec
811doc/Makefile
812doc/Doxyfile
813src/Makefile
814src/include/Makefile
815src/include/eina_config.h
816src/lib/Makefile
817src/modules/Makefile
818src/modules/mp/Makefile
819src/modules/mp/chained_pool/Makefile
820src/modules/mp/ememoa_fixed/Makefile
821src/modules/mp/ememoa_unknown/Makefile
822src/modules/mp/pass_through/Makefile
823src/modules/mp/fixed_bitmap/Makefile
824src/modules/mp/buddy/Makefile
825src/modules/mp/one_big/Makefile
826src/tests/Makefile
827src/examples/Makefile
828])
829
830AC_OUTPUT
831
832#####################################################################
833## Info
834
835echo
836echo
837echo
838echo "------------------------------------------------------------------------"
839echo "$PACKAGE $VERSION"
840echo "------------------------------------------------------------------------"
841echo
842echo
843echo "Configuration Options Summary:"
844echo
845echo " Magic debug..........: ${have_magic_debug}"
846echo " Safety checks........: ${have_safety_checks}"
847echo " Maximum log level....: ${with_max_log_level}"
848echo " Report string usage..: ${have_stringshare_usage}"
849echo " Valgrind support.....: ${have_valgrind}"
850echo " Default mempool......: ${have_default_mempool}"
851echo " Log support..........: ${enable_log}"
852echo " Thread Support.......: ${have_threads}"
853if test "${have_threads}" = "POSIX" ; then
854echo " spinlock...........: ${have_posix_threads_spinlock}"
855echo " debug usage........: ${have_debug_threads}"
856echo " on/off support.....: ${have_on_off_threads}"
857fi
858echo " Amalgamation.........: ${do_amalgamation}"
859echo " Iconv support........: ${have_iconv}"
860echo " File dirfd...........: ${have_dirfd}"
861echo " File xattr...........: ${have_xattr}"
862echo
863echo " Documentation........: ${build_doc}"
864echo " Tests................: ${enable_tests}"
865echo " Coverage.............: ${enable_coverage}"
866echo " Examples.............: ${enable_build_examples}"
867echo " Tiler Example........: ${build_tiler_example}"
868echo " Examples installed...: ${enable_install_examples}"
869echo " Benchmark............: ${enable_benchmark}"
870if test "x${enable_benchmark}" = "xyes" ; then
871echo " Glib...............: ${enable_benchmark_glib}"
872echo " E17 real data......: ${enable_benchmark_e17}"
873fi
874echo
875echo " CPU Specific Extensions:"
876echo " MMX................: ${have_mmx}"
877echo " SSE................: ${have_sse}"
878echo " SSE2...............: ${have_sse2}"
879echo " ALTIVEC............: ${have_altivec}"
880echo
881echo " Memory pools:"
882echo " Buddy..............: ${enable_buddy}"
883echo " Chained pool.......: ${enable_chained_pool}"
884echo " Ememoa fixed.......: ${enable_ememoa_fixed}"
885echo " Ememoa unknown.....: ${enable_ememoa_unknown}"
886echo " Fixed bitmap.......: ${enable_fixed_bitmap}"
887echo " One big............: ${enable_one_big}"
888echo " Pass through.......: ${enable_pass_through}"
889echo
890echo "Compilation............: make (or gmake)"
891echo " CPPFLAGS.............: $CPPFLAGS"
892echo " CFLAGS...............: $CFLAGS"
893echo " LDFLAGS..............: $LDFLAGS"
894echo
895echo "Installation...........: make install (as root if needed, with 'su' or 'sudo')"
896echo " prefix...............: $prefix"
897echo
898EFL_FORM_VOLTRON