summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@gmail.com>2012-12-07 23:16:43 +0000
committerGustavo Sverzut Barbieri <barbieri@gmail.com>2012-12-07 23:16:43 +0000
commitc6e0c9588343fa78799904bbd7fa42caff1c381b (patch)
tree3462ca100642b2cb2382e3f243b0f0ab564e8915 /m4
parent6988d2685b483b9f28e9b99300fd30ac5b40161d (diff)
efl: almost final ecore/evas/ecore-evas options integration.
Many changes in this commit, but overall it should work. If not let me know. * ECORE_CHECK_X_EXTENSION() will now fail if Xlib extension is not found. * remove usage of ECORE_EVAS_CHECK_MODULE(), using the simplified ECORE_EVAS_MODULE() * EVAS_CHECK_ENGINE() will not declare an option anymore. * fixed --with-x11 and --with-opengl regarding defaults. * fixed typo in EVAS_STATIC_BUILD_SOFTWARE_X11 -> XLIB conditional * simplified Xi2 and Xgestures support under --enable-gesture. Let me know if these should be checked separately. * remove every other X extension option, they are all forced by now. If no major showstopper appears with this we may remove all the #ifdef in the code! If there is something broken, let me know. Next on the list for the weekend is to finish the option checks for SDL, Wayland-EGL, Cocoa and similar. SVN revision: 80505
Diffstat (limited to 'm4')
-rw-r--r--m4/ecore_check_c_extension.m431
-rw-r--r--m4/ecore_check_module.m448
-rw-r--r--m4/evas_check_engine.m416
3 files changed, 7 insertions, 88 deletions
diff --git a/m4/ecore_check_c_extension.m4 b/m4/ecore_check_c_extension.m4
index 1ef3bd2..9918a4b 100644
--- a/m4/ecore_check_c_extension.m4
+++ b/m4/ecore_check_c_extension.m4
@@ -1,42 +1,23 @@
1dnl use: ECORE_CHECK_X_EXTENSION(Foo, header, lib, func, want) 1dnl use: ECORE_CHECK_X_EXTENSION(Foo, header, lib, func)
2AC_DEFUN([ECORE_CHECK_X_EXTENSION], 2AC_DEFUN([ECORE_CHECK_X_EXTENSION],
3[ 3[
4pushdef([UP], translit([$1], [a-z], [A-Z]))dnl 4pushdef([UP], translit([$1], [a-z], [A-Z]))dnl
5pushdef([DOWN], translit([$1], [A-Z], [a-z]))dnl
6 5
7UP[]_CFLAGS=""
8UP[]_LIBS=""
9use_[]DOWN="no"
10
11if test "x$5" != "xno"; then
12 SAVE_CFLAGS=$CFLAGS 6 SAVE_CFLAGS=$CFLAGS
13 CFLAGS="$x_cflags $x_includes" 7 CFLAGS="$x_cflags $x_includes"
14 AC_CHECK_HEADER(X11/extensions/$2, 8 AC_CHECK_HEADER(X11/extensions/$2,
15 [ 9 [
16 AC_CHECK_LIB($3, $4, 10 AC_CHECK_LIB($3, $4,
17 [ 11 [AC_DEFINE(ECORE_[]UP, 1, [Build support for $1])],
18 AC_DEFINE(ECORE_[]UP, 1, [Build support for $1]) 12 [AC_MSG_ERROR([Missing support for X extension: $1])],
19 UP[]_LIBS="-l$3" 13 [$x_libs])
20 use_[]DOWN="yes"
21 ],
22 [use_[]DOWN="no"],
23 [$x_libs]
24 )
25 ], 14 ],
26 [ use_[]DOWN="no" ], 15 [AC_MSG_ERROR([Missing X11/extensions/$2])],
27 [ #include <X11/Xlib.h> ] 16 [ #include <X11/Xlib.h> ]
28 ) 17 )
29 CFLAGS=$SAVE_CFLAGS 18 CFLAGS=$SAVE_CFLAGS
30else
31 use_[]DOWN="no"
32 AC_MSG_NOTICE([$1 support disabled])
33fi
34
35ECORE_X_LIBS="${ECORE_X_LIBS} ${UP[]_LIBS}"
36 19
37AC_SUBST(UP[]_CFLAGS) 20ECORE_X_LIBS="${ECORE_X_LIBS} -l$3"
38AC_SUBST(UP[]_LIBS)
39 21
40popdef([UP]) 22popdef([UP])
41popdef([DOWN])
42]) 23])
diff --git a/m4/ecore_check_module.m4 b/m4/ecore_check_module.m4
index 554992d..2aa38c3 100644
--- a/m4/ecore_check_module.m4
+++ b/m4/ecore_check_module.m4
@@ -71,51 +71,3 @@ AM_CONDITIONAL([BUILD_ECORE_EVAS_]UP, [test "x$have_ecore_evas_]m4_defn([DOWN])[
71m4_popdef([UP]) 71m4_popdef([UP])
72m4_popdef([DOWN]) 72m4_popdef([DOWN])
73]) 73])
74
75dnl use: ECORE_EVAS_CHECK_MODULE_FULL(foo-bar, evas-module, want, description, backend[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
76AC_DEFUN([ECORE_EVAS_CHECK_MODULE_FULL],
77[
78m4_pushdef([UP], m4_translit([[$1]], [-a-z], [_A-Z]))dnl
79m4_pushdef([DOWN], m4_translit([[$1]], [-A-Z], [_a-z]))dnl
80
81have_ecore_evas_[]m4_defn([DOWN])="no"
82want_module="$3"
83
84AC_ARG_ENABLE(ecore-evas-$1,
85 [AC_HELP_STRING(
86 [--enable-ecore-evas-$1],
87 [enable $4 support in the ecore_evas module.])],
88 [
89 if test "x${enableval}" = "xyes" ; then
90 want_module="yes"
91 else
92 want_module="no"
93 fi
94 ],
95 [])
96
97AC_MSG_CHECKING([whether ecore_evas $4 support is to be built])
98AC_MSG_RESULT([${want_module}])
99
100if test "x$2" = "xyes" && \
101 test "x$5" = "xyes" && \
102 test "x$have_ecore_evas" = "xyes" && \
103 test "x$want_module" = "xyes" ; then
104 AC_DEFINE([BUILD_ECORE_EVAS_]m4_defn([UP]), [1], [Support for $4 Engine in Ecore_Evas])
105 have_ecore_evas_[]m4_defn([DOWN])="yes"
106fi
107
108AC_MSG_CHECKING([whether ecore_evas $4 support is built])
109AC_MSG_RESULT([$have_ecore_evas_]m4_defn([DOWN]))
110
111AM_CONDITIONAL([BUILD_ECORE_EVAS_]UP, [test "x$have_ecore_evas_]m4_defn([DOWN])[" = "xyes"])
112
113AS_IF([test "x$have_ecore_evas_[]m4_defn([DOWN])" = "xyes"], [$6], [$7])
114
115m4_popdef([UP])
116m4_popdef([DOWN])
117])
118
119dnl use: ECORE_EVAS_CHECK_MODULE(foo-bar, want, description, backend[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
120AC_DEFUN([ECORE_EVAS_CHECK_MODULE],
121[ECORE_EVAS_CHECK_MODULE_FULL([$1], [$1], [$2], [$3], [$4], [$5], [$6])])
diff --git a/m4/evas_check_engine.m4 b/m4/evas_check_engine.m4
index 35e8c19..2b54f7d 100644
--- a/m4/evas_check_engine.m4
+++ b/m4/evas_check_engine.m4
@@ -670,24 +670,10 @@ want_static_engine="no"
670have_engine="no" 670have_engine="no"
671have_evas_engine_[]DOWN="no" 671have_evas_engine_[]DOWN="no"
672 672
673AC_ARG_ENABLE([$1],
674 [AC_HELP_STRING([--enable-$1], [enable $4 rendering backend])],
675 [
676 if test "x${enableval}" = "xyes" ; then
677 want_engine="yes"
678 else
679 if test "x${enableval}" = "xstatic" ; then
680 want_engine="static"
681 else
682 want_engine="no"
683 fi
684 fi
685 ])
686
687AC_MSG_CHECKING([whether to enable $4 rendering backend]) 673AC_MSG_CHECKING([whether to enable $4 rendering backend])
688AC_MSG_RESULT([${want_engine}]) 674AC_MSG_RESULT([${want_engine}])
689 675
690if test "x${want_engine}" = "xyes" -o "x${want_engine}" = "xstatic" -o "x${want_engine}" = "xauto" ; then 676if test "x${want_engine}" = "xyes" -o "x${want_engine}" = "xstatic"; then
691 m4_default([EVAS_CHECK_ENGINE_DEP_]m4_defn([UP]))(DOWN, $3, ${want_engine}, [have_engine="yes"], [have_engine="no"]) 677 m4_default([EVAS_CHECK_ENGINE_DEP_]m4_defn([UP]))(DOWN, $3, ${want_engine}, [have_engine="yes"], [have_engine="no"])
692fi 678fi
693 679