Hi,
I tried to build libunwind from scratch and ran into a couple of small
issues:
1. There is no "autogen.sh" script to bootstrap the auto-tools. While I
understands this is not strictly necessary, it's a nice addition and
something found in pretty much any other project.
2. The man pages are re-generated uncondionnaly and require latex2man,
but the configure script does not check for latex2man, so if one doesn't
have latex2man installed on the host, the build fails.
Attached is a patch to address these two little issue:
1. Add the autogen.sh script (trivial)
2. Ad a new configure option "--enable-documentation" enabled by default
(to mimic current behavior) and check for latex2man presence only if
that option is enabled. If not, the man pages are not re-generated.
HTH,
Cheers,
Olivier
>From 5fdf8e14a39bb8ebca04ac394fb35a72a7695759 Mon Sep 17 00:00:00 2001
From: Olivier Fourdan <[email protected]>
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 <[email protected]>
---
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
_______________________________________________
Libunwind-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/libunwind-devel