WX_TARGET_LIBRARY_TYPE="a"
INSTALL_LIBRARY='$(INSTALL_DATA)'
+
+ dnl wx-config should assume the --static flag by default if we don't have
+ dnl any shared libs anyhow
+ STATIC_FLAG="yes"
+else
+ STATIC_FLAG="no"
fi
if test "$wxUSE_MAC" = 1; then
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
AC_SUBST(WX_TARGET_LIBRARY_SONAME)
AC_SUBST(WX_TARGET_LIBRARY_TYPE)
+AC_SUBST(STATIC_FLAG)
+
dnl debugging options
AC_SUBST(WXDEBUG_DEFINE)