From: Morgan Deters Date: Fri, 18 Jun 2010 23:09:29 +0000 (+0000) Subject: "statistics" and "staticbinary" are now tags on the build (so you get build directori... X-Git-Tag: cvc5-1.0.0~8979 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=498bb02fc7d2539d41b778bc42e383ca8dbf6d9e;p=cvc5.git "statistics" and "staticbinary" are now tags on the build (so you get build directories like builds/x86_64-unknown-linux-gnu/debug-staticbinary-nostatistics .. etc. This is useful to distinguish static binary builds and statistics builds from each other when you configure multiple times in the same source directory --- diff --git a/config/build-type b/config/build-type index 5c48f8fef..15214bcf0 100755 --- a/config/build-type +++ b/config/build-type @@ -20,6 +20,7 @@ # # The overrides are as follows: # +# staticbinary # optimized # debugsymbols # assertions @@ -46,7 +47,7 @@ while [ $# -gt 0 ]; do done build_type_suffix= -for arg in optimized debugsymbols assertions tracing muzzle coverage profiling; do +for arg in staticbinary optimized debugsymbols statistics assertions tracing muzzle coverage profiling; do if eval [ -n '"${'$arg'+set}"' ]; then if eval [ '"${'$arg'}"' -eq 0 ]; then build_type_suffix=$build_type_suffix-no$arg diff --git a/config/cvc4.m4 b/config/cvc4.m4 index 8106f1383..90f4ca093 100644 --- a/config/cvc4.m4 +++ b/config/cvc4.m4 @@ -22,7 +22,7 @@ do ac_option_build=`expr "$ac_option" : '\([[^-]]*\)-\?'` ac_cvc4_build_profile_set=yes AC_MSG_NOTICE([CVC4: building profile $ac_option_build]) - for x in optimized assertions tracing muzzle coverage profiling; do + for x in optimized statistics assertions tracing muzzle coverage profiling; do if expr "$ac_option" : '.*-no'$x'-\|.*-no'$x'$' >/dev/null; then eval 'ac_cvc4_rewritten_args="${ac_cvc4_rewritten_args+$ac_cvc4_rewritten_args }\"--disable-$x\""' fi @@ -30,6 +30,12 @@ do eval 'ac_cvc4_rewritten_args="${ac_cvc4_rewritten_args+$ac_cvc4_rewritten_args }\"--enable-$x\""' fi done + if expr "$ac_option" : '.*-nostaticbinary-\|.*-nostaticbinary$' >/dev/null; then + eval 'ac_cvc4_rewritten_args="${ac_cvc4_rewritten_args+$ac_cvc4_rewritten_args }\"--disable-static-binary\""' + fi + if expr "$ac_option" : '.*-staticbinary-\|.*-staticbinary$' >/dev/null; then + eval 'ac_cvc4_rewritten_args="${ac_cvc4_rewritten_args+$ac_cvc4_rewritten_args }\"--enable-static-binary\""' + fi if expr "$ac_option" : '.*-nodebugsymbols-\|.*-nodebugsymbols$' >/dev/null; then eval 'ac_cvc4_rewritten_args="${ac_cvc4_rewritten_args+$ac_cvc4_rewritten_args }\"--disable-debug-symbols\""' fi diff --git a/configure.ac b/configure.ac index 28a5cca7a..005718287 100644 --- a/configure.ac +++ b/configure.ac @@ -62,6 +62,10 @@ AC_CANONICAL_BUILD AC_CANONICAL_HOST AC_CANONICAL_TARGET +if test "$enable_shared" = no -a "$enable_static" = yes; then + enable_static_binary=yes +fi + # Features requested by the user AC_MSG_CHECKING([for requested build profile]) AC_ARG_WITH([build], @@ -84,6 +88,13 @@ if test -n "${enable_optimized+set}"; then btargs="$btargs nooptimized" fi fi +if test -n "${enable_static_binary+set}"; then + if test "$enable_static_binary" = yes; then + btargs="$btargs staticbinary" + else + btargs="$btargs nostaticbinary" + fi +fi if test -n "${enable_debug_symbols+set}"; then if test "$enable_debug_symbols" = yes; then btargs="$btargs debugsymbols" @@ -219,9 +230,9 @@ case "$with_build" in FLAG_VISIBILITY_HIDDEN= if test -z "${enable_optimized+set}" ; then enable_optimized=no ; fi if test -z "${enable_debug_symbols+set}"; then enable_debug_symbols=yes ; fi + if test -z "${enable_statistics+set}" ; then enable_statistics=yes ; fi if test -z "${enable_assertions+set}" ; then enable_assertions=yes ; fi if test -z "${enable_tracing+set}" ; then enable_tracing=yes ; fi - if test -z "${enable_statistics+set}" ; then enable_statistics=yes ; fi if test -z "${enable_muzzle+set}" ; then enable_muzzle=no ; fi ;; default) # moderately optimized, assertions, tracing @@ -233,8 +244,8 @@ case "$with_build" in if test -z "${OPTLEVEL+set}" ; then OPTLEVEL=2 ; fi if test -z "${enable_optimized+set}" ; then enable_optimized=yes ; fi if test -z "${enable_debug_symbols+set}"; then enable_debug_symbols=yes ; fi - if test -z "${enable_assertions+set}" ; then enable_assertions=yes ; fi if test -z "${enable_statistics+set}" ; then enable_statistics=yes ; fi + if test -z "${enable_assertions+set}" ; then enable_assertions=yes ; fi if test -z "${enable_tracing+set}" ; then enable_tracing=yes ; fi if test -z "${enable_muzzle+set}" ; then enable_muzzle=no ; fi ;; @@ -247,8 +258,8 @@ case "$with_build" in if test -z "${OPTLEVEL+set}" ; then OPTLEVEL=9 ; fi if test -z "${enable_optimized+set}" ; then enable_optimized=yes ; fi if test -z "${enable_debug_symbols+set}"; then enable_debug_symbols=no ; fi - if test -z "${enable_assertions+set}" ; then enable_assertions=no ; fi if test -z "${enable_statistics+set}" ; then enable_statistics=no ; fi + if test -z "${enable_assertions+set}" ; then enable_assertions=no ; fi if test -z "${enable_tracing+set}" ; then enable_tracing=no ; fi if test -z "${enable_muzzle+set}" ; then enable_muzzle=yes ; fi ;; @@ -625,17 +636,17 @@ Build profile: $with_build Build ID : $build_type Optimized : $optimized Debug symbols: $enable_debug_symbols +Statistics : $enable_statistics Assertions : $enable_assertions Tracing : $enable_tracing Muzzle : $enable_muzzle gcov support : $enable_coverage gprof support: $enable_profiling -unit tests : $support_unit_tests -statistics : $enable_statistics +Unit tests : $support_unit_tests -static libs : $enable_static -shared libs : $enable_shared -static binary: $enable_static_binary +Static libs : $enable_static +Shared libs : $enable_shared +Static binary: $enable_static_binary CPPFLAGS : $CPPFLAGS CXXFLAGS : $CXXFLAGS