aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-connectivity/samba/samba-3.6.8/configure-libunwind.patch
blob: 9a2cb00eba553b8fbfbb54c6030516c891bb7707 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
samba: add --enable-libunwind option

Upstream-Status: Pending

This let the end user explicitly enable/disable libunwind support.
---
 configure |   28 ++++++++++++++++++++++++++--
 1 file changed, 26 insertions(+), 2 deletions(-)

diff -urpN a/source3/configure b/source3/configure
--- a/source3/configure
+++ b/source3/configure
@@ -1007,6 +1007,7 @@ with_included_iniparser
 with_static_modules
 with_shared_modules
 enable_dmalloc
+enable_libunwind
 '
       ac_precious_vars='build_alias
 host_alias
@@ -1670,6 +1671,7 @@ Optional Features:
   --enable-avahi          Enable Avahi support (default=auto)
   --enable-pthreadpool    Enable pthreads pool helper support (default=no)
   --enable-dmalloc        Enable heap debugging [default=no]
+  --enable-libunwind      Enable libunwind support if available (default=no)
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
@@ -16458,7 +16460,7 @@ done
 
 
 # Find a method of generating a stack trace
-for ac_header in execinfo.h libexc.h libunwind.h
+for ac_header in execinfo.h libexc.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -16684,6 +16686,13 @@ fi
 
 LIBS="$save_LIBS"
 
+# Check whether --enable-libunwind was given.
+if test "${enable_libunwind+set}" = set; then :
+  enableval=$enable_libunwind;
+fi
+
+if test "x$enable_libunwind" != xno
+then
 # Note that all the libunwind symbols in the API are defined to internal
 # platform-specific version, so we must include libunwind.h before checking
 # any of them.
@@ -16691,6 +16700,21 @@ LIBS="$save_LIBS"
 $as_echo_n "checking for libunwind... " >&6; }
 save_LIBS=$LIBS
 
+# Check for libunwind.h present
+for ac_header in libunwind.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+eval as_val=\$$as_ac_Header
+   if test "x$as_val" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
 UNWIND_ARCH="unknown"
 if test x"$UNAME_I" != x"unknown"; then
 	UNWIND_ARCH="$UNAME_I"
@@ -16877,7 +16901,7 @@ fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
 fi
-
+fi
 
 
 for ac_func in _dup _dup2 _opendir _readdir _seekdir _telldir _closedir