summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2014-04-10 20:00:50 -0400
committerMike Blumenkrantz <zmike@samsung.com>2014-04-10 20:00:50 -0400
commit342ebd5c26b851083787c723f285f51e00d1d5d7 (patch)
treea15f8b6458facbc3316f5a9c5c7c253d6aea99d3
parenta2026425d136ff2aa95ae2f8e7d87a1a77bd7124 (diff)
apparently this is how we're doing eolian bin finding
-rw-r--r--configure.ac4
-rw-r--r--m4/efl_binary.m479
2 files changed, 82 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index cc9bcc1..4d65f7b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -601,7 +601,9 @@ AC_SUBST([e_cflags])
601AC_SUBST([e_configflags]) 601AC_SUBST([e_configflags])
602AC_SUBST([requirements_e]) 602AC_SUBST([requirements_e])
603 603
604AC_PATH_PROG([EOLIAN], [eolian_gen]) 604EFL_WITH_BIN([eolian], [eolian-gen], [eolian_gen])
605# Force the helper to try external eolian-gen
606AM_CONDITIONAL(HAVE_EOLIAN_GEN, [true])
605EOLIAN_FLAGS=`pkg-config --variable=eolian_flags eo evas edje` 607EOLIAN_FLAGS=`pkg-config --variable=eolian_flags eo evas edje`
606AC_SUBST(EOLIAN_FLAGS) 608AC_SUBST(EOLIAN_FLAGS)
607 609
diff --git a/m4/efl_binary.m4 b/m4/efl_binary.m4
new file mode 100644
index 0000000..91a26b2
--- /dev/null
+++ b/m4/efl_binary.m4
@@ -0,0 +1,79 @@
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 check 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
46
47dnl Macro that check if a binary is built or not
48
49dnl Usage: EFL_WITH_BIN(package, binary, default_value)
50dnl Call AC_SUBST(_binary) (_binary is the lowercase of binary, - being transformed into _ by default, or the value set by the user)
51
52AC_DEFUN([EFL_WITH_BIN],
53[
54
55m4_pushdef([DOWN], m4_translit([[$2]], [-A-Z], [_a-z]))dnl
56m4_pushdef([UP], m4_translit([[$2]], [-a-z], [_A-Z]))dnl
57
58dnl configure option
59
60AC_ARG_WITH([$2],
61 [AC_HELP_STRING([--with-$2=PATH], [specify a specific path to ]DOWN[ @<:@default=$3@:>@])],
62 [
63 _efl_with_binary=${withval}
64 _efl_binary_define="yes"
65 ],
66 [
67 _efl_with_binary=$(pkg-config --variable=prefix $1)/bin/$3
68 _efl_binary_define="no"
69 ])
70
71DOWN=${_efl_with_binary}
72AC_MSG_NOTICE(DOWN[ set to ${_efl_with_binary}])
73
74with_binary_[]m4_defn([DOWN])=${_efl_with_binary}
75
76AM_CONDITIONAL(HAVE_[]UP, [test "x${_efl_binary_define}" = "xyes"])
77AC_SUBST(DOWN)
78
79])