summaryrefslogtreecommitdiff
path: root/legacy/eet/m4
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2012-09-17 16:35:38 +0000
committerVincent Torri <vincent.torri@gmail.com>2012-09-17 16:35:38 +0000
commit8abaff3bdf53ecc7e605b82b12e385b8c0a02327 (patch)
tree4c828ae7083f724fd0214cf3624b20a7cf9448d2 /legacy/eet/m4
parent12732ab7ebcacad66352d3d48306e9945a4a584f (diff)
merge: add eet
SVN revision: 76768
Diffstat (limited to 'legacy/eet/m4')
-rw-r--r--legacy/eet/m4/efl_binary.m479
-rw-r--r--legacy/eet/m4/efl_check_libs.m4119
2 files changed, 0 insertions, 198 deletions
diff --git a/legacy/eet/m4/efl_binary.m4 b/legacy/eet/m4/efl_binary.m4
deleted file mode 100644
index fc2f200509..0000000000
--- a/legacy/eet/m4/efl_binary.m4
+++ /dev/null
@@ -1,79 +0,0 @@
1dnl Copyright (C) 2010 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 checks if a binary is built or not
5
6dnl Usage: EFL_ENABLE_BIN(binary)
7dnl Call AC_SUBST(BINARY_PRG) (BINARY is the uppercase of binary, - being transformed into _)
8dnl Define have_binary (- is transformed into _)
9dnl Define conditional BUILD_BINARY (BINARY is the uppercase of binary, - being transformed into _)
10
11AC_DEFUN([EFL_ENABLE_BIN],
12[
13
14m4_pushdef([UP], m4_translit([[$1]], [-a-z], [_A-Z]))dnl
15m4_pushdef([DOWN], m4_translit([[$1]], [-A-Z], [_a-z]))dnl
16
17have_[]m4_defn([DOWN])="yes"
18
19dnl configure option
20
21AC_ARG_ENABLE([$1],
22 [AC_HELP_STRING([--disable-$1], [disable building of ]DOWN)],
23 [
24 if test "x${enableval}" = "xyes" ; then
25 have_[]m4_defn([DOWN])="yes"
26 else
27 have_[]m4_defn([DOWN])="no"
28 fi
29 ])
30
31AC_MSG_CHECKING([whether to build ]DOWN[ binary])
32AC_MSG_RESULT([$have_[]m4_defn([DOWN])])
33
34if test "x$have_[]m4_defn([DOWN])" = "xyes"; then
35 UP[]_PRG=DOWN[${EXEEXT}]
36fi
37
38AC_SUBST(UP[]_PRG)
39
40AM_CONDITIONAL(BUILD_[]UP, test "x$have_[]m4_defn([DOWN])" = "xyes")
41
42AS_IF([test "x$have_[]m4_defn([DOWN])" = "xyes"], [$2], [$3])
43
44])
45
46dnl Macro that specifies the binary to be used
47
48dnl Usage: EFL_WITH_BIN(binary, package, msg)
49dnl Call AC_SUBST(BINARY_PRG) (BINARY is the uppercase of binary, - being transformed into _)
50dnl Define with_binary (- is transformed into _)
51dnl Define conditional BUILD_BINARY (BINARY is the uppercase of binary, - being transformed into _)
52
53AC_DEFUN([EFL_WITH_BIN],
54[
55
56m4_pushdef([UP], m4_translit([[$1]], [-a-z], [_A-Z]))dnl
57m4_pushdef([DOWN], m4_translit([[$1]], [-A-Z], [_a-z]))dnl
58
59AC_REQUIRE([PKG_PROG_PKG_CONFIG])
60AC_MSG_NOTICE([$PKG_CONFIG])
61
62with_[]m4_defn([DOWN])=m4_esyscmd($PKG_CONFIG --variable=prefix $2)/bin/m4_defn([DOWN])
63
64dnl configure option
65
66AC_ARG_WITH([$1],
67 [AC_HELP_STRING([--with-$1-bin=PATH], [specify a specific path to ]DOWN)],
68 [
69 with_[]m4_defn([DOWN])=$withval
70 _efl_msg="( explicitely set)"
71 ])
72
73AC_MSG_NOTICE([$msg: ]m4_defn([DOWN])[$_efl_msg])
74
75AC_SUBST(with_[]m4_defn([DOWN]))
76
77AS_IF([test "x$have_[]m4_defn([DOWN])" = "xyes"], [$4], [$5])
78
79])
diff --git a/legacy/eet/m4/efl_check_libs.m4 b/legacy/eet/m4/efl_check_libs.m4
deleted file mode 100644
index b1c37894b6..0000000000
--- a/legacy/eet/m4/efl_check_libs.m4
+++ /dev/null
@@ -1,119 +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, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND)
11
12AC_DEFUN([_EFL_CHECK_LIB_LIBJPEG],
13[
14m4_pushdef([UPEFL], m4_translit([$1], [-a-z], [_A-Z]))dnl
15m4_pushdef([DOWNEFL], m4_translit([$1], [-A-Z], [_a-z]))dnl
16
17AC_CHECK_HEADER([jpeglib.h],
18 [have_dep="yes"],
19 [
20 AC_MSG_ERROR(["Cannot find jpeglib.h. Make sure your CFLAGS environment variable contains include lines for the location of this file"])
21 have_dep="no"
22 ])
23
24if test "x${have_dep}" = "xyes" ; then
25 AC_CHECK_LIB([jpeg], [jpeg_std_error],
26 [
27 have_dep="yes"
28 requirements_libs_[]m4_defn([DOWNEFL])="${requirements_libs_[]m4_defn([DOWNEFL])} -ljpeg"
29 ],
30 [
31 AC_MSG_ERROR("Cannot find libjpeg library. Make sure your LDFLAGS environment variable contains include lines for the location of this file")
32 have_dep="no"
33 ])
34fi
35
36AS_IF([test "x${have_dep}" = "xyes"], [$2], [$3])
37
38m4_popdef([DOWNEFL])
39m4_popdef([UPEFL])
40])
41
42dnl _EFL_CHECK_LIB_ZLIB is for internal use
43dnl _EFL_CHECK_LIB_ZLIB(EFL, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND)
44
45AC_DEFUN([_EFL_CHECK_LIB_ZLIB],
46[
47m4_pushdef([UPEFL], m4_translit([$1], [-a-z], [_A-Z]))dnl
48m4_pushdef([DOWNEFL], m4_translit([$1], [-A-Z], [_a-z]))dnl
49
50PKG_CHECK_EXISTS([zlib],
51 [
52 _efl_have_lib="yes"
53 requirements_pc_[]m4_defn([DOWNEFL])="${requirements_pc_[]m4_defn([DOWNEFL])} zlib"
54 ],
55 [
56 _efl_have_lib="no"
57 ])
58
59if test "x${_efl_have_lib}" = "xno" ; then
60 AC_CHECK_HEADER([zlib.h],
61 [_efl_have_lib="yes"],
62 [
63 AC_MSG_ERROR(["Cannot find zlib.h. Make sure your CFLAGS environment variable contains include lines for the location of this file"])
64 _efl_have_lib="no"
65 ])
66
67 if test "x${_efl_have_lib}" = "xyes" ; then
68 AC_CHECK_LIB([z], [zlibVersion],
69 [
70 _efl_have_lib="yes"
71 requirements_libs_[]m4_defn([DOWNEFL])="${requirements_libs_[]m4_defn([DOWNEFL])} -lz"
72 ],
73 [
74 AC_MSG_ERROR(["Cannot find libjpeg library. Make sure your LDFLAGS environment variable contains include lines for the location of this file"])
75 _efl_have_lib="no"
76 ])
77 fi
78fi
79
80AS_IF([test "x${_efl_have_lib}" = "xyes"], [$2], [$3])
81
82m4_popdef([DOWNEFL])
83m4_popdef([UPEFL])
84])
85
86dnl Macro that checks for a library
87dnl
88dnl EFL_CHECK_LIB(EFL, LIBRARY)
89dnl AC_DEFINE : EFL_HAVE_LIBRARY (LIBRARY being replaced by its value)
90
91AC_DEFUN([EFL_CHECK_LIB],
92[
93m4_pushdef([UP], m4_translit([$2], [-a-z], [_A-Z]))dnl
94m4_pushdef([DOWN], m4_translit([$2], [-A-Z], [_a-z]))dnl
95
96m4_default([_EFL_CHECK_LIB_]m4_defn([UP]))($1, [have_lib="yes"], [have_lib="no"])
97
98AC_MSG_CHECKING([for ]m4_defn([DOWN]))
99AC_MSG_RESULT([${have_lib}])
100
101if test "x${have_lib}" = "xyes" ; then
102 AC_DEFINE([HAVE_]m4_defn([UP]), [1], [Define to 1 if the `]m4_defn([DOWN])[' library is installed.])
103fi
104
105efl_lib_[]m4_defn([DOWN])="${have_lib}"
106
107m4_popdef([DOWN])
108m4_popdef([UP])
109])
110
111dnl Macro that iterates over a sequence of white separated libraries
112dnl and that calls EFL_CHECK_LIB() for each of these libraries
113dnl
114dnl EFL_CHECK_LIBS(EFL, LIBRARIES)
115
116AC_DEFUN([EFL_CHECK_LIBS],
117[
118m4_foreach_w([lib], [$2], [EFL_CHECK_LIB($1, m4_defn([lib]))])
119])