ACLOCAL_AMFLAGS = -I autostuff
-SUBDIRS = contrib tests
+SUBDIRS = . contrib tests
lib_LTLIBRARIES = libsigrokdecode.la
AM_CONDITIONAL(HAVE_CHECK, test x"$have_check" = "xyes")
PKG_CHECK_MODULES([libsigrok], [libsigrok >= 0.2.0],
- [have_libsigrok="yes"; CFLAGS="$CFLAGS $libsigrok_CFLAGS";
- LIBS="$LIBS $libsigrok_LIBS"], [have_libsigrok="no"])
+ [have_libsigrok="yes";
+ LIBSIGROK_CFLAGS="$libsigrok_CFLAGS";
+ LIBSIGROK_LIBS="$libsigrok_LIBS"],
+ [have_libsigrok="no"])
AM_CONDITIONAL(HAVE_LIBSIGROK, test x"$have_libsigrok" = "xyes")
+AC_SUBST([LIBSIGROK_CFLAGS])
+AC_SUBST([LIBSIGROK_LIBS])
# Checks for header files.
# These are already checked: inttypes.h stdint.h stdlib.h string.h unistd.h.
if HAVE_LIBSIGROK
bin_PROGRAMS = runtc
runtc_SOURCES = runtc.c
-runtc_CPPFLAGS = $(CPPFLAGS_PYTHON)
-runtc_LDFLAGS = -L/home/bert/sr/lib -lsigrok -lsigrokdecode
+runtc_CPPFLAGS = $(CPPFLAGS_PYTHON) $(LIBSIGROK_CFLAGS)
+runtc_LDFLAGS = $(LIBSIGROK_LIBS) -L$(top_builddir) -lsigrokdecode
endif