summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--m4/efl_enable.m434
-rw-r--r--src/examples/eet/Makefile.am8
2 files changed, 39 insertions, 3 deletions
diff --git a/m4/efl_enable.m4 b/m4/efl_enable.m4
new file mode 100644
index 0000000000..78f6e0ab93
--- /dev/null
+++ b/m4/efl_enable.m4
@@ -0,0 +1,34 @@
1dnl Copyright (C) 2012 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 allows an EFL to not be built
5
6dnl Usage: EFL_ENABLE_LIB(lib, want)
7dnl Call AC_SUBST(BINARY_PRG) (BINARY is the uppercase of binary, - being transformed into _)
8dnl Define have_lib (- is transformed into _)
9dnl Define conditional EFL_BUILD_LIB (LIB is the uppercase of lib, - being transformed into _)
10
11AC_DEFUN([EFL_ENABLE_LIB],
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
17dnl configure option
18
19AC_ARG_ENABLE([build-$1],
20 [AC_HELP_STRING([--disable-build-$1], [disable building of ]DOWN)],
21 [
22 if test "x${enableval}" = "xyes" ; then
23 efl_want_build_[]m4_defn([DOWN])="yes"
24 else
25 efl_want_build_[]m4_defn([DOWN])="no"
26 fi
27 ],
28 [efl_want_build_[]m4_defn([DOWN])=$2])
29
30AC_MSG_CHECKING([whether to build ]DOWN[ binary])
31AC_MSG_RESULT([${efl_want_build_[]m4_defn([DOWN])}])
32
33AM_CONDITIONAL(EFL_BUILD_[]UP, test "x${efl_want_build_[]m4_defn([DOWN])}" = "xyes")
34])
diff --git a/src/examples/eet/Makefile.am b/src/examples/eet/Makefile.am
index bd64440268..1b8f49b18a 100644
--- a/src/examples/eet/Makefile.am
+++ b/src/examples/eet/Makefile.am
@@ -1,6 +1,8 @@
1MAINTAINERCLEANFILES = Makefile.in 1MAINTAINERCLEANFILES = Makefile.in
2AM_CPPFLAGS = \ 2AM_CPPFLAGS = \
3-I$(top_srcdir)/src/include/eina \
3-I$(top_srcdir)/src/lib/eet \ 4-I$(top_srcdir)/src/lib/eet \
5-I$(top_builddir)/src/include/eina \
4-I$(top_builddir)/src/lib/eet \ 6-I$(top_builddir)/src/lib/eet \
5@EET_CFLAGS@ 7@EET_CFLAGS@
6 8
@@ -39,10 +41,10 @@ eet-data-cipher_decipher.c
39examples: $(EXTRA_PROGRAMS) 41examples: $(EXTRA_PROGRAMS)
40 42
41install-examples: 43install-examples:
42 mkdir -p $(pkgdatadir)/examples 44 mkdir -p $(pkgdatadir)/examples/eet
43 $(install_sh_DATA) -c $(SRCS) $(pkgdatadir)/examples 45 $(install_sh_DATA) -c $(SRCS) $(pkgdatadir)/examples/eet
44 46
45uninstall-local: 47uninstall-local:
46 for f in $(SRCS) ; do \ 48 for f in $(SRCS) ; do \
47 rm -f $(pkgdatadir)/examples/$$f ; \ 49 rm -f $(pkgdatadir)/examples/eet/$$f ; \
48 done 50 done