diff --git a/libpolys/configure.ac b/libpolys/configure.ac
index ba7d911..346602f 100644
--- a/libpolys/configure.ac
+++ b/libpolys/configure.ac
@@ -88,6 +88,7 @@ AC_CANONICAL_HOST
 
 case $host_os in
   *cygwin* ) AX_APPEND_LINK_FLAGS([-Wl,-Bdynamic]);;
+  *) AX_APPEND_LINK_FLAGS([-shared -dynamic -export-dynamic -avoid-version -flat_namespace],[P_PROCS_MODULE_LDFLAGS]);;
 esac
 
 dnl INCLUDES=""
diff --git a/libpolys/polys/Makefile.am b/libpolys/polys/Makefile.am
index 23f216e..119c4ef 100644
--- a/libpolys/polys/Makefile.am
+++ b/libpolys/polys/Makefile.am
@@ -69,12 +69,10 @@ p_Procs_FieldIndep_la_CPPFLAGS = -Dp_Procs_FieldIndep ${P_PROCS_CPPFLAGS_COMMON}
 p_Procs_FieldQ_la_CPPFLAGS = -Dp_Procs_FieldQ ${P_PROCS_CPPFLAGS_COMMON}
 p_Procs_FieldZp_la_CPPFLAGS = -Dp_Procs_FieldZp ${P_PROCS_CPPFLAGS_COMMON}
 
-P_PROCS_MODULE_LDFLAGS = -shared -module -dynamic -export-dynamic -avoid-version -weak_reference_mismatches weak -undefined dynamic_lookup -flat_namespace
-
-p_Procs_FieldGeneral_la_LDFLAGS = ${P_PROCS_MODULE_LDFLAGS}
-p_Procs_FieldIndep_la_LDFLAGS = ${P_PROCS_MODULE_LDFLAGS}
-p_Procs_FieldQ_la_LDFLAGS = ${P_PROCS_MODULE_LDFLAGS}
-p_Procs_FieldZp_la_LDFLAGS = ${P_PROCS_MODULE_LDFLAGS}
+p_Procs_FieldGeneral_la_LDFLAGS = -module ${P_PROCS_MODULE_LDFLAGS}
+p_Procs_FieldIndep_la_LDFLAGS = -module ${P_PROCS_MODULE_LDFLAGS}
+p_Procs_FieldQ_la_LDFLAGS = -module ${P_PROCS_MODULE_LDFLAGS}
+p_Procs_FieldZp_la_LDFLAGS = -module ${P_PROCS_MODULE_LDFLAGS}
 
 P_PROCS = templates/p_Procs_Lib.cc
 
