@@ -35,12 +35,12 @@ dnl for assert() support
3535AC_HEADER_ASSERT
3636
3737dnl test for nettle
38- AC_CHECK_HEADER ( nettle/sha .h ,,[ AC_MSG_ERROR ( [
38+ AC_CHECK_HEADER ( nettle/sha1 .h ,,[ AC_MSG_ERROR ( [
3939 nettle header files missing. Please install nettle
4040 first. If you have already done so and get this error message
4141 anyway, it may be installed somewhere else, maybe because you
4242 don't have root access. Pass CPPFLAGS=-I/your/path/to/nettle to configure
43- and try again. The path should be so that \#include "nettle/sha .h" works.
43+ and try again. The path should be so that \#include "nettle/sha1 .h" works.
4444 On Debian-ish systems, use "apt-get install nettle-dev" to get a system
4545 wide nettle install.
4646] ) ] )
@@ -62,7 +62,9 @@ AC_SYS_LARGEFILE
6262
6363dnl make sure we have c++11 or better,
6464AC_MSG_CHECKING ( [ for C++11 support or better] )
65- AC_COMPILE_IFELSE ( [ AC_LANG_PROGRAM ( [ int f() { auto a=1;return a;}] ) ] ,
65+ AC_COMPILE_IFELSE ( [ AC_LANG_PROGRAM ( [ int f() {
66+ auto a = 1;
67+ return a;}] ) ] ,
6668 [ AC_MSG_RESULT ( [ yes] ) ] ,
6769 [ AC_MSG_ERROR ( [ no c++11 support, please set CXXFLAGS properly] ) ] )
6870
@@ -128,21 +130,20 @@ if test "x$set_more_warnings" != xno; then
128130 -Wextra-semi \
129131 -Wbiznafronck"
130132
131- # these warnings were tried but deemed unuseful for this project:
132- # -Wunsafe-loop-optimizations \
133-
134- for option in $warning_options ; do
135- SAVE_CXXFLAGS="$CXXFLAGS"
136- CXXFLAGS="$CXXFLAGS $uwoption $option"
137- AC_MSG_CHECKING ( [ whether compiler understands $option] )
138- dnl Include a system header so we ignore Werror=... flags
139- dnl that cause trouble.
140- AC_COMPILE_IFELSE (
141- [ AC_LANG_PROGRAM ( [ [ #include <stdio.h>] ] , [ ] ) ] ,
142- [ has_option=yes] ,
143- [ has_option=no] )
144- CXXFLAGS="$SAVE_CXXFLAGS"
145- if test $has_option = yes; then
133+ # these warnings were tried but deemed unuseful for this project:
134+ # - Wunsafe - loop - optimizations \
135+
136+ for option in $warning_options ;
137+ do
138+ SAVE_CXXFLAGS = "$CXXFLAGS" CXXFLAGS =
139+ "$CXXFLAGS $uwoption $option" AC_MSG_CHECKING (
140+ [ whether compiler understands $option] )
141+ dnl Include a system header so we ignore Werror =
142+ ... flags dnl that cause trouble.AC_COMPILE_IFELSE(
143+ [ AC_LANG_PROGRAM ( [ [ #include<stdio.h>] ] , [ ] ) ] ,
144+ [ has_option = yes] ,
145+ [ has_option = no] ) CXXFLAGS = "$SAVE_CXXFLAGS" if test $has_option =
146+ yes; then
146147 CXXFLAGS="$CXXFLAGS $option"
147148 fi
148149 AC_MSG_RESULT ( got result $has_option )
@@ -159,29 +160,26 @@ AC_MSG_CHECKING([check for fallthrough support])
159160define ( [ str] ,[ [ [ [ fallthrough] ] ] ] )
160161AC_COMPILE_IFELSE ( [ AC_LANG_PROGRAM ( [ [
161162 int f() {
162- switch(1){
163- case 1:
164- [ [ fallthrough] ] ;
165- case 2:
166- return 2;
163+ switch (1) {
164+ case 1:
165+ [ [ fallthrough] ] ;
166+ case 2:
167+ return 2;
167168 };
168169 }
169170] ] , [ ] ) ] ,
170171 [ has_fallthrough=yes] ,
171172 [ has_fallthrough=no] )
172173AC_MSG_RESULT ( $has_fallthrough )
173- if test $has_fallthrough = yes; then
174- AC_DEFINE ( FALLTHROUGH , [ str] , "support for c++17 fallthrough" )
175- else
176- AC_DEFINE ( FALLTHROUGH , [ ] , "support for c++17 fallthrough" )
177- fi
178-
179- dnl valgrind support
180- dnl unfortunately it makes checking much slower
181- dnl even if valgrind is not used, so leave it inactive.
182- dnl AX_VALGRIND_CHECK
183- dnl
184- dnl instead, just use "VALGRIND=valgrind make check" to test with valgrind
185- dnl read Makefile.in and write Makefile
186- AC_CONFIG_FILES ( [ Makefile] )
187- AC_OUTPUT
174+ if test $has_fallthrough = yes;
175+ then
176+ AC_DEFINE ( FALLTHROUGH , [ str] , "support for c++17 fallthrough" ) else AC_DEFINE (
177+ FALLTHROUGH ,
178+ [ ] ,
179+ "support for c++17 fallthrough" ) fi
180+
181+ dnl valgrind support dnl unfortunately it makes checking much slower dnl even
182+ if valgrind is not used,
183+ so leave it inactive.dnl AX_VALGRIND_CHECK dnl dnl instead,
184+ just use "VALGRIND=valgrind make check" to test with valgrind dnl read
185+ Makefile.in and write Makefile AC_CONFIG_FILES ( [ Makefile] ) AC_OUTPUT
0 commit comments