on G*nt**, initialized globals seem to be made of fail and crash
[xonotic/d0_blind_id.git] / configure.ac
1 AC_INIT([d0_blind_id],[0.4],[divVerent@xonotic.org])
2 AC_CONFIG_MACRO_DIR([m4])
3 AM_INIT_AUTOMAKE([-Wall foreign])
4 AC_PROG_CC
5 LT_INIT
6
7 AC_ARG_WITH(openssl, AS_HELP_STRING([--with-openssl], [Use OpenSSL instead of GMP (beware of the OpenSSL license)]), [with_openssl=$withval], [with_openssl=no])
8 AC_ARG_WITH(tommath, AS_HELP_STRING([--with-tommath], [Use libtommath instead of GMP (slow, but WTFPL)]), [with_tommath=$withval], [with_tommath=no])
9 AM_CONDITIONAL(WITH_OPENSSL, [test x"$with_openssl" != xno])
10 AM_CONDITIONAL(WITH_TOMMATH, [test x"$with_tommath" != xno])
11
12 AS_IF([test x"$with_tommath" != xno],
13         [AC_SEARCH_LIBS(mp_init, tommath, ,
14                 [AC_MSG_ERROR([libtommath not found, see http://www.libtom.org/, or try --without-tommath])])],
15         [AS_IF([test x"$with_openssl" != xno],
16                 [AC_SEARCH_LIBS(BN_init, crypto, ,
17                         [AC_MSG_ERROR([OpenSSL not found, see http://www.openssl.org/, or try --without-openssl])])],
18                 [AC_SEARCH_LIBS(__gmpz_init, gmp, ,
19                         [AC_MSG_ERROR([GNU MP not found, see http://gmplib.org/, or try --with-openssl])])])])
20
21 AC_ARG_ENABLE(rijndael, AS_HELP_STRING([--disable-rijndael], [Disable build of the d0_rijndael library]), [enable_aes=$enableval], [enable_aes=yes])
22
23 AS_IF([test -f d0_rijndael.c], [], [AS_IF([test x"$enable_aes" != xno], [AC_MSG_ERROR([d0_rijndael.c is missing, try --disable-rijndael or download the full version of this library, but beware of crypto import laws then])])])
24 AM_CONDITIONAL(ENABLE_RIJNDAEL, [test x$enable_aes = xyes])
25
26 AC_CONFIG_FILES([Makefile d0_blind_id.pc d0_rijndael.pc])
27
28 AC_OUTPUT