remove small redundancy
[mkp224o.git] / configure.ac
blobb32b7f25697f89e739192f82a1462a3ddce4d0f0
1 AC_INIT(mkp224o)
2 # sanity check
3 AC_CONFIG_SRCDIR([main.c])
4 # C compiler
5 : ${CFLAGS="-O3 -march=native -fomit-frame-pointer"}
6 AC_PROG_CC
8 ed25519impl=""
9 AC_ARG_ENABLE([ref10],
10         [AS_HELP_STRING([--enable-ref10],
11                 [use ref10 ed25519 implementation @<:@default=yes@:>@])],
12         [
13                 AS_IF([test "x$ed25519impl" != "x" -a "$ed25519impl" != "ref10"],
14                         [AC_ERROR([only one ed25519 implementation can be defined])])
15                 ed25519impl="ref10"
16         ],
17         []
20 AC_ARG_ENABLE([amd64_51_30k],
21         [AS_HELP_STRING([--enable-amd64_51_30k],
22                 [use amd64_51_30k ed25519 implementation @<:@default=no@:>@])],
23         [
24                 AS_IF([test "x$ed25519impl" != "x" -a "$ed25519impl" != "amd64_51_30k"],
25                         [AC_ERROR([only one ed25519 implementation can be defined])])
26                 ed25519impl="amd64_51_30k"
27         ],
28         []
31 AC_ARG_ENABLE([amd64_64_24k],
32         [AS_HELP_STRING([--enable-amd64_64_24k],
33                 [use amd64_64_24k ed25519 implementation @<:@default=no@:>@])],
34         [
35                 AS_IF([test "x$ed25519impl" != "x" -a "$ed25519impl" != "amd64_64_24k"],
36                         [AC_ERROR([only one ed25519 implementation can be defined])])
37                 ed25519impl="amd64_64_24k"
38         ],
39         []
42 AS_IF([test "x$ed25519impl" == "x"],[ed25519impl=ref10])
44 AC_ARG_ENABLE([intfilter],
45         [AS_HELP_STRING([--enable-intfilter],
46                 [use 64bit integers for filtering. faster but limits filter length @<:@default=no@:>@])],
47         [], [enable_intfilter=no]
49 if test "x$enable_intfilter" = "xyes"
50 then
51         FILTERDEF="-DINTFILTER"
52 else
53         FILTERDEF=""
56 AC_SUBST(ED25519IMPL,["$ed25519impl"])
57 AC_SUBST(FILTERDEF,["$FILTERDEF"])
58 AC_OUTPUT(Makefile)