1# generated automatically by aclocal 1.9.6 -*- Autoconf -*- 2 3# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4# 2005 Free Software Foundation, Inc. 5# This file is free software; the Free Software Foundation 6# gives unlimited permission to copy and/or distribute it, 7# with or without modifications, as long as this notice is preserved. 8 9# This program is distributed in the hope that it will be useful, 10# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12# PARTICULAR PURPOSE. 13 14 15dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml]) 16# serial 35 IT_PROG_INTLTOOL 17AC_DEFUN([IT_PROG_INTLTOOL], 18[AC_PREREQ([2.50])dnl 19 20case "$am__api_version" in 21 1.[01234]) 22 AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool]) 23 ;; 24 *) 25 ;; 26esac 27 28if test -n "$1"; then 29 AC_MSG_CHECKING(for intltool >= $1) 30 31 INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'` 32 INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { print $ 2; }' ${ac_aux_dir}/intltool-update.in` 33 [INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($ 2, VERSION, "."); print VERSION[1] * 1000 + VERSION[2] * 100 + VERSION[3];}' ${ac_aux_dir}/intltool-update.in` 34 ] 35 AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found]) 36 test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" || 37 AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.]) 38fi 39 40 INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 41INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 42 INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 43 INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 44 INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@' 45 INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 46 INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 47 INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 48INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 49 INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 50 INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 51 INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@' 52 INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 53 INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 54 INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 55 INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 56 INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 57 INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 58 59AC_SUBST(INTLTOOL_DESKTOP_RULE) 60AC_SUBST(INTLTOOL_DIRECTORY_RULE) 61AC_SUBST(INTLTOOL_KEYS_RULE) 62AC_SUBST(INTLTOOL_PROP_RULE) 63AC_SUBST(INTLTOOL_OAF_RULE) 64AC_SUBST(INTLTOOL_PONG_RULE) 65AC_SUBST(INTLTOOL_SERVER_RULE) 66AC_SUBST(INTLTOOL_SHEET_RULE) 67AC_SUBST(INTLTOOL_SOUNDLIST_RULE) 68AC_SUBST(INTLTOOL_UI_RULE) 69AC_SUBST(INTLTOOL_XAM_RULE) 70AC_SUBST(INTLTOOL_KBD_RULE) 71AC_SUBST(INTLTOOL_XML_RULE) 72AC_SUBST(INTLTOOL_XML_NOMERGE_RULE) 73AC_SUBST(INTLTOOL_CAVES_RULE) 74AC_SUBST(INTLTOOL_SCHEMAS_RULE) 75AC_SUBST(INTLTOOL_THEME_RULE) 76AC_SUBST(INTLTOOL_SERVICE_RULE) 77 78# Use the tools built into the package, not the ones that are installed. 79AC_SUBST(INTLTOOL_EXTRACT, '$(top_builddir)/intltool-extract') 80AC_SUBST(INTLTOOL_MERGE, '$(top_builddir)/intltool-merge') 81AC_SUBST(INTLTOOL_UPDATE, '$(top_builddir)/intltool-update') 82 83AC_PATH_PROG(INTLTOOL_PERL, perl) 84if test -z "$INTLTOOL_PERL"; then 85 AC_MSG_ERROR([perl not found; required for intltool]) 86fi 87if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then 88 AC_MSG_ERROR([perl 5.x required for intltool]) 89fi 90if test "x$2" != "xno-xml"; then 91 AC_MSG_CHECKING([for XML::Parser]) 92 if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then 93 AC_MSG_RESULT([ok]) 94 else 95 AC_MSG_ERROR([XML::Parser perl module is required for intltool]) 96 fi 97fi 98 99AC_PATH_PROG(INTLTOOL_ICONV, iconv, iconv) 100AC_PATH_PROG(INTLTOOL_MSGFMT, msgfmt, msgfmt) 101AC_PATH_PROG(INTLTOOL_MSGMERGE, msgmerge, msgmerge) 102AC_PATH_PROG(INTLTOOL_XGETTEXT, xgettext, xgettext) 103 104# Substitute ALL_LINGUAS so we can use it in po/Makefile 105AC_SUBST(ALL_LINGUAS) 106 107IT_PO_SUBDIR([po]) 108 109dnl The following is very similar to 110dnl 111dnl AC_CONFIG_FILES([intltool-extract intltool-merge intltool-update]) 112dnl 113dnl with the following slight differences: 114dnl - the *.in files are in ac_aux_dir, 115dnl - if the file haven't changed upon reconfigure, it's not touched, 116dnl - the evaluation of the third parameter enables a hack which computes 117dnl the actual value of $libdir, 118dnl - the user sees "executing intltool commands", instead of 119dnl "creating intltool-extract" and such. 120dnl 121dnl Nothing crucial here, and we could use AC_CONFIG_FILES, if there were 122dnl a reason for it. 123 124AC_CONFIG_COMMANDS([intltool], [ 125 126for file in intltool-extract intltool-merge intltool-update; do 127 sed -e "s|@INTLTOOL_EXTRACT@|`pwd`/intltool-extract|g" \ 128 -e "s|@INTLTOOL_LIBDIR@|${INTLTOOL_LIBDIR}|g" \ 129 -e "s|@INTLTOOL_ICONV@|${INTLTOOL_ICONV}|g" \ 130 -e "s|@INTLTOOL_MSGFMT@|${INTLTOOL_MSGFMT}|g" \ 131 -e "s|@INTLTOOL_MSGMERGE@|${INTLTOOL_MSGMERGE}|g" \ 132 -e "s|@INTLTOOL_XGETTEXT@|${INTLTOOL_XGETTEXT}|g" \ 133 -e "s|@INTLTOOL_PERL@|${INTLTOOL_PERL}|g" \ 134 < ${ac_aux_dir}/${file}.in > ${file}.out 135 if cmp -s ${file} ${file}.out 2>/dev/null; then 136 rm -f ${file}.out 137 else 138 mv -f ${file}.out ${file} 139 fi 140 chmod ugo+x ${file} 141 chmod u+w ${file} 142done 143 144], 145[INTLTOOL_PERL='${INTLTOOL_PERL}' ac_aux_dir='${ac_aux_dir}' 146prefix="$prefix" exec_prefix="$exec_prefix" INTLTOOL_LIBDIR="$libdir" 147INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}' INTLTOOL_ICONV='${INTLTOOL_ICONV}' 148INTLTOOL_MSGFMT='${INTLTOOL_MSGFMT}' INTLTOOL_MSGMERGE='${INTLTOOL_MSGMERGE}' 149INTLTOOL_XGETTEXT='${INTLTOOL_XGETTEXT}']) 150 151]) 152 153 154# IT_PO_SUBDIR(DIRNAME) 155# --------------------- 156# All po subdirs have to be declared with this macro; the subdir "po" is 157# declared by IT_PROG_INTLTOOL. 158# 159AC_DEFUN([IT_PO_SUBDIR], 160[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS. 161dnl 162dnl The following CONFIG_COMMANDS should be exetuted at the very end 163dnl of config.status. 164AC_CONFIG_COMMANDS_PRE([ 165 AC_CONFIG_COMMANDS([$1/stamp-it], [ 166 rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp" 167 >"$1/stamp-it.tmp" 168 [sed '/^#/d 169 s/^[[].*] *// 170 /^[ ]*$/d 171 '"s|^| $ac_top_srcdir/|" \ 172 "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES" 173 ] 174 if test ! -f "$1/Makefile"; then 175 AC_MSG_ERROR([$1/Makefile is not ready.]) 176 fi 177 mv "$1/Makefile" "$1/Makefile.tmp" 178 [sed '/^POTFILES =/,/[^\\]$/ { 179 /^POTFILES =/!d 180 r $1/POTFILES 181 } 182 ' "$1/Makefile.tmp" >"$1/Makefile"] 183 rm -f "$1/Makefile.tmp" 184 mv "$1/stamp-it.tmp" "$1/stamp-it" 185 ]) 186])dnl 187]) 188 189 190# deprecated macros 191AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL]) 192# A hint is needed for aclocal from Automake <= 1.9.4: 193# AC_DEFUN([AC_PROG_INTLTOOL], ...) 194 195 196# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 197# 198# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 199# 200# This program is free software; you can redistribute it and/or modify 201# it under the terms of the GNU General Public License as published by 202# the Free Software Foundation; either version 2 of the License, or 203# (at your option) any later version. 204# 205# This program is distributed in the hope that it will be useful, but 206# WITHOUT ANY WARRANTY; without even the implied warranty of 207# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 208# General Public License for more details. 209# 210# You should have received a copy of the GNU General Public License 211# along with this program; if not, write to the Free Software 212# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 213# 214# As a special exception to the GNU General Public License, if you 215# distribute this file as part of a program that contains a 216# configuration script generated by Autoconf, you may include it under 217# the same distribution terms that you use for the rest of that program. 218 219# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 220# ---------------------------------- 221AC_DEFUN([PKG_PROG_PKG_CONFIG], 222[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 223m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 224AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 225if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 226 AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 227fi 228if test -n "$PKG_CONFIG"; then 229 _pkg_min_version=m4_default([$1], [0.9.0]) 230 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 231 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 232 AC_MSG_RESULT([yes]) 233 else 234 AC_MSG_RESULT([no]) 235 PKG_CONFIG="" 236 fi 237 238fi[]dnl 239])# PKG_PROG_PKG_CONFIG 240 241# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 242# 243# Check to see whether a particular set of modules exists. Similar 244# to PKG_CHECK_MODULES(), but does not set variables or print errors. 245# 246# 247# Similar to PKG_CHECK_MODULES, make sure that the first instance of 248# this or PKG_CHECK_MODULES is called, or make sure to call 249# PKG_CHECK_EXISTS manually 250# -------------------------------------------------------------- 251AC_DEFUN([PKG_CHECK_EXISTS], 252[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 253if test -n "$PKG_CONFIG" && \ 254 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 255 m4_ifval([$2], [$2], [:]) 256m4_ifvaln([$3], [else 257 $3])dnl 258fi]) 259 260 261# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 262# --------------------------------------------- 263m4_define([_PKG_CONFIG], 264[if test -n "$PKG_CONFIG"; then 265 if test -n "$$1"; then 266 pkg_cv_[]$1="$$1" 267 else 268 PKG_CHECK_EXISTS([$3], 269 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 270 [pkg_failed=yes]) 271 fi 272else 273 pkg_failed=untried 274fi[]dnl 275])# _PKG_CONFIG 276 277# _PKG_SHORT_ERRORS_SUPPORTED 278# ----------------------------- 279AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 280[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 281if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 282 _pkg_short_errors_supported=yes 283else 284 _pkg_short_errors_supported=no 285fi[]dnl 286])# _PKG_SHORT_ERRORS_SUPPORTED 287 288 289# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 290# [ACTION-IF-NOT-FOUND]) 291# 292# 293# Note that if there is a possibility the first call to 294# PKG_CHECK_MODULES might not happen, you should be sure to include an 295# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 296# 297# 298# -------------------------------------------------------------- 299AC_DEFUN([PKG_CHECK_MODULES], 300[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 301AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 302AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 303 304pkg_failed=no 305AC_MSG_CHECKING([for $1]) 306 307_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 308_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 309 310m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 311and $1[]_LIBS to avoid the need to call pkg-config. 312See the pkg-config man page for more details.]) 313 314if test $pkg_failed = yes; then 315 _PKG_SHORT_ERRORS_SUPPORTED 316 if test $_pkg_short_errors_supported = yes; then 317 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` 318 else 319 $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` 320 fi 321 # Put the nasty error message in config.log where it belongs 322 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 323 324 ifelse([$4], , [AC_MSG_ERROR(dnl 325[Package requirements ($2) were not met: 326 327$$1_PKG_ERRORS 328 329Consider adjusting the PKG_CONFIG_PATH environment variable if you 330installed software in a non-standard prefix. 331 332_PKG_TEXT 333])], 334 [$4]) 335elif test $pkg_failed = untried; then 336 ifelse([$4], , [AC_MSG_FAILURE(dnl 337[The pkg-config script could not be found or is too old. Make sure it 338is in your PATH or set the PKG_CONFIG environment variable to the full 339path to pkg-config. 340 341_PKG_TEXT 342 343To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])], 344 [$4]) 345else 346 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 347 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 348 AC_MSG_RESULT([yes]) 349 ifelse([$3], , :, [$3]) 350fi[]dnl 351])# PKG_CHECK_MODULES 352 353# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. 354# 355# This file is free software; the Free Software Foundation 356# gives unlimited permission to copy and/or distribute it, 357# with or without modifications, as long as this notice is preserved. 358 359# AM_AUTOMAKE_VERSION(VERSION) 360# ---------------------------- 361# Automake X.Y traces this macro to ensure aclocal.m4 has been 362# generated from the m4 files accompanying Automake X.Y. 363AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) 364 365# AM_SET_CURRENT_AUTOMAKE_VERSION 366# ------------------------------- 367# Call AM_AUTOMAKE_VERSION so it can be traced. 368# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. 369AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 370 [AM_AUTOMAKE_VERSION([1.9.6])]) 371 372# AM_AUX_DIR_EXPAND -*- Autoconf -*- 373 374# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 375# 376# This file is free software; the Free Software Foundation 377# gives unlimited permission to copy and/or distribute it, 378# with or without modifications, as long as this notice is preserved. 379 380# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 381# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 382# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 383# 384# Of course, Automake must honor this variable whenever it calls a 385# tool from the auxiliary directory. The problem is that $srcdir (and 386# therefore $ac_aux_dir as well) can be either absolute or relative, 387# depending on how configure is run. This is pretty annoying, since 388# it makes $ac_aux_dir quite unusable in subdirectories: in the top 389# source directory, any form will work fine, but in subdirectories a 390# relative path needs to be adjusted first. 391# 392# $ac_aux_dir/missing 393# fails when called from a subdirectory if $ac_aux_dir is relative 394# $top_srcdir/$ac_aux_dir/missing 395# fails if $ac_aux_dir is absolute, 396# fails when called from a subdirectory in a VPATH build with 397# a relative $ac_aux_dir 398# 399# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 400# are both prefixed by $srcdir. In an in-source build this is usually 401# harmless because $srcdir is `.', but things will broke when you 402# start a VPATH build or use an absolute $srcdir. 403# 404# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 405# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 406# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 407# and then we would define $MISSING as 408# MISSING="\${SHELL} $am_aux_dir/missing" 409# This will work as long as MISSING is not called from configure, because 410# unfortunately $(top_srcdir) has no meaning in configure. 411# However there are other variables, like CC, which are often used in 412# configure, and could therefore not use this "fixed" $ac_aux_dir. 413# 414# Another solution, used here, is to always expand $ac_aux_dir to an 415# absolute PATH. The drawback is that using absolute paths prevent a 416# configured tree to be moved without reconfiguration. 417 418AC_DEFUN([AM_AUX_DIR_EXPAND], 419[dnl Rely on autoconf to set up CDPATH properly. 420AC_PREREQ([2.50])dnl 421# expand $ac_aux_dir to an absolute path 422am_aux_dir=`cd $ac_aux_dir && pwd` 423]) 424 425# AM_CONDITIONAL -*- Autoconf -*- 426 427# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005 428# Free Software Foundation, Inc. 429# 430# This file is free software; the Free Software Foundation 431# gives unlimited permission to copy and/or distribute it, 432# with or without modifications, as long as this notice is preserved. 433 434# serial 7 435 436# AM_CONDITIONAL(NAME, SHELL-CONDITION) 437# ------------------------------------- 438# Define a conditional. 439AC_DEFUN([AM_CONDITIONAL], 440[AC_PREREQ(2.52)dnl 441 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 442 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 443AC_SUBST([$1_TRUE]) 444AC_SUBST([$1_FALSE]) 445if $2; then 446 $1_TRUE= 447 $1_FALSE='#' 448else 449 $1_TRUE='#' 450 $1_FALSE= 451fi 452AC_CONFIG_COMMANDS_PRE( 453[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 454 AC_MSG_ERROR([[conditional "$1" was never defined. 455Usually this means the macro was only invoked conditionally.]]) 456fi])]) 457 458 459# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 460# Free Software Foundation, Inc. 461# 462# This file is free software; the Free Software Foundation 463# gives unlimited permission to copy and/or distribute it, 464# with or without modifications, as long as this notice is preserved. 465 466# serial 8 467 468# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 469# written in clear, in which case automake, when reading aclocal.m4, 470# will think it sees a *use*, and therefore will trigger all it's 471# C support machinery. Also note that it means that autoscan, seeing 472# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 473 474 475# _AM_DEPENDENCIES(NAME) 476# ---------------------- 477# See how the compiler implements dependency checking. 478# NAME is "CC", "CXX", "GCJ", or "OBJC". 479# We try a few techniques and use that to set a single cache variable. 480# 481# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 482# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 483# dependency, and given that the user is not expected to run this macro, 484# just rely on AC_PROG_CC. 485AC_DEFUN([_AM_DEPENDENCIES], 486[AC_REQUIRE([AM_SET_DEPDIR])dnl 487AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 488AC_REQUIRE([AM_MAKE_INCLUDE])dnl 489AC_REQUIRE([AM_DEP_TRACK])dnl 490 491ifelse([$1], CC, [depcc="$CC" am_compiler_list=], 492 [$1], CXX, [depcc="$CXX" am_compiler_list=], 493 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 494 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 495 [depcc="$$1" am_compiler_list=]) 496 497AC_CACHE_CHECK([dependency style of $depcc], 498 [am_cv_$1_dependencies_compiler_type], 499[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 500 # We make a subdir and do the tests there. Otherwise we can end up 501 # making bogus files that we don't know about and never remove. For 502 # instance it was reported that on HP-UX the gcc test will end up 503 # making a dummy file named `D' -- because `-MD' means `put the output 504 # in D'. 505 mkdir conftest.dir 506 # Copy depcomp to subdir because otherwise we won't find it if we're 507 # using a relative directory. 508 cp "$am_depcomp" conftest.dir 509 cd conftest.dir 510 # We will build objects and dependencies in a subdirectory because 511 # it helps to detect inapplicable dependency modes. For instance 512 # both Tru64's cc and ICC support -MD to output dependencies as a 513 # side effect of compilation, but ICC will put the dependencies in 514 # the current directory while Tru64 will put them in the object 515 # directory. 516 mkdir sub 517 518 am_cv_$1_dependencies_compiler_type=none 519 if test "$am_compiler_list" = ""; then 520 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 521 fi 522 for depmode in $am_compiler_list; do 523 # Setup a source with many dependencies, because some compilers 524 # like to wrap large dependency lists on column 80 (with \), and 525 # we should not choose a depcomp mode which is confused by this. 526 # 527 # We need to recreate these files for each test, as the compiler may 528 # overwrite some of them when testing with obscure command lines. 529 # This happens at least with the AIX C compiler. 530 : > sub/conftest.c 531 for i in 1 2 3 4 5 6; do 532 echo '#include "conftst'$i'.h"' >> sub/conftest.c 533 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 534 # Solaris 8's {/usr,}/bin/sh. 535 touch sub/conftst$i.h 536 done 537 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 538 539 case $depmode in 540 nosideeffect) 541 # after this tag, mechanisms are not by side-effect, so they'll 542 # only be used when explicitly requested 543 if test "x$enable_dependency_tracking" = xyes; then 544 continue 545 else 546 break 547 fi 548 ;; 549 none) break ;; 550 esac 551 # We check with `-c' and `-o' for the sake of the "dashmstdout" 552 # mode. It turns out that the SunPro C++ compiler does not properly 553 # handle `-M -o', and we need to detect this. 554 if depmode=$depmode \ 555 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ 556 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 557 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ 558 >/dev/null 2>conftest.err && 559 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 560 grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && 561 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 562 # icc doesn't choke on unknown options, it will just issue warnings 563 # or remarks (even with -Werror). So we grep stderr for any message 564 # that says an option was ignored or not supported. 565 # When given -MP, icc 7.0 and 7.1 complain thusly: 566 # icc: Command line warning: ignoring option '-M'; no argument required 567 # The diagnosis changed in icc 8.0: 568 # icc: Command line remark: option '-MP' not supported 569 if (grep 'ignoring option' conftest.err || 570 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 571 am_cv_$1_dependencies_compiler_type=$depmode 572 break 573 fi 574 fi 575 done 576 577 cd .. 578 rm -rf conftest.dir 579else 580 am_cv_$1_dependencies_compiler_type=none 581fi 582]) 583AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 584AM_CONDITIONAL([am__fastdep$1], [ 585 test "x$enable_dependency_tracking" != xno \ 586 && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 587]) 588 589 590# AM_SET_DEPDIR 591# ------------- 592# Choose a directory name for dependency files. 593# This macro is AC_REQUIREd in _AM_DEPENDENCIES 594AC_DEFUN([AM_SET_DEPDIR], 595[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 596AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 597]) 598 599 600# AM_DEP_TRACK 601# ------------ 602AC_DEFUN([AM_DEP_TRACK], 603[AC_ARG_ENABLE(dependency-tracking, 604[ --disable-dependency-tracking speeds up one-time build 605 --enable-dependency-tracking do not reject slow dependency extractors]) 606if test "x$enable_dependency_tracking" != xno; then 607 am_depcomp="$ac_aux_dir/depcomp" 608 AMDEPBACKSLASH='\' 609fi 610AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 611AC_SUBST([AMDEPBACKSLASH]) 612]) 613 614# Generate code to set up dependency tracking. -*- Autoconf -*- 615 616# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 617# Free Software Foundation, Inc. 618# 619# This file is free software; the Free Software Foundation 620# gives unlimited permission to copy and/or distribute it, 621# with or without modifications, as long as this notice is preserved. 622 623#serial 3 624 625# _AM_OUTPUT_DEPENDENCY_COMMANDS 626# ------------------------------ 627AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 628[for mf in $CONFIG_FILES; do 629 # Strip MF so we end up with the name of the file. 630 mf=`echo "$mf" | sed -e 's/:.*$//'` 631 # Check whether this is an Automake generated Makefile or not. 632 # We used to match only the files named `Makefile.in', but 633 # some people rename them; so instead we look at the file content. 634 # Grep'ing the first line is not enough: some people post-process 635 # each Makefile.in and add a new line on top of each file to say so. 636 # So let's grep whole file. 637 if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then 638 dirpart=`AS_DIRNAME("$mf")` 639 else 640 continue 641 fi 642 # Extract the definition of DEPDIR, am__include, and am__quote 643 # from the Makefile without running `make'. 644 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 645 test -z "$DEPDIR" && continue 646 am__include=`sed -n 's/^am__include = //p' < "$mf"` 647 test -z "am__include" && continue 648 am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 649 # When using ansi2knr, U may be empty or an underscore; expand it 650 U=`sed -n 's/^U = //p' < "$mf"` 651 # Find all dependency output files, they are included files with 652 # $(DEPDIR) in their names. We invoke sed twice because it is the 653 # simplest approach to changing $(DEPDIR) to its actual value in the 654 # expansion. 655 for file in `sed -n " 656 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 657 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 658 # Make sure the directory exists. 659 test -f "$dirpart/$file" && continue 660 fdir=`AS_DIRNAME(["$file"])` 661 AS_MKDIR_P([$dirpart/$fdir]) 662 # echo "creating $dirpart/$file" 663 echo '# dummy' > "$dirpart/$file" 664 done 665done 666])# _AM_OUTPUT_DEPENDENCY_COMMANDS 667 668 669# AM_OUTPUT_DEPENDENCY_COMMANDS 670# ----------------------------- 671# This macro should only be invoked once -- use via AC_REQUIRE. 672# 673# This code is only required when automatic dependency tracking 674# is enabled. FIXME. This creates each `.P' file that we will 675# need in order to bootstrap the dependency handling code. 676AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 677[AC_CONFIG_COMMANDS([depfiles], 678 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 679 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 680]) 681 682# Do all the work for Automake. -*- Autoconf -*- 683 684# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 685# Free Software Foundation, Inc. 686# 687# This file is free software; the Free Software Foundation 688# gives unlimited permission to copy and/or distribute it, 689# with or without modifications, as long as this notice is preserved. 690 691# serial 12 692 693# This macro actually does too much. Some checks are only needed if 694# your package does certain things. But this isn't really a big deal. 695 696# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 697# AM_INIT_AUTOMAKE([OPTIONS]) 698# ----------------------------------------------- 699# The call with PACKAGE and VERSION arguments is the old style 700# call (pre autoconf-2.50), which is being phased out. PACKAGE 701# and VERSION should now be passed to AC_INIT and removed from 702# the call to AM_INIT_AUTOMAKE. 703# We support both call styles for the transition. After 704# the next Automake release, Autoconf can make the AC_INIT 705# arguments mandatory, and then we can depend on a new Autoconf 706# release and drop the old call support. 707AC_DEFUN([AM_INIT_AUTOMAKE], 708[AC_PREREQ([2.58])dnl 709dnl Autoconf wants to disallow AM_ names. We explicitly allow 710dnl the ones we care about. 711m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 712AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 713AC_REQUIRE([AC_PROG_INSTALL])dnl 714# test to see if srcdir already configured 715if test "`cd $srcdir && pwd`" != "`pwd`" && 716 test -f $srcdir/config.status; then 717 AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 718fi 719 720# test whether we have cygpath 721if test -z "$CYGPATH_W"; then 722 if (cygpath --version) >/dev/null 2>/dev/null; then 723 CYGPATH_W='cygpath -w' 724 else 725 CYGPATH_W=echo 726 fi 727fi 728AC_SUBST([CYGPATH_W]) 729 730# Define the identity of the package. 731dnl Distinguish between old-style and new-style calls. 732m4_ifval([$2], 733[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 734 AC_SUBST([PACKAGE], [$1])dnl 735 AC_SUBST([VERSION], [$2])], 736[_AM_SET_OPTIONS([$1])dnl 737 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 738 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 739 740_AM_IF_OPTION([no-define],, 741[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 742 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 743 744# Some tools Automake needs. 745AC_REQUIRE([AM_SANITY_CHECK])dnl 746AC_REQUIRE([AC_ARG_PROGRAM])dnl 747AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 748AM_MISSING_PROG(AUTOCONF, autoconf) 749AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 750AM_MISSING_PROG(AUTOHEADER, autoheader) 751AM_MISSING_PROG(MAKEINFO, makeinfo) 752AM_PROG_INSTALL_SH 753AM_PROG_INSTALL_STRIP 754AC_REQUIRE([AM_PROG_MKDIR_P])dnl 755# We need awk for the "check" target. The system "awk" is bad on 756# some platforms. 757AC_REQUIRE([AC_PROG_AWK])dnl 758AC_REQUIRE([AC_PROG_MAKE_SET])dnl 759AC_REQUIRE([AM_SET_LEADING_DOT])dnl 760_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 761 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 762 [_AM_PROG_TAR([v7])])]) 763_AM_IF_OPTION([no-dependencies],, 764[AC_PROVIDE_IFELSE([AC_PROG_CC], 765 [_AM_DEPENDENCIES(CC)], 766 [define([AC_PROG_CC], 767 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 768AC_PROVIDE_IFELSE([AC_PROG_CXX], 769 [_AM_DEPENDENCIES(CXX)], 770 [define([AC_PROG_CXX], 771 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 772]) 773]) 774 775 776# When config.status generates a header, we must update the stamp-h file. 777# This file resides in the same directory as the config header 778# that is generated. The stamp files are numbered to have different names. 779 780# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 781# loop where config.status creates the headers, so we can generate 782# our stamp files there. 783AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 784[# Compute $1's index in $config_headers. 785_am_stamp_count=1 786for _am_header in $config_headers :; do 787 case $_am_header in 788 $1 | $1:* ) 789 break ;; 790 * ) 791 _am_stamp_count=`expr $_am_stamp_count + 1` ;; 792 esac 793done 794echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) 795 796# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 797# 798# This file is free software; the Free Software Foundation 799# gives unlimited permission to copy and/or distribute it, 800# with or without modifications, as long as this notice is preserved. 801 802# AM_PROG_INSTALL_SH 803# ------------------ 804# Define $install_sh. 805AC_DEFUN([AM_PROG_INSTALL_SH], 806[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 807install_sh=${install_sh-"$am_aux_dir/install-sh"} 808AC_SUBST(install_sh)]) 809 810# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 811# 812# This file is free software; the Free Software Foundation 813# gives unlimited permission to copy and/or distribute it, 814# with or without modifications, as long as this notice is preserved. 815 816# serial 2 817 818# Check whether the underlying file-system supports filenames 819# with a leading dot. For instance MS-DOS doesn't. 820AC_DEFUN([AM_SET_LEADING_DOT], 821[rm -rf .tst 2>/dev/null 822mkdir .tst 2>/dev/null 823if test -d .tst; then 824 am__leading_dot=. 825else 826 am__leading_dot=_ 827fi 828rmdir .tst 2>/dev/null 829AC_SUBST([am__leading_dot])]) 830 831# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 832# From Jim Meyering 833 834# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005 835# Free Software Foundation, Inc. 836# 837# This file is free software; the Free Software Foundation 838# gives unlimited permission to copy and/or distribute it, 839# with or without modifications, as long as this notice is preserved. 840 841# serial 4 842 843AC_DEFUN([AM_MAINTAINER_MODE], 844[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 845 dnl maintainer-mode is disabled by default 846 AC_ARG_ENABLE(maintainer-mode, 847[ --enable-maintainer-mode enable make rules and dependencies not useful 848 (and sometimes confusing) to the casual installer], 849 USE_MAINTAINER_MODE=$enableval, 850 USE_MAINTAINER_MODE=no) 851 AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 852 AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) 853 MAINT=$MAINTAINER_MODE_TRUE 854 AC_SUBST(MAINT)dnl 855] 856) 857 858AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 859 860# Check to see how 'make' treats includes. -*- Autoconf -*- 861 862# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. 863# 864# This file is free software; the Free Software Foundation 865# gives unlimited permission to copy and/or distribute it, 866# with or without modifications, as long as this notice is preserved. 867 868# serial 3 869 870# AM_MAKE_INCLUDE() 871# ----------------- 872# Check to see how make treats includes. 873AC_DEFUN([AM_MAKE_INCLUDE], 874[am_make=${MAKE-make} 875cat > confinc << 'END' 876am__doit: 877 @echo done 878.PHONY: am__doit 879END 880# If we don't find an include directive, just comment out the code. 881AC_MSG_CHECKING([for style of include used by $am_make]) 882am__include="#" 883am__quote= 884_am_result=none 885# First try GNU make style include. 886echo "include confinc" > confmf 887# We grep out `Entering directory' and `Leaving directory' 888# messages which can occur if `w' ends up in MAKEFLAGS. 889# In particular we don't look at `^make:' because GNU make might 890# be invoked under some other name (usually "gmake"), in which 891# case it prints its new name instead of `make'. 892if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then 893 am__include=include 894 am__quote= 895 _am_result=GNU 896fi 897# Now try BSD make style include. 898if test "$am__include" = "#"; then 899 echo '.include "confinc"' > confmf 900 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then 901 am__include=.include 902 am__quote="\"" 903 _am_result=BSD 904 fi 905fi 906AC_SUBST([am__include]) 907AC_SUBST([am__quote]) 908AC_MSG_RESULT([$_am_result]) 909rm -f confinc confmf 910]) 911 912# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 913 914# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005 915# Free Software Foundation, Inc. 916# 917# This file is free software; the Free Software Foundation 918# gives unlimited permission to copy and/or distribute it, 919# with or without modifications, as long as this notice is preserved. 920 921# serial 4 922 923# AM_MISSING_PROG(NAME, PROGRAM) 924# ------------------------------ 925AC_DEFUN([AM_MISSING_PROG], 926[AC_REQUIRE([AM_MISSING_HAS_RUN]) 927$1=${$1-"${am_missing_run}$2"} 928AC_SUBST($1)]) 929 930 931# AM_MISSING_HAS_RUN 932# ------------------ 933# Define MISSING if not defined so far and test if it supports --run. 934# If it does, set am_missing_run to use it, otherwise, to nothing. 935AC_DEFUN([AM_MISSING_HAS_RUN], 936[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 937test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" 938# Use eval to expand $SHELL 939if eval "$MISSING --run true"; then 940 am_missing_run="$MISSING --run " 941else 942 am_missing_run= 943 AC_MSG_WARN([`missing' script is too old or missing]) 944fi 945]) 946 947# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. 948# 949# This file is free software; the Free Software Foundation 950# gives unlimited permission to copy and/or distribute it, 951# with or without modifications, as long as this notice is preserved. 952 953# AM_PROG_MKDIR_P 954# --------------- 955# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. 956# 957# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories 958# created by `make install' are always world readable, even if the 959# installer happens to have an overly restrictive umask (e.g. 077). 960# This was a mistake. There are at least two reasons why we must not 961# use `-m 0755': 962# - it causes special bits like SGID to be ignored, 963# - it may be too restrictive (some setups expect 775 directories). 964# 965# Do not use -m 0755 and let people choose whatever they expect by 966# setting umask. 967# 968# We cannot accept any implementation of `mkdir' that recognizes `-p'. 969# Some implementations (such as Solaris 8's) are not thread-safe: if a 970# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' 971# concurrently, both version can detect that a/ is missing, but only 972# one can create it and the other will error out. Consequently we 973# restrict ourselves to GNU make (using the --version option ensures 974# this.) 975AC_DEFUN([AM_PROG_MKDIR_P], 976[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then 977 # We used to keeping the `.' as first argument, in order to 978 # allow $(mkdir_p) to be used without argument. As in 979 # $(mkdir_p) $(somedir) 980 # where $(somedir) is conditionally defined. However this is wrong 981 # for two reasons: 982 # 1. if the package is installed by a user who cannot write `.' 983 # make install will fail, 984 # 2. the above comment should most certainly read 985 # $(mkdir_p) $(DESTDIR)$(somedir) 986 # so it does not work when $(somedir) is undefined and 987 # $(DESTDIR) is not. 988 # To support the latter case, we have to write 989 # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), 990 # so the `.' trick is pointless. 991 mkdir_p='mkdir -p --' 992else 993 # On NextStep and OpenStep, the `mkdir' command does not 994 # recognize any option. It will interpret all options as 995 # directories to create, and then abort because `.' already 996 # exists. 997 for d in ./-p ./--version; 998 do 999 test -d $d && rmdir $d 1000 done 1001 # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. 1002 if test -f "$ac_aux_dir/mkinstalldirs"; then 1003 mkdir_p='$(mkinstalldirs)' 1004 else 1005 mkdir_p='$(install_sh) -d' 1006 fi 1007fi 1008AC_SUBST([mkdir_p])]) 1009 1010# Helper functions for option handling. -*- Autoconf -*- 1011 1012# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. 1013# 1014# This file is free software; the Free Software Foundation 1015# gives unlimited permission to copy and/or distribute it, 1016# with or without modifications, as long as this notice is preserved. 1017 1018# serial 3 1019 1020# _AM_MANGLE_OPTION(NAME) 1021# ----------------------- 1022AC_DEFUN([_AM_MANGLE_OPTION], 1023[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 1024 1025# _AM_SET_OPTION(NAME) 1026# ------------------------------ 1027# Set option NAME. Presently that only means defining a flag for this option. 1028AC_DEFUN([_AM_SET_OPTION], 1029[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 1030 1031# _AM_SET_OPTIONS(OPTIONS) 1032# ---------------------------------- 1033# OPTIONS is a space-separated list of Automake options. 1034AC_DEFUN([_AM_SET_OPTIONS], 1035[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 1036 1037# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 1038# ------------------------------------------- 1039# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 1040AC_DEFUN([_AM_IF_OPTION], 1041[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 1042 1043# Check to make sure that the build environment is sane. -*- Autoconf -*- 1044 1045# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 1046# Free Software Foundation, Inc. 1047# 1048# This file is free software; the Free Software Foundation 1049# gives unlimited permission to copy and/or distribute it, 1050# with or without modifications, as long as this notice is preserved. 1051 1052# serial 4 1053 1054# AM_SANITY_CHECK 1055# --------------- 1056AC_DEFUN([AM_SANITY_CHECK], 1057[AC_MSG_CHECKING([whether build environment is sane]) 1058# Just in case 1059sleep 1 1060echo timestamp > conftest.file 1061# Do `set' in a subshell so we don't clobber the current shell's 1062# arguments. Must try -L first in case configure is actually a 1063# symlink; some systems play weird games with the mod time of symlinks 1064# (eg FreeBSD returns the mod time of the symlink's containing 1065# directory). 1066if ( 1067 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` 1068 if test "$[*]" = "X"; then 1069 # -L didn't work. 1070 set X `ls -t $srcdir/configure conftest.file` 1071 fi 1072 rm -f conftest.file 1073 if test "$[*]" != "X $srcdir/configure conftest.file" \ 1074 && test "$[*]" != "X conftest.file $srcdir/configure"; then 1075 1076 # If neither matched, then we have a broken ls. This can happen 1077 # if, for instance, CONFIG_SHELL is bash and it inherits a 1078 # broken ls alias from the environment. This has actually 1079 # happened. Such a system could not be considered "sane". 1080 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 1081alias in your environment]) 1082 fi 1083 1084 test "$[2]" = conftest.file 1085 ) 1086then 1087 # Ok. 1088 : 1089else 1090 AC_MSG_ERROR([newly created file is older than distributed files! 1091Check your system clock]) 1092fi 1093AC_MSG_RESULT(yes)]) 1094 1095# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 1096# 1097# This file is free software; the Free Software Foundation 1098# gives unlimited permission to copy and/or distribute it, 1099# with or without modifications, as long as this notice is preserved. 1100 1101# AM_PROG_INSTALL_STRIP 1102# --------------------- 1103# One issue with vendor `install' (even GNU) is that you can't 1104# specify the program used to strip binaries. This is especially 1105# annoying in cross-compiling environments, where the build's strip 1106# is unlikely to handle the host's binaries. 1107# Fortunately install-sh will honor a STRIPPROG variable, so we 1108# always use install-sh in `make install-strip', and initialize 1109# STRIPPROG with the value of the STRIP variable (set by the user). 1110AC_DEFUN([AM_PROG_INSTALL_STRIP], 1111[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 1112# Installed binaries are usually stripped using `strip' when the user 1113# run `make install-strip'. However `strip' might not be the right 1114# tool to use in cross-compilation environments, therefore Automake 1115# will honor the `STRIP' environment variable to overrule this program. 1116dnl Don't test for $cross_compiling = yes, because it might be `maybe'. 1117if test "$cross_compiling" != no; then 1118 AC_CHECK_TOOL([STRIP], [strip], :) 1119fi 1120INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" 1121AC_SUBST([INSTALL_STRIP_PROGRAM])]) 1122 1123# Check how to create a tarball. -*- Autoconf -*- 1124 1125# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 1126# 1127# This file is free software; the Free Software Foundation 1128# gives unlimited permission to copy and/or distribute it, 1129# with or without modifications, as long as this notice is preserved. 1130 1131# serial 2 1132 1133# _AM_PROG_TAR(FORMAT) 1134# -------------------- 1135# Check how to create a tarball in format FORMAT. 1136# FORMAT should be one of `v7', `ustar', or `pax'. 1137# 1138# Substitute a variable $(am__tar) that is a command 1139# writing to stdout a FORMAT-tarball containing the directory 1140# $tardir. 1141# tardir=directory && $(am__tar) > result.tar 1142# 1143# Substitute a variable $(am__untar) that extract such 1144# a tarball read from stdin. 1145# $(am__untar) < result.tar 1146AC_DEFUN([_AM_PROG_TAR], 1147[# Always define AMTAR for backward compatibility. 1148AM_MISSING_PROG([AMTAR], [tar]) 1149m4_if([$1], [v7], 1150 [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 1151 [m4_case([$1], [ustar],, [pax],, 1152 [m4_fatal([Unknown tar format])]) 1153AC_MSG_CHECKING([how to create a $1 tar archive]) 1154# Loop over all known methods to create a tar archive until one works. 1155_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 1156_am_tools=${am_cv_prog_tar_$1-$_am_tools} 1157# Do not fold the above two line into one, because Tru64 sh and 1158# Solaris sh will not grok spaces in the rhs of `-'. 1159for _am_tool in $_am_tools 1160do 1161 case $_am_tool in 1162 gnutar) 1163 for _am_tar in tar gnutar gtar; 1164 do 1165 AM_RUN_LOG([$_am_tar --version]) && break 1166 done 1167 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 1168 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 1169 am__untar="$_am_tar -xf -" 1170 ;; 1171 plaintar) 1172 # Must skip GNU tar: if it does not support --format= it doesn't create 1173 # ustar tarball either. 1174 (tar --version) >/dev/null 2>&1 && continue 1175 am__tar='tar chf - "$$tardir"' 1176 am__tar_='tar chf - "$tardir"' 1177 am__untar='tar xf -' 1178 ;; 1179 pax) 1180 am__tar='pax -L -x $1 -w "$$tardir"' 1181 am__tar_='pax -L -x $1 -w "$tardir"' 1182 am__untar='pax -r' 1183 ;; 1184 cpio) 1185 am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 1186 am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 1187 am__untar='cpio -i -H $1 -d' 1188 ;; 1189 none) 1190 am__tar=false 1191 am__tar_=false 1192 am__untar=false 1193 ;; 1194 esac 1195 1196 # If the value was cached, stop now. We just wanted to have am__tar 1197 # and am__untar set. 1198 test -n "${am_cv_prog_tar_$1}" && break 1199 1200 # tar/untar a dummy directory, and stop if the command works 1201 rm -rf conftest.dir 1202 mkdir conftest.dir 1203 echo GrepMe > conftest.dir/file 1204 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 1205 rm -rf conftest.dir 1206 if test -s conftest.tar; then 1207 AM_RUN_LOG([$am__untar <conftest.tar]) 1208 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 1209 fi 1210done 1211rm -rf conftest.dir 1212 1213AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 1214AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 1215AC_SUBST([am__tar]) 1216AC_SUBST([am__untar]) 1217]) # _AM_PROG_TAR 1218 1219# Copyright (C) 1995-2002 Free Software Foundation, Inc. 1220# Copyright (C) 2001-2003,2004 Red Hat, Inc. 1221# 1222# This file is free software, distributed under the terms of the GNU 1223# General Public License. As a special exception to the GNU General 1224# Public License, this file may be distributed as part of a program 1225# that contains a configuration script generated by Autoconf, under 1226# the same distribution terms as the rest of that program. 1227# 1228# This file can be copied and used freely without restrictions. It can 1229# be used in projects which are not available under the GNU Public License 1230# but which still want to provide support for the GNU gettext functionality. 1231# 1232# Macro to add for using GNU gettext. 1233# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996 1234# 1235# Modified to never use included libintl. 1236# Owen Taylor <otaylor@redhat.com>, 12/15/1998 1237# 1238# Major rework to remove unused code 1239# Owen Taylor <otaylor@redhat.com>, 12/11/2002 1240# 1241# Added better handling of ALL_LINGUAS from GNU gettext version 1242# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002 1243# 1244# Modified to require ngettext 1245# Matthias Clasen <mclasen@redhat.com> 08/06/2004 1246# 1247# We need this here as well, since someone might use autoconf-2.5x 1248# to configure GLib then an older version to configure a package 1249# using AM_GLIB_GNU_GETTEXT 1250AC_PREREQ(2.53) 1251 1252dnl 1253dnl We go to great lengths to make sure that aclocal won't 1254dnl try to pull in the installed version of these macros 1255dnl when running aclocal in the glib directory. 1256dnl 1257m4_copy([AC_DEFUN],[glib_DEFUN]) 1258m4_copy([AC_REQUIRE],[glib_REQUIRE]) 1259dnl 1260dnl At the end, if we're not within glib, we'll define the public 1261dnl definitions in terms of our private definitions. 1262dnl 1263 1264# GLIB_LC_MESSAGES 1265#-------------------- 1266glib_DEFUN([GLIB_LC_MESSAGES], 1267 [AC_CHECK_HEADERS([locale.h]) 1268 if test $ac_cv_header_locale_h = yes; then 1269 AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, 1270 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES], 1271 am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) 1272 if test $am_cv_val_LC_MESSAGES = yes; then 1273 AC_DEFINE(HAVE_LC_MESSAGES, 1, 1274 [Define if your <locale.h> file defines LC_MESSAGES.]) 1275 fi 1276 fi]) 1277 1278# GLIB_PATH_PROG_WITH_TEST 1279#---------------------------- 1280dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, 1281dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) 1282glib_DEFUN([GLIB_PATH_PROG_WITH_TEST], 1283[# Extract the first word of "$2", so it can be a program name with args. 1284set dummy $2; ac_word=[$]2 1285AC_MSG_CHECKING([for $ac_word]) 1286AC_CACHE_VAL(ac_cv_path_$1, 1287[case "[$]$1" in 1288 /*) 1289 ac_cv_path_$1="[$]$1" # Let the user override the test with a path. 1290 ;; 1291 *) 1292 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" 1293 for ac_dir in ifelse([$5], , $PATH, [$5]); do 1294 test -z "$ac_dir" && ac_dir=. 1295 if test -f $ac_dir/$ac_word; then 1296 if [$3]; then 1297 ac_cv_path_$1="$ac_dir/$ac_word" 1298 break 1299 fi 1300 fi 1301 done 1302 IFS="$ac_save_ifs" 1303dnl If no 4th arg is given, leave the cache variable unset, 1304dnl so AC_PATH_PROGS will keep looking. 1305ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" 1306])dnl 1307 ;; 1308esac])dnl 1309$1="$ac_cv_path_$1" 1310if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then 1311 AC_MSG_RESULT([$]$1) 1312else 1313 AC_MSG_RESULT(no) 1314fi 1315AC_SUBST($1)dnl 1316]) 1317 1318# GLIB_WITH_NLS 1319#----------------- 1320glib_DEFUN([GLIB_WITH_NLS], 1321 dnl NLS is obligatory 1322 [USE_NLS=yes 1323 AC_SUBST(USE_NLS) 1324 1325 gt_cv_have_gettext=no 1326 1327 CATOBJEXT=NONE 1328 XGETTEXT=: 1329 INTLLIBS= 1330 1331 AC_CHECK_HEADER(libintl.h, 1332 [gt_cv_func_dgettext_libintl="no" 1333 libintl_extra_libs="" 1334 1335 # 1336 # First check in libc 1337 # 1338 AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc, 1339 [AC_TRY_LINK([ 1340#include <libintl.h> 1341], 1342 [return !ngettext ("","", 1)], 1343 gt_cv_func_ngettext_libc=yes, 1344 gt_cv_func_ngettext_libc=no) 1345 ]) 1346 1347 if test "$gt_cv_func_ngettext_libc" = "yes" ; then 1348 AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc, 1349 [AC_TRY_LINK([ 1350#include <libintl.h> 1351], 1352 [return !dgettext ("","")], 1353 gt_cv_func_dgettext_libc=yes, 1354 gt_cv_func_dgettext_libc=no) 1355 ]) 1356 fi 1357 1358 if test "$gt_cv_func_ngettext_libc" = "yes" ; then 1359 AC_CHECK_FUNCS(bind_textdomain_codeset) 1360 fi 1361 1362 # 1363 # If we don't have everything we want, check in libintl 1364 # 1365 if test "$gt_cv_func_dgettext_libc" != "yes" \ 1366 || test "$gt_cv_func_ngettext_libc" != "yes" \ 1367 || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then 1368 1369 AC_CHECK_LIB(intl, bindtextdomain, 1370 [AC_CHECK_LIB(intl, ngettext, 1371 [AC_CHECK_LIB(intl, dgettext, 1372 gt_cv_func_dgettext_libintl=yes)])]) 1373 1374 if test "$gt_cv_func_dgettext_libintl" != "yes" ; then 1375 AC_MSG_CHECKING([if -liconv is needed to use gettext]) 1376 AC_MSG_RESULT([]) 1377 AC_CHECK_LIB(intl, ngettext, 1378 [AC_CHECK_LIB(intl, dcgettext, 1379 [gt_cv_func_dgettext_libintl=yes 1380 libintl_extra_libs=-liconv], 1381 :,-liconv)], 1382 :,-liconv) 1383 fi 1384 1385 # 1386 # If we found libintl, then check in it for bind_textdomain_codeset(); 1387 # we'll prefer libc if neither have bind_textdomain_codeset(), 1388 # and both have dgettext and ngettext 1389 # 1390 if test "$gt_cv_func_dgettext_libintl" = "yes" ; then 1391 glib_save_LIBS="$LIBS" 1392 LIBS="$LIBS -lintl $libintl_extra_libs" 1393 unset ac_cv_func_bind_textdomain_codeset 1394 AC_CHECK_FUNCS(bind_textdomain_codeset) 1395 LIBS="$glib_save_LIBS" 1396 1397 if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then 1398 gt_cv_func_dgettext_libc=no 1399 else 1400 if test "$gt_cv_func_dgettext_libc" = "yes" \ 1401 && test "$gt_cv_func_ngettext_libc" = "yes"; then 1402 gt_cv_func_dgettext_libintl=no 1403 fi 1404 fi 1405 fi 1406 fi 1407 1408 if test "$gt_cv_func_dgettext_libc" = "yes" \ 1409 || test "$gt_cv_func_dgettext_libintl" = "yes"; then 1410 gt_cv_have_gettext=yes 1411 fi 1412 1413 if test "$gt_cv_func_dgettext_libintl" = "yes"; then 1414 INTLLIBS="-lintl $libintl_extra_libs" 1415 fi 1416 1417 if test "$gt_cv_have_gettext" = "yes"; then 1418 AC_DEFINE(HAVE_GETTEXT,1, 1419 [Define if the GNU gettext() function is already present or preinstalled.]) 1420 GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, 1421 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl 1422 if test "$MSGFMT" != "no"; then 1423 glib_save_LIBS="$LIBS" 1424 LIBS="$LIBS $INTLLIBS" 1425 AC_CHECK_FUNCS(dcgettext) 1426 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) 1427 GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, 1428 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) 1429 AC_TRY_LINK(, [extern int _nl_msg_cat_cntr; 1430 return _nl_msg_cat_cntr], 1431 [CATOBJEXT=.gmo 1432 DATADIRNAME=share], 1433 [case $host in 1434 *-*-solaris*) 1435 dnl On Solaris, if bind_textdomain_codeset is in libc, 1436 dnl GNU format message catalog is always supported, 1437 dnl since both are added to the libc all together. 1438 dnl Hence, we'd like to go with DATADIRNAME=share and 1439 dnl and CATOBJEXT=.gmo in this case. 1440 AC_CHECK_FUNC(bind_textdomain_codeset, 1441 [CATOBJEXT=.gmo 1442 DATADIRNAME=share], 1443 [CATOBJEXT=.mo 1444 DATADIRNAME=lib]) 1445 ;; 1446 *) 1447 CATOBJEXT=.mo 1448 DATADIRNAME=lib 1449 ;; 1450 esac]) 1451 LIBS="$glib_save_LIBS" 1452 INSTOBJEXT=.mo 1453 else 1454 gt_cv_have_gettext=no 1455 fi 1456 fi 1457 ]) 1458 1459 if test "$gt_cv_have_gettext" = "yes" ; then 1460 AC_DEFINE(ENABLE_NLS, 1, 1461 [always defined to indicate that i18n is enabled]) 1462 fi 1463 1464 dnl Test whether we really found GNU xgettext. 1465 if test "$XGETTEXT" != ":"; then 1466 dnl If it is not GNU xgettext we define it as : so that the 1467 dnl Makefiles still can work. 1468 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then 1469 : ; 1470 else 1471 AC_MSG_RESULT( 1472 [found xgettext program is not GNU xgettext; ignore it]) 1473 XGETTEXT=":" 1474 fi 1475 fi 1476 1477 # We need to process the po/ directory. 1478 POSUB=po 1479 1480 AC_OUTPUT_COMMANDS( 1481 [case "$CONFIG_FILES" in *po/Makefile.in*) 1482 sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile 1483 esac]) 1484 1485 dnl These rules are solely for the distribution goal. While doing this 1486 dnl we only have to keep exactly one list of the available catalogs 1487 dnl in configure.in. 1488 for lang in $ALL_LINGUAS; do 1489 GMOFILES="$GMOFILES $lang.gmo" 1490 POFILES="$POFILES $lang.po" 1491 done 1492 1493 dnl Make all variables we use known to autoconf. 1494 AC_SUBST(CATALOGS) 1495 AC_SUBST(CATOBJEXT) 1496 AC_SUBST(DATADIRNAME) 1497 AC_SUBST(GMOFILES) 1498 AC_SUBST(INSTOBJEXT) 1499 AC_SUBST(INTLLIBS) 1500 AC_SUBST(PO_IN_DATADIR_TRUE) 1501 AC_SUBST(PO_IN_DATADIR_FALSE) 1502 AC_SUBST(POFILES) 1503 AC_SUBST(POSUB) 1504 ]) 1505 1506# AM_GLIB_GNU_GETTEXT 1507# ------------------- 1508# Do checks necessary for use of gettext. If a suitable implementation 1509# of gettext is found in either in libintl or in the C library, 1510# it will set INTLLIBS to the libraries needed for use of gettext 1511# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable 1512# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST() 1513# on various variables needed by the Makefile.in.in installed by 1514# glib-gettextize. 1515dnl 1516glib_DEFUN([GLIB_GNU_GETTEXT], 1517 [AC_REQUIRE([AC_PROG_CC])dnl 1518 AC_REQUIRE([AC_HEADER_STDC])dnl 1519 1520 GLIB_LC_MESSAGES 1521 GLIB_WITH_NLS 1522 1523 if test "$gt_cv_have_gettext" = "yes"; then 1524 if test "x$ALL_LINGUAS" = "x"; then 1525 LINGUAS= 1526 else 1527 AC_MSG_CHECKING(for catalogs to be installed) 1528 NEW_LINGUAS= 1529 for presentlang in $ALL_LINGUAS; do 1530 useit=no 1531 if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then 1532 desiredlanguages="$LINGUAS" 1533 else 1534 desiredlanguages="$ALL_LINGUAS" 1535 fi 1536 for desiredlang in $desiredlanguages; do 1537 # Use the presentlang catalog if desiredlang is 1538 # a. equal to presentlang, or 1539 # b. a variant of presentlang (because in this case, 1540 # presentlang can be used as a fallback for messages 1541 # which are not translated in the desiredlang catalog). 1542 case "$desiredlang" in 1543 "$presentlang"*) useit=yes;; 1544 esac 1545 done 1546 if test $useit = yes; then 1547 NEW_LINGUAS="$NEW_LINGUAS $presentlang" 1548 fi 1549 done 1550 LINGUAS=$NEW_LINGUAS 1551 AC_MSG_RESULT($LINGUAS) 1552 fi 1553 1554 dnl Construct list of names of catalog files to be constructed. 1555 if test -n "$LINGUAS"; then 1556 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done 1557 fi 1558 fi 1559 1560 dnl Generate list of files to be processed by xgettext which will 1561 dnl be included in po/Makefile. 1562 test -d po || mkdir po 1563 if test "x$srcdir" != "x."; then 1564 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then 1565 posrcprefix="$srcdir/" 1566 else 1567 posrcprefix="../$srcdir/" 1568 fi 1569 else 1570 posrcprefix="../" 1571 fi 1572 rm -f po/POTFILES 1573 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ 1574 < $srcdir/po/POTFILES.in > po/POTFILES 1575 ]) 1576 1577# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE) 1578# ------------------------------- 1579# Define VARIABLE to the location where catalog files will 1580# be installed by po/Makefile. 1581glib_DEFUN([GLIB_DEFINE_LOCALEDIR], 1582[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl 1583glib_save_prefix="$prefix" 1584glib_save_exec_prefix="$exec_prefix" 1585test "x$prefix" = xNONE && prefix=$ac_default_prefix 1586test "x$exec_prefix" = xNONE && exec_prefix=$prefix 1587if test "x$CATOBJEXT" = "x.mo" ; then 1588 localedir=`eval echo "${libdir}/locale"` 1589else 1590 localedir="${datadir}/locale" 1591 while true; do 1592 expanded_localedir=`eval echo "$localedir"` 1593 test "x$expanded_localedir" = "x$localedir" && break 1594 localedir="$expanded_localedir" 1595 done 1596fi 1597prefix="$glib_save_prefix" 1598exec_prefix="$glib_save_exec_prefix" 1599AC_DEFINE_UNQUOTED($1, "$localedir", 1600 [Define the location where the catalogs will be installed]) 1601]) 1602 1603dnl 1604dnl Now the definitions that aclocal will find 1605dnl 1606ifdef(glib_configure_in,[],[ 1607AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)]) 1608AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)]) 1609])dnl 1610 1611