summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlexander Barton <alex@barton.de>2013-01-05 03:05:56 +0100
committerAlexander Barton <alex@barton.de>2013-01-05 03:05:56 +0100
commit0703fcd71983bd04f70101fd0143660174d22f84 (patch)
treeb6522b9600d39e4565b214ebd9bc0e26097bf0e9
parent4594583f52c46105ffd77eaaf4d9784809567324 (diff)
downloadngircd-0703fcd71983bd04f70101fd0143660174d22f84.tar.gz
ngircd-0703fcd71983bd04f70101fd0143660174d22f84.zip
autogen.sh: Enforce serial test harness on automake >=1.13
-rwxr-xr-xautogen.sh14
-rw-r--r--configure.ng3
2 files changed, 14 insertions, 3 deletions
diff --git a/autogen.sh b/autogen.sh
index cc4bddf0..b1fa883d 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -174,11 +174,21 @@ else
 	DEANSI_START="#"
 	DEANSI_END=" (disabled by ./autogen.sh script)"
 fi
-sed -e "s|^__ng_Makefile_am_template__|${DEANSI_START}AUTOMAKE_OPTIONS = ansi2knr${DEANSI_END}|g" \
+# Serial test harness?
+if [ "$AM_MAJOR" -eq "1" -a "$AM_MINOR" -ge "13" ]; then
+	# automake >= 1.13 => enforce "serial test harness"
+	echo " - Enforcing serial test harness."
+	SERIAL_TESTS="serial-tests"
+else
+	# automake < 1.13 => no new test harness, nothing to do
+	SERIAL_TEST=""
+fi
+
+sed -e "s|^__ng_Makefile_am_template__|AUTOMAKE_OPTIONS = ${SERIAL_TESTS} ${DEANSI_START}ansi2knr${DEANSI_END}|g" \
 	src/portab/Makefile.ng >src/portab/Makefile.am
 for makefile_ng in $AM_MAKEFILES; do
 	makefile_am=`echo "$makefile_ng" | sed -e "s|\.ng\$|\.am|g"`
-	sed -e "s|^__ng_Makefile_am_template__|${DEANSI_START}AUTOMAKE_OPTIONS = ../portab/ansi2knr${DEANSI_END}|g" \
+	sed -e "s|^__ng_Makefile_am_template__|AUTOMAKE_OPTIONS = ${SERIAL_TESTS} ${DEANSI_START}../portab/ansi2knr${DEANSI_END}|g" \
 		$makefile_ng >$makefile_am
 done
 
diff --git a/configure.ng b/configure.ng
index 732e55ee..47c95990 100644
--- a/configure.ng
+++ b/configure.ng
@@ -711,7 +711,8 @@ echo $ECHO_N "   libiconv support: $ECHO_C"
 
 echo
 
-if ! grep "^AUTOMAKE_OPTIONS = ../portab/ansi2knr" src/ngircd/Makefile.am >/dev/null 2>&1; then
+define(_automake_regex_,[[^AUTOMAKE_OPTIONS = [a-z .\-]*/portab/ansi2knr]])
+if ! grep "_automake_regex_" src/ngircd/Makefile.am >/dev/null 2>&1; then
 	echo "WARNING:"
 	echo "This GNU automake generated build system does not support \"de-ANSI-fication\","
 	echo "therefore don't use it to generate \"official\" distribution archives!"