openbsd-ports/sysutils/xosview/patches/patch-configure
2001-08-17 12:28:37 +00:00

76 lines
1.7 KiB
Plaintext

$OpenBSD: patch-configure,v 1.2 2001/08/17 12:28:37 form Exp $
--- configure.orig Tue Jul 18 01:54:42 2000
+++ configure Fri Aug 17 19:19:47 2001
@@ -1676,6 +1676,18 @@ fi
host_dir=linux
host_os=linux ;;
+
+## Check for OpenBSD 2.0-2.5
+openbsd2.[012345]*)
+ EXTRALIBS="-lkvm $XPMLIB"
+ INSTALL_ARGS='-s -g kmem -m 02555'
+ cat >> confdefs.h <<\EOF
+#define XOSVIEW_OPENBSD 1
+EOF
+
+ host_dir=bsd
+ host_os=openbsd ;;
+
## Check for known versions of NetBSD...
netbsd1.[012345]*)
host_os_full=$host_os
@@ -1813,16 +1825,48 @@ EOF
host_dir=bsd
host_os=freebsd ;;
-openbsd*)
- EXTRALIBS="-lkvm $XPMLIB"
- INSTALL_ARGS='-s -g kmem -m 02555'
+openbsd2.[6-9]*)
+ EXTRALIBS="-lkvm $XPMLIB"
+ INSTALL_ARGS='-s -g kmem -m 02555'
NetMeter_Default_Setting=True
cat >> confdefs.h <<\EOF
#define XOSVIEW_OPENBSD 1
+#define HAVE_SWAPCTL 1
+EOF
+ ## Also check for the existence of UVM. This is a nasty,
+ ## complicated check. This could be avoided by having the *BSD
+ ## platform-specific Makefiles include <bsd.own.mk> on their own.
+
+ cat > confmkfile <<\EOF
+.include <bsd.own.mk>
+all:
+.if defined(UVM) && ${UVM:U} == YES
+ @echo UVMyes
+.endif
+EOF
+ uvmstring=`make -f confmkfile`
+ rm confmkfile
+ if test x$uvmstring != x ; then
+ cat >> confdefs.h <<\EOF
+#define UVM 1
EOF
+ fi
+ host_dir=bsd
+ host_os=openbsd ;;
+openbsd*)
+ EXTRALIBS="-lkvm $XPMLIB"
+ INSTALL_ARGS='-s -g kmem -m 02555'
+ NetMeter_Default_Setting=True
+ cat >> confdefs.h <<\EOF
+#define XOSVIEW_OPENBSD 1
+#define HAVE_SWAPCTL 1
+EOF
- host_dir=bsd
+ cat >> confdefs.h <<\EOF
+#define UVM 1
+EOF
+ host_dir=bsd
host_os=openbsd ;;
bsdi*)
EXTRALIBS="-lkvm $XPMLIB"