summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorStefano Lattarini <stefano.lattarini@gmail.com>2011-11-03 15:39:02 +0100
committerStefano Lattarini <stefano.lattarini@gmail.com>2011-11-03 16:08:02 +0100
commit5012480bf2586caf6dc642a1883a39991beb0804 (patch)
tree7e716b71697819ef9c90a431417f2e0d2734efd9 /m4
parentcc29c6174a7d68a70d33e5ff5af68e3e0ec0be54 (diff)
parente79b1bf3d8fa33bb4e2d4d3b6c4b1f90dd65ea40 (diff)
downloadautomake-5012480bf2586caf6dc642a1883a39991beb0804.tar.gz
Merge branch 'master' into testsuite-work
Commits merged from master: - tests: various minor tweakings, mostly related to AM_PROG_AR - maint-mode: fix botched configure messages - fix: regenerate Makefiles - tests: few improvements to some `ar-lib' related tests - info: allow user to inhibit creation/update of '${infodir}/dir' - warnings: new 'extra-portability' category, for AM_PROG_AR - ar-lib: new 'AM_PROG_AR' macro, triggering the 'ar-lib' script Extra testsuite adjustments: * tests/instspc.tap: Adjust to new portability requirements due to the new AM_PROG_AR macro. * tests/lex-lib.test: Likewise. * tests/extra-portability2.test: Use `$am_original_AUTOMAKE' instead of the obsolete `$original_AUTOMAKE'. * tests/list-of-tests.mk: Update.
Diffstat (limited to 'm4')
-rw-r--r--m4/Makefile.am1
-rw-r--r--m4/Makefile.in1
-rw-r--r--m4/ar-lib.m458
-rw-r--r--m4/maintainer.m46
4 files changed, 63 insertions, 3 deletions
diff --git a/m4/Makefile.am b/m4/Makefile.am
index a6491cfe7..d04ec9d33 100644
--- a/m4/Makefile.am
+++ b/m4/Makefile.am
@@ -20,6 +20,7 @@
dist_automake_ac_DATA = \
$(top_srcdir)/m4/amversion.m4 \
+ar-lib.m4 \
as.m4 \
auxdir.m4 \
ccstdc.m4 \
diff --git a/m4/Makefile.in b/m4/Makefile.in
index de296dc8b..0f1a0ad83 100644
--- a/m4/Makefile.in
+++ b/m4/Makefile.in
@@ -211,6 +211,7 @@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
dist_automake_ac_DATA = \
$(top_srcdir)/m4/amversion.m4 \
+ar-lib.m4 \
as.m4 \
auxdir.m4 \
ccstdc.m4 \
diff --git a/m4/ar-lib.m4 b/m4/ar-lib.m4
new file mode 100644
index 000000000..822ca6085
--- /dev/null
+++ b/m4/ar-lib.m4
@@ -0,0 +1,58 @@
+## -*- Autoconf -*-
+# Copyright (C) 2011 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.
+
+# serial 1
+
+# AM_PROG_AR([ACT-IF-FAIL])
+# -------------------------
+# Try to determine the archiver interface, and trigger the ar-lib wrapper
+# if it is needed. If the detection of archiver interface fails, run
+# ACT-IF-FAIL (default is to abort configure with a proper error message).
+AC_DEFUN([AM_PROG_AR],
+[AC_BEFORE([$0], [LT_INIT])dnl
+AC_BEFORE([$0], [AC_PROG_LIBTOOL])dnl
+AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([ar-lib])dnl
+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_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])
+ if test "$ac_status" -eq 0; then
+ am_cv_ar_interface=ar
+ else
+ am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
+ AC_TRY_EVAL([am_ar_try])
+ if test "$ac_status" -eq 0; then
+ am_cv_ar_interface=lib
+ else
+ m4_default([$1],
+ [AC_MSG_ERROR([could not determine $AR interface])])
+ fi
+ fi
+ rm -f conftest.lib libconftest.a
+ ])
+ ])
+
+case $am_cv_ar_interface in
+ar)
+ ;;
+lib)
+ # Microsoft lib, so override with the ar-lib wrapper script.
+ # FIXME: It is wrong to rewrite AR.
+ # 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__AR in this case,
+ # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something
+ # similar.
+ AR="$am_aux_dir/ar-lib $AR"
+ ;;
+esac
+AC_SUBST([AR])dnl
+])
diff --git a/m4/maintainer.m4 b/m4/maintainer.m4
index 0d0bf7f3b..b8f02bddb 100644
--- a/m4/maintainer.m4
+++ b/m4/maintainer.m4
@@ -1,8 +1,8 @@
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
# From Jim Meyering
-# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
-# Free Software Foundation, Inc.
+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008,
+# 2011 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -22,7 +22,7 @@ AC_DEFUN([AM_MAINTAINER_MODE],
[disable], [m4_define([am_maintainer_other], [enable])],
[m4_define([am_maintainer_other], [enable])
m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
-AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
+AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
dnl maintainer-mode's default is 'disable' unless 'enable' is passed
AC_ARG_ENABLE([maintainer-mode],
[AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],