* Merged with tip.
[cacao.git] / m4 / threads.m4
index 9b2e404a01323f7365115dfc2e653e31a9f56ac8..c1acf9baebd91fde444220ee39c0af1c8b8ee380 100644 (file)
@@ -21,8 +21,6 @@ dnl You should have received a copy of the GNU General Public License
 dnl along with this program; if not, write to the Free Software
 dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 dnl 02110-1301, USA.
-dnl 
-dnl $Id: configure.ac 7228 2007-01-19 01:13:48Z edwin $
 
 
 dnl check which thread implementation should be used
@@ -59,10 +57,11 @@ case "${ENABLE_THREADS}" in
         AC_DEFINE([ENABLE_THREADS], 1, [enable threads])
         AC_CHECK_LIB(pthread, main)
 
-        ARCH_CFLAGS="$ARCH_CFLAGS -D_REENTRANT"
+        OS_FLAGS="$OS_FLAGS -D_REENTRANT"
 
-        dnl we changed ARCH_CFLAGS, set CFLAGS again
-        CFLAGS="$ARCH_CFLAGS $OPT_CFLAGS"
+        dnl We changed OS_FLAGS, set CFLAGS again.
+        CFLAGS="$OPT_CFLAGS $ARCH_FLAGS $OS_FLAGS $CC_FLAGS"
+        CXXFLAGS="$OPT_CXXFLAGS $ARCH_FLAGS $OS_FLAGS $CXX_FLAGS"
 
         dnl tell boehm to support threads as well
         ac_configure_args="$ac_configure_args --enable-boehm-threads=posix"