$OpenBSD: patch-modules_Makefile_am,v 1.2 2002/02/15 19:11:16 nino Exp $
--- modules/Makefile.am.orig	Wed Jan 16 03:39:32 2002
+++ modules/Makefile.am	Mon Feb  4 12:51:49 2002
@@ -34,7 +34,7 @@ else
 CDDA_LTLIBS =
 endif
 
-module_flags = -export_dynamic -avoid-version
+module_flags = -module -export_dynamic -avoid-version
 modulesdir = $(libdir)/vfs/modules
 
 modules_LTLIBRARIES =				\
@@ -108,6 +108,7 @@ libssh_la_SRCLIST = 				\
 
 libvfs_test_la_SOURCES =			\
 	test-method.c				
+libvfs_test_la_LDFLAGS = $(module_flags)
 libvfs_test_la_LIBADD = $(XML_LIBS)
 
 ### `gzip' method
@@ -127,6 +128,7 @@ libbzip2_la_LIBADD = -lbz2
 libftp_la_SOURCES = 				\
 	ftp-method.c				\
 	ftp-method.h
+libftp_la_LDFLAGS = $(module_flags)
 
 ### `nntp' method
 
