[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] execinfo: new module
From: |
Paul Eggert |
Subject: |
Re: [PATCH] execinfo: new module |
Date: |
Fri, 24 Aug 2012 03:36:39 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:14.0) Gecko/20120714 Thunderbird/14.0 |
On 08/22/2012 05:16 AM, Bastien ROUCARIES wrote:
> Note that under bsd it will need -lexecinfo see
> http://trac.wxwidgets.org/ticket/9783
Thanks for mentioning that. I pushed the following patch,
though I don't have easy access to a host that needs this.
If you do, can you please try "./gnulib-tool --test execinfo"?
>From 0535296a730cc2cbf3cec5ff11ba7ac27f4fc202 Mon Sep 17 00:00:00 2001
From: Paul Eggert <address@hidden>
Date: Fri, 24 Aug 2012 03:29:39 -0700
Subject: [PATCH] execinfo: port to FreeBSD
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* m4/execinfo.m4 (gl_EXECINFO_H): Set LIB_EXECINFO to -lexecinfo
if needed, as in FreeBSD. Reported by Bastien Roucariès in
<http://lists.gnu.org/archive/html/bug-gnulib/2012-08/msg00113.html>.
* modules/execinfo (Link): Add $(LIB_EXECINFO).
---
ChangeLog | 8 ++++++++
m4/execinfo.m4 | 16 +++++++++++++---
modules/execinfo | 3 +++
3 files changed, 24 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 03a4ace..952b67a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2012-08-24 Paul Eggert <address@hidden>
+
+ execinfo: port to FreeBSD
+ * m4/execinfo.m4 (gl_EXECINFO_H): Set LIB_EXECINFO to -lexecinfo
+ if needed, as in FreeBSD. Reported by Bastien Roucariès in
+ <http://lists.gnu.org/archive/html/bug-gnulib/2012-08/msg00113.html>.
+ * modules/execinfo (Link): Add $(LIB_EXECINFO).
+
2012-08-23 Jim Meyering <address@hidden>
xstrtol.h: avoid "_Noreturn is not at beginning of declaration" warning
diff --git a/m4/execinfo.m4 b/m4/execinfo.m4
index fa2b845..f1f3cd9 100644
--- a/m4/execinfo.m4
+++ b/m4/execinfo.m4
@@ -9,13 +9,23 @@ AC_DEFUN([gl_EXECINFO_H],
[
AC_CHECK_HEADERS_ONCE([execinfo.h])
+ LIB_EXECINFO=''
+ EXECINFO_H='execinfo.h'
+
if test $ac_cv_header_execinfo_h = yes; then
- EXECINFO_H=''
- else
- EXECINFO_H='execinfo.h'
+ gl_saved_libs=$LIBS
+ AC_SEARCH_LIBS([backtrace_symbols_fd], [execinfo],
+ [test "$ac_cv_search_backtrace_symbols_fd" = "none required" ||
+ LIB_EXECINFO=$ac_cv_search_backtrace_symbols_fd])
+ LIBS=$gl_saved_libs
+ test "$ac_cv_search_backtrace_symbols_fd" = no || EXECINFO_H=''
+ fi
+
+ if test -n "$EXECINFO_H"; then
AC_LIBOBJ([execinfo])
fi
AC_SUBST([EXECINFO_H])
+ AC_SUBST([LIB_EXECINFO])
AM_CONDITIONAL([GL_GENERATE_EXECINFO_H], [test -n "$EXECINFO_H"])
])
diff --git a/modules/execinfo b/modules/execinfo
index 1578216..2a49f88 100644
--- a/modules/execinfo
+++ b/modules/execinfo
@@ -33,6 +33,9 @@ MOSTLYCLEANFILES += execinfo.h execinfo.h-t
Include:
<execinfo.h>
+Link:
+$(LIB_EXECINFO)
+
License:
LGPLv2+
--
1.7.6.5