Add check against GNU/Linux driver. More info in include/cdio/config.
This commit is contained in:
@@ -188,8 +188,8 @@ dnl headers
|
|||||||
|
|
||||||
AC_HEADER_STDC
|
AC_HEADER_STDC
|
||||||
AC_CHECK_HEADERS(errno.h fcntl.h glob.h limits.h pwd.h)
|
AC_CHECK_HEADERS(errno.h fcntl.h glob.h limits.h pwd.h)
|
||||||
AC_CHECK_HEADERS(stdarg.h stdbool.h stdio.h sys/cdio.h sys/param.h)
|
AC_CHECK_HEADERS(stdarg.h stdbool.h stdio.h sys/cdio.h sys/param.h \
|
||||||
AC_CHECK_HEADERS(sys/time.h sys/timeb.h)
|
sys/time.h sys/timeb.h sys/utsname.h)
|
||||||
AC_CHECK_HEADERS(ncurses.h curses.h, break, [enable_cdda_player='no'])
|
AC_CHECK_HEADERS(ncurses.h curses.h, break, [enable_cdda_player='no'])
|
||||||
|
|
||||||
dnl FreeBSD 4 has getopt in unistd.h. So we include that before
|
dnl FreeBSD 4 has getopt in unistd.h. So we include that before
|
||||||
@@ -674,7 +674,7 @@ cat > include/cdio/cdio_config.h << EOF
|
|||||||
version of config.h
|
version of config.h
|
||||||
*/
|
*/
|
||||||
EOF
|
EOF
|
||||||
head -n 233 config.h >> include/cdio/cdio_config.h
|
head -n 254 config.h >> include/cdio/cdio_config.h
|
||||||
]],[[]])
|
]],[[]])
|
||||||
|
|
||||||
AC_OUTPUT
|
AC_OUTPUT
|
||||||
|
|||||||
1
include/cdio/.gitignore
vendored
1
include/cdio/.gitignore
vendored
@@ -1,3 +1,4 @@
|
|||||||
|
/*~
|
||||||
/Makefile
|
/Makefile
|
||||||
/Makefile.in
|
/Makefile.in
|
||||||
/cdio_config.h
|
/cdio_config.h
|
||||||
|
|||||||
@@ -35,6 +35,10 @@
|
|||||||
#ifdef HAVE_STDLIB_H
|
#ifdef HAVE_STDLIB_H
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef HAVE_SYS_UTSNAME_H
|
||||||
|
#include <sys/utsname.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -79,10 +83,36 @@ main(int argc, const char *argv[])
|
|||||||
|
|
||||||
if (cdio_have_driver(-1) != false)
|
if (cdio_have_driver(-1) != false)
|
||||||
{
|
{
|
||||||
printf("Bogus driver number -1 should be regexted\n");
|
fprintf(stderr, "Bogus driver number -1 should be regexted\n");
|
||||||
return 5;
|
return 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_SYS_UTSNAME_H
|
||||||
|
{
|
||||||
|
struct utsname utsname;
|
||||||
|
if (0 == uname(&utsname))
|
||||||
|
{
|
||||||
|
if (0 == strncmp("Linux", utsname.sysname, sizeof("Linux")))
|
||||||
|
{
|
||||||
|
if (!cdio_have_driver(DRIVER_LINUX))
|
||||||
|
{
|
||||||
|
fprintf(stderr,
|
||||||
|
"You should have been able to get GNU/Linux driver\n");
|
||||||
|
return 6;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (0 == strncmp("Cygwin", utsname.sysname, sizeof("Cygwin")))
|
||||||
|
{
|
||||||
|
if (!cdio_have_driver(DRIVER_WIN32))
|
||||||
|
{
|
||||||
|
fprintf(stderr,
|
||||||
|
"You should have been able to get Win32 driver\n");
|
||||||
|
return 6;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (! (cdio_have_driver(DRIVER_NRG) && cdio_have_driver(DRIVER_BINCUE)) ) {
|
if (! (cdio_have_driver(DRIVER_NRG) && cdio_have_driver(DRIVER_BINCUE)) ) {
|
||||||
printf("You don't have enough drivers for this test\n");
|
printf("You don't have enough drivers for this test\n");
|
||||||
|
|||||||
Reference in New Issue
Block a user