Index: Singular/Makefile.am
===================================================================
--- Singular/Makefile.am	(revision 097c71a9e55bb76830c9f5b243182439619170a6)
+++ Singular/Makefile.am	(revision 1d3be347572153044fb3aa1599ba1d67cfcd59cc)
@@ -28,6 +28,7 @@
 # -fdiagnostics-show-option 
 
-libSingular_la_CPPFLAGS   = -DNDEBUG -DOM_NDEBUG -DLIBSINGULAR
-libSingular_g_la_CPPFLAGS = -DLIBSINGULAR
+
+libSingular_la_CPPFLAGS   = -DHAVE_CONFIG_H -DNDEBUG -DOM_NDEBUG -DLIBSINGULAR
+libSingular_g_la_CPPFLAGS = -DHAVE_CONFIG_H -DLIBSINGULAR
 
 SOURCES =    Minor.cc\
@@ -184,5 +185,5 @@
 gentable2_CFLAGS = -O3 -fomit-frame-pointer ${PIPE}
 gentable2_CXXFLAGS = -O3 -fomit-frame-pointer --no-rtti -Wextra -Wall -Wno-long-long ${PIPE} $(CXXTEMPLFLAGS)
-gentable2_CPPFLAGS = -DNDEBUG -DOM_NDEBUG
+gentable2_CPPFLAGS = -DHAVE_CONFIG_H -DNDEBUG -DOM_NDEBUG
 
 
@@ -190,17 +191,17 @@
 gentable1_CFLAGS = -O3 -fomit-frame-pointer ${PIPE}
 gentable1_CXXFLAGS = -O3 -fomit-frame-pointer --no-rtti -Wextra -Wall -Wno-long-long ${PIPE} $(CXXTEMPLFLAGS)
-gentable1_CPPFLAGS = -DNDEBUG -DOM_NDEBUG
+gentable1_CPPFLAGS = -DHAVE_CONFIG_H -DNDEBUG -DOM_NDEBUG
 
 feOpt_SOURCES = feOptGen.cc feOptGen.h
 feOpt_CXXFLAGS = -O3 -fomit-frame-pointer --no-rtti -Wextra -Wall -Wno-long-long ${PIPE} $(CXXTEMPLFLAGS)
-feOpt_CPPFLAGS = -DNDEBUG -DOM_NDEBUG
+feOpt_CPPFLAGS = -DHAVE_CONFIG_H -DNDEBUG -DOM_NDEBUG
 
 feOptES_SOURCES = feOptGen.cc feOptGen.h
 feOptES_CXXFLAGS = -O3 -fomit-frame-pointer --no-rtti -Wextra -Wall -Wno-long-long ${PIPE} $(CXXTEMPLFLAGS)
-feOptES_CPPFLAGS = -DNDEBUG -DOM_NDEBUG -DESINGULAR 
+feOptES_CPPFLAGS = -DHAVE_CONFIG_H -DNDEBUG -DOM_NDEBUG -DESINGULAR 
 
 feOptTS_SOURCES = feOptGen.cc feOptGen.h
 feOptTS_CXXFLAGS = -O3 -fomit-frame-pointer --no-rtti -Wextra -Wall -Wno-long-long ${PIPE} $(CXXTEMPLFLAGS)
-feOptTS_CPPFLAGS = -DNDEBUG -DOM_NDEBUG -DTSINGULAR
+feOptTS_CPPFLAGS = -DHAVE_CONFIG_H -DNDEBUG -DOM_NDEBUG -DTSINGULAR
 
 ########################### Singular* #########################
@@ -223,6 +224,6 @@
 Singularg_LDADD = libSingular_g.la -lnumeric_g -lkernel_g -lpolys_g $(FACTORY_LIBS) -lomalloc_g $(NTL_LIBS) $(GMP_LIBS) ${USEPPROCSDYNAMICLDFLAGS}  ${USEPPROCSDYNAMICLD}
 
-Singular_CPPFLAGS = -DNDEBUG -DOM_NDEBUG
-# Singularg_CPPFLAGS =
+Singular_CPPFLAGS = -DHAVE_CONFIG_H -DNDEBUG -DOM_NDEBUG
+Singularg_CPPFLAGS = -DHAVE_CONFIG_H 
 
 Singular_LDFLAGS = -static
