diff options
author | Behdad Esfahbod <behdad@gnome.org> | 2006-01-16 10:10:23 +0000 |
---|---|---|
committer | Behdad Esfahbod <behdad@src.gnome.org> | 2006-01-16 10:10:23 +0000 |
commit | 6cc141fdd95ba7b2623f176e7a4321524d600641 (patch) | |
tree | b8acaef91f4886ca12bc8fffbf12f9a600fa878e /configure.in | |
parent | 240877fc00047a2898f8f8d338684c2e4e087b90 (diff) | |
download | pango-6cc141fdd95ba7b2623f176e7a4321524d600641.tar.gz |
Fixes bug #71414, allowing to disable building/installing modules.
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.
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 144 |
1 files changed, 84 insertions, 60 deletions
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 |