# Description: avoid repetitive -pthread and --fno-rtti flags in compiler
# command line
#  The change in configure.in avoids duplicating -pthread, which is also added
#  to the compiler command line (as THD_FLAGS) by the build system
#  The change to Makefile.in.firebird avoids double inclusion of make.platform,
#  which is also included by the per-target makefiles
# Author: Damyan Ivanov <dmn@debian.org>
# Forwarded: no
--- a/configure.in
+++ b/configure.in
@@ -460,6 +460,7 @@ fi
 
 dnl Find out how to use threads on this platform
 pre_acx_pthread_cflags=$CFLAGS
+pre_acx_pthread_cxxflags=$CXXFLAGS
 pre_acx_pthread_libs=$LIBS
 ACX_PTHREAD([
   AC_DEFINE(HAVE_MULTI_THREAD, 1,
@@ -469,10 +470,6 @@ LIBS=$pre_acx_pthread_libs
 
 AC_SUBST(PTHREAD_LIBS)
 AC_SUBST(PTHREAD_CFLAGS)
-dnl Later we always build threaded binaries
-CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS"
-LIBS="$LIBS $PTHREAD_LIBS"
 
 AC_ARG_ENABLE(raw-devices,
   [  --enable-raw-devices    enable databases on raw devices (default on POSIX)],
--- a/builds/posix/Makefile.in.firebird
+++ b/builds/posix/Makefile.in.firebird
@@ -32,7 +32,6 @@
 ROOT=..
 
 include     $(ROOT)/gen/make.defaults
-include     $(ROOT)/gen/make.platform
 include     $(ROOT)/gen/make.rules
 include     $(ROOT)/gen/make.shared.variables
 
