Commit 0360a17f authored by Sylvain Berfini's avatar Sylvain Berfini 🎩

Fixed autotools build

parent e503a668
......@@ -25,6 +25,24 @@ if test "$xxd_found" != yes ;then
AC_MSG_ERROR("xxd is required (provided by vim package)")
fi
dnl ##################################################
dnl # Check for BcToolbox
dnl ##################################################
dnl check bctoolbox
PKG_CHECK_MODULES(BCTOOLBOX_TESTER, [libbctoolbox-tester],[libbctoolbox_tester_found=yes],foo=bar)
if test "$libbctoolbox_tester_found" != "yes" ; then
dnl Check the lib presence in case the PKG-CONFIG version is not found
AC_LANG_CPLUSPLUS
AC_CHECK_LIB(bctoolbox-tester, main, [BCTOOLBOX_TESTER_LIBS+=" -lbctoolbox-tester"; libbctoolbox_tester_found=yes], [foo=bar])
AC_LANG_C
fi
if test "$libbctoolbox_tester_found" != "yes" ; then
AC_MSG_ERROR([libbctoolbox tester not found. Install it and try again])
fi
AC_SUBST(BCTOOLBOX_TESTER_LIBS)
dnl ##################################################
dnl # Check for Belr
dnl ##################################################
......@@ -93,6 +111,7 @@ AC_CONFIG_FILES(
Makefile
src/Makefile
tester/Makefile
tools/Makefile
include/Makefile
include/belcard/Makefile
)
......
......@@ -3,7 +3,7 @@ EXTRA_DIST=vcards/vcard.vcf vcards/unfoldtest.vcf vcards/foldtest.vcf
if BUILD_TESTS
noinst_PROGRAMS=belcard-tester
belcard_tester_SOURCES=belcard-tester.cpp belcard-tester.hpp common/bc_tester_utils.c common/bc_tester_utils.h \
belcard_tester_SOURCES=belcard-tester.cpp belcard-tester.hpp \
belcard-general-tester.cpp \
belcard-identification-tester.cpp \
belcard-addressing-tester.cpp \
......@@ -15,15 +15,15 @@ belcard_tester_SOURCES=belcard-tester.cpp belcard-tester.hpp common/bc_tester_ut
belcard-calendar-tester.cpp \
belcard-rfc6474-tester.cpp \
belcard-vcard-tester.cpp
belcard_tester_LDADD=$(top_builddir)/src/libbelcard.la -lbelr $(CUNIT_LIBS)
belcard_tester_LDADD=$(top_builddir)/src/libbelcard.la -lbelr $(CUNIT_LIBS) ${BCTOOLBOX_TESTER_LIBS}
belcard_tester_CFLAGS=\
-DBC_CONFIG_FILE=\"config.h\" \
$(CUNIT_CFLAGS)
belcard_tester_AM_CPPFLAGS=-I$(top_srcdir)/include \
-I$(top_srcdir)/tester \
-I$(top_srcdir)/tester/common
-I$(top_srcdir)/tester \
-I$(top_srcdir)/tester/common
endif # BUILD_TESTS
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment