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