diff options
author | Gaetan Nadon <memsize@videotron.ca> | 2010-07-17 16:36:41 -0400 |
---|---|---|
committer | Gaetan Nadon <memsize@videotron.ca> | 2010-07-17 16:39:19 -0400 |
commit | a9f315f32bcc0636ada7427be9e3c5e3810af05e (patch) | |
tree | 775aaa89bd332474dbf102c8a87adc321f86a97a /configure.ac | |
parent | 29a157f7f181ac02c88537032dbcca29880c3068 (diff) |
config: allow to build tarball when yacc is missing
Autoconf does not handle this scenario as well as Automake does.
If gram.c is already there, do not abort the configuration
if yacc is missing as it is not needed.
If both gram.c and yacc are missing, abort configuration.
Yacc is a required tool to build the package.
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 726d457..a2907aa 100644 --- a/configure.ac +++ b/configure.ac @@ -37,7 +37,8 @@ AC_PROG_CC AC_PROG_INSTALL AC_PROG_YACC AC_PATH_PROG([YACC_INST], $YACC) -test -z "$YACC_INST" && AC_MSG_ERROR([yacc not found - unable to compile gram.y]) +AC_CHECK_FILE([$srcdir/gram.c], [], + [test -z "$YACC_INST" && AC_MSG_ERROR([yacc not found - unable to compile gram.y])]) AC_PROG_LEX AC_CHECK_FUNC([mkstemp], |