>From 5fdf8e14a39bb8ebca04ac394fb35a72a7695759 Mon Sep 17 00:00:00 2001 From: Olivier Fourdan Date: Tue, 2 Dec 2014 11:49:54 +0100 Subject: [PATCH] Fix build from scratch - Add autogen.sh to bootstrap autotools generation - Make generation of man pages optional, and check for availibity of latex2man if documentation is requested. Signed-off-by: Olivier Fourdan --- autogen.sh | 9 +++++++++ configure.ac | 14 +++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100755 autogen.sh diff --git a/autogen.sh b/autogen.sh new file mode 100755 index 0000000..b08bc83 --- /dev/null +++ b/autogen.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +test -n "$srcdir" || srcdir=`dirname "$0"` +test -n "$srcdir" || srcdir=. +( + cd "$srcdir" && + autoreconf --force -v --install +) || exit +test -n "$NOCONFIGURE" || "$srcdir/configure" "$@" diff --git a/configure.ac b/configure.ac index 582e71f..e66a769 100644 --- a/configure.ac +++ b/configure.ac @@ -124,6 +124,10 @@ AC_ARG_ENABLE(setjmp, [AS_IF([test x$target_arch == x$host_arch], [enable_setjmp=yes], [enable_setjmp=no])] ) +AC_ARG_ENABLE(documentation, + AS_HELP_STRING([--disable-documentation],[Disable generating the man pages]),, + [enable_documentation=yes]) + AC_MSG_CHECKING([if we should build libunwind-setjmp]) AC_MSG_RESULT([$enable_setjmp]) @@ -380,8 +384,16 @@ AC_SUBST(enable_cxx_exceptions) AC_SUBST(enable_debug_frame) AC_SUBST(DLLIB) +if test "x$enable_documentation" = "xyes"; then + AC_PATH_PROG([LATEX2MAN],[latex2man]) + if test "x$LATEX2MAN" = "x"; then + AC_MSG_ERROR([latex2man not found. Install latex2man or disable documentation using --disable-documentation]) + fi + AC_CONFIG_FILES(doc/Makefile doc/common.tex) +fi + AC_CONFIG_FILES(Makefile src/Makefile tests/Makefile tests/check-namespace.sh - doc/Makefile doc/common.tex include/libunwind-common.h + include/libunwind-common.h include/libunwind.h include/tdep/libunwind_i.h) AC_CONFIG_FILES(src/unwind/libunwind.pc src/coredump/libunwind-coredump.pc src/ptrace/libunwind-ptrace.pc src/setjmp/libunwind-setjmp.pc -- 2.1.0