1# generated automatically by aclocal 1.11 -*- Autoconf -*- 2 3# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4# 2005, 2006, 2007, 2008, 2009 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(m4_defn([AC_AUTOCONF_VERSION]), [2.64],, 17[m4_warning([this file was generated for autoconf 2.64. 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# gettext.m4 serial 60 (gettext-0.17) 23dnl Copyright (C) 1995-2007 Free Software Foundation, Inc. 24dnl This file is free software; the Free Software Foundation 25dnl gives unlimited permission to copy and/or distribute it, 26dnl with or without modifications, as long as this notice is preserved. 27dnl 28dnl This file can can be used in projects which are not available under 29dnl the GNU General Public License or the GNU Library General Public 30dnl License but which still want to provide support for the GNU gettext 31dnl functionality. 32dnl Please note that the actual code of the GNU gettext library is covered 33dnl by the GNU Library General Public License, and the rest of the GNU 34dnl gettext package package is covered by the GNU General Public License. 35dnl They are *not* in the public domain. 36 37dnl Authors: 38dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000. 39dnl Bruno Haible <haible@clisp.cons.org>, 2000-2006. 40 41dnl Macro to add for using GNU gettext. 42 43dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]). 44dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The 45dnl default (if it is not specified or empty) is 'no-libtool'. 46dnl INTLSYMBOL should be 'external' for packages with no intl directory, 47dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory. 48dnl If INTLSYMBOL is 'use-libtool', then a libtool library 49dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static, 50dnl depending on --{enable,disable}-{shared,static} and on the presence of 51dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library 52dnl $(top_builddir)/intl/libintl.a will be created. 53dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext 54dnl implementations (in libc or libintl) without the ngettext() function 55dnl will be ignored. If NEEDSYMBOL is specified and is 56dnl 'need-formatstring-macros', then GNU gettext implementations that don't 57dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored. 58dnl INTLDIR is used to find the intl libraries. If empty, 59dnl the value `$(top_builddir)/intl/' is used. 60dnl 61dnl The result of the configuration is one of three cases: 62dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled 63dnl and used. 64dnl Catalog format: GNU --> install in $(datadir) 65dnl Catalog extension: .mo after installation, .gmo in source tree 66dnl 2) GNU gettext has been found in the system's C library. 67dnl Catalog format: GNU --> install in $(datadir) 68dnl Catalog extension: .mo after installation, .gmo in source tree 69dnl 3) No internationalization, always use English msgid. 70dnl Catalog format: none 71dnl Catalog extension: none 72dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur. 73dnl The use of .gmo is historical (it was needed to avoid overwriting the 74dnl GNU format catalogs when building on a platform with an X/Open gettext), 75dnl but we keep it in order not to force irrelevant filename changes on the 76dnl maintainers. 77dnl 78AC_DEFUN([AM_GNU_GETTEXT], 79[ 80 dnl Argument checking. 81 ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], , 82 [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT 83])])])])]) 84 ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], , 85 [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT 86])])])]) 87 define([gt_included_intl], 88 ifelse([$1], [external], 89 ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]), 90 [yes])) 91 define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], [])) 92 gt_NEEDS_INIT 93 AM_GNU_GETTEXT_NEED([$2]) 94 95 AC_REQUIRE([AM_PO_SUBDIRS])dnl 96 ifelse(gt_included_intl, yes, [ 97 AC_REQUIRE([AM_INTL_SUBDIR])dnl 98 ]) 99 100 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. 101 AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) 102 AC_REQUIRE([AC_LIB_RPATH]) 103 104 dnl Sometimes libintl requires libiconv, so first search for libiconv. 105 dnl Ideally we would do this search only after the 106 dnl if test "$USE_NLS" = "yes"; then 107 dnl if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then 108 dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT 109 dnl the configure script would need to contain the same shell code 110 dnl again, outside any 'if'. There are two solutions: 111 dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'. 112 dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE. 113 dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not 114 dnl documented, we avoid it. 115 ifelse(gt_included_intl, yes, , [ 116 AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) 117 ]) 118 119 dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation. 120 gt_INTL_MACOSX 121 122 dnl Set USE_NLS. 123 AC_REQUIRE([AM_NLS]) 124 125 ifelse(gt_included_intl, yes, [ 126 BUILD_INCLUDED_LIBINTL=no 127 USE_INCLUDED_LIBINTL=no 128 ]) 129 LIBINTL= 130 LTLIBINTL= 131 POSUB= 132 133 dnl Add a version number to the cache macros. 134 case " $gt_needs " in 135 *" need-formatstring-macros "*) gt_api_version=3 ;; 136 *" need-ngettext "*) gt_api_version=2 ;; 137 *) gt_api_version=1 ;; 138 esac 139 gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc" 140 gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl" 141 142 dnl If we use NLS figure out what method 143 if test "$USE_NLS" = "yes"; then 144 gt_use_preinstalled_gnugettext=no 145 ifelse(gt_included_intl, yes, [ 146 AC_MSG_CHECKING([whether included gettext is requested]) 147 AC_ARG_WITH(included-gettext, 148 [ --with-included-gettext use the GNU gettext library included here], 149 nls_cv_force_use_gnu_gettext=$withval, 150 nls_cv_force_use_gnu_gettext=no) 151 AC_MSG_RESULT($nls_cv_force_use_gnu_gettext) 152 153 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" 154 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then 155 ]) 156 dnl User does not insist on using GNU NLS library. Figure out what 157 dnl to use. If GNU gettext is available we use this. Else we have 158 dnl to fall back to GNU NLS library. 159 160 if test $gt_api_version -ge 3; then 161 gt_revision_test_code=' 162#ifndef __GNU_GETTEXT_SUPPORTED_REVISION 163#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) 164#endif 165changequote(,)dnl 166typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; 167changequote([,])dnl 168' 169 else 170 gt_revision_test_code= 171 fi 172 if test $gt_api_version -ge 2; then 173 gt_expression_test_code=' + * ngettext ("", "", 0)' 174 else 175 gt_expression_test_code= 176 fi 177 178 AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc], 179 [AC_TRY_LINK([#include <libintl.h> 180$gt_revision_test_code 181extern int _nl_msg_cat_cntr; 182extern int *_nl_domain_bindings;], 183 [bindtextdomain ("", ""); 184return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings], 185 [eval "$gt_func_gnugettext_libc=yes"], 186 [eval "$gt_func_gnugettext_libc=no"])]) 187 188 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then 189 dnl Sometimes libintl requires libiconv, so first search for libiconv. 190 ifelse(gt_included_intl, yes, , [ 191 AM_ICONV_LINK 192 ]) 193 dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL 194 dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv]) 195 dnl because that would add "-liconv" to LIBINTL and LTLIBINTL 196 dnl even if libiconv doesn't exist. 197 AC_LIB_LINKFLAGS_BODY([intl]) 198 AC_CACHE_CHECK([for GNU gettext in libintl], 199 [$gt_func_gnugettext_libintl], 200 [gt_save_CPPFLAGS="$CPPFLAGS" 201 CPPFLAGS="$CPPFLAGS $INCINTL" 202 gt_save_LIBS="$LIBS" 203 LIBS="$LIBS $LIBINTL" 204 dnl Now see whether libintl exists and does not depend on libiconv. 205 AC_TRY_LINK([#include <libintl.h> 206$gt_revision_test_code 207extern int _nl_msg_cat_cntr; 208extern 209#ifdef __cplusplus 210"C" 211#endif 212const char *_nl_expand_alias (const char *);], 213 [bindtextdomain ("", ""); 214return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")], 215 [eval "$gt_func_gnugettext_libintl=yes"], 216 [eval "$gt_func_gnugettext_libintl=no"]) 217 dnl Now see whether libintl exists and depends on libiconv. 218 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then 219 LIBS="$LIBS $LIBICONV" 220 AC_TRY_LINK([#include <libintl.h> 221$gt_revision_test_code 222extern int _nl_msg_cat_cntr; 223extern 224#ifdef __cplusplus 225"C" 226#endif 227const char *_nl_expand_alias (const char *);], 228 [bindtextdomain ("", ""); 229return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")], 230 [LIBINTL="$LIBINTL $LIBICONV" 231 LTLIBINTL="$LTLIBINTL $LTLIBICONV" 232 eval "$gt_func_gnugettext_libintl=yes" 233 ]) 234 fi 235 CPPFLAGS="$gt_save_CPPFLAGS" 236 LIBS="$gt_save_LIBS"]) 237 fi 238 239 dnl If an already present or preinstalled GNU gettext() is found, 240 dnl use it. But if this macro is used in GNU gettext, and GNU 241 dnl gettext is already preinstalled in libintl, we update this 242 dnl libintl. (Cf. the install rule in intl/Makefile.in.) 243 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ 244 || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \ 245 && test "$PACKAGE" != gettext-runtime \ 246 && test "$PACKAGE" != gettext-tools; }; then 247 gt_use_preinstalled_gnugettext=yes 248 else 249 dnl Reset the values set by searching for libintl. 250 LIBINTL= 251 LTLIBINTL= 252 INCINTL= 253 fi 254 255 ifelse(gt_included_intl, yes, [ 256 if test "$gt_use_preinstalled_gnugettext" != "yes"; then 257 dnl GNU gettext is not found in the C library. 258 dnl Fall back on included GNU gettext library. 259 nls_cv_use_gnu_gettext=yes 260 fi 261 fi 262 263 if test "$nls_cv_use_gnu_gettext" = "yes"; then 264 dnl Mark actions used to generate GNU NLS library. 265 BUILD_INCLUDED_LIBINTL=yes 266 USE_INCLUDED_LIBINTL=yes 267 LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD" 268 LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD" 269 LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` 270 fi 271 272 CATOBJEXT= 273 if test "$gt_use_preinstalled_gnugettext" = "yes" \ 274 || test "$nls_cv_use_gnu_gettext" = "yes"; then 275 dnl Mark actions to use GNU gettext tools. 276 CATOBJEXT=.gmo 277 fi 278 ]) 279 280 if test -n "$INTL_MACOSX_LIBS"; then 281 if test "$gt_use_preinstalled_gnugettext" = "yes" \ 282 || test "$nls_cv_use_gnu_gettext" = "yes"; then 283 dnl Some extra flags are needed during linking. 284 LIBINTL="$LIBINTL $INTL_MACOSX_LIBS" 285 LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS" 286 fi 287 fi 288 289 if test "$gt_use_preinstalled_gnugettext" = "yes" \ 290 || test "$nls_cv_use_gnu_gettext" = "yes"; then 291 AC_DEFINE(ENABLE_NLS, 1, 292 [Define to 1 if translation of program messages to the user's native language 293 is requested.]) 294 else 295 USE_NLS=no 296 fi 297 fi 298 299 AC_MSG_CHECKING([whether to use NLS]) 300 AC_MSG_RESULT([$USE_NLS]) 301 if test "$USE_NLS" = "yes"; then 302 AC_MSG_CHECKING([where the gettext function comes from]) 303 if test "$gt_use_preinstalled_gnugettext" = "yes"; then 304 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then 305 gt_source="external libintl" 306 else 307 gt_source="libc" 308 fi 309 else 310 gt_source="included intl directory" 311 fi 312 AC_MSG_RESULT([$gt_source]) 313 fi 314 315 if test "$USE_NLS" = "yes"; then 316 317 if test "$gt_use_preinstalled_gnugettext" = "yes"; then 318 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then 319 AC_MSG_CHECKING([how to link with libintl]) 320 AC_MSG_RESULT([$LIBINTL]) 321 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL]) 322 fi 323 324 dnl For backward compatibility. Some packages may be using this. 325 AC_DEFINE(HAVE_GETTEXT, 1, 326 [Define if the GNU gettext() function is already present or preinstalled.]) 327 AC_DEFINE(HAVE_DCGETTEXT, 1, 328 [Define if the GNU dcgettext() function is already present or preinstalled.]) 329 fi 330 331 dnl We need to process the po/ directory. 332 POSUB=po 333 fi 334 335 ifelse(gt_included_intl, yes, [ 336 dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL 337 dnl to 'yes' because some of the testsuite requires it. 338 if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then 339 BUILD_INCLUDED_LIBINTL=yes 340 fi 341 342 dnl Make all variables we use known to autoconf. 343 AC_SUBST(BUILD_INCLUDED_LIBINTL) 344 AC_SUBST(USE_INCLUDED_LIBINTL) 345 AC_SUBST(CATOBJEXT) 346 347 dnl For backward compatibility. Some configure.ins may be using this. 348 nls_cv_header_intl= 349 nls_cv_header_libgt= 350 351 dnl For backward compatibility. Some Makefiles may be using this. 352 DATADIRNAME=share 353 AC_SUBST(DATADIRNAME) 354 355 dnl For backward compatibility. Some Makefiles may be using this. 356 INSTOBJEXT=.mo 357 AC_SUBST(INSTOBJEXT) 358 359 dnl For backward compatibility. Some Makefiles may be using this. 360 GENCAT=gencat 361 AC_SUBST(GENCAT) 362 363 dnl For backward compatibility. Some Makefiles may be using this. 364 INTLOBJS= 365 if test "$USE_INCLUDED_LIBINTL" = yes; then 366 INTLOBJS="\$(GETTOBJS)" 367 fi 368 AC_SUBST(INTLOBJS) 369 370 dnl Enable libtool support if the surrounding package wishes it. 371 INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix 372 AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX) 373 ]) 374 375 dnl For backward compatibility. Some Makefiles may be using this. 376 INTLLIBS="$LIBINTL" 377 AC_SUBST(INTLLIBS) 378 379 dnl Make all documented variables known to autoconf. 380 AC_SUBST(LIBINTL) 381 AC_SUBST(LTLIBINTL) 382 AC_SUBST(POSUB) 383]) 384 385 386dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized. 387m4_define([gt_NEEDS_INIT], 388[ 389 m4_divert_text([DEFAULTS], [gt_needs=]) 390 m4_define([gt_NEEDS_INIT], []) 391]) 392 393 394dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL]) 395AC_DEFUN([AM_GNU_GETTEXT_NEED], 396[ 397 m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"]) 398]) 399 400 401dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version]) 402AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) 403 404# Configure paths for GTK+ 405# Owen Taylor 1997-2001 406 407dnl AM_PATH_GTK_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]]) 408dnl Test for GTK+, and define GTK_CFLAGS and GTK_LIBS, if gthread is specified in MODULES, 409dnl pass to pkg-config 410dnl 411AC_DEFUN([AM_PATH_GTK_2_0], 412[dnl 413dnl Get the cflags and libraries from pkg-config 414dnl 415AC_ARG_ENABLE(gtktest, [ --disable-gtktest do not try to compile and run a test GTK+ program], 416 , enable_gtktest=yes) 417 418 pkg_config_args=gtk+-2.0 419 for module in . $4 420 do 421 case "$module" in 422 gthread) 423 pkg_config_args="$pkg_config_args gthread-2.0" 424 ;; 425 esac 426 done 427 428 no_gtk="" 429 430 AC_PATH_PROG(PKG_CONFIG, pkg-config, no) 431 432 if test x$PKG_CONFIG != xno ; then 433 if pkg-config --atleast-pkgconfig-version 0.7 ; then 434 : 435 else 436 echo "*** pkg-config too old; version 0.7 or better required." 437 no_gtk=yes 438 PKG_CONFIG=no 439 fi 440 else 441 no_gtk=yes 442 fi 443 444 min_gtk_version=ifelse([$1], ,2.0.0,$1) 445 AC_MSG_CHECKING(for GTK+ - version >= $min_gtk_version) 446 447 if test x$PKG_CONFIG != xno ; then 448 ## don't try to run the test against uninstalled libtool libs 449 if $PKG_CONFIG --uninstalled $pkg_config_args; then 450 echo "Will use uninstalled version of GTK+ found in PKG_CONFIG_PATH" 451 enable_gtktest=no 452 fi 453 454 if $PKG_CONFIG --atleast-version $min_gtk_version $pkg_config_args; then 455 : 456 else 457 no_gtk=yes 458 fi 459 fi 460 461 if test x"$no_gtk" = x ; then 462 GTK_CFLAGS=`$PKG_CONFIG $pkg_config_args --cflags` 463 GTK_LIBS=`$PKG_CONFIG $pkg_config_args --libs` 464 gtk_config_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ 465 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` 466 gtk_config_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ 467 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` 468 gtk_config_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ 469 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` 470 if test "x$enable_gtktest" = "xyes" ; then 471 ac_save_CFLAGS="$CFLAGS" 472 ac_save_LIBS="$LIBS" 473 CFLAGS="$CFLAGS $GTK_CFLAGS" 474 LIBS="$GTK_LIBS $LIBS" 475dnl 476dnl Now check if the installed GTK+ is sufficiently new. (Also sanity 477dnl checks the results of pkg-config to some extent) 478dnl 479 rm -f conf.gtktest 480 AC_TRY_RUN([ 481#include <gtk/gtk.h> 482#include <stdio.h> 483#include <stdlib.h> 484 485int 486main () 487{ 488 int major, minor, micro; 489 char *tmp_version; 490 491 system ("touch conf.gtktest"); 492 493 /* HP/UX 9 (%@#!) writes to sscanf strings */ 494 tmp_version = g_strdup("$min_gtk_version"); 495 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { 496 printf("%s, bad version string\n", "$min_gtk_version"); 497 exit(1); 498 } 499 500 if ((gtk_major_version != $gtk_config_major_version) || 501 (gtk_minor_version != $gtk_config_minor_version) || 502 (gtk_micro_version != $gtk_config_micro_version)) 503 { 504 printf("\n*** 'pkg-config --modversion gtk+-2.0' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", 505 $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version, 506 gtk_major_version, gtk_minor_version, gtk_micro_version); 507 printf ("*** was found! If pkg-config was correct, then it is best\n"); 508 printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n"); 509 printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); 510 printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); 511 printf("*** required on your system.\n"); 512 printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n"); 513 printf("*** to point to the correct configuration files\n"); 514 } 515 else if ((gtk_major_version != GTK_MAJOR_VERSION) || 516 (gtk_minor_version != GTK_MINOR_VERSION) || 517 (gtk_micro_version != GTK_MICRO_VERSION)) 518 { 519 printf("*** GTK+ header files (version %d.%d.%d) do not match\n", 520 GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION); 521 printf("*** library (version %d.%d.%d)\n", 522 gtk_major_version, gtk_minor_version, gtk_micro_version); 523 } 524 else 525 { 526 if ((gtk_major_version > major) || 527 ((gtk_major_version == major) && (gtk_minor_version > minor)) || 528 ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro))) 529 { 530 return 0; 531 } 532 else 533 { 534 printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n", 535 gtk_major_version, gtk_minor_version, gtk_micro_version); 536 printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n", 537 major, minor, micro); 538 printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n"); 539 printf("***\n"); 540 printf("*** If you have already installed a sufficiently new version, this error\n"); 541 printf("*** probably means that the wrong copy of the pkg-config shell script is\n"); 542 printf("*** being found. The easiest way to fix this is to remove the old version\n"); 543 printf("*** of GTK+, but you can also set the PKG_CONFIG environment to point to the\n"); 544 printf("*** correct copy of pkg-config. (In this case, you will have to\n"); 545 printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); 546 printf("*** so that the correct libraries are found at run-time))\n"); 547 } 548 } 549 return 1; 550} 551],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) 552 CFLAGS="$ac_save_CFLAGS" 553 LIBS="$ac_save_LIBS" 554 fi 555 fi 556 if test "x$no_gtk" = x ; then 557 AC_MSG_RESULT(yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version)) 558 ifelse([$2], , :, [$2]) 559 else 560 AC_MSG_RESULT(no) 561 if test "$PKG_CONFIG" = "no" ; then 562 echo "*** A new enough version of pkg-config was not found." 563 echo "*** See http://pkgconfig.sourceforge.net" 564 else 565 if test -f conf.gtktest ; then 566 : 567 else 568 echo "*** Could not run GTK+ test program, checking why..." 569 ac_save_CFLAGS="$CFLAGS" 570 ac_save_LIBS="$LIBS" 571 CFLAGS="$CFLAGS $GTK_CFLAGS" 572 LIBS="$LIBS $GTK_LIBS" 573 AC_TRY_LINK([ 574#include <gtk/gtk.h> 575#include <stdio.h> 576], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ], 577 [ echo "*** The test program compiled, but did not run. This usually means" 578 echo "*** that the run-time linker is not finding GTK+ or finding the wrong" 579 echo "*** version of GTK+. If it is not finding GTK+, you'll need to set your" 580 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" 581 echo "*** to the installed location Also, make sure you have run ldconfig if that" 582 echo "*** is required on your system" 583 echo "***" 584 echo "*** If you have an old version installed, it is best to remove it, although" 585 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ], 586 [ echo "*** The test program failed to compile or link. See the file config.log for the" 587 echo "*** exact error that occured. This usually means GTK+ is incorrectly installed."]) 588 CFLAGS="$ac_save_CFLAGS" 589 LIBS="$ac_save_LIBS" 590 fi 591 fi 592 GTK_CFLAGS="" 593 GTK_LIBS="" 594 ifelse([$3], , :, [$3]) 595 fi 596 AC_SUBST(GTK_CFLAGS) 597 AC_SUBST(GTK_LIBS) 598 rm -f conf.gtktest 599]) 600 601# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 602# 603# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 604# 605# This program is free software; you can redistribute it and/or modify 606# it under the terms of the GNU General Public License as published by 607# the Free Software Foundation; either version 2 of the License, or 608# (at your option) any later version. 609# 610# This program is distributed in the hope that it will be useful, but 611# WITHOUT ANY WARRANTY; without even the implied warranty of 612# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 613# General Public License for more details. 614# 615# You should have received a copy of the GNU General Public License 616# along with this program; if not, write to the Free Software 617# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 618# 619# As a special exception to the GNU General Public License, if you 620# distribute this file as part of a program that contains a 621# configuration script generated by Autoconf, you may include it under 622# the same distribution terms that you use for the rest of that program. 623 624# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 625# ---------------------------------- 626AC_DEFUN([PKG_PROG_PKG_CONFIG], 627[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 628m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 629AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 630if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 631 AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 632fi 633if test -n "$PKG_CONFIG"; then 634 _pkg_min_version=m4_default([$1], [0.9.0]) 635 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 636 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 637 AC_MSG_RESULT([yes]) 638 else 639 AC_MSG_RESULT([no]) 640 PKG_CONFIG="" 641 fi 642 643fi[]dnl 644])# PKG_PROG_PKG_CONFIG 645 646# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 647# 648# Check to see whether a particular set of modules exists. Similar 649# to PKG_CHECK_MODULES(), but does not set variables or print errors. 650# 651# 652# Similar to PKG_CHECK_MODULES, make sure that the first instance of 653# this or PKG_CHECK_MODULES is called, or make sure to call 654# PKG_CHECK_EXISTS manually 655# -------------------------------------------------------------- 656AC_DEFUN([PKG_CHECK_EXISTS], 657[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 658if test -n "$PKG_CONFIG" && \ 659 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 660 m4_ifval([$2], [$2], [:]) 661m4_ifvaln([$3], [else 662 $3])dnl 663fi]) 664 665 666# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 667# --------------------------------------------- 668m4_define([_PKG_CONFIG], 669[if test -n "$PKG_CONFIG"; then 670 if test -n "$$1"; then 671 pkg_cv_[]$1="$$1" 672 else 673 PKG_CHECK_EXISTS([$3], 674 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 675 [pkg_failed=yes]) 676 fi 677else 678 pkg_failed=untried 679fi[]dnl 680])# _PKG_CONFIG 681 682# _PKG_SHORT_ERRORS_SUPPORTED 683# ----------------------------- 684AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 685[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 686if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 687 _pkg_short_errors_supported=yes 688else 689 _pkg_short_errors_supported=no 690fi[]dnl 691])# _PKG_SHORT_ERRORS_SUPPORTED 692 693 694# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 695# [ACTION-IF-NOT-FOUND]) 696# 697# 698# Note that if there is a possibility the first call to 699# PKG_CHECK_MODULES might not happen, you should be sure to include an 700# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 701# 702# 703# -------------------------------------------------------------- 704AC_DEFUN([PKG_CHECK_MODULES], 705[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 706AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 707AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 708 709pkg_failed=no 710AC_MSG_CHECKING([for $1]) 711 712_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 713_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 714 715m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 716and $1[]_LIBS to avoid the need to call pkg-config. 717See the pkg-config man page for more details.]) 718 719if test $pkg_failed = yes; then 720 _PKG_SHORT_ERRORS_SUPPORTED 721 if test $_pkg_short_errors_supported = yes; then 722 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` 723 else 724 $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` 725 fi 726 # Put the nasty error message in config.log where it belongs 727 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 728 729 ifelse([$4], , [AC_MSG_ERROR(dnl 730[Package requirements ($2) were not met: 731 732$$1_PKG_ERRORS 733 734Consider adjusting the PKG_CONFIG_PATH environment variable if you 735installed software in a non-standard prefix. 736 737_PKG_TEXT 738])], 739 [AC_MSG_RESULT([no]) 740 $4]) 741elif test $pkg_failed = untried; then 742 ifelse([$4], , [AC_MSG_FAILURE(dnl 743[The pkg-config script could not be found or is too old. Make sure it 744is in your PATH or set the PKG_CONFIG environment variable to the full 745path to pkg-config. 746 747_PKG_TEXT 748 749To get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 750 [$4]) 751else 752 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 753 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 754 AC_MSG_RESULT([yes]) 755 ifelse([$3], , :, [$3]) 756fi[]dnl 757])# PKG_CHECK_MODULES 758 759# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 760# 761# This file is free software; the Free Software Foundation 762# gives unlimited permission to copy and/or distribute it, 763# with or without modifications, as long as this notice is preserved. 764 765# AM_AUTOMAKE_VERSION(VERSION) 766# ---------------------------- 767# Automake X.Y traces this macro to ensure aclocal.m4 has been 768# generated from the m4 files accompanying Automake X.Y. 769# (This private macro should not be called outside this file.) 770AC_DEFUN([AM_AUTOMAKE_VERSION], 771[am__api_version='1.11' 772dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 773dnl require some minimum version. Point them to the right macro. 774m4_if([$1], [1.11], [], 775 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 776]) 777 778# _AM_AUTOCONF_VERSION(VERSION) 779# ----------------------------- 780# aclocal traces this macro to find the Autoconf version. 781# This is a private macro too. Using m4_define simplifies 782# the logic in aclocal, which can simply ignore this definition. 783m4_define([_AM_AUTOCONF_VERSION], []) 784 785# AM_SET_CURRENT_AUTOMAKE_VERSION 786# ------------------------------- 787# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 788# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 789AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 790[AM_AUTOMAKE_VERSION([1.11])dnl 791m4_ifndef([AC_AUTOCONF_VERSION], 792 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 793_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 794 795# AM_AUX_DIR_EXPAND -*- Autoconf -*- 796 797# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 798# 799# This file is free software; the Free Software Foundation 800# gives unlimited permission to copy and/or distribute it, 801# with or without modifications, as long as this notice is preserved. 802 803# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 804# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 805# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 806# 807# Of course, Automake must honor this variable whenever it calls a 808# tool from the auxiliary directory. The problem is that $srcdir (and 809# therefore $ac_aux_dir as well) can be either absolute or relative, 810# depending on how configure is run. This is pretty annoying, since 811# it makes $ac_aux_dir quite unusable in subdirectories: in the top 812# source directory, any form will work fine, but in subdirectories a 813# relative path needs to be adjusted first. 814# 815# $ac_aux_dir/missing 816# fails when called from a subdirectory if $ac_aux_dir is relative 817# $top_srcdir/$ac_aux_dir/missing 818# fails if $ac_aux_dir is absolute, 819# fails when called from a subdirectory in a VPATH build with 820# a relative $ac_aux_dir 821# 822# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 823# are both prefixed by $srcdir. In an in-source build this is usually 824# harmless because $srcdir is `.', but things will broke when you 825# start a VPATH build or use an absolute $srcdir. 826# 827# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 828# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 829# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 830# and then we would define $MISSING as 831# MISSING="\${SHELL} $am_aux_dir/missing" 832# This will work as long as MISSING is not called from configure, because 833# unfortunately $(top_srcdir) has no meaning in configure. 834# However there are other variables, like CC, which are often used in 835# configure, and could therefore not use this "fixed" $ac_aux_dir. 836# 837# Another solution, used here, is to always expand $ac_aux_dir to an 838# absolute PATH. The drawback is that using absolute paths prevent a 839# configured tree to be moved without reconfiguration. 840 841AC_DEFUN([AM_AUX_DIR_EXPAND], 842[dnl Rely on autoconf to set up CDPATH properly. 843AC_PREREQ([2.50])dnl 844# expand $ac_aux_dir to an absolute path 845am_aux_dir=`cd $ac_aux_dir && pwd` 846]) 847 848# AM_CONDITIONAL -*- Autoconf -*- 849 850# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 851# Free Software Foundation, Inc. 852# 853# This file is free software; the Free Software Foundation 854# gives unlimited permission to copy and/or distribute it, 855# with or without modifications, as long as this notice is preserved. 856 857# serial 9 858 859# AM_CONDITIONAL(NAME, SHELL-CONDITION) 860# ------------------------------------- 861# Define a conditional. 862AC_DEFUN([AM_CONDITIONAL], 863[AC_PREREQ(2.52)dnl 864 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 865 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 866AC_SUBST([$1_TRUE])dnl 867AC_SUBST([$1_FALSE])dnl 868_AM_SUBST_NOTMAKE([$1_TRUE])dnl 869_AM_SUBST_NOTMAKE([$1_FALSE])dnl 870m4_define([_AM_COND_VALUE_$1], [$2])dnl 871if $2; then 872 $1_TRUE= 873 $1_FALSE='#' 874else 875 $1_TRUE='#' 876 $1_FALSE= 877fi 878AC_CONFIG_COMMANDS_PRE( 879[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 880 AC_MSG_ERROR([[conditional "$1" was never defined. 881Usually this means the macro was only invoked conditionally.]]) 882fi])]) 883 884# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 885# Free Software Foundation, Inc. 886# 887# This file is free software; the Free Software Foundation 888# gives unlimited permission to copy and/or distribute it, 889# with or without modifications, as long as this notice is preserved. 890 891# serial 10 892 893# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 894# written in clear, in which case automake, when reading aclocal.m4, 895# will think it sees a *use*, and therefore will trigger all it's 896# C support machinery. Also note that it means that autoscan, seeing 897# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 898 899 900# _AM_DEPENDENCIES(NAME) 901# ---------------------- 902# See how the compiler implements dependency checking. 903# NAME is "CC", "CXX", "GCJ", or "OBJC". 904# We try a few techniques and use that to set a single cache variable. 905# 906# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 907# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 908# dependency, and given that the user is not expected to run this macro, 909# just rely on AC_PROG_CC. 910AC_DEFUN([_AM_DEPENDENCIES], 911[AC_REQUIRE([AM_SET_DEPDIR])dnl 912AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 913AC_REQUIRE([AM_MAKE_INCLUDE])dnl 914AC_REQUIRE([AM_DEP_TRACK])dnl 915 916ifelse([$1], CC, [depcc="$CC" am_compiler_list=], 917 [$1], CXX, [depcc="$CXX" am_compiler_list=], 918 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 919 [$1], UPC, [depcc="$UPC" am_compiler_list=], 920 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 921 [depcc="$$1" am_compiler_list=]) 922 923AC_CACHE_CHECK([dependency style of $depcc], 924 [am_cv_$1_dependencies_compiler_type], 925[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 926 # We make a subdir and do the tests there. Otherwise we can end up 927 # making bogus files that we don't know about and never remove. For 928 # instance it was reported that on HP-UX the gcc test will end up 929 # making a dummy file named `D' -- because `-MD' means `put the output 930 # in D'. 931 mkdir conftest.dir 932 # Copy depcomp to subdir because otherwise we won't find it if we're 933 # using a relative directory. 934 cp "$am_depcomp" conftest.dir 935 cd conftest.dir 936 # We will build objects and dependencies in a subdirectory because 937 # it helps to detect inapplicable dependency modes. For instance 938 # both Tru64's cc and ICC support -MD to output dependencies as a 939 # side effect of compilation, but ICC will put the dependencies in 940 # the current directory while Tru64 will put them in the object 941 # directory. 942 mkdir sub 943 944 am_cv_$1_dependencies_compiler_type=none 945 if test "$am_compiler_list" = ""; then 946 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 947 fi 948 am__universal=false 949 m4_case([$1], [CC], 950 [case " $depcc " in #( 951 *\ -arch\ *\ -arch\ *) am__universal=true ;; 952 esac], 953 [CXX], 954 [case " $depcc " in #( 955 *\ -arch\ *\ -arch\ *) am__universal=true ;; 956 esac]) 957 958 for depmode in $am_compiler_list; do 959 # Setup a source with many dependencies, because some compilers 960 # like to wrap large dependency lists on column 80 (with \), and 961 # we should not choose a depcomp mode which is confused by this. 962 # 963 # We need to recreate these files for each test, as the compiler may 964 # overwrite some of them when testing with obscure command lines. 965 # This happens at least with the AIX C compiler. 966 : > sub/conftest.c 967 for i in 1 2 3 4 5 6; do 968 echo '#include "conftst'$i'.h"' >> sub/conftest.c 969 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 970 # Solaris 8's {/usr,}/bin/sh. 971 touch sub/conftst$i.h 972 done 973 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 974 975 # We check with `-c' and `-o' for the sake of the "dashmstdout" 976 # mode. It turns out that the SunPro C++ compiler does not properly 977 # handle `-M -o', and we need to detect this. Also, some Intel 978 # versions had trouble with output in subdirs 979 am__obj=sub/conftest.${OBJEXT-o} 980 am__minus_obj="-o $am__obj" 981 case $depmode in 982 gcc) 983 # This depmode causes a compiler race in universal mode. 984 test "$am__universal" = false || continue 985 ;; 986 nosideeffect) 987 # after this tag, mechanisms are not by side-effect, so they'll 988 # only be used when explicitly requested 989 if test "x$enable_dependency_tracking" = xyes; then 990 continue 991 else 992 break 993 fi 994 ;; 995 msvisualcpp | msvcmsys) 996 # This compiler won't grok `-c -o', but also, the minuso test has 997 # not run yet. These depmodes are late enough in the game, and 998 # so weak that their functioning should not be impacted. 999 am__obj=conftest.${OBJEXT-o} 1000 am__minus_obj= 1001 ;; 1002 none) break ;; 1003 esac 1004 if depmode=$depmode \ 1005 source=sub/conftest.c object=$am__obj \ 1006 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 1007 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 1008 >/dev/null 2>conftest.err && 1009 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 1010 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 1011 grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 1012 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 1013 # icc doesn't choke on unknown options, it will just issue warnings 1014 # or remarks (even with -Werror). So we grep stderr for any message 1015 # that says an option was ignored or not supported. 1016 # When given -MP, icc 7.0 and 7.1 complain thusly: 1017 # icc: Command line warning: ignoring option '-M'; no argument required 1018 # The diagnosis changed in icc 8.0: 1019 # icc: Command line remark: option '-MP' not supported 1020 if (grep 'ignoring option' conftest.err || 1021 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 1022 am_cv_$1_dependencies_compiler_type=$depmode 1023 break 1024 fi 1025 fi 1026 done 1027 1028 cd .. 1029 rm -rf conftest.dir 1030else 1031 am_cv_$1_dependencies_compiler_type=none 1032fi 1033]) 1034AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 1035AM_CONDITIONAL([am__fastdep$1], [ 1036 test "x$enable_dependency_tracking" != xno \ 1037 && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 1038]) 1039 1040 1041# AM_SET_DEPDIR 1042# ------------- 1043# Choose a directory name for dependency files. 1044# This macro is AC_REQUIREd in _AM_DEPENDENCIES 1045AC_DEFUN([AM_SET_DEPDIR], 1046[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 1047AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 1048]) 1049 1050 1051# AM_DEP_TRACK 1052# ------------ 1053AC_DEFUN([AM_DEP_TRACK], 1054[AC_ARG_ENABLE(dependency-tracking, 1055[ --disable-dependency-tracking speeds up one-time build 1056 --enable-dependency-tracking do not reject slow dependency extractors]) 1057if test "x$enable_dependency_tracking" != xno; then 1058 am_depcomp="$ac_aux_dir/depcomp" 1059 AMDEPBACKSLASH='\' 1060fi 1061AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 1062AC_SUBST([AMDEPBACKSLASH])dnl 1063_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 1064]) 1065 1066# Generate code to set up dependency tracking. -*- Autoconf -*- 1067 1068# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 1069# Free Software Foundation, Inc. 1070# 1071# This file is free software; the Free Software Foundation 1072# gives unlimited permission to copy and/or distribute it, 1073# with or without modifications, as long as this notice is preserved. 1074 1075#serial 5 1076 1077# _AM_OUTPUT_DEPENDENCY_COMMANDS 1078# ------------------------------ 1079AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 1080[{ 1081 # Autoconf 2.62 quotes --file arguments for eval, but not when files 1082 # are listed without --file. Let's play safe and only enable the eval 1083 # if we detect the quoting. 1084 case $CONFIG_FILES in 1085 *\'*) eval set x "$CONFIG_FILES" ;; 1086 *) set x $CONFIG_FILES ;; 1087 esac 1088 shift 1089 for mf 1090 do 1091 # Strip MF so we end up with the name of the file. 1092 mf=`echo "$mf" | sed -e 's/:.*$//'` 1093 # Check whether this is an Automake generated Makefile or not. 1094 # We used to match only the files named `Makefile.in', but 1095 # some people rename them; so instead we look at the file content. 1096 # Grep'ing the first line is not enough: some people post-process 1097 # each Makefile.in and add a new line on top of each file to say so. 1098 # Grep'ing the whole file is not good either: AIX grep has a line 1099 # limit of 2048, but all sed's we know have understand at least 4000. 1100 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 1101 dirpart=`AS_DIRNAME("$mf")` 1102 else 1103 continue 1104 fi 1105 # Extract the definition of DEPDIR, am__include, and am__quote 1106 # from the Makefile without running `make'. 1107 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 1108 test -z "$DEPDIR" && continue 1109 am__include=`sed -n 's/^am__include = //p' < "$mf"` 1110 test -z "am__include" && continue 1111 am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 1112 # When using ansi2knr, U may be empty or an underscore; expand it 1113 U=`sed -n 's/^U = //p' < "$mf"` 1114 # Find all dependency output files, they are included files with 1115 # $(DEPDIR) in their names. We invoke sed twice because it is the 1116 # simplest approach to changing $(DEPDIR) to its actual value in the 1117 # expansion. 1118 for file in `sed -n " 1119 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 1120 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 1121 # Make sure the directory exists. 1122 test -f "$dirpart/$file" && continue 1123 fdir=`AS_DIRNAME(["$file"])` 1124 AS_MKDIR_P([$dirpart/$fdir]) 1125 # echo "creating $dirpart/$file" 1126 echo '# dummy' > "$dirpart/$file" 1127 done 1128 done 1129} 1130])# _AM_OUTPUT_DEPENDENCY_COMMANDS 1131 1132 1133# AM_OUTPUT_DEPENDENCY_COMMANDS 1134# ----------------------------- 1135# This macro should only be invoked once -- use via AC_REQUIRE. 1136# 1137# This code is only required when automatic dependency tracking 1138# is enabled. FIXME. This creates each `.P' file that we will 1139# need in order to bootstrap the dependency handling code. 1140AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 1141[AC_CONFIG_COMMANDS([depfiles], 1142 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 1143 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 1144]) 1145 1146# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 1147# Free Software Foundation, Inc. 1148# 1149# This file is free software; the Free Software Foundation 1150# gives unlimited permission to copy and/or distribute it, 1151# with or without modifications, as long as this notice is preserved. 1152 1153# serial 8 1154 1155# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 1156AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 1157 1158# Do all the work for Automake. -*- Autoconf -*- 1159 1160# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 1161# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. 1162# 1163# This file is free software; the Free Software Foundation 1164# gives unlimited permission to copy and/or distribute it, 1165# with or without modifications, as long as this notice is preserved. 1166 1167# serial 16 1168 1169# This macro actually does too much. Some checks are only needed if 1170# your package does certain things. But this isn't really a big deal. 1171 1172# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 1173# AM_INIT_AUTOMAKE([OPTIONS]) 1174# ----------------------------------------------- 1175# The call with PACKAGE and VERSION arguments is the old style 1176# call (pre autoconf-2.50), which is being phased out. PACKAGE 1177# and VERSION should now be passed to AC_INIT and removed from 1178# the call to AM_INIT_AUTOMAKE. 1179# We support both call styles for the transition. After 1180# the next Automake release, Autoconf can make the AC_INIT 1181# arguments mandatory, and then we can depend on a new Autoconf 1182# release and drop the old call support. 1183AC_DEFUN([AM_INIT_AUTOMAKE], 1184[AC_PREREQ([2.62])dnl 1185dnl Autoconf wants to disallow AM_ names. We explicitly allow 1186dnl the ones we care about. 1187m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 1188AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 1189AC_REQUIRE([AC_PROG_INSTALL])dnl 1190if test "`cd $srcdir && pwd`" != "`pwd`"; then 1191 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 1192 # is not polluted with repeated "-I." 1193 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 1194 # test to see if srcdir already configured 1195 if test -f $srcdir/config.status; then 1196 AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 1197 fi 1198fi 1199 1200# test whether we have cygpath 1201if test -z "$CYGPATH_W"; then 1202 if (cygpath --version) >/dev/null 2>/dev/null; then 1203 CYGPATH_W='cygpath -w' 1204 else 1205 CYGPATH_W=echo 1206 fi 1207fi 1208AC_SUBST([CYGPATH_W]) 1209 1210# Define the identity of the package. 1211dnl Distinguish between old-style and new-style calls. 1212m4_ifval([$2], 1213[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 1214 AC_SUBST([PACKAGE], [$1])dnl 1215 AC_SUBST([VERSION], [$2])], 1216[_AM_SET_OPTIONS([$1])dnl 1217dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 1218m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 1219 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 1220 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 1221 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 1222 1223_AM_IF_OPTION([no-define],, 1224[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 1225 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 1226 1227# Some tools Automake needs. 1228AC_REQUIRE([AM_SANITY_CHECK])dnl 1229AC_REQUIRE([AC_ARG_PROGRAM])dnl 1230AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 1231AM_MISSING_PROG(AUTOCONF, autoconf) 1232AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 1233AM_MISSING_PROG(AUTOHEADER, autoheader) 1234AM_MISSING_PROG(MAKEINFO, makeinfo) 1235AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 1236AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 1237AC_REQUIRE([AM_PROG_MKDIR_P])dnl 1238# We need awk for the "check" target. The system "awk" is bad on 1239# some platforms. 1240AC_REQUIRE([AC_PROG_AWK])dnl 1241AC_REQUIRE([AC_PROG_MAKE_SET])dnl 1242AC_REQUIRE([AM_SET_LEADING_DOT])dnl 1243_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 1244 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 1245 [_AM_PROG_TAR([v7])])]) 1246_AM_IF_OPTION([no-dependencies],, 1247[AC_PROVIDE_IFELSE([AC_PROG_CC], 1248 [_AM_DEPENDENCIES(CC)], 1249 [define([AC_PROG_CC], 1250 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 1251AC_PROVIDE_IFELSE([AC_PROG_CXX], 1252 [_AM_DEPENDENCIES(CXX)], 1253 [define([AC_PROG_CXX], 1254 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 1255AC_PROVIDE_IFELSE([AC_PROG_OBJC], 1256 [_AM_DEPENDENCIES(OBJC)], 1257 [define([AC_PROG_OBJC], 1258 defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 1259]) 1260_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 1261dnl The `parallel-tests' driver may need to know about EXEEXT, so add the 1262dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 1263dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 1264AC_CONFIG_COMMANDS_PRE(dnl 1265[m4_provide_if([_AM_COMPILER_EXEEXT], 1266 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 1267]) 1268 1269dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 1270dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 1271dnl mangled by Autoconf and run in a shell conditional statement. 1272m4_define([_AC_COMPILER_EXEEXT], 1273m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 1274 1275 1276# When config.status generates a header, we must update the stamp-h file. 1277# This file resides in the same directory as the config header 1278# that is generated. The stamp files are numbered to have different names. 1279 1280# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 1281# loop where config.status creates the headers, so we can generate 1282# our stamp files there. 1283AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 1284[# Compute $1's index in $config_headers. 1285_am_arg=$1 1286_am_stamp_count=1 1287for _am_header in $config_headers :; do 1288 case $_am_header in 1289 $_am_arg | $_am_arg:* ) 1290 break ;; 1291 * ) 1292 _am_stamp_count=`expr $_am_stamp_count + 1` ;; 1293 esac 1294done 1295echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 1296 1297# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. 1298# 1299# This file is free software; the Free Software Foundation 1300# gives unlimited permission to copy and/or distribute it, 1301# with or without modifications, as long as this notice is preserved. 1302 1303# AM_PROG_INSTALL_SH 1304# ------------------ 1305# Define $install_sh. 1306AC_DEFUN([AM_PROG_INSTALL_SH], 1307[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 1308if test x"${install_sh}" != xset; then 1309 case $am_aux_dir in 1310 *\ * | *\ *) 1311 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 1312 *) 1313 install_sh="\${SHELL} $am_aux_dir/install-sh" 1314 esac 1315fi 1316AC_SUBST(install_sh)]) 1317 1318# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 1319# 1320# This file is free software; the Free Software Foundation 1321# gives unlimited permission to copy and/or distribute it, 1322# with or without modifications, as long as this notice is preserved. 1323 1324# serial 2 1325 1326# Check whether the underlying file-system supports filenames 1327# with a leading dot. For instance MS-DOS doesn't. 1328AC_DEFUN([AM_SET_LEADING_DOT], 1329[rm -rf .tst 2>/dev/null 1330mkdir .tst 2>/dev/null 1331if test -d .tst; then 1332 am__leading_dot=. 1333else 1334 am__leading_dot=_ 1335fi 1336rmdir .tst 2>/dev/null 1337AC_SUBST([am__leading_dot])]) 1338 1339# Check to see how 'make' treats includes. -*- Autoconf -*- 1340 1341# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. 1342# 1343# This file is free software; the Free Software Foundation 1344# gives unlimited permission to copy and/or distribute it, 1345# with or without modifications, as long as this notice is preserved. 1346 1347# serial 4 1348 1349# AM_MAKE_INCLUDE() 1350# ----------------- 1351# Check to see how make treats includes. 1352AC_DEFUN([AM_MAKE_INCLUDE], 1353[am_make=${MAKE-make} 1354cat > confinc << 'END' 1355am__doit: 1356 @echo this is the am__doit target 1357.PHONY: am__doit 1358END 1359# If we don't find an include directive, just comment out the code. 1360AC_MSG_CHECKING([for style of include used by $am_make]) 1361am__include="#" 1362am__quote= 1363_am_result=none 1364# First try GNU make style include. 1365echo "include confinc" > confmf 1366# Ignore all kinds of additional output from `make'. 1367case `$am_make -s -f confmf 2> /dev/null` in #( 1368*the\ am__doit\ target*) 1369 am__include=include 1370 am__quote= 1371 _am_result=GNU 1372 ;; 1373esac 1374# Now try BSD make style include. 1375if test "$am__include" = "#"; then 1376 echo '.include "confinc"' > confmf 1377 case `$am_make -s -f confmf 2> /dev/null` in #( 1378 *the\ am__doit\ target*) 1379 am__include=.include 1380 am__quote="\"" 1381 _am_result=BSD 1382 ;; 1383 esac 1384fi 1385AC_SUBST([am__include]) 1386AC_SUBST([am__quote]) 1387AC_MSG_RESULT([$_am_result]) 1388rm -f confinc confmf 1389]) 1390 1391# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 1392 1393# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 1394# Free Software Foundation, Inc. 1395# 1396# This file is free software; the Free Software Foundation 1397# gives unlimited permission to copy and/or distribute it, 1398# with or without modifications, as long as this notice is preserved. 1399 1400# serial 6 1401 1402# AM_MISSING_PROG(NAME, PROGRAM) 1403# ------------------------------ 1404AC_DEFUN([AM_MISSING_PROG], 1405[AC_REQUIRE([AM_MISSING_HAS_RUN]) 1406$1=${$1-"${am_missing_run}$2"} 1407AC_SUBST($1)]) 1408 1409 1410# AM_MISSING_HAS_RUN 1411# ------------------ 1412# Define MISSING if not defined so far and test if it supports --run. 1413# If it does, set am_missing_run to use it, otherwise, to nothing. 1414AC_DEFUN([AM_MISSING_HAS_RUN], 1415[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 1416AC_REQUIRE_AUX_FILE([missing])dnl 1417if test x"${MISSING+set}" != xset; then 1418 case $am_aux_dir in 1419 *\ * | *\ *) 1420 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 1421 *) 1422 MISSING="\${SHELL} $am_aux_dir/missing" ;; 1423 esac 1424fi 1425# Use eval to expand $SHELL 1426if eval "$MISSING --run true"; then 1427 am_missing_run="$MISSING --run " 1428else 1429 am_missing_run= 1430 AC_MSG_WARN([`missing' script is too old or missing]) 1431fi 1432]) 1433 1434# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 1435# 1436# This file is free software; the Free Software Foundation 1437# gives unlimited permission to copy and/or distribute it, 1438# with or without modifications, as long as this notice is preserved. 1439 1440# AM_PROG_MKDIR_P 1441# --------------- 1442# Check for `mkdir -p'. 1443AC_DEFUN([AM_PROG_MKDIR_P], 1444[AC_PREREQ([2.60])dnl 1445AC_REQUIRE([AC_PROG_MKDIR_P])dnl 1446dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 1447dnl while keeping a definition of mkdir_p for backward compatibility. 1448dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 1449dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 1450dnl Makefile.ins that do not define MKDIR_P, so we do our own 1451dnl adjustment using top_builddir (which is defined more often than 1452dnl MKDIR_P). 1453AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 1454case $mkdir_p in 1455 [[\\/$]]* | ?:[[\\/]]*) ;; 1456 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 1457esac 1458]) 1459 1460# Helper functions for option handling. -*- Autoconf -*- 1461 1462# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. 1463# 1464# This file is free software; the Free Software Foundation 1465# gives unlimited permission to copy and/or distribute it, 1466# with or without modifications, as long as this notice is preserved. 1467 1468# serial 4 1469 1470# _AM_MANGLE_OPTION(NAME) 1471# ----------------------- 1472AC_DEFUN([_AM_MANGLE_OPTION], 1473[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 1474 1475# _AM_SET_OPTION(NAME) 1476# ------------------------------ 1477# Set option NAME. Presently that only means defining a flag for this option. 1478AC_DEFUN([_AM_SET_OPTION], 1479[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 1480 1481# _AM_SET_OPTIONS(OPTIONS) 1482# ---------------------------------- 1483# OPTIONS is a space-separated list of Automake options. 1484AC_DEFUN([_AM_SET_OPTIONS], 1485[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 1486 1487# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 1488# ------------------------------------------- 1489# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 1490AC_DEFUN([_AM_IF_OPTION], 1491[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 1492 1493# Check to make sure that the build environment is sane. -*- Autoconf -*- 1494 1495# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 1496# Free Software Foundation, Inc. 1497# 1498# This file is free software; the Free Software Foundation 1499# gives unlimited permission to copy and/or distribute it, 1500# with or without modifications, as long as this notice is preserved. 1501 1502# serial 5 1503 1504# AM_SANITY_CHECK 1505# --------------- 1506AC_DEFUN([AM_SANITY_CHECK], 1507[AC_MSG_CHECKING([whether build environment is sane]) 1508# Just in case 1509sleep 1 1510echo timestamp > conftest.file 1511# Reject unsafe characters in $srcdir or the absolute working directory 1512# name. Accept space and tab only in the latter. 1513am_lf=' 1514' 1515case `pwd` in 1516 *[[\\\"\#\$\&\'\`$am_lf]]*) 1517 AC_MSG_ERROR([unsafe absolute working directory name]);; 1518esac 1519case $srcdir in 1520 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 1521 AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 1522esac 1523 1524# Do `set' in a subshell so we don't clobber the current shell's 1525# arguments. Must try -L first in case configure is actually a 1526# symlink; some systems play weird games with the mod time of symlinks 1527# (eg FreeBSD returns the mod time of the symlink's containing 1528# directory). 1529if ( 1530 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 1531 if test "$[*]" = "X"; then 1532 # -L didn't work. 1533 set X `ls -t "$srcdir/configure" conftest.file` 1534 fi 1535 rm -f conftest.file 1536 if test "$[*]" != "X $srcdir/configure conftest.file" \ 1537 && test "$[*]" != "X conftest.file $srcdir/configure"; then 1538 1539 # If neither matched, then we have a broken ls. This can happen 1540 # if, for instance, CONFIG_SHELL is bash and it inherits a 1541 # broken ls alias from the environment. This has actually 1542 # happened. Such a system could not be considered "sane". 1543 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 1544alias in your environment]) 1545 fi 1546 1547 test "$[2]" = conftest.file 1548 ) 1549then 1550 # Ok. 1551 : 1552else 1553 AC_MSG_ERROR([newly created file is older than distributed files! 1554Check your system clock]) 1555fi 1556AC_MSG_RESULT(yes)]) 1557 1558# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 1559# 1560# This file is free software; the Free Software Foundation 1561# gives unlimited permission to copy and/or distribute it, 1562# with or without modifications, as long as this notice is preserved. 1563 1564# AM_PROG_INSTALL_STRIP 1565# --------------------- 1566# One issue with vendor `install' (even GNU) is that you can't 1567# specify the program used to strip binaries. This is especially 1568# annoying in cross-compiling environments, where the build's strip 1569# is unlikely to handle the host's binaries. 1570# Fortunately install-sh will honor a STRIPPROG variable, so we 1571# always use install-sh in `make install-strip', and initialize 1572# STRIPPROG with the value of the STRIP variable (set by the user). 1573AC_DEFUN([AM_PROG_INSTALL_STRIP], 1574[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 1575# Installed binaries are usually stripped using `strip' when the user 1576# run `make install-strip'. However `strip' might not be the right 1577# tool to use in cross-compilation environments, therefore Automake 1578# will honor the `STRIP' environment variable to overrule this program. 1579dnl Don't test for $cross_compiling = yes, because it might be `maybe'. 1580if test "$cross_compiling" != no; then 1581 AC_CHECK_TOOL([STRIP], [strip], :) 1582fi 1583INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 1584AC_SUBST([INSTALL_STRIP_PROGRAM])]) 1585 1586# Copyright (C) 2006, 2008 Free Software Foundation, Inc. 1587# 1588# This file is free software; the Free Software Foundation 1589# gives unlimited permission to copy and/or distribute it, 1590# with or without modifications, as long as this notice is preserved. 1591 1592# serial 2 1593 1594# _AM_SUBST_NOTMAKE(VARIABLE) 1595# --------------------------- 1596# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 1597# This macro is traced by Automake. 1598AC_DEFUN([_AM_SUBST_NOTMAKE]) 1599 1600# AM_SUBST_NOTMAKE(VARIABLE) 1601# --------------------------- 1602# Public sister of _AM_SUBST_NOTMAKE. 1603AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 1604 1605# Check how to create a tarball. -*- Autoconf -*- 1606 1607# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 1608# 1609# This file is free software; the Free Software Foundation 1610# gives unlimited permission to copy and/or distribute it, 1611# with or without modifications, as long as this notice is preserved. 1612 1613# serial 2 1614 1615# _AM_PROG_TAR(FORMAT) 1616# -------------------- 1617# Check how to create a tarball in format FORMAT. 1618# FORMAT should be one of `v7', `ustar', or `pax'. 1619# 1620# Substitute a variable $(am__tar) that is a command 1621# writing to stdout a FORMAT-tarball containing the directory 1622# $tardir. 1623# tardir=directory && $(am__tar) > result.tar 1624# 1625# Substitute a variable $(am__untar) that extract such 1626# a tarball read from stdin. 1627# $(am__untar) < result.tar 1628AC_DEFUN([_AM_PROG_TAR], 1629[# Always define AMTAR for backward compatibility. 1630AM_MISSING_PROG([AMTAR], [tar]) 1631m4_if([$1], [v7], 1632 [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 1633 [m4_case([$1], [ustar],, [pax],, 1634 [m4_fatal([Unknown tar format])]) 1635AC_MSG_CHECKING([how to create a $1 tar archive]) 1636# Loop over all known methods to create a tar archive until one works. 1637_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 1638_am_tools=${am_cv_prog_tar_$1-$_am_tools} 1639# Do not fold the above two line into one, because Tru64 sh and 1640# Solaris sh will not grok spaces in the rhs of `-'. 1641for _am_tool in $_am_tools 1642do 1643 case $_am_tool in 1644 gnutar) 1645 for _am_tar in tar gnutar gtar; 1646 do 1647 AM_RUN_LOG([$_am_tar --version]) && break 1648 done 1649 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 1650 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 1651 am__untar="$_am_tar -xf -" 1652 ;; 1653 plaintar) 1654 # Must skip GNU tar: if it does not support --format= it doesn't create 1655 # ustar tarball either. 1656 (tar --version) >/dev/null 2>&1 && continue 1657 am__tar='tar chf - "$$tardir"' 1658 am__tar_='tar chf - "$tardir"' 1659 am__untar='tar xf -' 1660 ;; 1661 pax) 1662 am__tar='pax -L -x $1 -w "$$tardir"' 1663 am__tar_='pax -L -x $1 -w "$tardir"' 1664 am__untar='pax -r' 1665 ;; 1666 cpio) 1667 am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 1668 am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 1669 am__untar='cpio -i -H $1 -d' 1670 ;; 1671 none) 1672 am__tar=false 1673 am__tar_=false 1674 am__untar=false 1675 ;; 1676 esac 1677 1678 # If the value was cached, stop now. We just wanted to have am__tar 1679 # and am__untar set. 1680 test -n "${am_cv_prog_tar_$1}" && break 1681 1682 # tar/untar a dummy directory, and stop if the command works 1683 rm -rf conftest.dir 1684 mkdir conftest.dir 1685 echo GrepMe > conftest.dir/file 1686 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 1687 rm -rf conftest.dir 1688 if test -s conftest.tar; then 1689 AM_RUN_LOG([$am__untar <conftest.tar]) 1690 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 1691 fi 1692done 1693rm -rf conftest.dir 1694 1695AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 1696AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 1697AC_SUBST([am__tar]) 1698AC_SUBST([am__untar]) 1699]) # _AM_PROG_TAR 1700 1701m4_include([m4/codeset.m4]) 1702m4_include([m4/gettext.m4]) 1703m4_include([m4/glibc21.m4]) 1704m4_include([m4/iconv.m4]) 1705m4_include([m4/isc-posix.m4]) 1706m4_include([m4/lcmessage.m4]) 1707m4_include([m4/libtool.m4]) 1708m4_include([m4/ltoptions.m4]) 1709m4_include([m4/ltsugar.m4]) 1710m4_include([m4/ltversion.m4]) 1711m4_include([m4/lt~obsolete.m4]) 1712m4_include([m4/progtest.m4]) 1713