"make example" builds example.c if libgcrypt present

using AM_PATH_LIBGCRYPT to check for libgcrypt

removed AC_MSG_RESULT in configure.ac; added phony "example" target in Makefile.am if libcrypt not found
This commit is contained in:
Geremia
2016-02-27 23:56:29 -07:00
parent d2dde7a9ed
commit d0a9367017
3 changed files with 27 additions and 1 deletions

View File

@@ -51,4 +51,18 @@ PKG_CHECK_MODULES([libbase58],[libbase58])
AC_CHECK_LIB([ws2_32], [strchr])
#libgcrypt necessary to build example.c with "make example"
#check for libgcrypt:
m4_ifdef([AM_PATH_LIBGCRYPT], [
AM_PATH_LIBGCRYPT([],
[
[can_compile_example=yes]
],[
[compile_example=no]
])
],[
m4_warn([syntax], [AM_PATH_LIBGCRYPT missing; CLI tool will not be available])
])
AM_CONDITIONAL([CAN_COMPILE_EXAMPLE], [test x$can_compile_example = xyes])
AC_OUTPUT