2017-09-27 01:35:56 +02:00
|
|
|
AC_INIT(mkp224o)
|
2017-09-27 20:07:33 +02:00
|
|
|
# sanity check
|
2017-09-27 01:35:56 +02:00
|
|
|
AC_CONFIG_SRCDIR([main.c])
|
|
|
|
# C compiler
|
2017-09-27 20:07:33 +02:00
|
|
|
: ${CFLAGS="-O3 -march=native -fomit-frame-pointer"}
|
2017-09-27 01:35:56 +02:00
|
|
|
AC_PROG_CC
|
2017-09-27 03:07:41 +02:00
|
|
|
|
|
|
|
ed25519impl=""
|
|
|
|
AC_ARG_ENABLE([ref10],
|
|
|
|
[AS_HELP_STRING([--enable-ref10],
|
|
|
|
[use ref10 ed25519 implementation @<:@default=yes@:>@])],
|
|
|
|
[
|
|
|
|
AS_IF([test "x$ed25519impl" != "x" -a "$ed25519impl" != "ref10"],
|
2017-09-27 20:07:33 +02:00
|
|
|
[AC_ERROR([only one ed25519 implementation can be defined])])
|
2017-09-27 03:07:41 +02:00
|
|
|
ed25519impl="ref10"
|
|
|
|
],
|
|
|
|
[]
|
|
|
|
)
|
|
|
|
|
|
|
|
AC_ARG_ENABLE([amd64_51_30k],
|
|
|
|
[AS_HELP_STRING([--enable-amd64_51_30k],
|
|
|
|
[use amd64_51_30k ed25519 implementation @<:@default=no@:>@])],
|
|
|
|
[
|
|
|
|
AS_IF([test "x$ed25519impl" != "x" -a "$ed25519impl" != "amd64_51_30k"],
|
2017-09-27 20:07:33 +02:00
|
|
|
[AC_ERROR([only one ed25519 implementation can be defined])])
|
2017-09-27 03:07:41 +02:00
|
|
|
ed25519impl="amd64_51_30k"
|
|
|
|
],
|
|
|
|
[]
|
|
|
|
)
|
|
|
|
|
|
|
|
AC_ARG_ENABLE([amd64_64_24k],
|
|
|
|
[AS_HELP_STRING([--enable-amd64_64_24k],
|
|
|
|
[use amd64_64_24k ed25519 implementation @<:@default=no@:>@])],
|
|
|
|
[
|
|
|
|
AS_IF([test "x$ed25519impl" != "x" -a "$ed25519impl" != "amd64_64_24k"],
|
2017-09-27 20:07:33 +02:00
|
|
|
[AC_ERROR([only one ed25519 implementation can be defined])])
|
2017-09-27 03:07:41 +02:00
|
|
|
ed25519impl="amd64_64_24k"
|
|
|
|
],
|
|
|
|
[]
|
|
|
|
)
|
|
|
|
|
|
|
|
AS_IF([test "x$ed25519impl" == "x"],[ed25519impl=ref10])
|
|
|
|
|
2017-09-27 20:07:33 +02:00
|
|
|
AC_ARG_ENABLE([intfilter],
|
|
|
|
[AS_HELP_STRING([--enable-intfilter],
|
|
|
|
[use 64bit integers for filtering. faster but limits filter length @<:@default=no@:>@])],
|
|
|
|
[], [enable_intfilter=no]
|
|
|
|
)
|
|
|
|
if test "x$enable_intfilter" = "xyes"
|
|
|
|
then
|
|
|
|
FILTERDEF="-DINTFILTER"
|
|
|
|
else
|
|
|
|
FILTERDEF=""
|
|
|
|
fi
|
|
|
|
|
2017-09-27 03:07:41 +02:00
|
|
|
AC_SUBST(ED25519IMPL,["$ed25519impl"])
|
2017-09-27 20:07:33 +02:00
|
|
|
AC_SUBST(FILTERDEF,["$FILTERDEF"])
|
2017-09-27 01:35:56 +02:00
|
|
|
AC_OUTPUT(Makefile)
|