]> git.saurik.com Git - wxWidgets.git/commitdiff
Try detecting if the CD-ROM I/O implementation in mmedia
authorMattia Barbon <mbarbon@cpan.org>
Fri, 12 Sep 2003 21:55:09 +0000 (21:55 +0000)
committerMattia Barbon <mbarbon@cpan.org>
Fri, 12 Sep 2003 21:55:09 +0000 (21:55 +0000)
has some possibility of working in the host OS..

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23554 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

configure
configure.in
contrib/src/mmedia/cdunix.cpp
setup.h.in

index 3c37c938780bed173374811f515ab56bc1aebbbf..50da13b3f8ecb08b93c86a3b10204b9734c5f688 100755 (executable)
--- a/configure
+++ b/configure
 
 
 
+echo "$as_me:$LINENO: checking for known CD-ROM interface" >&5
+echo $ECHO_N "checking for known CD-ROM interface... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __linux__
+                #include <linux/cdrom.h>
+                #else
+                /* For Solaris */
+                #include <sys/cdio.h>
+                #endif
+
+int
+main ()
+{
+struct cdrom_tocentry entry, old_entry;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+                cat >>confdefs.h <<\_ACEOF
+#define HAVE_KNOWN_CDROM_INTERFACE 1
+_ACEOF
+
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
 
 
 cat >confcache <<\_ACEOF
index 8d80d2d6850163831991bdeb34b42c44c41b567c..07da7033ad64b6586c2a24d22392b1fc74e719aa 100644 (file)
@@ -3757,6 +3757,19 @@ AC_CHECK_LIB(esd, esd_close, [
 ])
 AC_SUBST(EXTRALIBS_ESD)
 
+dnl check for known CD-ROM interface
+AC_MSG_CHECKING([for known CD-ROM interface])
+AC_TRY_COMPILE([#ifdef __linux__
+                #include <linux/cdrom.h>
+                #else
+                /* For Solaris */
+                #include <sys/cdio.h>
+                #endif
+                ],
+               [struct cdrom_tocentry entry, old_entry;],
+               [AC_MSG_RESULT([yes])
+                AC_DEFINE(HAVE_KNOWN_CDROM_INTERFACE)],
+               [AC_MSG_RESULT([no])])
 
 dnl ===========================================================================
 dnl Now we have all the info we need - use it!
index 6fae08316522958d179de27a43f87ad415955fe1..05b6dd070b93fcd955ee258f3bfd6cb5f24d4e71 100644 (file)
@@ -22,6 +22,8 @@
     #pragma hdrstop
 #endif
 
+#if HAVE_KNOWN_CDROM_INTERFACE
+
 // ---------------------------------------------------------------------------
 // MMedia headers
 // ---------------------------------------------------------------------------
@@ -216,3 +218,5 @@ wxCDAudio::CDtoc& wxCDAudioLinux::GetToc()
 {
   return *m_toc;
 }
+
+#endif
index ab3aea63ce1f4d7a37927ef4126e94d8acfc1dea..25699e6f3c79ea918717f190e86ffee918441f05 100644 (file)
 /* Define if you have the <esd.h> header file.  */
 #undef HAVE_ESD_H
 
+/* Define if you have a CD-ROM interface known to mmedia.  */
+#undef HAVE_KNOWN_CDROM_INTERFACE
+
 /* Define if you have wcsrtombs() function */
 #undef HAVE_WCSRTOMBS