$NetBSD: patch-aa,v 1.3.2.1 2003/03/02 10:33:09 agc Exp $

--- configure.orig	Tue Dec 17 05:46:51 2002
+++ configure
@@ -24829,7 +24829,7 @@ main ()
 
  char buf[20];
   buf[0]='\0';
-  strlat(buf, "KDE function test", sizeof(buf));
+  strlcat(buf, "KDE function test", sizeof(buf));
 
   ;
   return 0;
@@ -25442,57 +25442,6 @@ cat >>confdefs.h <<EOF
 #define SIZEOF_UNSIGNED_INT $ac_cv_sizeof_unsigned_int
 EOF
 
-  echo "$as_me:25445: checking sizeof(size_t) == sizeof(unsigned int)" >&5
-echo $ECHO_N "checking sizeof(size_t) == sizeof(unsigned int)... $ECHO_C" >&6
-  cat >conftest.$ac_ext <<_ACEOF
-#line 25448 "configure"
-#include "confdefs.h"
-
-int
-main ()
-{
-
-    #if SIZEOF_SIZE_T != SIZEOF_UNSIGNED_INT
-       choke me
-    #endif
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:25464: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:25467: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:25470: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:25473: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  echo "$as_me:25475: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-
-      echo "$as_me:25481: result: no" >&5
-echo "${ECHO_T}no" >&6
-      { { echo "$as_me:25483: error:
-      Apparently on your system our assumption sizeof(size_t) == sizeof(unsigned int)
-       does not apply. Please mail kde-devel@kde.org with a description of your system!
-      " >&5
-echo "$as_me: error:
-      Apparently on your system our assumption sizeof(size_t) == sizeof(unsigned int)
-       does not apply. Please mail kde-devel@kde.org with a description of your system!
-      " >&2;}
-   { (exit 1); exit 1; }; }
-
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-
 echo "$as_me:25496: checking if it's safe to enable UTMP" >&5
 echo $ECHO_N "checking if it's safe to enable UTMP... $ECHO_C" >&6
 
@@ -26368,7 +26317,24 @@ if { (eval echo "$as_me:26358: \"$ac_lin
   (exit $ac_status); }; }; then
 
                   ac_cv_have_dpms="-lXdpms"
-
+  
+        lib=Xdpms
+        shared_lib_found=no
+        for i in ${LDFLAGS}; do
+                case "$i" in
+                -L*)
+                        dir=`echo $i | sed "s,^-L,,"`
+                        if [ -e $dir/lib${lib}.so ] ||
+                           [ "`echo $dir/lib${lib}.so.*`" != "$dir/lib${lib}.so.*" ]; then
+                                shared_lib_found=yes
+                                break;
+                        fi
+                esac
+        done
+        if [ "$shared_lib_found" = "no" ]; then
+                eval "ac_cv_have_dpms=no"
+        fi
+ 
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
@@ -29555,6 +29521,7 @@ echo $ECHO_N "checking if ksysguardd can
 case "$host" in
   *-*-linux*) ksysguardd_compile=yes; UNAME='Linux' ;;
   *-*-freebsd*) ksysguardd_compile=yes; UNAME='FreeBSD' ;;
+  *-*-netbsd*) ksysguardd_compile=yes; UNAME='FreeBSD' ;;
   *-*-solaris*) ksysguardd_compile=yes; UNAME='Solaris' ;;
   *-*-osf*) ksysguardd_compile=yes; UNAME='Tru64' ;;
   *) ksysguardd_compile=no; UNAME='' ;;
