summaryrefslogtreecommitdiff
path: root/legacy/ecore/m4/check_x_extension.m4
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@gmail.com>2010-02-06 00:19:46 +0000
committerGustavo Sverzut Barbieri <barbieri@gmail.com>2010-02-06 00:19:46 +0000
commitff3c762ba5a19af8bbc29a40dcb7ccb73b044ff5 (patch)
tree0ff0889b8276c47669959c1f95eb44d304ea57d8 /legacy/ecore/m4/check_x_extension.m4
parentf61a15fba9cc9da8efadd9f9c302f8cfc1000f05 (diff)
support for explicit disable of ecore-x extensions and tslib.
Avoid automagic detecting extensions such as Xprint, Xdamage and friends, as well as for tslib if ecore-fb is in use. This should help build systems avoid linkage with those even if they are present when Ecore is built. SVN revision: 45918
Diffstat (limited to 'legacy/ecore/m4/check_x_extension.m4')
-rw-r--r--legacy/ecore/m4/check_x_extension.m443
1 files changed, 24 insertions, 19 deletions
diff --git a/legacy/ecore/m4/check_x_extension.m4 b/legacy/ecore/m4/check_x_extension.m4
index 41fb8c18ed..a15120c7ef 100644
--- a/legacy/ecore/m4/check_x_extension.m4
+++ b/legacy/ecore/m4/check_x_extension.m4
@@ -1,4 +1,4 @@
1dnl use: ECORE_CHECK_X_EXTENSION(Foo, header, lib, func) 1dnl use: ECORE_CHECK_X_EXTENSION(Foo, header, lib, func, want)
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
@@ -8,24 +8,29 @@ UP[]_CFLAGS=""
8UP[]_LIBS="" 8UP[]_LIBS=""
9use_[]DOWN="no" 9use_[]DOWN="no"
10 10
11SAVE_CFLAGS=$CFLAGS 11if test "x$5" != "xno"; then
12CFLAGS="$x_cflags $x_includes" 12 SAVE_CFLAGS=$CFLAGS
13AC_CHECK_HEADER(X11/extensions/$2, 13 CFLAGS="$x_cflags $x_includes"
14 [ 14 AC_CHECK_HEADER(X11/extensions/$2,
15 AC_CHECK_LIB($3, $4, 15 [
16 [ 16 AC_CHECK_LIB($3, $4,
17 AC_DEFINE(ECORE_[]UP, 1, [Build support for $1]) 17 [
18 UP[]_LIBS="-l$3" 18 AC_DEFINE(ECORE_[]UP, 1, [Build support for $1])
19 use_[]DOWN="yes" 19 UP[]_LIBS="-l$3"
20 ], 20 use_[]DOWN="yes"
21 [ use_[]DOWN="no" ], 21 ],
22 [ $x_libs ] 22 [ use_[]DOWN="no" ],
23 ) 23 [ $x_libs ]
24 ], 24 )
25 [ use_[]DOWN="no" ], 25 ],
26 [ #include <X11/Xlib.h> ] 26 [ use_[]DOWN="no" ],
27) 27 [ #include <X11/Xlib.h> ]
28CFLAGS=$SAVE_CFLAGS 28 )
29 CFLAGS=$SAVE_CFLAGS
30else
31 use_[]DOWN="no"
32 AC_MSG_NOTICE([$1 support disabled])
33fi
29 34
30AC_SUBST(UP[]_CFLAGS) 35AC_SUBST(UP[]_CFLAGS)
31AC_SUBST(UP[]_LIBS) 36AC_SUBST(UP[]_LIBS)