diff options
author | James Henstridge <james@daa.com.au> | 2003-03-11 12:31:16 +0000 |
---|---|---|
committer | James Henstridge <jamesh@src.gnome.org> | 2003-03-11 12:31:16 +0000 |
commit | bdd7e7f65c9f97b397b4ebe2550a6c2752adfe08 (patch) | |
tree | 26110dd7a72388712a01aad97aa1ce4ed29f4eb1 /configure.in | |
parent | 411bd8c907fbf018a8d7529b6a858a8c11f87bd3 (diff) | |
download | pango-bdd7e7f65c9f97b397b4ebe2550a6c2752adfe08.tar.gz |
make similar changes to the ones on glib head (call gtk-docize, etc).
2003-03-11 James Henstridge <james@daa.com.au>
* autogen.sh: make similar changes to the ones on glib head (call
gtk-docize, etc).
* configure.in: move some calculations into M4 macros, rather than
calculating them when configure runs.
Use AC_HELP_STRING where appropriate.
Replace gtk-doc checks with a call to GTK_DOC_CHECK.
Replace AC_OUTPUT_COMMANDS() call with a number of calls to
AC_CONFIG_COMMANDS (once per created file).
Get rid of the "chmod +x pango-config" bit, because there is no
pango-config anymore.
* Makefile.am: get rid of custom distcheck rule, and set
DISTCHECK_CONFIGURE_FLAGS, which is equivalent.
Use += to select which .pc files to install.
* pango/Makefile.am: Add rules to rebuild module-defs* files, and
remove them on clean.
Reorder so that rules related to each individual library are next
to each other.
Use BUILT_SOURCES for built sources.
* pango/opentype/Makefile.am: don't use STRIP_BEGIN/STRIP_END.
* modules/*/Makefile.am: simplify module makefiles through use of
+=, and regularise them a bit (fixed a few bugs in the process).
* docs/Makefile.am: remove common rules, and instead include
gtk-doc.make.
* examples/Makefile.am: add pango.modules to CLEANFILES.
* tests/Makefile.am: remove temporary files on clean.
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 204 |
1 files changed, 92 insertions, 112 deletions
diff --git a/configure.in b/configure.in index 40daf720..cebd5e9e 100644 --- a/configure.in +++ b/configure.in @@ -1,6 +1,5 @@ dnl Process this file with autoconf to create configure. -AC_PREREQ(2.53) -AC_INIT(ChangeLog) +AC_PREREQ(2.54) dnl ========================================================================== dnl Versioning @@ -21,30 +20,42 @@ dnl of them. dnl dnl The triplet -m4_define([pango_major_version],1) -m4_define([pango_minor_version],2) -m4_define([pango_micro_version],1) - -PANGO_MAJOR_VERSION=pango_major_version() -PANGO_MINOR_VERSION=pango_minor_version() -PANGO_MICRO_VERSION=pango_micro_version() -PANGO_VERSION=$PANGO_MAJOR_VERSION.$PANGO_MINOR_VERSION.$PANGO_MICRO_VERSION - +m4_define([pango_major_version], [1]) +m4_define([pango_minor_version], [2]) +m4_define([pango_micro_version], [1]) +m4_define([pango_version], + [pango_major_version.pango_minor_version.pango_micro_version]) dnl The X.Y in -lpango-X.Y line. This is expected to stay 1.0 until Pango 2. -PANGO_API_VERSION=1.0 - +m4_define([pango_api_version], [1.0]) dnl Number of releases since we've added interfaces -PANGO_INTERFACE_AGE=0 - +m4_define([pango_interface_age], [0]) dnl Number of releases since we've broken binary compatibility. -# PANGO_BINARY_AGE=0 -PANGO_BINARY_AGE=`expr 100 '*' $PANGO_MINOR_VERSION + $PANGO_MICRO_VERSION` - +m4_define([pango_binary_age], + [m4_eval(100 * pango_minor_version + pango_micro_version)]) dnl This is the last version with which we have compatibility with dnl with the modules for; it isn't the same as dnl PANGO_API_VERSION.'PANGO_MICRO_VERSION - PANGO_BINARY_AGE' since we have dnl engine only API -PANGO_MODULE_VERSION=1.2.0 +m4_define([pango_module_version], [1.2.0]) + + +AC_INIT(pango, [pango_version], + [http://bugzilla.gnome.org/enter_bug.cgi?product=pango]) + +AC_CONFIG_SRCDIR([ChangeLog]) + +AM_INIT_AUTOMAKE +AM_CONFIG_HEADER([config.h]) + + +PANGO_MAJOR_VERSION=pango_major_version() +PANGO_MINOR_VERSION=pango_minor_version() +PANGO_MICRO_VERSION=pango_micro_version() +PANGO_VERSION=pango_version() +PANGO_API_VERSION=pango_api_version() +PANGO_INTERFACE_AGE=pango_interface_age() +PANGO_BINARY_AGE=pango_binary_age() +PANGO_MODULE_VERSION=pango_module_version() AC_SUBST(PANGO_MAJOR_VERSION) AC_SUBST(PANGO_MINOR_VERSION) @@ -56,28 +67,24 @@ AC_SUBST(PANGO_BINARY_AGE) AC_SUBST(PANGO_MODULE_VERSION) dnl libtool versioning -lt_current=`expr 100 '*' $PANGO_MINOR_VERSION + $PANGO_MICRO_VERSION - $PANGO_INTERFACE_AGE` -lt_revision=$PANGO_INTERFACE_AGE -lt_age=`expr $PANGO_BINARY_AGE - $PANGO_INTERFACE_AGE` -LT_VERSION_INFO="$lt_current:$lt_revision:$lt_age" -LT_CURRENT_MINUS_AGE=`expr $lt_current - $lt_age` +m4_define([lt_current], [m4_eval(100 * pango_minor_version + pango_micro_version - pango_interface_age)]) +m4_define([lt_revision], [pango_interface_age]) +m4_define([lt_age], [m4_eval(pango_binary_age - pango_interface_age)]) +LT_VERSION_INFO="lt_current():lt_revision():lt_age()" +LT_CURRENT_MINUS_AGE=m4_eval(lt_current - lt_age) AC_SUBST(LT_VERSION_INFO) AC_SUBST(LT_CURRENT_MINUS_AGE) dnl ========================================================================== -AM_INIT_AUTOMAKE(pango, $PANGO_VERSION) - -AM_CONFIG_HEADER(config.h) - AC_PROG_CC dnl dnl Check for a working C++ compiler, but do not bail out, if none is found. dnl We use this for an automated test for C++ header correctness. dnl -AC_CHECK_PROGS(CXX, $CCC c++ g++ gcc CC cxx cc++ cl, gcc) +AC_CHECK_PROGS(CXX, [$CCC c++ g++ gcc CC cxx cc++ cl], gcc) AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE(,[class a { int b; } c;], ,CXX=) @@ -128,10 +135,13 @@ changequote([,])dnl dnl declare --enable-* args and collect ac_help strings -m4_define([debug_default],dnl -m4_if(m4_bregexp(pango_minor_version(),[[13579]]),-1,minimum,yes)) +m4_define([debug_default], + m4_if(m4_eval(pango_minor_version() % 2), [1], [yes], [minimum])) -AC_ARG_ENABLE(debug, [ --enable-debug=[no/minimum/yes] turn on debugging @<:@default=]debug_default()[@:>@],,enable_debug=debug_default()) +AC_ARG_ENABLE(debug, + AC_HELP_STRING([--enable-debug=@<:@no/minimum/yes@:>@], + [turn on debugging @<:@default=debug_default()@:>@]),, + enable_debug=debug_default()) if test "x$enable_debug" = "xyes"; then PANGO_DEBUG_FLAGS="-DPANGO_ENABLE_DEBUG" @@ -145,9 +155,12 @@ fi AC_SUBST(PANGO_DEBUG_FLAGS) -AC_ARG_ENABLE(rebuilds, [ --disable-rebuilds disable all source autogeneration rules],,enable_rebuilds=yes) +AC_ARG_ENABLE(rebuilds, + [AC_HELP_STRING([--disable-rebuilds], + [disable all source autogeneration rules])],, + [enable_rebuilds=yes]) -AM_CONDITIONAL(CROSS_COMPILING, test $cross_compiling = yes) +AM_CONDITIONAL(CROSS_COMPILING, [test $cross_compiling = yes]) # define a MAINT-like variable REBUILD which is set if Perl # is found, so autogenerated sources can be rebuilt @@ -305,7 +318,9 @@ AM_CONDITIONAL(HAVE_FRIBIDI, test x$have_fribidi = xyes) # # Allow setting a default path for XftConfig # -AC_ARG_WITH(xftconfig-dir, [ --with-xftconfig-dir=PATH path to system XftConfig file for minixft ]) +AC_ARG_WITH(xftconfig-dir, + [AC_HELP_STRING([--with-xftconfig-dir=PATH], + [path to system XftConfig file for minixft])]) if test "x$with_xftconfig_dir" != "x"; then AC_DEFINE_UNQUOTED(MINI_XFTCONFIG_DIR, "$with_xftconfig_dir") @@ -334,7 +349,13 @@ CPPFLAGS=$pango_saved_cppflags # AC_MSG_CHECKING(modules to link statically) -AC_ARG_WITH(included_modules, [ --with-included-modules=MODULE1,MODULE2,... build the given modules into Pango]) +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-ft2,arabic-x,arabic-xft" basic_modules="basic-ft2,basic-win32,basic-x,basic-xft" @@ -431,9 +452,10 @@ AC_CHECK_FUNCS(flockfile strtok_r) # AC_ARG_WITH(usp10, -[ --with-usp10=DIRECTORY where to find the usp10.h header file for Win32 - (typically the Include directory in the - Platform SDK)]) + [AC_HELP_STRING([--with-usp10=DIRECTORY], + [where to find the usp10.h header file for Win32 + (typically the Include directory in the + Platform SDK)])]) USP10_H=no if test "${with_usp10+set}" = set && test "$with_usp10" != no; then @@ -460,7 +482,10 @@ AM_CONDITIONAL(HAVE_USP10_H, test "$USP10_H" != no) # present # -AC_ARG_WITH(qt, [ --with-qt=DIR location where Qt is installed],,with_qt=yes) +AC_ARG_WITH(qt, + [AC_HELP_STRING([--with-qt=DIR], + [location where Qt is installed])],, + [with_qt=yes]) if test "$CXX" != "" ; then AC_MSG_CHECKING(For Qt location) @@ -528,64 +553,7 @@ 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) - -# -# Check for sufficiently new gtk-doc -# -gtk_doc_min_version=0.10 - -AC_CHECK_PROG(GTKDOC, gtkdoc-mkdb, true, false) -if $GTKDOC ; then - gtk_doc_version=`gtkdoc-mkdb --version` - AC_MSG_CHECKING([gtk-doc version ($gtk_doc_version) >= $gtk_doc_min_version]) - - IFS="${IFS= }"; pango_save_IFS="$IFS"; IFS="." - set $gtk_doc_version - for min in $gtk_doc_min_version ; do - cur=$1; shift - if test -z $min ; then break; fi - if test -z $cur ; then GTKDOC=false; break; fi - if test $cur -gt $min ; then break ; fi - if test $cur -lt $min ; then GTKDOC=false; break ; fi - done - IFS="$pango_save_IFS" - - if $GTKDOC ; then - AC_MSG_RESULT(yes) - else - AC_MSG_RESULT(no) - 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=no]], enable_gtk_doc="$enableval", enable_gtk_doc=no) - -if test x$enable_gtk_doc = xyes ; 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) +GTK_DOC_CHECK([1.0]) dnl ******************************************************** dnl * See whether we need to load our modules as .la files * @@ -640,7 +608,8 @@ AC_SUBST(PKGCONFIG_XFT_LIBS) AC_SUBST(PKGCONFIG_FREETYPE_LIBS) AM_CONDITIONAL(DISABLE_EXPLICIT_DEPS, test $enable_explicit_deps = no) -AC_OUTPUT_COMMANDS([ +AC_CONFIG_COMMANDS([pango/module-defs.h], +[ cat > pango/module-defs.h <<EOTEXT /* Autogenerated by configure. Do not edit */ @@ -660,14 +629,19 @@ EOTEXT done IFS="$pango_save_ifs" +],[ +included_modules=$included_modules +]) +AC_CONFIG_COMMANDS([pango/module-defs-x.c], +[ ### X modules cat > pango/module-defs-x.c <<EOTEXT /* Autogenerated by configure. Do not edit */ #include "module-defs.h" -PangoIncludedModule _pango_included_x_modules[] = { +PangoIncludedModule _pango_included_x_modules@<:@@:>@ = { EOTEXT IFS="${IFS= }"; pango_save_ifs="$IFS"; IFS="," @@ -686,15 +660,17 @@ cat >> pango/module-defs-x.c <<EOTEXT { NULL, NULL, NULL }, }; EOTEXT +]) - +AC_CONFIG_COMMANDS([pango/module-defs-xft.c], +[ ### XFT modules cat > pango/module-defs-xft.c <<EOTEXT /* Autogenerated by configure. Do not edit */ #include "module-defs.h" -PangoIncludedModule _pango_included_xft_modules[] = { +PangoIncludedModule _pango_included_xft_modules@<:@@:>@ = { EOTEXT IFS="${IFS= }"; pango_save_ifs="$IFS"; IFS="," @@ -713,15 +689,17 @@ cat >> pango/module-defs-xft.c <<EOTEXT { NULL, NULL, NULL }, }; EOTEXT +]) - +AC_CONFIG_COMMANDS([pango/module-defs-ft2.c], +[ ### FT2 modules cat > pango/module-defs-ft2.c <<EOTEXT /* Autogenerated by configure. Do not edit */ #include "module-defs.h" -PangoIncludedModule _pango_included_ft2_modules[] = { +PangoIncludedModule _pango_included_ft2_modules@<:@@:>@ = { EOTEXT IFS="${IFS= }"; pango_save_ifs="$IFS"; IFS="," @@ -740,14 +718,17 @@ cat >> pango/module-defs-ft2.c <<EOTEXT { NULL, NULL, NULL }, }; EOTEXT +]) +AC_CONFIG_COMMANDS([pango/module-defs-win32.c], +[ ### Win32 modules cat > pango/module-defs-win32.c <<EOTEXT /* Autogenerated by configure. Do not edit */ #include "module-defs.h" -PangoIncludedModule _pango_included_win32_modules[] = { +PangoIncludedModule _pango_included_win32_modules@<:@@:>@ = { EOTEXT IFS="${IFS= }"; pango_save_ifs="$IFS"; IFS="," @@ -766,18 +747,16 @@ cat >> pango/module-defs-win32.c <<EOTEXT { NULL, NULL, NULL }, }; EOTEXT - -],[ -included_modules=$included_modules ]) + AC_HEADER_DIRENT AC_CHECK_HEADER(unistd.h, AC_DEFINE(HAVE_UNISTD_H)) # Honor aclocal flags ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS" -AC_OUTPUT([ +AC_CONFIG_FILES([ Makefile pango/Makefile pango/mini-fribidi/Makefile @@ -809,9 +788,10 @@ pangowin32-uninstalled.pc pangoft2-uninstalled.pc pangoxft-uninstalled.pc pango-zip.sh -],[case "$CONFIG_FILES" in -*pango-config*)chmod +x pango-config;; -esac]) +]) + +AC_OUTPUT + echo "configuration: backends: `if $have_freetype && $have_fontconfig; then echo " FreeType"; fi \ ``if $have_x ; then echo " X"; fi \ |