fi
AM_CONDITIONAL(HAVE_BROKEN_PERL_LOAD_MODULE,
test "x$have_broken_perl_load_module" = "xyes")
+
+if test "x$with_libperl" = "xyes"
+then
+ SAVE_CFLAGS=$CFLAGS
+ SAVE_LDFLAGS=$LDFLAGS
+ CFLAGS="$CFLAGS $PERL_CFLAGS"
+ LDFLAGS="$LDFLAGS $PERL_LDFLAGS"
+
+ AC_CHECK_MEMBER(
+ [struct mgvtbl.svt_local],
+ [have_struct_mgvtbl_svt_local="yes"],
+ [have_struct_mgvtbl_svt_local="no"],
+ [
+#include <EXTERN.h>
+#include <perl.h>
+#include <XSUB.h>
+ ])
+
+ if test "x$have_struct_mgvtbl_svt_local" = "xyes"
+ then
+ AC_DEFINE(HAVE_PERL_STRUCT_MGVTBL_SVT_LOCAL, 1,
+ [Define if Perl's struct mgvtbl has member svt_local.])
+ fi
+
+ CFLAGS=$SAVE_CFLAGS
+ LDFLAGS=$SAVE_LDFLAGS
+fi
# }}}
# --with-libpq {{{
return 0;
} /* static int g_iv_set (pTHX_ SV *, MAGIC *) */
-static MGVTBL g_pv_vtbl = { g_pv_get, g_pv_set, NULL, NULL, NULL, NULL, NULL };
-static MGVTBL g_iv_vtbl = { g_iv_get, g_iv_set, NULL, NULL, NULL, NULL, NULL };
+static MGVTBL g_pv_vtbl = {
+ g_pv_get, g_pv_set, NULL, NULL, NULL, NULL, NULL
+#if HAVE_PERL_STRUCT_MGVTBL_SVT_LOCAL
+ , NULL
+#endif
+};
+static MGVTBL g_iv_vtbl = {
+ g_iv_get, g_iv_set, NULL, NULL, NULL, NULL, NULL
+#if HAVE_PERL_STRUCT_MGVTBL_SVT_LOCAL
+ , NULL
+#endif
+};
/* bootstrap the Collectd module */
static void xs_init (pTHX)