1# generated automatically by aclocal 1.10.2 -*- Autoconf -*- 2 3# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4# 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 5# This file is free software; the Free Software Foundation 6# gives unlimited permission to copy and/or distribute it, 7# with or without modifications, as long as this notice is preserved. 8 9# This program is distributed in the hope that it will be useful, 10# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12# PARTICULAR PURPOSE. 13 14m4_ifndef([AC_AUTOCONF_VERSION], 15 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 16m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],, 17[m4_warning([this file was generated for autoconf 2.63. 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# iconv.m4 serial AM6 (gettext-0.17) 405dnl Copyright (C) 2000-2002, 2007 Free Software Foundation, Inc. 406dnl This file is free software; the Free Software Foundation 407dnl gives unlimited permission to copy and/or distribute it, 408dnl with or without modifications, as long as this notice is preserved. 409 410dnl From Bruno Haible. 411 412AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], 413[ 414 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. 415 AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) 416 AC_REQUIRE([AC_LIB_RPATH]) 417 418 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV 419 dnl accordingly. 420 AC_LIB_LINKFLAGS_BODY([iconv]) 421]) 422 423AC_DEFUN([AM_ICONV_LINK], 424[ 425 dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and 426 dnl those with the standalone portable GNU libiconv installed). 427 AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles 428 429 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV 430 dnl accordingly. 431 AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) 432 433 dnl Add $INCICONV to CPPFLAGS before performing the following checks, 434 dnl because if the user has installed libiconv and not disabled its use 435 dnl via --without-libiconv-prefix, he wants to use it. The first 436 dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed. 437 am_save_CPPFLAGS="$CPPFLAGS" 438 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) 439 440 AC_CACHE_CHECK([for iconv], am_cv_func_iconv, [ 441 am_cv_func_iconv="no, consider installing GNU libiconv" 442 am_cv_lib_iconv=no 443 AC_TRY_LINK([#include <stdlib.h> 444#include <iconv.h>], 445 [iconv_t cd = iconv_open("",""); 446 iconv(cd,NULL,NULL,NULL,NULL); 447 iconv_close(cd);], 448 am_cv_func_iconv=yes) 449 if test "$am_cv_func_iconv" != yes; then 450 am_save_LIBS="$LIBS" 451 LIBS="$LIBS $LIBICONV" 452 AC_TRY_LINK([#include <stdlib.h> 453#include <iconv.h>], 454 [iconv_t cd = iconv_open("",""); 455 iconv(cd,NULL,NULL,NULL,NULL); 456 iconv_close(cd);], 457 am_cv_lib_iconv=yes 458 am_cv_func_iconv=yes) 459 LIBS="$am_save_LIBS" 460 fi 461 ]) 462 if test "$am_cv_func_iconv" = yes; then 463 AC_CACHE_CHECK([for working iconv], am_cv_func_iconv_works, [ 464 dnl This tests against bugs in AIX 5.1 and HP-UX 11.11. 465 am_save_LIBS="$LIBS" 466 if test $am_cv_lib_iconv = yes; then 467 LIBS="$LIBS $LIBICONV" 468 fi 469 AC_TRY_RUN([ 470#include <iconv.h> 471#include <string.h> 472int main () 473{ 474 /* Test against AIX 5.1 bug: Failures are not distinguishable from successful 475 returns. */ 476 { 477 iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); 478 if (cd_utf8_to_88591 != (iconv_t)(-1)) 479 { 480 static const char input[] = "\342\202\254"; /* EURO SIGN */ 481 char buf[10]; 482 const char *inptr = input; 483 size_t inbytesleft = strlen (input); 484 char *outptr = buf; 485 size_t outbytesleft = sizeof (buf); 486 size_t res = iconv (cd_utf8_to_88591, 487 (char **) &inptr, &inbytesleft, 488 &outptr, &outbytesleft); 489 if (res == 0) 490 return 1; 491 } 492 } 493#if 0 /* This bug could be worked around by the caller. */ 494 /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ 495 { 496 iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); 497 if (cd_88591_to_utf8 != (iconv_t)(-1)) 498 { 499 static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; 500 char buf[50]; 501 const char *inptr = input; 502 size_t inbytesleft = strlen (input); 503 char *outptr = buf; 504 size_t outbytesleft = sizeof (buf); 505 size_t res = iconv (cd_88591_to_utf8, 506 (char **) &inptr, &inbytesleft, 507 &outptr, &outbytesleft); 508 if ((int)res > 0) 509 return 1; 510 } 511 } 512#endif 513 /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is 514 provided. */ 515 if (/* Try standardized names. */ 516 iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) 517 /* Try IRIX, OSF/1 names. */ 518 && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) 519 /* Try AIX names. */ 520 && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) 521 /* Try HP-UX names. */ 522 && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) 523 return 1; 524 return 0; 525}], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no], 526 [case "$host_os" in 527 aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; 528 *) am_cv_func_iconv_works="guessing yes" ;; 529 esac]) 530 LIBS="$am_save_LIBS" 531 ]) 532 case "$am_cv_func_iconv_works" in 533 *no) am_func_iconv=no am_cv_lib_iconv=no ;; 534 *) am_func_iconv=yes ;; 535 esac 536 else 537 am_func_iconv=no am_cv_lib_iconv=no 538 fi 539 if test "$am_func_iconv" = yes; then 540 AC_DEFINE(HAVE_ICONV, 1, 541 [Define if you have the iconv() function and it works.]) 542 fi 543 if test "$am_cv_lib_iconv" = yes; then 544 AC_MSG_CHECKING([how to link with libiconv]) 545 AC_MSG_RESULT([$LIBICONV]) 546 else 547 dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV 548 dnl either. 549 CPPFLAGS="$am_save_CPPFLAGS" 550 LIBICONV= 551 LTLIBICONV= 552 fi 553 AC_SUBST(LIBICONV) 554 AC_SUBST(LTLIBICONV) 555]) 556 557AC_DEFUN([AM_ICONV], 558[ 559 AM_ICONV_LINK 560 if test "$am_cv_func_iconv" = yes; then 561 AC_MSG_CHECKING([for iconv declaration]) 562 AC_CACHE_VAL(am_cv_proto_iconv, [ 563 AC_TRY_COMPILE([ 564#include <stdlib.h> 565#include <iconv.h> 566extern 567#ifdef __cplusplus 568"C" 569#endif 570#if defined(__STDC__) || defined(__cplusplus) 571size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); 572#else 573size_t iconv(); 574#endif 575], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const") 576 am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) 577 am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` 578 AC_MSG_RESULT([$]{ac_t:- 579 }[$]am_cv_proto_iconv) 580 AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1, 581 [Define as const if the declaration of iconv() needs const.]) 582 fi 583]) 584 585# intlmacosx.m4 serial 1 (gettext-0.17) 586dnl Copyright (C) 2004-2007 Free Software Foundation, Inc. 587dnl This file is free software; the Free Software Foundation 588dnl gives unlimited permission to copy and/or distribute it, 589dnl with or without modifications, as long as this notice is preserved. 590dnl 591dnl This file can can be used in projects which are not available under 592dnl the GNU General Public License or the GNU Library General Public 593dnl License but which still want to provide support for the GNU gettext 594dnl functionality. 595dnl Please note that the actual code of the GNU gettext library is covered 596dnl by the GNU Library General Public License, and the rest of the GNU 597dnl gettext package package is covered by the GNU General Public License. 598dnl They are *not* in the public domain. 599 600dnl Checks for special options needed on MacOS X. 601dnl Defines INTL_MACOSX_LIBS. 602AC_DEFUN([gt_INTL_MACOSX], 603[ 604 dnl Check for API introduced in MacOS X 10.2. 605 AC_CACHE_CHECK([for CFPreferencesCopyAppValue], 606 gt_cv_func_CFPreferencesCopyAppValue, 607 [gt_save_LIBS="$LIBS" 608 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" 609 AC_TRY_LINK([#include <CoreFoundation/CFPreferences.h>], 610 [CFPreferencesCopyAppValue(NULL, NULL)], 611 [gt_cv_func_CFPreferencesCopyAppValue=yes], 612 [gt_cv_func_CFPreferencesCopyAppValue=no]) 613 LIBS="$gt_save_LIBS"]) 614 if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then 615 AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], 1, 616 [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.]) 617 fi 618 dnl Check for API introduced in MacOS X 10.3. 619 AC_CACHE_CHECK([for CFLocaleCopyCurrent], gt_cv_func_CFLocaleCopyCurrent, 620 [gt_save_LIBS="$LIBS" 621 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" 622 AC_TRY_LINK([#include <CoreFoundation/CFLocale.h>], [CFLocaleCopyCurrent();], 623 [gt_cv_func_CFLocaleCopyCurrent=yes], 624 [gt_cv_func_CFLocaleCopyCurrent=no]) 625 LIBS="$gt_save_LIBS"]) 626 if test $gt_cv_func_CFLocaleCopyCurrent = yes; then 627 AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], 1, 628 [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.]) 629 fi 630 INTL_MACOSX_LIBS= 631 if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then 632 INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" 633 fi 634 AC_SUBST([INTL_MACOSX_LIBS]) 635]) 636 637# lib-ld.m4 serial 3 (gettext-0.13) 638dnl Copyright (C) 1996-2003 Free Software Foundation, Inc. 639dnl This file is free software; the Free Software Foundation 640dnl gives unlimited permission to copy and/or distribute it, 641dnl with or without modifications, as long as this notice is preserved. 642 643dnl Subroutines of libtool.m4, 644dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision 645dnl with libtool.m4. 646 647dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no. 648AC_DEFUN([AC_LIB_PROG_LD_GNU], 649[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld, 650[# I'd rather use --version here, but apparently some GNU ld's only accept -v. 651case `$LD -v 2>&1 </dev/null` in 652*GNU* | *'with BFD'*) 653 acl_cv_prog_gnu_ld=yes ;; 654*) 655 acl_cv_prog_gnu_ld=no ;; 656esac]) 657with_gnu_ld=$acl_cv_prog_gnu_ld 658]) 659 660dnl From libtool-1.4. Sets the variable LD. 661AC_DEFUN([AC_LIB_PROG_LD], 662[AC_ARG_WITH(gnu-ld, 663[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], 664test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) 665AC_REQUIRE([AC_PROG_CC])dnl 666AC_REQUIRE([AC_CANONICAL_HOST])dnl 667# Prepare PATH_SEPARATOR. 668# The user is always right. 669if test "${PATH_SEPARATOR+set}" != set; then 670 echo "#! /bin/sh" >conf$$.sh 671 echo "exit 0" >>conf$$.sh 672 chmod +x conf$$.sh 673 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then 674 PATH_SEPARATOR=';' 675 else 676 PATH_SEPARATOR=: 677 fi 678 rm -f conf$$.sh 679fi 680ac_prog=ld 681if test "$GCC" = yes; then 682 # Check if gcc -print-prog-name=ld gives a path. 683 AC_MSG_CHECKING([for ld used by GCC]) 684 case $host in 685 *-*-mingw*) 686 # gcc leaves a trailing carriage return which upsets mingw 687 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 688 *) 689 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 690 esac 691 case $ac_prog in 692 # Accept absolute paths. 693 [[\\/]* | [A-Za-z]:[\\/]*)] 694 [re_direlt='/[^/][^/]*/\.\./'] 695 # Canonicalize the path of ld 696 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` 697 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do 698 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` 699 done 700 test -z "$LD" && LD="$ac_prog" 701 ;; 702 "") 703 # If it fails, then pretend we aren't using GCC. 704 ac_prog=ld 705 ;; 706 *) 707 # If it is relative, then search for the first ld in PATH. 708 with_gnu_ld=unknown 709 ;; 710 esac 711elif test "$with_gnu_ld" = yes; then 712 AC_MSG_CHECKING([for GNU ld]) 713else 714 AC_MSG_CHECKING([for non-GNU ld]) 715fi 716AC_CACHE_VAL(acl_cv_path_LD, 717[if test -z "$LD"; then 718 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" 719 for ac_dir in $PATH; do 720 test -z "$ac_dir" && ac_dir=. 721 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 722 acl_cv_path_LD="$ac_dir/$ac_prog" 723 # Check to see if the program is GNU ld. I'd rather use --version, 724 # but apparently some GNU ld's only accept -v. 725 # Break only if it was the GNU/non-GNU ld that we prefer. 726 case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in 727 *GNU* | *'with BFD'*) 728 test "$with_gnu_ld" != no && break ;; 729 *) 730 test "$with_gnu_ld" != yes && break ;; 731 esac 732 fi 733 done 734 IFS="$ac_save_ifs" 735else 736 acl_cv_path_LD="$LD" # Let the user override the test with a path. 737fi]) 738LD="$acl_cv_path_LD" 739if test -n "$LD"; then 740 AC_MSG_RESULT($LD) 741else 742 AC_MSG_RESULT(no) 743fi 744test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 745AC_LIB_PROG_LD_GNU 746]) 747 748# lib-link.m4 serial 13 (gettext-0.17) 749dnl Copyright (C) 2001-2007 Free Software Foundation, Inc. 750dnl This file is free software; the Free Software Foundation 751dnl gives unlimited permission to copy and/or distribute it, 752dnl with or without modifications, as long as this notice is preserved. 753 754dnl From Bruno Haible. 755 756AC_PREREQ(2.54) 757 758dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and 759dnl the libraries corresponding to explicit and implicit dependencies. 760dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and 761dnl augments the CPPFLAGS variable. 762dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname 763dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. 764AC_DEFUN([AC_LIB_LINKFLAGS], 765[ 766 AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) 767 AC_REQUIRE([AC_LIB_RPATH]) 768 define([Name],[translit([$1],[./-], [___])]) 769 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], 770 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) 771 AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ 772 AC_LIB_LINKFLAGS_BODY([$1], [$2]) 773 ac_cv_lib[]Name[]_libs="$LIB[]NAME" 774 ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" 775 ac_cv_lib[]Name[]_cppflags="$INC[]NAME" 776 ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX" 777 ]) 778 LIB[]NAME="$ac_cv_lib[]Name[]_libs" 779 LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" 780 INC[]NAME="$ac_cv_lib[]Name[]_cppflags" 781 LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix" 782 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) 783 AC_SUBST([LIB]NAME) 784 AC_SUBST([LTLIB]NAME) 785 AC_SUBST([LIB]NAME[_PREFIX]) 786 dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the 787 dnl results of this search when this library appears as a dependency. 788 HAVE_LIB[]NAME=yes 789 undefine([Name]) 790 undefine([NAME]) 791]) 792 793dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode) 794dnl searches for libname and the libraries corresponding to explicit and 795dnl implicit dependencies, together with the specified include files and 796dnl the ability to compile and link the specified testcode. If found, it 797dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and 798dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and 799dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs 800dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. 801dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname 802dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. 803AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], 804[ 805 AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) 806 AC_REQUIRE([AC_LIB_RPATH]) 807 define([Name],[translit([$1],[./-], [___])]) 808 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], 809 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) 810 811 dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME 812 dnl accordingly. 813 AC_LIB_LINKFLAGS_BODY([$1], [$2]) 814 815 dnl Add $INC[]NAME to CPPFLAGS before performing the following checks, 816 dnl because if the user has installed lib[]Name and not disabled its use 817 dnl via --without-lib[]Name-prefix, he wants to use it. 818 ac_save_CPPFLAGS="$CPPFLAGS" 819 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) 820 821 AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ 822 ac_save_LIBS="$LIBS" 823 LIBS="$LIBS $LIB[]NAME" 824 AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no]) 825 LIBS="$ac_save_LIBS" 826 ]) 827 if test "$ac_cv_lib[]Name" = yes; then 828 HAVE_LIB[]NAME=yes 829 AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.]) 830 AC_MSG_CHECKING([how to link with lib[]$1]) 831 AC_MSG_RESULT([$LIB[]NAME]) 832 else 833 HAVE_LIB[]NAME=no 834 dnl If $LIB[]NAME didn't lead to a usable library, we don't need 835 dnl $INC[]NAME either. 836 CPPFLAGS="$ac_save_CPPFLAGS" 837 LIB[]NAME= 838 LTLIB[]NAME= 839 LIB[]NAME[]_PREFIX= 840 fi 841 AC_SUBST([HAVE_LIB]NAME) 842 AC_SUBST([LIB]NAME) 843 AC_SUBST([LTLIB]NAME) 844 AC_SUBST([LIB]NAME[_PREFIX]) 845 undefine([Name]) 846 undefine([NAME]) 847]) 848 849dnl Determine the platform dependent parameters needed to use rpath: 850dnl acl_libext, 851dnl acl_shlibext, 852dnl acl_hardcode_libdir_flag_spec, 853dnl acl_hardcode_libdir_separator, 854dnl acl_hardcode_direct, 855dnl acl_hardcode_minus_L. 856AC_DEFUN([AC_LIB_RPATH], 857[ 858 dnl Tell automake >= 1.10 to complain if config.rpath is missing. 859 m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])]) 860 AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS 861 AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld 862 AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host 863 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir 864 AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [ 865 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ 866 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh 867 . ./conftest.sh 868 rm -f ./conftest.sh 869 acl_cv_rpath=done 870 ]) 871 wl="$acl_cv_wl" 872 acl_libext="$acl_cv_libext" 873 acl_shlibext="$acl_cv_shlibext" 874 acl_libname_spec="$acl_cv_libname_spec" 875 acl_library_names_spec="$acl_cv_library_names_spec" 876 acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" 877 acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" 878 acl_hardcode_direct="$acl_cv_hardcode_direct" 879 acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" 880 dnl Determine whether the user wants rpath handling at all. 881 AC_ARG_ENABLE(rpath, 882 [ --disable-rpath do not hardcode runtime library paths], 883 :, enable_rpath=yes) 884]) 885 886dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and 887dnl the libraries corresponding to explicit and implicit dependencies. 888dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. 889dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found 890dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem. 891AC_DEFUN([AC_LIB_LINKFLAGS_BODY], 892[ 893 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) 894 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], 895 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) 896 dnl Autoconf >= 2.61 supports dots in --with options. 897 define([N_A_M_E],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit([$1],[.],[_])],[$1])]) 898 dnl By default, look in $includedir and $libdir. 899 use_additional=yes 900 AC_LIB_WITH_FINAL_PREFIX([ 901 eval additional_includedir=\"$includedir\" 902 eval additional_libdir=\"$libdir\" 903 ]) 904 AC_LIB_ARG_WITH([lib]N_A_M_E[-prefix], 905[ --with-lib]N_A_M_E[-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib 906 --without-lib]N_A_M_E[-prefix don't search for lib$1 in includedir and libdir], 907[ 908 if test "X$withval" = "Xno"; then 909 use_additional=no 910 else 911 if test "X$withval" = "X"; then 912 AC_LIB_WITH_FINAL_PREFIX([ 913 eval additional_includedir=\"$includedir\" 914 eval additional_libdir=\"$libdir\" 915 ]) 916 else 917 additional_includedir="$withval/include" 918 additional_libdir="$withval/$acl_libdirstem" 919 fi 920 fi 921]) 922 dnl Search the library and its dependencies in $additional_libdir and 923 dnl $LDFLAGS. Using breadth-first-seach. 924 LIB[]NAME= 925 LTLIB[]NAME= 926 INC[]NAME= 927 LIB[]NAME[]_PREFIX= 928 rpathdirs= 929 ltrpathdirs= 930 names_already_handled= 931 names_next_round='$1 $2' 932 while test -n "$names_next_round"; do 933 names_this_round="$names_next_round" 934 names_next_round= 935 for name in $names_this_round; do 936 already_handled= 937 for n in $names_already_handled; do 938 if test "$n" = "$name"; then 939 already_handled=yes 940 break 941 fi 942 done 943 if test -z "$already_handled"; then 944 names_already_handled="$names_already_handled $name" 945 dnl See if it was already located by an earlier AC_LIB_LINKFLAGS 946 dnl or AC_LIB_HAVE_LINKFLAGS call. 947 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` 948 eval value=\"\$HAVE_LIB$uppername\" 949 if test -n "$value"; then 950 if test "$value" = yes; then 951 eval value=\"\$LIB$uppername\" 952 test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" 953 eval value=\"\$LTLIB$uppername\" 954 test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" 955 else 956 dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined 957 dnl that this library doesn't exist. So just drop it. 958 : 959 fi 960 else 961 dnl Search the library lib$name in $additional_libdir and $LDFLAGS 962 dnl and the already constructed $LIBNAME/$LTLIBNAME. 963 found_dir= 964 found_la= 965 found_so= 966 found_a= 967 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name 968 if test -n "$acl_shlibext"; then 969 shrext=".$acl_shlibext" # typically: shrext=.so 970 else 971 shrext= 972 fi 973 if test $use_additional = yes; then 974 dir="$additional_libdir" 975 dnl The same code as in the loop below: 976 dnl First look for a shared library. 977 if test -n "$acl_shlibext"; then 978 if test -f "$dir/$libname$shrext"; then 979 found_dir="$dir" 980 found_so="$dir/$libname$shrext" 981 else 982 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then 983 ver=`(cd "$dir" && \ 984 for f in "$libname$shrext".*; do echo "$f"; done \ 985 | sed -e "s,^$libname$shrext\\\\.,," \ 986 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ 987 | sed 1q ) 2>/dev/null` 988 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then 989 found_dir="$dir" 990 found_so="$dir/$libname$shrext.$ver" 991 fi 992 else 993 eval library_names=\"$acl_library_names_spec\" 994 for f in $library_names; do 995 if test -f "$dir/$f"; then 996 found_dir="$dir" 997 found_so="$dir/$f" 998 break 999 fi 1000 done 1001 fi 1002 fi 1003 fi 1004 dnl Then look for a static library. 1005 if test "X$found_dir" = "X"; then 1006 if test -f "$dir/$libname.$acl_libext"; then 1007 found_dir="$dir" 1008 found_a="$dir/$libname.$acl_libext" 1009 fi 1010 fi 1011 if test "X$found_dir" != "X"; then 1012 if test -f "$dir/$libname.la"; then 1013 found_la="$dir/$libname.la" 1014 fi 1015 fi 1016 fi 1017 if test "X$found_dir" = "X"; then 1018 for x in $LDFLAGS $LTLIB[]NAME; do 1019 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) 1020 case "$x" in 1021 -L*) 1022 dir=`echo "X$x" | sed -e 's/^X-L//'` 1023 dnl First look for a shared library. 1024 if test -n "$acl_shlibext"; then 1025 if test -f "$dir/$libname$shrext"; then 1026 found_dir="$dir" 1027 found_so="$dir/$libname$shrext" 1028 else 1029 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then 1030 ver=`(cd "$dir" && \ 1031 for f in "$libname$shrext".*; do echo "$f"; done \ 1032 | sed -e "s,^$libname$shrext\\\\.,," \ 1033 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ 1034 | sed 1q ) 2>/dev/null` 1035 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then 1036 found_dir="$dir" 1037 found_so="$dir/$libname$shrext.$ver" 1038 fi 1039 else 1040 eval library_names=\"$acl_library_names_spec\" 1041 for f in $library_names; do 1042 if test -f "$dir/$f"; then 1043 found_dir="$dir" 1044 found_so="$dir/$f" 1045 break 1046 fi 1047 done 1048 fi 1049 fi 1050 fi 1051 dnl Then look for a static library. 1052 if test "X$found_dir" = "X"; then 1053 if test -f "$dir/$libname.$acl_libext"; then 1054 found_dir="$dir" 1055 found_a="$dir/$libname.$acl_libext" 1056 fi 1057 fi 1058 if test "X$found_dir" != "X"; then 1059 if test -f "$dir/$libname.la"; then 1060 found_la="$dir/$libname.la" 1061 fi 1062 fi 1063 ;; 1064 esac 1065 if test "X$found_dir" != "X"; then 1066 break 1067 fi 1068 done 1069 fi 1070 if test "X$found_dir" != "X"; then 1071 dnl Found the library. 1072 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" 1073 if test "X$found_so" != "X"; then 1074 dnl Linking with a shared library. We attempt to hardcode its 1075 dnl directory into the executable's runpath, unless it's the 1076 dnl standard /usr/lib. 1077 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then 1078 dnl No hardcoding is needed. 1079 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" 1080 else 1081 dnl Use an explicit option to hardcode DIR into the resulting 1082 dnl binary. 1083 dnl Potentially add DIR to ltrpathdirs. 1084 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. 1085 haveit= 1086 for x in $ltrpathdirs; do 1087 if test "X$x" = "X$found_dir"; then 1088 haveit=yes 1089 break 1090 fi 1091 done 1092 if test -z "$haveit"; then 1093 ltrpathdirs="$ltrpathdirs $found_dir" 1094 fi 1095 dnl The hardcoding into $LIBNAME is system dependent. 1096 if test "$acl_hardcode_direct" = yes; then 1097 dnl Using DIR/libNAME.so during linking hardcodes DIR into the 1098 dnl resulting binary. 1099 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" 1100 else 1101 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then 1102 dnl Use an explicit option to hardcode DIR into the resulting 1103 dnl binary. 1104 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" 1105 dnl Potentially add DIR to rpathdirs. 1106 dnl The rpathdirs will be appended to $LIBNAME at the end. 1107 haveit= 1108 for x in $rpathdirs; do 1109 if test "X$x" = "X$found_dir"; then 1110 haveit=yes 1111 break 1112 fi 1113 done 1114 if test -z "$haveit"; then 1115 rpathdirs="$rpathdirs $found_dir" 1116 fi 1117 else 1118 dnl Rely on "-L$found_dir". 1119 dnl But don't add it if it's already contained in the LDFLAGS 1120 dnl or the already constructed $LIBNAME 1121 haveit= 1122 for x in $LDFLAGS $LIB[]NAME; do 1123 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) 1124 if test "X$x" = "X-L$found_dir"; then 1125 haveit=yes 1126 break 1127 fi 1128 done 1129 if test -z "$haveit"; then 1130 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" 1131 fi 1132 if test "$acl_hardcode_minus_L" != no; then 1133 dnl FIXME: Not sure whether we should use 1134 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" 1135 dnl here. 1136 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" 1137 else 1138 dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH 1139 dnl here, because this doesn't fit in flags passed to the 1140 dnl compiler. So give up. No hardcoding. This affects only 1141 dnl very old systems. 1142 dnl FIXME: Not sure whether we should use 1143 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" 1144 dnl here. 1145 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" 1146 fi 1147 fi 1148 fi 1149 fi 1150 else 1151 if test "X$found_a" != "X"; then 1152 dnl Linking with a static library. 1153 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" 1154 else 1155 dnl We shouldn't come here, but anyway it's good to have a 1156 dnl fallback. 1157 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" 1158 fi 1159 fi 1160 dnl Assume the include files are nearby. 1161 additional_includedir= 1162 case "$found_dir" in 1163 */$acl_libdirstem | */$acl_libdirstem/) 1164 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` 1165 LIB[]NAME[]_PREFIX="$basedir" 1166 additional_includedir="$basedir/include" 1167 ;; 1168 esac 1169 if test "X$additional_includedir" != "X"; then 1170 dnl Potentially add $additional_includedir to $INCNAME. 1171 dnl But don't add it 1172 dnl 1. if it's the standard /usr/include, 1173 dnl 2. if it's /usr/local/include and we are using GCC on Linux, 1174 dnl 3. if it's already present in $CPPFLAGS or the already 1175 dnl constructed $INCNAME, 1176 dnl 4. if it doesn't exist as a directory. 1177 if test "X$additional_includedir" != "X/usr/include"; then 1178 haveit= 1179 if test "X$additional_includedir" = "X/usr/local/include"; then 1180 if test -n "$GCC"; then 1181 case $host_os in 1182 linux* | gnu* | k*bsd*-gnu) haveit=yes;; 1183 esac 1184 fi 1185 fi 1186 if test -z "$haveit"; then 1187 for x in $CPPFLAGS $INC[]NAME; do 1188 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) 1189 if test "X$x" = "X-I$additional_includedir"; then 1190 haveit=yes 1191 break 1192 fi 1193 done 1194 if test -z "$haveit"; then 1195 if test -d "$additional_includedir"; then 1196 dnl Really add $additional_includedir to $INCNAME. 1197 INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" 1198 fi 1199 fi 1200 fi 1201 fi 1202 fi 1203 dnl Look for dependencies. 1204 if test -n "$found_la"; then 1205 dnl Read the .la file. It defines the variables 1206 dnl dlname, library_names, old_library, dependency_libs, current, 1207 dnl age, revision, installed, dlopen, dlpreopen, libdir. 1208 save_libdir="$libdir" 1209 case "$found_la" in 1210 */* | *\\*) . "$found_la" ;; 1211 *) . "./$found_la" ;; 1212 esac 1213 libdir="$save_libdir" 1214 dnl We use only dependency_libs. 1215 for dep in $dependency_libs; do 1216 case "$dep" in 1217 -L*) 1218 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` 1219 dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. 1220 dnl But don't add it 1221 dnl 1. if it's the standard /usr/lib, 1222 dnl 2. if it's /usr/local/lib and we are using GCC on Linux, 1223 dnl 3. if it's already present in $LDFLAGS or the already 1224 dnl constructed $LIBNAME, 1225 dnl 4. if it doesn't exist as a directory. 1226 if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then 1227 haveit= 1228 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then 1229 if test -n "$GCC"; then 1230 case $host_os in 1231 linux* | gnu* | k*bsd*-gnu) haveit=yes;; 1232 esac 1233 fi 1234 fi 1235 if test -z "$haveit"; then 1236 haveit= 1237 for x in $LDFLAGS $LIB[]NAME; do 1238 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) 1239 if test "X$x" = "X-L$additional_libdir"; then 1240 haveit=yes 1241 break 1242 fi 1243 done 1244 if test -z "$haveit"; then 1245 if test -d "$additional_libdir"; then 1246 dnl Really add $additional_libdir to $LIBNAME. 1247 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" 1248 fi 1249 fi 1250 haveit= 1251 for x in $LDFLAGS $LTLIB[]NAME; do 1252 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) 1253 if test "X$x" = "X-L$additional_libdir"; then 1254 haveit=yes 1255 break 1256 fi 1257 done 1258 if test -z "$haveit"; then 1259 if test -d "$additional_libdir"; then 1260 dnl Really add $additional_libdir to $LTLIBNAME. 1261 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" 1262 fi 1263 fi 1264 fi 1265 fi 1266 ;; 1267 -R*) 1268 dir=`echo "X$dep" | sed -e 's/^X-R//'` 1269 if test "$enable_rpath" != no; then 1270 dnl Potentially add DIR to rpathdirs. 1271 dnl The rpathdirs will be appended to $LIBNAME at the end. 1272 haveit= 1273 for x in $rpathdirs; do 1274 if test "X$x" = "X$dir"; then 1275 haveit=yes 1276 break 1277 fi 1278 done 1279 if test -z "$haveit"; then 1280 rpathdirs="$rpathdirs $dir" 1281 fi 1282 dnl Potentially add DIR to ltrpathdirs. 1283 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. 1284 haveit= 1285 for x in $ltrpathdirs; do 1286 if test "X$x" = "X$dir"; then 1287 haveit=yes 1288 break 1289 fi 1290 done 1291 if test -z "$haveit"; then 1292 ltrpathdirs="$ltrpathdirs $dir" 1293 fi 1294 fi 1295 ;; 1296 -l*) 1297 dnl Handle this in the next round. 1298 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` 1299 ;; 1300 *.la) 1301 dnl Handle this in the next round. Throw away the .la's 1302 dnl directory; it is already contained in a preceding -L 1303 dnl option. 1304 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` 1305 ;; 1306 *) 1307 dnl Most likely an immediate library name. 1308 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" 1309 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" 1310 ;; 1311 esac 1312 done 1313 fi 1314 else 1315 dnl Didn't find the library; assume it is in the system directories 1316 dnl known to the linker and runtime loader. (All the system 1317 dnl directories known to the linker should also be known to the 1318 dnl runtime loader, otherwise the system is severely misconfigured.) 1319 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" 1320 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" 1321 fi 1322 fi 1323 fi 1324 done 1325 done 1326 if test "X$rpathdirs" != "X"; then 1327 if test -n "$acl_hardcode_libdir_separator"; then 1328 dnl Weird platform: only the last -rpath option counts, the user must 1329 dnl pass all path elements in one option. We can arrange that for a 1330 dnl single library, but not when more than one $LIBNAMEs are used. 1331 alldirs= 1332 for found_dir in $rpathdirs; do 1333 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" 1334 done 1335 dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl. 1336 acl_save_libdir="$libdir" 1337 libdir="$alldirs" 1338 eval flag=\"$acl_hardcode_libdir_flag_spec\" 1339 libdir="$acl_save_libdir" 1340 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" 1341 else 1342 dnl The -rpath options are cumulative. 1343 for found_dir in $rpathdirs; do 1344 acl_save_libdir="$libdir" 1345 libdir="$found_dir" 1346 eval flag=\"$acl_hardcode_libdir_flag_spec\" 1347 libdir="$acl_save_libdir" 1348 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" 1349 done 1350 fi 1351 fi 1352 if test "X$ltrpathdirs" != "X"; then 1353 dnl When using libtool, the option that works for both libraries and 1354 dnl executables is -R. The -R options are cumulative. 1355 for found_dir in $ltrpathdirs; do 1356 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" 1357 done 1358 fi 1359]) 1360 1361dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, 1362dnl unless already present in VAR. 1363dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes 1364dnl contains two or three consecutive elements that belong together. 1365AC_DEFUN([AC_LIB_APPENDTOVAR], 1366[ 1367 for element in [$2]; do 1368 haveit= 1369 for x in $[$1]; do 1370 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) 1371 if test "X$x" = "X$element"; then 1372 haveit=yes 1373 break 1374 fi 1375 done 1376 if test -z "$haveit"; then 1377 [$1]="${[$1]}${[$1]:+ }$element" 1378 fi 1379 done 1380]) 1381 1382dnl For those cases where a variable contains several -L and -l options 1383dnl referring to unknown libraries and directories, this macro determines the 1384dnl necessary additional linker options for the runtime path. 1385dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL]) 1386dnl sets LDADDVAR to linker options needed together with LIBSVALUE. 1387dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed, 1388dnl otherwise linking without libtool is assumed. 1389AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], 1390[ 1391 AC_REQUIRE([AC_LIB_RPATH]) 1392 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) 1393 $1= 1394 if test "$enable_rpath" != no; then 1395 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then 1396 dnl Use an explicit option to hardcode directories into the resulting 1397 dnl binary. 1398 rpathdirs= 1399 next= 1400 for opt in $2; do 1401 if test -n "$next"; then 1402 dir="$next" 1403 dnl No need to hardcode the standard /usr/lib. 1404 if test "X$dir" != "X/usr/$acl_libdirstem"; then 1405 rpathdirs="$rpathdirs $dir" 1406 fi 1407 next= 1408 else 1409 case $opt in 1410 -L) next=yes ;; 1411 -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` 1412 dnl No need to hardcode the standard /usr/lib. 1413 if test "X$dir" != "X/usr/$acl_libdirstem"; then 1414 rpathdirs="$rpathdirs $dir" 1415 fi 1416 next= ;; 1417 *) next= ;; 1418 esac 1419 fi 1420 done 1421 if test "X$rpathdirs" != "X"; then 1422 if test -n ""$3""; then 1423 dnl libtool is used for linking. Use -R options. 1424 for dir in $rpathdirs; do 1425 $1="${$1}${$1:+ }-R$dir" 1426 done 1427 else 1428 dnl The linker is used for linking directly. 1429 if test -n "$acl_hardcode_libdir_separator"; then 1430 dnl Weird platform: only the last -rpath option counts, the user 1431 dnl must pass all path elements in one option. 1432 alldirs= 1433 for dir in $rpathdirs; do 1434 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir" 1435 done 1436 acl_save_libdir="$libdir" 1437 libdir="$alldirs" 1438 eval flag=\"$acl_hardcode_libdir_flag_spec\" 1439 libdir="$acl_save_libdir" 1440 $1="$flag" 1441 else 1442 dnl The -rpath options are cumulative. 1443 for dir in $rpathdirs; do 1444 acl_save_libdir="$libdir" 1445 libdir="$dir" 1446 eval flag=\"$acl_hardcode_libdir_flag_spec\" 1447 libdir="$acl_save_libdir" 1448 $1="${$1}${$1:+ }$flag" 1449 done 1450 fi 1451 fi 1452 fi 1453 fi 1454 fi 1455 AC_SUBST([$1]) 1456]) 1457 1458# lib-prefix.m4 serial 5 (gettext-0.15) 1459dnl Copyright (C) 2001-2005 Free Software Foundation, Inc. 1460dnl This file is free software; the Free Software Foundation 1461dnl gives unlimited permission to copy and/or distribute it, 1462dnl with or without modifications, as long as this notice is preserved. 1463 1464dnl From Bruno Haible. 1465 1466dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and 1467dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't 1468dnl require excessive bracketing. 1469ifdef([AC_HELP_STRING], 1470[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])], 1471[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) 1472 1473dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed 1474dnl to access previously installed libraries. The basic assumption is that 1475dnl a user will want packages to use other packages he previously installed 1476dnl with the same --prefix option. 1477dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate 1478dnl libraries, but is otherwise very convenient. 1479AC_DEFUN([AC_LIB_PREFIX], 1480[ 1481 AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) 1482 AC_REQUIRE([AC_PROG_CC]) 1483 AC_REQUIRE([AC_CANONICAL_HOST]) 1484 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) 1485 AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) 1486 dnl By default, look in $includedir and $libdir. 1487 use_additional=yes 1488 AC_LIB_WITH_FINAL_PREFIX([ 1489 eval additional_includedir=\"$includedir\" 1490 eval additional_libdir=\"$libdir\" 1491 ]) 1492 AC_LIB_ARG_WITH([lib-prefix], 1493[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib 1494 --without-lib-prefix don't search for libraries in includedir and libdir], 1495[ 1496 if test "X$withval" = "Xno"; then 1497 use_additional=no 1498 else 1499 if test "X$withval" = "X"; then 1500 AC_LIB_WITH_FINAL_PREFIX([ 1501 eval additional_includedir=\"$includedir\" 1502 eval additional_libdir=\"$libdir\" 1503 ]) 1504 else 1505 additional_includedir="$withval/include" 1506 additional_libdir="$withval/$acl_libdirstem" 1507 fi 1508 fi 1509]) 1510 if test $use_additional = yes; then 1511 dnl Potentially add $additional_includedir to $CPPFLAGS. 1512 dnl But don't add it 1513 dnl 1. if it's the standard /usr/include, 1514 dnl 2. if it's already present in $CPPFLAGS, 1515 dnl 3. if it's /usr/local/include and we are using GCC on Linux, 1516 dnl 4. if it doesn't exist as a directory. 1517 if test "X$additional_includedir" != "X/usr/include"; then 1518 haveit= 1519 for x in $CPPFLAGS; do 1520 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) 1521 if test "X$x" = "X-I$additional_includedir"; then 1522 haveit=yes 1523 break 1524 fi 1525 done 1526 if test -z "$haveit"; then 1527 if test "X$additional_includedir" = "X/usr/local/include"; then 1528 if test -n "$GCC"; then 1529 case $host_os in 1530 linux* | gnu* | k*bsd*-gnu) haveit=yes;; 1531 esac 1532 fi 1533 fi 1534 if test -z "$haveit"; then 1535 if test -d "$additional_includedir"; then 1536 dnl Really add $additional_includedir to $CPPFLAGS. 1537 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" 1538 fi 1539 fi 1540 fi 1541 fi 1542 dnl Potentially add $additional_libdir to $LDFLAGS. 1543 dnl But don't add it 1544 dnl 1. if it's the standard /usr/lib, 1545 dnl 2. if it's already present in $LDFLAGS, 1546 dnl 3. if it's /usr/local/lib and we are using GCC on Linux, 1547 dnl 4. if it doesn't exist as a directory. 1548 if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then 1549 haveit= 1550 for x in $LDFLAGS; do 1551 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) 1552 if test "X$x" = "X-L$additional_libdir"; then 1553 haveit=yes 1554 break 1555 fi 1556 done 1557 if test -z "$haveit"; then 1558 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then 1559 if test -n "$GCC"; then 1560 case $host_os in 1561 linux*) haveit=yes;; 1562 esac 1563 fi 1564 fi 1565 if test -z "$haveit"; then 1566 if test -d "$additional_libdir"; then 1567 dnl Really add $additional_libdir to $LDFLAGS. 1568 LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" 1569 fi 1570 fi 1571 fi 1572 fi 1573 fi 1574]) 1575 1576dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, 1577dnl acl_final_exec_prefix, containing the values to which $prefix and 1578dnl $exec_prefix will expand at the end of the configure script. 1579AC_DEFUN([AC_LIB_PREPARE_PREFIX], 1580[ 1581 dnl Unfortunately, prefix and exec_prefix get only finally determined 1582 dnl at the end of configure. 1583 if test "X$prefix" = "XNONE"; then 1584 acl_final_prefix="$ac_default_prefix" 1585 else 1586 acl_final_prefix="$prefix" 1587 fi 1588 if test "X$exec_prefix" = "XNONE"; then 1589 acl_final_exec_prefix='${prefix}' 1590 else 1591 acl_final_exec_prefix="$exec_prefix" 1592 fi 1593 acl_save_prefix="$prefix" 1594 prefix="$acl_final_prefix" 1595 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" 1596 prefix="$acl_save_prefix" 1597]) 1598 1599dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the 1600dnl variables prefix and exec_prefix bound to the values they will have 1601dnl at the end of the configure script. 1602AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], 1603[ 1604 acl_save_prefix="$prefix" 1605 prefix="$acl_final_prefix" 1606 acl_save_exec_prefix="$exec_prefix" 1607 exec_prefix="$acl_final_exec_prefix" 1608 $1 1609 exec_prefix="$acl_save_exec_prefix" 1610 prefix="$acl_save_prefix" 1611]) 1612 1613dnl AC_LIB_PREPARE_MULTILIB creates a variable acl_libdirstem, containing 1614dnl the basename of the libdir, either "lib" or "lib64". 1615AC_DEFUN([AC_LIB_PREPARE_MULTILIB], 1616[ 1617 dnl There is no formal standard regarding lib and lib64. The current 1618 dnl practice is that on a system supporting 32-bit and 64-bit instruction 1619 dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit 1620 dnl libraries go under $prefix/lib. We determine the compiler's default 1621 dnl mode by looking at the compiler's library search path. If at least 1622 dnl of its elements ends in /lib64 or points to a directory whose absolute 1623 dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the 1624 dnl default, namely "lib". 1625 acl_libdirstem=lib 1626 searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` 1627 if test -n "$searchpath"; then 1628 acl_save_IFS="${IFS= }"; IFS=":" 1629 for searchdir in $searchpath; do 1630 if test -d "$searchdir"; then 1631 case "$searchdir" in 1632 */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; 1633 *) searchdir=`cd "$searchdir" && pwd` 1634 case "$searchdir" in 1635 */lib64 ) acl_libdirstem=lib64 ;; 1636 esac ;; 1637 esac 1638 fi 1639 done 1640 IFS="$acl_save_IFS" 1641 fi 1642]) 1643 1644# nls.m4 serial 3 (gettext-0.15) 1645dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc. 1646dnl This file is free software; the Free Software Foundation 1647dnl gives unlimited permission to copy and/or distribute it, 1648dnl with or without modifications, as long as this notice is preserved. 1649dnl 1650dnl This file can can be used in projects which are not available under 1651dnl the GNU General Public License or the GNU Library General Public 1652dnl License but which still want to provide support for the GNU gettext 1653dnl functionality. 1654dnl Please note that the actual code of the GNU gettext library is covered 1655dnl by the GNU Library General Public License, and the rest of the GNU 1656dnl gettext package package is covered by the GNU General Public License. 1657dnl They are *not* in the public domain. 1658 1659dnl Authors: 1660dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000. 1661dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003. 1662 1663AC_PREREQ(2.50) 1664 1665AC_DEFUN([AM_NLS], 1666[ 1667 AC_MSG_CHECKING([whether NLS is requested]) 1668 dnl Default is enabled NLS 1669 AC_ARG_ENABLE(nls, 1670 [ --disable-nls do not use Native Language Support], 1671 USE_NLS=$enableval, USE_NLS=yes) 1672 AC_MSG_RESULT($USE_NLS) 1673 AC_SUBST(USE_NLS) 1674]) 1675 1676# po.m4 serial 15 (gettext-0.17) 1677dnl Copyright (C) 1995-2007 Free Software Foundation, Inc. 1678dnl This file is free software; the Free Software Foundation 1679dnl gives unlimited permission to copy and/or distribute it, 1680dnl with or without modifications, as long as this notice is preserved. 1681dnl 1682dnl This file can can be used in projects which are not available under 1683dnl the GNU General Public License or the GNU Library General Public 1684dnl License but which still want to provide support for the GNU gettext 1685dnl functionality. 1686dnl Please note that the actual code of the GNU gettext library is covered 1687dnl by the GNU Library General Public License, and the rest of the GNU 1688dnl gettext package package is covered by the GNU General Public License. 1689dnl They are *not* in the public domain. 1690 1691dnl Authors: 1692dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000. 1693dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003. 1694 1695AC_PREREQ(2.50) 1696 1697dnl Checks for all prerequisites of the po subdirectory. 1698AC_DEFUN([AM_PO_SUBDIRS], 1699[ 1700 AC_REQUIRE([AC_PROG_MAKE_SET])dnl 1701 AC_REQUIRE([AC_PROG_INSTALL])dnl 1702 AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake 1703 AC_REQUIRE([AM_NLS])dnl 1704 1705 dnl Release version of the gettext macros. This is used to ensure that 1706 dnl the gettext macros and po/Makefile.in.in are in sync. 1707 AC_SUBST([GETTEXT_MACRO_VERSION], [0.17]) 1708 1709 dnl Perform the following tests also if --disable-nls has been given, 1710 dnl because they are needed for "make dist" to work. 1711 1712 dnl Search for GNU msgfmt in the PATH. 1713 dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions. 1714 dnl The second test excludes FreeBSD msgfmt. 1715 AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, 1716 [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && 1717 (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], 1718 :) 1719 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) 1720 1721 dnl Test whether it is GNU msgfmt >= 0.15. 1722changequote(,)dnl 1723 case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in 1724 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;; 1725 *) MSGFMT_015=$MSGFMT ;; 1726 esac 1727changequote([,])dnl 1728 AC_SUBST([MSGFMT_015]) 1729changequote(,)dnl 1730 case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in 1731 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;; 1732 *) GMSGFMT_015=$GMSGFMT ;; 1733 esac 1734changequote([,])dnl 1735 AC_SUBST([GMSGFMT_015]) 1736 1737 dnl Search for GNU xgettext 0.12 or newer in the PATH. 1738 dnl The first test excludes Solaris xgettext and early GNU xgettext versions. 1739 dnl The second test excludes FreeBSD xgettext. 1740 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, 1741 [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && 1742 (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], 1743 :) 1744 dnl Remove leftover from FreeBSD xgettext call. 1745 rm -f messages.po 1746 1747 dnl Test whether it is GNU xgettext >= 0.15. 1748changequote(,)dnl 1749 case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in 1750 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;; 1751 *) XGETTEXT_015=$XGETTEXT ;; 1752 esac 1753changequote([,])dnl 1754 AC_SUBST([XGETTEXT_015]) 1755 1756 dnl Search for GNU msgmerge 0.11 or newer in the PATH. 1757 AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge, 1758 [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :) 1759 1760 dnl Installation directories. 1761 dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we 1762 dnl have to define it here, so that it can be used in po/Makefile. 1763 test -n "$localedir" || localedir='${datadir}/locale' 1764 AC_SUBST([localedir]) 1765 1766 dnl Support for AM_XGETTEXT_OPTION. 1767 test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS= 1768 AC_SUBST([XGETTEXT_EXTRA_OPTIONS]) 1769 1770 AC_CONFIG_COMMANDS([po-directories], [[ 1771 for ac_file in $CONFIG_FILES; do 1772 # Support "outfile[:infile[:infile...]]" 1773 case "$ac_file" in 1774 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; 1775 esac 1776 # PO directories have a Makefile.in generated from Makefile.in.in. 1777 case "$ac_file" in */Makefile.in) 1778 # Adjust a relative srcdir. 1779 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` 1780 ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" 1781 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` 1782 # In autoconf-2.13 it is called $ac_given_srcdir. 1783 # In autoconf-2.50 it is called $srcdir. 1784 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" 1785 case "$ac_given_srcdir" in 1786 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; 1787 /*) top_srcdir="$ac_given_srcdir" ;; 1788 *) top_srcdir="$ac_dots$ac_given_srcdir" ;; 1789 esac 1790 # Treat a directory as a PO directory if and only if it has a 1791 # POTFILES.in file. This allows packages to have multiple PO 1792 # directories under different names or in different locations. 1793 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then 1794 rm -f "$ac_dir/POTFILES" 1795 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" 1796 cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" 1797 POMAKEFILEDEPS="POTFILES.in" 1798 # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend 1799 # on $ac_dir but don't depend on user-specified configuration 1800 # parameters. 1801 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then 1802 # The LINGUAS file contains the set of available languages. 1803 if test -n "$OBSOLETE_ALL_LINGUAS"; then 1804 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" 1805 fi 1806 ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` 1807 # Hide the ALL_LINGUAS assigment from automake < 1.5. 1808 eval 'ALL_LINGUAS''=$ALL_LINGUAS_' 1809 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" 1810 else 1811 # The set of available languages was given in configure.in. 1812 # Hide the ALL_LINGUAS assigment from automake < 1.5. 1813 eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' 1814 fi 1815 # Compute POFILES 1816 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) 1817 # Compute UPDATEPOFILES 1818 # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) 1819 # Compute DUMMYPOFILES 1820 # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) 1821 # Compute GMOFILES 1822 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) 1823 case "$ac_given_srcdir" in 1824 .) srcdirpre= ;; 1825 *) srcdirpre='$(srcdir)/' ;; 1826 esac 1827 POFILES= 1828 UPDATEPOFILES= 1829 DUMMYPOFILES= 1830 GMOFILES= 1831 for lang in $ALL_LINGUAS; do 1832 POFILES="$POFILES $srcdirpre$lang.po" 1833 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" 1834 DUMMYPOFILES="$DUMMYPOFILES $lang.nop" 1835 GMOFILES="$GMOFILES $srcdirpre$lang.gmo" 1836 done 1837 # CATALOGS depends on both $ac_dir and the user's LINGUAS 1838 # environment variable. 1839 INST_LINGUAS= 1840 if test -n "$ALL_LINGUAS"; then 1841 for presentlang in $ALL_LINGUAS; do 1842 useit=no 1843 if test "%UNSET%" != "$LINGUAS"; then 1844 desiredlanguages="$LINGUAS" 1845 else 1846 desiredlanguages="$ALL_LINGUAS" 1847 fi 1848 for desiredlang in $desiredlanguages; do 1849 # Use the presentlang catalog if desiredlang is 1850 # a. equal to presentlang, or 1851 # b. a variant of presentlang (because in this case, 1852 # presentlang can be used as a fallback for messages 1853 # which are not translated in the desiredlang catalog). 1854 case "$desiredlang" in 1855 "$presentlang"*) useit=yes;; 1856 esac 1857 done 1858 if test $useit = yes; then 1859 INST_LINGUAS="$INST_LINGUAS $presentlang" 1860 fi 1861 done 1862 fi 1863 CATALOGS= 1864 if test -n "$INST_LINGUAS"; then 1865 for lang in $INST_LINGUAS; do 1866 CATALOGS="$CATALOGS $lang.gmo" 1867 done 1868 fi 1869 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" 1870 sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" 1871 for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do 1872 if test -f "$f"; then 1873 case "$f" in 1874 *.orig | *.bak | *~) ;; 1875 *) cat "$f" >> "$ac_dir/Makefile" ;; 1876 esac 1877 fi 1878 done 1879 fi 1880 ;; 1881 esac 1882 done]], 1883 [# Capture the value of obsolete ALL_LINGUAS because we need it to compute 1884 # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it 1885 # from automake < 1.5. 1886 eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' 1887 # Capture the value of LINGUAS because we need it to compute CATALOGS. 1888 LINGUAS="${LINGUAS-%UNSET%}" 1889 ]) 1890]) 1891 1892dnl Postprocesses a Makefile in a directory containing PO files. 1893AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE], 1894[ 1895 # When this code is run, in config.status, two variables have already been 1896 # set: 1897 # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in, 1898 # - LINGUAS is the value of the environment variable LINGUAS at configure 1899 # time. 1900 1901changequote(,)dnl 1902 # Adjust a relative srcdir. 1903 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` 1904 ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" 1905 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` 1906 # In autoconf-2.13 it is called $ac_given_srcdir. 1907 # In autoconf-2.50 it is called $srcdir. 1908 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" 1909 case "$ac_given_srcdir" in 1910 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; 1911 /*) top_srcdir="$ac_given_srcdir" ;; 1912 *) top_srcdir="$ac_dots$ac_given_srcdir" ;; 1913 esac 1914 1915 # Find a way to echo strings without interpreting backslash. 1916 if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then 1917 gt_echo='echo' 1918 else 1919 if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then 1920 gt_echo='printf %s\n' 1921 else 1922 echo_func () { 1923 cat <<EOT 1924$* 1925EOT 1926 } 1927 gt_echo='echo_func' 1928 fi 1929 fi 1930 1931 # A sed script that extracts the value of VARIABLE from a Makefile. 1932 sed_x_variable=' 1933# Test if the hold space is empty. 1934x 1935s/P/P/ 1936x 1937ta 1938# Yes it was empty. Look if we have the expected variable definition. 1939/^[ ]*VARIABLE[ ]*=/{ 1940 # Seen the first line of the variable definition. 1941 s/^[ ]*VARIABLE[ ]*=// 1942 ba 1943} 1944bd 1945:a 1946# Here we are processing a line from the variable definition. 1947# Remove comment, more precisely replace it with a space. 1948s/#.*$/ / 1949# See if the line ends in a backslash. 1950tb 1951:b 1952s/\\$// 1953# Print the line, without the trailing backslash. 1954p 1955tc 1956# There was no trailing backslash. The end of the variable definition is 1957# reached. Clear the hold space. 1958s/^.*$// 1959x 1960bd 1961:c 1962# A trailing backslash means that the variable definition continues in the 1963# next line. Put a nonempty string into the hold space to indicate this. 1964s/^.*$/P/ 1965x 1966:d 1967' 1968changequote([,])dnl 1969 1970 # Set POTFILES to the value of the Makefile variable POTFILES. 1971 sed_x_POTFILES=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'` 1972 POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"` 1973 # Compute POTFILES_DEPS as 1974 # $(foreach file, $(POTFILES), $(top_srcdir)/$(file)) 1975 POTFILES_DEPS= 1976 for file in $POTFILES; do 1977 POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file" 1978 done 1979 POMAKEFILEDEPS="" 1980 1981 if test -n "$OBSOLETE_ALL_LINGUAS"; then 1982 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" 1983 fi 1984 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then 1985 # The LINGUAS file contains the set of available languages. 1986 ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` 1987 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" 1988 else 1989 # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS. 1990 sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'` 1991 ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"` 1992 fi 1993 # Hide the ALL_LINGUAS assigment from automake < 1.5. 1994 eval 'ALL_LINGUAS''=$ALL_LINGUAS_' 1995 # Compute POFILES 1996 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) 1997 # Compute UPDATEPOFILES 1998 # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) 1999 # Compute DUMMYPOFILES 2000 # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) 2001 # Compute GMOFILES 2002 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) 2003 # Compute PROPERTIESFILES 2004 # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties) 2005 # Compute CLASSFILES 2006 # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class) 2007 # Compute QMFILES 2008 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm) 2009 # Compute MSGFILES 2010 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg) 2011 # Compute RESOURCESDLLFILES 2012 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll) 2013 case "$ac_given_srcdir" in 2014 .) srcdirpre= ;; 2015 *) srcdirpre='$(srcdir)/' ;; 2016 esac 2017 POFILES= 2018 UPDATEPOFILES= 2019 DUMMYPOFILES= 2020 GMOFILES= 2021 PROPERTIESFILES= 2022 CLASSFILES= 2023 QMFILES= 2024 MSGFILES= 2025 RESOURCESDLLFILES= 2026 for lang in $ALL_LINGUAS; do 2027 POFILES="$POFILES $srcdirpre$lang.po" 2028 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" 2029 DUMMYPOFILES="$DUMMYPOFILES $lang.nop" 2030 GMOFILES="$GMOFILES $srcdirpre$lang.gmo" 2031 PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties" 2032 CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class" 2033 QMFILES="$QMFILES $srcdirpre$lang.qm" 2034 frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` 2035 MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg" 2036 frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'` 2037 RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll" 2038 done 2039 # CATALOGS depends on both $ac_dir and the user's LINGUAS 2040 # environment variable. 2041 INST_LINGUAS= 2042 if test -n "$ALL_LINGUAS"; then 2043 for presentlang in $ALL_LINGUAS; do 2044 useit=no 2045 if test "%UNSET%" != "$LINGUAS"; then 2046 desiredlanguages="$LINGUAS" 2047 else 2048 desiredlanguages="$ALL_LINGUAS" 2049 fi 2050 for desiredlang in $desiredlanguages; do 2051 # Use the presentlang catalog if desiredlang is 2052 # a. equal to presentlang, or 2053 # b. a variant of presentlang (because in this case, 2054 # presentlang can be used as a fallback for messages 2055 # which are not translated in the desiredlang catalog). 2056 case "$desiredlang" in 2057 "$presentlang"*) useit=yes;; 2058 esac 2059 done 2060 if test $useit = yes; then 2061 INST_LINGUAS="$INST_LINGUAS $presentlang" 2062 fi 2063 done 2064 fi 2065 CATALOGS= 2066 JAVACATALOGS= 2067 QTCATALOGS= 2068 TCLCATALOGS= 2069 CSHARPCATALOGS= 2070 if test -n "$INST_LINGUAS"; then 2071 for lang in $INST_LINGUAS; do 2072 CATALOGS="$CATALOGS $lang.gmo" 2073 JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties" 2074 QTCATALOGS="$QTCATALOGS $lang.qm" 2075 frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` 2076 TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg" 2077 frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'` 2078 CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll" 2079 done 2080 fi 2081 2082 sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp" 2083 if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then 2084 # Add dependencies that cannot be formulated as a simple suffix rule. 2085 for lang in $ALL_LINGUAS; do 2086 frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` 2087 cat >> "$ac_file.tmp" <<EOF 2088$frobbedlang.msg: $lang.po 2089 @echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \ 2090 \$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; } 2091EOF 2092 done 2093 fi 2094 if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then 2095 # Add dependencies that cannot be formulated as a simple suffix rule. 2096 for lang in $ALL_LINGUAS; do 2097 frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'` 2098 cat >> "$ac_file.tmp" <<EOF 2099$frobbedlang/\$(DOMAIN).resources.dll: $lang.po 2100 @echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \ 2101 \$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; } 2102EOF 2103 done 2104 fi 2105 if test -n "$POMAKEFILEDEPS"; then 2106 cat >> "$ac_file.tmp" <<EOF 2107Makefile: $POMAKEFILEDEPS 2108EOF 2109 fi 2110 mv "$ac_file.tmp" "$ac_file" 2111]) 2112 2113dnl Initializes the accumulator used by AM_XGETTEXT_OPTION. 2114AC_DEFUN([AM_XGETTEXT_OPTION_INIT], 2115[ 2116 XGETTEXT_EXTRA_OPTIONS= 2117]) 2118 2119dnl Registers an option to be passed to xgettext in the po subdirectory. 2120AC_DEFUN([AM_XGETTEXT_OPTION], 2121[ 2122 AC_REQUIRE([AM_XGETTEXT_OPTION_INIT]) 2123 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS $1" 2124]) 2125 2126# progtest.m4 serial 4 (gettext-0.14.2) 2127dnl Copyright (C) 1996-2003, 2005 Free Software Foundation, Inc. 2128dnl This file is free software; the Free Software Foundation 2129dnl gives unlimited permission to copy and/or distribute it, 2130dnl with or without modifications, as long as this notice is preserved. 2131dnl 2132dnl This file can can be used in projects which are not available under 2133dnl the GNU General Public License or the GNU Library General Public 2134dnl License but which still want to provide support for the GNU gettext 2135dnl functionality. 2136dnl Please note that the actual code of the GNU gettext library is covered 2137dnl by the GNU Library General Public License, and the rest of the GNU 2138dnl gettext package package is covered by the GNU General Public License. 2139dnl They are *not* in the public domain. 2140 2141dnl Authors: 2142dnl Ulrich Drepper <drepper@cygnus.com>, 1996. 2143 2144AC_PREREQ(2.50) 2145 2146# Search path for a program which passes the given test. 2147 2148dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, 2149dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) 2150AC_DEFUN([AM_PATH_PROG_WITH_TEST], 2151[ 2152# Prepare PATH_SEPARATOR. 2153# The user is always right. 2154if test "${PATH_SEPARATOR+set}" != set; then 2155 echo "#! /bin/sh" >conf$$.sh 2156 echo "exit 0" >>conf$$.sh 2157 chmod +x conf$$.sh 2158 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then 2159 PATH_SEPARATOR=';' 2160 else 2161 PATH_SEPARATOR=: 2162 fi 2163 rm -f conf$$.sh 2164fi 2165 2166# Find out how to test for executable files. Don't use a zero-byte file, 2167# as systems may use methods other than mode bits to determine executability. 2168cat >conf$$.file <<_ASEOF 2169#! /bin/sh 2170exit 0 2171_ASEOF 2172chmod +x conf$$.file 2173if test -x conf$$.file >/dev/null 2>&1; then 2174 ac_executable_p="test -x" 2175else 2176 ac_executable_p="test -f" 2177fi 2178rm -f conf$$.file 2179 2180# Extract the first word of "$2", so it can be a program name with args. 2181set dummy $2; ac_word=[$]2 2182AC_MSG_CHECKING([for $ac_word]) 2183AC_CACHE_VAL(ac_cv_path_$1, 2184[case "[$]$1" in 2185 [[\\/]]* | ?:[[\\/]]*) 2186 ac_cv_path_$1="[$]$1" # Let the user override the test with a path. 2187 ;; 2188 *) 2189 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR 2190 for ac_dir in ifelse([$5], , $PATH, [$5]); do 2191 IFS="$ac_save_IFS" 2192 test -z "$ac_dir" && ac_dir=. 2193 for ac_exec_ext in '' $ac_executable_extensions; do 2194 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then 2195 echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD 2196 if [$3]; then 2197 ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext" 2198 break 2 2199 fi 2200 fi 2201 done 2202 done 2203 IFS="$ac_save_IFS" 2204dnl If no 4th arg is given, leave the cache variable unset, 2205dnl so AC_PATH_PROGS will keep looking. 2206ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" 2207])dnl 2208 ;; 2209esac])dnl 2210$1="$ac_cv_path_$1" 2211if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then 2212 AC_MSG_RESULT([$]$1) 2213else 2214 AC_MSG_RESULT(no) 2215fi 2216AC_SUBST($1)dnl 2217]) 2218 2219dnl --------------------------------------------------------------------------- 2220dnl Macros for wxWidgets detection. Typically used in configure.in as: 2221dnl 2222dnl AC_ARG_ENABLE(...) 2223dnl AC_ARG_WITH(...) 2224dnl ... 2225dnl AM_OPTIONS_WXCONFIG 2226dnl ... 2227dnl ... 2228dnl AM_PATH_WXCONFIG(2.6.0, wxWin=1) 2229dnl if test "$wxWin" != 1; then 2230dnl AC_MSG_ERROR([ 2231dnl wxWidgets must be installed on your system 2232dnl but wx-config script couldn't be found. 2233dnl 2234dnl Please check that wx-config is in path, the directory 2235dnl where wxWidgets libraries are installed (returned by 2236dnl 'wx-config --libs' command) is in LD_LIBRARY_PATH or 2237dnl equivalent variable and wxWidgets version is 2.3.4 or above. 2238dnl ]) 2239dnl fi 2240dnl CPPFLAGS="$CPPFLAGS $WX_CPPFLAGS" 2241dnl CXXFLAGS="$CXXFLAGS $WX_CXXFLAGS_ONLY" 2242dnl CFLAGS="$CFLAGS $WX_CFLAGS_ONLY" 2243dnl 2244dnl LIBS="$LIBS $WX_LIBS" 2245dnl --------------------------------------------------------------------------- 2246 2247dnl --------------------------------------------------------------------------- 2248dnl AM_OPTIONS_WXCONFIG 2249dnl 2250dnl adds support for --wx-prefix, --wx-exec-prefix, --with-wxdir and 2251dnl --wx-config command line options 2252dnl --------------------------------------------------------------------------- 2253 2254AC_DEFUN([AM_OPTIONS_WXCONFIG], 2255[ 2256 AC_ARG_WITH(wxdir, 2257 [ --with-wxdir=PATH Use uninstalled version of wxWidgets in PATH], 2258 [ wx_config_name="$withval/wx-config" 2259 wx_config_args="--inplace"]) 2260 AC_ARG_WITH(wx-config, 2261 [ --with-wx-config=CONFIG wx-config script to use (optional)], 2262 wx_config_name="$withval" ) 2263 AC_ARG_WITH(wx-prefix, 2264 [ --with-wx-prefix=PREFIX Prefix where wxWidgets is installed (optional)], 2265 wx_config_prefix="$withval", wx_config_prefix="") 2266 AC_ARG_WITH(wx-exec-prefix, 2267 [ --with-wx-exec-prefix=PREFIX 2268 Exec prefix where wxWidgets is installed (optional)], 2269 wx_config_exec_prefix="$withval", wx_config_exec_prefix="") 2270]) 2271 2272dnl Helper macro for checking if wx version is at least $1.$2.$3, set's 2273dnl wx_ver_ok=yes if it is: 2274AC_DEFUN([_WX_PRIVATE_CHECK_VERSION], 2275[ 2276 wx_ver_ok="" 2277 if test "x$WX_VERSION" != x ; then 2278 if test $wx_config_major_version -gt $1; then 2279 wx_ver_ok=yes 2280 else 2281 if test $wx_config_major_version -eq $1; then 2282 if test $wx_config_minor_version -gt $2; then 2283 wx_ver_ok=yes 2284 else 2285 if test $wx_config_minor_version -eq $2; then 2286 if test $wx_config_micro_version -ge $3; then 2287 wx_ver_ok=yes 2288 fi 2289 fi 2290 fi 2291 fi 2292 fi 2293 fi 2294]) 2295 2296dnl --------------------------------------------------------------------------- 2297dnl AM_PATH_WXCONFIG(VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND 2298dnl [, WX-LIBS [, ADDITIONAL-WX-CONFIG-FLAGS]]]]) 2299dnl 2300dnl Test for wxWidgets, and define WX_C*FLAGS, WX_LIBS and WX_LIBS_STATIC 2301dnl (the latter is for static linking against wxWidgets). Set WX_CONFIG_NAME 2302dnl environment variable to override the default name of the wx-config script 2303dnl to use. Set WX_CONFIG_PATH to specify the full path to wx-config - in this 2304dnl case the macro won't even waste time on tests for its existence. 2305dnl 2306dnl Optional WX-LIBS argument contains comma- or space-separated list of 2307dnl wxWidgets libraries to link against (it may include contrib libraries). If 2308dnl it is not specified then WX_LIBS and WX_LIBS_STATIC will contain flags to 2309dnl link with all of the core wxWidgets libraries. 2310dnl 2311dnl Optional ADDITIONAL-WX-CONFIG-FLAGS argument is appended to wx-config 2312dnl invocation command in present. It can be used to fine-tune lookup of 2313dnl best wxWidgets build available. 2314dnl 2315dnl Example use: 2316dnl AM_PATH_WXCONFIG([2.6.0], [wxWin=1], [wxWin=0], [html,core,net] 2317dnl [--unicode --debug]) 2318dnl --------------------------------------------------------------------------- 2319 2320dnl 2321dnl Get the cflags and libraries from the wx-config script 2322dnl 2323AC_DEFUN([AM_PATH_WXCONFIG], 2324[ 2325 dnl do we have wx-config name: it can be wx-config or wxd-config or ... 2326 if test x${WX_CONFIG_NAME+set} != xset ; then 2327 WX_CONFIG_NAME=wx-config 2328 fi 2329 2330 if test "x$wx_config_name" != x ; then 2331 WX_CONFIG_NAME="$wx_config_name" 2332 fi 2333 2334 dnl deal with optional prefixes 2335 if test x$wx_config_exec_prefix != x ; then 2336 wx_config_args="$wx_config_args --exec-prefix=$wx_config_exec_prefix" 2337 WX_LOOKUP_PATH="$wx_config_exec_prefix/bin" 2338 fi 2339 if test x$wx_config_prefix != x ; then 2340 wx_config_args="$wx_config_args --prefix=$wx_config_prefix" 2341 WX_LOOKUP_PATH="$WX_LOOKUP_PATH:$wx_config_prefix/bin" 2342 fi 2343 if test "$cross_compiling" = "yes"; then 2344 wx_config_args="$wx_config_args --host=$host_alias" 2345 fi 2346 2347 dnl don't search the PATH if WX_CONFIG_NAME is absolute filename 2348 if test -x "$WX_CONFIG_NAME" ; then 2349 AC_MSG_CHECKING(for wx-config) 2350 WX_CONFIG_PATH="$WX_CONFIG_NAME" 2351 AC_MSG_RESULT($WX_CONFIG_PATH) 2352 else 2353 AC_PATH_PROG(WX_CONFIG_PATH, $WX_CONFIG_NAME, no, "$WX_LOOKUP_PATH:$PATH") 2354 fi 2355 2356 if test "$WX_CONFIG_PATH" != "no" ; then 2357 WX_VERSION="" 2358 2359 min_wx_version=ifelse([$1], ,2.2.1,$1) 2360 if test -z "$5" ; then 2361 AC_MSG_CHECKING([for wxWidgets version >= $min_wx_version]) 2362 else 2363 AC_MSG_CHECKING([for wxWidgets version >= $min_wx_version ($5)]) 2364 fi 2365 2366 WX_CONFIG_WITH_ARGS="$WX_CONFIG_PATH $wx_config_args $5 $4" 2367 2368 WX_VERSION=`$WX_CONFIG_WITH_ARGS --version 2>/dev/null` 2369 wx_config_major_version=`echo $WX_VERSION | \ 2370 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` 2371 wx_config_minor_version=`echo $WX_VERSION | \ 2372 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` 2373 wx_config_micro_version=`echo $WX_VERSION | \ 2374 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` 2375 2376 wx_requested_major_version=`echo $min_wx_version | \ 2377 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` 2378 wx_requested_minor_version=`echo $min_wx_version | \ 2379 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` 2380 wx_requested_micro_version=`echo $min_wx_version | \ 2381 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` 2382 2383 _WX_PRIVATE_CHECK_VERSION([$wx_requested_major_version], 2384 [$wx_requested_minor_version], 2385 [$wx_requested_micro_version]) 2386 2387 if test -n "$wx_ver_ok"; then 2388 2389 AC_MSG_RESULT(yes (version $WX_VERSION)) 2390 WX_LIBS=`$WX_CONFIG_WITH_ARGS --libs` 2391 2392 dnl is this even still appropriate? --static is a real option now 2393 dnl and WX_CONFIG_WITH_ARGS is likely to contain it if that is 2394 dnl what the user actually wants, making this redundant at best. 2395 dnl For now keep it in case anyone actually used it in the past. 2396 AC_MSG_CHECKING([for wxWidgets static library]) 2397 WX_LIBS_STATIC=`$WX_CONFIG_WITH_ARGS --static --libs 2>/dev/null` 2398 if test "x$WX_LIBS_STATIC" = "x"; then 2399 AC_MSG_RESULT(no) 2400 else 2401 AC_MSG_RESULT(yes) 2402 fi 2403 2404 dnl starting with version 2.2.6 wx-config has --cppflags argument 2405 wx_has_cppflags="" 2406 if test $wx_config_major_version -gt 2; then 2407 wx_has_cppflags=yes 2408 else 2409 if test $wx_config_major_version -eq 2; then 2410 if test $wx_config_minor_version -gt 2; then 2411 wx_has_cppflags=yes 2412 else 2413 if test $wx_config_minor_version -eq 2; then 2414 if test $wx_config_micro_version -ge 6; then 2415 wx_has_cppflags=yes 2416 fi 2417 fi 2418 fi 2419 fi 2420 fi 2421 2422 dnl starting with version 2.7.0 wx-config has --rescomp option 2423 wx_has_rescomp="" 2424 if test $wx_config_major_version -gt 2; then 2425 wx_has_rescomp=yes 2426 else 2427 if test $wx_config_major_version -eq 2; then 2428 if test $wx_config_minor_version -ge 7; then 2429 wx_has_rescomp=yes 2430 fi 2431 fi 2432 fi 2433 if test "x$wx_has_rescomp" = x ; then 2434 dnl cannot give any useful info for resource compiler 2435 WX_RESCOMP= 2436 else 2437 WX_RESCOMP=`$WX_CONFIG_WITH_ARGS --rescomp` 2438 fi 2439 2440 if test "x$wx_has_cppflags" = x ; then 2441 dnl no choice but to define all flags like CFLAGS 2442 WX_CFLAGS=`$WX_CONFIG_WITH_ARGS --cflags` 2443 WX_CPPFLAGS=$WX_CFLAGS 2444 WX_CXXFLAGS=$WX_CFLAGS 2445 2446 WX_CFLAGS_ONLY=$WX_CFLAGS 2447 WX_CXXFLAGS_ONLY=$WX_CFLAGS 2448 else 2449 dnl we have CPPFLAGS included in CFLAGS included in CXXFLAGS 2450 WX_CPPFLAGS=`$WX_CONFIG_WITH_ARGS --cppflags` 2451 WX_CXXFLAGS=`$WX_CONFIG_WITH_ARGS --cxxflags` 2452 WX_CFLAGS=`$WX_CONFIG_WITH_ARGS --cflags` 2453 2454 WX_CFLAGS_ONLY=`echo $WX_CFLAGS | sed "s@^$WX_CPPFLAGS *@@"` 2455 WX_CXXFLAGS_ONLY=`echo $WX_CXXFLAGS | sed "s@^$WX_CFLAGS *@@"` 2456 fi 2457 2458 ifelse([$2], , :, [$2]) 2459 2460 else 2461 2462 if test "x$WX_VERSION" = x; then 2463 dnl no wx-config at all 2464 AC_MSG_RESULT(no) 2465 else 2466 AC_MSG_RESULT(no (version $WX_VERSION is not new enough)) 2467 fi 2468 2469 WX_CFLAGS="" 2470 WX_CPPFLAGS="" 2471 WX_CXXFLAGS="" 2472 WX_LIBS="" 2473 WX_LIBS_STATIC="" 2474 WX_RESCOMP="" 2475 ifelse([$3], , :, [$3]) 2476 2477 fi 2478 else 2479 2480 WX_CFLAGS="" 2481 WX_CPPFLAGS="" 2482 WX_CXXFLAGS="" 2483 WX_LIBS="" 2484 WX_LIBS_STATIC="" 2485 WX_RESCOMP="" 2486 2487 ifelse([$3], , :, [$3]) 2488 2489 fi 2490 2491 AC_SUBST(WX_CPPFLAGS) 2492 AC_SUBST(WX_CFLAGS) 2493 AC_SUBST(WX_CXXFLAGS) 2494 AC_SUBST(WX_CFLAGS_ONLY) 2495 AC_SUBST(WX_CXXFLAGS_ONLY) 2496 AC_SUBST(WX_LIBS) 2497 AC_SUBST(WX_LIBS_STATIC) 2498 AC_SUBST(WX_VERSION) 2499 AC_SUBST(WX_RESCOMP) 2500]) 2501 2502dnl --------------------------------------------------------------------------- 2503dnl Get information on the wxrc program for making C++, Python and xrs 2504dnl resource files. 2505dnl 2506dnl AC_ARG_ENABLE(...) 2507dnl AC_ARG_WITH(...) 2508dnl ... 2509dnl AM_OPTIONS_WXCONFIG 2510dnl ... 2511dnl AM_PATH_WXCONFIG(2.6.0, wxWin=1) 2512dnl if test "$wxWin" != 1; then 2513dnl AC_MSG_ERROR([ 2514dnl wxWidgets must be installed on your system 2515dnl but wx-config script couldn't be found. 2516dnl 2517dnl Please check that wx-config is in path, the directory 2518dnl where wxWidgets libraries are installed (returned by 2519dnl 'wx-config --libs' command) is in LD_LIBRARY_PATH or 2520dnl equivalent variable and wxWidgets version is 2.6.0 or above. 2521dnl ]) 2522dnl fi 2523dnl 2524dnl AM_PATH_WXRC([HAVE_WXRC=1], [HAVE_WXRC=0]) 2525dnl if test "x$HAVE_WXRC" != x1; then 2526dnl AC_MSG_ERROR([ 2527dnl The wxrc program was not installed or not found. 2528dnl 2529dnl Please check the wxWidgets installation. 2530dnl ]) 2531dnl fi 2532dnl 2533dnl CPPFLAGS="$CPPFLAGS $WX_CPPFLAGS" 2534dnl CXXFLAGS="$CXXFLAGS $WX_CXXFLAGS_ONLY" 2535dnl CFLAGS="$CFLAGS $WX_CFLAGS_ONLY" 2536dnl 2537dnl LDFLAGS="$LDFLAGS $WX_LIBS" 2538dnl --------------------------------------------------------------------------- 2539 2540 2541 2542dnl --------------------------------------------------------------------------- 2543dnl AM_PATH_WXRC([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) 2544dnl 2545dnl Test for wxWidgets' wxrc program for creating either C++, Python or XRS 2546dnl resources. The variable WXRC will be set and substituted in the configure 2547dnl script and Makefiles. 2548dnl 2549dnl Example use: 2550dnl AM_PATH_WXRC([wxrc=1], [wxrc=0]) 2551dnl --------------------------------------------------------------------------- 2552 2553dnl 2554dnl wxrc program from the wx-config script 2555dnl 2556AC_DEFUN([AM_PATH_WXRC], 2557[ 2558 AC_ARG_VAR([WXRC], [Path to wxWidget's wxrc resource compiler]) 2559 2560 if test "x$WX_CONFIG_NAME" = x; then 2561 AC_MSG_ERROR([The wxrc tests must run after wxWidgets test.]) 2562 else 2563 2564 AC_MSG_CHECKING([for wxrc]) 2565 2566 if test "x$WXRC" = x ; then 2567 dnl wx-config --utility is a new addition to wxWidgets: 2568 _WX_PRIVATE_CHECK_VERSION(2,5,3) 2569 if test -n "$wx_ver_ok"; then 2570 WXRC=`$WX_CONFIG_WITH_ARGS --utility=wxrc` 2571 fi 2572 fi 2573 2574 if test "x$WXRC" = x ; then 2575 AC_MSG_RESULT([not found]) 2576 ifelse([$2], , :, [$2]) 2577 else 2578 AC_MSG_RESULT([$WXRC]) 2579 ifelse([$1], , :, [$1]) 2580 fi 2581 2582 AC_SUBST(WXRC) 2583 fi 2584]) 2585 2586# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 2587# 2588# This file is free software; the Free Software Foundation 2589# gives unlimited permission to copy and/or distribute it, 2590# with or without modifications, as long as this notice is preserved. 2591 2592# AM_AUTOMAKE_VERSION(VERSION) 2593# ---------------------------- 2594# Automake X.Y traces this macro to ensure aclocal.m4 has been 2595# generated from the m4 files accompanying Automake X.Y. 2596# (This private macro should not be called outside this file.) 2597AC_DEFUN([AM_AUTOMAKE_VERSION], 2598[am__api_version='1.10' 2599dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 2600dnl require some minimum version. Point them to the right macro. 2601m4_if([$1], [1.10.2], [], 2602 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 2603]) 2604 2605# _AM_AUTOCONF_VERSION(VERSION) 2606# ----------------------------- 2607# aclocal traces this macro to find the Autoconf version. 2608# This is a private macro too. Using m4_define simplifies 2609# the logic in aclocal, which can simply ignore this definition. 2610m4_define([_AM_AUTOCONF_VERSION], []) 2611 2612# AM_SET_CURRENT_AUTOMAKE_VERSION 2613# ------------------------------- 2614# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 2615# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 2616AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 2617[AM_AUTOMAKE_VERSION([1.10.2])dnl 2618m4_ifndef([AC_AUTOCONF_VERSION], 2619 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 2620_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 2621 2622# AM_AUX_DIR_EXPAND -*- Autoconf -*- 2623 2624# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 2625# 2626# This file is free software; the Free Software Foundation 2627# gives unlimited permission to copy and/or distribute it, 2628# with or without modifications, as long as this notice is preserved. 2629 2630# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 2631# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 2632# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 2633# 2634# Of course, Automake must honor this variable whenever it calls a 2635# tool from the auxiliary directory. The problem is that $srcdir (and 2636# therefore $ac_aux_dir as well) can be either absolute or relative, 2637# depending on how configure is run. This is pretty annoying, since 2638# it makes $ac_aux_dir quite unusable in subdirectories: in the top 2639# source directory, any form will work fine, but in subdirectories a 2640# relative path needs to be adjusted first. 2641# 2642# $ac_aux_dir/missing 2643# fails when called from a subdirectory if $ac_aux_dir is relative 2644# $top_srcdir/$ac_aux_dir/missing 2645# fails if $ac_aux_dir is absolute, 2646# fails when called from a subdirectory in a VPATH build with 2647# a relative $ac_aux_dir 2648# 2649# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 2650# are both prefixed by $srcdir. In an in-source build this is usually 2651# harmless because $srcdir is `.', but things will broke when you 2652# start a VPATH build or use an absolute $srcdir. 2653# 2654# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 2655# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 2656# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 2657# and then we would define $MISSING as 2658# MISSING="\${SHELL} $am_aux_dir/missing" 2659# This will work as long as MISSING is not called from configure, because 2660# unfortunately $(top_srcdir) has no meaning in configure. 2661# However there are other variables, like CC, which are often used in 2662# configure, and could therefore not use this "fixed" $ac_aux_dir. 2663# 2664# Another solution, used here, is to always expand $ac_aux_dir to an 2665# absolute PATH. The drawback is that using absolute paths prevent a 2666# configured tree to be moved without reconfiguration. 2667 2668AC_DEFUN([AM_AUX_DIR_EXPAND], 2669[dnl Rely on autoconf to set up CDPATH properly. 2670AC_PREREQ([2.50])dnl 2671# expand $ac_aux_dir to an absolute path 2672am_aux_dir=`cd $ac_aux_dir && pwd` 2673]) 2674 2675# AM_CONDITIONAL -*- Autoconf -*- 2676 2677# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 2678# Free Software Foundation, Inc. 2679# 2680# This file is free software; the Free Software Foundation 2681# gives unlimited permission to copy and/or distribute it, 2682# with or without modifications, as long as this notice is preserved. 2683 2684# serial 8 2685 2686# AM_CONDITIONAL(NAME, SHELL-CONDITION) 2687# ------------------------------------- 2688# Define a conditional. 2689AC_DEFUN([AM_CONDITIONAL], 2690[AC_PREREQ(2.52)dnl 2691 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 2692 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 2693AC_SUBST([$1_TRUE])dnl 2694AC_SUBST([$1_FALSE])dnl 2695_AM_SUBST_NOTMAKE([$1_TRUE])dnl 2696_AM_SUBST_NOTMAKE([$1_FALSE])dnl 2697if $2; then 2698 $1_TRUE= 2699 $1_FALSE='#' 2700else 2701 $1_TRUE='#' 2702 $1_FALSE= 2703fi 2704AC_CONFIG_COMMANDS_PRE( 2705[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 2706 AC_MSG_ERROR([[conditional "$1" was never defined. 2707Usually this means the macro was only invoked conditionally.]]) 2708fi])]) 2709 2710# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 2711# Free Software Foundation, Inc. 2712# 2713# This file is free software; the Free Software Foundation 2714# gives unlimited permission to copy and/or distribute it, 2715# with or without modifications, as long as this notice is preserved. 2716 2717# serial 9 2718 2719# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 2720# written in clear, in which case automake, when reading aclocal.m4, 2721# will think it sees a *use*, and therefore will trigger all it's 2722# C support machinery. Also note that it means that autoscan, seeing 2723# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 2724 2725 2726# _AM_DEPENDENCIES(NAME) 2727# ---------------------- 2728# See how the compiler implements dependency checking. 2729# NAME is "CC", "CXX", "GCJ", or "OBJC". 2730# We try a few techniques and use that to set a single cache variable. 2731# 2732# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 2733# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 2734# dependency, and given that the user is not expected to run this macro, 2735# just rely on AC_PROG_CC. 2736AC_DEFUN([_AM_DEPENDENCIES], 2737[AC_REQUIRE([AM_SET_DEPDIR])dnl 2738AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 2739AC_REQUIRE([AM_MAKE_INCLUDE])dnl 2740AC_REQUIRE([AM_DEP_TRACK])dnl 2741 2742ifelse([$1], CC, [depcc="$CC" am_compiler_list=], 2743 [$1], CXX, [depcc="$CXX" am_compiler_list=], 2744 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 2745 [$1], UPC, [depcc="$UPC" am_compiler_list=], 2746 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 2747 [depcc="$$1" am_compiler_list=]) 2748 2749AC_CACHE_CHECK([dependency style of $depcc], 2750 [am_cv_$1_dependencies_compiler_type], 2751[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 2752 # We make a subdir and do the tests there. Otherwise we can end up 2753 # making bogus files that we don't know about and never remove. For 2754 # instance it was reported that on HP-UX the gcc test will end up 2755 # making a dummy file named `D' -- because `-MD' means `put the output 2756 # in D'. 2757 mkdir conftest.dir 2758 # Copy depcomp to subdir because otherwise we won't find it if we're 2759 # using a relative directory. 2760 cp "$am_depcomp" conftest.dir 2761 cd conftest.dir 2762 # We will build objects and dependencies in a subdirectory because 2763 # it helps to detect inapplicable dependency modes. For instance 2764 # both Tru64's cc and ICC support -MD to output dependencies as a 2765 # side effect of compilation, but ICC will put the dependencies in 2766 # the current directory while Tru64 will put them in the object 2767 # directory. 2768 mkdir sub 2769 2770 am_cv_$1_dependencies_compiler_type=none 2771 if test "$am_compiler_list" = ""; then 2772 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 2773 fi 2774 for depmode in $am_compiler_list; do 2775 # Setup a source with many dependencies, because some compilers 2776 # like to wrap large dependency lists on column 80 (with \), and 2777 # we should not choose a depcomp mode which is confused by this. 2778 # 2779 # We need to recreate these files for each test, as the compiler may 2780 # overwrite some of them when testing with obscure command lines. 2781 # This happens at least with the AIX C compiler. 2782 : > sub/conftest.c 2783 for i in 1 2 3 4 5 6; do 2784 echo '#include "conftst'$i'.h"' >> sub/conftest.c 2785 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 2786 # Solaris 8's {/usr,}/bin/sh. 2787 touch sub/conftst$i.h 2788 done 2789 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 2790 2791 case $depmode in 2792 nosideeffect) 2793 # after this tag, mechanisms are not by side-effect, so they'll 2794 # only be used when explicitly requested 2795 if test "x$enable_dependency_tracking" = xyes; then 2796 continue 2797 else 2798 break 2799 fi 2800 ;; 2801 none) break ;; 2802 esac 2803 # We check with `-c' and `-o' for the sake of the "dashmstdout" 2804 # mode. It turns out that the SunPro C++ compiler does not properly 2805 # handle `-M -o', and we need to detect this. 2806 if depmode=$depmode \ 2807 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ 2808 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 2809 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ 2810 >/dev/null 2>conftest.err && 2811 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 2812 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 2813 grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && 2814 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 2815 # icc doesn't choke on unknown options, it will just issue warnings 2816 # or remarks (even with -Werror). So we grep stderr for any message 2817 # that says an option was ignored or not supported. 2818 # When given -MP, icc 7.0 and 7.1 complain thusly: 2819 # icc: Command line warning: ignoring option '-M'; no argument required 2820 # The diagnosis changed in icc 8.0: 2821 # icc: Command line remark: option '-MP' not supported 2822 if (grep 'ignoring option' conftest.err || 2823 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 2824 am_cv_$1_dependencies_compiler_type=$depmode 2825 break 2826 fi 2827 fi 2828 done 2829 2830 cd .. 2831 rm -rf conftest.dir 2832else 2833 am_cv_$1_dependencies_compiler_type=none 2834fi 2835]) 2836AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 2837AM_CONDITIONAL([am__fastdep$1], [ 2838 test "x$enable_dependency_tracking" != xno \ 2839 && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 2840]) 2841 2842 2843# AM_SET_DEPDIR 2844# ------------- 2845# Choose a directory name for dependency files. 2846# This macro is AC_REQUIREd in _AM_DEPENDENCIES 2847AC_DEFUN([AM_SET_DEPDIR], 2848[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 2849AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 2850]) 2851 2852 2853# AM_DEP_TRACK 2854# ------------ 2855AC_DEFUN([AM_DEP_TRACK], 2856[AC_ARG_ENABLE(dependency-tracking, 2857[ --disable-dependency-tracking speeds up one-time build 2858 --enable-dependency-tracking do not reject slow dependency extractors]) 2859if test "x$enable_dependency_tracking" != xno; then 2860 am_depcomp="$ac_aux_dir/depcomp" 2861 AMDEPBACKSLASH='\' 2862fi 2863AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 2864AC_SUBST([AMDEPBACKSLASH])dnl 2865_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 2866]) 2867 2868# Generate code to set up dependency tracking. -*- Autoconf -*- 2869 2870# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 2871# Free Software Foundation, Inc. 2872# 2873# This file is free software; the Free Software Foundation 2874# gives unlimited permission to copy and/or distribute it, 2875# with or without modifications, as long as this notice is preserved. 2876 2877#serial 5 2878 2879# _AM_OUTPUT_DEPENDENCY_COMMANDS 2880# ------------------------------ 2881AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 2882[{ 2883 # Autoconf 2.62 quotes --file arguments for eval, but not when files 2884 # are listed without --file. Let's play safe and only enable the eval 2885 # if we detect the quoting. 2886 case $CONFIG_FILES in 2887 *\'*) eval set x "$CONFIG_FILES" ;; 2888 *) set x $CONFIG_FILES ;; 2889 esac 2890 shift 2891 for mf 2892 do 2893 # Strip MF so we end up with the name of the file. 2894 mf=`echo "$mf" | sed -e 's/:.*$//'` 2895 # Check whether this is an Automake generated Makefile or not. 2896 # We used to match only the files named `Makefile.in', but 2897 # some people rename them; so instead we look at the file content. 2898 # Grep'ing the first line is not enough: some people post-process 2899 # each Makefile.in and add a new line on top of each file to say so. 2900 # Grep'ing the whole file is not good either: AIX grep has a line 2901 # limit of 2048, but all sed's we know have understand at least 4000. 2902 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 2903 dirpart=`AS_DIRNAME("$mf")` 2904 else 2905 continue 2906 fi 2907 # Extract the definition of DEPDIR, am__include, and am__quote 2908 # from the Makefile without running `make'. 2909 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 2910 test -z "$DEPDIR" && continue 2911 am__include=`sed -n 's/^am__include = //p' < "$mf"` 2912 test -z "am__include" && continue 2913 am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 2914 # When using ansi2knr, U may be empty or an underscore; expand it 2915 U=`sed -n 's/^U = //p' < "$mf"` 2916 # Find all dependency output files, they are included files with 2917 # $(DEPDIR) in their names. We invoke sed twice because it is the 2918 # simplest approach to changing $(DEPDIR) to its actual value in the 2919 # expansion. 2920 for file in `sed -n " 2921 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 2922 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 2923 # Make sure the directory exists. 2924 test -f "$dirpart/$file" && continue 2925 fdir=`AS_DIRNAME(["$file"])` 2926 AS_MKDIR_P([$dirpart/$fdir]) 2927 # echo "creating $dirpart/$file" 2928 echo '# dummy' > "$dirpart/$file" 2929 done 2930 done 2931} 2932])# _AM_OUTPUT_DEPENDENCY_COMMANDS 2933 2934 2935# AM_OUTPUT_DEPENDENCY_COMMANDS 2936# ----------------------------- 2937# This macro should only be invoked once -- use via AC_REQUIRE. 2938# 2939# This code is only required when automatic dependency tracking 2940# is enabled. FIXME. This creates each `.P' file that we will 2941# need in order to bootstrap the dependency handling code. 2942AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 2943[AC_CONFIG_COMMANDS([depfiles], 2944 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 2945 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 2946]) 2947 2948# Do all the work for Automake. -*- Autoconf -*- 2949 2950# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2951# 2005, 2006, 2008 Free Software Foundation, Inc. 2952# 2953# This file is free software; the Free Software Foundation 2954# gives unlimited permission to copy and/or distribute it, 2955# with or without modifications, as long as this notice is preserved. 2956 2957# serial 13 2958 2959# This macro actually does too much. Some checks are only needed if 2960# your package does certain things. But this isn't really a big deal. 2961 2962# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 2963# AM_INIT_AUTOMAKE([OPTIONS]) 2964# ----------------------------------------------- 2965# The call with PACKAGE and VERSION arguments is the old style 2966# call (pre autoconf-2.50), which is being phased out. PACKAGE 2967# and VERSION should now be passed to AC_INIT and removed from 2968# the call to AM_INIT_AUTOMAKE. 2969# We support both call styles for the transition. After 2970# the next Automake release, Autoconf can make the AC_INIT 2971# arguments mandatory, and then we can depend on a new Autoconf 2972# release and drop the old call support. 2973AC_DEFUN([AM_INIT_AUTOMAKE], 2974[AC_PREREQ([2.60])dnl 2975dnl Autoconf wants to disallow AM_ names. We explicitly allow 2976dnl the ones we care about. 2977m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 2978AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 2979AC_REQUIRE([AC_PROG_INSTALL])dnl 2980if test "`cd $srcdir && pwd`" != "`pwd`"; then 2981 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 2982 # is not polluted with repeated "-I." 2983 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 2984 # test to see if srcdir already configured 2985 if test -f $srcdir/config.status; then 2986 AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 2987 fi 2988fi 2989 2990# test whether we have cygpath 2991if test -z "$CYGPATH_W"; then 2992 if (cygpath --version) >/dev/null 2>/dev/null; then 2993 CYGPATH_W='cygpath -w' 2994 else 2995 CYGPATH_W=echo 2996 fi 2997fi 2998AC_SUBST([CYGPATH_W]) 2999 3000# Define the identity of the package. 3001dnl Distinguish between old-style and new-style calls. 3002m4_ifval([$2], 3003[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 3004 AC_SUBST([PACKAGE], [$1])dnl 3005 AC_SUBST([VERSION], [$2])], 3006[_AM_SET_OPTIONS([$1])dnl 3007dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 3008m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 3009 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 3010 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 3011 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 3012 3013_AM_IF_OPTION([no-define],, 3014[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 3015 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 3016 3017# Some tools Automake needs. 3018AC_REQUIRE([AM_SANITY_CHECK])dnl 3019AC_REQUIRE([AC_ARG_PROGRAM])dnl 3020AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 3021AM_MISSING_PROG(AUTOCONF, autoconf) 3022AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 3023AM_MISSING_PROG(AUTOHEADER, autoheader) 3024AM_MISSING_PROG(MAKEINFO, makeinfo) 3025AM_PROG_INSTALL_SH 3026AM_PROG_INSTALL_STRIP 3027AC_REQUIRE([AM_PROG_MKDIR_P])dnl 3028# We need awk for the "check" target. The system "awk" is bad on 3029# some platforms. 3030AC_REQUIRE([AC_PROG_AWK])dnl 3031AC_REQUIRE([AC_PROG_MAKE_SET])dnl 3032AC_REQUIRE([AM_SET_LEADING_DOT])dnl 3033_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 3034 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 3035 [_AM_PROG_TAR([v7])])]) 3036_AM_IF_OPTION([no-dependencies],, 3037[AC_PROVIDE_IFELSE([AC_PROG_CC], 3038 [_AM_DEPENDENCIES(CC)], 3039 [define([AC_PROG_CC], 3040 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 3041AC_PROVIDE_IFELSE([AC_PROG_CXX], 3042 [_AM_DEPENDENCIES(CXX)], 3043 [define([AC_PROG_CXX], 3044 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 3045AC_PROVIDE_IFELSE([AC_PROG_OBJC], 3046 [_AM_DEPENDENCIES(OBJC)], 3047 [define([AC_PROG_OBJC], 3048 defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 3049]) 3050]) 3051 3052 3053# When config.status generates a header, we must update the stamp-h file. 3054# This file resides in the same directory as the config header 3055# that is generated. The stamp files are numbered to have different names. 3056 3057# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 3058# loop where config.status creates the headers, so we can generate 3059# our stamp files there. 3060AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 3061[# Compute $1's index in $config_headers. 3062_am_arg=$1 3063_am_stamp_count=1 3064for _am_header in $config_headers :; do 3065 case $_am_header in 3066 $_am_arg | $_am_arg:* ) 3067 break ;; 3068 * ) 3069 _am_stamp_count=`expr $_am_stamp_count + 1` ;; 3070 esac 3071done 3072echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 3073 3074# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 3075# 3076# This file is free software; the Free Software Foundation 3077# gives unlimited permission to copy and/or distribute it, 3078# with or without modifications, as long as this notice is preserved. 3079 3080# AM_PROG_INSTALL_SH 3081# ------------------ 3082# Define $install_sh. 3083AC_DEFUN([AM_PROG_INSTALL_SH], 3084[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 3085install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} 3086AC_SUBST(install_sh)]) 3087 3088# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 3089# 3090# This file is free software; the Free Software Foundation 3091# gives unlimited permission to copy and/or distribute it, 3092# with or without modifications, as long as this notice is preserved. 3093 3094# serial 2 3095 3096# Check whether the underlying file-system supports filenames 3097# with a leading dot. For instance MS-DOS doesn't. 3098AC_DEFUN([AM_SET_LEADING_DOT], 3099[rm -rf .tst 2>/dev/null 3100mkdir .tst 2>/dev/null 3101if test -d .tst; then 3102 am__leading_dot=. 3103else 3104 am__leading_dot=_ 3105fi 3106rmdir .tst 2>/dev/null 3107AC_SUBST([am__leading_dot])]) 3108 3109# Check to see how 'make' treats includes. -*- Autoconf -*- 3110 3111# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. 3112# 3113# This file is free software; the Free Software Foundation 3114# gives unlimited permission to copy and/or distribute it, 3115# with or without modifications, as long as this notice is preserved. 3116 3117# serial 3 3118 3119# AM_MAKE_INCLUDE() 3120# ----------------- 3121# Check to see how make treats includes. 3122AC_DEFUN([AM_MAKE_INCLUDE], 3123[am_make=${MAKE-make} 3124cat > confinc << 'END' 3125am__doit: 3126 @echo done 3127.PHONY: am__doit 3128END 3129# If we don't find an include directive, just comment out the code. 3130AC_MSG_CHECKING([for style of include used by $am_make]) 3131am__include="#" 3132am__quote= 3133_am_result=none 3134# First try GNU make style include. 3135echo "include confinc" > confmf 3136# We grep out `Entering directory' and `Leaving directory' 3137# messages which can occur if `w' ends up in MAKEFLAGS. 3138# In particular we don't look at `^make:' because GNU make might 3139# be invoked under some other name (usually "gmake"), in which 3140# case it prints its new name instead of `make'. 3141if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then 3142 am__include=include 3143 am__quote= 3144 _am_result=GNU 3145fi 3146# Now try BSD make style include. 3147if test "$am__include" = "#"; then 3148 echo '.include "confinc"' > confmf 3149 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then 3150 am__include=.include 3151 am__quote="\"" 3152 _am_result=BSD 3153 fi 3154fi 3155AC_SUBST([am__include]) 3156AC_SUBST([am__quote]) 3157AC_MSG_RESULT([$_am_result]) 3158rm -f confinc confmf 3159]) 3160 3161# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 3162 3163# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005 3164# Free Software Foundation, Inc. 3165# 3166# This file is free software; the Free Software Foundation 3167# gives unlimited permission to copy and/or distribute it, 3168# with or without modifications, as long as this notice is preserved. 3169 3170# serial 5 3171 3172# AM_MISSING_PROG(NAME, PROGRAM) 3173# ------------------------------ 3174AC_DEFUN([AM_MISSING_PROG], 3175[AC_REQUIRE([AM_MISSING_HAS_RUN]) 3176$1=${$1-"${am_missing_run}$2"} 3177AC_SUBST($1)]) 3178 3179 3180# AM_MISSING_HAS_RUN 3181# ------------------ 3182# Define MISSING if not defined so far and test if it supports --run. 3183# If it does, set am_missing_run to use it, otherwise, to nothing. 3184AC_DEFUN([AM_MISSING_HAS_RUN], 3185[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 3186AC_REQUIRE_AUX_FILE([missing])dnl 3187test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" 3188# Use eval to expand $SHELL 3189if eval "$MISSING --run true"; then 3190 am_missing_run="$MISSING --run " 3191else 3192 am_missing_run= 3193 AC_MSG_WARN([`missing' script is too old or missing]) 3194fi 3195]) 3196 3197# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 3198# 3199# This file is free software; the Free Software Foundation 3200# gives unlimited permission to copy and/or distribute it, 3201# with or without modifications, as long as this notice is preserved. 3202 3203# AM_PROG_MKDIR_P 3204# --------------- 3205# Check for `mkdir -p'. 3206AC_DEFUN([AM_PROG_MKDIR_P], 3207[AC_PREREQ([2.60])dnl 3208AC_REQUIRE([AC_PROG_MKDIR_P])dnl 3209dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 3210dnl while keeping a definition of mkdir_p for backward compatibility. 3211dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 3212dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 3213dnl Makefile.ins that do not define MKDIR_P, so we do our own 3214dnl adjustment using top_builddir (which is defined more often than 3215dnl MKDIR_P). 3216AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 3217case $mkdir_p in 3218 [[\\/$]]* | ?:[[\\/]]*) ;; 3219 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 3220esac 3221]) 3222 3223# Helper functions for option handling. -*- Autoconf -*- 3224 3225# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. 3226# 3227# This file is free software; the Free Software Foundation 3228# gives unlimited permission to copy and/or distribute it, 3229# with or without modifications, as long as this notice is preserved. 3230 3231# serial 4 3232 3233# _AM_MANGLE_OPTION(NAME) 3234# ----------------------- 3235AC_DEFUN([_AM_MANGLE_OPTION], 3236[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 3237 3238# _AM_SET_OPTION(NAME) 3239# ------------------------------ 3240# Set option NAME. Presently that only means defining a flag for this option. 3241AC_DEFUN([_AM_SET_OPTION], 3242[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 3243 3244# _AM_SET_OPTIONS(OPTIONS) 3245# ---------------------------------- 3246# OPTIONS is a space-separated list of Automake options. 3247AC_DEFUN([_AM_SET_OPTIONS], 3248[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 3249 3250# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 3251# ------------------------------------------- 3252# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 3253AC_DEFUN([_AM_IF_OPTION], 3254[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 3255 3256# Check to make sure that the build environment is sane. -*- Autoconf -*- 3257 3258# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 3259# Free Software Foundation, Inc. 3260# 3261# This file is free software; the Free Software Foundation 3262# gives unlimited permission to copy and/or distribute it, 3263# with or without modifications, as long as this notice is preserved. 3264 3265# serial 4 3266 3267# AM_SANITY_CHECK 3268# --------------- 3269AC_DEFUN([AM_SANITY_CHECK], 3270[AC_MSG_CHECKING([whether build environment is sane]) 3271# Just in case 3272sleep 1 3273echo timestamp > conftest.file 3274# Do `set' in a subshell so we don't clobber the current shell's 3275# arguments. Must try -L first in case configure is actually a 3276# symlink; some systems play weird games with the mod time of symlinks 3277# (eg FreeBSD returns the mod time of the symlink's containing 3278# directory). 3279if ( 3280 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` 3281 if test "$[*]" = "X"; then 3282 # -L didn't work. 3283 set X `ls -t $srcdir/configure conftest.file` 3284 fi 3285 rm -f conftest.file 3286 if test "$[*]" != "X $srcdir/configure conftest.file" \ 3287 && test "$[*]" != "X conftest.file $srcdir/configure"; then 3288 3289 # If neither matched, then we have a broken ls. This can happen 3290 # if, for instance, CONFIG_SHELL is bash and it inherits a 3291 # broken ls alias from the environment. This has actually 3292 # happened. Such a system could not be considered "sane". 3293 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 3294alias in your environment]) 3295 fi 3296 3297 test "$[2]" = conftest.file 3298 ) 3299then 3300 # Ok. 3301 : 3302else 3303 AC_MSG_ERROR([newly created file is older than distributed files! 3304Check your system clock]) 3305fi 3306AC_MSG_RESULT(yes)]) 3307 3308# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 3309# 3310# This file is free software; the Free Software Foundation 3311# gives unlimited permission to copy and/or distribute it, 3312# with or without modifications, as long as this notice is preserved. 3313 3314# AM_PROG_INSTALL_STRIP 3315# --------------------- 3316# One issue with vendor `install' (even GNU) is that you can't 3317# specify the program used to strip binaries. This is especially 3318# annoying in cross-compiling environments, where the build's strip 3319# is unlikely to handle the host's binaries. 3320# Fortunately install-sh will honor a STRIPPROG variable, so we 3321# always use install-sh in `make install-strip', and initialize 3322# STRIPPROG with the value of the STRIP variable (set by the user). 3323AC_DEFUN([AM_PROG_INSTALL_STRIP], 3324[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 3325# Installed binaries are usually stripped using `strip' when the user 3326# run `make install-strip'. However `strip' might not be the right 3327# tool to use in cross-compilation environments, therefore Automake 3328# will honor the `STRIP' environment variable to overrule this program. 3329dnl Don't test for $cross_compiling = yes, because it might be `maybe'. 3330if test "$cross_compiling" != no; then 3331 AC_CHECK_TOOL([STRIP], [strip], :) 3332fi 3333INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 3334AC_SUBST([INSTALL_STRIP_PROGRAM])]) 3335 3336# Copyright (C) 2006 Free Software Foundation, Inc. 3337# 3338# This file is free software; the Free Software Foundation 3339# gives unlimited permission to copy and/or distribute it, 3340# with or without modifications, as long as this notice is preserved. 3341 3342# _AM_SUBST_NOTMAKE(VARIABLE) 3343# --------------------------- 3344# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 3345# This macro is traced by Automake. 3346AC_DEFUN([_AM_SUBST_NOTMAKE]) 3347 3348# Check how to create a tarball. -*- Autoconf -*- 3349 3350# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 3351# 3352# This file is free software; the Free Software Foundation 3353# gives unlimited permission to copy and/or distribute it, 3354# with or without modifications, as long as this notice is preserved. 3355 3356# serial 2 3357 3358# _AM_PROG_TAR(FORMAT) 3359# -------------------- 3360# Check how to create a tarball in format FORMAT. 3361# FORMAT should be one of `v7', `ustar', or `pax'. 3362# 3363# Substitute a variable $(am__tar) that is a command 3364# writing to stdout a FORMAT-tarball containing the directory 3365# $tardir. 3366# tardir=directory && $(am__tar) > result.tar 3367# 3368# Substitute a variable $(am__untar) that extract such 3369# a tarball read from stdin. 3370# $(am__untar) < result.tar 3371AC_DEFUN([_AM_PROG_TAR], 3372[# Always define AMTAR for backward compatibility. 3373AM_MISSING_PROG([AMTAR], [tar]) 3374m4_if([$1], [v7], 3375 [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 3376 [m4_case([$1], [ustar],, [pax],, 3377 [m4_fatal([Unknown tar format])]) 3378AC_MSG_CHECKING([how to create a $1 tar archive]) 3379# Loop over all known methods to create a tar archive until one works. 3380_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 3381_am_tools=${am_cv_prog_tar_$1-$_am_tools} 3382# Do not fold the above two line into one, because Tru64 sh and 3383# Solaris sh will not grok spaces in the rhs of `-'. 3384for _am_tool in $_am_tools 3385do 3386 case $_am_tool in 3387 gnutar) 3388 for _am_tar in tar gnutar gtar; 3389 do 3390 AM_RUN_LOG([$_am_tar --version]) && break 3391 done 3392 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 3393 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 3394 am__untar="$_am_tar -xf -" 3395 ;; 3396 plaintar) 3397 # Must skip GNU tar: if it does not support --format= it doesn't create 3398 # ustar tarball either. 3399 (tar --version) >/dev/null 2>&1 && continue 3400 am__tar='tar chf - "$$tardir"' 3401 am__tar_='tar chf - "$tardir"' 3402 am__untar='tar xf -' 3403 ;; 3404 pax) 3405 am__tar='pax -L -x $1 -w "$$tardir"' 3406 am__tar_='pax -L -x $1 -w "$tardir"' 3407 am__untar='pax -r' 3408 ;; 3409 cpio) 3410 am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 3411 am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 3412 am__untar='cpio -i -H $1 -d' 3413 ;; 3414 none) 3415 am__tar=false 3416 am__tar_=false 3417 am__untar=false 3418 ;; 3419 esac 3420 3421 # If the value was cached, stop now. We just wanted to have am__tar 3422 # and am__untar set. 3423 test -n "${am_cv_prog_tar_$1}" && break 3424 3425 # tar/untar a dummy directory, and stop if the command works 3426 rm -rf conftest.dir 3427 mkdir conftest.dir 3428 echo GrepMe > conftest.dir/file 3429 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 3430 rm -rf conftest.dir 3431 if test -s conftest.tar; then 3432 AM_RUN_LOG([$am__untar <conftest.tar]) 3433 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 3434 fi 3435done 3436rm -rf conftest.dir 3437 3438AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 3439AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 3440AC_SUBST([am__tar]) 3441AC_SUBST([am__untar]) 3442]) # _AM_PROG_TAR 3443 3444