From f5ccebf7d5b55dc7c68e799597158cccc0e00eca Mon Sep 17 00:00:00 2001 From: Vincent Torri Date: Fri, 15 Jan 2010 06:05:28 +0000 Subject: [PATCH] binary can be disabled SVN revision: 45168 --- legacy/eet/configure.ac | 19 ++++++++++----- legacy/eet/m4/efl_binary.m4 | 44 ++++++++++++++++++++++++++++++++++ legacy/eet/src/bin/Makefile.am | 3 ++- 3 files changed, 59 insertions(+), 7 deletions(-) create mode 100644 legacy/eet/m4/efl_binary.m4 diff --git a/legacy/eet/configure.ac b/legacy/eet/configure.ac index 99e93e1a14..6ddfd2ec6f 100644 --- a/legacy/eet/configure.ac +++ b/legacy/eet/configure.ac @@ -65,6 +65,8 @@ AC_ARG_ENABLE([amalgamation], ) AM_CONDITIONAL(EET_AMALGAMATION, test "x${do_amalgamation}" = "xyes") +EFL_ENABLE_BIN([eet]) + # Old eet file format support old_eet_file_format="yes" @@ -426,22 +428,27 @@ echo "------------------------------------------------------------------------" echo echo "Configuration Options Summary:" echo +echo " Amalgamation.........: ${do_amalgamation}" echo " Gnutls...............: ${have_gnutls}" echo " Openssl..............: ${have_openssl}" echo " Cipher support.....: ${have_cipher}" echo " Signature..........: ${have_signature}" echo " Thread Support.......: ${have_pthread}" echo -echo " Amalgamation.........: ${do_amalgamation}" -echo " Documentation........: ${build_doc}" +echo " Old eet file format..: ${old_eet_file_format}" +echo echo " Tests................: ${enable_tests}" echo " Coverage.............: ${enable_coverage}" echo -echo " Old eet file format..: ${old_eet_file_format}" +echo " Build eet............: $have_eet" echo -echo " Compilation..........: make" +echo " Documentation........: ${build_doc}" echo -echo " Installation.........: make install" +echo "Compilation............: make (or gmake)" +echo " CPPFLAGS.............: $CPPFLAGS" +echo " CFLAGS...............: $CFLAGS" +echo " LDFLAGS..............: $LDFLAGS" echo -echo " prefix.............: $prefix" +echo "Installation...........: make install (as root if needed, with 'su' or 'sudo')" +echo " prefix...............: $prefix" echo diff --git a/legacy/eet/m4/efl_binary.m4 b/legacy/eet/m4/efl_binary.m4 new file mode 100644 index 0000000000..0fe85ab6ae --- /dev/null +++ b/legacy/eet/m4/efl_binary.m4 @@ -0,0 +1,44 @@ +dnl Copyright (C) 2010 Vincent Torri +dnl That code is public domain and can be freely used or copied. + +dnl Macro that check if a binary is built or not + +dnl Usage: EFL_ENABLE_BIN(binary) +dnl Call AC_SUBST(BINARY_PRG) (BINARY is the uppercase of binary, - being tranformed into _) +dnl Define have_binary (- is tranformed into _) +dnl Define conditional BUILD_BINARY (BINARY is the uppercase of binary, - being tranformed into _) + +AC_DEFUN([EFL_ENABLE_BIN], +[ + +m4_pushdef([UP], m4_translit([[$1]], [-a-z], [_A-Z]))dnl +m4_pushdef([DOWN], m4_translit([[$1]], [-A-Z], [_a-z]))dnl + +have_[]m4_defn([DOWN])="yes" + +dnl configure option + +AC_ARG_ENABLE([$1], + [AC_HELP_STRING([--disable-$1], [disable building of ]DOWN)], + [ + if test "x${enableval}" = "xyes" ; then + have_[]m4_defn([DOWN])="yes" + else + have_[]m4_defn([DOWN])="no" + fi + ]) + +AC_MSG_CHECKING([whether to build ]DOWN[ binary]) +AC_MSG_RESULT([$have_[]m4_defn([DOWN])]) + +if test "x$have_[]m4_defn([DOWN])" = "xyes"; then + UP[]_PRG=DOWN[${EXEEXT}] +fi + +AC_SUBST(UP[]_PRG) + +AM_CONDITIONAL(BUILD_[]UP, test "x$have_[]m4_defn([DOWN])" = "xyes") + +AS_IF([test "x$have_[]m4_defn([DOWN])" = "xyes"], [$2], [$3]) + +]) diff --git a/legacy/eet/src/bin/Makefile.am b/legacy/eet/src/bin/Makefile.am index c0991c6dca..4fbb338451 100644 --- a/legacy/eet/src/bin/Makefile.am +++ b/legacy/eet/src/bin/Makefile.am @@ -12,7 +12,8 @@ AM_CPPFLAGS = \ @EINA_CFLAGS@ \ @EVIL_CFLAGS@ -bin_PROGRAMS = eet +bin_PROGRAMS = @EET_PRG@ +EXTRA_PROGRAMS = eet eet_SOURCES = eet_main.c eet_CFLAGS = @EET_CFLAGS@