From 23c6ce7cb04b92cf802aa54f362accf60c753477 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20W=C3=A4ckerlin?= Date: Sun, 15 Mar 2015 19:29:46 +0000 Subject: [PATCH] linking needs crypto --- ax_init_standard_project.m4 | 35 ++++++++++++++++++++++------------- src/libpcscxx.pc.in | 2 +- 2 files changed, 23 insertions(+), 14 deletions(-) diff --git a/ax_init_standard_project.m4 b/ax_init_standard_project.m4 index b718099..ef39f2d 100644 --- a/ax_init_standard_project.m4 +++ b/ax_init_standard_project.m4 @@ -50,31 +50,40 @@ AC_DEFUN([AX_ADD_MAKEFILE_TARGET_DEP], [ fi ]) +AC_DEFUN([AX_SUBST], [ + AC_SUBST([$1]) + tmp_var="${$1//$'\n'/\n}" + AM_CPPFLAGS+=' -D$1='"'${tmp_var//#/\\#}'" + AC_SUBST(AM_CPPFLAGS) +]) + AC_DEFUN([AX_INIT_STANDARD_PROJECT], [ - AC_SUBST(HOME) + AM_CPPFLAGS+=" '-DMAKE_STRING(X)=\#X'" + AX_SUBST(NUMBERS) + AX_SUBST(HOME) README=$(tail -n +3 README) + AX_SUBST(README) + _AM_SUBST_NOTMAKE([README]) DESCRIPTION=$(head -1 README) + AX_SUBST(DESCRIPTION) + _AM_SUBST_NOTMAKE([DESCRIPTION]) AUTHOR=$(head -1 AUTHORS) - AC_SUBST(AUTHOR) + AX_SUBST(AUTHOR) _AM_SUBST_NOTMAKE([AUTHOR]) - AC_SUBST(DESCRIPTION) - _AM_SUBST_NOTMAKE([DESCRIPTION]) - AC_SUBST(README) - _AM_SUBST_NOTMAKE([README]) DISTRO=$(lsb_release -sc) - AC_SUBST(DISTRO) + AX_SUBST(DISTRO) BUILD_NUMBER=${BUILD_NUMBER:-1} - AC_SUBST(BUILD_NUMBER) + AX_SUBST(BUILD_NUMBER) BUILD_DATE=$(date -R) - AC_SUBST(BUILD_DATE) + AX_SUBST(BUILD_DATE) if test -f "${PROJECT_NAME}-logo.png"; then PROJECT_LOGO="${PROJECT_NAME}-logo.png" fi - AC_SUBST(PROJECT_LOGO) + AX_SUBST(PROJECT_LOGO) if test -f "${PROJECT_NAME}-icon.png"; then PROJECT_ICON="${PROJECT_NAME}-icon.png" fi - AC_SUBST(PROJECT_ICON) + AX_SUBST(PROJECT_ICON) AC_CONFIG_FILES([makefile]) AX_ADD_MAKEFILE_TARGET_DEP([clean-am], [clean-standard-project-targets], [makefile.in]) AX_ADD_MAKEFILE_TARGET_DEP([distclean-am], [distclean-standard-project-targets], [makefile.in]) @@ -104,8 +113,8 @@ AC_DEFUN([AX_USE_CXX], [ AC_CONFIG_FILES([src/makefile]) - AM_CPPFLAGS='-I ${top_srcdir}/src -I ${top_builddir}/src -I ${srcdir} -I ${builddir}' - AM_LDFLAGS='-L ${top_srcdir}/src -L ${top_builddir}/src' + AM_CPPFLAGS+=' -I ${top_srcdir}/src -I ${top_builddir}/src -I ${srcdir} -I ${builddir}' + AM_LDFLAGS+=' -L ${top_srcdir}/src -L ${top_builddir}/src' # Get rid of that stupid -O2 -g opions! CXXFLAGS="${CXXFLAGS:-}" diff --git a/src/libpcscxx.pc.in b/src/libpcscxx.pc.in index 2f5848c..101ba0d 100644 --- a/src/libpcscxx.pc.in +++ b/src/libpcscxx.pc.in @@ -6,6 +6,6 @@ includedir=${prefix}/include Name: @PACKAGE_NAME@ Description: C++ wrappers around pcsc-lite, cryptoki, openssh Version: @VERSION@ -Libs: -L${libdir} -lpcscxx @LDFLAGS@ +Libs: -L${libdir} -lpcscxx -lcrypto @LDFLAGS@ Libs.private: Cflags: -I${includedir} @CPPFLAGS@