aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/eina/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/eina/configure.ac')
-rw-r--r--libraries/eina/configure.ac184
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##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
3m4_define([v_maj], [1]) 3m4_define([v_maj], [1])
4m4_define([v_min], [1]) 4m4_define([v_min], [1])
5m4_define([v_mic], [0]) 5m4_define([v_mic], [99])
6m4_define([v_rev], m4_esyscmd([(svnversion "${SVN_REPO_PATH:-.}" | grep -v export || echo 0) | awk -F : '{printf("%s\n", $1);}' | tr -d ' :MSP\n'])) 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']))]) 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 8##-- When released, remove the dnl on the below line
9m4_undefine([v_rev]) 9dnl 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
11dnl m4_define([relname], [ver-pre-svn-07]) 11dnl m4_define([relname], [ver-pre-svn-07])
12dnl m4_define([v_rel], [-release relname]) 12dnl m4_define([v_rel], [-release relname])
@@ -352,41 +352,6 @@ PKG_CHECK_MODULES([ECORE_EVAS],
352 352
353AM_CONDITIONAL([BUILD_TILER_EXAMPLE], [test "x${build_tiler_example}" = "xyes"]) 353AM_CONDITIONAL([BUILD_TILER_EXAMPLE], [test "x${build_tiler_example}" = "xyes"])
354 354
355
356### Checks for header files
357AC_HEADER_ASSERT
358AC_HEADER_DIRENT
359AC_HEADER_TIME
360EFL_CHECK_PATH_MAX
361AC_CHECK_HEADERS([unistd.h libgen.h inttypes.h stdint.h sys/types.h siginfo.h])
362
363if 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.])
366fi
367AC_SUBST([EINA_CONFIGURE_HAVE_INTTYPES_H])
368
369if 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.])
372fi
373AC_SUBST([EINA_CONFIGURE_HAVE_STDINT_H])
374
375### Checks for types
376
377AC_CHECK_SIZEOF([wchar_t])
378EINA_SIZEOF_WCHAR_T=$ac_cv_sizeof_wchar_t
379AC_SUBST([EINA_SIZEOF_WCHAR_T])
380AC_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
391AC_C_CONST 356AC_C_CONST
392AC_C_BIGENDIAN 357AC_C_BIGENDIAN
@@ -422,6 +387,15 @@ m4_ifdef([v_mic],
422 387
423EFL_COMPILER_FLAG([-Wshadow]) 388EFL_COMPILER_FLAG([-Wshadow])
424 389
390case "$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 ;;
397esac
398
425AC_SUBST([EINA_CPPFLAGS]) 399AC_SUBST([EINA_CPPFLAGS])
426AC_SUBST([EINA_CFLAGS]) 400AC_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 ;;
452esac 426esac
453AC_SUBST([EINA_LIBS])
454AC_SUBST([lt_enable_auto_import])
455
456case "$host_vendor" in 427case "$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 ;;
464esac 432esac
433AC_SUBST([EINA_LIBS])
434AC_SUBST([lt_enable_auto_import])
465 435
466EFL_LINKER_FLAG([-fno-strict-aliasing]) 436EFL_LINKER_FLAG([-fno-strict-aliasing])
467 437
438CFLAGS="${CFLAGS} ${EINA_CFLAGS}"
439LDFLAGS="${LDFLAGS} ${EINA_LDFLAGS}"
440LIBS="${LIBS} ${EINA_LIBS}"
441
442### Checks for header files
443AC_HEADER_ASSERT
444AC_HEADER_TIME
445EFL_CHECK_PATH_MAX
446AC_CHECK_HEADERS([unistd.h libgen.h inttypes.h stdint.h sys/types.h siginfo.h strings.h sys/mman.h])
447
448if 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.])
451fi
452AC_SUBST([EINA_CONFIGURE_HAVE_INTTYPES_H])
453
454if 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.])
457fi
458AC_SUBST([EINA_CONFIGURE_HAVE_STDINT_H])
459
460### Checks for types
461
462AC_CHECK_SIZEOF([wchar_t])
463EINA_SIZEOF_WCHAR_T=$ac_cv_sizeof_wchar_t
464AC_SUBST([EINA_SIZEOF_WCHAR_T])
465AC_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
474AC_CHECK_TYPES([struct dirent], [have_dirent="yes"], [have_dirent="no"],
475 [[#include <dirent.h>
476 ]])
477
478if 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.])
481fi
482AC_SUBST([EINA_CONFIGURE_HAVE_DIRENT_H])
468 483
469### Checks for library functions 484### Checks for library functions
470AC_ISC_POSIX 485AC_ISC_POSIX
471AC_FUNC_ALLOCA 486AC_FUNC_ALLOCA
472AC_CHECK_FUNCS([strlcpy dirfd openat fstatat fpathconf execvp]) 487AC_CHECK_FUNCS([strlcpy openat fstatat fpathconf execvp])
488
489AC_MSG_CHECKING([for dirfd])
490AC_LINK_IFELSE(
491 [
492 AC_LANG_PROGRAM(
493 [[
494#include <dirent.h>
495 ]],
496 [[
497int main(void)
498{
499 DIR *dirp;
500 return dirfd(dirp);
501}
502 ]])
503 ],
504 [have_dirfd="yes"],
505 [have_dirfd="no"])
506
507AC_MSG_RESULT([${have_dirfd}])
508
509if test "x${have_dirfd}" = "xyes" ; then
510 AC_DEFINE([HAVE_DIRFD], [1], [ Define to 1 if you have the `dirfd' function or macro.])
511fi
512
513# check debug information for malloc
514AC_CHECK_FUNCS([malloc_usable_size], [malloc_true_size="yes"], [malloc_true_size="no"])
515if 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])
517fi
518
519want_debug_malloc="no"
520AC_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
530if 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])
532fi
473 533
474# dlopen and dladdr 534# dlopen and dladdr
475dlopen_libs="" 535dlopen_libs=""
@@ -496,7 +556,34 @@ case "$host_os" in
496esac 556esac
497AC_SUBST([dlopen_libs]) 557AC_SUBST([dlopen_libs])
498 558
499EFL_CHECK_FNMATCH([], [AC_MSG_ERROR([Cannot find fnmatch()])]) 559have_log="yes"
560EFL_CHECK_FNMATCH([have_log="yes"], [have_log="no"])
561
562want_log="yes"
563AC_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
574enable_log="no"
575if test "x${have_log}" = xyes -a "x${want_log}" = xyes; then
576 enable_log="yes"
577fi
578
579AC_MSG_CHECKING([wether to build Eina_Log infrastructure])
580AC_MSG_RESULT([${enable_log}])
581
582if 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])
585fi
586AC_SUBST([EINA_CONFIGURE_ENABLE_LOG])
500 587
501AC_CHECK_HEADERS([mcheck.h], [AC_DEFINE([HAVE_MCHECK], [1], [Have mcheck.h])]) 588AC_CHECK_HEADERS([mcheck.h], [AC_DEFINE([HAVE_MCHECK], [1], [Have mcheck.h])])
502AC_CHECK_FUNCS([mtrace], [AC_DEFINE([HAVE_MTRACE], [1], [Have mtrace])]) 589AC_CHECK_FUNCS([mtrace], [AC_DEFINE([HAVE_MTRACE], [1], [Have mtrace])])
@@ -748,6 +835,7 @@ echo " Maximum log level....: ${with_max_log_level}"
748echo " Report string usage..: ${have_stringshare_usage}" 835echo " Report string usage..: ${have_stringshare_usage}"
749echo " Valgrind support.....: ${have_valgrind}" 836echo " Valgrind support.....: ${have_valgrind}"
750echo " Default mempool......: ${have_default_mempool}" 837echo " Default mempool......: ${have_default_mempool}"
838echo " Log support..........: ${enable_log}"
751echo " Thread Support.......: ${have_threads}" 839echo " Thread Support.......: ${have_threads}"
752if test "${have_threads}" = "POSIX" ; then 840if test "${have_threads}" = "POSIX" ; then
753echo " spinlock...........: ${have_posix_threads_spinlock}" 841echo " spinlock...........: ${have_posix_threads_spinlock}"
@@ -756,7 +844,7 @@ echo " on/off support.....: ${have_on_off_threads}"
756fi 844fi
757echo " Amalgamation.........: ${do_amalgamation}" 845echo " Amalgamation.........: ${do_amalgamation}"
758echo " Iconv support........: ${have_iconv}" 846echo " Iconv support........: ${have_iconv}"
759echo " File dirfd...........: ${ac_cv_func_dirfd}" 847echo " File dirfd...........: ${have_dirfd}"
760echo " File xattr...........: ${have_xattr}" 848echo " File xattr...........: ${have_xattr}"
761echo 849echo
762echo " Documentation........: ${build_doc}" 850echo " Documentation........: ${build_doc}"