From 560d68af8168d1baff607b9616a3590af70fe9ec Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 8 Aug 2012 17:16:01 -0400 Subject: [PATCH] Use a export-file for Windows builds Apparently even that doesn't make check-internal-symbols.sh happy with mingw32. Going to disable that for DLLs again, but hopefully the export-file is doing *something*. --- configure.ac | 14 +++++++++++++- src/Makefile.am | 22 +++++++++++++++++++++- src/hb-buffer.h | 4 ++-- 3 files changed, 36 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 689b6a4c..3ca23ee4 100644 --- a/configure.ac +++ b/configure.ac @@ -70,7 +70,7 @@ if test "x$GCC" = "xyes"; then CXXFLAGS="$CXXFLAGS -Wcast-align" case "$host" in - *-mingw*) + *-*-mingw*) ;; *) # Hide inline methods @@ -86,6 +86,18 @@ if test "x$GCC" = "xyes"; then esac fi +AC_MSG_CHECKING([for native Win32]) +case "$host" in + *-*-mingw*) + hb_os_win32=yes + ;; + *) + hb_os_win32=no + ;; +esac +AC_MSG_RESULT([$hb_os_win32]) +AM_CONDITIONAL(OS_WIN32, test "$hb_os_win32" = "yes") + dnl ========================================================================== have_ot=true diff --git a/src/Makefile.am b/src/Makefile.am index 93879c4d..d8f7502b 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -164,16 +164,36 @@ endif DIST_SUBDIRS += hb-old + +# Put the library together + +if OS_WIN32 +export_symbols = -export-symbols harfbuzz.def +harfbuzz_def_dependency = harfbuzz.def +endif + # Use a C linker, not C++; Don't link to libstdc++ libharfbuzz_la_LINK = $(LINK) $(libharfbuzz_la_LDFLAGS) libharfbuzz_la_SOURCES = $(HBSOURCES) $(HBHEADERS) nodist_libharfbuzz_la_SOURCES = $(nodist_HBSOURCES) libharfbuzz_la_CPPFLAGS = $(HBCFLAGS) -libharfbuzz_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(HB_LIBTOOL_VERSION_INFO) -no-undefined +libharfbuzz_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(HB_LIBTOOL_VERSION_INFO) $(export_symbols) -no-undefined libharfbuzz_la_LIBADD = $(HBLIBS) +libharfbuzz_la_DEPENDENCIES = $(harfbuzz_def_dependency) pkginclude_HEADERS = $(HBHEADERS) nodist_pkginclude_HEADERS = hb-version.h +CLEANFILES += harfbuzz.def +harfbuzz.def: $(HBHEADERS) + $(AM_V_GEN) (echo EXPORTS; \ + (cat $^ || echo 'hb_ERROR ()' ) | \ + $(EGREP) '^hb_.* \(' | \ + sed -e 's/ (.*//' | \ + LANG=C sort; \ + echo LIBRARY libharfbuzz-$(HB_VERSION_MAJOR).dll; \ + ) >"$@.tmp" + @ ! grep -q hb_ERROR "$@.tmp" && mv "$@.tmp" "$@" || ($(RM) "$@"; false) + GENERATORS = \ gen-arabic-table.py \ diff --git a/src/hb-buffer.h b/src/hb-buffer.h index d67cfd63..aebf4821 100644 --- a/src/hb-buffer.h +++ b/src/hb-buffer.h @@ -201,8 +201,8 @@ hb_buffer_normalize_glyphs (hb_buffer_t *buffer); /* * NOT IMPLEMENTED -void -hb_buffer_normalize_characters (hb_buffer_t *buffer); + void + hb_buffer_normalize_characters (hb_buffer_t *buffer); */ -- GitLab