Step version up to 0.5.0.
Also, fix to pass "make distcheck"
AC_PREREQ([2.64])
AC_INIT([harfbuzz],
- [0.3],
+ [0.5.0],
[http://bugs.freedesktop.org/enter_bug.cgi?product=harfbuzz],
[harfbuzz],
[http://freedesktop.org/wiki/Software/harfbuzz])
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE([1.11.1 gnu dist-bzip2 no-dist-gzip -Wall no-define])
-
AM_SILENT_RULES([yes])
-AC_CANONICAL_HOST
-
# Check for programs
AC_PROG_CC
AM_PROG_CC_C_O
LT_PREREQ([2.2])
LT_INIT([disable-static])
+# Version
+m4_define(version_triplet,m4_split(AC_PACKAGE_VERSION,[[.]]))
+HB_VERSION_MAJOR=m4_argn(1,version_triplet)
+HB_VERSION_MINOR=m4_argn(2,version_triplet)
+HB_VERSION_MICRO=m4_argn(3,version_triplet)
+HB_VERSION=AC_PACKAGE_VERSION
+
+AC_SUBST(HB_VERSION_MAJOR)
+AC_SUBST(HB_VERSION_MINOR)
+AC_SUBST(HB_VERSION_MICRO)
+AC_SUBST(HB_VERSION)
+
+
# Functions and headers
AC_CHECK_FUNCS(mprotect sysconf getpagesize)
AC_CHECK_HEADERS(unistd.h sys/mman.h)
# Compiler flags
+AC_CANONICAL_HOST
if test "x$GCC" = "xyes"; then
# Make sure we don't link to libstdc++
fi
AM_CONDITIONAL(HAVE_FREETYPE, $have_freetype)
-dnl ==========================================================================
+dnl ===========================================================================
AC_CONFIG_FILES([
-harfbuzz.pc
Makefile
+harfbuzz.pc
src/Makefile
+src/hb-version.h
test/Makefile
])
NULL =
EXTRA_DIST =
+CLEANFILES =
+DISTCLEANFILES =
+MAINTAINERCLEANFILES =
# The following warning options are useful for debugging: -Wpadded -Wcast-align
#AM_CXXFLAGS =
hb-font.h \
hb-shape.h \
hb-unicode.h \
+ hb-version.h \
$(NULL)
HBSOURCES += \
hb-ot-tag.h \
$(NULL)
+MAINTAINERCLEANFILES = \
+ $(srcdir)/hb-version.h \
+ $(NULL)
+
if HAVE_GLIB
HBCFLAGS += $(GLIB_CFLAGS)
HBLIBS += $(GLIB_LIBS)
libharfbuzz_la_CPPFLAGS = $(HBCFLAGS)
libharfbuzz_la_LIBADD = $(HBLIBS)
pkginclude_HEADERS = $(HBHEADERS)
+nodist_pkginclude_HEADERS = hb-version.h
GENERATORS = \
cd "$srcdir"
-for x in hb-*.c hb-*.cc hb-*.h hb-*.hh ; do
+for x in hb-*.cc hb-*.h hb-*.hh ; do
if ! grep -q HB_BEGIN_DECLS "$x" || ! grep -q HB_END_DECLS "$x"; then
echo "Ouch, file $x does not HB_BEGIN_DECLS / HB_END_DECLS"
stat=1
#include "hb-private.hh"
+#include "hb-version.h"
+
#include "hb-mutex-private.hh"
#include "hb-object-private.hh"
}
+/* hb_version */
+
+void
+hb_version (unsigned int *major,
+ unsigned int *minor,
+ unsigned int *micro)
+{
+ *major = HB_VERSION_MAJOR;
+ *minor = HB_VERSION_MINOR;
+ *micro = HB_VERSION_MICRO;
+}
+
+const char *
+hb_version_string (void)
+{
+ return HB_VERSION_STRING;
+}
+
+hb_bool_t
+hb_version_check (unsigned int major,
+ unsigned int minor,
+ unsigned int micro)
+{
+ return HB_VERSION_CHECK (major, minor, micro);
+}
+
+
HB_END_DECLS
--- /dev/null
+/*
+ * Copyright © 2011 Google, Inc.
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Google Author(s): Behdad Esfahbod
+ */
+
+#ifndef HB_VERSION_H
+#define HB_VERSION_H
+
+#include "hb-common.h"
+
+HB_BEGIN_DECLS
+
+
+#define HB_VERSION_MAJOR @HB_VERSION_MAJOR@
+#define HB_VERSION_MINOR @HB_VERSION_MINOR@
+#define HB_VERSION_MICRO @HB_VERSION_MICRO@
+
+#define HB_VERSION_STRING "@HB_VERSION@"
+
+#define HB_VERSION_CHECK(major,minor,micro) \
+ ((major)*10000+(minor)*100+(micro) >= \
+ HB_VERSION_MAJOR*10000+HB_VERSION_MINOR*100+HB_VERSION_MICRO)
+
+
+void
+hb_version (unsigned int *major,
+ unsigned int *minor,
+ unsigned int *micro);
+
+const char *
+hb_version_string (void);
+
+hb_bool_t
+hb_version_check (unsigned int major,
+ unsigned int minor,
+ unsigned int micro);
+
+
+HB_END_DECLS
+
+#endif /* HB_VERSION_H */
#include "hb-font.h"
#include "hb-shape.h"
#include "hb-unicode.h"
+#include "hb-version.h"
HB_BEGIN_DECLS
HB_END_DECLS
AM_CPPFLAGS = -I$(top_srcdir)/src/ $(GLIB_CFLAGS)
LDADD = $(top_builddir)/src/libharfbuzz.la $(GLIB_LIBS)
+EXTRA_DIST += hb-test.h
+
check_PROGRAMS = $(TEST_PROGS)
noinst_PROGRAMS = $(TEST_PROGS)