X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=configure;h=1cd4fe57a15060b418eb8f53580d7a2ce641a557;hb=f8719f5ae5acdc31d3794ddfea8ac963359de41e;hp=e0c07b77743f33c0dfb67d35570363e7ba354249;hpb=f12d3dc367e51bcefba80217c645fa5de05e699c;p=zlib.git diff --git a/configure b/configure index e0c07b7..1cd4fe5 100755 --- a/configure +++ b/configure @@ -194,9 +194,9 @@ if test "$gcc" -eq 1 && ($cc -c $test.c) >> configure.log 2>&1; then fi if test "$warn" -eq 1; then if test "$zconst" -eq 1; then - CFLAGS="${CFLAGS} -Wall -Wextra -Wcast-qual -pedantic -DZLIB_CONST" + CFLAGS="${CFLAGS} -Wall -Wextra -Wcast-qual -pedantic -DZLIB_CONST -fsanitize=address" else - CFLAGS="${CFLAGS} -Wall -Wextra -pedantic" + CFLAGS="${CFLAGS} -Wall -Wextra -pedantic -fsanitize=address" fi fi if test $debug -eq 1; then @@ -367,8 +367,11 @@ else try() { show $* - ( $* ) >> configure.log 2>&1 + got=`( $* ) 2>&1` ret=$? + if test "$got" != ""; then + printf "%s\n" "$got" >> configure.log + fi if test $ret -ne 0; then echo "(exit code "$ret")" >> configure.log fi @@ -381,8 +384,11 @@ tryboth() show $* got=`( $* ) 2>&1` ret=$? - printf %s "$got" >> configure.log + if test "$got" != ""; then + printf "%s\n" "$got" >> configure.log + fi if test $ret -ne 0; then + echo "(exit code "$ret")" >> configure.log return $ret fi test "$got" = "" @@ -457,32 +463,11 @@ size_t dummy = 0; EOF if try $CC -c $CFLAGS $test.c; then echo "Checking for size_t... Yes." | tee -a configure.log - need_sizet=0 else echo "Checking for size_t... No." | tee -a configure.log - need_sizet=1 -fi - -echo >> configure.log - -# check for ssize_t -cat > $test.c < -ssize_t dummy = 0; -EOF -if try $CC -c $CFLAGS $test.c; then - echo "Checking for ssize_t... Yes." | tee -a configure.log - need_ssizet=0 -else - echo "Checking for ssize_t... No." | tee -a configure.log - need_ssizet=1 -fi - -echo >> configure.log - -# find the size_t integer type, if needed -if test $need_sizet -eq 1 -o $need_ssizet -eq 1; then - cat > $test.c < $test.c << EOF long long dummy = 0; EOF if try $CC -c $CFLAGS $test.c; then @@ -510,22 +495,13 @@ EOF if try $CC $CFLAGS -o $test $test.c; then sizet=`./$test` echo "Checking for a pointer-size integer type..." $sizet"." | tee -a configure.log + CFLAGS="${CFLAGS} -DNO_SIZE_T=${sizet}" + SFLAGS="${SFLAGS} -DNO_SIZE_T=${sizet}" else - echo "Failed to find a pointer-size integer type." | tee -a configure.log - leave 1 + echo "Checking for a pointer-size integer type... not found." | tee -a configure.log fi fi -if test $need_sizet -eq 1; then - CFLAGS="${CFLAGS} -DNO_SIZE_T=${sizet}" - SFLAGS="${SFLAGS} -DNO_SIZE_T=${sizet}" -fi - -if test $need_ssizet -eq 1; then - CFLAGS="${CFLAGS} -DNO_SSIZE_T=${sizet}" - SFLAGS="${SFLAGS} -DNO_SSIZE_T=${sizet}" -fi - echo >> configure.log # check for large file support, and if none, check for fseeko() @@ -869,7 +845,6 @@ echo SHAREDLIBV = $SHAREDLIBV >> configure.log echo STATICLIB = $STATICLIB >> configure.log echo TEST = $TEST >> configure.log echo VER = $VER >> configure.log -echo Z_U4 = $Z_U4 >> configure.log echo SRCDIR = $SRCDIR >> configure.log echo exec_prefix = $exec_prefix >> configure.log echo includedir = $includedir >> configure.log