Add an option to skip all of the slow configure checks
Cuts the total runtime of the configure script from 19 seconds to 5 seconds for me.
This commit is contained in:
parent
6baa096a64
commit
2ef352d365
8 changed files with 19 additions and 5 deletions
|
@ -188,6 +188,9 @@ AS_IF([test x$with_libc__ != xno], [
|
|||
AC_CHECK_LIB([m], [main])
|
||||
AC_CHECK_HEADERS([sys/time.h])
|
||||
|
||||
AC_ARG_ENABLE(sanity-checks,
|
||||
AS_HELP_STRING([--disable-sanity-checks],[Skip verifying that found libraries work.]))
|
||||
|
||||
##############################
|
||||
# Program Support and Features
|
||||
##############################
|
||||
|
@ -223,7 +226,7 @@ PKG_CHECK_MODULES(ICU_I18N, icu-i18n >= icu_required_version)
|
|||
########
|
||||
## boost
|
||||
########
|
||||
AS_IF([test x$enable_slow_wx_checks != xno], [
|
||||
AS_IF([test x$enable_sanity_checks != xno], [
|
||||
AC_AGI_COMPILE([boost ICU support], [boost_icu], [$BOOST_CPPFLAGS],
|
||||
[$BOOST_LDFLAGS $BOOST_REGEX_LIB $ICU_UC_LIBS $ICU_I18N_LIBS],[
|
||||
#include <boost/regex/icu.hpp>
|
||||
|
@ -431,10 +434,7 @@ AC_SUBST(WX_CONFIG_PATH)
|
|||
AS_IF([test x$WX_VERSION = x],
|
||||
[AC_MSG_FAILURE([wxWidgets detection failed, please set --with-wx* or add the libraries to your LIBS, CXX/CFLAGS.])])
|
||||
|
||||
AC_ARG_ENABLE(slow-wx-checks,
|
||||
AS_HELP_STRING([--disable-slow-wx-checks],[Disable slow-running checks for wx components.]))
|
||||
|
||||
AS_IF([test x$enable_slow_wx_checks != xno], [
|
||||
AS_IF([test x$enable_sanity_checks != xno], [
|
||||
AC_AGI_LINK([wxWidgets OpenGL support], [wxopengl], [wx/glcanvas.h], [$GL_CFLAGS $WX_CFLAGS], [$GL_LIBS $WX_LIBS],[
|
||||
#include <wx/glcanvas.h>
|
||||
int main(void) {
|
||||
|
|
|
@ -62,6 +62,7 @@ AC_DEFUN([AX_BOOST_ASIO],
|
|||
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
|
||||
export LDFLAGS
|
||||
|
||||
AS_IF([test x$enable_sanity_checks != xno], [
|
||||
AC_CACHE_CHECK(whether the Boost::ASIO library is available,
|
||||
ax_cv_boost_asio,
|
||||
[AC_LANG_PUSH([C++])
|
||||
|
@ -79,6 +80,7 @@ AC_DEFUN([AX_BOOST_ASIO],
|
|||
ax_cv_boost_asio=yes, ax_cv_boost_asio=no)
|
||||
AC_LANG_POP([C++])
|
||||
])
|
||||
], [ax_cv_boost_asio=yes])
|
||||
if test "x$ax_cv_boost_asio" = "xyes"; then
|
||||
AC_DEFINE(HAVE_BOOST_ASIO,,[define if the Boost::ASIO library is available])
|
||||
BN=boost_system
|
||||
|
|
|
@ -62,6 +62,7 @@ AC_DEFUN([AX_BOOST_CHRONO],
|
|||
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
|
||||
export LDFLAGS
|
||||
|
||||
AS_IF([test x$enable_sanity_checks != xno], [
|
||||
AC_CACHE_CHECK(whether the Boost::Chrono library is available,
|
||||
ax_cv_boost_chrono,
|
||||
[AC_LANG_PUSH([C++])
|
||||
|
@ -73,6 +74,7 @@ AC_DEFUN([AX_BOOST_CHRONO],
|
|||
CXXFLAGS=$CXXFLAGS_SAVE
|
||||
AC_LANG_POP([C++])
|
||||
])
|
||||
], [ax_cv_boost_chrono=yes])
|
||||
if test "x$ax_cv_boost_chrono" = "xyes"; then
|
||||
AC_SUBST(BOOST_CPPFLAGS)
|
||||
|
||||
|
|
|
@ -67,6 +67,7 @@ AC_DEFUN([AX_BOOST_FILESYSTEM],
|
|||
LIBS="$LIBS $BOOST_SYSTEM_LIB"
|
||||
export LIBS
|
||||
|
||||
AS_IF([test x$enable_sanity_checks != xno], [
|
||||
AC_CACHE_CHECK(whether the Boost::Filesystem library is available,
|
||||
ax_cv_boost_filesystem,
|
||||
[AC_LANG_PUSH([C++])
|
||||
|
@ -77,6 +78,7 @@ AC_DEFUN([AX_BOOST_FILESYSTEM],
|
|||
ax_cv_boost_filesystem=yes, ax_cv_boost_filesystem=no)
|
||||
AC_LANG_POP([C++])
|
||||
])
|
||||
], [ax_cv_boost_filesystem=yes])
|
||||
if test "x$ax_cv_boost_filesystem" = "xyes"; then
|
||||
AC_DEFINE(HAVE_BOOST_FILESYSTEM,,[define if the Boost::Filesystem library is available])
|
||||
BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
|
||||
|
|
|
@ -62,6 +62,7 @@ AC_DEFUN([AX_BOOST_LOCALE],
|
|||
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
|
||||
export LDFLAGS
|
||||
|
||||
AS_IF([test x$enable_sanity_checks != xno], [
|
||||
AC_CACHE_CHECK(whether the Boost::Locale library is available,
|
||||
ax_cv_boost_locale,
|
||||
[AC_LANG_PUSH([C++])
|
||||
|
@ -74,6 +75,7 @@ AC_DEFUN([AX_BOOST_LOCALE],
|
|||
CXXFLAGS=$CXXFLAGS_SAVE
|
||||
AC_LANG_POP([C++])
|
||||
])
|
||||
], [ax_cv_boost_locale=yes])
|
||||
if test "x$ax_cv_boost_locale" = "xyes"; then
|
||||
AC_SUBST(BOOST_CPPFLAGS)
|
||||
|
||||
|
|
|
@ -62,6 +62,7 @@ AC_DEFUN([AX_BOOST_REGEX],
|
|||
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
|
||||
export LDFLAGS
|
||||
|
||||
AS_IF([test x$enable_sanity_checks != xno], [
|
||||
AC_CACHE_CHECK(whether the Boost::Regex library is available,
|
||||
ax_cv_boost_regex,
|
||||
[AC_LANG_PUSH([C++])
|
||||
|
@ -71,6 +72,7 @@ AC_DEFUN([AX_BOOST_REGEX],
|
|||
ax_cv_boost_regex=yes, ax_cv_boost_regex=no)
|
||||
AC_LANG_POP([C++])
|
||||
])
|
||||
], [ax_cv_boost_regex=yes])
|
||||
if test "x$ax_cv_boost_regex" = "xyes"; then
|
||||
AC_DEFINE(HAVE_BOOST_REGEX,,[define if the Boost::Regex library is available])
|
||||
BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
|
||||
|
|
|
@ -64,6 +64,7 @@ AC_DEFUN([AX_BOOST_SYSTEM],
|
|||
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
|
||||
export LDFLAGS
|
||||
|
||||
AS_IF([test x$enable_sanity_checks != xno], [
|
||||
AC_CACHE_CHECK(whether the Boost::System library is available,
|
||||
ax_cv_boost_system,
|
||||
[AC_LANG_PUSH([C++])
|
||||
|
@ -75,6 +76,7 @@ AC_DEFUN([AX_BOOST_SYSTEM],
|
|||
CXXFLAGS=$CXXFLAGS_SAVE
|
||||
AC_LANG_POP([C++])
|
||||
])
|
||||
], [ax_cv_boost_system=yes])
|
||||
if test "x$ax_cv_boost_system" = "xyes"; then
|
||||
AC_SUBST(BOOST_CPPFLAGS)
|
||||
|
||||
|
|
|
@ -63,6 +63,7 @@ AC_DEFUN([AX_BOOST_THREAD],
|
|||
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
|
||||
export LDFLAGS
|
||||
|
||||
AS_IF([test x$enable_sanity_checks != xno], [
|
||||
AC_CACHE_CHECK(whether the Boost::Thread library is available,
|
||||
ax_cv_boost_thread,
|
||||
[AC_LANG_PUSH([C++])
|
||||
|
@ -82,6 +83,7 @@ AC_DEFUN([AX_BOOST_THREAD],
|
|||
CXXFLAGS=$CXXFLAGS_SAVE
|
||||
AC_LANG_POP([C++])
|
||||
])
|
||||
], [ax_cv_boost_thread=yes])
|
||||
if test "x$ax_cv_boost_thread" = "xyes"; then
|
||||
if test "x$host_os" = "xsolaris" ; then
|
||||
BOOST_CPPFLAGS="-pthreads $BOOST_CPPFLAGS"
|
||||
|
|
Loading…
Reference in a new issue