diff options
author | Kirill Simonov <xi@resolvent.net> | 2006-05-20 22:43:15 +0000 |
---|---|---|
committer | Kirill Simonov <xi@resolvent.net> | 2006-05-20 22:43:15 +0000 |
commit | cec6fc98ebecc208edc30a900e6ab195e7c21851 (patch) | |
tree | 5d1010377ff93a7c476f89fcaa8847d83eb4d8ab /src | |
parent | 9e05b78ca5d1e05a5665da4d503eaad56eb49cb1 (diff) | |
download | libyaml-git-cec6fc98ebecc208edc30a900e6ab195e7c21851.tar.gz |
Add the basic autoconf infrastructure.
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 4 | ||||
-rw-r--r-- | src/version.c | 29 |
2 files changed, 33 insertions, 0 deletions
diff --git a/src/Makefile.am b/src/Makefile.am new file mode 100644 index 0000000..963962e --- /dev/null +++ b/src/Makefile.am @@ -0,0 +1,4 @@ +AM_CPPFLAGS = -I$(top_srcdir)/include +lib_LTLIBRARIES = libyaml.la +libyaml_la_SOURCES = version.c +libyaml_la_LDFLAGS = -release $(YAML_LT_RELEASE) -version-info $(YAML_LT_CURRENT):$(YAML_LT_REVISION):$(YAML_LT_AGE) diff --git a/src/version.c b/src/version.c new file mode 100644 index 0000000..3f8938d --- /dev/null +++ b/src/version.c @@ -0,0 +1,29 @@ + +#if HAVE_CONFIG_H +#include <config.h> +#endif + +#include <yaml/yaml.h> + +const char * +yaml_get_version_string(void) +{ + return YAML_VERSION_STRING; +} + +void +yaml_get_version(int *major, int *minor, int *patch) +{ + *major = YAML_VERSION_MAJOR; + *minor = YAML_VERSION_MINOR; + *patch = YAML_VERSION_PATCH; +} + +int +yaml_check_version(int major, int minor, int patch) +{ + return (major == YAML_VERSION_MAJOR + && minor == YAML_VERSION_MINOR + && patch >= YAML_VERSION_PATCH); +} + |