]> de.git.xonotic.org Git - xonotic/d0_blind_id.git/blob - configure.ac
use pthread library
[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_ENABLE(threads, AS_HELP_STRING([--disable-threads], [Turn off threading support]), [with_threads=$withval], [with_threads=yes])
8 AS_IF([test x"$with_threads" != xno],
9         dnl this also will define HAVE_PTHREAD if it worked
10         [AX_PTHREAD(,
11                 [AC_MSG_ERROR([pthreads not found, try --disable-threads])])])
12 AM_CONDITIONAL(WITH_THREADS, [test x"$with_threads" != xno])
13
14 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])
15 AC_ARG_WITH(tommath, AS_HELP_STRING([--with-tommath], [Use libtommath instead of GMP (slow, but WTFPL)]), [with_tommath=$withval], [with_tommath=no])
16 AM_CONDITIONAL(WITH_OPENSSL, [test x"$with_openssl" != xno])
17 AM_CONDITIONAL(WITH_TOMMATH, [test x"$with_tommath" != xno])
18
19 AS_IF([test x"$with_tommath" != xno],
20         [AC_SEARCH_LIBS(mp_init, tommath, ,
21                 [AC_MSG_ERROR([libtommath not found, see http://www.libtom.org/, or try --without-tommath])])],
22         [AS_IF([test x"$with_openssl" != xno],
23                 [AC_SEARCH_LIBS(BN_init, crypto, ,
24                         [AC_MSG_ERROR([OpenSSL not found, see http://www.openssl.org/, or try --without-openssl])])],
25                 [AC_SEARCH_LIBS(__gmpz_init, gmp, ,
26                         [AC_MSG_ERROR([GNU MP not found, see http://gmplib.org/, or try --with-openssl])])])])
27
28 AC_ARG_ENABLE(rijndael, AS_HELP_STRING([--disable-rijndael], [Disable build of the d0_rijndael library]), [enable_aes=$enableval], [enable_aes=yes])
29
30 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])])])
31 AM_CONDITIONAL(ENABLE_RIJNDAEL, [test x$enable_aes = xyes])
32
33 AC_CONFIG_FILES([Makefile d0_blind_id.pc d0_rijndael.pc])
34
35 AC_OUTPUT