diff options
author | Ralf Wildenhues <Ralf.Wildenhues@gmx.de> | 2009-09-09 07:27:39 +0200 |
---|---|---|
committer | Ralf Wildenhues <Ralf.Wildenhues@gmx.de> | 2009-09-09 07:27:39 +0200 |
commit | 5b5d0c58422905f2cd1202cd685060a82e1e0673 (patch) | |
tree | 0dc69ffd4c9266cd1f83750d84c9e3e0e6f8fb62 /bin | |
parent | 36a50d910d2b917453617130298166f47c0ddc78 (diff) | |
download | autoconf-5b5d0c58422905f2cd1202cd685060a82e1e0673.tar.gz |
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 @PERL_FLOCK@.
* bin/autom4te.in: Call XFile::lock only if flock is
implemented.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Diffstat (limited to 'bin')
-rw-r--r-- | bin/Makefile.am | 1 | ||||
-rw-r--r-- | bin/autom4te.in | 5 |
2 files changed, 5 insertions, 1 deletions
diff --git a/bin/Makefile.am b/bin/Makefile.am index da65b85f..c84f5ae8 100644 --- a/bin/Makefile.am +++ b/bin/Makefile.am @@ -38,6 +38,7 @@ RELEASE_YEAR = \ edit = sed \ -e 's|@SHELL[@]|$(SHELL)|g' \ -e 's|@PERL[@]|$(PERL)|g' \ + -e 's|@PERL_FLOCK[@]|$(PERL_FLOCK)|g' \ -e 's|@bindir[@]|$(bindir)|g' \ -e 's|@pkgdatadir[@]|$(pkgdatadir)|g' \ -e 's|@prefix[@]|$(prefix)|g' \ diff --git a/bin/autom4te.in b/bin/autom4te.in index 3103369c..d1aae949 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 |