From ab7a95f78b26b3e4b0850357bdf021293b2b09db Mon Sep 17 00:00:00 2001 From: Peter Verthez Date: Sat, 19 Jan 2002 15:50:09 +0000 Subject: [PATCH] Provide a version number in the installed header gedcom.h. --- ChangeLog | 8 ++++++++ configure.in | 16 +++++++++++++--- include/Makefile.am | 6 ++++-- include/{gedcom.h => gedcom.h.in} | 5 +++++ 4 files changed, 30 insertions(+), 5 deletions(-) rename include/{gedcom.h => gedcom.h.in} (98%) diff --git a/ChangeLog b/ChangeLog index 112529d..81bf30c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2002-01-19 Peter Verthez + + * gedcom.h: Renamed to gedcom.h.in: at configure, the VERSION + variables are substituted and the file gedcom.h is written + + * utf8-locale.c: Added parameter to conversion from UTF-8 to locale, + to return number of conversion failures. + 2002-01-16 Peter Verthez * gedcom/xref.c: Make sure that the 'string' member of an xref always diff --git a/configure.in b/configure.in index 3a111a2..26c9d32 100644 --- a/configure.in +++ b/configure.in @@ -6,13 +6,22 @@ AC_INIT(standalone.c) dnl ============================================================= dnl Global variables NAME=gedcom-parse +AC_SUBST(NAME) + VERSION=0.13 +VERSION_MAJOR=`echo $VERSION | sed 's/\..*$//'` +changequote(<<,>>) +VERSION_MINOR=`echo $VERSION | sed 's/^[^\.]*\.//'` +changequote([,]) +AC_SUBST(VERSION_MAJOR) +AC_SUBST(VERSION_MINOR) +AC_SUBST(VERSION) + LIBVERSION=0:3 +AC_SUBST(LIBVERSION) + SHELL=/bin/sh -AC_SUBST(NAME) -AC_SUBST(VERSION) AC_SUBST(SHELL) -AC_SUBST(LIBVERSION) dnl ============================================================= AM_INIT_AUTOMAKE(${NAME},${VERSION}) @@ -40,5 +49,6 @@ AC_OUTPUT(Makefile doc/Makefile doc/images/Makefile include/Makefile + include/gedcom.h intl/Makefile po/Makefile.in) diff --git a/include/Makefile.am b/include/Makefile.am index c069840..5b9bb0a 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -3,8 +3,10 @@ # $Name$ include_HEADERS = gedcom.h \ gedcom-tags.h -BUILT_SOURCES = gedcom-tags.h +BUILT_SOURCES = gedcom.h \ + gedcom-tags.h +EXTRA_DIST = gedcom.h.in gedcom-tags.h: $(srcdir)/../gedcom/gedcom.tab.h - grep "TAG_\|USERTAG" $(srcdir)/../gedcom/gedcom.tab.h > gedcom-tags.h + grep "TAG_\|USERTAG" $< > $@ diff --git a/include/gedcom.h b/include/gedcom.h.in similarity index 98% rename from include/gedcom.h rename to include/gedcom.h.in index 2b962da..598a333 100644 --- a/include/gedcom.h +++ b/include/gedcom.h.in @@ -32,6 +32,11 @@ __BEGIN_DECLS #include #endif +#define GEDCOM_PARSE_VERSION_MAJOR @VERSION_MAJOR@ +#define GEDCOM_PARSE_VERSION_MINOR @VERSION_MINOR@ +#define GEDCOM_PARSE_VERSION \ + (GEDCOM_PARSE_VERSION_MAJOR * 1000 + GEDCOM_PARSE_VERSION_MINOR) + /**************************************************************************/ /*** First the records and elements to subscribe upon ***/ /**************************************************************************/ -- 2.30.2