From 50a6ac65c864212c3132fc27d6ceb794b8de296e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20W=C3=A4ckerlin?= Date: Fri, 8 May 2015 23:12:28 +0000 Subject: [PATCH] build system fixed --- ChangeLog | 27 +++++++++++++++++++++++++++ ax_init_standard_project.m4 | 27 +++++++++++++++++++++++---- bootstrap.sh | 2 +- configure.ac | 2 +- 4 files changed, 52 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index af76bd7..a32784a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,30 @@ +2015-05-07 14:37 marc + + * ax_check_qt.m4, ax_init_standard_project.m4, bootstrap.sh, + src/version.hxx: fixed mac issues + +2015-05-05 20:32 marc + + * debian/control.in: dependencies imprved + +2015-05-04 09:30 marc + + * ax_init_standard_project.m4, configure.ac: much more flexible and + stable package dependency checks + +2015-05-04 06:56 marc + + * src/cert2text.cxx: forgoten to add new file + +2015-04-30 14:28 marc + + * ChangeLog, configure.ac, src/makefile.am: new tool cert2text to + show certificates + +2015-03-24 08:02 marc + + * ax_init_standard_project.m4: add test maintainr-clean + 2015-03-15 20:08 marc * src/libpcscxx.pc.in: linking needs crypto ssl and pcsclite diff --git a/ax_init_standard_project.m4 b/ax_init_standard_project.m4 index 8dcfb24..9dc367f 100644 --- a/ax_init_standard_project.m4 +++ b/ax_init_standard_project.m4 @@ -5,7 +5,22 @@ # define least version number from subversion's revision number: # it is taken modulo 256 due to a bug on Apple's MacOSX -m4_define(x_version, m4_esyscmd_s( +m4_define(x_least, m4_esyscmd_s( + SVN_REVISION="ERROR-UNDEFINED-REVISION-to-be-built-in-subdirectory-of-svn-checkout" + for path in . .. ../..; do + if svn info $path 2>&1 > /dev/null; then + SVN_REVISION=$(LANG= svn info $path | sed -n 's/Last Changed Rev: //p') + (cd $path && svn2cl) + break; + fi + done + # Mac does not support LEAST > 255 + echo $ECHO_N $(($SVN_REVISION%256)) +)) +# define version number from subversion's revision number: +# it is taken modulo 256 due to a bug on Apple's MacOSX +# add to x_minor if revision number is > 256 +m4_define(x_minor_fixed, m4_esyscmd_s( SVN_REVISION="ERROR-UNDEFINED-REVISION-to-be-built-in-subdirectory-of-svn-checkout" for path in . .. ../..; do if svn info $path 2>&1 > /dev/null; then @@ -15,7 +30,11 @@ m4_define(x_version, m4_esyscmd_s( fi done # Mac does not support LEAST > 255 - echo $ECHO_N x_major.$((x_minor+$SVN_REVISION/256)).$(($SVN_REVISION%256)) + echo $ECHO_N $((x_minor+$SVN_REVISION/256)) +)) +# setup version number +m4_define(x_version, m4_esyscmd_s( + echo $ECHO_N x_major.x_minor_fixed.x_least )) ## bugreport mail address is taken from in first line of AUTHORS @@ -81,7 +100,7 @@ AC_DEFUN([AX_SUBST], [ # m4_define(x_major, MAJOR_NUMBER) # project's major version # m4_define(x_minor, MINOR_NUMBER) # project's minor version # m4_include(ax_init_standard_project.m4) -# AC_INIT(x_package_name, x_major.x_minor.x_least, x_bugreport, x_package_name) +# AC_INIT(x_package_name, x_version, x_bugreport, x_package_name) # AM_INIT_AUTOMAKE([1.9 tar-pax]) # AX_INIT_STANDARD_PROJECT # @@ -225,7 +244,7 @@ AC_DEFUN([AX_USE_LIBTOOL], [ # libtool versioning LIB_MAJOR=m4_eval(x_major+x_minor) LIB_MINOR=x_least - LIB_LEAST=x_minor + LIB_LEAST=x_minor_fixed LIB_VERSION="${LIB_MAJOR}:${LIB_MINOR}:${LIB_LEAST}" AM_LDFLAGS="-version-info ${LIB_VERSION}" AC_SUBST(AM_LDFLAGS) diff --git a/bootstrap.sh b/bootstrap.sh index 7862656..a9b4c8f 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -354,7 +354,7 @@ ${HEADER}m4_define(x_package_name, ${DEFAULT_PROJECT_NAME}) # project's name m4_define(x_major, 0) # project's major version m4_define(x_minor, 0) # project's minor version m4_include(ax_init_standard_project.m4) -AC_INIT(x_package_name, x_major.x_minor.x_least, x_bugreport, x_package_name) +AC_INIT(x_package_name, x_version, x_package_name) AM_INIT_AUTOMAKE([1.9 tar-pax]) AX_INIT_STANDARD_PROJECT diff --git a/configure.ac b/configure.ac index 8994caf..2be7382 100644 --- a/configure.ac +++ b/configure.ac @@ -4,7 +4,7 @@ m4_define(x_package_name, libpcscxx) m4_define(x_major, 3) m4_define(x_minor, 1) m4_include(ax_init_standard_project.m4) -AC_INIT(x_package_name, x_major.x_minor.x_least, x_bugreport, x_package_name) +AC_INIT(x_package_name, x_version, x_bugreport, x_package_name) AM_INIT_AUTOMAKE([1.9 tar-pax]) AX_INIT_STANDARD_PROJECT