[MPlayer-cvslog] r27809 - in trunk: configure stream/stream.h
diego
subversion at mplayerhq.hu
Tue Oct 21 09:02:25 CEST 2008
Author: diego
Date: Tue Oct 21 09:02:25 2008
New Revision: 27809
Log:
Determine default CD/DVD device in configure instead of using an #ifdef jungle.
Modified:
trunk/configure
trunk/stream/stream.h
Modified: trunk/configure
==============================================================================
--- trunk/configure (original)
+++ trunk/configure Tue Oct 21 09:02:25 2008
@@ -5372,6 +5372,34 @@ echores "$_sgiaudio"
fi #if irix
+# set default CD/DVD devices
+if win32 || os2 ; then
+ default_cdrom_device="D:"
+elif darwin ; then
+ default_cdrom_device="/dev/disk1"
+elif dragonfly ; then
+ default_cdrom_device="/dev/cd0"
+elif freebsd ; then
+ default_cdrom_device="/dev/acd0"
+elif openbsd ; then
+ default_cdrom_device="/dev/rcd0a"
+elif sunos ; then
+ default_cdrom_device="/vol/dev/aliases/cdrom0"
+elif amigaos ; then
+ default_cdrom_device="a1ide.device:2"
+else
+ default_cdrom_device="/dev/cdrom"
+fi
+
+if win32 || os2 || dragonfly || freebsd || openbsd || sunos || amigaos ; then
+ default_dvd_device=$default_cdrom_device
+elif darwin ; then
+ default_dvd_device="/dev/rdiskN"
+else
+ default_dvd_device="/dev/dvd"
+fi
+
+
echocheck "VCD support"
if linux || freebsd || netbsd || dragonfly || bsdos || darwin || sunos || mingw32; then
_inputmodules="vcd $_inputmodules"
@@ -8127,6 +8155,8 @@ $_def_words_endian
/* DVD/VCD/CD */
+#define DEFAULT_CDROM_DEVICE "$default_cdrom_device"
+#define DEFAULT_DVD_DEVICE "$default_dvd_device"
$_def_bsdi_dvd
$_def_cddb
$_def_cdio
Modified: trunk/stream/stream.h
==============================================================================
--- trunk/stream/stream.h (original)
+++ trunk/stream/stream.h Tue Oct 21 09:02:25 2008
@@ -65,32 +65,6 @@
#define STREAM_CTRL_GET_ANGLE 10
#define STREAM_CTRL_SET_ANGLE 11
-#ifdef __sun
-#define DEFAULT_CDROM_DEVICE "/vol/dev/aliases/cdrom0"
-#define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE
-#elif defined(__MINGW32__) || defined(__CYGWIN__) || defined(__OS2__)
-#define DEFAULT_CDROM_DEVICE "D:"
-#define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE
-#elif defined(__APPLE__) || defined(__DARWIN__)
-#define DEFAULT_CDROM_DEVICE "/dev/disk1"
-#define DEFAULT_DVD_DEVICE "/dev/rdiskN"
-#elif defined(__OpenBSD__)
-#define DEFAULT_CDROM_DEVICE "/dev/rcd0a"
-#define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE
-#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
-#define DEFAULT_CDROM_DEVICE "/dev/acd0"
-#define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE
-#elif defined(__DragonFly__)
-#define DEFAULT_CDROM_DEVICE "/dev/cd0"
-#define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE
-#elif defined(__AMIGAOS4__)
-#define DEFAULT_CDROM_DEVICE "a1ide.device:2"
-#define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE
-#else
-#define DEFAULT_CDROM_DEVICE "/dev/cdrom"
-#define DEFAULT_DVD_DEVICE "/dev/dvd"
-#endif
-
#ifdef CONFIG_NETWORK
#include "network.h"
More information about the MPlayer-cvslog
mailing list