Index: Singular/Makefile.am
===================================================================
--- Singular/Makefile.am	(revision 0560897fe3dd0b7d8eae37d99a3154ebf84cb0cc)
+++ Singular/Makefile.am	(revision 240fe341d811574b08eb3be9ccacd93348ef1048)
@@ -207,5 +207,5 @@
 endif
 
-AMLDFLAGS = -L${abs_top_builddir}/Singular -L${abs_top_builddir}/numeric -L${abs_top_builddir}/kernel -L${abs_top_builddir}/libpolys/polys  -L${top_builddir}/libpolys/coeffs -L${top_builddir}/libpolys/reporter -L${top_builddir}/libpolys/misc $(USE_FACTORY) -L${abs_top_builddir}/omalloc -L${abs_top_builddir}/findexec
+AMLDFLAGS = -L${top_builddir}/Singular -L${top_builddir}/numeric -L${top_builddir}/kernel -L${top_builddir}/libpolys/polys  -L${top_builddir}/libpolys/coeffs -L${top_builddir}/libpolys/reporter -L${top_builddir}/libpolys/misc $(USE_FACTORY) -L${top_builddir}/omalloc -L${top_builddir}/findexec
 
 Singular_CFLAGS = -O3 -fomit-frame-pointer ${PIPE}
@@ -221,6 +221,6 @@
 Singularg_SOURCES = tesths.cc fegetopt.c fegetopt.h utils.cc  utils.h 
 
-Singular_LDADD = libSingular.la ${abs_top_builddir}/numeric/libnumeric.la ${abs_top_builddir}/kernel/libkernel.la ${abs_top_builddir}/libpolys/polys/libpolys.la -lcoeffs -lreporter -lmisc $(FACTORY_LIBS) -lomalloc -lfindexec $(FLINT_LIBS) $(NTL_LIBS) $(GMP_LIBS) ${USEPPROCSDYNAMICLDFLAGS} ${USEPPROCSDYNAMICLD}
-Singularg_LDADD = libSingular_g.la ${abs_top_builddir}/numeric/libnumeric_g.la ${abs_top_builddir}/kernel/libkernel_g.la ${abs_top_builddir}/libpolys/polys/libpolys_g.la -lcoeffs_g -lreporter_g -lmisc_g $(FACTORY_LIBS) -lomalloc_g -lfindexec_g $(FLINT_LIBS) $(NTL_LIBS) $(GMP_LIBS) ${USEPPROCSDYNAMICLDFLAGS}  ${USEPPROCSDYNAMICLD}
+Singular_LDADD = libSingular.la ${top_builddir}/numeric/libnumeric.la ${top_builddir}/kernel/libkernel.la ${top_builddir}/libpolys/polys/libpolys.la -lcoeffs -lreporter -lmisc $(FACTORY_LIBS) -lomalloc -lfindexec $(FLINT_LIBS) $(NTL_LIBS) $(GMP_LIBS) ${USEPPROCSDYNAMICLDFLAGS} ${USEPPROCSDYNAMICLD}
+Singularg_LDADD = libSingular_g.la ${top_builddir}/numeric/libnumeric_g.la ${top_builddir}/kernel/libkernel_g.la ${top_builddir}/libpolys/polys/libpolys_g.la -lcoeffs_g -lreporter_g -lmisc_g $(FACTORY_LIBS) -lomalloc_g -lfindexec_g $(FLINT_LIBS) $(NTL_LIBS) $(GMP_LIBS) ${USEPPROCSDYNAMICLDFLAGS}  ${USEPPROCSDYNAMICLD}
 
 Singular_CPPFLAGS = ${AM_CPPFLAGS} -DHAVE_CONFIG_H -DNDEBUG -DOM_NDEBUG
@@ -310,6 +310,6 @@
 ########################### TEST #########################
 
