--- k3b/src/device/k3bdevicemanager.cpp	2005-02-08 14:57:32.000000000 +0000
+++ k3b/src/device/k3bdevicemanager.cpp	2005-03-09 15:49:01.000000000 +0000
@@ -233,6 +233,10 @@
   }
   info.close();
 
+#ifdef HAVE_RESMGR
+  int havenormaldevs = d->allDevices.count();
+#endif
+
   // try to find symlinks
   QString cmd = QString("find /dev -type l -printf \"%p\t%l\n\" | egrep '%1cdrom|dvd|cdwriter|cdrecorder' | cut -f1").arg(devstring);
   FILE *fd = popen(QFile::encodeName(cmd),"r");
@@ -246,7 +250,16 @@
        if (d) {
          d->addDeviceNode(device);
          kdDebug() << "(K3bDeviceManager) Link: " << device << " -> " << d->devicename() << endl;
+       } 
+
+#ifdef HAVE_RESMGR
+       // if we had no initial devices, add the symlinked devices.
+       if (!d) {
+         if (!havenormaldevs)
+           addDevice(device);
        }
+#endif
+
      }
   }
   pclose(fd);
@@ -463,8 +476,18 @@
   QString resolved = resolveSymLink( devicename );
   kdDebug() << devicename << " resolved to " << resolved << endl;
 
-  if  ( !testForCdrom(resolved) )
+  if  ( !testForCdrom(resolved) ) {
+#ifdef HAVE_RESMGR
+    // With resmgr we might only be able to open the symlink name.
+    if (testForCdrom(devicename)) {
+      resolved = devicename;
+    } else {
+      return 0;
+    }
+#else
     return 0;
+#endif
+  }
 
   if ( K3bDevice* oldDev = findDevice(resolved) ) {
     kdDebug() << "(K3bDeviceManager) dev " << resolved  << " already found" << endl;
Index: configure.in.in
===================================================================
RCS file: /home/kde/kdeextragear-1/k3b/configure.in.in,v
retrieving revision 1.48.2.3
retrieving revision 1.48.2.1
diff -u -3 -p -r1.48.2.3 -r1.48.2.1
--- k3b/configure.in.in	12 Mar 2005 16:52:22 -0000	1.48.2.3
+++ k3b/configure.in.in	19 Jan 2005 12:54:41 -0000	1.48.2.1
@@ -118,112 +118,68 @@ dnl this will define WORDS_BIGENDIAN or 
 AC_C_BIGENDIAN()
 
 
-dnl === Ogg Vorbis Test - Begin ===
-AC_ARG_WITH(oggvorbis, AS_HELP_STRING([--without-oggvorbis], [build without OggVorbis support (default=no)]), [ac_cv_use_oggvorbis=$withval], [ac_cv_use_oggvorbis=yes])
-
-if test "$ac_cv_use_oggvorbis" = "yes"; then
-
-  AC_MSG_CHECKING(for ogg/vorbis headers)
-  ogg_vorbis=no
-  AC_TRY_COMPILE([
-  		#include <vorbis/codec.h>
-  		#include <vorbis/vorbisfile.h>
+AC_MSG_CHECKING(for ogg/vorbis headers)
+ogg_vorbis=no
+AC_TRY_COMPILE([
+		#include <vorbis/codec.h>
+		#include <vorbis/vorbisfile.h>
                 ],[
                 ],[
                 ogg_vorbis=yes
                 ])
-  AC_MSG_RESULT($ogg_vorbis)
-  if test x$ogg_vorbis = xyes; then
-     dnl we need the ogg_vorbis_lib because otherwise we override LIBS !
-     AC_CHECK_LIB(vorbisfile,ov_open,ogg_vorbis_lib=yes,
-                  ogg_vorbis=no,[$all_libraries -lvorbisfile -lvorbis -logg])
-  fi
-  if test x$ogg_vorbis = xyes; then
+AC_MSG_RESULT($ogg_vorbis)
+if test x$ogg_vorbis = xyes; then
+   dnl we need the ogg_vorbis_lib because otherwise we override LIBS !
+   AC_CHECK_LIB(vorbisfile,ov_open,ogg_vorbis_lib=yes,
+                ogg_vorbis=no,[-lvorbisfile -lvorbis -logg])
+fi
+if test x$ogg_vorbis = xyes; then
 	AC_DEFINE(OGG_VORBIS,1,[Define if you have ogg/vorbis installed])
-  fi
 fi
 
 AM_CONDITIONAL(include_OGG, [test x$ogg_vorbis = xyes])
-dnl === Ogg Vorbis Test - End ===
 
-dnl === libmad MPEG decoder check - begin ===
-AC_ARG_WITH(libmad, AS_HELP_STRING([--without-libmad], [build without libmad support (default=no)]), [ac_cv_use_libmad=$withval], [ac_cv_use_libmad=yes])
 
-if test "$ac_cv_use_libmad" = "yes"; then
-  MAD_LIB=""
-  KDE_CHECK_HEADER(mad.h, [
+dnl === libmad MPEG decoder check ===
+MAD_LIB=""
+AC_CHECK_HEADER(mad.h, [
 	AC_CHECK_LIB(mad, mad_synth_frame, [
 		MAD_LIB="-lmad"
-		AC_DEFINE(HAVE_LIBMAD,1,[defined if you have libmad headers and libraries])],
-		[],
-		$all_libraries
-	)
-  ])
-  AC_SUBST(MAD_LIB)
-fi
+		AC_DEFINE(HAVE_LIBMAD,1,[defined if you have libmad headers and libraries])
+	])
+])
+AC_SUBST(MAD_LIB)
 
 AM_CONDITIONAL(include_MP3, [test -n "$MAD_LIB"])
-dnl === libmad MPeg decoder check - end ===
 
-dnl === test for FLAC++ and FLAC - begin ====
-AC_ARG_WITH(flac, AS_HELP_STRING([--without-flac], [build without FLAC support (default=no)]), [ac_cv_use_flac=$withval], [ac_cv_use_flac=yes])
 
-have_flac=no
-if test "$ac_cv_use_flac" = "yes"; then
-  KDE_CHECK_HEADERS(FLAC++/decoder.h, [
-     AC_CHECK_LIB(FLAC,FLAC__seekable_stream_decoder_process_single,
-	        have_flac=yes,[],$all_libraries)])
-
-  # Hack to get the flac version since I was not able to handle the code from
-  # the flac guys. This is a strange usage of tr but I don't know too much about
-  # shell scripting and this works, so...
-  # BUT: this does not work if we want to use another flac version than the one installed
-  #      where the flac binary is found!
-  K3B_FLAC_VERSION_MAJOR=`flac --version|tr -d "flac "|cut -d "." -f 1`
-  K3B_FLAC_VERSION_MINOR=`flac --version|tr -d "flac "|cut -d "." -f 2`
-  K3B_FLAC_VERSION_PATCHLEVEL=`flac --version|tr -d "flac "|cut -d "." -f 3`
-  if test \( "$K3B_FLAC_VERSION_MAJOR" -gt 1 -o \
-	\( "$K3B_FLAC_VERSION_MAJOR" -eq 1 -a \( "$K3B_FLAC_VERSION_MINOR" -gt 1 -o \
-				 \( "$K3B_FLAC_VERSION_MINOR" -eq 1 -a "$K3B_FLAC_VERSION_PATCHLEVEL" -gt 1 \) \
-	\) \) \); then
-	AC_DEFINE(
-		FLAC_NEWER_THAN_1_1_1, 
-		1,
-		[defined if the installed flac binary's version is bigger than or equal to 1.1.2]
-	)
-  fi
-fi
 
+dnl === test for FLAC++ and FLAC ====
+have_flac=no
+KDE_CHECK_HEADERS(FLAC++/decoder.h, [
+   AC_CHECK_LIB(FLAC,FLAC__seekable_stream_decoder_process_single,
+	        have_flac=yes)])
 AM_CONDITIONAL(include_FLAC, [test x$have_flac = xyes])
-dnl === test for FLAC++ and FLAC - end ====
 
-dnl === check for id3lib - begin ============
-AC_ARG_WITH(id3lib, AS_HELP_STRING([--without-id3lib], [build without id3lib support (default=no)]), [ac_cv_use_id3lib=$withval], [ac_cv_use_id3lib=yes])
 
-if test "$ac_cv_use_id3lib" = "yes"; then
-  ID3_LIB=""
-  KDE_CHECK_HEADERS(id3/tag.h, [
-  	ID3_LIB="-lid3"
-  	AC_DEFINE(HAVE_LIBID3,1,[defined if you have libid3 headers and libraries])
-  ])
-  AC_SUBST(ID3_LIB)
-fi
-dnl === check for id3lib - end ============
+dnl === check for id3lib ============
+ID3_LIB=""
+KDE_CHECK_HEADERS(id3/tag.h, [
+	ID3_LIB="-lid3"
+	AC_DEFINE(HAVE_LIBID3,1,[defined if you have libid3 headers and libraries])
+])
+AC_SUBST(ID3_LIB)
 
-dnl === check for resmgr - begin ============
-AC_ARG_WITH(resmgr, AS_HELP_STRING([--without-resmgr], [build without ResMgr support (default=no)]), [ac_cv_use_resmgr=$withval], [ac_cv_use_resmgr=yes])
 
-if test "$ac_cv_use_regmgr" = "yes"; then
-  RESMGR_LIB=""
-  KDE_CHECK_HEADERS(resmgr.h, [
-         KDE_CHECK_LIB(resmgr,rsm_open_device,[
-                 RESMGR_LIB="-lresmgr"
-                 AC_DEFINE(HAVE_RESMGR,1,[defined if you have resmgr libraries and headers])
-         ])
-  ])
-  AC_SUBST(RESMGR_LIB)
-fi
-dnl === check for resmgr - end ============
+dnl === check for resmgr ============
+RESMGR_LIB=""
+AC_CHECK_HEADERS(resmgr.h, [
+       AC_CHECK_LIB(resmgr,rsm_open_device,[
+               RESMGR_LIB="-lresmgr"
+               AC_DEFINE(HAVE_RESMGR,1,[defined if you have resmgr libraries and headers])
+       ])
+])
+AC_SUBST(RESMGR_LIB)
 
 AC_ARG_WITH(external-libsamplerate,
 	[  --with-external-libsamplerate   use the libsamplerate provided by the system (default=yes)],
