Commit 54d8879b authored by Christopher Alfeld's avatar Christopher Alfeld

Added --enable-testmode/--disable-testmode which set TESTMODE to 1 or 0

(respectively).  I.e.:

$TESTMODE = @TESTMODE@;
...
if ($TESTMODE) {
	...
}
parent f4834d03
......@@ -21,6 +21,9 @@ ac_help="$ac_help
ac_help="$ac_help
--enable-debug Build with debug flags (-g -DDEBUG)
--disable-debug Build with optimization flags (-O2 -DNDEBUG -UDEBUG)"
ac_help="$ac_help
--enable-testmode Enable test mode
--disable-testmode Disable test mode"
# Initialize some variables set by options.
# The variables have the same names as the options, with
......@@ -559,7 +562,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
echo "configure:563: checking host system type" >&5
echo "configure:566: checking host system type" >&5
host_alias=$host
case "$host_alias" in
......@@ -580,7 +583,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$host" 1>&6
echo $ac_n "checking build system type""... $ac_c" 1>&6
echo "configure:584: checking build system type" >&5
echo "configure:587: checking build system type" >&5
build_alias=$build
case "$build_alias" in
......@@ -606,7 +609,7 @@ fi
# Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
set dummy ${ac_tool_prefix}gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:610: checking for $ac_word" >&5
echo "configure:613: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -638,7 +641,7 @@ fi
# Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
set dummy ${ac_tool_prefix}g++; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:642: checking for $ac_word" >&5
echo "configure:645: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -670,7 +673,7 @@ fi
# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
set dummy ${ac_tool_prefix}ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:674: checking for $ac_word" >&5
echo "configure:677: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -702,7 +705,7 @@ fi
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:706: checking for $ac_word" >&5
echo "configure:709: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -734,7 +737,7 @@ fi
# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
set dummy ${ac_tool_prefix}strip; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:738: checking for $ac_word" >&5
echo "configure:741: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -766,7 +769,7 @@ fi
# Extract the first word of "${ac_tool_prefix}ssh", so it can be a program name with args.
set dummy ${ac_tool_prefix}ssh; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:770: checking for $ac_word" >&5
echo "configure:773: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_SSH'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -900,6 +903,25 @@ else
fi
#
# Testing mode. In testing mode scripts should not effect hardware state.
# This is designed to be used with the testsuite software which operates
# on a test copy of the DB.
#
# Check whether --enable-testmode or --disable-testmode was given.
if test "${enable_testmode+set}" = set; then
enableval="$enable_testmode"
:
fi
if test "$enable_testmode" = "yes"; then
TESTMODE=1;
else
TESTMODE=0;
fi
# Make sure $INSTALL is valid at any depth in our tree, i.e. make it absoulte.
# This can be needed when no valid install is found and autoconf falls back on
# the supplied install.sh, but we called 'configure' with a relative path.
......@@ -915,7 +937,7 @@ fi
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
echo "configure:919: checking for a BSD compatible install" >&5
echo "configure:941: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -1182,6 +1204,7 @@ s%@IPBASE@%$IPBASE%g
s%@LEDA@%$LEDA%g
s%@SSH_ARGS@%$SSH_ARGS%g
s%@OPT_CFLAGS@%$OPT_CFLAGS%g
s%@TESTMODE@%$TESTMODE%g
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
s%@INSTALL_DATA@%$INSTALL_DATA%g
......
......@@ -98,6 +98,22 @@ else
fi
AC_SUBST(OPT_CFLAGS)
#
# Testing mode. In testing mode scripts should not effect hardware state.
# This is designed to be used with the testsuite software which operates
# on a test copy of the DB.
#
AC_ARG_ENABLE(testmode,
[ --enable-testmode Enable test mode
--disable-testmode Disable test mode])
if test "$enable_testmode" = "yes"; then
TESTMODE=1;
else
TESTMODE=0;
fi
AC_SUBST(TESTMODE)
# Make sure $INSTALL is valid at any depth in our tree, i.e. make it absoulte.
# This can be needed when no valid install is found and autoconf falls back on
# the supplied install.sh, but we called 'configure' with a relative path.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment