diff options
author | Mike Beattie <mike@ethernal.org> | 2012-07-31 20:04:34 +1200 |
---|---|---|
committer | Mike Beattie <mike@ethernal.org> | 2012-07-31 20:04:34 +1200 |
commit | fb79f8fb358f8df25674336cd558fc3998cb7d9e (patch) | |
tree | 5766e0f32e5524020dd8abbe4f359e3f9da305a9 | |
parent | 59588ba34159b27c02e1a886b46497ecfa0cf4d3 (diff) |
Don't build ao-stmload if stlink is not available.
Signed-off-by: Mike Beattie <mike@ethernal.org>
-rw-r--r-- | ao-tools/ao-stmload/Makefile.am | 4 | ||||
-rw-r--r-- | configure.ac | 4 |
2 files changed, 7 insertions, 1 deletions
diff --git a/ao-tools/ao-stmload/Makefile.am b/ao-tools/ao-stmload/Makefile.am index 375896ea..5aea7db4 100644 --- a/ao-tools/ao-stmload/Makefile.am +++ b/ao-tools/ao-stmload/Makefile.am @@ -1,3 +1,5 @@ +if LIBSTLINK + bin_PROGRAMS=ao-stmload LIBSTLINKDIR=/local/src/stlink @@ -9,3 +11,5 @@ ao_stmload_LDADD=$(LIBSTLINK_LIBS) $(LIBUSB_LIBS) -lelf ao_stmload_SOURCES=ao-stmload.c man_MANS = ao-stmload.1 + +endif diff --git a/configure.ac b/configure.ac index c59261af..a54ef626 100644 --- a/configure.ac +++ b/configure.ac @@ -139,7 +139,9 @@ PKG_CHECK_MODULES([LIBUSB], [libusb-1.0]) AC_CHECK_HEADERS(libelf.h libelf/libelf.h, [break]) AC_CHECK_HEADERS(gelf.h libelf/gelf.h, [break]) -PKG_CHECK_MODULES([LIBSTLINK], [stlink]) +PKG_CHECK_MODULES([LIBSTLINK], [stlink], [HAVE_STLINK=yes], [HAVE_STLINK=no]) + +AM_CONDITIONAL([LIBSTLINK], [test x$HAVE_STLINK != xno]) AC_OUTPUT([ Makefile |