diff options
author | Gustavo Sverzut Barbieri <barbieri@gmail.com> | 2012-10-10 18:43:15 +0000 |
---|---|---|
committer | Gustavo Sverzut Barbieri <barbieri@gmail.com> | 2012-10-10 18:43:15 +0000 |
commit | 0b19ba7bc23ce175537a29c2816b3ef12e95ed2d (patch) | |
tree | 0efdfaa8435a14f63a2070eb0ec75b25faed49d7 /configure.ac | |
parent | b82e878656f76195be22574eae06b59d92b3c24c (diff) |
efl: introduce build profile, simplify options.
Introduced --with-profile={dev,release} that will simplify how to set
build options of EFL.
NOTE-1: specific e17 benchmark is now gone, it will always be built
and is the default benchmark for eina. If we want to have a faster
benchmark in the future, just add a command line option for
eina_suite.
NOTE-2: valgrind build is broken as it needs -fPIC. Will get to it
later. Likely someone needs to revisit the eina mempools for valgrind
and other basic tools (eo? likely evas).
SVN revision: 77771
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 176 |
1 files changed, 36 insertions, 140 deletions
diff --git a/configure.ac b/configure.ac index 69f3c1db3f..f0edd7f056 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -85,6 +85,13 @@ AC_SUBST([requirements_pc_eet]) | |||
85 | 85 | ||
86 | AC_CANONICAL_HOST | 86 | AC_CANONICAL_HOST |
87 | 87 | ||
88 | AC_ARG_WITH([profile], | ||
89 | [AC_HELP_STRING([--with-profile=PROFILE], | ||
90 | [use the predefined build profile, one of: dev, release. | ||
91 | @<:@default=dev@:>@])], | ||
92 | [build_profile=${withval}], | ||
93 | [build_profile=dev]) | ||
94 | |||
88 | # TODO: move me to m4 file that setups module/so related variables | 95 | # TODO: move me to m4 file that setups module/so related variables |
89 | have_wince="no" | 96 | have_wince="no" |
90 | have_win32="no" | 97 | have_win32="no" |
@@ -123,21 +130,6 @@ AM_CONDITIONAL([HAVE_WINDOWS], [test "x${have_windows}" = "xyes"]) | |||
123 | #### Additional options to configure | 130 | #### Additional options to configure |
124 | 131 | ||
125 | 132 | ||
126 | |||
127 | # Assert or fail. | ||
128 | |||
129 | AC_ARG_ENABLE([assert], | ||
130 | [AC_HELP_STRING([--enable-assert], [enable assert, @<:@default=no@:>@])], | ||
131 | [ | ||
132 | if test "x${enableval}" = "xyes" ; then | ||
133 | prefer_assert="yes" | ||
134 | else | ||
135 | prefer_assert="no" | ||
136 | fi | ||
137 | ], | ||
138 | [prefer_assert="no"]) | ||
139 | |||
140 | |||
141 | #### Checks for programs | 133 | #### Checks for programs |
142 | 134 | ||
143 | ### libtool | 135 | ### libtool |
@@ -300,41 +292,30 @@ AC_MSG_NOTICE([Eina checks]) | |||
300 | 292 | ||
301 | ### Additional options to configure | 293 | ### Additional options to configure |
302 | 294 | ||
303 | # Magic debug | 295 | have_magic_debug="yes" |
304 | AC_ARG_ENABLE([magic-debug], | 296 | have_safety_checks="yes" |
305 | [AC_HELP_STRING([--disable-magic-debug], [disable magic debug of eina structure @<:@default=enabled@:>@])], | 297 | want_log="yes" |
306 | [ | 298 | case "$build_profile" in |
307 | if test "x${enableval}" = "xyes" ; then | 299 | dev) |
308 | have_magic_debug="yes" | 300 | with_max_log_level="" |
309 | else | 301 | have_stringshare_usage="yes" |
310 | have_magic_debug="no" | 302 | want_valgrind="no" # TODO: "yes" is not working: relocation R_X86_64_32S against `vgPlain_interim_stack' can not be used when making a shared object; recompile with -fPIC |
311 | fi | 303 | want_debug_malloc="yes" |
312 | ], | 304 | ;; |
313 | [have_magic_debug="yes"]) | 305 | |
314 | 306 | release) | |
315 | AC_MSG_CHECKING([whether magic debug is enable]) | 307 | with_max_log_level="3" |
316 | AC_MSG_RESULT([${have_magic_debug}]) | 308 | have_stringshare_usage="no" |
309 | want_valgrind="no" | ||
310 | want_debug_malloc="no" | ||
311 | ;; | ||
312 | esac | ||
317 | 313 | ||
318 | if test "x${have_magic_debug}" = "xyes" ; then | 314 | if test "x${have_magic_debug}" = "xyes" ; then |
319 | EINA_CONFIGURE_MAGIC_DEBUG="#define EINA_MAGIC_DEBUG" | 315 | EINA_CONFIGURE_MAGIC_DEBUG="#define EINA_MAGIC_DEBUG" |
320 | fi | 316 | fi |
321 | AC_SUBST([EINA_CONFIGURE_MAGIC_DEBUG]) | 317 | AC_SUBST([EINA_CONFIGURE_MAGIC_DEBUG]) |
322 | 318 | ||
323 | # Safety checks (avoid crashes on wrong api usage) | ||
324 | AC_ARG_ENABLE([safety-checks], | ||
325 | [AC_HELP_STRING([--disable-safety-checks], [disable safety checks for NULL pointers and like. @<:@default=enabled@:>@])], | ||
326 | [ | ||
327 | if test "x${enableval}" = "xyes" ; then | ||
328 | have_safety_checks="yes" | ||
329 | else | ||
330 | have_safety_checks="no" | ||
331 | fi | ||
332 | ], | ||
333 | [have_safety_checks="yes"]) | ||
334 | |||
335 | AC_MSG_CHECKING([whether to do safety checking on api parameters]) | ||
336 | AC_MSG_RESULT([${have_safety_checks}]) | ||
337 | |||
338 | if test "x${have_safety_checks}" = "xyes" ; then | 319 | if test "x${have_safety_checks}" = "xyes" ; then |
339 | AC_DEFINE([EINA_SAFETY_CHECKS], [1], [disable safety checks for NULL pointers and like.]) | 320 | AC_DEFINE([EINA_SAFETY_CHECKS], [1], [disable safety checks for NULL pointers and like.]) |
340 | EINA_CONFIGURE_SAFETY_CHECKS="#define EINA_SAFETY_CHECKS" | 321 | EINA_CONFIGURE_SAFETY_CHECKS="#define EINA_SAFETY_CHECKS" |
@@ -343,23 +324,14 @@ AC_SUBST([EINA_CONFIGURE_SAFETY_CHECKS]) | |||
343 | 324 | ||
344 | AM_CONDITIONAL([SAFETY_CHECKS], [test "x$have_safety_checks" = "xyes"]) | 325 | AM_CONDITIONAL([SAFETY_CHECKS], [test "x$have_safety_checks" = "xyes"]) |
345 | 326 | ||
346 | # Miximum log level | 327 | if test -n "$with_max_log_level"; then |
347 | with_max_log_level="<unset>" | 328 | AC_MSG_NOTICE([ignoring any EINA_LOG() with level greater than ${with_max_log_level}]) |
348 | AC_ARG_WITH([internal-maximum-log-level], | 329 | AC_DEFINE_UNQUOTED([EINA_LOG_LEVEL_MAXIMUM], [${with_max_log_level}], [if set, logging is limited to this amount.]) |
349 | [AC_HELP_STRING([--with-internal-maximum-log-level=NUMBER], | 330 | fi |
350 | [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.])], | 331 | |
351 | [ | 332 | if test "x${have_stringshare_usage}" = "xyes"; then |
352 | if test "x${withval}" != "xno" ; then | 333 | AC_DEFINE([EINA_STRINGSHARE_USAGE], [1], [Report Eina stringshare usage pattern]) |
353 | if echo "${withval}" | grep -E '^[[0-9]]+$' >/dev/null 2>/dev/null; then | 334 | fi |
354 | AC_MSG_NOTICE([ignoring any EINA_LOG() with level greater than ${withval}]) | ||
355 | AC_DEFINE_UNQUOTED([EINA_LOG_LEVEL_MAXIMUM], [${withval}], [if set, logging is limited to this amount.]) | ||
356 | with_max_log_level="${withval}" | ||
357 | else | ||
358 | AC_MSG_ERROR([--with-internal-maximum-log-level takes a decimal number, got "${withval}" instead.]) | ||
359 | fi | ||
360 | fi | ||
361 | ], | ||
362 | [:]) | ||
363 | 335 | ||
364 | # Choose best memory pool | 336 | # Choose best memory pool |
365 | AC_ARG_ENABLE([default-mempool], | 337 | AC_ARG_ENABLE([default-mempool], |
@@ -381,58 +353,6 @@ if test "x${have_default_mempool}" = "xyes" ; then | |||
381 | fi | 353 | fi |
382 | AC_SUBST([EINA_CONFIGURE_DEFAULT_MEMPOOL]) | 354 | AC_SUBST([EINA_CONFIGURE_DEFAULT_MEMPOOL]) |
383 | 355 | ||
384 | # Report stringshare usage | ||
385 | AC_ARG_ENABLE([stringshare-usage], | ||
386 | [AC_HELP_STRING([--enable-stringshare-usage], [Report stringshare usage on stringshare shutdown. @<:@default=disabled@:>@])], | ||
387 | [ | ||
388 | if test "x${enableval}" = "xyes"; then | ||
389 | have_stringshare_usage="yes" | ||
390 | else | ||
391 | have_stringshare_usage="no" | ||
392 | fi | ||
393 | ], | ||
394 | [have_stringshare_usage="no"] | ||
395 | ) | ||
396 | AC_MSG_CHECKING([whether to report stringshare usage]) | ||
397 | AC_MSG_RESULT([${have_stringshare_usage}]) | ||
398 | |||
399 | if test "x${have_stringshare_usage}" = "xyes"; then | ||
400 | AC_DEFINE([EINA_STRINGSHARE_USAGE], [1], [Report Eina stringshare usage pattern]) | ||
401 | fi | ||
402 | |||
403 | # Check if we want to benchmark on real data | ||
404 | AC_ARG_ENABLE([e17], | ||
405 | [AC_HELP_STRING([--enable-e17], [enable heavy benchmark @<:@default=no@:>@])], | ||
406 | [ | ||
407 | if test "x${enableval}" = "xyes" ; then | ||
408 | enable_benchmark_e17="yes" | ||
409 | else | ||
410 | enable_benchmark_e17="no" | ||
411 | fi | ||
412 | ], | ||
413 | [enable_benchmark_e17="no"]) | ||
414 | |||
415 | AC_MSG_CHECKING([whether e17 real data benchmark are built]) | ||
416 | AC_MSG_RESULT([${enable_benchmark_e17}]) | ||
417 | |||
418 | AM_CONDITIONAL([EINA_ENABLE_BENCHMARK_E17], [test "x${enable_benchmark_e17}" = "xyes"]) | ||
419 | |||
420 | # Valgrind | ||
421 | |||
422 | AC_ARG_ENABLE([valgrind], | ||
423 | [AC_HELP_STRING([--enable-valgrind], [improve valgrind support by hinting it of our memory usages, having it to report proper mempool leaks. @<:@default=no@:>@])], | ||
424 | [ | ||
425 | if test "x${enableval}" = "xyes" ; then | ||
426 | want_valgrind="yes" | ||
427 | else | ||
428 | want_valgrind="no" | ||
429 | fi | ||
430 | ], | ||
431 | [want_valgrind="no"]) | ||
432 | |||
433 | AC_MSG_CHECKING([whether to enable build with valgrind]) | ||
434 | AC_MSG_RESULT([${want_valgrind}]) | ||
435 | |||
436 | ### Checks for programs | 356 | ### Checks for programs |
437 | 357 | ||
438 | ### Checks for libraries | 358 | ### Checks for libraries |
@@ -482,7 +402,7 @@ AC_SUBST([EINA_CONFIGURE_HAVE_EXOTIC]) | |||
482 | 402 | ||
483 | # Valgrind | 403 | # Valgrind |
484 | 404 | ||
485 | if test "x${want_valgrind}" = "xyes" || test "x${want_valgrind}" = "xauto"; then | 405 | if test "x${want_valgrind}" = "xyes"; then |
486 | PKG_CHECK_MODULES([VALGRIND], [valgrind >= 2.4.0], | 406 | PKG_CHECK_MODULES([VALGRIND], [valgrind >= 2.4.0], |
487 | [ | 407 | [ |
488 | have_valgrind="yes" | 408 | have_valgrind="yes" |
@@ -491,41 +411,16 @@ if test "x${want_valgrind}" = "xyes" || test "x${want_valgrind}" = "xauto"; then | |||
491 | ], | 411 | ], |
492 | [ | 412 | [ |
493 | have_valgrind="no" | 413 | have_valgrind="no" |
494 | AC_DEFINE([NVALGRIND], [1], [Valgrind support disabled]) | 414 | AC_MSG_ERROR([Valgrind >= 2.4.0 is required]) |
495 | if test "x${want_valgrind}" = "xyes"; then | ||
496 | AC_MSG_ERROR([Valgrind >= 2.4.0 is required]) | ||
497 | fi | ||
498 | ]) | 415 | ]) |
499 | else | 416 | else |
500 | AC_DEFINE([NVALGRIND], [1], [Valgrind support disabled]) | 417 | AC_DEFINE([NVALGRIND], [1], [Valgrind support disabled]) |
501 | fi | 418 | fi |
502 | 419 | ||
503 | AC_ARG_ENABLE([debug-malloc], | ||
504 | [AC_HELP_STRING([--enable-debug-malloc], [enable debugging of malloc usage overhead in our allocator @<:@default=enabled@:>@])], | ||
505 | [ | ||
506 | if test "x${enableval}" = "xyes" ; then | ||
507 | want_debug_malloc="yes" | ||
508 | else | ||
509 | want_debug_malloc="no" | ||
510 | fi | ||
511 | ], | ||
512 | [want_debug_malloc="no"]) | ||
513 | |||
514 | if test "x${ac_cv_func_malloc_usable_size}" = "xyes" && test "x${want_debug_malloc}" = "xyes"; then | 420 | if test "x${ac_cv_func_malloc_usable_size}" = "xyes" && test "x${want_debug_malloc}" = "xyes"; then |
515 | AC_DEFINE([EINA_DEBUG_MALLOC], [1], [Turn on debugging overhead in mempool]) | 421 | AC_DEFINE([EINA_DEBUG_MALLOC], [1], [Turn on debugging overhead in mempool]) |
516 | fi | 422 | fi |
517 | 423 | ||
518 | AC_ARG_ENABLE([log], | ||
519 | [AC_HELP_STRING([--disable-log], [disable Eina_Log infrastructure completly @<:@default=enabled@:>@])], | ||
520 | [ | ||
521 | if test "x${enableval}" = "xyes" ; then | ||
522 | want_log="yes" | ||
523 | else | ||
524 | want_log="no" | ||
525 | fi | ||
526 | ], | ||
527 | [want_log="yes"]) | ||
528 | |||
529 | ## Modules | 424 | ## Modules |
530 | 425 | ||
531 | # Check ememoa memory pool library | 426 | # Check ememoa memory pool library |
@@ -1190,6 +1085,7 @@ echo | |||
1190 | echo "Configuration Options Summary:" | 1085 | echo "Configuration Options Summary:" |
1191 | echo | 1086 | echo |
1192 | echo " OS...................: ${host_os}" | 1087 | echo " OS...................: ${host_os}" |
1088 | echo " Build Profile........: ${build_profile}" | ||
1193 | if test "x${have_windows}" = "xyes" ; then | 1089 | if test "x${have_windows}" = "xyes" ; then |
1194 | echo " Windows version......: ${_efl_windows_version}" | 1090 | echo " Windows version......: ${_efl_windows_version}" |
1195 | fi | 1091 | fi |