Index: Singular/Makefile.in
===================================================================
--- Singular/Makefile.in	(revision 3426de24a82fe29ddf501d02bcb6bd50a782f43f)
+++ Singular/Makefile.in	(revision 725e6002e0b07ad1474e14f72296c0c85a47ae4d)
@@ -87,6 +87,6 @@
 ifneq ($(SINGUNAME),ix86-Win)
 LDFLAGS		= -L@prefix@/kernel -L../kernel -lkernel @LDFLAGS@ 
-LDFLAGSG	= -L@prefix@/kernel -L../kernel -lkernel_g @LDFLAGS@ 
-LDFLAGSP	= -L@prefix@/kernel -L../kernel -lkernel_p @LDFLAGS@ 
+LDFLAGSG	= -L@prefix@/kernel -L../kernel -lkernel_g @LD_DYN_FLAGS1@ @LDFLAGS@ 
+LDFLAGSP	= -L@prefix@/kernel -L../kernel -lkernel_p @LD_DYN_FLAGS1@ @LDFLAGS@ 
 else
 ## -L/usr/local/lib -L@prefix@/modules/python --> PySingular
@@ -95,5 +95,6 @@
 LDFLAGSP	= -L@prefix@/kernel -L/bin -lkernel_p @LDFLAGS@ 
 endif
-LD_DYN_FLAGS	= @LD_DYN_FLAGS@
+LD_DYN_FLAGS1	= @LD_DYN_FLAGS1@
+LD_DYN_FLAGS2	= @LD_DYN_FLAGS2@
 SFLAGS		= @SFLAGS@
 SLDFLAGS	= @SLDFLAGS@
@@ -181,5 +182,5 @@
 GLIBC_DYN_FIX=
 else
-LDFLAGS  := ${LD_DYN_FLAGS} ${LDFLAGS}
+LDFLAGS  := ${LD_DYN_FLAGS1} ${LDFLAGS} ${LD_DYN_FLAGS2}
 SING_EXEC = Singular
 LIBS := ${LIBS} ${PYTHON_LIBS}
@@ -752,5 +753,5 @@
 	$(CXXG) ${CXXFLAGSG} ${CXXTEMPLFLAGSG} ${CPPFLAGS} ${DEFSG} -o Singularg${S_EXT} \
 	tesths.cc iparith.og mpsr_Tok.og claptmpl.og $(OBJG) ${LDFLAGSG} ${LIBSG} -lomalloc ../kernel/mmalloc.og \
-	${LD_DYN_FLAGS} ${LD_LIBC}
+	${LD_DYN_FLAGS2} ${LD_LIBC}
 
 iparith.og: iparith.inc iparith.cc
@@ -832,5 +833,5 @@
 	$(CXXP) ${CXXFLAGSP} ${CXXTEMPLFLAGSP} ${CPPFLAGS} ${DEFSP} -o Singularp${S_EXT} \
 	tesths.cc iparith.op mpsr_Tok.op claptmpl.op $(OBJP) ${LDFLAGSP} ${LIBSP} -lomalloc ../kernel/mmalloc.op \
-	${LD_DYN_FLAGS}
+	${LD_DYN_FLAGS2}
 
 iparith.op: iparith.inc iparith.cc
Index: Singular/configure
===================================================================
--- Singular/configure	(revision 3426de24a82fe29ddf501d02bcb6bd50a782f43f)
+++ Singular/configure	(revision 725e6002e0b07ad1474e14f72296c0c85a47ae4d)
@@ -2539,5 +2539,6 @@
 
 	  if test "$ac_cv_lib_dld_shl_load" = yes; then
-         	LD_DYN_FLAGS="-ldld -Xlinker -E"
+         	LD_DYN_FLAGS1="-Xlinker -E"
+         	LD_DYN_FLAGS2="-ldld"
 	  	SFLAGS="-fpic -fPIC -DPIC"
 	  	SLDFLAGS="-fPIC -DPIC -shared"