-TESTS_ENVIRONMENT = SINGULARPATH='${abs_top_builddir}/Singular/LIB:${abs_top_srcdir}/Singular/LIB:${abs_top_builddir}/libpolys/polys/.libs:${abs_top_builddir}/factory/gftables'
-TESTS_ENVIRONMENT += SINGULAR_ROOT_DIR='${abs_top_builddir}' 
+TESTS_ENVIRONMENT = SINGULARPATH='${top_builddir}/Singular/LIB:${top_srcdir}/Singular/LIB:${top_builddir}/libpolys/polys/.libs:${top_builddir}/factory/gftables'
+TESTS_ENVIRONMENT += SINGULAR_ROOT_DIR='${top_builddir}'
 
 if WANT_DEBUG
@@ -370,14 +370,14 @@
 
 feOpt.inc: feOptGen
-	${abs_builddir}/feOptGen
+	${builddir}/feOptGen
 
 feOptES.inc: feOptES
-	${abs_builddir}/feOptES
+	${builddir}/feOptES
 
 feOptTS.inc: feOptTS
-	${abs_builddir}/feOptTS
+	${builddir}/feOptTS
 
 plural_cmd.inc iparith.inc: gentable1
-	${abs_builddir}/gentable1
+	${builddir}/gentable1
 
 # # fake rule to fix parallel make http://www.gnu.org/s/hello/manual/automake/Multiple-Outputs.html
@@ -385,7 +385,7 @@
 
 
-gftables: ${abs_top_srcdir}/factory/gftables
-	ln -snf ${abs_top_srcdir}/factory/gftables ${abs_builddir}/gftables
-
-MOD: ${abs_top_builddir}/libpolys/polys/.libs
-	ln -snf ${abs_top_builddir}/libpolys/polys/.libs/ ${abs_builddir}/MOD
+gftables: ${top_srcdir}/factory/gftables
+	ln -snf ${top_srcdir}/factory/gftables ${builddir}/gftables
+
+MOD: ${top_builddir}/libpolys/polys/.libs
+	ln -snf ${top_builddir}/libpolys/polys/.libs/ ${builddir}/MOD
Index: dyn_modules/bigintm/Makefile.am
===================================================================
--- dyn_modules/bigintm/Makefile.am	(revision 0560897fe3dd0b7d8eae37d99a3154ebf84cb0cc)
+++ dyn_modules/bigintm/Makefile.am	(revision 240fe341d811574b08eb3be9ccacd93348ef1048)
@@ -31,6 +31,6 @@
 
 AMLDFLAGS	= 
-# -L${abs_top_builddir}/Singular -L${abs_top_builddir}/numeric -L${abs_top_builddir}/kernel \
-# -L${abs_top_builddir}/libpolys/polys $(USE_FACTORY) -L${abs_top_builddir}/omalloc -L${abs_top_builddir}/findexec
+# -L${top_builddir}/Singular -L${top_builddir}/numeric -L${top_builddir}/kernel \
+# -L${top_builddir}/libpolys/polys $(USE_FACTORY) -L${top_builddir}/omalloc -L${top_builddir}/findexec
 
 
Index: dyn_modules/syzextra/Makefile.am
===================================================================
--- dyn_modules/syzextra/Makefile.am	(revision 0560897fe3dd0b7d8eae37d99a3154ebf84cb0cc)
+++ dyn_modules/syzextra/Makefile.am	(revision 240fe341d811574b08eb3be9ccacd93348ef1048)
@@ -31,6 +31,6 @@
 
 AMLDFLAGS	= 
-# -L${abs_top_builddir}/Singular -L${abs_top_builddir}/numeric -L${abs_top_builddir}/kernel \
-# -L${abs_top_builddir}/libpolys/polys $(USE_FACTORY) -L${abs_top_builddir}/omalloc -L${abs_top_builddir}/findexec
+# -L${top_builddir}/Singular -L${top_builddir}/numeric -L${top_builddir}/kernel \
+# -L${top_builddir}/libpolys/polys $(USE_FACTORY) -L${top_builddir}/omalloc -L${top_builddir}/findexec
 
 
Index: factory/Makefile.am
===================================================================
--- factory/Makefile.am	(revision 0560897fe3dd0b7d8eae37d99a3154ebf84cb0cc)
+++ factory/Makefile.am	(revision 240fe341d811574b08eb3be9ccacd93348ef1048)
@@ -18,8 +18,8 @@
 
 libfactory_la_CXXFLAGS   = -O3 -fomit-frame-pointer ${CXXTEMPLFLAGS}
