403
403
dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
404
404
AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
406
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
407
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
409
# This file is free software, distributed under the terms of the GNU
410
# General Public License. As a special exception to the GNU General
411
# Public License, this file may be distributed as part of a program
412
# that contains a configuration script generated by Autoconf, under
413
# the same distribution terms as the rest of that program.
415
# This file can be copied and used freely without restrictions. It can
416
# be used in projects which are not available under the GNU Public License
417
# but which still want to provide support for the GNU gettext functionality.
419
# Macro to add for using GNU gettext.
420
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
422
# Modified to never use included libintl.
423
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
425
# Major rework to remove unused code
426
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
428
# Added better handling of ALL_LINGUAS from GNU gettext version
429
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
431
# Modified to require ngettext
432
# Matthias Clasen <mclasen@redhat.com> 08/06/2004
434
# We need this here as well, since someone might use autoconf-2.5x
435
# to configure GLib then an older version to configure a package
436
# using AM_GLIB_GNU_GETTEXT
440
dnl We go to great lengths to make sure that aclocal won't
441
dnl try to pull in the installed version of these macros
442
dnl when running aclocal in the glib directory.
444
m4_copy([AC_DEFUN],[glib_DEFUN])
445
m4_copy([AC_REQUIRE],[glib_REQUIRE])
447
dnl At the end, if we're not within glib, we'll define the public
448
dnl definitions in terms of our private definitions.
452
#--------------------
453
glib_DEFUN([GLIB_LC_MESSAGES],
454
[AC_CHECK_HEADERS([locale.h])
455
if test $ac_cv_header_locale_h = yes; then
456
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
457
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
458
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
459
if test $am_cv_val_LC_MESSAGES = yes; then
460
AC_DEFINE(HAVE_LC_MESSAGES, 1,
461
[Define if your <locale.h> file defines LC_MESSAGES.])
465
# GLIB_PATH_PROG_WITH_TEST
466
#----------------------------
467
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
468
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
469
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
470
[# Extract the first word of "$2", so it can be a program name with args.
471
set dummy $2; ac_word=[$]2
472
AC_MSG_CHECKING([for $ac_word])
473
AC_CACHE_VAL(ac_cv_path_$1,
476
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
479
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
480
for ac_dir in ifelse([$5], , $PATH, [$5]); do
481
test -z "$ac_dir" && ac_dir=.
482
if test -f $ac_dir/$ac_word; then
484
ac_cv_path_$1="$ac_dir/$ac_word"
490
dnl If no 4th arg is given, leave the cache variable unset,
491
dnl so AC_PATH_PROGS will keep looking.
492
ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
497
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
406
# iconv.m4 serial 11 (gettext-0.18.1)
407
dnl Copyright (C) 2000-2002, 2007-2010 Free Software Foundation, Inc.
408
dnl This file is free software; the Free Software Foundation
409
dnl gives unlimited permission to copy and/or distribute it,
410
dnl with or without modifications, as long as this notice is preserved.
412
dnl From Bruno Haible.
414
AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
416
dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
417
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
418
AC_REQUIRE([AC_LIB_RPATH])
420
dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
422
AC_LIB_LINKFLAGS_BODY([iconv])
507
glib_DEFUN([GLIB_WITH_NLS],
508
dnl NLS is obligatory
512
gt_cv_have_gettext=no
518
AC_CHECK_HEADER(libintl.h,
519
[gt_cv_func_dgettext_libintl="no"
520
libintl_extra_libs=""
523
# First check in libc
525
AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
529
[return !ngettext ("","", 1)],
530
gt_cv_func_ngettext_libc=yes,
531
gt_cv_func_ngettext_libc=no)
534
if test "$gt_cv_func_ngettext_libc" = "yes" ; then
535
AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
539
[return !dgettext ("","")],
540
gt_cv_func_dgettext_libc=yes,
541
gt_cv_func_dgettext_libc=no)
545
if test "$gt_cv_func_ngettext_libc" = "yes" ; then
546
AC_CHECK_FUNCS(bind_textdomain_codeset)
550
# If we don't have everything we want, check in libintl
552
if test "$gt_cv_func_dgettext_libc" != "yes" \
553
|| test "$gt_cv_func_ngettext_libc" != "yes" \
554
|| test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
556
AC_CHECK_LIB(intl, bindtextdomain,
557
[AC_CHECK_LIB(intl, ngettext,
558
[AC_CHECK_LIB(intl, dgettext,
559
gt_cv_func_dgettext_libintl=yes)])])
561
if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
562
AC_MSG_CHECKING([if -liconv is needed to use gettext])
564
AC_CHECK_LIB(intl, ngettext,
565
[AC_CHECK_LIB(intl, dcgettext,
566
[gt_cv_func_dgettext_libintl=yes
567
libintl_extra_libs=-liconv],
573
# If we found libintl, then check in it for bind_textdomain_codeset();
574
# we'll prefer libc if neither have bind_textdomain_codeset(),
575
# and both have dgettext and ngettext
577
if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
578
glib_save_LIBS="$LIBS"
579
LIBS="$LIBS -lintl $libintl_extra_libs"
580
unset ac_cv_func_bind_textdomain_codeset
581
AC_CHECK_FUNCS(bind_textdomain_codeset)
582
LIBS="$glib_save_LIBS"
584
if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
585
gt_cv_func_dgettext_libc=no
587
if test "$gt_cv_func_dgettext_libc" = "yes" \
588
&& test "$gt_cv_func_ngettext_libc" = "yes"; then
589
gt_cv_func_dgettext_libintl=no
595
if test "$gt_cv_func_dgettext_libc" = "yes" \
596
|| test "$gt_cv_func_dgettext_libintl" = "yes"; then
597
gt_cv_have_gettext=yes
600
if test "$gt_cv_func_dgettext_libintl" = "yes"; then
601
INTLLIBS="-lintl $libintl_extra_libs"
604
if test "$gt_cv_have_gettext" = "yes"; then
605
AC_DEFINE(HAVE_GETTEXT,1,
606
[Define if the GNU gettext() function is already present or preinstalled.])
607
GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
608
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
609
if test "$MSGFMT" != "no"; then
610
glib_save_LIBS="$LIBS"
611
LIBS="$LIBS $INTLLIBS"
612
AC_CHECK_FUNCS(dcgettext)
614
AC_MSG_CHECKING([if msgfmt accepts -c])
615
GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
618
"Content-Type: text/plain; charset=UTF-8\n"
619
"Project-Id-Version: test 1.0\n"
620
"PO-Revision-Date: 2007-02-15 12:01+0100\n"
621
"Last-Translator: test <foo@bar.xx>\n"
622
"Language-Team: C <LL@li.org>\n"
623
"MIME-Version: 1.0\n"
624
"Content-Transfer-Encoding: 8bit\n"
625
], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
626
AC_SUBST(MSGFMT_OPTS)
627
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
628
GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
629
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
630
AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
631
return _nl_msg_cat_cntr],
636
dnl On Solaris, if bind_textdomain_codeset is in libc,
637
dnl GNU format message catalog is always supported,
638
dnl since both are added to the libc all together.
639
dnl Hence, we'd like to go with DATADIRNAME=share and
640
dnl and CATOBJEXT=.gmo in this case.
641
AC_CHECK_FUNC(bind_textdomain_codeset,
652
LIBS="$glib_save_LIBS"
655
gt_cv_have_gettext=no
425
AC_DEFUN([AM_ICONV_LINK],
427
dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
428
dnl those with the standalone portable GNU libiconv installed).
429
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
431
dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
433
AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
435
dnl Add $INCICONV to CPPFLAGS before performing the following checks,
436
dnl because if the user has installed libiconv and not disabled its use
437
dnl via --without-libiconv-prefix, he wants to use it. The first
438
dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
439
am_save_CPPFLAGS="$CPPFLAGS"
440
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
442
AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [
443
am_cv_func_iconv="no, consider installing GNU libiconv"
445
AC_TRY_LINK([#include <stdlib.h>
447
[iconv_t cd = iconv_open("","");
448
iconv(cd,NULL,NULL,NULL,NULL);
450
[am_cv_func_iconv=yes])
451
if test "$am_cv_func_iconv" != yes; then
453
LIBS="$LIBS $LIBICONV"
454
AC_TRY_LINK([#include <stdlib.h>
456
[iconv_t cd = iconv_open("","");
457
iconv(cd,NULL,NULL,NULL,NULL);
459
[am_cv_lib_iconv=yes]
460
[am_cv_func_iconv=yes])
464
if test "$am_cv_func_iconv" = yes; then
465
AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [
466
dnl This tests against bugs in AIX 5.1, HP-UX 11.11, Solaris 10.
468
if test $am_cv_lib_iconv = yes; then
469
LIBS="$LIBS $LIBICONV"
476
/* Test against AIX 5.1 bug: Failures are not distinguishable from successful
479
iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
480
if (cd_utf8_to_88591 != (iconv_t)(-1))
482
static const char input[] = "\342\202\254"; /* EURO SIGN */
484
const char *inptr = input;
485
size_t inbytesleft = strlen (input);
487
size_t outbytesleft = sizeof (buf);
488
size_t res = iconv (cd_utf8_to_88591,
489
(char **) &inptr, &inbytesleft,
490
&outptr, &outbytesleft);
495
/* Test against Solaris 10 bug: Failures are not distinguishable from
496
successful returns. */
498
iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
499
if (cd_ascii_to_88591 != (iconv_t)(-1))
501
static const char input[] = "\263";
503
const char *inptr = input;
504
size_t inbytesleft = strlen (input);
506
size_t outbytesleft = sizeof (buf);
507
size_t res = iconv (cd_ascii_to_88591,
508
(char **) &inptr, &inbytesleft,
509
&outptr, &outbytesleft);
514
#if 0 /* This bug could be worked around by the caller. */
515
/* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
517
iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
518
if (cd_88591_to_utf8 != (iconv_t)(-1))
520
static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
522
const char *inptr = input;
523
size_t inbytesleft = strlen (input);
525
size_t outbytesleft = sizeof (buf);
526
size_t res = iconv (cd_88591_to_utf8,
527
(char **) &inptr, &inbytesleft,
528
&outptr, &outbytesleft);
534
/* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
536
if (/* Try standardized names. */
537
iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
538
/* Try IRIX, OSF/1 names. */
539
&& iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
541
&& iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
542
/* Try HP-UX names. */
543
&& iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
546
}], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no],
548
aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
549
*) am_cv_func_iconv_works="guessing yes" ;;
660
if test "$gt_cv_have_gettext" = "yes" ; then
661
AC_DEFINE(ENABLE_NLS, 1,
662
[always defined to indicate that i18n is enabled])
665
dnl Test whether we really found GNU xgettext.
666
if test "$XGETTEXT" != ":"; then
667
dnl If it is not GNU xgettext we define it as : so that the
668
dnl Makefiles still can work.
669
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
673
[found xgettext program is not GNU xgettext; ignore it])
678
# We need to process the po/ directory.
682
[case "$CONFIG_FILES" in *po/Makefile.in*)
683
sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
686
dnl These rules are solely for the distribution goal. While doing this
687
dnl we only have to keep exactly one list of the available catalogs
689
for lang in $ALL_LINGUAS; do
690
GMOFILES="$GMOFILES $lang.gmo"
691
POFILES="$POFILES $lang.po"
694
dnl Make all variables we use known to autoconf.
697
AC_SUBST(DATADIRNAME)
701
AC_SUBST(PO_IN_DATADIR_TRUE)
702
AC_SUBST(PO_IN_DATADIR_FALSE)
707
# AM_GLIB_GNU_GETTEXT
708
# -------------------
709
# Do checks necessary for use of gettext. If a suitable implementation
710
# of gettext is found in either in libintl or in the C library,
711
# it will set INTLLIBS to the libraries needed for use of gettext
712
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
713
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
714
# on various variables needed by the Makefile.in.in installed by
717
glib_DEFUN([GLIB_GNU_GETTEXT],
718
[AC_REQUIRE([AC_PROG_CC])dnl
719
AC_REQUIRE([AC_HEADER_STDC])dnl
724
if test "$gt_cv_have_gettext" = "yes"; then
725
if test "x$ALL_LINGUAS" = "x"; then
728
AC_MSG_CHECKING(for catalogs to be installed)
730
for presentlang in $ALL_LINGUAS; do
732
if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
733
desiredlanguages="$LINGUAS"
735
desiredlanguages="$ALL_LINGUAS"
737
for desiredlang in $desiredlanguages; do
738
# Use the presentlang catalog if desiredlang is
739
# a. equal to presentlang, or
740
# b. a variant of presentlang (because in this case,
741
# presentlang can be used as a fallback for messages
742
# which are not translated in the desiredlang catalog).
743
case "$desiredlang" in
744
"$presentlang"*) useit=yes;;
747
if test $useit = yes; then
748
NEW_LINGUAS="$NEW_LINGUAS $presentlang"
752
AC_MSG_RESULT($LINGUAS)
755
dnl Construct list of names of catalog files to be constructed.
756
if test -n "$LINGUAS"; then
757
for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
761
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
762
dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
763
dnl Try to locate is.
765
if test -n "$ac_aux_dir"; then
766
MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
768
if test -z "$MKINSTALLDIRS"; then
769
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
771
AC_SUBST(MKINSTALLDIRS)
773
dnl Generate list of files to be processed by xgettext which will
774
dnl be included in po/Makefile.
775
test -d po || mkdir po
776
if test "x$srcdir" != "x."; then
777
if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
778
posrcprefix="$srcdir/"
780
posrcprefix="../$srcdir/"
786
sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
787
< $srcdir/po/POTFILES.in > po/POTFILES
790
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
791
# -------------------------------
792
# Define VARIABLE to the location where catalog files will
793
# be installed by po/Makefile.
794
glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
795
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
796
glib_save_prefix="$prefix"
797
glib_save_exec_prefix="$exec_prefix"
798
glib_save_datarootdir="$datarootdir"
799
test "x$prefix" = xNONE && prefix=$ac_default_prefix
800
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
801
datarootdir=`eval echo "${datarootdir}"`
802
if test "x$CATOBJEXT" = "x.mo" ; then
803
localedir=`eval echo "${libdir}/locale"`
805
localedir=`eval echo "${datadir}/locale"`
807
prefix="$glib_save_prefix"
808
exec_prefix="$glib_save_exec_prefix"
809
datarootdir="$glib_save_datarootdir"
810
AC_DEFINE_UNQUOTED($1, "$localedir",
811
[Define the location where the catalogs will be installed])
815
dnl Now the definitions that aclocal will find
817
ifdef(glib_configure_ac,[],[
818
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
819
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
822
# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
824
# Create a temporary file with TEST-FILE as its contents and pass the
825
# file name to PROGRAM. Perform ACTION-IF-PASS if PROGRAM exits with
826
# 0 and perform ACTION-IF-FAIL for any other exit status.
827
AC_DEFUN([GLIB_RUN_PROG],
828
[cat >conftest.foo <<_ACEOF
831
if AC_RUN_LOG([$1 conftest.foo]); then
832
m4_ifval([$3], [$3], [:])
833
m4_ifvaln([$4], [else $4])dnl
834
echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
835
sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
553
case "$am_cv_func_iconv_works" in
554
*no) am_func_iconv=no am_cv_lib_iconv=no ;;
555
*) am_func_iconv=yes ;;
558
am_func_iconv=no am_cv_lib_iconv=no
560
if test "$am_func_iconv" = yes; then
561
AC_DEFINE([HAVE_ICONV], [1],
562
[Define if you have the iconv() function and it works.])
564
if test "$am_cv_lib_iconv" = yes; then
565
AC_MSG_CHECKING([how to link with libiconv])
566
AC_MSG_RESULT([$LIBICONV])
568
dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
570
CPPFLAGS="$am_save_CPPFLAGS"
575
AC_SUBST([LTLIBICONV])
578
dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to
579
dnl avoid warnings like
580
dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required".
581
dnl This is tricky because of the way 'aclocal' is implemented:
582
dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN.
583
dnl Otherwise aclocal's initial scan pass would miss the macro definition.
584
dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions.
585
dnl Otherwise aclocal would emit many "Use of uninitialized value $1"
587
m4_define([gl_iconv_AC_DEFUN],
588
m4_version_prereq([2.64],
593
gl_iconv_AC_DEFUN([AM_ICONV],
596
if test "$am_cv_func_iconv" = yes; then
597
AC_MSG_CHECKING([for iconv declaration])
598
AC_CACHE_VAL([am_cv_proto_iconv], [
606
#if defined(__STDC__) || defined(__cplusplus)
607
size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
611
], [], [am_cv_proto_iconv_arg1=""], [am_cv_proto_iconv_arg1="const"])
612
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);"])
613
am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
616
AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1],
617
[Define as const if the declaration of iconv() needs const.])
621
# intlmacosx.m4 serial 3 (gettext-0.18)
622
dnl Copyright (C) 2004-2010 Free Software Foundation, Inc.
623
dnl This file is free software; the Free Software Foundation
624
dnl gives unlimited permission to copy and/or distribute it,
625
dnl with or without modifications, as long as this notice is preserved.
627
dnl This file can can be used in projects which are not available under
628
dnl the GNU General Public License or the GNU Library General Public
629
dnl License but which still want to provide support for the GNU gettext
631
dnl Please note that the actual code of the GNU gettext library is covered
632
dnl by the GNU Library General Public License, and the rest of the GNU
633
dnl gettext package package is covered by the GNU General Public License.
634
dnl They are *not* in the public domain.
636
dnl Checks for special options needed on MacOS X.
637
dnl Defines INTL_MACOSX_LIBS.
638
AC_DEFUN([gt_INTL_MACOSX],
640
dnl Check for API introduced in MacOS X 10.2.
641
AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
642
[gt_cv_func_CFPreferencesCopyAppValue],
643
[gt_save_LIBS="$LIBS"
644
LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
645
AC_TRY_LINK([#include <CoreFoundation/CFPreferences.h>],
646
[CFPreferencesCopyAppValue(NULL, NULL)],
647
[gt_cv_func_CFPreferencesCopyAppValue=yes],
648
[gt_cv_func_CFPreferencesCopyAppValue=no])
649
LIBS="$gt_save_LIBS"])
650
if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
651
AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1],
652
[Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
654
dnl Check for API introduced in MacOS X 10.3.
655
AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent],
656
[gt_save_LIBS="$LIBS"
657
LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
658
AC_TRY_LINK([#include <CoreFoundation/CFLocale.h>], [CFLocaleCopyCurrent();],
659
[gt_cv_func_CFLocaleCopyCurrent=yes],
660
[gt_cv_func_CFLocaleCopyCurrent=no])
661
LIBS="$gt_save_LIBS"])
662
if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
663
AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1],
664
[Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
667
if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
668
INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
670
AC_SUBST([INTL_MACOSX_LIBS])
840
674
dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
1030
864
# AC_DEFUN([AC_PROG_INTLTOOL], ...)
867
# lib-ld.m4 serial 4 (gettext-0.18)
868
dnl Copyright (C) 1996-2003, 2009-2010 Free Software Foundation, Inc.
869
dnl This file is free software; the Free Software Foundation
870
dnl gives unlimited permission to copy and/or distribute it,
871
dnl with or without modifications, as long as this notice is preserved.
873
dnl Subroutines of libtool.m4,
874
dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
877
dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
878
AC_DEFUN([AC_LIB_PROG_LD_GNU],
879
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld],
880
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
881
case `$LD -v 2>&1 </dev/null` in
882
*GNU* | *'with BFD'*)
883
acl_cv_prog_gnu_ld=yes ;;
885
acl_cv_prog_gnu_ld=no ;;
887
with_gnu_ld=$acl_cv_prog_gnu_ld
890
dnl From libtool-1.4. Sets the variable LD.
891
AC_DEFUN([AC_LIB_PROG_LD],
892
[AC_ARG_WITH([gnu-ld],
893
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
894
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
895
AC_REQUIRE([AC_PROG_CC])dnl
896
AC_REQUIRE([AC_CANONICAL_HOST])dnl
897
# Prepare PATH_SEPARATOR.
898
# The user is always right.
899
if test "${PATH_SEPARATOR+set}" != set; then
900
echo "#! /bin/sh" >conf$$.sh
901
echo "exit 0" >>conf$$.sh
903
if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
911
if test "$GCC" = yes; then
912
# Check if gcc -print-prog-name=ld gives a path.
913
AC_MSG_CHECKING([for ld used by GCC])
916
# gcc leaves a trailing carriage return which upsets mingw
917
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
919
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
922
# Accept absolute paths.
923
[[\\/]* | [A-Za-z]:[\\/]*)]
924
[re_direlt='/[^/][^/]*/\.\./']
925
# Canonicalize the path of ld
926
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
927
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
928
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
930
test -z "$LD" && LD="$ac_prog"
933
# If it fails, then pretend we aren't using GCC.
937
# If it is relative, then search for the first ld in PATH.
941
elif test "$with_gnu_ld" = yes; then
942
AC_MSG_CHECKING([for GNU ld])
944
AC_MSG_CHECKING([for non-GNU ld])
946
AC_CACHE_VAL([acl_cv_path_LD],
947
[if test -z "$LD"; then
948
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
949
for ac_dir in $PATH; do
950
test -z "$ac_dir" && ac_dir=.
951
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
952
acl_cv_path_LD="$ac_dir/$ac_prog"
953
# Check to see if the program is GNU ld. I'd rather use --version,
954
# but apparently some GNU ld's only accept -v.
955
# Break only if it was the GNU/non-GNU ld that we prefer.
956
case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
957
*GNU* | *'with BFD'*)
958
test "$with_gnu_ld" != no && break ;;
960
test "$with_gnu_ld" != yes && break ;;
966
acl_cv_path_LD="$LD" # Let the user override the test with a path.
969
if test -n "$LD"; then
974
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
978
# lib-link.m4 serial 21 (gettext-0.18)
979
dnl Copyright (C) 2001-2010 Free Software Foundation, Inc.
980
dnl This file is free software; the Free Software Foundation
981
dnl gives unlimited permission to copy and/or distribute it,
982
dnl with or without modifications, as long as this notice is preserved.
984
dnl From Bruno Haible.
988
dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
989
dnl the libraries corresponding to explicit and implicit dependencies.
990
dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
991
dnl augments the CPPFLAGS variable.
992
dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
993
dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
994
AC_DEFUN([AC_LIB_LINKFLAGS],
996
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
997
AC_REQUIRE([AC_LIB_RPATH])
998
pushdef([Name],[translit([$1],[./-], [___])])
999
pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
1000
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1001
AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
1002
AC_LIB_LINKFLAGS_BODY([$1], [$2])
1003
ac_cv_lib[]Name[]_libs="$LIB[]NAME"
1004
ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
1005
ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
1006
ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
1008
LIB[]NAME="$ac_cv_lib[]Name[]_libs"
1009
LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
1010
INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
1011
LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
1012
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
1014
AC_SUBST([LTLIB]NAME)
1015
AC_SUBST([LIB]NAME[_PREFIX])
1016
dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
1017
dnl results of this search when this library appears as a dependency.
1023
dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message])
1024
dnl searches for libname and the libraries corresponding to explicit and
1025
dnl implicit dependencies, together with the specified include files and
1026
dnl the ability to compile and link the specified testcode. The missing-message
1027
dnl defaults to 'no' and may contain additional hints for the user.
1028
dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME}
1029
dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and
1030
dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
1031
dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
1032
dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
1033
dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
1034
AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
1036
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1037
AC_REQUIRE([AC_LIB_RPATH])
1038
pushdef([Name],[translit([$1],[./-], [___])])
1039
pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
1040
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1042
dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
1044
AC_LIB_LINKFLAGS_BODY([$1], [$2])
1046
dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
1047
dnl because if the user has installed lib[]Name and not disabled its use
1048
dnl via --without-lib[]Name-prefix, he wants to use it.
1049
ac_save_CPPFLAGS="$CPPFLAGS"
1050
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
1052
AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
1053
ac_save_LIBS="$LIBS"
1054
dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS,
1055
dnl because these -l options might require -L options that are present in
1056
dnl LIBS. -l options benefit only from the -L options listed before it.
1057
dnl Otherwise, add it to the front of LIBS, because it may be a static
1058
dnl library that depends on another static library that is present in LIBS.
1059
dnl Static libraries benefit only from the static libraries listed after
1061
case " $LIB[]NAME" in
1062
*" -l"*) LIBS="$LIBS $LIB[]NAME" ;;
1063
*) LIBS="$LIB[]NAME $LIBS" ;;
1065
AC_TRY_LINK([$3], [$4],
1066
[ac_cv_lib[]Name=yes],
1067
[ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])'])
1068
LIBS="$ac_save_LIBS"
1070
if test "$ac_cv_lib[]Name" = yes; then
1072
AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.])
1073
AC_MSG_CHECKING([how to link with lib[]$1])
1074
AC_MSG_RESULT([$LIB[]NAME])
1077
dnl If $LIB[]NAME didn't lead to a usable library, we don't need
1078
dnl $INC[]NAME either.
1079
CPPFLAGS="$ac_save_CPPFLAGS"
1084
AC_SUBST([HAVE_LIB]NAME)
1086
AC_SUBST([LTLIB]NAME)
1087
AC_SUBST([LIB]NAME[_PREFIX])
1092
dnl Determine the platform dependent parameters needed to use rpath:
1095
dnl acl_hardcode_libdir_flag_spec,
1096
dnl acl_hardcode_libdir_separator,
1097
dnl acl_hardcode_direct,
1098
dnl acl_hardcode_minus_L.
1099
AC_DEFUN([AC_LIB_RPATH],
1101
dnl Tell automake >= 1.10 to complain if config.rpath is missing.
1102
m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
1103
AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
1104
AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
1105
AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
1106
AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
1107
AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [
1108
CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
1109
${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
1115
acl_libext="$acl_cv_libext"
1116
acl_shlibext="$acl_cv_shlibext"
1117
acl_libname_spec="$acl_cv_libname_spec"
1118
acl_library_names_spec="$acl_cv_library_names_spec"
1119
acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
1120
acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
1121
acl_hardcode_direct="$acl_cv_hardcode_direct"
1122
acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
1123
dnl Determine whether the user wants rpath handling at all.
1124
AC_ARG_ENABLE([rpath],
1125
[ --disable-rpath do not hardcode runtime library paths],
1126
:, enable_rpath=yes)
1129
dnl AC_LIB_FROMPACKAGE(name, package)
1130
dnl declares that libname comes from the given package. The configure file
1131
dnl will then not have a --with-libname-prefix option but a
1132
dnl --with-package-prefix option. Several libraries can come from the same
1133
dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar
1134
dnl macro call that searches for libname.
1135
AC_DEFUN([AC_LIB_FROMPACKAGE],
1137
pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
1138
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1139
define([acl_frompackage_]NAME, [$2])
1141
pushdef([PACK],[$2])
1142
pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-],
1143
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1144
define([acl_libsinpackage_]PACKUP,
1145
m4_ifdef([acl_libsinpackage_]PACKUP, [acl_libsinpackage_]PACKUP[[, ]],)[lib$1])
1150
dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
1151
dnl the libraries corresponding to explicit and implicit dependencies.
1152
dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
1153
dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
1154
dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
1155
AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
1157
AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
1158
pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
1159
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1160
pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])])
1161
pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-],
1162
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1163
pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])])
1164
dnl Autoconf >= 2.61 supports dots in --with options.
1165
pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit(PACK,[.],[_])],PACK)])
1166
dnl By default, look in $includedir and $libdir.
1168
AC_LIB_WITH_FINAL_PREFIX([
1169
eval additional_includedir=\"$includedir\"
1170
eval additional_libdir=\"$libdir\"
1172
AC_ARG_WITH(P_A_C_K[-prefix],
1173
[[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib
1174
--without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]],
1176
if test "X$withval" = "Xno"; then
1179
if test "X$withval" = "X"; then
1180
AC_LIB_WITH_FINAL_PREFIX([
1181
eval additional_includedir=\"$includedir\"
1182
eval additional_libdir=\"$libdir\"
1185
additional_includedir="$withval/include"
1186
additional_libdir="$withval/$acl_libdirstem"
1187
if test "$acl_libdirstem2" != "$acl_libdirstem" \
1188
&& ! test -d "$withval/$acl_libdirstem"; then
1189
additional_libdir="$withval/$acl_libdirstem2"
1194
dnl Search the library and its dependencies in $additional_libdir and
1195
dnl $LDFLAGS. Using breadth-first-seach.
1200
dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been
1201
dnl computed. So it has to be reset here.
1205
names_already_handled=
1206
names_next_round='$1 $2'
1207
while test -n "$names_next_round"; do
1208
names_this_round="$names_next_round"
1210
for name in $names_this_round; do
1212
for n in $names_already_handled; do
1213
if test "$n" = "$name"; then
1218
if test -z "$already_handled"; then
1219
names_already_handled="$names_already_handled $name"
1220
dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
1221
dnl or AC_LIB_HAVE_LINKFLAGS call.
1222
uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
1223
eval value=\"\$HAVE_LIB$uppername\"
1224
if test -n "$value"; then
1225
if test "$value" = yes; then
1226
eval value=\"\$LIB$uppername\"
1227
test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
1228
eval value=\"\$LTLIB$uppername\"
1229
test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
1231
dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
1232
dnl that this library doesn't exist. So just drop it.
1236
dnl Search the library lib$name in $additional_libdir and $LDFLAGS
1237
dnl and the already constructed $LIBNAME/$LTLIBNAME.
1242
eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
1243
if test -n "$acl_shlibext"; then
1244
shrext=".$acl_shlibext" # typically: shrext=.so
1248
if test $use_additional = yes; then
1249
dir="$additional_libdir"
1250
dnl The same code as in the loop below:
1251
dnl First look for a shared library.
1252
if test -n "$acl_shlibext"; then
1253
if test -f "$dir/$libname$shrext"; then
1255
found_so="$dir/$libname$shrext"
1257
if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
1258
ver=`(cd "$dir" && \
1259
for f in "$libname$shrext".*; do echo "$f"; done \
1260
| sed -e "s,^$libname$shrext\\\\.,," \
1261
| sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
1262
| sed 1q ) 2>/dev/null`
1263
if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
1265
found_so="$dir/$libname$shrext.$ver"
1268
eval library_names=\"$acl_library_names_spec\"
1269
for f in $library_names; do
1270
if test -f "$dir/$f"; then
1279
dnl Then look for a static library.
1280
if test "X$found_dir" = "X"; then
1281
if test -f "$dir/$libname.$acl_libext"; then
1283
found_a="$dir/$libname.$acl_libext"
1286
if test "X$found_dir" != "X"; then
1287
if test -f "$dir/$libname.la"; then
1288
found_la="$dir/$libname.la"
1292
if test "X$found_dir" = "X"; then
1293
for x in $LDFLAGS $LTLIB[]NAME; do
1294
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1297
dir=`echo "X$x" | sed -e 's/^X-L//'`
1298
dnl First look for a shared library.
1299
if test -n "$acl_shlibext"; then
1300
if test -f "$dir/$libname$shrext"; then
1302
found_so="$dir/$libname$shrext"
1304
if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
1305
ver=`(cd "$dir" && \
1306
for f in "$libname$shrext".*; do echo "$f"; done \
1307
| sed -e "s,^$libname$shrext\\\\.,," \
1308
| sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
1309
| sed 1q ) 2>/dev/null`
1310
if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
1312
found_so="$dir/$libname$shrext.$ver"
1315
eval library_names=\"$acl_library_names_spec\"
1316
for f in $library_names; do
1317
if test -f "$dir/$f"; then
1326
dnl Then look for a static library.
1327
if test "X$found_dir" = "X"; then
1328
if test -f "$dir/$libname.$acl_libext"; then
1330
found_a="$dir/$libname.$acl_libext"
1333
if test "X$found_dir" != "X"; then
1334
if test -f "$dir/$libname.la"; then
1335
found_la="$dir/$libname.la"
1340
if test "X$found_dir" != "X"; then
1345
if test "X$found_dir" != "X"; then
1346
dnl Found the library.
1347
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
1348
if test "X$found_so" != "X"; then
1349
dnl Linking with a shared library. We attempt to hardcode its
1350
dnl directory into the executable's runpath, unless it's the
1351
dnl standard /usr/lib.
1352
if test "$enable_rpath" = no \
1353
|| test "X$found_dir" = "X/usr/$acl_libdirstem" \
1354
|| test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
1355
dnl No hardcoding is needed.
1356
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1358
dnl Use an explicit option to hardcode DIR into the resulting
1360
dnl Potentially add DIR to ltrpathdirs.
1361
dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
1363
for x in $ltrpathdirs; do
1364
if test "X$x" = "X$found_dir"; then
1369
if test -z "$haveit"; then
1370
ltrpathdirs="$ltrpathdirs $found_dir"
1372
dnl The hardcoding into $LIBNAME is system dependent.
1373
if test "$acl_hardcode_direct" = yes; then
1374
dnl Using DIR/libNAME.so during linking hardcodes DIR into the
1375
dnl resulting binary.
1376
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1378
if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
1379
dnl Use an explicit option to hardcode DIR into the resulting
1381
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1382
dnl Potentially add DIR to rpathdirs.
1383
dnl The rpathdirs will be appended to $LIBNAME at the end.
1385
for x in $rpathdirs; do
1386
if test "X$x" = "X$found_dir"; then
1391
if test -z "$haveit"; then
1392
rpathdirs="$rpathdirs $found_dir"
1395
dnl Rely on "-L$found_dir".
1396
dnl But don't add it if it's already contained in the LDFLAGS
1397
dnl or the already constructed $LIBNAME
1399
for x in $LDFLAGS $LIB[]NAME; do
1400
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1401
if test "X$x" = "X-L$found_dir"; then
1406
if test -z "$haveit"; then
1407
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
1409
if test "$acl_hardcode_minus_L" != no; then
1410
dnl FIXME: Not sure whether we should use
1411
dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
1413
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1415
dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
1416
dnl here, because this doesn't fit in flags passed to the
1417
dnl compiler. So give up. No hardcoding. This affects only
1418
dnl very old systems.
1419
dnl FIXME: Not sure whether we should use
1420
dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
1422
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
1428
if test "X$found_a" != "X"; then
1429
dnl Linking with a static library.
1430
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
1432
dnl We shouldn't come here, but anyway it's good to have a
1434
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
1437
dnl Assume the include files are nearby.
1438
additional_includedir=
1439
case "$found_dir" in
1440
*/$acl_libdirstem | */$acl_libdirstem/)
1441
basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
1442
if test "$name" = '$1'; then
1443
LIB[]NAME[]_PREFIX="$basedir"
1445
additional_includedir="$basedir/include"
1447
*/$acl_libdirstem2 | */$acl_libdirstem2/)
1448
basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
1449
if test "$name" = '$1'; then
1450
LIB[]NAME[]_PREFIX="$basedir"
1452
additional_includedir="$basedir/include"
1455
if test "X$additional_includedir" != "X"; then
1456
dnl Potentially add $additional_includedir to $INCNAME.
1457
dnl But don't add it
1458
dnl 1. if it's the standard /usr/include,
1459
dnl 2. if it's /usr/local/include and we are using GCC on Linux,
1460
dnl 3. if it's already present in $CPPFLAGS or the already
1461
dnl constructed $INCNAME,
1462
dnl 4. if it doesn't exist as a directory.
1463
if test "X$additional_includedir" != "X/usr/include"; then
1465
if test "X$additional_includedir" = "X/usr/local/include"; then
1466
if test -n "$GCC"; then
1468
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
1472
if test -z "$haveit"; then
1473
for x in $CPPFLAGS $INC[]NAME; do
1474
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1475
if test "X$x" = "X-I$additional_includedir"; then
1480
if test -z "$haveit"; then
1481
if test -d "$additional_includedir"; then
1482
dnl Really add $additional_includedir to $INCNAME.
1483
INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
1489
dnl Look for dependencies.
1490
if test -n "$found_la"; then
1491
dnl Read the .la file. It defines the variables
1492
dnl dlname, library_names, old_library, dependency_libs, current,
1493
dnl age, revision, installed, dlopen, dlpreopen, libdir.
1494
save_libdir="$libdir"
1496
*/* | *\\*) . "$found_la" ;;
1497
*) . "./$found_la" ;;
1499
libdir="$save_libdir"
1500
dnl We use only dependency_libs.
1501
for dep in $dependency_libs; do
1504
additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
1505
dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
1506
dnl But don't add it
1507
dnl 1. if it's the standard /usr/lib,
1508
dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
1509
dnl 3. if it's already present in $LDFLAGS or the already
1510
dnl constructed $LIBNAME,
1511
dnl 4. if it doesn't exist as a directory.
1512
if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
1513
&& test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
1515
if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
1516
|| test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
1517
if test -n "$GCC"; then
1519
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
1523
if test -z "$haveit"; then
1525
for x in $LDFLAGS $LIB[]NAME; do
1526
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1527
if test "X$x" = "X-L$additional_libdir"; then
1532
if test -z "$haveit"; then
1533
if test -d "$additional_libdir"; then
1534
dnl Really add $additional_libdir to $LIBNAME.
1535
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
1539
for x in $LDFLAGS $LTLIB[]NAME; do
1540
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1541
if test "X$x" = "X-L$additional_libdir"; then
1546
if test -z "$haveit"; then
1547
if test -d "$additional_libdir"; then
1548
dnl Really add $additional_libdir to $LTLIBNAME.
1549
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
1556
dir=`echo "X$dep" | sed -e 's/^X-R//'`
1557
if test "$enable_rpath" != no; then
1558
dnl Potentially add DIR to rpathdirs.
1559
dnl The rpathdirs will be appended to $LIBNAME at the end.
1561
for x in $rpathdirs; do
1562
if test "X$x" = "X$dir"; then
1567
if test -z "$haveit"; then
1568
rpathdirs="$rpathdirs $dir"
1570
dnl Potentially add DIR to ltrpathdirs.
1571
dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
1573
for x in $ltrpathdirs; do
1574
if test "X$x" = "X$dir"; then
1579
if test -z "$haveit"; then
1580
ltrpathdirs="$ltrpathdirs $dir"
1585
dnl Handle this in the next round.
1586
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
1589
dnl Handle this in the next round. Throw away the .la's
1590
dnl directory; it is already contained in a preceding -L
1592
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
1595
dnl Most likely an immediate library name.
1596
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
1597
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
1603
dnl Didn't find the library; assume it is in the system directories
1604
dnl known to the linker and runtime loader. (All the system
1605
dnl directories known to the linker should also be known to the
1606
dnl runtime loader, otherwise the system is severely misconfigured.)
1607
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
1608
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
1614
if test "X$rpathdirs" != "X"; then
1615
if test -n "$acl_hardcode_libdir_separator"; then
1616
dnl Weird platform: only the last -rpath option counts, the user must
1617
dnl pass all path elements in one option. We can arrange that for a
1618
dnl single library, but not when more than one $LIBNAMEs are used.
1620
for found_dir in $rpathdirs; do
1621
alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
1623
dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
1624
acl_save_libdir="$libdir"
1626
eval flag=\"$acl_hardcode_libdir_flag_spec\"
1627
libdir="$acl_save_libdir"
1628
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1630
dnl The -rpath options are cumulative.
1631
for found_dir in $rpathdirs; do
1632
acl_save_libdir="$libdir"
1634
eval flag=\"$acl_hardcode_libdir_flag_spec\"
1635
libdir="$acl_save_libdir"
1636
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1640
if test "X$ltrpathdirs" != "X"; then
1641
dnl When using libtool, the option that works for both libraries and
1642
dnl executables is -R. The -R options are cumulative.
1643
for found_dir in $ltrpathdirs; do
1644
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
1654
dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
1655
dnl unless already present in VAR.
1656
dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
1657
dnl contains two or three consecutive elements that belong together.
1658
AC_DEFUN([AC_LIB_APPENDTOVAR],
1660
for element in [$2]; do
1663
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1664
if test "X$x" = "X$element"; then
1669
if test -z "$haveit"; then
1670
[$1]="${[$1]}${[$1]:+ }$element"
1675
dnl For those cases where a variable contains several -L and -l options
1676
dnl referring to unknown libraries and directories, this macro determines the
1677
dnl necessary additional linker options for the runtime path.
1678
dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
1679
dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
1680
dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
1681
dnl otherwise linking without libtool is assumed.
1682
AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
1684
AC_REQUIRE([AC_LIB_RPATH])
1685
AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
1687
if test "$enable_rpath" != no; then
1688
if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
1689
dnl Use an explicit option to hardcode directories into the resulting
1694
if test -n "$next"; then
1696
dnl No need to hardcode the standard /usr/lib.
1697
if test "X$dir" != "X/usr/$acl_libdirstem" \
1698
&& test "X$dir" != "X/usr/$acl_libdirstem2"; then
1699
rpathdirs="$rpathdirs $dir"
1705
-L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
1706
dnl No need to hardcode the standard /usr/lib.
1707
if test "X$dir" != "X/usr/$acl_libdirstem" \
1708
&& test "X$dir" != "X/usr/$acl_libdirstem2"; then
1709
rpathdirs="$rpathdirs $dir"
1716
if test "X$rpathdirs" != "X"; then
1717
if test -n ""$3""; then
1718
dnl libtool is used for linking. Use -R options.
1719
for dir in $rpathdirs; do
1720
$1="${$1}${$1:+ }-R$dir"
1723
dnl The linker is used for linking directly.
1724
if test -n "$acl_hardcode_libdir_separator"; then
1725
dnl Weird platform: only the last -rpath option counts, the user
1726
dnl must pass all path elements in one option.
1728
for dir in $rpathdirs; do
1729
alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
1731
acl_save_libdir="$libdir"
1733
eval flag=\"$acl_hardcode_libdir_flag_spec\"
1734
libdir="$acl_save_libdir"
1737
dnl The -rpath options are cumulative.
1738
for dir in $rpathdirs; do
1739
acl_save_libdir="$libdir"
1741
eval flag=\"$acl_hardcode_libdir_flag_spec\"
1742
libdir="$acl_save_libdir"
1743
$1="${$1}${$1:+ }$flag"
1753
# lib-prefix.m4 serial 7 (gettext-0.18)
1754
dnl Copyright (C) 2001-2005, 2008-2010 Free Software Foundation, Inc.
1755
dnl This file is free software; the Free Software Foundation
1756
dnl gives unlimited permission to copy and/or distribute it,
1757
dnl with or without modifications, as long as this notice is preserved.
1759
dnl From Bruno Haible.
1761
dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
1762
dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
1763
dnl require excessive bracketing.
1764
ifdef([AC_HELP_STRING],
1765
[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
1766
[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
1768
dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
1769
dnl to access previously installed libraries. The basic assumption is that
1770
dnl a user will want packages to use other packages he previously installed
1771
dnl with the same --prefix option.
1772
dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
1773
dnl libraries, but is otherwise very convenient.
1774
AC_DEFUN([AC_LIB_PREFIX],
1776
AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
1777
AC_REQUIRE([AC_PROG_CC])
1778
AC_REQUIRE([AC_CANONICAL_HOST])
1779
AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
1780
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1781
dnl By default, look in $includedir and $libdir.
1783
AC_LIB_WITH_FINAL_PREFIX([
1784
eval additional_includedir=\"$includedir\"
1785
eval additional_libdir=\"$libdir\"
1787
AC_LIB_ARG_WITH([lib-prefix],
1788
[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
1789
--without-lib-prefix don't search for libraries in includedir and libdir],
1791
if test "X$withval" = "Xno"; then
1794
if test "X$withval" = "X"; then
1795
AC_LIB_WITH_FINAL_PREFIX([
1796
eval additional_includedir=\"$includedir\"
1797
eval additional_libdir=\"$libdir\"
1800
additional_includedir="$withval/include"
1801
additional_libdir="$withval/$acl_libdirstem"
1805
if test $use_additional = yes; then
1806
dnl Potentially add $additional_includedir to $CPPFLAGS.
1807
dnl But don't add it
1808
dnl 1. if it's the standard /usr/include,
1809
dnl 2. if it's already present in $CPPFLAGS,
1810
dnl 3. if it's /usr/local/include and we are using GCC on Linux,
1811
dnl 4. if it doesn't exist as a directory.
1812
if test "X$additional_includedir" != "X/usr/include"; then
1814
for x in $CPPFLAGS; do
1815
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1816
if test "X$x" = "X-I$additional_includedir"; then
1821
if test -z "$haveit"; then
1822
if test "X$additional_includedir" = "X/usr/local/include"; then
1823
if test -n "$GCC"; then
1825
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
1829
if test -z "$haveit"; then
1830
if test -d "$additional_includedir"; then
1831
dnl Really add $additional_includedir to $CPPFLAGS.
1832
CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
1837
dnl Potentially add $additional_libdir to $LDFLAGS.
1838
dnl But don't add it
1839
dnl 1. if it's the standard /usr/lib,
1840
dnl 2. if it's already present in $LDFLAGS,
1841
dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
1842
dnl 4. if it doesn't exist as a directory.
1843
if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
1845
for x in $LDFLAGS; do
1846
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1847
if test "X$x" = "X-L$additional_libdir"; then
1852
if test -z "$haveit"; then
1853
if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
1854
if test -n "$GCC"; then
1856
linux*) haveit=yes;;
1860
if test -z "$haveit"; then
1861
if test -d "$additional_libdir"; then
1862
dnl Really add $additional_libdir to $LDFLAGS.
1863
LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
1871
dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
1872
dnl acl_final_exec_prefix, containing the values to which $prefix and
1873
dnl $exec_prefix will expand at the end of the configure script.
1874
AC_DEFUN([AC_LIB_PREPARE_PREFIX],
1876
dnl Unfortunately, prefix and exec_prefix get only finally determined
1877
dnl at the end of configure.
1878
if test "X$prefix" = "XNONE"; then
1879
acl_final_prefix="$ac_default_prefix"
1881
acl_final_prefix="$prefix"
1883
if test "X$exec_prefix" = "XNONE"; then
1884
acl_final_exec_prefix='${prefix}'
1886
acl_final_exec_prefix="$exec_prefix"
1888
acl_save_prefix="$prefix"
1889
prefix="$acl_final_prefix"
1890
eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
1891
prefix="$acl_save_prefix"
1894
dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
1895
dnl variables prefix and exec_prefix bound to the values they will have
1896
dnl at the end of the configure script.
1897
AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
1899
acl_save_prefix="$prefix"
1900
prefix="$acl_final_prefix"
1901
acl_save_exec_prefix="$exec_prefix"
1902
exec_prefix="$acl_final_exec_prefix"
1904
exec_prefix="$acl_save_exec_prefix"
1905
prefix="$acl_save_prefix"
1908
dnl AC_LIB_PREPARE_MULTILIB creates
1909
dnl - a variable acl_libdirstem, containing the basename of the libdir, either
1910
dnl "lib" or "lib64" or "lib/64",
1911
dnl - a variable acl_libdirstem2, as a secondary possible value for
1912
dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or
1914
AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
1916
dnl There is no formal standard regarding lib and lib64.
1917
dnl On glibc systems, the current practice is that on a system supporting
1918
dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
1919
dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine
1920
dnl the compiler's default mode by looking at the compiler's library search
1921
dnl path. If at least one of its elements ends in /lib64 or points to a
1922
dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI.
1923
dnl Otherwise we use the default, namely "lib".
1924
dnl On Solaris systems, the current practice is that on a system supporting
1925
dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
1926
dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or
1927
dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib.
1928
AC_REQUIRE([AC_CANONICAL_HOST])
1933
dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment
1934
dnl <http://docs.sun.com/app/docs/doc/816-5138/dev-env?l=en&a=view>.
1935
dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link."
1936
dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the
1937
dnl symlink is missing, so we set acl_libdirstem2 too.
1938
AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit],
1939
[AC_EGREP_CPP([sixtyfour bits], [
1943
], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no])
1945
if test $gl_cv_solaris_64bit = yes; then
1946
acl_libdirstem=lib/64
1948
sparc*) acl_libdirstem2=lib/sparcv9 ;;
1949
i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
1954
searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
1955
if test -n "$searchpath"; then
1956
acl_save_IFS="${IFS= }"; IFS=":"
1957
for searchdir in $searchpath; do
1958
if test -d "$searchdir"; then
1959
case "$searchdir" in
1960
*/lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
1962
# Better ignore directories of this form. They are misleading.
1964
*) searchdir=`cd "$searchdir" && pwd`
1965
case "$searchdir" in
1966
*/lib64 ) acl_libdirstem=lib64 ;;
1975
test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
1033
1978
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1035
1980
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
9653
10598
])# PKG_CHECK_MODULES
10600
# po.m4 serial 17 (gettext-0.18)
10601
dnl Copyright (C) 1995-2010 Free Software Foundation, Inc.
10602
dnl This file is free software; the Free Software Foundation
10603
dnl gives unlimited permission to copy and/or distribute it,
10604
dnl with or without modifications, as long as this notice is preserved.
10606
dnl This file can can be used in projects which are not available under
10607
dnl the GNU General Public License or the GNU Library General Public
10608
dnl License but which still want to provide support for the GNU gettext
10610
dnl Please note that the actual code of the GNU gettext library is covered
10611
dnl by the GNU Library General Public License, and the rest of the GNU
10612
dnl gettext package package is covered by the GNU General Public License.
10613
dnl They are *not* in the public domain.
10616
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
10617
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
10621
dnl Checks for all prerequisites of the po subdirectory.
10622
AC_DEFUN([AM_PO_SUBDIRS],
10624
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
10625
AC_REQUIRE([AC_PROG_INSTALL])dnl
10626
AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
10627
AC_REQUIRE([AM_NLS])dnl
10629
dnl Release version of the gettext macros. This is used to ensure that
10630
dnl the gettext macros and po/Makefile.in.in are in sync.
10631
AC_SUBST([GETTEXT_MACRO_VERSION], [0.18])
10633
dnl Perform the following tests also if --disable-nls has been given,
10634
dnl because they are needed for "make dist" to work.
10636
dnl Search for GNU msgfmt in the PATH.
10637
dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
10638
dnl The second test excludes FreeBSD msgfmt.
10639
AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
10640
[$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
10641
(if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
10643
AC_PATH_PROG([GMSGFMT], [gmsgfmt], [$MSGFMT])
10645
dnl Test whether it is GNU msgfmt >= 0.15.
10647
case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
10648
'' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
10649
*) MSGFMT_015=$MSGFMT ;;
10651
changequote([,])dnl
10652
AC_SUBST([MSGFMT_015])
10654
case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
10655
'' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
10656
*) GMSGFMT_015=$GMSGFMT ;;
10658
changequote([,])dnl
10659
AC_SUBST([GMSGFMT_015])
10661
dnl Search for GNU xgettext 0.12 or newer in the PATH.
10662
dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
10663
dnl The second test excludes FreeBSD xgettext.
10664
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
10665
[$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
10666
(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)],
10668
dnl Remove leftover from FreeBSD xgettext call.
10671
dnl Test whether it is GNU xgettext >= 0.15.
10673
case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
10674
'' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
10675
*) XGETTEXT_015=$XGETTEXT ;;
10677
changequote([,])dnl
10678
AC_SUBST([XGETTEXT_015])
10680
dnl Search for GNU msgmerge 0.11 or newer in the PATH.
10681
AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
10682
[$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
10684
dnl Installation directories.
10685
dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we
10686
dnl have to define it here, so that it can be used in po/Makefile.
10687
test -n "$localedir" || localedir='${datadir}/locale'
10688
AC_SUBST([localedir])
10690
dnl Support for AM_XGETTEXT_OPTION.
10691
test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
10692
AC_SUBST([XGETTEXT_EXTRA_OPTIONS])
10694
AC_CONFIG_COMMANDS([po-directories], [[
10695
for ac_file in $CONFIG_FILES; do
10696
# Support "outfile[:infile[:infile...]]"
10698
*:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
10700
# PO directories have a Makefile.in generated from Makefile.in.in.
10701
case "$ac_file" in */Makefile.in)
10702
# Adjust a relative srcdir.
10703
ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
10704
ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
10705
ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
10706
# In autoconf-2.13 it is called $ac_given_srcdir.
10707
# In autoconf-2.50 it is called $srcdir.
10708
test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
10709
case "$ac_given_srcdir" in
10710
.) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
10711
/*) top_srcdir="$ac_given_srcdir" ;;
10712
*) top_srcdir="$ac_dots$ac_given_srcdir" ;;
10714
# Treat a directory as a PO directory if and only if it has a
10715
# POTFILES.in file. This allows packages to have multiple PO
10716
# directories under different names or in different locations.
10717
if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
10718
rm -f "$ac_dir/POTFILES"
10719
test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
10720
cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
10721
POMAKEFILEDEPS="POTFILES.in"
10722
# ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
10723
# on $ac_dir but don't depend on user-specified configuration
10725
if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
10726
# The LINGUAS file contains the set of available languages.
10727
if test -n "$OBSOLETE_ALL_LINGUAS"; then
10728
test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
10730
ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
10731
# Hide the ALL_LINGUAS assigment from automake < 1.5.
10732
eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
10733
POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
10735
# The set of available languages was given in configure.in.
10736
# Hide the ALL_LINGUAS assigment from automake < 1.5.
10737
eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
10740
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
10741
# Compute UPDATEPOFILES
10742
# as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
10743
# Compute DUMMYPOFILES
10744
# as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
10746
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
10747
case "$ac_given_srcdir" in
10749
*) srcdirpre='$(srcdir)/' ;;
10755
for lang in $ALL_LINGUAS; do
10756
POFILES="$POFILES $srcdirpre$lang.po"
10757
UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
10758
DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
10759
GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
10761
# CATALOGS depends on both $ac_dir and the user's LINGUAS
10762
# environment variable.
10764
if test -n "$ALL_LINGUAS"; then
10765
for presentlang in $ALL_LINGUAS; do
10767
if test "%UNSET%" != "$LINGUAS"; then
10768
desiredlanguages="$LINGUAS"
10770
desiredlanguages="$ALL_LINGUAS"
10772
for desiredlang in $desiredlanguages; do
10773
# Use the presentlang catalog if desiredlang is
10774
# a. equal to presentlang, or
10775
# b. a variant of presentlang (because in this case,
10776
# presentlang can be used as a fallback for messages
10777
# which are not translated in the desiredlang catalog).
10778
case "$desiredlang" in
10779
"$presentlang"*) useit=yes;;
10782
if test $useit = yes; then
10783
INST_LINGUAS="$INST_LINGUAS $presentlang"
10788
if test -n "$INST_LINGUAS"; then
10789
for lang in $INST_LINGUAS; do
10790
CATALOGS="$CATALOGS $lang.gmo"
10793
test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
10794
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"
10795
for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
10796
if test -f "$f"; then
10798
*.orig | *.bak | *~) ;;
10799
*) cat "$f" >> "$ac_dir/Makefile" ;;
10807
[# Capture the value of obsolete ALL_LINGUAS because we need it to compute
10808
# POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
10809
# from automake < 1.5.
10810
eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
10811
# Capture the value of LINGUAS because we need it to compute CATALOGS.
10812
LINGUAS="${LINGUAS-%UNSET%}"
10816
dnl Postprocesses a Makefile in a directory containing PO files.
10817
AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
10819
# When this code is run, in config.status, two variables have already been
10821
# - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
10822
# - LINGUAS is the value of the environment variable LINGUAS at configure
10826
# Adjust a relative srcdir.
10827
ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
10828
ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
10829
ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
10830
# In autoconf-2.13 it is called $ac_given_srcdir.
10831
# In autoconf-2.50 it is called $srcdir.
10832
test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
10833
case "$ac_given_srcdir" in
10834
.) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
10835
/*) top_srcdir="$ac_given_srcdir" ;;
10836
*) top_srcdir="$ac_dots$ac_given_srcdir" ;;
10839
# Find a way to echo strings without interpreting backslash.
10840
if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
10843
if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
10844
gt_echo='printf %s\n'
10851
gt_echo='echo_func'
10855
# A sed script that extracts the value of VARIABLE from a Makefile.
10857
# Test if the hold space is empty.
10862
# Yes it was empty. Look if we have the expected variable definition.
10863
/^[ ]*VARIABLE[ ]*=/{
10864
# Seen the first line of the variable definition.
10865
s/^[ ]*VARIABLE[ ]*=//
10870
# Here we are processing a line from the variable definition.
10871
# Remove comment, more precisely replace it with a space.
10873
# See if the line ends in a backslash.
10877
# Print the line, without the trailing backslash.
10880
# There was no trailing backslash. The end of the variable definition is
10881
# reached. Clear the hold space.
10886
# A trailing backslash means that the variable definition continues in the
10887
# next line. Put a nonempty string into the hold space to indicate this.
10892
changequote([,])dnl
10894
# Set POTFILES to the value of the Makefile variable POTFILES.
10895
sed_x_POTFILES=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`
10896
POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
10897
# Compute POTFILES_DEPS as
10898
# $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
10900
for file in $POTFILES; do
10901
POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
10905
if test -n "$OBSOLETE_ALL_LINGUAS"; then
10906
test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
10908
if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
10909
# The LINGUAS file contains the set of available languages.
10910
ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
10911
POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
10913
# Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
10914
sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`
10915
ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
10917
# Hide the ALL_LINGUAS assigment from automake < 1.5.
10918
eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
10920
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
10921
# Compute UPDATEPOFILES
10922
# as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
10923
# Compute DUMMYPOFILES
10924
# as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
10926
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
10927
# Compute PROPERTIESFILES
10928
# as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties)
10929
# Compute CLASSFILES
10930
# as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class)
10932
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
10934
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
10935
# Compute RESOURCESDLLFILES
10936
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
10937
case "$ac_given_srcdir" in
10939
*) srcdirpre='$(srcdir)/' ;;
10950
for lang in $ALL_LINGUAS; do
10951
POFILES="$POFILES $srcdirpre$lang.po"
10952
UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
10953
DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
10954
GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
10955
PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties"
10956
CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
10957
QMFILES="$QMFILES $srcdirpre$lang.qm"
10958
frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
10959
MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
10960
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/'`
10961
RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
10963
# CATALOGS depends on both $ac_dir and the user's LINGUAS
10964
# environment variable.
10966
if test -n "$ALL_LINGUAS"; then
10967
for presentlang in $ALL_LINGUAS; do
10969
if test "%UNSET%" != "$LINGUAS"; then
10970
desiredlanguages="$LINGUAS"
10972
desiredlanguages="$ALL_LINGUAS"
10974
for desiredlang in $desiredlanguages; do
10975
# Use the presentlang catalog if desiredlang is
10976
# a. equal to presentlang, or
10977
# b. a variant of presentlang (because in this case,
10978
# presentlang can be used as a fallback for messages
10979
# which are not translated in the desiredlang catalog).
10980
case "$desiredlang" in
10981
"$presentlang"*) useit=yes;;
10984
if test $useit = yes; then
10985
INST_LINGUAS="$INST_LINGUAS $presentlang"
10994
if test -n "$INST_LINGUAS"; then
10995
for lang in $INST_LINGUAS; do
10996
CATALOGS="$CATALOGS $lang.gmo"
10997
JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
10998
QTCATALOGS="$QTCATALOGS $lang.qm"
10999
frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
11000
TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
11001
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/'`
11002
CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
11006
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"
11007
if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
11008
# Add dependencies that cannot be formulated as a simple suffix rule.
11009
for lang in $ALL_LINGUAS; do
11010
frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
11011
cat >> "$ac_file.tmp" <<EOF
11012
$frobbedlang.msg: $lang.po
11013
@echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
11014
\$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
11018
if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
11019
# Add dependencies that cannot be formulated as a simple suffix rule.
11020
for lang in $ALL_LINGUAS; do
11021
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/'`
11022
cat >> "$ac_file.tmp" <<EOF
11023
$frobbedlang/\$(DOMAIN).resources.dll: $lang.po
11024
@echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
11025
\$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
11029
if test -n "$POMAKEFILEDEPS"; then
11030
cat >> "$ac_file.tmp" <<EOF
11031
Makefile: $POMAKEFILEDEPS
11034
mv "$ac_file.tmp" "$ac_file"
11037
dnl Initializes the accumulator used by AM_XGETTEXT_OPTION.
11038
AC_DEFUN([AM_XGETTEXT_OPTION_INIT],
11040
XGETTEXT_EXTRA_OPTIONS=
11043
dnl Registers an option to be passed to xgettext in the po subdirectory.
11044
AC_DEFUN([AM_XGETTEXT_OPTION],
11046
AC_REQUIRE([AM_XGETTEXT_OPTION_INIT])
11047
XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS $1"
11050
# progtest.m4 serial 6 (gettext-0.18)
11051
dnl Copyright (C) 1996-2003, 2005, 2008-2010 Free Software Foundation, Inc.
11052
dnl This file is free software; the Free Software Foundation
11053
dnl gives unlimited permission to copy and/or distribute it,
11054
dnl with or without modifications, as long as this notice is preserved.
11056
dnl This file can can be used in projects which are not available under
11057
dnl the GNU General Public License or the GNU Library General Public
11058
dnl License but which still want to provide support for the GNU gettext
11060
dnl Please note that the actual code of the GNU gettext library is covered
11061
dnl by the GNU Library General Public License, and the rest of the GNU
11062
dnl gettext package package is covered by the GNU General Public License.
11063
dnl They are *not* in the public domain.
11066
dnl Ulrich Drepper <drepper@cygnus.com>, 1996.
11070
# Search path for a program which passes the given test.
11072
dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
11073
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
11074
AC_DEFUN([AM_PATH_PROG_WITH_TEST],
11076
# Prepare PATH_SEPARATOR.
11077
# The user is always right.
11078
if test "${PATH_SEPARATOR+set}" != set; then
11079
echo "#! /bin/sh" >conf$$.sh
11080
echo "exit 0" >>conf$$.sh
11082
if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
11090
# Find out how to test for executable files. Don't use a zero-byte file,
11091
# as systems may use methods other than mode bits to determine executability.
11092
cat >conf$$.file <<_ASEOF
11096
chmod +x conf$$.file
11097
if test -x conf$$.file >/dev/null 2>&1; then
11098
ac_executable_p="test -x"
11100
ac_executable_p="test -f"
11104
# Extract the first word of "$2", so it can be a program name with args.
11105
set dummy $2; ac_word=[$]2
11106
AC_MSG_CHECKING([for $ac_word])
11107
AC_CACHE_VAL([ac_cv_path_$1],
11109
[[\\/]]* | ?:[[\\/]]*)
11110
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
11113
ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
11114
for ac_dir in ifelse([$5], , $PATH, [$5]); do
11116
test -z "$ac_dir" && ac_dir=.
11117
for ac_exec_ext in '' $ac_executable_extensions; do
11118
if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
11119
echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD
11121
ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
11128
dnl If no 4th arg is given, leave the cache variable unset,
11129
dnl so AC_PATH_PROGS will keep looking.
11130
ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
11134
$1="$ac_cv_path_$1"
11135
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
11136
AC_MSG_RESULT([$][$1])
11138
AC_MSG_RESULT([no])
9655
11143
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
9657
11145
# This file is free software; the Free Software Foundation