@@ -2597,5 +2598,6 @@
 
           if test "$ac_cv_lib_dl_dlopen" = yes; then
-	  	LD_DYN_FLAGS="-ldl -rdynamic"
+	  	LD_DYN_FLAGS1="-rdynamic"
+	  	LD_DYN_FLAGS2="-ldl"
 	  	SFLAGS="-fpic -DPIC"
 	  	SLDFLAGS=-shared
@@ -2607,5 +2609,6 @@
 	;;
         IRIX-6)
-          LD_DYN_FLAGS="-lc"
+          LD_DYN_FLAGS1="-lc"
+          LD_DYN_FLAGS2=""
 	  SFLAGS="-fPIC -DPIC"
 	  SLDFLAGS="-w -no_unresolved -_SYSTYPE_SVR4 -n32 -shared"
@@ -2664,5 +2667,6 @@
 
           if test "$ac_cv_lib_dl_dlopen" = yes; then
-	  	LD_DYN_FLAGS="-ldl"
+	  	LD_DYN_FLAGS1=""
+	  	LD_DYN_FLAGS2="-ldl"
 	  	SFLAGS="-fpic -DPIC"
 	  	SLDFLAGS=-shared
@@ -2723,5 +2727,6 @@
 
           if test "$ac_cv_lib_dl_dlopen" = yes; then
-	  	LD_DYN_FLAGS="-ldl -dynamic"
+	  	LD_DYN_FLAGS1="-dynamic"
+	  	LD_DYN_FLAGS2="-ldl"
 	  	SFLAGS="-fpic -DPIC"
 	  	SLDFLAGS="-dynamic -twolevel_namespace -weak_reference_mismatches weak -undefined dynamic_lookup"
@@ -2781,5 +2786,6 @@
 
           if test "$ac_cv_lib_dl_dlopen" = yes; then
-	  	LD_DYN_FLAGS="-ldl -dynamic"
+	  	LD_DYN_FLAGS1="-dynamic"
+	  	LD_DYN_FLAGS2="-ldl"
 	  	SFLAGS="-fpic -DPIC"
 	  	SLDFLAGS="-dynamic -twolevel_namespace -weak_reference_mismatches weak -undefined dynamic_lookup"
@@ -2839,5 +2845,6 @@
 
           if test "$ac_cv_lib_c_dlopen" = yes; then
-	  	LD_DYN_FLAGS="-Xlinker -E"
+	  	LD_DYN_FLAGS1="-Xlinker -E"
+	  	LD_DYN_FLAGS2=""
 	  	SFLAGS="-fpic -DPIC"
 	  	SLDFLAGS=-shared
@@ -2853,5 +2860,6 @@
 if test $ac_cv_c_cpp = unknown;
 then
-  LD_DYN_FLAGS=
+  LD_DYN_FLAGS1=
+  LD_DYN_FLAGS2=
   SFLAGS=
   SLDFLAGS=
@@ -6067,5 +6075,6 @@
 s%@PYTHON_EMBED_LIBS@%$PYTHON_EMBED_LIBS%g
 s%@EMBED_PYTHON_VALUE@%$EMBED_PYTHON_VALUE%g
-s%@LD_DYN_FLAGS@%$LD_DYN_FLAGS%g
+s%@LD_DYN_FLAGS1@%$LD_DYN_FLAGS1%g
+s%@LD_DYN_FLAGS2@%$LD_DYN_FLAGS2%g
 s%@SFLAGS@%$SFLAGS%g
 s%@SLDFLAGS@%$SLDFLAGS%g
Index: Singular/configure.in
===================================================================
--- Singular/configure.in	(revision 3426de24a82fe29ddf501d02bcb6bd50a782f43f)
+++ Singular/configure.in	(revision 725e6002e0b07ad1474e14f72296c0c85a47ae4d)
@@ -715,5 +715,6 @@
 	  AC_CHECK_LIB(dld, shl_load)
 	  if test "$ac_cv_lib_dld_shl_load" = yes; then
