make commit conflicts in configure files less likely

2009-08-22 Thread Ralf Wildenhues
Nodaways, most projects don't commit generated configure scripts to
version control any more, but some notable ones still do, e.g., GCC and
the GNU toolchain.  The Libtool macros provide a bit of a stumbling
block for this as they are the most prominent remaining cause for
conflicts in merging different changes in those scripts, due to the use
of expanded line numbers in the form of the __oline__ autom4te feature.

Now, since most modern shells (except for dash, hello, Debian :-)
implement $LINENO support fairly well, I think there is little reason
to rely on this arcane way of expanding line numbers at configure script
generation time any more.  I thus propose this patch to remove them.

OK?

Thanks,
Ralf

2009-08-20  Ralf Wildenhues  ralf.wildenh...@gmx.de

Remove __oline__ from macros, for less spurious configure diffs.
* libltdl/m4/libtool.m4 (_LT_ENABLE_LOCK, _LT_COMPILER_OPTION)
(_LT_COMPILER_C_O, LT_PATH_NM): Replace __oline__ instances with
$LINENO.
* NEWS: Update.

diff --git a/NEWS b/NEWS
index be4dc4d..8666196 100644
--- a/NEWS
+++ b/NEWS
@@ -48,6 +48,8 @@ New in 2.2.8 2009-??-??: git version 2.2.7a, Libtool team:
   - Link mode works around a parallel build failure on Darwin 9.6.0 due
 to the `ar' `flock'ing an archive upon extraction, by protecting the
 extraction of convenience archives with a lock.
+  - The Libtool macro files do not contain instances of __oline__ any more,
+easing merges for configure scripts that are added to version control.
 
 * Miscellaneous changes:
 
diff --git a/libltdl/m4/libtool.m4 b/libltdl/m4/libtool.m4
index eebe990..7d4bc31 100644
--- a/libltdl/m4/libtool.m4
+++ b/libltdl/m4/libtool.m4
@@ -1162,7 +1162,7 @@ ia64-*-hpux*)
   ;;
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '[#]line __oline__ configure'  conftest.$ac_ext
+  echo '[#]line '$LINENO' configure'  conftest.$ac_ext
   if AC_TRY_EVAL(ac_compile); then
 if test $lt_cv_prog_gnu_ld = yes; then
   case `/usr/bin/file conftest.$ac_objext` in
