summaryrefslogtreecommitdiff
path: root/recipes/mutt/mutt-1.5.4i/configure.patch
blob: 70cf2b36f060ca1a1449668ee3f19f0d4fb6961e (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
299
300
301
302
303

#
# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
#

--- mutt-1.5.4/./configure.in~configure
+++ mutt-1.5.4/./configure.in
@@ -3,8 +3,9 @@
 dnl !!! WHEN ADDING NEW CONFIGURE TESTS, PLEASE ADD CODE TO MAIN.C !!!
 dnl !!! TO DUMP THEIR RESULTS WHEN MUTT -V IS CALLED            !!!
 
-AC_PREREQ(2.12)
-AC_INIT(mutt.h)
+AC_PREREQ(2.57)
+AC_INIT
+AC_CONFIG_SRCDIR([mutt.h])
 AM_CONFIG_HEADER(config.h)
 
 mutt_cv_version=`cat $srcdir/VERSION`
@@ -151,7 +152,7 @@
 
 AC_ARG_WITH(slang, [  --with-slang[=DIR]         Use S-Lang instead of ncurses],
         [AC_CACHE_CHECK([if this is a BSD system], mutt_cv_bsdish,
-                [AC_TRY_RUN([#include <sys/param.h>
+                [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <sys/param.h>
 
 main ()
 {
@@ -160,10 +161,7 @@
 #else
         exit (1);
 #endif
-}],
-                        mutt_cv_bsdish=yes,
-                        mutt_cv_bsdish=no,
-                        mutt_cv_bsdish=no)])
+}]])],[mutt_cv_bsdish=yes],[mutt_cv_bsdish=no],[mutt_cv_bsdish=no])])
 
         AC_MSG_CHECKING(for S-Lang)
         if test $withval = yes; then
@@ -294,7 +292,8 @@
     AC_DEFINE(SIG_ATOMIC_VOLATILE_T, [volatile sig_atomic_t])
 fi
 
-AC_DECL_SYS_SIGLIST
+AC_CHECK_DECLS([sys_siglist])
+
 
 dnl For MD5 and SHA1 on 64-bit systems
 AC_C_BIGENDIAN
@@ -302,7 +301,7 @@
 dnl This is the method autoconf-2.50's new AC_CHECK_TYPE macro uses.
 dnl We need to be backwards compatible to autoconf 2.13, though. -lh
 AC_MSG_CHECKING(for uint32_t)
-AC_TRY_COMPILE([
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
 #include <sys/types.h>
 #if HAVE_INTTYPES_H
 #include <inttypes.h>
@@ -310,16 +309,15 @@
 #if HAVE_STDINT_H
 #include <stdint.h>
 #endif
-#endif],
-[if ((uint32_t *) 0)
+#endif]], [[if ((uint32_t *) 0)
   return 0;
 if (sizeof (uint32_t))
   return 0;
-],[
+]])],[
     AC_DEFINE(HAVE_UINT32_T,1,[ Define if you have the uint32_t type. ])
     AC_MSG_RESULT(yes)
-  ], AC_MSG_RESULT(no)
-)
+  ],[AC_MSG_RESULT(no)
+])
 AC_CHECK_SIZEOF(int)
 AC_CHECK_SIZEOF(long)
 
@@ -339,8 +337,7 @@
 AC_CHECK_FUNCS(snprintf, , [mutt_cv_snprintf=yes])
 AC_CHECK_FUNCS(vsnprintf, , [mutt_cv_snprintf=yes])
 if test $mutt_cv_snprintf = yes; then
-#        AC_LIBOBJ(snprintf)
-        LIBOBJS="$LIBOBJS snprintf.o"
+        AC_LIBOBJ(snprintf)
 fi
 
 dnl SCO uses chsize() instead of ftruncate()
