This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Configure can't find open3 on NeXTstep
authorHans Mulder <hans@icgned.nl>
Fri, 27 Jun 1997 06:32:59 +0000 (18:32 +1200)
committerTim Bunce <Tim.Bunce@ig.co.uk>
Wed, 6 Aug 1997 12:00:00 +0000 (00:00 +1200)
A buglet in Configure casuses it to not find the 3-argument
form of open(2) on some platforms.  The problem is that it
tries to compile open3.c using $cc $cppflags.  On a NeXT
with MAB support, this will cross-compile for the first
architecture on the list.  If that isn't the architecture
Configure is running on, the resultant binary cannot be run.
This leads Configure to believe that open3 is not available.

P.S. A relevant detail not mentioned in the site configurion
summary below, is that I'm compiling on an HP/PA workstation.

Credited: Andy Dougherty <doughera@newton.phys.lafayette.edu>

p5p-msgid: 9706271816.AA10551@ icgned.icgned.nl
private-msgid: 9706271816.AA10551@icgned.icgned.nl

Configure

index 09daa56..97f5826 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -6377,7 +6377,7 @@ main() {
 EOCP
 : check sys/file.h first to get FREAD on Sun
 if $test `./findhdr sys/file.h` && \
-               $cc $cppflags "-DI_SYS_FILE" open3.c -o open3 >/dev/null 2>&1 ; then
+               $cc $ccflags "-DI_SYS_FILE" open3.c -o open3  ; then
        h_sysfile=true;
        echo "<sys/file.h> defines the O_* constants..." >&4
        if ./open3; then
@@ -6388,7 +6388,7 @@ if $test `./findhdr sys/file.h` && \
                val="$undef"
        fi
 elif $test `./findhdr fcntl.h` && \
-               $cc "-DI_FCNTL" open3.c -o open3 >/dev/null 2>&1 ; then
+               $cc $ccflags "-DI_FCNTL" open3.c -o open3 >/dev/null 2>&1 ; then
        h_fcntl=true;
        echo "<fcntl.h> defines the O_* constants..." >&4
        if ./open3; then