@@ -1351,11 +1351,11 @@ AC_CACHE_CHECK([$1], [$2],
-e 's:.*FLAGS}\{0,1\} :$lt_compiler_flag :; t' \
-e 's: [[^ ]]*conftest\.: $lt_compiler_flag:; t' \
-e 's:$: $lt_compiler_flag:'`
-   (eval echo \\$as_me:__oline__: $lt_compile\ AS_MESSAGE_LOG_FD)
+   (eval echo \\$as_me:$LINENO: $lt_compile\ AS_MESSAGE_LOG_FD)
(eval $lt_compile 2conftest.err)
ac_status=$?
cat conftest.err AS_MESSAGE_LOG_FD
-   echo $as_me:__oline__: \$? = $ac_status AS_MESSAGE_LOG_FD
+   echo $as_me:$LINENO: \$? = $ac_status AS_MESSAGE_LOG_FD
if (exit $ac_status)  test -s $ac_outfile; then
  # The compiler can only warn and ignore the option if not recognized
  # So say no if there are warnings other than the usual output.
@@ -1821,11 +1821,11 @@ AC_CACHE_CHECK([if $compiler supports -c -o 
file.$ac_objext],
-e 's:.*FLAGS}\{0,1\} :$lt_compiler_flag :; t' \
-e 's: [[^ ]]*conftest\.: $lt_compiler_flag:; t' \
-e 's:$: $lt_compiler_flag:'`
-   (eval echo \\$as_me:__oline__: $lt_compile\ AS_MESSAGE_LOG_FD)
+   (eval echo \\$as_me:$LINENO: $lt_compile\ AS_MESSAGE_LOG_FD)
(eval $lt_compile 2out/conftest.err)
ac_status=$?
cat out/conftest.err AS_MESSAGE_LOG_FD
-   echo $as_me:__oline__: \$? = $ac_status AS_MESSAGE_LOG_FD
+   echo $as_me:$LINENO: \$? = $ac_status AS_MESSAGE_LOG_FD
if (exit $ac_status)  test -s out/conftest2.$ac_objext
then
  # The compiler can only warn and ignore the option if not recognized
@@ -3204,13 +3204,13 @@ _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name 
lister])dnl
 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
   [lt_cv_nm_interface=BSD nm
   echo int some_variable = 0;  conftest.$ac_ext
-  (eval echo \\$as_me:__oline__: $ac_compile\ AS_MESSAGE_LOG_FD)
+  (eval echo \\$as_me:$LINENO: $ac_compile\ AS_MESSAGE_LOG_FD)
   (eval $ac_compile 2conftest.err)
   cat conftest.err AS_MESSAGE_LOG_FD
-  (eval echo \\$as_me:__oline__: $NM \\\conftest.$ac_objext 
AS_MESSAGE_LOG_FD)
+  (eval echo \\$as_me:$LINENO: $NM \\\conftest.$ac_objext 
AS_MESSAGE_LOG_FD)
   (eval $NM \conftest.$ac_objext\ 2conftest.err  conftest.out)
   cat conftest.err AS_MESSAGE_LOG_FD
-  (eval echo \\$as_me:__oline__: output\ AS_MESSAGE_LOG_FD)
+  (eval echo \\$as_me:$LINENO: output\ AS_MESSAGE_LOG_FD)
   cat conftest.out AS_MESSAGE_LOG_FD
   if $GREP 'External.*some_variable' conftest.out  /dev/null; then
 lt_cv_nm_interface=MS dumpbin




Re: make commit conflicts in configure files less likely

2009-08-22 Thread Bob Friesenhahn

On Sat, 22 Aug 2009, Ralf Wildenhues wrote:


Now, since most modern shells (except for dash, hello, Debian :-)
implement $LINENO support fairly well, I think there is little reason
to rely on this arcane way of expanding line numbers at configure script
generation time any more.  I thus propose this patch to remove them.

OK?


Yes, please.  This will be a welcome improvement for me.

Bob



Thanks,
Ralf

2009-08-20  Ralf Wildenhues  ralf.wildenh...@gmx.de

Remove __oline__ from macros, for less spurious configure diffs.
* libltdl/m4/libtool.m4 (_LT_ENABLE_LOCK, _LT_COMPILER_OPTION)
(_LT_COMPILER_C_O, LT_PATH_NM): Replace __oline__ instances with
$LINENO.
* NEWS: Update.

diff --git a/NEWS b/NEWS
index be4dc4d..8666196 100644
--- a/NEWS
+++ b/NEWS
@@ -48,6 +48,8 @@ New in 2.2.8 2009-??-??: git version 2.2.7a, Libtool team:
  - Link mode works around a parallel build failure on Darwin 9.6.0 due
to the `ar' `flock'ing an archive upon extraction, by protecting the
extraction of convenience archives with a lock.
+  - The Libtool macro files do not contain instances of __oline__ any more,
+easing merges for configure scripts that are added to version control.

* Miscellaneous changes:

diff --git a/libltdl/m4/libtool.m4 b/libltdl/m4/libtool.m4
index eebe990..7d4bc31 100644
--- a/libltdl/m4/libtool.m4
+++ b/libltdl/m4/libtool.m4
@@ -1162,7 +1162,7 @@ ia64-*-hpux*)
  ;;
*-*-irix6*)
  # Find out which ABI we are using.
-  echo '[#]line __oline__ configure'  conftest.$ac_ext
+  echo '[#]line '$LINENO' configure'  conftest.$ac_ext
  if AC_TRY_EVAL(ac_compile); then
if test $lt_cv_prog_gnu_ld = yes; then
  case `/usr/bin/file conftest.$ac_objext` in
