summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in81
1 files changed, 81 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index e6cf50f7..655bfaa2 100644
--- a/configure.in
+++ b/configure.in
@@ -17,6 +17,13 @@ if test "x$GCC" = "xyes"; then
fi
changequote([,])dnl
+AC_PATH_X
+if test x$no_x = xyes ; then
+ AC_MSG_ERROR([X development libraries not found])
+fi
+X_LIBS="-L$x_libraries -lX11"
+AC_SUBST(X_LIBS)
+
gtk_works=no
AM_PATH_GTK(1.2.0,
[CFLAGS="$GTK_CFLAGS $CFLAGS"; gtk_works=yes],
@@ -95,12 +102,86 @@ if test "x$with_libiconv" = "xyes" ; then
UNICODE_LIBS="$UNICODE_LIBS -liconv"
fi
+#
+# Allow building some or all modules included
+#
+AC_ARG_WITH(included_modules, [ --with-included-modules=MODULE1,MODULE2,... Build the given modules into Pango])
+
+included_modules=""
+if ! test "x$with_included_modules" = xno || test "x$with_included_modules" = x ; then
+
+ # If no modules specified, include all modules
+ if test "x$with_included_modules" = xyes ; then
+ included_modules="arabic,devanagari,basic,hangul,tamil"
+ else
+ included_modules="$with_included_modules"
+ fi
+fi
+INCLUDED_MODULES=
+IFS="${IFS= }"; pango_save_ifs="$IFS"; IFS=","
+for module in $included_modules; do
+ INCLUDED_MODULES="$INCLUDED_MODULES \$(top_builddir)/modules/$module/libpango-$module.la"
+done
+IFS="$pango_save_ifs"
+
+AC_SUBST(INCLUDED_MODULES)
+
+AM_CONDITIONAL(INCLUDE_ARABIC,echo $included_modules | grep '\(^\|,\)arabic\($\|,\)' > /dev/null)
+AM_CONDITIONAL(INCLUDE_BASIC,echo $included_modules | grep '\(^\|,\)basic\($\|,\)' > /dev/null)
+AM_CONDITIONAL(INCLUDE_DEVANAGARI,echo $included_modules | grep '\(^\|,\)devanagari\($\|,\)' > /dev/null)
+AM_CONDITIONAL(INCLUDE_HANGUL,echo $included_modules | grep '\(^\|,\)hangul\($\|,\)' > /dev/null)
+AM_CONDITIONAL(INCLUDE_TAMIL,echo $included_modules | grep '\(^\|,\)tamil\($\|,\)' > /dev/null)
+
+#
+# We use flockfile to implement pango_getline() - should be moved to GLib
+#
AC_CHECK_FUNCS(flockfile)
AC_CHECK_PROG(gtkdoc, gtkdoc-scan, yes, no)
AM_CONDITIONAL(HAVE_GTK_DOC, test x$gtkdoc = xyes)
+AC_OUTPUT_COMMANDS([
+cat > pango/module-defs.c <<EOTEXT
+/* Autogenerated by configure. Do not edit */
+
+#include "modules.h"
+
+EOTEXT
+
+IFS="${IFS= }"; pango_save_ifs="$IFS"; IFS=","
+for module in $included_modules; do
+ cat >> pango/module-defs.c <<EOTEXT
+extern void _pango_${module}_script_engine_list (PangoEngineInfo **engines, int *n_engines);
+extern PangoEngine *_pango_${module}_script_engine_load (const char *id);
+extern void _pango_${module}_script_engine_unload (PangoEngine *engine);
+
+EOTEXT
+done
+IFS="$pango_save_ifs"
+
+cat >> pango/module-defs.c <<EOTEXT
+
+PangoIncludedModule _pango_included_modules[] = {
+EOTEXT
+
+IFS="${IFS= }"; pango_save_ifs="$IFS"; IFS=","
+for module in $included_modules; do
+ cat >> pango/module-defs.c <<EOTEXT
+ { _pango_${module}_script_engine_list, _pango_${module}_script_engine_load,_pango_${module}_script_engine_unload },
+EOTEXT
+done
+IFS="$pango_save_ifs"
+
+cat >> pango/module-defs.c <<EOTEXT
+ { NULL, NULL, NULL },
+};
+EOTEXT
+
+],[
+included_modules=$included_modules
+])
+
AC_OUTPUT([
Makefile
pango/Makefile