@@ -245,6 +246,6 @@
 Singulardg_LDADD = libSingular_g.la -lnumeric_g -lkernel_g -lpolys_g $(FACTORY_LIBS) -lomalloc_g $(NTL_LIBS) $(GMP_LIBS) ${USEPPROCSDYNAMICLDFLAGS}  ${USEPPROCSDYNAMICLD}
 
-Singulard_CPPFLAGS = -DNDEBUG -DOM_NDEBUG
-# Singulardg_CPPFLAGS =
+Singulard_CPPFLAGS = -DHAVE_CONFIG_H -DNDEBUG -DOM_NDEBUG
+Singulardg_CPPFLAGS = -DHAVE_CONFIG_H 
 
 
@@ -286,6 +287,6 @@
 test_s_g_LDADD = libSingular_g.la -lnumeric_g -lkernel_g -lpolys_g $(FACTORY_LIBS) -lomalloc_g $(NTL_LIBS) $(GMP_LIBS) ${USEPPROCSDYNAMICLDFLAGS}  ${USEPPROCSDYNAMICLD}
 
-test_s_r_CPPFLAGS = -DNDEBUG -DOM_NDEBUG
-# test_s_g_CPPFLAGS =
+test_s_r_CPPFLAGS = -DHAVE_CONFIG_H -DNDEBUG -DOM_NDEBUG
+test_s_g_CPPFLAGS = -DHAVE_CONFIG_H 
 
 test_s_r_LDFLAGS = -static
@@ -307,6 +308,6 @@
 test_d_g_LDADD = libSingular_g.la -lnumeric_g -lkernel_g -lpolys_g $(FACTORY_LIBS) -lomalloc_g $(NTL_LIBS) $(GMP_LIBS) ${USEPPROCSDYNAMICLDFLAGS}  ${USEPPROCSDYNAMICLD}
 
-test_d_r_CPPFLAGS = -DNDEBUG -DOM_NDEBUG
-# test_d_g_CPPFLAGS =
+test_d_r_CPPFLAGS = -DHAVE_CONFIG_H -DNDEBUG -DOM_NDEBUG
+test_d_g_CPPFLAGS = -DHAVE_CONFIG_H 
 
 #########################################################
Index: factory/Makefile.am
===================================================================
--- factory/Makefile.am	(revision 097c71a9e55bb76830c9f5b243182439619170a6)
+++ factory/Makefile.am	(revision 1d3be347572153044fb3aa1599ba1d67cfcd59cc)
@@ -98,4 +98,7 @@
 libfactory_g_la_SOURCES = $(SOURCES)
 
+libfactory_la_CPPFLAGS  = -DHAVE_CONFIG_H -DOM_NDEBUG -DNDEBUG
+libfactory_g_la_CPPFLAGS= -DHAVE_CONFIG_H 
+
 nodist_libfactory_la_SOURCES = cplusplus.h factory.h factoryconf.h
 nodist_libfactory_g_la_SOURCES = cplusplus.h factory.h factoryconf.h
Index: kernel/Makefile.am
===================================================================
--- kernel/Makefile.am	(revision 097c71a9e55bb76830c9f5b243182439619170a6)
+++ kernel/Makefile.am	(revision 1d3be347572153044fb3aa1599ba1d67cfcd59cc)
@@ -23,6 +23,6 @@
 # -fdiagnostics-show-option 
 
-libkernel_la_CPPFLAGS   = -DNDEBUG -DOM_NDEBUG
-#libkernel_g_la_CPPFLAGS =
+libkernel_la_CPPFLAGS   = -DHAVE_CONFIG_H -DNDEBUG -DOM_NDEBUG
+libkernel_g_la_CPPFLAGS = -DHAVE_CONFIG_H 
 
 INCLUDES = -I${top_srcdir} -I${top_builddir} -I${top_srcdir}/libpolys -I${top_builddir}/libpolys $(GMP_CFLAGS) $(FACTORY_CFLAGS) $(NTL_CFLAGS)
