From 4b81a0b3de5ead6b311766d1bb369ba9b4fd52a9 Mon Sep 17 00:00:00 2001 From: Vincent Torri Date: Tue, 25 Sep 2012 08:01:31 +0000 Subject: [PATCH] merge: minor fix SVN revision: 77045 --- m4/efl_enable.m4 | 34 ++++++++++++++++++++++++++++++++++ src/examples/eet/Makefile.am | 8 +++++--- 2 files changed, 39 insertions(+), 3 deletions(-) create mode 100644 m4/efl_enable.m4 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 @@ +dnl Copyright (C) 2012 Vincent Torri +dnl That code is public domain and can be freely used or copied. + +dnl Macro that allows an EFL to not be built + +dnl Usage: EFL_ENABLE_LIB(lib, want) +dnl Call AC_SUBST(BINARY_PRG) (BINARY is the uppercase of binary, - being transformed into _) +dnl Define have_lib (- is transformed into _) +dnl Define conditional EFL_BUILD_LIB (LIB is the uppercase of lib, - being transformed into _) + +AC_DEFUN([EFL_ENABLE_LIB], +[ + +m4_pushdef([UP], m4_translit([[$1]], [-a-z], [_A-Z]))dnl +m4_pushdef([DOWN], m4_translit([[$1]], [-A-Z], [_a-z]))dnl + +dnl configure option + +AC_ARG_ENABLE([build-$1], + [AC_HELP_STRING([--disable-build-$1], [disable building of ]DOWN)], + [ + if test "x${enableval}" = "xyes" ; then + efl_want_build_[]m4_defn([DOWN])="yes" + else + efl_want_build_[]m4_defn([DOWN])="no" + fi + ], + [efl_want_build_[]m4_defn([DOWN])=$2]) + +AC_MSG_CHECKING([whether to build ]DOWN[ binary]) +AC_MSG_RESULT([${efl_want_build_[]m4_defn([DOWN])}]) + +AM_CONDITIONAL(EFL_BUILD_[]UP, test "x${efl_want_build_[]m4_defn([DOWN])}" = "xyes") +]) 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 @@ MAINTAINERCLEANFILES = Makefile.in AM_CPPFLAGS = \ +-I$(top_srcdir)/src/include/eina \ -I$(top_srcdir)/src/lib/eet \ +-I$(top_builddir)/src/include/eina \ -I$(top_builddir)/src/lib/eet \ @EET_CFLAGS@ @@ -39,10 +41,10 @@ eet-data-cipher_decipher.c examples: $(EXTRA_PROGRAMS) install-examples: - mkdir -p $(pkgdatadir)/examples - $(install_sh_DATA) -c $(SRCS) $(pkgdatadir)/examples + mkdir -p $(pkgdatadir)/examples/eet + $(install_sh_DATA) -c $(SRCS) $(pkgdatadir)/examples/eet uninstall-local: for f in $(SRCS) ; do \ - rm -f $(pkgdatadir)/examples/$$f ; \ + rm -f $(pkgdatadir)/examples/eet/$$f ; \ done