summaryrefslogtreecommitdiff
path: root/m4/ecore_check_c_extension.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/ecore_check_c_extension.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/ecore_check_c_extension.m4')
-rw-r--r--m4/ecore_check_c_extension.m431
1 files changed, 6 insertions, 25 deletions
diff --git a/m4/ecore_check_c_extension.m4 b/m4/ecore_check_c_extension.m4
index 1ef3bd2f91..9918a4b9a2 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])