bsd port (Markus Niemisto)


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@800 c046a42c-6fe2-441c-8c8c-71466251a162
diff --git a/configure b/configure
index 765b234..055f50e 100755
--- a/configure
+++ b/configure
@@ -79,9 +79,23 @@
 MINGW32*)
 mingw32="yes"
 ;;
+FreeBSD)
+bsd="yes"
+;;
+NetBSD)
+bsd="yes"
+;;
+OpenBSD)
+bsd="yes"
+;;
 *) ;;
 esac
 
+if [ "$bsd" = "yes" ] ; then
+  make="gmake"
+  target_list="i386-softmmu"
+fi
+
 # find source path
 # XXX: we assume an absolute path is given when launching configure, 
 # except in './configure' case.
@@ -373,7 +387,7 @@
 if test "$mingw32" = "yes" ; then
   echo "CONFIG_WIN32=yes" >> $config_mak
   echo "#define CONFIG_WIN32 1" >> $config_h
-else
+elif test -f "/usr/include/byteswap.h" ; then
   echo "#define HAVE_BYTESWAP_H 1" >> $config_h
 fi
 if test "$gdbstub" = "yes" ; then
@@ -402,6 +416,10 @@
 echo "SRC_PATH=$source_path" >> $config_mak
 echo "TARGET_DIRS=$target_list" >> $config_mak
 
+if [ "$bsd" = "yes" ] ; then
+  echo "#define _BSD 1" >> $config_h
+fi
+
 for target in $target_list; do 
 
 target_dir="$target"