[PATCH 14/31] Make Milena tools (milena/tools/) optional.

* configure.ac: Add option `--enable-tools'. (ENABLE_TOOLS): New conditional. Gather lines related to tools. * milena/Makefile.am (SUBDIRS) [ENABLE_TOOLS]: Add tools. --- ChangeLog | 9 +++++++++ configure.ac | 30 ++++++++++++++++++++---------- milena/Makefile.am | 4 ++++ 3 files changed, 33 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index ff0d142..d64a04d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,14 @@ 2009-05-11 Roland Levillain <roland@lrde.epita.fr> + Make Milena tools (milena/tools/) optional. + + * configure.ac: Add option `--enable-tools'. + (ENABLE_TOOLS): New conditional. + Gather lines related to tools. + * milena/Makefile.am (SUBDIRS) [ENABLE_TOOLS]: Add tools. + +2009-05-11 Roland Levillain <roland@lrde.epita.fr> + Make Milena applications (milena/apps/) optional. * configure.ac: Add option `--enable-apps'. diff --git a/configure.ac b/configure.ac index 5cb3f06..7b0aacb 100644 --- a/configure.ac +++ b/configure.ac @@ -87,15 +87,7 @@ if test "$GXX" = yes && test -z "$TESTS_CXXFLAGS_DEBUG"; then TESTS_CXXFLAGS_DEBUG="-O0 -ggdb -Wall -W -D_GLIBCXX_DEBUG -D_GLIBCXX_CONCEPT_CHECKS" fi -# ----------------- # -# Flags for tools. # -# ----------------- # -AC_ARG_VAR([TOOLS_CXXFLAGS]) -# We want fast binaries for tools. -if test "$GXX" = yes && test -z "$TOOLS_CXXFLAGS"; then - TOOLS_CXXFLAGS="-O3 -DNDEBUG -ggdb -Wall -W" -fi ## ------------------ ## @@ -176,10 +168,8 @@ AC_CONFIG_FILES([ milena/doc/tutorial/Makefile milena/doc/white_paper/Makefile milena/mesh/Makefile - milena/tools/Makefile ]) - ## ------- ## ## Tests. ## ## ------- ## @@ -333,4 +323,24 @@ if test "$GXX" = yes && test -z "$APPS_CXXFLAGS"; then APPS_CXXFLAGS="-O3 -DNDEBUG -ggdb -Wall -W" fi +## ------- ## +## Tools. ## +## ------- ## + +AC_ARG_ENABLE([tools], + [AS_HELP_STRING([--enable-tools], + [enable tools])]) +AM_CONDITIONAL([ENABLE_TOOLS], [test "x$enable_tools" = "xyes"]) + +# Ask for the creation of tools' Makefiles. +AC_CONFIG_FILES([milena/tools/Makefile]) + +# Flags for tools. +AC_ARG_VAR([TOOLS_CXXFLAGS]) +# We want fast binaries for tools. +if test "$GXX" = yes && test -z "$TOOLS_CXXFLAGS"; then + TOOLS_CXXFLAGS="-O3 -DNDEBUG -ggdb -Wall -W" +fi + + AC_OUTPUT diff --git a/milena/Makefile.am b/milena/Makefile.am index e267598..a854381 100644 --- a/milena/Makefile.am +++ b/milena/Makefile.am @@ -9,6 +9,10 @@ if ENABLE_APPS SUBDIRS += apps endif ENABLE_APPS +if ENABLE_TOOLS + SUBDIRS += tools +endif ENABLE_TOOLS + .PHONY: doc tutorial tools doc: -- 1.6.1.2
participants (1)
-
Roland Levillain