From aeb2d6c0f7574135036d0402fcf8fe3e463de3b2 Mon Sep 17 00:00:00 2001 From: stevenj Date: Wed, 16 Jun 2010 19:10:06 -0400 Subject: [PATCH] added --with-mthreads option to use -mthreads flag when building MinGW, since that is reportedly needed for __thread to give threadlocal storage darcs-hash:20100616231006-c8de0-4b0e74542f7fc4a99d65d452be1bb9393d9514ae.gz --- BUILD-MINGW.sh | 2 +- configure.ac | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/BUILD-MINGW.sh b/BUILD-MINGW.sh index ef284e1..ced6dc4 100755 --- a/BUILD-MINGW.sh +++ b/BUILD-MINGW.sh @@ -3,7 +3,7 @@ set -e rm -rf mingw -./configure --prefix=`pwd`/mingw --host=i586-mingw32msvc --enable-shared --disable-static --without-matlab --without-octave --without-python --without-guile && make -j4 && make install +./configure --prefix=`pwd`/mingw --host=i586-mingw32msvc --with-mthreads --enable-shared --disable-static --without-matlab --without-octave --without-python --without-guile && make -j4 && make install cd mingw/bin for dll in *.dll; do diff --git a/configure.ac b/configure.ac index b9060eb..507a07c 100644 --- a/configure.ac +++ b/configure.ac @@ -33,6 +33,14 @@ if test "x$with_cxx" = xyes; then fi AC_SUBST(NLOPT_SUFFIX) +AC_ARG_WITH(mthreads, + [AC_HELP_STRING([--with-mthreads], [use -mthreads compiler flag])], + with_mthrads=$withval,with_mthreads=no) +if test "x$with_mthreads" = xyes; then + CFLAGS="$CFLAGS -mthreads" + CXXFLAGS="$CXXFLAGS -mthreads" +fi + dnl Checks for typedefs, structures, and compiler characteristics. AC_HEADER_STDC AC_HEADER_TIME -- 2.30.2