X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=configure.ac;h=a8db0614ea8d5ed6e450e58b5ba282f09445a7d3;hb=c08068901f025912c8bd442f9e167546b8805753;hp=c8d5a344ae03e8647aff80ad9c0ef8fb1535bd70;hpb=7a56bed0b38cd90b89339b8bd638bfc7e7f6fe29;p=platform%2Fupstream%2Fautomake.git diff --git a/configure.ac b/configure.ac index c8d5a34..a8db061 100644 --- a/configure.ac +++ b/configure.ac @@ -15,8 +15,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -AC_PREREQ([2.68]) -AC_INIT([GNU Automake], [1.11a], [bug-automake@gnu.org]) +AC_PREREQ([2.69]) +AC_INIT([GNU Automake], [1.12.2a], [bug-automake@gnu.org]) AC_CONFIG_SRCDIR([automake.in]) AC_CONFIG_AUX_DIR([lib]) @@ -39,9 +39,14 @@ AC_SUBST([am_AUTOUPDATE], ["${AUTOUPDATE-autoupdate}"]) dnl We call AC_PROG_CC in an unusual way, and only for use in our dnl testsuite, so also use 'no-dependencies' and 'no-define' among dnl the automake options to avoid bloating and potential problems. -AM_INIT_AUTOMAKE([1.10a dist-xz filename-length-max=99 color-tests +AM_INIT_AUTOMAKE([dist-xz filename-length-max=99 color-tests parallel-tests silent-rules no-define no-dependencies]) +## Keep this on a line of its own, since it must be found and processed +## by the 'update-copyright' rule in our Makefile. +RELEASE_YEAR=2012 +AC_SUBST([RELEASE_YEAR]) + # The API version is the base version. We must guarantee # compatibility for all releases with the same API version. # Our current rule is that: @@ -124,9 +129,6 @@ AM_RUN_LOG([$TEX --version &AS_MESSAGE_LOG_FD 2>&1; test $? -eq 77; } + then + AC_MSG_RESULT([yes]) + $4 + else + AC_MSG_RESULT([no]) + $5 + fi]) + +# AM_CHECK_CANDIDATE_TEST_SHELL(SHELL-PATH) +# ----------------------------------------- +# +# Check if the given shell is good enough to run our test scripts. +# Inspired to gnulib's 'tests/init.sh'. +# +# We require POSIX and XSI features (e.g., '$(...)' for command +# substitutions, '$((...))' for shell arithmetic, and support for +# '${var#...}' and '${var%...}' parameter expansions). +# +# We require that the shell can correctly trap EXIT when 'set -e' is in +# effect (OSF1/Tru64 sh failed to do so, see commit v1.10b-52-g9fe8259). +# +# We want to able to define shell aliases with the same name of shell +# builtins. +# +# We also prefer shells that, when 'set -x' is in effect, do not also +# redirect traces upon stderr redirections. For example, +# $ set -x; echo x 2>file +# would emit "+ echo x" into file with older zsh versions. Similarly, +# $ set -x; P=1 true 2>file +# would emit "P=1" into file with /usr/xpg4/bin/sh from Solaris 10 and +# /bin/sh from SunOS 5.11 and OpenBSD 4.7. +# +# Finally, we look for weird bugs and portability problems mentioned in +# the Autoconf manual, and reject shells that suffers from them. (TODO) +# +# Use '$am_score' to indicate the degree of acceptability of the shell. +# A score of "10" means that the shell is good enough for our needs; +# a score of "9" means that the shell has some minor bugs or limitation, +# but is still (barely) acceptable for our uses. Any other score means +# that the shell is broken or unfit. +# +AC_DEFUN([_AM_CHECK_CANDIDATE_SHELL], + [am_score=10 + while :; do + + _AM_CHECK_SHELL_FEATURE([$1], + [supports \$(cmd)], + [test "$(echo x)" = x], + [], [am_score=1; break]) + + _AM_CHECK_SHELL_FEATURE([$1], + [supports \$((expr))], + [test $((1 + 2 * 3)) = 7], + [], [am_score=1; break]) + + _AM_CHECK_SHELL_FEATURE([$1], + [supports \${@%:@var}], + [zero='' one='x' twelve=' foobar baz!' \ + && test ${@%:@zero} -eq 0 \ + && test ${@%:@one} -eq 1 \ + && test ${@%:@twelve} -eq 12], + [], [am_score=1; break]) + + _AM_CHECK_SHELL_FEATURE([$1], + [supports \${var@%:@glob} and \${var%glob}], + [v=a/b/c \ + && test ${v@%:@*/} = b/c \ + && test ${v@%:@@%:@*/} = c \ + && test ${v%/*} = a/b \ + && test ${v%%/*} = a], + [], [am_score=1; break]) + + _AM_CHECK_SHELL_FEATURE([$1], + [preserves exit traps with "set -e"], + [set -e; trap 'exit $?' 0; (exit 77); exit 77], + [], [am_score=1; break]) + + _AM_CHECK_SHELL_FEATURE([$1], + [corrupts stderr with "set -x"], + [(set -x; P=1 true 2>&3) 3>&1 2>/dev/null | grep P=1], + [am_score=9], []) + + echo 'alias false=echo' > conftest-alias.sh + echo 'false && test "$(false 97)" = 97' >> conftest-alias.sh + _AM_CHECK_SHELL_FEATURE([$1], + [supports alias named like shell builtins], + [. ./conftest-alias.sh], + [rm -f conftest-alias.sh], + [rm -f conftest-alias.sh; am_score=1; break]) + + _AM_CHECK_SHELL_FEATURE([$1], + [supports "test -e"], + [test -e config.log && test -e . && test ! -e nonesuch], + [], [am_score=1; break]) + + break + done]) + +# These messages only goes to the config.log file. +AC_MSG_NOTICE([will now look for a sturdy POSIX shell, for our testsuite]) + +AC_CACHE_VAL( + [ac_cv_AM_TEST_RUNNER_SHELL], + [if test "$AM_TEST_RUNNER_SHELL"; then + # Let the user override it. + ac_cv_AM_TEST_RUNNER_SHELL=$AM_TEST_RUNNER_SHELL + else + ac_cv_AM_TEST_RUNNER_SHELL=no + am_candidate_shells=${CONFIG_SHELL-} + # For the benefit of Solaris. + am_PATH=$PATH$PATH_SEPARATOR/usr/xpg6/bin$PATH_SEPARATOR/usr/xpg4/bin + for am_sh in sh sh5 dash ash bash zsh ksh pdksh; do + AC_PATH_PROG([am_candidate_sh], [$am_sh], [], [$am_PATH]) + if test -n "$am_candidate_sh"; then + am_candidate_shells="$am_candidate_shells $am_candidate_sh" + fi + AM_SUBST_NOTMAKE([am_candidate_sh]) + # Must nullify these in order not to interfere with the checks in + # the next loop. + AS_UNSET([am_candidate_sh]) + AS_UNSET([ac_cv_path_am_candidate_sh]) + done + AS_UNSET([am_PATH]) # Not required anymore + for am_sh in $am_candidate_shells; do + am_score=0 + _AM_CHECK_CANDIDATE_SHELL([$am_sh]) + if test $am_score -eq 9; then + # The shell is barely acceptable for our needs. We might + # still find one that is even better, so continue looking. + AC_MSG_NOTICE([shell $am_sh is acceptable, but we might do better]) + ac_cv_AM_TEST_RUNNER_SHELL=$am_sh + elif test $am_score -eq 10; then + AC_MSG_NOTICE([shell $am_sh is good enough, stop looking]) + ac_cv_AM_TEST_RUNNER_SHELL=$am_sh + break + fi + done + fi + AM_TEST_RUNNER_SHELL=$ac_cv_AM_TEST_RUNNER_SHELL]) + +if test $AM_TEST_RUNNER_SHELL = no; then + AC_MSG_FAILURE([m4_normalize([no POSIX shell found that is good + enough to be used in our testsuite])]) else - am_cv_sh_errexit_works=no -fi -]) -if test $am_cv_sh_errexit_works = no; then - AC_MSG_WARN(["${MAKE-make} check" will leave leftover directories tests/*.dir]) - AC_MSG_WARN([you can clean them up manually using "${MAKE-make} clean" or]) - AC_MSG_WARN(["cd tests && ${MAKE-make} clean-local-check']) + AC_MSG_NOTICE([will use $AM_TEST_RUNNER_SHELL as the testsuite shell]) fi -AC_SUBST([sh_errexit_works], [$am_cv_sh_errexit_works]) + +AC_ARG_VAR([AM_TEST_RUNNER_SHELL], + [a sturdy POSIX shell for our testsuite]) ########################################################################### @@ -282,12 +450,23 @@ _AM_COMPILER_CAN_FAIL(dnl AS_IF([test x"$GCC" = x"yes"], [am_CC_is_GNU=yes], [am_CC_is_GNU=no]) +# On case-insensitive file systems (seen e.g. on Cygwin and Mac OS X) +# we must avoid looking for 'CC', because that would be the same as +# 'cc', and could cause $CXX to point to the C compiler, instead of +# to a C++ compiler as expected. See automake bugs #11893 and #10766. +if test -f /bIn/rMdIr || test -f /uSr/bIn/rMdIr; then + # Case-insensitive file system, don't look for CC. + am_CC= +else + am_CC=CC +fi + # The list of C++ compilers here has been copied, pasted and edited # from 'lib/autoconf/c.m4:AC_PROG_CXX' in the Autoconf distribution. # Keep it in sync, or better again, find out a way to avoid this code # duplication. _AM_COMPILER_CAN_FAIL([AC_PROG_CXX(dnl - [aCC CC FCC KCC RCC xlC_r xlC c++ cxx cc++ gpp g++])], + [aCC $am_CC FCC KCC RCC xlC_r xlC c++ cxx cc++ gpp g++])], [CXX=false; _AM_SKIP_COMP_TESTS([C++])]) AS_IF([test x"$GXX" = x"yes"], [am_CXX_is_GNU=yes], [am_CXX_is_GNU=no]) @@ -302,7 +481,6 @@ _AM_COMPILER_CAN_FAIL([AC_PROG_FC(dnl [xlf90 f90 pgf90 pghpf epcf90 g95 gfortran])], [FC=false; _AM_SKIP_COMP_TESTS([Fortran])]) -# FIXME this won't work as expected until we can assume autoconf 2.69 :-( AS_IF([test x"$GFC" = x"yes"], [am_FC_is_GNU=yes], [am_FC_is_GNU=no]) _AM_COMPILER_CAN_FAIL([AC_PROG_F77(dnl @@ -395,23 +573,20 @@ AC_SUBST([EXEEXT]) ########################################################################### -AC_CONFIG_FILES([ - Makefile - contrib/Makefile - doc/Makefile - lib/Automake/Makefile - lib/Makefile - lib/am/Makefile - m4/Makefile - tests/Makefile -]) +## ---------------------- ## +## Create output files. ## +## ---------------------- ## + +AC_CONFIG_FILES([Makefile]) + AC_CONFIG_LINKS([GNUmakefile:GNUmakefile]) -AC_CONFIG_LINKS([tests/defs:tests/defs]) -AC_CONFIG_FILES([tests/wrap/aclocal-${APIVERSION}:tests/wrap/aclocal.in], - [chmod +x tests/wrap/aclocal-${APIVERSION}], +AC_CONFIG_LINKS([defs:defs]) + +AC_CONFIG_FILES([t/wrap/aclocal-${APIVERSION}:t/wrap/aclocal.in], + [chmod +x t/wrap/aclocal-${APIVERSION}], [APIVERSION=$APIVERSION]) -AC_CONFIG_FILES([tests/wrap/automake-${APIVERSION}:tests/wrap/automake.in], - [chmod +x tests/wrap/automake-${APIVERSION}], +AC_CONFIG_FILES([t/wrap/automake-${APIVERSION}:t/wrap/automake.in], + [chmod +x t/wrap/automake-${APIVERSION}], [APIVERSION=$APIVERSION]) AC_OUTPUT