diff options
author | Nick Alcock <nick.alcock@oracle.com> | 2014-03-05 00:56:43 +0000 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2014-03-06 18:27:08 +0100 |
commit | e18ff9c093edf2512aa4c17988c2c2172faf9e3d (patch) | |
tree | 9032b985f167a3a484ec4cc50c44d1e7370f1bea /configure.ac | |
parent | d9ce82a4ce690857f828e6c434718c2a85bfbab0 (diff) | |
download | gnutls-e18ff9c093edf2512aa4c17988c2c2172faf9e3d.tar.gz |
Overridewq AUTOGEN under --enable-local-libopts only if autogen is not needed.
After commit 6addbc3, specifying --enable-local-libopts unconditionally
replaces the autogen-erated files with their distributed copies, and
substitutes AUTOGEN to false.
The assumption here is that if --enable-local-libopts is not specified,
autogen cannot be installed, and that the distributed copies necessarily
exist. Neither assumption is always correct. e.g. someone building a
32-bit copy of GnuTLS from git with a copy of autogen on their system
will have a 64-bit copy of libopts, and a working /usr/bin/autogen,
but not a 32-bit libopts. Since building autogen depends on Guile,
this is a rather heavyweight pile of gear to require. (You can force
a successful build in this case, but it requires providing
AUTOGEN=/usr/bin/autogen to make(1), which is distinctly inelegant.)
So fix things so that if any of the distributed copies do not exist, we
do not substitute AUTOGEN, so as to let any copy of autogen that configure
found on the system do its job if necessary, while not forcing the user
to link against the copy of libopts which came with that autogen.
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index 6d4ce0227d..4fc54a7b18 100644 --- a/configure.ac +++ b/configure.ac @@ -411,14 +411,19 @@ AM_CONDITIONAL(ENABLE_TROUSERS, test "$with_tpm" != "no") LIBOPTS_CHECK([src/libopts]) if test "$NEED_LIBOPTS_DIR" = "true";then - dnl delete libopts-generated files + dnl replace libopts-generated files with distributed backups, if present + missing_baks= for i in ${srcdir}/src/*-args.c.bak ${srcdir}/src/*-args.h.bak; do nam=`echo $i|sed 's/.bak//g'` if test -f $i;then cp -f $i $nam + else + missing_baks=true fi done - AC_SUBST([AUTOGEN], [/bin/true]) + if test -z "$missing_baks"; then + AC_SUBST([AUTOGEN], [/bin/true]) + fi enable_local_libopts=yes else enable_local_libopts=no |