@@ -359,21 +356,19 @@
 if test $mutt_cv_regex = no ; then
 AC_CACHE_CHECK([whether your system's regexp library is completely broken],
         [mutt_cv_regex_broken],
-        AC_TRY_RUN([
+        AC_RUN_IFELSE([AC_LANG_SOURCE([[
 #include <unistd.h>
 #include <regex.h>
-main() { regex_t blah ; regmatch_t p; p.rm_eo = p.rm_eo; return regcomp(&blah, "foo.*bar", REG_NOSUB) || regexec (&blah, "foobar", 0, NULL, 0); }],
-        mutt_cv_regex_broken=no, mutt_cv_regex_broken=yes, mutt_cv_regex_broken=yes))
+main() { regex_t blah ; regmatch_t p; p.rm_eo = p.rm_eo; return regcomp(&blah, "foo.*bar", REG_NOSUB) || regexec (&blah, "foobar", 0, NULL, 0); }]])],[mutt_cv_regex_broken=no],[mutt_cv_regex_broken=yes],[mutt_cv_regex_broken=yes]))
         if test $mutt_cv_regex_broken = yes ; then
-                echo "Using the included GNU regex instead." >&AC_FD_MSG
+                echo "Using the included GNU regex instead." >&AS_MESSAGE_FD([])
                 mutt_cv_regex=yes
         fi
 fi
 
 if test $mutt_cv_regex = yes; then
         AC_DEFINE(USE_GNU_REGEX,1,[ Define if you want to use the included regex.c. ])
-###     AC_LIBOBJ(regex)
-        LIBOBJS="$LIBOBJS regex.o"
+        AC_LIBOBJ(regex)
 fi
 
 
@@ -410,7 +405,7 @@
         fi
         AC_DEFINE_UNQUOTED(MAILPATH,"$mutt_cv_mailpath",[ Where new mail is spooled. ])
 
-        AC_CACHE_CHECK(if $mutt_cv_mailpath is world writable, mutt_cv_worldwrite, [AC_TRY_RUN([#include <sys/types.h>
+        AC_CACHE_CHECK(if $mutt_cv_mailpath is world writable, mutt_cv_worldwrite, [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <sys/types.h>
 #include <sys/stat.h>
 
 int main (int argc, char **argv)
@@ -420,14 +415,14 @@
         stat ("$mutt_cv_mailpath", &s);
         if (s.st_mode & S_IWOTH) exit (0);
         exit (1);
-}], mutt_cv_worldwrite=yes, mutt_cv_worldwrite=no, mutt_cv_worldwrite=no)])
+}]])],[mutt_cv_worldwrite=yes],[mutt_cv_worldwrite=no],[mutt_cv_worldwrite=no])])
 
         mutt_cv_setgid=no
         if test $mutt_cv_worldwrite = yes; then
                 AC_DEFINE(USE_DOTLOCK,1,[ Define to use dotlocking for mailboxes. ])
         else
 
-                AC_CACHE_CHECK(if $mutt_cv_mailpath is group writable, mutt_cv_groupwrite, [AC_TRY_RUN([#include <sys/types.h>
+                AC_CACHE_CHECK(if $mutt_cv_mailpath is group writable, mutt_cv_groupwrite, [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <sys/types.h>
 #include <sys/stat.h>
 
 int main (int argc, char **argv)
@@ -437,7 +432,7 @@
         stat ("$mutt_cv_mailpath", &s);
         if (s.st_mode & S_IWGRP) exit (0);
         exit (1);
-}], mutt_cv_groupwrite=yes, mutt_cv_groupwrite=no, mutt_cv_groupwrite=no)])
+}]])],[mutt_cv_groupwrite=yes],[mutt_cv_groupwrite=no],[mutt_cv_groupwrite=no])])
 
                 if test $mutt_cv_groupwrite = yes; then
                         AC_DEFINE(USE_DOTLOCK,1,[ Define to use dotlocking for mailboxes. ])
