summaryrefslogtreecommitdiff
path: root/lang/nhc98/patches/patch-aa
blob: 768b76aa12bb6d4c1a14f76013d6d3010ffd93cc (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
$NetBSD: patch-aa,v 1.5 2002/11/14 22:38:30 jlam Exp $

--- configure.orig	Tue Aug 13 09:52:51 2002
+++ configure
@@ -345,13 +345,13 @@ int main (void) { test(); }
     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
@@ -368,10 +368,10 @@ int main (void) { test(); }
 
   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)'