-libfactory_la_LIBADD     = ${abs_builddir}/libfac/libfac.la $(FLINT_LIBS) ${GMP_LIBS} ${NTL_LIBS}
+libfactory_la_LIBADD     = ${builddir}/libfac/libfac.la $(FLINT_LIBS) ${GMP_LIBS} ${NTL_LIBS}
 libfactory_la_LDFLAGS    = -release ${PACKAGE_VERSION}
 libfactory_g_la_CXXFLAGS = -g -Wextra -Wall -pedantic -Wno-long-long ${CXXTEMPLFLAGS}
-libfactory_g_la_LIBADD   = ${abs_builddir}/libfac/libfac_g.la $(FLINT_LIBS) ${GMP_LIBS} ${NTL_LIBS}
+libfactory_g_la_LIBADD   = ${builddir}/libfac/libfac_g.la $(FLINT_LIBS) ${GMP_LIBS} ${NTL_LIBS}
 libfactory_g_la_LDFLAGS  = -release ${PACKAGE_VERSION}
 
@@ -304,5 +304,5 @@
 check_PROGRAMS = $(TESTS)
 
-AMLDFLAGS =  -L${abs_builddir}
+AMLDFLAGS =  -L${builddir}
 
 TESTSSOURCES = test.cc
Index: libpolys/coeffs/Makefile.am
===================================================================
--- libpolys/coeffs/Makefile.am	(revision 0560897fe3dd0b7d8eae37d99a3154ebf84cb0cc)
+++ libpolys/coeffs/Makefile.am	(revision 240fe341d811574b08eb3be9ccacd93348ef1048)
@@ -51,5 +51,5 @@
 endif
 
-AMLDFLAGS = -L${abs_top_builddir}/coeffs -L${abs_top_builddir}/reporter -L${top_builddir}/misc ${USE_FACTORY} -L${top_builddir}/../omalloc -L${abs_top_builddir}/../findexec
+AMLDFLAGS = -L${top_builddir}/coeffs -L${top_builddir}/reporter -L${top_builddir}/misc ${USE_FACTORY} -L${top_builddir}/../omalloc -L${top_builddir}/../findexec
 
 TESTS_ENVIRONMENT = SINGULARPATH='${top_srcdir}/../factory:${top_builddir}/../factory'
Index: libpolys/polys/Makefile.am
===================================================================
--- libpolys/polys/Makefile.am	(revision 0560897fe3dd0b7d8eae37d99a3154ebf84cb0cc)
+++ libpolys/polys/Makefile.am	(revision 240fe341d811574b08eb3be9ccacd93348ef1048)
@@ -155,5 +155,5 @@
 
 templates_p_Procs_Generate_LDADD    = -lreporter -lmisc -lomalloc -lfindexec
-templates_p_Procs_Generate_LDFLAGS  = -L${abs_builddir} -L${abs_top_builddir}/coeffs -L${abs_top_builddir}/reporter -L${top_builddir}/misc -L${abs_top_builddir}/../omalloc -L${abs_top_builddir}/../findexec
+templates_p_Procs_Generate_LDFLAGS  = -L${builddir} -L${top_builddir}/coeffs -L${top_builddir}/reporter -L${top_builddir}/misc -L${top_builddir}/../omalloc -L${top_builddir}/../findexec
 
 templates/p_Procs.inc: templates/p_Procs_Generate
Index: omalloc/Makefile.am
===================================================================
--- omalloc/Makefile.am	(revision 0560897fe3dd0b7d8eae37d99a3154ebf84cb0cc)
+++ omalloc/Makefile.am	(revision 240fe341d811574b08eb3be9ccacd93348ef1048)
@@ -33,5 +33,5 @@
 EXTRA_DIST = omalloc.c omtTestAlloc.c omtTest.h omMmap.c
 
