summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDmitry Eremin-Solenikov <dbaryshkov@gmail.com>2018-11-05 14:30:53 +0300
committerDmitry Eremin-Solenikov <dbaryshkov@gmail.com>2018-11-10 00:24:30 +0300
commit464d03b67cda6cc9e1e25d888a59b108b872bbdd (patch)
tree563f3a923c40ed812c54b594660cb216c61329db /configure.ac
parente638f0c8f48f8ecebc515f049c58303b7087fbc7 (diff)
downloadgnutls-464d03b67cda6cc9e1e25d888a59b108b872bbdd.tar.gz
configure.ac: merge autogen/libopts checks
Move handling of autogen/libopts to a single place. Enforce usage of local libopts if autogen is not found. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac25
1 files changed, 11 insertions, 14 deletions
diff --git a/configure.ac b/configure.ac
index 0836c0bc39..2a36a6ed83 100644
--- a/configure.ac
+++ b/configure.ac
@@ -80,18 +80,6 @@ AC_ARG_ENABLE(tools,
enable_tools=$enableval, enable_tools=yes)
AM_CONDITIONAL(ENABLE_TOOLS, test "$enable_tools" != "no")
-if test "$enable_tools" != "no" || test "$enable_doc" != "no"; then
- AC_CHECK_PROG([AUTOGEN], [autogen], [autogen], [:])
-
- if test x"$AUTOGEN" = "x:"; then
- AC_MSG_WARN([[
-***
-*** autogen not found. Will not link against libopts.
-*** ]])
- included_libopts=yes
- fi
-fi
-
# For includes/gnutls/gnutls.h.in.
AC_SUBST(MAJOR_VERSION, `echo $PACKAGE_VERSION | sed 's/\(.*\)\..*\..*/\1/g'`)
AC_SUBST(MINOR_VERSION, `echo $PACKAGE_VERSION | sed 's/.*\.\(.*\)\..*/\1/g'`)
@@ -720,6 +708,16 @@ AC_SUBST(TROUSERS_LIB)
included_libopts=no
create_libopts_links=no
if test "$enable_tools" != "no" || test "$enable_doc" != "no"; then
+ AC_CHECK_PROG([AUTOGEN], [autogen], [autogen], [:])
+
+ if test x"$AUTOGEN" = "x:"; then
+ AC_MSG_WARN([[
+***
+*** autogen not found. Will not link against system libopts.
+*** ]])
+ dnl simulate specifying option on the command line
+ enable_local_libopts=yes
+ fi
LIBOPTS_CHECK([src/libopts])
if test "$NEED_LIBOPTS_DIR" = "true";then
dnl replace libopts-generated files with distributed backups, if present
@@ -730,9 +728,8 @@ if test "$enable_tools" != "no" || test "$enable_doc" != "no"; then
else
# Need to ensure the relevant conditionals get set
gl_STDNORETURN_H
+ AC_SUBST([AUTOGEN], [/bin/true])
AM_CONDITIONAL([INSTALL_LIBOPTS],[false])
- AM_CONDITIONAL([NEED_LIBOPTS], [false])
- included_libopts=yes
fi
AM_CONDITIONAL(NEED_LIBOPTS, test "$included_libopts" = "yes")