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 AC_DEFUN([AMANDA_S3_DEVICE], [
11 AC_REQUIRE([AMANDA_CHECK_LIBCURL])
12 AC_REQUIRE([AMANDA_CHECK_HMAC])
14 AC_ARG_ENABLE([s3-device],
15 AS_HELP_STRING([--disable-s3-device],
16 [disable the S3 device]),
17 [ WANT_S3_DEVICE=$enableval ], [ WANT_S3_DEVICE=maybe ])
19 AC_MSG_CHECKING([whether to include the Amazon S3 device])
20 # if the user didn't specify 'no', then check for support
21 if test x"$WANT_S3_DEVICE" != x"no"; then
22 if test x"$HAVE_CURL" = x"yes" -a x"$HAVE_HMAC" = x"yes"; then
25 # no support -- if the user explicitly enabled the device,
26 # then this is an error
27 if test x"$WANT_S3_DEVICE" = x"yes"; then
29 AC_MSG_ERROR([Cannot build the Amazon S3 device: one or more prerequisites are missing.])
35 AC_MSG_RESULT($WANT_S3_DEVICE)
37 AM_CONDITIONAL([WANT_S3_DEVICE], [test x"$WANT_S3_DEVICE" = x"yes"])
39 # Now handle any setup for S3, if we want it.
40 if test x"$WANT_S3_DEVICE" = x"yes"; then
41 AC_DEFINE(WANT_S3_DEVICE, [], [Compile Amazon S3 driver])