diff options
Diffstat (limited to 'm4')
-rw-r--r-- | m4/Makefile.inc | 79 | ||||
-rw-r--r-- | m4/amversion.m4 | 6 | ||||
-rw-r--r-- | m4/ar-lib.m4 | 5 | ||||
-rw-r--r-- | m4/init.m4 | 50 | ||||
-rw-r--r-- | m4/minuso.m4 | 32 | ||||
-rw-r--r-- | m4/prog-cc-c-o.m4 | 47 |
6 files changed, 180 insertions, 39 deletions
diff --git a/m4/Makefile.inc b/m4/Makefile.inc new file mode 100644 index 000000000..8df189074 --- /dev/null +++ b/m4/Makefile.inc @@ -0,0 +1,79 @@ +## Included by top-level Makefile for Automake. + +## Copyright (C) 1995-2013 Free Software Foundation, Inc. +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2, or (at your option) +## any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program. If not, see <http://www.gnu.org/licenses/>. + +## ------------------------------ ## +## Automake-provided m4 macros. ## +## ------------------------------ ## + +system_acdir = @system_acdir@ +automake_acdir = @automake_acdir@ + +dist_automake_ac_DATA = \ + %D%/amversion.m4 \ + %D%/ar-lib.m4 \ + %D%/as.m4 \ + %D%/auxdir.m4 \ + %D%/cond.m4 \ + %D%/cond-if.m4 \ + %D%/depend.m4 \ + %D%/depout.m4 \ + %D%/dmalloc.m4 \ + %D%/extra-recurs.m4 \ + %D%/gcj.m4 \ + %D%/init.m4 \ + %D%/install-sh.m4 \ + %D%/lead-dot.m4 \ + %D%/lex.m4 \ + %D%/lispdir.m4 \ + %D%/maintainer.m4 \ + %D%/make.m4 \ + %D%/missing.m4 \ + %D%/mkdirp.m4 \ + %D%/obsolete.m4 \ + %D%/options.m4 \ + %D%/python.m4 \ + %D%/prog-cc-c-o.m4 \ + %D%/runlog.m4 \ + %D%/sanity.m4 \ + %D%/silent.m4 \ + %D%/strip.m4 \ + %D%/substnot.m4 \ + %D%/tar.m4 \ + %D%/upc.m4 \ + %D%/vala.m4 + +dist_system_ac_DATA = %D%/acdir/README + +automake_internal_acdir = $(automake_acdir)/internal +dist_automake_internal_ac_DATA = %D%/internal/ac-config-macro-dirs.m4 + +# We build amversion.m4 here, instead of from config.status, +# because config.status is rerun each time one of configure's +# dependencies change and amversion.m4 happens to be a configure +# dependency. configure and amversion.m4 would be rebuilt in +# loop otherwise. +# Use '$(top_srcdir)' for the benefit of non-GNU makes: this is +# how amversion.m4 appears in our dependencies. +$(top_srcdir)/%D%/amversion.m4: $(srcdir)/configure.ac \ + $(srcdir)/%D%/amversion.in + $(AM_V_at)rm -f $@-t $@ + $(AM_V_GEN)in=amversion.in \ + && $(do_subst) <$(srcdir)/%D%/amversion.in >$@-t + $(generated_file_finalize) +EXTRA_DIST += %D%/amversion.in + +# vim: ft=automake noet diff --git a/m4/amversion.m4 b/m4/amversion.m4 index 1a044e096..b7d4c18e9 100644 --- a/m4/amversion.m4 +++ b/m4/amversion.m4 @@ -12,10 +12,10 @@ # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.13' +[am__api_version='1.13c' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.13.3a], [], +m4_if([$1], [1.13c], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -31,7 +31,7 @@ m4_define([_AM_AUTOCONF_VERSION], []) # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.13.3a])dnl +[AM_AUTOMAKE_VERSION([1.13c])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) diff --git a/m4/ar-lib.m4 b/m4/ar-lib.m4 index f895f6bd2..58726d0b0 100644 --- a/m4/ar-lib.m4 +++ b/m4/ar-lib.m4 @@ -19,7 +19,8 @@ AC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false]) : ${AR=ar} AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface], - [am_cv_ar_interface=ar + [AC_LANG_PUSH([C]) + am_cv_ar_interface=ar AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])], [am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([am_ar_try]) @@ -36,7 +37,7 @@ AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface], fi rm -f conftest.lib libconftest.a ]) - ]) + AC_LANG_POP([C])]) case $am_cv_ar_interface in ar) diff --git a/m4/init.m4 b/m4/init.m4 index 44b24819a..432ff200c 100644 --- a/m4/init.m4 +++ b/m4/init.m4 @@ -9,6 +9,12 @@ # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. +dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. +m4_define([AC_PROG_CC], +m4_defn([AC_PROG_CC]) +[_AM_PROG_CC_C_O +]) + # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- @@ -117,7 +123,48 @@ dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl -]) + +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: <http://www.gnu.org/software/coreutils/>. + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) + fi +fi]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further @@ -125,7 +172,6 @@ dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) - # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. diff --git a/m4/minuso.m4 b/m4/minuso.m4 deleted file mode 100644 index 984427cfc..000000000 --- a/m4/minuso.m4 +++ /dev/null @@ -1,32 +0,0 @@ -## -*- Autoconf -*- -# Copyright (C) 1999-2013 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_CC_C_O -# -------------- -# Like AC_PROG_CC_C_O, but changed for automake. -AC_DEFUN([AM_PROG_CC_C_O], -[AC_REQUIRE([AC_PROG_CC_C_O])dnl -AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([compile])dnl -# FIXME: we rely on the cache variable name because -# there is no other way. -set dummy $CC -am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` -eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o -if test "$am_t" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi -dnl Make sure AC_PROG_CC is never called again, or it will override our -dnl setting of CC. -m4_define([AC_PROG_CC], - [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])]) -]) diff --git a/m4/prog-cc-c-o.m4 b/m4/prog-cc-c-o.m4 new file mode 100644 index 000000000..3b2a849b0 --- /dev/null +++ b/m4/prog-cc-c-o.m4 @@ -0,0 +1,47 @@ +## -*- Autoconf -*- +# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_PROG_CC_C_O +# --------------- +# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC +# to automatically call this. +AC_DEFUN([_AM_PROG_CC_C_O], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([compile])dnl +AC_LANG_PUSH([C])dnl +AC_CACHE_CHECK( + [whether $CC understands -c and -o together], + [am_cv_prog_cc_c_o], + [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i]) +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +AC_LANG_POP([C])]) + +# For backward compatibility. +AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) |