autohell.patch 39 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209
  1. --- Python-2.3.3/acinclude.m4 1969-12-31 19:00:00.000000000 -0500
  2. +++ Python-2.3.3/acinclude.m4 2004-02-17 12:22:29.000000000 -0500
  3. @@ -0,0 +1,10 @@
  4. +dnl Autoconf 2.5x does not have AC_PROG_CXX_WORKS anymore
  5. +dnl If this macro is not defined by Autoconf, define it here.
  6. +
  7. +m4_ifdef([AC_PROG_CXX_WORKS],
  8. + [],
  9. + [m4_define([AC_PROG_CXX_WORKS],
  10. + [AC_LANG_PUSH(C++)dnl
  11. + _AC_COMPILER_EXEEXT
  12. + AC_LANG_POP()]
  13. + )])
  14. --- Python-2.3.3/configure.in 2003-11-18 14:59:39.000000000 -0500
  15. +++ Python-2.3.3/configure.in 2004-02-17 12:22:27.000000000 -0500
  16. @@ -4,8 +4,8 @@
  17. m4_define(PYTHON_VERSION, 2.3)
  18. AC_REVISION($Revision: 1.427.4.10 $)
  19. -AC_PREREQ(2.53)
  20. -AC_INIT(python, PYTHON_VERSION)
  21. +AC_PREREQ(2.59)
  22. +AC_INIT([python],[PYTHON_VERSION])
  23. AC_CONFIG_SRCDIR([Include/object.h])
  24. AC_CONFIG_HEADER(pyconfig.h)
  25. @@ -58,7 +58,7 @@
  26. dnl quadrigraphs "@<:@" and "@:>@" produce "[" and "]" in the output
  27. AC_ARG_ENABLE(framework,
  28. - AC_HELP_STRING(--enable-framework@<:@=INSTALLDIR@:>@, Build (MacOSX|Darwin) framework),
  29. + AS_HELP_STRING(--enable-framework@<:@=INSTALLDIR@:>@,Build (MacOSX|Darwin) framework),
  30. [
  31. case $enableval in
  32. yes)
  33. @@ -92,8 +92,7 @@
  34. AC_SUBST(PYTHONFRAMEWORKINSTALLDIR)
  35. ##AC_ARG_WITH(dyld,
  36. -## AC_HELP_STRING(--with-dyld,
  37. -## Use (OpenStep|Rhapsody) dynamic linker))
  38. +## AS_HELP_STRING(--with-dyld,## Use (OpenStep|Rhapsody) dynamic linker))
  39. ##
  40. # Set name for machine-dependent library files
  41. AC_SUBST(MACHDEP)
  42. @@ -227,7 +226,7 @@
  43. # on that fiddles with OPT and BASECFLAGS?
  44. AC_MSG_CHECKING(for --without-gcc)
  45. AC_ARG_WITH(gcc,
  46. - AC_HELP_STRING(--without-gcc,never use gcc),
  47. + AS_HELP_STRING(--without-gcc,never use gcc),
  48. [
  49. case $withval in
  50. no) CC=cc
  51. @@ -273,7 +272,7 @@
  52. MAINOBJ=python.o
  53. AC_MSG_CHECKING(for --with-cxx=<compiler>)
  54. AC_ARG_WITH(cxx,
  55. - AC_HELP_STRING(--with-cxx=<compiler>, enable C++ support),
  56. + AS_HELP_STRING(--with-cxx=<compiler>,enable C++ support),
  57. [
  58. check_cxx=no
  59. case $withval in
  60. @@ -298,15 +297,6 @@
  61. dnl --without-cxx was given.
  62. dnl Finally, it does not test whether CXX is g++.
  63. -dnl Autoconf 2.5x does not have AC_PROG_CXX_WORKS anymore
  64. -ifdef([AC_PROG_CXX_WORKS],[],
  65. - [AC_DEFUN([AC_PROG_CXX_WORKS],
  66. - [AC_LANG_PUSH(C++)dnl
  67. - _AC_COMPILER_EXEEXT
  68. - AC_LANG_POP()
  69. - ]
  70. -)])
  71. -
  72. if test "$check_cxx" = "yes"
  73. then
  74. AC_CHECK_PROGS(CXX, $CCC c++ g++ gcc CC cxx cc++ cl, notfound)
  75. @@ -348,7 +338,7 @@
  76. AC_EXEEXT
  77. AC_MSG_CHECKING(for --with-suffix)
  78. AC_ARG_WITH(suffix,
  79. - AC_HELP_STRING(--with-suffix=.exe, set executable suffix),
  80. + AS_HELP_STRING(--with-suffix=.exe,set executable suffix),
  81. [
  82. case $withval in
  83. no) EXEEXT=;;
  84. @@ -474,7 +464,7 @@
  85. AC_MSG_CHECKING(for --enable-shared)
  86. AC_ARG_ENABLE(shared,
  87. - AC_HELP_STRING(--enable-shared, disable/enable building shared python library))
  88. + AS_HELP_STRING(--enable-shared,disable/enable building shared python library))
  89. if test -z "$enable_shared"
  90. then
  91. @@ -583,7 +573,7 @@
  92. # Check for --with-pydebug
  93. AC_MSG_CHECKING(for --with-pydebug)
  94. AC_ARG_WITH(pydebug,
  95. - AC_HELP_STRING(--with-pydebug, build with Py_DEBUG defined),
  96. + AS_HELP_STRING(--with-pydebug,build with Py_DEBUG defined),
  97. [
  98. if test "$withval" != no
  99. then
  100. @@ -660,10 +650,7 @@
  101. AC_MSG_CHECKING(whether $CC accepts -fno-strict-aliasing)
  102. ac_save_cc="$CC"
  103. CC="$CC -fno-strict-aliasing"
  104. - AC_TRY_RUN([int main() { return 0; }],
  105. - ac_cv_no_strict_aliasing_ok=yes,
  106. - ac_cv_no_strict_aliasing_ok=no,
  107. - ac_cv_no_strict_aliasing_ok=no)
  108. + AC_RUN_IFELSE([AC_LANG_SOURCE([[int main() { return 0; }]])],[ac_cv_no_strict_aliasing_ok=yes],[ac_cv_no_strict_aliasing_ok=no],[ac_cv_no_strict_aliasing_ok=no])
  109. CC="$ac_save_cc"
  110. AC_MSG_RESULT($ac_cv_no_strict_aliasing_ok)
  111. if test $ac_cv_no_strict_aliasing_ok = yes
  112. @@ -711,10 +698,7 @@
  113. AC_CACHE_VAL(ac_cv_opt_olimit_ok,
  114. [ac_save_cc="$CC"
  115. CC="$CC -OPT:Olimit=0"
  116. -AC_TRY_RUN([int main() { return 0; }],
  117. - ac_cv_opt_olimit_ok=yes,
  118. - ac_cv_opt_olimit_ok=no,
  119. - ac_cv_opt_olimit_ok=no)
  120. +AC_RUN_IFELSE([AC_LANG_SOURCE([[int main() { return 0; }]])],[ac_cv_opt_olimit_ok=yes],[ac_cv_opt_olimit_ok=no],[ac_cv_opt_olimit_ok=no])
  121. CC="$ac_save_cc"])
  122. AC_MSG_RESULT($ac_cv_opt_olimit_ok)
  123. if test $ac_cv_opt_olimit_ok = yes; then
  124. @@ -733,10 +717,7 @@
  125. AC_CACHE_VAL(ac_cv_olimit_ok,
  126. [ac_save_cc="$CC"
  127. CC="$CC -Olimit 1500"
  128. - AC_TRY_RUN([int main() { return 0; }],
  129. - ac_cv_olimit_ok=yes,
  130. - ac_cv_olimit_ok=no,
  131. - ac_cv_olimit_ok=no)
  132. + AC_RUN_IFELSE([AC_LANG_SOURCE([[int main() { return 0; }]])],[ac_cv_olimit_ok=yes],[ac_cv_olimit_ok=no],[ac_cv_olimit_ok=no])
  133. CC="$ac_save_cc"])
  134. AC_MSG_RESULT($ac_cv_olimit_ok)
  135. if test $ac_cv_olimit_ok = yes; then
  136. @@ -751,7 +732,7 @@
  137. # options before we can check whether -Kpthread improves anything.
  138. AC_MSG_CHECKING(whether pthreads are available without options)
  139. AC_CACHE_VAL(ac_cv_pthread_is_default,
  140. -[AC_TRY_RUN([
  141. +[AC_RUN_IFELSE([AC_LANG_SOURCE([[
  142. #include <pthread.h>
  143. void* routine(void* p){return NULL;}
  144. @@ -763,14 +744,11 @@
  145. (void)pthread_detach(p);
  146. return 0;
  147. }
  148. -],
  149. -[
  150. +]])],[
  151. ac_cv_pthread_is_default=yes
  152. ac_cv_kthread=no
  153. ac_cv_pthread=no
  154. -],
  155. - ac_cv_pthread_is_default=no,
  156. - ac_cv_pthread_is_default=no)
  157. +],[ac_cv_pthread_is_default=no],[ac_cv_pthread_is_default=no])
  158. ])
  159. AC_MSG_RESULT($ac_cv_pthread_is_default)
  160. @@ -788,7 +766,7 @@
  161. AC_CACHE_VAL(ac_cv_kpthread,
  162. [ac_save_cc="$CC"
  163. CC="$CC -Kpthread"
  164. -AC_TRY_RUN([
  165. +AC_RUN_IFELSE([AC_LANG_SOURCE([[
  166. #include <pthread.h>
  167. void* routine(void* p){return NULL;}
  168. @@ -800,10 +778,7 @@
  169. (void)pthread_detach(p);
  170. return 0;
  171. }
  172. -],
  173. - ac_cv_kpthread=yes,
  174. - ac_cv_kpthread=no,
  175. - ac_cv_kpthread=no)
  176. +]])],[ac_cv_kpthread=yes],[ac_cv_kpthread=no],[ac_cv_kpthread=no])
  177. CC="$ac_save_cc"])
  178. AC_MSG_RESULT($ac_cv_kpthread)
  179. fi
  180. @@ -819,7 +794,7 @@
  181. AC_CACHE_VAL(ac_cv_kthread,
  182. [ac_save_cc="$CC"
  183. CC="$CC -Kthread"
  184. -AC_TRY_RUN([
  185. +AC_RUN_IFELSE([AC_LANG_SOURCE([[
  186. #include <pthread.h>
  187. void* routine(void* p){return NULL;}
  188. @@ -831,10 +806,7 @@
  189. (void)pthread_detach(p);
  190. return 0;
  191. }
  192. -],
  193. - ac_cv_kthread=yes,
  194. - ac_cv_kthread=no,
  195. - ac_cv_kthread=no)
  196. +]])],[ac_cv_kthread=yes],[ac_cv_kthread=no],[ac_cv_kthread=no])
  197. CC="$ac_save_cc"])
  198. AC_MSG_RESULT($ac_cv_kthread)
  199. fi
  200. @@ -850,7 +822,7 @@
  201. AC_CACHE_VAL(ac_cv_thread,
  202. [ac_save_cc="$CC"
  203. CC="$CC -pthread"
  204. -AC_TRY_RUN([
  205. +AC_RUN_IFELSE([AC_LANG_SOURCE([[
  206. #include <pthread.h>
  207. void* routine(void* p){return NULL;}
  208. @@ -862,10 +834,7 @@
  209. (void)pthread_detach(p);
  210. return 0;
  211. }
  212. -],
  213. - ac_cv_pthread=yes,
  214. - ac_cv_pthread=no,
  215. - ac_cv_pthread=no)
  216. +]])],[ac_cv_pthread=yes],[ac_cv_pthread=no],[ac_cv_pthread=no])
  217. CC="$ac_save_cc"])
  218. AC_MSG_RESULT($ac_cv_pthread)
  219. fi
  220. @@ -911,11 +880,11 @@
  221. dnl # check for ANSI or K&R ("traditional") preprocessor
  222. dnl AC_MSG_CHECKING(for C preprocessor type)
  223. -dnl AC_TRY_COMPILE([
  224. +dnl AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
  225. dnl #define spam(name, doc) {#name, &name, #name "() -- " doc}
  226. dnl int foo;
  227. dnl struct {char *name; int *addr; char *doc;} desc = spam(foo, "something");
  228. -dnl ], [;], cpp_type=ansi, AC_DEFINE(HAVE_OLD_CPP) cpp_type=traditional)
  229. +dnl ]], [[;]])],[cpp_type=ansi],[AC_DEFINE(HAVE_OLD_CPP) cpp_type=traditional])
  230. dnl AC_MSG_RESULT($cpp_type)
  231. # checks for header files
  232. @@ -941,19 +910,13 @@
  233. # Check whether using makedev requires defining _OSF_SOURCE
  234. AC_MSG_CHECKING(for makedev)
  235. -AC_TRY_LINK([#include <sys/types.h> ],
  236. - [ makedev(0, 0) ],
  237. - ac_cv_has_makedev=yes,
  238. - ac_cv_has_makedev=no)
  239. +AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> ]], [[ makedev(0, 0) ]])],[ac_cv_has_makedev=yes],[ac_cv_has_makedev=no])
  240. if test "$ac_cv_has_makedev" = "no"; then
  241. # we didn't link, try if _OSF_SOURCE will allow us to link
  242. - AC_TRY_LINK([
  243. + AC_LINK_IFELSE([AC_LANG_PROGRAM([[
  244. #define _OSF_SOURCE 1
  245. #include <sys/types.h>
  246. - ],
  247. - [ makedev(0, 0) ],
  248. - ac_cv_has_makedev=yes,
  249. - ac_cv_has_makedev=no)
  250. + ]], [[ makedev(0, 0) ]])],[ac_cv_has_makedev=yes],[ac_cv_has_makedev=no])
  251. if test "$ac_cv_has_makedev" = "yes"; then
  252. AC_DEFINE(_OSF_SOURCE, 1, [Define _OSF_SOURCE to get the makedev macro.])
  253. fi
  254. @@ -972,11 +935,11 @@
  255. use_lfs=yes
  256. AC_MSG_CHECKING(Solaris LFS bug)
  257. -AC_TRY_COMPILE([
  258. +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
  259. #define _LARGEFILE_SOURCE 1
  260. #define _FILE_OFFSET_BITS 64
  261. #include <sys/resource.h>
  262. -],struct rlimit foo;,sol_lfs_bug=no,sol_lfs_bug=yes)
  263. +]], [[struct rlimit foo;]])],[sol_lfs_bug=no],[sol_lfs_bug=yes])
  264. AC_MSG_RESULT($sol_lfs_bug)
  265. if test "$sol_lfs_bug" = "yes"; then
  266. use_lfs=no
  267. @@ -1018,10 +981,10 @@
  268. AC_MSG_CHECKING(for long long support)
  269. have_long_long=no
  270. -AC_TRY_COMPILE([], [long long x; x = (long long)0;], [
  271. +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[long long x; x = (long long)0;]])],[
  272. AC_DEFINE(HAVE_LONG_LONG, 1, [Define this if you have the type long long.])
  273. have_long_long=yes
  274. -])
  275. +],[])
  276. AC_MSG_RESULT($have_long_long)
  277. if test "$have_long_long" = yes ; then
  278. AC_CHECK_SIZEOF(long long, 8)
  279. @@ -1029,10 +992,10 @@
  280. AC_MSG_CHECKING(for uintptr_t support)
  281. have_uintptr_t=no
  282. -AC_TRY_COMPILE([], [uintptr_t x; x = (uintptr_t)0;], [
  283. +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[uintptr_t x; x = (uintptr_t)0;]])],[
  284. AC_DEFINE(HAVE_UINTPTR_T, 1, [Define this if you have the type uintptr_t.])
  285. have_uintptr_t=yes
  286. -])
  287. +],[])
  288. AC_MSG_RESULT($have_uintptr_t)
  289. if test "$have_uintptr_t" = yes ; then
  290. AC_CHECK_SIZEOF(uintptr_t, 4)
  291. @@ -1041,7 +1004,7 @@
  292. # Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
  293. AC_MSG_CHECKING(size of off_t)
  294. AC_CACHE_VAL(ac_cv_sizeof_off_t,
  295. -[AC_TRY_RUN([#include <stdio.h>
  296. +[AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h>
  297. #include <sys/types.h>
  298. main()
  299. {
  300. @@ -1049,10 +1012,7 @@
  301. if (!f) exit(1);
  302. fprintf(f, "%d\n", sizeof(off_t));
  303. exit(0);
  304. -}],
  305. -ac_cv_sizeof_off_t=`cat conftestval`,
  306. -ac_cv_sizeof_off_t=0,
  307. -ac_cv_sizeof_off_t=4)
  308. +}]])],[ac_cv_sizeof_off_t=`cat conftestval`],[ac_cv_sizeof_off_t=0],[ac_cv_sizeof_off_t=4])
  309. ])
  310. AC_MSG_RESULT($ac_cv_sizeof_off_t)
  311. AC_DEFINE_UNQUOTED(SIZEOF_OFF_T, $ac_cv_sizeof_off_t,
  312. @@ -1075,7 +1035,7 @@
  313. # AC_CHECK_SIZEOF() doesn't include <time.h>.
  314. AC_MSG_CHECKING(size of time_t)
  315. AC_CACHE_VAL(ac_cv_sizeof_time_t,
  316. -[AC_TRY_RUN([#include <stdio.h>
  317. +[AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h>
  318. #include <time.h>
  319. main()
  320. {
  321. @@ -1083,10 +1043,7 @@
  322. if (!f) exit(1);
  323. fprintf(f, "%d\n", sizeof(time_t));
  324. exit(0);
  325. -}],
  326. -ac_cv_sizeof_time_t=`cat conftestval`,
  327. -ac_cv_sizeof_time_t=0,
  328. -ac_cv_sizeof_time_t=4)
  329. +}]])],[ac_cv_sizeof_time_t=`cat conftestval`],[ac_cv_sizeof_time_t=0],[ac_cv_sizeof_time_t=4])
  330. ])
  331. AC_MSG_RESULT($ac_cv_sizeof_time_t)
  332. AC_DEFINE_UNQUOTED(SIZEOF_TIME_T, $ac_cv_sizeof_time_t,
  333. @@ -1104,13 +1061,13 @@
  334. fi
  335. AC_MSG_CHECKING(for pthread_t)
  336. have_pthread_t=no
  337. -AC_TRY_COMPILE([#include <pthread.h>], [pthread_t x; x = *(pthread_t*)0;], have_pthread_t=yes)
  338. +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <pthread.h>]], [[pthread_t x; x = *(pthread_t*)0;]])],[have_pthread_t=yes],[])
  339. AC_MSG_RESULT($have_pthread_t)
  340. if test "$have_pthread_t" = yes ; then
  341. # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
  342. AC_MSG_CHECKING(size of pthread_t)
  343. AC_CACHE_VAL(ac_cv_sizeof_pthread_t,
  344. - [AC_TRY_RUN([#include <stdio.h>
  345. + [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h>
  346. #include <pthread.h>
  347. main()
  348. {
  349. @@ -1118,10 +1075,7 @@
  350. if (!f) exit(1);
  351. fprintf(f, "%d\n", sizeof(pthread_t));
  352. exit(0);
  353. - }],
  354. - ac_cv_sizeof_pthread_t=`cat conftestval`,
  355. - ac_cv_sizeof_pthread_t=0,
  356. - ac_cv_sizeof_pthread_t=4)
  357. + }]])],[ac_cv_sizeof_pthread_t=`cat conftestval`],[ac_cv_sizeof_pthread_t=0],[ac_cv_sizeof_pthread_t=4])
  358. ])
  359. AC_MSG_RESULT($ac_cv_sizeof_pthread_t)
  360. AC_DEFINE_UNQUOTED(SIZEOF_PTHREAD_T, $ac_cv_sizeof_pthread_t,
  361. @@ -1131,7 +1085,7 @@
  362. AC_MSG_CHECKING(for --enable-toolbox-glue)
  363. AC_ARG_ENABLE(toolbox-glue,
  364. - AC_HELP_STRING(--enable-toolbox-glue, disable/enable MacOSX glue code for extensions))
  365. + AS_HELP_STRING(--enable-toolbox-glue,disable/enable MacOSX glue code for extensions))
  366. if test -z "$enable_toolbox_glue"
  367. then
  368. @@ -1436,13 +1390,10 @@
  369. # checks for system dependent C++ extensions support
  370. case "$ac_sys_system" in
  371. AIX*) AC_MSG_CHECKING(for genuine AIX C++ extensions support)
  372. - AC_TRY_LINK([#include "/usr/lpp/xlC/include/load.h"],
  373. - [loadAndInit("", 0, "")],
  374. - [AC_DEFINE(AIX_GENUINE_CPLUSPLUS, 1,
  375. + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include "/usr/lpp/xlC/include/load.h"]], [[loadAndInit("", 0, "")]])],[AC_DEFINE(AIX_GENUINE_CPLUSPLUS, 1,
  376. [Define for AIX if your compiler is a genuine IBM xlC/xlC_r
  377. and you want support for AIX C++ shared extension modules.])
  378. - AC_MSG_RESULT(yes)],
  379. - [AC_MSG_RESULT(no)]);;
  380. + AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)]);;
  381. *) ;;
  382. esac
  383. @@ -1464,7 +1415,7 @@
  384. AC_MSG_CHECKING(for --with-libs)
  385. AC_ARG_WITH(libs,
  386. - AC_HELP_STRING(--with-libs='lib1 ...', link against additional libs),
  387. + AS_HELP_STRING(--with-libs='lib1 ...',link against additional libs),
  388. [
  389. AC_MSG_RESULT($withval)
  390. LIBS="$withval $LIBS"
  391. @@ -1476,7 +1427,7 @@
  392. AC_SUBST(SIGNAL_OBJS)
  393. AC_MSG_CHECKING(for --with-signal-module)
  394. AC_ARG_WITH(signal-module,
  395. - AC_HELP_STRING(--with-signal-module, disable/enable signal module))
  396. + AS_HELP_STRING(--with-signal-module,disable/enable signal module))
  397. if test -z "$with_signal_module"
  398. then with_signal_module="yes"
  399. @@ -1498,7 +1449,7 @@
  400. AC_MSG_CHECKING(for --with-dec-threads)
  401. AC_SUBST(LDLAST)
  402. AC_ARG_WITH(dec-threads,
  403. - AC_HELP_STRING(--with-dec-threads, use DEC Alpha/OSF1 thread-safe libraries),
  404. + AS_HELP_STRING(--with-dec-threads,use DEC Alpha/OSF1 thread-safe libraries),
  405. [
  406. AC_MSG_RESULT($withval)
  407. LDLAST=-threads
  408. @@ -1518,12 +1469,12 @@
  409. AC_MSG_CHECKING(for --with-threads)
  410. dnl quadrigraphs "@<:@" and "@:>@" produce "[" and "]" in the output
  411. AC_ARG_WITH(threads,
  412. - AC_HELP_STRING(--with(out)-threads@<:@=DIRECTORY@:>@, disable/enable thread support))
  413. + AS_HELP_STRING(--with(out)-threads@<:@=DIRECTORY@:>@,disable/enable thread support))
  414. # --with-thread is deprecated, but check for it anyway
  415. dnl quadrigraphs "@<:@" and "@:>@" produce "[" and "]" in the output
  416. AC_ARG_WITH(thread,
  417. - AC_HELP_STRING(--with(out)-thread@<:@=DIRECTORY@:>@, deprecated; use --with(out)-threads),
  418. + AS_HELP_STRING(--with(out)-thread@<:@=DIRECTORY@:>@,deprecated; use --with(out)-threads),
  419. [with_threads=$with_thread])
  420. if test -z "$with_threads"
  421. @@ -1603,7 +1554,7 @@
  422. THREADOBJ="Python/thread.o"],[
  423. AC_MSG_CHECKING(for --with-pth)
  424. AC_ARG_WITH([pth],
  425. - AC_HELP_STRING(--with-pth, use GNU pth threading libraries),
  426. + AS_HELP_STRING(--with-pth,use GNU pth threading libraries),
  427. [AC_MSG_RESULT($withval)
  428. AC_DEFINE([WITH_THREAD])
  429. AC_DEFINE([HAVE_PTH], 1,
  430. @@ -1618,10 +1569,10 @@
  431. _libs=$LIBS
  432. LIBS="$LIBS -lpthread"
  433. AC_MSG_CHECKING([for pthread_create in -lpthread])
  434. - AC_TRY_LINK([#include <pthread.h>
  435. + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <pthread.h>
  436. -void * start_routine (void *arg) { exit (0); }], [
  437. -pthread_create (NULL, NULL, start_routine, NULL)], [
  438. +void * start_routine (void *arg) { exit (0); }]], [[
  439. +pthread_create (NULL, NULL, start_routine, NULL)]])],[
  440. AC_MSG_RESULT(yes)
  441. AC_DEFINE(WITH_THREAD)
  442. posix_threads=yes
  443. @@ -1705,7 +1656,7 @@
  444. AC_MSG_CHECKING(if PTHREAD_SCOPE_SYSTEM is supported)
  445. AC_CACHE_VAL(ac_cv_pthread_system_supported,
  446. - [AC_TRY_RUN([#include <pthread.h>
  447. + [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <pthread.h>
  448. void *foo(void *parm) {
  449. return NULL;
  450. }
  451. @@ -1716,10 +1667,7 @@
  452. if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
  453. if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
  454. exit(0);
  455. - }],
  456. - ac_cv_pthread_system_supported=yes,
  457. - ac_cv_pthread_system_supported=no,
  458. - ac_cv_pthread_system_supported=no)
  459. + }]])],[ac_cv_pthread_system_supported=yes],[ac_cv_pthread_system_supported=no],[ac_cv_pthread_system_supported=no])
  460. ])
  461. AC_MSG_RESULT($ac_cv_pthread_system_supported)
  462. if test "$ac_cv_pthread_system_supported" = "yes"; then
  463. @@ -1754,7 +1702,7 @@
  464. [
  465. dnl the check does not work on cross compilation case...
  466. - AC_TRY_RUN([ /* AF_INET6 available check */
  467. + AC_RUN_IFELSE([AC_LANG_SOURCE([[ /* AF_INET6 available check */
  468. #include <sys/types.h>
  469. #include <sys/socket.h>
  470. main()
  471. @@ -1764,25 +1712,19 @@
  472. else
  473. exit(0);
  474. }
  475. -],
  476. - AC_MSG_RESULT(yes)
  477. - ipv6=yes,
  478. - AC_MSG_RESULT(no)
  479. - ipv6=no,
  480. - AC_MSG_RESULT(no)
  481. +]])],[AC_MSG_RESULT(yes)
  482. + ipv6=yes],[AC_MSG_RESULT(no)
  483. + ipv6=no],[AC_MSG_RESULT(no)
  484. ipv6=no
  485. -)
  486. +])
  487. if test "$ipv6" = "yes"; then
  488. AC_MSG_CHECKING(if RFC2553 API is available)
  489. - AC_TRY_COMPILE([#include <sys/types.h>
  490. -#include <netinet/in.h>],
  491. - [struct sockaddr_in6 x;
  492. -x.sin6_scope_id;],
  493. - AC_MSG_RESULT(yes)
  494. - ipv6=yes,
  495. - AC_MSG_RESULT(no, IPv6 disabled)
  496. - ipv6=no)
  497. + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
  498. +#include <netinet/in.h>]], [[struct sockaddr_in6 x;
  499. +x.sin6_scope_id;]])],[AC_MSG_RESULT(yes)
  500. + ipv6=yes],[AC_MSG_RESULT(no, IPv6 disabled)
  501. + ipv6=no])
  502. fi
  503. if test "$ipv6" = "yes"; then
  504. @@ -1905,7 +1847,7 @@
  505. # Check for universal newline support
  506. AC_MSG_CHECKING(for --with-universal-newlines)
  507. AC_ARG_WITH(universal-newlines,
  508. - AC_HELP_STRING(--with(out)-universal-newlines, disable/enable foreign newlines))
  509. + AS_HELP_STRING(--with(out)-universal-newlines,disable/enable foreign newlines))
  510. if test -z "$with_universal_newlines"
  511. then with_universal_newlines="yes"
  512. @@ -1923,7 +1865,7 @@
  513. # Check for --with-doc-strings
  514. AC_MSG_CHECKING(for --with-doc-strings)
  515. AC_ARG_WITH(doc-strings,
  516. - AC_HELP_STRING(--with(out)-doc-strings, disable/enable documentation strings))
  517. + AS_HELP_STRING(--with(out)-doc-strings,disable/enable documentation strings))
  518. if test -z "$with_doc_strings"
  519. then with_doc_strings="yes"
  520. @@ -1938,7 +1880,7 @@
  521. # Check for Python-specific malloc support
  522. AC_MSG_CHECKING(for --with-pymalloc)
  523. AC_ARG_WITH(pymalloc,
  524. - AC_HELP_STRING(--with(out)-pymalloc, disable/enable specialized mallocs))
  525. + AS_HELP_STRING(--with(out)-pymalloc,disable/enable specialized mallocs))
  526. if test -z "$with_pymalloc"
  527. then with_pymalloc="yes"
  528. @@ -1953,7 +1895,7 @@
  529. # Check for --with-wctype-functions
  530. AC_MSG_CHECKING(for --with-wctype-functions)
  531. AC_ARG_WITH(wctype-functions,
  532. - AC_HELP_STRING(--with-wctype-functions, use wctype.h functions),
  533. + AS_HELP_STRING(--with-wctype-functions,use wctype.h functions),
  534. [
  535. if test "$withval" != no
  536. then
  537. @@ -1971,7 +1913,7 @@
  538. AC_MSG_CHECKING(for --with-sgi-dl)
  539. AC_ARG_WITH(sgi-dl,
  540. - AC_HELP_STRING(--with-sgi-dl=DIRECTORY, IRIX 4 dynamic linking),
  541. + AS_HELP_STRING(--with-sgi-dl=DIRECTORY,IRIX 4 dynamic linking),
  542. [
  543. AC_MSG_RESULT($withval)
  544. echo --with-sgi-dl is unsupported, see README
  545. @@ -1993,7 +1935,7 @@
  546. AC_MSG_CHECKING(for --with-dl-dld)
  547. AC_ARG_WITH(dl-dld,
  548. - AC_HELP_STRING(--with-dl-dld=DL_DIR, GNU dynamic linking),
  549. + AS_HELP_STRING(--with-dl-dld=DL_DIR,GNU dynamic linking),
  550. [
  551. AC_MSG_RESULT($withval)
  552. echo --with-dl-dld is unsupported, see README
  553. @@ -2085,41 +2027,29 @@
  554. # For some functions, having a definition is not sufficient, since
  555. # we want to take their address.
  556. AC_MSG_CHECKING(for chroot)
  557. -AC_TRY_COMPILE([#include <unistd.h>], void *x=chroot,
  558. - AC_DEFINE(HAVE_CHROOT, 1, Define if you have the 'chroot' function.)
  559. - AC_MSG_RESULT(yes),
  560. - AC_MSG_RESULT(no)
  561. -)
  562. +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>]], [[void *x=chroot]])],[AC_DEFINE(HAVE_CHROOT, 1, Define if you have the 'chroot' function.)
  563. + AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)
  564. +])
  565. AC_MSG_CHECKING(for link)
  566. -AC_TRY_COMPILE([#include <unistd.h>], void *x=link,
  567. - AC_DEFINE(HAVE_LINK, 1, Define if you have the 'link' function.)
  568. - AC_MSG_RESULT(yes),
  569. - AC_MSG_RESULT(no)
  570. -)
  571. +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>]], [[void *x=link]])],[AC_DEFINE(HAVE_LINK, 1, Define if you have the 'link' function.)
  572. + AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)
  573. +])
  574. AC_MSG_CHECKING(for symlink)
  575. -AC_TRY_COMPILE([#include <unistd.h>], void *x=symlink,
  576. - AC_DEFINE(HAVE_SYMLINK, 1, Define if you have the 'symlink' function.)
  577. - AC_MSG_RESULT(yes),
  578. - AC_MSG_RESULT(no)
  579. -)
  580. +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>]], [[void *x=symlink]])],[AC_DEFINE(HAVE_SYMLINK, 1, Define if you have the 'symlink' function.)
  581. + AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)
  582. +])
  583. AC_MSG_CHECKING(for fchdir)
  584. -AC_TRY_COMPILE([#include <unistd.h>], void *x=fchdir,
  585. - AC_DEFINE(HAVE_FCHDIR, 1, Define if you have the 'fchdir' function.)
  586. - AC_MSG_RESULT(yes),
  587. - AC_MSG_RESULT(no)
  588. -)
  589. +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>]], [[void *x=fchdir]])],[AC_DEFINE(HAVE_FCHDIR, 1, Define if you have the 'fchdir' function.)
  590. + AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)
  591. +])
  592. AC_MSG_CHECKING(for fsync)
  593. -AC_TRY_COMPILE([#include <unistd.h>], void *x=fsync,
  594. - AC_DEFINE(HAVE_FSYNC, 1, Define if you have the 'fsync' function.)
  595. - AC_MSG_RESULT(yes),
  596. - AC_MSG_RESULT(no)
  597. -)
  598. +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>]], [[void *x=fsync]])],[AC_DEFINE(HAVE_FSYNC, 1, Define if you have the 'fsync' function.)
  599. + AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)
  600. +])
  601. AC_MSG_CHECKING(for fdatasync)
  602. -AC_TRY_COMPILE([#include <unistd.h>], void *x=fdatasync,
  603. - AC_DEFINE(HAVE_FDATASYNC, 1, Define if you have the 'fdatasync' function.)
  604. - AC_MSG_RESULT(yes),
  605. - AC_MSG_RESULT(no)
  606. -)
  607. +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>]], [[void *x=fdatasync]])],[AC_DEFINE(HAVE_FDATASYNC, 1, Define if you have the 'fdatasync' function.)
  608. + AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)
  609. +])
  610. # On some systems (eg. FreeBSD 5), we would find a definition of the
  611. # functions ctermid_r, setgroups in the library, but no prototype
  612. @@ -2128,34 +2058,28 @@
  613. # because of the missing prototypes.
  614. AC_MSG_CHECKING(for ctermid_r)
  615. -AC_TRY_COMPILE([
  616. +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
  617. #include "confdefs.h"
  618. #include <stdio.h>
  619. -], void* p = ctermid_r,
  620. - AC_DEFINE(HAVE_CTERMID_R, 1, Define if you have the 'ctermid_r' function.)
  621. - AC_MSG_RESULT(yes),
  622. - AC_MSG_RESULT(no)
  623. -)
  624. +]], [[void* p = ctermid_r]])],[AC_DEFINE(HAVE_CTERMID_R, 1, Define if you have the 'ctermid_r' function.)
  625. + AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)
  626. +])
  627. AC_MSG_CHECKING(for flock)
  628. -AC_TRY_COMPILE([
  629. +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
  630. #include "confdefs.h"
  631. #include <sys/file.h>
  632. -], void* p = flock,
  633. - AC_DEFINE(HAVE_FLOCK, 1, Define if you have the 'flock' function.)
  634. - AC_MSG_RESULT(yes),
  635. - AC_MSG_RESULT(no)
  636. -)
  637. +]], [[void* p = flock]])],[AC_DEFINE(HAVE_FLOCK, 1, Define if you have the 'flock' function.)
  638. + AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)
  639. +])
  640. AC_MSG_CHECKING(for getpagesize)
  641. -AC_TRY_COMPILE([
  642. +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
  643. #include "confdefs.h"
  644. #include <unistd.h>
  645. -], void* p = getpagesize,
  646. - AC_DEFINE(HAVE_GETPAGESIZE, 1, Define if you have the 'getpagesize' function.)
  647. - AC_MSG_RESULT(yes),
  648. - AC_MSG_RESULT(no)
  649. -)
  650. +]], [[void* p = getpagesize]])],[AC_DEFINE(HAVE_GETPAGESIZE, 1, Define if you have the 'getpagesize' function.)
  651. + AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)
  652. +])
  653. dnl check for true
  654. AC_CHECK_PROGS(TRUE, true, /bin/true)
  655. @@ -2167,54 +2091,45 @@
  656. )
  657. AC_MSG_CHECKING(for hstrerror)
  658. -AC_TRY_LINK([
  659. +AC_LINK_IFELSE([AC_LANG_PROGRAM([[
  660. #include "confdefs.h"
  661. #include <netdb.h>
  662. -], void* p = hstrerror; hstrerror(0),
  663. - AC_DEFINE(HAVE_HSTRERROR, 1, Define if you have the 'hstrerror' function.)
  664. - AC_MSG_RESULT(yes),
  665. - AC_MSG_RESULT(no)
  666. -)
  667. +]], [[void* p = hstrerror; hstrerror(0)]])],[AC_DEFINE(HAVE_HSTRERROR, 1, Define if you have the 'hstrerror' function.)
  668. + AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)
  669. +])
  670. AC_MSG_CHECKING(for inet_aton)
  671. -AC_TRY_LINK([
  672. +AC_LINK_IFELSE([AC_LANG_PROGRAM([[
  673. #include "confdefs.h"
  674. #include <sys/socket.h>
  675. #include <netinet/in.h>
  676. #include <arpa/inet.h>
  677. -], void* p = inet_aton;inet_aton(0,0),
  678. - AC_DEFINE(HAVE_INET_ATON, 1, Define if you have the 'inet_aton' function.)
  679. - AC_MSG_RESULT(yes),
  680. - AC_MSG_RESULT(no)
  681. -)
  682. +]], [[void* p = inet_aton;inet_aton(0,0)]])],[AC_DEFINE(HAVE_INET_ATON, 1, Define if you have the 'inet_aton' function.)
  683. + AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)
  684. +])
  685. AC_MSG_CHECKING(for inet_pton)
  686. -AC_TRY_COMPILE([
  687. +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
  688. #include "confdefs.h"
  689. #include <sys/types.h>
  690. #include <sys/socket.h>
  691. #include <netinet/in.h>
  692. #include <arpa/inet.h>
  693. -], void* p = inet_pton,
  694. - AC_DEFINE(HAVE_INET_PTON, 1, Define if you have the 'inet_pton' function.)
  695. - AC_MSG_RESULT(yes),
  696. - AC_MSG_RESULT(no)
  697. -)
  698. +]], [[void* p = inet_pton]])],[AC_DEFINE(HAVE_INET_PTON, 1, Define if you have the 'inet_pton' function.)
  699. + AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)
  700. +])
  701. # On some systems, setgroups is in unistd.h, on others, in grp.h
  702. AC_MSG_CHECKING(for setgroups)
  703. -AC_TRY_COMPILE([
  704. +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
  705. #include "confdefs.h"
  706. #include <unistd.h>
  707. #ifdef HAVE_GRP_H
  708. #include <grp.h>
  709. #endif
  710. -],
  711. -void* p = setgroups,
  712. - AC_DEFINE(HAVE_SETGROUPS, 1, Define if you have the 'setgroups' function.)
  713. - AC_MSG_RESULT(yes),
  714. - AC_MSG_RESULT(no)
  715. -)
  716. +]], [[void* p = setgroups]])],[AC_DEFINE(HAVE_SETGROUPS, 1, Define if you have the 'setgroups' function.)
  717. + AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)
  718. +])
  719. # check for openpty and forkpty
  720. @@ -2226,30 +2141,24 @@
  721. AC_REPLACE_FUNCS(dup2 getcwd strdup strerror memmove)
  722. AC_CHECK_FUNCS(getpgrp,
  723. - AC_TRY_COMPILE([#include <unistd.h>],
  724. - [getpgrp(0);],
  725. - AC_DEFINE(GETPGRP_HAVE_ARG, 1,
  726. - [Define if getpgrp() must be called as getpgrp(0).])
  727. - )
  728. + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>]], [[getpgrp(0);]])],[AC_DEFINE(GETPGRP_HAVE_ARG, 1,
  729. + Define if getpgrp() must be called as getpgrp(0).)
  730. + ],[])
  731. )
  732. AC_CHECK_FUNCS(setpgrp,
  733. - AC_TRY_COMPILE([#include <unistd.h>],
  734. - [setpgrp(0,0);],
  735. - AC_DEFINE(SETPGRP_HAVE_ARG, 1,
  736. - [Define if setpgrp() must be called as setpgrp(0, 0).])
  737. - )
  738. + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>]], [[setpgrp(0,0);]])],[AC_DEFINE(SETPGRP_HAVE_ARG, 1,
  739. + Define if setpgrp() must be called as setpgrp(0, 0).)
  740. + ],[])
  741. )
  742. AC_CHECK_FUNCS(gettimeofday,
  743. - AC_TRY_COMPILE([#include <sys/time.h>],
  744. - [gettimeofday((struct timeval*)0,(struct timezone*)0);], ,
  745. - AC_DEFINE(GETTIMEOFDAY_NO_TZ, 1,
  746. - [Define if gettimeofday() does not have second (timezone) argument
  747. - This is the case on Motorola V4 (R40V4.2)])
  748. - )
  749. + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/time.h>]], [[gettimeofday((struct timeval*)0,(struct timezone*)0);]])],[],[AC_DEFINE(GETTIMEOFDAY_NO_TZ, 1,
  750. + Define if gettimeofday() does not have second (timezone) argument
  751. + This is the case on Motorola V4 (R40V4.2))
  752. + ])
  753. )
  754. AC_MSG_CHECKING(for major, minor, and makedev)
  755. -AC_TRY_LINK([
  756. +AC_LINK_IFELSE([AC_LANG_PROGRAM([[
  757. #if defined(MAJOR_IN_MKDEV)
  758. #include <sys/mkdev.h>
  759. #elif defined(MAJOR_IN_SYSMACROS)
  760. @@ -2257,9 +2166,9 @@
  761. #else
  762. #include <sys/types.h>
  763. #endif
  764. -],[
  765. +]], [[
  766. makedev(major(0),minor(0));
  767. -],[
  768. +]])],[
  769. AC_DEFINE(HAVE_DEVICE_MACROS, 1,
  770. [Define to 1 if you have the device macros.])
  771. AC_MSG_RESULT(yes)
  772. @@ -2270,14 +2179,14 @@
  773. # On OSF/1 V5.1, getaddrinfo is available, but a define
  774. # for [no]getaddrinfo in netdb.h.
  775. AC_MSG_CHECKING(for getaddrinfo)
  776. -AC_TRY_LINK([
  777. +AC_LINK_IFELSE([AC_LANG_PROGRAM([[
  778. #include <sys/types.h>
  779. #include <sys/socket.h>
  780. #include <netdb.h>
  781. #include <stdio.h>
  782. -],[
  783. +]], [[
  784. getaddrinfo(NULL, NULL, NULL, NULL);
  785. -], [
  786. +]])],[
  787. AC_MSG_RESULT(yes)
  788. AC_MSG_CHECKING(getaddrinfo bug)
  789. AC_TRY_RUN([
  790. @@ -2371,7 +2280,7 @@
  791. AC_MSG_RESULT(buggy)
  792. buggygetaddrinfo=yes,
  793. AC_MSG_RESULT(buggy)
  794. -buggygetaddrinfo=yes)], [
  795. +buggygetaddrinfo=yes)],[
  796. AC_MSG_RESULT(no)
  797. buggygetaddrinfo=yes
  798. ])
  799. @@ -2397,9 +2306,7 @@
  800. AC_MSG_CHECKING(for time.h that defines altzone)
  801. AC_CACHE_VAL(ac_cv_header_time_altzone,
  802. -[AC_TRY_COMPILE([#include <time.h>], [return altzone;],
  803. - ac_cv_header_time_altzone=yes,
  804. - ac_cv_header_time_altzone=no)])
  805. +[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]], [[return altzone;]])],[ac_cv_header_time_altzone=yes],[ac_cv_header_time_altzone=no])])
  806. AC_MSG_RESULT($ac_cv_header_time_altzone)
  807. if test $ac_cv_header_time_altzone = yes; then
  808. AC_DEFINE(HAVE_ALTZONE, 1, [Define this if your time.h defines altzone.])
  809. @@ -2407,25 +2314,22 @@
  810. was_it_defined=no
  811. AC_MSG_CHECKING(whether sys/select.h and sys/time.h may both be included)
  812. -AC_TRY_COMPILE([
  813. +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
  814. #include <sys/types.h>
  815. #include <sys/select.h>
  816. #include <sys/time.h>
  817. -], [;], [
  818. +]], [[;]])],[
  819. AC_DEFINE(SYS_SELECT_WITH_SYS_TIME, 1,
  820. [Define if you can safely include both <sys/select.h> and <sys/time.h>
  821. (which you can't on SCO ODT 3.0).])
  822. was_it_defined=yes
  823. -])
  824. +],[])
  825. AC_MSG_RESULT($was_it_defined)
  826. AC_MSG_CHECKING(for addrinfo)
  827. AC_CACHE_VAL(ac_cv_struct_addrinfo,
  828. -AC_TRY_COMPILE([
  829. -# include <netdb.h>],
  830. - [struct addrinfo a],
  831. - ac_cv_struct_addrinfo=yes,
  832. - ac_cv_struct_addrinfo=no))
  833. +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
  834. +# include <netdb.h>]], [[struct addrinfo a]])],[ac_cv_struct_addrinfo=yes],[ac_cv_struct_addrinfo=no]))
  835. AC_MSG_RESULT($ac_cv_struct_addrinfo)
  836. if test $ac_cv_struct_addrinfo = yes; then
  837. AC_DEFINE(HAVE_ADDRINFO, 1, [struct addrinfo (netdb.h)])
  838. @@ -2433,12 +2337,9 @@
  839. AC_MSG_CHECKING(for sockaddr_storage)
  840. AC_CACHE_VAL(ac_cv_struct_sockaddr_storage,
  841. -AC_TRY_COMPILE([
  842. +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
  843. # include <sys/types.h>
  844. -# include <sys/socket.h>],
  845. - [struct sockaddr_storage s],
  846. - ac_cv_struct_sockaddr_storage=yes,
  847. - ac_cv_struct_sockaddr_storage=no))
  848. +# include <sys/socket.h>]], [[struct sockaddr_storage s]])],[ac_cv_struct_sockaddr_storage=yes],[ac_cv_struct_sockaddr_storage=no]))
  849. AC_MSG_RESULT($ac_cv_struct_sockaddr_storage)
  850. if test $ac_cv_struct_sockaddr_storage = yes; then
  851. AC_DEFINE(HAVE_SOCKADDR_STORAGE, 1, [struct sockaddr_storage (sys/socket.h)])
  852. @@ -2451,30 +2352,28 @@
  853. works=no
  854. AC_MSG_CHECKING(for working volatile)
  855. -AC_TRY_COMPILE([],[volatile int x; x = 0;], works=yes,
  856. - AC_DEFINE(volatile, [], [Define to empty if the keyword does not work.])
  857. -)
  858. +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[volatile int x; x = 0;]])],[works=yes],[AC_DEFINE(volatile, , Define to empty if the keyword does not work.)
  859. +])
  860. AC_MSG_RESULT($works)
  861. works=no
  862. AC_MSG_CHECKING(for working signed char)
  863. -AC_TRY_COMPILE([], [signed char c;], works=yes,
  864. - AC_DEFINE(signed, [], [Define to empty if the keyword does not work.])
  865. -)
  866. +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[signed char c;]])],[works=yes],[AC_DEFINE(signed, , Define to empty if the keyword does not work.)
  867. +])
  868. AC_MSG_RESULT($works)
  869. have_prototypes=no
  870. AC_MSG_CHECKING(for prototypes)
  871. -AC_TRY_COMPILE([int foo(int x) { return 0; }], [return foo(10);],[
  872. +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[int foo(int x) { return 0; }]], [[return foo(10);]])],[
  873. AC_DEFINE(HAVE_PROTOTYPES, 1,
  874. [Define if your compiler supports function prototype])
  875. have_prototypes=yes
  876. -])
  877. +],[])
  878. AC_MSG_RESULT($have_prototypes)
  879. works=no
  880. AC_MSG_CHECKING(for variable length prototypes and stdarg.h)
  881. -AC_TRY_COMPILE([
  882. +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
  883. #include <stdarg.h>
  884. int foo(int x, ...) {
  885. va_list va;
  886. @@ -2484,45 +2383,41 @@
  887. va_arg(va, double);
  888. return 0;
  889. }
  890. -], [return foo(10, "", 3.14);], [
  891. +]], [[return foo(10, "", 3.14);]])],[
  892. AC_DEFINE(HAVE_STDARG_PROTOTYPES, 1,
  893. [Define if your compiler supports variable length function prototypes
  894. (e.g. void fprintf(FILE *, char *, ...);) *and* <stdarg.h>])
  895. works=yes
  896. -])
  897. +],[])
  898. AC_MSG_RESULT($works)
  899. if test "$have_prototypes" = yes; then
  900. bad_prototypes=no
  901. AC_MSG_CHECKING(for bad exec* prototypes)
  902. -AC_TRY_COMPILE([#include <unistd.h>], [char **t;execve("@",t,t);], ,
  903. - AC_DEFINE(BAD_EXEC_PROTOTYPES, 1,
  904. - [Define if your <unistd.h> contains bad prototypes for exec*()
  905. - (as it does on SGI IRIX 4.x)])
  906. +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>]], [[char **t;execve("@",t,t);]])],[],[AC_DEFINE(BAD_EXEC_PROTOTYPES, 1,
  907. + Define if your <unistd.h> contains bad prototypes for exec*()
  908. + (as it does on SGI IRIX 4.x))
  909. bad_prototypes=yes
  910. -)
  911. +])
  912. AC_MSG_RESULT($bad_prototypes)
  913. fi
  914. # check if sockaddr has sa_len member
  915. AC_MSG_CHECKING(if sockaddr has sa_len member)
  916. -AC_TRY_COMPILE([#include <sys/types.h>
  917. -#include <sys/socket.h>],
  918. -[struct sockaddr x;
  919. -x.sa_len = 0;],
  920. - AC_MSG_RESULT(yes)
  921. - AC_DEFINE(HAVE_SOCKADDR_SA_LEN, 1, [Define if sockaddr has sa_len member]),
  922. - AC_MSG_RESULT(no))
  923. +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
  924. +#include <sys/socket.h>]], [[struct sockaddr x;
  925. +x.sa_len = 0;]])],[AC_MSG_RESULT(yes)
  926. + AC_DEFINE(HAVE_SOCKADDR_SA_LEN, 1, Define if sockaddr has sa_len member)],[AC_MSG_RESULT(no)])
  927. va_list_is_array=no
  928. AC_MSG_CHECKING(whether va_list is an array)
  929. -AC_TRY_COMPILE([
  930. +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
  931. #ifdef HAVE_STDARG_PROTOTYPES
  932. #include <stdarg.h>
  933. #else
  934. #include <varargs.h>
  935. #endif
  936. -], [va_list list1, list2; list1 = list2;], , [
  937. +]], [[va_list list1, list2; list1 = list2;]])],[],[
  938. AC_DEFINE(VA_LIST_IS_ARRAY, 1, [Define if a va_list is an array of some kind])
  939. va_list_is_array=yes
  940. ])
  941. @@ -2537,9 +2432,9 @@
  942. AC_MSG_CHECKING([gethostbyname_r with 6 args])
  943. OLD_CFLAGS=$CFLAGS
  944. CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
  945. - AC_TRY_COMPILE([
  946. + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
  947. # include <netdb.h>
  948. - ], [
  949. + ]], [[
  950. char *name;
  951. struct hostent *he, *res;
  952. char buffer[2048];
  953. @@ -2547,12 +2442,12 @@
  954. int h_errnop;
  955. (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
  956. - ], [
  957. + ]])],[
  958. AC_DEFINE(HAVE_GETHOSTBYNAME_R)
  959. AC_DEFINE(HAVE_GETHOSTBYNAME_R_6_ARG, 1,
  960. [Define this if you have the 6-arg version of gethostbyname_r().])
  961. AC_MSG_RESULT(yes)
  962. - ], [
  963. + ],[
  964. AC_MSG_RESULT(no)
  965. AC_MSG_CHECKING([gethostbyname_r with 5 args])
  966. AC_TRY_COMPILE([
  967. @@ -2613,7 +2508,7 @@
  968. # Check for --with-fpectl
  969. AC_MSG_CHECKING(for --with-fpectl)
  970. AC_ARG_WITH(fpectl,
  971. - AC_HELP_STRING(--with-fpectl, enable SIGFPE catching),
  972. + AS_HELP_STRING(--with-fpectl,enable SIGFPE catching),
  973. [
  974. if test "$withval" != no
  975. then
  976. @@ -2633,7 +2528,7 @@
  977. esac
  978. AC_MSG_CHECKING(for --with-libm=STRING)
  979. AC_ARG_WITH(libm,
  980. - AC_HELP_STRING(--with-libm=STRING, math library),
  981. + AS_HELP_STRING(--with-libm=STRING,math library),
  982. [
  983. if test "$withval" = no
  984. then LIBM=
  985. @@ -2649,7 +2544,7 @@
  986. AC_SUBST(LIBC)
  987. AC_MSG_CHECKING(for --with-libc=STRING)
  988. AC_ARG_WITH(libc,
  989. - AC_HELP_STRING(--with-libc=STRING, C library),
  990. + AS_HELP_STRING(--with-libc=STRING,C library),
  991. [
  992. if test "$withval" = no
  993. then LIBC=
  994. @@ -2684,20 +2579,20 @@
  995. AC_MSG_CHECKING(for UCS-4 tcl)
  996. have_ucs4_tcl=no
  997. -AC_TRY_COMPILE([
  998. +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
  999. #include <tcl.h>
  1000. #if TCL_UTF_MAX != 6
  1001. # error "NOT UCS4_TCL"
  1002. -#endif], [], [
  1003. +#endif]], [[]])],[
  1004. AC_DEFINE(HAVE_UCS4_TCL, 1, [Define this if you have tcl and TCL_UTF_MAX==6])
  1005. have_ucs4_tcl=yes
  1006. -])
  1007. +],[])
  1008. AC_MSG_RESULT($have_ucs4_tcl)
  1009. AC_MSG_CHECKING(what type to use for unicode)
  1010. dnl quadrigraphs "@<:@" and "@:>@" produce "[" and "]" in the output
  1011. AC_ARG_ENABLE(unicode,
  1012. - AC_HELP_STRING(--enable-unicode@<:@=ucs@<:@24@:>@@:>@, Enable Unicode strings (default is yes)),
  1013. + AS_HELP_STRING(--enable-unicode@<:@=ucs@<:@24@:>@@:>@,Enable Unicode strings (default is yes)),
  1014. [],
  1015. [enable_unicode=yes])
  1016. @@ -2764,15 +2659,12 @@
  1017. # or fills with zeros (like the Cray J90, according to Tim Peters).
  1018. AC_MSG_CHECKING(whether right shift extends the sign bit)
  1019. AC_CACHE_VAL(ac_cv_rshift_extends_sign, [
  1020. -AC_TRY_RUN([
  1021. +AC_RUN_IFELSE([AC_LANG_SOURCE([[
  1022. int main()
  1023. {
  1024. exit(((-1)>>3 == -1) ? 0 : 1);
  1025. }
  1026. -],
  1027. -ac_cv_rshift_extends_sign=yes,
  1028. -ac_cv_rshift_extends_sign=no,
  1029. -ac_cv_rshift_extends_sign=yes)])
  1030. +]])],[ac_cv_rshift_extends_sign=yes],[ac_cv_rshift_extends_sign=no],[ac_cv_rshift_extends_sign=yes])])
  1031. AC_MSG_RESULT($ac_cv_rshift_extends_sign)
  1032. if test "$ac_cv_rshift_extends_sign" = no
  1033. then
  1034. @@ -2784,12 +2676,12 @@
  1035. # check for getc_unlocked and related locking functions
  1036. AC_MSG_CHECKING(for getc_unlocked() and friends)
  1037. AC_CACHE_VAL(ac_cv_have_getc_unlocked, [
  1038. -AC_TRY_LINK([#include <stdio.h>],[
  1039. +AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>]], [[
  1040. FILE *f = fopen("/dev/null", "r");
  1041. flockfile(f);
  1042. getc_unlocked(f);
  1043. funlockfile(f);
  1044. -], ac_cv_have_getc_unlocked=yes, ac_cv_have_getc_unlocked=no)])
  1045. +]])],[ac_cv_have_getc_unlocked=yes],[ac_cv_have_getc_unlocked=no])])
  1046. AC_MSG_RESULT($ac_cv_have_getc_unlocked)
  1047. if test "$ac_cv_have_getc_unlocked" = yes
  1048. then
  1049. @@ -2798,8 +2690,7 @@
  1050. fi
  1051. # check for readline 2.2
  1052. -AC_TRY_CPP([#include <readline/readline.h>],
  1053. -have_readline=yes, have_readline=no)
  1054. +AC_PREPROC_IFELSE([AC_LANG_SOURCE([[#include <readline/readline.h>]])],[have_readline=yes],[have_readline=no])
  1055. if test $have_readline = yes
  1056. then
  1057. AC_EGREP_HEADER([extern int rl_completion_append_character;],
  1058. @@ -2820,7 +2711,7 @@
  1059. AC_MSG_CHECKING(for broken nice())
  1060. AC_CACHE_VAL(ac_cv_broken_nice, [
  1061. -AC_TRY_RUN([
  1062. +AC_RUN_IFELSE([AC_LANG_SOURCE([[
  1063. int main()
  1064. {
  1065. int val1 = nice(1);
  1066. @@ -2828,10 +2719,7 @@
  1067. exit(0);
  1068. exit(1);
  1069. }
  1070. -],
  1071. -ac_cv_broken_nice=yes,
  1072. -ac_cv_broken_nice=no,
  1073. -ac_cv_broken_nice=no)])
  1074. +]])],[ac_cv_broken_nice=yes],[ac_cv_broken_nice=no],[ac_cv_broken_nice=no])])
  1075. AC_MSG_RESULT($ac_cv_broken_nice)
  1076. if test "$ac_cv_broken_nice" = yes
  1077. then
  1078. @@ -2842,7 +2730,7 @@
  1079. # tzset(3) exists and works like we expect it to
  1080. AC_MSG_CHECKING(for working tzset())
  1081. AC_CACHE_VAL(ac_cv_working_tzset, [
  1082. -AC_TRY_RUN([
  1083. +AC_RUN_IFELSE([AC_LANG_SOURCE([[
  1084. #include <stdlib.h>
  1085. #include <time.h>
  1086. #include <string.h>
  1087. @@ -2880,10 +2768,7 @@
  1088. exit(0);
  1089. }
  1090. -],
  1091. -ac_cv_working_tzset=yes,
  1092. -ac_cv_working_tzset=no,
  1093. -ac_cv_working_tzset=no)])
  1094. +]])],[ac_cv_working_tzset=yes],[ac_cv_working_tzset=no],[ac_cv_working_tzset=no])])
  1095. AC_MSG_RESULT($ac_cv_working_tzset)
  1096. if test "$ac_cv_working_tzset" = yes
  1097. then
  1098. @@ -2894,13 +2779,10 @@
  1099. # Look for subsecond timestamps in struct stat
  1100. AC_MSG_CHECKING(for tv_nsec in struct stat)
  1101. AC_CACHE_VAL(ac_cv_stat_tv_nsec,
  1102. -AC_TRY_COMPILE([#include <sys/stat.h>], [
  1103. +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/stat.h>]], [[
  1104. struct stat st;
  1105. st.st_mtim.tv_nsec = 1;
  1106. -],
  1107. -ac_cv_stat_tv_nsec=yes,
  1108. -ac_cv_stat_tv_nsec=no,
  1109. -ac_cv_stat_tv_nsec=no))
  1110. +]])],[ac_cv_stat_tv_nsec=yes],[ac_cv_stat_tv_nsec=no]))
  1111. AC_MSG_RESULT($ac_cv_stat_tv_nsec)
  1112. if test "$ac_cv_stat_tv_nsec" = yes
  1113. then
  1114. @@ -2911,12 +2793,10 @@
  1115. # On HP/UX 11.0, mvwdelch is a block with a return statement
  1116. AC_MSG_CHECKING(whether mvwdelch is an expression)
  1117. AC_CACHE_VAL(ac_cv_mvwdelch_is_expression,
  1118. -AC_TRY_COMPILE([#include <curses.h>], [
  1119. +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <curses.h>]], [[
  1120. int rtn;
  1121. rtn = mvwdelch(0,0,0);
  1122. -], ac_cv_mvwdelch_is_expression=yes,
  1123. - ac_cv_mvwdelch_is_expression=no,
  1124. - ac_cv_mvwdelch_is_expression=yes))
  1125. +]])],[ac_cv_mvwdelch_is_expression=yes],[ac_cv_mvwdelch_is_expression=no]))
  1126. AC_MSG_RESULT($ac_cv_mvwdelch_is_expression)
  1127. if test "$ac_cv_mvwdelch_is_expression" = yes
  1128. @@ -2927,12 +2807,10 @@
  1129. AC_MSG_CHECKING(whether WINDOW has _flags)
  1130. AC_CACHE_VAL(ac_cv_window_has_flags,
  1131. -AC_TRY_COMPILE([#include <curses.h>], [
  1132. +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <curses.h>]], [[
  1133. WINDOW *w;
  1134. w->_flags = 0;
  1135. -], ac_cv_window_has_flags=yes,
  1136. - ac_cv_window_has_flags=no,
  1137. - ac_cv_window_has_flags=no))
  1138. +]])],[ac_cv_window_has_flags=yes],[ac_cv_window_has_flags=no]))
  1139. AC_MSG_RESULT($ac_cv_window_has_flags)