From ca8e52b3d2df3f065ba90a57e6f4129c7da03ddd Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 4 Sep 2002 15:04:10 +0000 Subject: [PATCH] don't use -mthreads switch if the compiler doesn't support it git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16973 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- configure | 194 ++++++++++++++++++++++++++++++--------------------- configure.in | 26 +++++-- 2 files changed, 137 insertions(+), 83 deletions(-) diff --git a/configure b/configure index aad59057eb..77d9c6e27e 100755 --- a/configure +++ b/configure @@ -18303,10 +18303,46 @@ else if test "$wxUSE_THREADS" = "yes" ; then case "${host}" in *-*-mingw32* ) - CFLAGS="$CFLAGS -mthreads" - CXXFLAGS="$CXXFLAGS -mthreads" - TOOLCHAIN_DEFS="$TOOLCHAIN_DEFS -mthreads" - LDFLAGS="$LDFLAGS -mthreads" + echo $ac_n "checking if compiler supports -mthreads""... $ac_c" 1>&6 +echo "configure:18308: checking if compiler supports -mthreads" >&5 +if eval "test \"`echo '$''{'wx_cv_cflags_mthread'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + CFLAGS_OLD="$CFLAGS" + CFLAGS="$CFLAGS -mthreads" + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + wx_cv_cflags_mthread=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + wx_cv_cflags_mthread=no + +fi +rm -f conftest* + + +fi + +echo "$ac_t""$wx_cv_cflags_mthread" 1>&6 + + if test "$wx_cv_cflags_mthread" = "yes"; then + CXXFLAGS="$CXXFLAGS -mthreads" + TOOLCHAIN_DEFS="$TOOLCHAIN_DEFS -mthreads" + LDFLAGS="$LDFLAGS -mthreads" + else + CFLAGS="$CFLAGS_OLD" + fi ;; esac fi @@ -18322,7 +18358,7 @@ EOF else if test "$ac_cv_func_strtok_r" = "yes"; then echo $ac_n "checking if -D_REENTRANT is needed""... $ac_c" 1>&6 -echo "configure:18326: checking if -D_REENTRANT is needed" >&5 +echo "configure:18362: checking if -D_REENTRANT is needed" >&5 if test "$NEEDS_D_REENTRANT_FOR_R_FUNCS" = 1; then TOOLCHAIN_DEFS="${TOOLCHAIN_DEFS} -D_REENTRANT" echo "$ac_t""yes" 1>&6 @@ -18707,12 +18743,12 @@ if test "$wxUSE_DATETIME" = "yes"; then for ac_func in strptime do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:18711: checking for $ac_func" >&5 +echo "configure:18747: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:18775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -18761,13 +18797,13 @@ done echo $ac_n "checking for timezone variable in ""... $ac_c" 1>&6 -echo "configure:18765: checking for timezone variable in " >&5 +echo "configure:18801: checking for timezone variable in " >&5 if eval "test \"`echo '$''{'wx_cv_var_timezone'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -18779,7 +18815,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:18783: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:18819: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_var_timezone=timezone @@ -18790,7 +18826,7 @@ else rm -rf conftest* cat > conftest.$ac_ext < @@ -18802,7 +18838,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:18806: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:18842: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_var_timezone=_timezone @@ -18813,7 +18849,7 @@ else rm -rf conftest* cat > conftest.$ac_ext < @@ -18825,7 +18861,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:18829: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:18865: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_var_timezone=__timezone @@ -18866,12 +18902,12 @@ EOF for ac_func in localtime do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:18870: checking for $ac_func" >&5 +echo "configure:18906: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:18934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -18921,13 +18957,13 @@ done if test "$ac_cv_func_localtime" = "yes"; then echo $ac_n "checking for tm_gmtoff in struct tm""... $ac_c" 1>&6 -echo "configure:18925: checking for tm_gmtoff in struct tm" >&5 +echo "configure:18961: checking for tm_gmtoff in struct tm" >&5 if eval "test \"`echo '$''{'wx_cv_struct_tm_has_gmtoff'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -18939,7 +18975,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:18943: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:18979: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_struct_tm_has_gmtoff=yes @@ -18968,12 +19004,12 @@ EOF for ac_func in gettimeofday ftime do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:18972: checking for $ac_func" >&5 +echo "configure:19008: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:19036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -19023,7 +19059,7 @@ done if test "$ac_cv_func_gettimeofday" = "yes"; then echo $ac_n "checking whether gettimeofday takes two arguments""... $ac_c" 1>&6 -echo "configure:19027: checking whether gettimeofday takes two arguments" >&5 +echo "configure:19063: checking whether gettimeofday takes two arguments" >&5 if eval "test \"`echo '$''{'wx_cv_func_gettimeofday_has_2_args'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -19038,7 +19074,7 @@ cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext < @@ -19051,7 +19087,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:19055: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:19091: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_func_gettimeofday_has_2_args=yes else @@ -19059,7 +19095,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext < @@ -19072,7 +19108,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:19076: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:19112: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_func_gettimeofday_has_2_args=no else @@ -19127,12 +19163,12 @@ fi if test "$wxUSE_SOCKETS" = "yes"; then if test "$TOOLKIT" != "MSW"; then echo $ac_n "checking for socket""... $ac_c" 1>&6 -echo "configure:19131: checking for socket" >&5 +echo "configure:19167: checking for socket" >&5 if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:19195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_socket=yes" else @@ -19173,7 +19209,7 @@ if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 -echo "configure:19177: checking for socket in -lsocket" >&5 +echo "configure:19213: checking for socket in -lsocket" >&5 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -19181,7 +19217,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:19232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -19228,7 +19264,7 @@ fi if test "$wxUSE_SOCKETS" = "yes" ; then if test "$TOOLKIT" != "MSW"; then echo $ac_n "checking what is the type of the third argument of getsockname""... $ac_c" 1>&6 -echo "configure:19232: checking what is the type of the third argument of getsockname" >&5 +echo "configure:19268: checking what is the type of the third argument of getsockname" >&5 if eval "test \"`echo '$''{'wx_cv_type_getsockname3'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -19243,7 +19279,7 @@ cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext < @@ -19256,7 +19292,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:19260: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:19296: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_type_getsockname3=socklen_t else @@ -19264,7 +19300,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext < @@ -19277,7 +19313,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:19281: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:19317: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_type_getsockname3=size_t else @@ -19285,7 +19321,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext < @@ -19298,7 +19334,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:19302: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:19338: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_type_getsockname3=int else @@ -19370,17 +19406,17 @@ if test "$wxUSE_GUI" = "yes"; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:19374: checking for $ac_hdr" >&5 +echo "configure:19410: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:19384: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:19420: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -19434,12 +19470,12 @@ if test "$TOOLKIT" != "MSW"; then for ac_func in dlopen do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:19438: checking for $ac_func" >&5 +echo "configure:19474: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:19502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -19490,7 +19526,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:19494: checking for dlopen in -ldl" >&5 +echo "configure:19530: checking for dlopen in -ldl" >&5 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -19498,7 +19534,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:19549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -19538,12 +19574,12 @@ else for ac_func in shl_load do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:19542: checking for $ac_func" >&5 +echo "configure:19578: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:19606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -19594,7 +19630,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dld in -lshl_load""... $ac_c" 1>&6 -echo "configure:19598: checking for dld in -lshl_load" >&5 +echo "configure:19634: checking for dld in -lshl_load" >&5 ac_lib_var=`echo shl_load'_'dld | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -19602,7 +19638,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lshl_load $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:19653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -19652,12 +19688,12 @@ done for ac_func in dlerror do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:19656: checking for $ac_func" >&5 +echo "configure:19692: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:19720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -19705,7 +19741,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dlerror in -ldl""... $ac_c" 1>&6 -echo "configure:19709: checking for dlerror in -ldl" >&5 +echo "configure:19745: checking for dlerror in -ldl" >&5 ac_lib_var=`echo dl'_'dlerror | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -19713,7 +19749,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:19764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -19799,7 +19835,7 @@ EOF if test "$wxUSE_MSW" = 1 -a "$wxUSE_UNICODE_MSLU" = "yes"; then echo $ac_n "checking for main in -lunicows""... $ac_c" 1>&6 -echo "configure:19803: checking for main in -lunicows" >&5 +echo "configure:19839: checking for main in -lunicows" >&5 ac_lib_var=`echo unicows'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -19807,14 +19843,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lunicows $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:19854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -19992,17 +20028,17 @@ if test "$wxUSE_MSW" = 1 -a \( "$wxUSE_DATAOBJ" = "yes" \ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:19996: checking for $ac_hdr" >&5 +echo "configure:20032: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:20006: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:20042: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -20041,9 +20077,9 @@ cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking if g++ requires -fvtable-thunks""... $ac_c" 1>&6 -echo "configure:20045: checking if g++ requires -fvtable-thunks" >&5 +echo "configure:20081: checking if g++ requires -fvtable-thunks" >&5 cat > conftest.$ac_ext < #include @@ -20051,7 +20087,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:20055: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:20091: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""no" 1>&6 else @@ -20112,17 +20148,17 @@ if test "$wxUSE_WINE" = 1 -a \( "$wxUSE_DATAOBJ" = "yes" \ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:20116: checking for $ac_hdr" >&5 +echo "configure:20152: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:20126: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:20162: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -20161,9 +20197,9 @@ cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking if g++ requires -fvtable-thunks""... $ac_c" 1>&6 -echo "configure:20165: checking if g++ requires -fvtable-thunks" >&5 +echo "configure:20201: checking if g++ requires -fvtable-thunks" >&5 cat > conftest.$ac_ext < #include @@ -20171,7 +20207,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:20175: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:20211: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""no" 1>&6 else @@ -21155,7 +21191,7 @@ SAMPLES_SUBDIRS="`echo $SAMPLES_SUBDIRS | tr -s ' ' | tr ' ' '\n' | sort | uniq echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:21159: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:21195: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 diff --git a/configure.in b/configure.in index c0a1cc279b..ab6d0a1231 100644 --- a/configure.in +++ b/configure.in @@ -3485,10 +3485,28 @@ else if test "$wxUSE_THREADS" = "yes" ; then case "${host}" in *-*-mingw32* ) - CFLAGS="$CFLAGS -mthreads" - CXXFLAGS="$CXXFLAGS -mthreads" - TOOLCHAIN_DEFS="$TOOLCHAIN_DEFS -mthreads" - LDFLAGS="$LDFLAGS -mthreads" + dnl check if the compiler accepts -mthreads + AC_CACHE_CHECK([if compiler supports -mthreads], + wx_cv_cflags_mthread, + [ + CFLAGS_OLD="$CFLAGS" + CFLAGS="$CFLAGS -mthreads" + AC_TRY_COMPILE([], [], + wx_cv_cflags_mthread=yes, + wx_cv_cflags_mthread=no + ) + ] + ) + + if test "$wx_cv_cflags_mthread" = "yes"; then + dnl it does, use it + CXXFLAGS="$CXXFLAGS -mthreads" + TOOLCHAIN_DEFS="$TOOLCHAIN_DEFS -mthreads" + LDFLAGS="$LDFLAGS -mthreads" + else + dnl it doesn't + CFLAGS="$CFLAGS_OLD" + fi ;; esac fi -- 2.45.2