-AM_CPPFLAGS =-I${abs_top_srcdir}/.. -I${abs_top_builddir}/..
+AM_CPPFLAGS =-I${top_srcdir}/.. -I${top_builddir}/..
 
 libomalloc_la_SOURCES=$(SOURCES) $(noinst_HEADERS)
@@ -67,5 +67,5 @@
 ## Test program
 ##
-# AM_LDFLAGS = -L${abs_top_builddir}/omalloc -L${abs_top_builddir}/../omalloc
+# AM_LDFLAGS = -L${top_builddir}/omalloc -L${top_builddir}/../omalloc
 
 
@@ -92,10 +92,10 @@
 omtTest_s_g_CFLAGS  = -g -Wextra -Wall -pedantic -Wno-long-long ${PIPE}
 omtTest_s_g_LDADD   = libomalloc_g.la
-omtTest_s_g_LDFLAGS = -L${abs_top_builddir}/omalloc -L${abs_top_builddir}/../omalloc -static
+omtTest_s_g_LDFLAGS = -L${top_builddir}/omalloc -L${top_builddir}/../omalloc -static
 
 omtTest_s_m_CPPFLAGS= ${AM_CPPFLAGS} -DOM_TEST_MALLOC  -DHAVE_CONFIG_H
 omtTest_s_m_SOURCES = $(OMTTESTSSOURCES)
 omtTest_s_m_LDADD   = libomalloc_g.la
-omtTest_s_m_LDFLAGS = -L${abs_top_builddir}/omalloc -L${abs_top_builddir}/../omalloc -static
+omtTest_s_m_LDFLAGS = -L${top_builddir}/omalloc -L${top_builddir}/../omalloc -static
 
 omtTest_s_r_SOURCES = $(OMTTESTSSOURCES)
@@ -103,5 +103,5 @@
 omtTest_s_r_CFLAGS  = -O3 ${PIPE}
 omtTest_s_r_LDADD   = libomalloc.la
-omtTest_s_r_LDFLAGS = -L${abs_top_builddir}/omalloc -L${abs_top_builddir}/../omalloc -static
+omtTest_s_r_LDFLAGS = -L${top_builddir}/omalloc -L${top_builddir}/../omalloc -static
 
 
@@ -111,10 +111,10 @@
 omtTest_d_g_CFLAGS  = -g -Wextra -Wall -pedantic -Wno-long-long ${PIPE}
 omtTest_d_g_LDADD   = libomalloc_g.la
-omtTest_d_g_LDFLAGS = -L${abs_top_builddir}/omalloc -L${abs_top_builddir}/../omalloc
+omtTest_d_g_LDFLAGS = -L${top_builddir}/omalloc -L${top_builddir}/../omalloc
 
 omtTest_d_m_CPPFLAGS= ${AM_CPPFLAGS} -DOM_TEST_MALLOC  -DHAVE_CONFIG_H
 omtTest_d_m_SOURCES = $(OMTTESTSSOURCES)
 omtTest_d_m_LDADD   = libomalloc_g.la
-omtTest_d_m_LDFLAGS = -L${abs_top_builddir}/omalloc -L${abs_top_builddir}/../omalloc
+omtTest_d_m_LDFLAGS = -L${top_builddir}/omalloc -L${top_builddir}/../omalloc
 
 omtTest_d_r_SOURCES = $(OMTTESTSSOURCES)
@@ -122,3 +122,3 @@
 omtTest_d_r_CFLAGS  = -O3 ${PIPE}
 omtTest_d_r_LDADD   = libomalloc.la
-omtTest_d_r_LDFLAGS = -L${abs_top_builddir}/omalloc -L${abs_top_builddir}/../omalloc
+omtTest_d_r_LDFLAGS = -L${top_builddir}/omalloc -L${top_builddir}/../omalloc
