• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/package/lttng-babeltrace/0002-m4-ax_lib_elfutils.m4-add-cache-variable.patch
Philippe ProulxPhilippe Proulx committed 625af098cd302 Nov 2016
Raw file
Source viewDiff to previous
xxxxxxxxxx
 
1
From 697ab0905c59561562dc52cd3b925781e07814f3 Mon Sep 17 00:00:00 2001
2
From: Philippe Proulx <eeppeliteloop@gmail.com>
3
Date: Wed, 2 Nov 2016 01:40:12 -0400
4
Subject: [PATCH] m4/ax_lib_elfutils.m4: add cache variable
5
​
6
This patch adds an autoconf cache variable to override the
7
AC_RUN_IFELSE() test result when cross-compiling.
8
​
9
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
10
[Philippe: grabbed from this pull request:
11
    https://github.com/efficios/babeltrace/pull/52
12
]
13
---
14
 m4/ax_lib_elfutils.m4 | 32 +++++++++++++++++---------------
15
 1 file changed, 17 insertions(+), 15 deletions(-)
16
​
17
diff --git a/m4/ax_lib_elfutils.m4 b/m4/ax_lib_elfutils.m4
18
index fcfe06b..f4fcb0d 100644
19
--- a/m4/ax_lib_elfutils.m4
20
+++ b/m4/ax_lib_elfutils.m4
21
@@ -21,7 +21,9 @@
22
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23
 #
24
 # Check the currently installed version of elfutils by using the
25
-# _ELFUTILS_PREREQ macro defined in elfutils/version.h.
26
+# `_ELFUTILS_PREREQ` macro defined in <elfutils/version.h>.
27
+#
28
+# The cache variable for this test is `bt_cv_lib_elfutils`.
29
 #
30
 # AX_LIB_ELFUTILS(MAJOR_VERSION, MINOR_VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
31
 # ---------------------------------------------------------------------------
32
@@ -29,7 +31,6 @@ AC_DEFUN([AX_LIB_ELFUTILS], [
33
    m4_pushdef([major_version], [$1])
34
    m4_pushdef([minor_version], [$2])
35
 
36
-   AC_MSG_CHECKING([for elfutils version >= major_version.minor_version])
37
    m4_if([$#], 3, [
38
        m4_pushdef([true_action], [$3])
39
    ], [
40
@@ -43,20 +44,21 @@ AC_DEFUN([AX_LIB_ELFUTILS], [
41
            AC_MSG_ERROR(elfutils >= major_version.minor_version is required)])
42
    ])
43
 
44
-   AC_RUN_IFELSE([
45
-       AC_LANG_SOURCE([
46
-           #include <stdlib.h>
47
-           #include <elfutils/version.h>
48
+   AC_CACHE_CHECK(
49
+       [for elfutils version >= major_version.minor_version],
50
+       [bt_cv_lib_elfutils], [
51
+           AC_RUN_IFELSE([AC_LANG_SOURCE([
52
+               #include <stdlib.h>
53
+               #include <elfutils/version.h>
54
+
55
+               int main(void) {
56
+                   return _ELFUTILS_PREREQ(major_version, minor_version) ? EXIT_SUCCESS : EXIT_FAILURE;
57
+               }
58
+           ])], [bt_cv_lib_elfutils=yes], [bt_cv_lib_elfutils=no])
59
+       ]
60
+   )
61
 
62
-           int main(void) {
63
-               return _ELFUTILS_PREREQ(major_version, minor_version) ? EXIT_SUCCESS : EXIT_FAILURE;
64
-           }
65
-       ])
66
-   ],
67
-       echo yes
68
-       true_action,
69
-       echo no
70
-       false_action)
71
+   AS_IF([test "x$bt_cv_lib_elfutils" = "xyes"], [true_action], [false_action])
72
 
73
    m4_popdef([false_action])
74
    m4_popdef([true_action])
75
-- 
76
2.9.3
77
​
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.