summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2009-04-22 03:05:40 +0200
committerBruno Haible <bruno@clisp.org>2009-04-22 03:05:40 +0200
commit7550f78f9b88f77309b1a233df6ef1f0e94f3035 (patch)
treed487c2e6e81da2a12e38e79071c39226c7e32b21 /lib
parent2ac3b7e93348881b383d0871ce2822031ba9d78b (diff)
downloadlibunistring-7550f78f9b88f77309b1a233df6ef1f0e94f3035.tar.gz
Add version metainformation.
Diffstat (limited to 'lib')
-rw-r--r--lib/Makefile.am9
-rw-r--r--lib/unistring/version.in.h39
-rw-r--r--lib/version.c23
3 files changed, 70 insertions, 1 deletions
diff --git a/lib/Makefile.am b/lib/Makefile.am
index b06cf76..19b7562 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -49,6 +49,9 @@ AM_CPPFLAGS = -DIN_LIBUNISTRING
# Rules generated and collected by gnulib-tool.
include Makefile.gnulib
+# Additional source files.
+libunistring_la_SOURCES += version.c
+
# The <stdbool.h> and <stdint.h> replacements that can be installed.
nobase_nodist_include_HEADERS = \
unistring/stdbool.h \
@@ -118,6 +121,9 @@ BUILT_SOURCES += unistring/iconveh.h
MOSTLYCLEANFILES += unistring/iconveh.h-t
CLEANFILES += unistring/iconveh.h
+# unistring/version.h is public.
+nobase_nodist_include_HEADERS += unistring/version.h
+
# unistring/woe32dll.h is not public, but is included by other header files.
nobase_nodist_include_HEADERS += unistring/woe32dll.h
@@ -153,7 +159,8 @@ HEADERS_WITH_EXTERNS = \
uninorm.h \
unicase.h \
localcharset.h \
- iconveh.h
+ iconveh.h \
+ unistring/version.in.h
# List of exported symbols.
# We extract it from the header files that get installed, removing symbols
diff --git a/lib/unistring/version.in.h b/lib/unistring/version.in.h
new file mode 100644
index 0000000..47b736a
--- /dev/null
+++ b/lib/unistring/version.in.h
@@ -0,0 +1,39 @@
+/* Meta information about GNU libunistring.
+ Copyright (C) 2009 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2009.
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as published
+ by the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef _UNISTRING_VERSION_H
+#define _UNISTRING_VERSION_H
+
+/* Get LIBUNISTRING_DLL_VARIABLE. */
+#include <unistring/woe32dll.h>
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#define _LIBUNISTRING_VERSION @HEXVERSION@ /* version number: (major<<8) + minor */
+extern LIBUNISTRING_DLL_VARIABLE const int _libunistring_version; /* Likewise */
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* _UNISTRING_VERSION_H */
diff --git a/lib/version.c b/lib/version.c
new file mode 100644
index 0000000..0b3bde1
--- /dev/null
+++ b/lib/version.c
@@ -0,0 +1,23 @@
+/* Version information about GNU libunistring.
+ Copyright (C) 2009 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2009.
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as published
+ by the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include "unistring/version.h"
+
+const int _libunistring_version = _LIBUNISTRING_VERSION;