-         	LD_DYN_FLAGS="-ldld -Xlinker -E"
+         	LD_DYN_FLAGS1="-Xlinker -E"
+         	LD_DYN_FLAGS2="-ldld"
 	  	SFLAGS="-fpic -fPIC -DPIC"
 	  	SLDFLAGS="-fPIC -DPIC -shared"
@@ -727,5 +728,6 @@
 	  AC_CHECK_LIB(dl, dlopen)
           if test "$ac_cv_lib_dl_dlopen" = yes; then
-	  	LD_DYN_FLAGS="-ldl -rdynamic"
+	  	LD_DYN_FLAGS1="-rdynamic"
+	  	LD_DYN_FLAGS2="-ldl"
 	  	SFLAGS="-fpic -DPIC"
 	  	SLDFLAGS=-shared
@@ -737,5 +739,6 @@
 	;;
         IRIX-6)
-          LD_DYN_FLAGS="-lc"
+          LD_DYN_FLAGS1=""
+          LD_DYN_FLAGS2="-lc"
 	  SFLAGS="-fPIC -DPIC"
 	  SLDFLAGS="-w -no_unresolved -_SYSTYPE_SVR4 -n32 -shared"
@@ -748,5 +751,6 @@
 	  AC_CHECK_LIB(dl, dlopen)
           if test "$ac_cv_lib_dl_dlopen" = yes; then
-	  	LD_DYN_FLAGS="-ldl"
+	  	LD_DYN_FLAGS1=""
+	  	LD_DYN_FLAGS2="-ldl"
 	  	SFLAGS="-fpic -DPIC"
 	  	SLDFLAGS=-shared
@@ -761,5 +765,6 @@
 	  AC_CHECK_LIB(dl, dlopen)
           if test "$ac_cv_lib_dl_dlopen" = yes; then
-	  	LD_DYN_FLAGS="-ldl -dynamic"
+	  	LD_DYN_FLAGS1="-dynamic"
+	  	LD_DYN_FLAGS2="-ldl"
 	  	SFLAGS="-fpic -DPIC"
 	  	SLDFLAGS="-dynamic -twolevel_namespace -weak_reference_mismatches weak -undefined dynamic_lookup"
@@ -773,5 +778,6 @@
 	  AC_CHECK_LIB(dl, dlopen)
           if test "$ac_cv_lib_dl_dlopen" = yes; then
-	  	LD_DYN_FLAGS="-ldl -dynamic"
+	  	LD_DYN_FLAGS1="-dynamic"
+	  	LD_DYN_FLAGS2="-ldl"
 	  	SFLAGS="-fpic -DPIC"
 	  	SLDFLAGS="-dynamic -twolevel_namespace -weak_reference_mismatches weak -undefined dynamic_lookup"
@@ -785,5 +791,6 @@
 	  AC_CHECK_LIB(c, dlopen)
           if test "$ac_cv_lib_c_dlopen" = yes; then
-	  	LD_DYN_FLAGS="-Xlinker -E"
+	  	LD_DYN_FLAGS1="-Xlinker -E"
+	  	LD_DYN_FLAGS2=""
 	  	SFLAGS="-fpic -DPIC"
 	  	SLDFLAGS=-shared
@@ -797,9 +804,11 @@
 if test $ac_cv_c_cpp = unknown;
 then
-  LD_DYN_FLAGS=
+  LD_DYN_FLAGS1=
+  LD_DYN_FLAGS2=
   SFLAGS=
   SLDFLAGS=
 fi
-AC_SUBST(LD_DYN_FLAGS)
+AC_SUBST(LD_DYN_FLAGS1)
+AC_SUBST(LD_DYN_FLAGS2)
 AC_SUBST(SFLAGS)
 AC_SUBST(SLDFLAGS)
