summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2019-05-26 18:30:54 +0200
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-06-18 08:56:34 +0200
commit639869703f3e8b0ce34d83b523ff611e85cfd93b (patch)
treedc72c59b87a83d02758ae81f979a25e21b226a8b /m4
parent4f8e15c16c4f68b6fae8708b177ce672daefc59c (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')
-rw-r--r--m4/.gitignore36
-rw-r--r--m4/ac_define_if.m47
-rw-r--r--m4/ac_path_generic.m4137
-rw-r--r--m4/ax_cxx_compile_stdcxx_11.m4133
-rw-r--r--m4/ecore_check_c_extension.m425
-rw-r--r--m4/ecore_check_module.m435
-rw-r--r--m4/efl.m4509
-rw-r--r--m4/efl_attribute.m483
-rw-r--r--m4/efl_beta.m45
-rw-r--r--m4/efl_binary.m442
-rw-r--r--m4/efl_check_funcs.m4333
-rw-r--r--m4/efl_check_libs.m473
-rw-r--r--m4/efl_compiler.m490
-rw-r--r--m4/efl_define.m420
-rw-r--r--m4/efl_doxygen.m498
-rw-r--r--m4/efl_eo.m46
-rw-r--r--m4/efl_find_x.m4194
-rw-r--r--m4/efl_libunwind.m461
-rw-r--r--m4/efl_lua_old.m436
-rw-r--r--m4/efl_mono.m495
-rw-r--r--m4/efl_path_max.m436
-rw-r--r--m4/efl_pkg_config.m410
-rw-r--r--m4/efl_stdcxx_11.m4136
-rw-r--r--m4/efl_threads.m4163
-rw-r--r--m4/eina_check.m449
-rw-r--r--m4/eina_config.m48
-rw-r--r--m4/eio_check_options.m412
-rw-r--r--m4/elm_check_backend.m427
-rw-r--r--m4/elm_check_option.m460
-rw-r--r--m4/elm_quicklaunch.m424
-rw-r--r--m4/emotion_generic_players.m437
-rw-r--r--m4/emotion_module.m4133
-rw-r--r--m4/evas_check_engine.m4629
-rw-r--r--m4/evas_check_loader.m4678
-rw-r--r--m4/evil_windows.m453
-rw-r--r--m4/gcc_check_builtin.m413
-rw-r--r--m4/libgcrypt.m4123
-rw-r--r--m4/pkg_var.m414
38 files changed, 0 insertions, 4223 deletions
diff --git a/m4/.gitignore b/m4/.gitignore
deleted file mode 100644
index 53b4209..0000000
--- 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 961ca64..0000000
--- a/m4/ac_define_if.m4
+++ /dev/null
@@ -1,7 +0,0 @@
1dnl use: AC_DEFINE_IF(id, testcond, val, comment)
2AC_DEFUN([AC_DEFINE_IF],
3[
4if $2; then
5 AC_DEFINE($1, $3, $4)
6fi
7])
diff --git a/m4/ac_path_generic.m4 b/m4/ac_path_generic.m4
deleted file mode 100644
index d427241..0000000
--- a/m4/ac_path_generic.m4
+++ /dev/null
@@ -1,137 +0,0 @@
1dnl @synopsis AC_PATH_GENERIC(LIBRARY [, MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
2dnl
3dnl Runs a LIBRARY-config script and defines LIBRARY_CFLAGS and LIBRARY_LIBS
4dnl
5dnl The script must support `--cflags' and `--libs' args.
6dnl If MINIMUM-VERSION is specified, the script must also support the
7dnl `--version' arg.
8dnl If the `--with-library-[exec-]prefix' arguments to ./configure are given,
9dnl it must also support `--prefix' and `--exec-prefix'.
10dnl (In other words, it must be like gtk-config.)
11dnl
12dnl For example:
13dnl
14dnl AC_PATH_GENERIC(Foo, 1.0.0)
15dnl
16dnl would run `foo-config --version' and check that it is at least 1.0.0
17dnl
18dnl If so, the following would then be defined:
19dnl
20dnl FOO_CFLAGS to `foo-config --cflags`
21dnl FOO_LIBS to `foo-config --libs`
22dnl
23dnl At present there is no support for additional "MODULES" (see AM_PATH_GTK)
24dnl (shamelessly stolen from gtk.m4 and then hacked around a fair amount)
25dnl
26dnl @author Angus Lees <gusl@cse.unsw.edu.au>
27
28AC_DEFUN([AC_PATH_GENERIC],
29[dnl
30dnl we're going to need uppercase, lowercase and user-friendly versions of the
31dnl string `LIBRARY'
32pushdef([UP], translit([$1], [a-z], [A-Z]))dnl
33pushdef([DOWN], translit([$1], [A-Z], [a-z]))dnl
34
35dnl
36dnl Get the cflags and libraries from the LIBRARY-config script
37dnl
38AC_ARG_WITH(DOWN-prefix,
39 [ --with-]DOWN[-prefix=PFX Prefix where $1 is installed (optional)],
40 DOWN[]_config_prefix="$withval", DOWN[]_config_prefix="")
41AC_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 af37acd..0000000
--- 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
38m4_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
57AC_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 da4b44f..0000000
--- a/m4/ecore_check_c_extension.m4
+++ /dev/null
@@ -1,25 +0,0 @@
1dnl use: ECORE_CHECK_X_EXTENSION(Foo, header, lib, func)
2AC_DEFUN([ECORE_CHECK_X_EXTENSION],
3[
4pushdef([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
22ECORE_X_LIBS="${ECORE_X_LIBS} -l$3"
23
24popdef([UP])
25])
diff --git a/m4/ecore_check_module.m4 b/m4/ecore_check_module.m4
deleted file mode 100644
index 8fdec9b..0000000
--- a/m4/ecore_check_module.m4
+++ /dev/null
@@ -1,35 +0,0 @@
1dnl use: ECORE_EVAS_MODULE(name, want, [DEPENDENCY-CHECK-CODE])
2AC_DEFUN([ECORE_EVAS_MODULE],
3[dnl
4m4_pushdef([UP], m4_translit([[$1]], [-a-z], [_A-Z]))dnl
5m4_pushdef([DOWN], m4_translit([[$1]], [-A-Z], [_a-z]))dnl
6
7have_ecore_evas_[]m4_defn([DOWN])="no"
8want_module="$2"
9
10ecore_evas_engines_[]m4_defn([DOWN])[]_cflags=""
11ecore_evas_engines_[]m4_defn([DOWN])[]_libs=""
12
13if 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
26fi
27
28AC_SUBST([ecore_evas_engines_]m4_defn([DOWN])[_cflags])
29AC_SUBST([ecore_evas_engines_]m4_defn([DOWN])[_libs])
30
31EFL_ADD_FEATURE([ECORE_EVAS], [$1], [${want_module}])dnl
32AM_CONDITIONAL([BUILD_ECORE_EVAS_]UP, [test "x$have_ecore_evas_]m4_defn([DOWN])[" = "xyes"])dnl
33m4_popdef([UP])dnl
34m4_popdef([DOWN])dnl
35])
diff --git a/m4/efl.m4 b/m4/efl.m4
deleted file mode 100644
index a01c5b4..0000000
--- a/m4/efl.m4
+++ /dev/null
@@ -1,509 +0,0 @@
1dnl file to manage modules in efl
2
3dnl EFL_VERSION(major, minor, micro, release)
4dnl This setup EFL version information and should be called BEFORE AC_INIT().
5dnl
6dnl release parameter is 'dev' to use from SVN or libtool -release field.
7dnl It may be empty if not dev (svn/live build) and no -release is to be used.
8dnl
9dnl Examples:
10dnl EFL_VERSION(1, 7, 99, dev)
11dnl EFL_VERSION(1, 7, 99, ver-1234)
12dnl This will define couple of m4 symbols:
13dnl v_maj = given major number (first parameter)
14dnl v_min = given minor number (second parameter)
15dnl v_mic = given micro number (third parameter)
16dnl v_rev = if release, it's 0, otherwise it's dev_version.
17dnl v_rel = if release, it's -release followed by fourth parameter,
18dnl otherwise it's empty. (mostly for libtool)
19dnl efl_version = if release, it's major.minor.micro, otherwise it's
20dnl major.minor.micro.dev_version
21dnl dev_version = development version (svn revision).
22dnl def_build_profile = dev or release based on 'dev' release parameter.
23AC_DEFUN([EFL_VERSION],
24[dnl
25m4_define([v_maj], [$1])dnl
26m4_define([v_min], [$2])dnl
27m4_define([v_mic], [$3])dnl
28m4_define([dev_version], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || echo 0) | tr -d '\n']))dnl
29m4_define([v_rev], m4_if($4, dev, [dev_version], [0]))dnl
30m4_define([v_rel], [])dnl
31m4_define([def_build_profile], m4_if($4, dev, [dev], [release]))dnl
32m4_define([efl_version], m4_if($4, dev, [v_maj.v_min.v_mic.v_rev], [v_maj.v_min.v_mic]))dnl
33dnl m4_define([efl_version], [v_maj.v_min.v_mic])dnl
34])
35
36dnl EFL_COLOR
37dnl will check if terminal supports color and if color is wanted by user.
38dnl
39dnl Used Variables:
40dnl WANT_COLOR: if no, forces no color output.
41dnl TERM: used to check if color should be enabled.
42dnl
43dnl Defined Variables:
44dnl COLOR_YES: to be used in positive/yes conditions
45dnl COLOR_NO: to be used in negative/no conditions
46dnl COLOR_OTHER: to be used to highlight some other condition
47dnl COLOR_RESET: to reset color
48dnl want_color: yes or no
49AC_DEFUN([EFL_COLOR],
50[dnl
51case "$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 ;;
58esac
59
60### echo compatibility
61
62## the BSD echo does not have the -e option (it is the default behaviour)
63echo_e=
64if test "`echo -e x`" = "x"; then
65 echo_e=-e
66fi
67AC_SUBST([ECHO_E], [${echo_e}])
68
69if 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"`
74else
75 COLOR_YES=""
76 COLOR_NO=""
77 COLOR_OTHER=""
78 COLOR_RESET=""
79fi
80])
81
82dnl EFL_INIT()
83dnl Will AC_DEFINE() the following:
84dnl VMAJ = v_maj
85dnl VMIN = v_min
86dnl VMIC = v_mic
87dnl VREV = v_rev
88dnl Will AC_SUBST() the following:
89dnl VMAJ = v_maj
90dnl VMIN = v_min
91dnl VMIC = v_mic
92dnl EFL_LTLIBRARY_FLAGS="-no-undefined -version-info ..."
93dnl EFL_LTMODULE_FLAGS="-no-undefined -avoid-version"
94dnl Will define the following m4:
95dnl lt_cur = libtool 'current' field of libtool's -version-info
96dnl lt_rev = libtool 'revision' field of libtool's -version-info
97dnl lt_age = libtool 'age' field of libtool's -version-info
98AC_DEFUN([EFL_INIT],
99[dnl
100AC_REQUIRE([EFL_COLOR])dnl
101AC_DEFINE_UNQUOTED([VMAJ], [v_maj], [Major version])dnl
102AC_DEFINE_UNQUOTED([VMIN], [v_min], [Minor version])dnl
103AC_DEFINE_UNQUOTED([VMIC], [v_mic], [Micro version])dnl
104AC_DEFINE_UNQUOTED([VREV], [v_rev], [Revison])dnl
105VMAJ=v_maj
106VMIN=v_min
107VMIC=v_mic
108AC_SUBST([VMAJ])dnl
109AC_SUBST([VMIN])dnl
110AC_SUBST([VMIC])dnl
111dnl
112dnl TODO: warning - lt_cur:
113dnl the previous code assumed v_maj + v_min, but this will be a problem when
114dnl we bump v_maj and reset v_min. 1 + 7 == 7 + 1, so if v_maj is bumped
115dnl we multiply it by 100.
116m4_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
117m4_define([lt_rev], v_mic)dnl
118m4_define([lt_age], v_min)dnl
119dnl
120EFL_LTLIBRARY_FLAGS="-no-undefined -version-info lt_cur:lt_rev:lt_age v_rel"
121AC_SUBST(EFL_LTLIBRARY_FLAGS)dnl
122EFL_LTMODULE_FLAGS="-no-undefined -avoid-version"
123AC_SUBST([EFL_LTMODULE_FLAGS])dnl
124AC_MSG_NOTICE([Initialized AC_PACKAGE_NAME (AC_PACKAGE_VERSION) development=dev_version v_rel])
125])
126
127dnl EFL_EVAL_PKGS(EFL)
128dnl does PKG_CHECK_MODULES() for given EFL
129AC_DEFUN([EFL_EVAL_PKGS],
130[dnl
131m4_pushdef([DOWNEFL], m4_translit([$1], [-A-Z], [_a-z]))dnl
132if test "x${requirements_pc_deps_[]m4_defn([DOWNEFL])}" != "x"; then
133 PKG_CHECK_MODULES([$1], [${requirements_pc_deps_[]m4_defn([DOWNEFL])}])
134fi
135m4_popdef([DOWNEFL])dnl
136])
137
138dnl EFL_INTERNAL_DEPEND_PKG(EFL, OTHEREFL)
139dnl Adds a pkg-config dependency on another EFL.
140AC_DEFUN([EFL_INTERNAL_DEPEND_PKG],
141[dnl
142m4_pushdef([DOWNEFL], m4_translit([$1], [-A-Z], [_a-z]))dnl
143m4_pushdef([DOWNOTHER], m4_translit([$2], [-A-Z], [_a-z]))dnl
144dnl TODO: we need to fix the package config names for 2.0
145dnl TODO: and make them uniform in scheme.
146depname="$2"
147libdirname="m4_defn([DOWNOTHER])"
148libname="m4_defn([DOWNOTHER])"
149case "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 ;;
186esac
187requirements_pc_[]m4_defn([DOWNEFL])="${depname} >= ${PACKAGE_VERSION} ${requirements_pc_[][]m4_defn([DOWNEFL])}"
188requirements_cflags_[]m4_defn([DOWNEFL])="${requirements_cflags_[][]m4_defn([DOWNEFL])} -I\$(top_srcdir)/src/lib/${libdirname} -I\$(top_builddir)/src/lib/${libdirname}"
189requirements_internal_libs_[]m4_defn([DOWNEFL])="${requirements_internal_libs_[][]m4_defn([DOWNEFL])} lib/${libdirname}/lib${libname}.la"
190requirements_internal_deps_libs_[]m4_defn([DOWNEFL])="${requirements_internal_deps_libs_[][]m4_defn([DOWNEFL])} ${requirements_public_libs_[]m4_defn([DOWNOTHER])}"
191m4_popdef([DOWNOTHER])dnl
192m4_popdef([DOWNEFL])dnl
193])
194
195dnl EFL_PLATFORM_DEPEND(EFL, PLATFORM)
196dnl PLATFORM is one of: all, evil, escape, exotic
197AC_DEFUN([EFL_PLATFORM_DEPEND],
198[dnl
199m4_pushdef([DOWNOTHER], m4_translit([$2], [-A-Z], [_a-z]))dnl
200case "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 ;;
215esac
216m4_popdef([DOWNOTHER])dnl
217])
218
219dnl EFL_CRYPTO_DEPEND(EFL)
220dnl the given EFL will use/depend on system crypto settings
221AC_DEFUN([EFL_CRYPTO_DEPEND],
222[dnl
223m4_pushdef([DOWNEFL], m4_translit([$1], [-A-Z], [_a-z]))dnl
224requirements_pc_[]m4_defn([DOWNEFL])="${requirements_pc_[][]m4_defn([DOWNEFL])} ${requirements_pc_crypto}"
225requirements_pc_deps_[]m4_defn([DOWNEFL])="${requirements_pc_deps_[][]m4_defn([DOWNEFL])} ${requirements_pc_deps_crypto}"
226requirements_libs_[]m4_defn([DOWNEFL])="${requirements_libs_[][]m4_defn([DOWNEFL])} ${requirements_libs_crypto}"
227requirements_cflags_[]m4_defn([DOWNEFL])="${requirements_cflags_[][]m4_defn([DOWNEFL])} ${requirements_cflags_crypto}"
228m4_popdef([DOWNEFL])dnl
229])
230
231dnl EFL_DEPEND_PKG(EFL, NAME, PACKAGE, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
232dnl Adds a pkg-config dependency to an efl, AC_DEFINE() HAVE_NAME,
233dnl and inserts dependencies in proper variables
234AC_DEFUN([EFL_DEPEND_PKG],
235[dnl
236m4_pushdef([UPEFL], m4_translit([$1], [-a-z], [_A-Z]))dnl
237m4_pushdef([DOWNEFL], m4_translit([$1], [-A-Z], [_a-z]))dnl
238m4_pushdef([UPNAME], m4_translit([$2], [-a-z], [_A-Z]))dnl
239m4_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
253m4_popdef([DOWNNAME])
254m4_popdef([UPNAME])
255m4_popdef([DOWNEFL])
256m4_popdef([UPEFL])
257])
258
259dnl EFL_OPTIONAL_DEPEND_PKG(EFL, VARIABLE, NAME, PACKAGE, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
260AC_DEFUN([EFL_OPTIONAL_DEPEND_PKG],
261[dnl
262m4_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
268m4_popdef([DOWN])dnl
269])
270
271dnl EFL_OPTIONAL_INTERNAL_DEPEND_PKG(EFL, VARIABLE, NAME)
272AC_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
279dnl EFL_ADD_LIBS(PKG, LIBS)
280dnl Add libraries that the EFL library will depend on
281dnl See EFL_DEPEND_PKG() for pkg-config version.
282AC_DEFUN([EFL_ADD_LIBS],
283[dnl
284m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl
285requirements_libs_[]m4_defn([DOWN])="${requirements_libs_[]m4_defn([DOWN])} $2"
286m4_popdef([DOWN])dnl
287])
288
289dnl EFL_ADD_PUBLIC_LIBS(PKG, PUBLIC_LIBS)
290dnl Add libraries that the EFL library will depend on when used.
291dnl
292dnl Unlike EFL_ADD_LIBS(), that is only used when generating PKG,
293dnl this one is used when linking PKG to other libraries or applications.
294dnl
295dnl For instance if you use some other library in your header that user
296dnl inclues.
297AC_DEFUN([EFL_ADD_PUBLIC_LIBS],
298[dnl
299m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl
300requirements_public_libs_[]m4_defn([DOWN])="${requirements_public_libs_[]m4_defn([DOWN])} $2"
301m4_popdef([DOWN])dnl
302])
303
304dnl EFL_ADD_CFLAGS(PKG, CFLAGS)
305dnl Add CFLAGS that the EFL library will use
306dnl See EFL_DEPEND_PKG() for pkg-config version.
307AC_DEFUN([EFL_ADD_CFLAGS],
308[dnl
309m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl
310requirements_cflags_[]m4_defn([DOWN])="${requirements_cflags_[]m4_defn([DOWN])} $2"
311m4_popdef([DOWN])dnl
312])
313
314dnl EFL_LIB_START(PKG)
315dnl start the setup of an EFL library, defines variables and prints a notice
316dnl
317dnl Exports (AC_SUBST)
318dnl PKG_CFLAGS: what to use for CFLAGS
319dnl
320dnl PKG_LDFLAGS: what to use for LDFLAGS
321dnl
322dnl PKG_LIBS: what to use in automake's _LIBADD or _LDADD. Includes
323dnl everything else.
324dnl
325dnl PKG_INTERNAL_LIBS: all other EFL as lib/name/libname.la that this
326dnl package depend. Used in automake's _DEPENDENCIES.
327dnl
328dnl USE_PKG_LIBS: what to use in automake's _LIBADD or _LDADD when using
329dnl this PKG (PKG_LIBS + libpkg.la)
330dnl
331dnl USE_PKG_INTERNAL_LIBS: extends PKG_INTERNAL_LIBS with lib/pkg/libpkg.la
332dnl
333dnl requirements_pc_pkg: all pkg-config (pc) files used by this pkg,
334dnl includes internal EFL (used in 'Requires.private' in pkg.pc)
335dnl
336dnl requirements_libs_pkg: external libraries this package needs when
337dnl linking (used in 'Libs.private' in pkg.pc)
338dnl
339dnl requirements_public_libs_pkg: external libraries other packages need
340dnl when using this (used in 'Libs' in pkg.pc)
341dnl
342dnl requirements_cflags_pkg: what to use for CFLAGS (same as PKG_CFLAGS).
343dnl
344dnl Variables:
345dnl requirements_pc_deps_pkg: external pkg-config (pc) files used by this
346dnl pkg (used in EFL_EVAL_PKGS())
347dnl
348dnl requirements_internal_libs_pkg: all other EFL as lib/name/libname.la
349dnl that this package depend.
350dnl
351dnl requirements_internal_deps_libs_pkg: external libraries that are public
352dnl dependencies (due internal libs).
353dnl
354AC_DEFUN([EFL_LIB_START],
355[dnl
356m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl
357m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl
358
359requirements_internal_libs_[]m4_defn([DOWN])=""
360requirements_internal_deps_libs_[]m4_defn([DOWN])=""
361requirements_libs_[]m4_defn([DOWN])=""
362requirements_public_libs_[]m4_defn([DOWN])=""
363requirements_cflags_[]m4_defn([DOWN])=""
364requirements_pc_[]m4_defn([DOWN])=""
365requirements_pc_deps_[]m4_defn([DOWN])=""
366
367m4_defn([UP])_LIBS="${m4_defn([UP])_LIBS}"
368m4_defn([UP])_INTERNAL_LIBS="${m4_defn([UP])_INTERNAL_LIBS}"
369USE_[]m4_defn([UP])_LIBS="${USE_[]m4_defn([UP])_LIBS}"
370USE_[]m4_defn([UP])_INTERNAL_LIBS="${USE_[]m4_defn([UP])_INTERNAL_LIBS}"
371m4_defn([UP])_LDFLAGS="${m4_defn([UP])_LDFLAGS}"
372m4_defn([UP])_CFLAGS="${m4_defn([UP])_CFLAGS}"
373
374AC_SUBST([requirements_libs_]m4_defn([DOWN]))dnl
375AC_SUBST([requirements_public_libs_]m4_defn([DOWN]))dnl
376AC_SUBST([requirements_cflags_]m4_defn([DOWN]))dnl
377AC_SUBST([requirements_pc_]m4_defn([DOWN]))dnl
378AC_SUBST(m4_defn([UP])[_LIBS])dnl
379AC_SUBST(m4_defn([UP])[_INTERNAL_LIBS])dnl
380AC_SUBST([USE_]m4_defn([UP])[_LIBS])dnl
381AC_SUBST([USE_]m4_defn([UP])[_INTERNAL_LIBS])dnl
382AC_SUBST(m4_defn([UP])[_LDFLAGS])dnl
383AC_SUBST(m4_defn([UP])[_CFLAGS])dnl
384AC_MSG_NOTICE([Start $1 checks])dnl
385m4_popdef([UP])dnl
386m4_popdef([DOWN])dnl
387])
388
389dnl EFL_LIBS_SUBBUILD(TARGET, DEPENDENCIES)
390dnl Make TARGET contain all DEPENDENCIES relative to SUBDIR build
391AC_DEFUN([EFL_LIBS_SUBBUILD],
392[dnl
393$1=""
394_SUBDIR="../../"
395
396for 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}"
407done
408
409AC_SUBST([$1])
410])
411
412dnl EFL_LIB_END(PKG)
413dnl finishes the setup of an EFL library
414AC_DEFUN([EFL_LIB_END],
415[dnl
416m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl
417m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl
418
419libdirname="m4_defn([DOWN])"
420libname="m4_defn([DOWN])"
421
422m4_defn([UP])_LDFLAGS="${EFLALL_COV_LDFLAGS} ${EFLALL_LDFLAGS} ${m4_defn([UP])_LDFLAGS}"
423m4_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} "
424m4_defn([UP])_INTERNAL_LIBS="${m4_defn([UP])_INTERNAL_LIBS} ${requirements_internal_libs_[]m4_defn([DOWN])}"
425USE_[]m4_defn([UP])_LIBS="${m4_defn([UP])_LIBS} lib/${libdirname}/lib${libname}.la"
426USE_[]m4_defn([UP])_INTERNAL_LIBS="${m4_defn([UP])_INTERNAL_LIBS} lib/${libdirname}/lib${libname}.la"
427m4_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}"
428requirements_pc_[]m4_defn([DOWN])="${requirements_pc_[]m4_defn([DOWN])} ${requirements_pc_eflall}"
429requirements_pc_deps_[]m4_defn([DOWN])="${requirements_pc_deps_[]m4_defn([DOWN])} ${requirements_pc_deps_eflall}"
430
431EFL_LIBS_SUBBUILD(m4_defn([UP])_SUBBUILD_LIBS, ${m4_defn([UP])_LIBS})
432EFL_LIBS_SUBBUILD(m4_defn([UP])_SUBBUILD_INTERNAL_LIBS, ${m4_defn([UP])_INTERNAL_LIBS})
433EFL_LIBS_SUBBUILD(USE_[]m4_defn([UP])_SUBBUILD_LIBS, "USE_[]m4_defn([UP])_LIBS")
434
435AC_MSG_NOTICE([Finished $1 checks])dnl
436m4_popdef([UP])dnl
437m4_popdef([DOWN])dnl
438])
439
440dnl EFL_LIB_START_OPTIONAL(PKG, TEST)
441dnl test if library should be build and then EFL_LIB_START()
442dnl must call EFL_LIB_END_OPTIONAL() to close it.
443AC_DEFUN([EFL_LIB_START_OPTIONAL],
444[dnl
445m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl
446m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl
447
448if $2; then
449 efl_lib_optional_[]m4_defn([DOWN])="yes"
450else
451 efl_lib_optional_[]m4_defn([DOWN])="no"
452 AC_MSG_NOTICE([Skipping $1 checks (disabled)])
453fi
454
455if 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])
458dnl closed at EFL_LIB_END_OPTIONAL()
459m4_popdef([UP])dnl
460m4_popdef([DOWN])dnl
461])
462
463dnl EFL_LIB_END_OPTIONAL(PKG)
464dnl closes block started by EFL_LIB_START_OPTIONAL() and then
465dnl defines AM_CONDITIONAL([HAVE_PKG]) and AC_DEFINE([HAVE_PKG])
466AC_DEFUN([EFL_LIB_END_OPTIONAL],
467[dnl
468m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl
469m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl
470
471dnl close if started at EFL_LIB_START_OPTIONAL()
472 EFL_LIB_END([$1])
473fi
474
475AM_CONDITIONAL([HAVE_]m4_defn([UP]), [test "$efl_lib_optional_[]m4_defn([DOWN])" = "yes"])dnl
476m4_popdef([UP])dnl
477m4_popdef([DOWN])dnl
478])
479
480dnl EFL_ADD_FEATURE(PKG, NAME, [VALUE])
481dnl if VALUE is not specified, will use ${have_name} instead.
482dnl
483dnl Defined Variables:
484dnl features_pkg
485AC_DEFUN([EFL_ADD_FEATURE],
486[dnl
487m4_pushdef([DOWNPKG], m4_translit([$1], [-A-Z], [_a-z]))dnl
488m4_pushdef([DOWNNAME], m4_translit([$2], [-A-Z], [_a-z]))dnl
489
490value="m4_if($3, , [${have_]m4_defn([DOWNNAME])[:-${want_]m4_defn([DOWNNAME])[}}], [$3])"
491case "${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 ;;
501esac
502if test -z "${features_[]m4_defn([DOWNPKG])}"; then
503 features_[]m4_defn([DOWNPKG])="${tmp}"
504else
505 features_[]m4_defn([DOWNPKG])="${features_[]m4_defn([DOWNPKG])} ${tmp}"
506fi
507m4_popdef([DOWNNAME])dnl
508m4_popdef([DOWNPKG])dnl
509])
diff --git a/m4/efl_attribute.m4 b/m4/efl_attribute.m4
deleted file mode 100644
index 4f31d93..0000000
--- a/m4/efl_attribute.m4
+++ /dev/null
@@ -1,83 +0,0 @@
1dnl Copyright (C) 2011 Vincent Torri <vtorri at univ-evry dot fr>
2dnl That code is public domain and can be freely used or copied.
3
4dnl Macros for checking if the compiler supports some __attribute__ uses
5
6dnl Usage: EFL_ATTRIBUTE_VECTOR
7dnl call AC_DEFINE for HAVE_GCC_ATTRIBUTE_VECTOR if __attribute__((vector)) is available
8
9AC_DEFUN([EFL_ATTRIBUTE_VECTOR],
10[
11AC_MSG_CHECKING([for __attribute__ ((vector))])
12AC_COMPILE_IFELSE(
13 [AC_LANG_PROGRAM(
14 [[
15typedef int v4si __attribute__ ((vector_size (16)));
16 ]],
17 [[
18if (sizeof(v4si) == 16)
19 return 0;
20else
21 return -1;
22 ]])],
23 [have_attribute_vector="yes"],
24 [have_attribute_vector="no"])
25AC_MSG_RESULT([${have_attribute_vector}])
26
27if test "x${have_attribute_vector}" = "xyes" ; then
28 AC_DEFINE([HAVE_GCC_ATTRIBUTE_VECTOR], [1], [Define to 1 if your compiler supports __attribute__ ((vector)).])
29fi
30])
31
32dnl Usage: EFL_ATTRIBUTE_ALWAYS_INLINE
33dnl call AC_DEFINE for alway_inline if __attribute__((always_inline)) is available
34
35AC_DEFUN([EFL_ATTRIBUTE_ALWAYS_INLINE],
36[
37
38have_attribute_forceinline="no"
39
40AC_MSG_CHECKING([for __forceinline])
41
42AC_COMPILE_IFELSE(
43 [AC_LANG_PROGRAM(
44 [[
45#include <windows.h>
46static __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
56AC_MSG_RESULT([${have_attribute_always_inline}])
57
58if 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 [[
63static __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}])
70fi
71
72if 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
78else
79 AC_DEFINE([EFL_ALWAYS_INLINE], [static inline], [Macro declaring a function to always be inlined.])
80fi
81])
82
83dnl End of efl_attribute.m4
diff --git a/m4/efl_beta.m4 b/m4/efl_beta.m4
deleted file mode 100644
index c804729..0000000
--- a/m4/efl_beta.m4
+++ /dev/null
@@ -1,5 +0,0 @@
1dnl use: EFL_ENABLE_BETA_API_SUPPORT
2AC_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 d11e1db..0000000
--- a/m4/efl_binary.m4
+++ /dev/null
@@ -1,42 +0,0 @@
1dnl Usage: EFL_WITH_BIN_SUFFIX(package, binary, suffix)
2dnl Call AC_SUBST(_binary) (_binary is the lowercase of binary, - being transformed into _ by default, or the value set by the user)
3
4AC_DEFUN([EFL_WITH_BIN_SUFFIX],
5[
6
7m4_pushdef([DOWN], m4_translit([[$2]], [-A-Z], [_a-z]))dnl
8m4_pushdef([UP], m4_translit([[$2]], [-a-z], [_A-Z]))dnl
9dnl configure option
10
11_efl_with_binary=""
12_efl_binary_define="no"
13
14AC_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
21AC_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
29DOWN[]$3=${_efl_with_binary}
30AC_MSG_NOTICE(DOWN[ set to ${_efl_with_binary}])
31
32with_binary_[]m4_defn([DOWN])[]$3=${_efl_with_binary}
33
34AM_CONDITIONAL(HAVE_[]UP[]m4_translit([[$3]], [a-z], [A-Z]), [test "x${_efl_binary_define}" = "xyes"])
35AC_SUBST(DOWN[]$3)
36
37])
38
39dnl Usage: EFL_WITH_BIN(package, binary)
40dnl Call AC_SUBST(_binary) (_binary is the lowercase of binary, - being transformed into _ by default, or the value set by the user)
41
42AC_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 b44f20b..0000000
--- a/m4/efl_check_funcs.m4
+++ /dev/null
@@ -1,333 +0,0 @@
1dnl Copyright (C) 2012 Vincent Torri <vincent dot torri at gmail dot com>
2dnl This code is public domain and can be freely used or copied.
3
4dnl Macros that check functions availability for the EFL:
5
6dnl dirfd
7dnl dladdr
8dnl dlopen
9dnl fcntl
10dnl fnmatch
11dnl gettimeofday
12dnl iconv
13dnl setxattr (an al.)
14dnl shm_open
15
16dnl EFL_CHECK_LIB_CODE(EFL, LIB, VARIABLE, HEADER, BODY)
17dnl wrapper around AC_LINK_IFELSE(AC_LANG_PROGRAM()) to check
18dnl if some code would work with the given lib.
19dnl If the code work, EFL_ADD_LIBS(EFL, LIB) will be called
20dnl At the end VARIABLE will be "yes" or "no"
21AC_DEFUN([EFL_CHECK_LIB_CODE],
22[
23LIBS_save="${LIBS}"
24LIBS="${LIBS} $2"
25AC_LINK_IFELSE([AC_LANG_PROGRAM([$4], [$5])],
26 [EFL_ADD_LIBS([$1], [$2])
27 $3="yes"], [$3="no"])
28LIBS="${LIBS_save}"
29])
30
31dnl EFL_FIND_LIB_FOR_CODE(EFL, LIBS, VARIABLE, HEADER, BODY)
32AC_DEFUN([EFL_FIND_LIB_FOR_CODE],
33[
34dnl first try without lib (libc)
35EFL_CHECK_LIB_CODE([$1], [], [$3], [$4], [$5])
36
37if test "${$3}" = "no" && test "x$2" != "x"; then
38dnl 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
45fi
46])
47
48dnl _EFL_CHECK_FUNC_DIRFD is for internal use
49dnl _EFL_CHECK_FUNC_DIRFD(EFL, VARIABLE)
50
51AC_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
59dnl _EFL_CHECK_FUNC_DLADDR is for internal use
60dnl _EFL_CHECK_FUNC_DLADDR(EFL, VARIABLE)
61AC_DEFUN([_EFL_CHECK_FUNC_DLADDR],
62[
63dllibs=""
64case "$host_os" in
65 linux*)
66 dllibs="-ldl"
67 ;;
68 *)
69 ;;
70esac
71case "$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 ;;
84esac
85])
86
87dnl _EFL_CHECK_FUNC_DLOPEN is for internal use
88dnl _EFL_CHECK_FUNC_DLOPEN(EFL, VARIABLE)
89AC_DEFUN([_EFL_CHECK_FUNC_DLOPEN],
90[
91dllibs=""
92case "$host_os" in
93 linux*)
94 dllibs="-ldl"
95 ;;
96 *)
97 ;;
98esac
99case "$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 ;;
108esac
109])
110
111dnl _EFL_CHECK_FUNC_DLSYM is for internal use
112dnl _EFL_CHECK_FUNC_DLSYM(EFL, VARIABLE)
113AC_DEFUN([_EFL_CHECK_FUNC_DLSYM],
114[
115dllibs=""
116case "$host_os" in
117 linux*)
118 dllibs="-ldl"
119 ;;
120 *)
121 ;;
122esac
123case "$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 ;;
136esac
137])
138
139dnl _EFL_CHECK_FUNC_FCNTL is for internal use
140dnl _EFL_CHECK_FUNC_FCNTL(EFL, VARIABLE)
141AC_DEFUN([_EFL_CHECK_FUNC_FCNTL],
142[
143case "$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 ;;
152esac
153])
154
155dnl _EFL_CHECK_FUNC_FNMATCH is for internal use
156dnl _EFL_CHECK_FUNC_FNMATCH(EFL, VARIABLE)
157AC_DEFUN([_EFL_CHECK_FUNC_FNMATCH],
158[
159case "$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 ;;
169esac
170])
171
172dnl _EFL_CHECK_FUNC_SCHED_GETCPU is for internal use
173dnl _EFL_CHECK_FUNC_SCHED_GETCPU(EFL, VARIABLE)
174AC_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
181dnl _EFL_CHECK_FUNC_GETTIMEOFDAY is for internal use
182dnl _EFL_CHECK_FUNC_GETTIMEOFDAY(EFL, VARIABLE)
183AC_DEFUN([_EFL_CHECK_FUNC_GETTIMEOFDAY],
184[
185case "$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 ;;
204esac
205])
206
207dnl _EFL_CHECK_FUNC_ICONV is for internal use
208dnl _EFL_CHECK_FUNC_ICONV(EFL, VARIABLE)
209AC_DEFUN([_EFL_CHECK_FUNC_ICONV],
210[dnl
211AC_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
219if 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);]])
224fi
225])
226
227dnl _EFL_CHECK_FUNC_SETXATTR is for internal use
228dnl _EFL_CHECK_FUNC_SETXATTR(EFL, VARIABLE)
229AC_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]], [[
235size_t tmp = listxattr("/", NULL, 0);
236tmp = getxattr("/", "user.ethumb.md5", NULL, 0);
237setxattr("/", "user.ethumb.md5", NULL, 0, 0);
238]])
239
240if test "${$2}" = "yes"; then
241 AC_DEFINE([HAVE_XATTR], [1], [Define to 1 if you have the `listxattr', `setxattr' and `getxattr' functions.])
242fi
243])
244
245dnl _EFL_CHECK_FUNC_SHM_OPEN is for internal use
246dnl _EFL_CHECK_FUNC_SHM_OPEN(EFL, VARIABLE)
247AC_DEFUN([_EFL_CHECK_FUNC_SHM_OPEN],
248[
249shmlibs=""
250case "$host_os" in
251 linux*)
252 shmlibs="-lrt"
253 ;;
254 *)
255 ;;
256esac
257EFL_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]], [[
262int fd = shm_open("/dev/null", O_RDONLY, S_IRWXU | S_IRWXG | S_IRWXO);
263]])
264])
265
266dnl _EFL_CHECK_FUNC_SPLICE is for internal use
267dnl _EFL_CHECK_FUNC_SPLICE(EFL, VARIABLE)
268AC_DEFUN([_EFL_CHECK_FUNC_SPLICE],
269[EFL_FIND_LIB_FOR_CODE([$1], [], [$2], [[
270#include <unistd.h>
271#include <fcntl.h>
272]], [[
273long ret = splice(0, 0, 1, 0, 400, 0);
274]])
275])
276
277dnl _EFL_CHECK_FUNC_GETPAGESIZE is for internal use
278dnl _EFL_CHECK_FUNC_GETPAGESIZE(EFL, VARIABLE)
279AC_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[[
286long sz;
287sz = getpagesize();
288]])
289])
290
291dnl _EFL_CHECK_FUNC_PRCTL is for internal use
292dnl _EFL_CHECK_FUNC_PRCTL(EFL, VARIABLE)
293AC_DEFUN([_EFL_CHECK_FUNC_PRCTL],
294[EFL_FIND_LIB_FOR_CODE([$1], [], [$2], [[
295#include <sys/prctl.h>
296]],
297[[
298prctl(PR_SET_TIMERSLACK, 1, 0, 0, 0);
299]])
300])
301
302dnl Macro that checks function availability
303dnl
304dnl EFL_CHECK_FUNC(EFL, FUNCTION)
305dnl AC_SUBST : EFL_CFLAGS and EFL_LIBS (EFL being replaced by its value)
306dnl AC_DEFINE : HAVE_FUNCTION (FUNCTION being replaced by its value)
307dnl result in efl_func_function (function being replaced by its value)
308
309AC_DEFUN([EFL_CHECK_FUNC],
310[dnl
311m4_pushdef([UP], m4_translit([$2], [-a-z], [_A-Z]))dnl
312m4_pushdef([DOWN], m4_translit([$2], [-A-Z], [_a-z]))dnl
313
314m4_default([_EFL_CHECK_FUNC_]m4_defn([UP]))($1, [have_fct])
315AC_MSG_CHECKING([for $2])
316AC_MSG_RESULT([${have_fct}])
317
318if 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.])
320fi
321
322efl_func_[]m4_defn([DOWN])="${have_fct}"
323m4_popdef([DOWN])dnl
324m4_popdef([UP])dnl
325])
326
327dnl Macro that iterates over a sequence of space separated functions
328dnl and that calls EFL_CHECK_FUNC() for each of these functions
329dnl
330dnl EFL_CHECK_FUNCS(EFL, FUNCTIONS)
331
332AC_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 c64013b..0000000
--- a/m4/efl_check_libs.m4
+++ /dev/null
@@ -1,73 +0,0 @@
1dnl Copyright (C) 2012 Vincent Torri <vincent dot torri at gmail dot com>
2dnl This code is public domain and can be freely used or copied.
3
4dnl Macro that check dependencies libraries for the EFL:
5
6dnl libjpeg
7dnl zlib
8
9dnl _EFL_CHECK_LIB_LIBJPEG is for internal use
10dnl _EFL_CHECK_LIB_LIBJPEG(EFL)
11dnl it will abort (AC_MSG_ERROR) if libjpeg is not found.
12
13AC_DEFUN([_EFL_CHECK_LIB_LIBJPEG],
14[dnl
15EFL_CHECK_LIB_CODE([$1], [-ljpeg], [have_fct], [[
16#include <stdio.h>
17#include <jpeglib.h>
18]], [[
19struct jpeg_error_mgr er; void *error = jpeg_std_error(&er);
20]])
21
22if test "${have_fct}" = "no"; then
23 AC_MSG_ERROR([Cannot find libjpeg. Make sure your CFLAGS and LDFLAGS environment variable are set properly.])
24fi
25])
26
27dnl _EFL_CHECK_LIB_ZLIB is for internal use
28dnl _EFL_CHECK_LIB_ZLIB(EFL)
29dnl it will abort (AC_MSG_ERROR) if zlib is not found.
30
31AC_DEFUN([_EFL_CHECK_LIB_ZLIB],
32[dnl
33m4_pushdef([DOWNEFL], m4_translit([$1], [-A-Z], [_a-z]))dnl
34
35PKG_CHECK_EXISTS([zlib >= 1.2.3], [_efl_have_lib="yes"], [_efl_have_lib="no"])
36
37if 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"
40else
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
48fi
49m4_popdef([DOWNEFL])dnl
50])
51
52dnl Macro that checks for a library
53dnl
54dnl EFL_CHECK_LIB(EFL, LIBRARY)
55dnl it will abort if library is not found
56
57AC_DEFUN([EFL_CHECK_LIB],
58[dnl
59m4_pushdef([UP], m4_translit([$2], [-a-z], [_A-Z]))dnl
60m4_default([_EFL_CHECK_LIB_]m4_defn([UP]))($1)
61AC_MSG_CHECKING([for $2])
62AC_MSG_RESULT([yes])
63m4_popdef([UP])dnl
64])
65
66dnl Macro that iterates over a sequence of white separated libraries
67dnl and that calls EFL_CHECK_LIB() for each of these libraries
68dnl
69dnl EFL_CHECK_LIBS(EFL, LIBRARIES)
70dnl it will abort if libraries are not found
71
72AC_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 1d34992..0000000
--- a/m4/efl_compiler.m4
+++ /dev/null
@@ -1,90 +0,0 @@
1dnl Copyright (C) 2012 Vincent Torri <vincent dot torri at gmail dot com>
2dnl This code is public domain and can be freely used or copied.
3
4dnl Macro that check if compiler of linker flags are available
5
6
7dnl Macro that checks for a compiler flag availability
8dnl
9dnl _EFL_CHECK_COMPILER_FLAGS(EFL, FLAGS)
10dnl AC_SUBST : EFL_CFLAGS (EFL being replaced by its value)
11dnl have_flag: yes or no.
12AC_DEFUN([_EFL_CHECK_COMPILER_FLAGS],
13[dnl
14m4_pushdef([UPEFL], m4_translit([[$1]], [-a-z], [_A-Z]))dnl
15
16dnl store in options -Wfoo if -Wno-foo is passed
17option="m4_bpatsubst([[$2]], [-Wno-], [-W])"
18CFLAGS_save="${CFLAGS}"
19CFLAGS="${CFLAGS} ${option}"
20AC_LANG_PUSH([C])
21
22AC_MSG_CHECKING([whether the compiler supports $2])
23AC_COMPILE_IFELSE(
24 [AC_LANG_PROGRAM([[]])],
25 [have_flag="yes"],
26 [have_flag="no"])
27AC_MSG_RESULT([${have_flag}])
28
29AC_LANG_POP([C])
30CFLAGS="${CFLAGS_save}"
31if test "x${have_flag}" = "xyes" ; then
32 UPEFL[_CFLAGS]="${UPEFL[_CFLAGS]} [$2]"
33fi
34AC_SUBST(UPEFL[_CFLAGS])dnl
35m4_popdef([UPEFL])dnl
36])
37
38dnl EFL_CHECK_COMPILER_FLAGS(EFL, FLAGS)
39dnl Checks if FLAGS are supported and add to EFL_CLFAGS.
40dnl
41dnl It will first try every flag at once, if one fails will try them one by one.
42AC_DEFUN([EFL_CHECK_COMPILER_FLAGS],
43[dnl
44_EFL_CHECK_COMPILER_FLAGS([$1], [$2])
45if test "${have_flag}" != "yes"; then
46m4_foreach_w([flag], [$2], [_EFL_CHECK_COMPILER_FLAGS([$1], m4_defn([flag]))])
47fi
48])
49
50
51dnl Macro that checks for a linker flag availability
52dnl
53dnl _EFL_CHECK_LINKER_FLAGS(EFL, FLAGS)
54dnl AC_SUBST : EFL_LDFLAGS (EFL being replaced by its value)
55dnl have_flag: yes or no
56AC_DEFUN([_EFL_CHECK_LINKER_FLAGS],
57[dnl
58m4_pushdef([UPEFL], m4_translit([[$1]], [-a-z], [_A-Z]))dnl
59
60LDFLAGS_save="${LDFLAGS}"
61LDFLAGS="${LDFLAGS} $2"
62AC_LANG_PUSH([C])
63
64AC_MSG_CHECKING([whether the linker supports $2])
65AC_LINK_IFELSE(
66 [AC_LANG_PROGRAM([[]])],
67 [have_flag="yes"],
68 [have_flag="no"])
69AC_MSG_RESULT([${have_flag}])
70
71AC_LANG_POP([C])
72LDFLAGS="${LDFLAGS_save}"
73if test "x${have_flag}" = "xyes" ; then
74 UPEFL[_LDFLAGS]="${UPEFL[_LDFLAGS]} [$2]"
75fi
76AC_SUBST(UPEFL[_LDFLAGS])dnl
77m4_popdef([UPEFL])dnl
78])
79
80dnl EFL_CHECK_LINKER_FLAGS(EFL, FLAGS)
81dnl Checks if FLAGS are supported and add to EFL_LDLFAGS.
82dnl
83dnl It will first try every flag at once, if one fails will try them one by one.
84AC_DEFUN([EFL_CHECK_LINKER_FLAGS],
85[dnl
86_EFL_CHECK_LINKER_FLAGS([$1], [$2])
87if test "${have_flag}" != "yes"; then
88m4_foreach_w([flag], [$2], [_EFL_CHECK_LINKER_FLAGS([$1], m4_defn([flag]))])
89fi
90])dnl
diff --git a/m4/efl_define.m4 b/m4/efl_define.m4
deleted file mode 100644
index 2b73a69..0000000
--- a/m4/efl_define.m4
+++ /dev/null
@@ -1,20 +0,0 @@
1dnl
2dnl EFL_CHECK_DEFINE(symbol, header_file)
3dnl
4dnl NOTE: EFL_CHECK_DEFINE is strongly inspired by
5dnl APR_CHECK_DEFINE which can be found in the
6dnl sources of Apache's APR (under Apache Licence)
7dnl
8AC_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
13YES_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 0c1452f..0000000
--- a/m4/efl_doxygen.m4
+++ /dev/null
@@ -1,98 +0,0 @@
1dnl Copyright (C) 2008 Vincent Torri <vtorri at univ-evry dot fr>
2dnl That code is public domain and can be freely used or copied.
3
4dnl Macro that check if doxygen is available or not.
5
6dnl EFL_CHECK_DOXYGEN([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
7dnl Test for the doxygen program
8dnl Defines efl_doxygen
9dnl Defines the automake conditionnal EFL_BUILD_DOC
10dnl
11AC_DEFUN([EFL_CHECK_DOXYGEN],
12[
13
14dnl
15dnl Disable the build of the documentation
16dnl
17AC_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
31if test "x${efl_enable_doc}" = "xyes" ; then
32
33dnl
34dnl Specify the full file name, with path
35dnl
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@:>@])],
43dnl
44dnl Check the given doxygen program.
45dnl
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 )
77fi
78
79dnl
80dnl Substitution
81dnl
82AC_SUBST([efl_doxygen])
83
84if ! test "x${efl_have_doxygen}" = "xyes" ; then
85 efl_enable_doc="no"
86fi
87
88AM_CONDITIONAL(EFL_BUILD_DOC, test "x${efl_enable_doc}" = "xyes")
89
90if test "x${efl_enable_doc}" = "xyes" ; then
91 ifelse([$1], , :, [$1])
92else
93 ifelse([$2], , :, [$2])
94fi
95
96])
97
98dnl End of doxygen.m4
diff --git a/m4/efl_eo.m4 b/m4/efl_eo.m4
deleted file mode 100644
index 864baf5..0000000
--- a/m4/efl_eo.m4
+++ /dev/null
@@ -1,6 +0,0 @@
1dnl use: EFL_ENABLE_EO_API_SUPPORT
2AC_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 8c9f5c3..0000000
--- 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
33AC_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 e9ca682..0000000
--- a/m4/efl_libunwind.m4
+++ /dev/null
@@ -1,61 +0,0 @@
1dnl This code is public domain and can be freely used or copied.
2dnl File to auto-detect libunwind
3
4dnl Macro that checks for libunwind, first by using
5dnl pkg-config, then by trying to compile and link a simple
6dnl program, to see if libunwind is distributed on the system
7dnl but has no pkg-config support
8dnl
9dnl The biggest usecase is on Mac OS X, where there are no
10dnl pkg-config files, and the libunwind headers are lost
11dnl in an obscure place on the system (but whom the compilers
12dnl distributed by Apple are aware of).
13dnl
14dnl Usage: EFL_CHECK_LIBUNWIND
15dnl will inconditionaly set UNWIND_CFLAGS and UNWIND_LIBS
16dnl to follow pkg-config fashion.
17dnl
18AC_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 537a6f3..0000000
--- a/m4/efl_lua_old.m4
+++ /dev/null
@@ -1,36 +0,0 @@
1dnl EFL_CHECK_LUA_OLD(EFL)
2dnl checks for lua 5.1 or 5.2 in pkg-config (multiple names) and -llua directly
3dnl will call EFL_ADD_LIBS() or EFL_DEPEND_PKG() as required.
4dnl this is a strict call and will abort if lua is not found
5dnl keep in mind that this is only executed if --enable-lua-old is set
6AC_DEFUN([EFL_CHECK_LUA_OLD],
7[dnl
8requirement_lua=""
9PKG_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
17if 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
27else
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
35fi
36])
diff --git a/m4/efl_mono.m4 b/m4/efl_mono.m4
deleted file mode 100644
index 807526e..0000000
--- 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# -----------
36AC_LANG_DEFINE([CSHARP], [csharp], [MCS], [],
37[ac_ext=cs
38ac_compile='$MCS $MCSFLAGS conftest.$ac_ext >&AS_MESSAGE_LOG_FD'
39])
40
41AU_DEFUN([AC_LANG_CSHARP], [AC_LANG(CSHARP)])
42
43m4_define([AC_LANG_PROGRAM(CSHARP)],
44[$1
45class MyClass
46{
47 static void Main(string[] args)
48 {
49 $2
50 }
51}])
52
53AC_DEFUN([AC_LANG_COMPILER(CSHARP)],
54[AC_REQUIRE([AC_PROG_MCS])])
55
56AN_MAKEVAR([MCS], [AC_PROG_MCS])
57AN_PROGRAM([mcs], [AC_PROG_MCS])
58AC_DEFUN([AC_PROG_MCS],
59[AC_LANG_PUSH(CSHARP)dnl
60AC_ARG_VAR([MCS], [MCS (C#) compiler command])dnl
61AC_ARG_VAR([MCSFLAGS], [MCS (C#) compiler flags])dnl
62dnl _AC_ARG_VAR_LDFLAGS()dnl
63m4_ifval([$1],
64 [AC_CHECK_TOOLS(MCS, [$1])],
65[AC_CHECK_TOOL(MCS, mcs)
66if 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
70fi
71if test -z "$MCS"; then
72 AC_CHECK_PROG(MCS, mcs, mcs, , , false)
73fi
74if test -z "$MCS"; then
75 HAVE_MCS=0
76 AC_MSG_NOTICE([No C sharp compiler was found])
77else
78 HAVE_MCS=1
79 AC_DEFINE(HAVE_MCS,1,
80 [define if the MCS compiler is available])
81fi
82AC_SUBST(HAVE_MCS)
83])
84
85# Provide some information about the compiler.
86_AS_ECHO_LOG([checking for _AC_LANG compiler version])
87set X $ac_compile
88ac_compiler=$[2]
89_AC_DO_LIMIT([$ac_compiler --version >&AS_MESSAGE_LOG_FD])
90m4_expand_once([_AC_COMPILER_EXEEXT])[]dnl
91m4_expand_once([_AC_COMPILER_OBJEXT])[]dnl
92AC_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 f57bfd2..0000000
--- a/m4/efl_path_max.m4
+++ /dev/null
@@ -1,36 +0,0 @@
1dnl Check for PATH_MAX in limits.h, and define a default value if not found
2dnl This is a workaround for systems not providing PATH_MAX, like GNU/Hurd
3
4dnl EFL_CHECK_PATH_MAX([DEFAULT_VALUE_IF_NOT_FOUND])
5dnl
6dnl If PATH_MAX is not defined in <limits.h>, defines it
7dnl to DEFAULT_VALUE_IF_NOT_FOUND if it exists, or fallback
8dnl to using 4096
9
10AC_DEFUN([EFL_CHECK_PATH_MAX],
11[
12
13default_max=m4_default([$1], "4096")
14AC_LANG_PUSH([C])
15
16AC_MSG_CHECKING([for PATH_MAX in limits.h])
17AC_COMPILE_IFELSE(
18 [AC_LANG_PROGRAM(
19 [[
20#include <limits.h>
21 ]],
22 [[
23int 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
33AC_LANG_POP([C])
34
35])
36dnl 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 13a9516..0000000
--- a/m4/efl_pkg_config.m4
+++ /dev/null
@@ -1,10 +0,0 @@
1dnl file with extensions to pkg-config module
2dnl
3dnl EFL_PKG_CHECK_STRICT(MODULE, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
4dnl similar to PKG_CHECK_EXISTS() that will AC_MSG_ERROR() if not found
5AC_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 f606bc0..0000000
--- 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
38m4_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
60AC_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 54a5fc6..0000000
--- a/m4/efl_threads.m4
+++ /dev/null
@@ -1,163 +0,0 @@
1dnl Copyright (C) 2010 Vincent Torri <vtorri at univ-evry dot fr>
2dnl rwlock code added by Mike Blumenkrantz <mike at zentific dot com>
3dnl This code is public domain and can be freely used or copied.
4
5dnl Macro that check if POSIX or Win32 threads library is available or not.
6
7dnl Usage: EFL_CHECK_THREADS(ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
8dnl Call AC_SUBST(EFL_PTHREAD_CFLAGS)
9dnl Call AC_SUBST(EFL_PTHREAD_LIBS)
10dnl Defines EFL_HAVE_THREADS
11
12AC_DEFUN([EFL_CHECK_THREADS],
13[
14
15dnl Generic thread detection
16
17EFL_PTHREAD_CFLAGS="-D_REENTRANT"
18EFL_PTHREAD_LIBS=""
19
20_efl_have_posix_threads="no"
21
22dnl Use generic infrastructure for pthread detection (What a hell of a mess !)
23gl_LOCK
24
25AC_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
29dnl System specific CFLAGS
30if 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
36fi
37
38dnl check if the compiler supports POSIX threads
39if 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 [[
48pthread_barrier_t barrier;
49pthread_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 [[
63pthread_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__
78pthread_set_name_np(NULL, NULL);
79#else
80pthread_setname_np(NULL, NULL);
81#endif
82 ]])],
83 [efl_have_setname="yes"],
84 [efl_have_setname="no"])
85 LIBS=${SAVE_LIBS}
86fi
87
88AC_MSG_CHECKING([which threads API is used])
89if test "x${_efl_have_posix_threads}" = "xyes" ; then
90 efl_have_threads="POSIX"
91fi
92AC_MSG_RESULT([${efl_have_threads}])
93
94EFL_PTHREAD_LIBS="${LTLIBMULTITHREAD}"
95
96AC_SUBST(EFL_PTHREAD_CFLAGS)
97AC_SUBST(EFL_PTHREAD_LIBS)
98
99dnl check if the compiler supports pthreads spinlock
100
101efl_have_posix_threads_spinlock="no"
102
103if 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 [[
112pthread_spinlock_t lock;
113int res;
114res = pthread_spin_init(&lock, PTHREAD_PROCESS_PRIVATE);
115sched_yield();
116 ]])],
117 [efl_have_posix_threads_spinlock="yes"],
118 [efl_have_posix_threads_spinlock="no"])
119 LIBS=${SAVE_LIBS}
120
121fi
122
123AC_MSG_CHECKING([whether to build POSIX threads spinlock code])
124AC_MSG_RESULT([${efl_have_posix_threads_spinlock}])
125
126if 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])
128fi
129
130
131dnl checks if the compiler supports OSX spinlock
132
133efl_have_osx_spinlock="no"
134
135if test "x${_efl_have_posix_threads}" = "xyes" ; then
136 AC_LINK_IFELSE(
137 [AC_LANG_PROGRAM([[
138#include <libkern/OSAtomic.h>
139 ]],
140 [[
141OSSpinLock spin_lock = 0;
142OSSpinLockTry(&spin_lock);
143 ]])],
144 [efl_have_osx_spinlock="yes"],
145 [efl_have_osx_spinlock="no"])
146fi
147
148AC_MSG_CHECKING([whether to build OSX spinlock code])
149AC_MSG_RESULT([${efl_have_osx_spinlock}])
150
151if test "x${efl_have_osx_spinlock}" = "xyes" ; then
152 AC_DEFINE([EFL_HAVE_OSX_SPINLOCK], [1], [Define to mention that OSX spinlocks are supported])
153fi
154
155
156
157AS_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 251d4cb..0000000
--- a/m4/eina_check.m4
+++ /dev/null
@@ -1,49 +0,0 @@
1dnl use: EINA_CHECK_MODULE(foo-bar, have_dependency, description)
2AC_DEFUN([EINA_CHECK_MODULE],
3[
4m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl
5m4_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])
21enable_module=$2
22
23have_module="no"
24if test "x${enable_module}" = "xyes" || test "x${enable_module}" = "xstatic" ; then
25 have_module="yes"
26fi
27
28AC_MSG_CHECKING([whether to enable $3 built])
29AC_MSG_RESULT([${have_module}])
30
31static_module="no"
32if 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])
36fi
37
38if ! test "x${enable_module}" = "xno" ; then
39 AC_DEFINE(EINA_BUILD_[]UP, 1, [Set to 1 if $2 is built])
40fi
41
42AM_CONDITIONAL(EINA_BUILD_[]UP, [test "x${have_module}" = "xyes"])
43AM_CONDITIONAL(EINA_STATIC_BUILD_[]UP, [test "x${static_module}" = "xyes"])
44
45enable_[]DOWN=${enable_module}
46
47m4_popdef([UP])
48m4_popdef([DOWN])
49])
diff --git a/m4/eina_config.m4 b/m4/eina_config.m4
deleted file mode 100644
index 609e4f9..0000000
--- a/m4/eina_config.m4
+++ /dev/null
@@ -1,8 +0,0 @@
1dnl use: EINA_CONFIG(configsuffix, testcond)
2AC_DEFUN([EINA_CONFIG],
3[
4if $2; then
5 EINA_CONFIGURE_$1="#define EINA_$1"
6fi
7AC_SUBST([EINA_CONFIGURE_$1])
8])
diff --git a/m4/eio_check_options.m4 b/m4/eio_check_options.m4
deleted file mode 100644
index 5fb9012..0000000
--- a/m4/eio_check_options.m4
+++ /dev/null
@@ -1,12 +0,0 @@
1dnl use: EIO_CHECK_NOTIFY_WIN32([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
2AC_DEFUN([EIO_CHECK_NOTIFY_WIN32],
3[
4if test "x${have_win32}" = "xyes" ; then
5 AC_DEFINE([HAVE_NOTIFY_WIN32], [1], [ File monitoring with Windows notification ])
6fi
7
8AC_MSG_CHECKING([whether Windows notification is to be used for filemonitoring])
9AC_MSG_RESULT([${have_win32}])
10
11AS_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 a512357..0000000
--- a/m4/elm_check_backend.m4
+++ /dev/null
@@ -1,27 +0,0 @@
1
2dnl use: ELM_CHECK_BACKEND(engine)
3AC_DEFUN([ELM_CHECK_BACKEND],
4[dnl
5m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl
6m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl
7
8have_elementary_[]DOWN="no"
9want_backend="$2"
10
11AC_MSG_CHECKING([whether to enable $1 backend])
12AC_MSG_RESULT([${want_backend}])
13
14if 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}"
18fi
19
20AC_MSG_CHECKING([whether to build $1 backend])
21AC_MSG_RESULT([${have_elementary_[]DOWN}])
22
23EFL_ADD_FEATURE([ELEMENTARY], [$1], [${want_backend}])
24
25m4_popdef([UP])dnl
26m4_popdef([DOWN])dnl
27])
diff --git a/m4/elm_check_option.m4 b/m4/elm_check_option.m4
deleted file mode 100644
index 999636a..0000000
--- a/m4/elm_check_option.m4
+++ /dev/null
@@ -1,60 +0,0 @@
1
2dnl use: ELM_CHECK_OPTION_DEP(option, pkgver)
3AC_DEFUN([ELM_CHECK_OPTION_DEP],
4[dnl
5
6m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl
7m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl
8
9ELM_[]UP[]_DEF="#undef"
10have_elementary_[]DOWN="no"
11
12AC_ARG_ENABLE(DOWN,
13 [AS_HELP_STRING([--disable-]DOWN, [disable ]DOWN[ support. @<:@default=detect@:>@])],
14 [want_option=$enableval],
15 [want_option="auto"])
16
17AC_MSG_CHECKING([whether to enable $1 option])
18AC_MSG_RESULT([${want_option}])
19
20if 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 )
30fi
31
32AC_MSG_CHECKING([whether to build $1 option])
33AC_MSG_RESULT([${have_elementary_[]DOWN}])
34
35if 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.])
37fi
38
39AC_SUBST([ELM_]UP[_DEF])
40
41m4_popdef([UP])dnl
42m4_popdef([DOWN])dnl
43])
44
45dnl use: ELM_CHECK_OPTION(option, pkgver)
46AC_DEFUN([ELM_CHECK_OPTION],
47[dnl
48
49m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl
50m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl
51
52if test "x$1" = "xeweb" ; then
53 ELM_CHECK_OPTION_DEP_EWK2
54else
55 ELM_CHECK_OPTION_DEP($1, $2)
56fi
57
58m4_popdef([UP])dnl
59m4_popdef([DOWN])dnl
60])
diff --git a/m4/elm_quicklaunch.m4 b/m4/elm_quicklaunch.m4
deleted file mode 100644
index b51ff0f..0000000
--- a/m4/elm_quicklaunch.m4
+++ /dev/null
@@ -1,24 +0,0 @@
1dnl Copyright (C) 2013 Cedric Bail <cedric dot bail at samsung dot com>
2dnl That code is public domain and can be freely used or copied
3
4dnl Macro that check if -pie -rdynamic can be given to ld
5
6dnl Usage: ELM_QUICKLAUNCH
7dnl add -pie -rdynamic to LDFLAGS and -fpie to CFLAGS
8
9AC_DEFUN([ELM_QUICKLAUNCH],
10[
11AC_MSG_CHECKING([If the compiler has what it takes to do quicklaunch (-pie -rdynamic)])
12old_LDFLAGS="$LDFLAGS"
13old_CFLAGS="$CFLAGS"
14
15LDFLAGS="$LDFLAGS -pie -rdynamic"
16CFLAGS="$CFLAGS -fpie"
17
18AC_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 d852dba..0000000
--- a/m4/emotion_generic_players.m4
+++ /dev/null
@@ -1,37 +0,0 @@
1dnl EMOTION_GENERIC_PLAYER(NAME, DEFAULT_STATE, [PKG_CONFIG_DEPS])
2dnl Does the following:
3dnl * AC_ARG_WITH(NAME)
4dnl * define with_name to yes or no
5dnl * PKG_CHECK_MODULES(NAME, PKG_CONFIG_DEPS)
6dnl * AC_DEFINE([HAVE_NAME])
7dnl * AM_CONDITIONAL([HAVE_NAME])
8AC_DEFUN([EMOTION_GENERIC_PLAYER],
9[dnl
10m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl
11m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl
12
13AC_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
18if 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
32fi
33AM_CONDITIONAL([HAVE_]m4_defn([UP]), [test "$with_[]m4_defn([DOWN])" = "yes"])
34
35m4_popdef([UP])dnl
36m4_popdef([DOWN])dnl
37])
diff --git a/m4/emotion_module.m4 b/m4/emotion_module.m4
deleted file mode 100644
index 184533f..0000000
--- a/m4/emotion_module.m4
+++ /dev/null
@@ -1,133 +0,0 @@
1dnl use: EMOTION_MODULE_DEP_CHECK_XINE(want_engine)
2dnl where want_engine = yes or static
3AC_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
13dnl use: EMOTION_MODULE_DEP_CHECK_GSTREAMER(want_static)
14dnl where want_engine = yes or static
15AC_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
48dnl use: EMOTION_MODULE_DEP_CHECK_GSTREAMER_1(want_static)
49dnl where want_engine = yes or static
50AC_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
62dnl use: EMOTION_MODULE_DEP_CHECK_LIBVLC(want_static)
63dnl where want_engine = yes or static
64AC_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
75dnl use: EMOTION_MODULE_DEP_CHECK_GENERIC(want_static)
76dnl where want_engine = yes or static
77AC_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
89dnl use: EMOTION_MODULE(name, want_engine)
90dnl
91dnl defines EMOTION_BUILD_NAME if it should be built
92dnl defines EMOTION_STATIC_BUILD_NAME if should be built statically
93dnl
94AC_DEFUN([EMOTION_MODULE],
95[
96m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl
97m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl
98
99want_engine="$2"
100want_static_engine="no"
101have_engine="no"
102have_emotion_module_[]DOWN="no"
103
104EMOTION_MODULE_[]m4_defn([UP])[]_CFLAGS=""
105EMOTION_MODULE_[]m4_defn([UP])[]_LIBS=""
106
107if 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
118fi
119
120AC_DEFINE_IF(EMOTION_BUILD_[]UP, [test "${have_engine}" = "yes"],
121 [1], [Build $1 Evas engine])
122AM_CONDITIONAL(EMOTION_BUILD_[]UP, [test "${have_engine}" = "yes"])
123
124AC_DEFINE_IF(EMOTION_STATIC_BUILD_[]UP, [test "${want_static_engine}" = "yes"],
125 [1], [Build $1 Evas engine inside libevas])
126AM_CONDITIONAL(EMOTION_STATIC_BUILD_[]UP, [test "${want_static_engine}" = "yes"])
127
128AC_SUBST([EMOTION_MODULE_]m4_defn([UP])[_CFLAGS])
129AC_SUBST([EMOTION_MODULE_]m4_defn([UP])[_LIBS])
130
131m4_popdef([UP])
132m4_popdef([DOWN])
133])
diff --git a/m4/evas_check_engine.m4 b/m4/evas_check_engine.m4
deleted file mode 100644
index d15c8d5..0000000
--- a/m4/evas_check_engine.m4
+++ /dev/null
@@ -1,629 +0,0 @@
1AC_DEFUN([REQUIRED_WAYLAND_VERSION], [1.11.0])
2
3dnl use: EVAS_CHECK_ENGINE_DEP_SOFTWARE_XLIB(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
4
5AC_DEFUN([EVAS_CHECK_ENGINE_DEP_SOFTWARE_XLIB],
6[
7
8EFL_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
20dnl use: EVAS_CHECK_ENGINE_DEP_GL_XLIB(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
21
22AC_DEFUN([EVAS_CHECK_ENGINE_DEP_GL_XLIB],
23[
24
25EFL_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 [[
61pthread_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
126dnl use: EVAS_CHECK_ENGINE_DEP_SOFTWARE_GDI(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
127
128AC_DEFUN([EVAS_CHECK_ENGINE_DEP_SOFTWARE_GDI],
129[
130
131have_dep="no"
132evas_engine_[]$1[]_cflags=""
133evas_engine_[]$1[]_libs=""
134
135AC_CHECK_HEADER([windows.h],
136 [
137 have_dep="yes"
138 evas_engine_[]$1[]_libs="-lgdi32"
139 ])
140
141if test "x$3" = "xstatic" && test "x${have_dep}" = "xyes" ; then
142 requirements_libs_evas="${evas_engine_[]$1[]_libs} ${requirements_libs_evas}"
143fi
144
145AC_SUBST([evas_engine_$1_cflags])
146AC_SUBST([evas_engine_$1_libs])
147
148AS_IF([test "x${have_dep}" = "xyes"], [$4], [$5])
149
150])
151
152dnl use: EVAS_CHECK_ENGINE_DEP_SOFTWARE_DDRAW(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
153
154AC_DEFUN([EVAS_CHECK_ENGINE_DEP_SOFTWARE_DDRAW],
155[
156
157have_dep="no"
158evas_engine_[]$1[]_cflags=""
159evas_engine_[]$1[]_libs=""
160
161AC_CHECK_HEADER([ddraw.h],
162 [
163 have_dep="yes"
164 evas_engine_[]$1[]_libs="-lddraw"
165 ])
166
167if test "x$3" = "xstatic" && test "x${have_dep}" = "xyes" ; then
168 requirements_libs_evas="${evas_engine_[]$1[]_libs} ${requirements_libs_evas}"
169fi
170
171AC_SUBST([evas_engine_$1_cflags])
172AC_SUBST([evas_engine_$1_libs])
173
174AS_IF([test "x${have_dep}" = "xyes"], [$4], [$5])
175
176])
177
178dnl use: EVAS_CHECK_ENGINE_DEP_GL_COCOA(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
179
180AC_DEFUN([EVAS_CHECK_ENGINE_DEP_GL_COCOA],
181[
182
183evas_engine_[]$1[]_cflags=""
184evas_engine_[]$1[]_libs=""
185
186AC_LANG_PUSH([Objective C])
187
188LIBS_save="$LIBS"
189LIBS="$LIBS -framework Cocoa"
190AC_LINK_IFELSE(
191 [AC_LANG_PROGRAM(
192 [[
193#include <Cocoa/Cocoa.h>
194 ]],
195 [[
196NSWindow *window;
197window = [[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"])
211LIBS="$LIBS_save"
212
213AC_LANG_POP([Objective C])
214
215if test "x$3" = "xstatic" && test "x${have_dep}" = "xyes" ; then
216 requirements_libs_evas="${evas_engine_[]$1[]_libs} ${requirements_libs_evas}"
217fi
218
219AC_SUBST([evas_engine_$1_cflags])
220AC_SUBST([evas_engine_$1_libs])
221
222AS_IF([test "x${have_dep}" = "xyes"], [$4], [$5])
223
224])
225
226dnl use: EVAS_CHECK_ENGINE_DEP_GL_SDL(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
227
228AC_DEFUN([EVAS_CHECK_ENGINE_DEP_GL_SDL],
229[
230
231requirement=""
232have_dep="no"
233evas_engine_[]$1[]_cflags=""
234evas_engine_[]$1[]_libs=""
235
236PKG_CHECK_EXISTS([sdl2 >= 2.0.0],
237 [
238 have_dep="yes"
239 requirement="sdl2 >= 2.0.0"
240 ],
241 [have_dep="no"])
242
243if 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
252fi
253
254gl_pt_lib="";
255have_gl_pt="no"
256
257AC_MSG_CHECKING([whether pthread_create() is supported])
258CFLAGS_save="${CFLAGS}"
259CFLAGS="${CFLAGS} -pthread"
260LIBS_save="${LIBS}"
261LIBS="${LIBS} -pthread"
262AC_LINK_IFELSE(
263 [AC_LANG_PROGRAM([[
264#include <pthread.h>
265 ]],
266 [[
267pthread_create(NULL, NULL, NULL, NULL);
268 ]])],
269 [have_gl_pt="yes"],
270 [have_gl_pt="no"])
271CFLAGS=${CFLAGS_save}
272LIBS=${LIBS_save}
273AC_MSG_RESULT([${have_gl_pt}])
274
275if test "x$have_gl_pt" = "xyes" ; then
276 gl_pt_lib=" -pthread"
277fi
278
279AC_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
287if test "x${with_opengl}" = "xes" ; then
288 have_dep=no
289fi
290
291if 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"
294else
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
312fi
313
314AC_SUBST([evas_engine_$1_cflags])
315AC_SUBST([evas_engine_$1_libs])
316
317if test "x$3" = "xstatic" ; then
318 requirement_evas="${requirement} ${requirement_evas}"
319fi
320
321AS_IF([test "x${have_dep}" = "xyes"], [$4], [$5])
322
323])
324
325
326dnl use: EVAS_CHECK_ENGINE_DEP_WAYLAND_SHM(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
327
328AC_DEFUN([EVAS_CHECK_ENGINE_DEP_WAYLAND_SHM],
329[
330
331requirement=""
332have_dep="no"
333evas_engine_[]$1[]_cflags=""
334evas_engine_[]$1[]_libs=""
335
336PKG_CHECK_EXISTS([wayland-client >= REQUIRED_WAYLAND_VERSION],
337 [
338 have_dep="yes"
339 requirement="wayland-client"
340 ],
341 [have_dep="no"])
342
343if 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
352fi
353
354AC_SUBST([evas_engine_$1_cflags])
355AC_SUBST([evas_engine_$1_libs])
356
357AS_IF([test "x${have_dep}" = "xyes"], [$4], [$5])
358
359])
360
361dnl use: EVAS_CHECK_ENGINE_DEP_WAYLAND_EGL(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
362
363AC_DEFUN([EVAS_CHECK_ENGINE_DEP_WAYLAND_EGL],
364[
365
366requirement=""
367have_dep="no"
368evas_engine_[]$1[]_cflags=""
369evas_engine_[]$1[]_libs=""
370
371if test "x${with_opengl}" = "xes" ; then
372 gl_library="glesv2"
373else
374 gl_library="gl"
375fi
376
377PKG_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
384if 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
397fi
398
399AC_SUBST([evas_engine_$1_cflags])
400AC_SUBST([evas_engine_$1_libs])
401
402AS_IF([test "x${have_dep}" = "xyes"], [$4], [$5])
403
404])
405
406
407dnl use: EVAS_CHECK_ENGINE_DEP_DRM(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
408
409AC_DEFUN([EVAS_CHECK_ENGINE_DEP_DRM],
410[
411
412requirement=""
413have_dep="no"
414have_hw_dep="no"
415evas_engine_[]$1[]_cflags=""
416evas_engine_[]$1[]_libs=""
417
418PKG_CHECK_EXISTS([libdrm],
419 [
420 have_dep="yes"
421 requirement="libdrm"
422 ], [have_dep="no"])
423
424if 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
433fi
434
435AC_SUBST([evas_engine_$1_cflags])
436AC_SUBST([evas_engine_$1_libs])
437
438AS_IF([test "x${have_dep}" = "xyes"], [$4], [$5])
439
440])
441
442dnl use: EVAS_CHECK_ENGINE_DEP_GL_DRM(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
443
444AC_DEFUN([EVAS_CHECK_ENGINE_DEP_GL_DRM],
445[
446
447requirement=""
448have_dep="no"
449have_hw_dep="no"
450evas_engine_[]$1[]_cflags=""
451evas_engine_[]$1[]_libs=""
452
453if test "x${with_opengl}" = "xes" ; then
454 gl_library="glesv2"
455else
456 AC_MSG_ERROR([We currently do not support GL DRM without OpenGL ES. Please consider OpenGL ES if you want to use it.])
457fi
458
459PKG_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
466if 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
476fi
477
478AC_SUBST([evas_engine_$1_cflags])
479AC_SUBST([evas_engine_$1_libs])
480
481AS_IF([test "x${have_dep}" = "xyes"], [$4], [$5])
482
483])
484
485dnl use: EVAS_CHECK_ENGINE_DEP_EGLFS(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
486
487AC_DEFUN([EVAS_CHECK_ENGINE_DEP_EGLFS],
488[
489
490requirement=""
491have_dep="no"
492have_hw_dep="no"
493evas_engine_[]$1[]_cflags=""
494evas_engine_[]$1[]_libs=""
495
496if test "x${with_opengl}" = "xes" ; then
497 gl_library="glesv2"
498else
499 AC_MSG_ERROR([We do not support Eglfs without OpenGL ES. Please consider OpenGL ES if you want to use it.])
500fi
501
502PKG_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
509if 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
519fi
520
521AC_SUBST([evas_engine_$1_cflags])
522AC_SUBST([evas_engine_$1_libs])
523
524AS_IF([test "x${have_dep}" = "xyes"], [$4], [$5])
525
526])
527
528
529dnl use: EVAS_ENGINE(name, want_engine, [DEPENDENCY-CHECK-CODE])
530dnl
531dnl defines BUILD_ENGINE_NAME if it should be built
532dnl defines BUILD_STATIC_BUILD_NAME if should be built statically
533dnl
534dnl will call DEPENDENCY-CHECK-CODE if it should be built,
535dnl if some dependency fail just call AC_MSG_ERROR() to abort.
536
537AC_DEFUN([EVAS_ENGINE],
538[dnl
539m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl
540m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl
541
542want_engine="$2"
543want_static_engine="no"
544have_engine="no"
545have_evas_engine_[]DOWN="no"
546
547evas_engine_[]m4_defn([DOWN])[]_cflags=""
548evas_engine_[]m4_defn([DOWN])[]_libs=""
549
550if 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
560fi
561
562AC_DEFINE_IF(BUILD_ENGINE_[]UP, [test "${have_engine}" = "yes"],
563 [1], [Build $1 Evas engine])
564AM_CONDITIONAL(BUILD_ENGINE_[]UP, [test "${have_engine}" = "yes"])
565
566AC_DEFINE_IF(EVAS_STATIC_BUILD_[]UP, [test "${want_static_engine}" = "yes"],
567 [1], [Build $1 Evas engine inside libevas])
568AM_CONDITIONAL(EVAS_STATIC_BUILD_[]UP, [test "${want_static_engine}" = "yes"])
569
570AC_SUBST([evas_engine_]m4_defn([DOWN])[_cflags])
571AC_SUBST([evas_engine_]m4_defn([DOWN])[_libs])
572
573EFL_ADD_FEATURE([EVAS_ENGINE], [$1], [${have_evas_engine_]DOWN[}])dnl
574m4_popdef([UP])dnl
575m4_popdef([DOWN])dnl
576])
577
578
579
580dnl use: EVAS_CHECK_ENGINE(engine, want_engine, simple, description)
581AC_DEFUN([EVAS_CHECK_ENGINE],
582[dnl
583m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl
584m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl
585
586want_engine="$2"
587want_static_engine="no"
588have_engine="no"
589have_evas_engine_[]DOWN="no"
590
591AC_MSG_CHECKING([whether to enable $4 rendering backend])
592AC_MSG_RESULT([${want_engine}])
593
594if 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"])
596fi
597
598if test "x${have_engine}" = "xno" -a "x${want_engine}" = "xyes"; then
599 AC_MSG_ERROR([$4 dependencies not found])
600fi
601
602AC_MSG_CHECKING([whether $4 rendering backend will be built])
603AC_MSG_RESULT([${have_engine}])
604
605if 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
612fi
613
614if test "x${have_engine}" = "xyes" ; then
615 AC_DEFINE(BUILD_ENGINE_[]UP, [1], [$4 rendering backend])
616fi
617
618AM_CONDITIONAL(BUILD_ENGINE_[]UP, [test "x${have_engine}" = "xyes"])
619
620if 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"
623fi
624
625EFL_ADD_FEATURE([EVAS_ENGINE], [$1], [${have_evas_engine_]DOWN[}])
626AM_CONDITIONAL(EVAS_STATIC_BUILD_[]UP, [test "x${want_static_engine}" = "xyes"])dnl
627m4_popdef([UP])dnl
628m4_popdef([DOWN])dnl
629])
diff --git a/m4/evas_check_loader.m4 b/m4/evas_check_loader.m4
deleted file mode 100644
index ff48c3c..0000000
--- a/m4/evas_check_loader.m4
+++ /dev/null
@@ -1,678 +0,0 @@
1
2dnl use: ARG_ENABLE_EVAS_VG_LOADER(loader, default_value)
3
4AC_DEFUN([ARG_ENABLE_EVAS_VG_LOADER],
5[dnl
6m4_pushdef([DOWN], m4_tolower([$1]))dnl
7
8AC_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"])
26m4_popdef([DOWN])dnl
27])
28
29dnl use: EVAS_CHECK_VG_LOADER_DEP_SVG(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
30
31AC_DEFUN([EVAS_CHECK_VG_LOADER_DEP_SVG],
32[
33
34have_dep="yes"
35evas_vg_loader_[]$1[]_cflags=""
36evas_vg_loader_[]$1[]_libs=""
37
38AC_SUBST([evas_vg_loader_$1_cflags])
39AC_SUBST([evas_vg_loader_$1_libs])
40
41AS_IF([test "x${have_dep}" = "xyes"], [$3], [$4])
42
43])
44
45dnl use: EVAS_CHECK_VG_LOADER_DEP_EET(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
46
47AC_DEFUN([EVAS_CHECK_VG_LOADER_DEP_EET],
48[
49
50have_dep="yes"
51evas_vg_loader_[]$1[]_cflags=""
52evas_vg_loader_[]$1[]_libs=""
53
54AC_SUBST([evas_vg_loader_$1_cflags])
55AC_SUBST([evas_vg_loader_$1_libs])
56
57AS_IF([test "x${have_dep}" = "xyes"], [$3], [$4])
58
59])
60
61dnl use: ARG_ENABLE_EVAS_IMAGE_LOADER(loader, default_value)
62
63AC_DEFUN([ARG_ENABLE_EVAS_IMAGE_LOADER],
64[dnl
65m4_pushdef([DOWN], m4_tolower([$1]))dnl
66
67AC_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"])
85m4_popdef([DOWN])dnl
86])
87
88dnl use: EVAS_CHECK_LOADER_DEP_BMP(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
89
90AC_DEFUN([EVAS_CHECK_LOADER_DEP_BMP],
91[
92
93have_dep="yes"
94evas_image_loader_[]$1[]_cflags=""
95evas_image_loader_[]$1[]_libs=""
96
97AC_SUBST([evas_image_loader_$1_cflags])
98AC_SUBST([evas_image_loader_$1_libs])
99
100AS_IF([test "x${have_dep}" = "xyes"], [$3], [$4])
101
102])
103
104dnl use: EVAS_CHECK_LOADER_DEP_DDS(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
105
106AC_DEFUN([EVAS_CHECK_LOADER_DEP_DDS],
107[
108
109have_dep="yes"
110evas_image_loader_[]$1[]_cflags=""
111evas_image_loader_[]$1[]_libs=""
112
113AC_SUBST([evas_image_loader_$1_cflags])
114AC_SUBST([evas_image_loader_$1_libs])
115
116AS_IF([test "x${have_dep}" = "xyes"], [$3], [$4])
117
118])
119
120dnl use: EVAS_CHECK_LOADER_DEP_EET(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
121
122AC_DEFUN([EVAS_CHECK_LOADER_DEP_EET],
123[
124
125requirement=""
126have_dep="no"
127evas_image_loader_[]$1[]_cflags=""
128evas_image_loader_[]$1[]_libs=""
129
130dnl Eet is required
131have_dep="yes"
132
133AC_SUBST([evas_image_loader_$1_cflags])
134AC_SUBST([evas_image_loader_$1_libs])
135
136AS_IF([test "x${have_dep}" = "xyes"], [$3], [$4])
137
138])
139
140dnl use: EVAS_CHECK_LOADER_DEP_GENERIC(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
141
142AC_DEFUN([EVAS_CHECK_LOADER_DEP_GENERIC],
143[
144
145have_dep="yes"
146evas_image_loader_[]$1[]_cflags=""
147evas_image_loader_[]$1[]_libs=""
148
149AC_SUBST([evas_image_loader_$1_cflags])
150AC_SUBST([evas_image_loader_$1_libs])
151
152AS_IF([test "x${have_dep}" = "xyes"], [$3], [$4])
153
154])
155
156dnl use: EVAS_CHECK_LOADER_DEP_GIF(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
157
158AC_DEFUN([EVAS_CHECK_LOADER_DEP_GIF],
159[
160
161have_dep="no"
162evas_image_loader_[]$1[]_cflags=""
163evas_image_loader_[]$1[]_libs=""
164
165AC_CHECK_HEADER([gif_lib.h], [have_dep="yes"])
166
167if 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
185fi
186
187if test "x$2" = "xstatic" && test "x${have_dep}" = "xyes" ; then
188 requirements_libs_evas="${evas_image_loader_[]$1[]_libs} ${requirements_libs_evas}"
189fi
190
191AC_SUBST([evas_image_loader_$1_cflags])
192AC_SUBST([evas_image_loader_$1_libs])
193
194AS_IF([test "x${have_dep}" = "xyes"], [$3], [$4])
195
196])
197
198dnl use: EVAS_CHECK_LOADER_DEP_ICO(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
199
200AC_DEFUN([EVAS_CHECK_LOADER_DEP_ICO],
201[
202
203have_dep="yes"
204evas_image_loader_[]$1[]_cflags=""
205evas_image_loader_[]$1[]_libs=""
206
207AC_SUBST([evas_image_loader_$1_cflags])
208AC_SUBST([evas_image_loader_$1_libs])
209
210AS_IF([test "x${have_dep}" = "xyes"], [$3], [$4])
211
212])
213
214dnl use: EVAS_CHECK_LOADER_DEP_JPEG(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
215
216AC_DEFUN([EVAS_CHECK_LOADER_DEP_JPEG],
217[
218
219have_dep="no"
220evas_image_loader_[]$1[]_cflags=""
221evas_image_loader_[]$1[]_libs=""
222
223AC_CHECK_HEADER([jpeglib.h], [have_dep="yes"])
224
225if 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 [[
238struct jpeg_decompress_struct decomp;
239decomp.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
249fi
250
251if test "x$2" = "xstatic" && test "x${have_dep}" = "xyes" ; then
252 requirements_libs_evas="${evas_image_loader_[]$1[]_libs} ${requirements_libs_evas}"
253fi
254
255AC_SUBST([evas_image_loader_$1_cflags])
256AC_SUBST([evas_image_loader_$1_libs])
257
258AS_IF([test "x${have_dep}" = "xyes"], [$3], [$4])
259
260])
261
262dnl use: EVAS_CHECK_LOADER_DEP_JP2K(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
263
264AC_DEFUN([EVAS_CHECK_LOADER_DEP_JP2K],
265[
266
267requirement=""
268have_dep="no"
269evas_image_loader_[]$1[]_cflags=""
270evas_image_loader_[]$1[]_libs=""
271
272PKG_CHECK_EXISTS([libopenjp2 >= 2.0],
273 [
274 have_dep="yes"
275 requirement="libopenjp2 >= 2.0"
276 ],
277 [have_dep="no"])
278
279if 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}"
287fi
288
289AC_SUBST([evas_image_loader_$1_cflags])
290AC_SUBST([evas_image_loader_$1_libs])
291
292AS_IF([test "x${have_dep}" = "xyes"], [$3], [$4])
293
294])
295
296dnl use: EVAS_CHECK_LOADER_DEP_PMAPS(loader, want_static[[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
297
298AC_DEFUN([EVAS_CHECK_LOADER_DEP_PMAPS],
299[
300
301have_dep="yes"
302evas_image_loader_[]$1[]_cflags=""
303evas_image_loader_[]$1[]_libs=""
304
305AC_SUBST([evas_image_loader_$1_cflags])
306AC_SUBST([evas_image_loader_$1_libs])
307
308AS_IF([test "x${have_dep}" = "xyes"], [$3], [$4])
309
310])
311
312dnl use: EVAS_CHECK_LOADER_DEP_PNG(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
313
314AC_DEFUN([EVAS_CHECK_LOADER_DEP_PNG],
315[
316
317requirement=""
318have_dep="no"
319evas_image_loader_[]$1[]_cflags=""
320evas_image_loader_[]$1[]_libs=""
321
322dnl libpng.pc is the latest version of libpng that ahs been installed.
323dnl We check it first.
324PKG_CHECK_EXISTS([libpng >= 1.2.10],
325 [
326 have_dep="yes"
327 requirement="libpng >= 1.2.10"
328 ],
329 [have_dep="no"])
330
331if test "x${have_dep}" = "xno" ; then
332 PKG_CHECK_EXISTS([libpng15],
333 [
334 have_dep="yes"
335 requirement="libpng15"
336 ],
337 [have_dep="no"])
338fi
339
340if test "x${have_dep}" = "xno" ; then
341 PKG_CHECK_EXISTS([libpng14],
342 [
343 have_dep="yes"
344 requirement="libpng14"
345 ],
346 [have_dep="no"])
347fi
348
349if 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"])
356fi
357
358if 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}"
366fi
367
368AC_SUBST([evas_image_loader_$1_cflags])
369AC_SUBST([evas_image_loader_$1_libs])
370
371AS_IF([test "x${have_dep}" = "xyes"], [$3], [$4])
372
373])
374
375dnl use: EVAS_CHECK_LOADER_DEP_PSD(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
376
377AC_DEFUN([EVAS_CHECK_LOADER_DEP_PSD],
378[
379
380have_dep="yes"
381evas_image_loader_[]$1[]_cflags=""
382evas_image_loader_[]$1[]_libs=""
383
384AC_SUBST([evas_image_loader_$1_cflags])
385AC_SUBST([evas_image_loader_$1_libs])
386
387AS_IF([test "x${have_dep}" = "xyes"], [$3], [$4])
388
389])
390
391dnl use: EVAS_CHECK_LOADER_DEP_TGV(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
392
393AC_DEFUN([EVAS_CHECK_LOADER_DEP_TGV],
394[
395
396have_dep="yes"
397evas_image_loader_[]$1[]_cflags=""
398evas_image_loader_[]$1[]_libs=""
399
400AC_SUBST([evas_image_loader_$1_cflags])
401AC_SUBST([evas_image_loader_$1_libs])
402
403AS_IF([test "x${have_dep}" = "xyes"], [$3], [$4])
404
405])
406
407dnl use: EVAS_CHECK_LOADER_DEP_SVG(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
408
409AC_DEFUN([EVAS_CHECK_LOADER_DEP_SVG],
410[
411
412requirement=""
413evas_image_loader_[]$1[]_cflags=""
414evas_image_loader_[]$1[]_libs=""
415version_esvg="0.0.18"
416version_ender="0.0.6"
417
418PKG_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
425if 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}"
433fi
434
435AC_SUBST([evas_image_loader_$1_cflags])
436AC_SUBST([evas_image_loader_$1_libs])
437
438AS_IF([test "x${have_dep}" = "xyes"], [$3], [$4])
439
440])
441
442dnl use: EVAS_CHECK_LOADER_DEP_TGA(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
443
444AC_DEFUN([EVAS_CHECK_LOADER_DEP_TGA],
445[
446
447have_dep="yes"
448evas_image_loader_[]$1[]_cflags=""
449evas_image_loader_[]$1[]_libs=""
450
451AC_SUBST([evas_image_loader_$1_cflags])
452AC_SUBST([evas_image_loader_$1_libs])
453
454AS_IF([test "x${have_dep}" = "xyes"], [$3], [$4])
455
456])
457
458dnl use: EVAS_CHECK_LOADER_DEP_TIFF(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
459
460AC_DEFUN([EVAS_CHECK_LOADER_DEP_TIFF],
461[
462
463have_dep="no"
464evas_image_loader_[]$1[]_cflags=""
465evas_image_loader_[]$1[]_libs=""
466
467AC_CHECK_HEADER([tiffio.h], [have_dep="yes"])
468
469if 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
497fi
498
499if test "x$2" = "xstatic" && test "x${have_dep}" = "xyes" ; then
500 requirements_libs_evas="${evas_image_loader_[]$1[]_libs} ${requirements_libs_evas}"
501fi
502
503AC_SUBST([evas_image_loader_$1_cflags])
504AC_SUBST([evas_image_loader_$1_libs])
505
506AS_IF([test "x${have_dep}" = "xyes"], [$3], [$4])
507
508])
509
510dnl use: EVAS_CHECK_LOADER_DEP_WBMP(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
511
512AC_DEFUN([EVAS_CHECK_LOADER_DEP_WBMP],
513[
514
515have_dep="yes"
516evas_image_loader_[]$1[]_cflags=""
517evas_image_loader_[]$1[]_libs=""
518
519AC_SUBST([evas_image_loader_$1_cflags])
520AC_SUBST([evas_image_loader_$1_libs])
521
522AS_IF([test "x${have_dep}" = "xyes"], [$3], [$4])
523
524])
525
526dnl use: EVAS_CHECK_LOADER_DEP_WEBP(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
527
528AC_DEFUN([EVAS_CHECK_LOADER_DEP_WEBP],
529[
530
531have_dep="no"
532evas_image_loader_[]$1[]_cflags=""
533evas_image_loader_[]$1[]_libs=""
534
535AC_CHECK_HEADER([webp/decode.h], [have_dep="yes"])
536
537if 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 )
545fi
546
547if test "x$2" = "xstatic" && test "x${have_dep}" = "xyes" ; then
548 requirements_libs_evas="${evas_image_loader_[]$1[]_libs} ${requirements_libs_evas}"
549fi
550
551AC_SUBST([evas_image_loader_$1_cflags])
552AC_SUBST([evas_image_loader_$1_libs])
553
554AS_IF([test "x${have_dep}" = "xyes"], [$3], [$4])
555
556])
557
558dnl use: EVAS_CHECK_LOADER_DEP_XPM(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
559
560AC_DEFUN([EVAS_CHECK_LOADER_DEP_XPM],
561[
562
563have_dep="yes"
564evas_image_loader_[]$1[]_cflags=""
565evas_image_loader_[]$1[]_libs=""
566
567AC_SUBST([evas_image_loader_$1_cflags])
568AC_SUBST([evas_image_loader_$1_libs])
569
570AS_IF([test "x${have_dep}" = "xyes"], [$3], [$4])
571
572])
573
574dnl use: EVAS_CHECK_IMAGE_LOADER(loader, want_loader, macro)
575AC_DEFUN([EVAS_CHECK_IMAGE_LOADER],
576[dnl
577m4_pushdef([UP], m4_toupper([$1]))dnl
578m4_pushdef([DOWN], m4_tolower([$1]))dnl
579
580want_loader="$2"
581want_static_loader="no"
582have_loader="no"
583have_evas_image_loader_[]DOWN="no"
584
585AC_MSG_CHECKING([whether to enable $1 image loader])
586AC_MSG_RESULT([${want_loader}])
587
588if test "x${want_loader}" = "xyes" -o "x${want_loader}" = "xstatic" -o "x${want_loader}" = "xauto"; then
589 m4_default([EVAS_CHECK_LOADER_DEP_]m4_defn([UP]))(DOWN, ${want_loader}, [have_loader="yes"], [have_loader="no"])
590fi
591
592if test "x${have_loader}" = "xno"; then
593 if test "x${want_loader}" = "xyes" -o "x${want_loader}" = "xstatic"; then
594 AC_MSG_ERROR([$1 dependencies not found])
595 fi
596fi
597
598AC_MSG_CHECKING([whether $1 image loader will be built])
599AC_MSG_RESULT([${have_loader}])
600
601if test "x${have_loader}" = "xyes" ; then
602 if test "x${want_loader}" = "xstatic" ; then
603 have_evas_image_loader_[]DOWN="static"
604 want_static_loader="yes"
605 else
606 have_evas_image_loader_[]DO