@@ -813,7 +808,7 @@
 AC_CACHE_CHECK([whether this iconv is good enough], mutt_cv_iconv_good,
         mutt_save_LIBS="$LIBS"
         LIBS="$LIBS $LIBICONV"
-        AC_TRY_RUN([
+        AC_RUN_IFELSE([AC_LANG_SOURCE([[
 #include <iconv.h>
 int main()
 {
@@ -829,10 +824,7 @@
            !(ob == buf && obl == sizeof(buf)) ||
            iconv_close(cd)));
 }
-                ],
-                mutt_cv_iconv_good=yes,
-                mutt_cv_iconv_good=no,
-                mutt_cv_iconv_good=yes)
+                ]])],[mutt_cv_iconv_good=yes],[mutt_cv_iconv_good=no],[mutt_cv_iconv_good=yes])
         LIBS="$mutt_save_LIBS")
 if test "$mutt_cv_iconv_good" = no; then
   AC_MSG_ERROR(Try using libiconv instead)
@@ -844,7 +836,7 @@
 AC_CACHE_CHECK([whether iconv is non-transcribing], mutt_cv_iconv_nontrans,
         mutt_save_LIBS="$LIBS"
         LIBS="$LIBS $LIBICONV"
-        AC_TRY_RUN([
+        AC_RUN_IFELSE([AC_LANG_SOURCE([[
 #include <iconv.h>
 #include <string.h>
 int main()
@@ -861,10 +853,7 @@
   return ((cd = iconv_open("UTF-8", "UTF-8")) == (iconv_t)(-1) ||
           iconv(cd, &ib, &ibl, &ob, &obl));
 }
-                ],
-                mutt_cv_iconv_nontrans=no,
-                mutt_cv_iconv_nontrans=yes,
-                mutt_cv_iconv_nontrans=no)
+                ]])],[mutt_cv_iconv_nontrans=no],[mutt_cv_iconv_nontrans=yes],[mutt_cv_iconv_nontrans=no])
         LIBS="$mutt_save_LIBS")
 if test "$mutt_cv_iconv_nontrans" = yes; then
   AC_DEFINE(ICONV_NONTRANS, 1)
