blind_id_SOURCES = main.c
blind_id_LDADD = libd0_blind_id.la
-lib_LTLIBRARIES = libd0_blind_id.la libd0_rijndael.la
+lib_LTLIBRARIES = libd0_blind_id.la
# versioninfo:
# - compatible interface change: c:r:a -> c+1:0:a+1
# - incompatible interface change: c:r:a -> c+1:0:0
libd0_blind_id_la_LDFLAGS = -versioninfo 2:0:2
libd0_blind_id_la_CFLAGS = -fvisibility=hidden -Wold-style-definition -Wstrict-prototypes -Wsign-compare -Wdeclaration-after-statement
-libd0_rijndael_la_SOURCES = d0_rijndael.c
-libd0_rijndael_la_LDFLAGS = -versioninfo 0:0:0
-libd0_rijndael_la_CFLAGS = -fvisibility=hidden -Wold-style-definition -Wstrict-prototypes -Wsign-compare -Wdeclaration-after-statement
-
library_includedir = $(includedir)/d0_blind_id
library_include_HEADERS = d0_blind_id.h d0.h d0_rijndael.h
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_HEADERS = d0_blind_id.pc
+
+if ENABLE_RIJNDAEL
+library_include_HEADERS += d0_rijndael.h
+lib_LTLIBRARIES += libd0_rijndael.la
+libd0_rijndael_la_SOURCES = d0_rijndael.c
+libd0_rijndael_la_LDFLAGS = -versioninfo 0:0:0
+libd0_rijndael_la_CFLAGS = -fvisibility=hidden -Wold-style-definition -Wstrict-prototypes -Wsign-compare -Wdeclaration-after-statement
+endif
AC_SEARCH_LIBS(__gmpz_init, gmp, , [AC_MSG_ERROR([GNU MP not found, see http://gmplib.org/])])
+AC_ARG_ENABLE(rijndael, AS_HELP_STRING([--disable-rijndael], [Disable build of the d0_rijndael library]), [enable_aes=$enableval], [enable_aes=yes])
+AM_CONDITIONAL(ENABLE_RIJNDAEL, [test x$enable_aes = xtrue])
+
dnl AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([Makefile d0_blind_id.pc])
AC_OUTPUT