$NetBSD: patch-ae,v 1.5 2007/03/07 20:47:05 joerg Exp $

--- autoconf/configure.in.orig	2006-04-07 22:42:15.000000000 +0000
+++ autoconf/configure.in
@@ -63,13 +63,6 @@ dnl
   if test x$sysconfdir = x'${prefix}/etc' ; then
      sysconfdir='/etc/apcupsd'
   fi
-
-dnl
-dnl If the user has not set -sbindir, we set our default as /sbin
-dnl
-  if test x$sbindir = x'${exec_prefix}/sbin' ; then
-     sbindir='/sbin'
-  fi
 fi
 
 dnl
@@ -161,7 +154,7 @@ else
     WIN32=
     WINLIBS=
     APCACCESS=apcaccess
-    SMTP=smtp
+    SMTP=
     APCTEST=apctest
 fi
 AC_SUBST(WIN32)
@@ -468,7 +461,7 @@ else
 	AM_CONDITIONAL(HAVE_LINUX_OS, $FALSEPRG)
 fi
 
-if test $HAVE_UNAME=yes -a x`uname -s` = xFreeBSD
+if test $HAVE_UNAME=yes -a x`uname -s` = xFreeBSD || test $HAVE_UNAME=yes -a x`uname -s` = xDragonFly
 then
 	AM_CONDITIONAL(HAVE_FREEBSD_OS, $TRUEPRG)
 	AC_DEFINE(HAVE_FREEBSD_OS)
@@ -750,7 +743,8 @@ AC_HELP_STRING([--disable-usb], [No USB 
 		AC_SUBST(USB_TYPE)
 	elif test $HAVE_UNAME=yes -a x`uname -s` = xFreeBSD -o \
 		  $HAVE_UNAME=yes -a x`uname -s` = xOpenBSD -o \
-		  $HAVE_UNAME=yes -a x`uname -s` = xNetBSD ; then
+		  $HAVE_UNAME=yes -a x`uname -s` = xNetBSD -o \
+		  $HAVE_UNAME=yes -a x`uname -s` = xDragonFly; then
 		AC_DEFINE(HAVE_USB_DRIVER)
 		USB_DRIVER="usb"
 		USB_TYPE="bsd"
@@ -1156,7 +1150,7 @@ then
 elif test $HAVE_UNAME=yes -a x`uname -s` = xFreeBSD
 then
 	DISTNAME=freebsd
-elif test $HAVE_UNAME=yes -a x`uname -s` = xNetBSD
+elif test $HAVE_UNAME=yes -a x`uname -s` = xNetBSD || test $HAVE_UNAME=yes -a x`uname -s` = xDragonFly
 then
 	DISTNAME=netbsd
 elif test $HAVE_UNAME=yes -a x`uname -s` = xOpenBSD
@@ -1316,7 +1310,7 @@ debian)
 	platforms/debian/ups-monitor \
 	"
   ;;
-freebsd)
+freebsd|dragonfly)
     DISTVER=`uname -a |awk '{print $3}'`
     SERIALDEV=/dev/cuaa0
     nologdir=/var/run
@@ -1355,6 +1349,7 @@ netbsd)
     DFILES="\
 	platforms/netbsd/Makefile \
 	platforms/netbsd/apcupsd \
+	platforms/netbsd/apccontrol \
 	"
   ;;
 openbsd)
