mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1819 lines
56 KiB

  1. diff -urN gcc-3.3.2/gcc/config/arm/linux-elf.h gcc-3.3.2-uClibc/gcc/config/arm/linux-elf.h
  2. --- gcc-3.3.2/gcc/config/arm/linux-elf.h 2003-09-16 10:39:23.000000000 -0500
  3. +++ gcc-3.3.2-uClibc/gcc/config/arm/linux-elf.h 2004-01-07 02:40:15.000000000 -0600
  4. @@ -78,6 +78,18 @@
  5. "%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"
  6. #undef LINK_SPEC
  7. +#ifdef USE_UCLIBC
  8. +#define LINK_SPEC "%{h*} %{version:-v} \
  9. + %{b} %{Wl,*:%*} \
  10. + %{static:-Bstatic} \
  11. + %{shared:-shared} \
  12. + %{symbolic:-Bsymbolic} \
  13. + %{rdynamic:-export-dynamic} \
  14. + %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0} \
  15. + -X \
  16. + %{mbig-endian:-EB}" \
  17. + SUBTARGET_EXTRA_LINK_SPEC
  18. +#else
  19. #define LINK_SPEC "%{h*} %{version:-v} \
  20. %{b} %{Wl,*:%*} \
  21. %{static:-Bstatic} \
  22. @@ -88,6 +100,7 @@
  23. -X \
  24. %{mbig-endian:-EB}" \
  25. SUBTARGET_EXTRA_LINK_SPEC
  26. +#endif
  27. #define TARGET_OS_CPP_BUILTINS() \
  28. do { \
  29. diff -urN gcc-3.3.2/gcc/config/cris/linux.h gcc-3.3.2-uClibc/gcc/config/cris/linux.h
  30. --- gcc-3.3.2/gcc/config/cris/linux.h 2003-03-10 21:01:35.000000000 -0600
  31. +++ gcc-3.3.2-uClibc/gcc/config/cris/linux.h 2004-01-08 08:46:08.000000000 -0600
  32. @@ -81,6 +81,25 @@
  33. #undef CRIS_DEFAULT_CPU_VERSION
  34. #define CRIS_DEFAULT_CPU_VERSION CRIS_CPU_NG
  35. +#ifdef USE_UCLIBC
  36. +
  37. +#undef CRIS_SUBTARGET_VERSION
  38. +#define CRIS_SUBTARGET_VERSION " - cris-axis-linux-uclibc"
  39. +
  40. +#undef CRIS_LINK_SUBTARGET_SPEC
  41. +#define CRIS_LINK_SUBTARGET_SPEC \
  42. + "-mcrislinux\
  43. + -rpath-link include/asm/../..%s\
  44. + %{shared} %{static}\
  45. + %{symbolic:-Bdynamic} %{shlib:-Bdynamic} %{static:-Bstatic}\
  46. + %{!shared: \
  47. + %{!static: \
  48. + %{rdynamic:-export-dynamic} \
  49. + %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}} \
  50. + %{!r:%{O2|O3: --gc-sections}}"
  51. +
  52. +#else /* USE_UCLIBC */
  53. +
  54. #undef CRIS_SUBTARGET_VERSION
  55. #define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu"
  56. @@ -95,6 +114,8 @@
  57. %{!shared:%{!static:%{rdynamic:-export-dynamic}}}\
  58. %{!r:%{O2|O3: --gc-sections}}"
  59. +#endif /* USE_UCLIBC */
  60. +
  61. /* Node: Run-time Target */
  62. diff -urN gcc-3.3.2/gcc/config/cris/t-linux-uclibc gcc-3.3.2-uClibc/gcc/config/cris/t-linux-uclibc
  63. --- gcc-3.3.2/gcc/config/cris/t-linux-uclibc 1969-12-31 18:00:00.000000000 -0600
  64. +++ gcc-3.3.2-uClibc/gcc/config/cris/t-linux-uclibc 2004-01-08 09:56:59.000000000 -0600
  65. @@ -0,0 +1,3 @@
  66. +T_CFLAGS = -DUSE_UCLIBC
  67. +TARGET_LIBGCC2_CFLAGS += -fPIC
  68. +CRTSTUFF_T_CFLAGS_S = $(TARGET_LIBGCC2_CFLAGS)
  69. diff -urN gcc-3.3.2/gcc/config/i386/linux.h gcc-3.3.2-uClibc/gcc/config/i386/linux.h
  70. --- gcc-3.3.2/gcc/config/i386/linux.h 2002-11-15 08:57:12.000000000 -0600
  71. +++ gcc-3.3.2-uClibc/gcc/config/i386/linux.h 2004-01-06 22:30:58.000000000 -0600
  72. @@ -136,6 +136,15 @@
  73. %{static:-static}}}"
  74. #endif
  75. #else
  76. +#if defined USE_UCLIBC
  77. +#define LINK_SPEC "-m elf_i386 %{shared:-shared} \
  78. + %{!shared: \
  79. + %{!ibcs: \
  80. + %{!static: \
  81. + %{rdynamic:-export-dynamic} \
  82. + %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}} \
  83. + %{static:-static}}}"
  84. +#else
  85. #define LINK_SPEC "-m elf_i386 %{shared:-shared} \
  86. %{!shared: \
  87. %{!ibcs: \
  88. @@ -144,6 +153,7 @@
  89. %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
  90. %{static:-static}}}"
  91. #endif
  92. +#endif
  93. /* A C statement (sans semicolon) to output to the stdio stream
  94. FILE the assembler definition of uninitialized global DECL named
  95. diff -urN gcc-3.3.2/gcc/config/mips/linux.h gcc-3.3.2-uClibc/gcc/config/mips/linux.h
  96. --- gcc-3.3.2/gcc/config/mips/linux.h 2003-05-08 12:31:34.000000000 -0500
  97. +++ gcc-3.3.2-uClibc/gcc/config/mips/linux.h 2004-01-08 01:59:52.000000000 -0600
  98. @@ -175,6 +175,17 @@
  99. /* Borrowed from sparc/linux.h */
  100. #undef LINK_SPEC
  101. +#ifdef USE_UCLIBC
  102. +#define LINK_SPEC \
  103. + "%(endian_spec) \
  104. + %{shared:-shared} \
  105. + %{!shared: \
  106. + %{!ibcs: \
  107. + %{!static: \
  108. + %{rdynamic:-export-dynamic} \
  109. + %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}} \
  110. + %{static:-static}}}"
  111. +#else
  112. #define LINK_SPEC \
  113. "%(endian_spec) \
  114. %{shared:-shared} \
  115. @@ -184,6 +195,7 @@
  116. %{rdynamic:-export-dynamic} \
  117. %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
  118. %{static:-static}}}"
  119. +#endif
  120. #undef SUBTARGET_ASM_SPEC
  121. #define SUBTARGET_ASM_SPEC "\
  122. diff -urN gcc-3.3.2/gcc/config/sh/linux.h gcc-3.3.2-uClibc/gcc/config/sh/linux.h
  123. --- gcc-3.3.2/gcc/config/sh/linux.h 2003-09-16 10:39:23.000000000 -0500
  124. +++ gcc-3.3.2-uClibc/gcc/config/sh/linux.h 2004-01-08 04:56:28.000000000 -0600
  125. @@ -44,12 +44,21 @@
  126. #undef SUBTARGET_LINK_EMUL_SUFFIX
  127. #define SUBTARGET_LINK_EMUL_SUFFIX "_linux"
  128. #undef SUBTARGET_LINK_SPEC
  129. +#ifdef USE_UCLIBC
  130. +#define SUBTARGET_LINK_SPEC \
  131. + "%{shared:-shared} \
  132. + %{!static: \
  133. + %{rdynamic:-export-dynamic} \
  134. + %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}} \
  135. + %{static:-static}"
  136. +#else
  137. #define SUBTARGET_LINK_SPEC \
  138. "%{shared:-shared} \
  139. %{!static: \
  140. %{rdynamic:-export-dynamic} \
  141. %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
  142. %{static:-static}"
  143. +#endif
  144. /* The GNU C++ standard library requires that these macros be defined. */
  145. #undef CPLUSPLUS_CPP_SPEC
  146. diff -urN gcc-3.3.2/gcc/config/sh/t-linux-uclibc gcc-3.3.2-uClibc/gcc/config/sh/t-linux-uclibc
  147. --- gcc-3.3.2/gcc/config/sh/t-linux-uclibc 1969-12-31 18:00:00.000000000 -0600
  148. +++ gcc-3.3.2-uClibc/gcc/config/sh/t-linux-uclibc 2004-01-08 06:05:54.000000000 -0600
  149. @@ -0,0 +1,16 @@
  150. +T_CFLAGS = -DUSE_UCLIBC
  151. +
  152. +# Don't run fixproto
  153. +STMP_FIXPROTO =
  154. +
  155. +TARGET_LIBGCC2_CFLAGS = -fpic
  156. +LIB1ASMFUNCS_CACHE = _ic_invalidate
  157. +
  158. +LIB2FUNCS_EXTRA=
  159. +
  160. +MULTILIB_OPTIONS= $(MULTILIB_ENDIAN) m3e/m4
  161. +MULTILIB_DIRNAMES=
  162. +MULTILIB_MATCHES =
  163. +MULTILIB_EXCEPTIONS=
  164. +
  165. +EXTRA_MULTILIB_PARTS= crtbegin.o crtend.o crtbeginS.o crtendS.o
  166. diff -urN gcc-3.3.2/gcc/config/sh/t-sh64-uclibc gcc-3.3.2-uClibc/gcc/config/sh/t-sh64-uclibc
  167. --- gcc-3.3.2/gcc/config/sh/t-sh64-uclibc 1969-12-31 18:00:00.000000000 -0600
  168. +++ gcc-3.3.2-uClibc/gcc/config/sh/t-sh64-uclibc 2004-01-08 07:39:41.000000000 -0600
  169. @@ -0,0 +1,13 @@
  170. +EXTRA_MULTILIB_PARTS= crtbegin.o crtend.o
  171. +
  172. +LIB1ASMFUNCS = \
  173. + _sdivsi3 _sdivsi3_i4 _udivsi3 _udivsi3_i4 _set_fpscr \
  174. + _shcompact_call_trampoline _shcompact_return_trampoline \
  175. + _shcompact_incoming_args _ic_invalidate _nested_trampoline \
  176. + _push_pop_shmedia_regs \
  177. + _udivdi3 _divdi3 _umoddi3 _moddi3
  178. +
  179. +MULTILIB_OPTIONS = $(MULTILIB_ENDIAN) m5-32media-nofpu/m5-compact/m5-compact-nofpu/m5-64media/m5-64media-nofpu
  180. +MULTILIB_DIRNAMES= $(MULTILIB_ENDIAN) nofpu compact nofpu/compact media64 nofpu/media64
  181. +MULTILIB_MATCHES=
  182. +MULTILIB_EXCEPTIONS=
  183. diff -urN gcc-3.3.2/gcc/config/t-linux-uclibc gcc-3.3.2-uClibc/gcc/config/t-linux-uclibc
  184. --- gcc-3.3.2/gcc/config/t-linux-uclibc 1969-12-31 18:00:00.000000000 -0600
  185. +++ gcc-3.3.2-uClibc/gcc/config/t-linux-uclibc 2004-01-06 22:25:27.000000000 -0600
  186. @@ -0,0 +1,23 @@
  187. +T_CFLAGS = -DUSE_UCLIBC
  188. +
  189. +# Don't run fixproto
  190. +STMP_FIXPROTO =
  191. +
  192. +# Compile crtbeginS.o and crtendS.o with pic.
  193. +CRTSTUFF_T_CFLAGS_S = $(CRTSTUFF_T_CFLAGS) -fPIC
  194. +# Compile libgcc2.a with pic.
  195. +TARGET_LIBGCC2_CFLAGS = -fPIC
  196. +
  197. +# Override t-slibgcc-elf-ver to export some libgcc symbols with
  198. +# the symbol versions that glibc used.
  199. +SHLIB_MAPFILES += $(srcdir)/config/libgcc-glibc.ver
  200. +
  201. +# Use unwind-dw2-fde-glibc
  202. +#LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde-glibc.c \
  203. +# $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c
  204. +#LIB2ADDEHDEP = unwind.inc unwind-dw2-fde.h unwind-dw2-fde.c
  205. +
  206. +# Use unwind-dw2-fde
  207. +LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde.c \
  208. + $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c
  209. +LIB2ADDEHDEP = unwind.inc unwind-dw2-fde.h
  210. diff -urN gcc-3.3.2/gcc/config.gcc gcc-3.3.2-uClibc/gcc/config.gcc
  211. --- gcc-3.3.2/gcc/config.gcc 2003-10-01 14:07:01.000000000 -0500
  212. +++ gcc-3.3.2-uClibc/gcc/config.gcc 2004-01-08 08:12:01.000000000 -0600
  213. @@ -697,6 +697,17 @@
  214. extra_parts=""
  215. use_collect2=yes
  216. ;;
  217. +arm*-*-linux-uclibc*) # ARM GNU/Linux with ELF - uClibc
  218. + tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h arm/linux-gas.h arm/linux-elf.h"
  219. + tmake_file="t-slibgcc-elf-ver t-linux-uclibc arm/t-linux"
  220. + extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
  221. + gnu_ld=yes
  222. + case x${enable_threads} in
  223. + x | xyes | xpthreads | xposix)
  224. + thread_file='posix'
  225. + ;;
  226. + esac
  227. + ;;
  228. arm*-*-linux*) # ARM GNU/Linux with ELF
  229. tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h arm/linux-gas.h arm/linux-elf.h"
  230. tmake_file="t-slibgcc-elf-ver t-linux arm/t-linux"
  231. @@ -772,6 +783,10 @@
  232. tmake_file="cris/t-cris cris/t-elfmulti"
  233. gas=yes
  234. ;;
  235. +cris-*-linux-uclibc*)
  236. + tm_file="dbxelf.h elfos.h svr4.h ${tm_file} linux.h cris/linux.h"
  237. + tmake_file="cris/t-cris t-slibgcc-elf-ver cris/t-linux-uclibc"
  238. + ;;
  239. cris-*-linux*)
  240. tm_file="dbxelf.h elfos.h svr4.h ${tm_file} linux.h cris/linux.h"
  241. tmake_file="cris/t-cris t-slibgcc-elf-ver cris/t-linux"
  242. @@ -1173,6 +1188,11 @@
  243. thread_file='single'
  244. fi
  245. ;;
  246. +i[34567]86-*-linux*uclibc*) # Intel 80386's running GNU/Linux
  247. + # with ELF format using uClibc
  248. + tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h linux.h i386/linux.h"
  249. + tmake_file="t-slibgcc-elf-ver t-linux-uclibc i386/t-crtstuff"
  250. + ;;
  251. i[34567]86-*-linux*) # Intel 80386's running GNU/Linux
  252. # with ELF format using glibc 2
  253. # aka GNU/Linux C library 6
  254. @@ -1883,6 +1903,16 @@
  255. tm_file="elfos.h ${tm_file} mips/netbsd.h"
  256. tmake_file="${tmake_file} mips/t-netbsd"
  257. ;;
  258. +mips*-*-linux-uclibc*) # Linux MIPS, either endian. uClibc
  259. + tm_file="dbxelf.h elfos.h svr4.h linux.h ${tm_file} mips/linux.h"
  260. + case $machine in
  261. + mipsisa32*-*)
  262. + target_cpu_default="MASK_SOFT_FLOAT"
  263. + tm_defines="MIPS_ISA_DEFAULT=32"
  264. + ;;
  265. + esac
  266. + tmake_file="t-slibgcc-elf-ver t-linux-uclibc mips/t-linux"
  267. + ;;
  268. mips*-*-linux*) # Linux MIPS, either endian.
  269. tm_file="dbxelf.h elfos.h svr4.h linux.h ${tm_file} mips/linux.h"
  270. case $machine in
  271. @@ -2129,6 +2159,11 @@
  272. out_file=rs6000/rs6000.c
  273. tmake_file="rs6000/t-ppcos t-slibgcc-elf-ver t-linux rs6000/t-ppccomm"
  274. ;;
  275. +powerpc-*-linux-uclibc*)
  276. + tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/linux.h"
  277. + out_file=rs6000/rs6000.c
  278. + tmake_file="rs6000/t-ppcos t-slibgcc-elf-ver t-linux-uclibc rs6000/t-ppccomm"
  279. + ;;
  280. powerpc-*-linux*)
  281. tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/linux.h"
  282. out_file=rs6000/rs6000.c
  283. @@ -2313,10 +2348,18 @@
  284. tmake_file="${tmake_file} sh/t-le"
  285. ;;
  286. esac
  287. - tmake_file="${tmake_file} sh/t-linux"
  288. + case $machine in
  289. + *-*-linux-uclibc*) tmake_file="${tmake_file} sh/t-linux-uclibc" ;;
  290. + *) tmake_file="${tmake_file} sh/t-linux" ;;
  291. + esac
  292. tm_file="${tm_file} dbxelf.h elfos.h svr4.h sh/elf.h sh/linux.h"
  293. gas=yes gnu_ld=yes
  294. case $machine in
  295. + sh64*-*-linux-uclibc*)
  296. + tmake_file="${tmake_file} sh/t-sh64-uclibc"
  297. + tm_file="${tm_file} sh/sh64.h"
  298. + extra_headers="shmedia.h ushmedia.h sshmedia.h"
  299. + ;;
  300. sh64*)
  301. tmake_file="${tmake_file} sh/t-sh64"
  302. tm_file="${tm_file} sh/sh64.h"
  303. diff -urN gcc-3.3.2/libstdc++-v3/aclocal.m4 gcc-3.3.2-uClibc/libstdc++-v3/aclocal.m4
  304. --- gcc-3.3.2/libstdc++-v3/aclocal.m4 2003-09-10 22:08:35.000000000 -0500
  305. +++ gcc-3.3.2-uClibc/libstdc++-v3/aclocal.m4 2004-01-09 01:53:14.000000000 -0600
  306. @@ -1216,6 +1216,9 @@
  307. dnl Default to "generic"
  308. if test x$enable_clocale_flag = xno; then
  309. case x${target_os} in
  310. + xlinux-uclibc*)
  311. + enable_clocale_flag=uclibc
  312. + ;;
  313. xlinux* | xgnu*)
  314. AC_EGREP_CPP([_GLIBCPP_ok], [
  315. #include <features.h>
  316. @@ -1339,6 +1342,41 @@
  317. CTIME_CC=config/locale/generic/time_members.cc
  318. CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
  319. ;;
  320. + xuclibc)
  321. + AC_MSG_RESULT(uclibc)
  322. +
  323. + # Declare intention to use gettext, and add support for specific
  324. + # languages.
  325. + # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT
  326. + ALL_LINGUAS="de fr"
  327. +
  328. + # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
  329. + AC_CHECK_PROG(check_msgfmt, msgfmt, yes, no)
  330. + if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
  331. + USE_NLS=yes
  332. + fi
  333. + # Export the build objects.
  334. + for ling in $ALL_LINGUAS; do \
  335. + glibcpp_MOFILES="$glibcpp_MOFILES $ling.mo"; \
  336. + glibcpp_POFILES="$glibcpp_POFILES $ling.po"; \
  337. + done
  338. + AC_SUBST(glibcpp_MOFILES)
  339. + AC_SUBST(glibcpp_POFILES)
  340. +
  341. + CLOCALE_H=config/locale/uclibc/c_locale.h
  342. + CLOCALE_CC=config/locale/uclibc/c_locale.cc
  343. + CCODECVT_H=config/locale/uclibc/codecvt_specializations.h
  344. + CCODECVT_CC=config/locale/uclibc/codecvt_members.cc
  345. + CCOLLATE_CC=config/locale/uclibc/collate_members.cc
  346. + CCTYPE_CC=config/locale/uclibc/ctype_members.cc
  347. + CMESSAGES_H=config/locale/uclibc/messages_members.h
  348. + CMESSAGES_CC=config/locale/uclibc/messages_members.cc
  349. + CMONEY_CC=config/locale/uclibc/monetary_members.cc
  350. + CNUMERIC_CC=config/locale/uclibc/numeric_members.cc
  351. + CTIME_H=config/locale/uclibc/time_members.h
  352. + CTIME_CC=config/locale/uclibc/time_members.cc
  353. + CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h
  354. + ;;
  355. *)
  356. echo "$enable_clocale is an unknown locale package" 1>&2
  357. exit 1
  358. diff -urN gcc-3.3.2/libstdc++-v3/configure gcc-3.3.2-uClibc/libstdc++-v3/configure
  359. --- gcc-3.3.2/libstdc++-v3/configure 2003-09-10 22:08:35.000000000 -0500
  360. +++ gcc-3.3.2-uClibc/libstdc++-v3/configure 2004-01-09 01:52:45.000000000 -0600
  361. @@ -2011,6 +2011,11 @@
  362. lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
  363. ;;
  364. +linux-uclibc*)
  365. + lt_cv_deplibs_check_method=pass_all
  366. + lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
  367. + ;;
  368. +
  369. netbsd*)
  370. if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
  371. lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
  372. @@ -2997,6 +3002,9 @@
  373. if test x$enable_clocale_flag = xno; then
  374. case x${target_os} in
  375. + xlinux-uclibc*)
  376. + enable_clocale_flag=uclibc
  377. + ;;
  378. xlinux* | xgnu*)
  379. cat > conftest.$ac_ext <<EOF
  380. #line 3003 "configure"
  381. @@ -3183,6 +3191,70 @@
  382. CTIME_CC=config/locale/generic/time_members.cc
  383. CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
  384. ;;
  385. + xuclibc)
  386. + echo "$ac_t""uclibc" 1>&6
  387. +
  388. + # Declare intention to use gettext, and add support for specific
  389. + # languages.
  390. + # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT
  391. + ALL_LINGUAS="de fr"
  392. +
  393. + # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
  394. + # Extract the first word of "msgfmt", so it can be a program name with args.
  395. +set dummy msgfmt; ac_word=$2
  396. +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  397. +echo "configure:3118: checking for $ac_word" >&5
  398. +if eval "test \"`echo '$''{'ac_cv_prog_check_msgfmt'+set}'`\" = set"; then
  399. + echo $ac_n "(cached) $ac_c" 1>&6
  400. +else
  401. + if test -n "$check_msgfmt"; then
  402. + ac_cv_prog_check_msgfmt="$check_msgfmt" # Let the user override the test.
  403. +else
  404. + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  405. + ac_dummy="$PATH"
  406. + for ac_dir in $ac_dummy; do
  407. + test -z "$ac_dir" && ac_dir=.
  408. + if test -f $ac_dir/$ac_word; then
  409. + ac_cv_prog_check_msgfmt="yes"
  410. + break
  411. + fi
  412. + done
  413. + IFS="$ac_save_ifs"
  414. + test -z "$ac_cv_prog_check_msgfmt" && ac_cv_prog_check_msgfmt="no"
  415. +fi
  416. +fi
  417. +check_msgfmt="$ac_cv_prog_check_msgfmt"
  418. +if test -n "$check_msgfmt"; then
  419. + echo "$ac_t""$check_msgfmt" 1>&6
  420. +else
  421. + echo "$ac_t""no" 1>&6
  422. +fi
  423. +
  424. + if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
  425. + USE_NLS=yes
  426. + fi
  427. + # Export the build objects.
  428. + for ling in $ALL_LINGUAS; do \
  429. + glibcpp_MOFILES="$glibcpp_MOFILES $ling.mo"; \
  430. + glibcpp_POFILES="$glibcpp_POFILES $ling.po"; \
  431. + done
  432. +
  433. +
  434. +
  435. + CLOCALE_H=config/locale/uclibc/c_locale.h
  436. + CLOCALE_CC=config/locale/uclibc/c_locale.cc
  437. + CCODECVT_H=config/locale/uclibc/codecvt_specializations.h
  438. + CCODECVT_CC=config/locale/uclibc/codecvt_members.cc
  439. + CCOLLATE_CC=config/locale/uclibc/collate_members.cc
  440. + CCTYPE_CC=config/locale/uclibc/ctype_members.cc
  441. + CMESSAGES_H=config/locale/uclibc/messages_members.h
  442. + CMESSAGES_CC=config/locale/uclibc/messages_members.cc
  443. + CMONEY_CC=config/locale/uclibc/monetary_members.cc
  444. + CNUMERIC_CC=config/locale/uclibc/numeric_members.cc
  445. + CTIME_H=config/locale/uclibc/time_members.h
  446. + CTIME_CC=config/locale/uclibc/time_members.cc
  447. + CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h
  448. + ;;
  449. *)
  450. echo "$enable_clocale is an unknown locale package" 1>&2
  451. exit 1
  452. @@ -4125,94 +4197,1055 @@
  453. echo "$ac_t""$DEBUG_FLAGS" 1>&6
  454. -# Check for headers necessary for libsupc++ using dyn-string.c/cxa_demangle.c
  455. -for ac_hdr in string.h stdlib.h
  456. +# Check for headers necessary for libsupc++ using dyn-string.c/cxa_demangle.c
  457. +for ac_hdr in string.h stdlib.h
  458. +do
  459. +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  460. +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  461. +echo "configure:4134: checking for $ac_hdr" >&5
  462. +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  463. + echo $ac_n "(cached) $ac_c" 1>&6
  464. +else
  465. + cat > conftest.$ac_ext <<EOF
  466. +#line 4139 "configure"
  467. +#include "confdefs.h"
  468. +#include <$ac_hdr>
  469. +EOF
  470. +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  471. +{ (eval echo configure:4144: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  472. +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  473. +if test -z "$ac_err"; then
  474. + rm -rf conftest*
  475. + eval "ac_cv_header_$ac_safe=yes"
  476. +else
  477. + echo "$ac_err" >&5
  478. + echo "configure: failed program was:" >&5
  479. + cat conftest.$ac_ext >&5
  480. + rm -rf conftest*
  481. + eval "ac_cv_header_$ac_safe=no"
  482. +fi
  483. +rm -f conftest*
  484. +fi
  485. +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  486. + echo "$ac_t""yes" 1>&6
  487. + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  488. + cat >> confdefs.h <<EOF
  489. +#define $ac_tr_hdr 1
  490. +EOF
  491. +
  492. +else
  493. + echo "$ac_t""no" 1>&6
  494. +fi
  495. +done
  496. +
  497. +
  498. +# No surprises, no surprises...
  499. +if test $ATOMICITYH = cpu/generic ; then
  500. + echo "configure: warning: No native atomic operations are provided yet for this platform." 1>&2
  501. + if test $target_thread_file = single; then
  502. + echo "configure: warning: They cannot be faked when thread support is disabled." 1>&2
  503. + echo "configure: warning: Thread-safety of certain classes is not guaranteed." 1>&2
  504. + else
  505. + echo "configure: warning: They will be faked using a mutex." 1>&2
  506. + echo "configure: warning: Performance of certain classes will degrade as a result." 1>&2
  507. + fi
  508. +fi
  509. +
  510. +
  511. +if test -n "$with_cross_host" || test x"$build" != x"$host"; then
  512. +
  513. + # We are being configured with some form of cross compiler.
  514. + GLIBCPP_IS_CROSS_COMPILING=true
  515. +
  516. + # This lets us hard-code the functionality we know we'll have in the cross
  517. + # target environment. "Let" is a sugar-coated word placed on an especially
  518. + # dull and tedious hack, actually.
  519. + #
  520. + # Here's why GLIBCPP_CHECK_MATH_SUPPORT, and other autoconf macros
  521. + # that involve linking, can't be used:
  522. + # "cannot open sim-crt0.o"
  523. + # "cannot open crt0.o"
  524. + # etc. All this is because there currently exists no unified, consistent
  525. + # way for top level CC information to be passed down to target directories:
  526. + # newlib includes, newlib linking info, libgloss versus newlib crt0.o, etc.
  527. + # When all of that is done, all of this hokey, excessive AC_DEFINE junk for
  528. + # crosses can be removed.
  529. +
  530. + # If Canadian cross, then don't pick up tools from the build directory.
  531. + # Used in GLIBCPP_EXPORT_INCLUDES (and nowhere else?).
  532. + if test -n "$with_cross_host" && test x"$build" != x"$with_cross_host"; then
  533. + CANADIAN=yes
  534. + else
  535. + CANADIAN=no
  536. + fi
  537. +
  538. + # Construct crosses by hand, eliminating bits that need ld...
  539. + # GLIBCPP_CHECK_COMPILER_FEATURES
  540. + # GLIBCPP_CHECK_BUILTIN_MATH_SUPPORT
  541. + # GLIBCPP_CHECK_MATH_SUPPORT
  542. +
  543. + case "$target" in
  544. + *-uclibc*)
  545. + os_include_dir="os/uclibc"
  546. + for ac_hdr in nan.h ieeefp.h endian.h sys/isa_defs.h \
  547. + machine/endian.h machine/param.h sys/machine.h sys/types.h \
  548. + fp.h locale.h float.h inttypes.h
  549. +do
  550. +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  551. +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  552. +echo "configure:4225: checking for $ac_hdr" >&5
  553. +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  554. + echo $ac_n "(cached) $ac_c" 1>&6
  555. +else
  556. + cat > conftest.$ac_ext <<EOF
  557. +#line 4230 "configure"
  558. +#include "confdefs.h"
  559. +#include <$ac_hdr>
  560. +EOF
  561. +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  562. +{ (eval echo configure:4235: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  563. +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  564. +if test -z "$ac_err"; then
  565. + rm -rf conftest*
  566. + eval "ac_cv_header_$ac_safe=yes"
  567. +else
  568. + echo "$ac_err" >&5
  569. + echo "configure: failed program was:" >&5
  570. + cat conftest.$ac_ext >&5
  571. + rm -rf conftest*
  572. + eval "ac_cv_header_$ac_safe=no"
  573. +fi
  574. +rm -f conftest*
  575. +fi
  576. +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  577. + echo "$ac_t""yes" 1>&6
  578. + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  579. + cat >> confdefs.h <<EOF
  580. +#define $ac_tr_hdr 1
  581. +EOF
  582. +
  583. +else
  584. + echo "$ac_t""no" 1>&6
  585. +fi
  586. +done
  587. +
  588. + SECTION_FLAGS='-ffunction-sections -fdata-sections'
  589. +
  590. +
  591. + # If we're not using GNU ld, then there's no point in even trying these
  592. + # tests. Check for that first. We should have already tested for gld
  593. + # by now (in libtool), but require it now just to be safe...
  594. + test -z "$SECTION_LDFLAGS" && SECTION_LDFLAGS=''
  595. + test -z "$OPT_LDFLAGS" && OPT_LDFLAGS=''
  596. +
  597. +
  598. + # The name set by libtool depends on the version of libtool. Shame on us
  599. + # for depending on an impl detail, but c'est la vie. Older versions used
  600. + # ac_cv_prog_gnu_ld, but now it's lt_cv_prog_gnu_ld, and is copied back on
  601. + # top of with_gnu_ld (which is also set by --with-gnu-ld, so that actually
  602. + # makes sense). We'll test with_gnu_ld everywhere else, so if that isn't
  603. + # set (hence we're using an older libtool), then set it.
  604. + if test x${with_gnu_ld+set} != xset; then
  605. + if test x${ac_cv_prog_gnu_ld+set} != xset; then
  606. + # We got through "ac_require(ac_prog_ld)" and still not set? Huh?
  607. + with_gnu_ld=no
  608. + else
  609. + with_gnu_ld=$ac_cv_prog_gnu_ld
  610. + fi
  611. + fi
  612. +
  613. + # Start by getting the version number. I think the libtool test already
  614. + # does some of this, but throws away the result.
  615. +
  616. + ldver=`$LD --version 2>/dev/null | head -1 | \
  617. + sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'`
  618. +
  619. + glibcpp_gnu_ld_version=`echo $ldver | \
  620. + $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
  621. +
  622. + # Set --gc-sections.
  623. + if test "$with_gnu_ld" = "notbroken"; then
  624. + # GNU ld it is! Joy and bunny rabbits!
  625. +
  626. + # All these tests are for C++; save the language and the compiler flags.
  627. + # Need to do this so that g++ won't try to link in libstdc++
  628. + ac_test_CFLAGS="${CFLAGS+set}"
  629. + ac_save_CFLAGS="$CFLAGS"
  630. + CFLAGS='-x c++ -Wl,--gc-sections'
  631. +
  632. + # Check for -Wl,--gc-sections
  633. + # XXX This test is broken at the moment, as symbols required for
  634. + # linking are now in libsupc++ (not built yet.....). In addition,
  635. + # this test has cored on solaris in the past. In addition,
  636. + # --gc-sections doesn't really work at the moment (keeps on discarding
  637. + # used sections, first .eh_frame and now some of the glibc sections for
  638. + # iconv). Bzzzzt. Thanks for playing, maybe next time.
  639. + echo $ac_n "checking for ld that supports -Wl,--gc-sections""... $ac_c" 1>&6
  640. +echo "configure:4313: checking for ld that supports -Wl,--gc-sections" >&5
  641. + if test "$cross_compiling" = yes; then
  642. + ac_sectionLDflags=yes
  643. +else
  644. + cat > conftest.$ac_ext <<EOF
  645. +#line 4318 "configure"
  646. +#include "confdefs.h"
  647. +
  648. + int main(void)
  649. + {
  650. + try { throw 1; }
  651. + catch (...) { };
  652. + return 0;
  653. + }
  654. +
  655. +EOF
  656. +if { (eval echo configure:4329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  657. +then
  658. + ac_sectionLDflags=yes
  659. +else
  660. + echo "configure: failed program was:" >&5
  661. + cat conftest.$ac_ext >&5
  662. + rm -fr conftest*
  663. + ac_sectionLDflags=no
  664. +fi
  665. +rm -fr conftest*
  666. +fi
  667. +
  668. + if test "$ac_test_CFLAGS" = set; then
  669. + CFLAGS="$ac_save_CFLAGS"
  670. + else
  671. + # this is the suspicious part
  672. + CFLAGS=''
  673. + fi
  674. + if test "$ac_sectionLDflags" = "yes"; then
  675. + SECTION_LDFLAGS="-Wl,--gc-sections $SECTION_LDFLAGS"
  676. + fi
  677. + echo "$ac_t""$ac_sectionLDflags" 1>&6
  678. + fi
  679. +
  680. + # Set linker optimization flags.
  681. + if test x"$with_gnu_ld" = x"yes"; then
  682. + OPT_LDFLAGS="-Wl,-O1 $OPT_LDFLAGS"
  683. + fi
  684. +
  685. +
  686. +
  687. +
  688. +
  689. + echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
  690. +echo "configure:4363: checking for main in -lm" >&5
  691. +ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
  692. +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  693. + echo $ac_n "(cached) $ac_c" 1>&6
  694. +else
  695. + ac_save_LIBS="$LIBS"
  696. +LIBS="-lm $LIBS"
  697. +cat > conftest.$ac_ext <<EOF
  698. +#line 4371 "configure"
  699. +#include "confdefs.h"
  700. +
  701. +int main() {
  702. +main()
  703. +; return 0; }
  704. +EOF
  705. +if { (eval echo configure:4378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  706. + rm -rf conftest*
  707. + eval "ac_cv_lib_$ac_lib_var=yes"
  708. +else
  709. + echo "configure: failed program was:" >&5
  710. + cat conftest.$ac_ext >&5
  711. + rm -rf conftest*
  712. + eval "ac_cv_lib_$ac_lib_var=no"
  713. +fi
  714. +rm -f conftest*
  715. +LIBS="$ac_save_LIBS"
  716. +
  717. +fi
  718. +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  719. + echo "$ac_t""yes" 1>&6
  720. + ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  721. + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  722. + cat >> confdefs.h <<EOF
  723. +#define $ac_tr_lib 1
  724. +EOF
  725. +
  726. + LIBS="-lm $LIBS"
  727. +
  728. +else
  729. + echo "$ac_t""no" 1>&6
  730. +fi
  731. +
  732. + for ac_func in nan copysignf
  733. +do
  734. +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  735. +echo "configure:4408: checking for $ac_func" >&5
  736. +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  737. + echo $ac_n "(cached) $ac_c" 1>&6
  738. +else
  739. + cat > conftest.$ac_ext <<EOF
  740. +#line 4413 "configure"
  741. +#include "confdefs.h"
  742. +/* System header to define __stub macros and hopefully few prototypes,
  743. + which can conflict with char $ac_func(); below. */
  744. +#include <assert.h>
  745. +/* Override any gcc2 internal prototype to avoid an error. */
  746. +/* We use char because int might match the return type of a gcc2
  747. + builtin and then its argument prototype would still apply. */
  748. +char $ac_func();
  749. +
  750. +int main() {
  751. +
  752. +/* The GNU C library defines this for functions which it implements
  753. + to always fail with ENOSYS. Some functions are actually named
  754. + something starting with __ and the normal name is an alias. */
  755. +#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  756. +choke me
  757. +#else
  758. +$ac_func();
  759. +#endif
  760. +
  761. +; return 0; }
  762. +EOF
  763. +if { (eval echo configure:4436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  764. + rm -rf conftest*
  765. + eval "ac_cv_func_$ac_func=yes"
  766. +else
  767. + echo "configure: failed program was:" >&5
  768. + cat conftest.$ac_ext >&5
  769. + rm -rf conftest*
  770. + eval "ac_cv_func_$ac_func=no"
  771. +fi
  772. +rm -f conftest*
  773. +fi
  774. +
  775. +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  776. + echo "$ac_t""yes" 1>&6
  777. + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  778. + cat >> confdefs.h <<EOF
  779. +#define $ac_tr_func 1
  780. +EOF
  781. +
  782. +else
  783. + echo "$ac_t""no" 1>&6
  784. +LIBMATHOBJS="$LIBMATHOBJS ${ac_func}.lo"
  785. +fi
  786. +done
  787. +
  788. +
  789. + for ac_func in __signbit
  790. +do
  791. +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  792. +echo "configure:4465: checking for $ac_func" >&5
  793. +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  794. + echo $ac_n "(cached) $ac_c" 1>&6
  795. +else
  796. + cat > conftest.$ac_ext <<EOF
  797. +#line 4470 "configure"
  798. +#include "confdefs.h"
  799. +/* System header to define __stub macros and hopefully few prototypes,
  800. + which can conflict with char $ac_func(); below. */
  801. +#include <assert.h>
  802. +/* Override any gcc2 internal prototype to avoid an error. */
  803. +/* We use char because int might match the return type of a gcc2
  804. + builtin and then its argument prototype would still apply. */
  805. +char $ac_func();
  806. +
  807. +int main() {
  808. +
  809. +/* The GNU C library defines this for functions which it implements
  810. + to always fail with ENOSYS. Some functions are actually named
  811. + something starting with __ and the normal name is an alias. */
  812. +#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  813. +choke me
  814. +#else
  815. +$ac_func();
  816. +#endif
  817. +
  818. +; return 0; }
  819. +EOF
  820. +if { (eval echo configure:4493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  821. + rm -rf conftest*
  822. + eval "ac_cv_func_$ac_func=yes"
  823. +else
  824. + echo "configure: failed program was:" >&5
  825. + cat conftest.$ac_ext >&5
  826. + rm -rf conftest*
  827. + eval "ac_cv_func_$ac_func=no"
  828. +fi
  829. +rm -f conftest*
  830. +fi
  831. +
  832. +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  833. + echo "$ac_t""yes" 1>&6
  834. + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  835. + cat >> confdefs.h <<EOF
  836. +#define $ac_tr_func 1
  837. +EOF
  838. +
  839. +else
  840. + echo "$ac_t""no" 1>&6
  841. +LIBMATHOBJS="$LIBMATHOBJS signbit.lo"
  842. +fi
  843. +done
  844. +
  845. + for ac_func in __signbitf
  846. +do
  847. +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  848. +echo "configure:4521: checking for $ac_func" >&5
  849. +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  850. + echo $ac_n "(cached) $ac_c" 1>&6
  851. +else
  852. + cat > conftest.$ac_ext <<EOF
  853. +#line 4526 "configure"
  854. +#include "confdefs.h"
  855. +/* System header to define __stub macros and hopefully few prototypes,
  856. + which can conflict with char $ac_func(); below. */
  857. +#include <assert.h>
  858. +/* Override any gcc2 internal prototype to avoid an error. */
  859. +/* We use char because int might match the return type of a gcc2
  860. + builtin and then its argument prototype would still apply. */
  861. +char $ac_func();
  862. +
  863. +int main() {
  864. +
  865. +/* The GNU C library defines this for functions which it implements
  866. + to always fail with ENOSYS. Some functions are actually named
  867. + something starting with __ and the normal name is an alias. */
  868. +#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  869. +choke me
  870. +#else
  871. +$ac_func();
  872. +#endif
  873. +
  874. +; return 0; }
  875. +EOF
  876. +if { (eval echo configure:4549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  877. + rm -rf conftest*
  878. + eval "ac_cv_func_$ac_func=yes"
  879. +else
  880. + echo "configure: failed program was:" >&5
  881. + cat conftest.$ac_ext >&5
  882. + rm -rf conftest*
  883. + eval "ac_cv_func_$ac_func=no"
  884. +fi
  885. +rm -f conftest*
  886. +fi
  887. +
  888. +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  889. + echo "$ac_t""yes" 1>&6
  890. + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  891. + cat >> confdefs.h <<EOF
  892. +#define $ac_tr_func 1
  893. +EOF
  894. +
  895. +else
  896. + echo "$ac_t""no" 1>&6
  897. +LIBMATHOBJS="$LIBMATHOBJS signbitf.lo"
  898. +fi
  899. +done
  900. +
  901. +
  902. + if test x$ac_cv_func_copysignl = x"yes"; then
  903. + for ac_func in __signbitl
  904. +do
  905. +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  906. +echo "configure:4579: checking for $ac_func" >&5
  907. +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  908. + echo $ac_n "(cached) $ac_c" 1>&6
  909. +else
  910. + cat > conftest.$ac_ext <<EOF
  911. +#line 4584 "configure"
  912. +#include "confdefs.h"
  913. +/* System header to define __stub macros and hopefully few prototypes,
  914. + which can conflict with char $ac_func(); below. */
  915. +#include <assert.h>
  916. +/* Override any gcc2 internal prototype to avoid an error. */
  917. +/* We use char because int might match the return type of a gcc2
  918. + builtin and then its argument prototype would still apply. */
  919. +char $ac_func();
  920. +
  921. +int main() {
  922. +
  923. +/* The GNU C library defines this for functions which it implements
  924. + to always fail with ENOSYS. Some functions are actually named
  925. + something starting with __ and the normal name is an alias. */
  926. +#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  927. +choke me
  928. +#else
  929. +$ac_func();
  930. +#endif
  931. +
  932. +; return 0; }
  933. +EOF
  934. +if { (eval echo configure:4607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  935. + rm -rf conftest*
  936. + eval "ac_cv_func_$ac_func=yes"
  937. +else
  938. + echo "configure: failed program was:" >&5
  939. + cat conftest.$ac_ext >&5
  940. + rm -rf conftest*
  941. + eval "ac_cv_func_$ac_func=no"
  942. +fi
  943. +rm -f conftest*
  944. +fi
  945. +
  946. +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  947. + echo "$ac_t""yes" 1>&6
  948. + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  949. + cat >> confdefs.h <<EOF
  950. +#define $ac_tr_func 1
  951. +EOF
  952. +
  953. +else
  954. + echo "$ac_t""no" 1>&6
  955. +LIBMATHOBJS="$LIBMATHOBJS signbitl.lo"
  956. +fi
  957. +done
  958. +
  959. + fi
  960. +
  961. + if test -n "$LIBMATHOBJS"; then
  962. + need_libmath=yes
  963. + fi
  964. +
  965. +
  966. +
  967. +if test "$need_libmath" = yes; then
  968. + GLIBCPP_BUILD_LIBMATH_TRUE=
  969. + GLIBCPP_BUILD_LIBMATH_FALSE='#'
  970. +else
  971. + GLIBCPP_BUILD_LIBMATH_TRUE='#'
  972. + GLIBCPP_BUILD_LIBMATH_FALSE=
  973. +fi
  974. +
  975. +
  976. + enable_wchar_t=no
  977. +
  978. + echo $ac_n "checking for mbstate_t""... $ac_c" 1>&6
  979. +echo "configure:4652: checking for mbstate_t" >&5
  980. + cat > conftest.$ac_ext <<EOF
  981. +#line 4654 "configure"
  982. +#include "confdefs.h"
  983. +#include <wchar.h>
  984. +int main() {
  985. +mbstate_t teststate;
  986. +; return 0; }
  987. +EOF
  988. +if { (eval echo configure:4661: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  989. + rm -rf conftest*
  990. + have_mbstate_t=yes
  991. +else
  992. + echo "configure: failed program was:" >&5
  993. + cat conftest.$ac_ext >&5
  994. + rm -rf conftest*
  995. + have_mbstate_t=no
  996. +fi
  997. +rm -f conftest*
  998. + echo "$ac_t""$have_mbstate_t" 1>&6
  999. + if test x"$have_mbstate_t" = xyes; then
  1000. + cat >> confdefs.h <<\EOF
  1001. +#define HAVE_MBSTATE_T 1
  1002. +EOF
  1003. +
  1004. + fi
  1005. +
  1006. + for ac_hdr in wchar.h
  1007. +do
  1008. +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  1009. +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  1010. +echo "configure:4683: checking for $ac_hdr" >&5
  1011. +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1012. + echo $ac_n "(cached) $ac_c" 1>&6
  1013. +else
  1014. + cat > conftest.$ac_ext <<EOF
  1015. +#line 4688 "configure"
  1016. +#include "confdefs.h"
  1017. +#include <$ac_hdr>
  1018. +EOF
  1019. +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1020. +{ (eval echo configure:4693: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1021. +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1022. +if test -z "$ac_err"; then
  1023. + rm -rf conftest*
  1024. + eval "ac_cv_header_$ac_safe=yes"
  1025. +else
  1026. + echo "$ac_err" >&5
  1027. + echo "configure: failed program was:" >&5
  1028. + cat conftest.$ac_ext >&5
  1029. + rm -rf conftest*
  1030. + eval "ac_cv_header_$ac_safe=no"
  1031. +fi
  1032. +rm -f conftest*
  1033. +fi
  1034. +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1035. + echo "$ac_t""yes" 1>&6
  1036. + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  1037. + cat >> confdefs.h <<EOF
  1038. +#define $ac_tr_hdr 1
  1039. +EOF
  1040. + ac_has_wchar_h=yes
  1041. +else
  1042. + echo "$ac_t""no" 1>&6
  1043. +ac_has_wchar_h=no
  1044. +fi
  1045. +done
  1046. +
  1047. + for ac_hdr in wctype.h
  1048. +do
  1049. +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  1050. +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  1051. +echo "configure:4724: checking for $ac_hdr" >&5
  1052. +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1053. + echo $ac_n "(cached) $ac_c" 1>&6
  1054. +else
  1055. + cat > conftest.$ac_ext <<EOF
  1056. +#line 4729 "configure"
  1057. +#include "confdefs.h"
  1058. +#include <$ac_hdr>
  1059. +EOF
  1060. +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1061. +{ (eval echo configure:4734: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1062. +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1063. +if test -z "$ac_err"; then
  1064. + rm -rf conftest*
  1065. + eval "ac_cv_header_$ac_safe=yes"
  1066. +else
  1067. + echo "$ac_err" >&5
  1068. + echo "configure: failed program was:" >&5
  1069. + cat conftest.$ac_ext >&5
  1070. + rm -rf conftest*
  1071. + eval "ac_cv_header_$ac_safe=no"
  1072. +fi
  1073. +rm -f conftest*
  1074. +fi
  1075. +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1076. + echo "$ac_t""yes" 1>&6
  1077. + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  1078. + cat >> confdefs.h <<EOF
  1079. +#define $ac_tr_hdr 1
  1080. +EOF
  1081. + ac_has_wctype_h=yes
  1082. +else
  1083. + echo "$ac_t""no" 1>&6
  1084. +ac_has_wctype_h=no
  1085. +fi
  1086. +done
  1087. +
  1088. +
  1089. + if test x"$ac_has_wchar_h" = xyes &&
  1090. + test x"$ac_has_wctype_h" = xyes &&
  1091. + test x"$enable_c_mbchar" != xno; then
  1092. +
  1093. + echo $ac_n "checking for WCHAR_MIN and WCHAR_MAX""... $ac_c" 1>&6
  1094. +echo "configure:4767: checking for WCHAR_MIN and WCHAR_MAX" >&5
  1095. + cat > conftest.$ac_ext <<EOF
  1096. +#line 4769 "configure"
  1097. +#include "confdefs.h"
  1098. +#include <wchar.h>
  1099. +int main() {
  1100. +int i = WCHAR_MIN; int j = WCHAR_MAX;
  1101. +; return 0; }
  1102. +EOF
  1103. +if { (eval echo configure:4776: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1104. + rm -rf conftest*
  1105. + has_wchar_minmax=yes
  1106. +else
  1107. + echo "configure: failed program was:" >&5
  1108. + cat conftest.$ac_ext >&5
  1109. + rm -rf conftest*
  1110. + has_wchar_minmax=no
  1111. +fi
  1112. +rm -f conftest*
  1113. + echo "$ac_t""$has_wchar_minmax" 1>&6
  1114. +
  1115. + echo $ac_n "checking for WEOF""... $ac_c" 1>&6
  1116. +echo "configure:4789: checking for WEOF" >&5
  1117. + cat > conftest.$ac_ext <<EOF
  1118. +#line 4791 "configure"
  1119. +#include "confdefs.h"
  1120. +
  1121. + #include <wchar.h>
  1122. + #include <stddef.h>
  1123. +int main() {
  1124. +wint_t i = WEOF;
  1125. +; return 0; }
  1126. +EOF
  1127. +if { (eval echo configure:4800: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1128. + rm -rf conftest*
  1129. + has_weof=yes
  1130. +else
  1131. + echo "configure: failed program was:" >&5
  1132. + cat conftest.$ac_ext >&5
  1133. + rm -rf conftest*
  1134. + has_weof=no
  1135. +fi
  1136. +rm -f conftest*
  1137. + echo "$ac_t""$has_weof" 1>&6
  1138. +
  1139. + ac_wfuncs=yes
  1140. + for ac_func in wcslen wmemchr wmemcmp wmemcpy wmemmove wmemset
  1141. +do
  1142. +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  1143. +echo "configure:4816: checking for $ac_func" >&5
  1144. +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  1145. + echo $ac_n "(cached) $ac_c" 1>&6
  1146. +else
  1147. + cat > conftest.$ac_ext <<EOF
  1148. +#line 4821 "configure"
  1149. +#include "confdefs.h"
  1150. +/* System header to define __stub macros and hopefully few prototypes,
  1151. + which can conflict with char $ac_func(); below. */
  1152. +#include <assert.h>
  1153. +/* Override any gcc2 internal prototype to avoid an error. */
  1154. +/* We use char because int might match the return type of a gcc2
  1155. + builtin and then its argument prototype would still apply. */
  1156. +char $ac_func();
  1157. +
  1158. +int main() {
  1159. +
  1160. +/* The GNU C library defines this for functions which it implements
  1161. + to always fail with ENOSYS. Some functions are actually named
  1162. + something starting with __ and the normal name is an alias. */
  1163. +#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  1164. +choke me
  1165. +#else
  1166. +$ac_func();
  1167. +#endif
  1168. +
  1169. +; return 0; }
  1170. +EOF
  1171. +if { (eval echo configure:4844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1172. + rm -rf conftest*
  1173. + eval "ac_cv_func_$ac_func=yes"
  1174. +else
  1175. + echo "configure: failed program was:" >&5
  1176. + cat conftest.$ac_ext >&5
  1177. + rm -rf conftest*
  1178. + eval "ac_cv_func_$ac_func=no"
  1179. +fi
  1180. +rm -f conftest*
  1181. +fi
  1182. +
  1183. +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  1184. + echo "$ac_t""yes" 1>&6
  1185. + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  1186. + cat >> confdefs.h <<EOF
  1187. +#define $ac_tr_func 1
  1188. +EOF
  1189. +
  1190. +else
  1191. + echo "$ac_t""no" 1>&6
  1192. +\
  1193. + ac_wfuncs=no
  1194. +fi
  1195. +done
  1196. +
  1197. +
  1198. + for ac_func in btowc wctob fgetwc fgetws fputwc fputws fwide \
  1199. + fwprintf fwscanf swprintf swscanf vfwprintf vfwscanf vswprintf vswscanf \
  1200. + vwprintf vwscanf wprintf wscanf getwc getwchar mbsinit mbrlen mbrtowc \
  1201. + mbsrtowcs wcsrtombs putwc putwchar ungetwc wcrtomb wcstod wcstof wcstol \
  1202. + wcstoul wcscpy wcsncpy wcscat wcsncat wcscmp wcscoll wcsncmp wcsxfrm \
  1203. + wcscspn wcsspn wcstok wcsftime wcschr wcspbrk wcsrchr wcsstr
  1204. +do
  1205. +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  1206. +echo "configure:4879: checking for $ac_func" >&5
  1207. +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  1208. + echo $ac_n "(cached) $ac_c" 1>&6
  1209. +else
  1210. + cat > conftest.$ac_ext <<EOF
  1211. +#line 4884 "configure"
  1212. +#include "confdefs.h"
  1213. +/* System header to define __stub macros and hopefully few prototypes,
  1214. + which can conflict with char $ac_func(); below. */
  1215. +#include <assert.h>
  1216. +/* Override any gcc2 internal prototype to avoid an error. */
  1217. +/* We use char because int might match the return type of a gcc2
  1218. + builtin and then its argument prototype would still apply. */
  1219. +char $ac_func();
  1220. +
  1221. +int main() {
  1222. +
  1223. +/* The GNU C library defines this for functions which it implements
  1224. + to always fail with ENOSYS. Some functions are actually named
  1225. + something starting with __ and the normal name is an alias. */
  1226. +#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  1227. +choke me
  1228. +#else
  1229. +$ac_func();
  1230. +#endif
  1231. +
  1232. +; return 0; }
  1233. +EOF
  1234. +if { (eval echo configure:4907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1235. + rm -rf conftest*
  1236. + eval "ac_cv_func_$ac_func=yes"
  1237. +else
  1238. + echo "configure: failed program was:" >&5
  1239. + cat conftest.$ac_ext >&5
  1240. + rm -rf conftest*
  1241. + eval "ac_cv_func_$ac_func=no"
  1242. +fi
  1243. +rm -f conftest*
  1244. +fi
  1245. +
  1246. +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  1247. + echo "$ac_t""yes" 1>&6
  1248. + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  1249. + cat >> confdefs.h <<EOF
  1250. +#define $ac_tr_func 1
  1251. +EOF
  1252. +
  1253. +else
  1254. + echo "$ac_t""no" 1>&6
  1255. +\
  1256. + ac_wfuncs=no
  1257. +fi
  1258. +done
  1259. +
  1260. +
  1261. + echo $ac_n "checking for ISO C99 wchar_t support""... $ac_c" 1>&6
  1262. +echo "configure:4935: checking for ISO C99 wchar_t support" >&5
  1263. + if test x"$has_weof" = xyes &&
  1264. + test x"$has_wchar_minmax" = xyes &&
  1265. + test x"$ac_wfuncs" = xyes; then
  1266. + ac_isoC99_wchar_t=yes
  1267. + else
  1268. + ac_isoC99_wchar_t=no
  1269. + fi
  1270. + echo "$ac_t""$ac_isoC99_wchar_t" 1>&6
  1271. +
  1272. + ac_safe=`echo "iconv.h" | sed 'y%./+-%__p_%'`
  1273. +echo $ac_n "checking for iconv.h""... $ac_c" 1>&6
  1274. +echo "configure:4947: checking for iconv.h" >&5
  1275. +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1276. + echo $ac_n "(cached) $ac_c" 1>&6
  1277. +else
  1278. + cat > conftest.$ac_ext <<EOF
  1279. +#line 4952 "configure"
  1280. +#include "confdefs.h"
  1281. +#include <iconv.h>
  1282. +EOF
  1283. +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1284. +{ (eval echo configure:4957: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1285. +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1286. +if test -z "$ac_err"; then
  1287. + rm -rf conftest*
  1288. + eval "ac_cv_header_$ac_safe=yes"
  1289. +else
  1290. + echo "$ac_err" >&5
  1291. + echo "configure: failed program was:" >&5
  1292. + cat conftest.$ac_ext >&5
  1293. + rm -rf conftest*
  1294. + eval "ac_cv_header_$ac_safe=no"
  1295. +fi
  1296. +rm -f conftest*
  1297. +fi
  1298. +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1299. + echo "$ac_t""yes" 1>&6
  1300. + ac_has_iconv_h=yes
  1301. +else
  1302. + echo "$ac_t""no" 1>&6
  1303. +ac_has_iconv_h=no
  1304. +fi
  1305. +
  1306. + ac_safe=`echo "langinfo.h" | sed 'y%./+-%__p_%'`
  1307. +echo $ac_n "checking for langinfo.h""... $ac_c" 1>&6
  1308. +echo "configure:4981: checking for langinfo.h" >&5
  1309. +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1310. + echo $ac_n "(cached) $ac_c" 1>&6
  1311. +else
  1312. + cat > conftest.$ac_ext <<EOF
  1313. +#line 4986 "configure"
  1314. +#include "confdefs.h"
  1315. +#include <langinfo.h>
  1316. +EOF
  1317. +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1318. +{ (eval echo configure:4991: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1319. +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1320. +if test -z "$ac_err"; then
  1321. + rm -rf conftest*
  1322. + eval "ac_cv_header_$ac_safe=yes"
  1323. +else
  1324. + echo "$ac_err" >&5
  1325. + echo "configure: failed program was:" >&5
  1326. + cat conftest.$ac_ext >&5
  1327. + rm -rf conftest*
  1328. + eval "ac_cv_header_$ac_safe=no"
  1329. +fi
  1330. +rm -f conftest*
  1331. +fi
  1332. +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1333. + echo "$ac_t""yes" 1>&6
  1334. + ac_has_langinfo_h=yes
  1335. +else
  1336. + echo "$ac_t""no" 1>&6
  1337. +ac_has_langinfo_h=no
  1338. +fi
  1339. +
  1340. +
  1341. + echo $ac_n "checking for iconv in -liconv""... $ac_c" 1>&6
  1342. +echo "configure:5015: checking for iconv in -liconv" >&5
  1343. +ac_lib_var=`echo iconv'_'iconv | sed 'y%./+-%__p_%'`
  1344. +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1345. + echo $ac_n "(cached) $ac_c" 1>&6
  1346. +else
  1347. + ac_save_LIBS="$LIBS"
  1348. +LIBS="-liconv $LIBS"
  1349. +cat > conftest.$ac_ext <<EOF
  1350. +#line 5023 "configure"
  1351. +#include "confdefs.h"
  1352. +/* Override any gcc2 internal prototype to avoid an error. */
  1353. +/* We use char because int might match the return type of a gcc2
  1354. + builtin and then its argument prototype would still apply. */
  1355. +char iconv();
  1356. +
  1357. +int main() {
  1358. +iconv()
  1359. +; return 0; }
  1360. +EOF
  1361. +if { (eval echo configure:5034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1362. + rm -rf conftest*
  1363. + eval "ac_cv_lib_$ac_lib_var=yes"
  1364. +else
  1365. + echo "configure: failed program was:" >&5
  1366. + cat conftest.$ac_ext >&5
  1367. + rm -rf conftest*
  1368. + eval "ac_cv_lib_$ac_lib_var=no"
  1369. +fi
  1370. +rm -f conftest*
  1371. +LIBS="$ac_save_LIBS"
  1372. +
  1373. +fi
  1374. +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1375. + echo "$ac_t""yes" 1>&6
  1376. + libiconv="-liconv"
  1377. +else
  1378. + echo "$ac_t""no" 1>&6
  1379. +fi
  1380. +
  1381. + ac_save_LIBS="$LIBS"
  1382. + LIBS="$LIBS $libiconv"
  1383. +
  1384. + for ac_func in iconv_open iconv_close iconv nl_langinfo
  1385. do
  1386. -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  1387. -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  1388. -echo "configure:4134: checking for $ac_hdr" >&5
  1389. -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1390. +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  1391. +echo "configure:5060: checking for $ac_func" >&5
  1392. +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  1393. echo $ac_n "(cached) $ac_c" 1>&6
  1394. else
  1395. cat > conftest.$ac_ext <<EOF
  1396. -#line 4139 "configure"
  1397. +#line 5065 "configure"
  1398. #include "confdefs.h"
  1399. -#include <$ac_hdr>
  1400. +/* System header to define __stub macros and hopefully few prototypes,
  1401. + which can conflict with char $ac_func(); below. */
  1402. +#include <assert.h>
  1403. +/* Override any gcc2 internal prototype to avoid an error. */
  1404. +/* We use char because int might match the return type of a gcc2
  1405. + builtin and then its argument prototype would still apply. */
  1406. +char $ac_func();
  1407. +
  1408. +int main() {
  1409. +
  1410. +/* The GNU C library defines this for functions which it implements
  1411. + to always fail with ENOSYS. Some functions are actually named
  1412. + something starting with __ and the normal name is an alias. */
  1413. +#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  1414. +choke me
  1415. +#else
  1416. +$ac_func();
  1417. +#endif
  1418. +
  1419. +; return 0; }
  1420. EOF
  1421. -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1422. -{ (eval echo configure:4144: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1423. -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1424. -if test -z "$ac_err"; then
  1425. +if { (eval echo configure:5088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1426. rm -rf conftest*
  1427. - eval "ac_cv_header_$ac_safe=yes"
  1428. + eval "ac_cv_func_$ac_func=yes"
  1429. else
  1430. - echo "$ac_err" >&5
  1431. echo "configure: failed program was:" >&5
  1432. cat conftest.$ac_ext >&5
  1433. rm -rf conftest*
  1434. - eval "ac_cv_header_$ac_safe=no"
  1435. + eval "ac_cv_func_$ac_func=no"
  1436. fi
  1437. rm -f conftest*
  1438. fi
  1439. -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1440. +
  1441. +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  1442. echo "$ac_t""yes" 1>&6
  1443. - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  1444. + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  1445. cat >> confdefs.h <<EOF
  1446. -#define $ac_tr_hdr 1
  1447. +#define $ac_tr_func 1
  1448. EOF
  1449. -
  1450. + \
  1451. + ac_XPG2funcs=yes
  1452. else
  1453. echo "$ac_t""no" 1>&6
  1454. +ac_XPG2funcs=no
  1455. fi
  1456. done
  1457. +
  1458. + LIBS="$ac_save_LIBS"
  1459. +
  1460. + echo $ac_n "checking for XPG2 wchar_t support""... $ac_c" 1>&6
  1461. +echo "configure:5118: checking for XPG2 wchar_t support" >&5
  1462. + if test x"$ac_has_iconv_h" = xyes &&
  1463. + test x"$ac_has_langinfo_h" = xyes &&
  1464. + test x"$ac_XPG2funcs" = xyes; then
  1465. + ac_XPG2_wchar_t=yes
  1466. + else
  1467. + ac_XPG2_wchar_t=no
  1468. + fi
  1469. + echo "$ac_t""$ac_XPG2_wchar_t" 1>&6
  1470. +
  1471. + if test x"$ac_isoC99_wchar_t" = xyes &&
  1472. + test x"$ac_XPG2_wchar_t" = xyes; then
  1473. + cat >> confdefs.h <<\EOF
  1474. +#define _GLIBCPP_USE_WCHAR_T 1
  1475. +EOF
  1476. -# No surprises, no surprises...
  1477. -if test $ATOMICITYH = cpu/generic ; then
  1478. - echo "configure: warning: No native atomic operations are provided yet for this platform." 1>&2
  1479. - if test $target_thread_file = single; then
  1480. - echo "configure: warning: They cannot be faked when thread support is disabled." 1>&2
  1481. - echo "configure: warning: Thread-safety of certain classes is not guaranteed." 1>&2
  1482. - else
  1483. - echo "configure: warning: They will be faked using a mutex." 1>&2
  1484. - echo "configure: warning: Performance of certain classes will degrade as a result." 1>&2
  1485. + enable_wchar_t=yes
  1486. + fi
  1487. fi
  1488. -fi
  1489. + echo $ac_n "checking for enabled wchar_t specializations""... $ac_c" 1>&6
  1490. +echo "configure:5138: checking for enabled wchar_t specializations" >&5
  1491. + echo "$ac_t""$enable_wchar_t" 1>&6
  1492. +
  1493. +if test "$enable_wchar_t" = yes; then
  1494. + GLIBCPP_TEST_WCHAR_T_TRUE=
  1495. + GLIBCPP_TEST_WCHAR_T_FALSE='#'
  1496. +else
  1497. + GLIBCPP_TEST_WCHAR_T_TRUE='#'
  1498. + GLIBCPP_TEST_WCHAR_T_FALSE=
  1499. +fi
  1500. -if test -n "$with_cross_host" || test x"$build" != x"$host"; then
  1501. + cat >> confdefs.h <<\EOF
  1502. +#define HAVE_COPYSIGN 1
  1503. +EOF
  1504. - # We are being configured with some form of cross compiler.
  1505. - GLIBCPP_IS_CROSS_COMPILING=true
  1506. + cat >> confdefs.h <<\EOF
  1507. +#define HAVE_FINITE 1
  1508. +EOF
  1509. - # This lets us hard-code the functionality we know we'll have in the cross
  1510. - # target environment. "Let" is a sugar-coated word placed on an especially
  1511. - # dull and tedious hack, actually.
  1512. - #
  1513. - # Here's why GLIBCPP_CHECK_MATH_SUPPORT, and other autoconf macros
  1514. - # that involve linking, can't be used:
  1515. - # "cannot open sim-crt0.o"
  1516. - # "cannot open crt0.o"
  1517. - # etc. All this is because there currently exists no unified, consistent
  1518. - # way for top level CC information to be passed down to target directories:
  1519. - # newlib includes, newlib linking info, libgloss versus newlib crt0.o, etc.
  1520. - # When all of that is done, all of this hokey, excessive AC_DEFINE junk for
  1521. - # crosses can be removed.
  1522. + cat >> confdefs.h <<\EOF
  1523. +#define HAVE_FINITEF 1
  1524. +EOF
  1525. - # If Canadian cross, then don't pick up tools from the build directory.
  1526. - # Used in GLIBCPP_EXPORT_INCLUDES (and nowhere else?).
  1527. - if test -n "$with_cross_host" && test x"$build" != x"$with_cross_host"; then
  1528. - CANADIAN=yes
  1529. - else
  1530. - CANADIAN=no
  1531. - fi
  1532. + cat >> confdefs.h <<\EOF
  1533. +#define HAVE_ISINF 1
  1534. +EOF
  1535. - # Construct crosses by hand, eliminating bits that need ld...
  1536. - # GLIBCPP_CHECK_COMPILER_FEATURES
  1537. - # GLIBCPP_CHECK_BUILTIN_MATH_SUPPORT
  1538. - # GLIBCPP_CHECK_MATH_SUPPORT
  1539. + cat >> confdefs.h <<\EOF
  1540. +#define HAVE_ISINFF 1
  1541. +EOF
  1542. - case "$target" in
  1543. + cat >> confdefs.h <<\EOF
  1544. +#define HAVE_ISNAN 1
  1545. +EOF
  1546. +
  1547. + cat >> confdefs.h <<\EOF
  1548. +#define HAVE_ISNANF 1
  1549. +EOF
  1550. + ;;
  1551. *-linux*)
  1552. os_include_dir="os/gnu-linux"
  1553. for ac_hdr in nan.h ieeefp.h endian.h sys/isa_defs.h \
  1554. @@ -5163,10 +6196,6 @@
  1555. EOF
  1556. cat >> confdefs.h <<\EOF
  1557. -#define HAVE_FREXPF 1
  1558. -EOF
  1559. -
  1560. - cat >> confdefs.h <<\EOF
  1561. #define HAVE_HYPOTF 1
  1562. EOF
  1563. @@ -10293,103 +11322,6 @@
  1564. #define HAVE_MMAP 1
  1565. EOF
  1566. -
  1567. - cat >> confdefs.h <<\EOF
  1568. -#define HAVE_ACOSF 1
  1569. -EOF
  1570. -
  1571. - cat >> confdefs.h <<\EOF
  1572. -#define HAVE_ASINF 1
  1573. -EOF
  1574. -
  1575. - cat >> confdefs.h <<\EOF
  1576. -#define HAVE_ATAN2F 1
  1577. -EOF
  1578. -
  1579. - cat >> confdefs.h <<\EOF
  1580. -#define HAVE_ATANF 1
  1581. -EOF
  1582. -
  1583. - cat >> confdefs.h <<\EOF
  1584. -#define HAVE_CEILF 1
  1585. -EOF
  1586. -
  1587. - cat >> confdefs.h <<\EOF
  1588. -#define HAVE_COPYSIGN 1
  1589. -EOF
  1590. -
  1591. - cat >> confdefs.h <<\EOF
  1592. -#define HAVE_COPYSIGNF 1
  1593. -EOF
  1594. -
  1595. - cat >> confdefs.h <<\EOF
  1596. -#define HAVE_COSF 1
  1597. -EOF
  1598. -
  1599. - cat >> confdefs.h <<\EOF
  1600. -#define HAVE_COSHF 1
  1601. -EOF
  1602. -
  1603. - cat >> confdefs.h <<\EOF
  1604. -#define HAVE_EXPF 1
  1605. -EOF
  1606. -
  1607. - cat >> confdefs.h <<\EOF
  1608. -#define HAVE_FABSF 1
  1609. -EOF
  1610. -
  1611. - cat >> confdefs.h <<\EOF
  1612. -#define HAVE_FLOORF 1
  1613. -EOF
  1614. -
  1615. - cat >> confdefs.h <<\EOF
  1616. -#define HAVE_FMODF 1
  1617. -EOF
  1618. -
  1619. - cat >> confdefs.h <<\EOF
  1620. -#define HAVE_FREXPF 1
  1621. -EOF
  1622. -
  1623. - cat >> confdefs.h <<\EOF
  1624. -#define HAVE_LDEXPF 1
  1625. -EOF
  1626. -
  1627. - cat >> confdefs.h <<\EOF
  1628. -#define HAVE_LOG10F 1
  1629. -EOF
  1630. -
  1631. - cat >> confdefs.h <<\EOF
  1632. -#define HAVE_LOGF 1
  1633. -EOF
  1634. -
  1635. - cat >> confdefs.h <<\EOF
  1636. -#define HAVE_MODFF 1
  1637. -EOF
  1638. -
  1639. - cat >> confdefs.h <<\EOF
  1640. -#define HAVE_POWF 1
  1641. -EOF
  1642. -
  1643. - cat >> confdefs.h <<\EOF
  1644. -#define HAVE_SINF 1
  1645. -EOF
  1646. -
  1647. - cat >> confdefs.h <<\EOF
  1648. -#define HAVE_SINHF 1
  1649. -EOF
  1650. -
  1651. - cat >> confdefs.h <<\EOF
  1652. -#define HAVE_SQRTF 1
  1653. -EOF
  1654. -
  1655. - cat >> confdefs.h <<\EOF
  1656. -#define HAVE_TANF 1
  1657. -EOF
  1658. -
  1659. - cat >> confdefs.h <<\EOF
  1660. -#define HAVE_TANHF 1
  1661. -EOF
  1662. -
  1663. ;;
  1664. esac
  1665. diff -urN gcc-3.3.2/libstdc++-v3/configure.in gcc-3.3.2-uClibc/libstdc++-v3/configure.in
  1666. --- gcc-3.3.2/libstdc++-v3/configure.in 2003-07-17 13:32:00.000000000 -0500
  1667. +++ gcc-3.3.2-uClibc/libstdc++-v3/configure.in 2004-01-08 21:36:43.000000000 -0600
  1668. @@ -117,6 +117,35 @@
  1669. # GLIBCPP_CHECK_MATH_SUPPORT
  1670. case "$target" in
  1671. + *-uclibc*)
  1672. + os_include_dir="os/uclibc"
  1673. + AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
  1674. + machine/endian.h machine/param.h sys/machine.h sys/types.h \
  1675. + fp.h locale.h float.h inttypes.h])
  1676. + SECTION_FLAGS='-ffunction-sections -fdata-sections'
  1677. + AC_SUBST(SECTION_FLAGS)
  1678. + GLIBCPP_CHECK_LINKER_FEATURES
  1679. + GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT
  1680. + GLIBCPP_CHECK_WCHAR_T_SUPPORT
  1681. + AC_DEFINE(HAVE_COPYSIGN)
  1682. + #AC_DEFINE(HAVE_COPYSIGNF)
  1683. + AC_DEFINE(HAVE_FINITE)
  1684. + AC_DEFINE(HAVE_FINITEF)
  1685. + #AC_DEFINE(HAVE_FREXPF)
  1686. + #AC_DEFINE(HAVE_HYPOTF)
  1687. + AC_DEFINE(HAVE_ISINF)
  1688. + AC_DEFINE(HAVE_ISINFF)
  1689. + AC_DEFINE(HAVE_ISNAN)
  1690. + AC_DEFINE(HAVE_ISNANF)
  1691. + #AC_DEFINE(HAVE_SINCOS)
  1692. + #AC_DEFINE(HAVE_SINCOSF)
  1693. + #if test x"long_double_math_on_this_cpu" = x"yes"; then
  1694. + #AC_DEFINE(HAVE_FINITEL)
  1695. + #AC_DEFINE(HAVE_HYPOTL)
  1696. + #AC_DEFINE(HAVE_ISINFL)
  1697. + #AC_DEFINE(HAVE_ISNANL)
  1698. + #fi
  1699. + ;;
  1700. *-linux*)
  1701. os_include_dir="os/gnu-linux"
  1702. AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
  1703. diff -urN gcc-3.3.2/libstdc++-v3/configure.target gcc-3.3.2-uClibc/libstdc++-v3/configure.target
  1704. --- gcc-3.3.2/libstdc++-v3/configure.target 2004-01-24 12:02:59.000000000 -0600
  1705. +++ gcc-3.3.2-uClibc/libstdc++-v3/configure.target 2004-01-24 12:05:30.000000000 -0600
  1706. @@ -133,6 +133,9 @@
  1707. freebsd*)
  1708. os_include_dir="os/bsd/freebsd"
  1709. ;;
  1710. + linux-uclibc*)
  1711. + os_include_dir="os/uclibc"
  1712. + ;;
  1713. gnu* | linux*)
  1714. os_include_dir="os/gnu-linux"
  1715. ;;
  1716. diff -urN gcc-3.3.2/libstdc++-v3/include/c_std/std_cstdlib.h gcc-3.3.2-uClibc/libstdc++-v3/include/c_std/std_cstdlib.h
  1717. --- gcc-3.3.2/libstdc++-v3/include/c_std/std_cstdlib.h 2003-04-18 05:08:05.000000000 -0500
  1718. +++ gcc-3.3.2-uClibc/libstdc++-v3/include/c_std/std_cstdlib.h 2004-01-06 18:22:00.000000000 -0600
  1719. @@ -101,9 +101,11 @@
  1720. using ::labs;
  1721. using ::ldiv;
  1722. using ::malloc;
  1723. +#if _GLIBCPP_USE_WCHAR_T
  1724. using ::mblen;
  1725. using ::mbstowcs;
  1726. using ::mbtowc;
  1727. +#endif
  1728. using ::qsort;
  1729. using ::rand;
  1730. using ::realloc;
  1731. @@ -112,8 +114,10 @@
  1732. using ::strtol;
  1733. using ::strtoul;
  1734. using ::system;
  1735. +#if _GLIBCPP_USE_WCHAR_T
  1736. using ::wcstombs;
  1737. using ::wctomb;
  1738. +#endif
  1739. inline long
  1740. abs(long __i) { return labs(__i); }
  1741. diff -urN gcc-3.3.2/libstdc++-v3/include/c_std/std_cwchar.h gcc-3.3.2-uClibc/libstdc++-v3/include/c_std/std_cwchar.h
  1742. --- gcc-3.3.2/libstdc++-v3/include/c_std/std_cwchar.h 2003-04-18 05:08:05.000000000 -0500
  1743. +++ gcc-3.3.2-uClibc/libstdc++-v3/include/c_std/std_cwchar.h 2004-01-06 18:22:00.000000000 -0600
  1744. @@ -165,7 +165,9 @@
  1745. using ::wcscoll;
  1746. using ::wcscpy;
  1747. using ::wcscspn;
  1748. +#ifdef HAVE_WCSFTIME
  1749. using ::wcsftime;
  1750. +#endif
  1751. using ::wcslen;
  1752. using ::wcsncat;
  1753. using ::wcsncmp;
  1754. diff -urN gcc-3.3.2/ltconfig gcc-3.3.2-uClibc/ltconfig
  1755. --- gcc-3.3.2/ltconfig 2003-02-19 20:10:02.000000000 -0600
  1756. +++ gcc-3.3.2-uClibc/ltconfig 2004-01-06 22:16:18.000000000 -0600
  1757. @@ -603,6 +603,7 @@
  1758. # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
  1759. case $host_os in
  1760. linux-gnu*) ;;
  1761. +linux-uclibc*) ;;
  1762. linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
  1763. esac
  1764. @@ -1247,6 +1248,24 @@
  1765. dynamic_linker='GNU/Linux ld.so'
  1766. ;;
  1767. +linux-uclibc*)
  1768. + version_type=linux
  1769. + need_lib_prefix=no
  1770. + need_version=no
  1771. + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
  1772. + soname_spec='${libname}${release}.so$major'
  1773. + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
  1774. + shlibpath_var=LD_LIBRARY_PATH
  1775. + shlibpath_overrides_runpath=no
  1776. + # This implies no fast_install, which is unacceptable.
  1777. + # Some rework will be needed to allow for fast_install
  1778. + # before this can be enabled.
  1779. + # Note: copied from linux-gnu, and may not be appropriate.
  1780. + hardcode_into_libs=yes
  1781. + # Assume using the uClibc dynamic linker.
  1782. + dynamic_linker="uClibc ld.so"
  1783. + ;;
  1784. +
  1785. netbsd*)
  1786. need_lib_prefix=no
  1787. need_version=no