diff options
author | Douglas Gilbert <dgilbert@interlog.com> | 2017-12-29 18:23:19 +0000 |
---|---|---|
committer | Douglas Gilbert <dgilbert@interlog.com> | 2017-12-29 18:23:19 +0000 |
commit | b29ef85867d5347e8fed4c603986964868cba801 (patch) | |
tree | 6c39b1855f97dc416307229654713d9aed4c8d54 /configure.ac | |
parent | 766b77d70276eef4a6ae92217d1ffbcde819a88b (diff) | |
download | sg3_utils-b29ef85867d5347e8fed4c603986964868cba801.tar.gz |
sg_ses: further NVMe support work; decode array status dpage (obsolete); build: add SG_LIB_ANDROID
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@738 6180dd3e-e324-4e3e-922d-17de1ae2f315
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index c32e0585..1cce0b25 100644 --- a/configure.ac +++ b/configure.ac @@ -25,6 +25,8 @@ AC_CHECK_FUNCS(posix_fadvise) AC_CHECK_FUNCS(posix_memalign) AC_CHECK_FUNCS(sysconf) AC_CHECK_FUNCS(lseek64) +AC_SEARCH_LIBS([pthread_cancel], [pthread], [AC_DEFINE(HAVE_PTHREAD_CANCEL, 1, [Found pthread_cancel])], []) +AC_SEARCH_LIBS([pthread_kill], [pthread], [AC_DEFINE(HAVE_PTHREAD_KILL, 1, [Found pthread_kill])], []) AC_SUBST(GETOPT_O_FILES) AC_CANONICAL_HOST @@ -52,6 +54,17 @@ case "${host}" in # include <linux/types.h> #endif ]]) ;; + *-*-android*) + AC_DEFINE_UNQUOTED(SG_LIB_ANDROID, 1, [sg3_utils on android]) + AC_DEFINE_UNQUOTED(SG_LIB_LINUX, 1, [sg3_utils on linux]) + AC_SUBST([os_cflags], ['']) + AC_SUBST([os_libs], ['']) + AC_CHECK_HEADERS([linux/nvme_ioctl.h], [AC_DEFINE(HAVE_NVME, 1, [Found NVMe])], [], []) + AC_CHECK_HEADERS([linux/types.h linux/bsg.h linux/kdev_t.h], [], [], + [[#ifdef HAVE_LINUX_TYPES_H + # include <linux/types.h> + #endif + ]]) ;; *-*-freebsd*|*-*-kfreebsd*-gnu*) AC_DEFINE_UNQUOTED(SG_LIB_FREEBSD, 1, [sg3_utils on FreeBSD]) AC_DEFINE(HAVE_NVME, 1, ['Found NVMe']) @@ -93,6 +106,7 @@ AM_CONDITIONAL(OS_OSF, [echo $host_os | grep '^osf' > /dev/null]) AM_CONDITIONAL(OS_SOLARIS, [echo $host_os | grep '^solaris' > /dev/null]) AM_CONDITIONAL(OS_WIN32_MINGW, [echo $host_os | grep '^mingw' > /dev/null]) AM_CONDITIONAL(OS_WIN32_CYGWIN, [echo $host_os | grep '^cygwin' > /dev/null]) +AM_CONDITIONAL(OS_ANDROID, [echo $host_os | grep 'android' > /dev/null]) AC_ARG_ENABLE([linuxbsg], AC_HELP_STRING([--disable-linuxbsg], [option ignored, this is placeholder]), @@ -105,7 +119,11 @@ AC_ARG_ENABLE([win32-spt-direct], AC_ARG_ENABLE([scsistrings], [AS_HELP_STRING([--disable-scsistrings], - [Disable full SCSI sense strings])], - [], [AC_DEFINE_UNQUOTED(SG_SCSI_STRINGS, 1, [full SCSI sense strings], )]) + [Disable full SCSI sense strings and NVMe status strings])], + [], [AC_DEFINE_UNQUOTED(SG_SCSI_STRINGS, 1, [full SCSI sense strings and NVMe status strings], )]) + +AC_ARG_ENABLE([nvme-supp], + AC_HELP_STRING([--disable-nvme-supp], [remove all or most NVMe code]), + [AC_DEFINE_UNQUOTED(IGNORE_NVME, 1, [compile out NVMe support], )], []) AC_OUTPUT(Makefile include/Makefile lib/Makefile src/Makefile doc/Makefile scripts/Makefile) |