When building with -Wl,--no-undefined -Wl,-as-needed, linking of plugins breaks. Plugins and shared libraries should not use the same LDFLAGS. See http://wiki.mandriva.com/en/Underlinking#Problems_introduced_by_--no-undefined The patch to follow may not be the correct fix, but something like it is required.
Created attachment 4820 [details] Patch to provide separate LDFLAGS for plugins Patch from http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/samba/current/SOURCES/samba-3.4-use-different-ldflags-plugins.patch
thanks, the patch looks like a good idea. Implemented for master and upcoming 3.5 with 438f4006. --no-undefined resp. -z defs will also be used by default starting with 3.5.