diff options
Diffstat (limited to '')
-rw-r--r-- | libraries/eina/configure.ac | 184 |
1 files changed, 136 insertions, 48 deletions
diff --git a/libraries/eina/configure.ac b/libraries/eina/configure.ac index 5e2fab2..367ffe1 100644 --- a/libraries/eina/configure.ac +++ b/libraries/eina/configure.ac | |||
@@ -2,11 +2,11 @@ | |||
2 | ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## | 2 | ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## |
3 | m4_define([v_maj], [1]) | 3 | m4_define([v_maj], [1]) |
4 | m4_define([v_min], [1]) | 4 | m4_define([v_min], [1]) |
5 | m4_define([v_mic], [0]) | 5 | m4_define([v_mic], [99]) |
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'])) | 6 | m4_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'])) |
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']))]) | 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 | 8 | ##-- When released, remove the dnl on the below line |
9 | m4_undefine([v_rev]) | 9 | dnl m4_undefine([v_rev]) |
10 | ##-- When doing snapshots - change soname. remove dnl on below line | 10 | ##-- When doing snapshots - change soname. remove dnl on below line |
11 | dnl m4_define([relname], [ver-pre-svn-07]) | 11 | dnl m4_define([relname], [ver-pre-svn-07]) |
12 | dnl m4_define([v_rel], [-release relname]) | 12 | dnl m4_define([v_rel], [-release relname]) |
@@ -352,41 +352,6 @@ PKG_CHECK_MODULES([ECORE_EVAS], | |||
352 | 352 | ||
353 | AM_CONDITIONAL([BUILD_TILER_EXAMPLE], [test "x${build_tiler_example}" = "xyes"]) | 353 | AM_CONDITIONAL([BUILD_TILER_EXAMPLE], [test "x${build_tiler_example}" = "xyes"]) |
354 | 354 | ||
355 | |||
356 | ### Checks for header files | ||
357 | AC_HEADER_ASSERT | ||
358 | AC_HEADER_DIRENT | ||
359 | AC_HEADER_TIME | ||
360 | EFL_CHECK_PATH_MAX | ||
361 | AC_CHECK_HEADERS([unistd.h libgen.h inttypes.h stdint.h sys/types.h siginfo.h]) | ||
362 | |||
363 | if test "x${ac_cv_header_inttypes_h}" = "xyes" ; then | ||
364 | EINA_CONFIGURE_HAVE_INTTYPES_H="#define EINA_HAVE_INTTYPES_H" | ||
365 | AC_DEFINE([HAVE_INTTYPES_H], [1], [Define to 1 if you have the <inttypes.h> header file.]) | ||
366 | fi | ||
367 | AC_SUBST([EINA_CONFIGURE_HAVE_INTTYPES_H]) | ||
368 | |||
369 | if test "x${ac_cv_header_inttypes_h}" = "xyes" ; then | ||
370 | EINA_CONFIGURE_HAVE_STDINT_H="#define EINA_HAVE_STDINT_H" | ||
371 | AC_DEFINE([HAVE_STDINT_H], [1], [Define to 1 if you have the <stdint.h> header file.]) | ||
372 | fi | ||
373 | AC_SUBST([EINA_CONFIGURE_HAVE_STDINT_H]) | ||
374 | |||
375 | ### Checks for types | ||
376 | |||
377 | AC_CHECK_SIZEOF([wchar_t]) | ||
378 | EINA_SIZEOF_WCHAR_T=$ac_cv_sizeof_wchar_t | ||
379 | AC_SUBST([EINA_SIZEOF_WCHAR_T]) | ||
380 | AC_CHECK_TYPES([siginfo_t], [], [], | ||
381 | [[#include <signal.h> | ||
382 | #if HAVE_SIGINFO_H | ||
383 | # include <siginfo.h> | ||
384 | #endif | ||
385 | ]]) | ||
386 | |||
387 | ### Checks for structures | ||
388 | |||
389 | |||
390 | ### Checks for compiler characteristics | 355 | ### Checks for compiler characteristics |
391 | AC_C_CONST | 356 | AC_C_CONST |
392 | AC_C_BIGENDIAN | 357 | AC_C_BIGENDIAN |
@@ -422,6 +387,15 @@ m4_ifdef([v_mic], | |||
422 | 387 | ||
423 | EFL_COMPILER_FLAG([-Wshadow]) | 388 | EFL_COMPILER_FLAG([-Wshadow]) |
424 | 389 | ||
390 | case "$host_vendor" in | ||
391 | ps3*) | ||
392 | PKG_CHECK_MODULES([ESCAPE], [escape]) | ||
393 | AC_DEFINE(HAVE_ESCAPE, 1, [Set to 1 if evil package is installed]) | ||
394 | requirement_eina="escape" | ||
395 | EINA_CFLAGS="${ESCAPE_CFLAGS} ${EINA_CFLAGS}" | ||
396 | ;; | ||
397 | esac | ||
398 | |||
425 | AC_SUBST([EINA_CPPFLAGS]) | 399 | AC_SUBST([EINA_CPPFLAGS]) |
426 | AC_SUBST([EINA_CFLAGS]) | 400 | AC_SUBST([EINA_CFLAGS]) |
427 | 401 | ||
@@ -450,26 +424,112 @@ case "${host_os}" in | |||
450 | EINA_LIBS="-ldl -lrt -lm" | 424 | EINA_LIBS="-ldl -lrt -lm" |
451 | ;; | 425 | ;; |
452 | esac | 426 | esac |
453 | AC_SUBST([EINA_LIBS]) | ||
454 | AC_SUBST([lt_enable_auto_import]) | ||
455 | |||
456 | case "$host_vendor" in | 427 | case "$host_vendor" in |
457 | ps3*) | 428 | ps3*) |
458 | PKG_CHECK_MODULES([ESCAPE], [escape]) | 429 | # Escape had already been checked to exist |
459 | AC_DEFINE(HAVE_ESCAPE, 1, [Set to 1 if evil package is installed]) | ||
460 | requirement_eina="escape" | ||
461 | EINA_LIBS="${ESCAPE_LIBS}" | 430 | EINA_LIBS="${ESCAPE_LIBS}" |
462 | EINA_CFLAGS="${ESCAPE_CFLAGS} ${EINA_CFLAGS}" | ||
463 | ;; | 431 | ;; |
464 | esac | 432 | esac |
433 | AC_SUBST([EINA_LIBS]) | ||
434 | AC_SUBST([lt_enable_auto_import]) | ||
465 | 435 | ||
466 | EFL_LINKER_FLAG([-fno-strict-aliasing]) | 436 | EFL_LINKER_FLAG([-fno-strict-aliasing]) |
467 | 437 | ||
438 | CFLAGS="${CFLAGS} ${EINA_CFLAGS}" | ||
439 | LDFLAGS="${LDFLAGS} ${EINA_LDFLAGS}" | ||
440 | LIBS="${LIBS} ${EINA_LIBS}" | ||
441 | |||
442 | ### Checks for header files | ||
443 | AC_HEADER_ASSERT | ||
444 | AC_HEADER_TIME | ||
445 | EFL_CHECK_PATH_MAX | ||
446 | AC_CHECK_HEADERS([unistd.h libgen.h inttypes.h stdint.h sys/types.h siginfo.h strings.h sys/mman.h]) | ||
447 | |||
448 | if test "x${ac_cv_header_inttypes_h}" = "xyes" ; then | ||
449 | EINA_CONFIGURE_HAVE_INTTYPES_H="#define EINA_HAVE_INTTYPES_H" | ||
450 | AC_DEFINE([HAVE_INTTYPES_H], [1], [Define to 1 if you have the <inttypes.h> header file.]) | ||
451 | fi | ||
452 | AC_SUBST([EINA_CONFIGURE_HAVE_INTTYPES_H]) | ||
453 | |||
454 | if test "x${ac_cv_header_inttypes_h}" = "xyes" ; then | ||
455 | EINA_CONFIGURE_HAVE_STDINT_H="#define EINA_HAVE_STDINT_H" | ||
456 | AC_DEFINE([HAVE_STDINT_H], [1], [Define to 1 if you have the <stdint.h> header file.]) | ||
457 | fi | ||
458 | AC_SUBST([EINA_CONFIGURE_HAVE_STDINT_H]) | ||
459 | |||
460 | ### Checks for types | ||
461 | |||
462 | AC_CHECK_SIZEOF([wchar_t]) | ||
463 | EINA_SIZEOF_WCHAR_T=$ac_cv_sizeof_wchar_t | ||
464 | AC_SUBST([EINA_SIZEOF_WCHAR_T]) | ||
465 | AC_CHECK_TYPES([siginfo_t], [], [], | ||
466 | [[#include <signal.h> | ||
467 | #if HAVE_SIGINFO_H | ||
468 | # include <siginfo.h> | ||
469 | #endif | ||
470 | ]]) | ||
471 | |||
472 | ### Check if dirent.h is usable | ||
473 | |||
474 | AC_CHECK_TYPES([struct dirent], [have_dirent="yes"], [have_dirent="no"], | ||
475 | [[#include <dirent.h> | ||
476 | ]]) | ||
477 | |||
478 | if test "x${have_dirent}" = "xyes" ; then | ||
479 | EINA_CONFIGURE_HAVE_DIRENT_H="#define EINA_HAVE_DIRENT_H" | ||
480 | AC_DEFINE([HAVE_DIRENT_H], [1], [Define to 1 if you have a valid <dirent.h> header file.]) | ||
481 | fi | ||
482 | AC_SUBST([EINA_CONFIGURE_HAVE_DIRENT_H]) | ||
468 | 483 | ||
469 | ### Checks for library functions | 484 | ### Checks for library functions |
470 | AC_ISC_POSIX | 485 | AC_ISC_POSIX |
471 | AC_FUNC_ALLOCA | 486 | AC_FUNC_ALLOCA |
472 | AC_CHECK_FUNCS([strlcpy dirfd openat fstatat fpathconf execvp]) | 487 | AC_CHECK_FUNCS([strlcpy openat fstatat fpathconf execvp]) |
488 | |||
489 | AC_MSG_CHECKING([for dirfd]) | ||
490 | AC_LINK_IFELSE( | ||
491 | [ | ||
492 | AC_LANG_PROGRAM( | ||
493 | [[ | ||
494 | #include <dirent.h> | ||
495 | ]], | ||
496 | [[ | ||
497 | int main(void) | ||
498 | { | ||
499 | DIR *dirp; | ||
500 | return dirfd(dirp); | ||
501 | } | ||
502 | ]]) | ||
503 | ], | ||
504 | [have_dirfd="yes"], | ||
505 | [have_dirfd="no"]) | ||
506 | |||
507 | AC_MSG_RESULT([${have_dirfd}]) | ||
508 | |||
509 | if test "x${have_dirfd}" = "xyes" ; then | ||
510 | AC_DEFINE([HAVE_DIRFD], [1], [ Define to 1 if you have the `dirfd' function or macro.]) | ||
511 | fi | ||
512 | |||
513 | # check debug information for malloc | ||
514 | AC_CHECK_FUNCS([malloc_usable_size], [malloc_true_size="yes"], [malloc_true_size="no"]) | ||
515 | if test "x${malloc_true_size}" = "xyes" ; then | ||
516 | AC_DEFINE([HAVE_MALLOC_USABLE_SIZE], [1], [We will be able to know the exact amount of wasted memory]) | ||
517 | fi | ||
518 | |||
519 | want_debug_malloc="no" | ||
520 | AC_ARG_ENABLE([debug-malloc], | ||
521 | [AC_HELP_STRING([--enable-debug-malloc], [enable debugging of malloc usage overhead in our allocator @<:@default=enabled@:>@])], | ||
522 | [ | ||
523 | if test "x${enableval}" = "xyes" ; then | ||
524 | want_debug_malloc="yes" | ||
525 | else | ||
526 | want_debug_malloc="no" | ||
527 | fi | ||
528 | ], [want_debug_malloc="no"]) | ||
529 | |||
530 | if test "x${malloc_true_size}" = "xyes" -a "x${want_debug_malloc}" = "xyes"; then | ||
531 | AC_DEFINE([EINA_DEBUG_MALLOC], [1], [Turn on debugging overhead in mempool]) | ||
532 | fi | ||
473 | 533 | ||
474 | # dlopen and dladdr | 534 | # dlopen and dladdr |
475 | dlopen_libs="" | 535 | dlopen_libs="" |
@@ -496,7 +556,34 @@ case "$host_os" in | |||
496 | esac | 556 | esac |
497 | AC_SUBST([dlopen_libs]) | 557 | AC_SUBST([dlopen_libs]) |
498 | 558 | ||
499 | EFL_CHECK_FNMATCH([], [AC_MSG_ERROR([Cannot find fnmatch()])]) | 559 | have_log="yes" |
560 | EFL_CHECK_FNMATCH([have_log="yes"], [have_log="no"]) | ||
561 | |||
562 | want_log="yes" | ||
563 | AC_ARG_ENABLE([log], | ||
564 | [AC_HELP_STRING([--disable-log], [disable Eina_Log infrastructure completly @<:@default=enabled@:>@])], | ||
565 | [ | ||
566 | if test "x${enableval}" = "xyes" ; then | ||
567 | want_log="yes" | ||
568 | else | ||
569 | want_log="no" | ||
570 | fi | ||
571 | ], | ||
572 | [want_log="yes"]) | ||
573 | |||
574 | enable_log="no" | ||
575 | if test "x${have_log}" = xyes -a "x${want_log}" = xyes; then | ||
576 | enable_log="yes" | ||
577 | fi | ||
578 | |||
579 | AC_MSG_CHECKING([wether to build Eina_Log infrastructure]) | ||
580 | AC_MSG_RESULT([${enable_log}]) | ||
581 | |||
582 | if test "x${enable_log}" = "xyes"; then | ||
583 | EINA_CONFIGURE_ENABLE_LOG="#define EINA_ENABLE_LOG" | ||
584 | AC_DEFINE([HAVE_LOG], [1], [Define to 1 if we log support is on]) | ||
585 | fi | ||
586 | AC_SUBST([EINA_CONFIGURE_ENABLE_LOG]) | ||
500 | 587 | ||
501 | AC_CHECK_HEADERS([mcheck.h], [AC_DEFINE([HAVE_MCHECK], [1], [Have mcheck.h])]) | 588 | AC_CHECK_HEADERS([mcheck.h], [AC_DEFINE([HAVE_MCHECK], [1], [Have mcheck.h])]) |
502 | AC_CHECK_FUNCS([mtrace], [AC_DEFINE([HAVE_MTRACE], [1], [Have mtrace])]) | 589 | AC_CHECK_FUNCS([mtrace], [AC_DEFINE([HAVE_MTRACE], [1], [Have mtrace])]) |
@@ -748,6 +835,7 @@ echo " Maximum log level....: ${with_max_log_level}" | |||
748 | echo " Report string usage..: ${have_stringshare_usage}" | 835 | echo " Report string usage..: ${have_stringshare_usage}" |
749 | echo " Valgrind support.....: ${have_valgrind}" | 836 | echo " Valgrind support.....: ${have_valgrind}" |
750 | echo " Default mempool......: ${have_default_mempool}" | 837 | echo " Default mempool......: ${have_default_mempool}" |
838 | echo " Log support..........: ${enable_log}" | ||
751 | echo " Thread Support.......: ${have_threads}" | 839 | echo " Thread Support.......: ${have_threads}" |
752 | if test "${have_threads}" = "POSIX" ; then | 840 | if test "${have_threads}" = "POSIX" ; then |
753 | echo " spinlock...........: ${have_posix_threads_spinlock}" | 841 | echo " spinlock...........: ${have_posix_threads_spinlock}" |
@@ -756,7 +844,7 @@ echo " on/off support.....: ${have_on_off_threads}" | |||
756 | fi | 844 | fi |
757 | echo " Amalgamation.........: ${do_amalgamation}" | 845 | echo " Amalgamation.........: ${do_amalgamation}" |
758 | echo " Iconv support........: ${have_iconv}" | 846 | echo " Iconv support........: ${have_iconv}" |
759 | echo " File dirfd...........: ${ac_cv_func_dirfd}" | 847 | echo " File dirfd...........: ${have_dirfd}" |
760 | echo " File xattr...........: ${have_xattr}" | 848 | echo " File xattr...........: ${have_xattr}" |
761 | echo | 849 | echo |
762 | echo " Documentation........: ${build_doc}" | 850 | echo " Documentation........: ${build_doc}" |