diff options
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | configure.in | 144 | ||||
-rw-r--r-- | examples/Makefile.am | 4 | ||||
-rw-r--r-- | modules/Makefile.am | 7 | ||||
-rw-r--r-- | modules/arabic/Makefile.am | 5 | ||||
-rw-r--r-- | modules/basic/Makefile.am | 11 | ||||
-rw-r--r-- | modules/hangul/Makefile.am | 5 | ||||
-rw-r--r-- | modules/hebrew/Makefile.am | 5 | ||||
-rw-r--r-- | modules/indic/Makefile.am | 5 | ||||
-rw-r--r-- | modules/khmer/Makefile.am | 5 | ||||
-rw-r--r-- | modules/syriac/Makefile.am | 5 | ||||
-rw-r--r-- | modules/thai/Makefile.am | 5 | ||||
-rw-r--r-- | modules/tibetan/Makefile.am | 5 |
13 files changed, 142 insertions, 72 deletions
@@ -1,3 +1,11 @@ +2006-01-16 Behdad Esfahbod <behdad@gnome.org> + + Fixes bug #71414, allowing to disable building/installing modules. + + * configure.in: Add support for --with-dynamic-modules. + + * */Makefile.am: Adapt to the above change. + 2006-01-14 Behdad Esfahbod <behdad@gnome.org> Draw hexbox for cairo backend. Bug #313551. Based on patch by diff --git a/configure.in b/configure.in index f31fec82..4409a411 100644 --- a/configure.in +++ b/configure.in @@ -356,19 +356,10 @@ AC_MSG_RESULT($have_varargs) AM_CONDITIONAL(BUILD_OT_TESTS, test $have_varargs = yes) CPPFLAGS=$pango_saved_cppflags + # -# Allow building some or all modules included +# Modules to build # -AC_MSG_CHECKING(modules to link statically) - -dnl I would use AC_HELP_STRING here, but due to some bugs in m4_text_wrap, -dnl it interprets the commas incorrectly ... -dnl AC_HELP_STRING([--with-included-modules=MODULE1 MODULE2 ...], -dnl [build the given modules into Pango]) -AC_ARG_WITH(included_modules, -[ --with-included-modules=MODULE1,MODULE2,... - build the given modules into Pango]) - arabic_modules="arabic-fc" basic_modules="basic-fc,basic-win32,basic-x" hangul_modules="hangul-fc" @@ -381,71 +372,104 @@ tibetan_modules="tibetan-fc" all_modules="$arabic_modules,$basic_modules,$hangul_modules,$hebrew_modules,$indic_modules,$khmer_modules,$syriac_modules,$thai_modules,$tibetan_modules" -included_modules="" -if test "x$with_included_modules" != xno || test "x$with_included_modules" = x ; then +# +# Allow building some or all modules included +# +AC_MSG_CHECKING(modules to link statically) - # If no modules specified, include all modules - if test "x$with_included_modules" = xyes ; then - included_modules="$all_modules" - else - included_modules="$with_included_modules" - fi -fi +dnl I would use AC_HELP_STRING here, but due to some bugs in m4_text_wrap, +dnl it interprets the commas incorrectly ... +dnl AC_HELP_STRING([--with-included-modules=MODULE1 MODULE2 ...], +dnl [build the given modules into Pango]) +AC_ARG_WITH(included_modules, +[ --with-included-modules=MODULE1,MODULE2,... + build the given modules into Pango @<:@default=no@:>@]) +included_modules="" +case x$with_included_modules in + xyes) included_modules=$all_modules ;; + xno|x) included_modules="" ;; + *) included_modules=$with_included_modules ;; +esac AC_MSG_RESULT($included_modules) AM_CONDITIONAL(HAVE_INCLUDED_MODULES, test "x$included_modules" != x) +# +# Allow building only some or none of modules dynamic +# +AC_MSG_CHECKING(dynamic modules to build) + +dnl I would use AC_HELP_STRING here, but due to some bugs in m4_text_wrap, +dnl it interprets the commas incorrectly ... +dnl AC_HELP_STRING([--with-dynamic-modules=MODULE1 MODULE2 ...], +dnl [build the given dynamic modules]) +AC_ARG_WITH(dynamic_modules, +[ --with-dynamic-modules=MODULE1,MODULE2,... + build the given dynamic modules @<:@default=yes@:>@]) + +dynamic_modules="" +case x$with_dynamic_modules in + xyes|x) dynamic_modules=$all_modules ;; + xno) dynamic_modules="" ;; + *) dynamic_modules=$with_dynamic_modules ;; +esac +AC_MSG_RESULT([$dynamic_modules (those built into Pango will be excluded)]) +AM_CONDITIONAL(HAVE_DYNAMIC_MODULES, test "x$dynamic_modules" != x) + + INCLUDED_X_MODULES= INCLUDED_FC_MODULES= INCLUDED_WIN32_MODULES= INCLUDED_ATSUI_MODULES= -IFS="${IFS= }"; pango_save_ifs="$IFS"; IFS="," -for module in $included_modules; do - if echo $indic_modules | egrep "(^| )$module(\$| )" > /dev/null; then - dir=indic - else - dir=`echo $module | sed "s/-.*//"` - fi - - if echo $module | egrep -- "-fc($|,)" > /dev/null; then - INCLUDED_FC_MODULES="$INCLUDED_FC_MODULES \$(top_builddir)/modules/$dir/libpango-$module.la" - elif echo $module | egrep -- "-x($|,)" > /dev/null; then - INCLUDED_X_MODULES="$INCLUDED_X_MODULES \$(top_builddir)/modules/$dir/libpango-$module.la" - elif echo $module | egrep -- "-win32($|,)" > /dev/null; then - INCLUDED_WIN32_MODULES="$INCLUDED_WIN32_MODULES \$(top_builddir)/modules/$dir/libpango-$module.la" - elif echo $module | egrep -- "-atsui($|,)" > /dev/null; then - INCLUDED_ATSUI_MODULES="$INCLUDED_ATSUI_MODULES \$(top_builddir)/modules/$dir/libpango-$module.la" - else - AC_MSG_ERROR([the specified module $module does not exist]) - fi -done -IFS="$pango_save_ifs" AC_SUBST(INCLUDED_X_MODULES) AC_SUBST(INCLUDED_FC_MODULES) AC_SUBST(INCLUDED_WIN32_MODULES) AC_SUBST(INCLUDED_ATSUI_MODULES) -AM_CONDITIONAL(INCLUDE_ARABIC_FC,echo $included_modules | egrep '(^|,)arabic-fc($|,)' > /dev/null) - -AM_CONDITIONAL(INCLUDE_BASIC_FC,echo $included_modules | egrep '(^|,)basic-fc($|,)' > /dev/null) -AM_CONDITIONAL(INCLUDE_BASIC_WIN32,echo $included_modules | egrep '(^|,)basic-win32($|,)' > /dev/null) -AM_CONDITIONAL(INCLUDE_BASIC_X,echo $included_modules | egrep '(^|,)basic-x($|,)' > /dev/null) -AM_CONDITIONAL(INCLUDE_BASIC_ATSUI,echo $included_modules | egrep '(^|,)basic-x($|,)' > /dev/null) - -AM_CONDITIONAL(INCLUDE_HANGUL_FC,echo $included_modules | egrep '(^|,)hangul-fc($|,)' > /dev/null) - -AM_CONDITIONAL(INCLUDE_HEBREW_FC,echo $included_modules | egrep '(^|,)hebrew-fc($|,)' > /dev/null) - -AM_CONDITIONAL(INCLUDE_INDIC_FC,echo $included_modules | egrep '(^|,)indic-fc($|,)' > /dev/null) - -AM_CONDITIONAL(INCLUDE_KHMER_FC,echo $included_modules | egrep '(^|,)khmer-fc($|,)' > /dev/null) - -AM_CONDITIONAL(INCLUDE_SYRIAC_FC,echo $included_modules | egrep '(^|,)syriac-fc($|,)' > /dev/null) - -AM_CONDITIONAL(INCLUDE_THAI_FC,echo $included_modules | egrep '(^|,)thai-fc($|,)' > /dev/null) +IFS="${IFS= }"; pango_save_ifs="$IFS"; IFS=", " +for module in $included_modules; do + case $indic_modules in + *$module*) dir=indic ;; + *) dir=`echo $module | sed "s/-.*//"` ;; + esac + included_path="\$(top_builddir)/modules/$dir/libpango-$module.la" + + case $module in + *-fc) INCLUDED_FC_MODULES="$INCLUDED_FC_MODULES $included_path" ;; + *-x) INCLUDED_X_MODULES="$INCLUDED_X_MODULES $included_path" ;; + *-win32) INCLUDED_WIN32_MODULES="$INCLUDED_WIN32_MODULES $included_path" ;; + *-atsui) INCLUDED_ATSUI_MODULES="$INCLUDED_ATSUI_MODULES $included_path" ;; + *) AC_MSG_ERROR([specified module $module not recognized]) ;; + esac +done +IFS="$pango_save_ifs" -AM_CONDITIONAL(INCLUDE_TIBETAN_FC,echo $included_modules | egrep '(^|,)tibetan-fc($|,)' > /dev/null) +AM_CONDITIONAL(INCLUDE_ARABIC_FC, echo $included_modules | egrep '(^|,)arabic-fc($|,)' > /dev/null) +AM_CONDITIONAL(INCLUDE_BASIC_FC, echo $included_modules | egrep '(^|,)basic-fc($|,)' > /dev/null) +AM_CONDITIONAL(INCLUDE_BASIC_WIN32, echo $included_modules | egrep '(^|,)basic-win32($|,)' > /dev/null) +AM_CONDITIONAL(INCLUDE_BASIC_X, echo $included_modules | egrep '(^|,)basic-x($|,)' > /dev/null) +AM_CONDITIONAL(INCLUDE_BASIC_ATSUI, echo $included_modules | egrep '(^|,)basic-atsui($|,)' > /dev/null) +AM_CONDITIONAL(INCLUDE_HANGUL_FC, echo $included_modules | egrep '(^|,)hangul-fc($|,)' > /dev/null) +AM_CONDITIONAL(INCLUDE_HEBREW_FC, echo $included_modules | egrep '(^|,)hebrew-fc($|,)' > /dev/null) +AM_CONDITIONAL(INCLUDE_INDIC_FC, echo $included_modules | egrep '(^|,)indic-fc($|,)' > /dev/null) +AM_CONDITIONAL(INCLUDE_KHMER_FC, echo $included_modules | egrep '(^|,)khmer-fc($|,)' > /dev/null) +AM_CONDITIONAL(INCLUDE_SYRIAC_FC, echo $included_modules | egrep '(^|,)syriac-fc($|,)' > /dev/null) +AM_CONDITIONAL(INCLUDE_THAI_FC, echo $included_modules | egrep '(^|,)thai-fc($|,)' > /dev/null) +AM_CONDITIONAL(INCLUDE_TIBETAN_FC, echo $included_modules | egrep '(^|,)tibetan-fc($|,)' > /dev/null) + +AM_CONDITIONAL(DYNAMIC_ARABIC_FC, echo $dynamic_modules | egrep '(^|,)arabic-fc($|,)' > /dev/null) +AM_CONDITIONAL(DYNAMIC_BASIC_FC, echo $dynamic_modules | egrep '(^|,)basic-fc($|,)' > /dev/null) +AM_CONDITIONAL(DYNAMIC_BASIC_WIN32, echo $dynamic_modules | egrep '(^|,)basic-win32($|,)' > /dev/null) +AM_CONDITIONAL(DYNAMIC_BASIC_X, echo $dynamic_modules | egrep '(^|,)basic-x($|,)' > /dev/null) +AM_CONDITIONAL(DYNAMIC_BASIC_ATSUI, echo $dynamic_modules | egrep '(^|,)basic-atsui($|,)' > /dev/null) +AM_CONDITIONAL(DYNAMIC_HANGUL_FC, echo $dynamic_modules | egrep '(^|,)hangul-fc($|,)' > /dev/null) +AM_CONDITIONAL(DYNAMIC_HEBREW_FC, echo $dynamic_modules | egrep '(^|,)hebrew-fc($|,)' > /dev/null) +AM_CONDITIONAL(DYNAMIC_INDIC_FC, echo $dynamic_modules | egrep '(^|,)indic-fc($|,)' > /dev/null) +AM_CONDITIONAL(DYNAMIC_KHMER_FC, echo $dynamic_modules | egrep '(^|,)khmer-fc($|,)' > /dev/null) +AM_CONDITIONAL(DYNAMIC_SYRIAC_FC, echo $dynamic_modules | egrep '(^|,)syriac-fc($|,)' > /dev/null) +AM_CONDITIONAL(DYNAMIC_THAI_FC, echo $dynamic_modules | egrep '(^|,)thai-fc($|,)' > /dev/null) +AM_CONDITIONAL(DYNAMIC_TIBETAN_FC, echo $dynamic_modules | egrep '(^|,)tibetan-fc($|,)' > /dev/null) # # We use flockfile to implement pango_getline() - should be moved to GLib diff --git a/examples/Makefile.am b/examples/Makefile.am index 71c9b250..7ab1fe50 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -103,9 +103,9 @@ pango.modules: $(top_builddir)/pango/pango-querymodules if find ../modules -name '*.so' | grep 'so' > /dev/null ; then \ echo "Writing a pango.modules file to use when running examples before installing Pango."; \ (cd ../modules && \ - $(top_builddir)/pango/pango-querymodules `find . -name '*.la' | grep -v \.libs` > ../examples/pango.modules ) ;\ + $(top_builddir)/pango/pango-querymodules `find . -name '*.la' | grep -v \.libs | grep -v libpango` > ../examples/pango.modules ) ;\ else \ - echo "No dynamic modules found; will use only static modules for uninstalled example programs."; \ + echo "No dynamic modules found; will use only static modules for not-installed example programs."; \ touch pango.modules; \ fi diff --git a/modules/Makefile.am b/modules/Makefile.am index 39cc6ff7..73b2cf43 100644 --- a/modules/Makefile.am +++ b/modules/Makefile.am @@ -42,5 +42,10 @@ included-modules: ( cd $$d && $(MAKE) $(AM_MAKEFLAGS) included-modules ) ; \ done -.PHONY: included-modules +dynamic-modules: + @for d in $(SUBDIRS) ; do \ + ( cd $$d && $(MAKE) $(AM_MAKEFLAGS) dynamic-modules ) ; \ + done + +.PHONY: included-modules dynamic-modules diff --git a/modules/arabic/Makefile.am b/modules/arabic/Makefile.am index d3e459e8..78c488e1 100644 --- a/modules/arabic/Makefile.am +++ b/modules/arabic/Makefile.am @@ -22,9 +22,11 @@ INCLUDES += $(FREETYPE_CFLAGS) if INCLUDE_ARABIC_FC noinst_LTLIBRARIES += libpango-arabic-fc.la else +if DYNAMIC_ARABIC_FC module_LTLIBRARIES += pango-arabic-fc.la endif endif +endif fc_sources = \ arabic-fc.c \ @@ -39,5 +41,6 @@ libpango_arabic_fc_la_CFLAGS = -DPANGO_MODULE_PREFIX=_pango_arabic_fc included-modules: $(noinst_LTLIBRARIES) +dynamic-modules: $(module_LTLIBRARIES) -.PHONY: included-modules +.PHONY: included-modules dynamic-modules diff --git a/modules/basic/Makefile.am b/modules/basic/Makefile.am index 086a1cf9..4a17c224 100644 --- a/modules/basic/Makefile.am +++ b/modules/basic/Makefile.am @@ -26,9 +26,11 @@ INCLUDES += $(X_CFLAGS) if INCLUDE_BASIC_X noinst_LTLIBRARIES += libpango-basic-x.la else +if DYNAMIC_BASIC_X module_LTLIBRARIES += pango-basic-x.la endif endif +endif pango_basic_x_la_LDFLAGS = -module $(MODULE_LIBTOOL_OPTIONS) pango_basic_x_la_LIBADD = $(pangoxlibs) @@ -42,9 +44,11 @@ INCLUDES += $(FREETYPE_CFLAGS) if INCLUDE_BASIC_FC noinst_LTLIBRARIES += libpango-basic-fc.la else +if DYNAMIC_BASIC_FC module_LTLIBRARIES += pango-basic-fc.la endif endif +endif pango_basic_fc_la_LDFLAGS = -module $(MODULE_LIBTOOL_OPTIONS) pango_basic_fc_la_LIBADD = $(pangoft2libs) @@ -57,9 +61,11 @@ if HAVE_WIN32 if INCLUDE_BASIC_WIN32 noinst_LTLIBRARIES += libpango-basic-win32.la else +if DYNAMIC_BASIC_WIN32 module_LTLIBRARIES += pango-basic-win32.la endif endif +endif pango_basic_win32_la_LDFLAGS = -module $(MODULE_LIBTOOL_OPTIONS) pango_basic_win32_la_LIBADD = $(pangowin32libs) -lgdi32 @@ -80,9 +86,11 @@ INCLUDES += $(ATSUI_CFLAGS) $(CAIRO_CFLAGS) if INCLUDE_BASIC_ATSUI noinst_LTLIBRARIES += libpango-basic-atsui.la else +if DYNAMIC_BASIC_ATSUI module_LTLIBRARIES += pango-basic-atsui.la endif endif +endif pango_basic_atsui_la_LDFLAGS = -module $(MODULE_LIBTOOL_OPTIONS) -framework Carbon pango_basic_atsui_la_LIBADD = $(pangoatsuilibs) @@ -96,5 +104,6 @@ EXTRA_DIST = \ tables-small.i included-modules: $(noinst_LTLIBRARIES) +dynamic-modules: $(module_LTLIBRARIES) -.PHONY: included-modules +.PHONY: included-modules dynamic-modules diff --git a/modules/hangul/Makefile.am b/modules/hangul/Makefile.am index 451e8367..9b57f036 100644 --- a/modules/hangul/Makefile.am +++ b/modules/hangul/Makefile.am @@ -22,9 +22,11 @@ INCLUDES += $(FREETYPE_CFLAGS) if INCLUDE_HANGUL_FC noinst_LTLIBRARIES += libpango-hangul-fc.la else +if DYNAMIC_HANGUL_FC module_LTLIBRARIES += pango-hangul-fc.la endif endif +endif fc_sources = hangul-fc.c hangul-defs.h @@ -39,5 +41,6 @@ EXTRA_DIST = \ tables-jamos.i included-modules: $(noinst_LTLIBRARIES) +dynamic-modules: $(module_LTLIBRARIES) -.PHONY: included-modules +.PHONY: included-modules dynamic-modules diff --git a/modules/hebrew/Makefile.am b/modules/hebrew/Makefile.am index b084924a..3b03c8f6 100644 --- a/modules/hebrew/Makefile.am +++ b/modules/hebrew/Makefile.am @@ -24,9 +24,11 @@ INCLUDES += $(FREETYPE_CFLAGS) if INCLUDE_HEBREW_FC noinst_LTLIBRARIES += libpango-hebrew-fc.la else +if DYNAMIC_HEBREW_FC module_LTLIBRARIES += pango-hebrew-fc.la endif endif +endif hebrew_fc_sources = $(common_sources) hebrew-fc.c @@ -38,5 +40,6 @@ libpango_hebrew_fc_la_CFLAGS = -DPANGO_MODULE_PREFIX=_pango_hebrew_fc included-modules: $(noinst_LTLIBRARIES) +dynamic-modules: $(module_LTLIBRARIES) -.PHONY: included-modules +.PHONY: included-modules dynamic-modules diff --git a/modules/indic/Makefile.am b/modules/indic/Makefile.am index 06ee65de..c604492d 100644 --- a/modules/indic/Makefile.am +++ b/modules/indic/Makefile.am @@ -22,9 +22,11 @@ INCLUDES += $(FREETYPE_CFLAGS) if INCLUDE_INDIC_FC noinst_LTLIBRARIES += libpango-indic-fc.la else +if DYNAMIC_INDIC_FC module_LTLIBRARIES += pango-indic-fc.la endif endif +endif fc_sources = \ indic-fc.c \ @@ -42,6 +44,7 @@ libpango_indic_fc_la_CFLAGS = -DPANGO_MODULE_PREFIX=_pango_indic_fc included-modules: $(noinst_LTLIBRARIES) +dynamic-modules: $(module_LTLIBRARIES) -.PHONY: included-modules +.PHONY: included-modules dynamic-modules diff --git a/modules/khmer/Makefile.am b/modules/khmer/Makefile.am index 47a12f7b..d79aa2a4 100644 --- a/modules/khmer/Makefile.am +++ b/modules/khmer/Makefile.am @@ -22,9 +22,11 @@ INCLUDES += $(FREETYPE_CFLAGS) if INCLUDE_KHMER_FC noinst_LTLIBRARIES += libpango-khmer-fc.la else +if DYNAMIC_KHMER_FC module_LTLIBRARIES += pango-khmer-fc.la endif endif +endif fc_sources = \ khmer-fc.c @@ -37,5 +39,6 @@ libpango_khmer_fc_la_CFLAGS = -DPANGO_MODULE_PREFIX=_pango_khmer_fc included-modules: $(noinst_LTLIBRARIES) +dynamic-modules: $(module_LTLIBRARIES) -.PHONY: included-modules +.PHONY: included-modules dynamic-modules diff --git a/modules/syriac/Makefile.am b/modules/syriac/Makefile.am index 4b8a3853..302df7d3 100644 --- a/modules/syriac/Makefile.am +++ b/modules/syriac/Makefile.am @@ -21,9 +21,11 @@ INCLUDES += $(FREETYPE_CFLAGS) if INCLUDE_SYRIAC_FC noinst_LTLIBRARIES += libpango-syriac-fc.la else +if DYNAMIC_SYRIAC_FC module_LTLIBRARIES += pango-syriac-fc.la endif endif +endif fc_sources = \ syriac-fc.c \ @@ -38,5 +40,6 @@ libpango_syriac_fc_la_CFLAGS = -DPANGO_MODULE_PREFIX=_pango_syriac_fc included-modules: $(noinst_LTLIBRARIES) +dynamic-modules: $(module_LTLIBRARIES) -.PHONY: included-modules +.PHONY: included-modules dynamic-modules diff --git a/modules/thai/Makefile.am b/modules/thai/Makefile.am index dbaf3d30..05a26ad0 100644 --- a/modules/thai/Makefile.am +++ b/modules/thai/Makefile.am @@ -24,9 +24,11 @@ INCLUDES += $(FREETYPE_CFLAGS) if INCLUDE_THAI_FC noinst_LTLIBRARIES += libpango-thai-fc.la else +if DYNAMIC_THAI_FC module_LTLIBRARIES += pango-thai-fc.la endif endif +endif thai_fc_sources = $(common_sources) thai-fc.c thai-ot.c thai-ot.h @@ -38,5 +40,6 @@ libpango_thai_fc_la_CFLAGS = -DPANGO_MODULE_PREFIX=_pango_thai_fc included-modules: $(noinst_LTLIBRARIES) +dynamic-modules: $(module_LTLIBRARIES) -.PHONY: included-modules +.PHONY: included-modules dynamic-modules diff --git a/modules/tibetan/Makefile.am b/modules/tibetan/Makefile.am index d8c822e0..6cb71164 100644 --- a/modules/tibetan/Makefile.am +++ b/modules/tibetan/Makefile.am @@ -20,9 +20,11 @@ INCLUDES += $(FREETYPE_CFLAGS) if INCLUDE_TIBETAN_FC noinst_LTLIBRARIES += libpango-tibetan-fc.la else +if DYNAMIC_TIBETAN_FC module_LTLIBRARIES += pango-tibetan-fc.la endif endif +endif tibetan_fc_sources = $(common_sources) tibetan-fc.c @@ -34,5 +36,6 @@ libpango_tibetan_fc_la_CFLAGS = -DPANGO_MODULE_PREFIX=_pango_tibetan_fc included-modules: $(noinst_LTLIBRARIES) +dynamic-modules: $(module_LTLIBRARIES) -.PHONY: included-modules +.PHONY: included-modules dynamic-modules |