aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2015-06-11 10:53:26 -0400
committerRob Austein <sra@hactrn.net>2015-06-11 10:53:26 -0400
commit5f152f558e7bc8fc8d93ae250bdc61cd60ab5acd (patch)
tree097104aa649411d3bf3bec5b14963365016fed04 /configure.ac
parent5d21abbc8a727b7a586a91d0fc5c704deb1a69a4 (diff)
First cut at RSA decryption/signature using the Chinese Remainder
Theorem. Not yet tested, and given the number of moving parts I would be astonished if this version actually worked, but it does compile. Added some timing code to tests/test-rsa.c so we can see whether this is doing anything useful once it does work.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac21
1 files changed, 12 insertions, 9 deletions
diff --git a/configure.ac b/configure.ac
index d62d460..aecdcc0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -39,22 +39,25 @@
AC_INIT([libcryptech], [0.1])
-AC_ARG_VAR([FPGA_BUS], [Bus architecture to use (currently must be "EIM" or "I2C")])
-AC_ARG_VAR([CC], [C compiler command])
-AC_ARG_VAR([CFLAGS], [C compiler flags])
-AC_ARG_VAR([LDFLAGS], [Linker flags])
+AC_ARG_VAR([FPGA_BUS], [Bus architecture to use (currently must be "EIM" or "I2C")])
+AC_ARG_VAR([CC], [C compiler command])
+AC_ARG_VAR([CFLAGS], [C compiler flags])
+AC_ARG_VAR([LDFLAGS], [Linker flags])
+AC_ARG_VAR([TFMDIR], [Directory containing libtfm.a and tfm.h])
AS_CASE($FPGA_BUS, [""],[FPGA_BUS=EIM], [EIM|I2C],[],
- [AC_MSG_ERROR([Invalid setting of FPGA_BUS, must be "EIM" or "I2C"])])
-
-AS_CASE($CC, [""],[CC="cc"], [])
-AS_CASE($CFLAGS, [""],[CFLAGS="-g -Wall -fPIC"], [])
-AS_CASE($LDFLAGS, [""],[LDFLAGS="-g"], [])
+ [AC_MSG_ERROR([Invalid setting of FPGA_BUS, must be "EIM" or "I2C"])])
+
+AS_CASE($CC, [""],[CC='cc'], [])
+AS_CASE($CFLAGS, [""],[CFLAGS='-g3 -Wall -fPIC -std=c99 -I${TFMDIR}'], [])
+AS_CASE($LDFLAGS, [""],[LDFLAGS='-g3 -L${TFMDIR} -ltfm'], [])
+AS_CASE($TFMDIR, [""],[TFMDIR='${abs_top_builddir}/../libtfm'], [])
AC_MSG_NOTICE([FPGA bus: $FPGA_BUS])
AC_MSG_NOTICE([C compiler: $CC])
AC_MSG_NOTICE([C compiler flags: $CFLAGS])
AC_MSG_NOTICE([Linker flags: $LDFLAGS])
+AC_MSG_NOTICE([libtfm directory: $TFMDIR])
AC_CONFIG_FILES([Makefile tests/Makefile])
AC_OUTPUT