]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Only build SCSI support on Linux if we have the <scsi/sg.h> header.
authormike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Thu, 12 Oct 2006 17:55:17 +0000 (17:55 +0000)
committermike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Thu, 12 Oct 2006 17:55:17 +0000 (17:55 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@6029 7a7537e8-13f0-0310-91df-b6672ffda945

backend/scsi.c
config-scripts/cups-common.m4
config.h.in

index ffc33645a488518d63338b9d36a93b8c732abc3d..6654bfbdb3410b28da4486bbd195bb19a8eadc46 100644 (file)
@@ -80,7 +80,7 @@ void  list_devices(void);
 int    print_device(const char *resource, int fd, int copies);
 
 
-#ifdef __linux__
+#if defined(__linux__) && defined(HAVE_SCSI_SG_H)
 #  include "scsi-linux.c"
 #elif defined(__sgi)
 #  include "scsi-irix.c"
@@ -90,7 +90,7 @@ int   print_device(const char *resource, int fd, int copies);
  */
 void   list_devices(void) {}
 int    print_device(const char *resource, int fd, int copies) { return (CUPS_BACKEND_FAILED); }
-#endif /* __linux */
+#endif /* __linux && HAVE_SCSI_SG_H */
 
 
 /*
index 2834e906ed0acfa8904862e78d79eafb7f97d205..a780b19d9d68963c615fbde7b7165d11be81636d 100644 (file)
@@ -132,6 +132,7 @@ AC_CHECK_HEADER(strings.h,AC_DEFINE(HAVE_STRINGS_H))
 AC_CHECK_HEADER(bstring.h,AC_DEFINE(HAVE_BSTRING_H))
 AC_CHECK_HEADER(usersec.h,AC_DEFINE(HAVE_USERSEC_H))
 AC_CHECK_HEADER(sys/ioctl.h,AC_DEFINE(HAVE_SYS_IOCTL_H))
+AC_CHECK_HEADER(scsi/sg.h,AC_DEFINE(HAVE_SCSI_SG_H))
 
 dnl Checks for string functions.
 AC_CHECK_FUNCS(strdup strcasecmp strncasecmp strlcat strlcpy)
index 721f8d9e8dc6ffbafa56181b6402b8f41c63c7bb..b5bb16e828565a0f393f1667ed9729cb7b4a599f 100644 (file)
 #undef HAVE_CRYPT_H
 
 
+/*
+ * Do we have <scsi/sg.h>?
+ */
+
+#undef HAVE_SCSI_SG_H
+
+
 /*
  * Use <string.h>, <strings.h>, and/or <bstring.h>?
  */