[nemiver/profiler: 11/48] Fix --enable-debuggeronly



commit ce1d252faa383106ab32111953d7570a107a6004
Author: Dodji Seketeli <dodji seketeli org>
Date:   Tue Aug 7 04:02:24 2012 -0400

    Fix --enable-debuggeronly
    
    	* configure.ac: Fix help string of --enable-idebuggeronly.  Call
    	AM_CONDITIONAL on ENABLE_IDEBUGGER_ONLY.  If
    	--enable-idebuggeronly is switched on, no workbench stuff can be
    	enabled with --enable-workbench.  Call AM_CONDITIONAL on
    	ENABLE_WORKBENCH.
    	* src/Makefile.am: If ENABLE_WORKBENCH is not set, do not build
    	workbench stuff under src.

 configure.ac    |   15 +++++++++++----
 src/Makefile.am |   17 ++++++++++++++++-
 2 files changed, 27 insertions(+), 5 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index a007b54..3c53661 100644
--- a/configure.ac
+++ b/configure.ac
@@ -129,7 +129,7 @@ dnl a list of enablexxx options
 dnl ***************************
 
 AC_ARG_ENABLE(idebuggeronly,
-              AS_HELP_STRING([--enable-idebugger-only=yes|no],
+              AS_HELP_STRING([--enable-idebuggeronly=yes|no],
                              [compile the idebuger iface only (default is no)]),
               ENABLE_IDEBUGGER_ONLY=$enableval,
               ENABLE_IDEBUGGER_ONLY=no)
@@ -137,6 +137,7 @@ if test x$ENABLE_IDEBUGGER_ONLY = xyes ; then
     ENABLE_DBGENGINE=yes
     ENABLE_WORKBENCH=no
 fi
+AM_CONDITIONAL(ENABLE_IDEBUGGER_ONLY, test x$ENABLE_IDEBUGGER_ONLY = xyes)
 
 AC_ARG_ENABLE(autotests,
               AS_HELP_STRING([--enable-autotests=yes|no],
@@ -164,19 +165,25 @@ AC_ARG_ENABLE(workbench,
                              [enable the graphical dbg workbench (default is yes)]),
               ENABLE_WORKBENCH=$enableval,
               ENABLE_WORKBENCH=yes)
+
+# If ENABLE_IDEBUGGER_ONLY was previously set to yes, then honour it.
+if test x$ENABLE_IDEBUGGER_ONLY = xyes; then
+   ENABLE_WORKBENCH=no;
+fi
+
 if test x$ENABLE_WORKBENCH = xyes ; then
     AC_DEFINE([WITH_WORKBENCH], 1, [compile the workbench])
 else
     ENABLE_WORKBENCH=no
 fi
-
+AM_CONDITIONAL(ENABLE_WORKBENCH, test x$ENABLE_WORKBENCH = xyes)
 
 AC_ARG_ENABLE(memoryview,
               AS_HELP_STRING([--enable-memoryview=yes|no],
                              [enable the memory view hex editor (default is yes)]),
               ENABLE_MEMORYVIEW=$enableval,
               [PKG_CHECK_EXISTS([gtkhex-3 >= $GTKHEX_VERSION], [ENABLE_MEMORYVIEW=yes], [ENABLE_MEMORYVIEW=no])])
-if test x$ENABLE_MEMORYVIEW = xyes ; then
+if test x$ENABLE_MEMORYVIEW = xyes -a x$ENABLE_WORKBENCH = xyes; then
     AC_DEFINE([WITH_MEMORYVIEW], 1, [compile the the memory view widget])
 else
     ENABLE_MEMORYVIEW=no
@@ -189,7 +196,7 @@ AC_ARG_ENABLE(dynamiclayout,
                              [enable the dynamic layout (default is yes)]),
               ENABLE_DYNAMICLAYOUT=$enableval,
               [PKG_CHECK_EXISTS([gdlmm-3.0 >= $LIBGDLMM_VERSION], [ENABLE_DYNAMICLAYOUT=yes], [ENABLE_DYNAMICLAYOUT=no])])
-if test x$ENABLE_DYNAMICLAYOUT = xyes ; then
+if test x$ENABLE_DYNAMICLAYOUT = xyes -a x$ENABLE_WORKBENCH = xyes ; then
     AC_DEFINE([WITH_DYNAMICLAYOUT], 1, [compile the dynamic layout])
 else
     ENABLE_DYNAMICLAYOUT=no
diff --git a/src/Makefile.am b/src/Makefile.am
index 902ec53..8fa2432 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,7 +1,20 @@
-SUBDIRS=common dbdimpl langs dbgengine confmgr uicommon workbench persp
+WORKBENCH_STUFF=uicommon workbench persp
+NON_WORKBENCH_STUFF= common dbdimpl langs dbgengine confmgr
+
+if ENABLE_WORKBENCH
+
+SUBDIRS=$(NON_WORKBENCH_STUFF) $(WORKBENCH_STUFF)
+
+else
+
+SUBDIRS=$(NON_WORKBENCH_STUFF)
+
+endif
 
 h=$(abs_srcdir)
 
+if ENABLE_WORKBENCH
+
 bin_PROGRAMS=nemiver
 nemiver_SOURCES=$(h)/main.cc
 nemiver_LDADD= \
@@ -9,6 +22,8 @@ nemiver_LDADD= \
 $(abs_top_builddir)/src/common/libnemivercommon.la \
 $(abs_top_builddir)/src/uicommon/libnemiveruicommon.la
 
+endif
+
 INCLUDES=\
 -DNEMIVERLOCALEDIR=\"$(nemiverlocaledir)\" \
 -DPREFIX=\""$(prefix)"\" \



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]