OSDN Git Service

Support assignment of DEBUGLEVEL at configure time.
authorKeith Marshall <keithmarshall@users.sourceforge.net>
Mon, 30 May 2011 08:42:52 +0000 (08:42 +0000)
committerKeith Marshall <keithmarshall@users.sourceforge.net>
Mon, 30 May 2011 08:42:52 +0000 (08:42 +0000)
ChangeLog
Makefile.in
configure.ac

index 785e117..eaa2bf7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2011-05-30  Keith Marshall  <keithmarshall@users.sourceforge.net>
+
+       Support assignment of DEBUGLEVEL at configure time.
+
+       * configure.ac (DEBUGLEVEL): Declare as a precious variable, using
+       AC_ARG_VAR; also declare with AC_SUBST, to ensure it is initialised.
+
+       * Makefile.in (DEBUGLEVEL): Let AC_SUBST assign it.
+
 2011-05-29  Keith Marshall  <keithmarshall@users.sourceforge.net>
 
        Work around bugs in MinGW and GNU getopt_long_only() implementations.
index 14f6405..c18ce43 100644 (file)
@@ -30,7 +30,7 @@ PACKAGE_SUBSYSTEM = @host_os@
 srcdir = @srcdir@
 abs_top_srcdir = @abs_top_srcdir@
 
-DEBUGLEVEL = 0
+DEBUGLEVEL = @DEBUGLEVEL@
 
 VPATH = @top_srcdir@/src:@top_srcdir@/src/pkginfo:@top_srcdir@/tinyxml
 
index 359bac9..d974d6c 100644 (file)
 #
   AC_CHECK_TOOL([STRIP],[strip],[strip])
 
+# Identify features to be traced to facilitate debugging; make
+# it precious, to avoid introducing accidental inconsistencies.
+#
+  AC_ARG_VAR([DEBUGLEVEL],[tracing flags to facilitate debugging])
+  AC_SUBST([DEBUGLEVEL],[${DEBUGLEVEL-0}])
+
 # Establish the product version banner, and create a makefile
 #
   AC_CONFIG_FILES([version.c Makefile])