nkeynes@658: # generated automatically by aclocal 1.9.6 -*- Autoconf -*- nkeynes@1: nkeynes@658: # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, nkeynes@658: # 2005 Free Software Foundation, Inc. nkeynes@1: # This file is free software; the Free Software Foundation nkeynes@1: # gives unlimited permission to copy and/or distribute it, nkeynes@1: # with or without modifications, as long as this notice is preserved. nkeynes@1: nkeynes@1: # This program is distributed in the hope that it will be useful, nkeynes@1: # but WITHOUT ANY WARRANTY, to the extent permitted by law; without nkeynes@1: # even the implied warranty of MERCHANTABILITY or FITNESS FOR A nkeynes@1: # PARTICULAR PURPOSE. nkeynes@1: nkeynes@1: # Copyright (C) 1995-2002 Free Software Foundation, Inc. nkeynes@10: # Copyright (C) 2001-2003,2004 Red Hat, Inc. nkeynes@1: # nkeynes@1: # This file is free software, distributed under the terms of the GNU nkeynes@1: # General Public License. As a special exception to the GNU General nkeynes@1: # Public License, this file may be distributed as part of a program nkeynes@1: # that contains a configuration script generated by Autoconf, under nkeynes@1: # the same distribution terms as the rest of that program. nkeynes@1: # nkeynes@1: # This file can be copied and used freely without restrictions. It can nkeynes@1: # be used in projects which are not available under the GNU Public License nkeynes@1: # but which still want to provide support for the GNU gettext functionality. nkeynes@1: # nkeynes@1: # Macro to add for using GNU gettext. nkeynes@1: # Ulrich Drepper , 1995, 1996 nkeynes@1: # nkeynes@1: # Modified to never use included libintl. nkeynes@1: # Owen Taylor , 12/15/1998 nkeynes@1: # nkeynes@1: # Major rework to remove unused code nkeynes@1: # Owen Taylor , 12/11/2002 nkeynes@1: # nkeynes@1: # Added better handling of ALL_LINGUAS from GNU gettext version nkeynes@1: # written by Bruno Haible, Owen Taylor 5/30/3002 nkeynes@10: # nkeynes@10: # Modified to require ngettext nkeynes@10: # Matthias Clasen 08/06/2004 nkeynes@1: # nkeynes@1: # We need this here as well, since someone might use autoconf-2.5x nkeynes@1: # to configure GLib then an older version to configure a package nkeynes@1: # using AM_GLIB_GNU_GETTEXT nkeynes@1: AC_PREREQ(2.53) nkeynes@1: nkeynes@1: dnl nkeynes@1: dnl We go to great lengths to make sure that aclocal won't nkeynes@1: dnl try to pull in the installed version of these macros nkeynes@1: dnl when running aclocal in the glib directory. nkeynes@1: dnl nkeynes@1: m4_copy([AC_DEFUN],[glib_DEFUN]) nkeynes@1: m4_copy([AC_REQUIRE],[glib_REQUIRE]) nkeynes@1: dnl nkeynes@1: dnl At the end, if we're not within glib, we'll define the public nkeynes@1: dnl definitions in terms of our private definitions. nkeynes@1: dnl nkeynes@1: nkeynes@1: # GLIB_LC_MESSAGES nkeynes@1: #-------------------- nkeynes@1: glib_DEFUN([GLIB_LC_MESSAGES], nkeynes@1: [AC_CHECK_HEADERS([locale.h]) nkeynes@1: if test $ac_cv_header_locale_h = yes; then nkeynes@1: AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, nkeynes@1: [AC_TRY_LINK([#include ], [return LC_MESSAGES], nkeynes@1: am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) nkeynes@1: if test $am_cv_val_LC_MESSAGES = yes; then nkeynes@1: AC_DEFINE(HAVE_LC_MESSAGES, 1, nkeynes@1: [Define if your file defines LC_MESSAGES.]) nkeynes@1: fi nkeynes@1: fi]) nkeynes@1: nkeynes@1: # GLIB_PATH_PROG_WITH_TEST nkeynes@1: #---------------------------- nkeynes@1: dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, nkeynes@1: dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) nkeynes@1: glib_DEFUN([GLIB_PATH_PROG_WITH_TEST], nkeynes@1: [# Extract the first word of "$2", so it can be a program name with args. nkeynes@1: set dummy $2; ac_word=[$]2 nkeynes@1: AC_MSG_CHECKING([for $ac_word]) nkeynes@1: AC_CACHE_VAL(ac_cv_path_$1, nkeynes@1: [case "[$]$1" in nkeynes@1: /*) nkeynes@1: ac_cv_path_$1="[$]$1" # Let the user override the test with a path. nkeynes@1: ;; nkeynes@1: *) nkeynes@1: IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" nkeynes@1: for ac_dir in ifelse([$5], , $PATH, [$5]); do nkeynes@1: test -z "$ac_dir" && ac_dir=. nkeynes@1: if test -f $ac_dir/$ac_word; then nkeynes@1: if [$3]; then nkeynes@1: ac_cv_path_$1="$ac_dir/$ac_word" nkeynes@1: break nkeynes@1: fi nkeynes@1: fi nkeynes@1: done nkeynes@1: IFS="$ac_save_ifs" nkeynes@1: dnl If no 4th arg is given, leave the cache variable unset, nkeynes@1: dnl so AC_PATH_PROGS will keep looking. nkeynes@1: ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" nkeynes@1: ])dnl nkeynes@1: ;; nkeynes@1: esac])dnl nkeynes@1: $1="$ac_cv_path_$1" nkeynes@1: if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then nkeynes@1: AC_MSG_RESULT([$]$1) nkeynes@1: else nkeynes@1: AC_MSG_RESULT(no) nkeynes@1: fi nkeynes@1: AC_SUBST($1)dnl nkeynes@1: ]) nkeynes@1: nkeynes@1: # GLIB_WITH_NLS nkeynes@1: #----------------- nkeynes@1: glib_DEFUN([GLIB_WITH_NLS], nkeynes@1: dnl NLS is obligatory nkeynes@923: [USE_NLS=yes nkeynes@1: AC_SUBST(USE_NLS) nkeynes@1: nkeynes@1: gt_cv_have_gettext=no nkeynes@1: nkeynes@1: CATOBJEXT=NONE nkeynes@1: XGETTEXT=: nkeynes@1: INTLLIBS= nkeynes@1: nkeynes@1: AC_CHECK_HEADER(libintl.h, nkeynes@1: [gt_cv_func_dgettext_libintl="no" nkeynes@1: libintl_extra_libs="" nkeynes@1: nkeynes@1: # nkeynes@1: # First check in libc nkeynes@1: # nkeynes@10: AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc, nkeynes@1: [AC_TRY_LINK([ nkeynes@1: #include nkeynes@1: ], nkeynes@10: [return !ngettext ("","", 1)], nkeynes@10: gt_cv_func_ngettext_libc=yes, nkeynes@10: gt_cv_func_ngettext_libc=no) nkeynes@1: ]) nkeynes@1: nkeynes@10: if test "$gt_cv_func_ngettext_libc" = "yes" ; then nkeynes@10: AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc, nkeynes@10: [AC_TRY_LINK([ nkeynes@10: #include nkeynes@10: ], nkeynes@10: [return !dgettext ("","")], nkeynes@10: gt_cv_func_dgettext_libc=yes, nkeynes@10: gt_cv_func_dgettext_libc=no) nkeynes@10: ]) nkeynes@10: fi nkeynes@10: nkeynes@10: if test "$gt_cv_func_ngettext_libc" = "yes" ; then nkeynes@1: AC_CHECK_FUNCS(bind_textdomain_codeset) nkeynes@1: fi nkeynes@1: nkeynes@1: # nkeynes@1: # If we don't have everything we want, check in libintl nkeynes@1: # nkeynes@1: if test "$gt_cv_func_dgettext_libc" != "yes" \ nkeynes@10: || test "$gt_cv_func_ngettext_libc" != "yes" \ nkeynes@1: || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then nkeynes@1: nkeynes@1: AC_CHECK_LIB(intl, bindtextdomain, nkeynes@10: [AC_CHECK_LIB(intl, ngettext, nkeynes@10: [AC_CHECK_LIB(intl, dgettext, nkeynes@10: gt_cv_func_dgettext_libintl=yes)])]) nkeynes@1: nkeynes@1: if test "$gt_cv_func_dgettext_libintl" != "yes" ; then nkeynes@1: AC_MSG_CHECKING([if -liconv is needed to use gettext]) nkeynes@1: AC_MSG_RESULT([]) nkeynes@10: AC_CHECK_LIB(intl, ngettext, nkeynes@10: [AC_CHECK_LIB(intl, dcgettext, nkeynes@1: [gt_cv_func_dgettext_libintl=yes nkeynes@1: libintl_extra_libs=-liconv], nkeynes@10: :,-liconv)], nkeynes@10: :,-liconv) nkeynes@1: fi nkeynes@1: nkeynes@1: # nkeynes@1: # If we found libintl, then check in it for bind_textdomain_codeset(); nkeynes@1: # we'll prefer libc if neither have bind_textdomain_codeset(), nkeynes@10: # and both have dgettext and ngettext nkeynes@1: # nkeynes@1: if test "$gt_cv_func_dgettext_libintl" = "yes" ; then nkeynes@1: glib_save_LIBS="$LIBS" nkeynes@1: LIBS="$LIBS -lintl $libintl_extra_libs" nkeynes@1: unset ac_cv_func_bind_textdomain_codeset nkeynes@1: AC_CHECK_FUNCS(bind_textdomain_codeset) nkeynes@1: LIBS="$glib_save_LIBS" nkeynes@1: nkeynes@1: if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then nkeynes@1: gt_cv_func_dgettext_libc=no nkeynes@1: else nkeynes@10: if test "$gt_cv_func_dgettext_libc" = "yes" \ nkeynes@10: && test "$gt_cv_func_ngettext_libc" = "yes"; then nkeynes@1: gt_cv_func_dgettext_libintl=no nkeynes@1: fi nkeynes@1: fi nkeynes@1: fi nkeynes@1: fi nkeynes@1: nkeynes@1: if test "$gt_cv_func_dgettext_libc" = "yes" \ nkeynes@1: || test "$gt_cv_func_dgettext_libintl" = "yes"; then nkeynes@1: gt_cv_have_gettext=yes nkeynes@1: fi nkeynes@1: nkeynes@1: if test "$gt_cv_func_dgettext_libintl" = "yes"; then nkeynes@1: INTLLIBS="-lintl $libintl_extra_libs" nkeynes@1: fi nkeynes@1: nkeynes@1: if test "$gt_cv_have_gettext" = "yes"; then nkeynes@1: AC_DEFINE(HAVE_GETTEXT,1, nkeynes@1: [Define if the GNU gettext() function is already present or preinstalled.]) nkeynes@1: GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, nkeynes@1: [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl nkeynes@1: if test "$MSGFMT" != "no"; then nkeynes@1: glib_save_LIBS="$LIBS" nkeynes@1: LIBS="$LIBS $INTLLIBS" nkeynes@1: AC_CHECK_FUNCS(dcgettext) nkeynes@571: MSGFMT_OPTS= nkeynes@571: AC_MSG_CHECKING([if msgfmt accepts -c]) nkeynes@923: GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[ nkeynes@571: msgid "" nkeynes@571: msgstr "" nkeynes@571: "Content-Type: text/plain; charset=UTF-8\n" nkeynes@571: "Project-Id-Version: test 1.0\n" nkeynes@571: "PO-Revision-Date: 2007-02-15 12:01+0100\n" nkeynes@571: "Last-Translator: test \n" nkeynes@571: "Language-Team: C \n" nkeynes@571: "MIME-Version: 1.0\n" nkeynes@571: "Content-Transfer-Encoding: 8bit\n" nkeynes@571: ], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])]) nkeynes@571: AC_SUBST(MSGFMT_OPTS) nkeynes@1: AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) nkeynes@1: GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, nkeynes@1: [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) nkeynes@1: AC_TRY_LINK(, [extern int _nl_msg_cat_cntr; nkeynes@1: return _nl_msg_cat_cntr], nkeynes@1: [CATOBJEXT=.gmo nkeynes@1: DATADIRNAME=share], nkeynes@1: [case $host in nkeynes@1: *-*-solaris*) nkeynes@1: dnl On Solaris, if bind_textdomain_codeset is in libc, nkeynes@1: dnl GNU format message catalog is always supported, nkeynes@1: dnl since both are added to the libc all together. nkeynes@1: dnl Hence, we'd like to go with DATADIRNAME=share and nkeynes@1: dnl and CATOBJEXT=.gmo in this case. nkeynes@1: AC_CHECK_FUNC(bind_textdomain_codeset, nkeynes@1: [CATOBJEXT=.gmo nkeynes@1: DATADIRNAME=share], nkeynes@1: [CATOBJEXT=.mo nkeynes@1: DATADIRNAME=lib]) nkeynes@1: ;; nkeynes@1: *) nkeynes@1: CATOBJEXT=.mo nkeynes@1: DATADIRNAME=lib nkeynes@1: ;; nkeynes@1: esac]) nkeynes@1: LIBS="$glib_save_LIBS" nkeynes@1: INSTOBJEXT=.mo nkeynes@1: else nkeynes@1: gt_cv_have_gettext=no nkeynes@1: fi nkeynes@1: fi nkeynes@1: ]) nkeynes@1: nkeynes@1: if test "$gt_cv_have_gettext" = "yes" ; then nkeynes@1: AC_DEFINE(ENABLE_NLS, 1, nkeynes@1: [always defined to indicate that i18n is enabled]) nkeynes@1: fi nkeynes@1: nkeynes@1: dnl Test whether we really found GNU xgettext. nkeynes@1: if test "$XGETTEXT" != ":"; then nkeynes@1: dnl If it is not GNU xgettext we define it as : so that the nkeynes@1: dnl Makefiles still can work. nkeynes@1: if $XGETTEXT --omit-header /dev/null 2> /dev/null; then nkeynes@1: : ; nkeynes@1: else nkeynes@1: AC_MSG_RESULT( nkeynes@1: [found xgettext program is not GNU xgettext; ignore it]) nkeynes@1: XGETTEXT=":" nkeynes@1: fi nkeynes@1: fi nkeynes@1: nkeynes@1: # We need to process the po/ directory. nkeynes@1: POSUB=po nkeynes@1: nkeynes@1: AC_OUTPUT_COMMANDS( nkeynes@1: [case "$CONFIG_FILES" in *po/Makefile.in*) nkeynes@1: sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile nkeynes@1: esac]) nkeynes@1: nkeynes@1: dnl These rules are solely for the distribution goal. While doing this nkeynes@1: dnl we only have to keep exactly one list of the available catalogs nkeynes@1: dnl in configure.in. nkeynes@1: for lang in $ALL_LINGUAS; do nkeynes@1: GMOFILES="$GMOFILES $lang.gmo" nkeynes@1: POFILES="$POFILES $lang.po" nkeynes@1: done nkeynes@1: nkeynes@1: dnl Make all variables we use known to autoconf. nkeynes@1: AC_SUBST(CATALOGS) nkeynes@1: AC_SUBST(CATOBJEXT) nkeynes@1: AC_SUBST(DATADIRNAME) nkeynes@1: AC_SUBST(GMOFILES) nkeynes@1: AC_SUBST(INSTOBJEXT) nkeynes@1: AC_SUBST(INTLLIBS) nkeynes@1: AC_SUBST(PO_IN_DATADIR_TRUE) nkeynes@1: AC_SUBST(PO_IN_DATADIR_FALSE) nkeynes@1: AC_SUBST(POFILES) nkeynes@1: AC_SUBST(POSUB) nkeynes@1: ]) nkeynes@1: nkeynes@1: # AM_GLIB_GNU_GETTEXT nkeynes@1: # ------------------- nkeynes@1: # Do checks necessary for use of gettext. If a suitable implementation nkeynes@1: # of gettext is found in either in libintl or in the C library, nkeynes@1: # it will set INTLLIBS to the libraries needed for use of gettext nkeynes@1: # and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable nkeynes@1: # gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST() nkeynes@1: # on various variables needed by the Makefile.in.in installed by nkeynes@1: # glib-gettextize. nkeynes@1: dnl nkeynes@10: glib_DEFUN([GLIB_GNU_GETTEXT], nkeynes@1: [AC_REQUIRE([AC_PROG_CC])dnl nkeynes@1: AC_REQUIRE([AC_HEADER_STDC])dnl nkeynes@1: nkeynes@1: GLIB_LC_MESSAGES nkeynes@1: GLIB_WITH_NLS nkeynes@1: nkeynes@1: if test "$gt_cv_have_gettext" = "yes"; then nkeynes@1: if test "x$ALL_LINGUAS" = "x"; then nkeynes@1: LINGUAS= nkeynes@1: else nkeynes@1: AC_MSG_CHECKING(for catalogs to be installed) nkeynes@1: NEW_LINGUAS= nkeynes@1: for presentlang in $ALL_LINGUAS; do nkeynes@1: useit=no nkeynes@1: if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then nkeynes@1: desiredlanguages="$LINGUAS" nkeynes@1: else nkeynes@1: desiredlanguages="$ALL_LINGUAS" nkeynes@1: fi nkeynes@1: for desiredlang in $desiredlanguages; do nkeynes@1: # Use the presentlang catalog if desiredlang is nkeynes@1: # a. equal to presentlang, or nkeynes@1: # b. a variant of presentlang (because in this case, nkeynes@1: # presentlang can be used as a fallback for messages nkeynes@1: # which are not translated in the desiredlang catalog). nkeynes@1: case "$desiredlang" in nkeynes@1: "$presentlang"*) useit=yes;; nkeynes@1: esac nkeynes@1: done nkeynes@1: if test $useit = yes; then nkeynes@1: NEW_LINGUAS="$NEW_LINGUAS $presentlang" nkeynes@1: fi nkeynes@1: done nkeynes@1: LINGUAS=$NEW_LINGUAS nkeynes@1: AC_MSG_RESULT($LINGUAS) nkeynes@1: fi nkeynes@1: nkeynes@1: dnl Construct list of names of catalog files to be constructed. nkeynes@1: if test -n "$LINGUAS"; then nkeynes@1: for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done nkeynes@1: fi nkeynes@1: fi nkeynes@1: nkeynes@1: dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly nkeynes@1: dnl find the mkinstalldirs script in another subdir but ($top_srcdir). nkeynes@1: dnl Try to locate is. nkeynes@1: MKINSTALLDIRS= nkeynes@1: if test -n "$ac_aux_dir"; then nkeynes@1: MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" nkeynes@1: fi nkeynes@1: if test -z "$MKINSTALLDIRS"; then nkeynes@1: MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" nkeynes@1: fi nkeynes@1: AC_SUBST(MKINSTALLDIRS) nkeynes@1: nkeynes@1: dnl Generate list of files to be processed by xgettext which will nkeynes@1: dnl be included in po/Makefile. nkeynes@1: test -d po || mkdir po nkeynes@1: if test "x$srcdir" != "x."; then nkeynes@1: if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then nkeynes@1: posrcprefix="$srcdir/" nkeynes@1: else nkeynes@1: posrcprefix="../$srcdir/" nkeynes@1: fi nkeynes@1: else nkeynes@1: posrcprefix="../" nkeynes@1: fi nkeynes@1: rm -f po/POTFILES nkeynes@1: sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ nkeynes@1: < $srcdir/po/POTFILES.in > po/POTFILES nkeynes@1: ]) nkeynes@1: nkeynes@1: # AM_GLIB_DEFINE_LOCALEDIR(VARIABLE) nkeynes@1: # ------------------------------- nkeynes@1: # Define VARIABLE to the location where catalog files will nkeynes@1: # be installed by po/Makefile. nkeynes@10: glib_DEFUN([GLIB_DEFINE_LOCALEDIR], nkeynes@1: [glib_REQUIRE([GLIB_GNU_GETTEXT])dnl nkeynes@1: glib_save_prefix="$prefix" nkeynes@1: glib_save_exec_prefix="$exec_prefix" nkeynes@571: glib_save_datarootdir="$datarootdir" nkeynes@1: test "x$prefix" = xNONE && prefix=$ac_default_prefix nkeynes@1: test "x$exec_prefix" = xNONE && exec_prefix=$prefix nkeynes@571: datarootdir=`eval echo "${datarootdir}"` nkeynes@1: if test "x$CATOBJEXT" = "x.mo" ; then nkeynes@1: localedir=`eval echo "${libdir}/locale"` nkeynes@1: else nkeynes@1: localedir=`eval echo "${datadir}/locale"` nkeynes@1: fi nkeynes@1: prefix="$glib_save_prefix" nkeynes@1: exec_prefix="$glib_save_exec_prefix" nkeynes@571: datarootdir="$glib_save_datarootdir" nkeynes@1: AC_DEFINE_UNQUOTED($1, "$localedir", nkeynes@1: [Define the location where the catalogs will be installed]) nkeynes@1: ]) nkeynes@1: nkeynes@1: dnl nkeynes@1: dnl Now the definitions that aclocal will find nkeynes@1: dnl nkeynes@1: ifdef(glib_configure_in,[],[ nkeynes@10: AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)]) nkeynes@10: AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)]) nkeynes@1: ])dnl nkeynes@1: nkeynes@571: # GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL]) nkeynes@571: # nkeynes@571: # Create a temporary file with TEST-FILE as its contents and pass the nkeynes@571: # file name to PROGRAM. Perform ACTION-IF-PASS if PROGRAM exits with nkeynes@571: # 0 and perform ACTION-IF-FAIL for any other exit status. nkeynes@571: AC_DEFUN([GLIB_RUN_PROG], nkeynes@571: [cat >conftest.foo <<_ACEOF nkeynes@571: $2 nkeynes@571: _ACEOF nkeynes@571: if AC_RUN_LOG([$1 conftest.foo]); then nkeynes@571: m4_ifval([$3], [$3], [:]) nkeynes@571: m4_ifvaln([$4], [else $4])dnl nkeynes@571: echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD nkeynes@571: sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD nkeynes@571: fi]) nkeynes@571: nkeynes@571: nkeynes@658: # isc-posix.m4 serial 2 (gettext-0.11.2) nkeynes@658: dnl Copyright (C) 1995-2002 Free Software Foundation, Inc. nkeynes@658: dnl This file is free software; the Free Software Foundation nkeynes@658: dnl gives unlimited permission to copy and/or distribute it, nkeynes@658: dnl with or without modifications, as long as this notice is preserved. nkeynes@658: nkeynes@658: # This file is not needed with autoconf-2.53 and newer. Remove it in 2005. nkeynes@658: nkeynes@658: # This test replaces the one in autoconf. nkeynes@658: # Currently this macro should have the same name as the autoconf macro nkeynes@658: # because gettext's gettext.m4 (distributed in the automake package) nkeynes@658: # still uses it. Otherwise, the use in gettext.m4 makes autoheader nkeynes@658: # give these diagnostics: nkeynes@658: # configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX nkeynes@658: # configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX nkeynes@658: nkeynes@658: undefine([AC_ISC_POSIX]) nkeynes@658: nkeynes@658: AC_DEFUN([AC_ISC_POSIX], nkeynes@658: [ nkeynes@658: dnl This test replaces the obsolescent AC_ISC_POSIX kludge. nkeynes@658: AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"]) nkeynes@658: ] nkeynes@658: ) nkeynes@658: nkeynes@658: # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- nkeynes@658: # nkeynes@658: # Copyright © 2004 Scott James Remnant . nkeynes@658: # nkeynes@658: # This program is free software; you can redistribute it and/or modify nkeynes@658: # it under the terms of the GNU General Public License as published by nkeynes@658: # the Free Software Foundation; either version 2 of the License, or nkeynes@658: # (at your option) any later version. nkeynes@658: # nkeynes@658: # This program is distributed in the hope that it will be useful, but nkeynes@658: # WITHOUT ANY WARRANTY; without even the implied warranty of nkeynes@658: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU nkeynes@658: # General Public License for more details. nkeynes@658: # nkeynes@658: # You should have received a copy of the GNU General Public License nkeynes@658: # along with this program; if not, write to the Free Software nkeynes@658: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. nkeynes@658: # nkeynes@658: # As a special exception to the GNU General Public License, if you nkeynes@658: # distribute this file as part of a program that contains a nkeynes@658: # configuration script generated by Autoconf, you may include it under nkeynes@658: # the same distribution terms that you use for the rest of that program. nkeynes@658: nkeynes@658: # PKG_PROG_PKG_CONFIG([MIN-VERSION]) nkeynes@658: # ---------------------------------- nkeynes@658: AC_DEFUN([PKG_PROG_PKG_CONFIG], nkeynes@658: [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) nkeynes@658: m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) nkeynes@658: AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl nkeynes@658: if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then nkeynes@658: AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) nkeynes@658: fi nkeynes@658: if test -n "$PKG_CONFIG"; then nkeynes@658: _pkg_min_version=m4_default([$1], [0.9.0]) nkeynes@658: AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) nkeynes@658: if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then nkeynes@658: AC_MSG_RESULT([yes]) nkeynes@658: else nkeynes@658: AC_MSG_RESULT([no]) nkeynes@658: PKG_CONFIG="" nkeynes@658: fi nkeynes@658: nkeynes@658: fi[]dnl nkeynes@658: ])# PKG_PROG_PKG_CONFIG nkeynes@658: nkeynes@658: # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) nkeynes@658: # nkeynes@658: # Check to see whether a particular set of modules exists. Similar nkeynes@658: # to PKG_CHECK_MODULES(), but does not set variables or print errors. nkeynes@658: # nkeynes@658: # nkeynes@658: # Similar to PKG_CHECK_MODULES, make sure that the first instance of nkeynes@658: # this or PKG_CHECK_MODULES is called, or make sure to call nkeynes@658: # PKG_CHECK_EXISTS manually nkeynes@658: # -------------------------------------------------------------- nkeynes@658: AC_DEFUN([PKG_CHECK_EXISTS], nkeynes@658: [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl nkeynes@658: if test -n "$PKG_CONFIG" && \ nkeynes@658: AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then nkeynes@658: m4_ifval([$2], [$2], [:]) nkeynes@658: m4_ifvaln([$3], [else nkeynes@658: $3])dnl nkeynes@658: fi]) nkeynes@658: nkeynes@658: nkeynes@658: # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) nkeynes@658: # --------------------------------------------- nkeynes@658: m4_define([_PKG_CONFIG], nkeynes@923: [if test -n "$$1"; then nkeynes@923: pkg_cv_[]$1="$$1" nkeynes@923: elif test -n "$PKG_CONFIG"; then nkeynes@923: PKG_CHECK_EXISTS([$3], nkeynes@923: [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], nkeynes@923: [pkg_failed=yes]) nkeynes@923: else nkeynes@923: pkg_failed=untried nkeynes@658: fi[]dnl nkeynes@658: ])# _PKG_CONFIG nkeynes@658: nkeynes@658: # _PKG_SHORT_ERRORS_SUPPORTED nkeynes@658: # ----------------------------- nkeynes@658: AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], nkeynes@658: [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) nkeynes@658: if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then nkeynes@658: _pkg_short_errors_supported=yes nkeynes@658: else nkeynes@658: _pkg_short_errors_supported=no nkeynes@658: fi[]dnl nkeynes@658: ])# _PKG_SHORT_ERRORS_SUPPORTED nkeynes@658: nkeynes@658: nkeynes@658: # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], nkeynes@658: # [ACTION-IF-NOT-FOUND]) nkeynes@658: # nkeynes@658: # nkeynes@658: # Note that if there is a possibility the first call to nkeynes@658: # PKG_CHECK_MODULES might not happen, you should be sure to include an nkeynes@658: # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac nkeynes@658: # nkeynes@658: # nkeynes@658: # -------------------------------------------------------------- nkeynes@658: AC_DEFUN([PKG_CHECK_MODULES], nkeynes@658: [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl nkeynes@658: AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl nkeynes@658: AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl nkeynes@658: nkeynes@658: pkg_failed=no nkeynes@658: AC_MSG_CHECKING([for $1]) nkeynes@658: nkeynes@658: _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) nkeynes@658: _PKG_CONFIG([$1][_LIBS], [libs], [$2]) nkeynes@658: nkeynes@658: m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS nkeynes@658: and $1[]_LIBS to avoid the need to call pkg-config. nkeynes@658: See the pkg-config man page for more details.]) nkeynes@658: nkeynes@658: if test $pkg_failed = yes; then nkeynes@658: _PKG_SHORT_ERRORS_SUPPORTED nkeynes@658: if test $_pkg_short_errors_supported = yes; then nkeynes@923: $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` nkeynes@658: else nkeynes@923: $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` nkeynes@658: fi nkeynes@658: # Put the nasty error message in config.log where it belongs nkeynes@658: echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD nkeynes@658: nkeynes@658: ifelse([$4], , [AC_MSG_ERROR(dnl nkeynes@658: [Package requirements ($2) were not met: nkeynes@658: nkeynes@658: $$1_PKG_ERRORS nkeynes@658: nkeynes@658: Consider adjusting the PKG_CONFIG_PATH environment variable if you nkeynes@658: installed software in a non-standard prefix. nkeynes@658: nkeynes@658: _PKG_TEXT nkeynes@658: ])], nkeynes@658: [AC_MSG_RESULT([no]) nkeynes@658: $4]) nkeynes@658: elif test $pkg_failed = untried; then nkeynes@658: ifelse([$4], , [AC_MSG_FAILURE(dnl nkeynes@658: [The pkg-config script could not be found or is too old. Make sure it nkeynes@658: is in your PATH or set the PKG_CONFIG environment variable to the full nkeynes@658: path to pkg-config. nkeynes@658: nkeynes@658: _PKG_TEXT nkeynes@658: nkeynes@658: To get pkg-config, see .])], nkeynes@658: [$4]) nkeynes@658: else nkeynes@658: $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS nkeynes@658: $1[]_LIBS=$pkg_cv_[]$1[]_LIBS nkeynes@658: AC_MSG_RESULT([yes]) nkeynes@658: ifelse([$3], , :, [$3]) nkeynes@658: fi[]dnl nkeynes@658: ])# PKG_CHECK_MODULES nkeynes@658: nkeynes@658: # Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. nkeynes@658: # nkeynes@658: # This file is free software; the Free Software Foundation nkeynes@658: # gives unlimited permission to copy and/or distribute it, nkeynes@658: # with or without modifications, as long as this notice is preserved. nkeynes@658: nkeynes@658: # AM_AUTOMAKE_VERSION(VERSION) nkeynes@658: # ---------------------------- nkeynes@658: # Automake X.Y traces this macro to ensure aclocal.m4 has been nkeynes@658: # generated from the m4 files accompanying Automake X.Y. nkeynes@658: AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) nkeynes@658: nkeynes@658: # AM_SET_CURRENT_AUTOMAKE_VERSION nkeynes@658: # ------------------------------- nkeynes@658: # Call AM_AUTOMAKE_VERSION so it can be traced. nkeynes@658: # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. nkeynes@658: AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], nkeynes@658: [AM_AUTOMAKE_VERSION([1.9.6])]) nkeynes@658: nkeynes@658: # Figure out how to run the assembler. -*- Autoconf -*- nkeynes@658: nkeynes@658: # Copyright (C) 2001, 2003, 2004, 2005 Free Software Foundation, Inc. nkeynes@658: # nkeynes@658: # This file is free software; the Free Software Foundation nkeynes@658: # gives unlimited permission to copy and/or distribute it, nkeynes@658: # with or without modifications, as long as this notice is preserved. nkeynes@658: nkeynes@658: # serial 4 nkeynes@658: nkeynes@658: # AM_PROG_AS nkeynes@658: # ---------- nkeynes@658: AC_DEFUN([AM_PROG_AS], nkeynes@658: [# By default we simply use the C compiler to build assembly code. nkeynes@658: AC_REQUIRE([AC_PROG_CC]) nkeynes@658: test "${CCAS+set}" = set || CCAS=$CC nkeynes@658: test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS nkeynes@658: AC_ARG_VAR([CCAS], [assembler compiler command (defaults to CC)]) nkeynes@658: AC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)]) nkeynes@658: ]) nkeynes@658: nkeynes@658: # AM_AUX_DIR_EXPAND -*- Autoconf -*- nkeynes@658: nkeynes@658: # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. nkeynes@658: # nkeynes@658: # This file is free software; the Free Software Foundation nkeynes@658: # gives unlimited permission to copy and/or distribute it, nkeynes@658: # with or without modifications, as long as this notice is preserved. nkeynes@658: nkeynes@658: # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets nkeynes@658: # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to nkeynes@658: # `$srcdir', `$srcdir/..', or `$srcdir/../..'. nkeynes@658: # nkeynes@658: # Of course, Automake must honor this variable whenever it calls a nkeynes@658: # tool from the auxiliary directory. The problem is that $srcdir (and nkeynes@658: # therefore $ac_aux_dir as well) can be either absolute or relative, nkeynes@658: # depending on how configure is run. This is pretty annoying, since nkeynes@658: # it makes $ac_aux_dir quite unusable in subdirectories: in the top nkeynes@658: # source directory, any form will work fine, but in subdirectories a nkeynes@658: # relative path needs to be adjusted first. nkeynes@658: # nkeynes@658: # $ac_aux_dir/missing nkeynes@658: # fails when called from a subdirectory if $ac_aux_dir is relative nkeynes@658: # $top_srcdir/$ac_aux_dir/missing nkeynes@658: # fails if $ac_aux_dir is absolute, nkeynes@658: # fails when called from a subdirectory in a VPATH build with nkeynes@658: # a relative $ac_aux_dir nkeynes@658: # nkeynes@658: # The reason of the latter failure is that $top_srcdir and $ac_aux_dir nkeynes@658: # are both prefixed by $srcdir. In an in-source build this is usually nkeynes@658: # harmless because $srcdir is `.', but things will broke when you nkeynes@658: # start a VPATH build or use an absolute $srcdir. nkeynes@658: # nkeynes@658: # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, nkeynes@658: # iff we strip the leading $srcdir from $ac_aux_dir. That would be: nkeynes@658: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` nkeynes@658: # and then we would define $MISSING as nkeynes@658: # MISSING="\${SHELL} $am_aux_dir/missing" nkeynes@658: # This will work as long as MISSING is not called from configure, because nkeynes@658: # unfortunately $(top_srcdir) has no meaning in configure. nkeynes@658: # However there are other variables, like CC, which are often used in nkeynes@658: # configure, and could therefore not use this "fixed" $ac_aux_dir. nkeynes@658: # nkeynes@658: # Another solution, used here, is to always expand $ac_aux_dir to an nkeynes@658: # absolute PATH. The drawback is that using absolute paths prevent a nkeynes@658: # configured tree to be moved without reconfiguration. nkeynes@658: nkeynes@658: AC_DEFUN([AM_AUX_DIR_EXPAND], nkeynes@658: [dnl Rely on autoconf to set up CDPATH properly. nkeynes@658: AC_PREREQ([2.50])dnl nkeynes@658: # expand $ac_aux_dir to an absolute path nkeynes@658: am_aux_dir=`cd $ac_aux_dir && pwd` nkeynes@658: ]) nkeynes@658: nkeynes@658: nkeynes@658: # Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2005 nkeynes@658: # Free Software Foundation, Inc. nkeynes@658: # nkeynes@658: # This file is free software; the Free Software Foundation nkeynes@658: # gives unlimited permission to copy and/or distribute it, nkeynes@658: # with or without modifications, as long as this notice is preserved. nkeynes@658: nkeynes@658: # serial 4 nkeynes@658: nkeynes@658: # This was merged into AC_PROG_CC in Autoconf. nkeynes@658: nkeynes@658: AU_DEFUN([AM_PROG_CC_STDC], nkeynes@658: [AC_PROG_CC nkeynes@658: AC_DIAGNOSE([obsolete], [$0: nkeynes@658: your code should no longer depend upon `am_cv_prog_cc_stdc', but upon nkeynes@658: `ac_cv_prog_cc_stdc'. Remove this warning and the assignment when nkeynes@658: you adjust the code. You can also remove the above call to nkeynes@658: AC_PROG_CC if you already called it elsewhere.]) nkeynes@658: am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc nkeynes@658: ]) nkeynes@658: AU_DEFUN([fp_PROG_CC_STDC]) nkeynes@658: nkeynes@658: # AM_CONDITIONAL -*- Autoconf -*- nkeynes@658: nkeynes@658: # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005 nkeynes@658: # Free Software Foundation, Inc. nkeynes@658: # nkeynes@658: # This file is free software; the Free Software Foundation nkeynes@658: # gives unlimited permission to copy and/or distribute it, nkeynes@658: # with or without modifications, as long as this notice is preserved. nkeynes@658: nkeynes@658: # serial 7 nkeynes@658: nkeynes@658: # AM_CONDITIONAL(NAME, SHELL-CONDITION) nkeynes@658: # ------------------------------------- nkeynes@658: # Define a conditional. nkeynes@658: AC_DEFUN([AM_CONDITIONAL], nkeynes@658: [AC_PREREQ(2.52)dnl nkeynes@658: ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], nkeynes@658: [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl nkeynes@658: AC_SUBST([$1_TRUE]) nkeynes@658: AC_SUBST([$1_FALSE]) nkeynes@658: if $2; then nkeynes@658: $1_TRUE= nkeynes@658: $1_FALSE='#' nkeynes@658: else nkeynes@658: $1_TRUE='#' nkeynes@658: $1_FALSE= nkeynes@658: fi nkeynes@658: AC_CONFIG_COMMANDS_PRE( nkeynes@658: [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then nkeynes@658: AC_MSG_ERROR([[conditional "$1" was never defined. nkeynes@658: Usually this means the macro was only invoked conditionally.]]) nkeynes@658: fi])]) nkeynes@658: nkeynes@658: nkeynes@658: # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 nkeynes@658: # Free Software Foundation, Inc. nkeynes@658: # nkeynes@658: # This file is free software; the Free Software Foundation nkeynes@658: # gives unlimited permission to copy and/or distribute it, nkeynes@658: # with or without modifications, as long as this notice is preserved. nkeynes@658: nkeynes@658: # serial 8 nkeynes@658: nkeynes@658: # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be nkeynes@658: # written in clear, in which case automake, when reading aclocal.m4, nkeynes@658: # will think it sees a *use*, and therefore will trigger all it's nkeynes@658: # C support machinery. Also note that it means that autoscan, seeing nkeynes@658: # CC etc. in the Makefile, will ask for an AC_PROG_CC use... nkeynes@658: nkeynes@658: nkeynes@658: # _AM_DEPENDENCIES(NAME) nkeynes@658: # ---------------------- nkeynes@658: # See how the compiler implements dependency checking. nkeynes@658: # NAME is "CC", "CXX", "GCJ", or "OBJC". nkeynes@658: # We try a few techniques and use that to set a single cache variable. nkeynes@658: # nkeynes@658: # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was nkeynes@658: # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular nkeynes@658: # dependency, and given that the user is not expected to run this macro, nkeynes@658: # just rely on AC_PROG_CC. nkeynes@658: AC_DEFUN([_AM_DEPENDENCIES], nkeynes@658: [AC_REQUIRE([AM_SET_DEPDIR])dnl nkeynes@658: AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl nkeynes@658: AC_REQUIRE([AM_MAKE_INCLUDE])dnl nkeynes@658: AC_REQUIRE([AM_DEP_TRACK])dnl nkeynes@658: nkeynes@658: ifelse([$1], CC, [depcc="$CC" am_compiler_list=], nkeynes@658: [$1], CXX, [depcc="$CXX" am_compiler_list=], nkeynes@658: [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], nkeynes@658: [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], nkeynes@658: [depcc="$$1" am_compiler_list=]) nkeynes@658: nkeynes@658: AC_CACHE_CHECK([dependency style of $depcc], nkeynes@658: [am_cv_$1_dependencies_compiler_type], nkeynes@658: [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then nkeynes@658: # We make a subdir and do the tests there. Otherwise we can end up nkeynes@658: # making bogus files that we don't know about and never remove. For nkeynes@658: # instance it was reported that on HP-UX the gcc test will end up nkeynes@658: # making a dummy file named `D' -- because `-MD' means `put the output nkeynes@658: # in D'. nkeynes@658: mkdir conftest.dir nkeynes@658: # Copy depcomp to subdir because otherwise we won't find it if we're nkeynes@658: # using a relative directory. nkeynes@658: cp "$am_depcomp" conftest.dir nkeynes@658: cd conftest.dir nkeynes@658: # We will build objects and dependencies in a subdirectory because nkeynes@658: # it helps to detect inapplicable dependency modes. For instance nkeynes@658: # both Tru64's cc and ICC support -MD to output dependencies as a nkeynes@658: # side effect of compilation, but ICC will put the dependencies in nkeynes@658: # the current directory while Tru64 will put them in the object nkeynes@658: # directory. nkeynes@658: mkdir sub nkeynes@658: nkeynes@658: am_cv_$1_dependencies_compiler_type=none nkeynes@658: if test "$am_compiler_list" = ""; then nkeynes@658: am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` nkeynes@658: fi nkeynes@658: for depmode in $am_compiler_list; do nkeynes@658: # Setup a source with many dependencies, because some compilers nkeynes@658: # like to wrap large dependency lists on column 80 (with \), and nkeynes@658: # we should not choose a depcomp mode which is confused by this. nkeynes@658: # nkeynes@658: # We need to recreate these files for each test, as the compiler may nkeynes@658: # overwrite some of them when testing with obscure command lines. nkeynes@658: # This happens at least with the AIX C compiler. nkeynes@658: : > sub/conftest.c nkeynes@658: for i in 1 2 3 4 5 6; do nkeynes@658: echo '#include "conftst'$i'.h"' >> sub/conftest.c nkeynes@658: # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with nkeynes@658: # Solaris 8's {/usr,}/bin/sh. nkeynes@658: touch sub/conftst$i.h nkeynes@658: done nkeynes@658: echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf nkeynes@658: nkeynes@658: case $depmode in nkeynes@658: nosideeffect) nkeynes@658: # after this tag, mechanisms are not by side-effect, so they'll nkeynes@658: # only be used when explicitly requested nkeynes@658: if test "x$enable_dependency_tracking" = xyes; then nkeynes@658: continue nkeynes@658: else nkeynes@658: break nkeynes@658: fi nkeynes@658: ;; nkeynes@658: none) break ;; nkeynes@658: esac nkeynes@658: # We check with `-c' and `-o' for the sake of the "dashmstdout" nkeynes@658: # mode. It turns out that the SunPro C++ compiler does not properly nkeynes@658: # handle `-M -o', and we need to detect this. nkeynes@658: if depmode=$depmode \ nkeynes@658: source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ nkeynes@658: depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ nkeynes@658: $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ nkeynes@658: >/dev/null 2>conftest.err && nkeynes@658: grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && nkeynes@658: grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && nkeynes@658: ${MAKE-make} -s -f confmf > /dev/null 2>&1; then nkeynes@658: # icc doesn't choke on unknown options, it will just issue warnings nkeynes@658: # or remarks (even with -Werror). So we grep stderr for any message nkeynes@658: # that says an option was ignored or not supported. nkeynes@658: # When given -MP, icc 7.0 and 7.1 complain thusly: nkeynes@658: # icc: Command line warning: ignoring option '-M'; no argument required nkeynes@658: # The diagnosis changed in icc 8.0: nkeynes@658: # icc: Command line remark: option '-MP' not supported nkeynes@658: if (grep 'ignoring option' conftest.err || nkeynes@658: grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else nkeynes@658: am_cv_$1_dependencies_compiler_type=$depmode nkeynes@658: break nkeynes@658: fi nkeynes@658: fi nkeynes@658: done nkeynes@658: nkeynes@658: cd .. nkeynes@658: rm -rf conftest.dir nkeynes@658: else nkeynes@658: am_cv_$1_dependencies_compiler_type=none nkeynes@658: fi nkeynes@658: ]) nkeynes@658: AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) nkeynes@658: AM_CONDITIONAL([am__fastdep$1], [ nkeynes@658: test "x$enable_dependency_tracking" != xno \ nkeynes@658: && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) nkeynes@658: ]) nkeynes@658: nkeynes@658: nkeynes@658: # AM_SET_DEPDIR nkeynes@658: # ------------- nkeynes@658: # Choose a directory name for dependency files. nkeynes@658: # This macro is AC_REQUIREd in _AM_DEPENDENCIES nkeynes@658: AC_DEFUN([AM_SET_DEPDIR], nkeynes@658: [AC_REQUIRE([AM_SET_LEADING_DOT])dnl nkeynes@658: AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl nkeynes@658: ]) nkeynes@658: nkeynes@658: nkeynes@658: # AM_DEP_TRACK nkeynes@658: # ------------ nkeynes@658: AC_DEFUN([AM_DEP_TRACK], nkeynes@658: [AC_ARG_ENABLE(dependency-tracking, nkeynes@658: [ --disable-dependency-tracking speeds up one-time build nkeynes@658: --enable-dependency-tracking do not reject slow dependency extractors]) nkeynes@658: if test "x$enable_dependency_tracking" != xno; then nkeynes@658: am_depcomp="$ac_aux_dir/depcomp" nkeynes@658: AMDEPBACKSLASH='\' nkeynes@658: fi nkeynes@658: AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) nkeynes@658: AC_SUBST([AMDEPBACKSLASH]) nkeynes@658: ]) nkeynes@658: nkeynes@658: # Generate code to set up dependency tracking. -*- Autoconf -*- nkeynes@658: nkeynes@658: # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 nkeynes@658: # Free Software Foundation, Inc. nkeynes@658: # nkeynes@658: # This file is free software; the Free Software Foundation nkeynes@658: # gives unlimited permission to copy and/or distribute it, nkeynes@658: # with or without modifications, as long as this notice is preserved. nkeynes@658: nkeynes@658: #serial 3 nkeynes@658: nkeynes@658: # _AM_OUTPUT_DEPENDENCY_COMMANDS nkeynes@658: # ------------------------------ nkeynes@658: AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], nkeynes@658: [for mf in $CONFIG_FILES; do nkeynes@658: # Strip MF so we end up with the name of the file. nkeynes@658: mf=`echo "$mf" | sed -e 's/:.*$//'` nkeynes@658: # Check whether this is an Automake generated Makefile or not. nkeynes@658: # We used to match only the files named `Makefile.in', but nkeynes@658: # some people rename them; so instead we look at the file content. nkeynes@658: # Grep'ing the first line is not enough: some people post-process nkeynes@658: # each Makefile.in and add a new line on top of each file to say so. nkeynes@658: # So let's grep whole file. nkeynes@658: if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then nkeynes@658: dirpart=`AS_DIRNAME("$mf")` nkeynes@658: else nkeynes@658: continue nkeynes@658: fi nkeynes@658: # Extract the definition of DEPDIR, am__include, and am__quote nkeynes@658: # from the Makefile without running `make'. nkeynes@658: DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` nkeynes@658: test -z "$DEPDIR" && continue nkeynes@658: am__include=`sed -n 's/^am__include = //p' < "$mf"` nkeynes@658: test -z "am__include" && continue nkeynes@658: am__quote=`sed -n 's/^am__quote = //p' < "$mf"` nkeynes@658: # When using ansi2knr, U may be empty or an underscore; expand it nkeynes@658: U=`sed -n 's/^U = //p' < "$mf"` nkeynes@658: # Find all dependency output files, they are included files with nkeynes@658: # $(DEPDIR) in their names. We invoke sed twice because it is the nkeynes@658: # simplest approach to changing $(DEPDIR) to its actual value in the nkeynes@658: # expansion. nkeynes@658: for file in `sed -n " nkeynes@658: s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ nkeynes@658: sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do nkeynes@658: # Make sure the directory exists. nkeynes@658: test -f "$dirpart/$file" && continue nkeynes@658: fdir=`AS_DIRNAME(["$file"])` nkeynes@658: AS_MKDIR_P([$dirpart/$fdir]) nkeynes@658: # echo "creating $dirpart/$file" nkeynes@658: echo '# dummy' > "$dirpart/$file" nkeynes@658: done nkeynes@658: done nkeynes@658: ])# _AM_OUTPUT_DEPENDENCY_COMMANDS nkeynes@658: nkeynes@658: nkeynes@658: # AM_OUTPUT_DEPENDENCY_COMMANDS nkeynes@658: # ----------------------------- nkeynes@658: # This macro should only be invoked once -- use via AC_REQUIRE. nkeynes@658: # nkeynes@658: # This code is only required when automatic dependency tracking nkeynes@658: # is enabled. FIXME. This creates each `.P' file that we will nkeynes@658: # need in order to bootstrap the dependency handling code. nkeynes@658: AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], nkeynes@658: [AC_CONFIG_COMMANDS([depfiles], nkeynes@658: [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], nkeynes@658: [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) nkeynes@658: ]) nkeynes@658: nkeynes@658: # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 nkeynes@658: # Free Software Foundation, Inc. nkeynes@658: # nkeynes@658: # This file is free software; the Free Software Foundation nkeynes@658: # gives unlimited permission to copy and/or distribute it, nkeynes@658: # with or without modifications, as long as this notice is preserved. nkeynes@658: nkeynes@658: # serial 8 nkeynes@658: nkeynes@658: # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. nkeynes@658: AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) nkeynes@658: nkeynes@658: # Do all the work for Automake. -*- Autoconf -*- nkeynes@658: nkeynes@658: # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 nkeynes@658: # Free Software Foundation, Inc. nkeynes@658: # nkeynes@658: # This file is free software; the Free Software Foundation nkeynes@658: # gives unlimited permission to copy and/or distribute it, nkeynes@658: # with or without modifications, as long as this notice is preserved. nkeynes@658: nkeynes@658: # serial 12 nkeynes@658: nkeynes@658: # This macro actually does too much. Some checks are only needed if nkeynes@658: # your package does certain things. But this isn't really a big deal. nkeynes@658: nkeynes@658: # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) nkeynes@658: # AM_INIT_AUTOMAKE([OPTIONS]) nkeynes@658: # ----------------------------------------------- nkeynes@658: # The call with PACKAGE and VERSION arguments is the old style nkeynes@658: # call (pre autoconf-2.50), which is being phased out. PACKAGE nkeynes@658: # and VERSION should now be passed to AC_INIT and removed from nkeynes@658: # the call to AM_INIT_AUTOMAKE. nkeynes@658: # We support both call styles for the transition. After nkeynes@658: # the next Automake release, Autoconf can make the AC_INIT nkeynes@658: # arguments mandatory, and then we can depend on a new Autoconf nkeynes@658: # release and drop the old call support. nkeynes@658: AC_DEFUN([AM_INIT_AUTOMAKE], nkeynes@658: [AC_PREREQ([2.58])dnl nkeynes@658: dnl Autoconf wants to disallow AM_ names. We explicitly allow nkeynes@658: dnl the ones we care about. nkeynes@658: m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl nkeynes@658: AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl nkeynes@658: AC_REQUIRE([AC_PROG_INSTALL])dnl nkeynes@658: # test to see if srcdir already configured nkeynes@658: if test "`cd $srcdir && pwd`" != "`pwd`" && nkeynes@658: test -f $srcdir/config.status; then nkeynes@658: AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) nkeynes@658: fi nkeynes@658: nkeynes@658: # test whether we have cygpath nkeynes@658: if test -z "$CYGPATH_W"; then nkeynes@658: if (cygpath --version) >/dev/null 2>/dev/null; then nkeynes@658: CYGPATH_W='cygpath -w' nkeynes@658: else nkeynes@658: CYGPATH_W=echo nkeynes@658: fi nkeynes@658: fi nkeynes@658: AC_SUBST([CYGPATH_W]) nkeynes@658: nkeynes@658: # Define the identity of the package. nkeynes@658: dnl Distinguish between old-style and new-style calls. nkeynes@658: m4_ifval([$2], nkeynes@658: [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl nkeynes@658: AC_SUBST([PACKAGE], [$1])dnl nkeynes@658: AC_SUBST([VERSION], [$2])], nkeynes@658: [_AM_SET_OPTIONS([$1])dnl nkeynes@658: AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl nkeynes@658: AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl nkeynes@658: nkeynes@658: _AM_IF_OPTION([no-define],, nkeynes@658: [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) nkeynes@658: AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl nkeynes@658: nkeynes@658: # Some tools Automake needs. nkeynes@658: AC_REQUIRE([AM_SANITY_CHECK])dnl nkeynes@658: AC_REQUIRE([AC_ARG_PROGRAM])dnl nkeynes@658: AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) nkeynes@658: AM_MISSING_PROG(AUTOCONF, autoconf) nkeynes@658: AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) nkeynes@658: AM_MISSING_PROG(AUTOHEADER, autoheader) nkeynes@658: AM_MISSING_PROG(MAKEINFO, makeinfo) nkeynes@658: AM_PROG_INSTALL_SH nkeynes@658: AM_PROG_INSTALL_STRIP nkeynes@658: AC_REQUIRE([AM_PROG_MKDIR_P])dnl nkeynes@658: # We need awk for the "check" target. The system "awk" is bad on nkeynes@658: # some platforms. nkeynes@658: AC_REQUIRE([AC_PROG_AWK])dnl nkeynes@658: AC_REQUIRE([AC_PROG_MAKE_SET])dnl nkeynes@658: AC_REQUIRE([AM_SET_LEADING_DOT])dnl nkeynes@658: _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], nkeynes@658: [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], nkeynes@658: [_AM_PROG_TAR([v7])])]) nkeynes@658: _AM_IF_OPTION([no-dependencies],, nkeynes@658: [AC_PROVIDE_IFELSE([AC_PROG_CC], nkeynes@658: [_AM_DEPENDENCIES(CC)], nkeynes@658: [define([AC_PROG_CC], nkeynes@658: defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl nkeynes@658: AC_PROVIDE_IFELSE([AC_PROG_CXX], nkeynes@658: [_AM_DEPENDENCIES(CXX)], nkeynes@658: [define([AC_PROG_CXX], nkeynes@658: defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl nkeynes@658: ]) nkeynes@658: ]) nkeynes@658: nkeynes@658: nkeynes@658: # When config.status generates a header, we must update the stamp-h file. nkeynes@658: # This file resides in the same directory as the config header nkeynes@658: # that is generated. The stamp files are numbered to have different names. nkeynes@658: nkeynes@658: # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the nkeynes@658: # loop where config.status creates the headers, so we can generate nkeynes@658: # our stamp files there. nkeynes@658: AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], nkeynes@658: [# Compute $1's index in $config_headers. nkeynes@658: _am_stamp_count=1 nkeynes@658: for _am_header in $config_headers :; do nkeynes@658: case $_am_header in nkeynes@658: $1 | $1:* ) nkeynes@658: break ;; nkeynes@658: * ) nkeynes@658: _am_stamp_count=`expr $_am_stamp_count + 1` ;; nkeynes@658: esac nkeynes@658: done nkeynes@658: echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) nkeynes@658: nkeynes@658: # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. nkeynes@658: # nkeynes@658: # This file is free software; the Free Software Foundation nkeynes@658: # gives unlimited permission to copy and/or distribute it, nkeynes@658: # with or without modifications, as long as this notice is preserved. nkeynes@658: nkeynes@658: # AM_PROG_INSTALL_SH nkeynes@658: # ------------------ nkeynes@658: # Define $install_sh. nkeynes@658: AC_DEFUN([AM_PROG_INSTALL_SH], nkeynes@658: [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl nkeynes@658: install_sh=${install_sh-"$am_aux_dir/install-sh"} nkeynes@658: AC_SUBST(install_sh)]) nkeynes@658: nkeynes@658: # Copyright (C) 2003, 2005 Free Software Foundation, Inc. nkeynes@658: # nkeynes@658: # This file is free software; the Free Software Foundation nkeynes@658: # gives unlimited permission to copy and/or distribute it, nkeynes@658: # with or without modifications, as long as this notice is preserved. nkeynes@658: nkeynes@658: # serial 2 nkeynes@658: nkeynes@658: # Check whether the underlying file-system supports filenames nkeynes@658: # with a leading dot. For instance MS-DOS doesn't. nkeynes@658: AC_DEFUN([AM_SET_LEADING_DOT], nkeynes@658: [rm -rf .tst 2>/dev/null nkeynes@658: mkdir .tst 2>/dev/null nkeynes@658: if test -d .tst; then nkeynes@658: am__leading_dot=. nkeynes@658: else nkeynes@658: am__leading_dot=_ nkeynes@658: fi nkeynes@658: rmdir .tst 2>/dev/null nkeynes@658: AC_SUBST([am__leading_dot])]) nkeynes@658: nkeynes@658: # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- nkeynes@658: # From Jim Meyering nkeynes@658: nkeynes@658: # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005 nkeynes@658: # Free Software Foundation, Inc. nkeynes@658: # nkeynes@658: # This file is free software; the Free Software Foundation nkeynes@658: # gives unlimited permission to copy and/or distribute it, nkeynes@658: # with or without modifications, as long as this notice is preserved. nkeynes@658: nkeynes@658: # serial 4 nkeynes@658: nkeynes@658: AC_DEFUN([AM_MAINTAINER_MODE], nkeynes@658: [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) nkeynes@658: dnl maintainer-mode is disabled by default nkeynes@658: AC_ARG_ENABLE(maintainer-mode, nkeynes@658: [ --enable-maintainer-mode enable make rules and dependencies not useful nkeynes@658: (and sometimes confusing) to the casual installer], nkeynes@658: USE_MAINTAINER_MODE=$enableval, nkeynes@658: USE_MAINTAINER_MODE=no) nkeynes@658: AC_MSG_RESULT([$USE_MAINTAINER_MODE]) nkeynes@658: AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) nkeynes@658: MAINT=$MAINTAINER_MODE_TRUE nkeynes@658: AC_SUBST(MAINT)dnl nkeynes@658: ] nkeynes@658: ) nkeynes@658: nkeynes@658: AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) nkeynes@658: nkeynes@658: # Check to see how 'make' treats includes. -*- Autoconf -*- nkeynes@658: nkeynes@658: # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. nkeynes@658: # nkeynes@658: # This file is free software; the Free Software Foundation nkeynes@658: # gives unlimited permission to copy and/or distribute it, nkeynes@658: # with or without modifications, as long as this notice is preserved. nkeynes@658: nkeynes@658: # serial 3 nkeynes@658: nkeynes@658: # AM_MAKE_INCLUDE() nkeynes@658: # ----------------- nkeynes@658: # Check to see how make treats includes. nkeynes@658: AC_DEFUN([AM_MAKE_INCLUDE], nkeynes@658: [am_make=${MAKE-make} nkeynes@658: cat > confinc << 'END' nkeynes@658: am__doit: nkeynes@658: @echo done nkeynes@658: .PHONY: am__doit nkeynes@658: END nkeynes@658: # If we don't find an include directive, just comment out the code. nkeynes@658: AC_MSG_CHECKING([for style of include used by $am_make]) nkeynes@658: am__include="#" nkeynes@658: am__quote= nkeynes@658: _am_result=none nkeynes@658: # First try GNU make style include. nkeynes@658: echo "include confinc" > confmf nkeynes@658: # We grep out `Entering directory' and `Leaving directory' nkeynes@658: # messages which can occur if `w' ends up in MAKEFLAGS. nkeynes@658: # In particular we don't look at `^make:' because GNU make might nkeynes@658: # be invoked under some other name (usually "gmake"), in which nkeynes@658: # case it prints its new name instead of `make'. nkeynes@658: if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then nkeynes@658: am__include=include nkeynes@658: am__quote= nkeynes@658: _am_result=GNU nkeynes@658: fi nkeynes@658: # Now try BSD make style include. nkeynes@658: if test "$am__include" = "#"; then nkeynes@658: echo '.include "confinc"' > confmf nkeynes@658: if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then nkeynes@658: am__include=.include nkeynes@658: am__quote="\"" nkeynes@658: _am_result=BSD nkeynes@658: fi nkeynes@658: fi nkeynes@658: AC_SUBST([am__include]) nkeynes@658: AC_SUBST([am__quote]) nkeynes@658: AC_MSG_RESULT([$_am_result]) nkeynes@658: rm -f confinc confmf nkeynes@658: ]) nkeynes@658: nkeynes@658: # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- nkeynes@658: nkeynes@658: # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005 nkeynes@658: # Free Software Foundation, Inc. nkeynes@658: # nkeynes@658: # This file is free software; the Free Software Foundation nkeynes@658: # gives unlimited permission to copy and/or distribute it, nkeynes@658: # with or without modifications, as long as this notice is preserved. nkeynes@658: nkeynes@658: # serial 4 nkeynes@658: nkeynes@658: # AM_MISSING_PROG(NAME, PROGRAM) nkeynes@658: # ------------------------------ nkeynes@658: AC_DEFUN([AM_MISSING_PROG], nkeynes@658: [AC_REQUIRE([AM_MISSING_HAS_RUN]) nkeynes@658: $1=${$1-"${am_missing_run}$2"} nkeynes@658: AC_SUBST($1)]) nkeynes@658: nkeynes@658: nkeynes@658: # AM_MISSING_HAS_RUN nkeynes@658: # ------------------ nkeynes@658: # Define MISSING if not defined so far and test if it supports --run. nkeynes@658: # If it does, set am_missing_run to use it, otherwise, to nothing. nkeynes@658: AC_DEFUN([AM_MISSING_HAS_RUN], nkeynes@658: [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl nkeynes@658: test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" nkeynes@658: # Use eval to expand $SHELL nkeynes@658: if eval "$MISSING --run true"; then nkeynes@658: am_missing_run="$MISSING --run " nkeynes@658: else nkeynes@658: am_missing_run= nkeynes@658: AC_MSG_WARN([`missing' script is too old or missing]) nkeynes@658: fi nkeynes@658: ]) nkeynes@658: nkeynes@658: # Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. nkeynes@658: # nkeynes@658: # This file is free software; the Free Software Foundation nkeynes@658: # gives unlimited permission to copy and/or distribute it, nkeynes@658: # with or without modifications, as long as this notice is preserved. nkeynes@658: nkeynes@658: # AM_PROG_MKDIR_P nkeynes@658: # --------------- nkeynes@658: # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. nkeynes@658: # nkeynes@658: # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories nkeynes@658: # created by `make install' are always world readable, even if the nkeynes@658: # installer happens to have an overly restrictive umask (e.g. 077). nkeynes@658: # This was a mistake. There are at least two reasons why we must not nkeynes@658: # use `-m 0755': nkeynes@658: # - it causes special bits like SGID to be ignored, nkeynes@658: # - it may be too restrictive (some setups expect 775 directories). nkeynes@658: # nkeynes@658: # Do not use -m 0755 and let people choose whatever they expect by nkeynes@658: # setting umask. nkeynes@658: # nkeynes@658: # We cannot accept any implementation of `mkdir' that recognizes `-p'. nkeynes@658: # Some implementations (such as Solaris 8's) are not thread-safe: if a nkeynes@658: # parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' nkeynes@658: # concurrently, both version can detect that a/ is missing, but only nkeynes@658: # one can create it and the other will error out. Consequently we nkeynes@658: # restrict ourselves to GNU make (using the --version option ensures nkeynes@658: # this.) nkeynes@658: AC_DEFUN([AM_PROG_MKDIR_P], nkeynes@658: [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then nkeynes@658: # We used to keeping the `.' as first argument, in order to nkeynes@658: # allow $(mkdir_p) to be used without argument. As in nkeynes@658: # $(mkdir_p) $(somedir) nkeynes@658: # where $(somedir) is conditionally defined. However this is wrong nkeynes@658: # for two reasons: nkeynes@658: # 1. if the package is installed by a user who cannot write `.' nkeynes@658: # make install will fail, nkeynes@658: # 2. the above comment should most certainly read nkeynes@658: # $(mkdir_p) $(DESTDIR)$(somedir) nkeynes@658: # so it does not work when $(somedir) is undefined and nkeynes@658: # $(DESTDIR) is not. nkeynes@658: # To support the latter case, we have to write nkeynes@658: # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), nkeynes@658: # so the `.' trick is pointless. nkeynes@658: mkdir_p='mkdir -p --' nkeynes@658: else nkeynes@658: # On NextStep and OpenStep, the `mkdir' command does not nkeynes@658: # recognize any option. It will interpret all options as nkeynes@658: # directories to create, and then abort because `.' already nkeynes@658: # exists. nkeynes@658: for d in ./-p ./--version; nkeynes@658: do nkeynes@658: test -d $d && rmdir $d nkeynes@658: done nkeynes@658: # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. nkeynes@658: if test -f "$ac_aux_dir/mkinstalldirs"; then nkeynes@658: mkdir_p='$(mkinstalldirs)' nkeynes@658: else nkeynes@658: mkdir_p='$(install_sh) -d' nkeynes@658: fi nkeynes@658: fi nkeynes@658: AC_SUBST([mkdir_p])]) nkeynes@658: nkeynes@658: # Helper functions for option handling. -*- Autoconf -*- nkeynes@658: nkeynes@658: # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. nkeynes@658: # nkeynes@658: # This file is free software; the Free Software Foundation nkeynes@658: # gives unlimited permission to copy and/or distribute it, nkeynes@658: # with or without modifications, as long as this notice is preserved. nkeynes@658: nkeynes@658: # serial 3 nkeynes@658: nkeynes@658: # _AM_MANGLE_OPTION(NAME) nkeynes@658: # ----------------------- nkeynes@658: AC_DEFUN([_AM_MANGLE_OPTION], nkeynes@658: [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) nkeynes@658: nkeynes@658: # _AM_SET_OPTION(NAME) nkeynes@658: # ------------------------------ nkeynes@658: # Set option NAME. Presently that only means defining a flag for this option. nkeynes@658: AC_DEFUN([_AM_SET_OPTION], nkeynes@658: [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) nkeynes@658: nkeynes@658: # _AM_SET_OPTIONS(OPTIONS) nkeynes@658: # ---------------------------------- nkeynes@658: # OPTIONS is a space-separated list of Automake options. nkeynes@658: AC_DEFUN([_AM_SET_OPTIONS], nkeynes@658: [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) nkeynes@658: nkeynes@658: # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) nkeynes@658: # ------------------------------------------- nkeynes@658: # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. nkeynes@658: AC_DEFUN([_AM_IF_OPTION], nkeynes@658: [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) nkeynes@658: nkeynes@658: # Check to make sure that the build environment is sane. -*- Autoconf -*- nkeynes@658: nkeynes@658: # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 nkeynes@658: # Free Software Foundation, Inc. nkeynes@658: # nkeynes@658: # This file is free software; the Free Software Foundation nkeynes@658: # gives unlimited permission to copy and/or distribute it, nkeynes@658: # with or without modifications, as long as this notice is preserved. nkeynes@658: nkeynes@658: # serial 4 nkeynes@658: nkeynes@658: # AM_SANITY_CHECK nkeynes@658: # --------------- nkeynes@658: AC_DEFUN([AM_SANITY_CHECK], nkeynes@658: [AC_MSG_CHECKING([whether build environment is sane]) nkeynes@658: # Just in case nkeynes@658: sleep 1 nkeynes@658: echo timestamp > conftest.file nkeynes@658: # Do `set' in a subshell so we don't clobber the current shell's nkeynes@658: # arguments. Must try -L first in case configure is actually a nkeynes@658: # symlink; some systems play weird games with the mod time of symlinks nkeynes@658: # (eg FreeBSD returns the mod time of the symlink's containing nkeynes@658: # directory). nkeynes@658: if ( nkeynes@658: set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` nkeynes@658: if test "$[*]" = "X"; then nkeynes@658: # -L didn't work. nkeynes@658: set X `ls -t $srcdir/configure conftest.file` nkeynes@658: fi nkeynes@658: rm -f conftest.file nkeynes@658: if test "$[*]" != "X $srcdir/configure conftest.file" \ nkeynes@658: && test "$[*]" != "X conftest.file $srcdir/configure"; then nkeynes@658: nkeynes@658: # If neither matched, then we have a broken ls. This can happen nkeynes@658: # if, for instance, CONFIG_SHELL is bash and it inherits a nkeynes@658: # broken ls alias from the environment. This has actually nkeynes@658: # happened. Such a system could not be considered "sane". nkeynes@658: AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken nkeynes@658: alias in your environment]) nkeynes@658: fi nkeynes@658: nkeynes@658: test "$[2]" = conftest.file nkeynes@658: ) nkeynes@658: then nkeynes@658: # Ok. nkeynes@658: : nkeynes@658: else nkeynes@658: AC_MSG_ERROR([newly created file is older than distributed files! nkeynes@658: Check your system clock]) nkeynes@658: fi nkeynes@658: AC_MSG_RESULT(yes)]) nkeynes@658: nkeynes@658: # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. nkeynes@658: # nkeynes@658: # This file is free software; the Free Software Foundation nkeynes@658: # gives unlimited permission to copy and/or distribute it, nkeynes@658: # with or without modifications, as long as this notice is preserved. nkeynes@658: nkeynes@658: # AM_PROG_INSTALL_STRIP nkeynes@658: # --------------------- nkeynes@658: # One issue with vendor `install' (even GNU) is that you can't nkeynes@658: # specify the program used to strip binaries. This is especially nkeynes@658: # annoying in cross-compiling environments, where the build's strip nkeynes@658: # is unlikely to handle the host's binaries. nkeynes@658: # Fortunately install-sh will honor a STRIPPROG variable, so we nkeynes@658: # always use install-sh in `make install-strip', and initialize nkeynes@658: # STRIPPROG with the value of the STRIP variable (set by the user). nkeynes@658: AC_DEFUN([AM_PROG_INSTALL_STRIP], nkeynes@658: [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl nkeynes@658: # Installed binaries are usually stripped using `strip' when the user nkeynes@658: # run `make install-strip'. However `strip' might not be the right nkeynes@658: # tool to use in cross-compilation environments, therefore Automake nkeynes@658: # will honor the `STRIP' environment variable to overrule this program. nkeynes@658: dnl Don't test for $cross_compiling = yes, because it might be `maybe'. nkeynes@658: if test "$cross_compiling" != no; then nkeynes@658: AC_CHECK_TOOL([STRIP], [strip], :) nkeynes@658: fi nkeynes@658: INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" nkeynes@658: AC_SUBST([INSTALL_STRIP_PROGRAM])]) nkeynes@658: nkeynes@658: # Check how to create a tarball. -*- Autoconf -*- nkeynes@658: nkeynes@658: # Copyright (C) 2004, 2005 Free Software Foundation, Inc. nkeynes@658: # nkeynes@658: # This file is free software; the Free Software Foundation nkeynes@658: # gives unlimited permission to copy and/or distribute it, nkeynes@658: # with or without modifications, as long as this notice is preserved. nkeynes@658: nkeynes@658: # serial 2 nkeynes@658: nkeynes@658: # _AM_PROG_TAR(FORMAT) nkeynes@658: # -------------------- nkeynes@658: # Check how to create a tarball in format FORMAT. nkeynes@658: # FORMAT should be one of `v7', `ustar', or `pax'. nkeynes@658: # nkeynes@658: # Substitute a variable $(am__tar) that is a command nkeynes@658: # writing to stdout a FORMAT-tarball containing the directory nkeynes@658: # $tardir. nkeynes@658: # tardir=directory && $(am__tar) > result.tar nkeynes@658: # nkeynes@658: # Substitute a variable $(am__untar) that extract such nkeynes@658: # a tarball read from stdin. nkeynes@658: # $(am__untar) < result.tar nkeynes@658: AC_DEFUN([_AM_PROG_TAR], nkeynes@658: [# Always define AMTAR for backward compatibility. nkeynes@658: AM_MISSING_PROG([AMTAR], [tar]) nkeynes@658: m4_if([$1], [v7], nkeynes@658: [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], nkeynes@658: [m4_case([$1], [ustar],, [pax],, nkeynes@658: [m4_fatal([Unknown tar format])]) nkeynes@658: AC_MSG_CHECKING([how to create a $1 tar archive]) nkeynes@658: # Loop over all known methods to create a tar archive until one works. nkeynes@658: _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' nkeynes@658: _am_tools=${am_cv_prog_tar_$1-$_am_tools} nkeynes@658: # Do not fold the above two line into one, because Tru64 sh and nkeynes@658: # Solaris sh will not grok spaces in the rhs of `-'. nkeynes@658: for _am_tool in $_am_tools nkeynes@658: do nkeynes@658: case $_am_tool in nkeynes@658: gnutar) nkeynes@658: for _am_tar in tar gnutar gtar; nkeynes@658: do nkeynes@658: AM_RUN_LOG([$_am_tar --version]) && break nkeynes@658: done nkeynes@658: am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' nkeynes@658: am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' nkeynes@658: am__untar="$_am_tar -xf -" nkeynes@658: ;; nkeynes@658: plaintar) nkeynes@658: # Must skip GNU tar: if it does not support --format= it doesn't create nkeynes@658: # ustar tarball either. nkeynes@658: (tar --version) >/dev/null 2>&1 && continue nkeynes@658: am__tar='tar chf - "$$tardir"' nkeynes@658: am__tar_='tar chf - "$tardir"' nkeynes@658: am__untar='tar xf -' nkeynes@658: ;; nkeynes@658: pax) nkeynes@658: am__tar='pax -L -x $1 -w "$$tardir"' nkeynes@658: am__tar_='pax -L -x $1 -w "$tardir"' nkeynes@658: am__untar='pax -r' nkeynes@658: ;; nkeynes@658: cpio) nkeynes@658: am__tar='find "$$tardir" -print | cpio -o -H $1 -L' nkeynes@658: am__tar_='find "$tardir" -print | cpio -o -H $1 -L' nkeynes@658: am__untar='cpio -i -H $1 -d' nkeynes@658: ;; nkeynes@658: none) nkeynes@658: am__tar=false nkeynes@658: am__tar_=false nkeynes@658: am__untar=false nkeynes@658: ;; nkeynes@658: esac nkeynes@658: nkeynes@658: # If the value was cached, stop now. We just wanted to have am__tar nkeynes@658: # and am__untar set. nkeynes@658: test -n "${am_cv_prog_tar_$1}" && break nkeynes@658: nkeynes@658: # tar/untar a dummy directory, and stop if the command works nkeynes@658: rm -rf conftest.dir nkeynes@658: mkdir conftest.dir nkeynes@658: echo GrepMe > conftest.dir/file nkeynes@658: AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) nkeynes@658: rm -rf conftest.dir nkeynes@658: if test -s conftest.tar; then nkeynes@658: AM_RUN_LOG([$am__untar /dev/null 2>&1 && break nkeynes@658: fi nkeynes@658: done nkeynes@658: rm -rf conftest.dir nkeynes@658: nkeynes@658: AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) nkeynes@658: AC_MSG_RESULT([$am_cv_prog_tar_$1])]) nkeynes@658: AC_SUBST([am__tar]) nkeynes@658: AC_SUBST([am__untar]) nkeynes@658: ]) # _AM_PROG_TAR nkeynes@658: nkeynes@923: m4_include([acinclude.m4])