1
0
mirror of https://github.com/biergaizi/codecrypt synced 2024-06-28 09:53:46 +00:00
codecrypt/configure.ac

56 lines
1.3 KiB
Plaintext
Raw Normal View History

2012-02-23 11:47:30 +00:00
AC_PREREQ(2.6)
2014-04-09 14:34:50 +00:00
AC_INIT([codecrypt], [1.6])
2012-02-23 11:47:30 +00:00
AC_CONFIG_AUX_DIR(.) # because of libtoolize
2013-09-12 07:50:26 +00:00
AC_CONFIG_MACRO_DIR([m4])
2012-02-23 11:47:30 +00:00
AM_INIT_AUTOMAKE()
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES])
2013-04-20 11:47:41 +00:00
LT_INIT
2012-02-23 11:47:30 +00:00
AM_PROG_CC_C_O
AC_PROG_CXX
AC_PROG_CPP
2012-02-23 11:47:30 +00:00
AC_PROG_INSTALL
2013-04-20 11:47:41 +00:00
#check for compilable GMP presence
AC_CHECK_HEADERS([gmp.h], , AC_MSG_ERROR([Codecrypt requires gmp.h]))
AC_CHECK_LIB(gmp, __gmpz_init, , AC_MSG_ERROR([Codecrypt requires libgmp]))
#check whether to build with crypto++
AC_ARG_WITH([cryptopp],
AC_HELP_STRING([--with-cryptopp],[Build algorithms that need Crypto++ support]),
[WITH_CRYPTOPP=$withval],
[WITH_CRYPTOPP=yes])
#and check crypto++
if test "$WITH_CRYPTOPP" = "yes"; then
AC_LANG_PUSH([C++])
AC_CHECK_HEADERS([crypto++/sha.h crypto++/tiger.h crypto++/ripemd.h], , AC_MSG_ERROR([Codecrypt requires Crypto++]))
AC_LANG_POP([C++])
AC_DEFINE([HAVE_CRYPTOPP], [1])
AC_SUBST([CRYPTOPP_LIBS], [-lcryptopp])
else
AC_DEFINE([HAVE_CRYPTOPP], [0])
fi
2013-04-20 11:47:41 +00:00
#check for standard functions
AC_CHECK_FUNCS([memset mkdir], , AC_MSG_ERROR([Required function missing]))
#unixy headers
AC_CHECK_HEADERS([fcntl.h inttypes.h stddef.h stdlib.h string.h sys/file.h unistd.h], , AC_MSG_ERROR([Required header file missing]))
#other used stuff
AC_CHECK_HEADER_STDBOOL
AC_C_INLINE
AC_TYPE_SIZE_T
AC_TYPE_UINT32_T
AC_TYPE_UINT64_T
AC_TYPE_UINT8_T
2012-02-23 11:47:30 +00:00
2013-04-20 11:47:41 +00:00
AC_CONFIG_FILES([Makefile])
AC_OUTPUT