summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2005-07-22 19:05:45 +0000
committerOwen Taylor <otaylor@src.gnome.org>2005-07-22 19:05:45 +0000
commit516a1c99afa7bb832e9edc69551b74d973ce75a3 (patch)
treec7b1cc8a8b4ec6d0cdb775856804a5a1607cce75
parenta998706c418584d6776e613925e8d7e633eebe8c (diff)
downloadpango-516a1c99afa7bb832e9edc69551b74d973ce75a3.tar.gz
Use -export-symbols-regex to control symbol exports, including not
2005-07-22 Owen Taylor <otaylor@redhat.com> * pango/Makefile.a configure.in: Use -export-symbols-regex to control symbol exports, including not exporting the symbols from opentype/. * modules/*/Makefile.am: Control symbol exports here as well, simplify using AC_SUBST() of MODULE_LIBTOOL_OPTIONS from configure.in. * pango/pangox-fontmap.c (engine_shape_covers): Cut-and-paste engine_shape_covers to avoid using a symbol from libpango. * pango/pango-utils.c: Make accidentally exported pango_aliases_ht static.
-rw-r--r--ChangeLog15
-rw-r--r--ChangeLog.pre-1-1015
-rw-r--r--configure.in20
-rw-r--r--modules/arabic/Makefile.am6
-rw-r--r--modules/basic/Makefile.am10
-rw-r--r--modules/hangul/Makefile.am6
-rw-r--r--modules/hebrew/Makefile.am6
-rw-r--r--modules/indic/Makefile.am6
-rw-r--r--modules/khmer/Makefile.am6
-rw-r--r--modules/syriac/Makefile.am7
-rw-r--r--modules/thai/Makefile.am6
-rw-r--r--modules/tibetan/Makefile.am6
-rw-r--r--pango/Makefile.am16
-rw-r--r--pango/pango-utils.c2
-rw-r--r--pango/pangox-fontmap.c18
15 files changed, 85 insertions, 60 deletions
diff --git a/ChangeLog b/ChangeLog
index ae4c1a1a..0ad49a21 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,20 @@
2005-07-22 Owen Taylor <otaylor@redhat.com>
+ * pango/Makefile.a configure.in: Use -export-symbols-regex
+ to control symbol exports, including not exporting the symbols
+ from opentype/.
+
+ * modules/*/Makefile.am: Control symbol exports here as well,
+ simplify using AC_SUBST() of MODULE_LIBTOOL_OPTIONS from configure.in.
+
+ * pango/pangox-fontmap.c (engine_shape_covers): Cut-and-paste
+ engine_shape_covers to avoid using a symbol from libpango.
+
+ * pango/pango-utils.c: Make accidentally exported pango_aliases_ht
+ static.
+
+2005-07-22 Owen Taylor <otaylor@redhat.com>
+
* pango/pango-layout.c: Add some missing statics on functions
added in the recent layout iter patch.
diff --git a/ChangeLog.pre-1-10 b/ChangeLog.pre-1-10
index ae4c1a1a..0ad49a21 100644
--- a/ChangeLog.pre-1-10
+++ b/ChangeLog.pre-1-10
@@ -1,5 +1,20 @@
2005-07-22 Owen Taylor <otaylor@redhat.com>
+ * pango/Makefile.a configure.in: Use -export-symbols-regex
+ to control symbol exports, including not exporting the symbols
+ from opentype/.
+
+ * modules/*/Makefile.am: Control symbol exports here as well,
+ simplify using AC_SUBST() of MODULE_LIBTOOL_OPTIONS from configure.in.
+
+ * pango/pangox-fontmap.c (engine_shape_covers): Cut-and-paste
+ engine_shape_covers to avoid using a symbol from libpango.
+
+ * pango/pango-utils.c: Make accidentally exported pango_aliases_ht
+ static.
+
+2005-07-22 Owen Taylor <otaylor@redhat.com>
+
* pango/pango-layout.c: Add some missing statics on functions
added in the recent layout iter patch.
diff --git a/configure.in b/configure.in
index 8601206f..ab8ae4e5 100644
--- a/configure.in
+++ b/configure.in
@@ -503,6 +503,26 @@ fi
AM_CONDITIONAL(ENABLE_MAN, test x$enable_man != xno)
dnl ********************************************************
+dnl * Options to pass to libtool
+dnl ********************************************************
+
+# Note that -module isn't included here since automake needs to see it to know
+# that something like pango-arabic-fc.la is a valid libtool archive
+#
+if test "$os_win32" != yes; then
+ # libtool option to control which symbols are exported
+ # right now, symbols starting with _ are not exported
+ LIBRARY_LIBTOOL_OPTIONS="-version-info $LT_VERSION_INFO "'-export-symbols-regex "^pango_.*"'
+ MODULE_LIBTOOL_OPTIONS="-export-dynamic -avoid-version "'-export-symbols-regex "^script_engine_.*"'
+else
+ # We currently use .def files on Windows (for gdk-pixbuf, gdk and gtk)
+ LIBRARY_LIBTOOL_OPTIONS="-version-info $LT_VERSION_INFO -no-undefined"
+ MODULE_LIBTOOL_OPTIONS="-export-dynamic -avoid-version -no-undefined"
+fi
+AC_SUBST(LIBRARY_LIBTOOL_OPTIONS)
+AC_SUBST(MODULE_LIBTOOL_OPTIONS)
+
+dnl ********************************************************
dnl * See whether we need to load our modules as .la files *
dnl ********************************************************
diff --git a/modules/arabic/Makefile.am b/modules/arabic/Makefile.am
index 9f5ca3ec..d3e459e8 100644
--- a/modules/arabic/Makefile.am
+++ b/modules/arabic/Makefile.am
@@ -16,10 +16,6 @@ moduledir = $(libdir)/pango/$(PANGO_MODULE_VERSION)/modules
module_LTLIBRARIES =
noinst_LTLIBRARIES =
-if PLATFORM_WIN32
-no_undefined = -no-undefined
-endif
-
if HAVE_FREETYPE
INCLUDES += $(FREETYPE_CFLAGS)
@@ -35,7 +31,7 @@ fc_sources = \
arabic-ot.c \
arabic-ot.h
-pango_arabic_fc_la_LDFLAGS = -export-dynamic -avoid-version -module $(no_undefined)
+pango_arabic_fc_la_LDFLAGS = -module $(MODULE_LIBTOOL_OPTIONS)
pango_arabic_fc_la_LIBADD = $(pangoft2libs)
pango_arabic_fc_la_SOURCES = $(fc_sources)
libpango_arabic_fc_la_SOURCES = $(fc_sources)
diff --git a/modules/basic/Makefile.am b/modules/basic/Makefile.am
index 4b9a30a1..570750b0 100644
--- a/modules/basic/Makefile.am
+++ b/modules/basic/Makefile.am
@@ -16,10 +16,6 @@ INCLUDES = \
-I$(top_srcdir)/pango \
$(GLIB_CFLAGS)
-if PLATFORM_WIN32
-no_undefined = -no-undefined
-endif
-
moduledir = $(libdir)/pango/$(PANGO_MODULE_VERSION)/modules
module_LTLIBRARIES =
noinst_LTLIBRARIES =
@@ -33,7 +29,7 @@ module_LTLIBRARIES += pango-basic-x.la
endif
endif
-pango_basic_x_la_LDFLAGS = -export-dynamic -avoid-version -module $(no_undefined)
+pango_basic_x_la_LDFLAGS = -module $(MODULE_LIBTOOL_OPTIONS)
pango_basic_x_la_LIBADD = $(pangoxlibs)
pango_basic_x_la_SOURCES = basic-x.c
libpango_basic_x_la_SOURCES = basic-x.c
@@ -49,7 +45,7 @@ module_LTLIBRARIES += pango-basic-fc.la
endif
endif
-pango_basic_fc_la_LDFLAGS = -export-dynamic -avoid-version -module $(no_undefined)
+pango_basic_fc_la_LDFLAGS = -module $(MODULE_LIBTOOL_OPTIONS)
pango_basic_fc_la_LIBADD = $(pangoft2libs)
pango_basic_fc_la_SOURCES = basic-fc.c
libpango_basic_fc_la_SOURCES = basic-fc.c
@@ -64,7 +60,7 @@ module_LTLIBRARIES += pango-basic-win32.la
endif
endif
-pango_basic_win32_la_LDFLAGS = -export-dynamic -avoid-version -module $(no_undefined)
+pango_basic_win32_la_LDFLAGS = -module $(MODULE_LIBTOOL_OPTIONS)
pango_basic_win32_la_LIBADD = $(pangowin32libs) -lgdi32
pango_basic_win32_la_SOURCES = basic-win32.c
libpango_basic_win32_la_SOURCES = basic-win32.c
diff --git a/modules/hangul/Makefile.am b/modules/hangul/Makefile.am
index f4b07ff9..451e8367 100644
--- a/modules/hangul/Makefile.am
+++ b/modules/hangul/Makefile.am
@@ -12,10 +12,6 @@ INCLUDES = \
-I$(top_srcdir)/pango \
$(GLIB_CFLAGS)
-if PLATFORM_WIN32
-no_undefined = -no-undefined
-endif
-
moduledir = $(libdir)/pango/$(PANGO_MODULE_VERSION)/modules
module_LTLIBRARIES =
noinst_LTLIBRARIES =
@@ -32,7 +28,7 @@ endif
fc_sources = hangul-fc.c hangul-defs.h
-pango_hangul_fc_la_LDFLAGS = -export-dynamic -avoid-version -module $(no_undefined)
+pango_hangul_fc_la_LDFLAGS = -module $(MODULE_LIBTOOL_OPTIONS)
pango_hangul_fc_la_LIBADD = $(pangoft2libs)
pango_hangul_fc_la_SOURCES = $(fc_sources)
libpango_hangul_fc_la_SOURCES = $(fc_sources)
diff --git a/modules/hebrew/Makefile.am b/modules/hebrew/Makefile.am
index 1ff56ab1..b084924a 100644
--- a/modules/hebrew/Makefile.am
+++ b/modules/hebrew/Makefile.am
@@ -28,13 +28,9 @@ module_LTLIBRARIES += pango-hebrew-fc.la
endif
endif
-if PLATFORM_WIN32
-no_undefined = -no-undefined
-endif
-
hebrew_fc_sources = $(common_sources) hebrew-fc.c
-pango_hebrew_fc_la_LDFLAGS = -export-dynamic -avoid-version -module $(no_undefined)
+pango_hebrew_fc_la_LDFLAGS = -module $(MODULE_LIBTOOL_OPTIONS)
pango_hebrew_fc_la_LIBADD = $(pangoft2libs)
pango_hebrew_fc_la_SOURCES = $(hebrew_fc_sources)
libpango_hebrew_fc_la_SOURCES = $(hebrew_fc_sources)
diff --git a/modules/indic/Makefile.am b/modules/indic/Makefile.am
index 24722f57..06ee65de 100644
--- a/modules/indic/Makefile.am
+++ b/modules/indic/Makefile.am
@@ -12,10 +12,6 @@ INCLUDES = \
-I$(top_srcdir)/pango \
$(GLIB_CFLAGS)
-if PLATFORM_WIN32
-no_undefined = -no-undefined
-endif
-
moduledir = $(libdir)/pango/$(PANGO_MODULE_VERSION)/modules
module_LTLIBRARIES =
noinst_LTLIBRARIES =
@@ -38,7 +34,7 @@ fc_sources = \
mprefixups.c \
mprefixups.h
-pango_indic_fc_la_LDFLAGS = -export-dynamic -avoid-version -module $(no_undefined)
+pango_indic_fc_la_LDFLAGS = -module $(MODULE_LIBTOOL_OPTIONS)
pango_indic_fc_la_LIBADD = $(pangoft2libs)
pango_indic_fc_la_SOURCES = $(fc_sources)
libpango_indic_fc_la_SOURCES = $(fc_sources)
diff --git a/modules/khmer/Makefile.am b/modules/khmer/Makefile.am
index 51cc997d..47a12f7b 100644
--- a/modules/khmer/Makefile.am
+++ b/modules/khmer/Makefile.am
@@ -12,10 +12,6 @@ INCLUDES = \
-I$(top_srcdir)/pango \
$(GLIB_CFLAGS)
-if PLATFORM_WIN32
-no_undefined = -no-undefined
-endif
-
moduledir = $(libdir)/pango/$(PANGO_MODULE_VERSION)/modules
module_LTLIBRARIES =
noinst_LTLIBRARIES =
@@ -33,7 +29,7 @@ endif
fc_sources = \
khmer-fc.c
-pango_khmer_fc_la_LDFLAGS = -export-dynamic -avoid-version -module $(no_undefined)
+pango_khmer_fc_la_LDFLAGS = -module $(MODULE_LIBTOOL_OPTIONS)
pango_khmer_fc_la_LIBADD = $(pangoft2libs)
pango_khmer_fc_la_SOURCES = $(fc_sources)
libpango_khmer_fc_la_SOURCES = $(fc_sources)
diff --git a/modules/syriac/Makefile.am b/modules/syriac/Makefile.am
index 0f8e3a3a..4b8a3853 100644
--- a/modules/syriac/Makefile.am
+++ b/modules/syriac/Makefile.am
@@ -16,11 +16,6 @@ moduledir = $(libdir)/pango/$(PANGO_MODULE_VERSION)/modules
module_LTLIBRARIES =
noinst_LTLIBRARIES =
-if PLATFORM_WIN32
-no_undefined = -no-undefined
-endif
-
-
if HAVE_FREETYPE
INCLUDES += $(FREETYPE_CFLAGS)
if INCLUDE_SYRIAC_FC
@@ -35,7 +30,7 @@ fc_sources = \
syriac-ot.c \
syriac-ot.h
-pango_syriac_fc_la_LDFLAGS = -export-dynamic -avoid-version -module $(no_undefined)
+pango_syriac_fc_la_LDFLAGS = -module $(MODULE_LIBTOOL_OPTIONS)
pango_syriac_fc_la_LIBADD = $(pangoft2libs)
pango_syriac_fc_la_SOURCES = $(fc_sources)
libpango_syriac_fc_la_SOURCES = $(fc_sources)
diff --git a/modules/thai/Makefile.am b/modules/thai/Makefile.am
index 63446ed4..dbaf3d30 100644
--- a/modules/thai/Makefile.am
+++ b/modules/thai/Makefile.am
@@ -12,10 +12,6 @@ INCLUDES = \
-I$(top_srcdir)/pango \
$(GLIB_CFLAGS)
-if PLATFORM_WIN32
-no_undefined = -no-undefined
-endif
-
moduledir = $(libdir)/pango/$(PANGO_MODULE_VERSION)/modules
module_LTLIBRARIES =
noinst_LTLIBRARIES =
@@ -34,7 +30,7 @@ endif
thai_fc_sources = $(common_sources) thai-fc.c thai-ot.c thai-ot.h
-pango_thai_fc_la_LDFLAGS = -export-dynamic -avoid-version -module $(no_undefined)
+pango_thai_fc_la_LDFLAGS = -module $(MODULE_LIBTOOL_OPTIONS)
pango_thai_fc_la_LIBADD = $(pangoft2libs)
pango_thai_fc_la_SOURCES = $(thai_fc_sources)
libpango_thai_fc_la_SOURCES = $(thai_fc_sources)
diff --git a/modules/tibetan/Makefile.am b/modules/tibetan/Makefile.am
index 2fe7f3bd..d8c822e0 100644
--- a/modules/tibetan/Makefile.am
+++ b/modules/tibetan/Makefile.am
@@ -11,10 +11,6 @@ INCLUDES = \
-I$(top_srcdir)/pango \
$(GLIB_CFLAGS)
-if PLATFORM_WIN32
-no_undefined = -no-undefined
-endif
-
moduledir = $(libdir)/pango/$(PANGO_MODULE_VERSION)/modules
module_LTLIBRARIES =
noinst_LTLIBRARIES =
@@ -30,7 +26,7 @@ endif
tibetan_fc_sources = $(common_sources) tibetan-fc.c
-pango_tibetan_fc_la_LDFLAGS = -export-dynamic -avoid-version -module $(no_undefined)
+pango_tibetan_fc_la_LDFLAGS = -module $(MODULE_LIBTOOL_OPTIONS)
pango_tibetan_fc_la_LIBADD = $(pangoft2libs)
pango_tibetan_fc_la_SOURCES = $(tibetan_fc_sources)
libpango_tibetan_fc_la_SOURCES = $(tibetan_fc_sources)
diff --git a/pango/Makefile.am b/pango/Makefile.am
index 1d20d1b9..b4c59c2f 100644
--- a/pango/Makefile.am
+++ b/pango/Makefile.am
@@ -32,10 +32,6 @@ BUILT_SOURCES = pango-enum-types.h pango-enum-types.c
pangoincludedir=$(includedir)/pango-1.0/pango
-if PLATFORM_WIN32
-no_undefined = -no-undefined
-endif
-
if OS_WIN32
else
libm = -lm
@@ -45,7 +41,7 @@ endif
lib_LTLIBRARIES = libpango-1.0.la
-libpango_1_0_la_LDFLAGS = -version-info $(LT_VERSION_INFO) $(no_undefined)
+libpango_1_0_la_LDFLAGS = $(LIBRARY_LIBTOOL_OPTIONS)
libpango_1_0_la_LIBADD = $(GLIB_LIBS) mini-fribidi/libmini-fribidi.la $(libm)
libpango_1_0_la_DEPENDENCIES = mini-fribidi/libmini-fribidi.la
@@ -151,7 +147,7 @@ pangoinclude_HEADERS += pangox.h
lib_LTLIBRARIES += libpangox-1.0.la
endif
-libpangox_1_0_la_LDFLAGS = -version-info $(LT_VERSION_INFO) $(no_undefined)
+libpangox_1_0_la_LDFLAGS = $(LIBRARY_LIBTOOL_OPTIONS)
libpangox_1_0_la_LIBADD = libpango-$(PANGO_API_VERSION).la $(INCLUDED_X_MODULES) $(X_LIBS) $(X_EXTRA_LIBS) $(GLIB_LIBS)
libpangox_1_0_la_DEPENDENCIES = libpango-$(PANGO_API_VERSION).la $(INCLUDED_X_MODULES)
@@ -171,7 +167,7 @@ pangoinclude_HEADERS += pangoft2.h pango-ot.h pangofc-decoder.h
lib_LTLIBRARIES += libpangoft2-1.0.la
endif
-libpangoft2_1_0_la_LDFLAGS = -version-info $(LT_VERSION_INFO) $(no_undefined)
+libpangoft2_1_0_la_LDFLAGS = $(LIBRARY_LIBTOOL_OPTIONS)
libpangoft2_1_0_la_LIBADD = opentype/libpango-ot.la libpango-$(PANGO_API_VERSION).la $(INCLUDED_FC_MODULES) $(FREETYPE_LIBS) $(GLIB_LIBS) $(libm)
libpangoft2_1_0_la_DEPENDENCIES = opentype/libpango-ot.la libpango-$(PANGO_API_VERSION).la $(INCLUDED_FC_MODULES)
@@ -202,7 +198,7 @@ pangoinclude_HEADERS += pangoxft.h pangoxft-render.h pango-ot.h
lib_LTLIBRARIES += libpangoxft-1.0.la
endif
-libpangoxft_1_0_la_LDFLAGS = -version-info $(LT_VERSION_INFO) $(no_undefined)
+libpangoxft_1_0_la_LDFLAGS = $(LIBRARY_LIBTOOL_OPTIONS)
libpangoxft_1_0_la_LIBADD = libpangoft2-$(PANGO_API_VERSION).la libpango-$(PANGO_API_VERSION).la $(XFT_LIBS) $(GLIB_LIBS)
libpangoxft_1_0_la_DEPENDENCIES = libpangoft2-$(PANGO_API_VERSION).la libpango-$(PANGO_API_VERSION).la
@@ -220,7 +216,7 @@ pangoinclude_HEADERS += pangocairo.h
lib_LTLIBRARIES += libpangocairo-1.0.la
endif
-libpangocairo_1_0_la_LDFLAGS = -version-info $(LT_VERSION_INFO) $(no_undefined)
+libpangocairo_1_0_la_LDFLAGS = $(LIBRARY_LIBTOOL_OPTIONS)
libpangocairo_1_0_la_LIBADD = libpango-$(PANGO_API_VERSION).la $(CAIRO_LIBS) $(GLIB_LIBS)
libpangocairo_1_0_la_DEPENDENCIES = libpango-$(PANGO_API_VERSION).la
@@ -254,7 +250,7 @@ pangoinclude_HEADERS += pangowin32.h
lib_LTLIBRARIES += libpangowin32-1.0.la
endif
-libpangowin32_1_0_la_LDFLAGS = -version-info $(LT_VERSION_INFO) $(no_undefined)
+libpangowin32_1_0_la_LDFLAGS = $(LIBRARY_LIBTOOL_OPTIONS)
libpangowin32_1_0_la_LIBADD = libpango-$(PANGO_API_VERSION).la $(INCLUDED_WIN32_MODULES) $(WIN32_LIBS) $(GLIB_LIBS)
libpangowin32_1_0_la_DEPENDENCIES = libpango-$(PANGO_API_VERSION).la $(INCLUDED_WIN32_MODULES)
diff --git a/pango/pango-utils.c b/pango/pango-utils.c
index 85bc0d7d..b8a367e8 100644
--- a/pango/pango-utils.c
+++ b/pango/pango-utils.c
@@ -58,7 +58,7 @@ struct PangoAlias
gboolean visible; /* Do we want/need this? */
};
-GHashTable *pango_aliases_ht = NULL;
+static GHashTable *pango_aliases_ht = NULL;
/**
* pango_trim_string:
diff --git a/pango/pangox-fontmap.c b/pango/pangox-fontmap.c
index 0227da28..aaa28aad 100644
--- a/pango/pangox-fontmap.c
+++ b/pango/pangox-fontmap.c
@@ -1512,6 +1512,22 @@ pango_x_face_get_type (void)
return object_type;
}
+/* Cut and paste here to avoid an inter-module dependency */
+static PangoCoverageLevel
+engine_shape_covers (PangoEngineShape *engine,
+ PangoFont *font,
+ PangoLanguage *language,
+ gunichar wc)
+{
+ g_return_val_if_fail (PANGO_IS_ENGINE_SHAPE (engine), PANGO_COVERAGE_NONE);
+ g_return_val_if_fail (PANGO_IS_FONT (font), PANGO_COVERAGE_NONE);
+
+ return PANGO_ENGINE_SHAPE_GET_CLASS (engine)->covers (engine,
+ font,
+ language,
+ wc);
+}
+
PangoCoverage *
pango_x_face_get_coverage (PangoXFace *xface,
PangoFont *font,
@@ -1558,7 +1574,7 @@ pango_x_face_get_coverage (PangoXFace *xface,
{
PangoCoverageLevel level;
- level = _pango_engine_shape_covers (engine, font, language, wc);
+ level = engine_shape_covers (engine, font, language, wc);
if (level != PANGO_COVERAGE_NONE)
pango_coverage_set (result, wc, level);
}