988
988
AC_PATH_PROG(INTLTOOL_MSGMERGE, msgmerge, msgmerge)
989
989
AC_PATH_PROG(INTLTOOL_XGETTEXT, xgettext, xgettext)
991
# Remove file type tags (using []) from po/POTFILES.
993
ifdef([AC_DIVERSION_ICMDS],[
994
AC_DIVERT_PUSH(AC_DIVERSION_ICMDS)
995
[mv -f po/POTFILES po/POTFILES.tmp
996
sed -e '/[[]encoding.*]/d' -e 's/[[].*] *//' < po/POTFILES.tmp > po/POTFILES
997
rm -f po/POTFILES.tmp
1001
ifdef([AC_CONFIG_COMMANDS_PRE],[
1002
AC_CONFIG_COMMANDS_PRE([
1003
[mv -f po/POTFILES po/POTFILES.tmp
1004
sed -e '/[[]encoding.*]/d' -e 's/[[].*] *//' < po/POTFILES.tmp > po/POTFILES
1005
rm -f po/POTFILES.tmp
1011
# Manually sed perl in so people don't have to put the intltool scripts in AC_OUTPUT.
991
# Substitute ALL_LINGUAS so we can use it in po/Makefile
992
AC_SUBST(ALL_LINGUAS)
996
dnl The following is very similar to
998
dnl AC_CONFIG_FILES([intltool-extract intltool-merge intltool-update])
1000
dnl with the following slight differences:
1001
dnl - the *.in files are in ac_aux_dir,
1002
dnl - if the file haven't changed upon reconfigure, it's not touched,
1003
dnl - the evaluation of the third parameter enables a hack which computes
1004
dnl the actual value of $libdir,
1005
dnl - the user sees "executing intltool commands", instead of
1006
dnl "creating intltool-extract" and such.
1008
dnl Nothing crucial here, and we could use AC_CONFIG_FILES, if there were
1009
dnl a reason for it.
1013
1011
AC_CONFIG_COMMANDS([intltool], [
1015
intltool_edit="-e 's#@INTLTOOL_EXTRACT@#`pwd`/intltool-extract#g' \
1016
-e 's#@INTLTOOL_ICONV@#${INTLTOOL_ICONV}#g' \
1017
-e 's#@INTLTOOL_MSGFMT@#${INTLTOOL_MSGFMT}#g' \
1018
-e 's#@INTLTOOL_MSGMERGE@#${INTLTOOL_MSGMERGE}#g' \
1019
-e 's#@INTLTOOL_XGETTEXT@#${INTLTOOL_XGETTEXT}#g' \
1020
-e 's#@INTLTOOL_PERL@#${INTLTOOL_PERL}#g'"
1022
eval sed ${intltool_edit} < ${ac_aux_dir}/intltool-extract.in \
1023
> intltool-extract.out
1024
if cmp -s intltool-extract intltool-extract.out 2>/dev/null; then
1025
rm -f intltool-extract.out
1027
mv -f intltool-extract.out intltool-extract
1029
chmod ugo+x intltool-extract
1030
chmod u+w intltool-extract
1032
eval sed ${intltool_edit} < ${ac_aux_dir}/intltool-merge.in \
1033
> intltool-merge.out
1034
if cmp -s intltool-merge intltool-merge.out 2>/dev/null; then
1035
rm -f intltool-merge.out
1037
mv -f intltool-merge.out intltool-merge
1039
chmod ugo+x intltool-merge
1040
chmod u+w intltool-merge
1042
eval sed ${intltool_edit} < ${ac_aux_dir}/intltool-update.in \
1043
> intltool-update.out
1044
if cmp -s intltool-update intltool-update.out 2>/dev/null; then
1045
rm -f intltool-update.out
1047
mv -f intltool-update.out intltool-update
1049
chmod ugo+x intltool-update
1050
chmod u+w intltool-update
1052
], INTLTOOL_PERL='${INTLTOOL_PERL}' ac_aux_dir=${ac_aux_dir}
1053
INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}' ICONV='${INTLTOOL_ICONV}'
1054
MSGFMT='${INTLTOOL_MSGFMT}' MSGMERGE='${INTLTOOL_MSGMERGE}'
1055
XGETTEXT='${INTLTOOL_XGETTEXT}')
1013
for file in intltool-extract intltool-merge intltool-update; do
1014
sed -e "s|@INTLTOOL_EXTRACT@|`pwd`/intltool-extract|g" \
1015
-e "s|@INTLTOOL_LIBDIR@|${INTLTOOL_LIBDIR}|g" \
1016
-e "s|@INTLTOOL_ICONV@|${INTLTOOL_ICONV}|g" \
1017
-e "s|@INTLTOOL_MSGFMT@|${INTLTOOL_MSGFMT}|g" \
1018
-e "s|@INTLTOOL_MSGMERGE@|${INTLTOOL_MSGMERGE}|g" \
1019
-e "s|@INTLTOOL_XGETTEXT@|${INTLTOOL_XGETTEXT}|g" \
1020
-e "s|@INTLTOOL_PERL@|${INTLTOOL_PERL}|g" \
1021
< ${ac_aux_dir}/${file}.in > ${file}.out
1022
if cmp -s ${file} ${file}.out 2>/dev/null; then
1025
mv -f ${file}.out ${file}
1032
[INTLTOOL_PERL='${INTLTOOL_PERL}' ac_aux_dir='${ac_aux_dir}'
1033
prefix="$prefix" exec_prefix="$exec_prefix" INTLTOOL_LIBDIR="$libdir"
1034
INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}' INTLTOOL_ICONV='${INTLTOOL_ICONV}'
1035
INTLTOOL_MSGFMT='${INTLTOOL_MSGFMT}' INTLTOOL_MSGMERGE='${INTLTOOL_MSGMERGE}'
1036
INTLTOOL_XGETTEXT='${INTLTOOL_XGETTEXT}'])
1041
# IT_PO_SUBDIR(DIRNAME)
1042
# ---------------------
1043
# All po subdirs have to be declared with this macro; the subdir "po" is
1044
# declared by IT_PROG_INTLTOOL.
1046
AC_DEFUN([IT_PO_SUBDIR],
1047
[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
1049
dnl The following CONFIG_COMMANDS should be exetuted at the very end
1050
dnl of config.status.
1051
AC_CONFIG_COMMANDS_PRE([
1052
AC_CONFIG_COMMANDS([$1/stamp-it], [
1053
rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
1058
'"s|^| $ac_top_srcdir/|" \
1059
"$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
1061
if test ! -f "$1/Makefile"; then
1062
AC_MSG_ERROR([$1/Makefile is not ready.])
1064
mv "$1/Makefile" "$1/Makefile.tmp"
1065
[sed '/^POTFILES =/,/[^\\]$/ {
1069
' "$1/Makefile.tmp" >"$1/Makefile"]
1070
rm -f "$1/Makefile.tmp"
1071
mv "$1/stamp-it.tmp" "$1/stamp-it"
1059
1077
# deprecated macros
1060
AC_DEFUN([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL($@)])
1078
AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
1079
# A hint is needed for aclocal from Automake <= 1.9.4:
1080
# AC_DEFUN([AC_PROG_INTLTOOL], ...)
1063
1083
# isc-posix.m4 serial 2 (gettext-0.11.2)
8181
8201
AM_CONDITIONAL(GTK_DOC_USE_LIBTOOL, test -n "$LIBTOOL")
8204
dnl GNOME_DOC_INIT([MINIMUM-VERSION])
8206
AC_DEFUN([GNOME_DOC_INIT],
8208
dnl Only apply the version check if we're not configuring ourselves!
8209
if test "x$PACKAGE" != "xgnome-doc-utils"; then
8210
GDU_REQUIRED_VERSION=0.3.2
8211
if test -n "$1"; then
8212
GDU_REQUIRED_VERSION=$1
8215
PKG_CHECK_MODULES([GDU_MODULE_VERSION_CHECK],[gnome-doc-utils >= $GDU_REQUIRED_VERSION])
8218
AC_ARG_WITH([help-dir],
8219
AC_HELP_STRING([--with-help-dir=DIR], [path to help docs]),,
8220
[with_help_dir='${datadir}/gnome/help'])
8221
HELP_DIR="$with_help_dir"
8224
AC_ARG_WITH([omf-dir],
8225
AC_HELP_STRING([--with-omf-dir=DIR], [path to OMF files]),,
8226
[with_omf_dir='${datadir}/omf'])
8227
OMF_DIR="$with_omf_dir"
8230
AC_ARG_WITH([help-formats],
8231
AC_HELP_STRING([--with-help-formats=FORMATS], [list of formats]),,
8232
[with_help_formats=''])
8233
DOC_USER_FORMATS="$with_help_formats"
8234
AC_SUBST(DOC_USER_FORMATS)
8236
AC_ARG_ENABLE([scrollkeeper],
8237
[AC_HELP_STRING([--disable-scrollkeeper],
8238
[do not make updates to the scrollkeeper database])],,
8239
enable_scrollkeeper=yes)
8240
AM_CONDITIONAL(ENABLE_SK, test "x$enable_scrollkeeper" = "xyes")
8242
AC_OUTPUT_COMMANDS([
8243
gdumk=`pkg-config --variable datadir gnome-doc-utils`/gnome-doc-utils/gnome-doc-utils.make
8244
if test -f $srcdir/gnome-doc-utils.m4; then
8245
if ! cmp -s $srcdir/gnome-doc-utils.make gnome-doc-utils.make; then
8246
cp $srcdir/gnome-doc-utils.make gnome-doc-utils.make
8249
if ! cmp -s $gdumk gnome-doc-utils.make; then
8250
cp $gdumk gnome-doc-utils.make
8253
if ! grep 'gnome-doc-utils\.make' $ac_top_srcdir/Makefile.am >/dev/null; then
8254
echo gnome-doc-utils.make should be added to EXTRA_DIST in Makefile.am
8260
# Copyright 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
8262
# This program is free software; you can redistribute it and/or modify
8263
# it under the terms of the GNU General Public License as published by
8264
# the Free Software Foundation; either version 2, or (at your option)
8265
# any later version.
8267
# This program is distributed in the hope that it will be useful,
8268
# but WITHOUT ANY WARRANTY; without even the implied warranty of
8269
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8270
# GNU General Public License for more details.
8272
# You should have received a copy of the GNU General Public License
8273
# along with this program; if not, write to the Free Software
8274
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
8277
# AM_PATH_PYTHON([MINIMUM-VERSION])
8279
# Adds support for distributing Python modules and packages. To
8280
# install modules, copy them to $(pythondir), using the python_PYTHON
8281
# automake variable. To install a package with the same name as the
8282
# automake package, install to $(pkgpythondir), or use the
8283
# pkgpython_PYTHON automake variable.
8285
# The variables $(pyexecdir) and $(pkgpyexecdir) are provided as
8286
# locations to install python extension modules (shared libraries).
8287
# Another macro is required to find the appropriate flags to compile
8288
# extension modules.
8290
# If your package is configured with a different prefix to python,
8291
# users will have to add the install directory to the PYTHONPATH
8292
# environment variable, or create a .pth file (see the python
8293
# documentation for details).
8295
# If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will
8296
# cause an error if the version of python installed on the system
8297
# doesn't meet the requirement. MINIMUM-VERSION should consist of
8298
# numbers and dots only.
8300
AC_DEFUN([AM_PATH_PYTHON],
8302
dnl Find a Python interpreter. Python versions prior to 1.5 are not
8303
dnl supported because the default installation locations changed from
8304
dnl $prefix/lib/site-python in 1.4 to $prefix/lib/python1.5/site-packages
8306
m4_define([_AM_PYTHON_INTERPRETER_LIST],
8307
[python python2 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5])
8310
dnl No version check is needed.
8311
# Find any Python interpreter.
8312
AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST)
8313
am_display_PYTHON=python
8315
dnl A version check is needed.
8316
if test -n "$PYTHON"; then
8317
# If the user set $PYTHON, use it and don't search something else.
8318
AC_MSG_CHECKING([whether $PYTHON version >= $1])
8319
AM_PYTHON_CHECK_VERSION([$PYTHON], [$1],
8320
[AC_MSG_RESULT(yes)],
8321
[AC_MSG_ERROR(too old)])
8323
# Otherwise, try each interpreter until we find one that satisfies
8325
AC_CACHE_CHECK([for a Python interpreter with version >= $1],
8326
[am_cv_pathless_PYTHON],[
8327
for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST : ; do
8328
if test "$am_cv_pathless_PYTHON" = : ; then
8329
AC_MSG_ERROR([no suitable Python interpreter found])
8331
AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break])
8333
# Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON.
8334
AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON])
8335
am_display_PYTHON=$am_cv_pathless_PYTHON
8339
dnl Query Python for its version number. Getting [:3] seems to be
8340
dnl the best way to do this; it's what "site.py" does in the standard
8343
AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version],
8344
[am_cv_python_version=`$PYTHON -c "import sys; print sys.version[[:3]]"`])
8345
AC_SUBST([PYTHON_VERSION], [$am_cv_python_version])
8347
dnl Use the values of $prefix and $exec_prefix for the corresponding
8348
dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX. These are made
8349
dnl distinct variables so they can be overridden if need be. However,
8350
dnl general consensus is that you shouldn't need this ability.
8352
AC_SUBST([PYTHON_PREFIX], ['${prefix}'])
8353
AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}'])
8355
dnl At times (like when building shared libraries) you may want
8356
dnl to know which OS platform Python thinks this is.
8358
AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform],
8359
[am_cv_python_platform=`$PYTHON -c "import sys; print sys.platform"`])
8360
AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform])
8363
dnl Set up 4 directories:
8365
dnl pythondir -- where to install python scripts. This is the
8366
dnl site-packages directory, not the python standard library
8367
dnl directory like in previous automake betas. This behavior
8368
dnl is more consistent with lispdir.m4 for example.
8369
dnl Query distutils for this directory. distutils does not exist in
8370
dnl Python 1.5, so we fall back to the hardcoded directory if it
8372
AC_CACHE_CHECK([for $am_display_PYTHON script directory],
8373
[am_cv_python_pythondir],
8374
[am_cv_python_pythondir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(0,0,prefix='$PYTHON_PREFIX')" 2>/dev/null ||
8375
echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"`])
8376
AC_SUBST([pythondir], [$am_cv_python_pythondir])
8378
dnl pkgpythondir -- $PACKAGE directory under pythondir. Was
8379
dnl PYTHON_SITE_PACKAGE in previous betas, but this naming is
8380
dnl more consistent with the rest of automake.
8382
AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE])
8384
dnl pyexecdir -- directory for installing python extension modules
8385
dnl (shared libraries)
8386
dnl Query distutils for this directory. distutils does not exist in
8387
dnl Python 1.5, so we fall back to the hardcoded directory if it
8389
AC_CACHE_CHECK([for $am_display_PYTHON extension module directory],
8390
[am_cv_python_pyexecdir],
8391
[am_cv_python_pyexecdir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(1,0,prefix='$PYTHON_EXEC_PREFIX')" 2>/dev/null ||
8392
echo "${PYTHON_EXEC_PREFIX}/lib/python${PYTHON_VERSION}/site-packages"`])
8393
AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir])
8395
dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE)
8397
AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE])
8401
# AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
8402
# ---------------------------------------------------------------------------
8403
# Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION.
8404
# Run ACTION-IF-FALSE otherwise.
8405
# This test uses sys.hexversion instead of the string equivalent (first
8406
# word of sys.version), in order to cope with versions such as 2.2c1.
8407
# hexversion has been introduced in Python 1.5.2; it's probably not
8408
# worth to support older versions (1.5.1 was released on October 31, 1998).
8409
AC_DEFUN([AM_PYTHON_CHECK_VERSION],
8410
[prog="import sys, string
8411
# split strings by '.' and convert to numeric. Append some zeros
8412
# because we need at least 4 digits for the hex conversion.
8413
minver = map(int, string.split('$2', '.')) + [[0, 0, 0]]
8415
for i in xrange(0, 4): minverhex = (minverhex << 8) + minver[[i]]
8416
sys.exit(sys.hexversion < minverhex)"
8417
AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])])
8419
# Copyright 2001 Free Software Foundation, Inc. -*- Autoconf -*-
8421
# This program is free software; you can redistribute it and/or modify
8422
# it under the terms of the GNU General Public License as published by
8423
# the Free Software Foundation; either version 2, or (at your option)
8424
# any later version.
8426
# This program is distributed in the hope that it will be useful,
8427
# but WITHOUT ANY WARRANTY; without even the implied warranty of
8428
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8429
# GNU General Public License for more details.
8431
# You should have received a copy of the GNU General Public License
8432
# along with this program; if not, write to the Free Software
8433
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
8436
# AM_RUN_LOG(COMMAND)
8437
# -------------------
8438
# Run COMMAND, save the exit status in ac_status, and log it.
8439
# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
8440
AC_DEFUN([AM_RUN_LOG],
8441
[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
8442
($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
8444
echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
8445
(exit $ac_status); }])
8447
dnl AM_PATH_CHECK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
8448
dnl Test for check, and define CHECK_CFLAGS and CHECK_LIBS
8451
AC_DEFUN([AM_PATH_CHECK],
8453
AC_ARG_WITH([check],
8454
[ --with-check=PATH prefix where check is installed [default=auto]])
8456
min_check_version=ifelse([$1], ,0.8.2,$1)
8458
AC_MSG_CHECKING(for check - version >= $min_check_version)
8460
if test x$with_check = xno; then
8461
AC_MSG_RESULT(disabled)
8462
ifelse([$3], , AC_MSG_ERROR([disabling check is not supported]), [$3])
8464
if test "x$with_check" != x; then
8465
CHECK_CFLAGS="-I$with_check/include"
8466
CHECK_LIBS="-L$with_check/lib -lcheck"
8469
CHECK_LIBS="-lcheck"
8472
ac_save_CFLAGS="$CFLAGS"
8473
ac_save_LIBS="$LIBS"
8475
CFLAGS="$CFLAGS $CHECK_CFLAGS"
8476
LIBS="$CHECK_LIBS $LIBS"
8478
rm -f conf.check-test
8487
int major, minor, micro;
8490
system ("touch conf.check-test");
8492
/* HP/UX 9 (%@#!) writes to sscanf strings */
8493
tmp_version = strdup("$min_check_version");
8494
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
8495
printf("%s, bad version string\n", "$min_check_version");
8499
if ((CHECK_MAJOR_VERSION != check_major_version) ||
8500
(CHECK_MINOR_VERSION != check_minor_version) ||
8501
(CHECK_MICRO_VERSION != check_micro_version))
8503
printf("\n*** The check header file (version %d.%d.%d) does not match\n",
8504
CHECK_MAJOR_VERSION, CHECK_MINOR_VERSION, CHECK_MICRO_VERSION);
8505
printf("*** the check library (version %d.%d.%d).\n",
8506
check_major_version, check_minor_version, check_micro_version);
8510
if ((check_major_version > major) ||
8511
((check_major_version == major) && (check_minor_version > minor)) ||
8512
((check_major_version == major) && (check_minor_version == minor) && (check_micro_version >= micro)))
8518
printf("\n*** An old version of check (%d.%d.%d) was found.\n",
8519
check_major_version, check_minor_version, check_micro_version);
8520
printf("*** You need a version of check being at least %d.%d.%d.\n", major, minor, micro);
8522
printf("*** If you have already installed a sufficiently new version, this error\n");
8523
printf("*** probably means that the wrong copy of the check library and header\n");
8524
printf("*** file is being found. Rerun configure with the --with-check=PATH option\n");
8525
printf("*** to specify the prefix where the correct version was installed.\n");
8530
],, no_check=yes, [echo $ac_n "cross compiling; assumed OK... $ac_c"])
8532
CFLAGS="$ac_save_CFLAGS"
8533
LIBS="$ac_save_LIBS"
8535
if test "x$no_check" = x ; then
8537
ifelse([$2], , :, [$2])
8540
if test -f conf.check-test ; then
8543
echo "*** Could not run check test program, checking why..."
8544
CFLAGS="$CFLAGS $CHECK_CFLAGS"
8545
LIBS="$CHECK_LIBS $LIBS"
8551
], , [ echo "*** The test program compiled, but did not run. This usually means"
8552
echo "*** that the run-time linker is not finding check. You'll need to set your"
8553
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
8554
echo "*** to the installed location Also, make sure you have run ldconfig if that"
8555
echo "*** is required on your system"
8557
echo "*** If you have an old version installed, it is best to remove it, although"
8558
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
8559
[ echo "*** The test program failed to compile or link. See the file config.log for"
8560
echo "*** the exact error that occured." ])
8562
CFLAGS="$ac_save_CFLAGS"
8563
LIBS="$ac_save_LIBS"
8569
rm -f conf.check-test
8570
ifelse([$3], , AC_MSG_ERROR([check not found]), [$3])
8573
AC_SUBST(CHECK_CFLAGS)
8574
AC_SUBST(CHECK_LIBS)
8576
rm -f conf.check-test