diff options
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 80 |
1 files changed, 80 insertions, 0 deletions
@@ -4172,6 +4172,86 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu +echo "$as_me:$LINENO: checking whether snprintf must be declared" >&5 +echo $ECHO_N "checking whether snprintf must be declared... $ECHO_C" >&6 +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + +if test "${groff_cv_decl_needed_snprintf+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +#include <stdio.h> +#ifdef HAVE_STRING_H +#include <string.h> +#endif +#ifdef HAVE_STRINGS_H +#include <strings.h> +#endif +#ifdef HAVE_STDLIB_H +#include <stdlib.h> +#endif +#ifdef HAVE_SYS_TIME_H +#include <sys/time.h> +#endif +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif +#ifdef HAVE_MATH_H +#include <math.h> +#endif +int +main () +{ +#ifndef snprintf + char *p = (char *) snprintf; +#endif + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + groff_cv_decl_needed_snprintf=no +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +groff_cv_decl_needed_snprintf=yes +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi + +echo "$as_me:$LINENO: result: $groff_cv_decl_needed_snprintf" >&5 +echo "${ECHO_T}$groff_cv_decl_needed_snprintf" >&6 +if test $groff_cv_decl_needed_snprintf = yes; then + +cat >>confdefs.h <<\_ACEOF +#define NEED_DECLARATION_SNPRINTF 1 +_ACEOF + +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + echo "$as_me:$LINENO: checking whether srand must be declared" >&5 echo $ECHO_N "checking whether srand must be declared... $ECHO_C" >&6 ac_ext=cc |