diff options
author | Anthony G. Basile <basile@opensource.dyc.edu> | 2011-04-15 08:27:14 -0400 |
---|---|---|
committer | Anthony G. Basile <basile@opensource.dyc.edu> | 2011-04-15 08:27:14 -0400 |
commit | d8125f89a34121be3dfd800b45b0a33160756036 (patch) | |
tree | f1223e324c88b00fabea2c8d63a8a1fc8f1c12bb | |
parent | Added man page. (diff) | |
download | elfix-d8125f89a34121be3dfd800b45b0a33160756036.tar.gz elfix-d8125f89a34121be3dfd800b45b0a33160756036.tar.bz2 elfix-d8125f89a34121be3dfd800b45b0a33160756036.zip |
Added contitional for 'tests'
-rw-r--r-- | Makefile.am | 4 | ||||
-rw-r--r-- | configure.ac | 19 |
2 files changed, 21 insertions, 2 deletions
diff --git a/Makefile.am b/Makefile.am index 4f7b5cb..afff66d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1 +1,5 @@ +if TEST SUBDIRS = src doc tests +else +SUBDIRS = src doc +endif diff --git a/configure.ac b/configure.ac index 056fadc..dd6e6dd 100644 --- a/configure.ac +++ b/configure.ac @@ -9,8 +9,23 @@ AM_INIT_AUTOMAKE([1.11 foreign]) # Checks for programs. AC_PROG_CC -AC_CHECK_PROG([has_yasm],[yasm],["yes"],["no"]) -AS_IF([test "x$has_yasm" = "xno"],AC_MSG_ERROR(["Missing yasm assembler"])) +AC_ARG_ENABLE( + [tests], + AS_HELP_STRING( + [--enable-tests], + [enable tests] + ), + [ + AS_IF( + [test "x$enable_tests" = "xyes"], + [ + AC_CHECK_PROG([has_yasm],[yasm],["yes"],["no"]) + AS_IF([test "x$has_yasm" = "xno"],AC_MSG_ERROR(["Missing yasm assembler"])) + ] + ) + ] +) +AM_CONDITIONAL([TEST],[test "x$has_yasm" = "xyes"]) # Checks for libraries. AC_CHECK_LIB([elf], [elf_begin]) |