diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 90 |
1 files changed, 58 insertions, 32 deletions
diff --git a/configure.ac b/configure.ac index 815c040b0..b720be535 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -714,61 +714,87 @@ AC_SUBST(EXT_LIB_PATH) | |||
714 | 714 | ||
715 | # should 'make check' run tests? | 715 | # should 'make check' run tests? |
716 | AC_MSG_CHECKING(whether to run tests) | 716 | AC_MSG_CHECKING(whether to run tests) |
717 | AC_ARG_ENABLE(testruns, | 717 | AC_ARG_ENABLE([testruns], |
718 | [AS_HELP_STRING([--enable-testruns=yes/no], | 718 | [AS_HELP_STRING([--disable-testruns], [disable running tests on make check (default is YES)])], |
719 | [disable running tests on make check (default is YES)])], | 719 | [enable_tests_run=${enableval}], |
720 | [enable_tests_run=$enableval], | 720 | [enable_tests_run=yes]) |
721 | [enable_tests_run="yes"]) | ||
722 | AC_MSG_RESULT($enable_test_run) | 721 | AC_MSG_RESULT($enable_test_run) |
723 | AM_CONDITIONAL([DISABLE_TEST_RUN], [test "x$enable_tests_run" = "xno"]) | 722 | AM_CONDITIONAL([ENABLE_TEST_RUN], [test "x$enable_tests_run" = "xyes"]) |
723 | |||
724 | # should expensive tests be run? | ||
725 | AC_MSG_CHECKING(whether to run expensive tests) | ||
726 | AC_ARG_ENABLE([expensivetests], | ||
727 | [AS_HELP_STRING([--enable-expensive-tests], [enable running expensive testcases])], | ||
728 | [enable_expensive=${enableval}], | ||
729 | [enable_expensive=no]) | ||
730 | AC_MSG_RESULT($enable_expensive) | ||
731 | AM_CONDITIONAL([HAVE_EXPENSIVE_TESTS], [test "x$enable_expensive" = "xyes"]) | ||
732 | |||
733 | # should benchmarks be run? | ||
734 | AC_MSG_CHECKING(whether to run benchmarks during make check) | ||
735 | AC_ARG_ENABLE([benchmarks], | ||
736 | [AS_HELP_STRING([--enable-benchmarks], [enable running benchmarks during make check])], | ||
737 | [enable_benchmarks=${enableval}], | ||
738 | [enable_benchmarks=no]) | ||
739 | AC_MSG_RESULT($enable_benchmarks) | ||
740 | AM_CONDITIONAL([HAVE_BENCHMARKS], [test "x$enable_benchmarks" = "xyes"]) | ||
724 | 741 | ||
725 | # should experimental code be compiled (code that may not yet compile)? | 742 | # should experimental code be compiled (code that may not yet compile)? |
726 | disable_experimental=yes | ||
727 | AC_MSG_CHECKING(whether to compile experimental code) | 743 | AC_MSG_CHECKING(whether to compile experimental code) |
728 | AC_ARG_ENABLE(experimental, | 744 | AC_ARG_ENABLE([experimental], |
729 | [AS_HELP_STRING([--enable-experimental], | 745 | [AS_HELP_STRING([--enable-experimental], [enable compiling experimental code])], |
730 | [enable compiling experimental code])], | 746 | [enable_experimental=${enableval}], |
731 | [enable_experimental=$enableval], | 747 | [enable_experimental=no]) |
732 | [enable_experimental="no"]) | ||
733 | AC_MSG_RESULT($enable_experimental) | 748 | AC_MSG_RESULT($enable_experimental) |
734 | AM_CONDITIONAL([HAVE_EXPERIMENTAL], [test "x$enable_experimental" = "xyes"]) | 749 | AM_CONDITIONAL([HAVE_EXPERIMENTAL], [test "x$enable_experimental" = "xyes"]) |
735 | 750 | ||
736 | # should malicious code be compiled (code used for testing with malicious peers) | 751 | # should malicious code be compiled (code used for testing with malicious peers) |
737 | enable_malicious=0 | ||
738 | AC_MSG_CHECKING(whether to compile malicious code) | 752 | AC_MSG_CHECKING(whether to compile malicious code) |
739 | AC_ARG_ENABLE(malicious, | 753 | AC_ARG_ENABLE([malicious], |
740 | [AS_HELP_STRING([--enable-malicious], | 754 | [AS_HELP_STRING([--enable-malicious], [enable compiling malicious code (only for developers for testing)])], |
741 | [enable compiling malicious code (only for developers for testing)])], | 755 | [enable_malicious=${enableval}], |
742 | [enable_malicious=1], | 756 | [enable_malicious=no]) |
743 | [enable_malicious=0]) | ||
744 | AC_MSG_RESULT($enable_malicious) | 757 | AC_MSG_RESULT($enable_malicious) |
745 | AM_CONDITIONAL([HAVE_MALICIOUS], [test "x$enable_malicious" = "x1"]) | 758 | AM_CONDITIONAL([HAVE_MALICIOUS], [test "x$enable_malicious" = "xyes"]) |
746 | AC_DEFINE_UNQUOTED([HAVE_MALICIOUS], $enable_malicious, [Compile malicious code]) | 759 | if test "$enable_malicious" = "yes" |
760 | then | ||
761 | AC_DEFINE([HAVE_MALICIOUS],[1],[include malicious code]) | ||
762 | else | ||
763 | AC_DEFINE([HAVE_MALICIOUS],[0],[disable malicious code]) | ||
764 | fi | ||
747 | 765 | ||
748 | # should code be enabled that works around missing OS functionality on Windows? | 766 | # should code be enabled that works around missing OS functionality on Windows? |
749 | # used for test cases | 767 | # used for test cases |
750 | AC_ARG_ENABLE(windows_workarounds, [AS_HELP_STRING([--enable-windows_workarounds], | ||
751 | [enable workarounds used on Windows (only useful for test cases)])]) | ||
752 | if test $build_target = "mingw" | 768 | if test $build_target = "mingw" |
753 | then | 769 | then |
754 | workarounds=1 | 770 | workarounds=1 |
755 | else | 771 | else |
756 | if test x$enable_windows_workarounds = "xyes" | 772 | AC_MSG_CHECKING(whether to enable windows workarounds) |
757 | then | 773 | AC_ARG_ENABLE([windows_workarounds], |
758 | workarounds=1 | 774 | [AS_HELP_STRING([--enable-windows_workarounds], [enable workarounds used on Windows (only useful for test cases)])], |
759 | else | 775 | [enable_workarounds=${enableval}], |
760 | workarounds=0 | 776 | [enable_workarounds=no]) |
761 | fi | 777 | AC_MSG_RESULT($enable_workarounds) |
778 | if test x$enable_windows_workarounds = "xyes" | ||
779 | then | ||
780 | workarounds=1 | ||
781 | else | ||
782 | workarounds=0 | ||
783 | fi | ||
762 | fi | 784 | fi |
763 | AC_DEFINE_UNQUOTED([ENABLE_WINDOWS_WORKAROUNDS], $workarounds, [enable workarounds used on Windows (only useful for test cases)]) | 785 | AC_DEFINE_UNQUOTED([ENABLE_WINDOWS_WORKAROUNDS], $workarounds, [enable workarounds used on Windows (only useful for test cases)]) |
764 | 786 | ||
765 | # gcov compilation | 787 | # gcov compilation |
766 | use_gcov=no | 788 | AC_MSG_CHECKING(whether to compile with support for code coverage analysis) |
767 | AC_ARG_ENABLE([coverage], AS_HELP_STRING([--enable-coverage], | 789 | AC_ARG_ENABLE([coverage], |
768 | [Compile the library with code coverage support (default is NO)]), | 790 | AS_HELP_STRING([--enable-coverage], |
769 | [use_gcov=yes], [use_gcov=no]) | 791 | [compile the library with code coverage support]), |
792 | [use_gcov=${enableval}], | ||
793 | [use_gcov=no]) | ||
794 | AC_MSG_RESULT($use_gcov) | ||
770 | AM_CONDITIONAL([USE_COVERAGE], [test "x$use_gcov" = "xyes"]) | 795 | AM_CONDITIONAL([USE_COVERAGE], [test "x$use_gcov" = "xyes"]) |
771 | 796 | ||
797 | |||
772 | AC_CONFIG_FILES([ | 798 | AC_CONFIG_FILES([ |
773 | Makefile | 799 | Makefile |
774 | contrib/Makefile | 800 | contrib/Makefile |