Do not compile/link snprintf.o if it is not needed

This commit is contained in:
Stu Tomlinson
2022-03-16 11:33:58 +00:00
parent 08158ee8ad
commit a92115ab9f
2 changed files with 6 additions and 2 deletions

View File

@@ -75,7 +75,7 @@ else
fi
AC_SEARCH_LIBS([socket], [network socket])
AC_CHECK_FUNCS([snprintf vsnprintf])
AC_CHECK_FUNCS([snprintf vsnprintf], [], [have_snprintf=no])
AC_CHECK_DECLS([va_copy], [], [], [#include <stdarg.h>])
if test "x$enable_tls" != xno -a "x$with_gnutls" == xyes; then
@@ -207,6 +207,7 @@ m4_ifdef([PKG_INSTALLDIR], [PKG_INSTALLDIR],
AM_CONDITIONAL([PARSER_EXPAT], [test x$with_parser != xlibxml2])
AM_CONDITIONAL([DISABLE_TLS], [test x$enable_tls = xno])
AM_CONDITIONAL([NEED_SNPRINTF], [test x$have_snprintf = xno])
AM_CONDITIONAL([TLS_WITH_GNUTLS], [test x$with_gnutls = xyes])
# define while compiling