summaryrefslogtreecommitdiff
path: root/lang/nhc98/patches/patch-aa
blob: 0c33261490cedaed8b86e38320a85e1c470566d3 (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
44
45
46
47
48
49
50
51
52
$NetBSD: patch-aa,v 1.9 2013/10/25 06:25:18 dholland Exp $

- always set the compiler to "gcc" for pkgsrc
- honor pkgsrc LDFLAGS

--- configure.orig	2010-07-09 12:41:23.000000000 +0000
+++ configure
@@ -65,8 +65,8 @@ chmod +x script/harch || exit 1
 MACHINE=`script/harch`
 
 case $MACHINE in
-  powerpc-Darwin[56]) CCC=${CC-cc} ;;
-  *)                  CCC=${CC-gcc} ;  ;;
+  powerpc-Darwin*)    CCC=gcc;;
+  *)                  CCC=gcc;;
 esac
 
 STRIP=${STRIP}
@@ -482,16 +482,16 @@ main() {
 void test (void) { mvaddstr(1,2,"hello world"); }
 int main (void) { test(); }
 !!!
-      if $CCC $COPTS -m32 -o curses curses.c >/dev/null 2>/dev/null
+      if $CCC $COPTS $LDFLAGS -m32 -o curses curses.c >/dev/null 2>/dev/null
       then CURSES=""
       else
-        if $CCC $COPTS -m32 -o curses curses.c -lncurses >/dev/null 2>/dev/null
+        if $CCC $COPTS $LDFLAGS -m32 -o curses curses.c -lncurses >/dev/null 2>/dev/null
         then CURSES="-lncurses"
         else
-          if $CCC $COPTS -m32 -o curses curses.c -lcurses >/dev/null 2>/dev/null
+          if $CCC $COPTS $LDFLAGS -m32 -o curses curses.c -lcurses >/dev/null 2>/dev/null
           then CURSES="-lcurses"
           else
-            if $CCC $COPTS -m32 -o curses curses.c -lcurses -ltermcap >/dev/null 2>/dev/null
+            if $CCC $COPTS $LDFLAGS -m32 -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
@@ -508,10 +508,10 @@ int main (void) { test(); }
 
     echo -n "Testing for the readline library: "
     echo 'main(){readline();}' >rd.c
-    if ${CCC} $COPTS -m32 -o rd.out rd.c -lreadline >/dev/null 2>&1
+    if ${CCC} $COPTS $LDFLAGS -m32 -o rd.out rd.c -lreadline >/dev/null 2>&1
     then echo '          -lreadline (detected)'
          READLINE="-DUSE_READLINE=1 -lreadline"
-    else if ${CCC} $COPTS -m32 -o rd.out rd.c -lreadline $CURSES >/dev/null 2>&1
+    else if ${CCC} $COPTS $LDFLAGS -m32 -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)'