From d8da8e963c3bc71c777ce132aca3c6d792e699d4 Mon Sep 17 00:00:00 2001 From: Peter Verthez Date: Sun, 29 Dec 2002 16:44:47 +0000 Subject: [PATCH] Updated documentation for the m4 macro. --- doc/usage.html | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/doc/usage.html b/doc/usage.html index 1c59ae9..225470e 100644 --- a/doc/usage.html +++ b/doc/usage.html @@ -661,11 +661,23 @@ There is a macro available for use in configure.in for applications that are using autoconf to configure their sources.  The following macro checks whether the Gedcom parser library is available and whether its version is high enough:
-
AM_LIB_GEDCOM_PARSER([major,[minor,[patch]]])
+
AM_PATH_GEDCOM_PARSER([min_version,[action_if_found,[action_if_not_found,[modules]]]])
All the arguments are optional and default to 0.  E.g. to check for -version 1.34, you would put in configure.in the following statement:
-
AM_LIB_GEDCOM_PARSER(1,34)
+version 1.34.2, you would put in configure.in the following statement:
+
AM_PATH_GEDCOM_PARSER(1.34.2)
+
Note that version numbers now contains three parts (since version +0.20.0: this is also the first version in which this macro is available).
+
+The macro also sets the variables GEDCOM_CFLAGS and GEDCOM_LIBS for use in Makefiles.  Typically, this would be done as follows in a Makefile.am:
+
bin_programs   = myprg
+ myprg_SOURCES  = myprg.c foo.c bar.c
+INCLUDES       = @GEDCOM_CFLAGS@
+LDADD          = @GEDCOM_LIBS@
+If your program uses some extra modules, they can be passed as fourth argument +in the macro, so that the CFLAGS and LIBS are correctly filled in.  Currently, +the only available module is gom (the Gedcom object model).  For example:
+
AM_PATH_GEDCOM_PARSER(0.21.2, , ,gom)
To be able to use this macro in the sources of your application, you have three options:
    @@ -689,10 +701,10 @@ There are three preprocessor symbols defined for version checks in the
- The last one is equal to (GEDCOM_PARSE_VERSION_MAJOR * 1000) + GEDCOM_PARSE_VERSION_MINOR.
+ The last one is equal to (GEDCOM_PARSE_VERSION_MAJOR * 1000) + GEDCOM_PARSE_VERSION_MINOR. As you see, this only checked the major and minor version, not the patch number, so this is obsolete.

Compilation and linking flags

-Similar to other libraries, the GEDCOM parse library installs a script gedcom-config to help with compilation and linking flags.
+Similar to other libraries, the GEDCOM parse library installs a script gedcom-config to help with compilation and linking flags for programs that don't use autoconf/automake.

To get compilation flags for your program, use (depending on whether you only use the callback parser, or also the GEDCOM object model): @@ -722,4 +734,5 @@ gedcom-config --libs gom



+
\ No newline at end of file -- 2.30.2