Configure: add a test for SG_IO

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
This commit is contained in:
Ronnie Sahlberg
2014-09-18 14:26:03 -07:00
parent f015ab095a
commit 40de7d95a9

View File

@@ -91,6 +91,16 @@ if test x"$libiscsi_cv_HAVE_SOCKADDR_IN6" = x"yes"; then
AC_DEFINE(HAVE_SOCKADDR_IN6,1,[Whether we have IPv6 support])
fi
AC_CACHE_CHECK([for SG_IO support],libiscsi_cv_HAVE_SG_IO,[
AC_TRY_COMPILE([
#include <unistd.h>
#include <scsi/sg.h>],
[int sgio = SG_IO;],
libiscsi_cv_HAVE_SG_IO=yes,libiscsi_cv_HAVE_SG_IO=no)])
if test x"$libiscsi_cv_HAVE_SG_IO" = x"yes"; then
AC_DEFINE(HAVE_SG_IO,1,[Whether we have SG_IO support])
fi
AC_MSG_CHECKING(whether libcunit is available)
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"