Subject: pkg/35240: www/libwww fails to compile on NetBSD/hp700 (fix attached)
To: None <,,>
From: None <>
List: pkgsrc-bugs
Date: 12/12/2006 05:30:00
>Number:         35240
>Category:       pkg
>Synopsis:       www/libwww fails to compile on NetBSD/hp700 (fix attached)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Dec 12 05:30:00 +0000 2006
>Originator:     David H. Gutteridge
>Release:        current/4-BETA
NetBSD 4.99.4 NetBSD 4.99.4 (GENERIC) #0: Wed Nov 29 11:10:54 UTC 2006 hp700

www/libwww runs into some problems during its configure stage on
hp700.  It can't find zlib (even though other configure scripts seem to
find it fine), and it also thinks virtually every standard include file is

I traced this back to an incorrect assumption in the base configure file.  
Its authors assumed if the target has "hp" in it (i.e. "hppa"), that means
the build target is HP-UX, and it adds in the arguments "-Aa -D_HPUX_SOURCE"
to every gcc invocation.
Try compiling www/libwww on hp700.
I fixed this with the following patch:

--- configure~  2006-12-12 04:16:23.000000000 +0000
+++ configure   2006-12-12 04:18:29.000000000 +0000
@@ -19436,7 +19436,7 @@
 echo "${ECHO_T}Digital Unix's cc" >&6
-    hp*)
+    *hpux*)
        if test "$CC" = "cc"; then
          echo "$as_me:$LINENO: result: HT-UX's cc" >&5

I'm assuming here that configure will get "hpux" somewhere in its
derivation of $ac_cv_target if it is running in a legitimate HP-UX
environment.  (At least, I think it should with gcc, I don't know what
HP's proprietary compiler identifies itself as, though it doesn't seem
that pkgsrc supports it anyway.)