--- kioslave/audiocd/configure.in.in.orig	Wed Sep  5 01:16:12 2001
+++ kioslave/audiocd/configure.in.in	Tue Sep 18 23:11:59 2001
@@ -38,6 +38,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
@@ -139,9 +144,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([
@@ -164,6 +171,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
@@ -181,6 +189,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>
@@ -207,6 +216,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=
