]> git.sur5r.net Git - freertos/blob - FreeRTOS-Plus/Source/CyaSSL/configure.ac
Update CyaSSL to latest version.
[freertos] / FreeRTOS-Plus / Source / CyaSSL / configure.ac
1 # configure.ac
2 #
3 # Copyright (C) 2006-2014 wolfSSL Inc.
4 #
5 # This file is part of CyaSSL.
6 #
7 #
8
9 AC_INIT([cyassl],[3.1.0],[https://github.com/cyassl/cyassl/issues],[cyassl],[http://www.wolfssl.com])
10
11 AC_CONFIG_AUX_DIR([build-aux])
12
13 AC_CANONICAL_HOST
14 AC_CANONICAL_BUILD
15
16 AM_INIT_AUTOMAKE([1.11 -Wall -Werror -Wno-portability foreign tar-ustar subdir-objects no-define color-tests])
17 AC_PREREQ([2.63])
18
19 AC_ARG_PROGRAM
20 AC_DEFUN([PROTECT_AC_USE_SYSTEM_EXTENSIONS],
21          [AX_SAVE_FLAGS
22           AC_LANG_PUSH([C])
23           AC_USE_SYSTEM_EXTENSIONS
24           AC_LANG_POP([C])
25           AX_RESTORE_FLAGS
26           ])
27 #PROTECT_AC_USE_SYSTEM_EXTENSIONS
28
29 AC_CONFIG_MACRO_DIR([m4])
30
31 AC_CONFIG_HEADERS([config.h:config.in])dnl Keep filename to 8.3 for MS-DOS.
32
33 #shared library versioning
34 CYASSL_LIBRARY_VERSION=5:6:0
35 #                      | | |
36 #               +------+ | +---+
37 #               |        |     |
38 #              current:revision:age
39 #               |        |     |
40 #               |        |     +- increment if interfaces have been added
41 #               |        |        set to zero if interfaces have been removed
42 #                        |        or changed
43 #               |        +- increment if source code has changed
44 #               |           set to zero if current is incremented
45 #               +- increment if interfaces have been added, removed or changed
46 AC_SUBST([CYASSL_LIBRARY_VERSION])
47
48 # capture user C_EXTRA_FLAGS from ./configure line, CFLAGS may hold -g -O2 even
49 # if user doesn't override, no way to tell
50 USER_C_EXTRA_FLAGS="$C_EXTRA_FLAGS"
51
52 LT_PREREQ([2.2])
53 LT_INIT([disable-static],[win32-dll])
54 LT_LANG([C++])
55 LT_LANG([C])
56
57 gl_VISIBILITY
58 AS_IF([ test -n "$CFLAG_VISIBILITY" ], [
59        AM_CPPFLAGS="$AM_CPPFLAGS $CFLAG_VISIBILITY"
60        CPPFLAGS="$CPPFLAGS $CFLAG_VISIBILITY"
61        ])
62
63 m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
64
65 AC_CHECK_FUNCS([gethostbyname])
66 AC_CHECK_FUNCS([getaddrinfo])
67 AC_CHECK_FUNCS([gettimeofday])
68 AC_CHECK_FUNCS([inet_ntoa])
69 AC_CHECK_FUNCS([memset])
70 AC_CHECK_FUNCS([socket])
71 AC_CHECK_HEADERS([arpa/inet.h])
72 AC_CHECK_HEADERS([fcntl.h])
73 AC_CHECK_HEADERS([limits.h])
74 AC_CHECK_HEADERS([netdb.h])
75 AC_CHECK_HEADERS([netinet/in.h])
76 AC_CHECK_HEADERS([stddef.h])
77 AC_CHECK_HEADERS([sys/ioctl.h])
78 AC_CHECK_HEADERS([sys/socket.h])
79 AC_CHECK_HEADERS([sys/time.h])
80 AC_CHECK_HEADERS([errno.h])
81 AC_CHECK_LIB(network,socket)
82 AC_CHECK_SIZEOF(long long, 8)
83 AC_CHECK_SIZEOF(long, 4)
84 AC_CHECK_TYPES(__uint128_t)
85 AC_C_BIGENDIAN
86 # mktime check takes forever on some systems, if time supported it would be
87 # highly unusual for mktime to be missing
88 #AC_FUNC_MKTIME 
89
90 AC_PROG_CC
91 AC_PROG_CC_C_O
92 AC_PROG_CXX
93 AC_PROG_INSTALL
94 AC_TYPE_SIZE_T
95 AC_TYPE_UINT8_T
96 AM_PROG_AS
97 AM_PROG_CC_C_O
98 LT_LIB_M
99
100 OPTIMIZE_CFLAGS="-Os -fomit-frame-pointer"
101 OPTIMIZE_FAST_CFLAGS="-O2 -fomit-frame-pointer"
102 OPTIMIZE_HUGE_CFLAGS="-funroll-loops -DTFM_SMALL_SET -DTFM_HUGE_SET"
103 DEBUG_CFLAGS="-g -DDEBUG -DDEBUG_CYASSL"
104
105 thread_ls_on=no
106 # Thread local storage
107 AX_TLS([
108         [AM_CFLAGS="$AM_CFLAGS -DHAVE_THREAD_LS"]
109         [thread_ls_on=yes]
110        ] , [:])
111
112
113 # DEBUG
114 AX_DEBUG
115 AS_IF([test "$ax_enable_debug" = "yes"],
116       [AM_CFLAGS="$DEBUG_CFLAGS $AM_CFLAGS"],
117       [AM_CFLAGS="$AM_CFLAGS -DNDEBUG"])
118
119
120 # SINGLE THREADED
121 AC_ARG_ENABLE([singlethreaded],
122     [  --enable-singlethreaded Enable CyaSSL single threaded (default: disabled)],
123     [ ENABLED_SINGLETHREADED=$enableval ],
124     [ ENABLED_SINGLETHREADED=no ])
125
126 AS_IF([ test "x$ENABLED_SINGLETHREADED" = "xno" ],[
127        AX_PTHREAD([
128                    AC_DEFINE([HAVE_PTHREAD], [1], [Define if you have POSIX threads libraries and header files.])
129                    AM_CFLAGS="-D_POSIX_THREADS $AM_CFLAGS $PTHREAD_CFLAGS"
130                    LIBS="$LIBS $PTHREAD_LIBS"
131                    ],[
132                       ENABLED_SINGLETHREADED=yes
133                       ])
134        ])
135
136 AS_IF([ test "x$ENABLED_SINGLETHREADED" = "xyes" ],[ AM_CFLAGS="-DSINGLE_THREADED $AM_CFLAGS" ])
137
138
139 # DTLS
140 AC_ARG_ENABLE([dtls],
141     [  --enable-dtls           Enable CyaSSL DTLS (default: disabled)],
142     [ ENABLED_DTLS=$enableval ],
143     [ ENABLED_DTLS=no ]
144     )
145 if test "$ENABLED_DTLS" = "yes"
146 then
147   AM_CFLAGS="-DCYASSL_DTLS $AM_CFLAGS"
148 fi
149
150
151 # OPENSSL Extra Compatibility
152 AC_ARG_ENABLE([opensslextra],
153     [  --enable-opensslextra   Enable extra OpenSSL API, size+ (default: disabled)],
154     [ ENABLED_OPENSSLEXTRA=$enableval ],
155     [ ENABLED_OPENSSLEXTRA=no ]
156     )
157 if test "$ENABLED_OPENSSLEXTRA" = "yes"
158 then
159   AM_CFLAGS="-DOPENSSL_EXTRA $AM_CFLAGS"
160 fi
161
162 if test "$ENABLED_OPENSSLEXTRA" = "yes" && test "$ENABLED_SMALL" = "yes"
163 then
164     AC_MSG_ERROR([cannot enable small and opensslextra, only one or the other.])
165 fi
166
167
168 # IPv6 Test Apps
169 AC_ARG_ENABLE([ipv6],
170     [  --enable-ipv6           Enable testing of IPV6 (default: disabled)],
171     [ ENABLED_IPV6=$enableval ],
172     [ ENABLED_IPV6=no ]
173     )
174
175 if test "$ENABLED_IPV6" = "yes"
176 then
177     AM_CFLAGS="$AM_CFLAGS -DTEST_IPV6"
178 fi
179
180
181 # Fortress build 
182 AC_ARG_ENABLE([fortress],
183     [  --enable-fortress       Enable SSL fortress build (default: disabled)],
184     [ ENABLED_FORTRESS=$enableval ],
185     [ ENABLED_FORTRESS=no ]
186     )
187
188 if test "$ENABLED_FORTRESS" = "yes"
189 then
190     AM_CFLAGS="$AM_CFLAGS -DFORTRESS -DCYASSL_ALWAYS_VERIFY_CB -DOPENSSL_EXTRA -DCYASSL_DES_ECB -DCYASSL_AES_COUNTER -DCYASSL_AES_DIRECT -DCYASSL_DER_LOAD -DCYASSL_SHA512 -DCYASSL_SHA384 -DCYASSL_KEY_GEN"
191 fi
192
193
194 # ssl bump build 
195 AC_ARG_ENABLE([bump],
196     [  --enable-bump           Enable SSL Bump build (default: disabled)],
197     [ ENABLED_BUMP=$enableval ],
198     [ ENABLED_BUMP=no ]
199     )
200
201 if test "$ENABLED_BUMP" = "yes"
202 then
203     AM_CFLAGS="$AM_CFLAGS -DLARGE_STATIC_BUFFERS -DCYASSL_CERT_GEN -DCYASSL_KEY_GEN -DHUGE_SESSION_CACHE -DOPENSSL_EXTRA -DFP_MAX_BITS=8192 -DCYASSL_DER_LOAD -DCYASSL_ALT_NAMES -DCYASSL_TEST_CERT"
204 fi
205
206 ENABLED_SLOWMATH="yes"
207
208 # lean psk build 
209 AC_ARG_ENABLE([leanpsk],
210     [  --enable-leanpsk        Enable Lean PSK build (default: disabled)],
211     [ ENABLED_LEANPSK=$enableval ],
212     [ ENABLED_LEANPSK=no ]
213     )
214
215 if test "$ENABLED_LEANPSK" = "yes"
216 then
217     AM_CFLAGS="$AM_CFLAGS -DCYASSL_LEANPSK -DHAVE_NULL_CIPHER -DSINGLE_THREADED -DNO_AES -DNO_FILESYSTEM -DNO_RABBIT -DNO_RSA -DNO_DSA -DNO_DH -DNO_CERTS -DNO_PWDBASED -DNO_DES3 -DNO_MD4 -DNO_MD5 -DNO_ERROR_STRINGS -DNO_OLD_TLS -DNO_RC4 -DNO_WRITEV -DNO_SESSION_CACHE -DNO_DEV_RANDOM -DCYASSL_USER_IO -DNO_SHA -DUSE_SLOW_SHA"
218     ENABLED_SLOWMATH="no"
219     ENABLED_SINGLETHREADED="yes"
220 fi
221
222 AM_CONDITIONAL([BUILD_LEANPSK], [test "x$ENABLED_LEANPSK" = "xyes"])
223
224
225 # big cache
226 AC_ARG_ENABLE([bigcache],
227     [  --enable-bigcache       Enable big session cache (default: disabled)],
228     [ ENABLED_BIGCACHE=$enableval ],
229     [ ENABLED_BIGCACHE=no ]
230     )
231
232 if test "$ENABLED_BIGCACHE" = "yes"
233 then
234     AM_CFLAGS="$AM_CFLAGS -DBIG_SESSION_CACHE"
235 fi
236
237
238 # HUGE cache
239 AC_ARG_ENABLE([hugecache],
240     [  --enable-hugecache      Enable huge session cache (default: disabled)],
241     [ ENABLED_HUGECACHE=$enableval ],
242     [ ENABLED_HUGECACHE=no ]
243     )
244
245 if test "$ENABLED_HUGECACHE" = "yes"
246 then
247     AM_CFLAGS="$AM_CFLAGS -DHUGE_SESSION_CACHE"
248 fi
249
250
251 # SMALL cache
252 AC_ARG_ENABLE([smallcache],
253     [  --enable-smallcache     Enable small session cache (default: disabled)],
254     [ ENABLED_SMALLCACHE=$enableval ],
255     [ ENABLED_SMALLCACHE=no ]
256     )
257
258 if test "$ENABLED_SMALLCACHE" = "yes"
259 then
260     AM_CFLAGS="$AM_CFLAGS -DSMALL_SESSION_CACHE"
261 fi
262
263
264 # Persistent session cache 
265 AC_ARG_ENABLE([savesession],
266     [  --enable-savesession    Enable persistent session cache (default: disabled)],
267     [ ENABLED_SAVESESSION=$enableval ],
268     [ ENABLED_SAVESESSION=no ]
269     )
270
271 if test "$ENABLED_SAVESESSION" = "yes"
272 then
273     AM_CFLAGS="$AM_CFLAGS -DPERSIST_SESSION_CACHE"
274 fi
275
276
277 # Persistent cert cache 
278 AC_ARG_ENABLE([savecert],
279     [  --enable-savecert       Enable persistent cert cache (default: disabled)],
280     [ ENABLED_SAVECERT=$enableval ],
281     [ ENABLED_SAVECERT=no ]
282     )
283
284 if test "$ENABLED_SAVECERT" = "yes"
285 then
286     AM_CFLAGS="$AM_CFLAGS -DPERSIST_CERT_CACHE"
287 fi
288
289
290 # Atomic User Record Layer  
291 AC_ARG_ENABLE([atomicuser],
292     [  --enable-atomicuser     Enable Atomic User Record Layer (default: disabled)],
293     [ ENABLED_ATOMICUSER=$enableval ],
294     [ ENABLED_ATOMICUSER=no ]
295     )
296
297 if test "$ENABLED_ATOMICUSER" = "yes"
298 then
299     AM_CFLAGS="$AM_CFLAGS -DATOMIC_USER"
300 fi
301
302
303 # Public Key Callbacks  
304 AC_ARG_ENABLE([pkcallbacks],
305     [  --enable-pkcallbacks    Enable Public Key Callbacks (default: disabled)],
306     [ ENABLED_PKCALLBACKS=$enableval ],
307     [ ENABLED_PKCALLBACKS=no ]
308     )
309
310 if test "$ENABLED_PKCALLBACKS" = "yes"
311 then
312     AM_CFLAGS="$AM_CFLAGS -DHAVE_PK_CALLBACKS"
313 fi
314
315
316 # SNIFFER
317 ENABLED_SNIFFTEST=no
318 AC_ARG_ENABLE([sniffer],
319    [AS_HELP_STRING([--enable-sniffer],[ Enable CyaSSL sniffer support (default: disabled) ])],[
320        ENABLED_SNIFFER=yes 
321        AM_CFLAGS="$AM_CFLAGS -DCYASSL_SNIFFER -DOPENSSL_EXTRA"
322        AS_IF([ test "x$enableval" = "xyes" ],[ AC_CHECK_HEADERS([pcap/pcap.h],[ 
323            ENABLED_SNIFFTEST=yes 
324    ],[ AC_MSG_WARN([cannot enable sniffer test without having libpcap available.]) ]) ])
325    ],[
326        ENABLED_SNIFFER=no
327    ])
328
329 AM_CONDITIONAL([BUILD_SNIFFER],   [ test "x$ENABLED_SNIFFER"   = "xyes" ])
330 AM_CONDITIONAL([BUILD_SNIFFTEST], [ test "x$ENABLED_SNIFFTEST" = "xyes" ])
331
332 # AES-GCM
333 AC_ARG_ENABLE([aesgcm],
334     [  --enable-aesgcm         Enable CyaSSL AES-GCM support (default: disabled)],
335     [ ENABLED_AESGCM=$enableval ],
336     [ ENABLED_AESGCM=no ]
337     )
338
339 if test "$ENABLED_AESGCM" = "word32"
340 then
341     AM_CFLAGS="$AM_CFLAGS -DGCM_WORD32"
342     ENABLED_AESGCM=yes
343 fi
344
345 if test "$ENABLED_AESGCM" = "small"
346 then
347     AM_CFLAGS="$AM_CFLAGS -DGCM_SMALL"
348     ENABLED_AESGCM=yes
349 fi
350
351 if test "$ENABLED_AESGCM" = "table"
352 then
353     AM_CFLAGS="$AM_CFLAGS -DGCM_TABLE"
354     ENABLED_AESGCM=yes
355 fi
356
357 if test "$ENABLED_AESGCM" = "yes"
358 then
359     AM_CFLAGS="$AM_CFLAGS -DHAVE_AESGCM"
360 fi
361
362 AM_CONDITIONAL([BUILD_AESGCM], [test "x$ENABLED_AESGCM" = "xyes"])
363
364
365 # AES-CCM
366 AC_ARG_ENABLE([aesccm],
367     [  --enable-aesccm         Enable CyaSSL AES-CCM support (default: disabled)],
368     [ ENABLED_AESCCM=$enableval ],
369     [ ENABLED_AESCCM=no ]
370     )
371
372 if test "$ENABLED_AESCCM" = "yes"
373 then
374     AM_CFLAGS="$AM_CFLAGS -DHAVE_AESCCM"
375 fi
376
377 AM_CONDITIONAL([BUILD_AESCCM], [test "x$ENABLED_AESCCM" = "xyes"])
378
379
380 # AES-NI
381 AC_ARG_ENABLE([aesni],
382     [  --enable-aesni          Enable CyaSSL AES-NI support (default: disabled)],
383     [ ENABLED_AESNI=$enableval ],
384     [ ENABLED_AESNI=no ]
385     )
386
387 if test "$ENABLED_AESNI" = "yes"
388 then
389     AM_CFLAGS="$AM_CFLAGS -DCYASSL_AESNI"
390     if test "$GCC" = "yes"
391     then
392         # GCC needs these flags, icc doesn't
393         # opt levels greater than 2 may cause problems on systems w/o aesni
394         if test "$CC" != "icc"
395         then
396             AM_CFLAGS="$AM_CFLAGS -maes -msse4"
397         fi
398     fi
399 fi
400
401 AM_CONDITIONAL([BUILD_AESNI], [test "x$ENABLED_AESNI" = "xyes"])
402
403
404 # Camellia
405 AC_ARG_ENABLE([camellia],
406     [  --enable-camellia       Enable CyaSSL Camellia support (default: disabled)],
407     [ ENABLED_CAMELLIA=$enableval ],
408     [ ENABLED_CAMELLIA=no ]
409     )
410
411 if test "$ENABLED_CAMELLIA" = "yes"
412 then
413     AM_CFLAGS="$AM_CFLAGS -DHAVE_CAMELLIA"
414 fi
415
416 AM_CONDITIONAL([BUILD_CAMELLIA], [test "x$ENABLED_CAMELLIA" = "xyes"])
417
418
419 # MD2
420 AC_ARG_ENABLE([md2],
421     [  --enable-md2            Enable CyaSSL MD2 support (default: disabled)],
422     [ ENABLED_MD2=$enableval ],
423     [ ENABLED_MD2=no ]
424     )
425
426 if test "$ENABLED_BUMP" = "yes"
427 then
428     ENABLED_MD2="yes"
429 fi
430
431 if test "$ENABLED_MD2" = "yes"
432 then
433     AM_CFLAGS="$AM_CFLAGS -DCYASSL_MD2"
434 fi
435
436 AM_CONDITIONAL([BUILD_MD2], [test "x$ENABLED_MD2" = "xyes"])
437
438
439 # NULL CIPHER 
440 AC_ARG_ENABLE([nullcipher],
441     [  --enable-nullcipher     Enable CyaSSL NULL cipher support (default: disabled)],
442     [ ENABLED_NULL_CIPHER=$enableval ],
443     [ ENABLED_NULL_CIPHER=no ]
444     )
445
446 if test "$ENABLED_NULL_CIPHER" = "yes"
447 then
448     AM_CFLAGS="$AM_CFLAGS -DHAVE_NULL_CIPHER"
449 fi
450
451 # RIPEMD
452 AC_ARG_ENABLE([ripemd],
453     [  --enable-ripemd         Enable CyaSSL RIPEMD-160 support (default: disabled)],
454     [ ENABLED_RIPEMD=$enableval ],
455     [ ENABLED_RIPEMD=no ]
456     )
457
458 if test "$ENABLED_RIPEMD" = "yes"
459 then
460     AM_CFLAGS="$AM_CFLAGS -DCYASSL_RIPEMD"
461 fi
462
463 AM_CONDITIONAL([BUILD_RIPEMD], [test "x$ENABLED_RIPEMD" = "xyes"])
464
465
466 # BLAKE2
467 AC_ARG_ENABLE([blake2],
468     [  --enable-blake2         Enable CyaSSL BLAKE2 support (default: disabled)],
469     [ ENABLED_BLAKE2=$enableval ],
470     [ ENABLED_BLAKE2=no ]
471     )
472
473 if test "$ENABLED_BLAKE2" = "yes"
474 then
475     AM_CFLAGS="$AM_CFLAGS -DHAVE_BLAKE2"
476 fi
477
478 AM_CONDITIONAL([BUILD_BLAKE2], [test "x$ENABLED_BLAKE2" = "xyes"])
479
480
481 # SHA512
482 AC_ARG_ENABLE([sha512],
483     [  --enable-sha512         Enable CyaSSL SHA-512 support (default: disabled)],
484     [ ENABLED_SHA512=$enableval ],
485     [ ENABLED_SHA512=no ]
486     )
487
488 if test "$ENABLED_SHA512" = "yes"
489 then
490     AM_CFLAGS="$AM_CFLAGS -DCYASSL_SHA512 -DCYASSL_SHA384"
491 fi
492
493 if test "$ENABLED_FORTRESS" = "yes"
494 then
495     ENABLED_SHA512="yes"
496 fi
497
498
499 AM_CONDITIONAL([BUILD_SHA512], [test "x$ENABLED_SHA512" = "xyes"])
500
501
502 # SESSION CERTS
503 AC_ARG_ENABLE([sessioncerts],
504     [  --enable-sessioncerts   Enable session cert storing (default: disabled)],
505     [ ENABLED_SESSIONCERTS=$enableval ],
506     [ ENABLED_SESSIONCERTS=no ]
507     )
508
509 if test "$ENABLED_SESSIONCERTS" = "yes"
510 then
511     AM_CFLAGS="$AM_CFLAGS -DSESSION_CERTS"
512 fi
513
514
515 # KEY GENERATION
516 AC_ARG_ENABLE([keygen],
517     [  --enable-keygen         Enable key generation (default: disabled)],
518     [ ENABLED_KEYGEN=$enableval ],
519     [ ENABLED_KEYGEN=no ]
520     )
521
522 if test "$ENABLED_KEYGEN" = "yes"
523 then
524     AM_CFLAGS="$AM_CFLAGS -DCYASSL_KEY_GEN"
525 fi
526
527
528 # CERT GENERATION
529 AC_ARG_ENABLE([certgen],
530     [  --enable-certgen        Enable cert generation (default: disabled)],
531     [ ENABLED_CERTGEN=$enableval ],
532     [ ENABLED_CERTGEN=no ]
533     )
534
535 if test "$ENABLED_CERTGEN" = "yes"
536 then
537     AM_CFLAGS="$AM_CFLAGS -DCYASSL_CERT_GEN"
538 fi
539
540
541 # CERT REQUEST GENERATION
542 AC_ARG_ENABLE([certreq],
543     [  --enable-certreq        Enable cert request generation (default: disabled)],
544     [ ENABLED_CERTREQ=$enableval ],
545     [ ENABLED_CERTREQ=no ]
546     )
547
548 if test "$ENABLED_CERTREQ" = "yes"
549 then
550     if test "$ENABLED_CERTGEN" = "no"
551     then
552         AC_MSG_ERROR([cannot enable certreq without enabling certgen.])
553     fi
554     AM_CFLAGS="$AM_CFLAGS -DCYASSL_CERT_REQ"
555 fi
556
557
558 # SEP
559 AC_ARG_ENABLE([sep],
560     [  --enable-sep            Enable sep extensions (default: disabled)],
561     [ ENABLED_SEP=$enableval ],
562     [ ENABLED_SEP=no ]
563     )
564 if test "$ENABLED_SEP" = "yes"
565 then
566   AM_CFLAGS="-DCYASSL_SEP -DKEEP_PEER_CERT $AM_CFLAGS"
567 fi
568
569
570 # HKDF 
571 AC_ARG_ENABLE([hkdf],
572     [  --enable-hkdf           Enable HKDF (HMAC-KDF) support (default: disabled)],
573     [ ENABLED_HKDF=$enableval ],
574     [ ENABLED_HKDF=no ]
575     )
576 if test "$ENABLED_HKDF" = "yes"
577 then
578   AM_CFLAGS="$AM_CFLAGS -DHAVE_HKDF"
579 fi
580
581
582 # DSA
583 AC_ARG_ENABLE([dsa],
584     [  --enable-dsa            Enable DSA (default: disabled)],
585     [ ENABLED_DSA=$enableval ],
586     [ ENABLED_DSA=no ]
587     )
588
589 if test "$ENABLED_DSA" = "no"
590 then
591     AM_CFLAGS="$AM_CFLAGS -DNO_DSA"
592 fi
593
594 AM_CONDITIONAL([BUILD_DSA], [test "x$ENABLED_DSA" = "xyes"])
595
596
597 # ECC 
598 AC_ARG_ENABLE([ecc],
599     [  --enable-ecc            Enable ECC (default: disabled)],
600     [ ENABLED_ECC=$enableval ],
601     [ ENABLED_ECC=no ]
602     )
603
604 if test "$ENABLED_ECC" = "yes"
605 then
606     AM_CFLAGS="$AM_CFLAGS -DHAVE_ECC -DTFM_ECC256 -DECC_SHAMIR"
607 fi
608
609 AM_CONDITIONAL([BUILD_ECC], [test "x$ENABLED_ECC" = "xyes"])
610
611
612 if test "$ENABLED_ECC" = "yes" && test "$ENABLED_SMALL" = "yes"
613 then
614     AC_MSG_ERROR([cannot enable ecc and small, ecc requires TLS which small turns off.]) 
615 fi
616
617
618 # FP ECC, Fixed Point cache ECC 
619 AC_ARG_ENABLE([fpecc],
620     [  --enable-fpecc          Enable Fixed Point cache ECC (default: disabled)],
621     [ ENABLED_FPECC=$enableval ],
622     [ ENABLED_FPECC=no ]
623     )
624
625 if test "$ENABLED_FPECC" = "yes"
626 then
627     if test "$ENABLED_ECC" = "no"
628     then
629         AC_MSG_ERROR([cannot enable fpecc without enabling ecc.]) 
630     fi
631     AM_CFLAGS="$AM_CFLAGS -DFP_ECC"
632 fi
633
634
635 # ECC encrypt
636 AC_ARG_ENABLE([eccencrypt],
637     [  --enable-eccencrypt     Enable ECC encrypt (default: disabled)],
638     [ ENABLED_ECC_ENCRYPT=$enableval ],
639     [ ENABLED_ECC_ENCRYPT=no ]
640     )
641
642 if test "$ENABLED_ECC_ENCRYPT" = "yes"
643 then
644     if test "$ENABLED_ECC" = "no"
645     then
646         AC_MSG_ERROR([cannot enable eccencrypt without enabling ecc.]) 
647     fi
648     if test "$ENABLED_HKDF" = "no"
649     then
650         AC_MSG_ERROR([cannot enable eccencrypt without enabling hkdf.]) 
651     fi
652     AM_CFLAGS="$AM_CFLAGS -DHAVE_ECC_ENCRYPT"
653 fi
654
655
656 # PSK 
657 AC_ARG_ENABLE([psk],
658     [  --enable-psk            Enable PSK (default: disabled)],
659     [ ENABLED_PSK=$enableval ],
660     [ ENABLED_PSK=no ]
661     )
662
663 if test "$ENABLED_PSK" = "no" && test "$ENABLED_LEANPSK" = "no"
664 then
665     AM_CFLAGS="$AM_CFLAGS -DNO_PSK"
666 fi
667
668 if test "$ENABLED_PSK" = "no" && test "$ENABLED_LEANPSK" = "yes"
669 then
670     ENABLED_PSK=yes
671 fi
672
673
674 # ERROR STRINGS
675 AC_ARG_ENABLE([errorstrings],
676     [  --enable-errorstrings   Enable error strings table (default: enabled)],
677     [ ENABLED_ERROR_STRINGS=$enableval ],
678     [ ENABLED_ERROR_STRINGS=yes ]
679     )
680
681 if test "$ENABLED_ERROR_STRINGS" = "no"
682 then
683     AM_CFLAGS="$AM_CFLAGS -DNO_ERROR_STRINGS"
684 else
685     # turn off error strings if leanpsk on
686     if test "$ENABLED_LEANPSK" = "yes"
687     then
688         AM_CFLAGS="$AM_CFLAGS -DNO_ERROR_STRINGS"
689         ENABLED_ERROR_STRINGS=no
690     fi
691 fi
692
693
694 # OLD TLS 
695 AC_ARG_ENABLE([oldtls],
696     [  --enable-oldtls         Enable old TLS versions < 1.2 (default: enabled)],
697     [ ENABLED_OLD_TLS=$enableval ],
698     [ ENABLED_OLD_TLS=yes ]
699     )
700
701 if test "$ENABLED_OLD_TLS" = "no"
702 then
703     AM_CFLAGS="$AM_CFLAGS -DNO_OLD_TLS"
704 else
705     # turn off old if leanpsk on
706     if test "$ENABLED_LEANPSK" = "yes"
707     then
708         AM_CFLAGS="$AM_CFLAGS -DNO_OLD_TLS"
709         ENABLED_OLD_TLS=no
710     fi
711 fi
712
713
714 # STACK SIZE info for examples 
715 AC_ARG_ENABLE([stacksize],
716     [  --enable-stacksize      Enable stack size info on examples (default: disabled)],
717     [ ENABLED_STACKSIZE=$enableval ],
718     [ ENABLED_STACKSIZE=no ]
719     )
720
721 if test "$ENABLED_STACKSIZE" = "yes"
722 then
723     AC_CHECK_FUNC([posix_memalign], [], [AC_MSG_ERROR(stacksize needs posix_memalign)])
724     AC_CHECK_FUNC([pthread_attr_setstack], [], AC_CHECK_LIB([pthread],[pthread_attr_setstack]))
725     AM_CFLAGS="$AM_CFLAGS -DHAVE_STACK_SIZE -DCYASSL_LOW_MEMORY"
726 fi
727
728
729 # MEMORY 
730 AC_ARG_ENABLE([memory],
731     [  --enable-memory         Enable memory callbacks (default: enabled)],
732     [ ENABLED_MEMORY=$enableval ],
733     [ ENABLED_MEMORY=yes ]
734     )
735
736 if test "$ENABLED_MEMORY" = "no"
737 then
738     AM_CFLAGS="$AM_CFLAGS -DNO_CYASSL_MEMORY"
739 else
740     # turn off memory cb if leanpsk on
741     if test "$ENABLED_LEANPSK" = "yes"
742     then
743         # but don't turn on NO_CYASSL_MEMORY because using own
744         ENABLED_MEMORY=no
745     fi
746 fi
747
748 AM_CONDITIONAL([BUILD_MEMORY], [test "x$ENABLED_MEMORY" = "xyes"])
749
750
751 # RSA 
752 AC_ARG_ENABLE([rsa],
753     [  --enable-rsa            Enable RSA (default: enabled)],
754     [ ENABLED_RSA=$enableval ],
755     [ ENABLED_RSA=yes ]
756     )
757
758 if test "$ENABLED_RSA" = "no"
759 then
760     AM_CFLAGS="$AM_CFLAGS -DNO_RSA"
761 else
762     # turn off RSA if leanpsk on
763     if test "$ENABLED_LEANPSK" = "yes"
764     then
765         AM_CFLAGS="$AM_CFLAGS -DNO_RSA"
766         ENABLED_RSA=no
767     fi
768 fi
769
770 AM_CONDITIONAL([BUILD_RSA], [test "x$ENABLED_RSA" = "xyes"])
771
772
773 # DH
774 AC_ARG_ENABLE([dh],
775     [  --enable-dh             Enable DH (default: disabled)],
776     [ ENABLED_DH=$enableval ],
777     [ ENABLED_DH=no ]
778     )
779
780 if test "$ENABLED_DH" = "no"
781 then
782     AM_CFLAGS="$AM_CFLAGS -DNO_DH"
783 else
784     # turn off DH if leanpsk on
785     if test "$ENABLED_LEANPSK" = "yes"
786     then
787         AM_CFLAGS="$AM_CFLAGS -DNO_DH"
788         ENABLED_DH=no
789     fi
790 fi
791
792 AM_CONDITIONAL([BUILD_DH], [test "x$ENABLED_DH" = "xyes"])
793
794
795 # ASN
796 # turn off asn, which means no certs, no rsa, no dh, no dsa, no ecc,
797 # and no big int, use this to disable all public key stuff
798 AC_ARG_ENABLE([asn],
799     [  --enable-asn            Enable ASN (default: enabled)],
800     [ ENABLED_ASN=$enableval ],
801     [ ENABLED_ASN=yes ]
802     )
803
804 if test "$ENABLED_ASN" = "no"
805 then
806     AM_CFLAGS="$AM_CFLAGS -DNO_ASN -DNO_CERTS -DNO_BIG_INT"
807 else
808     # turn off ASN if leanpsk on
809     if test "$ENABLED_LEANPSK" = "yes"
810     then
811         AM_CFLAGS="$AM_CFLAGS -DNO_ASN -DNO_CERTS -DNO_BIG_INT"
812         ENABLED_ASN=no
813     fi
814 fi
815
816 if test "$ENABLED_RSA" = "yes" && test "$ENABLED_ASN" = "no"
817 then
818     AC_MSG_ERROR([please disable rsa if disabling asn.])
819 fi
820
821 if test "$ENABLED_DSA" = "yes" && test "$ENABLED_ASN" = "no"
822 then
823     AC_MSG_ERROR([please disable dsa if disabling asn.])
824 fi
825
826 if test "$ENABLED_DH" = "yes" && test "$ENABLED_ASN" = "no"
827 then
828     AC_MSG_ERROR([please disable dh if disabling asn.])
829 fi
830
831 if test "$ENABLED_ECC" = "yes" && test "$ENABLED_ASN" = "no"
832 then
833     AC_MSG_ERROR([please disable ecc if disabling asn.])
834 fi
835
836 if test "$ENABLED_PSK" = "no" && test "$ENABLED_ASN" = "no"
837 then
838     AC_MSG_ERROR([please enable psk if disabling asn.])
839 fi
840
841 if test "$ENABLED_ASN" = "no"
842 then
843     ENABLED_FASTMATH=no
844     ENABLED_SLOWMATH=no
845 fi
846
847 AM_CONDITIONAL([BUILD_ASN], [test "x$ENABLED_ASN" = "xyes"])
848
849
850 # AES
851 AC_ARG_ENABLE([aes],
852     [  --enable-aes            Enable AES (default: enabled)],
853     [ ENABLED_AES=$enableval ],
854     [ ENABLED_AES=yes ]
855     )
856
857 if test "$ENABLED_AES" = "no"
858 then
859     AM_CFLAGS="$AM_CFLAGS -DNO_AES"
860 else
861     # turn off AES if leanpsk on
862     if test "$ENABLED_LEANPSK" = "yes"
863     then
864         AM_CFLAGS="$AM_CFLAGS -DNO_AES"
865         ENABLED_AES=no
866     fi
867 fi
868
869 AM_CONDITIONAL([BUILD_AES], [test "x$ENABLED_AES" = "xyes"])
870
871
872 # CODING
873 AC_ARG_ENABLE([coding],
874     [  --enable-coding         Enable Coding base 16/64 (default: enabled)],
875     [ ENABLED_CODING=$enableval ],
876     [ ENABLED_CODING=yes ]
877     )
878
879 if test "$ENABLED_CODING" = "no"
880 then
881     AM_CFLAGS="$AM_CFLAGS -DNO_CODING"
882 else
883     # turn off CODING if leanpsk on
884     if test "$ENABLED_LEANPSK" = "yes"
885     then
886         AM_CFLAGS="$AM_CFLAGS -DNO_CODING"
887         ENABLED_CODING=no
888     fi
889 fi
890
891 AM_CONDITIONAL([BUILD_CODING], [test "x$ENABLED_CODING" = "xyes"])
892
893
894 # DES3
895 AC_ARG_ENABLE([des3],
896     [  --enable-des3           Enable DES3 (default: enabled)],
897     [ ENABLED_DES3=$enableval ],
898     [ ENABLED_DES3=yes ]
899     )
900
901 if test "$ENABLED_DES3" = "no"
902 then
903     AM_CFLAGS="$AM_CFLAGS -DNO_DES3"
904 else
905     # turn off DES3 if leanpsk on
906     if test "$ENABLED_LEANPSK" = "yes"
907     then
908         AM_CFLAGS="$AM_CFLAGS -DNO_DES3"
909         ENABLED_DES3=no
910     fi
911 fi
912
913 AM_CONDITIONAL([BUILD_DES3], [test "x$ENABLED_DES3" = "xyes"])
914
915
916 # ARC4 
917 AC_ARG_ENABLE([arc4],
918     [  --enable-arc4           Enable ARC4 (default: enabled)],
919     [ ENABLED_ARC4=$enableval ],
920     [ ENABLED_ARC4=yes ]
921     )
922
923 if test "$ENABLED_ARC4" = "no"
924 then
925     AM_CFLAGS="$AM_CFLAGS -DNO_RC4"
926 else
927     # turn off ARC4 if leanpsk on
928     if test "$ENABLED_LEANPSK" = "yes"
929     then
930         AM_CFLAGS="$AM_CFLAGS -DNO_RC4"
931         ENABLED_ARC4=no
932     fi
933 fi
934
935 AM_CONDITIONAL([BUILD_RC4], [test "x$ENABLED_ARC4" = "xyes"])
936
937
938 # MD5 
939 AC_ARG_ENABLE([md5],
940     [  --enable-md5            Enable MD5 (default: enabled)],
941     [ ENABLED_MD5=$enableval ],
942     [ ENABLED_MD5=yes ]
943     )
944
945 if test "$ENABLED_MD5" = "no"
946 then
947     AM_CFLAGS="$AM_CFLAGS -DNO_MD5 -DNO_OLD_TLS"
948 else
949     # turn off MD5 if leanpsk on
950     if test "$ENABLED_LEANPSK" = "yes"
951     then
952         AM_CFLAGS="$AM_CFLAGS -DNO_MD5 -DNO_OLD_TLS"
953         ENABLED_MD5=no
954     fi
955 fi
956
957 AM_CONDITIONAL([BUILD_MD5], [test "x$ENABLED_MD5" = "xyes"])
958
959
960 # SHA 
961 AC_ARG_ENABLE([sha],
962     [  --enable-sha            Enable SHA (default: enabled)],
963     [ ENABLED_SHA=$enableval ],
964     [ ENABLED_SHA=yes ]
965     )
966
967 if test "$ENABLED_SHA" = "no"
968 then
969     AM_CFLAGS="$AM_CFLAGS -DNO_SHA -DNO_OLD_TLS"
970 else
971     # turn off SHA if leanpsk on
972     if test "$ENABLED_LEANPSK" = "yes"
973     then
974         AM_CFLAGS="$AM_CFLAGS -DNO_SHA -DNO_OLD_TLS"
975         ENABLED_SHA=no
976     fi
977 fi
978
979 AM_CONDITIONAL([BUILD_SHA], [test "x$ENABLED_SHA" = "xyes"])
980
981
982 # MD4 
983 AC_ARG_ENABLE([md4],
984     [  --enable-md4            Enable MD4 (default: disabled)],
985     [ ENABLED_MD4=$enableval ],
986     [ ENABLED_MD4=no ]
987     )
988
989 if test "$ENABLED_MD4" = "no"
990 then
991     AM_CFLAGS="$AM_CFLAGS -DNO_MD4"
992 fi
993
994 AM_CONDITIONAL([BUILD_MD4], [test "x$ENABLED_MD4" = "xyes"])
995
996
997 # Web Server Build 
998 AC_ARG_ENABLE([webserver],
999     [  --enable-webserver      Enable Web Server (default: disabled)],
1000     [ ENABLED_WEBSERVER=$enableval ],
1001     [ ENABLED_WEBSERVER=no ]
1002     )
1003
1004 if test "$ENABLED_WEBSERVER" = "yes"
1005 then
1006     AM_CFLAGS="$AM_CFLAGS -DHAVE_WEBSERVER"
1007 fi
1008
1009
1010 # PWDBASED
1011 AC_ARG_ENABLE([pwdbased],
1012     [  --enable-pwdbased       Enable PWDBASED (default: disabled)],
1013     [ ENABLED_PWDBASED=$enableval ],
1014     [ ENABLED_PWDBASED=no ]
1015     )
1016
1017 if test "$ENABLED_PWDBASED" = "no"
1018 then
1019     if test "$ENABLED_OPENSSLEXTRA" = "yes" || test "$ENABLED_WEBSERVER" = "yes"
1020     then
1021         # opensslextra and webserver needs pwdbased 
1022         ENABLED_PWDBASED=yes
1023     else
1024         AM_CFLAGS="$AM_CFLAGS -DNO_PWDBASED"
1025     fi
1026 fi
1027
1028 AM_CONDITIONAL([BUILD_PWDBASED], [test "x$ENABLED_PWDBASED" = "xyes"])
1029
1030
1031 # HC128 
1032 AC_ARG_ENABLE([hc128],
1033     [  --enable-hc128          Enable HC-128 (default: disabled)],
1034     [ ENABLED_HC128=$enableval ],
1035     [ ENABLED_HC128=no ]
1036     )
1037
1038 if test "$ENABLED_HC128" = "no"
1039 then
1040     AM_CFLAGS="$AM_CFLAGS -DNO_HC128"
1041 else
1042     AM_CFLAGS="$AM_CFLAGS -DHAVE_HC128"
1043 fi
1044
1045 AM_CONDITIONAL([BUILD_HC128], [test "x$ENABLED_HC128" = "xyes"])
1046
1047
1048 # RABBIT
1049 AC_ARG_ENABLE([rabbit],
1050     [  --enable-rabbit         Enable RABBIT (default: disabled)],
1051     [ ENABLED_RABBIT=$enableval ],
1052     [ ENABLED_RABBIT=no ]
1053     )
1054
1055 if test "$ENABLED_RABBIT" = "no"
1056 then
1057     AM_CFLAGS="$AM_CFLAGS -DNO_RABBIT"
1058 else
1059     AM_CFLAGS="$AM_CFLAGS -DHAVE_RABBIT"
1060 fi
1061
1062 AM_CONDITIONAL([BUILD_RABBIT], [test "x$ENABLED_RABBIT" = "xyes"])
1063
1064
1065 # FIPS 
1066 AC_ARG_ENABLE([fips],
1067     [  --enable-fips           Enable FIPS 140-2 (default: disabled)],
1068     [ ENABLED_FIPS=$enableval ],
1069     [ ENABLED_FIPS=no ]
1070     )
1071
1072 if test "x$ENABLED_FIPS" = "xyes"
1073 then
1074     # requires thread local storage
1075     if test "$thread_ls_on" = "no"
1076     then
1077         AC_MSG_ERROR([FIPS requires Thread Local Storage])
1078     fi
1079     # requires SHA512
1080     if test "x$ENABLED_SHA512" = "xno"
1081     then
1082         ENABLED_SHA512="yes"
1083         AM_CFLAGS="$AM_CFLAGS -DCYASSL_SHA512 -DCYASSL_SHA384"
1084         AM_CONDITIONAL([BUILD_SHA512], [test "x$ENABLED_SHA512" = "xyes"])
1085     fi
1086     AM_CFLAGS="$AM_CFLAGS -DHAVE_FIPS"
1087 fi
1088
1089 AM_CONDITIONAL([BUILD_FIPS], [test "x$ENABLED_FIPS" = "xyes"])
1090
1091
1092 # Hash DRBG
1093 AC_ARG_ENABLE([hashdrbg],
1094     [  --enable-hashdrbg       Enable Hash DRBG support (default: disabled)],
1095     [ ENABLED_HASHDRBG=$enableval ],
1096     [ ENABLED_HASHDRBG=no ]
1097     )
1098
1099 if test "x$ENABLED_HASHDRBG" = "xyes"
1100 then
1101     AM_CFLAGS="$AM_CFLAGS -DHAVE_HASHDRBG"
1102 else
1103     # turn on Hash DRBG if FIPS is on or ARC4 is off
1104     if test "x$ENABLED_FIPS" = "xyes" || test "x$ENABLED_ARC4" = "xno"
1105     then
1106         AM_CFLAGS="$AM_CFLAGS -DHAVE_HASHDRBG"
1107         ENABLED_HASHDRBG=yes
1108     fi
1109 fi
1110
1111
1112 # Filesystem Build 
1113 AC_ARG_ENABLE([filesystem],
1114     [  --enable-filesystem     Enable Filesystem support (default: enabled)],
1115     [ ENABLED_FILESYSTEM=$enableval ],
1116     [ ENABLED_FILESYSTEM=yes ]
1117     )
1118
1119 if test "$ENABLED_FILESYSTEM" = "no"
1120 then
1121     AM_CFLAGS="$AM_CFLAGS -DNO_FILESYSTEM"
1122 else
1123     # turn off filesystem if leanpsk on
1124     if test "$ENABLED_LEANPSK" = "yes"
1125     then
1126         AM_CFLAGS="$AM_CFLAGS -DNO_FILESYSTEM"
1127         ENABLED_FILESYSTEM=no
1128     fi
1129 fi
1130
1131
1132 # inline Build 
1133 AC_ARG_ENABLE([inline],
1134     [  --enable-inline         Enable inline functions (default: enabled)],
1135     [ ENABLED_INLINE=$enableval ],
1136     [ ENABLED_INLINE=yes ]
1137     )
1138
1139 if test "$ENABLED_INLINE" = "no"
1140 then
1141     AM_CFLAGS="$AM_CFLAGS -DNO_INLINE"
1142 fi
1143
1144 AM_CONDITIONAL([BUILD_INLINE], [test "x$ENABLED_INLINE" = "xyes"])
1145
1146
1147 # OCSP
1148 AC_ARG_ENABLE([ocsp],
1149     [  --enable-ocsp           Enable OCSP (default: disabled)],
1150     [ ENABLED_OCSP=$enableval ],
1151     [ ENABLED_OCSP=no ],
1152     )
1153
1154 if test "$ENABLED_OCSP" = "yes"
1155 then
1156     AM_CFLAGS="$AM_CFLAGS -DHAVE_OCSP"
1157 fi
1158
1159 AM_CONDITIONAL([BUILD_OCSP], [test "x$ENABLED_OCSP" = "xyes"])
1160
1161
1162 if test "$ENABLED_OCSP" = "yes"
1163 then
1164     # check openssl command tool for testing ocsp
1165     AC_CHECK_PROG([HAVE_OPENSSL_CMD],[openssl],[yes],[no])
1166
1167     if test "$HAVE_OPENSSL_CMD" = "yes"
1168     then
1169         AM_CFLAGS="$AM_CFLAGS -DHAVE_OPENSSL_CMD"
1170     else
1171         AC_MSG_WARN([openssl command line tool not available for testing ocsp])
1172     fi
1173 fi
1174
1175
1176 # CRL 
1177 AC_ARG_ENABLE([crl],
1178     [  --enable-crl            Enable CRL (default: disabled)],
1179     [ ENABLED_CRL=$enableval ],
1180     [ ENABLED_CRL=no ],
1181     )
1182
1183 if test "$ENABLED_CRL" = "yes"
1184 then
1185     AM_CFLAGS="$AM_CFLAGS -DHAVE_CRL"
1186 fi
1187
1188 AM_CONDITIONAL([BUILD_CRL], [test "x$ENABLED_CRL" = "xyes"])
1189
1190
1191 # CRL Monitor
1192 AC_ARG_ENABLE([crl-monitor],
1193     [  --enable-crl-monitor    Enable CRL Monitor (default: disabled)],
1194     [ ENABLED_CRL_MONITOR=$enableval ],
1195     [ ENABLED_CRL_MONITOR=no ],
1196     )
1197
1198 if test "$ENABLED_CRL_MONITOR" = "yes"
1199 then
1200     case $host_os in
1201     *linux* | *darwin* | *freebsd*)
1202         AM_CFLAGS="$AM_CFLAGS -DHAVE_CRL_MONITOR" ;;
1203     *)
1204         AC_MSG_ERROR([crl monitor only allowed on linux, OS X, or freebsd]) ;;
1205     esac
1206 fi
1207
1208 AM_CONDITIONAL([BUILD_CRL_MONITOR], [test "x$ENABLED_CRL_MONITOR" = "xyes"])
1209
1210
1211 # NTRU
1212 ENABLED_NTRU="no"
1213 tryntrudir=""
1214 AC_ARG_WITH([ntru],
1215     [  --with-ntru=PATH        Path to NTRU install (default /usr/) ],
1216     [
1217         AC_MSG_CHECKING([for NTRU])
1218         CPPFLAGS="$CPPFLAGS -DHAVE_NTRU"
1219         LIBS="$LIBS -lNTRUEncrypt"
1220
1221         AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <ntru_crypto_drbg.h>]], [[ ntru_crypto_drbg_instantiate(0, 0, 0, 0, 0); ]])], [ ntru_linked=yes ],[ ntru_linked=no ])
1222
1223         if test "x$ntru_linked" == "xno" ; then
1224             if test "x$withval" != "xno" ; then
1225                 tryntrudir=$withval
1226             fi
1227             if test "x$withval" == "xyes" ; then
1228                 tryntrudir="/usr"
1229             fi
1230
1231             LDFLAGS="$AM_LDFLAGS -L$tryntrudir/lib"
1232             CPPFLAGS="$CPPFLAGS -I$tryntrudir/include"
1233
1234             AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <ntru_crypto_drbg.h>]], [[ ntru_crypto_drbg_instantiate(0, 0, 0, 0, 0); ]])], [ ntru_linked=yes ],[ ntru_linked=no ])
1235
1236             if test "x$ntru_linked" == "xno" ; then
1237                 AC_MSG_ERROR([NTRU isn't found.
1238                 If it's already installed, specify its path using --with-ntru=/dir/])
1239             fi
1240             AC_MSG_RESULT([yes])
1241             AM_LDFLAGS="$AM_LDFLAGS -L$tryntrudir/lib"
1242         else
1243             AC_MSG_RESULT([yes])
1244         fi
1245
1246         AM_CFLAGS="$AM_CFLAGS -DHAVE_NTRU"
1247         ENABLED_NTRU="yes"
1248     ]
1249 )
1250
1251 AM_CONDITIONAL([BUILD_NTRU], [test "x$ENABLED_NTRU" = "xyes"])
1252
1253 if test "$ENABLED_NTRU" = "yes" && test "$ENABLED_SMALL" = "yes"
1254 then
1255     AC_MSG_ERROR([cannot enable ntru and small, ntru requires TLS which small turns off.]) 
1256 fi
1257
1258 # SNI
1259 AC_ARG_ENABLE([sni],
1260     [  --enable-sni            Enable SNI (default: disabled)],
1261     [ ENABLED_SNI=$enableval ],
1262     [ ENABLED_SNI=no ]
1263     )
1264
1265 if test "x$ENABLED_SNI" = "xyes"
1266 then
1267     AM_CFLAGS="$AM_CFLAGS -DHAVE_TLS_EXTENSIONS -DHAVE_SNI"
1268 fi
1269
1270 # Maximum Fragment Length
1271 AC_ARG_ENABLE([maxfragment],
1272     [  --enable-maxfragment    Enable Maximum Fragment Length (default: disabled)],
1273     [ ENABLED_MAX_FRAGMENT=$enableval ],
1274     [ ENABLED_MAX_FRAGMENT=no ]
1275     )
1276
1277 if test "x$ENABLED_MAX_FRAGMENT" = "xyes"
1278 then
1279     AM_CFLAGS="$AM_CFLAGS -DHAVE_TLS_EXTENSIONS -DHAVE_MAX_FRAGMENT"
1280 fi
1281
1282 # Truncated HMAC
1283 AC_ARG_ENABLE([truncatedhmac],
1284     [  --enable-truncatedhmac  Enable Truncated HMAC (default: disabled)],
1285     [ ENABLED_TRUNCATED_HMAC=$enableval ],
1286     [ ENABLED_TRUNCATED_HMAC=no ]
1287     )
1288
1289 if test "x$ENABLED_TRUNCATED_HMAC" = "xyes"
1290 then
1291     AM_CFLAGS="$AM_CFLAGS -DHAVE_TLS_EXTENSIONS -DHAVE_TRUNCATED_HMAC"
1292 fi
1293
1294 # Renegotiation Indication
1295 AC_ARG_ENABLE([renegotiation-indication],
1296     [  --enable-renegotiation-indication  Enable Renegotiation Indication (default: disabled)],
1297     [ ENABLED_RENEGOTIATION_INDICATION=$enableval ],
1298     [ ENABLED_RENEGOTIATION_INDICATION=no ]
1299     )
1300
1301 if test "x$ENABLED_RENEGOTIATION_INDICATION" = "xyes"
1302 then
1303     AM_CFLAGS="$AM_CFLAGS -DHAVE_TLS_EXTENSIONS -DHAVE_RENEGOTIATION_INDICATION"
1304 fi
1305
1306 # Supported Elliptic Curves Extensions
1307 AC_ARG_ENABLE([supportedcurves],
1308     [  --enable-supportedcurves Enable Supported Elliptic Curves (default: disabled)],
1309     [ ENABLED_SUPPORTED_CURVES=$enableval ],
1310     [ ENABLED_SUPPORTED_CURVES=no ]
1311     )
1312
1313 if test "x$ENABLED_SUPPORTED_CURVES" = "xyes"
1314 then
1315     AM_CFLAGS="$AM_CFLAGS -DHAVE_TLS_EXTENSIONS -DHAVE_SUPPORTED_CURVES"
1316 fi
1317
1318 # TLS Extensions
1319 AC_ARG_ENABLE([tlsx],
1320     [  --enable-tlsx           Enable all TLS Extensions (default: disabled)],
1321     [ ENABLED_TLSX=$enableval ],
1322     [ ENABLED_TLSX=no ]
1323     )
1324
1325 if test "x$ENABLED_TLSX" = "xyes"
1326 then
1327         ENABLED_SNI=yes
1328         ENABLED_MAX_FRAGMENT=yes
1329         ENABLED_TRUNCATED_HMAC=yes
1330         ENABLED_RENEGOTIATION_INDICATION=yes
1331         ENABLED_SUPPORTED_CURVES=yes
1332     AM_CFLAGS="$AM_CFLAGS -DHAVE_TLS_EXTENSIONS -DHAVE_SNI -DHAVE_MAX_FRAGMENT -DHAVE_TRUNCATED_HMAC -DHAVE_RENEGOTIATION_INDICATION -DHAVE_SUPPORTED_CURVES"
1333 fi
1334
1335 # PKCS7
1336 AC_ARG_ENABLE([pkcs7],
1337     [  --enable-pkcs7          Enable PKCS7 (default: disabled)],
1338     [ ENABLED_PKCS7=$enableval ],
1339     [ ENABLED_PKCS7=no ],
1340     )
1341
1342 if test "$ENABLED_PKCS7" = "yes"
1343 then
1344     AM_CFLAGS="$AM_CFLAGS -DHAVE_PKCS7"
1345 fi
1346
1347 AM_CONDITIONAL([BUILD_PKCS7], [test "x$ENABLED_PKCS7" = "xyes"])
1348
1349
1350 # Simple Certificate Enrollment Protocol (SCEP)
1351 AC_ARG_ENABLE([scep],
1352     [  --enable-scep           Enable wolfSCEP (default: disabled)],
1353     [ ENABLED_WOLFSCEP=$enableval ],
1354     [ ENABLED_WOLFSCEP=no ]
1355     )
1356 if test "$ENABLED_WOLFSCEP" = "yes"
1357 then
1358     # Enable prereqs if not already enabled
1359     if test "x$ENABLED_KEYGEN" = "xno"
1360     then
1361         ENABLED_KEYGEN="yes"
1362         AM_CFLAGS="$AM_CFLAGS -DCYASSL_KEY_GEN"
1363     fi
1364     if test "x$ENABLED_CERTGEN" = "xno"
1365     then
1366         ENABLED_CERTGEN="yes"
1367         AM_CFLAGS="$AM_CFLAGS -DCYASSL_CERT_GEN"
1368     fi
1369     if test "x$ENABLED_CERTREQ" = "xno"
1370     then
1371         ENABLED_CERTREQ="yes"
1372         AM_CFLAGS="$AM_CFLAGS -DCYASSL_CERT_REQ"
1373     fi
1374     if test "x$ENABLED_PKCS7" = "xno"
1375     then
1376         ENABLED_PKCS7="yes"
1377         AM_CFLAGS="$AM_CFLAGS -DHAVE_PKCS7"
1378         AM_CONDITIONAL([BUILD_PKCS7], [test "x$ENABLED_PKCS7" = "xyes"])
1379     fi
1380     AM_CFLAGS="$AM_CFLAGS -DCYASSL_HAVE_WOLFSCEP"
1381 fi
1382
1383
1384 # Small Stack
1385 AC_ARG_ENABLE([smallstack],
1386     [  --enable-smallstack     Enable Small Stack Usage (default: disabled)],
1387     [ ENABLED_SMALL_STACK=$enableval ],
1388     [ ENABLED_SMALL_STACK=no ]
1389     )
1390
1391 if test "x$ENABLED_SMALL_STACK" = "xyes"
1392 then
1393     AM_CFLAGS="$AM_CFLAGS -DCYASSL_SMALL_STACK"
1394 fi
1395
1396
1397 #valgrind
1398 AC_ARG_ENABLE([valgrind],
1399     [  --enable-valgrind       Enable valgrind for unit tests (default: disabled)],
1400     [ ENABLED_VALGRIND=$enableval ],
1401     [ ENABLED_VALGRIND=no ]
1402     )
1403
1404 if test "$ENABLED_VALGRIND" = "yes"
1405 then
1406     AC_CHECK_PROG([HAVE_VALGRIND],[valgrind],[yes],[no])
1407
1408     if test "$HAVE_VALGRIND" = "no"
1409     then
1410         AC_MSG_ERROR([Valgrind not found.])
1411     fi
1412     enable_shared=no
1413     enable_static=yes
1414     AM_CFLAGS="$AM_CFLAGS -DHAVE_VALGRIND"
1415 fi
1416
1417 AM_CONDITIONAL([USE_VALGRIND], [test "x$ENABLED_VALGRIND" = "xyes"])
1418
1419
1420 # Test certs, use internal cert functions for extra testing 
1421 AC_ARG_ENABLE([testcert],
1422     [  --enable-testcert       Enable Test Cert (default: disabled)],
1423     [ ENABLED_TESTCERT=$enableval ],
1424     [ ENABLED_TESTCERT=no ]
1425     )
1426
1427 if test "$ENABLED_TESTCERT" = "yes"
1428 then
1429     AM_CFLAGS="$AM_CFLAGS -DCYASSL_TEST_CERT"
1430 fi
1431
1432
1433 # I/O Pool, an example to show user how to override memory handler and use
1434 # a pool for the input/output buffer requests
1435 AC_ARG_ENABLE([iopool],
1436     [  --enable-iopool         Enable I/O Pool example (default: disabled)],
1437     [ ENABLED_IOPOOL=$enableval ],
1438     [ ENABLED_IOPOOL=no ]
1439     )
1440
1441 if test "$ENABLED_IOPOOL" = "yes"
1442 then
1443     if test "$thread_ls_on" = "no"
1444     then
1445         AC_MSG_ERROR([I/O Pool example requires Thread Local Storage])
1446     fi
1447     AM_CFLAGS="$AM_CFLAGS -DHAVE_IO_POOL -DXMALLOC_USER"
1448 fi
1449
1450
1451 # Certificate Service Support 
1452 AC_ARG_ENABLE([certservice],
1453     [  --enable-certservice    Enable cert service (default: disabled)],
1454     [ ENABLED_CERT_SERVICE=$enableval ],
1455     [ ENABLED_CERT_SERVICE=no ]
1456     )
1457 if test "$ENABLED_CERT_SERVICE" = "yes"
1458 then
1459     # Requires ecc,certgen, and opensslextra make sure on
1460     if test "x$ENABLED_CERTGEN" = "xno"
1461     then
1462         ENABLED_CERTGEN="yes"
1463         AM_CFLAGS="$AM_CFLAGS -DCYASSL_CERT_GEN"
1464     fi
1465     if test "x$ENABLED_ECC" = "xno"
1466     then
1467         ENABLED_ECC="yes"
1468         AM_CFLAGS="$AM_CFLAGS -DHAVE_ECC -DTFM_ECC256 -DECC_SHAMIR"
1469         AM_CONDITIONAL([BUILD_ECC], [test "x$ENABLED_ECC" = "xyes"])
1470     fi
1471     if test "x$ENABLED_OPENSSLEXTRA" = "xno"
1472     then
1473         ENABLED_OPENSSLEXTRA="yes"
1474         AM_CFLAGS="-DOPENSSL_EXTRA $AM_CFLAGS"
1475     fi
1476     AM_CFLAGS="$AM_CFLAGS -DCYASSL_HAVE_CERT_SERVICE"
1477 fi
1478
1479
1480 # set fastmath default
1481 FASTMATH_DEFAULT=no
1482
1483 if test "$host_cpu" = "x86_64"
1484 then
1485 FASTMATH_DEFAULT=yes
1486 fi
1487
1488 # fastmath
1489 AC_ARG_ENABLE([fastmath],
1490     [  --enable-fastmath       Enable fast math ops (default: enabled on x86_64)],
1491     [ ENABLED_FASTMATH=$enableval ],
1492     [ ENABLED_FASTMATH=$FASTMATH_DEFAULT]
1493     )
1494
1495 if test "x$ENABLED_FASTMATH" = "xyes"
1496 then
1497     # turn off fastmth if leanpsk on or asn off
1498     if test "$ENABLED_LEANPSK" = "yes" || test "$ENABLED_ASN" = "no"
1499     then
1500         ENABLED_FASTMATH=no
1501     else
1502         AM_CFLAGS="$AM_CFLAGS -DUSE_FAST_MATH"
1503         ENABLED_SLOWMATH="no"
1504     fi
1505 fi
1506
1507
1508 # fast HUGE math
1509 AC_ARG_ENABLE([fasthugemath],
1510     [  --enable-fasthugemath   Enable fast math + huge code (default: disabled)],
1511     [ ENABLED_FASTHUGEMATH=$enableval ],
1512     [ ENABLED_FASTHUGEMATH=no ]
1513     )
1514
1515 if test "$ENABLED_BUMP" = "yes"
1516 then
1517     ENABLED_FASTHUGEMATH="yes"
1518 fi
1519
1520 if test "$ENABLED_FASTHUGEMATH" = "yes"
1521 then
1522     ENABLED_FASTMATH="yes"
1523     AM_CFLAGS="$AM_CFLAGS -DUSE_FAST_MATH"
1524     ENABLED_SLOWMATH="no"
1525 fi
1526
1527 AM_CONDITIONAL([BUILD_FASTMATH], [test "x$ENABLED_FASTMATH" = "xyes"])
1528 AM_CONDITIONAL([BUILD_SLOWMATH], [test "x$ENABLED_SLOWMATH" = "xyes"])
1529
1530
1531 # Enable Examples, used to disable examples
1532 AC_ARG_ENABLE([examples],
1533     [  --enable-examples       Enable Examples  (default: enabled)],
1534     [ ENABLED_EXAMPLES=$enableval ],
1535     [ ENABLED_EXAMPLES=yes ]
1536     )
1537
1538 AS_IF([test "x$ENABLED_FILESYSTEM" = "xno"], [ENABLED_EXAMPLES="no"])
1539 AS_IF([test "x$ENABLED_INLINE" = "xno"], [ENABLED_EXAMPLES="no"])
1540 # certs still have sha signatures for now 
1541 AS_IF([test "x$ENABLED_SHA" = "xno"], [ENABLED_EXAMPLES="no"])
1542 AM_CONDITIONAL([BUILD_EXAMPLES], [test "x$ENABLED_EXAMPLES" = "xyes"])
1543
1544
1545 # LIBZ
1546 ENABLED_LIBZ="no"
1547 trylibzdir=""
1548 AC_ARG_WITH([libz],
1549     [  --with-libz=PATH        PATH to libz install (default /usr/) ],
1550     [
1551         AC_MSG_CHECKING([for libz])
1552         CPPFLAGS="$CPPFLAGS -DHAVE_LIBZ"
1553         LIBS="$LIBS -lz"
1554
1555         AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <zlib.h>]], [[ deflateInit(0, 8); ]])],[ libz_linked=yes ],[ libz_linked=no ])
1556
1557         if test "x$libz_linked" == "xno" ; then
1558             if test "x$withval" != "xno" ; then
1559                 trylibzdir=$withval
1560             fi
1561             if test "x$withval" == "xyes" ; then
1562                 trylibzdir="/usr"
1563             fi
1564
1565             AM_LDFLAGS="$AM_LDFLAGS -L$trylibzdir/lib"
1566             CPPFLAGS="$CPPFLAGS -I$trylibzdir/include"
1567
1568             AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <zlib.h>]], [[ deflateInit(0, 8); ]])],[ libz_linked=yes ],[ libz_linked=no ])
1569
1570             if test "x$libz_linked" == "xno" ; then
1571                 AC_MSG_ERROR([libz isn't found.
1572                 If it's already installed, specify its path using --with-libz=/dir/])
1573             fi
1574             AC_MSG_RESULT([yes])
1575         else
1576             AC_MSG_RESULT([yes])
1577         fi
1578         ENABLED_LIBZ="yes"
1579     ]
1580 )
1581 AM_CONDITIONAL([BUILD_LIBZ], [test "x$ENABLED_LIBZ" = "xyes"])
1582
1583
1584 # cavium 
1585 trycaviumdir=""
1586 AC_ARG_WITH([cavium],
1587     [  --with-cavium=PATH      PATH to cavium/software dir ],
1588     [
1589         AC_MSG_CHECKING([for cavium])
1590         CPPFLAGS="$CPPFLAGS -DHAVE_CAVIUM"
1591
1592             if test "x$withval" == "xyes" ; then
1593                 AC_MSG_ERROR([need a PATH for --with-cavium])
1594             fi
1595             if test "x$withval" != "xno" ; then
1596                 trycaviumdir=$withval
1597             fi
1598
1599             LDFLAGS="$AM_LDFLAGS $trycaviumdir/api/cavium_common.o"
1600             CPPFLAGS="$CPPFLAGS -I$trycaviumdir/include"
1601
1602             AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include "cavium_common.h"]], [[ CspShutdown(CAVIUM_DEV_ID); ]])],[ cavium_linked=yes ],[ cavium_linked=no ])
1603
1604             if test "x$cavium_linked" == "xno" ; then
1605                 AC_MSG_ERROR([cavium isn't found.
1606                 If it's already installed, specify its path using --with-cavium=/dir/])
1607             fi
1608             AC_MSG_RESULT([yes])
1609             enable_shared=no
1610             enable_static=yes
1611     ]
1612 )
1613
1614
1615 # microchip api
1616 AC_ARG_ENABLE([mcapi],
1617     [  --enable-mcapi          Enable Microchip API (default: disabled)],
1618     [ ENABLED_MCAPI=$enableval ],
1619     [ ENABLED_MCAPI=no ]
1620     )
1621
1622 if test "$ENABLED_MCAPI" = "yes"
1623 then
1624     AM_CFLAGS="$AM_CFLAGS -DHAVE_MCAPI -DCYASSL_AES_COUNTER -DCYASSL_AES_DIRECT"
1625 fi
1626
1627 if test "$ENABLED_MCAPI" = "yes" && test "$ENABLED_SHA512" = "no"
1628 then
1629     AC_MSG_ERROR([please enable sha512 if enabling mcapi.])
1630 fi
1631
1632 if test "$ENABLED_MCAPI" = "yes" && test "$ENABLED_ECC" = "no"
1633 then
1634     AC_MSG_ERROR([please enable ecc if enabling mcapi.])
1635 fi
1636
1637 if test "$ENABLED_MCAPI" = "yes" && test "$ENABLED_LIBZ" = "no"
1638 then
1639     AC_MSG_ERROR([please use --with-libz if enabling mcapi.])
1640 fi
1641
1642 AM_CONDITIONAL([BUILD_MCAPI], [test "x$ENABLED_MCAPI" = "xyes"])
1643
1644
1645
1646 # OPTIMIZE FLAGS
1647 if test "$GCC" = "yes"
1648 then
1649     AM_CFLAGS="$AM_CFLAGS -Wall -Wno-unused"
1650     if test "$ax_enable_debug" = "no"
1651     then
1652         if test "$ENABLED_FASTMATH" = "yes"
1653         then
1654             AM_CFLAGS="$AM_CFLAGS $OPTIMIZE_FAST_CFLAGS"
1655             if test "$ENABLED_FASTHUGEMATH" = "yes"
1656             then
1657                 AM_CFLAGS="$AM_CFLAGS $OPTIMIZE_HUGE_CFLAGS"
1658             fi
1659         else
1660             AM_CFLAGS="$AM_CFLAGS $OPTIMIZE_CFLAGS"
1661         fi
1662     fi
1663 fi
1664
1665 # ICC command line warning for non supported warning flags
1666 if test "$CC" = "icc"
1667 then
1668     AM_CFLAGS="$AM_CFLAGS -wd10006"
1669 fi
1670
1671
1672 LIB_SOCKET_NSL
1673 AX_HARDEN_CC_COMPILER_FLAGS
1674
1675 # link to ws2_32 if on mingw
1676 case $host_os in
1677     *mingw32)
1678         LDFLAGS="$LDFLAGS -lws2_32" ;;
1679 esac
1680
1681 # add user C_EXTRA_FLAGS back
1682 CFLAGS="$CFLAGS $USER_C_EXTRA_FLAGS"
1683 OPTION_FLAGS="$USER_C_EXTRA_FLAGS $AM_CFLAGS"
1684
1685 CREATE_HEX_VERSION
1686 AC_SUBST([AM_CPPFLAGS])
1687 AC_SUBST([AM_CFLAGS])
1688 AC_SUBST([AM_LDFLAGS])
1689
1690 # FINAL
1691 AC_CONFIG_FILES([stamp-h], [echo timestamp > stamp-h])
1692 AC_CONFIG_FILES([Makefile])
1693 AC_CONFIG_FILES([cyassl/version.h])
1694 AC_CONFIG_FILES([cyassl/options.h])
1695 AC_CONFIG_FILES([support/cyassl.pc])
1696 AC_CONFIG_FILES([rpm/spec])
1697
1698 AX_CREATE_GENERIC_CONFIG
1699 AX_AM_JOBSERVER([yes])
1700
1701 AC_OUTPUT
1702
1703
1704 # force make clean
1705 echo "---"
1706 echo "Running make clean..."
1707 make clean >/dev/null 2>&1
1708 # Touch files that may not be in repository
1709 echo "Touching File..."
1710 touch ctaocrypt/src/fips.c
1711 touch ctaocrypt/src/fips_test.c
1712 echo
1713
1714 # generate user options header 
1715 echo "---"
1716 echo "Generating user options header..."
1717 OPTION_FILE="cyassl/options.h"
1718 rm -f $OPTION_FILE
1719
1720 echo "/* cyassl options.h" > $OPTION_FILE 
1721 echo " * generated from configure options" >> $OPTION_FILE
1722 echo " *" >> $OPTION_FILE
1723 echo " * Copyright (C) 2006-2014 wolfSSL Inc." >> $OPTION_FILE
1724 echo " *" >> $OPTION_FILE
1725 echo " * This file is part of CyaSSL." >> $OPTION_FILE
1726 echo " *" >> $OPTION_FILE
1727 echo " */" >> $OPTION_FILE
1728
1729 echo "" >> $OPTION_FILE 
1730 echo "#pragma once" >> $OPTION_FILE 
1731 echo "" >> $OPTION_FILE 
1732 echo "#ifdef __cplusplus" >> $OPTION_FILE 
1733 echo "extern \"C\" {" >> $OPTION_FILE 
1734 echo "#endif" >> $OPTION_FILE 
1735 echo "" >> $OPTION_FILE 
1736
1737 for option in $OPTION_FLAGS; do
1738     defonly=`echo $option | sed 's/-D//'`
1739     if test "$defonly" != "$option"
1740     then
1741         noequalsign=`echo $defonly | sed 's/=/ /'`
1742         echo "#undef  $noequalsign" >> $OPTION_FILE 
1743         echo "#define $noequalsign" >> $OPTION_FILE 
1744         echo "" >> $OPTION_FILE 
1745     else
1746         echo "option w/o begin -D is $option, not saving to $OPTION_FILE"
1747     fi
1748 done
1749
1750 echo "" >> $OPTION_FILE 
1751 echo "#ifdef __cplusplus" >> $OPTION_FILE 
1752 echo "}" >> $OPTION_FILE 
1753 echo "#endif" >> $OPTION_FILE 
1754 echo "" >> $OPTION_FILE 
1755 echo
1756
1757 # output config summary
1758 echo "---"
1759 echo "Configuration summary for $PACKAGE_NAME version $VERSION"
1760 echo ""
1761 echo "   * Installation prefix:       $prefix"
1762 echo "   * System type:               $host_vendor-$host_os"
1763 echo "   * Host CPU:                  $host_cpu"
1764 echo "   * C Compiler:                $CC"
1765 echo "   * C Flags:                   $CFLAGS"
1766 echo "   * C++ Compiler:              $CXX"
1767 echo "   * C++ Flags:                 $CXXFLAGS"
1768 echo "   * CPP Flags:                 $CPPFLAGS"
1769 echo "   * LIB Flags:                 $LIB"
1770 echo "   * Debug enabled:             $ax_enable_debug"
1771 echo "   * Warnings as failure:       $ac_cv_warnings_as_errors"
1772 echo "   * make -j:                   $enable_jobserver"
1773 echo "   * VCS checkout:              $ac_cv_vcs_checkout"
1774 echo 
1775 echo "   Features "
1776 echo "   * Single threaded:           $ENABLED_SINGLETHREADED"
1777 echo "   * Filesystem:                $ENABLED_FILESYSTEM"
1778 echo "   * OpenSSL Extra API:         $ENABLED_OPENSSLEXTRA"
1779 echo "   * fastmath:                  $ENABLED_FASTMATH"
1780 echo "   * sniffer:                   $ENABLED_SNIFFER"
1781 echo "   * snifftest:                 $ENABLED_SNIFFTEST"
1782 echo "   * ARC4:                      $ENABLED_ARC4"
1783 echo "   * AES:                       $ENABLED_AES"
1784 echo "   * AES-NI:                    $ENABLED_AESNI"
1785 echo "   * AES-GCM:                   $ENABLED_AESGCM"
1786 echo "   * AES-CCM:                   $ENABLED_AESCCM"
1787 echo "   * DES3:                      $ENABLED_DES3"
1788 echo "   * Camellia:                  $ENABLED_CAMELLIA"
1789 echo "   * NULL Cipher:               $ENABLED_NULL_CIPHER"
1790 echo "   * MD5:                       $ENABLED_MD5"
1791 echo "   * RIPEMD:                    $ENABLED_RIPEMD"
1792 echo "   * SHA:                       $ENABLED_SHA"
1793 echo "   * SHA-512:                   $ENABLED_SHA512"
1794 echo "   * BLAKE2:                    $ENABLED_BLAKE2"
1795 echo "   * keygen:                    $ENABLED_KEYGEN"
1796 echo "   * certgen:                   $ENABLED_CERTGEN"
1797 echo "   * certreq:                   $ENABLED_CERTREQ"
1798 echo "   * HC-128:                    $ENABLED_HC128"
1799 echo "   * RABBIT:                    $ENABLED_RABBIT"
1800 echo "   * Hash DRBG:                 $ENABLED_HASHDRBG"
1801 echo "   * PWDBASED:                  $ENABLED_PWDBASED"
1802 echo "   * HKDF:                      $ENABLED_HKDF"
1803 echo "   * MD4:                       $ENABLED_MD4"
1804 echo "   * PSK:                       $ENABLED_PSK"
1805 echo "   * LEANPSK:                   $ENABLED_LEANPSK"
1806 echo "   * RSA:                       $ENABLED_RSA"
1807 echo "   * DSA:                       $ENABLED_DSA"
1808 echo "   * DH:                        $ENABLED_DH"
1809 echo "   * ECC:                       $ENABLED_ECC"
1810 echo "   * FPECC:                     $ENABLED_FPECC"
1811 echo "   * ECC_ENCRYPT:               $ENABLED_ECC_ENCRYPT"
1812 echo "   * ASN:                       $ENABLED_ASN"
1813 echo "   * CODING:                    $ENABLED_CODING"
1814 echo "   * MEMORY:                    $ENABLED_MEMORY"
1815 echo "   * I/O POOL:                  $ENABLED_IOPOOL"
1816 echo "   * ERROR_STRINGS:             $ENABLED_ERROR_STRINGS"
1817 echo "   * DTLS:                      $ENABLED_DTLS"
1818 echo "   * Old TLS Versions:          $ENABLED_OLD_TLS"
1819 echo "   * OCSP:                      $ENABLED_OCSP"
1820 echo "   * CRL:                       $ENABLED_CRL"
1821 echo "   * CRL-MONITOR:               $ENABLED_CRL_MONITOR"
1822 echo "   * Persistent session cache:  $ENABLED_SAVESESSION"
1823 echo "   * Persistent cert    cache:  $ENABLED_SAVECERT"
1824 echo "   * Atomic User Record Layer:  $ENABLED_ATOMICUSER"
1825 echo "   * Public Key Callbacks:      $ENABLED_PKCALLBACKS"
1826 echo "   * NTRU:                      $ENABLED_NTRU"
1827 echo "   * SNI:                       $ENABLED_SNI"
1828 echo "   * Maximum Fragment Length:   $ENABLED_MAX_FRAGMENT"
1829 echo "   * Truncated HMAC:            $ENABLED_TRUNCATED_HMAC"
1830 echo "   * Renegotiation Indication:  $ENABLED_RENEGOTIATION_INDICATION"
1831 echo "   * Supported Elliptic Curves: $ENABLED_SUPPORTED_CURVES"
1832 echo "   * All TLS Extensions:        $ENABLED_TLSX"
1833 echo "   * PKCS#7                     $ENABLED_PKCS7"
1834 echo "   * wolfSCEP                   $ENABLED_WOLFSCEP"
1835 echo "   * Small Stack:               $ENABLED_SMALL_STACK"
1836 echo "   * valgrind unit tests:       $ENABLED_VALGRIND"
1837 echo "   * LIBZ:                      $ENABLED_LIBZ"
1838 echo "   * Examples:                  $ENABLED_EXAMPLES"
1839 echo ""
1840 echo "---"
1841