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