# Check for unistd.h and stdarg.h
#
check_include_file(unistd.h Z_HAVE_UNISTD_H)
-check_include_file(stdarg.h Z_HAVE_STDARG_H)
if(WITH_SANITIZERS AND WITH_MSAN)
message(FATAL_ERROR "Memory sanitizer is incompatible with address sanitizer")
if (_line STREQUAL "#define ZCONF_H")
file(APPEND ${output} "#cmakedefine Z_HAVE_UNISTD_H\n")
- file(APPEND ${output} "#cmakedefine Z_HAVE_STDARG_H\n")
endif()
endforeach()
endmacro(generate_cmakein)
@if [ -f zconf.h.in ]; then \
cp -p $(SRCDIR)/zconf.h.in zconf.h ; \
TEMPFILE=zconfh_$$ ; \
- echo "/#define ZCONF_H/ a\\\n#cmakedefine Z_HAVE_UNISTD_H\\n#cmakedefine Z_HAVE_STDARG_H\n" >> $$TEMPFILE &&\
+ echo "/#define ZCONF_H/ a\\\n#cmakedefine Z_HAVE_UNISTD_H\\n" >> $$TEMPFILE &&\
sed -f $$TEMPFILE $(SRCDIR)/zconf.h.in > zconf.h.cmakein &&\
touch -r $(SRCDIR)/zconf.h.in zconf.h.cmakein &&\
rm $$TEMPFILE ; fi
echo >> configure.log
-# check for stdarg.h and save result in zconf.h
-cat > $test.c <<EOF
-#include <stdarg.h>
-int main() { return 0; }
-EOF
-if try $CC -c $CFLAGS $test.c; then
- sed < zconf${SUFFIX}.h "/^#ifdef HAVE_STDARG_H.* may be/s/def HAVE_STDARG_H\(.*\) may be/ 1\1 was/" > zconf${SUFFIX}.temp.h
- mv zconf${SUFFIX}.temp.h zconf${SUFFIX}.h
- echo "Checking for stdarg.h... Yes." | tee -a configure.log
-else
- echo "Checking for stdarg.h... No." | tee -a configure.log
-fi
-
# if --zlib-compat was requested
if test $compat -eq 1; then
gzfileops=1
# define Z_HAVE_UNISTD_H
#endif
-#ifdef HAVE_STDARG_H /* may be set to #if 1 by ./configure */
-# define Z_HAVE_STDARG_H
-#endif
-
#include <sys/types.h> /* for off_t */
#include <stdarg.h> /* for va_list */
# define Z_HAVE_UNISTD_H
#endif
-#ifdef HAVE_STDARG_H /* may be set to #if 1 by ./configure */
-# define Z_HAVE_STDARG_H
-#endif
-
#include <sys/types.h> /* for off_t */
#include <stdarg.h> /* for va_list */