@@ -103,6 +103,6 @@
 test_s_g_LDADD = -lkernel_g -lpolys_g -lcoeffs_g -lresources_g -lreporter_g -lmisc_g $(FACTORY_LIBS) -lomalloc_g $(NTL_LIBS) $(GMP_LIBS) ${USEPPROCSDYNAMICLDFLAGS}  ${USEPPROCSDYNAMICLD}
 
-test_s_r_CPPFLAGS = -DNDEBUG -DOM_NDEBUG
-#test_s_g_CPPFLAGS = 
+test_s_r_CPPFLAGS = -DHAVE_CONFIG_H -DNDEBUG -DOM_NDEBUG
+test_s_g_CPPFLAGS = -DHAVE_CONFIG_H 
 
 test_s_r_LDFLAGS = -static
@@ -122,6 +122,6 @@
 test_d_g_LDADD = -lkernel_g -lpolys_g -lcoeffs_g -lresources_g -lreporter_g -lmisc_g $(FACTORY_LIBS) -lomalloc_g $(NTL_LIBS) $(GMP_LIBS) ${USEPPROCSDYNAMICLDFLAGS}  ${USEPPROCSDYNAMICLD}
 
-test_d_r_CPPFLAGS = -DNDEBUG -DOM_NDEBUG
-#test_d_g_CPPFLAGS = 
+test_d_r_CPPFLAGS = -DHAVE_CONFIG_H -DNDEBUG -DOM_NDEBUG
+test_d_g_CPPFLAGS = -DHAVE_CONFIG_H 
 
 
Index: libpolys/coeffs/Makefile.am
===================================================================
--- libpolys/coeffs/Makefile.am	(revision 097c71a9e55bb76830c9f5b243182439619170a6)
+++ libpolys/coeffs/Makefile.am	(revision 1d3be347572153044fb3aa1599ba1d67cfcd59cc)
@@ -12,6 +12,6 @@
 # -fdiagnostics-show-option 
 
-libcoeffs_la_CPPFLAGS   = -DNDEBUG -DOM_NDEBUG
-libcoeffs_g_la_CPPFLAGS =
+libcoeffs_la_CPPFLAGS   = -DHAVE_CONFIG_H -DNDEBUG -DOM_NDEBUG
+libcoeffs_g_la_CPPFLAGS = -DHAVE_CONFIG_H
 
 
@@ -82,9 +82,11 @@
 test_d_g_CXXFLAGS = -g -Wextra -Wall -pedantic -Wno-long-long ${PIPE} ${CXXTEMPLFLAGS}
 
-test_s_r_CPPFLAGS = -DNDEBUG -DOM_NDEBUG
-test_s_g_CPPFLAGS =
 
-test_d_r_CPPFLAGS = -DNDEBUG -DOM_NDEBUG
-test_d_g_CPPFLAGS =
+
+test_s_r_CPPFLAGS = -DHAVE_CONFIG_H -DNDEBUG -DOM_NDEBUG
+test_s_g_CPPFLAGS = -DHAVE_CONFIG_H
+
+test_d_r_CPPFLAGS = -DHAVE_CONFIG_H -DNDEBUG -DOM_NDEBUG
+test_d_g_CPPFLAGS = -DHAVE_CONFIG_H
 
 
Index: libpolys/misc/Makefile.am
===================================================================
--- libpolys/misc/Makefile.am	(revision 097c71a9e55bb76830c9f5b243182439619170a6)
+++ libpolys/misc/Makefile.am	(revision 1d3be347572153044fb3aa1599ba1d67cfcd59cc)
@@ -11,6 +11,6 @@
 # -fdiagnostics-show-option 
 
-libmisc_la_CPPFLAGS   = -DNDEBUG -DOM_NDEBUG
-#libmisc_g_la_CPPFLAGS =
+libmisc_la_CPPFLAGS   = -DHAVE_CONFIG_H -DNDEBUG -DOM_NDEBUG
+libmisc_g_la_CPPFLAGS = -DHAVE_CONFIG_H
 
 INCLUDES = -I${top_srcdir} -I${top_srcdir}/.. -I${top_builddir} -I${top_builddir}/..
