diff options
-rw-r--r-- | legacy/eina/configure.ac | 186 | ||||
-rw-r--r-- | legacy/eina/eina.pc.in | 4 | ||||
-rw-r--r-- | legacy/eina/m4/common/efl_check_funcs.m4 | 431 | ||||
-rw-r--r-- | legacy/eina/src/lib/Makefile.am | 2 |
4 files changed, 448 insertions, 175 deletions
diff --git a/legacy/eina/configure.ac b/legacy/eina/configure.ac index d7fcff2..4b4ec62 100644 --- a/legacy/eina/configure.ac +++ b/legacy/eina/configure.ac | |||
@@ -66,7 +66,7 @@ AC_SUBST(VMAJ) | |||
66 | AC_CANONICAL_BUILD | 66 | AC_CANONICAL_BUILD |
67 | AC_CANONICAL_HOST | 67 | AC_CANONICAL_HOST |
68 | 68 | ||
69 | requirement_eina="" | 69 | requirements_pc_eina="" |
70 | 70 | ||
71 | case "$host_os" in | 71 | case "$host_os" in |
72 | mingw32ce*) | 72 | mingw32ce*) |
@@ -283,7 +283,7 @@ if test "x${want_valgrind}" = "xyes" || test "x${want_valgrind}" = "xauto"; then | |||
283 | PKG_CHECK_MODULES([VALGRIND], | 283 | PKG_CHECK_MODULES([VALGRIND], |
284 | [valgrind >= 2.4.0], | 284 | [valgrind >= 2.4.0], |
285 | [ | 285 | [ |
286 | requirement_eina="valgrind ${requirement_eina}" | 286 | requirements_pc_eina="valgrind ${requirements_pc_eina}" |
287 | have_valgrind="yes" | 287 | have_valgrind="yes" |
288 | ], | 288 | ], |
289 | [ | 289 | [ |
@@ -304,7 +304,7 @@ case "$host_os" in | |||
304 | mingw*) | 304 | mingw*) |
305 | PKG_CHECK_MODULES([EVIL], [evil >= 1.0.0]) | 305 | PKG_CHECK_MODULES([EVIL], [evil >= 1.0.0]) |
306 | AC_DEFINE([HAVE_EVIL], [1], [Set to 1 if evil package is installed]) | 306 | AC_DEFINE([HAVE_EVIL], [1], [Set to 1 if evil package is installed]) |
307 | requirement_eina="${requirement_eina} evil" | 307 | requirements_pc_eina="${requirements_pc_eina} evil" |
308 | EFL_EINA_BUILD="-DEFL_EINA_BUILD" | 308 | EFL_EINA_BUILD="-DEFL_EINA_BUILD" |
309 | ;; | 309 | ;; |
310 | esac | 310 | esac |
@@ -318,7 +318,7 @@ PKG_CHECK_MODULES([EXOTIC], | |||
318 | [enable_exotic="no"]) | 318 | [enable_exotic="no"]) |
319 | 319 | ||
320 | if test "x${enable_exotic}" = "xyes"; then | 320 | if test "x${enable_exotic}" = "xyes"; then |
321 | requirement_eina="exotic ${requirement_eina}" | 321 | requirements_pc_eina="exotic ${requirements_pc_eina}" |
322 | EINA_CFLAGS="${EINA_CFLAGS} ${EXOTIC_CFLAGS}" | 322 | EINA_CFLAGS="${EINA_CFLAGS} ${EXOTIC_CFLAGS}" |
323 | EINA_LIBS="${EXOTIC_LIBS}" | 323 | EINA_LIBS="${EXOTIC_LIBS}" |
324 | 324 | ||
@@ -332,7 +332,7 @@ case "$host_vendor" in | |||
332 | ps3*) | 332 | ps3*) |
333 | PKG_CHECK_MODULES([ESCAPE], [escape]) | 333 | PKG_CHECK_MODULES([ESCAPE], [escape]) |
334 | AC_DEFINE(HAVE_ESCAPE, 1, [Set to 1 if Escape package is installed]) | 334 | AC_DEFINE(HAVE_ESCAPE, 1, [Set to 1 if Escape package is installed]) |
335 | requirement_eina="${requirement_eina} escape" | 335 | requirements_pc_eina="${requirements_pc_eina} escape" |
336 | EINA_CFLAGS="${ESCAPE_CFLAGS} ${EINA_CFLAGS}" | 336 | EINA_CFLAGS="${ESCAPE_CFLAGS} ${EINA_CFLAGS}" |
337 | ;; | 337 | ;; |
338 | esac | 338 | esac |
@@ -472,33 +472,10 @@ EFL_LINKER_FLAG([-fno-strict-aliasing]) | |||
472 | 472 | ||
473 | ### Checks for library functions | 473 | ### Checks for library functions |
474 | AC_FUNC_ALLOCA | 474 | AC_FUNC_ALLOCA |
475 | AC_CHECK_FUNCS([strlcpy openat fstatat fpathconf execvp backtrace backtrace_symbols malloc_usable_size mtrace]) | ||
476 | |||
477 | AC_MSG_CHECKING([for dirfd]) | ||
478 | AC_LINK_IFELSE( | ||
479 | [ | ||
480 | AC_LANG_PROGRAM( | ||
481 | [[ | ||
482 | #ifdef HAVE_DIRENT_H | ||
483 | # include <dirent.h> | ||
484 | #endif | ||
485 | ]], | ||
486 | [[ | ||
487 | int main(void) | ||
488 | { | ||
489 | DIR *dirp; | ||
490 | return dirfd(dirp); | ||
491 | } | ||
492 | ]]) | ||
493 | ], | ||
494 | [have_dirfd="yes"], | ||
495 | [have_dirfd="no"]) | ||
496 | 475 | ||
497 | AC_MSG_RESULT([${have_dirfd}]) | 476 | AC_CHECK_FUNCS([strlcpy openat fstatat fpathconf execvp backtrace backtrace_symbols malloc_usable_size mtrace]) |
498 | 477 | ||
499 | if test "x${have_dirfd}" = "xyes" ; then | 478 | EFL_CHECK_FUNCS([eina], [dirfd dlopen dladdr fnmatch iconv shm_open setxattr]) |
500 | AC_DEFINE([HAVE_DIRFD], [1], [ Define to 1 if you have the `dirfd' function or macro.]) | ||
501 | fi | ||
502 | 479 | ||
503 | want_debug_malloc="no" | 480 | want_debug_malloc="no" |
504 | AC_ARG_ENABLE([debug-malloc], | 481 | AC_ARG_ENABLE([debug-malloc], |
@@ -515,14 +492,6 @@ if test "x${ac_cv_func_malloc_usable_size}" = "xyes" && test "x${want_debug_mall | |||
515 | AC_DEFINE([EINA_DEBUG_MALLOC], [1], [Turn on debugging overhead in mempool]) | 492 | AC_DEFINE([EINA_DEBUG_MALLOC], [1], [Turn on debugging overhead in mempool]) |
516 | fi | 493 | fi |
517 | 494 | ||
518 | # dlopen and dladdr | ||
519 | EFL_CHECK_DLOPEN | ||
520 | EFL_CHECK_DLADDR | ||
521 | |||
522 | have_log="yes" | ||
523 | EFL_CHECK_FNMATCH([have_log="yes"], [have_log="no"]) | ||
524 | |||
525 | want_log="yes" | ||
526 | AC_ARG_ENABLE([log], | 495 | AC_ARG_ENABLE([log], |
527 | [AC_HELP_STRING([--disable-log], [disable Eina_Log infrastructure completly @<:@default=enabled@:>@])], | 496 | [AC_HELP_STRING([--disable-log], [disable Eina_Log infrastructure completly @<:@default=enabled@:>@])], |
528 | [ | 497 | [ |
@@ -535,7 +504,7 @@ AC_ARG_ENABLE([log], | |||
535 | [want_log="yes"]) | 504 | [want_log="yes"]) |
536 | 505 | ||
537 | enable_log="no" | 506 | enable_log="no" |
538 | if test "x${have_log}" = xyes -a "x${want_log}" = xyes; then | 507 | if test "x${efl_func_fnmatch}" = "xyes" && test "x${want_log}" = "xyes" ; then |
539 | enable_log="yes" | 508 | enable_log="yes" |
540 | fi | 509 | fi |
541 | 510 | ||
@@ -549,134 +518,6 @@ fi | |||
549 | AC_SUBST([EINA_CONFIGURE_ENABLE_LOG]) | 518 | AC_SUBST([EINA_CONFIGURE_ENABLE_LOG]) |
550 | 519 | ||
551 | 520 | ||
552 | # iconv library | ||
553 | have_iconv="no" | ||
554 | AC_ARG_WITH([iconv-link], | ||
555 | AC_HELP_STRING([--with-iconv-link=ICONV_LINK], [explicitly specify an iconv link option]), | ||
556 | [ | ||
557 | LIBS="$withval $LIBS" | ||
558 | have_iconv="yes" | ||
559 | iconv_libs=$withval | ||
560 | ]) | ||
561 | |||
562 | AC_MSG_CHECKING(for explicit iconv link options) | ||
563 | if test "x${iconv_libs}" = "x" ; then | ||
564 | AC_MSG_RESULT([no explicit iconv link option]) | ||
565 | else | ||
566 | AC_MSG_RESULT([$iconv_libs]) | ||
567 | fi | ||
568 | |||
569 | if test "x${have_iconv}" = "xno" ; then | ||
570 | AC_CHECK_HEADERS([iconv.h], [have_iconv="yes"]) | ||
571 | |||
572 | if test "x${have_iconv}" = "xyes" ; then | ||
573 | AC_MSG_CHECKING([whether iconv() is in libc]) | ||
574 | |||
575 | AC_LINK_IFELSE( | ||
576 | [AC_LANG_PROGRAM( | ||
577 | [[ | ||
578 | #include <stdlib.h> | ||
579 | #include <iconv.h> | ||
580 | ]], | ||
581 | [[ | ||
582 | iconv_t ic; | ||
583 | size_t count = iconv(ic, NULL, NULL, NULL, NULL); | ||
584 | ]])], | ||
585 | [have_iconv="yes"], | ||
586 | [have_iconv="no"]) | ||
587 | |||
588 | AC_MSG_RESULT([${have_iconv}]) | ||
589 | fi | ||
590 | |||
591 | if test "x${have_iconv}" = "xno" ; then | ||
592 | AC_MSG_CHECKING([whether iconv() is in libiconv.a]) | ||
593 | |||
594 | LIBS_save="${LIBS}" | ||
595 | LIBS="-liconv $LIBS" | ||
596 | AC_LINK_IFELSE( | ||
597 | [AC_LANG_PROGRAM( | ||
598 | [[ | ||
599 | #include <stdlib.h> | ||
600 | #include <iconv.h> | ||
601 | ]], | ||
602 | [[ | ||
603 | iconv_t ic; | ||
604 | size_t count; | ||
605 | count = iconv(ic, NULL, NULL, NULL, NULL); | ||
606 | ]])], | ||
607 | [ | ||
608 | have_iconv="yes" | ||
609 | iconv_libs="-liconv" | ||
610 | ], | ||
611 | [ | ||
612 | have_iconv="no" | ||
613 | LIBS=${LIBS_save} | ||
614 | ]) | ||
615 | |||
616 | AC_MSG_RESULT([${have_iconv}]) | ||
617 | fi | ||
618 | |||
619 | if test "x${have_iconv}" = "xno" ; then | ||
620 | AC_MSG_CHECKING([whether iconv() is in libiconv_plug.a]) | ||
621 | |||
622 | LIBS_save="${LIBS}" | ||
623 | LIBS="-liconv_plug $LIBS" | ||
624 | AC_LINK_IFELSE( | ||
625 | [AC_LANG_PROGRAM( | ||
626 | [[ | ||
627 | #include <stdlib.h> | ||
628 | #include <iconv.h> | ||
629 | ]], | ||
630 | [[ | ||
631 | iconv_t ic; | ||
632 | size_t count = iconv(ic, NULL, NULL, NULL, NULL); | ||
633 | ]])], | ||
634 | [ | ||
635 | have_iconv="yes" | ||
636 | iconv_libs="-liconv_plug" | ||
637 | ], | ||
638 | [ | ||
639 | have_iconv="no" | ||
640 | LIBS=${LIBS_save} | ||
641 | ]) | ||
642 | |||
643 | AC_MSG_RESULT([${have_iconv}]) | ||
644 | fi | ||
645 | fi | ||
646 | |||
647 | AC_SUBST([iconv_libs]) | ||
648 | |||
649 | if test "x${have_iconv}" = "xyes" ; then | ||
650 | AC_DEFINE([HAVE_ICONV], [1], [Set to 1 if iconv library is installed]) | ||
651 | fi | ||
652 | |||
653 | # shm_open | ||
654 | EFL_CHECK_SHM_OPEN([have_shm_open="yes"], [have_shm_open="no"]) | ||
655 | |||
656 | # extended attribute | ||
657 | |||
658 | AC_MSG_CHECKING([for extended attributes]) | ||
659 | |||
660 | AC_COMPILE_IFELSE( | ||
661 | [AC_LANG_PROGRAM( | ||
662 | [[ | ||
663 | #include <stdlib.h> | ||
664 | #include <sys/types.h> | ||
665 | #include <sys/xattr.h> | ||
666 | ]], | ||
667 | [[ | ||
668 | size_t tmp = listxattr("/", NULL, 0); | ||
669 | tmp = getxattr("/", "user.ethumb.md5", NULL, 0); | ||
670 | setxattr("/", "user.ethumb.md5", NULL, 0, 0); | ||
671 | ]])], | ||
672 | [ | ||
673 | AC_DEFINE([HAVE_XATTR], [1], [Define to 1 if you have the `listxattr', `setxattr' and `getxattr' functions.]) | ||
674 | have_xattr="yes" | ||
675 | ], | ||
676 | [have_xattr="no"]) | ||
677 | |||
678 | AC_MSG_RESULT([${have_xattr}]) | ||
679 | |||
680 | ### Modules | 521 | ### Modules |
681 | 522 | ||
682 | if test "x${have_default_mempool}" = "xyes" ; then | 523 | if test "x${have_default_mempool}" = "xyes" ; then |
@@ -717,7 +558,8 @@ if test -n "$CXX" && test "x$enable_benchmark" = "xyes" ; then | |||
717 | fi | 558 | fi |
718 | AM_CONDITIONAL([CITYHASH_BENCH], [test -n "$CXX" && test "x$enable_benchmark" = "xyes"]) | 559 | AM_CONDITIONAL([CITYHASH_BENCH], [test -n "$CXX" && test "x$enable_benchmark" = "xyes"]) |
719 | 560 | ||
720 | AC_SUBST([requirement_eina]) | 561 | AC_SUBST([requirements_pc_eina]) |
562 | AC_SUBST([requirements_libs_eina]) | ||
721 | 563 | ||
722 | ### Build and install examples | 564 | ### Build and install examples |
723 | EFL_CHECK_BUILD_EXAMPLES([enable_build_examples="yes"], [enable_build_examples="no"]) | 565 | EFL_CHECK_BUILD_EXAMPLES([enable_build_examples="yes"], [enable_build_examples="no"]) |
@@ -775,10 +617,10 @@ echo " debug usage........: ${efl_have_debug_threads}" | |||
775 | echo " on/off support.....: ${efl_have_on_off_threads}" | 617 | echo " on/off support.....: ${efl_have_on_off_threads}" |
776 | fi | 618 | fi |
777 | echo " Amalgamation.........: ${do_amalgamation}" | 619 | echo " Amalgamation.........: ${do_amalgamation}" |
778 | echo " Iconv support........: ${have_iconv}" | 620 | echo " Iconv support........: ${efl_func_iconv}" |
779 | echo " File dirfd...........: ${have_dirfd}" | 621 | echo " File dirfd...........: ${efl_func_dirfd}" |
780 | echo " File xattr...........: ${have_xattr}" | 622 | echo " File xattr...........: ${efl_func_setxattr}" |
781 | echo " shm_open.............: ${have_shm_open}" | 623 | echo " shm_open.............: ${efl_func_shm_open}" |
782 | echo | 624 | echo |
783 | echo " Documentation........: ${build_doc}" | 625 | echo " Documentation........: ${build_doc}" |
784 | echo " Tests................: ${enable_tests}" | 626 | echo " Tests................: ${enable_tests}" |
diff --git a/legacy/eina/eina.pc.in b/legacy/eina/eina.pc.in index e7a5cc0..95b815b 100644 --- a/legacy/eina/eina.pc.in +++ b/legacy/eina/eina.pc.in | |||
@@ -5,8 +5,8 @@ includedir=@includedir@ | |||
5 | 5 | ||
6 | Name: Eina | 6 | Name: Eina |
7 | Description: A Library that implements fast data types and miscellaneous tools | 7 | Description: A Library that implements fast data types and miscellaneous tools |
8 | @pkgconfig_requires_private@: @requirement_eina@ | 8 | @pkgconfig_requires_private@: @requirements_pc_eina@ |
9 | Version: @VERSION@ | 9 | Version: @VERSION@ |
10 | Libs: -L${libdir} -leina @EFL_PTHREAD_LIBS@ | 10 | Libs: -L${libdir} -leina @EFL_PTHREAD_LIBS@ |
11 | Libs.private: @EFL_FNMATCH_LIBS@ @EFL_SHM_OPEN_LIBS@ @EFL_PTHREAD_LIBS@ @iconv_libs@ @EFL_DLOPEN_LIBS@ @EFL_DLADDR_LIBS@ @EINA_LIBS@ -lm | 11 | Libs.private: @EFL_PTHREAD_LIBS@ @requirements_libs_eina@ -lm |
12 | Cflags: -I${includedir}/eina-@VMAJ@ -I${includedir}/eina-@VMAJ@/eina | 12 | Cflags: -I${includedir}/eina-@VMAJ@ -I${includedir}/eina-@VMAJ@/eina |
diff --git a/legacy/eina/m4/common/efl_check_funcs.m4 b/legacy/eina/m4/common/efl_check_funcs.m4 new file mode 100644 index 0000000..5322c41 --- /dev/null +++ b/legacy/eina/m4/common/efl_check_funcs.m4 | |||
@@ -0,0 +1,431 @@ | |||
1 | dnl Copyright (C) 2012 Vincent Torri <vincent dot torri at gmail dot com> | ||
2 | dnl This code is public domain and can be freely used or copied. | ||
3 | |||
4 | dnl Macros that check functions availability for the EFL: | ||
5 | |||
6 | dnl dirfd | ||
7 | dnl dladdr | ||
8 | dnl dlopen | ||
9 | dnl fnmatch | ||
10 | dnl iconv | ||
11 | dnl setxattr (an al.) | ||
12 | dnl shm_open | ||
13 | |||
14 | |||
15 | dnl _EFL_CHECK_FUNC_DIRFD is for internal use | ||
16 | dnl _EFL_CHECK_FUNC_DIRFD(EFL, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND) | ||
17 | |||
18 | AC_DEFUN([_EFL_CHECK_FUNC_DIRFD], | ||
19 | [ | ||
20 | AC_LINK_IFELSE( | ||
21 | [ | ||
22 | AC_LANG_PROGRAM( | ||
23 | [[ | ||
24 | #ifdef HAVE_DIRENT_H | ||
25 | # include <dirent.h> | ||
26 | #endif | ||
27 | ]], | ||
28 | [[ | ||
29 | int main(void) | ||
30 | { | ||
31 | DIR *dirp; | ||
32 | return dirfd(dirp); | ||
33 | } | ||
34 | ]]) | ||
35 | ], | ||
36 | [_efl_have_fct="yes"], | ||
37 | [_efl_have_fct="no"]) | ||
38 | |||
39 | AS_IF([test "x${_efl_have_fct}" = "xyes"], [$2], [$3]) | ||
40 | ]) | ||
41 | |||
42 | dnl _EFL_CHECK_FUNC_DLADDR_PRIV is for internal use | ||
43 | dnl _EFL_CHECK_FUNC_DLADDR_PRIV(EFL, LIB, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND) | ||
44 | |||
45 | AC_DEFUN([_EFL_CHECK_FUNC_DLADDR_PRIV], | ||
46 | [ | ||
47 | m4_pushdef([UPEFL], m4_translit([$1], [-a-z], [_A-Z]))dnl | ||
48 | m4_pushdef([DOWNEFL], m4_translit([$1], [-A-Z], [_a-z]))dnl | ||
49 | |||
50 | LIBS_save="${LIBS}" | ||
51 | LIBS="${LIBS} $2" | ||
52 | AC_LINK_IFELSE( | ||
53 | [AC_LANG_PROGRAM( | ||
54 | [[ | ||
55 | #define _GNU_SOURCE | ||
56 | #include <dlfcn.h> | ||
57 | ]], | ||
58 | [[ | ||
59 | int res = dladdr(0, 0); | ||
60 | ]])], | ||
61 | [ | ||
62 | m4_defn([UPEFL])[]_LIBS="${m4_defn([UPEFL])[]_LIBS} $2" | ||
63 | requirements_libs_[]m4_defn([DOWNEFL])="${requirements_libs_[]m4_defn([DOWNEFL])} $2" | ||
64 | _efl_have_fct="yes" | ||
65 | ], | ||
66 | [_efl_have_fct="no"]) | ||
67 | |||
68 | LIBS="${LIBS_save}" | ||
69 | |||
70 | AS_IF([test "x${_efl_have_fct}" = "xyes"], [$3], [$4]) | ||
71 | |||
72 | m4_popdef([DOWNEFL]) | ||
73 | m4_popdef([UPEFL]) | ||
74 | ]) | ||
75 | |||
76 | dnl _EFL_CHECK_FUNC_DLADDR is for internal use | ||
77 | dnl _EFL_CHECK_FUNC_DLADDR(EFL, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND) | ||
78 | |||
79 | AC_DEFUN([_EFL_CHECK_FUNC_DLADDR], | ||
80 | [ | ||
81 | m4_pushdef([UPEFL], m4_translit([$1], [-a-z], [_A-Z]))dnl | ||
82 | m4_pushdef([DOWNEFL], m4_translit([$1], [-A-Z], [_a-z]))dnl | ||
83 | |||
84 | case "$host_os" in | ||
85 | mingw*) | ||
86 | _efl_have_fct="yes" | ||
87 | requirements_libs_[]m4_defn([DOWNEFL])="${requirements_libs_[]m4_defn([DOWNEFL])} -ldl" | ||
88 | m4_defn([UPEFL])[]_LIBS="${m4_defn([UPEFL])[]_LIBS} -ldl" | ||
89 | ;; | ||
90 | *) | ||
91 | _efl_have_fct="no" | ||
92 | |||
93 | dnl Check is dladdr is in libc | ||
94 | _EFL_CHECK_FUNC_DLADDR_PRIV([$1], [], [_efl_have_fct="yes"], [_efl_have_fct="no"]) | ||
95 | |||
96 | dnl Check is dlopen is in libdl | ||
97 | if test "x${_efl_have_fct}" = "xno" ; then | ||
98 | _EFL_CHECK_FUNC_DLADDR_PRIV([$1], [-ldl], [_efl_have_fct="yes"], [_efl_have_fct="no"]) | ||
99 | fi | ||
100 | ;; | ||
101 | esac | ||
102 | |||
103 | AS_IF([test "x${_efl_have_fct}" = "xyes"], [$2], [$3]) | ||
104 | |||
105 | m4_popdef([DOWNEFL]) | ||
106 | m4_popdef([UPEFL]) | ||
107 | ]) | ||
108 | |||
109 | dnl _EFL_CHECK_FUNC_DLOPEN_PRIV is for internal use | ||
110 | dnl _EFL_CHECK_FUNC_DLOPEN_PRIV(EFL, LIB, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND) | ||
111 | |||
112 | AC_DEFUN([_EFL_CHECK_FUNC_DLOPEN_PRIV], | ||
113 | [ | ||
114 | m4_pushdef([UPEFL], m4_translit([$1], [-a-z], [_A-Z]))dnl | ||
115 | m4_pushdef([DOWNEFL], m4_translit([$1], [-A-Z], [_a-z]))dnl | ||
116 | |||
117 | LIBS_save="${LIBS}" | ||
118 | LIBS="${LIBS} $2" | ||
119 | AC_LINK_IFELSE( | ||
120 | [AC_LANG_PROGRAM( | ||
121 | [[ | ||
122 | #include <dlfcn.h> | ||
123 | ]], | ||
124 | [[ | ||
125 | void *h = dlopen(0, 0); | ||
126 | ]])], | ||
127 | [ | ||
128 | m4_defn([UPEFL])[]_LIBS="${m4_defn([UPEFL])[]_LIBS} $2" | ||
129 | requirements_libs_[]m4_defn([DOWNEFL])="${requirements_libs_[]m4_defn([DOWNEFL])} $2" | ||
130 | _efl_have_fct="yes" | ||
131 | ], | ||
132 | [_efl_have_fct="no"]) | ||
133 | |||
134 | LIBS="${LIBS_save}" | ||
135 | |||
136 | AS_IF([test "x${_efl_have_fct}" = "xyes"], [$3], [$4]) | ||
137 | |||
138 | m4_popdef([DOWNEFL]) | ||
139 | m4_popdef([UPEFL]) | ||
140 | ]) | ||
141 | |||
142 | dnl _EFL_CHECK_FUNC_DLOPEN is for internal use | ||
143 | dnl _EFL_CHECK_FUNC_DLOPEN(EFL, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND) | ||
144 | |||
145 | AC_DEFUN([_EFL_CHECK_FUNC_DLOPEN], | ||
146 | [ | ||
147 | m4_pushdef([UPEFL], m4_translit([$1], [-a-z], [_A-Z]))dnl | ||
148 | m4_pushdef([DOWNEFL], m4_translit([$1], [-A-Z], [_a-z]))dnl | ||
149 | |||
150 | case "$host_os" in | ||
151 | mingw*) | ||
152 | _efl_have_fct="yes" | ||
153 | requirements_libs_[]m4_defn([DOWNEFL])="${requirements_libs_[]m4_defn([DOWNEFL])} -ldl" | ||
154 | m4_defn([UPEFL])[]_LIBS="${m4_defn([UPEFL])[]_LIBS} -ldl" | ||
155 | ;; | ||
156 | *) | ||
157 | _efl_have_fct="no" | ||
158 | |||
159 | dnl Check is dlopen is in libc | ||
160 | _EFL_CHECK_FUNC_DLOPEN_PRIV([$1], [], [_efl_have_fct="yes"], [_efl_have_fct="no"]) | ||
161 | |||
162 | dnl Check is dlopen is in libdl | ||
163 | if test "x${_efl_have_fct}" = "xno" ; then | ||
164 | _EFL_CHECK_FUNC_DLOPEN_PRIV([$1], [-ldl], [_efl_have_fct="yes"], [_efl_have_fct="no"]) | ||
165 | fi | ||
166 | ;; | ||
167 | esac | ||
168 | |||
169 | AS_IF([test "x${_efl_have_fct}" = "xyes"], [$2], [$3]) | ||
170 | |||
171 | m4_popdef([DOWNEFL]) | ||
172 | m4_popdef([UPEFL]) | ||
173 | ]) | ||
174 | |||
175 | dnl _EFL_CHECK_FUNC_FNMATCH_PRIV is for internal use | ||
176 | dnl _EFL_CHECK_FUNC_FNMATCH_PRIV(EFL, LIB, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND) | ||
177 | |||
178 | AC_DEFUN([_EFL_CHECK_FUNC_FNMATCH_PRIV], | ||
179 | [ | ||
180 | m4_pushdef([UPEFL], m4_translit([$1], [-a-z], [_A-Z]))dnl | ||
181 | m4_pushdef([DOWNEFL], m4_translit([$1], [-A-Z], [_a-z]))dnl | ||
182 | |||
183 | LIBS_save="${LIBS}" | ||
184 | LIBS="${LIBS} $2" | ||
185 | AC_LINK_IFELSE( | ||
186 | [AC_LANG_PROGRAM( | ||
187 | [[ | ||
188 | #include <stdlib.h> | ||
189 | #include <fnmatch.h> | ||
190 | ]], | ||
191 | [[ | ||
192 | int g = fnmatch(NULL, NULL, 0); | ||
193 | ]])], | ||
194 | [ | ||
195 | m4_defn([UPEFL])[]_LIBS="${m4_defn([UPEFL])[]_LIBS} $2" | ||
196 | requirements_libs_[]m4_defn([DOWNEFL])="${requirements_libs_[]m4_defn([DOWNEFL])} $2" | ||
197 | _efl_have_fct="yes" | ||
198 | ], | ||
199 | [_efl_have_fct="no"]) | ||
200 | |||
201 | LIBS="${LIBS_save}" | ||
202 | |||
203 | AS_IF([test "x${_efl_have_fct}" = "xyes"], [$3], [$4]) | ||
204 | |||
205 | m4_popdef([DOWNEFL]) | ||
206 | m4_popdef([UPEFL]) | ||
207 | ]) | ||
208 | |||
209 | dnl _EFL_CHECK_FUNC_FNMATCH is for internal use | ||
210 | dnl _EFL_CHECK_FUNC_FNMATCH(EFL, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND) | ||
211 | |||
212 | AC_DEFUN([_EFL_CHECK_FUNC_FNMATCH], | ||
213 | [ | ||
214 | case "$host_os" in | ||
215 | mingw*) | ||
216 | _efl_have_fct="yes" | ||
217 | ;; | ||
218 | *) | ||
219 | dnl Check is fnmatch is in libfnmatch | ||
220 | _EFL_CHECK_FUNC_FNMATCH_PRIV([$1], [-lfnmatch], [_efl_have_fct="yes"], [_efl_have_fct="no"]) | ||
221 | |||
222 | dnl Check is fnmatch is in libiberty | ||
223 | if test "x${_efl_have_fct}" = "xno" ; then | ||
224 | _EFL_CHECK_FUNC_FNMATCH_PRIV([$1], [-liberty], [_efl_have_fct="yes"], [_efl_have_fct="no"]) | ||
225 | fi | ||
226 | ;; | ||
227 | esac | ||
228 | |||
229 | AS_IF([test "x${_efl_have_fct}" = "xyes"], [$2], [$3]) | ||
230 | ]) | ||
231 | |||
232 | dnl _EFL_CHECK_FUNC_ICONV_PRIV is for internal use | ||
233 | dnl _EFL_CHECK_FUNC_ICONV_PRIV(EFL, LIB, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND) | ||
234 | |||
235 | AC_DEFUN([_EFL_CHECK_FUNC_ICONV_PRIV], | ||
236 | [ | ||
237 | m4_pushdef([UPEFL], m4_translit([$1], [-a-z], [_A-Z]))dnl | ||
238 | m4_pushdef([DOWNEFL], m4_translit([$1], [-A-Z], [_a-z]))dnl | ||
239 | |||
240 | LIBS_save="${LIBS}" | ||
241 | LIBS="${LIBS} $2" | ||
242 | AC_LINK_IFELSE( | ||
243 | [AC_LANG_PROGRAM( | ||
244 | [[ | ||
245 | #include <stdlib.h> | ||
246 | #include <iconv.h> | ||
247 | ]], | ||
248 | [[ | ||
249 | iconv_t ic; | ||
250 | size_t count = iconv(ic, NULL, NULL, NULL, NULL); | ||
251 | ]])], | ||
252 | [ | ||
253 | m4_defn([UPEFL])[]_LIBS="${m4_defn([UPEFL])[]_LIBS} $2" | ||
254 | requirements_libs_[]m4_defn([DOWNEFL])="${requirements_libs_[]m4_defn([DOWNEFL])} $2" | ||
255 | _efl_have_fct="yes" | ||
256 | ], | ||
257 | [_efl_have_fct="no"]) | ||
258 | |||
259 | LIBS="${LIBS_save}" | ||
260 | |||
261 | AS_IF([test "x${_efl_have_fct}" = "xyes"], [$3], [$4]) | ||
262 | |||
263 | m4_popdef([DOWNEFL]) | ||
264 | m4_popdef([UPEFL]) | ||
265 | ]) | ||
266 | |||
267 | dnl _EFL_CHECK_FUNC_ICONV is for internal use | ||
268 | dnl _EFL_CHECK_FUNC_ICONV(EFL, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND) | ||
269 | |||
270 | AC_DEFUN([_EFL_CHECK_FUNC_ICONV], | ||
271 | [ | ||
272 | AC_ARG_WITH([iconv-link], | ||
273 | AC_HELP_STRING([--with-iconv-link=ICONV_LINK], [explicitly specify an iconv link option]), | ||
274 | [ | ||
275 | _efl_have_fct="yes" | ||
276 | iconv_libs=${withval} | ||
277 | ], | ||
278 | [_efl_have_fct="no"]) | ||
279 | |||
280 | AC_MSG_CHECKING([for explicit iconv link options]) | ||
281 | if test "x${iconv_libs}" = "x" ; then | ||
282 | AC_MSG_RESULT([no explicit iconv link option]) | ||
283 | else | ||
284 | AC_MSG_RESULT([${iconv_libs}]) | ||
285 | fi | ||
286 | |||
287 | dnl Check is iconv is in libc | ||
288 | if test "x${_efl_have_fct}" = "xno" ; then | ||
289 | _EFL_CHECK_FUNC_ICONV_PRIV([$1], [], [_efl_have_fct="yes"], [_efl_have_fct="no"]) | ||
290 | fi | ||
291 | |||
292 | dnl Check is iconv is in libiconv | ||
293 | if test "x${_efl_have_fct}" = "xno" ; then | ||
294 | _EFL_CHECK_FUNC_ICONV_PRIV([$1], [-liconv], [_efl_have_fct="yes"], [_efl_have_fct="no"]) | ||
295 | fi | ||
296 | |||
297 | dnl Check is iconv is in libiconv_plug | ||
298 | if test "x${_efl_have_fct}" = "xno" ; then | ||
299 | _EFL_CHECK_FUNC_ICONV_PRIV([$1], [-liconv_plug], [_efl_have_fct="yes"], [_efl_have_fct="no"]) | ||
300 | fi | ||
301 | |||
302 | AS_IF([test "x${_efl_have_fct}" = "xyes"], [$2], [$3]) | ||
303 | ]) | ||
304 | |||
305 | dnl _EFL_CHECK_FUNC_SETXATTR is for internal use | ||
306 | dnl _EFL_CHECK_FUNC_SETXATTR(EFL, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND) | ||
307 | |||
308 | AC_DEFUN([_EFL_CHECK_FUNC_SETXATTR], | ||
309 | [ | ||
310 | AC_COMPILE_IFELSE( | ||
311 | [AC_LANG_PROGRAM( | ||
312 | [[ | ||
313 | #include <stdlib.h> | ||
314 | #include <sys/types.h> | ||
315 | #include <sys/xattr.h> | ||
316 | ]], | ||
317 | [[ | ||
318 | size_t tmp = listxattr("/", NULL, 0); | ||
319 | tmp = getxattr("/", "user.ethumb.md5", NULL, 0); | ||
320 | setxattr("/", "user.ethumb.md5", NULL, 0, 0); | ||
321 | ]])], | ||
322 | [_efl_have_fct="yes"], | ||
323 | [_efl_have_fct="no"]) | ||
324 | |||
325 | AS_IF([test "x${_efl_have_fct}" = "xyes"], [$2], [$3]) | ||
326 | ]) | ||
327 | |||
328 | dnl _EFL_CHECK_FUNC_SHM_OPEN_PRIV is for internal use | ||
329 | dnl _EFL_CHECK_FUNC_SHM_OPEN_PRIV(EFL, LIB, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND) | ||
330 | |||
331 | AC_DEFUN([_EFL_CHECK_FUNC_SHM_OPEN_PRIV], | ||
332 | [ | ||
333 | m4_pushdef([UPEFL], m4_translit([$1], [-a-z], [_A-Z]))dnl | ||
334 | m4_pushdef([DOWNEFL], m4_translit([$1], [-A-Z], [_a-z]))dnl | ||
335 | |||
336 | LIBS_save="${LIBS}" | ||
337 | LIBS="${LIBS} $2" | ||
338 | AC_LINK_IFELSE( | ||
339 | [AC_LANG_PROGRAM( | ||
340 | [[ | ||
341 | #include <sys/mman.h> | ||
342 | #include <sys/stat.h> /* For mode constants */ | ||
343 | #include <fcntl.h> /* For O_* constants */ | ||
344 | ]], | ||
345 | [[ | ||
346 | int fd; | ||
347 | |||
348 | fd = shm_open("/dev/null", O_RDONLY, S_IRWXU | S_IRWXG | S_IRWXO); | ||
349 | ]])], | ||
350 | [ | ||
351 | m4_defn([UPEFL])[]_LIBS="$ m4_defn([UPEFL])[]_LIBS $2" | ||
352 | requirements_libs_[]m4_defn([DOWNEFL])="${requirements_libs_[]m4_defn([DOWNEFL])} $2" | ||
353 | _efl_have_fct="yes" | ||
354 | ], | ||
355 | [_efl_have_fct="no"]) | ||
356 | |||
357 | LIBS="${LIBS_save}" | ||
358 | |||
359 | AS_IF([test "x${_efl_have_fct}" = "xyes"], [$3], [$4]) | ||
360 | |||
361 | m4_popdef([DOWNEFL]) | ||
362 | m4_popdef([UPEFL]) | ||
363 | ]) | ||
364 | |||
365 | dnl _EFL_CHECK_FUNC_SHM_OPEN is for internal use | ||
366 | dnl _EFL_CHECK_FUNC_SHM_OPEN(EFL, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND) | ||
367 | |||
368 | AC_DEFUN([_EFL_CHECK_FUNC_SHM_OPEN], | ||
369 | [ | ||
370 | _efl_have_fct="no" | ||
371 | |||
372 | dnl Check is shm_open is in libc | ||
373 | _EFL_CHECK_FUNC_SHM_OPEN_PRIV([$1], [], | ||
374 | [_efl_have_fct="yes"], | ||
375 | [_efl_have_fct="no"]) | ||
376 | |||
377 | dnl Check is shm_open is in librt | ||
378 | if test "x${_efl_have_fct}" = "xno" ; then | ||
379 | _EFL_CHECK_FUNC_SHM_OPEN_PRIV([$1], [-lrt], | ||
380 | [_efl_have_fct="yes"], | ||
381 | [_efl_have_fct="no"]) | ||
382 | fi | ||
383 | |||
384 | AS_IF([test "x${_efl_have_fct}" = "xyes"], [$2], [$3]) | ||
385 | ]) | ||
386 | |||
387 | dnl Macro that checks function availability | ||
388 | dnl | ||
389 | dnl EFL_CHECK_FUNC(EFL, FUNCTION) | ||
390 | dnl AC_SUBST : EFL_CFLAGS and EFL_LIBS (EFL being replaced by its value) | ||
391 | dnl AC_DEFINE : EFL_HAVE_FUNCTION (FUNCTION being replaced by its value) | ||
392 | dnl result in efl_func_function (function being replaced by its value) | ||
393 | |||
394 | AC_DEFUN([EFL_CHECK_FUNC], | ||
395 | [ | ||
396 | m4_pushdef([UP], m4_translit([$2], [-a-z], [_A-Z]))dnl | ||
397 | m4_pushdef([DOWN], m4_translit([$2], [-A-Z], [_a-z]))dnl | ||
398 | |||
399 | m4_default([_EFL_CHECK_FUNC_]m4_defn([UP]))($1, [have_fct="yes"], [have_fct="no"]) | ||
400 | |||
401 | if test "x$2" = "xsetxattr" ; then | ||
402 | AC_MSG_CHECKING([for extended attributes]) | ||
403 | else | ||
404 | AC_MSG_CHECKING([for ]m4_defn([DOWN])) | ||
405 | fi | ||
406 | |||
407 | AC_MSG_RESULT([${have_fct}]) | ||
408 | |||
409 | if test "x${have_fct}" = "xyes" ; then | ||
410 | if test "x$2" = "xsetxattr" ; then | ||
411 | AC_DEFINE([HAVE_XATTR], [1], [Define to 1 if you have the `listxattr', `setxattr' and `getxattr' functions.]) | ||
412 | else | ||
413 | AC_DEFINE([HAVE_]m4_defn([UP]), [1], [Define to 1 if you have the `]m4_defn([DOWN])[' function.]) | ||
414 | fi | ||
415 | fi | ||
416 | |||
417 | efl_func_[]m4_defn([DOWN])="${have_fct}" | ||
418 | |||
419 | m4_popdef([DOWN]) | ||
420 | m4_popdef([UP]) | ||
421 | ]) | ||
422 | |||
423 | dnl Macro that iterates over a sequence of space separated function | ||
424 | dnl and that call EFL_CHECK_FUNC() for each of these functions | ||
425 | dnl | ||
426 | dnl EFL_CHECK_FUNCS(EFL, FUNCTIONS) | ||
427 | |||
428 | AC_DEFUN([EFL_CHECK_FUNCS], | ||
429 | [ | ||
430 | m4_foreach_w([fct], [$2], [EFL_CHECK_FUNC($1, m4_defn([fct]))]) | ||
431 | ]) | ||
diff --git a/legacy/eina/src/lib/Makefile.am b/legacy/eina/src/lib/Makefile.am index 19e9175..4f53c2a 100644 --- a/legacy/eina/src/lib/Makefile.am +++ b/legacy/eina/src/lib/Makefile.am | |||
@@ -170,7 +170,7 @@ else | |||
170 | libeina_la_SOURCES = $(base_sources) | 170 | libeina_la_SOURCES = $(base_sources) |
171 | endif | 171 | endif |
172 | 172 | ||
173 | libeina_la_LIBADD = @iconv_libs@ @EFL_SHM_OPEN_LIBS@ @EINA_LIBS@ @EFL_DLOPEN_LIBS@ @EFL_DLADDR_LIBS@ -lm | 173 | libeina_la_LIBADD = @EINA_LIBS@ -lm |
174 | libeina_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -version-info @version_info@ @release_info@ @EFL_PTHREAD_LIBS@ | 174 | libeina_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -version-info @version_info@ @release_info@ @EFL_PTHREAD_LIBS@ |
175 | libeina_la_CFLAGS = @EINA_CFLAGS@ @EFL_PTHREAD_CFLAGS@ | 175 | libeina_la_CFLAGS = @EINA_CFLAGS@ @EFL_PTHREAD_CFLAGS@ |
176 | 176 | ||