mirror of
https://github.com/matrix-construct/construct
synced 2024-09-27 19:28:52 +02:00
configure.ac: various cleanup; boost vers; chkp;
This commit is contained in:
parent
babde26165
commit
6e6d92a6ed
1 changed files with 54 additions and 18 deletions
72
configure.ac
72
configure.ac
|
@ -64,19 +64,6 @@ dnl
|
||||||
#])
|
#])
|
||||||
|
|
||||||
|
|
||||||
dnl
|
|
||||||
dnl General variables exported to Makefile.am
|
|
||||||
dnl
|
|
||||||
|
|
||||||
AC_SUBST(CC)
|
|
||||||
AC_SUBST(CXX)
|
|
||||||
AC_SUBST(CFLAGS)
|
|
||||||
AC_SUBST(CXXFLAGS, "-ffriend-injection")
|
|
||||||
AC_SUBST(CPPFLAGS)
|
|
||||||
AC_SUBST(LDFLAGS)
|
|
||||||
AC_SUBST(LIBS)
|
|
||||||
|
|
||||||
|
|
||||||
dnl
|
dnl
|
||||||
dnl Coarse compiler test macros
|
dnl Coarse compiler test macros
|
||||||
dnl
|
dnl
|
||||||
|
@ -98,6 +85,19 @@ AM_CONDITIONAL([INTERIX], [[[[ $host_os = *interix* ]]]])
|
||||||
AM_CONDITIONAL([SOLARIS], [[[[ $host_os = *solaris* ]]]])
|
AM_CONDITIONAL([SOLARIS], [[[[ $host_os = *solaris* ]]]])
|
||||||
|
|
||||||
|
|
||||||
|
dnl
|
||||||
|
dnl Initialization of variables exported to Makefile.am.
|
||||||
|
dnl These will be further composed throughout this file...
|
||||||
|
dnl
|
||||||
|
|
||||||
|
AC_SUBST(CC)
|
||||||
|
AC_SUBST(CXX)
|
||||||
|
AC_SUBST(CFLAGS)
|
||||||
|
AC_SUBST(CXXFLAGS)
|
||||||
|
AC_SUBST(CPPFLAGS)
|
||||||
|
AC_SUBST(LDFLAGS)
|
||||||
|
AC_SUBST(LIBS)
|
||||||
|
|
||||||
|
|
||||||
dnl ***************************************************************************
|
dnl ***************************************************************************
|
||||||
dnl Preprocessor define macros
|
dnl Preprocessor define macros
|
||||||
|
@ -138,31 +138,39 @@ AC_DEFUN([CPPDEFINE],
|
||||||
|
|
||||||
|
|
||||||
dnl ***************************************************************************
|
dnl ***************************************************************************
|
||||||
dnl Development options
|
dnl Developer options
|
||||||
dnl
|
dnl
|
||||||
|
|
||||||
|
|
||||||
|
dnl
|
||||||
|
dnl Debugging mode
|
||||||
|
dnl
|
||||||
|
|
||||||
AC_MSG_CHECKING(if you want to enable debugging)
|
AC_MSG_CHECKING(if you want to enable debugging)
|
||||||
AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug], [Enable debugging suite for development.]),
|
AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug], [Enable debugging suite for development.]),
|
||||||
[
|
[
|
||||||
AC_SUBST(DEBUG, 1)
|
AC_SUBST(DEBUG, 1)
|
||||||
CXXFLAGS="$CXXFLAGS -O0 -ggdb"
|
CXXFLAGS+=" -O0 -ggdb"
|
||||||
RB_DEFINE_UNQUOTED([DEBUG], [1], [Not configured for release when lit.])
|
RB_DEFINE_UNQUOTED([DEBUG], [1], [Not configured for release when lit.])
|
||||||
], [
|
], [
|
||||||
AC_SUBST(DEBUG, 0)
|
AC_SUBST(DEBUG, 0)
|
||||||
CXXFLAGS="$CXXFLAGS -O3"
|
CXXFLAGS+=" -O3"
|
||||||
CPPDEFINE([NDEBUG])
|
CPPDEFINE([NDEBUG])
|
||||||
])
|
])
|
||||||
|
|
||||||
AM_CONDITIONAL([DEBUG], [[[[ "$DEBUG" = "1" ]]]])
|
AM_CONDITIONAL([DEBUG], [[[[ "$DEBUG" = "1" ]]]])
|
||||||
|
|
||||||
|
|
||||||
|
dnl
|
||||||
|
dnl Profiling mode
|
||||||
|
dnl
|
||||||
|
|
||||||
AC_MSG_CHECKING(if you want to do a profile build)
|
AC_MSG_CHECKING(if you want to do a profile build)
|
||||||
AC_ARG_ENABLE(profile, AC_HELP_STRING([--enable-profile], [Enable profiling]),
|
AC_ARG_ENABLE(profile, AC_HELP_STRING([--enable-profile], [Enable profiling]),
|
||||||
[
|
[
|
||||||
if test "$ac_cv_c_compiler_gnu" = yes; then
|
if test "$ac_cv_c_compiler_gnu" = yes; then
|
||||||
AC_MSG_RESULT([yes, adding -pg])
|
AC_MSG_RESULT([yes, adding -pg])
|
||||||
CXXFLAGS="$CXXFLAGS -pg"
|
CXXFLAGS+=" -pg"
|
||||||
AC_DEFINE(CHARYBDIS_PROFILE, 1, [Define this if you are profiling.])
|
AC_DEFINE(CHARYBDIS_PROFILE, 1, [Define this if you are profiling.])
|
||||||
else
|
else
|
||||||
AC_MSG_RESULT([no, profile builds only work with gcc])
|
AC_MSG_RESULT([no, profile builds only work with gcc])
|
||||||
|
@ -171,6 +179,10 @@ AC_ARG_ENABLE(profile, AC_HELP_STRING([--enable-profile], [Enable profiling]),
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
dnl
|
||||||
|
dnl Precompiled headers
|
||||||
|
dnl
|
||||||
|
|
||||||
AC_MSG_CHECKING(if you want to disable precompiled headers)
|
AC_MSG_CHECKING(if you want to disable precompiled headers)
|
||||||
AC_ARG_ENABLE(pch, AC_HELP_STRING([--disable-pch], [Disable precompiled header generation]),
|
AC_ARG_ENABLE(pch, AC_HELP_STRING([--disable-pch], [Disable precompiled header generation]),
|
||||||
[
|
[
|
||||||
|
@ -185,6 +197,20 @@ AC_ARG_ENABLE(pch, AC_HELP_STRING([--disable-pch], [Disable precompiled header g
|
||||||
AM_CONDITIONAL([BUILD_PCH], [[[[ "$build_pch" = "yes" ]]]])
|
AM_CONDITIONAL([BUILD_PCH], [[[[ "$build_pch" = "yes" ]]]])
|
||||||
|
|
||||||
|
|
||||||
|
dnl
|
||||||
|
dnl Compiler intrumentation
|
||||||
|
dnl
|
||||||
|
|
||||||
|
dnl CXXFLAGS+=" -mmpx"
|
||||||
|
dnl CXXFLAGS+=" -fcheck-pointer-bounds"
|
||||||
|
CXXFLAGS+=" -fchkp-instrument-marked-only"
|
||||||
|
CXXFLAGS+=" -fstack-protector-explicit"
|
||||||
|
|
||||||
|
|
||||||
|
dnl
|
||||||
|
dnl Compiler warnings
|
||||||
|
dnl
|
||||||
|
|
||||||
STACK_USAGE_WARNING=16384
|
STACK_USAGE_WARNING=16384
|
||||||
CWARNS=""
|
CWARNS=""
|
||||||
AC_MSG_CHECKING(if you want to disable warnings)
|
AC_MSG_CHECKING(if you want to disable warnings)
|
||||||
|
@ -215,6 +241,7 @@ CHARYBDIS_C_GCC_TRY_FLAGS([-Wunreachable-code], charybdis_cv_c_gcc_w_unreachable
|
||||||
CHARYBDIS_C_GCC_TRY_FLAGS([-Wno-overloaded-virtual], charybdis_cv_c_gcc_w_overloaded_virtual)
|
CHARYBDIS_C_GCC_TRY_FLAGS([-Wno-overloaded-virtual], charybdis_cv_c_gcc_w_overloaded_virtual)
|
||||||
CHARYBDIS_C_GCC_TRY_FLAGS([-Wnon-virtual-dtor], charybdis_cv_c_gcc_w_non_virtual_dtor)
|
CHARYBDIS_C_GCC_TRY_FLAGS([-Wnon-virtual-dtor], charybdis_cv_c_gcc_w_non_virtual_dtor)
|
||||||
CHARYBDIS_C_GCC_TRY_FLAGS([-Wnoexcept], charybdis_cv_c_gcc_w_noexcept)
|
CHARYBDIS_C_GCC_TRY_FLAGS([-Wnoexcept], charybdis_cv_c_gcc_w_noexcept)
|
||||||
|
CHARYBDIS_C_GCC_TRY_FLAGS([-Wchkp], charybdis_cv_c_gcc_w_chkp)
|
||||||
|
|
||||||
AM_COND_IF([GCC],
|
AM_COND_IF([GCC],
|
||||||
[
|
[
|
||||||
|
@ -235,6 +262,15 @@ AM_COND_IF([CLANG],
|
||||||
CPPFLAGS+="$CWARNS"
|
CPPFLAGS+="$CWARNS"
|
||||||
|
|
||||||
|
|
||||||
|
dnl
|
||||||
|
dnl Misc
|
||||||
|
dnl
|
||||||
|
|
||||||
|
dnl -ffriend-injection allows us to deduplicate declarations of friend
|
||||||
|
dnl functions in both the friend class and the enclosing namespace
|
||||||
|
CXXFLAGS+=" -ffriend-injection"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
dnl ***************************************************************************
|
dnl ***************************************************************************
|
||||||
dnl Header file checks
|
dnl Header file checks
|
||||||
|
@ -584,7 +620,7 @@ dnl
|
||||||
dnl boost support
|
dnl boost support
|
||||||
dnl
|
dnl
|
||||||
|
|
||||||
BOOST_VERSION_MIN="1.62"
|
BOOST_VERSION_MIN="1.61"
|
||||||
BOOST_BUILT_LIBS="system,filesystem,context,coroutine"
|
BOOST_BUILT_LIBS="system,filesystem,context,coroutine"
|
||||||
|
|
||||||
AC_MSG_CHECKING([whether you asked to use boost sources included here])
|
AC_MSG_CHECKING([whether you asked to use boost sources included here])
|
||||||
|
|
Loading…
Reference in a new issue