)
AC_SUBST(RMTDIR)
+dnl
+dnl Handle --enable-ermt
+dnl
+AC_ARG_ENABLE([ermt],
+[ --enable-ermt compile ermt, an encrypting version of rmt (default is NO)],
+if test "$enableval" = "no"
+then
+ ERMT=""
+ CRYPTO=""
+ echo "Not compiling ermt"
+else
+ if test "$RMTDIR" = ""
+ then
+ AC_MSG_ERROR(ermt requires --enable-rmt)
+ fi
+ ERMT="ermt"
+ CRYPTO="-lcrypto"
+ echo "Compiling ermt"
+fi
+,
+ERMT=""
+CRYPTO=""
+echo "Not compiling ermt by default"
+)
+AC_SUBST(ERMT)
+AC_SUBST(CRYPTO)
+
dnl
dnl Handle --enable-kerberos
dnl
dnl
dnl Check for Ext2fs headers and libraries
dnl
-AC_CHECK_HEADER(ext2fs/ext2fs.h, [ext2fs_h=yes], [ext2fs_h=no])
+AC_CHECK_HEADER(ext2fs/ext2fs.h, [ext2fs_h=yes], [ext2fs_h=no], [-])
AC_CHECK_LIB(ext2fs, ext2fs_open, [ext2fs_lib=yes], [ext2fs_lib=no], [-lcom_err])
if test "$ext2fs_h" = no -o "$ext2fs_lib" = no; then
AC_MSG_ERROR(You need to install the Ext2fs libraries from the E2fsprogs distribution first - hint: make install-libs)
dnl
dnl Try to use ext2_fs.h header from libext2fs instead of from the kernel
dnl
-AC_CHECK_HEADERS(ext2fs/ext2_fs.h)
+AC_CHECK_HEADERS(ext2fs/ext2_fs.h, [], [], [-])
dnl
dnl Check for ext2_ino_t type
dnl
dnl Check for readline headers and libraries
dnl
-AC_CHECK_HEADER(readline/readline.h, [readline_h=yes], [readline_h=no])
+AC_CHECK_HEADER(readline/readline.h, [readline_h=yes], [readline_h=no], [-])
AC_CHECK_LIB(readline, readline, [readline_lib=yes], [readline_lib=no], "-ltermcap")
if test "$readline_h" = no -o "$readline_lib" = no; then
if test "$READLINE" = "-lreadline -ltermcap"; then
dnl
dnl Check for zlib headers and libraries
dnl
-AC_CHECK_HEADER(zlib.h, [zlib_h=yes], [zlib_h=no])
+AC_CHECK_HEADER(zlib.h, [zlib_h=yes], [zlib_h=no], [-])
AC_CHECK_LIB(z, compress2, [zlib_lib=yes], [zlib_lib=no])
if test "$zlib_h" = yes -a "$zlib_lib" = yes; then
ZLIB="-lz"
dnl
dnl Check for bzlib headers and libraries
dnl
-AC_CHECK_HEADER(bzlib.h, [bzlib_h=yes], [bzlib_h=no])
+AC_CHECK_HEADER(bzlib.h, [bzlib_h=yes], [bzlib_h=no], [-])
AC_CHECK_LIB(bz2, BZ2_bzBuffToBuffCompress, [bzlib_lib=yes], [bzlib_lib=no])
if test "$bzlib_h" = yes -a "$bzlib_lib" = yes; then
BZLIB="-lbz2"
])
fi
+dnl
+dnl Check for OpenSSL, for ermt
+dnl
+if test "$ERMT" != ""; then
+ AC_CHECK_HEADER(openssl/evp.h, [evp_h=yes], [evp_h=no])
+ AC_CHECK_LIB(crypto, EVP_CIPHER_CTX_set_padding, [crypto_lib=yes], [crypto_lib=no])
+ if test "$evp_h" = no -o "$crypto_lib" = no; then
+ AC_MSG_ERROR(You need to install the OpenSSL library (version 0.9.7a or later), or configure without --enable-ermt)
+ fi
+fi
+
dnl
dnl Check for types
dnl