summaryrefslogtreecommitdiff
path: root/lang/nhc98/patches/patch-aa
blob: f8585d20e3204440cf3c1b43e7eeb5e32cb264f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
$NetBSD: patch-aa,v 1.7 2005/05/12 17:53:29 kristerw Exp $

--- configure.orig	Fri Mar 11 10:32:56 2005
+++ configure	Wed May 11 20:49:48 2005
@@ -42,7 +42,7 @@
 USER=${USER-`whoami 2>/dev/null`}
 MACHINE=`script/harch`
 case $MACHINE in
-  powerpc-Darwin[56]) CCC=${CC-cc};;
+  powerpc-Darwin*)    CCC=gcc;;
   *)                  CCC=${CC-gcc};;
 esac
 PWD=`pwd`
@@ -382,13 +382,13 @@
       if $CCC -o curses curses.c >/dev/null 2>/dev/null
       then CURSES=""
       else
-        if $CCC -o curses curses.c -lncurses >/dev/null 2>/dev/null
+        if $CCC $LDFLAGS -o curses curses.c -lncurses >/dev/null 2>/dev/null
         then CURSES="-lncurses"
         else
-          if $CCC -o curses curses.c -lcurses >/dev/null 2>/dev/null
+          if $CCC $LDFLAGS -o curses curses.c -lcurses >/dev/null 2>/dev/null
           then CURSES="-lcurses"
           else
-            if $CCC -o curses curses.c -lcurses -ltermcap >/dev/null 2>/dev/null
+            if $CCC $LDFLAGS -o curses curses.c -lcurses -ltermcap >/dev/null 2>/dev/null
             then CURSES="-lcurses -ltermcap"
             else CURSES="-ltermcap -lcurses"	# don't know a good default?
             fi
@@ -405,10 +405,10 @@
 
     echo -n "Testing for the readline library: "
     echo 'main(){readline();}' >rd.c
-    if ${CCC} -o rd.out rd.c -lreadline >/dev/null 2>&1
+    if ${CCC} ${LDFLAGS} -o rd.out rd.c -lreadline >/dev/null 2>&1
     then echo '          -lreadline (detected)'
          READLINE="-DUSE_READLINE=1 -lreadline"
-    else if ${CCC} -o rd.out rd.c -lreadline $CURSES >/dev/null 2>&1
+    else if ${CCC} ${LDFLAGS} -o rd.out rd.c -lreadline $CURSES >/dev/null 2>&1
       then echo "          -lreadline $CURSES (detected)"
          READLINE="-DUSE_READLINE=1 -lreadline $CURSES"
       else echo '          no  (detected)'