config.m4 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618
  1. dnl $Id$ -*- autoconf -*-
  2. dnl
  3. dnl Check if flush should be called explicitly after buffered io
  4. dnl
  5. AC_CACHE_CHECK([whether flush should be called explicitly after a buffered io], ac_cv_flush_io,[
  6. AC_TRY_RUN( [
  7. #include <stdio.h>
  8. #include <stdlib.h>
  9. int main(int argc, char **argv)
  10. {
  11. char *filename = tmpnam(NULL);
  12. char buffer[64];
  13. int result = 0;
  14. FILE *fp = fopen(filename, "wb");
  15. if (NULL == fp)
  16. return 0;
  17. fputs("line 1\n", fp);
  18. fputs("line 2\n", fp);
  19. fclose(fp);
  20. fp = fopen(filename, "rb+");
  21. if (NULL == fp)
  22. return 0;
  23. fgets(buffer, sizeof(buffer), fp);
  24. fputs("line 3\n", fp);
  25. rewind(fp);
  26. fgets(buffer, sizeof(buffer), fp);
  27. if (0 != strcmp(buffer, "line 1\n"))
  28. result = 1;
  29. fgets(buffer, sizeof(buffer), fp);
  30. if (0 != strcmp(buffer, "line 3\n"))
  31. result = 1;
  32. fclose(fp);
  33. unlink(filename);
  34. exit(result);
  35. }
  36. ],[
  37. ac_cv_flush_io=no
  38. ],[
  39. ac_cv_flush_io=yes
  40. ],[
  41. ac_cv_flush_io=no
  42. ])])
  43. if test "$ac_cv_flush_io" = "yes"; then
  44. AC_DEFINE(HAVE_FLUSHIO, 1, [Define if flush should be called explicitly after a buffered io.])
  45. fi
  46. dnl
  47. dnl Check for crypt() capabilities
  48. dnl
  49. if test "$ac_cv_func_crypt" = "no"; then
  50. AC_CHECK_LIB(crypt, crypt, [
  51. LIBS="-lcrypt $LIBS -lcrypt"
  52. AC_DEFINE(HAVE_CRYPT, 1, [ ])
  53. ])
  54. fi
  55. AC_CACHE_CHECK(for standard DES crypt, ac_cv_crypt_des,[
  56. AC_TRY_RUN([
  57. #if HAVE_UNISTD_H
  58. #include <unistd.h>
  59. #endif
  60. #if HAVE_CRYPT_H
  61. #include <crypt.h>
  62. #endif
  63. int main() {
  64. #if HAVE_CRYPT
  65. char *encrypted = crypt("rasmuslerdorf","rl");
  66. exit(!encrypted || strcmp(encrypted,"rl.3StKT.4T8M"));
  67. #else
  68. exit(1);
  69. #endif
  70. }],[
  71. ac_cv_crypt_des=yes
  72. ],[
  73. ac_cv_crypt_des=no
  74. ],[
  75. ac_cv_crypt_des=yes
  76. ])])
  77. AC_CACHE_CHECK(for extended DES crypt, ac_cv_crypt_ext_des,[
  78. AC_TRY_RUN([
  79. #if HAVE_UNISTD_H
  80. #include <unistd.h>
  81. #endif
  82. #if HAVE_CRYPT_H
  83. #include <crypt.h>
  84. #endif
  85. int main() {
  86. #if HAVE_CRYPT
  87. char *encrypted = crypt("rasmuslerdorf","_J9..rasm");
  88. exit(!encrypted || strcmp(encrypted,"_J9..rasmBYk8r9AiWNc"));
  89. #else
  90. exit(1);
  91. #endif
  92. }],[
  93. ac_cv_crypt_ext_des=yes
  94. ],[
  95. ac_cv_crypt_ext_des=no
  96. ],[
  97. ac_cv_crypt_ext_des=no
  98. ])])
  99. AC_CACHE_CHECK(for MD5 crypt, ac_cv_crypt_md5,[
  100. AC_TRY_RUN([
  101. #if HAVE_UNISTD_H
  102. #include <unistd.h>
  103. #endif
  104. #if HAVE_CRYPT_H
  105. #include <crypt.h>
  106. #endif
  107. int main() {
  108. #if HAVE_CRYPT
  109. char salt[15], answer[40];
  110. char *encrypted;
  111. salt[0]='$'; salt[1]='1'; salt[2]='$';
  112. salt[3]='r'; salt[4]='a'; salt[5]='s';
  113. salt[6]='m'; salt[7]='u'; salt[8]='s';
  114. salt[9]='l'; salt[10]='e'; salt[11]='$';
  115. salt[12]='\0';
  116. strcpy(answer,salt);
  117. strcat(answer,"rISCgZzpwk3UhDidwXvin0");
  118. encrypted = crypt("rasmuslerdorf",salt);
  119. exit(!encrypted || strcmp(encrypted,answer));
  120. #else
  121. exit(1);
  122. #endif
  123. }],[
  124. ac_cv_crypt_md5=yes
  125. ],[
  126. ac_cv_crypt_md5=no
  127. ],[
  128. ac_cv_crypt_md5=no
  129. ])])
  130. AC_CACHE_CHECK(for Blowfish crypt, ac_cv_crypt_blowfish,[
  131. AC_TRY_RUN([
  132. #if HAVE_UNISTD_H
  133. #include <unistd.h>
  134. #endif
  135. #if HAVE_CRYPT_H
  136. #include <crypt.h>
  137. #endif
  138. int main() {
  139. #if HAVE_CRYPT
  140. char salt[30], answer[70];
  141. char *encrypted;
  142. salt[0]='$'; salt[1]='2'; salt[2]='a'; salt[3]='$'; salt[4]='0'; salt[5]='7'; salt[6]='$'; salt[7]='\0';
  143. strcat(salt,"rasmuslerd............");
  144. strcpy(answer,salt);
  145. strcpy(&answer[29],"nIdrcHdxcUxWomQX9j6kvERCFjTg7Ra");
  146. encrypted = crypt("rasmuslerdorf",salt);
  147. exit(!encrypted || strcmp(encrypted,answer));
  148. #else
  149. exit(1);
  150. #endif
  151. }],[
  152. ac_cv_crypt_blowfish=yes
  153. ],[
  154. ac_cv_crypt_blowfish=no
  155. ],[
  156. ac_cv_crypt_blowfish=no
  157. ])])
  158. AC_CACHE_CHECK(for SHA512 crypt, ac_cv_crypt_sha512,[
  159. AC_TRY_RUN([
  160. #if HAVE_UNISTD_H
  161. #include <unistd.h>
  162. #endif
  163. #if HAVE_CRYPT_H
  164. #include <crypt.h>
  165. #endif
  166. int main() {
  167. #if HAVE_CRYPT
  168. char salt[21], answer[21+86];
  169. char *encrypted;
  170. strcpy(salt,"\$6\$rasmuslerdorf\$");
  171. strcpy(answer, salt);
  172. strcat(answer, "EeHCRjm0bljalWuALHSTs1NB9ipEiLEXLhYeXdOpx22gmlmVejnVXFhd84cEKbYxCo.XuUTrW.RLraeEnsvWs/");
  173. encrypted = crypt("rasmuslerdorf",salt);
  174. exit(!encrypted || strcmp(encrypted,answer));
  175. #else
  176. exit(1);
  177. #endif
  178. }],[
  179. ac_cv_crypt_sha512=yes
  180. ],[
  181. ac_cv_crypt_sha512=no
  182. ],[
  183. ac_cv_crypt_sha512=no
  184. ])])
  185. AC_CACHE_CHECK(for SHA256 crypt, ac_cv_crypt_sha256,[
  186. AC_TRY_RUN([
  187. #if HAVE_UNISTD_H
  188. #include <unistd.h>
  189. #endif
  190. #if HAVE_CRYPT_H
  191. #include <crypt.h>
  192. #endif
  193. int main() {
  194. #if HAVE_CRYPT
  195. char salt[21], answer[21+43];
  196. char *encrypted;
  197. strcpy(salt,"\$5\$rasmuslerdorf\$");
  198. strcpy(answer, salt);
  199. strcat(answer, "cFAm2puLCujQ9t.0CxiFIIvFi4JyQx5UncCt/xRIX23");
  200. encrypted = crypt("rasmuslerdorf",salt);
  201. exit(!encrypted || strcmp(encrypted,answer));
  202. #else
  203. exit(1);
  204. #endif
  205. }],[
  206. ac_cv_crypt_sha256=yes
  207. ],[
  208. ac_cv_crypt_sha256=no
  209. ],[
  210. ac_cv_crypt_sha256=no
  211. ])])
  212. dnl
  213. dnl If one of them is missing, use our own implementation, portable code is then possible
  214. dnl
  215. if test "$ac_cv_crypt_blowfish" = "no" || test "$ac_cv_crypt_des" = "no" || test "$ac_cv_crypt_ext_des" = "no" || test "x$php_crypt_r" = "x0"; then
  216. dnl
  217. dnl Check for __alignof__ support in the compiler
  218. dnl
  219. AC_CACHE_CHECK(whether the compiler supports __alignof__, ac_cv_alignof_exists,[
  220. AC_TRY_COMPILE([
  221. ],[
  222. int align = __alignof__(int);
  223. ],[
  224. ac_cv_alignof_exists=yes
  225. ],[
  226. ac_cv_alignof_exists=no
  227. ])])
  228. if test "$ac_cv_alignof_exists" = "yes"; then
  229. AC_DEFINE([HAVE_ALIGNOF], 1, [whether the compiler supports __alignof__])
  230. fi
  231. dnl
  232. dnl Check for __attribute__ ((__aligned__)) support in the compiler
  233. dnl
  234. AC_CACHE_CHECK(whether the compiler supports aligned attribute, ac_cv_attribute_aligned,[
  235. AC_TRY_COMPILE([
  236. ],[
  237. unsigned char test[32] __attribute__ ((__aligned__ (__alignof__ (int))));
  238. ],[
  239. ac_cv_attribute_aligned=yes
  240. ],[
  241. ac_cv_attribute_aligned=no
  242. ])])
  243. if test "$ac_cv_attribute_aligned" = "yes"; then
  244. AC_DEFINE([HAVE_ATTRIBUTE_ALIGNED], 1, [whether the compiler supports __attribute__ ((__aligned__))])
  245. fi
  246. AC_DEFINE_UNQUOTED(PHP_USE_PHP_CRYPT_R, 1, [Whether PHP has to use its own crypt_r for blowfish, des, ext des and md5])
  247. AC_DEFINE_UNQUOTED(PHP_STD_DES_CRYPT, 1, [Whether the system supports standard DES salt])
  248. AC_DEFINE_UNQUOTED(PHP_BLOWFISH_CRYPT, 1, [Whether the system supports BlowFish salt])
  249. AC_DEFINE_UNQUOTED(PHP_EXT_DES_CRYPT, 1, [Whether the system supports extended DES salt])
  250. AC_DEFINE_UNQUOTED(PHP_MD5_CRYPT, 1, [Whether the system supports MD5 salt])
  251. AC_DEFINE_UNQUOTED(PHP_SHA512_CRYPT, 1, [Whether the system supports SHA512 salt])
  252. AC_DEFINE_UNQUOTED(PHP_SHA256_CRYPT, 1, [Whether the system supports SHA256 salt])
  253. PHP_ADD_SOURCES(PHP_EXT_DIR(standard), crypt_freesec.c crypt_blowfish.c crypt_sha512.c crypt_sha256.c php_crypt_r.c)
  254. else
  255. if test "$ac_cv_crypt_des" = "yes"; then
  256. ac_result=1
  257. ac_crypt_des=1
  258. else
  259. ac_result=0
  260. ac_crypt_des=0
  261. fi
  262. AC_DEFINE_UNQUOTED(PHP_STD_DES_CRYPT, $ac_result, [Whether the system supports standard DES salt])
  263. if test "$ac_cv_crypt_blowfish" = "yes"; then
  264. ac_result=1
  265. ac_crypt_blowfish=1
  266. else
  267. ac_result=0
  268. ac_crypt_blowfish=0
  269. fi
  270. AC_DEFINE_UNQUOTED(PHP_BLOWFISH_CRYPT, $ac_result, [Whether the system supports BlowFish salt])
  271. if test "$ac_cv_crypt_ext_des" = "yes"; then
  272. ac_result=1
  273. ac_crypt_edes=1
  274. else
  275. ac_result=0
  276. ac_crypt_edes=0
  277. fi
  278. AC_DEFINE_UNQUOTED(PHP_EXT_DES_CRYPT, $ac_result, [Whether the system supports extended DES salt])
  279. if test "$ac_cv_crypt_md5" = "yes"; then
  280. ac_result=1
  281. ac_crypt_md5=1
  282. else
  283. ac_result=0
  284. ac_crypt_md5=0
  285. fi
  286. AC_DEFINE_UNQUOTED(PHP_MD5_CRYPT, $ac_result, [Whether the system supports MD5 salt])
  287. if test "$ac_cv_crypt_sha512" = "yes"; then
  288. ac_result=1
  289. ac_crypt_sha512=1
  290. else
  291. ac_result=0
  292. ac_crypt_sha512=0
  293. fi
  294. AC_DEFINE_UNQUOTED(PHP_SHA512_CRYPT, $ac_result, [Whether the system supports SHA512 salt])
  295. if test "$ac_cv_crypt_sha256" = "yes"; then
  296. ac_result=1
  297. ac_crypt_sha256=1
  298. else
  299. ac_result=0
  300. ac_crypt_sha256=0
  301. fi
  302. AC_DEFINE_UNQUOTED(PHP_SHA256_CRYPT, $ac_result, [Whether the system supports SHA256 salt])
  303. AC_DEFINE_UNQUOTED(PHP_USE_PHP_CRYPT_R, 0, [Whether PHP has to use its own crypt_r for blowfish, des and ext des])
  304. fi
  305. dnl
  306. dnl Check for available functions
  307. dnl
  308. AC_CHECK_FUNCS(getcwd getwd asinh acosh atanh log1p hypot glob strfmon nice fpclass isinf isnan mempcpy strpncpy)
  309. AC_FUNC_FNMATCH
  310. dnl
  311. dnl Check if there is a support means of creating a new process
  312. dnl and defining which handles it receives
  313. dnl
  314. AC_CHECK_FUNCS(fork CreateProcess, [
  315. php_can_support_proc_open=yes
  316. break
  317. ],[
  318. php_can_support_proc_open=no
  319. ])
  320. AC_MSG_CHECKING([if your OS can spawn processes with inherited handles])
  321. if test "$php_can_support_proc_open" = "yes"; then
  322. AC_MSG_RESULT(yes)
  323. AC_DEFINE(PHP_CAN_SUPPORT_PROC_OPEN,1, [Define if your system has fork/vfork/CreateProcess])
  324. else
  325. AC_MSG_RESULT(no)
  326. fi
  327. PHP_ENABLE_CHROOT_FUNC=no
  328. case "$PHP_SAPI" in
  329. embed)
  330. PHP_ENABLE_CHROOT_FUNC=yes
  331. ;;
  332. none)
  333. for PROG in $PHP_BINARIES; do
  334. case "$PROG" in
  335. cgi|cli)
  336. PHP_ENABLE_CHROOT_FUNC=yes
  337. ;;
  338. *)
  339. PHP_ENABLE_CHROOT_FUNC=no
  340. break
  341. ;;
  342. esac
  343. done
  344. ;;
  345. esac
  346. if test "$PHP_ENABLE_CHROOT_FUNC" = "yes"; then
  347. AC_DEFINE(ENABLE_CHROOT_FUNC, 1, [Whether to enable chroot() function])
  348. fi
  349. dnl
  350. dnl Detect library functions needed by php dns_xxx functions
  351. dnl ext/standard/php_dns.h will collect these in a single define: HAVE_FULL_DNS_FUNCS
  352. dnl
  353. PHP_CHECK_FUNC(res_nsearch, resolv, bind, socket)
  354. PHP_CHECK_FUNC(dns_search, resolv, bind, socket)
  355. PHP_CHECK_FUNC(dn_expand, resolv, bind, socket)
  356. PHP_CHECK_FUNC(dn_skipname, resolv, bind, socket)
  357. dnl
  358. dnl These are old deprecated functions
  359. dnl
  360. PHP_CHECK_FUNC(res_search, resolv, bind, socket)
  361. dnl
  362. dnl Check if atof() accepts NAN
  363. dnl
  364. AC_CACHE_CHECK(whether atof() accepts NAN, ac_cv_atof_accept_nan,[
  365. AC_TRY_RUN([
  366. #include <math.h>
  367. #include <stdlib.h>
  368. #ifdef HAVE_ISNAN
  369. #define zend_isnan(a) isnan(a)
  370. #elif defined(HAVE_FPCLASS)
  371. #define zend_isnan(a) ((fpclass(a) == FP_SNAN) || (fpclass(a) == FP_QNAN))
  372. #else
  373. #define zend_isnan(a) 0
  374. #endif
  375. int main(int argc, char** argv)
  376. {
  377. return zend_isnan(atof("NAN")) ? 0 : 1;
  378. }
  379. ],[
  380. ac_cv_atof_accept_nan=yes
  381. ],[
  382. ac_cv_atof_accept_nan=no
  383. ],[
  384. ac_cv_atof_accept_nan=no
  385. ])])
  386. if test "$ac_cv_atof_accept_nan" = "yes"; then
  387. AC_DEFINE([HAVE_ATOF_ACCEPTS_NAN], 1, [whether atof() accepts NAN])
  388. fi
  389. dnl
  390. dnl Check if atof() accepts INF
  391. dnl
  392. AC_CACHE_CHECK(whether atof() accepts INF, ac_cv_atof_accept_inf,[
  393. AC_TRY_RUN([
  394. #include <math.h>
  395. #include <stdlib.h>
  396. #ifdef HAVE_ISINF
  397. #define zend_isinf(a) isinf(a)
  398. #elif defined(INFINITY)
  399. /* Might not work, but is required by ISO C99 */
  400. #define zend_isinf(a) (((a)==INFINITY)?1:0)
  401. #elif defined(HAVE_FPCLASS)
  402. #define zend_isinf(a) ((fpclass(a) == FP_PINF) || (fpclass(a) == FP_NINF))
  403. #else
  404. #define zend_isinf(a) 0
  405. #endif
  406. int main(int argc, char** argv)
  407. {
  408. return zend_isinf(atof("INF")) && zend_isinf(atof("-INF")) ? 0 : 1;
  409. }
  410. ],[
  411. ac_cv_atof_accept_inf=yes
  412. ],[
  413. ac_cv_atof_accept_inf=no
  414. ],[
  415. ac_cv_atof_accept_inf=no
  416. ])])
  417. if test "$ac_cv_atof_accept_inf" = "yes"; then
  418. AC_DEFINE([HAVE_ATOF_ACCEPTS_INF], 1, [whether atof() accepts INF])
  419. fi
  420. dnl
  421. dnl Check if HUGE_VAL == INF
  422. dnl
  423. AC_CACHE_CHECK(whether HUGE_VAL == INF, ac_cv_huge_val_inf,[
  424. AC_TRY_RUN([
  425. #include <math.h>
  426. #include <stdlib.h>
  427. #ifdef HAVE_ISINF
  428. #define zend_isinf(a) isinf(a)
  429. #elif defined(INFINITY)
  430. /* Might not work, but is required by ISO C99 */
  431. #define zend_isinf(a) (((a)==INFINITY)?1:0)
  432. #elif defined(HAVE_FPCLASS)
  433. #define zend_isinf(a) ((fpclass(a) == FP_PINF) || (fpclass(a) == FP_NINF))
  434. #else
  435. #define zend_isinf(a) 0
  436. #endif
  437. int main(int argc, char** argv)
  438. {
  439. return zend_isinf(HUGE_VAL) ? 0 : 1;
  440. }
  441. ],[
  442. ac_cv_huge_val_inf=yes
  443. ],[
  444. ac_cv_huge_val_inf=no
  445. ],[
  446. ac_cv_huge_val_inf=yes
  447. ])])
  448. dnl This is the most probable fallback so we assume yes in case of cross compile.
  449. if test "$ac_cv_huge_val_inf" = "yes"; then
  450. AC_DEFINE([HAVE_HUGE_VAL_INF], 1, [whether HUGE_VAL == INF])
  451. fi
  452. dnl
  453. dnl Check if HUGE_VAL + -HUGEVAL == NAN
  454. dnl
  455. AC_CACHE_CHECK(whether HUGE_VAL + -HUGEVAL == NAN, ac_cv_huge_val_nan,[
  456. AC_TRY_RUN([
  457. #include <math.h>
  458. #include <stdlib.h>
  459. #ifdef HAVE_ISNAN
  460. #define zend_isnan(a) isnan(a)
  461. #elif defined(HAVE_FPCLASS)
  462. #define zend_isnan(a) ((fpclass(a) == FP_SNAN) || (fpclass(a) == FP_QNAN))
  463. #else
  464. #define zend_isnan(a) 0
  465. #endif
  466. int main(int argc, char** argv)
  467. {
  468. #if defined(__sparc__) && !(__GNUC__ >= 3)
  469. /* prevent bug #27830 */
  470. return 1;
  471. #else
  472. return zend_isnan(HUGE_VAL + -HUGE_VAL) ? 0 : 1;
  473. #endif
  474. }
  475. ],[
  476. ac_cv_huge_val_nan=yes
  477. ],[
  478. ac_cv_huge_val_nan=no
  479. ],[
  480. ac_cv_huge_val_nan=yes
  481. ])])
  482. dnl This is the most probable fallback so we assume yes in case of cross compile.
  483. if test "$ac_cv_huge_val_nan" = "yes"; then
  484. AC_DEFINE([HAVE_HUGE_VAL_NAN], 1, [whether HUGE_VAL + -HUGEVAL == NAN])
  485. fi
  486. dnl
  487. dnl Check for strptime()
  488. dnl
  489. AC_CACHE_CHECK(whether strptime() declaration fails, ac_cv_strptime_decl_fails,[
  490. AC_TRY_COMPILE([
  491. #include <time.h>
  492. ],[
  493. #ifndef HAVE_STRPTIME
  494. #error no strptime() on this platform
  495. #else
  496. /* use invalid strptime() declaration to see if it fails to compile */
  497. int strptime(const char *s, const char *format, struct tm *tm);
  498. #endif
  499. ],[
  500. ac_cv_strptime_decl_fails=no
  501. ],[
  502. ac_cv_strptime_decl_fails=yes
  503. ])])
  504. if test "$ac_cv_strptime_decl_fails" = "yes"; then
  505. AC_DEFINE([HAVE_STRPTIME_DECL_FAILS], 1, [whether strptime() declaration fails])
  506. fi
  507. dnl
  508. dnl Check for i18n capabilities
  509. dnl
  510. AC_CHECK_HEADERS([wchar.h])
  511. AC_CHECK_FUNCS([mblen])
  512. AC_CHECK_FUNCS([mbrlen mbsinit],,,[
  513. #ifdef HAVE_WCHAR_H
  514. # include <wchar.h>
  515. #endif
  516. ])
  517. AC_CACHE_CHECK([for mbstate_t], [ac_cv_type_mbstate_t],[
  518. AC_TRY_COMPILE([
  519. #ifdef HAVE_WCHAR_H
  520. # include <wchar.h>
  521. #endif
  522. ],[
  523. mbstate_t a;
  524. ],[
  525. ac_cv_type_mbstate_t=yes
  526. ],[
  527. ac_cv_type_mbstate_t=no
  528. ])])
  529. if test "$ac_cv_type_mbstate_t" = "yes"; then
  530. AC_DEFINE([HAVE_MBSTATE_T], 1, [Define if your system has mbstate_t in wchar.h])
  531. fi
  532. dnl
  533. dnl Check for atomic operation API availability in Solaris
  534. dnl
  535. AC_CHECK_HEADERS([atomic.h])
  536. dnl
  537. dnl Setup extension sources
  538. dnl
  539. PHP_NEW_EXTENSION(standard, array.c base64.c basic_functions.c browscap.c crc32.c crypt.c \
  540. cyr_convert.c datetime.c dir.c dl.c dns.c exec.c file.c filestat.c \
  541. flock_compat.c formatted_print.c fsock.c head.c html.c image.c \
  542. info.c iptc.c lcg.c link.c mail.c math.c md5.c metaphone.c \
  543. microtime.c pack.c pageinfo.c quot_print.c rand.c \
  544. soundex.c string.c scanf.c syslog.c type.c uniqid.c url.c \
  545. var.c versioning.c assert.c strnatcmp.c levenshtein.c \
  546. incomplete_class.c url_scanner_ex.c ftp_fopen_wrapper.c \
  547. http_fopen_wrapper.c php_fopen_wrapper.c credits.c css.c \
  548. var_unserializer.c ftok.c sha1.c user_filters.c uuencode.c \
  549. filters.c proc_open.c streamsfuncs.c http.c password.c)
  550. PHP_ADD_MAKEFILE_FRAGMENT
  551. PHP_INSTALL_HEADERS([ext/standard/])