X-Git-Url: https://git.octo.it/?p=rrdtool.git;a=blobdiff_plain;f=configure.ac;h=8647eb00a2c6dfefeeabdc3728f495eba321721d;hp=843e5b249da49ecd04c00b129174251754d50971;hb=2097b4d5afca6bcf21327b4d5be1a24f08144f0c;hpb=7002f39fe85f0d540dd97659f18ca5347bef90f1 diff --git a/configure.ac b/configure.ac index 843e5b2..8647eb0 100644 --- a/configure.ac +++ b/configure.ac @@ -203,7 +203,7 @@ AC_C_BIGENDIAN dnl for each function found we get a definition in config.h dnl of the form HAVE_FUNCTION -AC_CHECK_FUNCS(tzset fsync mbstowcs opendir readdir chdir chroot getuid setlocale strerror snprintf vsnprintf fpclass class fp_class isnan memmove strchr mktime getrusage gettimeofday) +AC_CHECK_FUNCS(tzset fsync mbstowcs opendir readdir chdir chroot getuid setlocale strerror snprintf vsnprintf vasprintf fpclass class fp_class isnan memmove strchr mktime getrusage gettimeofday) AC_FUNC_STRERROR_R @@ -372,6 +372,19 @@ CHECK_FOR_WORKING_MS_ASYNC dnl Do we need getopt_long +dnl even when including our own getopt implementation +dnl we may want to make sure we use the external +dnl defined by libc to not run into linker resolve trouble + +AC_CACHE_CHECK([for opterr], rd_cv_var_int_opterr, +[AC_TRY_LINK([#include ], + [extern int opterr; opterr = 1;], + [rd_cv_var_int_opterr=yes], + [rd_cv_var_int_opterr=no])]) +if test x"$rd_cv_var_int_opterr" = x"yes"; then + AC_DEFINE(HAVE_INT_OPTERR, 1, [Define to 1 if you have the global variable 'int opterr'.]) +fi + build_getopt=no RRD_GETOPT_LONG="LIBC_HAS_GETOPT_LONG" AC_CHECK_FUNC(getopt_long,[],[