The configure script checks for embedded perl functions broke
recently, but it was not apparent until Thomas A. noticed it. The
fact that no one noticed was probably due to the way the #ifdefs
worked and didn't warn you when one function was missing.
Thus, I have two patches (which I'll commit to main) but I'm not sure
what to do about 5.2.2. Patches below:
1) fix configure so it checks for the embedded perl functions
properly by using the correct LDFLAGS when doing the test.
2) ensure that an error occurs if the snmp_perl.c file is compiled
but no function was found.
Thoughts (and thanks Thomas for pointing this out to me)?
Index: configure.in
===================================================================
RCS file: /cvsroot/net-snmp/net-snmp/configure.in,v
retrieving revision 5.134.2.39
diff -u -p -r5.134.2.39 configure.in
--- configure.in 26 Oct 2005 03:43:53 -0000 5.134.2.39
+++ configure.in 2 Nov 2005 06:38:24 -0000
@@ -2393,9 +2393,14 @@ if test "x$embed_perl" = "xyes"; then
AC_MSG_RESULT($perlldopts)
PERLLDOPTS="$perlldopts"
+ OLDLDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $PERLLDOPTS"
+
# newer perl vs older perl call functions
AC_CHECK_FUNCS(Perl_eval_pv eval_pv perl_eval_pv)
+ LDFLAGS="$OLDLDFLAGS"
+
AC_DEFINE(NETSNMP_EMBEDDED_PERL)
OTHERAGENTLIBOBJS="snmp_perl.o"
OTHERAGENTLIBLOBJS="snmp_perl.lo"
Index: agent/snmp_perl.c
===================================================================
RCS file: /cvsroot/net-snmp/net-snmp/agent/snmp_perl.c,v
retrieving revision 5.2
diff -u -p -r5.2 snmp_perl.c
--- agent/snmp_perl.c 1 Aug 2002 23:25:18 -0000 5.2
+++ agent/snmp_perl.c 2 Nov 2005 06:39:09 -0000
@@ -84,8 +84,10 @@ do_something_perlish(char *something)
#ifdef HAVE_PERL_EVAL_PV
/* older perl */
perl_eval_pv(something, TRUE);
-#endif /* HAVE_PERL_EVAL_PV */
-#endif /* HAVE_EVAL_PV */
+#else /* !HAVE_PERL_EVAL_PV */
+#error embedded perl broken
+#endif /* !HAVE_PERL_EVAL_PV */
+#endif /* !HAVE_EVAL_PV */
DEBUGMSGTL(("perl", "finished calling perl\n"));
}
--
Wes Hardaker
Sparta, Inc.
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders