--- configure.in.orig	Sat Nov 10 08:47:36 2001
+++ configure.in	Tue Apr  9 00:01:43 2002
@@ -36,7 +36,7 @@ dnl Perform program name transformation
 AC_ARG_PROGRAM
 
 dnl Automake doc recommends to do this only here. (Janos)
-AM_INIT_AUTOMAKE(kdebase, "2.2.2") dnl searches for some needed programs
+AM_INIT_AUTOMAKE(kdebase-2.2.2, "2.2.2") dnl searches for some needed programs
 
 KDE_SET_PREFIX
 
@@ -488,6 +488,7 @@ AC_TRY_RUN([
 ], nogroup=nogroup, nogroup=65534, nogroup=65534)
 AC_MSG_RESULT($nogroup)
 AC_SUBST(nogroup)
+AC_CHECK_FUNCS(getpeereid)
 
 dnl this is for kdm:
 
@@ -790,6 +791,11 @@ if test "x$with_cdparanoia" = "xCHECK" ;
         break
       fi
     done
+    for dir in $kde_libraries /usr/lib /usr/local/lib; do
+	if ls $dir|grep "^libcdda_paranoia.so.*" 2>&1 >/dev/null; then
+	    ext=so
+	fi
+    done
     if test "$with_cdparanoia" = FOUND; then
       if test "$ext" = la; then
         grep "^library_names='*[a-z]*'" $para_libdir/libcdda_paranoia.$ext 2>&1 > /dev/null || with_cdparanoia=NOTFOUND
@@ -891,9 +897,11 @@ NOTFOUND) AC_MSG_RESULT(searched but not
   fi
   non_compile=no
   if test "x$enable_lametest" = xyes ; then
+    ac_save_CXXFLAGS="$CXXFLAGS"
     ac_save_CFLAGS="$CFLAGS"
     ac_save_LIBS="$LIBS"
     CFLAGS="$CFLAGS $all_includes $LAME_INCS"
+    CXXFLAGS="$CFLAGS $all_includes $LAME_INCS"
     LIBS="$LIBS $all_libraries $LAME_LIBS"
     rm -f conf.lametest conf.wrongver
     AC_TRY_RUN([
@@ -916,6 +924,7 @@ int main ()
 }
 ], , non_compile=yes , [echo $ac_n "cross compiling; assumed OK... $ac_c"])
     CFLAGS="$ac_save_CFLAGS"
+    CXXFLAGS="$ac_save_CXXFLAGS"
     LIBS="$ac_save_LIBS"
     # bogus return value, but it _did_ run correctly
     test -f conf.lametest && non_compile=no
@@ -933,6 +942,7 @@ int main ()
       # only do this test, if it really didn't run
       echo "*** Could not run Lame test program, checking why..."
       CFLAGS="$CFLAGS $all_includes $LAME_INCS"
+      CXXFLAGS="$CFLAGS $all_includes $LAME_INCS"
       LIBS="$LIBS $all_libraries $LAME_LIBS"
       AC_TRY_LINK([
 #include <stdio.h>
@@ -959,6 +969,7 @@ echo "*** or that you have moved Lame si
       # ac_save_* still set, because this else part is only entered if the
       # enable_lametest was yes, in which case also ac_save_* was set.
       CFLAGS="$ac_save_CFLAGS"
+      CXXFLAGS="$ac_save_CXXFLAGS"
       LIBS="$ac_save_LIBS"
     fi
     LAME_INCS=
@@ -1297,6 +1308,7 @@ AC_MSG_CHECKING(if ksysguardd can be com
 case "$host" in 
   *-*-linux*) ksysguardd_compile=yes; UNAME='Linux' ;;
   *-*-freebsd*) ksysguardd_compile=yes; UNAME='FreeBSD' ;;
+  *-*-openbsd*) ksysguardd_compile=yes; UNAME='FreeBSD' ;;
   *-*-solaris*) ksysguardd_compile=yes; UNAME='Solaris' ;;
   *) ksysguard_compile=no; UNAME='' ;;
 esac
@@ -1305,7 +1317,8 @@ AC_SUBST(UNAME)
 
 AC_CHECK_LIB(sensors, sensors_init, [LIBSENSORS="-lsensors"])
 AC_SUBST(LIBSENSORS)
-AC_CHECK_HEADERS(sensors/sensors.h)KDE_CHECK_HEADER(X11/extensions/XKBstr.h, ,
+AC_CHECK_HEADERS(sensors/sensors.h)
+KDE_CHECK_HEADER(X11/extensions/XKBstr.h, ,
   DO_NOT_COMPILE="$DO_NOT_COMPILE kxkb" )
 dnl
 dnl
@@ -1661,8 +1674,8 @@ kdcop/Makefile \
 kdebugdialog/Makefile \
 kdeprint/Makefile \
 kdeprint/descriptions/Makefile \
-kdeprint/kdeprintfax/Makefile \
 kdeprint/kdeprint_part/Makefile \
+kdeprint/kdeprintfax/Makefile \
 kdeprint/kjobviewer/Makefile \
 kdeprint/kprinter/Makefile \
 kdeprint/printmgr/Makefile \
