summaryrefslogtreecommitdiff
path: root/skip/ghc/0002-configure-fix-the-use-of-some-obsolete-macros-19189.patch
blob: 170013b3c07c98c922f0b4d3235191c9819c584c (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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
From dd5fcc988eb67dc6f3aaa6e423f3b41acf4302c4 Mon Sep 17 00:00:00 2001
From: Sylvain Henry <sylvain@haskus.fr>
Date: Fri, 8 Jan 2021 11:38:32 +0100
Subject: [PATCH 2/9] configure: fix the use of some obsolete macros (#19189)

(cherry picked from commit 66414bdf40534f07ac730e25f78e591994d2c1e4)
---
 aclocal.m4   | 30 +++++++++++++++---------------
 configure.ac | 40 ++++++++++++++++++++--------------------
 2 files changed, 35 insertions(+), 35 deletions(-)

diff --git a/aclocal.m4 b/aclocal.m4
index 60008fac60..6f18a9662d 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -917,7 +917,7 @@ AC_DEFUN(
     [FP_DEFAULT_CHOICE_OVERRIDE_CHECK],
     [AC_ARG_ENABLE(
         [$1],
-        [AC_HELP_STRING(
+        [AS_HELP_STRING(
             [--enable-$1],
             [$5])],
         [AS_IF(
@@ -1857,12 +1857,12 @@ AC_DEFUN([FP_ICONV],
   dnl environment.
 
   AC_ARG_WITH([iconv-includes],
-    [AC_HELP_STRING([--with-iconv-includes],
+    [AS_HELP_STRING([--with-iconv-includes],
       [directory containing iconv.h])],
       [ICONV_INCLUDE_DIRS=$withval])
 
   AC_ARG_WITH([iconv-libraries],
-    [AC_HELP_STRING([--with-iconv-libraries],
+    [AS_HELP_STRING([--with-iconv-libraries],
       [directory containing iconv library])],
       [ICONV_LIB_DIRS=$withval])
 
@@ -1879,23 +1879,23 @@ AC_DEFUN([FP_GMP],
   dnl--------------------------------------------------------------------
 
   AC_ARG_WITH([gmp-includes],
-    [AC_HELP_STRING([--with-gmp-includes],
+    [AS_HELP_STRING([--with-gmp-includes],
       [directory containing gmp.h])],
       [GMP_INCLUDE_DIRS=$withval])
 
   AC_ARG_WITH([gmp-libraries],
-    [AC_HELP_STRING([--with-gmp-libraries],
+    [AS_HELP_STRING([--with-gmp-libraries],
       [directory containing gmp library])],
       [GMP_LIB_DIRS=$withval])
 
   AC_ARG_WITH([intree-gmp],
-    [AC_HELP_STRING([--with-intree-gmp],
+    [AS_HELP_STRING([--with-intree-gmp],
       [force using the in-tree GMP])],
       [GMP_FORCE_INTREE=YES],
       [GMP_FORCE_INTREE=NO])
 
   AC_ARG_WITH([gmp-framework-preferred],
-    [AC_HELP_STRING([--with-gmp-framework-preferred],
+    [AS_HELP_STRING([--with-gmp-framework-preferred],
       [on OSX, prefer the GMP framework to the gmp lib])],
       [GMP_PREFER_FRAMEWORK=YES],
       [GMP_PREFER_FRAMEWORK=NO])
@@ -1915,7 +1915,7 @@ AC_DEFUN([FP_CURSES],
   dnl--------------------------------------------------------------------
 
   AC_ARG_WITH([curses-libraries],
-    [AC_HELP_STRING([--with-curses-libraries],
+    [AS_HELP_STRING([--with-curses-libraries],
       [directory containing curses libraries])],
       [CURSES_LIB_DIRS=$withval])
 
@@ -2347,7 +2347,7 @@ AC_DEFUN([FP_CPP_CMD_WITH_ARGS],[
 dnl ** what cpp to use?
 dnl --------------------------------------------------------------
 AC_ARG_WITH(hs-cpp,
-[AC_HELP_STRING([--with-hs-cpp=ARG],
+[AS_HELP_STRING([--with-hs-cpp=ARG],
       [Path to the (C) preprocessor for Haskell files [default=autodetect]])],
 [
     if test "$HostOS" = "mingw32"
@@ -2401,7 +2401,7 @@ AC_ARG_WITH(hs-cpp,
 dnl ** what cpp flags to use?
 dnl -----------------------------------------------------------
 AC_ARG_WITH(hs-cpp-flags,
-  [AC_HELP_STRING([--with-hs-cpp-flags=ARG],
+  [AS_HELP_STRING([--with-hs-cpp-flags=ARG],
       [Flags to the (C) preprocessor for Haskell files [default=autodetect]])],
   [
       if test "$HostOS" = "mingw32"
@@ -2443,7 +2443,7 @@ $2=$HS_CPP_ARGS
 AC_DEFUN([FP_BFD_SUPPORT], [
     AC_SUBST([CabalHaveLibbfd], [False])
     AC_ARG_ENABLE(bfd-debug,
-        [AC_HELP_STRING([--enable-bfd-debug],
+        [AS_HELP_STRING([--enable-bfd-debug],
               [Enable symbol resolution for -debug rts ('+RTS -Di') via binutils' libbfd [default=no]])],
         [
             # don't pollute general LIBS environment
@@ -2455,8 +2455,8 @@ AC_DEFUN([FP_BFD_SUPPORT], [
             dnl 'bfd_init' is a rare non-macro in libbfd
             AC_CHECK_LIB(bfd,    bfd_init)
 
-            AC_TRY_LINK([#include <bfd.h>],
-                        [
+            AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <bfd.h>]],
+                        [[
                                 /* mimic our rts/Printer.c */
                                 bfd* abfd;
                                 const char * name;
@@ -2478,7 +2478,7 @@ AC_DEFUN([FP_BFD_SUPPORT], [
                                     number_of_symbols = bfd_canonicalize_symtab (abfd, symbol_table);
                                     bfd_get_symbol_info(abfd,symbol_table[0],&info);
                                 }
-                        ],
+                        ]])],
                         [AC_SUBST([CabalHaveLibbfd], [True])],dnl bfd seems to work
                         [AC_MSG_ERROR([can't use 'bfd' library])])
             LIBS="$save_LIBS"
@@ -2519,7 +2519,7 @@ AC_DEFUN([FP_CC_LINKER_FLAG_TRY], [
 #
 AC_DEFUN([FIND_LD],[
     AC_ARG_ENABLE(ld-override,
-      [AC_HELP_STRING([--disable-ld-override],
+      [AS_HELP_STRING([--disable-ld-override],
         [Prevent GHC from overriding the default linker used by gcc. If ld-override is enabled GHC will try to tell gcc to use whichever linker is selected by the LD environment variable. [default=override enabled]])],
       [],
       [enable_ld_override=yes])
diff --git a/configure.ac b/configure.ac
index b34db739f5..d967d90e70 100644
--- a/configure.ac
+++ b/configure.ac
@@ -93,21 +93,21 @@ AC_ARG_WITH([ghc],
 AC_SUBST(WithGhc,$GHC)
 
 AC_ARG_ENABLE(bootstrap-with-devel-snapshot,
-[AC_HELP_STRING([--enable-bootstrap-with-devel-snapshot],
+[AS_HELP_STRING([--enable-bootstrap-with-devel-snapshot],
                 [Allow bootstrapping using a development snapshot of GHC.  This is not guaranteed to work.])],
         EnableBootstrapWithDevelSnaphost=YES,
         EnableBootstrapWithDevelSnaphost=NO
 )
 
 AC_ARG_ENABLE(tarballs-autodownload,
-[AC_HELP_STRING([--enable-tarballs-autodownload],
+[AS_HELP_STRING([--enable-tarballs-autodownload],
                 [Automatically download Windows distribution binaries if needed.])],
         TarballsAutodownload=YES,
         TarballsAutodownload=NO
 )
 
 AC_ARG_ENABLE(distro-toolchain,
-[AC_HELP_STRING([--enable-distro-toolchain],
+[AS_HELP_STRING([--enable-distro-toolchain],
                 [Do not use bundled Windows toolchain binaries.])],
         EnableDistroToolchain=YES,
         EnableDistroToolchain=NO
@@ -118,7 +118,7 @@ if test "$EnableDistroToolchain" = "YES"; then
 fi
 
 AC_ARG_ENABLE(native-io-manager,
-[AC_HELP_STRING([--enable-native-io-manager],
+[AS_HELP_STRING([--enable-native-io-manager],
                 [Enable the native I/O manager by default.])],
         EnableNativeIOManager=YES,
         EnableNativeIOManager=NO
@@ -875,7 +875,7 @@ AC_PATH_PROG(AutoreconfCmd, autoreconf, autoreconf)
 
 dnl ** check for dtrace (currently only implemented for Mac OS X)
 AC_ARG_ENABLE(dtrace,
-    [AC_HELP_STRING([--enable-dtrace],
+    [AS_HELP_STRING([--enable-dtrace],
         [Enable DTrace])],
     EnableDtrace=$enableval,
     EnableDtrace=yes
@@ -1066,7 +1066,7 @@ dnl ################################################################
 # system libffi
 
 AC_ARG_WITH([system-libffi],
-[AC_HELP_STRING([--with-system-libffi],
+[AS_HELP_STRING([--with-system-libffi],
   [Use system provided libffi for RTS [default=no]])
 ])
 
@@ -1077,7 +1077,7 @@ AS_IF([test "x$with_system_libffi" = "xyes"],
 AC_SUBST(UseSystemLibFFI)
 
 AC_ARG_WITH([ffi-includes],
-[AC_HELP_STRING([--with-ffi-includes=ARG],
+[AS_HELP_STRING([--with-ffi-includes=ARG],
   [Find includes for libffi in ARG [default=system default]])
 ],
 [
@@ -1092,7 +1092,7 @@ AC_ARG_WITH([ffi-includes],
 AC_SUBST(FFIIncludeDir)
 
 AC_ARG_WITH([ffi-libraries],
-[AC_HELP_STRING([--with-ffi-libraries=ARG],
+[AS_HELP_STRING([--with-ffi-libraries=ARG],
   [Find libffi in ARG [default=system default]])
 ],
 [
@@ -1165,7 +1165,7 @@ FP_CHECK_TIMER_CREATE
 
 dnl ** check for Apple's "interesting" long double compatibility scheme
 AC_MSG_CHECKING(for printf\$LDBLStub)
-AC_TRY_LINK_FUNC(printf\$LDBLStub,
+AC_LINK_IFELSE([AC_LANG_CALL([], [printf\$LDBLStub])],
     [
         AC_MSG_RESULT(yes)
         AC_DEFINE([HAVE_PRINTF_LDBLSTUB],[1],
@@ -1209,12 +1209,12 @@ dnl ** pthread_setname_np is a recent addition to glibc, and OS X has
 dnl    a different single-argument version.
 AC_CHECK_LIB(pthread, pthread_setname_np)
 AC_MSG_CHECKING(for pthread_setname_np)
-AC_TRY_LINK(
-[
+AC_LINK_IFELSE([AC_LANG_PROGRAM(
+[[
 #define _GNU_SOURCE
 #include <pthread.h>
-],
-[pthread_setname_np(pthread_self(), "name");],
+]],
+[[pthread_setname_np(pthread_self(), "name");]])],
     AC_MSG_RESULT(yes)
     AC_DEFINE([HAVE_PTHREAD_SETNAME_NP], [1],
       [Define to 1 if you have the glibc version of pthread_setname_np]),
@@ -1253,7 +1253,7 @@ dnl    VirtualAlloc MEM_RESERVE 1099512676352 bytes failed: The paging file is t
 dnl
 
 AC_ARG_ENABLE(large-address-space,
-    [AC_HELP_STRING([--enable-large-address-space],
+    [AS_HELP_STRING([--enable-large-address-space],
         [Use a single large address space on 64 bit systems (enabled by default on 64 bit platforms)])],
     EnableLargeAddressSpace=$enableval,
     EnableLargeAddressSpace=yes
@@ -1315,7 +1315,7 @@ AC_DEFINE_UNQUOTED([RTS_LINKER_USE_MMAP], [$RtsLinkerUseMmap],
 dnl ** Have libdw?
 dnl --------------------------------------------------------------
 AC_ARG_WITH([libdw-libraries],
-  [AC_HELP_STRING([--with-libdw-libraries=ARG],
+  [AS_HELP_STRING([--with-libdw-libraries=ARG],
     [Find libraries for libdw in ARG [default=system default]])
   ],
   [
@@ -1326,7 +1326,7 @@ AC_ARG_WITH([libdw-libraries],
 AC_SUBST(LibdwLibDir)
 
 AC_ARG_WITH([libdw-includes],
-  [AC_HELP_STRING([--with-libdw-includes=ARG],
+  [AS_HELP_STRING([--with-libdw-includes=ARG],
     [Find includes for libdw in ARG [default=system default]])
   ],
   [
@@ -1339,7 +1339,7 @@ AC_SUBST(LibdwIncludeDir)
 UseLibdw=NO
 USE_LIBDW=0
 AC_ARG_ENABLE(dwarf-unwind,
-    [AC_HELP_STRING([--enable-dwarf-unwind],
+    [AS_HELP_STRING([--enable-dwarf-unwind],
         [Enable DWARF unwinding support in the runtime system via elfutils' libdw [default=no]])])
 if test "$enable_dwarf_unwind" = "yes" ; then
   CFLAGS2="$CFLAGS"
@@ -1368,7 +1368,7 @@ AC_DEFINE_UNQUOTED([USE_LIBDW], [$USE_LIBDW], [Set to 1 to use libdw])
 dnl ** Have libnuma?
 dnl --------------------------------------------------------------
 AC_ARG_WITH([libnuma-libraries],
-  [AC_HELP_STRING([--with-libnuma-libraries=ARG],
+  [AS_HELP_STRING([--with-libnuma-libraries=ARG],
     [Find libraries for libnuma in ARG [default=system default]])
   ],
   [
@@ -1379,7 +1379,7 @@ AC_ARG_WITH([libnuma-libraries],
 AC_SUBST(LibNumaLibDir)
 
 AC_ARG_WITH([libnuma-includes],
-  [AC_HELP_STRING([--with-libnuma-includes=ARG],
+  [AS_HELP_STRING([--with-libnuma-includes=ARG],
     [Find includes for libnuma in ARG [default=system default]])
   ],
   [
@@ -1391,7 +1391,7 @@ AC_SUBST(LibNumaIncludeDir)
 
 HaveLibNuma=0
 AC_ARG_ENABLE(numa,
-    [AC_HELP_STRING([--enable-numa],
+    [AS_HELP_STRING([--enable-numa],
         [Enable NUMA memory policy and thread affinity support in the
          runtime system via numactl's libnuma [default=auto]])])
 
-- 
2.33.0