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.

1838 lines
57 KiB

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