diff options
author | Marcel Hollerbach <mail@marcel-hollerbach.de> | 2019-05-26 18:30:54 +0200 |
---|---|---|
committer | Marcel Hollerbach <mail@marcel-hollerbach.de> | 2019-06-18 08:56:34 +0200 |
commit | 639869703f3e8b0ce34d83b523ff611e85cfd93b (patch) | |
tree | dc72c59b87a83d02758ae81f979a25e21b226a8b /m4 | |
parent | 4f8e15c16c4f68b6fae8708b177ce672daefc59c (diff) |
autotools: REMOVAL!
Get your seatbelt fastend! It is happening! AUTOTOOLS IS GONE NOW!
All praise to meson!
This time the final version, ci has been adjusted, and now does not try
anymore to build a removed buildsystem. However, the scripts in there
need cleaning up.
Differential Revision: https://phab.enlightenment.org/D9027
Diffstat (limited to 'm4')
38 files changed, 0 insertions, 4223 deletions
diff --git a/m4/.gitignore b/m4/.gitignore deleted file mode 100644 index 53b4209599..0000000000 --- a/m4/.gitignore +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | /libtool.m4 | ||
2 | /ltoptions.m4 | ||
3 | /ltsugar.m4 | ||
4 | /ltversion.m4 | ||
5 | /lt~obsolete.m4 | ||
6 | /codeset.m4 | ||
7 | /fcntl-o.m4 | ||
8 | /gettext.m4 | ||
9 | /glibc2.m4 | ||
10 | /glibc21.m4 | ||
11 | /iconv.m4 | ||
12 | /intdiv0.m4 | ||
13 | /intl.m4 | ||
14 | /intldir.m4 | ||
15 | /intlmacosx.m4 | ||
16 | /intmax.m4 | ||
17 | /inttypes-pri.m4 | ||
18 | /inttypes_h.m4 | ||
19 | /lcmessage.m4 | ||
20 | /lib-ld.m4 | ||
21 | /lib-link.m4 | ||
22 | /lib-prefix.m4 | ||
23 | /lock.m4 | ||
24 | /longlong.m4 | ||
25 | /nls.m4 | ||
26 | /po.m4 | ||
27 | /printf-posix.m4 | ||
28 | /progtest.m4 | ||
29 | /size_max.m4 | ||
30 | /stdint_h.m4 | ||
31 | /uintmax_t.m4 | ||
32 | /visibility.m4 | ||
33 | /threadlib.m4 | ||
34 | /wchar_t.m4 | ||
35 | /wint_t.m4 | ||
36 | /xsize.m4 | ||
diff --git a/m4/ac_define_if.m4 b/m4/ac_define_if.m4 deleted file mode 100644 index 961ca64452..0000000000 --- a/m4/ac_define_if.m4 +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | dnl use: AC_DEFINE_IF(id, testcond, val, comment) | ||
2 | AC_DEFUN([AC_DEFINE_IF], | ||
3 | [ | ||
4 | if $2; then | ||
5 | AC_DEFINE($1, $3, $4) | ||
6 | fi | ||
7 | ]) | ||
diff --git a/m4/ac_path_generic.m4 b/m4/ac_path_generic.m4 deleted file mode 100644 index d42724115f..0000000000 --- a/m4/ac_path_generic.m4 +++ /dev/null | |||
@@ -1,137 +0,0 @@ | |||
1 | dnl @synopsis AC_PATH_GENERIC(LIBRARY [, MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) | ||
2 | dnl | ||
3 | dnl Runs a LIBRARY-config script and defines LIBRARY_CFLAGS and LIBRARY_LIBS | ||
4 | dnl | ||
5 | dnl The script must support `--cflags' and `--libs' args. | ||
6 | dnl If MINIMUM-VERSION is specified, the script must also support the | ||
7 | dnl `--version' arg. | ||
8 | dnl If the `--with-library-[exec-]prefix' arguments to ./configure are given, | ||
9 | dnl it must also support `--prefix' and `--exec-prefix'. | ||
10 | dnl (In other words, it must be like gtk-config.) | ||
11 | dnl | ||
12 | dnl For example: | ||
13 | dnl | ||
14 | dnl AC_PATH_GENERIC(Foo, 1.0.0) | ||
15 | dnl | ||
16 | dnl would run `foo-config --version' and check that it is at least 1.0.0 | ||
17 | dnl | ||
18 | dnl If so, the following would then be defined: | ||
19 | dnl | ||
20 | dnl FOO_CFLAGS to `foo-config --cflags` | ||
21 | dnl FOO_LIBS to `foo-config --libs` | ||
22 | dnl | ||
23 | dnl At present there is no support for additional "MODULES" (see AM_PATH_GTK) | ||
24 | dnl (shamelessly stolen from gtk.m4 and then hacked around a fair amount) | ||
25 | dnl | ||
26 | dnl @author Angus Lees <gusl@cse.unsw.edu.au> | ||
27 | |||
28 | AC_DEFUN([AC_PATH_GENERIC], | ||
29 | [dnl | ||
30 | dnl we're going to need uppercase, lowercase and user-friendly versions of the | ||
31 | dnl string `LIBRARY' | ||
32 | pushdef([UP], translit([$1], [a-z], [A-Z]))dnl | ||
33 | pushdef([DOWN], translit([$1], [A-Z], [a-z]))dnl | ||
34 | |||
35 | dnl | ||
36 | dnl Get the cflags and libraries from the LIBRARY-config script | ||
37 | dnl | ||
38 | AC_ARG_WITH(DOWN-prefix, | ||
39 | [ --with-]DOWN[-prefix=PFX Prefix where $1 is installed (optional)], | ||
40 | DOWN[]_config_prefix="$withval", DOWN[]_config_prefix="") | ||
41 | AC_ARG_WITH(DOWN-exec-prefix, | ||
42 | [ --with-]DOWN[-exec-prefix=PFX Exec prefix where $1 is installed (optional)], | ||
43 | DOWN[]_config_exec_prefix="$withval", DOWN[]_config_exec_prefix="") | ||
44 | |||
45 | if test x$DOWN[]_config_exec_prefix != x ; then | ||
46 | DOWN[]_config_args="$DOWN[]_config_args --exec-prefix=$DOWN[]_config_exec_prefix" | ||
47 | if test x${UP[]_CONFIG+set} != xset ; then | ||
48 | UP[]_CONFIG=$DOWN[]_config_exec_prefix/bin/DOWN-config | ||
49 | fi | ||
50 | fi | ||
51 | if test x$DOWN[]_config_prefix != x ; then | ||
52 | DOWN[]_config_args="$DOWN[]_config_args --prefix=$DOWN[]_config_prefix" | ||
53 | if test x${UP[]_CONFIG+set} != xset ; then | ||
54 | UP[]_CONFIG=$DOWN[]_config_prefix/bin/DOWN-config | ||
55 | fi | ||
56 | fi | ||
57 | |||
58 | AC_PATH_PROG(UP[]_CONFIG, DOWN-config, no) | ||
59 | ifelse([$2], , | ||
60 | AC_MSG_CHECKING(for $1), | ||
61 | AC_MSG_CHECKING(for $1 - version >= $2) | ||
62 | ) | ||
63 | no_[]DOWN="" | ||
64 | if test "$UP[]_CONFIG" = "no" ; then | ||
65 | no_[]DOWN=yes | ||
66 | else | ||
67 | UP[]_CFLAGS="`$UP[]_CONFIG $DOWN[]_config_args --cflags`" | ||
68 | UP[]_LIBS="`$UP[]_CONFIG $DOWN[]_config_args --libs`" | ||
69 | ifelse([$2], , ,[ | ||
70 | DOWN[]_config_major_version=`$UP[]_CONFIG $DOWN[]_config_args \ | ||
71 | --version | sed 's/[[^0-9]]*\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\).*/\1/'` | ||
72 | DOWN[]_config_minor_version=`$UP[]_CONFIG $DOWN[]_config_args \ | ||
73 | --version | sed 's/[[^0-9]]*\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\).*/\2/'` | ||
74 | DOWN[]_config_micro_version=`$UP[]_CONFIG $DOWN[]_config_args \ | ||
75 | --version | sed 's/[[^0-9]]*\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\).*/\3/'` | ||
76 | DOWN[]_wanted_major_version="regexp($2, [\<\([0-9]*\)], [\1])" | ||
77 | DOWN[]_wanted_minor_version="regexp($2, [\<\([0-9]*\)\.\([0-9]*\)], [\2])" | ||
78 | DOWN[]_wanted_micro_version="regexp($2, [\<\([0-9]*\).\([0-9]*\).\([0-9]*\)], [\3])" | ||
79 | |||
80 | # Compare wanted version to what config script returned. | ||
81 | # If I knew what library was being run, i'd probably also compile | ||
82 | # a test program at this point (which also extracted and tested | ||
83 | # the version in some library-specific way) | ||
84 | if test "$DOWN[]_config_major_version" -lt \ | ||
85 | "$DOWN[]_wanted_major_version" \ | ||
86 | -o \( "$DOWN[]_config_major_version" -eq \ | ||
87 | "$DOWN[]_wanted_major_version" \ | ||
88 | -a "$DOWN[]_config_minor_version" -lt \ | ||
89 | "$DOWN[]_wanted_minor_version" \) \ | ||
90 | -o \( "$DOWN[]_config_major_version" -eq \ | ||
91 | "$DOWN[]_wanted_major_version" \ | ||
92 | -a "$DOWN[]_config_minor_version" -eq \ | ||
93 | "$DOWN[]_wanted_minor_version" \ | ||
94 | -a "$DOWN[]_config_micro_version" -lt \ | ||
95 | "$DOWN[]_wanted_micro_version" \) ; then | ||
96 | # older version found | ||
97 | no_[]DOWN=yes | ||
98 | echo -n "*** An old version of $1 " | ||
99 | echo -n "($DOWN[]_config_major_version" | ||
100 | echo -n ".$DOWN[]_config_minor_version" | ||
101 | echo ".$DOWN[]_config_micro_version) was found." | ||
102 | echo -n "*** You need a version of $1 newer than " | ||
103 | echo -n "$DOWN[]_wanted_major_version" | ||
104 | echo -n ".$DOWN[]_wanted_minor_version" | ||
105 | echo ".$DOWN[]_wanted_micro_version." | ||
106 | echo "***" | ||
107 | echo "*** If you have already installed a sufficiently new version, this error" | ||
108 | echo "*** probably means that the wrong copy of the DOWN-config shell script is" | ||
109 | echo "*** being found. The easiest way to fix this is to remove the old version" | ||
110 | echo "*** of $1, but you can also set the UP[]_CONFIG environment to point to the" | ||
111 | echo "*** correct copy of DOWN-config. (In this case, you will have to" | ||
112 | echo "*** modify your LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf" | ||
113 | echo "*** so that the correct libraries are found at run-time)" | ||
114 | fi | ||
115 | ]) | ||
116 | fi | ||
117 | if test "x$no_[]DOWN" = x ; then | ||
118 | AC_MSG_RESULT(yes) | ||
119 | ifelse([$3], , :, [$3]) | ||
120 | else | ||
121 | AC_MSG_RESULT(no) | ||
122 | if test "$UP[]_CONFIG" = "no" ; then | ||
123 | echo "*** The DOWN-config script installed by $1 could not be found" | ||
124 | echo "*** If $1 was installed in PREFIX, make sure PREFIX/bin is in" | ||
125 | echo "*** your path, or set the UP[]_CONFIG environment variable to the" | ||
126 | echo "*** full path to DOWN-config." | ||
127 | fi | ||
128 | UP[]_CFLAGS="" | ||
129 | UP[]_LIBS="" | ||
130 | ifelse([$4], , :, [$4]) | ||
131 | fi | ||
132 | AC_SUBST(UP[]_CFLAGS) | ||
133 | AC_SUBST(UP[]_LIBS) | ||
134 | |||
135 | popdef([UP]) | ||
136 | popdef([DOWN]) | ||
137 | ]) | ||
diff --git a/m4/ax_cxx_compile_stdcxx_11.m4 b/m4/ax_cxx_compile_stdcxx_11.m4 deleted file mode 100644 index af37acdb5c..0000000000 --- a/m4/ax_cxx_compile_stdcxx_11.m4 +++ /dev/null | |||
@@ -1,133 +0,0 @@ | |||
1 | # ============================================================================ | ||
2 | # http://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_11.html | ||
3 | # ============================================================================ | ||
4 | # | ||
5 | # SYNOPSIS | ||
6 | # | ||
7 | # AX_CXX_COMPILE_STDCXX_11([ext|noext],[mandatory|optional]) | ||
8 | # | ||
9 | # DESCRIPTION | ||
10 | # | ||
11 | # Check for baseline language coverage in the compiler for the C++11 | ||
12 | # standard; if necessary, add switches to CXXFLAGS to enable support. | ||
13 | # | ||
14 | # The first argument, if specified, indicates whether you insist on an | ||
15 | # extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g. | ||
16 | # -std=c++11). If neither is specified, you get whatever works, with | ||
17 | # preference for an extended mode. | ||
18 | # | ||
19 | # The second argument, if specified 'mandatory' or if left unspecified, | ||
20 | # indicates that baseline C++11 support is required and that the macro | ||
21 | # should error out if no mode with that support is found. If specified | ||
22 | # 'optional', then configuration proceeds regardless, after defining | ||
23 | # HAVE_CXX11 if and only if a supporting mode is found. | ||
24 | # | ||
25 | # LICENSE | ||
26 | # | ||
27 | # Copyright (c) 2008 Benjamin Kosnik <bkoz@redhat.com> | ||
28 | # Copyright (c) 2012 Zack Weinberg <zackw@panix.com> | ||
29 | # Copyright (c) 2013 Roy Stogner <roystgnr@ices.utexas.edu> | ||
30 | # | ||
31 | # Copying and distribution of this file, with or without modification, are | ||
32 | # permitted in any medium without royalty provided the copyright notice | ||
33 | # and this notice are preserved. This file is offered as-is, without any | ||
34 | # warranty. | ||
35 | |||
36 | #serial 3 | ||
37 | |||
38 | m4_define([_AX_CXX_COMPILE_STDCXX_11_testbody], [ | ||
39 | template <typename T> | ||
40 | struct check | ||
41 | { | ||
42 | static_assert(sizeof(int) <= sizeof(T), "not big enough"); | ||
43 | }; | ||
44 | |||
45 | typedef check<check<bool>> right_angle_brackets; | ||
46 | |||
47 | int a; | ||
48 | decltype(a) b; | ||
49 | |||
50 | typedef check<int> check_type; | ||
51 | check_type c; | ||
52 | check_type&& cr = static_cast<check_type&&>(c); | ||
53 | |||
54 | auto d = a; | ||
55 | ]) | ||
56 | |||
57 | AC_DEFUN([AX_CXX_COMPILE_STDCXX_11], [dnl | ||
58 | m4_if([$1], [], [], | ||
59 | [$1], [ext], [], | ||
60 | [$1], [noext], [], | ||
61 | [m4_fatal([invalid argument `$1' to AX_CXX_COMPILE_STDCXX_11])])dnl | ||
62 | m4_if([$2], [], [ax_cxx_compile_cxx11_required=true], | ||
63 | [$2], [mandatory], [ax_cxx_compile_cxx11_required=true], | ||
64 | [$2], [optional], [ax_cxx_compile_cxx11_required=false], | ||
65 | [m4_fatal([invalid second argument `$2' to AX_CXX_COMPILE_STDCXX_11])])dnl | ||
66 | AC_LANG_PUSH([C++])dnl | ||
67 | ac_success=no | ||
68 | AC_CACHE_CHECK(whether $CXX supports C++11 features by default, | ||
69 | ax_cv_cxx_compile_cxx11, | ||
70 | [AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])], | ||
71 | [ax_cv_cxx_compile_cxx11=yes], | ||
72 | [ax_cv_cxx_compile_cxx11=no])]) | ||
73 | if test x$ax_cv_cxx_compile_cxx11 = xyes; then | ||
74 | ac_success=yes | ||
75 | fi | ||
76 | |||
77 | m4_if([$1], [noext], [], [dnl | ||
78 | if test x$ac_success = xno; then | ||
79 | for switch in -std=gnu++11 -std=gnu++0x; do | ||
80 | cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx11_$switch]) | ||
81 | AC_CACHE_CHECK(whether $CXX supports C++11 features with $switch, | ||
82 | $cachevar, | ||
83 | [ac_save_CXXFLAGS="$CXXFLAGS" | ||
84 | CXXFLAGS="$CXXFLAGS $switch" | ||
85 | AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])], | ||
86 | [eval $cachevar=yes], | ||
87 | [eval $cachevar=no]) | ||
88 | CXXFLAGS="$ac_save_CXXFLAGS"]) | ||
89 | if eval test x\$$cachevar = xyes; then | ||
90 | CXXFLAGS="$CXXFLAGS $switch" | ||
91 | ac_success=yes | ||
92 | break | ||
93 | fi | ||
94 | done | ||
95 | fi]) | ||
96 | |||
97 | m4_if([$1], [ext], [], [dnl | ||
98 | if test x$ac_success = xno; then | ||
99 | for switch in -std=c++11 -std=c++0x; do | ||
100 | cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx11_$switch]) | ||
101 | AC_CACHE_CHECK(whether $CXX supports C++11 features with $switch, | ||
102 | $cachevar, | ||
103 | [ac_save_CXXFLAGS="$CXXFLAGS" | ||
104 | CXXFLAGS="$CXXFLAGS $switch" | ||
105 | AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])], | ||
106 | [eval $cachevar=yes], | ||
107 | [eval $cachevar=no]) | ||
108 | CXXFLAGS="$ac_save_CXXFLAGS"]) | ||
109 | if eval test x\$$cachevar = xyes; then | ||
110 | CXXFLAGS="$CXXFLAGS $switch" | ||
111 | ac_success=yes | ||
112 | break | ||
113 | fi | ||
114 | done | ||
115 | fi]) | ||
116 | AC_LANG_POP([C++]) | ||
117 | if test x$ax_cxx_compile_cxx11_required = xtrue; then | ||
118 | if test x$ac_success = xno; then | ||
119 | AC_MSG_ERROR([*** A compiler with support for C++11 language features is required.]) | ||
120 | fi | ||
121 | else | ||
122 | if test x$ac_success = xno; then | ||
123 | HAVE_CXX11=0 | ||
124 | AC_MSG_NOTICE([No compiler with C++11 support was found]) | ||
125 | else | ||
126 | HAVE_CXX11=1 | ||
127 | AC_DEFINE(HAVE_CXX11,1, | ||
128 | [define if the compiler supports basic C++11 syntax]) | ||
129 | fi | ||
130 | |||
131 | AC_SUBST(HAVE_CXX11) | ||
132 | fi | ||
133 | ]) | ||
diff --git a/m4/ecore_check_c_extension.m4 b/m4/ecore_check_c_extension.m4 deleted file mode 100644 index da4b44fe0c..0000000000 --- a/m4/ecore_check_c_extension.m4 +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | dnl use: ECORE_CHECK_X_EXTENSION(Foo, header, lib, func) | ||
2 | AC_DEFUN([ECORE_CHECK_X_EXTENSION], | ||
3 | [ | ||
4 | pushdef([UP], translit([$1], [a-z], [A-Z]))dnl | ||
5 | |||
6 | SAVE_CFLAGS=$CFLAGS | ||
7 | CFLAGS="$CFLAGS $ECORE_X_XLIB_cflags" | ||
8 | AC_CHECK_HEADER(X11/extensions/$2, | ||
9 | [ | ||
10 | SAVE_LIBS=$LIBS | ||
11 | LIBS="$LIBS $ECORE_X_XLIB_libs" | ||
12 | AC_CHECK_LIB($3, $4, | ||
13 | [AC_DEFINE(ECORE_[]UP, 1, [Build support for $1])], | ||
14 | [AC_MSG_ERROR([Missing support for X extension: $1])]) | ||
15 | LIBS=$SAVE_LIBS | ||
16 | ], | ||
17 | [AC_MSG_ERROR([Missing X11/extensions/$2])], | ||
18 | [ #include <X11/Xlib.h> ] | ||
19 | ) | ||
20 | CFLAGS=$SAVE_CFLAGS | ||
21 | |||
22 | ECORE_X_LIBS="${ECORE_X_LIBS} -l$3" | ||
23 | |||
24 | popdef([UP]) | ||
25 | ]) | ||
diff --git a/m4/ecore_check_module.m4 b/m4/ecore_check_module.m4 deleted file mode 100644 index 8fdec9bdc4..0000000000 --- a/m4/ecore_check_module.m4 +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | dnl use: ECORE_EVAS_MODULE(name, want, [DEPENDENCY-CHECK-CODE]) | ||
2 | AC_DEFUN([ECORE_EVAS_MODULE], | ||
3 | [dnl | ||
4 | m4_pushdef([UP], m4_translit([[$1]], [-a-z], [_A-Z]))dnl | ||
5 | m4_pushdef([DOWN], m4_translit([[$1]], [-A-Z], [_a-z]))dnl | ||
6 | |||
7 | have_ecore_evas_[]m4_defn([DOWN])="no" | ||
8 | want_module="$2" | ||
9 | |||
10 | ecore_evas_engines_[]m4_defn([DOWN])[]_cflags="" | ||
11 | ecore_evas_engines_[]m4_defn([DOWN])[]_libs="" | ||
12 | |||
13 | if test "x$want_module" = "xyes" || test "x$want_module" = "xstatic"; then | ||
14 | $3 | ||
15 | |||
16 | AC_DEFINE([BUILD_ECORE_EVAS_]m4_defn([UP]), [1], [Support for $1 Engine in Ecore_Evas]) | ||
17 | have_ecore_evas_[]m4_defn([DOWN])="yes" | ||
18 | |||
19 | case "$1" in | ||
20 | xgl-drm) | ||
21 | PKG_CHECK_MODULES([GBM], [gbm]) | ||
22 | ecore_evas_engines_[]m4_defn([DOWN])[]_cflags="${GBM_CFLAGS}" | ||
23 | ecore_evas_engines_[]m4_defn([DOWN])[]_libs="${GBM_LIBS}" | ||
24 | ;; | ||
25 | esac | ||
26 | fi | ||
27 | |||
28 | AC_SUBST([ecore_evas_engines_]m4_defn([DOWN])[_cflags]) | ||
29 | AC_SUBST([ecore_evas_engines_]m4_defn([DOWN])[_libs]) | ||
30 | |||
31 | EFL_ADD_FEATURE([ECORE_EVAS], [$1], [${want_module}])dnl | ||
32 | AM_CONDITIONAL([BUILD_ECORE_EVAS_]UP, [test "x$have_ecore_evas_]m4_defn([DOWN])[" = "xyes"])dnl | ||
33 | m4_popdef([UP])dnl | ||
34 | m4_popdef([DOWN])dnl | ||
35 | ]) | ||
diff --git a/m4/efl.m4 b/m4/efl.m4 deleted file mode 100644 index a01c5b401c..0000000000 --- a/m4/efl.m4 +++ /dev/null | |||
@@ -1,509 +0,0 @@ | |||
1 | dnl file to manage modules in efl | ||
2 | |||
3 | dnl EFL_VERSION(major, minor, micro, release) | ||
4 | dnl This setup EFL version information and should be called BEFORE AC_INIT(). | ||
5 | dnl | ||
6 | dnl release parameter is 'dev' to use from SVN or libtool -release field. | ||
7 | dnl It may be empty if not dev (svn/live build) and no -release is to be used. | ||
8 | dnl | ||
9 | dnl Examples: | ||
10 | dnl EFL_VERSION(1, 7, 99, dev) | ||
11 | dnl EFL_VERSION(1, 7, 99, ver-1234) | ||
12 | dnl This will define couple of m4 symbols: | ||
13 | dnl v_maj = given major number (first parameter) | ||
14 | dnl v_min = given minor number (second parameter) | ||
15 | dnl v_mic = given micro number (third parameter) | ||
16 | dnl v_rev = if release, it's 0, otherwise it's dev_version. | ||
17 | dnl v_rel = if release, it's -release followed by fourth parameter, | ||
18 | dnl otherwise it's empty. (mostly for libtool) | ||
19 | dnl efl_version = if release, it's major.minor.micro, otherwise it's | ||
20 | dnl major.minor.micro.dev_version | ||
21 | dnl dev_version = development version (svn revision). | ||
22 | dnl def_build_profile = dev or release based on 'dev' release parameter. | ||
23 | AC_DEFUN([EFL_VERSION], | ||
24 | [dnl | ||
25 | m4_define([v_maj], [$1])dnl | ||
26 | m4_define([v_min], [$2])dnl | ||
27 | m4_define([v_mic], [$3])dnl | ||
28 | m4_define([dev_version], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || echo 0) | tr -d '\n']))dnl | ||
29 | m4_define([v_rev], m4_if($4, dev, [dev_version], [0]))dnl | ||
30 | m4_define([v_rel], [])dnl | ||
31 | m4_define([def_build_profile], m4_if($4, dev, [dev], [release]))dnl | ||
32 | m4_define([efl_version], m4_if($4, dev, [v_maj.v_min.v_mic.v_rev], [v_maj.v_min.v_mic]))dnl | ||
33 | dnl m4_define([efl_version], [v_maj.v_min.v_mic])dnl | ||
34 | ]) | ||
35 | |||
36 | dnl EFL_COLOR | ||
37 | dnl will check if terminal supports color and if color is wanted by user. | ||
38 | dnl | ||
39 | dnl Used Variables: | ||
40 | dnl WANT_COLOR: if no, forces no color output. | ||
41 | dnl TERM: used to check if color should be enabled. | ||
42 | dnl | ||
43 | dnl Defined Variables: | ||
44 | dnl COLOR_YES: to be used in positive/yes conditions | ||
45 | dnl COLOR_NO: to be used in negative/no conditions | ||
46 | dnl COLOR_OTHER: to be used to highlight some other condition | ||
47 | dnl COLOR_RESET: to reset color | ||
48 | dnl want_color: yes or no | ||
49 | AC_DEFUN([EFL_COLOR], | ||
50 | [dnl | ||
51 | case "$TERM" in | ||
52 | xterm|xterm-color|xterm-256color|Eterm|aterm|kterm|rxvt*|screen|gnome|interix) | ||
53 | want_color="${WANT_COLOR:-yes}" | ||
54 | ;; | ||
55 | *) | ||
56 | want_color="no" | ||
57 | ;; | ||
58 | esac | ||
59 | |||
60 | ### echo compatibility | ||
61 | |||
62 | ## the BSD echo does not have the -e option (it is the default behaviour) | ||
63 | echo_e= | ||
64 | if test "`echo -e x`" = "x"; then | ||
65 | echo_e=-e | ||
66 | fi | ||
67 | AC_SUBST([ECHO_E], [${echo_e}]) | ||
68 | |||
69 | if test "${want_color}" = "yes"; then | ||
70 | COLOR_YES=`echo $echo_e "\033@<:@1;32m"` | ||
71 | COLOR_NO=`echo $echo_e "\033@<:@1;31m"` | ||
72 | COLOR_OTHER=`echo $echo_e "\033@<:@1;36m"` | ||
73 | COLOR_RESET=`echo $echo_e "\033@<:@0m"` | ||
74 | else | ||
75 | COLOR_YES="" | ||
76 | COLOR_NO="" | ||
77 | COLOR_OTHER="" | ||
78 | COLOR_RESET="" | ||
79 | fi | ||
80 | ]) | ||
81 | |||
82 | dnl EFL_INIT() | ||
83 | dnl Will AC_DEFINE() the following: | ||
84 | dnl VMAJ = v_maj | ||
85 | dnl VMIN = v_min | ||
86 | dnl VMIC = v_mic | ||
87 | dnl VREV = v_rev | ||
88 | dnl Will AC_SUBST() the following: | ||
89 | dnl VMAJ = v_maj | ||
90 | dnl VMIN = v_min | ||
91 | dnl VMIC = v_mic | ||
92 | dnl EFL_LTLIBRARY_FLAGS="-no-undefined -version-info ..." | ||
93 | dnl EFL_LTMODULE_FLAGS="-no-undefined -avoid-version" | ||
94 | dnl Will define the following m4: | ||
95 | dnl lt_cur = libtool 'current' field of libtool's -version-info | ||
96 | dnl lt_rev = libtool 'revision' field of libtool's -version-info | ||
97 | dnl lt_age = libtool 'age' field of libtool's -version-info | ||
98 | AC_DEFUN([EFL_INIT], | ||
99 | [dnl | ||
100 | AC_REQUIRE([EFL_COLOR])dnl | ||
101 | AC_DEFINE_UNQUOTED([VMAJ], [v_maj], [Major version])dnl | ||
102 | AC_DEFINE_UNQUOTED([VMIN], [v_min], [Minor version])dnl | ||
103 | AC_DEFINE_UNQUOTED([VMIC], [v_mic], [Micro version])dnl | ||
104 | AC_DEFINE_UNQUOTED([VREV], [v_rev], [Revison])dnl | ||
105 | VMAJ=v_maj | ||
106 | VMIN=v_min | ||
107 | VMIC=v_mic | ||
108 | AC_SUBST([VMAJ])dnl | ||
109 | AC_SUBST([VMIN])dnl | ||
110 | AC_SUBST([VMIC])dnl | ||
111 | dnl | ||
112 | dnl TODO: warning - lt_cur: | ||
113 | dnl the previous code assumed v_maj + v_min, but this will be a problem when | ||
114 | dnl we bump v_maj and reset v_min. 1 + 7 == 7 + 1, so if v_maj is bumped | ||
115 | dnl we multiply it by 100. | ||
116 | m4_define([lt_cur], m4_if(m4_cmp(v_maj, 1), 0, m4_eval(v_maj + v_min), m4_eval(v_maj * 100 + v_min)))dnl | ||
117 | m4_define([lt_rev], v_mic)dnl | ||
118 | m4_define([lt_age], v_min)dnl | ||
119 | dnl | ||
120 | EFL_LTLIBRARY_FLAGS="-no-undefined -version-info lt_cur:lt_rev:lt_age v_rel" | ||
121 | AC_SUBST(EFL_LTLIBRARY_FLAGS)dnl | ||
122 | EFL_LTMODULE_FLAGS="-no-undefined -avoid-version" | ||
123 | AC_SUBST([EFL_LTMODULE_FLAGS])dnl | ||
124 | AC_MSG_NOTICE([Initialized AC_PACKAGE_NAME (AC_PACKAGE_VERSION) development=dev_version v_rel]) | ||
125 | ]) | ||
126 | |||
127 | dnl EFL_EVAL_PKGS(EFL) | ||
128 | dnl does PKG_CHECK_MODULES() for given EFL | ||
129 | AC_DEFUN([EFL_EVAL_PKGS], | ||
130 | [dnl | ||
131 | m4_pushdef([DOWNEFL], m4_translit([$1], [-A-Z], [_a-z]))dnl | ||
132 | if test "x${requirements_pc_deps_[]m4_defn([DOWNEFL])}" != "x"; then | ||
133 | PKG_CHECK_MODULES([$1], [${requirements_pc_deps_[]m4_defn([DOWNEFL])}]) | ||
134 | fi | ||
135 | m4_popdef([DOWNEFL])dnl | ||
136 | ]) | ||
137 | |||
138 | dnl EFL_INTERNAL_DEPEND_PKG(EFL, OTHEREFL) | ||
139 | dnl Adds a pkg-config dependency on another EFL. | ||
140 | AC_DEFUN([EFL_INTERNAL_DEPEND_PKG], | ||
141 | [dnl | ||
142 | m4_pushdef([DOWNEFL], m4_translit([$1], [-A-Z], [_a-z]))dnl | ||
143 | m4_pushdef([DOWNOTHER], m4_translit([$2], [-A-Z], [_a-z]))dnl | ||
144 | dnl TODO: we need to fix the package config names for 2.0 | ||
145 | dnl TODO: and make them uniform in scheme. | ||
146 | depname="$2" | ||
147 | libdirname="m4_defn([DOWNOTHER])" | ||
148 | libname="m4_defn([DOWNOTHER])" | ||
149 | case "m4_defn([DOWNOTHER])" in | ||
150 | ethumb_client) | ||
151 | depname="ethumb_client" | ||
152 | ;; | ||
153 | efreet_mime) | ||
154 | libdirname="efreet" | ||
155 | ;; | ||
156 | efreet_trash) | ||
157 | libdirname="efreet" | ||
158 | ;; | ||
159 | ecore_x) | ||
160 | depname="ecore-x" | ||
161 | ;; | ||
162 | ecore_wl2) | ||
163 | depname="ecore-wl2" | ||
164 | ;; | ||
165 | ecore_fb) | ||
166 | depname="ecore-fb" | ||
167 | ;; | ||
168 | ecore_drm) | ||
169 | depname="ecore-drm" | ||
170 | ;; | ||
171 | ecore_cocoa) | ||
172 | depname="ecore-cocoa" | ||
173 | ;; | ||
174 | ecore_win32) | ||
175 | depname="ecore-win32" | ||
176 | ;; | ||
177 | ecore_drm2) | ||
178 | depname="ecore-drm2" | ||
179 | ;; | ||
180 | ecore_sdl) | ||
181 | depname="ecore-sdl" | ||
182 | ;; | ||
183 | ecore_file) | ||
184 | depname="ecore-file" | ||
185 | ;; | ||
186 | esac | ||
187 | requirements_pc_[]m4_defn([DOWNEFL])="${depname} >= ${PACKAGE_VERSION} ${requirements_pc_[][]m4_defn([DOWNEFL])}" | ||
188 | requirements_cflags_[]m4_defn([DOWNEFL])="${requirements_cflags_[][]m4_defn([DOWNEFL])} -I\$(top_srcdir)/src/lib/${libdirname} -I\$(top_builddir)/src/lib/${libdirname}" | ||
189 | requirements_internal_libs_[]m4_defn([DOWNEFL])="${requirements_internal_libs_[][]m4_defn([DOWNEFL])} lib/${libdirname}/lib${libname}.la" | ||
190 | requirements_internal_deps_libs_[]m4_defn([DOWNEFL])="${requirements_internal_deps_libs_[][]m4_defn([DOWNEFL])} ${requirements_public_libs_[]m4_defn([DOWNOTHER])}" | ||
191 | m4_popdef([DOWNOTHER])dnl | ||
192 | m4_popdef([DOWNEFL])dnl | ||
193 | ]) | ||
194 | |||
195 | dnl EFL_PLATFORM_DEPEND(EFL, PLATFORM) | ||
196 | dnl PLATFORM is one of: all, evil, escape, exotic | ||
197 | AC_DEFUN([EFL_PLATFORM_DEPEND], | ||
198 | [dnl | ||
199 | m4_pushdef([DOWNOTHER], m4_translit([$2], [-A-Z], [_a-z]))dnl | ||
200 | case "m4_defn([DOWNOTHER])" in | ||
201 | all) | ||
202 | if test "x${efl_lib_optional_evil}" = "xyes"; then | ||
203 | EFL_INTERNAL_DEPEND_PKG([$1], [evil]) | ||
204 | elif test "x${efl_lib_optional_escape}" = "xyes"; then | ||
205 | EFL_INTERNAL_DEPEND_PKG([$1], [escape]) | ||
206 | elif test "x${efl_lib_optional_exotic}" = "xyes"; then | ||
207 | EFL_INTERNAL_DEPEND_PKG([$1], [exotic]) | ||
208 | fi | ||
209 | ;; | ||
210 | *) | ||
211 | if test "x${efl_lib_optional_[]m4_defn([DOWNOTHER])}" = "xyes"; then | ||
212 | EFL_INTERNAL_DEPEND_PKG([$1], [$2]) | ||
213 | fi | ||
214 | ;; | ||
215 | esac | ||
216 | m4_popdef([DOWNOTHER])dnl | ||
217 | ]) | ||
218 | |||
219 | dnl EFL_CRYPTO_DEPEND(EFL) | ||
220 | dnl the given EFL will use/depend on system crypto settings | ||
221 | AC_DEFUN([EFL_CRYPTO_DEPEND], | ||
222 | [dnl | ||
223 | m4_pushdef([DOWNEFL], m4_translit([$1], [-A-Z], [_a-z]))dnl | ||
224 | requirements_pc_[]m4_defn([DOWNEFL])="${requirements_pc_[][]m4_defn([DOWNEFL])} ${requirements_pc_crypto}" | ||
225 | requirements_pc_deps_[]m4_defn([DOWNEFL])="${requirements_pc_deps_[][]m4_defn([DOWNEFL])} ${requirements_pc_deps_crypto}" | ||
226 | requirements_libs_[]m4_defn([DOWNEFL])="${requirements_libs_[][]m4_defn([DOWNEFL])} ${requirements_libs_crypto}" | ||
227 | requirements_cflags_[]m4_defn([DOWNEFL])="${requirements_cflags_[][]m4_defn([DOWNEFL])} ${requirements_cflags_crypto}" | ||
228 | m4_popdef([DOWNEFL])dnl | ||
229 | ]) | ||
230 | |||
231 | dnl EFL_DEPEND_PKG(EFL, NAME, PACKAGE, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) | ||
232 | dnl Adds a pkg-config dependency to an efl, AC_DEFINE() HAVE_NAME, | ||
233 | dnl and inserts dependencies in proper variables | ||
234 | AC_DEFUN([EFL_DEPEND_PKG], | ||
235 | [dnl | ||
236 | m4_pushdef([UPEFL], m4_translit([$1], [-a-z], [_A-Z]))dnl | ||
237 | m4_pushdef([DOWNEFL], m4_translit([$1], [-A-Z], [_a-z]))dnl | ||
238 | m4_pushdef([UPNAME], m4_translit([$2], [-a-z], [_A-Z]))dnl | ||
239 | m4_pushdef([DOWNNAME], m4_translit([$2], [-A-Z], [_a-z]))dnl | ||
240 | |||
241 | have_[]m4_defn([DOWNNAME])="no" | ||
242 | |||
243 | EFL_PKG_CHECK_STRICT([$3], [ | ||
244 | AC_DEFINE([HAVE_]m4_defn([UPNAME]), [1], [Have `]m4_defn([DOWNNAME])[' pkg-config installed.]) | ||
245 | requirements_pc_[]m4_defn([DOWNEFL])="${requirements_pc_[][]m4_defn([DOWNEFL])} $3" | ||
246 | requirements_pc_deps_[]m4_defn([DOWNEFL])="${requirements_pc_deps_[]m4_defn([DOWNEFL])} $3" | ||
247 | have_[]m4_defn([DOWNNAME])="yes" | ||
248 | |||
249 | $4 | ||
250 | |||
251 | ], [$5]) | ||
252 | |||
253 | m4_popdef([DOWNNAME]) | ||
254 | m4_popdef([UPNAME]) | ||
255 | m4_popdef([DOWNEFL]) | ||
256 | m4_popdef([UPEFL]) | ||
257 | ]) | ||
258 | |||
259 | dnl EFL_OPTIONAL_DEPEND_PKG(EFL, VARIABLE, NAME, PACKAGE, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) | ||
260 | AC_DEFUN([EFL_OPTIONAL_DEPEND_PKG], | ||
261 | [dnl | ||
262 | m4_pushdef([DOWN], m4_translit([$3], [-A-Z], [_a-z]))dnl | ||
263 | |||
264 | have_[]m4_defn([DOWN])="no" | ||
265 | if test "x$2" = "xyes"; then | ||
266 | EFL_DEPEND_PKG([$1], [$3], [$4], [$5], [$6]) | ||
267 | fi | ||
268 | m4_popdef([DOWN])dnl | ||
269 | ]) | ||
270 | |||
271 | dnl EFL_OPTIONAL_INTERNAL_DEPEND_PKG(EFL, VARIABLE, NAME) | ||
272 | AC_DEFUN([EFL_OPTIONAL_INTERNAL_DEPEND_PKG], | ||
273 | [dnl | ||
274 | if test "x$2" = "xyes"; then | ||
275 | EFL_INTERNAL_DEPEND_PKG([$1], [$3]) | ||
276 | fi | ||
277 | ]) | ||
278 | |||
279 | dnl EFL_ADD_LIBS(PKG, LIBS) | ||
280 | dnl Add libraries that the EFL library will depend on | ||
281 | dnl See EFL_DEPEND_PKG() for pkg-config version. | ||
282 | AC_DEFUN([EFL_ADD_LIBS], | ||
283 | [dnl | ||
284 | m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl | ||
285 | requirements_libs_[]m4_defn([DOWN])="${requirements_libs_[]m4_defn([DOWN])} $2" | ||
286 | m4_popdef([DOWN])dnl | ||
287 | ]) | ||
288 | |||
289 | dnl EFL_ADD_PUBLIC_LIBS(PKG, PUBLIC_LIBS) | ||
290 | dnl Add libraries that the EFL library will depend on when used. | ||
291 | dnl | ||
292 | dnl Unlike EFL_ADD_LIBS(), that is only used when generating PKG, | ||
293 | dnl this one is used when linking PKG to other libraries or applications. | ||
294 | dnl | ||
295 | dnl For instance if you use some other library in your header that user | ||
296 | dnl inclues. | ||
297 | AC_DEFUN([EFL_ADD_PUBLIC_LIBS], | ||
298 | [dnl | ||
299 | m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl | ||
300 | requirements_public_libs_[]m4_defn([DOWN])="${requirements_public_libs_[]m4_defn([DOWN])} $2" | ||
301 | m4_popdef([DOWN])dnl | ||
302 | ]) | ||
303 | |||
304 | dnl EFL_ADD_CFLAGS(PKG, CFLAGS) | ||
305 | dnl Add CFLAGS that the EFL library will use | ||
306 | dnl See EFL_DEPEND_PKG() for pkg-config version. | ||
307 | AC_DEFUN([EFL_ADD_CFLAGS], | ||
308 | [dnl | ||
309 | m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl | ||
310 | requirements_cflags_[]m4_defn([DOWN])="${requirements_cflags_[]m4_defn([DOWN])} $2" | ||
311 | m4_popdef([DOWN])dnl | ||
312 | ]) | ||
313 | |||
314 | dnl EFL_LIB_START(PKG) | ||
315 | dnl start the setup of an EFL library, defines variables and prints a notice | ||
316 | dnl | ||
317 | dnl Exports (AC_SUBST) | ||
318 | dnl PKG_CFLAGS: what to use for CFLAGS | ||
319 | dnl | ||
320 | dnl PKG_LDFLAGS: what to use for LDFLAGS | ||
321 | dnl | ||
322 | dnl PKG_LIBS: what to use in automake's _LIBADD or _LDADD. Includes | ||
323 | dnl everything else. | ||
324 | dnl | ||
325 | dnl PKG_INTERNAL_LIBS: all other EFL as lib/name/libname.la that this | ||
326 | dnl package depend. Used in automake's _DEPENDENCIES. | ||
327 | dnl | ||
328 | dnl USE_PKG_LIBS: what to use in automake's _LIBADD or _LDADD when using | ||
329 | dnl this PKG (PKG_LIBS + libpkg.la) | ||
330 | dnl | ||
331 | dnl USE_PKG_INTERNAL_LIBS: extends PKG_INTERNAL_LIBS with lib/pkg/libpkg.la | ||
332 | dnl | ||
333 | dnl requirements_pc_pkg: all pkg-config (pc) files used by this pkg, | ||
334 | dnl includes internal EFL (used in 'Requires.private' in pkg.pc) | ||
335 | dnl | ||
336 | dnl requirements_libs_pkg: external libraries this package needs when | ||
337 | dnl linking (used in 'Libs.private' in pkg.pc) | ||
338 | dnl | ||
339 | dnl requirements_public_libs_pkg: external libraries other packages need | ||
340 | dnl when using this (used in 'Libs' in pkg.pc) | ||
341 | dnl | ||
342 | dnl requirements_cflags_pkg: what to use for CFLAGS (same as PKG_CFLAGS). | ||
343 | dnl | ||
344 | dnl Variables: | ||
345 | dnl requirements_pc_deps_pkg: external pkg-config (pc) files used by this | ||
346 | dnl pkg (used in EFL_EVAL_PKGS()) | ||
347 | dnl | ||
348 | dnl requirements_internal_libs_pkg: all other EFL as lib/name/libname.la | ||
349 | dnl that this package depend. | ||
350 | dnl | ||
351 | dnl requirements_internal_deps_libs_pkg: external libraries that are public | ||
352 | dnl dependencies (due internal libs). | ||
353 | dnl | ||
354 | AC_DEFUN([EFL_LIB_START], | ||
355 | [dnl | ||
356 | m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl | ||
357 | m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl | ||
358 | |||
359 | requirements_internal_libs_[]m4_defn([DOWN])="" | ||
360 | requirements_internal_deps_libs_[]m4_defn([DOWN])="" | ||
361 | requirements_libs_[]m4_defn([DOWN])="" | ||
362 | requirements_public_libs_[]m4_defn([DOWN])="" | ||
363 | requirements_cflags_[]m4_defn([DOWN])="" | ||
364 | requirements_pc_[]m4_defn([DOWN])="" | ||
365 | requirements_pc_deps_[]m4_defn([DOWN])="" | ||
366 | |||
367 | m4_defn([UP])_LIBS="${m4_defn([UP])_LIBS}" | ||
368 | m4_defn([UP])_INTERNAL_LIBS="${m4_defn([UP])_INTERNAL_LIBS}" | ||
369 | USE_[]m4_defn([UP])_LIBS="${USE_[]m4_defn([UP])_LIBS}" | ||
370 | USE_[]m4_defn([UP])_INTERNAL_LIBS="${USE_[]m4_defn([UP])_INTERNAL_LIBS}" | ||
371 | m4_defn([UP])_LDFLAGS="${m4_defn([UP])_LDFLAGS}" | ||
372 | m4_defn([UP])_CFLAGS="${m4_defn([UP])_CFLAGS}" | ||
373 | |||
374 | AC_SUBST([requirements_libs_]m4_defn([DOWN]))dnl | ||
375 | AC_SUBST([requirements_public_libs_]m4_defn([DOWN]))dnl | ||
376 | AC_SUBST([requirements_cflags_]m4_defn([DOWN]))dnl | ||
377 | AC_SUBST([requirements_pc_]m4_defn([DOWN]))dnl | ||
378 | AC_SUBST(m4_defn([UP])[_LIBS])dnl | ||
379 | AC_SUBST(m4_defn([UP])[_INTERNAL_LIBS])dnl | ||
380 | AC_SUBST([USE_]m4_defn([UP])[_LIBS])dnl | ||
381 | AC_SUBST([USE_]m4_defn([UP])[_INTERNAL_LIBS])dnl | ||
382 | AC_SUBST(m4_defn([UP])[_LDFLAGS])dnl | ||
383 | AC_SUBST(m4_defn([UP])[_CFLAGS])dnl | ||
384 | AC_MSG_NOTICE([Start $1 checks])dnl | ||
385 | m4_popdef([UP])dnl | ||
386 | m4_popdef([DOWN])dnl | ||
387 | ]) | ||
388 | |||
389 | dnl EFL_LIBS_SUBBUILD(TARGET, DEPENDENCIES) | ||
390 | dnl Make TARGET contain all DEPENDENCIES relative to SUBDIR build | ||
391 | AC_DEFUN([EFL_LIBS_SUBBUILD], | ||
392 | [dnl | ||
393 | $1="" | ||
394 | _SUBDIR="../../" | ||
395 | |||
396 | for dep in $2; do | ||
397 | case $dep in | ||
398 | lib*.la) | ||
399 | _DEPENDENCY=$_SUBDIR$dep | ||
400 | ;; | ||
401 | *) | ||
402 | _DEPENDENCY=$dep | ||
403 | ;; | ||
404 | esac | ||
405 | |||
406 | $1=${$1}" ${_DEPENDENCY}" | ||
407 | done | ||
408 | |||
409 | AC_SUBST([$1]) | ||
410 | ]) | ||
411 | |||
412 | dnl EFL_LIB_END(PKG) | ||
413 | dnl finishes the setup of an EFL library | ||
414 | AC_DEFUN([EFL_LIB_END], | ||
415 | [dnl | ||
416 | m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl | ||
417 | m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl | ||
418 | |||
419 | libdirname="m4_defn([DOWN])" | ||
420 | libname="m4_defn([DOWN])" | ||
421 | |||
422 | m4_defn([UP])_LDFLAGS="${EFLALL_COV_LDFLAGS} ${EFLALL_LDFLAGS} ${m4_defn([UP])_LDFLAGS}" | ||
423 | m4_defn([UP])_LIBS=" ${m4_defn([UP])_LDFLAGS} ${EFLALL_COV_LIBS} ${EFLALL_LIBS} ${m4_defn([UP])_LIBS} ${requirements_internal_libs_[]m4_defn([DOWN])} ${requirements_internal_deps_libs_[]m4_defn([DOWN])} ${requirements_public_libs_[]m4_defn([DOWN])} ${requirements_libs_[]m4_defn([DOWN])} ${requirements_libs_eflall} " | ||
424 | m4_defn([UP])_INTERNAL_LIBS="${m4_defn([UP])_INTERNAL_LIBS} ${requirements_internal_libs_[]m4_defn([DOWN])}" | ||
425 | USE_[]m4_defn([UP])_LIBS="${m4_defn([UP])_LIBS} lib/${libdirname}/lib${libname}.la" | ||
426 | USE_[]m4_defn([UP])_INTERNAL_LIBS="${m4_defn([UP])_INTERNAL_LIBS} lib/${libdirname}/lib${libname}.la" | ||
427 | m4_defn([UP])_CFLAGS="${EFL_WINDOWS_VERSION_CFLAGS} ${EFLALL_COV_CFLAGS} ${EFLALL_CFLAGS} ${m4_defn([UP])_CFLAGS} -I\$(top_srcdir)/src/lib/${libdirname} -I\$(top_builddir)/src/lib/${libdirname} -I\$(top_srcdir)/src/bindings/cxx/${libdirname} -I\$(top_builddir)/src/bindings/${libdirname} ${requirements_cflags_[]m4_defn([DOWN])} ${requirements_cflags_eflall}" | ||
428 | requirements_pc_[]m4_defn([DOWN])="${requirements_pc_[]m4_defn([DOWN])} ${requirements_pc_eflall}" | ||
429 | requirements_pc_deps_[]m4_defn([DOWN])="${requirements_pc_deps_[]m4_defn([DOWN])} ${requirements_pc_deps_eflall}" | ||
430 | |||
431 | EFL_LIBS_SUBBUILD(m4_defn([UP])_SUBBUILD_LIBS, ${m4_defn([UP])_LIBS}) | ||
432 | EFL_LIBS_SUBBUILD(m4_defn([UP])_SUBBUILD_INTERNAL_LIBS, ${m4_defn([UP])_INTERNAL_LIBS}) | ||
433 | EFL_LIBS_SUBBUILD(USE_[]m4_defn([UP])_SUBBUILD_LIBS, "USE_[]m4_defn([UP])_LIBS") | ||
434 | |||
435 | AC_MSG_NOTICE([Finished $1 checks])dnl | ||
436 | m4_popdef([UP])dnl | ||
437 | m4_popdef([DOWN])dnl | ||
438 | ]) | ||
439 | |||
440 | dnl EFL_LIB_START_OPTIONAL(PKG, TEST) | ||
441 | dnl test if library should be build and then EFL_LIB_START() | ||
442 | dnl must call EFL_LIB_END_OPTIONAL() to close it. | ||
443 | AC_DEFUN([EFL_LIB_START_OPTIONAL], | ||
444 | [dnl | ||
445 | m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl | ||
446 | m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl | ||
447 | |||
448 | if $2; then | ||
449 | efl_lib_optional_[]m4_defn([DOWN])="yes" | ||
450 | else | ||
451 | efl_lib_optional_[]m4_defn([DOWN])="no" | ||
452 | AC_MSG_NOTICE([Skipping $1 checks (disabled)]) | ||
453 | fi | ||
454 | |||
455 | if test "$efl_lib_optional_[]m4_defn([DOWN])" = "yes"; then | ||
456 | EFL_LIB_START([$1]) | ||
457 | AC_DEFINE([HAVE_]m4_defn([UP]), [1], [optional EFL $1 is enabled]) | ||
458 | dnl closed at EFL_LIB_END_OPTIONAL() | ||
459 | m4_popdef([UP])dnl | ||
460 | m4_popdef([DOWN])dnl | ||
461 | ]) | ||
462 | |||
463 | dnl EFL_LIB_END_OPTIONAL(PKG) | ||
464 | dnl closes block started by EFL_LIB_START_OPTIONAL() and then | ||
465 | dnl defines AM_CONDITIONAL([HAVE_PKG]) and AC_DEFINE([HAVE_PKG]) | ||
466 | AC_DEFUN([EFL_LIB_END_OPTIONAL], | ||
467 | [dnl | ||
468 | m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl | ||
469 | m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl | ||
470 | |||
471 | dnl close if started at EFL_LIB_START_OPTIONAL() | ||
472 | EFL_LIB_END([$1]) | ||
473 | fi | ||
474 | |||
475 | AM_CONDITIONAL([HAVE_]m4_defn([UP]), [test "$efl_lib_optional_[]m4_defn([DOWN])" = "yes"])dnl | ||
476 | m4_popdef([UP])dnl | ||
477 | m4_popdef([DOWN])dnl | ||
478 | ]) | ||
479 | |||
480 | dnl EFL_ADD_FEATURE(PKG, NAME, [VALUE]) | ||
481 | dnl if VALUE is not specified, will use ${have_name} instead. | ||
482 | dnl | ||
483 | dnl Defined Variables: | ||
484 | dnl features_pkg | ||
485 | AC_DEFUN([EFL_ADD_FEATURE], | ||
486 | [dnl | ||
487 | m4_pushdef([DOWNPKG], m4_translit([$1], [-A-Z], [_a-z]))dnl | ||
488 | m4_pushdef([DOWNNAME], m4_translit([$2], [-A-Z], [_a-z]))dnl | ||
489 | |||
490 | value="m4_if($3, , [${have_]m4_defn([DOWNNAME])[:-${want_]m4_defn([DOWNNAME])[}}], [$3])" | ||
491 | case "${value}" in | ||
492 | yes) | ||
493 | tmp="${COLOR_YES}+$2${COLOR_RESET}" | ||
494 | ;; | ||
495 | no) | ||
496 | tmp="${COLOR_NO}-$2${COLOR_RESET}" | ||
497 | ;; | ||
498 | *) | ||
499 | tmp="${COLOR_OTHER}$2=${value}${COLOR_RESET}" | ||
500 | ;; | ||
501 | esac | ||
502 | if test -z "${features_[]m4_defn([DOWNPKG])}"; then | ||
503 | features_[]m4_defn([DOWNPKG])="${tmp}" | ||
504 | else | ||
505 | features_[]m4_defn([DOWNPKG])="${features_[]m4_defn([DOWNPKG])} ${tmp}" | ||
506 | fi | ||
507 | m4_popdef([DOWNNAME])dnl | ||
508 | m4_popdef([DOWNPKG])dnl | ||
509 | ]) | ||
diff --git a/m4/efl_attribute.m4 b/m4/efl_attribute.m4 deleted file mode 100644 index 4f31d93175..0000000000 --- a/m4/efl_attribute.m4 +++ /dev/null | |||
@@ -1,83 +0,0 @@ | |||
1 | dnl Copyright (C) 2011 Vincent Torri <vtorri at univ-evry dot fr> | ||
2 | dnl That code is public domain and can be freely used or copied. | ||
3 | |||
4 | dnl Macros for checking if the compiler supports some __attribute__ uses | ||
5 | |||
6 | dnl Usage: EFL_ATTRIBUTE_VECTOR | ||
7 | dnl call AC_DEFINE for HAVE_GCC_ATTRIBUTE_VECTOR if __attribute__((vector)) is available | ||
8 | |||
9 | AC_DEFUN([EFL_ATTRIBUTE_VECTOR], | ||
10 | [ | ||
11 | AC_MSG_CHECKING([for __attribute__ ((vector))]) | ||
12 | AC_COMPILE_IFELSE( | ||
13 | [AC_LANG_PROGRAM( | ||
14 | [[ | ||
15 | typedef int v4si __attribute__ ((vector_size (16))); | ||
16 | ]], | ||
17 | [[ | ||
18 | if (sizeof(v4si) == 16) | ||
19 | return 0; | ||
20 | else | ||
21 | return -1; | ||
22 | ]])], | ||
23 | [have_attribute_vector="yes"], | ||
24 | [have_attribute_vector="no"]) | ||
25 | AC_MSG_RESULT([${have_attribute_vector}]) | ||
26 | |||
27 | if test "x${have_attribute_vector}" = "xyes" ; then | ||
28 | AC_DEFINE([HAVE_GCC_ATTRIBUTE_VECTOR], [1], [Define to 1 if your compiler supports __attribute__ ((vector)).]) | ||
29 | fi | ||
30 | ]) | ||
31 | |||
32 | dnl Usage: EFL_ATTRIBUTE_ALWAYS_INLINE | ||
33 | dnl call AC_DEFINE for alway_inline if __attribute__((always_inline)) is available | ||
34 | |||
35 | AC_DEFUN([EFL_ATTRIBUTE_ALWAYS_INLINE], | ||
36 | [ | ||
37 | |||
38 | have_attribute_forceinline="no" | ||
39 | |||
40 | AC_MSG_CHECKING([for __forceinline]) | ||
41 | |||
42 | AC_COMPILE_IFELSE( | ||
43 | [AC_LANG_PROGRAM( | ||
44 | [[ | ||
45 | #include <windows.h> | ||
46 | static __forceinline void foo(void) {} | ||
47 | ]], | ||
48 | [[ | ||
49 | ]])], | ||
50 | [ | ||
51 | have_attribute_always_inline="yes" | ||
52 | have_attribute_forceinline="yes" | ||
53 | ], | ||
54 | [have_attribute_always_inline="no"]) | ||
55 | |||
56 | AC_MSG_RESULT([${have_attribute_always_inline}]) | ||
57 | |||
58 | if test "x${have_attribute_always_inline}" = "xno" ; then | ||
59 | AC_MSG_CHECKING([for __attribute__ ((__always_inline__))]) | ||
60 | AC_COMPILE_IFELSE( | ||
61 | [AC_LANG_PROGRAM( | ||
62 | [[ | ||
63 | static __attribute__((__always_inline__)) inline void foo(void) {} | ||
64 | ]], | ||
65 | [[ | ||
66 | ]])], | ||
67 | [have_attribute_always_inline="yes"], | ||
68 | [have_attribute_always_inline="no"]) | ||
69 | AC_MSG_RESULT([${have_attribute_always_inline}]) | ||
70 | fi | ||
71 | |||
72 | if test "x${have_attribute_always_inline}" = "xyes" ; then | ||
73 | if test "x${have_attribute_forceinline}" = "xyes" ; then | ||
74 | AC_DEFINE([EFL_ALWAYS_INLINE], [__forceinline], [Macro declaring a function to always be inlined.]) | ||
75 | else | ||
76 | AC_DEFINE([EFL_ALWAYS_INLINE], [__attribute__ ((__always_inline__)) inline], [Macro declaring a function to always be inlined.]) | ||
77 | fi | ||
78 | else | ||
79 | AC_DEFINE([EFL_ALWAYS_INLINE], [static inline], [Macro declaring a function to always be inlined.]) | ||
80 | fi | ||
81 | ]) | ||
82 | |||
83 | dnl End of efl_attribute.m4 | ||
diff --git a/m4/efl_beta.m4 b/m4/efl_beta.m4 deleted file mode 100644 index c8047299f7..0000000000 --- a/m4/efl_beta.m4 +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | dnl use: EFL_ENABLE_BETA_API_SUPPORT | ||
2 | AC_DEFUN([EFL_ENABLE_BETA_API_SUPPORT], | ||
3 | [ | ||
4 | AC_DEFINE([EFL_BETA_API_SUPPORT], [1], [Enable access to unstable EFL API that are still in beta]) | ||
5 | ]) | ||
diff --git a/m4/efl_binary.m4 b/m4/efl_binary.m4 deleted file mode 100644 index d11e1db297..0000000000 --- a/m4/efl_binary.m4 +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | dnl Usage: EFL_WITH_BIN_SUFFIX(package, binary, suffix) | ||
2 | dnl Call AC_SUBST(_binary) (_binary is the lowercase of binary, - being transformed into _ by default, or the value set by the user) | ||
3 | |||
4 | AC_DEFUN([EFL_WITH_BIN_SUFFIX], | ||
5 | [ | ||
6 | |||
7 | m4_pushdef([DOWN], m4_translit([[$2]], [-A-Z], [_a-z]))dnl | ||
8 | m4_pushdef([UP], m4_translit([[$2]], [-a-z], [_A-Z]))dnl | ||
9 | dnl configure option | ||
10 | |||
11 | _efl_with_binary="" | ||
12 | _efl_binary_define="no" | ||
13 | |||
14 | AC_ARG_WITH([$2], | ||
15 | [AC_HELP_STRING([--with-$2=PATH], [specify a specific path to ]DOWN[ @<:@default=]DOWN[@:>@])], | ||
16 | [ | ||
17 | _efl_with_binary=${withval} | ||
18 | _efl_binary_define="yes" | ||
19 | ], []) | ||
20 | |||
21 | AC_ARG_WITH([bin-$2], | ||
22 | [AC_HELP_STRING([--with-bin-$2=PATH], [specify a specific path to ]DOWN[ @<:@default=]DOWN[@:>@ DEPRECATED])], | ||
23 | [ | ||
24 | _efl_with_binary=${withval} | ||
25 | _efl_binary_define="yes" | ||
26 | efl_deprecated_option="yes" | ||
27 | ], []) | ||
28 | |||
29 | DOWN[]$3=${_efl_with_binary} | ||
30 | AC_MSG_NOTICE(DOWN[ set to ${_efl_with_binary}]) | ||
31 | |||
32 | with_binary_[]m4_defn([DOWN])[]$3=${_efl_with_binary} | ||
33 | |||
34 | AM_CONDITIONAL(HAVE_[]UP[]m4_translit([[$3]], [a-z], [A-Z]), [test "x${_efl_binary_define}" = "xyes"]) | ||
35 | AC_SUBST(DOWN[]$3) | ||
36 | |||
37 | ]) | ||
38 | |||
39 | dnl Usage: EFL_WITH_BIN(package, binary) | ||
40 | dnl Call AC_SUBST(_binary) (_binary is the lowercase of binary, - being transformed into _ by default, or the value set by the user) | ||
41 | |||
42 | AC_DEFUN([EFL_WITH_BIN], [EFL_WITH_BIN_SUFFIX([$1], [$2], [])]) | ||
diff --git a/m4/efl_check_funcs.m4 b/m4/efl_check_funcs.m4 deleted file mode 100644 index b44f20bc55..0000000000 --- a/m4/efl_check_funcs.m4 +++ /dev/null | |||
@@ -1,333 +0,0 @@ | |||
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 fcntl | ||
10 | dnl fnmatch | ||
11 | dnl gettimeofday | ||
12 | dnl iconv | ||
13 | dnl setxattr (an al.) | ||
14 | dnl shm_open | ||
15 | |||
16 | dnl EFL_CHECK_LIB_CODE(EFL, LIB, VARIABLE, HEADER, BODY) | ||
17 | dnl wrapper around AC_LINK_IFELSE(AC_LANG_PROGRAM()) to check | ||
18 | dnl if some code would work with the given lib. | ||
19 | dnl If the code work, EFL_ADD_LIBS(EFL, LIB) will be called | ||
20 | dnl At the end VARIABLE will be "yes" or "no" | ||
21 | AC_DEFUN([EFL_CHECK_LIB_CODE], | ||
22 | [ | ||
23 | LIBS_save="${LIBS}" | ||
24 | LIBS="${LIBS} $2" | ||
25 | AC_LINK_IFELSE([AC_LANG_PROGRAM([$4], [$5])], | ||
26 | [EFL_ADD_LIBS([$1], [$2]) | ||
27 | $3="yes"], [$3="no"]) | ||
28 | LIBS="${LIBS_save}" | ||
29 | ]) | ||
30 | |||
31 | dnl EFL_FIND_LIB_FOR_CODE(EFL, LIBS, VARIABLE, HEADER, BODY) | ||
32 | AC_DEFUN([EFL_FIND_LIB_FOR_CODE], | ||
33 | [ | ||
34 | dnl first try without lib (libc) | ||
35 | EFL_CHECK_LIB_CODE([$1], [], [$3], [$4], [$5]) | ||
36 | |||
37 | if test "${$3}" = "no" && test "x$2" != "x"; then | ||
38 | dnl loop through given libraries | ||
39 | for trylib in $2; do | ||
40 | EFL_CHECK_LIB_CODE([$1], [${trylib}], [$3], [$4], [$5]) | ||
41 | if test "${$3}" = "yes"; then | ||
42 | break | ||
43 | fi | ||
44 | done | ||
45 | fi | ||
46 | ]) | ||
47 | |||
48 | dnl _EFL_CHECK_FUNC_DIRFD is for internal use | ||
49 | dnl _EFL_CHECK_FUNC_DIRFD(EFL, VARIABLE) | ||
50 | |||
51 | AC_DEFUN([_EFL_CHECK_FUNC_DIRFD], | ||
52 | [EFL_CHECK_LIB_CODE([$1], [], [$2], [[ | ||
53 | #ifdef HAVE_DIRENT_H | ||
54 | # include <dirent.h> | ||
55 | #endif | ||
56 | ]], [[DIR *dirp; return dirfd(dirp);]]) | ||
57 | ]) | ||
58 | |||
59 | dnl _EFL_CHECK_FUNC_DLADDR is for internal use | ||
60 | dnl _EFL_CHECK_FUNC_DLADDR(EFL, VARIABLE) | ||
61 | AC_DEFUN([_EFL_CHECK_FUNC_DLADDR], | ||
62 | [ | ||
63 | dllibs="" | ||
64 | case "$host_os" in | ||
65 | linux*) | ||
66 | dllibs="-ldl" | ||
67 | ;; | ||
68 | *) | ||
69 | ;; | ||
70 | esac | ||
71 | case "$host_os" in | ||
72 | mingw*) | ||
73 | $2="yes" | ||
74 | ;; | ||
75 | *) | ||
76 | EFL_FIND_LIB_FOR_CODE([$1], [$dllibs], [$2], [[ | ||
77 | #ifndef _GNU_SOURCE | ||
78 | # define _GNU_SOURCE | ||
79 | #endif | ||
80 | #include <stdlib.h> | ||
81 | #include <dlfcn.h> | ||
82 | ]], [[int res = dladdr(NULL, NULL);]]) | ||
83 | ;; | ||
84 | esac | ||
85 | ]) | ||
86 | |||
87 | dnl _EFL_CHECK_FUNC_DLOPEN is for internal use | ||
88 | dnl _EFL_CHECK_FUNC_DLOPEN(EFL, VARIABLE) | ||
89 | AC_DEFUN([_EFL_CHECK_FUNC_DLOPEN], | ||
90 | [ | ||
91 | dllibs="" | ||
92 | case "$host_os" in | ||
93 | linux*) | ||
94 | dllibs="-ldl" | ||
95 | ;; | ||
96 | *) | ||
97 | ;; | ||
98 | esac | ||
99 | case "$host_os" in | ||
100 | mingw*) | ||
101 | $2="yes" | ||
102 | ;; | ||
103 | *) | ||
104 | EFL_FIND_LIB_FOR_CODE([$1], [$dllibs], [$2], [[ | ||
105 | #include <dlfcn.h> | ||
106 | ]], [[void *h = dlopen(0, 0);]]) | ||
107 | ;; | ||
108 | esac | ||
109 | ]) | ||
110 | |||
111 | dnl _EFL_CHECK_FUNC_DLSYM is for internal use | ||
112 | dnl _EFL_CHECK_FUNC_DLSYM(EFL, VARIABLE) | ||
113 | AC_DEFUN([_EFL_CHECK_FUNC_DLSYM], | ||
114 | [ | ||
115 | dllibs="" | ||
116 | case "$host_os" in | ||
117 | linux*) | ||
118 | dllibs="-ldl" | ||
119 | ;; | ||
120 | *) | ||
121 | ;; | ||
122 | esac | ||
123 | case "$host_os" in | ||
124 | mingw*) | ||
125 | $2="yes" | ||
126 | ;; | ||
127 | *) | ||
128 | EFL_FIND_LIB_FOR_CODE([$1], [$dllibs], [$2], [[ | ||
129 | #ifndef _GNU_SOURCE | ||
130 | # define _GNU_SOURCE | ||
131 | #endif | ||
132 | #include <stdlib.h> | ||
133 | #include <dlfcn.h> | ||
134 | ]], [[void *res = dlsym(NULL, NULL);]]) | ||
135 | ;; | ||
136 | esac | ||
137 | ]) | ||
138 | |||
139 | dnl _EFL_CHECK_FUNC_FCNTL is for internal use | ||
140 | dnl _EFL_CHECK_FUNC_FCNTL(EFL, VARIABLE) | ||
141 | AC_DEFUN([_EFL_CHECK_FUNC_FCNTL], | ||
142 | [ | ||
143 | case "$host_os" in | ||
144 | mingw*) | ||
145 | $2="yes" | ||
146 | ;; | ||
147 | *) | ||
148 | EFL_FIND_LIB_FOR_CODE([$1], [], [$2], [[ | ||
149 | #include <fcntl.h> | ||
150 | ]], [[int g = fcntl(0, 0);]]) | ||
151 | ;; | ||
152 | esac | ||
153 | ]) | ||
154 | |||
155 | dnl _EFL_CHECK_FUNC_FNMATCH is for internal use | ||
156 | dnl _EFL_CHECK_FUNC_FNMATCH(EFL, VARIABLE) | ||
157 | AC_DEFUN([_EFL_CHECK_FUNC_FNMATCH], | ||
158 | [ | ||
159 | case "$host_os" in | ||
160 | mingw*) | ||
161 | $2="yes" | ||
162 | ;; | ||
163 | *) | ||
164 | EFL_FIND_LIB_FOR_CODE([$1], [-lfnmatch -liberty], [$2], [[ | ||
165 | #include <stdlib.h> | ||
166 | #include <fnmatch.h> | ||
167 | ]], [[int g = fnmatch(NULL, NULL, 0);]]) | ||
168 | ;; | ||
169 | esac | ||
170 | ]) | ||
171 | |||
172 | dnl _EFL_CHECK_FUNC_SCHED_GETCPU is for internal use | ||
173 | dnl _EFL_CHECK_FUNC_SCHED_GETCPU(EFL, VARIABLE) | ||
174 | AC_DEFUN([_EFL_CHECK_FUNC_SCHED_GETCPU], | ||
175 | [ | ||
176 | EFL_CHECK_LIB_CODE([$1], [], [$2], [[ | ||
177 | #include <sched.h> | ||
178 | ]], [[int cpu = sched_getcpu();]]) | ||
179 | ]) | ||
180 | |||
181 | dnl _EFL_CHECK_FUNC_GETTIMEOFDAY is for internal use | ||
182 | dnl _EFL_CHECK_FUNC_GETTIMEOFDAY(EFL, VARIABLE) | ||
183 | AC_DEFUN([_EFL_CHECK_FUNC_GETTIMEOFDAY], | ||
184 | [ | ||
185 | case "$host_os" in | ||
186 | mingw*) | ||
187 | $2="yes" | ||
188 | ;; | ||
189 | *) | ||
190 | EFL_CHECK_LIB_CODE([$1], [], [$2], [[ | ||
191 | #include <stdlib.h> | ||
192 | #include <sys/time.h> | ||
193 | ]], [[int res = gettimeofday(NULL, NULL);]]) | ||
194 | |||
195 | if test "${$2}" = "no" && test "x${enable_exotic}" = "xyes"; then | ||
196 | SAVE_CFLAGS="${CFLAGS}" | ||
197 | CFLAGS="${CFLAGS} ${EXOTIC_CFLAGS}" | ||
198 | EFL_CHECK_LIB_CODE([$1], [${EXOTIC_LIBS}], [$2], [[ | ||
199 | #include <Exotic.h> | ||
200 | ]], [[int res = gettimeofday(NULL, NULL);]]) | ||
201 | CFLAGS="${SAVE_CFLAGS}" | ||
202 | fi | ||
203 | ;; | ||
204 | esac | ||
205 | ]) | ||
206 | |||
207 | dnl _EFL_CHECK_FUNC_ICONV is for internal use | ||
208 | dnl _EFL_CHECK_FUNC_ICONV(EFL, VARIABLE) | ||
209 | AC_DEFUN([_EFL_CHECK_FUNC_ICONV], | ||
210 | [dnl | ||
211 | AC_ARG_WITH([iconv-link], | ||
212 | AC_HELP_STRING([--with-iconv-link=ICONV_LINK], [explicitly specify an iconv link option]), | ||
213 | [ | ||
214 | $2="yes" | ||
215 | iconv_libs=${withval} | ||
216 | ], | ||
217 | [$2="no"]) | ||
218 | |||
219 | if test "x${iconv_libs}" = "x" ; then | ||
220 | EFL_FIND_LIB_FOR_CODE([$1], [-liconv -liconv_plug], [$2], [[ | ||
221 | #include <stdlib.h> | ||
222 | #include <iconv.h> | ||
223 | ]], [[iconv_t ic; size_t count = iconv(ic, NULL, NULL, NULL, NULL);]]) | ||
224 | fi | ||
225 | ]) | ||
226 | |||
227 | dnl _EFL_CHECK_FUNC_SETXATTR is for internal use | ||
228 | dnl _EFL_CHECK_FUNC_SETXATTR(EFL, VARIABLE) | ||
229 | AC_DEFUN([_EFL_CHECK_FUNC_SETXATTR], | ||
230 | [EFL_CHECK_LIB_CODE([$1], [], [$2], [[ | ||
231 | #include <stdlib.h> | ||
232 | #include <sys/types.h> | ||
233 | #include <sys/xattr.h> | ||
234 | ]], [[ | ||
235 | size_t tmp = listxattr("/", NULL, 0); | ||
236 | tmp = getxattr("/", "user.ethumb.md5", NULL, 0); | ||
237 | setxattr("/", "user.ethumb.md5", NULL, 0, 0); | ||
238 | ]]) | ||
239 | |||
240 | if test "${$2}" = "yes"; then | ||
241 | AC_DEFINE([HAVE_XATTR], [1], [Define to 1 if you have the `listxattr', `setxattr' and `getxattr' functions.]) | ||
242 | fi | ||
243 | ]) | ||
244 | |||
245 | dnl _EFL_CHECK_FUNC_SHM_OPEN is for internal use | ||
246 | dnl _EFL_CHECK_FUNC_SHM_OPEN(EFL, VARIABLE) | ||
247 | AC_DEFUN([_EFL_CHECK_FUNC_SHM_OPEN], | ||
248 | [ | ||
249 | shmlibs="" | ||
250 | case "$host_os" in | ||
251 | linux*) | ||
252 | shmlibs="-lrt" | ||
253 | ;; | ||
254 | *) | ||
255 | ;; | ||
256 | esac | ||
257 | EFL_FIND_LIB_FOR_CODE([$1], [$shmlibs], [$2], [[ | ||
258 | #include <sys/mman.h> | ||
259 | #include <sys/stat.h> /* For mode constants */ | ||
260 | #include <fcntl.h> /* For O_* constants */ | ||
261 | ]], [[ | ||
262 | int fd = shm_open("/dev/null", O_RDONLY, S_IRWXU | S_IRWXG | S_IRWXO); | ||
263 | ]]) | ||
264 | ]) | ||
265 | |||
266 | dnl _EFL_CHECK_FUNC_SPLICE is for internal use | ||
267 | dnl _EFL_CHECK_FUNC_SPLICE(EFL, VARIABLE) | ||
268 | AC_DEFUN([_EFL_CHECK_FUNC_SPLICE], | ||
269 | [EFL_FIND_LIB_FOR_CODE([$1], [], [$2], [[ | ||
270 | #include <unistd.h> | ||
271 | #include <fcntl.h> | ||
272 | ]], [[ | ||
273 | long ret = splice(0, 0, 1, 0, 400, 0); | ||
274 | ]]) | ||
275 | ]) | ||
276 | |||
277 | dnl _EFL_CHECK_FUNC_GETPAGESIZE is for internal use | ||
278 | dnl _EFL_CHECK_FUNC_GETPAGESIZE(EFL, VARIABLE) | ||
279 | AC_DEFUN([_EFL_CHECK_FUNC_GETPAGESIZE], | ||
280 | [EFL_FIND_LIB_FOR_CODE([$1], [], [$2], [[ | ||
281 | #ifdef HAVE_UNISTD_H | ||
282 | # include <unistd.h> | ||
283 | #endif | ||
284 | ]], | ||
285 | [[ | ||
286 | long sz; | ||
287 | sz = getpagesize(); | ||
288 | ]]) | ||
289 | ]) | ||
290 | |||
291 | dnl _EFL_CHECK_FUNC_PRCTL is for internal use | ||
292 | dnl _EFL_CHECK_FUNC_PRCTL(EFL, VARIABLE) | ||
293 | AC_DEFUN([_EFL_CHECK_FUNC_PRCTL], | ||
294 | [EFL_FIND_LIB_FOR_CODE([$1], [], [$2], [[ | ||
295 | #include <sys/prctl.h> | ||
296 | ]], | ||
297 | [[ | ||
298 | prctl(PR_SET_TIMERSLACK, 1, 0, 0, 0); | ||
299 | ]]) | ||
300 | ]) | ||
301 | |||
302 | dnl Macro that checks function availability | ||
303 | dnl | ||
304 | dnl EFL_CHECK_FUNC(EFL, FUNCTION) | ||
305 | dnl AC_SUBST : EFL_CFLAGS and EFL_LIBS (EFL being replaced by its value) | ||
306 | dnl AC_DEFINE : HAVE_FUNCTION (FUNCTION being replaced by its value) | ||
307 | dnl result in efl_func_function (function being replaced by its value) | ||
308 | |||
309 | AC_DEFUN([EFL_CHECK_FUNC], | ||
310 | [dnl | ||
311 | m4_pushdef([UP], m4_translit([$2], [-a-z], [_A-Z]))dnl | ||
312 | m4_pushdef([DOWN], m4_translit([$2], [-A-Z], [_a-z]))dnl | ||
313 | |||
314 | m4_default([_EFL_CHECK_FUNC_]m4_defn([UP]))($1, [have_fct]) | ||
315 | AC_MSG_CHECKING([for $2]) | ||
316 | AC_MSG_RESULT([${have_fct}]) | ||
317 | |||
318 | if test "x${have_fct}" = "xyes" ; then | ||
319 | AC_DEFINE([HAVE_]m4_defn([UP]), [1], [Define to 1 if you have the `]m4_defn([DOWN])[' function.]) | ||
320 | fi | ||
321 | |||
322 | efl_func_[]m4_defn([DOWN])="${have_fct}" | ||
323 | m4_popdef([DOWN])dnl | ||
324 | m4_popdef([UP])dnl | ||
325 | ]) | ||
326 | |||
327 | dnl Macro that iterates over a sequence of space separated functions | ||
328 | dnl and that calls EFL_CHECK_FUNC() for each of these functions | ||
329 | dnl | ||
330 | dnl EFL_CHECK_FUNCS(EFL, FUNCTIONS) | ||
331 | |||
332 | AC_DEFUN([EFL_CHECK_FUNCS], | ||
333 | [m4_foreach_w([fct], [$2], [EFL_CHECK_FUNC($1, m4_defn([fct]))])]) | ||
diff --git a/m4/efl_check_libs.m4 b/m4/efl_check_libs.m4 deleted file mode 100644 index c64013bf7c..0000000000 --- a/m4/efl_check_libs.m4 +++ /dev/null | |||
@@ -1,73 +0,0 @@ | |||
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 Macro that check dependencies libraries for the EFL: | ||
5 | |||
6 | dnl libjpeg | ||
7 | dnl zlib | ||
8 | |||
9 | dnl _EFL_CHECK_LIB_LIBJPEG is for internal use | ||
10 | dnl _EFL_CHECK_LIB_LIBJPEG(EFL) | ||
11 | dnl it will abort (AC_MSG_ERROR) if libjpeg is not found. | ||
12 | |||
13 | AC_DEFUN([_EFL_CHECK_LIB_LIBJPEG], | ||
14 | [dnl | ||
15 | EFL_CHECK_LIB_CODE([$1], [-ljpeg], [have_fct], [[ | ||
16 | #include <stdio.h> | ||
17 | #include <jpeglib.h> | ||
18 | ]], [[ | ||
19 | struct jpeg_error_mgr er; void *error = jpeg_std_error(&er); | ||
20 | ]]) | ||
21 | |||
22 | if test "${have_fct}" = "no"; then | ||
23 | AC_MSG_ERROR([Cannot find libjpeg. Make sure your CFLAGS and LDFLAGS environment variable are set properly.]) | ||
24 | fi | ||
25 | ]) | ||
26 | |||
27 | dnl _EFL_CHECK_LIB_ZLIB is for internal use | ||
28 | dnl _EFL_CHECK_LIB_ZLIB(EFL) | ||
29 | dnl it will abort (AC_MSG_ERROR) if zlib is not found. | ||
30 | |||
31 | AC_DEFUN([_EFL_CHECK_LIB_ZLIB], | ||
32 | [dnl | ||
33 | m4_pushdef([DOWNEFL], m4_translit([$1], [-A-Z], [_a-z]))dnl | ||
34 | |||
35 | PKG_CHECK_EXISTS([zlib >= 1.2.3], [_efl_have_lib="yes"], [_efl_have_lib="no"]) | ||
36 | |||
37 | if test "${_efl_have_lib}" = "yes"; then | ||
38 | requirements_pc_[]m4_defn([DOWNEFL])="${requirements_pc_[]m4_defn([DOWNEFL])} zlib >= 1.2.3" | ||
39 | requirements_pc_deps_[]m4_defn([DOWNEFL])="${requirements_pc_deps_[]m4_defn([DOWNEFL])} zlib >= 1.2.3" | ||
40 | else | ||
41 | EFL_CHECK_LIB_CODE([$1], [-lz], [have_fct], [[ | ||
42 | #include <zlib.h> | ||
43 | ]], [[const char *v = zlibVersion();]]) | ||
44 | |||
45 | if test "${have_fct}" = "no"; then | ||
46 | AC_MSG_ERROR([Cannot find zlib. Make sure your CFLAGS and LDFLAGS environment variable are set properly.]) | ||
47 | fi | ||
48 | fi | ||
49 | m4_popdef([DOWNEFL])dnl | ||
50 | ]) | ||
51 | |||
52 | dnl Macro that checks for a library | ||
53 | dnl | ||
54 | dnl EFL_CHECK_LIB(EFL, LIBRARY) | ||
55 | dnl it will abort if library is not found | ||
56 | |||
57 | AC_DEFUN([EFL_CHECK_LIB], | ||
58 | [dnl | ||
59 | m4_pushdef([UP], m4_translit([$2], [-a-z], [_A-Z]))dnl | ||
60 | m4_default([_EFL_CHECK_LIB_]m4_defn([UP]))($1) | ||
61 | AC_MSG_CHECKING([for $2]) | ||
62 | AC_MSG_RESULT([yes]) | ||
63 | m4_popdef([UP])dnl | ||
64 | ]) | ||
65 | |||
66 | dnl Macro that iterates over a sequence of white separated libraries | ||
67 | dnl and that calls EFL_CHECK_LIB() for each of these libraries | ||
68 | dnl | ||
69 | dnl EFL_CHECK_LIBS(EFL, LIBRARIES) | ||
70 | dnl it will abort if libraries are not found | ||
71 | |||
72 | AC_DEFUN([EFL_CHECK_LIBS], | ||
73 | [m4_foreach_w([lib], [$2], [EFL_CHECK_LIB($1, m4_defn([lib]))])]) | ||
diff --git a/m4/efl_compiler.m4 b/m4/efl_compiler.m4 deleted file mode 100644 index 1d3499222f..0000000000 --- a/m4/efl_compiler.m4 +++ /dev/null | |||
@@ -1,90 +0,0 @@ | |||
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 Macro that check if compiler of linker flags are available | ||
5 | |||
6 | |||
7 | dnl Macro that checks for a compiler flag availability | ||
8 | dnl | ||
9 | dnl _EFL_CHECK_COMPILER_FLAGS(EFL, FLAGS) | ||
10 | dnl AC_SUBST : EFL_CFLAGS (EFL being replaced by its value) | ||
11 | dnl have_flag: yes or no. | ||
12 | AC_DEFUN([_EFL_CHECK_COMPILER_FLAGS], | ||
13 | [dnl | ||
14 | m4_pushdef([UPEFL], m4_translit([[$1]], [-a-z], [_A-Z]))dnl | ||
15 | |||
16 | dnl store in options -Wfoo if -Wno-foo is passed | ||
17 | option="m4_bpatsubst([[$2]], [-Wno-], [-W])" | ||
18 | CFLAGS_save="${CFLAGS}" | ||
19 | CFLAGS="${CFLAGS} ${option}" | ||
20 | AC_LANG_PUSH([C]) | ||
21 | |||
22 | AC_MSG_CHECKING([whether the compiler supports $2]) | ||
23 | AC_COMPILE_IFELSE( | ||
24 | [AC_LANG_PROGRAM([[]])], | ||
25 | [have_flag="yes"], | ||
26 | [have_flag="no"]) | ||
27 | AC_MSG_RESULT([${have_flag}]) | ||
28 | |||
29 | AC_LANG_POP([C]) | ||
30 | CFLAGS="${CFLAGS_save}" | ||
31 | if test "x${have_flag}" = "xyes" ; then | ||
32 | UPEFL[_CFLAGS]="${UPEFL[_CFLAGS]} [$2]" | ||
33 | fi | ||
34 | AC_SUBST(UPEFL[_CFLAGS])dnl | ||
35 | m4_popdef([UPEFL])dnl | ||
36 | ]) | ||
37 | |||
38 | dnl EFL_CHECK_COMPILER_FLAGS(EFL, FLAGS) | ||
39 | dnl Checks if FLAGS are supported and add to EFL_CLFAGS. | ||
40 | dnl | ||
41 | dnl It will first try every flag at once, if one fails will try them one by one. | ||
42 | AC_DEFUN([EFL_CHECK_COMPILER_FLAGS], | ||
43 | [dnl | ||
44 | _EFL_CHECK_COMPILER_FLAGS([$1], [$2]) | ||
45 | if test "${have_flag}" != "yes"; then | ||
46 | m4_foreach_w([flag], [$2], [_EFL_CHECK_COMPILER_FLAGS([$1], m4_defn([flag]))]) | ||
47 | fi | ||
48 | ]) | ||
49 | |||
50 | |||
51 | dnl Macro that checks for a linker flag availability | ||
52 | dnl | ||
53 | dnl _EFL_CHECK_LINKER_FLAGS(EFL, FLAGS) | ||
54 | dnl AC_SUBST : EFL_LDFLAGS (EFL being replaced by its value) | ||
55 | dnl have_flag: yes or no | ||
56 | AC_DEFUN([_EFL_CHECK_LINKER_FLAGS], | ||
57 | [dnl | ||
58 | m4_pushdef([UPEFL], m4_translit([[$1]], [-a-z], [_A-Z]))dnl | ||
59 | |||
60 | LDFLAGS_save="${LDFLAGS}" | ||
61 | LDFLAGS="${LDFLAGS} $2" | ||
62 | AC_LANG_PUSH([C]) | ||
63 | |||
64 | AC_MSG_CHECKING([whether the linker supports $2]) | ||
65 | AC_LINK_IFELSE( | ||
66 | [AC_LANG_PROGRAM([[]])], | ||
67 | [have_flag="yes"], | ||
68 | [have_flag="no"]) | ||
69 | AC_MSG_RESULT([${have_flag}]) | ||
70 | |||
71 | AC_LANG_POP([C]) | ||
72 | LDFLAGS="${LDFLAGS_save}" | ||
73 | if test "x${have_flag}" = "xyes" ; then | ||
74 | UPEFL[_LDFLAGS]="${UPEFL[_LDFLAGS]} [$2]" | ||
75 | fi | ||
76 | AC_SUBST(UPEFL[_LDFLAGS])dnl | ||
77 | m4_popdef([UPEFL])dnl | ||
78 | ]) | ||
79 | |||
80 | dnl EFL_CHECK_LINKER_FLAGS(EFL, FLAGS) | ||
81 | dnl Checks if FLAGS are supported and add to EFL_LDLFAGS. | ||
82 | dnl | ||
83 | dnl It will first try every flag at once, if one fails will try them one by one. | ||
84 | AC_DEFUN([EFL_CHECK_LINKER_FLAGS], | ||
85 | [dnl | ||
86 | _EFL_CHECK_LINKER_FLAGS([$1], [$2]) | ||
87 | if test "${have_flag}" != "yes"; then | ||
88 | m4_foreach_w([flag], [$2], [_EFL_CHECK_LINKER_FLAGS([$1], m4_defn([flag]))]) | ||
89 | fi | ||
90 | ])dnl | ||
diff --git a/m4/efl_define.m4 b/m4/efl_define.m4 deleted file mode 100644 index 2b73a691e8..0000000000 --- a/m4/efl_define.m4 +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | dnl | ||
2 | dnl EFL_CHECK_DEFINE(symbol, header_file) | ||
3 | dnl | ||
4 | dnl NOTE: EFL_CHECK_DEFINE is strongly inspired by | ||
5 | dnl APR_CHECK_DEFINE which can be found in the | ||
6 | dnl sources of Apache's APR (under Apache Licence) | ||
7 | dnl | ||
8 | AC_DEFUN([EFL_CHECK_DEFINE], [ | ||
9 | AC_CACHE_CHECK([for $1 in $2],ac_cv_define_$1,[ | ||
10 | AC_EGREP_CPP(YES_IS_DEFINED, [ | ||
11 | #include <$2> | ||
12 | #ifdef $1 | ||
13 | YES_IS_DEFINED | ||
14 | #endif | ||
15 | ], ac_cv_define_$1=yes, ac_cv_define_$1=no) | ||
16 | ]) | ||
17 | if test "$ac_cv_define_$1" = "yes"; then | ||
18 | AC_DEFINE(HAVE_$1, 1, [Define if $1 is defined in $2]) | ||
19 | fi | ||
20 | ]) | ||
diff --git a/m4/efl_doxygen.m4 b/m4/efl_doxygen.m4 deleted file mode 100644 index 0c1452fee0..0000000000 --- a/m4/efl_doxygen.m4 +++ /dev/null | |||
@@ -1,98 +0,0 @@ | |||
1 | dnl Copyright (C) 2008 Vincent Torri <vtorri at univ-evry dot fr> | ||
2 | dnl That code is public domain and can be freely used or copied. | ||
3 | |||
4 | dnl Macro that check if doxygen is available or not. | ||
5 | |||
6 | dnl EFL_CHECK_DOXYGEN([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) | ||
7 | dnl Test for the doxygen program | ||
8 | dnl Defines efl_doxygen | ||
9 | dnl Defines the automake conditionnal EFL_BUILD_DOC | ||
10 | dnl | ||
11 | AC_DEFUN([EFL_CHECK_DOXYGEN], | ||
12 | [ | ||
13 | |||
14 | dnl | ||
15 | dnl Disable the build of the documentation | ||
16 | dnl | ||
17 | AC_ARG_ENABLE([doc], | ||
18 | [AC_HELP_STRING( | ||
19 | [--disable-doc], | ||
20 | [Disable documentation build @<:@default=enabled@:>@])], | ||
21 | [ | ||
22 | if test "x${enableval}" = "xyes" ; then | ||
23 | efl_enable_doc="yes" | ||
24 | else | ||
25 | efl_enable_doc="no" | ||
26 | fi | ||
27 | ], | ||
28 | [efl_enable_doc="yes"] | ||
29 | ) | ||
30 | |||
31 | if test "x${efl_enable_doc}" = "xyes" ; then | ||
32 | |||
33 | dnl | ||
34 | dnl Specify the full file name, with path | ||
35 | dnl | ||
36 | |||
37 | efl_doxygen="doxygen" | ||
38 | |||
39 | AC_ARG_WITH([doxygen], | ||
40 | [AC_HELP_STRING( | ||
41 | [--with-doxygen=FILE], | ||
42 | [doxygen program to use @<:@default=doxygen@:>@])], | ||
43 | dnl | ||
44 | dnl Check the given doxygen program. | ||
45 | dnl | ||
46 | [efl_doxygen=${withval} | ||
47 | AC_CHECK_PROG([efl_have_doxygen], | ||
48 | [${efl_doxygen}], | ||
49 | [yes], | ||
50 | [no]) | ||
51 | if test "x${efl_have_doxygen}" = "xno" ; then | ||
52 | echo "WARNING:" | ||
53 | echo "The doxygen program you specified:" | ||
54 | echo "$efl_doxygen" | ||
55 | echo "was not found. Please check the path and make sure " | ||
56 | echo "the program exists and is executable." | ||
57 | AC_MSG_WARN([Warning: no doxygen detected. Documentation will not be built]) | ||
58 | fi | ||
59 | ], | ||
60 | [AC_CHECK_PROG([efl_have_doxygen], | ||
61 | [${efl_doxygen}], | ||
62 | [yes], | ||
63 | [no]) | ||
64 | if test "x${efl_have_doxygen}" = "xno" ; then | ||
65 | echo "WARNING:" | ||
66 | echo "The doxygen program was not found in your execute" | ||
67 | echo "You may have doxygen installed somewhere not covered by your path." | ||
68 | echo "" | ||
69 | echo "If this is the case make sure you have the packages installed, AND" | ||
70 | echo "that the doxygen program is in your execute path (see your" | ||
71 | echo "shell manual page on setting the \$PATH environment variable), OR" | ||
72 | echo "alternatively, specify the program to use with --with-doxygen." | ||
73 | AC_MSG_WARN([Warning: no doxygen detected. Documentation will not be built]) | ||
74 | fi | ||
75 | ] | ||
76 | ) | ||
77 | fi | ||
78 | |||
79 | dnl | ||
80 | dnl Substitution | ||
81 | dnl | ||
82 | AC_SUBST([efl_doxygen]) | ||
83 | |||
84 | if ! test "x${efl_have_doxygen}" = "xyes" ; then | ||
85 | efl_enable_doc="no" | ||
86 | fi | ||
87 | |||
88 | AM_CONDITIONAL(EFL_BUILD_DOC, test "x${efl_enable_doc}" = "xyes") | ||
89 | |||
90 | if test "x${efl_enable_doc}" = "xyes" ; then | ||
91 | ifelse([$1], , :, [$1]) | ||
92 | else | ||
93 | ifelse([$2], , :, [$2]) | ||
94 | fi | ||
95 | |||
96 | ]) | ||
97 | |||
98 | dnl End of doxygen.m4 | ||
diff --git a/m4/efl_eo.m4 b/m4/efl_eo.m4 deleted file mode 100644 index 864baf5fc1..0000000000 --- a/m4/efl_eo.m4 +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | dnl use: EFL_ENABLE_EO_API_SUPPORT | ||
2 | AC_DEFUN([EFL_ENABLE_EO_API_SUPPORT], | ||
3 | [ | ||
4 | AC_DEFINE([EFL_EO_API_SUPPORT], [1], [Enable access to unstable EFL Eo API]) | ||
5 | ]) | ||
6 | |||
diff --git a/m4/efl_find_x.m4 b/m4/efl_find_x.m4 deleted file mode 100644 index 8c9f5c3677..0000000000 --- a/m4/efl_find_x.m4 +++ /dev/null | |||
@@ -1,194 +0,0 @@ | |||
1 | # efl_find.x.m4 - Macros to locate X11. -*- Autoconf -*- | ||
2 | # EFL_FIND_X(VARIABLE-PREFIX, [headers = "X11/Xlib.h"], | ||
3 | # [libs-and-functions = "X11 XOpenDisplay"], | ||
4 | # [action-if-found], [action-if-not-found]) | ||
5 | # checks for X11 using, in order: | ||
6 | # 1) Xorg pkg-config files (using enviroment variables EFL_X11_CFLAGS | ||
7 | # and EFL_X11_LIBS if set, but only if x11.pc exists) | ||
8 | # 2) command line options: --x-includes=dir, --x-libraries=dir | ||
9 | # assume there is an X11 in the given directories | ||
10 | # 3) XMKMF environment variable if set | ||
11 | # 4) xmkmf executable if found | ||
12 | # 5) list of "standard" directories | ||
13 | # | ||
14 | # 2-5 is handled by A_PATH_X | ||
15 | # | ||
16 | # If a X11 is found, [action-if-success] is run and VARIABLE_cflags and | ||
17 | # VARIABLE_libs and VARIABLE_libdirs are defined and substituted. | ||
18 | # VARIABLE_libs will contain all of the libs listed in libs-and-functions. | ||
19 | # VARIABLE_libdirs will contain all -Lpath:s found in VARIABLE_libs | ||
20 | # | ||
21 | # headers is a list of headers to look for. libs-and-functions is a list of | ||
22 | # library and function pairs to look for. | ||
23 | # Each lib and function is checked in pairs, example: | ||
24 | # EFL_FIND_X([EVAS_X11], [X11/X.h], [X11 XCreateImage Xext XShmCreateImage]) | ||
25 | # will look for XCreateImage in X11 and XShmCreateImage in Xext and include | ||
26 | # both -lX11 and -lXext in VARIABLE_libs | ||
27 | # | ||
28 | # action-if-found is only called if X11, all headers, all libraries and | ||
29 | # all functions are found. | ||
30 | # You can call EFL_FIND_X multiple times with different lists of headers, libs | ||
31 | # and functions. | ||
32 | |||
33 | AC_DEFUN([EFL_FIND_X], | ||
34 | [ | ||
35 | # Must print something as AC_CACHE_VAL writes (cached) if the value is cached | ||
36 | AC_MSG_CHECKING([how to find X]) | ||
37 | efl_x11_need_result=1 | ||
38 | AC_CACHE_VAL(efl_cv_x11_cache, | ||
39 | [ | ||
40 | # this is ugly and breaks that AC_CACHE_VAL may not have side effects | ||
41 | # but I can't think of a better way right now | ||
42 | efl_x11_need_result=0 | ||
43 | PKG_CHECK_EXISTS([x11], | ||
44 | [ | ||
45 | AC_MSG_RESULT([use pkg-config]) | ||
46 | PKG_CHECK_MODULES([EFL_X11],[x11], | ||
47 | [ | ||
48 | efl_cv_have_x11=yes | ||
49 | efl_cv_x11_pkgconf=yes | ||
50 | efl_cv_x11_cflags=$EFL_X11_CFLAGS | ||
51 | efl_cv_x11_libs_pre=$EFL_X11_LIBS | ||
52 | efl_cv_x11_libs_post= | ||
53 | ]) | ||
54 | ], | ||
55 | [ | ||
56 | AC_MSG_RESULT([use xmkmf]) | ||
57 | # Fallback to old AC_PATH_XTRA | ||
58 | AC_PATH_X | ||
59 | AC_PATH_XTRA | ||
60 | if test "$no_x" = yes; then | ||
61 | efl_cv_have_x11=no | ||
62 | else | ||
63 | efl_cv_have_x11=yes | ||
64 | efl_cv_x11_pkgconf=no | ||
65 | efl_cv_x11_cflags=$X_CFLAGS | ||
66 | efl_cv_x11_libs_pre="$X_PRE_LIBS $X_LIBS" | ||
67 | efl_cv_x11_libs_post=$X_EXTRA_LIBS | ||
68 | fi | ||
69 | ]) | ||
70 | # Record where we found X for the cache. | ||
71 | if test "x$efl_cv_have_x11" = "xno"; then | ||
72 | efl_cv_x11_cache="efl_cv_have_x11=no" | ||
73 | else | ||
74 | efl_cv_x11_cache="efl_cv_have_x11=yes\ | ||
75 | efl_cv_x11_pkgconf='$efl_cv_x11_pkgconf'\ | ||
76 | efl_cv_x11_cflags='$efl_cv_x11_cflags'\ | ||
77 | efl_cv_x11_libs_pre='$efl_cv_x11_libs_pre'\ | ||
78 | efl_cv_x11_libs_post='$efl_cv_x11_libs_post'" | ||
79 | fi | ||
80 | ]) | ||
81 | if test "x$efl_x11_need_result" = "x1"; then | ||
82 | AC_MSG_RESULT([already found]) | ||
83 | fi | ||
84 | eval "$efl_cv_x11_cache" | ||
85 | |||
86 | if test "x$efl_cv_have_x11" = "xyes"; then | ||
87 | ELF_X11_CFLAGS_save="$CFLAGS" | ||
88 | ELF_X11_CPPFLAGS_save="$CPPFLAGS" | ||
89 | CFLAGS="$CFLAGS $efl_cv_x11_cflags" | ||
90 | CPPFLAGS="$CPPFLAGS $efl_cv_x11_cflags" | ||
91 | efl_x11_found_all=1 | ||
92 | for efl_x11_header in ifelse([$2], , "X11/Xlib.h", [$2]); do | ||
93 | AC_CHECK_HEADER([$efl_x11_header],,[ | ||
94 | efl_x11_found_all=0 | ||
95 | break]) | ||
96 | done | ||
97 | CPPFLAGS="$ELF_X11_CPPFLAGS_save" | ||
98 | CFLAGS="$ELF_X11_CFLAGS_save" | ||
99 | |||
100 | if test "x$efl_x11_found_all" = "x1"; then | ||
101 | EFL_X11_LIBS_save="$LIBS" | ||
102 | if test "x$efl_cv_x11_pkgconf" = "xyes"; then | ||
103 | efl_x11_modules="x11" | ||
104 | efl_x11_lib="" | ||
105 | for efl_x11_lib_function in ifelse([$3], , "X11 XOpenDisplay", [$3]); do | ||
106 | if test -z "$efl_x11_lib"; then | ||
107 | efl_x11_lib="$efl_x11_lib_function" | ||
108 | case $efl_x11_lib in | ||
109 | X11) | ||
110 | ;; | ||
111 | Xss) | ||
112 | efl_x11_modules="$efl_x11_modules xscrnsaver" | ||
113 | ;; | ||
114 | *) | ||
115 | efl_x11_lib=`echo $efl_x11_lib | tr '[A-Z]' '[a-z]'` | ||
116 | efl_x11_modules="$efl_x11_modules $efl_x11_lib" | ||
117 | ;; | ||
118 | esac | ||
119 | else | ||
120 | efl_x11_lib= | ||
121 | fi | ||
122 | done | ||
123 | efl_x11_modules="$efl_x11_modules x11-xcb" | ||
124 | |||
125 | PKG_CHECK_EXISTS([$efl_x11_modules], | ||
126 | [ | ||
127 | PKG_CHECK_MODULES([$1],[$efl_x11_modules], | ||
128 | [ | ||
129 | efl_x11_cflags=$[]$1[]_CFLAGS | ||
130 | efl_x11_libs=$[]$1[]_LIBS | ||
131 | |||
132 | LIBS="$LIBS $[]$1[]_LIBS" | ||
133 | efl_x11_lib="" | ||
134 | for efl_x11_lib_function in ifelse([$3], , "X11 XOpenDisplay", [$3]); do | ||
135 | if test -z "$efl_x11_lib"; then | ||
136 | efl_x11_lib="$efl_x11_lib_function" | ||
137 | else | ||
138 | # This is a ugly way of using AC_CHECK_FUNC with different | ||
139 | # LIBS | ||
140 | eval "unset ac_cv_func_$efl_x11_lib_function" | ||
141 | AC_CHECK_FUNC([$efl_x11_lib_function],, | ||
142 | [ | ||
143 | efl_x11_found_all=0 | ||
144 | break]) | ||
145 | efl_x11_lib= | ||
146 | fi | ||
147 | done | ||
148 | ]) | ||
149 | ],[efl_x11_found_all=0]) | ||
150 | else | ||
151 | LIBS="$LIBS $efl_cv_x11_libs_pre" | ||
152 | efl_x11_libs="$efl_cv_x11_libs_pre" | ||
153 | efl_x11_lib="" | ||
154 | for efl_x11_lib_function in ifelse([$3], , "X11 XOpenDisplay", [$3]); do | ||
155 | if test -z "$efl_x11_lib"; then | ||
156 | efl_x11_lib="$efl_x11_lib_function" | ||
157 | else | ||
158 | AC_CHECK_LIB([$efl_x11_lib], [$efl_x11_lib_function],,[ | ||
159 | efl_x11_found_all=0 | ||
160 | break],["$efl_cv_x11_libs_post"]) | ||
161 | efl_x11_libs="$efl_x11_libs -l$efl_x11_lib" | ||
162 | efl_x11_lib= | ||
163 | fi | ||
164 | done | ||
165 | if test -n "$efl_cv_x11_libs_post"; then | ||
166 | efl_x11_libs="$efl_x11_libs $efl_cv_x11_libs_post" | ||
167 | fi | ||
168 | fi | ||
169 | LIBS="$EFL_X11_LIBS_save" | ||
170 | fi | ||
171 | fi | ||
172 | |||
173 | if test "x$efl_x11_found_all" = "x1"; then | ||
174 | efl_x11_libdirs="" | ||
175 | for efl_x11_option in "$efl_x11_libs"; do | ||
176 | case $efl_x11_option in | ||
177 | -L*) | ||
178 | efl_x11_libdirs="$efl_x11_libdirs $efl_x11_option" | ||
179 | ;; | ||
180 | *) | ||
181 | ;; | ||
182 | esac | ||
183 | done | ||
184 | |||
185 | AC_SUBST([$1][_cflags],[$efl_cv_x11_cflags]) | ||
186 | AC_SUBST([$1][_libs],[$efl_x11_libs]) | ||
187 | AC_SUBST([$1][_libdirs],[$efl_x11_libdirs]) | ||
188 | |||
189 | ifelse([$4], , :, [$4]) | ||
190 | else | ||
191 | ifelse([$5], , :, [$5]) | ||
192 | fi | ||
193 | ]) | ||
194 | |||
diff --git a/m4/efl_libunwind.m4 b/m4/efl_libunwind.m4 deleted file mode 100644 index e9ca682cfb..0000000000 --- a/m4/efl_libunwind.m4 +++ /dev/null | |||
@@ -1,61 +0,0 @@ | |||
1 | dnl This code is public domain and can be freely used or copied. | ||
2 | dnl File to auto-detect libunwind | ||
3 | |||
4 | dnl Macro that checks for libunwind, first by using | ||
5 | dnl pkg-config, then by trying to compile and link a simple | ||
6 | dnl program, to see if libunwind is distributed on the system | ||
7 | dnl but has no pkg-config support | ||
8 | dnl | ||
9 | dnl The biggest usecase is on Mac OS X, where there are no | ||
10 | dnl pkg-config files, and the libunwind headers are lost | ||
11 | dnl in an obscure place on the system (but whom the compilers | ||
12 | dnl distributed by Apple are aware of). | ||
13 | dnl | ||
14 | dnl Usage: EFL_CHECK_LIBUNWIND | ||
15 | dnl will inconditionaly set UNWIND_CFLAGS and UNWIND_LIBS | ||
16 | dnl to follow pkg-config fashion. | ||
17 | dnl | ||
18 | AC_DEFUN([EFL_CHECK_LIBUNWIND], | ||
19 | [dnl | ||
20 | dnl First, check with pkg-config | ||
21 | PKG_CHECK_MODULES([UNWIND], [libunwind libunwind-generic], | ||
22 | [have_unwind=yes], [have_unwind=no]) | ||
23 | |||
24 | dnl No pkg-config file... maybe system built-in? | ||
25 | if test "x${have_unwind}" = "xno"; then | ||
26 | AC_LANG_PUSH([C]) | ||
27 | AC_LINK_IFELSE( | ||
28 | [AC_LANG_PROGRAM( | ||
29 | [[ | ||
30 | #include <libunwind.h> | ||
31 | ]], | ||
32 | [[ | ||
33 | unw_context_t ctx; | ||
34 | unw_getcontext(&ctx); | ||
35 | ]] | ||
36 | )], | ||
37 | [ | ||
38 | have_unwind="yes" | ||
39 | ], | ||
40 | [ | ||
41 | have_unwind="no" | ||
42 | ] | ||
43 | ) | ||
44 | AC_MSG_CHECKING([for native libunwind]) | ||
45 | AC_MSG_RESULT([${have_unwind}]) | ||
46 | AC_LANG_POP([C]) | ||
47 | |||
48 | dnl Provide dummy variables to automake. | ||
49 | dnl In case pkg-config succeeded, these will be set and | ||
50 | dnl used in other automake files. To avoid, problems, | ||
51 | dnl we define empty variables. | ||
52 | UNWIND_CFLAGS="" | ||
53 | UNWIND_LIBS="" | ||
54 | AC_SUBST([UNWIND_CFLAGS]) | ||
55 | AC_SUBST([UNWIND_LIBS]) | ||
56 | fi | ||
57 | |||
58 | AS_IF([test "x$have_unwind" = "xyes"], | ||
59 | [AC_DEFINE([HAVE_UNWIND], [1], [Have libunwind])]) | ||
60 | AM_CONDITIONAL(HAVE_UNWIND, test "x$have_unwind" = "xyes") | ||
61 | ]) | ||
diff --git a/m4/efl_lua_old.m4 b/m4/efl_lua_old.m4 deleted file mode 100644 index 537a6f336b..0000000000 --- a/m4/efl_lua_old.m4 +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | dnl EFL_CHECK_LUA_OLD(EFL) | ||
2 | dnl checks for lua 5.1 or 5.2 in pkg-config (multiple names) and -llua directly | ||
3 | dnl will call EFL_ADD_LIBS() or EFL_DEPEND_PKG() as required. | ||
4 | dnl this is a strict call and will abort if lua is not found | ||
5 | dnl keep in mind that this is only executed if --enable-lua-old is set | ||
6 | AC_DEFUN([EFL_CHECK_LUA_OLD], | ||
7 | [dnl | ||
8 | requirement_lua="" | ||
9 | PKG_CHECK_EXISTS([lua >= 5.1.0], [requirement_lua="lua >= 5.1.0"], | ||
10 | [PKG_CHECK_EXISTS([lua5.1 >= 5.1.0], [requirement_lua="lua5.1 >= 5.1.0"], | ||
11 | [PKG_CHECK_EXISTS([lua-5.1 >= 5.1.0], [requirement_lua="lua-5.1 >= 5.1.0"], | ||
12 | [PKG_CHECK_EXISTS([lua51 >= 5.1.0], [requirement_lua="lua51 >= 5.1.0"], | ||
13 | [PKG_CHECK_EXISTS([lua5.2 >= 5.2.0], [requirement_lua="lua5.2 >= 5.2.0"], | ||
14 | [PKG_CHECK_EXISTS([lua-5.2 >= 5.2.0], [requirement_lua="lua-5.2 >= 5.2.0"], | ||
15 | [PKG_CHECK_EXISTS([lua52 >= 5.2.0], [requirement_lua="lua52 >= 5.2.0"])])])])])])]) | ||
16 | |||
17 | if test "x${requirement_lua}" = "x"; then | ||
18 | AC_MSG_CHECKING([whether lua_newstate() is in liblua]) | ||
19 | AC_CHECK_LIB([lua], [lua_newstate], | ||
20 | [have_lua="yes" | ||
21 | EFL_ADD_LIBS([$1], [-llua])], | ||
22 | [have_lua="no"]) | ||
23 | AC_MSG_RESULT([${have_lua}]) | ||
24 | if test "${have_lua}" = "no"; then | ||
25 | AC_MSG_ERROR([Missing lua 5.1 or 5.2 support]) | ||
26 | fi | ||
27 | else | ||
28 | req_found="no" | ||
29 | EFL_DEPEND_PKG([$1], [LUA], [${requirement_lua}], | ||
30 | [ req_found="yes" ], | ||
31 | [ req_found="no" ]) | ||
32 | if test "x${req_found}" = "xyes"; then | ||
33 | PKG_CHECK_MODULES([$1]_LUA, [${requirement_lua}]) | ||
34 | fi | ||
35 | fi | ||
36 | ]) | ||
diff --git a/m4/efl_mono.m4 b/m4/efl_mono.m4 deleted file mode 100644 index 807526ee24..0000000000 --- a/m4/efl_mono.m4 +++ /dev/null | |||
@@ -1,95 +0,0 @@ | |||
1 | # # ============================================================================ | ||
2 | # # http://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_11.html | ||
3 | # # ============================================================================ | ||
4 | # # | ||
5 | # # SYNOPSIS | ||
6 | # # | ||
7 | # # AX_CXX_COMPILE_STDCXX_11([ext|noext],[mandatory|optional]) | ||
8 | # # | ||
9 | # # DESCRIPTION | ||
10 | # # | ||
11 | # # Check for baseline language coverage in the compiler for the C++11 | ||
12 | # # standard; if necessary, add switches to CXXFLAGS to enable support. | ||
13 | # # | ||
14 | # # The first argument, if specified, indicates whether you insist on an | ||
15 | # # extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g. | ||
16 | # # -std=c++11). If neither is specified, you get whatever works, with | ||
17 | # # preference for an extended mode. | ||
18 | # # | ||
19 | # # The second argument, if specified 'mandatory' or if left unspecified, | ||
20 | # # indicates that baseline C++11 support is required and that the macro | ||
21 | # # should error out if no mode with that support is found. If specified | ||
22 | # # 'optional', then configuration proceeds regardless, after defining | ||
23 | # # HAVE_CXX11 if and only if a supporting mode is found. | ||
24 | # # | ||
25 | # # LICENSE | ||
26 | # # | ||
27 | # # Copyright (c) 2016 Felipe Magno de Almeida <felipe@expertisesolutions.com.br> | ||
28 | # # | ||
29 | # # Copying and distribution of this file, with or without modification, are | ||
30 | # # permitted in any medium without royalty provided the copyright notice | ||
31 | # # and this notice are preserved. This file is offered as-is, without any | ||
32 | # # warranty. | ||
33 | |||
34 | # AC_LANG(CSHARP) | ||
35 | # ----------- | ||
36 | AC_LANG_DEFINE([CSHARP], [csharp], [MCS], [], | ||
37 | [ac_ext=cs | ||
38 | ac_compile='$MCS $MCSFLAGS conftest.$ac_ext >&AS_MESSAGE_LOG_FD' | ||
39 | ]) | ||
40 | |||
41 | AU_DEFUN([AC_LANG_CSHARP], [AC_LANG(CSHARP)]) | ||
42 | |||
43 | m4_define([AC_LANG_PROGRAM(CSHARP)], | ||
44 | [$1 | ||
45 | class MyClass | ||
46 | { | ||
47 | static void Main(string[] args) | ||
48 | { | ||
49 | $2 | ||
50 | } | ||
51 | }]) | ||
52 | |||
53 | AC_DEFUN([AC_LANG_COMPILER(CSHARP)], | ||
54 | [AC_REQUIRE([AC_PROG_MCS])]) | ||
55 | |||
56 | AN_MAKEVAR([MCS], [AC_PROG_MCS]) | ||
57 | AN_PROGRAM([mcs], [AC_PROG_MCS]) | ||
58 | AC_DEFUN([AC_PROG_MCS], | ||
59 | [AC_LANG_PUSH(CSHARP)dnl | ||
60 | AC_ARG_VAR([MCS], [MCS (C#) compiler command])dnl | ||
61 | AC_ARG_VAR([MCSFLAGS], [MCS (C#) compiler flags])dnl | ||
62 | dnl _AC_ARG_VAR_LDFLAGS()dnl | ||
63 | m4_ifval([$1], | ||
64 | [AC_CHECK_TOOLS(MCS, [$1])], | ||
65 | [AC_CHECK_TOOL(MCS, mcs) | ||
66 | if test -z "$MCS"; then | ||
67 | if test -n "$ac_tool_prefix"; then | ||
68 | AC_CHECK_PROG(MCS, [${ac_tool_prefix}mcs], [$ac_tool_prefix}mcs]) | ||
69 | fi | ||
70 | fi | ||
71 | if test -z "$MCS"; then | ||
72 | AC_CHECK_PROG(MCS, mcs, mcs, , , false) | ||
73 | fi | ||
74 | if test -z "$MCS"; then | ||
75 | HAVE_MCS=0 | ||
76 | AC_MSG_NOTICE([No C sharp compiler was found]) | ||
77 | else | ||
78 | HAVE_MCS=1 | ||
79 | AC_DEFINE(HAVE_MCS,1, | ||
80 | [define if the MCS compiler is available]) | ||
81 | fi | ||
82 | AC_SUBST(HAVE_MCS) | ||
83 | ]) | ||
84 | |||
85 | # Provide some information about the compiler. | ||
86 | _AS_ECHO_LOG([checking for _AC_LANG compiler version]) | ||
87 | set X $ac_compile | ||
88 | ac_compiler=$[2] | ||
89 | _AC_DO_LIMIT([$ac_compiler --version >&AS_MESSAGE_LOG_FD]) | ||
90 | m4_expand_once([_AC_COMPILER_EXEEXT])[]dnl | ||
91 | m4_expand_once([_AC_COMPILER_OBJEXT])[]dnl | ||
92 | AC_LANG_POP(CSHARP)dnl | ||
93 | ])# AC_PROG_MCS | ||
94 | |||
95 | |||
diff --git a/m4/efl_path_max.m4 b/m4/efl_path_max.m4 deleted file mode 100644 index f57bfd2ab5..0000000000 --- a/m4/efl_path_max.m4 +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | dnl Check for PATH_MAX in limits.h, and define a default value if not found | ||
2 | dnl This is a workaround for systems not providing PATH_MAX, like GNU/Hurd | ||
3 | |||
4 | dnl EFL_CHECK_PATH_MAX([DEFAULT_VALUE_IF_NOT_FOUND]) | ||
5 | dnl | ||
6 | dnl If PATH_MAX is not defined in <limits.h>, defines it | ||
7 | dnl to DEFAULT_VALUE_IF_NOT_FOUND if it exists, or fallback | ||
8 | dnl to using 4096 | ||
9 | |||
10 | AC_DEFUN([EFL_CHECK_PATH_MAX], | ||
11 | [ | ||
12 | |||
13 | default_max=m4_default([$1], "4096") | ||
14 | AC_LANG_PUSH([C]) | ||
15 | |||
16 | AC_MSG_CHECKING([for PATH_MAX in limits.h]) | ||
17 | AC_COMPILE_IFELSE( | ||
18 | [AC_LANG_PROGRAM( | ||
19 | [[ | ||
20 | #include <limits.h> | ||
21 | ]], | ||
22 | [[ | ||
23 | int i = PATH_MAX; | ||
24 | ]])], | ||
25 | [AC_MSG_RESULT([yes])], | ||
26 | [ | ||
27 | AC_DEFINE_UNQUOTED([PATH_MAX], | ||
28 | [${default_max}], | ||
29 | [default value since PATH_MAX is not defined]) | ||
30 | AC_MSG_RESULT([no: using ${default_max}]) | ||
31 | ]) | ||
32 | |||
33 | AC_LANG_POP([C]) | ||
34 | |||
35 | ]) | ||
36 | dnl end of efl_path_max.m4 | ||
diff --git a/m4/efl_pkg_config.m4 b/m4/efl_pkg_config.m4 deleted file mode 100644 index 13a9516e90..0000000000 --- a/m4/efl_pkg_config.m4 +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | dnl file with extensions to pkg-config module | ||
2 | dnl | ||
3 | dnl EFL_PKG_CHECK_STRICT(MODULE, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) | ||
4 | dnl similar to PKG_CHECK_EXISTS() that will AC_MSG_ERROR() if not found | ||
5 | AC_DEFUN([EFL_PKG_CHECK_STRICT], | ||
6 | [ | ||
7 | PKG_CHECK_EXISTS([$1], [$2], | ||
8 | [m4_ifval([$3], [$3], [AC_MSG_ERROR([pkg-config missing $1])])] | ||
9 | ) | ||
10 | ]) | ||
diff --git a/m4/efl_stdcxx_11.m4 b/m4/efl_stdcxx_11.m4 deleted file mode 100644 index f606bc0379..0000000000 --- a/m4/efl_stdcxx_11.m4 +++ /dev/null | |||
@@ -1,136 +0,0 @@ | |||
1 | # ============================================================================ | ||
2 | # http://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_11.html | ||
3 | # ============================================================================ | ||
4 | # | ||
5 | # SYNOPSIS | ||
6 | # | ||
7 | # AX_CXX_COMPILE_STDCXX_11([ext|noext],[mandatory|optional]) | ||
8 | # | ||
9 | # DESCRIPTION | ||
10 | # | ||
11 | # Check for baseline language coverage in the compiler for the C++11 | ||
12 | # standard; if necessary, add switches to CXXFLAGS to enable support. | ||
13 | # | ||
14 | # The first argument, if specified, indicates whether you insist on an | ||
15 | # extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g. | ||
16 | # -std=c++11). If neither is specified, you get whatever works, with | ||
17 | # preference for an extended mode. | ||
18 | # | ||
19 | # The second argument, if specified 'mandatory' or if left unspecified, | ||
20 | # indicates that baseline C++11 support is required and that the macro | ||
21 | # should error out if no mode with that support is found. If specified | ||
22 | # 'optional', then configuration proceeds regardless, after defining | ||
23 | # HAVE_CXX11 if and only if a supporting mode is found. | ||
24 | # | ||
25 | # LICENSE | ||
26 | # | ||
27 | # Copyright (c) 2008 Benjamin Kosnik <bkoz@redhat.com> | ||
28 | # Copyright (c) 2012 Zack Weinberg <zackw@panix.com> | ||
29 | # Copyright (c) 2013 Roy Stogner <roystgnr@ices.utexas.edu> | ||
30 | # | ||
31 | # Copying and distribution of this file, with or without modification, are | ||
32 | # permitted in any medium without royalty provided the copyright notice | ||
33 | # and this notice are preserved. This file is offered as-is, without any | ||
34 | # warranty. | ||
35 | |||
36 | #serial 3 | ||
37 | |||
38 | m4_define([_EFL_CXX_COMPILE_STDCXX_11_testbody], [ | ||
39 | template <typename T> | ||
40 | struct check | ||
41 | { | ||
42 | static_assert(sizeof(int) <= sizeof(T), "not big enough"); | ||
43 | }; | ||
44 | |||
45 | typedef check<check<bool>> right_angle_brackets; | ||
46 | |||
47 | int a; | ||
48 | decltype(a) b; | ||
49 | |||
50 | typedef check<int> check_type; | ||
51 | check_type c; | ||
52 | check_type&& cr = static_cast<check_type&&>(c); | ||
53 | |||
54 | struct A { A(int); }; | ||
55 | struct B : A { using A::A; }; // inheriting constructors | ||
56 | |||
57 | auto d = a; | ||
58 | ]) | ||
59 | |||
60 | AC_DEFUN([EFL_CXX_COMPILE_STDCXX_11], [dnl | ||
61 | m4_if([$1], [], [], | ||
62 | [$1], [ext], [], | ||
63 | [$1], [noext], [], | ||
64 | [m4_fatal([invalid argument `$1' to AX_CXX_COMPILE_STDCXX_11])])dnl | ||
65 | m4_if([$2], [], [ax_cxx_compile_cxx11_required=true], | ||
66 | [$2], [mandatory], [ax_cxx_compile_cxx11_required=true], | ||
67 | [$2], [optional], [ax_cxx_compile_cxx11_required=false], | ||
68 | [m4_fatal([invalid second argument `$2' to AX_CXX_COMPILE_STDCXX_11])])dnl | ||
69 | AC_LANG_PUSH([C++])dnl | ||
70 | ac_success=no | ||
71 | AC_CACHE_CHECK(whether $CXX supports C++11 features by default, | ||
72 | ax_cv_cxx_compile_cxx11, | ||
73 | [AC_COMPILE_IFELSE([AC_LANG_SOURCE([_EFL_CXX_COMPILE_STDCXX_11_testbody])], | ||
74 | [ax_cv_cxx_compile_cxx11=yes], | ||
75 | [ax_cv_cxx_compile_cxx11=no])]) | ||
76 | if test x$ax_cv_cxx_compile_cxx11 = xyes; then | ||
77 | ac_success=yes | ||
78 | fi | ||
79 | |||
80 | m4_if([$1], [noext], [], [dnl | ||
81 | if test x$ac_success = xno; then | ||
82 | for switch in -std=gnu++11; do | ||
83 | cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx11_$switch]) | ||
84 | AC_CACHE_CHECK(whether $CXX supports C++11 features with $switch, | ||
85 | $cachevar, | ||
86 | [ac_save_CXXFLAGS="$CXXFLAGS" | ||
87 | CXXFLAGS="$CXXFLAGS $switch" | ||
88 | AC_COMPILE_IFELSE([AC_LANG_SOURCE([_EFL_CXX_COMPILE_STDCXX_11_testbody])], | ||
89 | [eval $cachevar=yes], | ||
90 | [eval $cachevar=no]) | ||
91 | CXXFLAGS="$ac_save_CXXFLAGS"]) | ||
92 | if eval test x\$$cachevar = xyes; then | ||
93 | CXXFLAGS="$CXXFLAGS $switch" | ||
94 | ac_success=yes | ||
95 | break | ||
96 | fi | ||
97 | done | ||
98 | fi]) | ||
99 | |||
100 | m4_if([$1], [ext], [], [dnl | ||
101 | if test x$ac_success = xno; then | ||
102 | for switch in -std=c++11; do | ||
103 | cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx11_$switch]) | ||
104 | AC_CACHE_CHECK(whether $CXX supports C++11 features with $switch, | ||
105 | $cachevar, | ||
106 | [ac_save_CXXFLAGS="$CXXFLAGS" | ||
107 | CXXFLAGS="$CXXFLAGS $switch" | ||
108 | AC_COMPILE_IFELSE([AC_LANG_SOURCE([_EFL_CXX_COMPILE_STDCXX_11_testbody])], | ||
109 | [eval $cachevar=yes], | ||
110 | [eval $cachevar=no]) | ||
111 | CXXFLAGS="$ac_save_CXXFLAGS"]) | ||
112 | if eval test x\$$cachevar = xyes; then | ||
113 | CXXFLAGS="$CXXFLAGS $switch" | ||
114 | ac_success=yes | ||
115 | break | ||
116 | fi | ||
117 | done | ||
118 | fi]) | ||
119 | AC_LANG_POP([C++]) | ||
120 | if test x$ax_cxx_compile_cxx11_required = xtrue; then | ||
121 | if test x$ac_success = xno; then | ||
122 | AC_MSG_ERROR([*** A compiler with support for C++11 language features is required.]) | ||
123 | fi | ||
124 | else | ||
125 | if test x$ac_success = xno; then | ||
126 | HAVE_CXX11=0 | ||
127 | AC_MSG_NOTICE([No compiler with C++11 support was found]) | ||
128 | else | ||
129 | HAVE_CXX11=1 | ||
130 | AC_DEFINE(HAVE_CXX11,1, | ||
131 | [define if the compiler supports basic C++11 syntax]) | ||
132 | fi | ||
133 | |||
134 | AC_SUBST(HAVE_CXX11) | ||
135 | fi | ||
136 | ]) | ||
diff --git a/m4/efl_threads.m4 b/m4/efl_threads.m4 deleted file mode 100644 index 54a5fc6d77..0000000000 --- a/m4/efl_threads.m4 +++ /dev/null | |||
@@ -1,163 +0,0 @@ | |||
1 | dnl Copyright (C) 2010 Vincent Torri <vtorri at univ-evry dot fr> | ||
2 | dnl rwlock code added by Mike Blumenkrantz <mike at zentific dot com> | ||
3 | dnl This code is public domain and can be freely used or copied. | ||
4 | |||
5 | dnl Macro that check if POSIX or Win32 threads library is available or not. | ||
6 | |||
7 | dnl Usage: EFL_CHECK_THREADS(ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]) | ||
8 | dnl Call AC_SUBST(EFL_PTHREAD_CFLAGS) | ||
9 | dnl Call AC_SUBST(EFL_PTHREAD_LIBS) | ||
10 | dnl Defines EFL_HAVE_THREADS | ||
11 | |||
12 | AC_DEFUN([EFL_CHECK_THREADS], | ||
13 | [ | ||
14 | |||
15 | dnl Generic thread detection | ||
16 | |||
17 | EFL_PTHREAD_CFLAGS="-D_REENTRANT" | ||
18 | EFL_PTHREAD_LIBS="" | ||
19 | |||
20 | _efl_have_posix_threads="no" | ||
21 | |||
22 | dnl Use generic infrastructure for pthread detection (What a hell of a mess !) | ||
23 | gl_LOCK | ||
24 | |||
25 | AC_DEFINE([EFL_HAVE_THREADS], [1], [Define to mention that POSIX or Win32 threads are supported]) | ||
26 | |||
27 | _efl_have_posix_threads="${gl_use_threads}" | ||
28 | |||
29 | dnl System specific CFLAGS | ||
30 | if test "x${_efl_have_posix_threads}" = "xyes"; then | ||
31 | case "$host_os" in | ||
32 | osf*) EFL_PTHREAD_CFLAGS="-D_REENTRANT" ;; | ||
33 | aix* | freebsd*) EFL_PTHREAD_CFLAGS="-D_THREAD_SAFE" ;; | ||
34 | solaris*) EFL_PTHREAD_CFLAGS="-D_REENTRANT" ;; | ||
35 | esac | ||
36 | fi | ||
37 | |||
38 | dnl check if the compiler supports POSIX threads | ||
39 | if test "x${_efl_have_posix_threads}" = "xyes" ; then | ||
40 | |||
41 | SAVE_LIBS=${LIBS} | ||
42 | LIBS="${LIBS} ${LIBMULTITHREAD}" | ||
43 | AC_LINK_IFELSE( | ||
44 | [AC_LANG_PROGRAM([[ | ||
45 | #include <pthread.h> | ||
46 | ]], | ||
47 | [[ | ||
48 | pthread_barrier_t barrier; | ||
49 | pthread_barrier_init(&barrier, NULL, 1); | ||
50 | ]])], | ||
51 | [efl_have_pthread_barrier="yes"], | ||
52 | [efl_have_pthread_barrier="no"]) | ||
53 | AC_LINK_IFELSE( | ||
54 | [AC_LANG_PROGRAM([[ | ||
55 | #include <stdlib.h> | ||
56 | #include <pthread.h> | ||
57 | #include <sched.h> | ||
58 | #ifndef __linux__ | ||
59 | #include <pthread_np.h> | ||
60 | #endif | ||
61 | ]], | ||
62 | [[ | ||
63 | pthread_attr_setaffinity_np(NULL, 0, NULL); | ||
64 | ]])], | ||
65 | [efl_have_setaffinity="yes"], | ||
66 | [efl_have_setaffinity="no"]) | ||
67 | AC_LINK_IFELSE( | ||
68 | [AC_LANG_PROGRAM([[ | ||
69 | #define _GNU_SOURCE | ||
70 | #include <stdlib.h> | ||
71 | #include <pthread.h> | ||
72 | #ifndef __linux__ | ||
73 | #include <pthread_np.h> | ||
74 | #endif | ||
75 | ]], | ||
76 | [[ | ||
77 | #ifndef __linux__ | ||
78 | pthread_set_name_np(NULL, NULL); | ||
79 | #else | ||
80 | pthread_setname_np(NULL, NULL); | ||
81 | #endif | ||
82 | ]])], | ||
83 | [efl_have_setname="yes"], | ||
84 | [efl_have_setname="no"]) | ||
85 | LIBS=${SAVE_LIBS} | ||
86 | fi | ||
87 | |||
88 | AC_MSG_CHECKING([which threads API is used]) | ||
89 | if test "x${_efl_have_posix_threads}" = "xyes" ; then | ||
90 | efl_have_threads="POSIX" | ||
91 | fi | ||
92 | AC_MSG_RESULT([${efl_have_threads}]) | ||
93 | |||
94 | EFL_PTHREAD_LIBS="${LTLIBMULTITHREAD}" | ||
95 | |||
96 | AC_SUBST(EFL_PTHREAD_CFLAGS) | ||
97 | AC_SUBST(EFL_PTHREAD_LIBS) | ||
98 | |||
99 | dnl check if the compiler supports pthreads spinlock | ||
100 | |||
101 | efl_have_posix_threads_spinlock="no" | ||
102 | |||
103 | if test "x${_efl_have_posix_threads}" = "xyes" ; then | ||
104 | SAVE_LIBS=${LIBS} | ||
105 | LIBS="${LIBS} ${LIBMULTITHREAD}" | ||
106 | AC_LINK_IFELSE( | ||
107 | [AC_LANG_PROGRAM([[ | ||
108 | #include <pthread.h> | ||
109 | #include <sched.h> | ||
110 | ]], | ||
111 | [[ | ||
112 | pthread_spinlock_t lock; | ||
113 | int res; | ||
114 | res = pthread_spin_init(&lock, PTHREAD_PROCESS_PRIVATE); | ||
115 | sched_yield(); | ||
116 | ]])], | ||
117 | [efl_have_posix_threads_spinlock="yes"], | ||
118 | [efl_have_posix_threads_spinlock="no"]) | ||
119 | LIBS=${SAVE_LIBS} | ||
120 | |||
121 | fi | ||
122 | |||
123 | AC_MSG_CHECKING([whether to build POSIX threads spinlock code]) | ||
124 | AC_MSG_RESULT([${efl_have_posix_threads_spinlock}]) | ||
125 | |||
126 | if test "x${efl_have_posix_threads_spinlock}" = "xyes" ; then | ||
127 | AC_DEFINE([EFL_HAVE_POSIX_THREADS_SPINLOCK], [1], [Define to mention that POSIX threads spinlocks are supported]) | ||
128 | fi | ||
129 | |||
130 | |||
131 | dnl checks if the compiler supports OSX spinlock | ||
132 | |||
133 | efl_have_osx_spinlock="no" | ||
134 | |||
135 | if test "x${_efl_have_posix_threads}" = "xyes" ; then | ||
136 | AC_LINK_IFELSE( | ||
137 | [AC_LANG_PROGRAM([[ | ||
138 | #include <libkern/OSAtomic.h> | ||
139 | ]], | ||
140 | [[ | ||
141 | OSSpinLock spin_lock = 0; | ||
142 | OSSpinLockTry(&spin_lock); | ||
143 | ]])], | ||
144 | [efl_have_osx_spinlock="yes"], | ||
145 | [efl_have_osx_spinlock="no"]) | ||
146 | fi | ||
147 | |||
148 | AC_MSG_CHECKING([whether to build OSX spinlock code]) | ||
149 | AC_MSG_RESULT([${efl_have_osx_spinlock}]) | ||
150 | |||
151 | if test "x${efl_have_osx_spinlock}" = "xyes" ; then | ||
152 | AC_DEFINE([EFL_HAVE_OSX_SPINLOCK], [1], [Define to mention that OSX spinlocks are supported]) | ||
153 | fi | ||
154 | |||
155 | |||
156 | |||
157 | AS_IF([test "x$_efl_have_posix_threads" = "xyes"], | ||
158 | [$1], | ||
159 | [m4_if([$2], [$2], [AC_MSG_ERROR([Threads are required.])])]) | ||
160 | |||
161 | |||
162 | ]) | ||
163 | |||
diff --git a/m4/eina_check.m4 b/m4/eina_check.m4 deleted file mode 100644 index 251d4cb559..0000000000 --- a/m4/eina_check.m4 +++ /dev/null | |||
@@ -1,49 +0,0 @@ | |||
1 | dnl use: EINA_CHECK_MODULE(foo-bar, have_dependency, description) | ||
2 | AC_DEFUN([EINA_CHECK_MODULE], | ||
3 | [ | ||
4 | m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl | ||
5 | m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl | ||
6 | |||
7 | # AC_ARG_ENABLE([mempool-$1], | ||
8 | # [AC_HELP_STRING([--enable-mempool-$1], [enable build of $3 @<:@default=$2@:>@])], | ||
9 | # [ | ||
10 | # if test "x${enableval}" = "xyes" ; then | ||
11 | # enable_module="yes" | ||
12 | # else | ||
13 | # if test "x${enableval}" = "xstatic" ; then | ||
14 | # enable_module="static" | ||
15 | # else | ||
16 | # enable_module="no" | ||
17 | # fi | ||
18 | # fi | ||
19 | # ], | ||
20 | # [enable_module=$2]) | ||
21 | enable_module=$2 | ||
22 | |||
23 | have_module="no" | ||
24 | if test "x${enable_module}" = "xyes" || test "x${enable_module}" = "xstatic" ; then | ||
25 | have_module="yes" | ||
26 | fi | ||
27 | |||
28 | AC_MSG_CHECKING([whether to enable $3 built]) | ||
29 | AC_MSG_RESULT([${have_module}]) | ||
30 | |||
31 | static_module="no" | ||
32 | if test "x${enable_module}" = "xstatic" ; then | ||
33 | static_module="yes" | ||
34 | have_static_module="yes" | ||
35 | AC_DEFINE(EINA_STATIC_BUILD_[]UP, 1, [Set to 1 if $2 is statically built]) | ||
36 | fi | ||
37 | |||
38 | if ! test "x${enable_module}" = "xno" ; then | ||
39 | AC_DEFINE(EINA_BUILD_[]UP, 1, [Set to 1 if $2 is built]) | ||
40 | fi | ||
41 | |||
42 | AM_CONDITIONAL(EINA_BUILD_[]UP, [test "x${have_module}" = "xyes"]) | ||
43 | AM_CONDITIONAL(EINA_STATIC_BUILD_[]UP, [test "x${static_module}" = "xyes"]) | ||
44 | |||
45 | enable_[]DOWN=${enable_module} | ||
46 | |||
47 | m4_popdef([UP]) | ||
48 | m4_popdef([DOWN]) | ||
49 | ]) | ||
diff --git a/m4/eina_config.m4 b/m4/eina_config.m4 deleted file mode 100644 index 609e4f9c74..0000000000 --- a/m4/eina_config.m4 +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | dnl use: EINA_CONFIG(configsuffix, testcond) | ||
2 | AC_DEFUN([EINA_CONFIG], | ||
3 | [ | ||
4 | if $2; then | ||
5 | EINA_CONFIGURE_$1="#define EINA_$1" | ||
6 | fi | ||
7 | AC_SUBST([EINA_CONFIGURE_$1]) | ||
8 | ]) | ||
diff --git a/m4/eio_check_options.m4 b/m4/eio_check_options.m4 deleted file mode 100644 index 5fb901273c..0000000000 --- a/m4/eio_check_options.m4 +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | dnl use: EIO_CHECK_NOTIFY_WIN32([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
2 | AC_DEFUN([EIO_CHECK_NOTIFY_WIN32], | ||
3 | [ | ||
4 | if test "x${have_win32}" = "xyes" ; then | ||
5 | AC_DEFINE([HAVE_NOTIFY_WIN32], [1], [ File monitoring with Windows notification ]) | ||
6 | fi | ||
7 | |||
8 | AC_MSG_CHECKING([whether Windows notification is to be used for filemonitoring]) | ||
9 | AC_MSG_RESULT([${have_win32}]) | ||
10 | |||
11 | AS_IF([test "x${have_win32}" = "xyes"], [$1], [$2]) | ||
12 | ]) | ||
diff --git a/m4/elm_check_backend.m4 b/m4/elm_check_backend.m4 deleted file mode 100644 index a51235718a..0000000000 --- a/m4/elm_check_backend.m4 +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | |||
2 | dnl use: ELM_CHECK_BACKEND(engine) | ||
3 | AC_DEFUN([ELM_CHECK_BACKEND], | ||
4 | [dnl | ||
5 | m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl | ||
6 | m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl | ||
7 | |||
8 | have_elementary_[]DOWN="no" | ||
9 | want_backend="$2" | ||
10 | |||
11 | AC_MSG_CHECKING([whether to enable $1 backend]) | ||
12 | AC_MSG_RESULT([${want_backend}]) | ||
13 | |||
14 | if test "x${want_backend}" != "xno"; then | ||
15 | AC_DEFINE([HAVE_ELEMENTARY_]UP, [1], [$1 support for Elementary]) | ||
16 | have_elementary_[]DOWN="yes" | ||
17 | requirement_elm_pc="ecore-[]DOWN >= efl_version ${requirement_elm_pc}" | ||
18 | fi | ||
19 | |||
20 | AC_MSG_CHECKING([whether to build $1 backend]) | ||
21 | AC_MSG_RESULT([${have_elementary_[]DOWN}]) | ||
22 | |||
23 | EFL_ADD_FEATURE([ELEMENTARY], [$1], [${want_backend}]) | ||
24 | |||
25 | m4_popdef([UP])dnl | ||
26 | m4_popdef([DOWN])dnl | ||
27 | ]) | ||
diff --git a/m4/elm_check_option.m4 b/m4/elm_check_option.m4 deleted file mode 100644 index 999636ad32..0000000000 --- a/m4/elm_check_option.m4 +++ /dev/null | |||
@@ -1,60 +0,0 @@ | |||
1 | |||
2 | dnl use: ELM_CHECK_OPTION_DEP(option, pkgver) | ||
3 | AC_DEFUN([ELM_CHECK_OPTION_DEP], | ||
4 | [dnl | ||
5 | |||
6 | m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl | ||
7 | m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl | ||
8 | |||
9 | ELM_[]UP[]_DEF="#undef" | ||
10 | have_elementary_[]DOWN="no" | ||
11 | |||
12 | AC_ARG_ENABLE(DOWN, | ||
13 | [AS_HELP_STRING([--disable-]DOWN, [disable ]DOWN[ support. @<:@default=detect@:>@])], | ||
14 | [want_option=$enableval], | ||
15 | [want_option="auto"]) | ||
16 | |||
17 | AC_MSG_CHECKING([whether to enable $1 option]) | ||
18 | AC_MSG_RESULT([${want_option}]) | ||
19 | |||
20 | if test "x${want_option}" != "xno"; then | ||
21 | PKG_CHECK_EXISTS(DOWN[ >= $2], | ||
22 | [ | ||
23 | AC_DEFINE([HAVE_ELEMENTARY_]UP, [1], [$1 support for Elementary]) | ||
24 | have_elementary_[]DOWN="yes" | ||
25 | ELM_[]UP[]_DEF="#define" | ||
26 | requirement_elm_pc="[]DOWN >= $2 ${requirement_elm_pc}" | ||
27 | ], | ||
28 | [have_elementary_]DOWN[="no"] | ||
29 | ) | ||
30 | fi | ||
31 | |||
32 | AC_MSG_CHECKING([whether to build $1 option]) | ||
33 | AC_MSG_RESULT([${have_elementary_[]DOWN}]) | ||
34 | |||
35 | if test "x${want_elementary_[]DOWN}" = "xyes" && test "x${have_elementary_[]DOWN}" = "xno"; then | ||
36 | AC_MSG_ERROR([$1 support requested, but $1 was not found by pkg-config.]) | ||
37 | fi | ||
38 | |||
39 | AC_SUBST([ELM_]UP[_DEF]) | ||
40 | |||
41 | m4_popdef([UP])dnl | ||
42 | m4_popdef([DOWN])dnl | ||
43 | ]) | ||
44 | |||
45 | dnl use: ELM_CHECK_OPTION(option, pkgver) | ||
46 | AC_DEFUN([ELM_CHECK_OPTION], | ||
47 | [dnl | ||
48 | |||
49 | m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl | ||
50 | m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl | ||
51 | |||
52 | if test "x$1" = "xeweb" ; then | ||
53 | ELM_CHECK_OPTION_DEP_EWK2 | ||
54 | else | ||
55 | ELM_CHECK_OPTION_DEP($1, $2) | ||
56 | fi | ||
57 | |||
58 | m4_popdef([UP])dnl | ||
59 | m4_popdef([DOWN])dnl | ||
60 | ]) | ||
diff --git a/m4/elm_quicklaunch.m4 b/m4/elm_quicklaunch.m4 deleted file mode 100644 index b51ff0f516..0000000000 --- a/m4/elm_quicklaunch.m4 +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | dnl Copyright (C) 2013 Cedric Bail <cedric dot bail at samsung dot com> | ||
2 | dnl That code is public domain and can be freely used or copied | ||
3 | |||
4 | dnl Macro that check if -pie -rdynamic can be given to ld | ||
5 | |||
6 | dnl Usage: ELM_QUICKLAUNCH | ||
7 | dnl add -pie -rdynamic to LDFLAGS and -fpie to CFLAGS | ||
8 | |||
9 | AC_DEFUN([ELM_QUICKLAUNCH], | ||
10 | [ | ||
11 | AC_MSG_CHECKING([If the compiler has what it takes to do quicklaunch (-pie -rdynamic)]) | ||
12 | old_LDFLAGS="$LDFLAGS" | ||
13 | old_CFLAGS="$CFLAGS" | ||
14 | |||
15 | LDFLAGS="$LDFLAGS -pie -rdynamic" | ||
16 | CFLAGS="$CFLAGS -fpie" | ||
17 | |||
18 | AC_LINK_IFELSE([AC_LANG_SOURCE([int main(){}])], | ||
19 | [AC_MSG_RESULT([yes])], | ||
20 | [LDFLAGS="$old_LDFLAGS" | ||
21 | CFLAGS="$old_CFLAGS" | ||
22 | AC_MSG_RESULT([no]) | ||
23 | ]) | ||
24 | ]) | ||
diff --git a/m4/emotion_generic_players.m4 b/m4/emotion_generic_players.m4 deleted file mode 100644 index d852dbaa29..0000000000 --- a/m4/emotion_generic_players.m4 +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | dnl EMOTION_GENERIC_PLAYER(NAME, DEFAULT_STATE, [PKG_CONFIG_DEPS]) | ||
2 | dnl Does the following: | ||
3 | dnl * AC_ARG_WITH(NAME) | ||
4 | dnl * define with_name to yes or no | ||
5 | dnl * PKG_CHECK_MODULES(NAME, PKG_CONFIG_DEPS) | ||
6 | dnl * AC_DEFINE([HAVE_NAME]) | ||
7 | dnl * AM_CONDITIONAL([HAVE_NAME]) | ||
8 | AC_DEFUN([EMOTION_GENERIC_PLAYER], | ||
9 | [dnl | ||
10 | m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl | ||
11 | m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl | ||
12 | |||
13 | AC_ARG_WITH([DOWN], | ||
14 | [AC_HELP_STRING([--with-]m4_defn([DOWN]), | ||
15 | [build generic player ]m4_defn([UP])[. @<:@default=$2@:>@])], | ||
16 | [], [with_]m4_defn([DOWN])[="$2"]) | ||
17 | |||
18 | if test "${with_[]m4_defn([DOWN])}" = "yes"; then | ||
19 | m4_ifval([$3], [dnl | ||
20 | PKG_CHECK_MODULES(m4_defn([UP]), [$3]) | ||
21 | ], [dnl | ||
22 | m4_defn([UP])_LIBS="${m4_defn([UP])_LIBS}" | ||
23 | m4_defn([UP])_CFLAGS="${m4_defn([UP])_CFLAGS}" | ||
24 | AC_SUBST(m4_defn([UP])[_LIBS]) | ||
25 | AC_SUBST(m4_defn([UP])[_CFLAGS]) | ||
26 | ]) | ||
27 | |||
28 | AC_SEARCH_LIBS([shm_open], [rt], [], [AC_MSG_ERROR([unable to find the shm_open() function])]) | ||
29 | if test "${ac_cv_search_shm_open}" != "none required"; then | ||
30 | m4_defn([UP])_LIBS="${m4_defn([UP])_LIBS} ${ac_cv_search_shm_open}" | ||
31 | fi | ||
32 | fi | ||
33 | AM_CONDITIONAL([HAVE_]m4_defn([UP]), [test "$with_[]m4_defn([DOWN])" = "yes"]) | ||
34 | |||
35 | m4_popdef([UP])dnl | ||
36 | m4_popdef([DOWN])dnl | ||
37 | ]) | ||
diff --git a/m4/emotion_module.m4 b/m4/emotion_module.m4 deleted file mode 100644 index 184533fcdc..0000000000 --- a/m4/emotion_module.m4 +++ /dev/null | |||
@@ -1,133 +0,0 @@ | |||
1 | dnl use: EMOTION_MODULE_DEP_CHECK_XINE(want_engine) | ||
2 | dnl where want_engine = yes or static | ||
3 | AC_DEFUN([EMOTION_MODULE_DEP_CHECK_XINE], | ||
4 | [dnl | ||
5 | requirements="libxine >= 1.1.1" | ||
6 | if test "$1" = "static"; then | ||
7 | EFL_DEPEND_PKG([EMOTION], [EMOTION_MODULE_XINE], [${requirements}]) | ||
8 | else | ||
9 | PKG_CHECK_MODULES([EMOTION_MODULE_XINE], [${requirements}]) | ||
10 | fi | ||
11 | ]) | ||
12 | |||
13 | dnl use: EMOTION_MODULE_DEP_CHECK_GSTREAMER(want_static) | ||
14 | dnl where want_engine = yes or static | ||
15 | AC_DEFUN([EMOTION_MODULE_DEP_CHECK_GSTREAMER], | ||
16 | [dnl | ||
17 | GST_VER=0.10.2 | ||
18 | requirements="gstreamer-0.10 >= ${GST_VER} gstreamer-plugins-base-0.10 >= ${GST_VER} gstreamer-video-0.10 >= ${GST_VER} gstreamer-interfaces-0.10 >= ${GST_VER}" | ||
19 | have_gst_xoverlay="no" | ||
20 | if test "$1" = "static"; then | ||
21 | EFL_DEPEND_PKG([EMOTION], [EMOTION_MODULE_GSTREAMER], [${requirements}]) | ||
22 | else | ||
23 | PKG_CHECK_MODULES([EMOTION_MODULE_GSTREAMER], [${requirements}]) | ||
24 | fi | ||
25 | |||
26 | if test "${want_x11_any}" = "yes"; then | ||
27 | if test "$1" = "static"; then # we need gstreamer cflags and libs to test xoverlay support | ||
28 | PKG_CHECK_MODULES([EMOTION_MODULE_GSTREAMER], [${requirements}]) | ||
29 | fi | ||
30 | CFLAGS_save="${CFLAGS}" | ||
31 | CFLAGS="${CFLAGS} ${EMOTION_MODULE_GSTREAMER_CFLAGS}" | ||
32 | AC_CHECK_HEADER([gst/interfaces/xoverlay.h], | ||
33 | [have_gst_xoverlay="old" # will check for "new" later with AC_CHECK_LIB() | ||
34 | AC_DEFINE(HAVE_XOVERLAY_H, 1, [Build with Gstreamer Xoverlay support])], | ||
35 | [AC_MSG_WARN([Building Gstreamer with X11 but no gst/interfaces/xoverlay.h found])], | ||
36 | [#include <gst/gst.h>]) | ||
37 | CFLAGS="${CFLAGS_save}" | ||
38 | |||
39 | LDFLAGS_save=${LDFLAGS} | ||
40 | LDFLAGS="${LDFLAGS} ${EMOTION_MODULE_GSTREAMER_LIBS}" | ||
41 | AC_CHECK_LIB([gstinterfaces-0.10], [gst_x_overlay_set_window_handle], | ||
42 | [have_gst_xoverlay="new" | ||
43 | AC_DEFINE([HAVE_X_OVERLAY_SET], [1], [Use gst_x_overlay_set_window_handle instead of old deprecated gst_x_overlay_set_xwindow_id])]) | ||
44 | LDFLAGS="${LDFLAGS_save}" | ||
45 | fi | ||
46 | ]) | ||
47 | |||
48 | dnl use: EMOTION_MODULE_DEP_CHECK_GSTREAMER_1(want_static) | ||
49 | dnl where want_engine = yes or static | ||
50 | AC_DEFUN([EMOTION_MODULE_DEP_CHECK_GSTREAMER1], | ||
51 | [dnl | ||
52 | GST_VER=1.0 | ||
53 | requirements="gstreamer-1.0 >= ${GST_VER} gstreamer-plugins-base-1.0 >= ${GST_VER} gstreamer-video-1.0 >= ${GST_VER} gstreamer-audio-1.0 >= ${GST_VER} gstreamer-tag-1.0 >= ${GST_VER} gstreamer-pbutils-1.0 >= ${GST_VER}" | ||
54 | if test "$1" = "static"; then | ||
55 | EFL_DEPEND_PKG([EMOTION], [EMOTION_MODULE_GSTREAMER1], [${requirements}]) | ||
56 | else | ||
57 | PKG_CHECK_MODULES([EMOTION_MODULE_GSTREAMER1], [${requirements}]) | ||
58 | fi | ||
59 | ]) | ||
60 | |||
61 | |||
62 | dnl use: EMOTION_MODULE_DEP_CHECK_LIBVLC(want_static) | ||
63 | dnl where want_engine = yes or static | ||
64 | AC_DEFUN([EMOTION_MODULE_DEP_CHECK_LIBVLC], | ||
65 | [dnl | ||
66 | LIBVLC_VER=3.0 | ||
67 | requirements="libvlc >= ${LIBVLC_VER}" | ||
68 | if test "$1" = "static"; then | ||
69 | EFL_DEPEND_PKG([EMOTION], [EMOTION_MODULE_LIBVLC], [${requirements}]) | ||
70 | else | ||
71 | PKG_CHECK_MODULES([EMOTION_MODULE_LIBVLC], [${requirements}]) | ||
72 | fi | ||
73 | ]) | ||
74 | |||
75 | dnl use: EMOTION_MODULE_DEP_CHECK_GENERIC(want_static) | ||
76 | dnl where want_engine = yes or static | ||
77 | AC_DEFUN([EMOTION_MODULE_DEP_CHECK_GENERIC], | ||
78 | [dnl | ||
79 | if test "$1" = "static"; then | ||
80 | EFL_ADD_LIBS([EMOTION], [${requirements_libs_shm}]) | ||
81 | else | ||
82 | EMOTION_MODULE_GENERIC_CFLAGS="" | ||
83 | EMOTION_MODULE_GENERIC_LIBS="${requirements_libs_shm}" | ||
84 | AC_SUBST([EMOTION_MODULE_GENERIC_CFLAGS]) | ||
85 | AC_SUBST([EMOTION_MODULE_GENERIC_LIBS]) | ||
86 | fi | ||
87 | ]) | ||
88 | |||
89 | dnl use: EMOTION_MODULE(name, want_engine) | ||
90 | dnl | ||
91 | dnl defines EMOTION_BUILD_NAME if it should be built | ||
92 | dnl defines EMOTION_STATIC_BUILD_NAME if should be built statically | ||
93 | dnl | ||
94 | AC_DEFUN([EMOTION_MODULE], | ||
95 | [ | ||
96 | m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl | ||
97 | m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl | ||
98 | |||
99 | want_engine="$2" | ||
100 | want_static_engine="no" | ||
101 | have_engine="no" | ||
102 | have_emotion_module_[]DOWN="no" | ||
103 | |||
104 | EMOTION_MODULE_[]m4_defn([UP])[]_CFLAGS="" | ||
105 | EMOTION_MODULE_[]m4_defn([UP])[]_LIBS="" | ||
106 | |||
107 | if test "x${want_engine}" = "xyes" -o "x${want_engine}" = "xstatic"; then | ||
108 | |||
109 | m4_default([EMOTION_MODULE_DEP_CHECK_]m4_defn([UP]))([${want_engine}]) | ||
110 | |||
111 | have_engine="yes" | ||
112 | if test "x${want_engine}" = "xstatic" ; then | ||
113 | have_emotion_module_[]DOWN="static" | ||
114 | want_static_engine="yes" | ||
115 | else | ||
116 | have_emotion_module_[]DOWN="yes" | ||
117 | fi | ||
118 | fi | ||
119 | |||
120 | AC_DEFINE_IF(EMOTION_BUILD_[]UP, [test "${have_engine}" = "yes"], | ||
121 | [1], [Build $1 Evas engine]) | ||
122 | AM_CONDITIONAL(EMOTION_BUILD_[]UP, [test "${have_engine}" = "yes"]) | ||
123 | |||
124 | AC_DEFINE_IF(EMOTION_STATIC_BUILD_[]UP, [test "${want_static_engine}" = "yes"], | ||
125 | [1], [Build $1 Evas engine inside libevas]) | ||
126 | AM_CONDITIONAL(EMOTION_STATIC_BUILD_[]UP, [test "${want_static_engine}" = "yes"]) | ||
127 | |||
128 | AC_SUBST([EMOTION_MODULE_]m4_defn([UP])[_CFLAGS]) | ||
129 | AC_SUBST([EMOTION_MODULE_]m4_defn([UP])[_LIBS]) | ||
130 | |||
131 | m4_popdef([UP]) | ||
132 | m4_popdef([DOWN]) | ||
133 | ]) | ||
diff --git a/m4/evas_check_engine.m4 b/m4/evas_check_engine.m4 deleted file mode 100644 index d15c8d5f01..0000000000 --- a/m4/evas_check_engine.m4 +++ /dev/null | |||
@@ -1,629 +0,0 @@ | |||
1 | AC_DEFUN([REQUIRED_WAYLAND_VERSION], [1.11.0]) | ||
2 | |||
3 | dnl use: EVAS_CHECK_ENGINE_DEP_SOFTWARE_XLIB(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
4 | |||
5 | AC_DEFUN([EVAS_CHECK_ENGINE_DEP_SOFTWARE_XLIB], | ||
6 | [ | ||
7 | |||
8 | EFL_FIND_X(evas_engine_[]$1, | ||
9 | [X11/X.h], [X11 XCreateImage Xext XShmCreateImage], | ||
10 | [ | ||
11 | if test "x$3" = "xstatic"; then | ||
12 | requirements_libs_evas="$evas_engine_[]$1[]_libs $requirements_libs_evas" | ||
13 | fi | ||
14 | ifelse([$4], , :, [$4]) | ||
15 | ],[ | ||
16 | ifelse([$5], , :, [$5]) | ||
17 | ]) | ||
18 | ]) | ||
19 | |||
20 | dnl use: EVAS_CHECK_ENGINE_DEP_GL_XLIB(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
21 | |||
22 | AC_DEFUN([EVAS_CHECK_ENGINE_DEP_GL_XLIB], | ||
23 | [ | ||
24 | |||
25 | EFL_FIND_X(evas_engine_[]$1, | ||
26 | [X11/Xlib.h X11/Xatom.h X11/Xutil.h X11/extensions/Xrender.h X11/Xresource.h], | ||
27 | [X11 XCreateColormap Xrender XRenderCreatePicture], | ||
28 | [ | ||
29 | CFLAGS_save="$CFLAGS" | ||
30 | CFLAGS="$evas_engine_[]$1[]_cflags $CFLAGS" | ||
31 | CPPFLAGS_save="$CPPFLAGS" | ||
32 | CPPFLAGS="$evas_engine_[]$1[]_cflags $CPPFLAGS" | ||
33 | |||
34 | AC_CHECK_HEADER([GL/gl.h], | ||
35 | [have_dep="yes"], | ||
36 | [have_dep="no"], | ||
37 | [ | ||
38 | #include <GL/gl.h> | ||
39 | #include <GL/glext.h> | ||
40 | #include <GL/glx.h> | ||
41 | #include <X11/Xlib.h> | ||
42 | #include <X11/Xatom.h> | ||
43 | #include <X11/Xutil.h> | ||
44 | #include <X11/extensions/Xrender.h> | ||
45 | #include <X11/Xresource.h> | ||
46 | ]) | ||
47 | |||
48 | gl_pt_lib="" | ||
49 | have_gl_pt="no" | ||
50 | |||
51 | AC_MSG_CHECKING([whether pthread_create() is supported]) | ||
52 | CFLAGS_pt_save="$CFLAGS" | ||
53 | CFLAGS="$CFLAGS -pthread" | ||
54 | LIBS_pt_save="$LIBS" | ||
55 | LIBS="$LIBS -pthread" | ||
56 | AC_LINK_IFELSE( | ||
57 | [AC_LANG_PROGRAM([[ | ||
58 | #include <pthread.h> | ||
59 | ]], | ||
60 | [[ | ||
61 | pthread_create(NULL, NULL, NULL, NULL); | ||
62 | ]])], | ||
63 | [have_gl_pt="yes"], | ||
64 | [have_gl_pt="no"]) | ||
65 | CFLAGS=$CFLAGS_pt_save | ||
66 | LIBS=$LIBS_pt_save | ||
67 | AC_MSG_RESULT([$have_gl_pt]) | ||
68 | |||
69 | if test "x$have_gl_pt" = "xyes" ; then | ||
70 | gl_pt_lib=" -pthread" | ||
71 | fi | ||
72 | |||
73 | if test "x$have_dep" = "xyes"; then | ||
74 | LIBS_save="$LIBS" | ||
75 | LIBS="$LIBS $evas_engine_[]$1[]_libs" | ||
76 | AC_CHECK_LIB([GL], [glXCreateContext], [have_dep="yes"], [have_dep="no"], [-lm $gl_pt_lib]) | ||
77 | LIBS="$LIBS_save" | ||
78 | fi | ||
79 | |||
80 | if test "x${with_opengl}" = "xes" ; then | ||
81 | have_dep=no | ||
82 | fi | ||
83 | |||
84 | if test "x$have_dep" = "xyes" ; then | ||
85 | evas_engine_[]$1[]_libs="$evas_engine_[]$1[]_libs -lGL $gl_pt_lib" | ||
86 | evas_engine_gl_common_libs="$evas_engine_[]$1[]_libdirs -lGL $gl_pt_lib" | ||
87 | else | ||
88 | AC_CHECK_HEADER([GLES2/gl2.h], | ||
89 | [have_egl="yes"], | ||
90 | [have_egl="no"], | ||
91 | [ | ||
92 | #include <GLES2/gl2.h> | ||
93 | #include <GLES2/gl2ext.h> | ||
94 | #include <EGL/egl.h> | ||
95 | #include <X11/Xlib.h> | ||
96 | #include <X11/Xatom.h> | ||
97 | #include <X11/Xutil.h> | ||
98 | #include <X11/extensions/Xrender.h> | ||
99 | #include <X11/Xresource.h> | ||
100 | ]) | ||
101 | if test "x${have_egl}" = "xyes" ; then | ||
102 | AC_CHECK_LIB(GLESv2, glTexImage2D, [have_glesv2="yes"], , -lEGL -lm $gl_pt_lib) | ||
103 | if test "x${have_glesv2}" = "xyes" ; then | ||
104 | evas_engine_[]$1[]_libs="$evas_engine_[]$1[]_libs -lGLESv2 -lEGL -lm $gl_pt_lib" | ||
105 | evas_engine_gl_common_libs="$evas_engine_[]$1[]_libdirs -lGLESv2 -lm $gl_pt_lib" | ||
106 | have_dep="yes" | ||
107 | AC_DEFINE(GL_GLES, 1, [GLSL runtime shader GLES2 support]) | ||
108 | gles_variety_sgx="yes" | ||
109 | fi | ||
110 | fi | ||
111 | fi | ||
112 | |||
113 | CPPFLAGS="$CPPFLAGS_save" | ||
114 | CFLAGS="$CFLAGS_save" | ||
115 | |||
116 | if test "x$3" = "xstatic" && test "x${have_dep}" = "xyes" ; then | ||
117 | requirements_libs_evas="$evas_engine_[]$1[]_libs $requirements_libs_evas" | ||
118 | fi | ||
119 | |||
120 | AS_IF([test "x${have_dep}" = "xyes"], [$4], [$5]) | ||
121 | ],[ | ||
122 | ifelse([$5], , :, [$5]) | ||
123 | ]) | ||
124 | ]) | ||
125 | |||
126 | dnl use: EVAS_CHECK_ENGINE_DEP_SOFTWARE_GDI(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
127 | |||
128 | AC_DEFUN([EVAS_CHECK_ENGINE_DEP_SOFTWARE_GDI], | ||
129 | [ | ||
130 | |||
131 | have_dep="no" | ||
132 | evas_engine_[]$1[]_cflags="" | ||
133 | evas_engine_[]$1[]_libs="" | ||
134 | |||
135 | AC_CHECK_HEADER([windows.h], | ||
136 | [ | ||
137 | have_dep="yes" | ||
138 | evas_engine_[]$1[]_libs="-lgdi32" | ||
139 | ]) | ||
140 | |||
141 | if test "x$3" = "xstatic" && test "x${have_dep}" = "xyes" ; then | ||
142 | requirements_libs_evas="${evas_engine_[]$1[]_libs} ${requirements_libs_evas}" | ||
143 | fi | ||
144 | |||
145 | AC_SUBST([evas_engine_$1_cflags]) | ||
146 | AC_SUBST([evas_engine_$1_libs]) | ||
147 | |||
148 | AS_IF([test "x${have_dep}" = "xyes"], [$4], [$5]) | ||
149 | |||
150 | ]) | ||
151 | |||
152 | dnl use: EVAS_CHECK_ENGINE_DEP_SOFTWARE_DDRAW(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
153 | |||
154 | AC_DEFUN([EVAS_CHECK_ENGINE_DEP_SOFTWARE_DDRAW], | ||
155 | [ | ||
156 | |||
157 | have_dep="no" | ||
158 | evas_engine_[]$1[]_cflags="" | ||
159 | evas_engine_[]$1[]_libs="" | ||
160 | |||
161 | AC_CHECK_HEADER([ddraw.h], | ||
162 | [ | ||
163 | have_dep="yes" | ||
164 | evas_engine_[]$1[]_libs="-lddraw" | ||
165 | ]) | ||
166 | |||
167 | if test "x$3" = "xstatic" && test "x${have_dep}" = "xyes" ; then | ||
168 | requirements_libs_evas="${evas_engine_[]$1[]_libs} ${requirements_libs_evas}" | ||
169 | fi | ||
170 | |||
171 | AC_SUBST([evas_engine_$1_cflags]) | ||
172 | AC_SUBST([evas_engine_$1_libs]) | ||
173 | |||
174 | AS_IF([test "x${have_dep}" = "xyes"], [$4], [$5]) | ||
175 | |||
176 | ]) | ||
177 | |||
178 | dnl use: EVAS_CHECK_ENGINE_DEP_GL_COCOA(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
179 | |||
180 | AC_DEFUN([EVAS_CHECK_ENGINE_DEP_GL_COCOA], | ||
181 | [ | ||
182 | |||
183 | evas_engine_[]$1[]_cflags="" | ||
184 | evas_engine_[]$1[]_libs="" | ||
185 | |||
186 | AC_LANG_PUSH([Objective C]) | ||
187 | |||
188 | LIBS_save="$LIBS" | ||
189 | LIBS="$LIBS -framework Cocoa" | ||
190 | AC_LINK_IFELSE( | ||
191 | [AC_LANG_PROGRAM( | ||
192 | [[ | ||
193 | #include <Cocoa/Cocoa.h> | ||
194 | ]], | ||
195 | [[ | ||
196 | NSWindow *window; | ||
197 | window = [[NSWindow alloc] | ||
198 | initWithContentRect:NSMakeRect(0, 0, 1, 1) | ||
199 | styleMask:(NSTitledWindowMask) | ||
200 | backing:NSBackingStoreBuffered | ||
201 | defer:NO | ||
202 | screen:nil | ||
203 | ]; | ||
204 | ]])], | ||
205 | [ | ||
206 | have_dep="yes" | ||
207 | evas_engine_[]$1[]_libs="-framework Cocoa -framework OpenGL" | ||
208 | evas_engine_gl_common_libs="$evas_engine_[]$1[]_libdirs" | ||
209 | ], | ||
210 | [have_dep="no"]) | ||
211 | LIBS="$LIBS_save" | ||
212 | |||
213 | AC_LANG_POP([Objective C]) | ||
214 | |||
215 | if test "x$3" = "xstatic" && test "x${have_dep}" = "xyes" ; then | ||
216 | requirements_libs_evas="${evas_engine_[]$1[]_libs} ${requirements_libs_evas}" | ||
217 | fi | ||
218 | |||
219 | AC_SUBST([evas_engine_$1_cflags]) | ||
220 | AC_SUBST([evas_engine_$1_libs]) | ||
221 | |||
222 | AS_IF([test "x${have_dep}" = "xyes"], [$4], [$5]) | ||
223 | |||
224 | ]) | ||
225 | |||
226 | dnl use: EVAS_CHECK_ENGINE_DEP_GL_SDL(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
227 | |||
228 | AC_DEFUN([EVAS_CHECK_ENGINE_DEP_GL_SDL], | ||
229 | [ | ||
230 | |||
231 | requirement="" | ||
232 | have_dep="no" | ||
233 | evas_engine_[]$1[]_cflags="" | ||
234 | evas_engine_[]$1[]_libs="" | ||
235 | |||
236 | PKG_CHECK_EXISTS([sdl2 >= 2.0.0], | ||
237 | [ | ||
238 | have_dep="yes" | ||
239 | requirement="sdl2 >= 2.0.0" | ||
240 | ], | ||
241 | [have_dep="no"]) | ||
242 | |||
243 | if test "x${have_dep}" = "xyes" ; then | ||
244 | if test "x$3" = "xstatic" ; then | ||
245 | requirements_pc_evas="${requirement} ${requirements_pc_evas}" | ||
246 | requirements_pc_deps_evas="${requirement} ${requirements_pc_deps_evas}" | ||
247 | else | ||
248 | PKG_CHECK_MODULES([SDL], [${requirement}]) | ||
249 | evas_engine_[]$1[]_cflags="${SDL_CFLAGS}" | ||
250 | evas_engine_[]$1[]_libs="${SDL_LIBS}" | ||
251 | fi | ||
252 | fi | ||
253 | |||
254 | gl_pt_lib=""; | ||
255 | have_gl_pt="no" | ||
256 | |||
257 | AC_MSG_CHECKING([whether pthread_create() is supported]) | ||
258 | CFLAGS_save="${CFLAGS}" | ||
259 | CFLAGS="${CFLAGS} -pthread" | ||
260 | LIBS_save="${LIBS}" | ||
261 | LIBS="${LIBS} -pthread" | ||
262 | AC_LINK_IFELSE( | ||
263 | [AC_LANG_PROGRAM([[ | ||
264 | #include <pthread.h> | ||
265 | ]], | ||
266 | [[ | ||
267 | pthread_create(NULL, NULL, NULL, NULL); | ||
268 | ]])], | ||
269 | [have_gl_pt="yes"], | ||
270 | [have_gl_pt="no"]) | ||
271 | CFLAGS=${CFLAGS_save} | ||
272 | LIBS=${LIBS_save} | ||
273 | AC_MSG_RESULT([${have_gl_pt}]) | ||
274 | |||
275 | if test "x$have_gl_pt" = "xyes" ; then | ||
276 | gl_pt_lib=" -pthread" | ||
277 | fi | ||
278 | |||
279 | AC_CHECK_HEADER([GL/gl.h], | ||
280 | [have_dep="yes"], | ||
281 | [have_dep="no"], | ||
282 | [ | ||
283 | #include <GL/gl.h> | ||
284 | #include <GL/glext.h> | ||
285 | ]) | ||
286 | |||
287 | if test "x${with_opengl}" = "xes" ; then | ||
288 | have_dep=no | ||
289 | fi | ||
290 | |||
291 | if test "x${have_dep}" = "xyes" ; then | ||
292 | evas_engine_[]$1[]_libs="${evas_engine_[]$1[]_libs} -lGL -lm $gl_pt_lib" | ||
293 | evas_engine_gl_common_libs="-lGL -lm $gl_pt_lib" | ||
294 | else | ||
295 | AC_CHECK_HEADER([SDL2/SDL_opengles.h], | ||
296 | [have_egl="yes"], | ||
297 | [have_egl="no"], | ||
298 | [ | ||
299 | #include <SDL2/SDL_opengles.h> | ||
300 | #include <EGL/egl.h> | ||
301 | ]) | ||
302 | if test "x${have_egl}" = "xyes" ; then | ||
303 | AC_CHECK_LIB(GLESv2, glTexImage2D, [have_glesv2="yes"], , -lEGL -lm $gl_pt_lib) | ||
304 | if test "x${have_glesv2}" = "xyes" ; then | ||
305 | evas_engine_[]$1[]_libs="${evas_engine_[]$1[]_libs} -lGLESv2 -lEGL -lm $gl_pt_lib" | ||
306 | evas_engine_gl_common_libs="-lGLESv2 -lm $gl_pt_lib" | ||
307 | have_dep="yes" | ||
308 | AC_DEFINE(GLES_VARIETY_SGX, 1, [Imagination SGX GLES2 support]) | ||
309 | gles_variety_sgx="yes" | ||
310 | fi | ||
311 | fi | ||
312 | fi | ||
313 | |||
314 | AC_SUBST([evas_engine_$1_cflags]) | ||
315 | AC_SUBST([evas_engine_$1_libs]) | ||
316 | |||
317 | if test "x$3" = "xstatic" ; then | ||
318 | requirement_evas="${requirement} ${requirement_evas}" | ||
319 | fi | ||
320 | |||
321 | AS_IF([test "x${have_dep}" = "xyes"], [$4], [$5]) | ||
322 | |||
323 | ]) | ||
324 | |||
325 | |||
326 | dnl use: EVAS_CHECK_ENGINE_DEP_WAYLAND_SHM(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
327 | |||
328 | AC_DEFUN([EVAS_CHECK_ENGINE_DEP_WAYLAND_SHM], | ||
329 | [ | ||
330 | |||
331 | requirement="" | ||
332 | have_dep="no" | ||
333 | evas_engine_[]$1[]_cflags="" | ||
334 | evas_engine_[]$1[]_libs="" | ||
335 | |||
336 | PKG_CHECK_EXISTS([wayland-client >= REQUIRED_WAYLAND_VERSION], | ||
337 | [ | ||
338 | have_dep="yes" | ||
339 | requirement="wayland-client" | ||
340 | ], | ||
341 | [have_dep="no"]) | ||
342 | |||
343 | if test "x${have_dep}" = "xyes" ; then | ||
344 | if test "x$3" = "xstatic" ; then | ||
345 | requirements_pc_evas="${requirement} ${requirements_pc_evas}" | ||
346 | requirements_pc_deps_evas="${requirement} ${requirements_pc_deps_evas}" | ||
347 | else | ||
348 | PKG_CHECK_MODULES([WAYLAND_SHM], [${requirement}]) | ||
349 | evas_engine_[]$1[]_cflags="${WAYLAND_SHM_CFLAGS}" | ||
350 | evas_engine_[]$1[]_libs="${WAYLAND_SHM_LIBS}" | ||
351 | fi | ||
352 | fi | ||
353 | |||
354 | AC_SUBST([evas_engine_$1_cflags]) | ||
355 | AC_SUBST([evas_engine_$1_libs]) | ||
356 | |||
357 | AS_IF([test "x${have_dep}" = "xyes"], [$4], [$5]) | ||
358 | |||
359 | ]) | ||
360 | |||
361 | dnl use: EVAS_CHECK_ENGINE_DEP_WAYLAND_EGL(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
362 | |||
363 | AC_DEFUN([EVAS_CHECK_ENGINE_DEP_WAYLAND_EGL], | ||
364 | [ | ||
365 | |||
366 | requirement="" | ||
367 | have_dep="no" | ||
368 | evas_engine_[]$1[]_cflags="" | ||
369 | evas_engine_[]$1[]_libs="" | ||
370 | |||
371 | if test "x${with_opengl}" = "xes" ; then | ||
372 | gl_library="glesv2" | ||
373 | else | ||
374 | gl_library="gl" | ||
375 | fi | ||
376 | |||
377 | PKG_CHECK_EXISTS([egl ${gl_library} wayland-client >= REQUIRED_WAYLAND_VERSION wayland-egl], | ||
378 | [ | ||
379 | have_dep="yes" | ||
380 | requirement="egl ${gl_library} wayland-client wayland-egl" | ||
381 | ], | ||
382 | [have_dep="no"]) | ||
383 | |||
384 | if test "x${have_dep}" = "xyes" ; then | ||
385 | if test "${gl_library}" != "gl" ; then | ||
386 | have_egl="yes" | ||
387 | fi | ||
388 | if test "x$3" = "xstatic" ; then | ||
389 | requirements_pc_evas="${requirement} ${requirements_pc_evas}" | ||
390 | requirements_pc_deps_evas="${requirement} ${requirements_pc_deps_evas}" | ||
391 | else | ||
392 | PKG_CHECK_MODULES([WAYLAND_EGL], [${requirement}]) | ||
393 | evas_engine_[]$1[]_cflags="${WAYLAND_EGL_CFLAGS}" | ||
394 | evas_engine_[]$1[]_libs="${WAYLAND_EGL_LIBS}" | ||
395 | evas_engine_gl_common_libs="$evas_engine_[]$1[]_libdirs -lGLESv2 -lm -lEGL" | ||
396 | fi | ||
397 | fi | ||
398 | |||
399 | AC_SUBST([evas_engine_$1_cflags]) | ||
400 | AC_SUBST([evas_engine_$1_libs]) | ||
401 | |||
402 | AS_IF([test "x${have_dep}" = "xyes"], [$4], [$5]) | ||
403 | |||
404 | ]) | ||
405 | |||
406 | |||
407 | dnl use: EVAS_CHECK_ENGINE_DEP_DRM(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
408 | |||
409 | AC_DEFUN([EVAS_CHECK_ENGINE_DEP_DRM], | ||
410 | [ | ||
411 | |||
412 | requirement="" | ||
413 | have_dep="no" | ||
414 | have_hw_dep="no" | ||
415 | evas_engine_[]$1[]_cflags="" | ||
416 | evas_engine_[]$1[]_libs="" | ||
417 | |||
418 | PKG_CHECK_EXISTS([libdrm], | ||
419 | [ | ||
420 | have_dep="yes" | ||
421 | requirement="libdrm" | ||
422 | ], [have_dep="no"]) | ||
423 | |||
424 | if test "x${have_dep}" = "xyes" ; then | ||
425 | if test "x$3" = "xstatic" ; then | ||
426 | requirements_pc_evas="${requirement} ${requirements_pc_evas}" | ||
427 | requirements_pc_deps_evas="${requirement} ${requirements_pc_deps_evas}" | ||
428 | else | ||
429 | PKG_CHECK_MODULES([DRM], [${requirement}]) | ||
430 | evas_engine_[]$1[]_cflags="${DRM_CFLAGS}" | ||
431 | evas_engine_[]$1[]_libs="${DRM_LIBS}" | ||
432 | fi | ||
433 | fi | ||
434 | |||
435 | AC_SUBST([evas_engine_$1_cflags]) | ||
436 | AC_SUBST([evas_engine_$1_libs]) | ||
437 | |||
438 | AS_IF([test "x${have_dep}" = "xyes"], [$4], [$5]) | ||
439 | |||
440 | ]) | ||
441 | |||
442 | dnl use: EVAS_CHECK_ENGINE_DEP_GL_DRM(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
443 | |||
444 | AC_DEFUN([EVAS_CHECK_ENGINE_DEP_GL_DRM], | ||
445 | [ | ||
446 | |||
447 | requirement="" | ||
448 | have_dep="no" | ||
449 | have_hw_dep="no" | ||
450 | evas_engine_[]$1[]_cflags="" | ||
451 | evas_engine_[]$1[]_libs="" | ||
452 | |||
453 | if test "x${with_opengl}" = "xes" ; then | ||
454 | gl_library="glesv2" | ||
455 | else | ||
456 | AC_MSG_ERROR([We currently do not support GL DRM without OpenGL ES. Please consider OpenGL ES if you want to use it.]) | ||
457 | fi | ||
458 | |||
459 | PKG_CHECK_EXISTS([egl ${gl_library} libdrm gbm wayland-client >= REQUIRED_WAYLAND_VERSION], | ||
460 | [ | ||
461 | have_dep="yes" | ||
462 | requirement="egl ${gl_library} libdrm gbm wayland-client >= REQUIRED_WAYLAND_VERSION" | ||
463 | ], | ||
464 | [have_dep="no"]) | ||
465 | |||
466 | if test "x${have_dep}" = "xyes" ; then | ||
467 | if test "x$3" = "xstatic" ; then | ||
468 | requirements_pc_evas="${requirement} ${requirements_pc_evas}" | ||
469 | requirements_pc_deps_evas="${requirement} ${requirements_pc_deps_evas}" | ||
470 | else | ||
471 | PKG_CHECK_MODULES([GL_DRM], [${requirement}]) | ||
472 | evas_engine_[]$1[]_cflags="${GL_DRM_CFLAGS}" | ||
473 | evas_engine_[]$1[]_libs="${GL_DRM_LIBS}" | ||
474 | evas_engine_gl_common_libs="$evas_engine_[]$1[]_libdirs -lGLESv2 -lm -lEGL" | ||
475 | fi | ||
476 | fi | ||
477 | |||
478 | AC_SUBST([evas_engine_$1_cflags]) | ||
479 | AC_SUBST([evas_engine_$1_libs]) | ||
480 | |||
481 | AS_IF([test "x${have_dep}" = "xyes"], [$4], [$5]) | ||
482 | |||
483 | ]) | ||
484 | |||
485 | dnl use: EVAS_CHECK_ENGINE_DEP_EGLFS(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
486 | |||
487 | AC_DEFUN([EVAS_CHECK_ENGINE_DEP_EGLFS], | ||
488 | [ | ||
489 | |||
490 | requirement="" | ||
491 | have_dep="no" | ||
492 | have_hw_dep="no" | ||
493 | evas_engine_[]$1[]_cflags="" | ||
494 | evas_engine_[]$1[]_libs="" | ||
495 | |||
496 | if test "x${with_opengl}" = "xes" ; then | ||
497 | gl_library="glesv2" | ||
498 | else | ||
499 | AC_MSG_ERROR([We do not support Eglfs without OpenGL ES. Please consider OpenGL ES if you want to use it.]) | ||
500 | fi | ||
501 | |||
502 | PKG_CHECK_EXISTS([egl >= 7.10 ${gl_library}], | ||
503 | [ | ||
504 | have_dep="yes" | ||
505 | requirement="egl >= 7.10 ${gl_library}" | ||
506 | ], | ||
507 | [have_dep="no"]) | ||
508 | |||
509 | if test "x${have_dep}" = "xyes" ; then | ||
510 | if test "x$3" = "xstatic" ; then | ||
511 | requirements_pc_evas="${requirement} ${requirements_pc_evas}" | ||
512 | requirements_pc_deps_evas="${requirement} ${requirements_pc_deps_evas}" | ||
513 | else | ||
514 | PKG_CHECK_MODULES([EGLFS], [${requirement}]) | ||
515 | evas_engine_[]$1[]_cflags="${EGLFS_CFLAGS}" | ||
516 | evas_engine_[]$1[]_libs="${EGLFS_LIBS}" | ||
517 | evas_engine_gl_common_libs="$evas_engine_[]$1[]_libdirs -lGLESv2 -lm -lEGL" | ||
518 | fi | ||
519 | fi | ||
520 | |||
521 | AC_SUBST([evas_engine_$1_cflags]) | ||
522 | AC_SUBST([evas_engine_$1_libs]) | ||
523 | |||
524 | AS_IF([test "x${have_dep}" = "xyes"], [$4], [$5]) | ||
525 | |||
526 | ]) | ||
527 | |||
528 | |||
529 | dnl use: EVAS_ENGINE(name, want_engine, [DEPENDENCY-CHECK-CODE]) | ||
530 | dnl | ||
531 | dnl defines BUILD_ENGINE_NAME if it should be built | ||
532 | dnl defines BUILD_STATIC_BUILD_NAME if should be built statically | ||
533 | dnl | ||
534 | dnl will call DEPENDENCY-CHECK-CODE if it should be built, | ||
535 | dnl if some dependency fail just call AC_MSG_ERROR() to abort. | ||
536 | |||
537 | AC_DEFUN([EVAS_ENGINE], | ||
538 | [dnl | ||
539 | m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl | ||
540 | m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl | ||
541 | |||
542 | want_engine="$2" | ||
543 | want_static_engine="no" | ||
544 | have_engine="no" | ||
545 | have_evas_engine_[]DOWN="no" | ||
546 | |||
547 | evas_engine_[]m4_defn([DOWN])[]_cflags="" | ||
548 | evas_engine_[]m4_defn([DOWN])[]_libs="" | ||
549 | |||
550 | if test "x${want_engine}" = "xyes" -o "x${want_engine}" = "xstatic"; then | ||
551 | $3 | ||
552 | |||
553 | have_engine="yes" | ||
554 | if test "x${want_engine}" = "xstatic" ; then | ||
555 | have_evas_engine_[]DOWN="static" | ||
556 | want_static_engine="yes" | ||
557 | else | ||
558 | have_evas_engine_[]DOWN="yes" | ||
559 | fi | ||
560 | fi | ||
561 | |||
562 | AC_DEFINE_IF(BUILD_ENGINE_[]UP, [test "${have_engine}" = "yes"], | ||
563 | [1], [Build $1 Evas engine]) | ||
564 | AM_CONDITIONAL(BUILD_ENGINE_[]UP, [test "${have_engine}" = "yes"]) | ||
565 | |||
566 | AC_DEFINE_IF(EVAS_STATIC_BUILD_[]UP, [test "${want_static_engine}" = "yes"], | ||
567 | [1], [Build $1 Evas engine inside libevas]) | ||
568 | AM_CONDITIONAL(EVAS_STATIC_BUILD_[]UP, [test "${want_static_engine}" = "yes"]) | ||
569 | |||
570 | AC_SUBST([evas_engine_]m4_defn([DOWN])[_cflags]) | ||
571 | AC_SUBST([evas_engine_]m4_defn([DOWN])[_libs]) | ||
572 | |||
573 | EFL_ADD_FEATURE([EVAS_ENGINE], [$1], [${have_evas_engine_]DOWN[}])dnl | ||
574 | m4_popdef([UP])dnl | ||
575 | m4_popdef([DOWN])dnl | ||
576 | ]) | ||
577 | |||
578 | |||
579 | |||
580 | dnl use: EVAS_CHECK_ENGINE(engine, want_engine, simple, description) | ||
581 | AC_DEFUN([EVAS_CHECK_ENGINE], | ||
582 | [dnl | ||
583 | m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl | ||
584 | m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl | ||
585 | |||
586 | want_engine="$2" | ||
587 | want_static_engine="no" | ||
588 | have_engine="no" | ||
589 | have_evas_engine_[]DOWN="no" | ||
590 | |||
591 | AC_MSG_CHECKING([whether to enable $4 rendering backend]) | ||
592 | AC_MSG_RESULT([${want_engine}]) | ||
593 | |||
594 | if test "x${want_engine}" = "xyes" -o "x${want_engine}" = "xstatic"; then | ||
595 | m4_default([EVAS_CHECK_ENGINE_DEP_]m4_defn([UP]))(DOWN, $3, ${want_engine}, [have_engine="yes"], [have_engine="no"]) | ||
596 | fi | ||
597 | |||
598 | if test "x${have_engine}" = "xno" -a "x${want_engine}" = "xyes"; then | ||
599 | AC_MSG_ERROR([$4 dependencies not found]) | ||
600 | fi | ||
601 | |||
602 | AC_MSG_CHECKING([whether $4 rendering backend will be built]) | ||
603 | AC_MSG_RESULT([${have_engine}]) | ||
604 | |||
605 | if test "x${have_engine}" = "xyes" ; then | ||
606 | if test "x${want_engine}" = "xstatic" ; then | ||
607 | have_evas_engine_[]DOWN="static" | ||
608 | want_static_engine="yes" | ||
609 | else | ||
610 | have_evas_engine_[]DOWN="yes" | ||
611 | fi | ||
612 | fi | ||
613 | |||
614 | if test "x${have_engine}" = "xyes" ; then | ||
615 | AC_DEFINE(BUILD_ENGINE_[]UP, [1], [$4 rendering backend]) | ||
616 | fi | ||
617 | |||
618 | AM_CONDITIONAL(BUILD_ENGINE_[]UP, [test "x${have_engine}" = "xyes"]) | ||
619 | |||
620 | if test "x${want_static_engine}" = "xyes" ; then | ||
621 | AC_DEFINE(EVAS_STATIC_BUILD_[]UP, [1], [Build $1 engine inside libevas]) | ||
622 | have_static_module="yes" | ||
623 | fi | ||
624 | |||
625 | EFL_ADD_FEATURE([EVAS_ENGINE], [$1], [${have_evas_engine_]DOWN[}]) | ||
626 | AM_CONDITIONAL(EVAS_STATIC_BUILD_[]UP, [test "x${want_static_engine}" = "xyes"])dnl | ||
627 | m4_popdef([UP])dnl | ||
628 | m4_popdef([DOWN])dnl | ||
629 | ]) | ||
diff --git a/m4/evas_check_loader.m4 b/m4/evas_check_loader.m4 deleted file mode 100644 index ff48c3c388..0000000000 --- a/m4/evas_check_loader.m4 +++ /dev/null | |||
@@ -1,678 +0,0 @@ | |||
1 | |||
2 | dnl use: ARG_ENABLE_EVAS_VG_LOADER(loader, default_value) | ||
3 | |||
4 | AC_DEFUN([ARG_ENABLE_EVAS_VG_LOADER], | ||
5 | [dnl | ||
6 | m4_pushdef([DOWN], m4_tolower([$1]))dnl | ||
7 | |||
8 | AC_ARG_ENABLE([vg-loader-[]DOWN], | ||
9 | [AC_HELP_STRING([--enable-vg-loader-[]DOWN], [enable $1 vg loader. @<:@default=$2@:>@])], | ||
10 | [ | ||
11 | if test "x${enableval}" = "xyes" ; then | ||
12 | want_evas_vg_loader_[]DOWN="yes" | ||
13 | else | ||
14 | if test "x${enableval}" = "xstatic" ; then | ||
15 | want_evas_vg_loader_[]DOWN="static" | ||
16 | else | ||
17 | if test "x${enableval}" = "xauto" ; then | ||
18 | want_evas_vg_loader_[]DOWN="auto" | ||
19 | else | ||
20 | want_evas_vg_loader_[]DOWN="no" | ||
21 | fi | ||
22 | fi | ||
23 | fi | ||
24 | ], | ||
25 | [want_evas_vg_loader_[]DOWN="$2"]) | ||
26 | m4_popdef([DOWN])dnl | ||
27 | ]) | ||
28 | |||
29 | dnl use: EVAS_CHECK_VG_LOADER_DEP_SVG(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
30 | |||
31 | AC_DEFUN([EVAS_CHECK_VG_LOADER_DEP_SVG], | ||
32 | [ | ||
33 | |||
34 | have_dep="yes" | ||
35 | evas_vg_loader_[]$1[]_cflags="" | ||
36 | evas_vg_loader_[]$1[]_libs="" | ||
37 | |||
38 | AC_SUBST([evas_vg_loader_$1_cflags]) | ||
39 | AC_SUBST([evas_vg_loader_$1_libs]) | ||
40 | |||
41 | AS_IF([test "x${have_dep}" = "xyes"], [$3], [$4]) | ||
42 | |||
43 | ]) | ||
44 | |||
45 | dnl use: EVAS_CHECK_VG_LOADER_DEP_EET(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
46 | |||
47 | AC_DEFUN([EVAS_CHECK_VG_LOADER_DEP_EET], | ||
48 | [ | ||
49 | |||
50 | have_dep="yes" | ||
51 | evas_vg_loader_[]$1[]_cflags="" | ||
52 | evas_vg_loader_[]$1[]_libs="" | ||
53 | |||
54 | AC_SUBST([evas_vg_loader_$1_cflags]) | ||
55 | AC_SUBST([evas_vg_loader_$1_libs]) | ||
56 | |||
57 | AS_IF([test "x${have_dep}" = "xyes"], [$3], [$4]) | ||
58 | |||
59 | ]) | ||
60 | |||
61 | dnl use: ARG_ENABLE_EVAS_IMAGE_LOADER(loader, default_value) | ||
62 | |||
63 | AC_DEFUN([ARG_ENABLE_EVAS_IMAGE_LOADER], | ||
64 | [dnl | ||
65 | m4_pushdef([DOWN], m4_tolower([$1]))dnl | ||
66 | |||
67 | AC_ARG_ENABLE([image-loader-[]DOWN], | ||
68 | [AC_HELP_STRING([--enable-image-loader-[]DOWN], [enable $1 image loader. @<:@default=$2@:>@])], | ||
69 | [ | ||
70 | if test "x${enableval}" = "xyes" ; then | ||
71 | want_evas_image_loader_[]DOWN="yes" | ||
72 | else | ||
73 | if test "x${enableval}" = "xstatic" ; then | ||
74 | want_evas_image_loader_[]DOWN="static" | ||
75 | else | ||
76 | if test "x${enableval}" = "xauto" ; then | ||
77 | want_evas_image_loader_[]DOWN="auto" | ||
78 | else | ||
79 | want_evas_image_loader_[]DOWN="no" | ||
80 | fi | ||
81 | fi | ||
82 | fi | ||
83 | ], | ||
84 | [want_evas_image_loader_[]DOWN="$2"]) | ||
85 | m4_popdef([DOWN])dnl | ||
86 | ]) | ||
87 | |||
88 | dnl use: EVAS_CHECK_LOADER_DEP_BMP(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
89 | |||
90 | AC_DEFUN([EVAS_CHECK_LOADER_DEP_BMP], | ||
91 | [ | ||
92 | |||
93 | have_dep="yes" | ||
94 | evas_image_loader_[]$1[]_cflags="" | ||
95 | evas_image_loader_[]$1[]_libs="" | ||
96 | |||
97 | AC_SUBST([evas_image_loader_$1_cflags]) | ||
98 | AC_SUBST([evas_image_loader_$1_libs]) | ||
99 | |||
100 | AS_IF([test "x${have_dep}" = "xyes"], [$3], [$4]) | ||
101 | |||
102 | ]) | ||
103 | |||
104 | dnl use: EVAS_CHECK_LOADER_DEP_DDS(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
105 | |||
106 | AC_DEFUN([EVAS_CHECK_LOADER_DEP_DDS], | ||
107 | [ | ||
108 | |||
109 | have_dep="yes" | ||
110 | evas_image_loader_[]$1[]_cflags="" | ||
111 | evas_image_loader_[]$1[]_libs="" | ||
112 | |||
113 | AC_SUBST([evas_image_loader_$1_cflags]) | ||
114 | AC_SUBST([evas_image_loader_$1_libs]) | ||
115 | |||
116 | AS_IF([test "x${have_dep}" = "xyes"], [$3], [$4]) | ||
117 | |||
118 | ]) | ||
119 | |||
120 | dnl use: EVAS_CHECK_LOADER_DEP_EET(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
121 | |||
122 | AC_DEFUN([EVAS_CHECK_LOADER_DEP_EET], | ||
123 | [ | ||
124 | |||
125 | requirement="" | ||
126 | have_dep="no" | ||
127 | evas_image_loader_[]$1[]_cflags="" | ||
128 | evas_image_loader_[]$1[]_libs="" | ||
129 | |||
130 | dnl Eet is required | ||
131 | have_dep="yes" | ||
132 | |||
133 | AC_SUBST([evas_image_loader_$1_cflags]) | ||
134 | AC_SUBST([evas_image_loader_$1_libs]) | ||
135 | |||
136 | AS_IF([test "x${have_dep}" = "xyes"], [$3], [$4]) | ||
137 | |||
138 | ]) | ||
139 | |||
140 | dnl use: EVAS_CHECK_LOADER_DEP_GENERIC(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
141 | |||
142 | AC_DEFUN([EVAS_CHECK_LOADER_DEP_GENERIC], | ||
143 | [ | ||
144 | |||
145 | have_dep="yes" | ||
146 | evas_image_loader_[]$1[]_cflags="" | ||
147 | evas_image_loader_[]$1[]_libs="" | ||
148 | |||
149 | AC_SUBST([evas_image_loader_$1_cflags]) | ||
150 | AC_SUBST([evas_image_loader_$1_libs]) | ||
151 | |||
152 | AS_IF([test "x${have_dep}" = "xyes"], [$3], [$4]) | ||
153 | |||
154 | ]) | ||
155 | |||
156 | dnl use: EVAS_CHECK_LOADER_DEP_GIF(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
157 | |||
158 | AC_DEFUN([EVAS_CHECK_LOADER_DEP_GIF], | ||
159 | [ | ||
160 | |||
161 | have_dep="no" | ||
162 | evas_image_loader_[]$1[]_cflags="" | ||
163 | evas_image_loader_[]$1[]_libs="" | ||
164 | |||
165 | AC_CHECK_HEADER([gif_lib.h], [have_dep="yes"]) | ||
166 | |||
167 | if test "x${have_dep}" = "xyes" ; then | ||
168 | AC_CHECK_LIB([gif], | ||
169 | [DGifOpenFileName], | ||
170 | [ | ||
171 | evas_image_loader_[]$1[]_libs="-lgif" | ||
172 | ], | ||
173 | [have_dep="no"] | ||
174 | ) | ||
175 | |||
176 | if test "x${have_dep}" = "xno" ; then | ||
177 | AC_CHECK_LIB([ungif], | ||
178 | [DGifOpenFileName], | ||
179 | [ | ||
180 | have_dep="yes" | ||
181 | evas_image_loader_[]$1[]_libs="-lungif" | ||
182 | ] | ||
183 | ) | ||
184 | fi | ||
185 | fi | ||
186 | |||
187 | if test "x$2" = "xstatic" && test "x${have_dep}" = "xyes" ; then | ||
188 | requirements_libs_evas="${evas_image_loader_[]$1[]_libs} ${requirements_libs_evas}" | ||
189 | fi | ||
190 | |||
191 | AC_SUBST([evas_image_loader_$1_cflags]) | ||
192 | AC_SUBST([evas_image_loader_$1_libs]) | ||
193 | |||
194 | AS_IF([test "x${have_dep}" = "xyes"], [$3], [$4]) | ||
195 | |||
196 | ]) | ||
197 | |||
198 | dnl use: EVAS_CHECK_LOADER_DEP_ICO(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
199 | |||
200 | AC_DEFUN([EVAS_CHECK_LOADER_DEP_ICO], | ||
201 | [ | ||
202 | |||
203 | have_dep="yes" | ||
204 | evas_image_loader_[]$1[]_cflags="" | ||
205 | evas_image_loader_[]$1[]_libs="" | ||
206 | |||
207 | AC_SUBST([evas_image_loader_$1_cflags]) | ||
208 | AC_SUBST([evas_image_loader_$1_libs]) | ||
209 | |||
210 | AS_IF([test "x${have_dep}" = "xyes"], [$3], [$4]) | ||
211 | |||
212 | ]) | ||
213 | |||
214 | dnl use: EVAS_CHECK_LOADER_DEP_JPEG(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
215 | |||
216 | AC_DEFUN([EVAS_CHECK_LOADER_DEP_JPEG], | ||
217 | [ | ||
218 | |||
219 | have_dep="no" | ||
220 | evas_image_loader_[]$1[]_cflags="" | ||
221 | evas_image_loader_[]$1[]_libs="" | ||
222 | |||
223 | AC_CHECK_HEADER([jpeglib.h], [have_dep="yes"]) | ||
224 | |||
225 | if test "x${have_dep}" = "xyes" ; then | ||
226 | AC_CHECK_LIB([jpeg], | ||
227 | [jpeg_CreateDecompress], | ||
228 | [ | ||
229 | evas_image_loader_[]$1[]_libs="-ljpeg" | ||
230 | AC_COMPILE_IFELSE( | ||
231 | [AC_LANG_PROGRAM( | ||
232 | [[ | ||
233 | #include <stdio.h> | ||
234 | #include <jpeglib.h> | ||
235 | #include <setjmp.h> | ||
236 | ]], | ||
237 | [[ | ||
238 | struct jpeg_decompress_struct decomp; | ||
239 | decomp.region_x = 0; | ||
240 | ]])], | ||
241 | [have_jpeg_region="yes"], | ||
242 | [have_jpeg_region="no"]) | ||
243 | ], | ||
244 | [have_dep="no"] | ||
245 | ) | ||
246 | if test "x${have_jpeg_region}" = "xyes" ; then | ||
247 | AC_DEFINE(BUILD_LOADER_JPEG_REGION, [1], [JPEG Region Decode Support]) | ||
248 | fi | ||
249 | fi | ||
250 | |||
251 | if test "x$2" = "xstatic" && test "x${have_dep}" = "xyes" ; then | ||
252 | requirements_libs_evas="${evas_image_loader_[]$1[]_libs} ${requirements_libs_evas}" | ||
253 | fi | ||
254 | |||
255 | AC_SUBST([evas_image_loader_$1_cflags]) | ||
256 | AC_SUBST([evas_image_loader_$1_libs]) | ||
257 | |||
258 | AS_IF([test "x${have_dep}" = "xyes"], [$3], [$4]) | ||
259 | |||
260 | ]) | ||
261 | |||
262 | dnl use: EVAS_CHECK_LOADER_DEP_JP2K(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
263 | |||
264 | AC_DEFUN([EVAS_CHECK_LOADER_DEP_JP2K], | ||
265 | [ | ||
266 | |||
267 | requirement="" | ||
268 | have_dep="no" | ||
269 | evas_image_loader_[]$1[]_cflags="" | ||
270 | evas_image_loader_[]$1[]_libs="" | ||
271 | |||
272 | PKG_CHECK_EXISTS([libopenjp2 >= 2.0], | ||
273 | [ | ||
274 | have_dep="yes" | ||
275 | requirement="libopenjp2 >= 2.0" | ||
276 | ], | ||
277 | [have_dep="no"]) | ||
278 | |||
279 | if test "x${have_dep}" = "xyes" ; then | ||
280 | if test "x$2" = "xstatic" ; then | ||
281 | requirements_pc_evas="${requirement} ${requirements_pc_evas}" | ||
282 | requirements_pc_deps_evas="${requirement} ${requirements_pc_deps_evas}" | ||
283 | fi | ||
284 | PKG_CHECK_MODULES([JP2K], [${requirement}]) | ||
285 | evas_image_loader_[]$1[]_cflags="${JP2K_CFLAGS}" | ||
286 | evas_image_loader_[]$1[]_libs="${JP2K_LIBS}" | ||
287 | fi | ||
288 | |||
289 | AC_SUBST([evas_image_loader_$1_cflags]) | ||
290 | AC_SUBST([evas_image_loader_$1_libs]) | ||
291 | |||
292 | AS_IF([test "x${have_dep}" = "xyes"], [$3], [$4]) | ||
293 | |||
294 | ]) | ||
295 | |||
296 | dnl use: EVAS_CHECK_LOADER_DEP_PMAPS(loader, want_static[[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
297 | |||
298 | AC_DEFUN([EVAS_CHECK_LOADER_DEP_PMAPS], | ||
299 | [ | ||
300 | |||
301 | have_dep="yes" | ||
302 | evas_image_loader_[]$1[]_cflags="" | ||
303 | evas_image_loader_[]$1[]_libs="" | ||
304 | |||
305 | AC_SUBST([evas_image_loader_$1_cflags]) | ||
306 | AC_SUBST([evas_image_loader_$1_libs]) | ||
307 | |||
308 | AS_IF([test "x${have_dep}" = "xyes"], [$3], [$4]) | ||
309 | |||
310 | ]) | ||
311 | |||
312 | dnl use: EVAS_CHECK_LOADER_DEP_PNG(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
313 | |||
314 | AC_DEFUN([EVAS_CHECK_LOADER_DEP_PNG], | ||
315 | [ | ||
316 | |||
317 | requirement="" | ||
318 | have_dep="no" | ||
319 | evas_image_loader_[]$1[]_cflags="" | ||
320 | evas_image_loader_[]$1[]_libs="" | ||
321 | |||
322 | dnl libpng.pc is the latest version of libpng that ahs been installed. | ||
323 | dnl We check it first. | ||
324 | PKG_CHECK_EXISTS([libpng >= 1.2.10], | ||
325 | [ | ||
326 | have_dep="yes" | ||
327 | requirement="libpng >= 1.2.10" | ||
328 | ], | ||
329 | [have_dep="no"]) | ||
330 | |||
331 | if test "x${have_dep}" = "xno" ; then | ||
332 | PKG_CHECK_EXISTS([libpng15], | ||
333 | [ | ||
334 | have_dep="yes" | ||
335 | requirement="libpng15" | ||
336 | ], | ||
337 | [have_dep="no"]) | ||
338 | fi | ||
339 | |||
340 | if test "x${have_dep}" = "xno" ; then | ||
341 | PKG_CHECK_EXISTS([libpng14], | ||
342 | [ | ||
343 | have_dep="yes" | ||
344 | requirement="libpng14" | ||
345 | ], | ||
346 | [have_dep="no"]) | ||
347 | fi | ||
348 | |||
349 | if test "x${have_dep}" = "xno" ; then | ||
350 | PKG_CHECK_EXISTS([libpng12 >= 1.2.10], | ||
351 | [ | ||
352 | have_dep="yes" | ||
353 | requirement="libpng12 >= 1.2.10" | ||
354 | ], | ||
355 | [have_dep="no"]) | ||
356 | fi | ||
357 | |||
358 | if test "x${have_dep}" = "xyes" ; then | ||
359 | if test "x$2" = "xstatic" ; then | ||
360 | requirements_pc_evas="${requirement} ${requirements_pc_evas}" | ||
361 | requirements_pc_deps_evas="${requirement} ${requirements_pc_deps_evas}" | ||
362 | fi | ||
363 | PKG_CHECK_MODULES([PNG], [${requirement}]) | ||
364 | evas_image_loader_[]$1[]_cflags="${PNG_CFLAGS}" | ||
365 | evas_image_loader_[]$1[]_libs="${PNG_LIBS}" | ||
366 | fi | ||
367 | |||
368 | AC_SUBST([evas_image_loader_$1_cflags]) | ||
369 | AC_SUBST([evas_image_loader_$1_libs]) | ||
370 | |||
371 | AS_IF([test "x${have_dep}" = "xyes"], [$3], [$4]) | ||
372 | |||
373 | ]) | ||
374 | |||
375 | dnl use: EVAS_CHECK_LOADER_DEP_PSD(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
376 | |||
377 | AC_DEFUN([EVAS_CHECK_LOADER_DEP_PSD], | ||
378 | [ | ||
379 | |||
380 | have_dep="yes" | ||
381 | evas_image_loader_[]$1[]_cflags="" | ||
382 | evas_image_loader_[]$1[]_libs="" | ||
383 | |||
384 | AC_SUBST([evas_image_loader_$1_cflags]) | ||
385 | AC_SUBST([evas_image_loader_$1_libs]) | ||
386 | |||
387 | AS_IF([test "x${have_dep}" = "xyes"], [$3], [$4]) | ||
388 | |||
389 | ]) | ||
390 | |||
391 | dnl use: EVAS_CHECK_LOADER_DEP_TGV(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
392 | |||
393 | AC_DEFUN([EVAS_CHECK_LOADER_DEP_TGV], | ||
394 | [ | ||
395 | |||
396 | have_dep="yes" | ||
397 | evas_image_loader_[]$1[]_cflags="" | ||
398 | evas_image_loader_[]$1[]_libs="" | ||
399 | |||
400 | AC_SUBST([evas_image_loader_$1_cflags]) | ||
401 | AC_SUBST([evas_image_loader_$1_libs]) | ||
402 | |||
403 | AS_IF([test "x${have_dep}" = "xyes"], [$3], [$4]) | ||
404 | |||
405 | ]) | ||
406 | |||
407 | dnl use: EVAS_CHECK_LOADER_DEP_SVG(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
408 | |||
409 | AC_DEFUN([EVAS_CHECK_LOADER_DEP_SVG], | ||
410 | [ | ||
411 | |||
412 | requirement="" | ||
413 | evas_image_loader_[]$1[]_cflags="" | ||
414 | evas_image_loader_[]$1[]_libs="" | ||
415 | version_esvg="0.0.18" | ||
416 | version_ender="0.0.6" | ||
417 | |||
418 | PKG_CHECK_EXISTS([esvg >= ${version_esvg} ender >= ${version_ender}], | ||
419 | [ | ||
420 | have_dep="yes" | ||
421 | requirement="esvg >= ${version_esvg} ender >= ${version_ender}" | ||
422 | ], | ||
423 | [have_dep="no"]) | ||
424 | |||
425 | if test "x${have_dep}" = "xyes" ; then | ||
426 | if test "x$2" = "xstatic" ; then | ||
427 | requirements_pc_evas="${requirement} ${requirements_pc_evas}" | ||
428 | requirements_pc_deps_evas="${requirement} ${requirements_pc_deps_evas}" | ||
429 | fi | ||
430 | PKG_CHECK_MODULES([SVG], [${requirement}]) | ||
431 | evas_image_loader_[]$1[]_cflags="${SVG_CFLAGS}" | ||
432 | evas_image_loader_[]$1[]_libs="${SVG_LIBS}" | ||
433 | fi | ||
434 | |||
435 | AC_SUBST([evas_image_loader_$1_cflags]) | ||
436 | AC_SUBST([evas_image_loader_$1_libs]) | ||
437 | |||
438 | AS_IF([test "x${have_dep}" = "xyes"], [$3], [$4]) | ||
439 | |||
440 | ]) | ||
441 | |||
442 | dnl use: EVAS_CHECK_LOADER_DEP_TGA(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
443 | |||
444 | AC_DEFUN([EVAS_CHECK_LOADER_DEP_TGA], | ||
445 | [ | ||
446 | |||
447 | have_dep="yes" | ||
448 | evas_image_loader_[]$1[]_cflags="" | ||
449 | evas_image_loader_[]$1[]_libs="" | ||
450 | |||
451 | AC_SUBST([evas_image_loader_$1_cflags]) | ||
452 | AC_SUBST([evas_image_loader_$1_libs]) | ||
453 | |||
454 | AS_IF([test "x${have_dep}" = "xyes"], [$3], [$4]) | ||
455 | |||
456 | ]) | ||
457 | |||
458 | dnl use: EVAS_CHECK_LOADER_DEP_TIFF(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
459 | |||
460 | AC_DEFUN([EVAS_CHECK_LOADER_DEP_TIFF], | ||
461 | [ | ||
462 | |||
463 | have_dep="no" | ||
464 | evas_image_loader_[]$1[]_cflags="" | ||
465 | evas_image_loader_[]$1[]_libs="" | ||
466 | |||
467 | AC_CHECK_HEADER([tiffio.h], [have_dep="yes"]) | ||
468 | |||
469 | if test "x${have_dep}" = "xyes" ; then | ||
470 | AC_CHECK_LIB([tiff], | ||
471 | [TIFFReadScanline], | ||
472 | [ | ||
473 | evas_image_loader_[]$1[]_libs="-ltiff" | ||
474 | ], | ||
475 | [have_dep="no"] | ||
476 | ) | ||
477 | |||
478 | if test "x${have_dep}" = "xno" ; then | ||
479 | AC_CHECK_LIB([tiff], | ||
480 | [TIFFReadScanline], | ||
481 | [ | ||
482 | have_dep="yes" | ||
483 | evas_image_loader_[]$1[]_libs="-ltiff -ljpeg -lz -lm" | ||
484 | ] | ||
485 | ) | ||
486 | fi | ||
487 | |||
488 | if test "x${have_dep}" = "xno" ; then | ||
489 | AC_CHECK_LIB([tiff34], | ||
490 | [TIFFReadScanline], | ||
491 | [ | ||
492 | have_dep="yes" | ||
493 | evas_image_loader_[]$1[]_libs="-ltiff34 -ljpeg -lz -lm" | ||
494 | ] | ||
495 | ) | ||
496 | fi | ||
497 | fi | ||
498 | |||
499 | if test "x$2" = "xstatic" && test "x${have_dep}" = "xyes" ; then | ||
500 | requirements_libs_evas="${evas_image_loader_[]$1[]_libs} ${requirements_libs_evas}" | ||
501 | fi | ||
502 | |||
503 | AC_SUBST([evas_image_loader_$1_cflags]) | ||
504 | AC_SUBST([evas_image_loader_$1_libs]) | ||
505 | |||
506 | AS_IF([test "x${have_dep}" = "xyes"], [$3], [$4]) | ||
507 | |||
508 | ]) | ||
509 | |||
510 | dnl use: EVAS_CHECK_LOADER_DEP_WBMP(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
511 | |||
512 | AC_DEFUN([EVAS_CHECK_LOADER_DEP_WBMP], | ||
513 | [ | ||
514 | |||
515 | have_dep="yes" | ||
516 | evas_image_loader_[]$1[]_cflags="" | ||
517 | evas_image_loader_[]$1[]_libs="" | ||
518 | |||
519 | AC_SUBST([evas_image_loader_$1_cflags]) | ||
520 | AC_SUBST([evas_image_loader_$1_libs]) | ||
521 | |||
522 | AS_IF([test "x${have_dep}" = "xyes"], [$3], [$4]) | ||
523 | |||
524 | ]) | ||
525 | |||
526 | dnl use: EVAS_CHECK_LOADER_DEP_WEBP(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
527 | |||
528 | AC_DEFUN([EVAS_CHECK_LOADER_DEP_WEBP], | ||
529 | [ | ||
530 | |||
531 | have_dep="no" | ||
532 | evas_image_loader_[]$1[]_cflags="" | ||
533 | evas_image_loader_[]$1[]_libs="" | ||
534 | |||
535 | AC_CHECK_HEADER([webp/decode.h], [have_dep="yes"]) | ||
536 | |||
537 | if test "x${have_dep}" = "xyes" ; then | ||
538 | AC_CHECK_LIB([webp], | ||
539 | [WebPDecodeRGBA], | ||
540 | [ | ||
541 | evas_image_loader_[]$1[]_libs="-lwebp" | ||
542 | ], | ||
543 | [have_dep="no"] | ||
544 | ) | ||
545 | fi | ||
546 | |||
547 | if test "x$2" = "xstatic" && test "x${have_dep}" = "xyes" ; then | ||
548 | requirements_libs_evas="${evas_image_loader_[]$1[]_libs} ${requirements_libs_evas}" | ||
549 | fi | ||
550 | |||
551 | AC_SUBST([evas_image_loader_$1_cflags]) | ||
552 | AC_SUBST([evas_image_loader_$1_libs]) | ||
553 | |||
554 | AS_IF([test "x${have_dep}" = "xyes"], [$3], [$4]) | ||
555 | |||
556 | ]) | ||
557 | |||
558 | dnl use: EVAS_CHECK_LOADER_DEP_XPM(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) | ||
559 | |||
560 | AC_DEFUN([EVAS_CHECK_LOADER_DEP_XPM], | ||
561 | [ | ||
562 | |||
563 | have_dep="yes" | ||
564 | evas_image_loader_[]$1[]_cflags="" | ||
565 | evas_image_loader_[]$1[]_libs="" | ||
566 | |||
567 | AC_SUBST([evas_image_loader_$1_cflags]) | ||
568 | AC_SUBST([evas_image_loader_$1_libs]) | ||
569 | |||
570 | AS_IF([test "x${have_dep}" = "xyes"], [$3], [$4]) | ||
571 | |||
572 | ]) | ||
573 | |||
574 | dnl use: EVAS_CHECK_IMAGE_LOADER(loader, want_loader, macro) | ||
575 | AC_DEFUN([EVAS_CHECK_IMAGE_LOADER], | ||
576 | [dnl | ||
577 | m4_pushdef([UP], m4_toupper([$1]))dnl | ||
578 | m4_pushdef([DOWN], m4_tolower([$1]))dnl | ||
579 | |||
580 | want_loader="$2" | ||
581 | want_static_loader="no" |