httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ralf S. Engelschall" <>
Subject Re: Problem with header autodetect
Date Thu, 16 Jul 1998 13:14:54 GMT

In article <> you wrote:

> The header autodetection in Configure is broken for me under OS/2 because
> Configure calls TestCompile to test for the header before it has finished
> writing makefile.config (which TestCompile uses).

We have a similar problem for the other TestCompile usage points where libs
are tested. But you're right, we have a problem. But it is bigger than just
the header checks. OTOH we can at least fix the problem for the header checks
when we permutate some stuff in Configure. I'll look at this.

> In particular it needs the LDFLAGS specified in the OS/2 section to be used
> so that an EXE is generated (which can then be found by PrintPathOS2).

> There's also another problem. sys/select.h requires sys/types.h to be
> included before it so testing for sys/select.h will fail even though it
> exists.

Both problems have to be addressed differently, IMHO. We need a target in
TestCompile for only running CPP. Please try out the appended patch, it
introduces a testpp target which does it via $(CC) -E although we really had
to test for "cpp", then "$(CC) -E" etc. Or is CC -E really portable?

> And shouldn't it "rm testfunc" before the test as it does "dummy"?
> Actually I need it to delete "testfunc.exe" as well.

That's because the Unix guys who wrote TestCompile never thought about OS/2,
sorry. Someone just has to add testfunc.exe to the trap at the top of
                                       Ralf S. Engelschall

Index: helpers/TestCompile
RCS file: /e/apache/REPOS/apache-1.3/src/helpers/TestCompile,v
retrieving revision 1.12
diff -u -r1.12 TestCompile
--- TestCompile	1998/07/11 10:24:07	1.12
+++ TestCompile	1998/07/16 13:06:04
@@ -1,6 +1,6 @@
-trap 'rm -f Makefile dummy testfunc.c testfunc; exit $exstat' 0 1 2 3 15
+trap 'rm -f Makefile dummy testfunc.c testfunc testpp.c testpp; exit $exstat' 0 1 2 3 15
 # Yet another Apache Configure helper script.
 # This script tests certain aspects of the compilation
@@ -107,10 +107,9 @@
-	TARGET='testfunc'
-	cat <<EOF >testfunc.c
+	TARGET='testpp'
+	cat <<EOF >testpp.c
 #include <$2>
-void main(void) { }
@@ -134,6 +133,9 @@
 	cd ..; \$(CC) \$(CFLAGS) \$(INCLUDES) \$(LDFLAGS) helpers/testfunc.c -o helpers/testfunc
+	cd ..; rm -f helpers/testpp && \$(CC) \$(INCLUDES) -E helpers/testpp.c >helpers/testpp
&& chmod a+rx helpers/testpp
 # Now run that Makefile

View raw message