From fa3cd3c37ea508a1e9e2a12efd8066027649b4e4 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Thu, 3 May 2012 09:30:11 -0700 Subject: [PATCH] libatomic: Enable AM_MAINTAINER_MODE From-SVN: r187108 --- libatomic/ChangeLog | 3 ++- libatomic/Makefile.in | 9 ++++---- libatomic/aclocal.m4 | 40 +++++++++++++++++++++++++++++++++ libatomic/configure | 37 ++++++++++++++++++++++++++++-- libatomic/configure.ac | 1 + libatomic/testsuite/Makefile.in | 7 +++--- 6 files changed, 87 insertions(+), 10 deletions(-) diff --git a/libatomic/ChangeLog b/libatomic/ChangeLog index b112a4f1664..90dd53bb1ba 100644 --- a/libatomic/ChangeLog +++ b/libatomic/ChangeLog @@ -1,8 +1,9 @@ 2012-05-03 Richard Henderson + * configure.ac (AM_MAINTAINER_MODE): New. * acinclude.m4 (LIBAT_TEST_ATOMIC_BUILTIN): Handle compilation failure in gcc_no_link path. - * configure: Rebuild. + * configure, aclocal.m4, Makefile.in: Rebuild. 2012-05-01 Richard Henderson diff --git a/libatomic/Makefile.in b/libatomic/Makefile.in index 8577501986b..15c37a843d8 100644 --- a/libatomic/Makefile.in +++ b/libatomic/Makefile.in @@ -218,6 +218,7 @@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NM = @NM@ @@ -364,7 +365,7 @@ all: auto-config.h .SUFFIXES: .c .lo .o .obj am--refresh: Makefile @: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -391,9 +392,9 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck -$(top_srcdir)/configure: $(am__configure_deps) +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) -$(ACLOCAL_M4): $(am__aclocal_m4_deps) +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): @@ -404,7 +405,7 @@ auto-config.h: stamp-h1 stamp-h1: $(srcdir)/auto-config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status auto-config.h -$(srcdir)/auto-config.h.in: $(am__configure_deps) +$(srcdir)/auto-config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ diff --git a/libatomic/aclocal.m4 b/libatomic/aclocal.m4 index d326299648b..fc4f7f46c98 100644 --- a/libatomic/aclocal.m4 +++ b/libatomic/aclocal.m4 @@ -601,6 +601,46 @@ if test x"${install_sh}" != xset; then fi AC_SUBST(install_sh)]) +# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- +# From Jim Meyering + +# 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, +# with or without modifications, as long as this notice is preserved. + +# serial 5 + +# AM_MAINTAINER_MODE([DEFAULT-MODE]) +# ---------------------------------- +# Control maintainer-specific portions of Makefiles. +# Default is to disable them, unless `enable' is passed literally. +# For symmetry, `disable' may be passed as well. Anyway, the user +# can override the default with the --enable/--disable switch. +AC_DEFUN([AM_MAINTAINER_MODE], +[m4_case(m4_default([$1], [disable]), + [enable], [m4_define([am_maintainer_other], [disable])], + [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 enable maintainer-specific portions of Makefiles]) + dnl maintainer-mode's default is 'disable' unless 'enable' is passed + AC_ARG_ENABLE([maintainer-mode], +[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful + (and sometimes confusing) to the casual installer], + [USE_MAINTAINER_MODE=$enableval], + [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) + AC_MSG_RESULT([$USE_MAINTAINER_MODE]) + AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) + MAINT=$MAINTAINER_MODE_TRUE + AC_SUBST([MAINT])dnl +] +) + +AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) + # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. diff --git a/libatomic/configure b/libatomic/configure index 1a083159ace..b48e8f1e766 100755 --- a/libatomic/configure +++ b/libatomic/configure @@ -622,6 +622,9 @@ LIBAT_BUILD_VERSIONED_SHLIB_TRUE OPT_LDFLAGS SECTION_LDFLAGS libtool_VERSION +MAINT +MAINTAINER_MODE_FALSE +MAINTAINER_MODE_TRUE enable_static enable_shared CPP @@ -757,6 +760,7 @@ with_pic enable_fast_install with_gnu_ld enable_libtool_lock +enable_maintainer_mode enable_symvers ' ac_precious_vars='build_alias @@ -1399,6 +1403,8 @@ Optional Features: --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) + --enable-maintainer-mode enable make rules and dependencies not useful + (and sometimes confusing) to the casual installer --enable-symvers=STYLE enables symbol versioning of the shared library [default=yes] @@ -11002,7 +11008,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11005 "configure" +#line 11011 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11108,7 +11114,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11111 "configure" +#line 11117 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11348,6 +11354,29 @@ CC="$lt_save_CC" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 +$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } + # Check whether --enable-maintainer-mode was given. +if test "${enable_maintainer_mode+set}" = set; then : + enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval +else + USE_MAINTAINER_MODE=no +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 +$as_echo "$USE_MAINTAINER_MODE" >&6; } + if test $USE_MAINTAINER_MODE = yes; then + MAINTAINER_MODE_TRUE= + MAINTAINER_MODE_FALSE='#' +else + MAINTAINER_MODE_TRUE='#' + MAINTAINER_MODE_FALSE= +fi + + MAINT=$MAINTAINER_MODE_TRUE + + + # For libtool versioning info, format is CURRENT:REVISION:AGE libtool_VERSION=1:0:0 @@ -15212,6 +15241,10 @@ if test -z "${am__fastdepCCAS_TRUE}" && test -z "${am__fastdepCCAS_FALSE}"; then as_fn_error "conditional \"am__fastdepCCAS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then + as_fn_error "conditional \"MAINTAINER_MODE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${LIBAT_BUILD_VERSIONED_SHLIB_TRUE}" && test -z "${LIBAT_BUILD_VERSIONED_SHLIB_FALSE}"; then as_fn_error "conditional \"LIBAT_BUILD_VERSIONED_SHLIB\" was never defined. diff --git a/libatomic/configure.ac b/libatomic/configure.ac index 18d1dea0503..1b4f325d30c 100644 --- a/libatomic/configure.ac +++ b/libatomic/configure.ac @@ -144,6 +144,7 @@ AC_PROG_INSTALL AM_PROG_LIBTOOL AC_SUBST(enable_shared) AC_SUBST(enable_static) +AM_MAINTAINER_MODE # For libtool versioning info, format is CURRENT:REVISION:AGE libtool_VERSION=1:0:0 diff --git a/libatomic/testsuite/Makefile.in b/libatomic/testsuite/Makefile.in index 593d0f3826b..30d2a0fb019 100644 --- a/libatomic/testsuite/Makefile.in +++ b/libatomic/testsuite/Makefile.in @@ -98,6 +98,7 @@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ NM = @NM@ @@ -202,7 +203,7 @@ RUNTEST = "$(_RUNTEST) $(AM_RUNTESTFLAGS)" all: all-am .SUFFIXES: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -227,9 +228,9 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(top_srcdir)/configure: $(am__configure_deps) +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps):