summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac40
1 files changed, 39 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 1b121d9..8076382 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
-# Copyright (C) 1993-2016 Free Software Foundation, Inc.
+# Copyright (C) 1993-2017 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -294,6 +294,44 @@ if test "$gl_gcc_warnings" = yes; then
AC_SUBST([GNULIB_TEST_WARN_CFLAGS])
fi
+AM_CONDITIONAL([CROSS_COMPILING], [test "$cross_compiling" = yes])
+
+# Perl is needed for help2man
+AC_PATH_PROG([PERL], [perl])
+
+# building from tarball?
+built_from_tarball=no
+test -f "$srcdir"/.tarball-version && \
+ ! test -d "$srcdir/.git" && \
+ built_from_tarball=yes
+
+# Can the man page be built?
+# Perl needed for help2man, executing sed needed for 'sed --help'
+can_rebuild_man_page=no
+test -n "$PERL" && \
+ test "$cross_compiling" != yes && \
+ can_rebuild_man_page=yes
+
+# Build the man page when
+# building from git and rebuilding is possible.
+AM_CONDITIONAL([BUILD_MAN_PAGE],
+ [test "$built_from_tarball" = no && \
+ test "$can_rebuild_man_page" = yes])
+
+# Create a stub man page instead of failing when
+# building from git and rebuilding is not possible.
+AM_CONDITIONAL([BUILD_DUMMY_MAN_PAGE],
+ [test "$built_from_tarball" = no && \
+ test "$can_rebuild_man_page" = no])
+
+
+# This is needed when building outside the source dir
+# with --disable-dependency-tracking, see https://bugs.gnu.org/25371
+AS_MKDIR_P([lib])
+AS_MKDIR_P([sed])
+AS_MKDIR_P([doc])
+AS_MKDIR_P([testsuite])
+
AC_CONFIG_FILES([
Makefile
po/Makefile.in