summaryrefslogtreecommitdiff
path: root/emulators/qemu/patches/patch-ag
blob: 9e3b57bbe201aa585d4604521d40b8cfd04fe702 (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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
$NetBSD: patch-ag,v 1.9 2007/12/30 17:12:45 joerg Exp $

--- configure.orig	2007-02-05 23:01:54 +0000
+++ configure
@@ -29,7 +29,7 @@ ar="ar"
 make="make"
 install="install"
 strip="strip"
-cpu=`uname -m`
+cpu=`uname -p`
 target_list=""
 case "$cpu" in
   i386|i486|i586|i686|i86pc|BePC)
@@ -44,7 +44,7 @@ case "$cpu" in
   alpha)
     cpu="alpha"
   ;;
-  "Power Macintosh"|ppc|ppc64)
+  "Power Macintosh"|ppc|ppc64|powerpc)
     cpu="powerpc"
   ;;
   mips)
@@ -116,6 +116,12 @@ if [ "$cpu" = "i386" -o "$cpu" = "x86_64
     kqemu="yes"
 fi
 ;;
+DragonFly)
+bsd="yes"
+oss="yes"
+dragonfly="yes"
+;;
+
 NetBSD)
 bsd="yes"
 oss="yes"
@@ -371,6 +377,16 @@ EOF
     fi
 fi
 
+# Check for stack protector
+cat > $TMPC <<EOF
+extern int foo;
+EOF
+if "$cc" -o $TMPE $TMPC -fno-stack-protector 2> /dev/null ; then
+  stack_protector_present="no"
+else
+  stack_protector_present="yes"
+fi
+
 #
 # Solaris specific configure tool chain decisions
 #
@@ -573,7 +589,7 @@ else
 if test -z "$prefix" ; then
     prefix="/usr/local"
 fi
-mandir="$prefix/share/man"
+mandir="$prefix/$PKGMANDIR"
 datadir="$prefix/share/qemu"
 docdir="$prefix/share/doc/qemu"
 bindir="$prefix/bin"
@@ -711,6 +727,11 @@ if test "$mingw32" = "yes" ; then
   echo "#define CONFIG_WIN32 1" >> $config_h
 elif test -f "/usr/include/byteswap.h" ; then
   echo "#define HAVE_BYTESWAP_H 1" >> $config_h
+elif test -f "/usr/include/machine/bswap.h" ; then
+  echo "#define HAVE_MACHINE_BSWAP_H 1" >> $config_h
+fi
+if test "$dragonfly" = "yes" ; then
+  echo "CONFIG_DRAGONFLY=yes" >> $config_mak
 fi
 if test "$darwin" = "yes" ; then
   echo "CONFIG_DARWIN=yes" >> $config_mak
@@ -785,6 +806,10 @@ if [ "$bsd" = "yes" ] ; then
   echo "#define _BSD 1" >> $config_h
 fi
 
+if [ "$stack_protector_present" = "yes" ] ; then
+  echo "STACK_PROTECTOR_PRESENT=yes" >> $config_mak
+fi
+
 echo "#define CONFIG_UNAME_RELEASE \"$uname_release\"" >> $config_h
 
 for target in $target_list; do