@@ -1351,11 +1351,11 @@ AC_CACHE_CHECK([$1], [$2],
   -e 's:.*FLAGS}\{0,1\} :$lt_compiler_flag :; t' \
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag:; t' \
   -e 's:$: $lt_compiler_flag:'`
-   (eval echo \\$as_me:__oline__: $lt_compile\ AS_MESSAGE_LOG_FD)
+   (eval echo \\$as_me:$LINENO: $lt_compile\ AS_MESSAGE_LOG_FD)
   (eval $lt_compile 2conftest.err)
   ac_status=$?
   cat conftest.err AS_MESSAGE_LOG_FD
-   echo $as_me:__oline__: \$? = $ac_status AS_MESSAGE_LOG_FD
+   echo $as_me:$LINENO: \$? = $ac_status AS_MESSAGE_LOG_FD
   if (exit $ac_status)  test -s $ac_outfile; then
 # The compiler can only warn and ignore the option if not recognized
 # So say no if there are warnings other than the usual output.
@@ -1821,11 +1821,11 @@ AC_CACHE_CHECK([if $compiler supports -c -o 
file.$ac_objext],
   -e 's:.*FLAGS}\{0,1\} :$lt_compiler_flag :; t' \
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag:; t' \
   -e 's:$: $lt_compiler_flag:'`
-   (eval echo \\$as_me:__oline__: $lt_compile\ AS_MESSAGE_LOG_FD)
+   (eval echo \\$as_me:$LINENO: $lt_compile\ AS_MESSAGE_LOG_FD)
   (eval $lt_compile 2out/conftest.err)
   ac_status=$?
   cat out/conftest.err AS_MESSAGE_LOG_FD
-   echo $as_me:__oline__: \$? = $ac_status AS_MESSAGE_LOG_FD
+   echo $as_me:$LINENO: \$? = $ac_status AS_MESSAGE_LOG_FD
   if (exit $ac_status)  test -s out/conftest2.$ac_objext
   then
 # The compiler can only warn and ignore the option if not recognized
@@ -3204,13 +3204,13 @@ _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name 
lister])dnl
AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
  [lt_cv_nm_interface=BSD nm
  echo int some_variable = 0;  conftest.$ac_ext
-  (eval echo \\$as_me:__oline__: $ac_compile\ AS_MESSAGE_LOG_FD)
+  (eval echo \\$as_me:$LINENO: $ac_compile\ AS_MESSAGE_LOG_FD)
  (eval $ac_compile 2conftest.err)
  cat conftest.err AS_MESSAGE_LOG_FD
-  (eval echo \\$as_me:__oline__: $NM \\\conftest.$ac_objext 
AS_MESSAGE_LOG_FD)
+  (eval echo \\$as_me:$LINENO: $NM \\\conftest.$ac_objext 
AS_MESSAGE_LOG_FD)
  (eval $NM \conftest.$ac_objext\ 2conftest.err  conftest.out)
  cat conftest.err AS_MESSAGE_LOG_FD
-  (eval echo \\$as_me:__oline__: output\ AS_MESSAGE_LOG_FD)
+  (eval echo \\$as_me:$LINENO: output\ AS_MESSAGE_LOG_FD)
  cat conftest.out AS_MESSAGE_LOG_FD
  if $GREP 'External.*some_variable' conftest.out  /dev/null; then
lt_cv_nm_interface=MS dumpbin




--
Bob Friesenhahn
bfrie...@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,http://www.GraphicsMagick.org/




Re: [PATCH] Make compilation of preloaded module glue -Wstrict-prototypes clean

2009-08-22 Thread Ralf Wildenhues
Hello Lennart,

* Lennart Poettering wrote on Tue, Aug 11, 2009 at 08:20:22PM CEST:
 When generating the preloaded module glue code libtool generates invalid
 prototypes without argument lists. When compiling with slightly fascist
 compiler options (-Wstrict-prototypes) this has the effect of causing
 gcc to print gazillions of warnings when the final libtool call is done
 -- for each symbol one.
 
 This fix uses GCC's diagnostic pragma to override the
 -Wstrict-prototypes setting for the generated code and thus makes GCC
 shut up.

That sounds like a better idea to me than the earlier approach, thanks.

Pushed, and added you to THANKS.

Cheers,
Ralf




unattended testing on w32

2009-08-22 Thread Ralf Wildenhues
Hello,

both the old and the new Libtool testsuites contain some tests that
cause programs to fail to start, intentionally.  As we add more test
coverage, the number of such tests invariably increases, too.

Now, a failed program execution on MSYS will cause a popup window
notifying about the situation, requiring you to acknowledge it, and
maybe even to avoid sending an online report to some software vendor
we are not affiliated with.

Efficient testing is hard if it requires human attention, so let's
make it easy to run only the unattended parts, or only the complement.
The patch below introduces a new Autotest keyword 'interactive' for
those tests that may require user intervention (on w32).  It also adds
check-(non)interactive rules that run only the respective set of tests
in the new testsuite.

Some documentation about all used Autotest keywords is added, too, but
I'm not so sure whether that is a wise thing to do as it requires us to
be strict in test group naming (-k aka. --keyword also matches words in
the test group names).

I'm still pondering how to best treat the old testsuite here.  IIRC then
at least the demo-relink and depdemo-relink tests failed (any others?),
but they require a handful of other demo-*/depdemo-* tests to run first.

What do you think of this approach?

Note that, since Autotest also uses the test group names for matching
keywords, that means you cannot use the documented keywords freely in
new test group names except where appropriate.  I wonder if that should
be documented as well.

Thanks,
Ralf

Testsuite keyword 'interactive' and check-* rules.

* Makefile.am (testsuite_deps, testsuite_deps_uninstalled):
New variables.
(check-local, installcheck-local): Use them.
(check-interactive, check-noninteractive): New rules.
* tests/link-order2.at (Link order of deplibs),
tests/static.at (static linking flags for programs): Add keyword
`interactive'.
* doc/libtool.texi (Test descriptions): Document all keywords
used in the Libtool test suite.
* NEWS: Update.

diff --git a/Makefile.am b/Makefile.am
index 71fd91b..7f2f5c2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -546,19 +546,38 @@ DISTCLEANFILES += tests/atconfig
 
 CD_TESTDIR = abs_srcdir=`$(lt__cd) $(srcdir)  pwd`; cd tests
 
+testsuite_deps = tests/atconfig $(srcdir)/$(TESTSUITE)
+testsuite_deps_uninstalled = $(testsuite_deps) libltdl/libltdlc.la 
$(bin_SCRIPTS)
+
 # Hook the test suite into the check rule
-check-local: tests/atconfig $(srcdir)/$(TESTSUITE) libltdl/libltdlc.la 
$(bin_SCRIPTS)
+check-local: $(testsuite_deps_uninstalled)
$(CD_TESTDIR); \
CONFIG_SHELL=$(SHELL) $(SHELL) $$abs_srcdir/$(TESTSUITE) \
  $(TESTS_ENVIRONMENT) $(BUILDCHECK_ENVIRONMENT) $(TESTSUITEFLAGS)
 
 # Run the test suite on the *installed* tree.
-installcheck-local: tests/atconfig $(srcdir)/$(TESTSUITE)
+installcheck-local: $(testsuite_deps)
$(CD_TESTDIR); \
CONFIG_SHELL=$(SHELL) $(SHELL) $$abs_srcdir/$(TESTSUITE) \
  $(TESTS_ENVIRONMENT) $(INSTALLCHECK_ENVIRONMENT) $(TESTSUITEFLAGS) \
  AUTOTEST_PATH=$(exec_prefix)/bin
 
+# Run only noninteractive parts of the new testsuite.
+check-noninteractive: $(testsuite_deps_uninstalled)
+   $(CD_TESTDIR); \
+   CONFIG_SHELL=$(SHELL) $(SHELL) $$abs_srcdir/$(TESTSUITE) \
+ $(TESTS_ENVIRONMENT) $(BUILDCHECK_ENVIRONMENT) \
+ -k !interactive INNER_TESTSUITEFLAGS=,!interactive \
+ $(TESTSUITEFLAGS)
+
+# Run only interactive parts of the new testsuite.
+check-interactive: $(testsuite_deps_uninstalled)
+   $(CD_TESTDIR); \
+   CONFIG_SHELL=$(SHELL) $(SHELL) $$abs_srcdir/$(TESTSUITE) \
+ $(TESTS_ENVIRONMENT) $(BUILDCHECK_ENVIRONMENT) \
+ -k interactive -k recursive INNER_TESTSUITEFLAGS=,interactive \
+ $(TESTSUITEFLAGS)
+
 # We need to remove any file droppings left behind by testsuite
 clean-local: clean-local-legacy
-$(CD_TESTDIR); \
diff --git a/NEWS b/NEWS
index 899e085..ac15b55 100644
--- a/NEWS
+++ b/NEWS
@@ -15,6 +15,9 @@ New in 2.2.8 2009-??-??: git version 2.2.7a, Libtool team:
   - New libtool command line flag --no-finish, to use as an optimization to
 avoid multiple finish mode commands stemming from multiple installs into
 the same library directory.
+  - New convenience make targets `check-noninteractive' to avoid long testsuite
+runs on Windows with popup windows in the middle, and `check-interactive'
+for the complement set of tests.
 
 * Changes in supported systems or compilers:
 
diff --git a/doc/libtool.texi b/doc/libtool.texi
index 176f797..b4b9f37 100644
--- a/doc/libtool.texi
+++ b/doc/libtool.texi
@@ -5175,6 +5175,74 @@ directory, except that Fortran 90 is used in combination 
with the
 
 @end table
 
+The new, Autotest-based test suite uses keywords to classify certain
+test groups:
+
+...@table @samp
+...@item CXX
+...@itemx F77
+...@itemx FC
+...@itemx GCJ
+The test group exercises one of