pkgsrc-wip/qemu-neo1973/patches/patch-ag
2008-04-13 12:29:48 +00:00

84 lines
1.7 KiB
Text

$NetBSD: patch-ag,v 1.2 2008/04/13 12:29:48 noud4 Exp $
--- configure.orig 2008-01-15 00:24:21.000000000 +0100
+++ configure 2007-12-27 22:54:21.000000000 +0100
@@ -29,7 +29,7 @@
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 @@
alpha)
cpu="alpha"
;;
- "Power Macintosh"|ppc|ppc64)
+ "Power Macintosh"|ppc|ppc64|powerpc)
cpu="powerpc"
;;
mips)
@@ -141,6 +141,12 @@
kqemu="yes"
fi
;;
+DragonFly)
+bsd="yes"
+oss="yes"
+dragonfly="yes"
+;;
+
NetBSD)
bsd="yes"
oss="yes"
@@ -495,6 +501,16 @@
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="yes"
+else
+ stack_protector_present="no"
+fi
+
#
# Solaris specific configure tool chain decisions
#
@@ -697,7 +713,7 @@
if test -z "$prefix" ; then
prefix="/usr/local"
fi
- mansuffix="/share/man"
+ mansuffix="/$PKGMANDIR"
datasuffix="/share/qemu"
docsuffix="/share/doc/qemu"
binsuffix="/bin"
@@ -908,6 +924,11 @@
EOF
if $cc -o $TMPE $TMPC 2> /dev/null ; 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
fi
if test "$darwin" = "yes" ; then
@@ -1032,6 +1053,10 @@
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
if test "$gadgetfs" = "yes" ; then