summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/mklib16
-rw-r--r--configure.ac11
-rw-r--r--src/mesa/drivers/dri/mach64/mach64_context.h6
3 files changed, 8 insertions, 25 deletions
diff --git a/bin/mklib b/bin/mklib
index 2f9223f..a511375 100755
--- a/bin/mklib
+++ b/bin/mklib
@@ -307,7 +307,7 @@ fi
#
case $ARCH in
- 'Linux' | 'OpenBSD' | 'DragonFly' | 'GNU' | GNU/*)
+ 'Linux' | 'OpenBSD' | 'DragonFly' | 'GNU' | GNU/* | 'NetBSD')
# we assume gcc
if [ "x$LINK" = "x" ] ; then
@@ -574,20 +574,6 @@ case $ARCH in
fi
;;
- 'NetBSD')
- if [ $STATIC = 1 ] ; then
- LIBNAME="lib${LIBNAME}_pic.a"
- echo "mklib: Making NetBSD PIC static library: " ${LIBNAME}
- FINAL_LIBS=`make_ar_static_lib cq 1 ${LIBNAME} ${OBJECTS}`
- else
- LIBNAME="lib${LIBNAME}.so.${MAJOR}.${MINOR}"
- echo "mklib: Making NetBSD PIC shared library: " ${LIBNAME}
- rm -f ${LIBNAME}
- ld -x -Bshareable -Bforcearchive -o ${LIBNAME} ${OBJECTS}
- FINAL_LIBS=${LIBNAME}
- fi
- ;;
-
'IRIX' | 'IRIX64')
if [ $STATIC = 1 ] ; then
LIBNAME="lib${LIBNAME}.a"
diff --git a/configure.ac b/configure.ac
index bd06f8e..bcf7cd3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -377,14 +377,14 @@ if test "x$enable_asm" = xyes; then
case "$host_cpu" in
i?86)
case "$host_os" in
- linux* | *freebsd* | dragonfly*)
+ linux* | *freebsd* | dragonfly* | *netbsd*)
test "x$enable_64bit" = xyes && asm_arch=x86_64 || asm_arch=x86
;;
esac
;;
x86_64)
case "$host_os" in
- linux* | *freebsd* | dragonfly*)
+ linux* | *freebsd* | dragonfly* | *netbsd*)
test "x$enable_32bit" = xyes && asm_arch=x86 || asm_arch=x86_64
;;
esac
@@ -542,7 +542,7 @@ linux*)
i*86|x86_64|powerpc*|sparc*) default_driver="dri";;
esac
;;
-*freebsd* | dragonfly*)
+*freebsd* | dragonfly* | *netbsd*)
case "$host_cpu" in
i*86|x86_64|powerpc*|sparc*) default_driver="dri";;
esac
@@ -909,16 +909,13 @@ if test "$mesa_driver" = dri -o "$mesa_driver" = no; then
;;
esac
;;
- freebsd* | dragonfly*)
+ freebsd* | dragonfly* | *netbsd*)
DEFINES="$DEFINES -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1"
DEFINES="$DEFINES -DIN_DRI_DRIVER -DHAVE_ALIAS"
DEFINES="$DEFINES -DGLX_INDIRECT_RENDERING"
if test "x$driglx_direct" = xyes; then
DEFINES="$DEFINES -DGLX_DIRECT_RENDERING"
fi
- if test "x$GXX" = xyes; then
- CXXFLAGS="$CXXFLAGS -ansi -pedantic"
- fi
if test "x$DRI_DIRS" = "xyes"; then
DRI_DIRS="i810 i915 i965 mach64 mga r128 r200 r300 r600 radeon tdfx \
diff --git a/src/mesa/drivers/dri/mach64/mach64_context.h b/src/mesa/drivers/dri/mach64/mach64_context.h
index 11e8f53..70bc0ae 100644
--- a/src/mesa/drivers/dri/mach64/mach64_context.h
+++ b/src/mesa/drivers/dri/mach64/mach64_context.h
@@ -295,11 +295,11 @@ extern GLboolean mach64UnbindContext( __DRIcontext *driContextPriv );
#define LE32_OUT( x, y ) do { *(GLuint *)(x) = (y); } while (0)
#define LE32_OUT_FLOAT( x, y ) do { *(GLfloat *)(x) = (y); } while (0)
#else
-#ifndef __OpenBSD__
-#include <byteswap.h>
-#else
+#if defined(__OpenBSD__) || defined(__NetBSD__)
#include <machine/endian.h>
#define bswap_32 bswap32
+#else
+#include <byteswap.h>
#endif
#define LE32_IN( x ) bswap_32( *(GLuint *)(x) )