summaryrefslogtreecommitdiff
path: root/lang/ghc/patches/patch-ad
blob: 04f872eacba66ce88b069cc077324d1121657a53 (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
53
54
55
56
57
58
59
60
61
62
$NetBSD: patch-ad,v 1.2 2000/06/30 16:29:17 danw Exp $

--- configure.orig	Tue Sep 14 19:13:41 1999
+++ configure	Fri Jun 30 08:05:39 2000
@@ -786,7 +786,16 @@
         HostPlatform_CPP='i386_unknown_netbsd'
         HostArch_CPP='i386'
         HostVendor_CPP='unknown'
-        HostOS_CPP='netbsd'
+	if test "$HASKELL_OBJ_FMT" = "a.out"; then
+		HostOS_CPP='netbsd'
+	else
+		if test "$HASKELL_OBJ_FMT" = "ELF"; then
+			HostOS_CPP='netbsd_elf'
+		else
+			echo bad \$HASKELL_OBJ_FMT = "$HASKELL_OBJ_FMT"
+			exit 1
+		fi
+	fi
         ;;
 i[3456]86-*-solaris2*)
 	HostPlatform=i386-unknown-solaris2 # hack again
@@ -3926,24 +3935,24 @@
   HaveLibGmp=YES; LibGmp=gmp
 else
   echo "$ac_t""no" 1>&6
-echo $ac_n "checking for mpz_fdiv_qr in -lgmp2""... $ac_c" 1>&6
-echo "configure:3931: checking for mpz_fdiv_qr in -lgmp2" >&5
-ac_lib_var=`echo gmp2'_'mpz_fdiv_qr | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for __gmpz_fdiv_qr in -lgmp""... $ac_c" 1>&6
+echo "configure:3931: checking for __gmpz_fdiv_qr in -lgmp" >&5
+ac_lib_var=`echo gmp'_'__gmpz_fdiv_qr | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_save_LIBS="$LIBS"
-LIBS="-lgmp2  $LIBS"
+LIBS="-lgmp  $LIBS"
 cat > conftest.$ac_ext <<EOF
 #line 3939 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
     builtin and then its argument prototype would still apply.  */
-char mpz_fdiv_qr();
+char __gmpz_fdiv_qr();
 
 int main() {
-mpz_fdiv_qr()
+__gmpz_fdiv_qr()
 ; return 0; }
 EOF
 if { (eval echo configure:3950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
@@ -3961,7 +3970,7 @@
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-  HaveLibGmp=YES; LibGmp=gmp2
+  HaveLibGmp=YES; LibGmp=gmp
 else
   echo "$ac_t""no" 1>&6
 HaveLibGmp=No; LibGmp=not-installed