Provide a version number in the installed header gedcom.h.
authorPeter Verthez <Peter.Verthez@advalvas.be>
Sat, 19 Jan 2002 15:50:09 +0000 (15:50 +0000)
committerPeter Verthez <Peter.Verthez@advalvas.be>
Sat, 19 Jan 2002 15:50:09 +0000 (15:50 +0000)
ChangeLog
configure.in
include/Makefile.am
include/gedcom.h.in [moved from include/gedcom.h with 98% similarity]

index 112529d53ddc514f22612c39e04b20df2c2fd741..81bf30cc7c0b731c68a93c7b7b7100e85fed67c9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2002-01-19  Peter Verthez  <Peter.Verthez@advalvas.be>
+
+       * 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  <Peter.Verthez@advalvas.be>
 
        * gedcom/xref.c: Make sure that the 'string' member of an xref always
index 3a111a2d6061e476e587f49af3621c7b186800c0..26c9d32c458f7e96659c60e9f31438f66ade9b88 100644 (file)
@@ -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)
index c0698405dd4634dc320e44dac50c5545d8b19248..5b9bb0a3a05baac55f95a34a9d93fca2bfbb6bf0 100644 (file)
@@ -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" $< > $@
 
similarity index 98%
rename from include/gedcom.h
rename to include/gedcom.h.in
index 2b962dae797ec2e452c7f63bf87530452320611f..598a333213725e7a20532285163510dec19b5b7e 100644 (file)
@@ -32,6 +32,11 @@ __BEGIN_DECLS
 #include <gedcom-tags.h>
 #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                  ***/
 /**************************************************************************/