autoconf-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU Autoconf source repository branch, master, updated. v2.64-27-g


From: Ralf Wildenhues
Subject: [SCM] GNU Autoconf source repository branch, master, updated. v2.64-27-g5b5d0c5
Date: Wed, 09 Sep 2009 05:28:51 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Autoconf source repository".

http://git.sv.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=5b5d0c58422905f2cd1202cd685060a82e1e0673

The branch, master has been updated
       via  5b5d0c58422905f2cd1202cd685060a82e1e0673 (commit)
      from  36a50d910d2b917453617130298166f47c0ddc78 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 5b5d0c58422905f2cd1202cd685060a82e1e0673
Author: Ralf Wildenhues <address@hidden>
Date:   Wed Sep 9 07:27:39 2009 +0200

    Allow to work on systems without Fcntl::flock implementation.
    
    * configure.ac (PERL_FLOCK): New substitution variable with test
    whether Fcntl::flock is implemented by the system.
    * bin/Makefile.am (edit): Substitute @address@hidden
    * bin/autom4te.in: Call XFile::lock only if flock is
    implemented.
    
    Signed-off-by: Ralf Wildenhues <address@hidden>

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog       |    9 +++++++++
 bin/Makefile.am |    1 +
 bin/autom4te.in |    5 ++++-
 configure.ac    |   16 ++++++++++++++++
 4 files changed, 30 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index d074681..a6e453d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2009-09-09  Ralf Wildenhues  <address@hidden>
+
+       Allow to work on systems without Fcntl::flock implementation.
+       * configure.ac (PERL_FLOCK): New substitution variable with test
+       whether Fcntl::flock is implemented by the system.
+       * bin/Makefile.am (edit): Substitute @address@hidden
+       * bin/autom4te.in: Call XFile::lock only if flock is
+       implemented.
+
 2009-09-04  Reuben Thomas <address@hidden>  (tiny change)
 
        Mention the Autoconf archive.
diff --git a/bin/Makefile.am b/bin/Makefile.am
index da65b85..c84f5ae 100644
--- a/bin/Makefile.am
+++ b/bin/Makefile.am
@@ -38,6 +38,7 @@ RELEASE_YEAR = \
 edit = sed \
        -e 's|@address@hidden|$(SHELL)|g' \
        -e 's|@address@hidden|$(PERL)|g' \
+       -e 's|@address@hidden|$(PERL_FLOCK)|g' \
        -e 's|@address@hidden|$(bindir)|g' \
        -e 's|@address@hidden|$(pkgdatadir)|g' \
        -e 's|@address@hidden|$(prefix)|g' \
diff --git a/bin/autom4te.in b/bin/autom4te.in
index 3103369..d1aae94 100644
--- a/bin/autom4te.in
+++ b/bin/autom4te.in
@@ -68,6 +68,8 @@ my $tcache;
 my $ocache;
 my $icache_file;
 
+my $flock_implemented = '@PERL_FLOCK@';
+
 # The macros to trace mapped to their format, as specified by the
 # user.
 my %trace;
@@ -981,7 +983,8 @@ if (! -d "$cache")
 # files, but the index is the first and last file to be updated, so
 # locking it is sufficient.
 $icache_file = new Autom4te::XFile $icache, O_RDWR|O_CREAT;
-$icache_file->lock (LOCK_EX);
+$icache_file->lock (LOCK_EX)
+  if ($flock_implemented eq "yes");
 
 # Read the cache index if available and older than autom4te itself.
 # If autom4te is younger, then some structures such as C4che might
diff --git a/configure.ac b/configure.ac
index 0d579f8..1241264 100644
--- a/configure.ac
+++ b/configure.ac
@@ -137,6 +137,22 @@ $PERL -e 'require 5.005_03;' || {
    AC_MSG_ERROR([Perl 5.005_03 or better is required])
 }
 
+# Find out whether the system supports flock
+# Note this test does not try to find out whether it works with this
+# particular file system.  It merely avoids us running flock on systems
+# where that bails out.
+AC_CACHE_CHECK([whether $PERL Fcntl::flock is implemented],
+  [ac_cv_perl_flock_implemented],
+  [echo lock me > conftest.fil
+   if $PERL -e 'use Fcntl ":flock"; flock("conftest.fil", LOCK_EX); 1;'; then
+     ac_cv_perl_flock_implemented=yes
+   else
+     ac_cv_perl_flock_implemented=no
+   fi
+   rm -f conftest.fil
+  ])
+AC_SUBST([PERL_FLOCK], [$ac_cv_perl_flock_implemented])
+
 
 ## ------- ##
 ## Emacs.  ##


hooks/post-receive
-- 
GNU Autoconf source repository




reply via email to

[Prev in Thread] Current Thread [Next in Thread]