Here's a patch to bail out on ./Configure errors. Sorry about the >&3
redirection, but without it, we would have to create an intermediate
file (and need to prevent race conditions, need to clean up & all that).
Also, I added a 2>&1 redirection to Configure's sanity check report
(without it, the "echo ===" output will not always be where the
error output is).
Should I commit?
Martin
--
<[EMAIL PROTECTED]> | Fujitsu Siemens
Fon: +49-89-636-46021, FAX: +49-89-636-47655 | 81730 Munich, Germany
Index: configure
===================================================================
RCS file: /home/cvs/apache-1.3/configure,v
retrieving revision 1.133
diff -u -r1.133 configure
--- configure 27 Sep 2001 18:12:03 -0000 1.133
+++ configure 4 Feb 2002 12:54:24 -0000
@@ -1582,14 +1582,15 @@
if [ "x$verbose" = "xyes" ]; then
vflag="-v";
fi
-if [ "x$quiet" = "xyes" ]; then
- (cd $src; ./Configure ${vflag} -file Configuration.apaci >/dev/null);
+rc=`if [ "x$quiet" = "xyes" ]; then
+ (cd $src; ./Configure ${vflag} -file Configuration.apaci >/dev/null; echo $? >&3;
+);
else
- (cd $src; ./Configure ${vflag} -file Configuration.apaci |\
+ (cd $src; ( ./Configure ${vflag} -file Configuration.apaci; echo $? >&3; ) |\
sed -e '/^Using config file:.*/d' \
-e "s:Makefile in :Makefile in $src\\/:" \
-e "s:Makefile\$:Makefile in $src:")
-fi
+fi 3>&1 1>&2`
+[ $rc = 0 ] || exit 1
##
## final hints
Index: src/Configure
===================================================================
RCS file: /home/cvs/apache-1.3/src/Configure,v
retrieving revision 1.449
diff -u -r1.449 Configure
--- src/Configure 1 Feb 2002 02:27:04 -0000 1.449
+++ src/Configure 4 Feb 2002 12:54:25 -0000
@@ -2398,7 +2398,7 @@
echo "** Apache requires an ANSI C Compiler, such as gcc. "
echo ""
echo "======== Error Output for sanity check ========"
- (./helpers/TestCompile -v sanity)
+ (./helpers/TestCompile -v sanity) 2>&1
echo "============= End of Error Report ============="
echo ""
echo " Aborting!"