summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2012-12-02 22:35:45 +0000
committerVincent Torri <vincent.torri@gmail.com>2012-12-02 22:35:45 +0000
commit7d6010b12c47a20e492da808e3192c3f87dab619 (patch)
tree26c6fd189e046a76560c0bc740b85f4d767ae399 /m4
parent53fc441d5475155965d92da89502fe4634a561b2 (diff)
merge: add escape ecore, fix several bugs
SVN revision: 79995
Diffstat (limited to 'm4')
-rw-r--r--m4/ecore_check_c_extension.m442
-rw-r--r--m4/ecore_check_module.m495
-rw-r--r--m4/efl_check_libs.m42
-rw-r--r--m4/efl_threads.m49
-rw-r--r--m4/evas_check_engine.m47
-rw-r--r--m4/evas_check_loader.m44
6 files changed, 139 insertions, 20 deletions
diff --git a/m4/ecore_check_c_extension.m4 b/m4/ecore_check_c_extension.m4
new file mode 100644
index 0000000..1ef3bd2
--- /dev/null
+++ b/m4/ecore_check_c_extension.m4
@@ -0,0 +1,42 @@
1dnl use: ECORE_CHECK_X_EXTENSION(Foo, header, lib, func, want)
2AC_DEFUN([ECORE_CHECK_X_EXTENSION],
3[
4pushdef([UP], translit([$1], [a-z], [A-Z]))dnl
5pushdef([DOWN], translit([$1], [A-Z], [a-z]))dnl
6
7UP[]_CFLAGS=""
8UP[]_LIBS=""
9use_[]DOWN="no"
10
11if test "x$5" != "xno"; then
12 SAVE_CFLAGS=$CFLAGS
13 CFLAGS="$x_cflags $x_includes"
14 AC_CHECK_HEADER(X11/extensions/$2,
15 [
16 AC_CHECK_LIB($3, $4,
17 [
18 AC_DEFINE(ECORE_[]UP, 1, [Build support for $1])
19 UP[]_LIBS="-l$3"
20 use_[]DOWN="yes"
21 ],
22 [use_[]DOWN="no"],
23 [$x_libs]
24 )
25 ],
26 [ use_[]DOWN="no" ],
27 [ #include <X11/Xlib.h> ]
28 )
29 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
37AC_SUBST(UP[]_CFLAGS)
38AC_SUBST(UP[]_LIBS)
39
40popdef([UP])
41popdef([DOWN])
42])
diff --git a/m4/ecore_check_module.m4 b/m4/ecore_check_module.m4
new file mode 100644
index 0000000..8d0d76b
--- /dev/null
+++ b/m4/ecore_check_module.m4
@@ -0,0 +1,95 @@
1dnl use: ECORE_CHECK_MODULE(Foo, default-enabled, description[, dependency[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]])
2AC_DEFUN([ECORE_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
7have_ecore_[]m4_defn([DOWN])=no
8ecore_[]m4_defn([DOWN])[]_cflags=
9ecore_[]m4_defn([DOWN])[]_libs=
10want_module=$2
11
12AC_ARG_ENABLE(ecore-$1,
13 [AC_HELP_STRING(
14 [--enable-ecore-$1],
15 [enable the ecore_]m4_defn([DOWN])[ module])],
16 [
17 if test "x${enableval}" = "xyes" ; then
18 want_module="yes"
19 else
20 want_module="no"
21 fi
22 ],
23 [])
24
25AC_MSG_CHECKING([whether Ecore_$3 module is to be built])
26
27if test "x${want_module}" = "xyes" ; then
28 if test "x$4" = "x" || test "x$4" = "xyes" ; then
29 AC_DEFINE([BUILD_ECORE_]m4_defn([UP]), [1], [Build Ecore_$3 Module])
30 have_ecore_[]m4_defn([DOWN])="yes"
31 ecore_[]m4_defn([DOWN])[]_libs="-lecore_[]m4_defn([DOWN])"
32 AC_MSG_RESULT([yes])
33 else
34 AC_MSG_RESULT([no (dependency failed)])
35 fi
36else
37 AC_MSG_RESULT([no])
38fi
39
40AM_CONDITIONAL([BUILD_ECORE_]UP, [test "x$have_ecore_]DOWN[" = "xyes"])
41
42AS_IF([test "x$have_ecore_[]m4_defn([DOWN])" = "xyes"], [$5], [$6])
43
44AC_SUBST(ecore_[]m4_defn([DOWN])[]_cflags)
45AC_SUBST(ecore_[]m4_defn([DOWN])[]_libs)
46
47m4_popdef([UP])
48m4_popdef([DOWN])
49])
50
51dnl use: ECORE_EVAS_CHECK_MODULE_FULL(foo-bar, evas-module, want, description, backend[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
52AC_DEFUN([ECORE_EVAS_CHECK_MODULE_FULL],
53[
54m4_pushdef([UP], m4_translit([[$1]], [-a-z], [_A-Z]))dnl
55m4_pushdef([DOWN], m4_translit([[$1]], [-A-Z], [_a-z]))dnl
56
57have_ecore_evas_[]m4_defn([DOWN])="no"
58want_module="$3"
59
60AC_ARG_ENABLE(ecore-evas-$1,
61 [AC_HELP_STRING(
62 [--enable-ecore-evas-$1],
63 [enable $4 support in the ecore_evas module.])],
64 [
65 if test "x${enableval}" = "xyes" ; then
66 want_module="yes"
67 else
68 want_module="no"
69 fi
70 ],
71 [])
72
73AC_MSG_CHECKING([whether ecore_evas $4 support is to be built])
74AC_MSG_RESULT([${want_module}])
75
76if test "x$2" = "xyes" && \
77 test "x$5" = "xyes" && \
78 test "x$have_ecore_evas" = "xyes" && \
79 test "x$want_module" = "xyes" ; then
80 AC_DEFINE([BUILD_ECORE_EVAS_]m4_defn([UP]), [1], [Support for $4 Engine in Ecore_Evas])
81 have_ecore_evas_[]m4_defn([DOWN])="yes"
82fi
83
84AC_MSG_CHECKING([whether ecore_evas $4 support is built])
85AC_MSG_RESULT([$have_ecore_evas_]m4_defn([DOWN]))
86
87AS_IF([test "x$have_ecore_evas_[]m4_defn([DOWN])" = "xyes"], [$6], [$7])
88
89m4_popdef([UP])
90m4_popdef([DOWN])
91])
92
93dnl use: ECORE_EVAS_CHECK_MODULE(foo-bar, want, description, backend[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
94AC_DEFUN([ECORE_EVAS_CHECK_MODULE],
95[ECORE_EVAS_CHECK_MODULE_FULL([$1], [$1], [$2], [$3], [$4], [$5], [$6])])
diff --git a/m4/efl_check_libs.m4 b/m4/efl_check_libs.m4
index cbdb11b..c43e8d0 100644
--- a/m4/efl_check_libs.m4
+++ b/m4/efl_check_libs.m4
@@ -26,7 +26,6 @@ if test "x${have_dep}" = "xyes" ; then
26 [ 26 [
27 have_dep="yes" 27 have_dep="yes"
28 requirements_libs_[]m4_defn([DOWNEFL])="${requirements_libs_[]m4_defn([DOWNEFL])} -ljpeg" 28 requirements_libs_[]m4_defn([DOWNEFL])="${requirements_libs_[]m4_defn([DOWNEFL])} -ljpeg"
29 requirements_libs_deps_[]m4_defn([DOWNEFL])="${requirements_libs_deps_[]m4_defn([DOWNEFL])} -ljpeg"
30 ], 29 ],
31 [ 30 [
32 AC_MSG_ERROR("Cannot find libjpeg library. Make sure your LDFLAGS environment variable contains include lines for the location of this file") 31 AC_MSG_ERROR("Cannot find libjpeg library. Make sure your LDFLAGS environment variable contains include lines for the location of this file")
@@ -66,7 +65,6 @@ else
66 [ 65 [
67 _efl_have_lib="yes" 66 _efl_have_lib="yes"
68 requirements_libs_[]m4_defn([DOWNEFL])="${requirements_libs_[]m4_defn([DOWNEFL])} -lz" 67 requirements_libs_[]m4_defn([DOWNEFL])="${requirements_libs_[]m4_defn([DOWNEFL])} -lz"
69 requirements_libs_deps_[]m4_defn([DOWNEFL])="${requirements_libs_deps_[]m4_defn([DOWNEFL])} -lz"
70 ], 68 ],
71 [ 69 [
72 AC_MSG_ERROR(["Cannot find libjpeg library. Make sure your LDFLAGS environment variable contains include lines for the location of this file"]) 70 AC_MSG_ERROR(["Cannot find libjpeg library. Make sure your LDFLAGS environment variable contains include lines for the location of this file"])
diff --git a/m4/efl_threads.m4 b/m4/efl_threads.m4
index bba617f..a657500 100644
--- a/m4/efl_threads.m4
+++ b/m4/efl_threads.m4
@@ -28,15 +28,10 @@ case "$host_os" in
28 AC_DEFINE([EFL_HAVE_WIN32_THREADS], [1], [Define to mention that Win32 threads are supported]) 28 AC_DEFINE([EFL_HAVE_WIN32_THREADS], [1], [Define to mention that Win32 threads are supported])
29 AC_DEFINE([EFL_HAVE_THREADS], [1], [Define to mention that POSIX or Win32 threads are supported]) 29 AC_DEFINE([EFL_HAVE_THREADS], [1], [Define to mention that POSIX or Win32 threads are supported])
30 ;; 30 ;;
31 solaris*)
32 _efl_enable_posix_threads="yes"
33 _efl_threads_cflags="-mt"
34 _efl_threads_libs="-mt"
35 ;;
36 *) 31 *)
37 _efl_enable_posix_threads="yes" 32 _efl_enable_posix_threads="yes"
38 _efl_threads_cflags="-pthread" 33 _efl_threads_cflags="-D_REENTRANT"
39 _efl_threads_libs="-pthread" 34 _efl_threads_libs="-lpthread"
40 ;; 35 ;;
41esac 36esac
42 37
diff --git a/m4/evas_check_engine.m4 b/m4/evas_check_engine.m4
index b380394..599cb33 100644
--- a/m4/evas_check_engine.m4
+++ b/m4/evas_check_engine.m4
@@ -51,7 +51,6 @@ fi
51 51
52if test "x$3" = "xstatic" && test "x${have_dep}" = "xyes" ; then 52if test "x$3" = "xstatic" && test "x${have_dep}" = "xyes" ; then
53 requirements_libs_evas="${evas_engine_[]$1[]_libs} ${requirements_libs_evas}" 53 requirements_libs_evas="${evas_engine_[]$1[]_libs} ${requirements_libs_evas}"
54 requirements_libs_deps_evas="${evas_engine_[]$1[]_libs} ${requirements_libs_deps_evas}"
55fi 54fi
56 55
57AC_SUBST([evas_engine_$1_cflags]) 56AC_SUBST([evas_engine_$1_cflags])
@@ -174,7 +173,6 @@ fi
174 173
175if test "x$3" = "xstatic" && test "x${have_dep}" = "xyes" ; then 174if test "x$3" = "xstatic" && test "x${have_dep}" = "xyes" ; then
176 requirements_libs_evas="${evas_engine_[]$1[]_libs} ${requirements_libs_evas}" 175 requirements_libs_evas="${evas_engine_[]$1[]_libs} ${requirements_libs_evas}"
177 requirements_libs_deps_evas="${evas_engine_[]$1[]_libs} ${requirements_libs_deps_evas}"
178fi 176fi
179 177
180AC_SUBST([evas_engine_$1_cflags]) 178AC_SUBST([evas_engine_$1_cflags])
@@ -346,7 +344,6 @@ fi
346 344
347if test "x$3" = "xstatic" && test "x${have_dep}" = "xyes" ; then 345if test "x$3" = "xstatic" && test "x${have_dep}" = "xyes" ; then
348 requirements_libs_evas="${evas_engine_[]$1[]_libs} ${requirements_libs_evas}" 346 requirements_libs_evas="${evas_engine_[]$1[]_libs} ${requirements_libs_evas}"
349 requirements_libs_deps_evas="${evas_engine_[]$1[]_libs} ${requirements_libs_deps_evas}"
350 requirements_pc_evas="${requirement} ${requirements_pc_evas}" 347 requirements_pc_evas="${requirement} ${requirements_pc_evas}"
351 requirements_pc_deps_evas="${requirement} ${requirements_pc_deps_evas}" 348 requirements_pc_deps_evas="${requirement} ${requirements_pc_deps_evas}"
352fi 349fi
@@ -376,7 +373,6 @@ AC_CHECK_HEADER([windows.h],
376 373
377if test "x$3" = "xstatic" && test "x${have_dep}" = "xyes" ; then 374if test "x$3" = "xstatic" && test "x${have_dep}" = "xyes" ; then
378 requirements_libs_evas="${evas_engine_[]$1[]_libs} ${requirements_libs_evas}" 375 requirements_libs_evas="${evas_engine_[]$1[]_libs} ${requirements_libs_evas}"
379 requirements_libs_deps_evas="${evas_engine_[]$1[]_libs} ${requirements_libs_deps_evas}"
380fi 376fi
381 377
382AC_SUBST([evas_engine_$1_cflags]) 378AC_SUBST([evas_engine_$1_cflags])
@@ -403,7 +399,6 @@ AC_CHECK_HEADER([ddraw.h],
403 399
404if test "x$3" = "xstatic" && test "x${have_dep}" = "xyes" ; then 400if test "x$3" = "xstatic" && test "x${have_dep}" = "xyes" ; then
405 requirements_libs_evas="${evas_engine_[]$1[]_libs} ${requirements_libs_evas}" 401 requirements_libs_evas="${evas_engine_[]$1[]_libs} ${requirements_libs_evas}"
406 requirements_libs_deps_evas="${evas_engine_[]$1[]_libs} ${requirements_libs_deps_evas}"
407fi 402fi
408 403
409AC_SUBST([evas_engine_$1_cflags]) 404AC_SUBST([evas_engine_$1_cflags])
@@ -430,7 +425,6 @@ AC_CHECK_HEADERS([d3d9.h d3dx9.h],
430 425
431if test "x$3" = "xstatic" && test "x${have_dep}" = "xyes" ; then 426if test "x$3" = "xstatic" && test "x${have_dep}" = "xyes" ; then
432 requirements_libs_evas="${evas_engine_[]$1[]_libs} ${requirements_libs_evas}" 427 requirements_libs_evas="${evas_engine_[]$1[]_libs} ${requirements_libs_evas}"
433 requirements_libs_deps_evas="${evas_engine_[]$1[]_libs} ${requirements_libs_deps_evas}"
434fi 428fi
435 429
436AC_SUBST([evas_engine_$1_cflags]) 430AC_SUBST([evas_engine_$1_cflags])
@@ -479,7 +473,6 @@ AC_LANG_POP([Objective C])
479 473
480if test "x$3" = "xstatic" && test "x${have_dep}" = "xyes" ; then 474if test "x$3" = "xstatic" && test "x${have_dep}" = "xyes" ; then
481 requirements_libs_evas="${evas_engine_[]$1[]_libs} ${requirements_libs_evas}" 475 requirements_libs_evas="${evas_engine_[]$1[]_libs} ${requirements_libs_evas}"
482 requirements_libs_deps_evas="${evas_engine_[]$1[]_libs} ${requirements_libs_deps_evas}"
483fi 476fi
484 477
485AC_SUBST([evas_engine_$1_cflags]) 478AC_SUBST([evas_engine_$1_cflags])
diff --git a/m4/evas_check_loader.m4 b/m4/evas_check_loader.m4
index 66cb980..5dc01d2 100644
--- a/m4/evas_check_loader.m4
+++ b/m4/evas_check_loader.m4
@@ -84,7 +84,6 @@ fi
84 84
85if test "x$2" = "xstatic" && test "x${have_dep}" = "xyes" ; then 85if test "x$2" = "xstatic" && test "x${have_dep}" = "xyes" ; then
86 requirements_libs_evas="${evas_image_loader_[]$1[]_libs} ${requirements_libs_evas}" 86 requirements_libs_evas="${evas_image_loader_[]$1[]_libs} ${requirements_libs_evas}"
87 requirements_libs_deps_evas="${evas_image_loader_[]$1[]_libs} ${requirements_libs_deps_evas}"
88fi 87fi
89 88
90AC_SUBST([evas_image_loader_$1_cflags]) 89AC_SUBST([evas_image_loader_$1_cflags])
@@ -149,7 +148,6 @@ fi
149 148
150if test "x$2" = "xstatic" && test "x${have_dep}" = "xyes" ; then 149if test "x$2" = "xstatic" && test "x${have_dep}" = "xyes" ; then
151 requirements_libs_evas="${evas_image_loader_[]$1[]_libs} ${requirements_libs_evas}" 150 requirements_libs_evas="${evas_image_loader_[]$1[]_libs} ${requirements_libs_evas}"
152 requirements_libs_deps_evas="${evas_image_loader_[]$1[]_libs} ${requirements_libs_deps_evas}"
153fi 151fi
154 152
155AC_SUBST([evas_image_loader_$1_cflags]) 153AC_SUBST([evas_image_loader_$1_cflags])
@@ -350,7 +348,6 @@ fi
350 348
351if test "x$2" = "xstatic" && test "x${have_dep}" = "xyes" ; then 349if test "x$2" = "xstatic" && test "x${have_dep}" = "xyes" ; then
352 requirements_libs_evas="${evas_image_loader_[]$1[]_libs} ${requirements_libs_evas}" 350 requirements_libs_evas="${evas_image_loader_[]$1[]_libs} ${requirements_libs_evas}"
353 requirements_libs_deps_evas="${evas_image_loader_[]$1[]_libs} ${requirements_libs_deps_evas}"
354fi 351fi
355 352
356AC_SUBST([evas_image_loader_$1_cflags]) 353AC_SUBST([evas_image_loader_$1_cflags])
@@ -399,7 +396,6 @@ fi
399 396
400if test "x$2" = "xstatic" && test "x${have_dep}" = "xyes" ; then 397if test "x$2" = "xstatic" && test "x${have_dep}" = "xyes" ; then
401 requirements_libs_evas="${evas_image_loader_[]$1[]_libs} ${requirements_libs_evas}" 398 requirements_libs_evas="${evas_image_loader_[]$1[]_libs} ${requirements_libs_evas}"
402 requirements_libs_deps_evas="${evas_image_loader_[]$1[]_libs} ${requirements_libs_deps_evas}"
403fi 399fi
404 400
405AC_SUBST([evas_image_loader_$1_cflags]) 401AC_SUBST([evas_image_loader_$1_cflags])