@@ -888,32 +877,26 @@
 AC_CHECK_HEADERS(wchar.h)
 
 AC_CACHE_CHECK([for wchar_t], mutt_cv_wchar_t,
-        AC_TRY_COMPILE([
+        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
 #include <stddef.h>
 #include <stdlib.h>
 #ifdef HAVE_WCHAR_H
 #include <wchar.h>
 #endif
-                ],
-                [ wchar_t wc; return 0; ],
-                mutt_cv_wchar_t=yes,
-                mutt_cv_wchar_t=no))
+                ]], [[ wchar_t wc; return 0; ]])],[mutt_cv_wchar_t=yes],[mutt_cv_wchar_t=no]))
 
 if test "$mutt_cv_wchar_t" = no; then
         AC_DEFINE(wchar_t,int,[ Define to 'int' if system headers don't define. ])
 fi
 
 AC_CACHE_CHECK([for wint_t], mutt_cv_wint_t,
-        AC_TRY_COMPILE([
+        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
 #include <stddef.h>
 #include <stdlib.h>
 #ifdef HAVE_WCHAR_H
 #include <wchar.h>
 #endif
-                ],
-                [ wint_t wc; return 0; ],
-                mutt_cv_wint_t=yes,
-                mutt_cv_wint_t=no))
+                ]], [[ wint_t wc; return 0; ]])],[mutt_cv_wint_t=yes],[mutt_cv_wint_t=no]))
 
 if test "$mutt_cv_wint_t" = no; then
         AC_DEFINE(wint_t,int,[ Define to 'int' if system headers don't define. ])
@@ -925,16 +908,13 @@
 AC_CHECK_FUNCS(iswxdigit towupper towlower)
 
 AC_CACHE_CHECK([for mbstate_t], mutt_cv_mbstate_t,
-        AC_TRY_COMPILE([
+        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
 #include <stddef.h>
 #include <stdlib.h>
 #ifdef HAVE_WCHAR_H
 #include <wchar.h>
 #endif
-                ],
-                [ mbstate_t s; return 0; ],
-                mutt_cv_mbstate_t=yes,
-                mutt_cv_mbstate_t=no))
+                ]], [[ mbstate_t s; return 0; ]])],[mutt_cv_mbstate_t=yes],[mutt_cv_mbstate_t=no]))
 
 if test "$mutt_cv_mbstate_t" = no; then
         AC_DEFINE(mbstate_t,int,[ Define to 'int' if system headers don't define. ])
@@ -947,7 +927,7 @@
 if test "$wc_funcs" != yes -a "$wc_funcs" != no; then
         AC_CACHE_CHECK([for wchar_t functions], mutt_cv_wc_funcs,
                 mutt_cv_wc_funcs=no
-                AC_TRY_LINK([
+                AC_LINK_IFELSE([AC_LANG_PROGRAM([[
 #define _XOPEN_SOURCE 1
 #include <stddef.h>
 #include <stdlib.h>
@@ -956,10 +936,8 @@
 #endif
 #ifdef HAVE_WCHAR_H
 #include <wchar.h>
-#endif],
-                        [mbrtowc(0, 0, 0, 0); wctomb(0, 0); wcwidth(0);
-        iswprint(0); iswspace(0); towlower(0); towupper(0); iswalnum(0)],
-                        mutt_cv_wc_funcs=yes))
+#endif]], [[mbrtowc(0, 0, 0, 0); wctomb(0, 0); wcwidth(0);
+        iswprint(0); iswspace(0); towlower(0); towupper(0); iswalnum(0)]])],[mutt_cv_wc_funcs=yes],[]))
         wc_funcs=$mutt_cv_wc_funcs
 fi
 
@@ -968,26 +946,21 @@
 fi
 
 AC_CACHE_CHECK([for nl_langinfo and CODESET], mutt_cv_langinfo_codeset,
-  [AC_TRY_LINK([#include <langinfo.h>],
-    [char* cs = nl_langinfo(CODESET);],
-    mutt_cv_langinfo_codeset=yes,
-    mutt_cv_langinfo_codeset=no)])
+  [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <langinfo.h>]], [[char* cs = nl_langinfo(CODESET);]])],[mutt_cv_langinfo_codeset=yes],[mutt_cv_langinfo_codeset=no])])
 if test $mutt_cv_langinfo_codeset = yes; then
   AC_DEFINE(HAVE_LANGINFO_CODESET,1,[ Define if you have <langinfo.h> and nl_langinfo(CODESET). ])
 fi
 
 AC_CACHE_CHECK([for nl_langinfo and YESEXPR], mutt_cv_langinfo_yesexpr,
-  [AC_TRY_LINK([#include <langinfo.h>],
-    [char* cs = nl_langinfo(YESEXPR);],
-    mutt_cv_langinfo_yesexpr=yes,
-    mutt_cv_langinfo_yesexpr=no)])
+  [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <langinfo.h>]], [[char* cs = nl_langinfo(YESEXPR);]])],[mutt_cv_langinfo_yesexpr=yes],[mutt_cv_langinfo_yesexpr=no])])
 if test $mutt_cv_langinfo_yesexpr = yes; then
   AC_DEFINE(HAVE_LANGINFO_YESEXPR,1,[ Define if you have <langinfo.h> and nl_langinfo(YESEXPR). ])
 fi
 
-AC_OUTPUT(Makefile intl/Makefile m4/Makefile
+AC_CONFIG_FILES([Makefile intl/Makefile m4/Makefile
         po/Makefile.in doc/Makefile contrib/Makefile
         muttbug.sh
         imap/Makefile
         Muttrc.head
-        doc/instdoc.sh)
+        doc/instdoc.sh])
+AC_OUTPUT