7 # Perform the necessary checks for the S3 Device. If the S3 device should be built,
8 # WANT_S3_DEVICE is DEFINEd and set up as an AM_CONDITIONAL.
10 # The subsidiary DevPay support, if enabled, defines and AM_CONDITIONALizes
13 AC_DEFUN([AMANDA_S3_DEVICE], [
14 AC_REQUIRE([AMANDA_CHECK_LIBCURL])
15 AC_REQUIRE([AMANDA_CHECK_HMAC])
17 AC_ARG_ENABLE([s3-device],
18 AS_HELP_STRING([--disable-s3-device],
19 [disable the S3 device]),
20 [ WANT_S3_DEVICE=$enableval ], [ WANT_S3_DEVICE=maybe ])
22 AC_MSG_CHECKING([whether to include the Amazon S3 device])
23 # if the user didn't specify 'no', then check for support
24 if test x"$WANT_S3_DEVICE" != x"no"; then
25 if test x"$HAVE_CURL" = x"yes" -a x"$HAVE_HMAC" = x"yes"; then
28 # no support -- if the user explicitly enabled the device,
29 # then this is an error
30 if test x"$WANT_S3_DEVICE" = x"yes"; then
32 AC_MSG_ERROR([Cannot build the Amazon S3 device: one or more prerequisites are missing.])
38 AC_MSG_RESULT($WANT_S3_DEVICE)
40 AM_CONDITIONAL([WANT_S3_DEVICE], [test x"$WANT_S3_DEVICE" = x"yes"])
42 # Now handle any setup for S3, if we want it.
43 if test x"$WANT_S3_DEVICE" = x"yes"; then
44 AC_DEFINE(WANT_S3_DEVICE, [], [Compile Amazon S3 driver])
48 AC_ARG_ENABLE([devpay],
49 AS_HELP_STRING([--enable-devpay],
50 [Use devpay authentication for Amazon S3 driver]),
51 [WANT_DEVPAY=$enableval], [WANT_DEVPAY=no])
53 AC_MSG_CHECKING([whether to include the Amazon S3 device's DevPay support])
54 if test x"$WANT_DEVPAY" = x"yes"; then
55 if test x"$WANT_S3_DEVICE" != x"yes"; then
57 AC_MSG_ERROR([DevPay support requires the S3 device (--enable-s3-device)])
60 AC_DEFINE([WANT_DEVPAY], [], [Compile Amazon DevPay support])
62 AC_MSG_RESULT($WANT_DEVPAY)
64 AM_CONDITIONAL([WANT_DEVPAY], [test "$WANT_DEVPAY" = "yes"])