dnl Process this file with autoconf to create configure. AC_INIT(ChangeLog) PANGO_MAJOR_VERSION=0 PANGO_MINOR_VERSION=17 AC_SUBST(PANGO_MAJOR_VERSION) AC_SUBST(PANGO_MINOR_VERSION) AM_INIT_AUTOMAKE(pango, $PANGO_MAJOR_VERSION.$PANGO_MINOR_VERSION) AM_CONFIG_HEADER(config.h) AC_PROG_CC AM_PROG_LIBTOOL changequote(,)dnl if test "x$GCC" = "xyes"; then case " $CFLAGS " in *[\ \ ]-Wall[\ \ ]*) ;; *) CFLAGS="$CFLAGS -Wall" ;; esac fi changequote([,])dnl AC_PATH_XTRA AC_ARG_ENABLE(rebuilds, [ --disable-rebuilds disable all source autogeneration rules],,enable_rebuilds=yes) # define a MAINT-like variable REBUILD which is set if Perl # is found, so autogenerated sources can be rebuilt AC_CHECK_PROGS(PERL, perl5 perl) REBUILD=\# if test "x$enable_rebuilds" = "xyes" && \ test -n "$PERL" && \ $PERL -e 'exit !($] >= 5.002)' > /dev/null 2>&1 ; then REBUILD= fi AC_SUBST(REBUILD) if test x$no_x = xyes ; then AC_MSG_WARN([X development libraries not found]) have_x=false else X_LIBS="$X_LIBS -lX11" have_x=true fi AM_CONDITIONAL(HAVE_X, $have_x) # # Checks for FreeType # FREETYPE_LIBS= FREETYPE_CFLAGS= have_freetype=false AC_PATH_PROG(FREETYPE_CONFIG, freetype-config, no) if test "x$FREETYPE_CONFIG" != "xno" ; then FREETYPE_CFLAGS=`$FREETYPE_CONFIG --cflags` FREETYPE_LIBS=`$FREETYPE_CONFIG --libs` AC_CHECK_LIB(freetype, FT_New_Face, have_freetype=true ,:,$FREETYPE_LIBS) if $have_freetype ; then pango_save_cppflags="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $FREETYPE_CFLAGS" AC_MSG_CHECKING([For sufficiently new FreeType (at least 2.0.1)]) AC_TRY_COMPILE([ #include #include FT_ERRORS_H ] ,[(void)1;],:,have_freetype=false) if $have_freetype ; then AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) fi CPPFLAGS="$pango_save_cppflags" fi fi AC_SUBST(FREETYPE_LIBS) AC_SUBST(FREETYPE_CFLAGS) AM_CONDITIONAL(HAVE_FREETYPE, $have_freetype) # # Checks for Xft/XRender # have_xft=false XFT_LIBS="" XFT_CFLAGS="" if test $have_x = true ; then if test $have_freetype = true ; then pango_save_cppflags="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $FREETYPE_CFLAGS" AC_CHECK_LIB(Xrender, XRenderFindFormat, AC_CHECK_LIB(Xft, XftFontOpen, AC_CHECK_HEADER(X11/Xft/XftFreetype.h, have_xft=true,:), :,-lXrender -lXext $X_LIBS $FREETYPE_LIBS) ,:,-lXext $X_LIBS) CPPFLAGS="$pango_save_cppflags" if $have_xft = 'true' ; then XFT_LIBS="-lXft -lXrender -lXext $X_LIBS $FREETYPE_LIBS" fi fi fi AC_SUBST(XFT_LIBS) AM_CONDITIONAL(HAVE_XFT, $have_xft) # # Checks for GLib # AM_PATH_GLIB_2_0(1.3.5,,,gobject gmodule) CFLAGS="$CFLAGS $GLIB_CFLAGS" AC_SUBST(GLIB_LIBS) AC_SUBST(GLIB_CFLAGS) # # Checks for fribidi # AC_ARG_WITH(fribidi, [ --with-fribidi Use external fribidi library ],,with_fribidi=no) FRIBIDI_LIBS="" FRIBIDI_CFLAGS="" FRIBIDI_PC="" have_fribidi=no if test "x$with_fribidi" = "xyes" ; then AC_PATH_PROG(FRIBIDI_CONFIG, fribidi-config, no) if test x$FRIBIDI_CONFIG = xno ; then AC_MSG_ERROR([*** fribidi-config not found]) fi if $FRIBIDI_CONFIG --cflags | grep lib/glib/include > /dev/null ; then AC_MSG_ERROR([*** fribidi appears to be compiled against GLib-1.2.x. *** You must compile fribidi with GLib-1.3.1 or better.]) fi FRIBIDI_CFLAGS="`$FRIBIDI_CONFIG --cflags`" CFLAGS="$CFLAGS $FRIBIDI_CFLAGS" FRIBIDI_LIBS="`$FRIBIDI_CONFIG --libs`" FRIBIDI_PC="fribidi," AC_CHECK_LIB(fribidi, fribidi_get_mirror_char, :, AC_MSG_ERROR([*** libfribidi not found.]), $FRIBIDI_LIBS) AC_DEFINE(HAVE_FRIBIDI) have_fribidi=yes fi AC_SUBST(FRIBIDI_LIBS) AC_SUBST(FRIBIDI_CFLAGS) AC_SUBST(FRIBIDI_PC) AM_CONDITIONAL(HAVE_FRIBIDI, test x$have_fribidi = xyes) # # The OpenType test programs aren't particularly portable # have_varargs=no AC_MSG_CHECKING(Whether to build OpenType test programs) pango_save_cppflags="$CPPFLAGS" AC_TRY_COMPILE([#include ],[ #if !(defined(G_HAVE_ISO_VARARGS) || defined(G_HAVE_GNUC_VARARGS)) #error "No varargs macro definitions" #endif ],have_varargs=yes) AC_MSG_RESULT($have_varargs) AM_CONDITIONAL(BUILD_OT_TESTS, test $have_varargs = yes) # # Allow building some or all modules included # AC_MSG_CHECKING(modules to link statically) AC_ARG_WITH(included_modules, [ --with-included-modules=MODULE1,MODULE2,... Build the given modules into Pango]) indic_modules="gurmukhi-x,bengali-x,gujarati-x,devanagari-x,myanmar-x" all_modules="arabic-x,arabic-xft,hebrew-x,basic-x,basic-ft2,basic-xft,hangul-x,tamil-x,tamil-xft,thai-x,$indic_modules" 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="$all_modules" else included_modules="$with_included_modules" fi fi AC_MSG_RESULT($included_modules) AM_CONDITIONAL(HAVE_INCLUDED_MODULES, test "x$included_modules" != x) INCLUDED_X_MODULES= INCLUDED_XFT_MODULES= INCLUDED_FT2_MODULES= IFS="${IFS= }"; pango_save_ifs="$IFS"; IFS="," for module in $included_modules; do if echo $indic_modules | grep "\(^\| \)$module\(\$\| \)" > /dev/null; then dir=indic else dir=`echo $module | sed "s/-.*//"` fi if echo $module | grep -- "-xft\($\|,\)" > /dev/null; then INCLUDED_XFT_MODULES="$INCLUDED_XFT_MODULES \$(top_builddir)/modules/$dir/libpango-$module.la" elif echo $module | grep -- "-ft2\($\|,\)" > /dev/null; then INCLUDED_FT2_MODULES="$INCLUDED_FT2_MODULES \$(top_builddir)/modules/$dir/libpango-$module.la" elif echo $module | grep -- "-x\($\|,\)" > /dev/null; then INCLUDED_X_MODULES="$INCLUDED_X_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_XFT_MODULES) AC_SUBST(INCLUDED_FT2_MODULES) AM_CONDITIONAL(INCLUDE_ARABIC_X,echo $included_modules | grep '\(^\|,\)arabic-x\($\|,\)' > /dev/null) AM_CONDITIONAL(INCLUDE_ARABIC_XFT,echo $included_modules | grep '\(^\|,\)arabic-xft\($\|,\)' > /dev/null) AM_CONDITIONAL(INCLUDE_BASIC_X,echo $included_modules | grep '\(^\|,\)basic-x\($\|,\)' > /dev/null) AM_CONDITIONAL(INCLUDE_BASIC_FT2,echo $included_modules | grep '\(^\|,\)basic-ft2\($\|,\)' > /dev/null) AM_CONDITIONAL(INCLUDE_BASIC_XFT,echo $included_modules | grep '\(^\|,\)basic-xft\($\|,\)' > /dev/null) AM_CONDITIONAL(INCLUDE_HANGUL_X,echo $included_modules | grep '\(^\|,\)hangul-x\($\|,\)' > /dev/null) AM_CONDITIONAL(INCLUDE_TAMIL_X,echo $included_modules | grep '\(^\|,\)tamil-x\($\|,\)' > /dev/null) AM_CONDITIONAL(INCLUDE_TAMIL_XFT,echo $included_modules | grep '\(^\|,\)tamil-xft\($\|,\)' > /dev/null) AM_CONDITIONAL(INCLUDE_THAI_X,echo $included_modules | grep '\(^\|,\)thai-x\($\|,\)' > /dev/null) AM_CONDITIONAL(INCLUDE_HEBREW_X,echo $included_modules | grep '\(^\|,\)hebrew-x\($\|,\)' > /dev/null) AM_CONDITIONAL(INCLUDE_MYANMAR_X,echo $included_modules | grep '\(^\|,\)myanmar-x\($\|,\)' > /dev/null) AM_CONDITIONAL(INCLUDE_GURMUKHI_X,echo $included_modules | grep '\(^\|,\)gurmukhi-x\($\|,\)' > /dev/null) AM_CONDITIONAL(INCLUDE_BENGALI_X,echo $included_modules | grep '\(^\|,\)bengali-x\($\|,\)' > /dev/null) AM_CONDITIONAL(INCLUDE_GUJARATI_X,echo $included_modules | grep '\(^\|,\)gujarati-x\($\|,\)' > /dev/null) AM_CONDITIONAL(INCLUDE_DEVANAGARI_X,echo $included_modules | grep '\(^\|,\)devanagari-x\($\|,\)' > /dev/null) # # We use flockfile to implement pango_getline() - should be moved to GLib # AC_CHECK_FUNCS(flockfile) # # Check for Qt - which we use for building the viewer example, if # present # AC_ARG_WITH(qt, [ --with-qt=DIR Location where Qt is installed],,with_qt=yes) QTDIR= AC_MSG_CHECKING(For Qt location) if test "x$with_qt" = xyes ; then # Search for Qt in a common location. The ls -r is an attempt to find the newest dirs=`ls -d -r /usr/lib/qt*` for dir in $dirs ; do if test -x $dir/bin/moc ; then QTDIR=$dir break fi done else if test "x$with_qt" != xno ; then if test -x $with_qt/bin/moc ; then QTDIR=$with_qt fi fi fi if test "x$QTDIR" = x ; then AC_MSG_RESULT(none) else AC_MSG_RESULT($QTDIR) AC_PROG_CXX fi AM_CONDITIONAL(BUILD_QT_TEST, test "x$QTDIR" != x) AC_SUBST(QTDIR) dnl ************************** dnl *** Checks for gtk-doc *** dnl ************************** AC_ARG_WITH(html-dir, [ --with-html-dir=PATH path to installed docs ]) if test "x$with_html_dir" = "x" ; then HTML_DIR='${datadir}/gtk-doc/html' else HTML_DIR=$with_html_dir fi AC_SUBST(HTML_DIR) AC_CHECK_PROG(GTKDOC, gtkdoc-mkdb, true, false) gtk_doc_min_version=0.6 if $GTKDOC ; then gtk_doc_version=`gtkdoc-mkdb --version` AC_MSG_CHECKING([gtk-doc version ($gtk_doc_version) >= $gtk_doc_min_version]) if perl <= "$gtk_doc_min_version") ? 0 : 1); EOF AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) GTKDOC=false fi fi AM_CONDITIONAL(HAVE_GTK_DOC, $GTKDOC) AC_SUBST(HAVE_GTK_DOC) AC_CHECK_PROG(DB2HTML, db2html, true, false) AM_CONDITIONAL(HAVE_DOCBOOK, $DB2HTML) dnl Let people disable the gtk-doc stuff. AC_ARG_ENABLE(gtk-doc, [ --enable-gtk-doc Use gtk-doc to build documentation [default=auto]], enable_gtk_doc="$enableval", enable_gtk_doc=auto) if test x$enable_gtk_doc = xauto ; then if test x$GTKDOC = xtrue ; then enable_gtk_doc=yes else enable_gtk_doc=no fi fi dnl NOTE: We need to use a separate automake conditional for this dnl to make this work with the tarballs. AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes) AC_OUTPUT_COMMANDS([ cat > pango/module-defs.h <> pango/module-defs.h < pango/module-defs-x.c < /dev/null; then module_c=`echo $module | sed s/-/_/` cat >> pango/module-defs-x.c <> pango/module-defs-x.c < pango/module-defs-xft.c < /dev/null; then module_c=`echo $module | sed s/-/_/` cat >> pango/module-defs-xft.c <> pango/module-defs-xft.c < pango/module-defs-ft2.c < /dev/null; then module_c=`echo $module | sed s/-/_/` cat >> pango/module-defs-ft2.c <> pango/module-defs-ft2.c <