Index: libpolys/resources/Makefile.am
===================================================================
--- libpolys/resources/Makefile.am	(revision 097c71a9e55bb76830c9f5b243182439619170a6)
+++ libpolys/resources/Makefile.am	(revision 1d3be347572153044fb3aa1599ba1d67cfcd59cc)
@@ -11,6 +11,6 @@
 # -fdiagnostics-show-option 
 
-libresources_la_CPPFLAGS   = -DNDEBUG -DOM_NDEBUG
-#libresources_g_la_CPPFLAGS =
+libresources_la_CPPFLAGS   = -DHAVE_CONFIG_H -DNDEBUG -DOM_NDEBUG
+libresources_g_la_CPPFLAGS = -DHAVE_CONFIG_H
 
 INCLUDES = -I${top_srcdir} -I${top_srcdir}/.. -I${top_builddir} -I${top_builddir}/..
Index: libpolys/tests/Makefile.am
===================================================================
--- libpolys/tests/Makefile.am	(revision 097c71a9e55bb76830c9f5b243182439619170a6)
+++ libpolys/tests/Makefile.am	(revision 1d3be347572153044fb3aa1599ba1d67cfcd59cc)
@@ -41,5 +41,5 @@
 RELEASECFLAGS = -O3 -fomit-frame-pointer ${PIPE}
 RELEASECXXFLAGS = -O3 -fomit-frame-pointer --no-rtti ${PIPE}
-RELEASECPPFLAGS = -DNDEBUG -DOM_NDEBUG
+RELEASECPPFLAGS = -DHAVE_CONFIG_H -DNDEBUG -DOM_NDEBUG
 
 coeffs_test_s_r_CFLAGS =${RELEASECFLAGS} 
@@ -73,5 +73,5 @@
 DEBUGCFLAGS = $(AM_CFLAGS) -g -Wextra -Wall -Wno-long-long ${PIPE}
 DEBUGCXXFLAGS = $(AM_CXXFLAGS) ${DEBUGCFLAGS} ${CXXTEMPLFLAGS}
-
+DEBUGCPPFLAGS = -DHAVE_CONFIG_H
 
 coeffs_test_s_g_CFLAGS =${DEBUGCFLAGS} 
@@ -91,5 +91,11 @@
 rings_test_d_g_CXXFLAGS = ${DEBUGCXXFLAGS}
 
+coeffs_test_d_g_CPPFLAGS =${DEBUGCPPFLAGS} 
+polys_test_d_g_CPPFLAGS = ${DEBUGCPPFLAGS}
+rings_test_d_g_CPPFLAGS = ${DEBUGCPPFLAGS}
 
+coeffs_test_s_g_CPPFLAGS =${DEBUGCPPFLAGS} 
+polys_test_s_g_CPPFLAGS = ${DEBUGCPPFLAGS}
+rings_test_s_g_CPPFLAGS = ${DEBUGCPPFLAGS}
 
 AM_LDFLAGS = -L${top_builddir}/polys -L${top_builddir}/coeffs -L${top_builddir}/reporter -L${top_builddir}/resources -L${top_builddir}/misc ${USE_FACTORY} -L${top_builddir}/../omalloc 
Index: numeric/Makefile.am
===================================================================
--- numeric/Makefile.am	(revision 097c71a9e55bb76830c9f5b243182439619170a6)
+++ numeric/Makefile.am	(revision 1d3be347572153044fb3aa1599ba1d67cfcd59cc)
@@ -11,6 +11,6 @@
 # -fdiagnostics-show-option 
 
-libnumeric_la_CPPFLAGS   = -DNDEBUG -DOM_NDEBUG
-#libnumeric_g_la_CPPFLAGS =
+libnumeric_la_CPPFLAGS   = -DHAVE_CONFIG_H -DNDEBUG -DOM_NDEBUG
+libnumeric_g_la_CPPFLAGS = -DHAVE_CONFIG_H 
 
 INCLUDES = -I${top_srcdir} -I${top_builddir} -I${top_srcdir}/libpolys -I${top_builddir}/libpolys ${GMP_CFLAGS} ${FACTORY_CFLAGS} ${NTL_CFLAGS}
