X-Git-Url: https://git.octo.it/?p=rrdtool.git;a=blobdiff_plain;f=configure.ac;h=ac5023e3c253004bf2b67e5ac81207fd5c6f7d28;hp=843e5b249da49ecd04c00b129174251754d50971;hb=fa908e68adb7ba747ef86c2cc62edc103b07aa2d;hpb=7002f39fe85f0d540dd97659f18ca5347bef90f1 diff --git a/configure.ac b/configure.ac index 843e5b2..ac5023e 100644 --- a/configure.ac +++ b/configure.ac @@ -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,[],[