[MPlayer-dev-eng] [PATCH] proper linnking check for libcdio/cdda

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Mon Oct 30 21:58:44 CET 2006


Hello,
currently configure test for these succeeds even if linking does not
work. Attached is a way to fix it. I may seem overcomplicated, but
problem is that cdio test tries to run the created file, and init
function can not be tested because it needs lot of ifdefs depending on
exactly library version/whatever and other functions crash without init
first...

Greetings,
Reimar Döffinger
-------------- next part --------------
Index: configure
===================================================================
--- configure	(revision 20532)
+++ configure	(working copy)
@@ -5279,7 +5279,10 @@
 #include <cdda_interface.h>
 #include <cdda_paranoia.h>
 // This need a better test. How ?
-int main(void) { return 1; }
+int main(void) {
+    void *test = cdda_verbose_set;
+    return !test;
+}
 EOF
     _cdparanoia=no
     for _inc_tmp in "" "-I/usr/include/cdda" "-I/usr/local/include/cdda" ; do
@@ -5305,7 +5308,8 @@
 #include <cdio/paranoia.h>
 int main()
 {
-    printf("%s\n", CDIO_VERSION);
+    void *test = cdda_verbose_set;
+    printf("%s %p\n", CDIO_VERSION, test);
     return 0;
     
 }


More information about the MPlayer-dev-eng mailing list