summaryrefslogtreecommitdiff
path: root/skip/libreoffice/autoconf-boost-macros.patch
blob: 41dda982865c734aeb7e47449c3e0e465dd464b2 (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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
Fix language context when testing linking against boost, by moving
the AC_LANG_PUSH and AC_LANG_POP macros into a macro-wide scope for the
AX_BOOST_FOO macros.

Upstream: Pending
--- libreoffice-7.2.2.2.orig/m4/ax_boost_date_time.m4
+++ libreoffice-7.2.2.2/m4/ax_boost_date_time.m4
@@ -62,15 +62,15 @@
 		LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
 		export LDFLAGS
 
+	AC_LANG_PUSH([C++])
+
         AC_CACHE_CHECK(whether the Boost::Date_Time library is available,
 					   ax_cv_boost_date_time,
-        [AC_LANG_PUSH([C++])
-		 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/date_time/gregorian/gregorian_types.hpp>]],
+        [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/date_time/gregorian/gregorian_types.hpp>]],
                                    [[using namespace boost::gregorian; date d(2002,Jan,10);
                                      return 0;
                                    ]])],
          ax_cv_boost_date_time=yes, ax_cv_boost_date_time=no)
-         AC_LANG_POP([C++])
 		])
 		if test "x$ax_cv_boost_date_time" = "xyes"; then
 			AC_DEFINE(HAVE_BOOST_DATE_TIME,,[define if the Boost::Date_Time library is available])
@@ -110,4 +110,6 @@
 		CPPFLAGS="$CPPFLAGS_SAVED"
 	LDFLAGS="$LDFLAGS_SAVED"
 	fi
+
+	AC_LANG_POP([C++])
 ])
--- libreoffice-7.2.2.2.orig/m4/ax_boost_filesystem.m4
+++ libreoffice-7.2.2.2/m4/ax_boost_filesystem.m4
@@ -67,15 +67,15 @@
 		LIBS="$LIBS $BOOST_SYSTEM_LIB"
 		export LIBS
 
+	AC_LANG_PUSH([C++])
+
         AC_CACHE_CHECK(whether the Boost::Filesystem library is available,
 					   ax_cv_boost_filesystem,
-        [AC_LANG_PUSH([C++])
-         AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/filesystem/path.hpp>]],
+        [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/filesystem/path.hpp>]],
                                    [[using namespace boost::filesystem;
                                    path my_path( "foo/bar/data.txt" );
                                    return 0;]])],
 					       ax_cv_boost_filesystem=yes, ax_cv_boost_filesystem=no)
-         AC_LANG_POP([C++])
 		])
 		if test "x$ax_cv_boost_filesystem" = "xyes"; then
 			AC_DEFINE(HAVE_BOOST_FILESYSTEM,,[define if the Boost::Filesystem library is available])
@@ -115,4 +115,6 @@
 		LDFLAGS="$LDFLAGS_SAVED"
 		LIBS="$LIBS_SAVED"
 	fi
+
+	AC_LANG_POP([C++])
 ])
--- libreoffice-7.2.2.2.orig/m4/ax_boost_iostreams.m4
+++ libreoffice-7.2.2.2/m4/ax_boost_iostreams.m4
@@ -61,10 +61,11 @@
 		LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
 		export LDFLAGS
 
+	AC_LANG_PUSH([C++])
+
         AC_CACHE_CHECK(whether the Boost::IOStreams library is available,
 					   ax_cv_boost_iostreams,
-        [AC_LANG_PUSH([C++])
-		 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/iostreams/filtering_stream.hpp>
+        [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/iostreams/filtering_stream.hpp>
 											 @%:@include <boost/range/iterator_range.hpp>
 											]],
                                   [[std::string  input = "Hello World!";
@@ -73,7 +74,6 @@
 									 return 0;
                                    ]])],
                              ax_cv_boost_iostreams=yes, ax_cv_boost_iostreams=no)
-         AC_LANG_POP([C++])
 		])
 		if test "x$ax_cv_boost_iostreams" = "xyes"; then
 			AC_DEFINE(HAVE_BOOST_IOSTREAMS,,[define if the Boost::IOStreams library is available])
@@ -113,4 +113,6 @@
 		CPPFLAGS="$CPPFLAGS_SAVED"
 	LDFLAGS="$LDFLAGS_SAVED"
 	fi
+
+	AC_LANG_POP([C++])
 ])
--- libreoffice-7.2.2.2.orig/m4/ax_boost_locale.m4
+++ libreoffice-7.2.2.2/m4/ax_boost_locale.m4
@@ -62,9 +62,11 @@
 		LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
 		export LDFLAGS
 
+	AC_LANG_PUSH([C++])
+
         AC_CACHE_CHECK(whether the Boost::Locale library is available,
 					   ax_cv_boost_locale,
-        [AC_LANG_PUSH([C++])
+        [
 			 CXXFLAGS_SAVE=$CXXFLAGS
 
 			 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/locale.hpp>]],
@@ -72,7 +74,6 @@
                                    std::locale::global(gen(""));]])],
                    ax_cv_boost_locale=yes, ax_cv_boost_locale=no)
 			 CXXFLAGS=$CXXFLAGS_SAVE
-             AC_LANG_POP([C++])
 		])
 		if test "x$ax_cv_boost_locale" = "xyes"; then
 			AC_SUBST(BOOST_CPPFLAGS)
@@ -116,4 +117,6 @@
 		CPPFLAGS="$CPPFLAGS_SAVED"
 	LDFLAGS="$LDFLAGS_SAVED"
 	fi
+
+	AC_LANG_POP([C++])
 ])
--- libreoffice-7.2.2.2.orig/m4/ax_boost_system.m4
+++ libreoffice-7.2.2.2/m4/ax_boost_system.m4
@@ -64,9 +64,11 @@
 		LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
 		export LDFLAGS
 
+	AC_LANG_PUSH([C++])
+
         AC_CACHE_CHECK(whether the Boost::System library is available,
 					   ax_cv_boost_system,
-        [AC_LANG_PUSH([C++])
+        [
 			 CXXFLAGS_SAVE=$CXXFLAGS
 			 CXXFLAGS=
 
@@ -74,7 +76,6 @@
 				    [[boost::system::error_category *a = 0;]])],
                    ax_cv_boost_system=yes, ax_cv_boost_system=no)
 			 CXXFLAGS=$CXXFLAGS_SAVE
-             AC_LANG_POP([C++])
 		])
 		if test "x$ax_cv_boost_system" = "xyes"; then
 			AC_SUBST(BOOST_CPPFLAGS)
@@ -118,4 +119,6 @@
 		CPPFLAGS="$CPPFLAGS_SAVED"
 	LDFLAGS="$LDFLAGS_SAVED"
 	fi
+
+	AC_LANG_POP([C++])
 ])