eina: starting to use eina_lock.
[framework/uifw/eina.git] / configure.ac
1 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
2 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
3 m4_define([v_maj], [1])
4 m4_define([v_min], [0])
5 m4_define([v_mic], [999])
6 m4_define([v_rev], m4_esyscmd([(svnversion "${SVN_REPO_PATH:-.}" | grep -v export || echo 0) | awk -F : '{printf("%s\n", $1);}' | tr -d ' :MSP\n']))
7 m4_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
9 dnl m4_undefine([v_rev])
10 ##--   When doing snapshots - change soname. remove dnl on below line
11 dnl m4_define([relname], [ver-pre-svn-07])
12 dnl m4_define([v_rel], [-release relname])
13 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
14 m4_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])])
15 m4_define([lt_cur], m4_eval(v_maj + v_min))
16 m4_define([lt_rev], v_mic)
17 m4_define([lt_age], v_min)
18 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
19 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
20
21 AC_INIT([eina], [v_ver], [enlightenment-devel@lists.sourceforge.net])
22 AC_PREREQ([2.59])
23 AC_CONFIG_SRCDIR([configure.ac])
24 AC_CONFIG_MACRO_DIR([m4])
25
26 AC_CONFIG_HEADERS([config.h])
27 AH_TOP([
28 #ifndef EFL_CONFIG_H__
29 #define EFL_CONFIG_H__
30 ])
31 AH_BOTTOM([
32 #endif /* EFL_CONFIG_H__ */
33 ])
34
35 AM_INIT_AUTOMAKE([1.6 dist-bzip2])
36 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
37
38 AC_GNU_SOURCE
39 AC_SYS_LARGEFILE
40
41 AC_LIBTOOL_WIN32_DLL
42 define([AC_LIBTOOL_LANG_CXX_CONFIG], [:])dnl
43 define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl
44 AC_PROG_LIBTOOL
45
46 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
47 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
48 m4_ifdef([v_rev], , [m4_define([v_rev], [0])])
49 m4_ifdef([v_rel], , [m4_define([v_rel], [])])
50 AC_DEFINE_UNQUOTED(VMAJ, [v_maj], [Major version])
51 AC_DEFINE_UNQUOTED(VMIN, [v_min], [Minor version])
52 AC_DEFINE_UNQUOTED(VMIC, [v_mic], [Micro version])
53 AC_DEFINE_UNQUOTED(VREV, [v_rev], [Revison])
54 version_info="lt_cur:lt_rev:lt_age"
55 release_info="v_rel"
56 AC_SUBST(version_info)
57 AC_SUBST(release_info)
58 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
59 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
60 VMAJ=v_maj
61 AC_SUBST(VMAJ)
62
63
64 ### Needed information
65
66 AC_CANONICAL_BUILD
67 AC_CANONICAL_HOST
68
69 requirement_eina=""
70
71 case "$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       ;;
78 esac
79 AC_SUBST(MODULE_ARCH)
80 AC_DEFINE_UNQUOTED(MODULE_ARCH, "${MODULE_ARCH}", "Module architecture")
81
82 case "$host_os" in
83    mingw*)
84       MODULE_EXT=".dll"
85       ;;
86    *)
87       MODULE_EXT=".so"
88       ;;
89 esac
90
91 AC_DEFINE_UNQUOTED(SHARED_LIB_SUFFIX, "${MODULE_EXT}", [Suffix for shared objects])
92
93 EFL_CHECK_CPU_MMX([have_mmx="yes"], [have_mmx="no"])
94 EFL_CHECK_CPU_SSE([have_sse="yes"], [have_sse="no"])
95 EFL_CHECK_CPU_SSE2([have_sse2="yes"], [have_sse2="no"])
96 EFL_CHECK_CPU_ALTIVEC([have_altivec="yes"], [have_altivec="no"])
97
98 EFL_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"])
111 EFL_CHECK_SPINLOCK([have_posix_threads_spinlock="yes"], [have_posix_threads_spinlock="no"])
112
113 if ! test "x${have_threads}" = "xno" ; then
114    EINA_CONFIGURE_HAVE_THREADS="#define EINA_HAVE_THREADS"
115 fi
116 AC_SUBST(EINA_CONFIGURE_HAVE_THREADS)
117 AM_CONDITIONAL([EINA_HAVE_THREADS], [! test "x${have_threads}" = "xno"])
118
119 if ! test "x${have_debug_threads}" = "xno"; then
120    EINA_CONFIGURE_HAVE_DEBUG_THREADS="#define EINA_DEBUG_THREADS"
121 fi
122 AC_SUBST(EINA_CONFIGURE_HAVE_DEBUG_THREADS)
123 AM_CONDITIONAL([EINA_DEBUG_THREADS], [! test "x${have_debug_threads}" = "xno"])
124
125 ### Additional options to configure
126
127 # Magic debug
128 AC_ARG_ENABLE([magic-debug],
129    [AC_HELP_STRING([--disable-magic-debug], [disable magic debug of eina structure @<:@default=enabled@:>@])],
130    [
131     if test "x${enableval}" = "xyes" ; then
132        have_magic_debug="yes"
133     else
134        have_magic_debug="no"
135     fi
136    ],
137    [have_magic_debug="yes"])
138
139 AC_MSG_CHECKING([whether magic debug is enable])
140 AC_MSG_RESULT([${have_magic_debug}])
141
142 if test "x${have_magic_debug}" = "xyes" ; then
143    EINA_CONFIGURE_MAGIC_DEBUG="#define EINA_MAGIC_DEBUG"
144 fi
145 AC_SUBST(EINA_CONFIGURE_MAGIC_DEBUG)
146
147 # Valgrind
148 want_valgrind="auto"
149 have_valgrind="no"
150
151 AC_MSG_CHECKING(whether to enable build with valgrind)
152 AC_ARG_ENABLE(valgrind,
153   AC_HELP_STRING([--enable-valgrind], [improve valgrind support by hinting it of our memory usages, having it to report proper mempool leaks.]),
154   [want_valgrind=$enableval]
155 )
156 AC_MSG_RESULT($want_valgrind)
157
158 if test "x${want_valgrind}" = "xyes" -o "x${want_valgrind}" = "xauto"; then
159     PKG_CHECK_MODULES(VALGRIND, valgrind >= 2.4.0,
160         [
161          requirement_eina="valgrind ${requirement_eina}"
162          have_valgrind="yes"
163         ],
164         [
165          AC_DEFINE(NVALGRIND, 1, [Valgrind support disabled])
166          if test "x$want_valgrind" = "xyes"; then
167             AC_MSG_ERROR([Valgrind >= 2.4.0 is required)])
168          fi
169         ]
170     )
171 else
172     AC_DEFINE(NVALGRIND, 1, [Valgrind support disabled])
173 fi
174
175 # Safety checks (avoid crashes on wrong api usage)
176 AC_ARG_ENABLE(safety-checks,
177    [AC_HELP_STRING([--disable-safety-checks], [disable safety checks for NULL pointers and like. @<:@default=enabled@:>@])],
178    [
179     if test "x${enableval}" = "xyes" ; then
180        have_safety_checks="yes"
181     else
182        have_safety_checks="no"
183     fi
184    ],
185    [have_safety_checks="yes"])
186
187 AC_MSG_CHECKING(whether to do safety checking on api parameters)
188 AC_MSG_RESULT($have_safety_checks)
189
190 AM_CONDITIONAL(SAFETY_CHECKS, test "x$have_safety_checks" = "xyes")
191 if test "x$have_safety_checks" = "xyes"; then
192   AC_DEFINE(EINA_SAFETY_CHECKS, 1, [disable safety checks for NULL pointers and like.])
193   EINA_CONFIGURE_SAFETY_CHECKS="#define EINA_SAFETY_CHECKS"
194 fi
195 AC_SUBST(EINA_CONFIGURE_SAFETY_CHECKS)
196
197 with_max_log_level="<unset>"
198 AC_ARG_WITH(internal-maximum-log-level,
199    [AC_HELP_STRING([--with-internal-maximum-log-level=NUMBER],
200                    [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.])],
201    [
202     if test "x${withval}" != "xno"; then
203        if echo "${withval}" | grep '^[[0-9]]\+$' >/dev/null 2>/dev/null; then
204           AC_MSG_NOTICE([ignoring any EINA_LOG() with level greater than ${withval}])
205           AC_DEFINE_UNQUOTED(EINA_LOG_LEVEL_MAXIMUM, ${withval}, [if set, logging is limited to this amount.])
206           with_max_log_level="${withval}"
207        else
208           AC_MSG_ERROR([--with-internal-maximum-log-level takes a decimal number, got "${withval}" instead.])
209        fi
210     fi
211     ], [:])
212
213 AC_ARG_ENABLE([amalgamation],
214    [AC_HELP_STRING([--enable-amalgamation], [enable generation of one single file with all source code in it, helps compiler optimizations.])],
215    [if test "x${enableval}" = "xyes"; then
216        do_amalgamation="yes"
217     else
218        do_amalgamation="no"
219     fi
220    ],
221    [do_amalgamation="no"]
222 )
223 AM_CONDITIONAL(EINA_AMALGAMATION, test "x${do_amalgamation}" = "xyes")
224
225 # Choose best memory pool
226 AC_ARG_ENABLE([default-mempool],
227    [AC_HELP_STRING([--enable-default-mempool], [Default memory allocator could be faster for some computer. @<:@default=disabled@:>@])],
228    [
229     if test "x${enableval}" = "xyes"; then
230        have_default_mempool="yes"
231     else
232        have_default_mempool="no"
233     fi
234    ],
235    [have_default_mempool="no"]
236 )
237 AC_MSG_CHECKING([whether to use default mempool allocator])
238 AC_MSG_RESULT([${have_default_mempool}])
239
240 if test "x${have_default_mempool}" = "xyes" ; then
241    EINA_CONFIGURE_DEFAULT_MEMPOOL="#define EINA_DEFAULT_MEMPOOL"
242 fi
243 AC_SUBST(EINA_CONFIGURE_DEFAULT_MEMPOOL)
244
245 # Report stringshare usage
246 AC_ARG_ENABLE([stringshare-usage],
247    [AC_HELP_STRING([--enable-stringshare-usage], [Report stringshare usage on stringshare shutdown. @<:@default=disabled@:>@])],
248    [
249     if test "x${enableval}" = "xyes"; then
250        have_stringshare_usage="yes"
251     else
252        have_stringshare_usage="no"
253     fi
254    ],
255    [have_stringshare_usage="no"]
256 )
257 AC_MSG_CHECKING([whether to report stringshare usage])
258 AC_MSG_RESULT([${have_stringshare_usage}])
259
260 if test "x${have_stringshare_usage}" = "xyes"; then
261    AC_DEFINE(EINA_STRINGSHARE_USAGE, 1, [Report Eina stringshare usage pattern])
262 fi
263
264 # Check if we want to benchmark on real data
265 enable_benchmark_e17="no"
266 AC_ARG_ENABLE([e17],
267    [AC_HELP_STRING([--enable-e17], [enable heavy benchmark @<:@default=no@:>@])],
268    [
269     if test "x${enableval}" = "xyes" ; then
270        enable_benchmark_e17="yes"
271     else
272        enable_benchmark_e17="no"
273     fi
274    ],
275    [enable_benchmark_e17="no"])
276
277 AC_MSG_CHECKING([whether e17 real data benchmark are built])
278 AC_MSG_RESULT([${enable_benchmark_e17}])
279
280 AM_CONDITIONAL(EINA_ENABLE_BENCHMARK_E17, test "x${enable_benchmark_e17}" = "xyes")
281
282
283 ### Checks for programs
284 AC_PROG_CC
285 AC_PROG_CXX
286
287 # pkg-config
288 PKG_PROG_PKG_CONFIG
289
290 # Check whether pkg-config supports Requires.private
291 if $PKG_CONFIG --atleast-pkgconfig-version 0.22; then
292    pkgconfig_requires_private="Requires.private"
293 else
294    pkgconfig_requires_private="Requires"
295 fi
296 AC_SUBST(pkgconfig_requires_private)
297
298 # doxygen program for documentation building
299
300 EFL_CHECK_DOXYGEN([build_doc="yes"], [build_doc="no"])
301
302
303 ### Checks for libraries
304
305 # Evil library for compilation on Windows CE
306
307 EFL_EINA_BUILD=""
308 case "$host_os" in
309    mingw*)
310       PKG_CHECK_MODULES([EVIL], [evil])
311       AC_DEFINE(HAVE_EVIL, 1, [Set to 1 if evil package is installed])
312       requirement_eina="evil"
313       EFL_EINA_BUILD="-DEFL_EINA_BUILD"
314    ;;
315 esac
316 AC_SUBST(EFL_EINA_BUILD)
317
318 # Check ememoa memory pool library
319
320 AC_ARG_ENABLE([ememoa],
321    [AC_HELP_STRING([--enable-ememoa], [build ememoa memory pool module @<:@default=yes@:>@])],
322    [
323     if test "x${enableval}" = "xyes" ; then
324        enable_ememoa="yes"
325     else
326        enable_ememoa="no"
327     fi
328    ],
329    [enable_ememoa="yes"]
330 )
331 AC_MSG_CHECKING([whether to use ememoa for memory pool])
332 AC_MSG_RESULT([$enable_ememoa])
333
334 if test "x${enable_ememoa}" = "xyes" ; then
335    PKG_CHECK_MODULES([EMEMOA],
336       [ememoa >= 0.0.26 ],
337       [enable_ememoa="yes"],
338       [enable_ememoa="no"]
339    )
340 fi
341
342
343 ### Checks for header files
344 AC_HEADER_ASSERT
345 AC_HEADER_DIRENT
346 AC_HEADER_TIME
347 AC_CHECK_HEADERS([unistd.h libgen.h])
348 EFL_CHECK_PATH_MAX
349
350 ### Checks for types
351 AC_CHECK_HEADER([inttypes.h],
352    [
353     EINA_CONFIGURE_HAVE_INTTYPES_H="#define EINA_HAVE_INTTYPES_H"
354     AC_DEFINE(HAVE_INTTYPES_H, 1, [Define to 1 if you have the <inttypes.h> header file.])
355    ])
356 AC_SUBST(EINA_CONFIGURE_HAVE_INTTYPES_H)
357
358 AC_CHECK_HEADER([stdint.h],
359    [
360     EINA_CONFIGURE_HAVE_STDINT_H="#define EINA_HAVE_STDINT_H"
361     AC_DEFINE(HAVE_STDINT_H, 1, [Define to 1 if you have the <stdint.h> header file.])
362    ])
363 AC_SUBST(EINA_CONFIGURE_HAVE_STDINT_H)
364
365 AC_CHECK_SIZEOF(wchar_t)
366 EINA_SIZEOF_WCHAR_T=$ac_cv_sizeof_wchar_t
367 AC_SUBST(EINA_SIZEOF_WCHAR_T)
368
369 ### Checks for structures
370
371
372 ### Checks for compiler characteristics
373 AC_C_CONST
374 AC_C_BIGENDIAN
375 AC_C_INLINE
376 AC_C___ATTRIBUTE__
377 AC_PROG_CC_STDC
378
379 have_wince="no"
380 have_win32="no"
381 EINA_CPPFLAGS=""
382 EINA_CFLAGS=""
383 case "$host_os" in
384    mingw32ce*)
385       EINA_CPPFLAGS="-D_WIN32_WCE=0x0420"
386       EINA_CFLAGS="${EVIL_CFLAGS}"
387       have_win32="yes"
388       have_wince="yes"
389       ;;
390    mingw*)
391       EINA_CPPFLAGS="-D_WIN32_WINNT=0x0501"
392       EINA_CFLAGS="${EVIL_CFLAGS}"
393       have_win32="yes"
394       ;;
395 esac
396 AM_CONDITIONAL([EINA_HAVE_WINCE], [test "x$have_wince" = "xyes"])
397 AM_CONDITIONAL([EINA_HAVE_WIN32], [test "x$have_win32" = "xyes"])
398
399 m4_ifdef([v_mic],
400    [
401     EFL_COMPILER_FLAG([-Wall])
402     EFL_COMPILER_FLAG([-W])
403    ])
404
405 EFL_COMPILER_FLAG([-Wshadow])
406
407 AC_SUBST(EINA_CPPFLAGS)
408 AC_SUBST(EINA_CFLAGS)
409
410
411 ### Checks for linker characteristics
412 EINA_LIBS=
413 lt_enable_auto_import=""
414 case "${host_os}" in
415    mingw*)
416       EINA_LIBS="-ldl ${EVIL_LIBS} -lm"
417       lt_enable_auto_import="-Wl,--enable-auto-import"
418    ;;
419    dragonfly*|openbsd*)
420       EINA_LIBS="-lm"
421    ;;
422    freebsd*|netbsd*)
423       EINA_LIBS="-lrt -lm"
424    ;;
425    darwin*)
426       EINA_LIBS="-lm"
427    ;;
428    cygwin*)
429       EINA_LIBS="-ldl -lm"
430    ;;
431    *)
432       EINA_LIBS="-ldl -lrt -lm"
433    ;;
434 esac
435 AC_SUBST(EINA_LIBS)
436 AC_SUBST(lt_enable_auto_import)
437
438 EFL_LINKER_FLAG([-fno-strict-aliasing])
439
440
441 ### Checks for library functions
442 AC_ISC_POSIX
443 AC_FUNC_ALLOCA
444 AC_CHECK_FUNCS(strlcpy)
445
446 #dlopen and dladdr
447 dlopen_libs=""
448 case "$host_os" in
449    mingw*)
450 # managed by evil
451       AC_DEFINE(HAVE_DLADDR)
452       ;;
453    *)
454       AC_CHECK_FUNCS([dlopen], [res="yes"], [res="no"])
455       if test "x${res}" = "xyes" ; then
456          AC_CHECK_FUNCS([dladdr], [AC_DEFINE(HAVE_DLADDR)])
457       else
458          AC_CHECK_LIB([dl], [dlopen], [res="yes"], [res="no"])
459          if test "x${res}" = "xyes" ; then
460             AC_CHECK_LIB([dl], [dladdr], [AC_DEFINE(HAVE_DLADDR)])
461             dlopen_libs="-ldl"
462          else
463             AC_MSG_ERROR([Cannot find dlopen])
464          fi
465       fi
466       ;;
467 esac
468 AC_SUBST(dlopen_libs)
469
470 EFL_CHECK_FNMATCH([], [AC_MSG_ERROR([Cannot find fnmatch()])])
471
472 # iconv library
473 have_iconv="no"
474 AC_ARG_WITH([iconv-link],
475    AC_HELP_STRING([--with-iconv-link=ICONV_LINK], [explicitly specify an iconv link option]),
476    [
477     LIBS="$withval $LIBS"
478     have_iconv="yes"
479    ])
480
481 AC_MSG_CHECKING(for explicit iconv link options)
482 if test "x${iconv_libs}" = "x" ; then
483    AC_MSG_RESULT([no explicit iconv link option])
484 else
485    AC_MSG_RESULT([$iconv_libs])
486 fi
487
488 if test "x${have_iconv}" = "xno" ; then
489    AC_CHECK_HEADERS([iconv.h], [have_iconv="yes"])
490
491    if test "x${have_iconv}" = "xyes" ; then
492       AC_MSG_CHECKING([whether iconv() is in libc])
493
494       AC_LINK_IFELSE(
495          [AC_LANG_PROGRAM(
496              [[
497 #include <stdlib.h>
498 #include <iconv.h>
499              ]],
500              [[
501 iconv_t ic;
502 size_t count = iconv(ic, NULL, NULL, NULL, NULL);
503              ]])],
504          [have_iconv="yes"],
505          [have_iconv="no"])
506
507       AC_MSG_RESULT([${have_iconv}])
508    fi
509
510    if test "x${have_iconv}" = "xno" ; then
511       AC_MSG_CHECKING([whether iconv() is in libiconv.a])
512
513       LIBS_save="${LIBS}"
514       LIBS="-liconv $LIBS"
515       AC_LINK_IFELSE(
516          [AC_LANG_PROGRAM(
517              [[
518 #include <stdlib.h>
519 #include <iconv.h>
520              ]],
521              [[
522 iconv_t ic;
523 size_t count;
524 count = iconv(ic, NULL, NULL, NULL, NULL);
525              ]])],
526          [have_iconv="yes"],
527          [
528           have_iconv="no"
529           LIBS=${LIBS_save}
530          ])
531
532       AC_MSG_RESULT([${have_iconv}])
533    fi
534
535    if test "x${have_iconv}" = "xno" ; then
536       AC_MSG_CHECKING([whether iconv() is in libiconv_plug.a])
537
538       LIBS_save="${LIBS}"
539       LIBS="-liconv_plug $LIBS"
540       AC_LINK_IFELSE(
541          [AC_LANG_PROGRAM(
542              [[
543 #include <stdlib.h>
544 #include <iconv.h>
545              ]],
546              [[
547 iconv_t ic;
548 size_t count = iconv(ic, NULL, NULL, NULL, NULL);
549              ]])],
550          [have_iconv="yes"],
551          [
552           have_iconv="no"
553           LIBS=${LIBS_save}
554          ])
555
556       AC_MSG_RESULT([${have_iconv}])
557    fi
558 fi
559
560 if test "x${have_iconv}" = "xyes" ; then
561    AC_DEFINE([HAVE_ICONV], [1], [Set to 1 if iconv library is installed])
562 fi
563
564 #check for dirfd API presence
565 have_dirfd="no"
566 AC_CHECK_FUNCS([dirfd], [have_dirfd="yes"], [])
567 if test "x${dirfd}" = "xyes"; then
568    AC_DEFINE(HAVE_DIRFD)
569 fi
570 AC_CHECK_FUNCS([openat], [AC_DEFINE(HAVE_OPENAT)], [])
571 AC_CHECK_FUNCS([statat], [AC_DEFINE(HAVE_STATAT)], [])
572 AC_CHECK_FUNCS([fpathconf], [AC_DEFINE(HAVE_FPATHCONF)], [])
573
574 ### Modules
575
576 if test "x${have_default_mempool}" = "xyes" ; then
577    enable_chained_pool="no"
578    enable_pass_through="static"
579 else
580    enable_chained_pool="static"
581    enable_pass_through="no"
582 fi
583
584 enable_one_big="static"
585
586 EINA_CHECK_MODULE([chained-pool],   [${enable_chained_pool}], [chained pool])
587 EINA_CHECK_MODULE([ememoa-fixed],   [${enable_ememoa}],       [ememoa fixed])
588 EINA_CHECK_MODULE([ememoa-unknown], [${enable_ememoa}],       [ememoa unknown])
589 EINA_CHECK_MODULE([fixed-bitmap],   [no],                     [fixed bitmap])
590 EINA_CHECK_MODULE([pass-through],   [${enable_pass_through}], [pass through])
591 EINA_CHECK_MODULE([buddy],          [no],                     [buddy])
592 EINA_CHECK_MODULE([one-big],        [${enable_one_big}],      [one big])
593
594 ### Make the debug preprocessor configurable
595
596 ### Unit tests, coverage and benchmarking
597
598 EFL_CHECK_TESTS([enable_tests="yes"], [enable_tests="no"])
599
600 EFL_CHECK_COVERAGE([${enable_tests}], [enable_coverage="yes"], [enable_coverage="no"])
601 EINA_CFLAGS="${EINA_CFLAGS} ${EFL_COVERAGE_CFLAGS}"
602 EINA_LIBS="${EINA_LIBS} ${EFL_COVERAGE_LIBS}"
603 if test "x$enable_coverage" = "xyes" ; then
604    EINA_CFLAGS="${EINA_CFLAGS} ${EFL_DEBUG_CFLAGS}"
605 fi
606
607 EFL_CHECK_BENCHMARK([enable_benchmark="yes"], [enable_benchmark="no"])
608 EINA_BENCH_MODULE([glib], [${enable_benchmark}], [glib-2.0], [enable_benchmark_glib="yes"], [enable_benchmark_glib="no"])
609 if test -n "$CXX" && test "x$enable_benchmark" = "xyes" ; then
610    AC_DEFINE_UNQUOTED([CITYHASH_BENCH], [1], [enable bench tests for google hash method])
611 fi
612 AM_CONDITIONAL([CITYHASH_BENCH], [test -n "$CXX" && test "x$enable_benchmark" = "xyes"])
613
614 AC_SUBST(requirement_eina)
615
616 ### Create the .pc.in file according to the major version
617 #cat > ${srcdir}/eina-${VMAJ}.pc.in << EOF
618 #prefix=@prefix@
619 #exec_prefix=@exec_prefix@
620 #libdir=@libdir@
621 #includedir=@includedir@
622 #
623 #Name: Eina
624 #Description: A Library that implements fast data types and miscellaneous tools
625 #Requires:
626 #Version: @VERSION@
627 #Libs: -L${libdir} -leina
628 #Libs.private: -ldl
629 #Cflags: -I${includedir}/eina-@VMAJ@ -I${includedir}/eina-@VMAJ@/eina
630 #EOF
631
632 AC_CONFIG_FILES([
633 Makefile
634 eina.pc
635 eina.spec
636 doc/Makefile
637 src/Makefile
638 src/include/Makefile
639 src/include/eina_config.h
640 src/lib/Makefile
641 src/modules/Makefile
642 src/modules/mp/Makefile
643 src/modules/mp/chained_pool/Makefile
644 src/modules/mp/ememoa_fixed/Makefile
645 src/modules/mp/ememoa_unknown/Makefile
646 src/modules/mp/pass_through/Makefile
647 src/modules/mp/fixed_bitmap/Makefile
648 src/modules/mp/buddy/Makefile
649 src/modules/mp/one_big/Makefile
650 src/tests/Makefile
651 ])
652
653 AC_OUTPUT
654
655 #####################################################################
656 ## Info
657
658 echo
659 echo
660 echo
661 echo "------------------------------------------------------------------------"
662 echo "$PACKAGE $VERSION"
663 echo "------------------------------------------------------------------------"
664 echo
665 echo
666 echo "Configuration Options Summary:"
667 echo
668 echo "  Magic debug..........: ${have_magic_debug}"
669 echo "  Safety checks........: ${have_safety_checks}"
670 echo "  Maximum log level....: ${with_max_log_level}"
671 echo "  Report string usage..: ${have_stringshare_usage}"
672 echo "  Valgrind support.....: ${have_valgrind}"
673 echo "  Default mempool......: ${have_default_mempool}"
674 echo "  Thread Support.......: ${have_threads}"
675 if test "${have_threads}" = "POSIX" ; then
676 echo "    spinlock...........: ${have_posix_threads_spinlock}"
677 echo "    debug usage........: ${have_debug_threads}"
678 fi
679 echo "  Amalgamation.........: ${do_amalgamation}"
680 echo "  Iconv support........: ${have_iconv}"
681 echo "  File dirfd...........: ${have_dirfd}"
682 echo
683 echo "  Documentation........: ${build_doc}"
684 echo "  Tests................: ${enable_tests}"
685 echo "  Coverage.............: ${enable_coverage}"
686 echo "  Benchmark............: ${enable_benchmark}"
687 if test "x${enable_benchmark}" = "xyes" ; then
688 echo "    Glib...............: ${enable_benchmark_glib}"
689 echo "    E17 real data......: ${enable_benchmark_e17}"
690 fi
691 echo
692 echo "  CPU Specific Extensions:"
693 echo "    MMX................: ${have_mmx}"
694 echo "    SSE................: ${have_sse}"
695 echo "    SSE2...............: ${have_sse2}"
696 echo "    ALTIVEC............: ${have_altivec}"
697 echo
698 echo "  Memory pools:"
699 echo "    Chained pool.......: ${enable_chained_pool}"
700 echo "    Ememoa fixed.......: ${enable_ememoa_fixed}"
701 echo "    Ememoa unknown.....: ${enable_ememoa_unknown}"
702 echo "    Fixed bitmap.......: ${enable_fixed_bitmap}"
703 echo "    Pass through.......: ${enable_pass_through}"
704 echo "    Buddy..............: ${enable_buddy}"
705 echo "    One big............: ${enable_one_big}"
706 echo
707 echo "Compilation............: make (or gmake)"
708 echo "  CPPFLAGS.............: $CPPFLAGS"
709 echo "  CFLAGS...............: $CFLAGS"
710 echo "  LDFLAGS..............: $LDFLAGS"
711 echo
712 echo "Installation...........: make install (as root if needed, with 'su' or 'sudo')"
713 echo "  prefix...............: $prefix"
714 echo
715 EFL_FORM_VOLTRON