Detecting Linux systems without generic SCSI support by scsi/scsi.h

This commit is contained in:
2017-01-27 12:10:52 +01:00
parent 783e706116
commit aa346379d5
3 changed files with 25 additions and 2 deletions

View File

@ -376,3 +376,24 @@ AC_DEFUN([LIBBURNIA_CHECK_ARCH_LIBS],
fi
])
dnl LIBBURNIA_CHECK_LINUX_SCSI is by Thomas Schmitt, libburnia project
dnl
AC_DEFUN([LIBBURNIA_CHECK_LINUX_SCSI],
[
dnl Check whether it is a Linux without scsi/scsi.h
AH_TEMPLATE([Libburn_use_sg_dummY],
[Define to compile without OS specific SCSI features])
AC_MSG_CHECKING([for missing scsi/scsi.h on Linux])
AC_TRY_COMPILE([
#ifdef __linux
#include <scsi/scsi.h>
#endif
],
[return;],
[AC_MSG_RESULT([no])],
[AC_DEFINE([Libburn_use_sg_dummY], [yes])
AC_MSG_RESULT([yes])]
)
])