]>
Commit | Line | Data |
---|---|---|
c722a4ac | 1 | IDN patch for bind-9.3.0 |
2 | ======================== | |
3 | ||
4 | ||
5 | This is a patch file for ISC BIND 9.3.0 to make it work with | |
6 | internationalized domain names. With this patch you'll get IDN-aware | |
7 | dig/host/nslookup. | |
8 | ||
9 | To apply this patch, you should go to the top directory of the BIND | |
10 | distribution (where you see `README' file), then invoke `patch' | |
11 | command like this: | |
12 | ||
13 | % patch -p0 < this-file | |
14 | ||
15 | Then follow the instructions described in `README.idnkit' to compile | |
16 | and install. | |
17 | ||
18 | ||
19 | Index: README.idnkit | |
20 | --- /dev/null Wed Sep 1 17:46:18 2004 | |
21 | +++ README.idnkit Wed Sep 1 17:36:14 2004 | |
22 | @@ -0,0 +1,113 @@ | |
5c962666 | 23 | + |
c722a4ac | 24 | + BIND-9 IDN patch |
5c962666 | 25 | + |
c722a4ac | 26 | + Japan Network Information Center (JPNIC) |
5c962666 | 27 | + |
5c962666 | 28 | + |
c722a4ac | 29 | +* What is this patch for? |
5c962666 | 30 | + |
c722a4ac | 31 | +This patch adds internationalized domain name (IDN) support to BIND-9. |
32 | +You'll get internationalized version of dig/host/nslookup commands. | |
5c962666 | 33 | + |
c722a4ac | 34 | + + internationalized dig/host/nslookup |
35 | + dig/host/nslookup accepts non-ASCII domain names in the local | |
36 | + codeset (such as Shift JIS, Big5 or ISO8859-1) determined by | |
37 | + the locale information. The domain names are normalized and | |
38 | + converted to the encoding on the DNS protocol, and sent to DNS | |
39 | + servers. The replies are converted back to the local codeset | |
40 | + and displayed. | |
5c962666 | 41 | + |
5c962666 | 42 | + |
c722a4ac | 43 | +* Compilation & installation |
5c962666 | 44 | + |
c722a4ac | 45 | +0. Prerequisite |
5c962666 | 46 | + |
c722a4ac | 47 | +You have to build and install idnkit before building this patched version |
48 | +of bind-9. | |
5c962666 | 49 | + |
c722a4ac | 50 | +1. Running configure script |
5c962666 | 51 | + |
c722a4ac | 52 | +Run `configure' in the top directory. See `README' for the |
53 | +configuration options. | |
5c962666 | 54 | + |
c722a4ac | 55 | +This patch adds the following 4 options to `configure'. You should |
56 | +at least specify `--with-idn' option to enable IDN support. | |
5c962666 | 57 | + |
c722a4ac | 58 | + --with-idn[=IDN_PREFIX] |
59 | + To enable IDN support, you have to specify `--with-idn' option. | |
60 | + The argument IDN_PREFIX is the install prefix of idnkit. If | |
61 | + IDN_PREFIX is omitted, PREFIX (derived from `--prefix=PREFIX') | |
62 | + is assumed. | |
5c962666 | 63 | + |
c722a4ac | 64 | + --with-libiconv[=LIBICONV_PREFIX] |
65 | + Specify this option if idnkit you have installed links GNU | |
66 | + libiconv. The argument LIBICONV_PREFIX is install prefix of | |
67 | + GNU libiconv. If the argument is omitted, PREFIX (derived | |
68 | + from `--prefix=PREFIX') is assumed. | |
5c962666 | 69 | + |
c722a4ac | 70 | + `--with-libiconv' is shorthand option for GNU libiconv. |
5c962666 | 71 | + |
c722a4ac | 72 | + --with-libiconv=/usr/local |
5c962666 | 73 | + |
c722a4ac | 74 | + This is equivalent to: |
5c962666 | 75 | + |
c722a4ac | 76 | + --with-iconv='-L/usr/local/lib -R/usr/local/lib -liconv' |
5c962666 | 77 | + |
c722a4ac | 78 | + `--with-libiconv' assumes that your C compiler has `-R' |
79 | + option, and that the option adds the specified run-time path | |
80 | + to an exacutable binary. If `-R' option of your compiler has | |
81 | + different meaning, or your compiler lacks the option, you | |
82 | + should use `--with-iconv' option instead. Binary command | |
83 | + without run-time path information might be unexecutable. | |
84 | + In that case, you would see an error message like: | |
5c962666 | 85 | + |
c722a4ac | 86 | + error in loading shared libraries: libiconv.so.2: cannot |
87 | + open shared object file | |
5c962666 | 88 | + |
c722a4ac | 89 | + If both `--with-libiconv' and `--with-iconv' options are |
90 | + specified, `--with-iconv' is prior to `--with-libiconv'. | |
5c962666 | 91 | + |
c722a4ac | 92 | + --with-iconv=ICONV_LIBSPEC |
93 | + If your libc doens't provide iconv(), you need to specify the | |
94 | + library containing iconv() with this option. `ICONV_LIBSPEC' | |
95 | + is the argument(s) to `cc' or `ld' to link the library, for | |
96 | + example, `--with-iconv="-L/usr/local/lib -liconv"'. | |
97 | + You don't need to specify the header file directory for "iconv.h" | |
98 | + to the compiler, as it isn't included directly by bind-9 with | |
99 | + this patch. | |
5c962666 | 100 | + |
c722a4ac | 101 | + --with-idnlib=IDN_LIBSPEC |
102 | + With this option, you can explicitly specify the argument(s) | |
103 | + to `cc' or `ld' to link the idnkit's library, `libidnkit'. If | |
104 | + this option is not specified, `-L${PREFIX}/lib -lidnkit' is | |
105 | + assumed, where ${PREFIX} is the installation prefix specified | |
106 | + with `--with-idn' option above. You may need to use this | |
107 | + option to specify extra argments, for example, | |
108 | + `--with-idnlib="-L/usr/local/lib -R/usr/local/lib -lidnkit"'. | |
5c962666 | 109 | + |
c722a4ac | 110 | +Please consult `README' for other configuration options. |
5c962666 | 111 | + |
c722a4ac | 112 | +Note that if you want to specify some extra header file directories, |
113 | +you should use the environment variable STD_CINCLUDES instead of | |
114 | +CFLAGS, as described in README. | |
5c962666 | 115 | + |
c722a4ac | 116 | +2. Compilation and installation |
117 | + | |
118 | +After running "configure", just do | |
119 | + | |
120 | + make | |
121 | + make install | |
122 | + | |
123 | +for compiling and installing. | |
124 | + | |
125 | + | |
126 | +* Contact information | |
5c962666 | 127 | + |
c722a4ac | 128 | +Please see http//www.nic.ad.jp/en/idn/ for the latest news |
129 | +about idnkit and this patch. | |
130 | + | |
131 | +Bug reports and comments on this kit should be sent to | |
132 | +mdnkit-bugs@nic.ad.jp and idn-cmt@nic.ad.jp, respectively. | |
133 | + | |
134 | + | |
135 | +; $Id$ | |
136 | Index: config.h.in | |
137 | =================================================================== | |
138 | RCS file: /proj/cvs/prod/bind9/config.h.in,v | |
139 | retrieving revision 1.47.2.3.2.11 | |
140 | diff -U2 -r1.47.2.3.2.11 config.h.in | |
141 | --- config.h.in 1 Sep 2004 07:18:30 -0000 1.47.2.3.2.11 | |
142 | +++ config.h.in 1 Sep 2004 07:47:48 -0000 | |
143 | @@ -17,5 +17,5 @@ | |
144 | */ | |
5c962666 | 145 | |
c722a4ac | 146 | -/* $Id$ */ |
147 | +/* $Id$ */ | |
148 | ||
149 | /*** | |
150 | @@ -171,4 +171,7 @@ | |
5c962666 AM |
151 | #undef HAVE_LINUX_CAPABILITY_H |
152 | ||
c722a4ac | 153 | +/* Define to 1 if you have the <locale.h> header file. */ |
5c962666 AM |
154 | +#undef HAVE_LOCALE_H |
155 | + | |
156 | /* Define to 1 if you have the <memory.h> header file. */ | |
157 | #undef HAVE_MEMORY_H | |
c722a4ac | 158 | @@ -177,4 +180,7 @@ |
159 | #undef HAVE_NET_IF6_H | |
5c962666 | 160 | |
c722a4ac | 161 | +/* Define to 1 if you have the `setlocale' function. */ |
162 | +#undef HAVE_SETLOCALE | |
163 | + | |
164 | /* Define to 1 if you have the <stdint.h> header file. */ | |
165 | #undef HAVE_STDINT_H | |
166 | @@ -239,4 +245,7 @@ | |
167 | /* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */ | |
168 | #undef TIME_WITH_SYS_TIME | |
5c962666 AM |
169 | + |
170 | +/* define if idnkit support is to be included. */ | |
171 | +#undef WITH_IDN | |
5c962666 | 172 | |
c722a4ac | 173 | /* Define to 1 if your processor stores words with the most significant byte |
174 | Index: configure | |
175 | =================================================================== | |
176 | RCS file: /proj/cvs/prod/bind9/configure,v | |
177 | retrieving revision 1.284.2.19.2.26 | |
178 | diff -U2 -r1.284.2.19.2.26 configure | |
179 | --- configure 1 Sep 2004 07:18:30 -0000 1.284.2.19.2.26 | |
180 | +++ configure 1 Sep 2004 07:49:43 -0000 | |
181 | @@ -15,5 +15,5 @@ | |
182 | # PERFORMANCE OF THIS SOFTWARE. | |
183 | # | |
184 | -# $Id$ | |
185 | +# $Id$ | |
186 | # | |
187 | # Portions Copyright (C) 1996-2001 Nominum, Inc. | |
188 | @@ -496,5 +496,5 @@ | |
189 | #endif" | |
190 | ||
191 | -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS subdirs build build_cpu build_vendor build_os host host_cpu host_vendor host_os SET_MAKE RANLIB ac_ct_RANLIB INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA STD_CINCLUDES STD_CDEFINES STD_CWARNINGS CCOPT AR ARFLAGS LN ETAGS PERL CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP ISC_PLATFORM_HAVELONGLONG ISC_PLATFORM_HAVELIFCONF ISC_PLATFORM_NEEDSYSSELECTH LWRES_PLATFORM_NEEDSYSSELECTH USE_OPENSSL DST_OPENSSL_INC USE_GSSAPI DST_GSSAPI_INC DNS_CRYPTO_LIBS ALWAYS_DEFINES ISC_PLATFORM_USETHREADS ISC_THREAD_DIR MKDEPCC MKDEPCFLAGS MKDEPPROG IRIX_DNSSEC_WARNINGS_HACK purify_path PURIFY LN_S ECHO ac_ct_AR STRIP ac_ct_STRIP CXX CXXFLAGS ac_ct_CXX CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL O A SA LIBTOOL_MKDEP_SED LIBTOOL_MODE_COMPILE LIBTOOL_MODE_INSTALL LIBTOOL_MODE_LINK LIBBIND ISC_PLATFORM_HAVEIPV6 LWRES_PLATFORM_HAVEIPV6 ISC_PLATFORM_NEEDNETINETIN6H LWRES_PLATFORM_NEEDNETINETIN6H ISC_PLATFORM_NEEDNETINET6IN6H LWRES_PLATFORM_NEEDNETINET6IN6H ISC_PLATFORM_HAVEINADDR6 LWRES_PLATFORM_HAVEINADDR6 ISC_PLATFORM_NEEDIN6ADDRANY LWRES_PLATFORM_NEEDIN6ADDRANY ISC_PLATFORM_NEEDIN6ADDRLOOPBACK LWRES_PLATFORM_NEEDIN6ADDRLOOPBACK ISC_PLATFORM_HAVEIN6PKTINFO ISC_PLATFORM_FIXIN6ISADDR ISC_IPV6_H ISC_IPV6_O ISC_ISCIPV6_O ISC_IPV6_C LWRES_HAVE_SIN6_SCOPE_ID ISC_PLATFORM_HAVESCOPEID ISC_PLATFORM_HAVEIF_LADDRREQ ISC_PLATFORM_HAVEIF_LADDRCONF ISC_PLATFORM_NEEDNTOP ISC_PLATFORM_NEEDPTON ISC_PLATFORM_NEEDATON ISC_PLATFORM_HAVESALEN LWRES_PLATFORM_HAVESALEN ISC_PLATFORM_MSGHDRFLAVOR ISC_PLATFORM_NEEDPORTT ISC_LWRES_NEEDADDRINFO ISC_LWRES_NEEDRRSETINFO ISC_LWRES_SETHOSTENTINT ISC_LWRES_ENDHOSTENTINT ISC_LWRES_GETNETBYADDRINADDR ISC_LWRES_SETNETENTINT ISC_LWRES_ENDNETENTINT ISC_LWRES_GETHOSTBYADDRVOID ISC_LWRES_NEEDHERRNO ISC_LWRES_GETIPNODEPROTO ISC_LWRES_GETADDRINFOPROTO ISC_LWRES_GETNAMEINFOPROTO ISC_PLATFORM_NEEDSTRSEP ISC_PLATFORM_NEEDMEMMOVE ISC_PLATFORM_NEEDSTRTOUL ISC_PLATFORM_NEEDSTRLCPY ISC_PLATFORM_NEEDSTRLCAT ISC_PLATFORM_NEEDSPRINTF LWRES_PLATFORM_NEEDSPRINTF ISC_PLATFORM_NEEDVSNPRINTF LWRES_PLATFORM_NEEDVSNPRINTF ISC_EXTRA_OBJS ISC_EXTRA_SRCS ISC_PLATFORM_QUADFORMAT ISC_PLATFORM_RLIMITTYPE ISC_PLATFORM_USEDECLSPEC LWRES_PLATFORM_USEDECLSPEC ISC_PLATFORM_BRACEPTHREADONCEINIT ISC_PLATFORM_HAVEIFNAMETOINDEX OPENJADE JADETEX PDFJADETEX SGMLCATALOG HTMLSTYLE PRINTSTYLE XMLDCL DOCBOOK2MANSPEC BIND9_TOP_BUILDDIR BIND9_ISC_BUILDINCLUDE BIND9_ISCCC_BUILDINCLUDE BIND9_ISCCFG_BUILDINCLUDE BIND9_DNS_BUILDINCLUDE BIND9_LWRES_BUILDINCLUDE BIND9_BIND9_BUILDINCLUDE BIND9_VERSION LIBOBJS LTLIBOBJS' | |
192 | +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS subdirs build build_cpu build_vendor build_os host host_cpu host_vendor host_os SET_MAKE RANLIB ac_ct_RANLIB INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA STD_CINCLUDES STD_CDEFINES STD_CWARNINGS CCOPT AR ARFLAGS LN ETAGS PERL CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP ISC_PLATFORM_HAVELONGLONG ISC_PLATFORM_HAVELIFCONF ISC_PLATFORM_NEEDSYSSELECTH LWRES_PLATFORM_NEEDSYSSELECTH USE_OPENSSL DST_OPENSSL_INC USE_GSSAPI DST_GSSAPI_INC DNS_CRYPTO_LIBS ALWAYS_DEFINES ISC_PLATFORM_USETHREADS ISC_THREAD_DIR MKDEPCC MKDEPCFLAGS MKDEPPROG IRIX_DNSSEC_WARNINGS_HACK purify_path PURIFY LN_S ECHO ac_ct_AR STRIP ac_ct_STRIP CXX CXXFLAGS ac_ct_CXX CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL O A SA LIBTOOL_MKDEP_SED LIBTOOL_MODE_COMPILE LIBTOOL_MODE_INSTALL LIBTOOL_MODE_LINK LIBBIND ISC_PLATFORM_HAVEIPV6 LWRES_PLATFORM_HAVEIPV6 ISC_PLATFORM_NEEDNETINETIN6H LWRES_PLATFORM_NEEDNETINETIN6H ISC_PLATFORM_NEEDNETINET6IN6H LWRES_PLATFORM_NEEDNETINET6IN6H ISC_PLATFORM_HAVEINADDR6 LWRES_PLATFORM_HAVEINADDR6 ISC_PLATFORM_NEEDIN6ADDRANY LWRES_PLATFORM_NEEDIN6ADDRANY ISC_PLATFORM_NEEDIN6ADDRLOOPBACK LWRES_PLATFORM_NEEDIN6ADDRLOOPBACK ISC_PLATFORM_HAVEIN6PKTINFO ISC_PLATFORM_FIXIN6ISADDR ISC_IPV6_H ISC_IPV6_O ISC_ISCIPV6_O ISC_IPV6_C LWRES_HAVE_SIN6_SCOPE_ID ISC_PLATFORM_HAVESCOPEID ISC_PLATFORM_HAVEIF_LADDRREQ ISC_PLATFORM_HAVEIF_LADDRCONF ISC_PLATFORM_NEEDNTOP ISC_PLATFORM_NEEDPTON ISC_PLATFORM_NEEDATON ISC_PLATFORM_HAVESALEN LWRES_PLATFORM_HAVESALEN ISC_PLATFORM_MSGHDRFLAVOR ISC_PLATFORM_NEEDPORTT ISC_LWRES_NEEDADDRINFO ISC_LWRES_NEEDRRSETINFO ISC_LWRES_SETHOSTENTINT ISC_LWRES_ENDHOSTENTINT ISC_LWRES_GETNETBYADDRINADDR ISC_LWRES_SETNETENTINT ISC_LWRES_ENDNETENTINT ISC_LWRES_GETHOSTBYADDRVOID ISC_LWRES_NEEDHERRNO ISC_LWRES_GETIPNODEPROTO ISC_LWRES_GETADDRINFOPROTO ISC_LWRES_GETNAMEINFOPROTO ISC_PLATFORM_NEEDSTRSEP ISC_PLATFORM_NEEDMEMMOVE ISC_PLATFORM_NEEDSTRTOUL ISC_PLATFORM_NEEDSTRLCPY ISC_PLATFORM_NEEDSTRLCAT ISC_PLATFORM_NEEDSPRINTF LWRES_PLATFORM_NEEDSPRINTF ISC_PLATFORM_NEEDVSNPRINTF LWRES_PLATFORM_NEEDVSNPRINTF ISC_EXTRA_OBJS ISC_EXTRA_SRCS ISC_PLATFORM_QUADFORMAT ISC_PLATFORM_RLIMITTYPE ISC_PLATFORM_USEDECLSPEC LWRES_PLATFORM_USEDECLSPEC ISC_PLATFORM_BRACEPTHREADONCEINIT ISC_PLATFORM_HAVEIFNAMETOINDEX OPENJADE JADETEX PDFJADETEX SGMLCATALOG HTMLSTYLE PRINTSTYLE XMLDCL DOCBOOK2MANSPEC IDNLIBS BIND9_TOP_BUILDDIR BIND9_ISC_BUILDINCLUDE BIND9_ISCCC_BUILDINCLUDE BIND9_ISCCFG_BUILDINCLUDE BIND9_DNS_BUILDINCLUDE BIND9_LWRES_BUILDINCLUDE BIND9_BIND9_BUILDINCLUDE BIND9_VERSION LIBOBJS LTLIBOBJS' | |
193 | ac_subst_files='BIND9_MAKE_INCLUDES BIND9_MAKE_RULES LIBISC_API LIBISCCC_API LIBISCCFG_API LIBDNS_API LIBBIND9_API LIBLWRES_API' | |
194 | ||
195 | @@ -1081,4 +1081,8 @@ | |
196 | include additional configurations [automatic] | |
5c962666 AM |
197 | --with-kame=PATH use Kame IPv6 default path /usr/local/v6 |
198 | + --with-idn=MPREFIX enable IDN support using idnkit default PREFIX | |
199 | + --with-libiconv=IPREFIX GNU libiconv are in IPREFIX default PREFIX | |
200 | + --with-iconv=LIBSPEC specify iconv library default -liconv | |
201 | + --with-idnlib=ARG specify libidnkit | |
202 | ||
203 | Some influential environment variables: | |
c722a4ac | 204 | @@ -7921,5 +7925,5 @@ |
205 | *-*-irix6*) | |
206 | # Find out which ABI we are using. | |
207 | - echo '#line 7923 "configure"' > conftest.$ac_ext | |
208 | + echo '#line 7927 "configure"' > conftest.$ac_ext | |
209 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
210 | (eval $ac_compile) 2>&5 | |
211 | @@ -8911,5 +8915,5 @@ | |
212 | ||
213 | # Provide some information about the compiler. | |
214 | -echo "$as_me:8913:" \ | |
215 | +echo "$as_me:8917:" \ | |
216 | "checking for Fortran 77 compiler version" >&5 | |
217 | ac_compiler=`set X $ac_compile; echo $2` | |
218 | @@ -9949,9 +9953,9 @@ | |
219 | -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ | |
220 | -e 's:$: $lt_compiler_flag:'` | |
221 | - (eval echo "\"\$as_me:9951: $lt_compile\"" >&5) | |
222 | + (eval echo "\"\$as_me:9955: $lt_compile\"" >&5) | |
223 | (eval "$lt_compile" 2>conftest.err) | |
224 | ac_status=$? | |
225 | cat conftest.err >&5 | |
226 | - echo "$as_me:9955: \$? = $ac_status" >&5 | |
227 | + echo "$as_me:9959: \$? = $ac_status" >&5 | |
228 | if (exit $ac_status) && test -s "$ac_outfile"; then | |
229 | # The compiler can only warn and ignore the option if not recognized | |
230 | @@ -10182,9 +10186,9 @@ | |
231 | -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ | |
232 | -e 's:$: $lt_compiler_flag:'` | |
233 | - (eval echo "\"\$as_me:10184: $lt_compile\"" >&5) | |
234 | + (eval echo "\"\$as_me:10188: $lt_compile\"" >&5) | |
235 | (eval "$lt_compile" 2>conftest.err) | |
236 | ac_status=$? | |
237 | cat conftest.err >&5 | |
238 | - echo "$as_me:10188: \$? = $ac_status" >&5 | |
239 | + echo "$as_me:10192: \$? = $ac_status" >&5 | |
240 | if (exit $ac_status) && test -s "$ac_outfile"; then | |
241 | # The compiler can only warn and ignore the option if not recognized | |
242 | @@ -10242,9 +10246,9 @@ | |
243 | -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ | |
244 | -e 's:$: $lt_compiler_flag:'` | |
245 | - (eval echo "\"\$as_me:10244: $lt_compile\"" >&5) | |
246 | + (eval echo "\"\$as_me:10248: $lt_compile\"" >&5) | |
247 | (eval "$lt_compile" 2>out/conftest.err) | |
248 | ac_status=$? | |
249 | cat out/conftest.err >&5 | |
250 | - echo "$as_me:10248: \$? = $ac_status" >&5 | |
251 | + echo "$as_me:10252: \$? = $ac_status" >&5 | |
252 | if (exit $ac_status) && test -s out/conftest2.$ac_objext | |
253 | then | |
254 | @@ -12426,5 +12430,5 @@ | |
255 | lt_status=$lt_dlunknown | |
256 | cat > conftest.$ac_ext <<EOF | |
257 | -#line 12428 "configure" | |
258 | +#line 12432 "configure" | |
259 | #include "confdefs.h" | |
260 | ||
261 | @@ -12524,5 +12528,5 @@ | |
262 | lt_status=$lt_dlunknown | |
263 | cat > conftest.$ac_ext <<EOF | |
264 | -#line 12526 "configure" | |
265 | +#line 12530 "configure" | |
266 | #include "confdefs.h" | |
267 | ||
268 | @@ -14707,9 +14711,9 @@ | |
269 | -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ | |
270 | -e 's:$: $lt_compiler_flag:'` | |
271 | - (eval echo "\"\$as_me:14709: $lt_compile\"" >&5) | |
272 | + (eval echo "\"\$as_me:14713: $lt_compile\"" >&5) | |
273 | (eval "$lt_compile" 2>conftest.err) | |
274 | ac_status=$? | |
275 | cat conftest.err >&5 | |
276 | - echo "$as_me:14713: \$? = $ac_status" >&5 | |
277 | + echo "$as_me:14717: \$? = $ac_status" >&5 | |
278 | if (exit $ac_status) && test -s "$ac_outfile"; then | |
279 | # The compiler can only warn and ignore the option if not recognized | |
280 | @@ -14767,9 +14771,9 @@ | |
281 | -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ | |
282 | -e 's:$: $lt_compiler_flag:'` | |
283 | - (eval echo "\"\$as_me:14769: $lt_compile\"" >&5) | |
284 | + (eval echo "\"\$as_me:14773: $lt_compile\"" >&5) | |
285 | (eval "$lt_compile" 2>out/conftest.err) | |
286 | ac_status=$? | |
287 | cat out/conftest.err >&5 | |
288 | - echo "$as_me:14773: \$? = $ac_status" >&5 | |
289 | + echo "$as_me:14777: \$? = $ac_status" >&5 | |
290 | if (exit $ac_status) && test -s out/conftest2.$ac_objext | |
291 | then | |
292 | @@ -16128,5 +16132,5 @@ | |
293 | lt_status=$lt_dlunknown | |
294 | cat > conftest.$ac_ext <<EOF | |
295 | -#line 16130 "configure" | |
296 | +#line 16134 "configure" | |
297 | #include "confdefs.h" | |
298 | ||
299 | @@ -16226,5 +16230,5 @@ | |
300 | lt_status=$lt_dlunknown | |
301 | cat > conftest.$ac_ext <<EOF | |
302 | -#line 16228 "configure" | |
303 | +#line 16232 "configure" | |
304 | #include "confdefs.h" | |
305 | ||
306 | @@ -17053,9 +17057,9 @@ | |
307 | -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ | |
308 | -e 's:$: $lt_compiler_flag:'` | |
309 | - (eval echo "\"\$as_me:17055: $lt_compile\"" >&5) | |
310 | + (eval echo "\"\$as_me:17059: $lt_compile\"" >&5) | |
311 | (eval "$lt_compile" 2>conftest.err) | |
312 | ac_status=$? | |
313 | cat conftest.err >&5 | |
314 | - echo "$as_me:17059: \$? = $ac_status" >&5 | |
315 | + echo "$as_me:17063: \$? = $ac_status" >&5 | |
316 | if (exit $ac_status) && test -s "$ac_outfile"; then | |
317 | # The compiler can only warn and ignore the option if not recognized | |
318 | @@ -17113,9 +17117,9 @@ | |
319 | -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ | |
320 | -e 's:$: $lt_compiler_flag:'` | |
321 | - (eval echo "\"\$as_me:17115: $lt_compile\"" >&5) | |
322 | + (eval echo "\"\$as_me:17119: $lt_compile\"" >&5) | |
323 | (eval "$lt_compile" 2>out/conftest.err) | |
324 | ac_status=$? | |
325 | cat out/conftest.err >&5 | |
326 | - echo "$as_me:17119: \$? = $ac_status" >&5 | |
327 | + echo "$as_me:17123: \$? = $ac_status" >&5 | |
328 | if (exit $ac_status) && test -s out/conftest2.$ac_objext | |
329 | then | |
330 | @@ -19151,9 +19155,9 @@ | |
331 | -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ | |
332 | -e 's:$: $lt_compiler_flag:'` | |
333 | - (eval echo "\"\$as_me:19153: $lt_compile\"" >&5) | |
334 | + (eval echo "\"\$as_me:19157: $lt_compile\"" >&5) | |
335 | (eval "$lt_compile" 2>conftest.err) | |
336 | ac_status=$? | |
337 | cat conftest.err >&5 | |
338 | - echo "$as_me:19157: \$? = $ac_status" >&5 | |
339 | + echo "$as_me:19161: \$? = $ac_status" >&5 | |
340 | if (exit $ac_status) && test -s "$ac_outfile"; then | |
341 | # The compiler can only warn and ignore the option if not recognized | |
342 | @@ -19384,9 +19388,9 @@ | |
343 | -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ | |
344 | -e 's:$: $lt_compiler_flag:'` | |
345 | - (eval echo "\"\$as_me:19386: $lt_compile\"" >&5) | |
346 | + (eval echo "\"\$as_me:19390: $lt_compile\"" >&5) | |
347 | (eval "$lt_compile" 2>conftest.err) | |
348 | ac_status=$? | |
349 | cat conftest.err >&5 | |
350 | - echo "$as_me:19390: \$? = $ac_status" >&5 | |
351 | + echo "$as_me:19394: \$? = $ac_status" >&5 | |
352 | if (exit $ac_status) && test -s "$ac_outfile"; then | |
353 | # The compiler can only warn and ignore the option if not recognized | |
354 | @@ -19444,9 +19448,9 @@ | |
355 | -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ | |
356 | -e 's:$: $lt_compiler_flag:'` | |
357 | - (eval echo "\"\$as_me:19446: $lt_compile\"" >&5) | |
358 | + (eval echo "\"\$as_me:19450: $lt_compile\"" >&5) | |
359 | (eval "$lt_compile" 2>out/conftest.err) | |
360 | ac_status=$? | |
361 | cat out/conftest.err >&5 | |
362 | - echo "$as_me:19450: \$? = $ac_status" >&5 | |
363 | + echo "$as_me:19454: \$? = $ac_status" >&5 | |
364 | if (exit $ac_status) && test -s out/conftest2.$ac_objext | |
365 | then | |
366 | @@ -21628,5 +21632,5 @@ | |
367 | lt_status=$lt_dlunknown | |
368 | cat > conftest.$ac_ext <<EOF | |
369 | -#line 21630 "configure" | |
370 | +#line 21634 "configure" | |
371 | #include "confdefs.h" | |
372 | ||
373 | @@ -21726,5 +21730,5 @@ | |
374 | lt_status=$lt_dlunknown | |
375 | cat > conftest.$ac_ext <<EOF | |
376 | -#line 21728 "configure" | |
377 | +#line 21732 "configure" | |
378 | #include "confdefs.h" | |
5c962666 | 379 | |
c722a4ac | 380 | @@ -27310,4 +27314,354 @@ |
5c962666 AM |
381 | |
382 | # | |
383 | +# IDN support | |
384 | +# | |
385 | + | |
386 | +# Check whether --with-idn or --without-idn was given. | |
387 | +if test "${with_idn+set}" = set; then | |
388 | + withval="$with_idn" | |
389 | + use_idn="$withval" | |
390 | +else | |
391 | + use_idn="no" | |
392 | +fi; | |
393 | +case "$use_idn" in | |
394 | +yes) | |
395 | + if test X$prefix = XNONE ; then | |
396 | + idn_path=/usr/local | |
397 | + else | |
398 | + idn_path=$prefix | |
399 | + fi | |
400 | + ;; | |
401 | +no) | |
402 | + ;; | |
403 | +*) | |
404 | + idn_path="$use_idn" | |
405 | + ;; | |
406 | +esac | |
407 | + | |
408 | +iconvinc= | |
409 | +iconvlib= | |
410 | + | |
411 | +# Check whether --with-libiconv or --without-libiconv was given. | |
412 | +if test "${with_libiconv+set}" = set; then | |
413 | + withval="$with_libiconv" | |
414 | + use_libiconv="$withval" | |
415 | +else | |
416 | + use_libiconv="no" | |
417 | +fi; | |
418 | +case "$use_libiconv" in | |
419 | +yes) | |
420 | + if test X$prefix = XNONE ; then | |
421 | + iconvlib="-L/usr/local/lib -R/usr/local/lib -liconv" | |
422 | + else | |
423 | + iconvlib="-L$prefix/lib -R$prefix/lib -liconv" | |
424 | + fi | |
425 | + ;; | |
426 | +no) | |
427 | + iconvlib= | |
428 | + ;; | |
429 | +*) | |
430 | + iconvlib="-L$use_libiconv/lib -R$use_libiconv/lib -liconv" | |
431 | + ;; | |
432 | +esac | |
433 | + | |
434 | + | |
435 | +# Check whether --with-iconv or --without-iconv was given. | |
436 | +if test "${with_iconv+set}" = set; then | |
437 | + withval="$with_iconv" | |
438 | + iconvlib="$withval" | |
439 | +fi; | |
440 | +case "$iconvlib" in | |
441 | +no) | |
442 | + iconvlib= | |
443 | + ;; | |
444 | +yes) | |
445 | + iconvlib=-liconv | |
446 | + ;; | |
447 | +esac | |
448 | + | |
449 | + | |
450 | +# Check whether --with-idnlib or --without-idnlib was given. | |
451 | +if test "${with_idnlib+set}" = set; then | |
452 | + withval="$with_idnlib" | |
453 | + idnlib="$withval" | |
454 | +else | |
455 | + idnlib="no" | |
456 | +fi; | |
457 | +if test "$idnlib" = yes; then | |
458 | + { { echo "$as_me:$LINENO: error: You must specify ARG for --with-idnlib." >&5 | |
459 | +echo "$as_me: error: You must specify ARG for --with-idnlib." >&2;} | |
460 | + { (exit 1); exit 1; }; } | |
461 | +fi | |
462 | + | |
463 | +IDNLIBS= | |
464 | +if test "$use_idn" != no; then | |
465 | + | |
466 | +cat >>confdefs.h <<\_ACEOF | |
467 | +#define WITH_IDN 1 | |
468 | +_ACEOF | |
469 | + | |
470 | + STD_CINCLUDES="$STD_CINCLUDES -I$idn_path/include" | |
471 | + if test "$idnlib" != no; then | |
472 | + IDNLIBS="$idnlib $iconvlib" | |
473 | + else | |
474 | + IDNLIBS="-L$idn_path/lib -lidnkit $iconvlib" | |
475 | + fi | |
476 | +fi | |
477 | + | |
478 | + | |
479 | + | |
480 | +for ac_header in locale.h | |
481 | +do | |
482 | +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
483 | +if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
484 | + echo "$as_me:$LINENO: checking for $ac_header" >&5 | |
485 | +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 | |
486 | +if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
487 | + echo $ECHO_N "(cached) $ECHO_C" >&6 | |
488 | +fi | |
489 | +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 | |
490 | +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
491 | +else | |
492 | + # Is the header compilable? | |
493 | +echo "$as_me:$LINENO: checking $ac_header usability" >&5 | |
494 | +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 | |
495 | +cat >conftest.$ac_ext <<_ACEOF | |
c722a4ac | 496 | +/* confdefs.h. */ |
497 | +_ACEOF | |
498 | +cat confdefs.h >>conftest.$ac_ext | |
499 | +cat >>conftest.$ac_ext <<_ACEOF | |
500 | +/* end confdefs.h. */ | |
5c962666 AM |
501 | +$ac_includes_default |
502 | +#include <$ac_header> | |
503 | +_ACEOF | |
504 | +rm -f conftest.$ac_objext | |
505 | +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
c722a4ac | 506 | + (eval $ac_compile) 2>conftest.er1 |
5c962666 | 507 | + ac_status=$? |
c722a4ac | 508 | + grep -v '^ *+' conftest.er1 >conftest.err |
509 | + rm -f conftest.er1 | |
510 | + cat conftest.err >&5 | |
5c962666 AM |
511 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
512 | + (exit $ac_status); } && | |
c722a4ac | 513 | + { ac_try='test -z "$ac_c_werror_flag" |
514 | + || test ! -s conftest.err' | |
515 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
516 | + (eval $ac_try) 2>&5 | |
517 | + ac_status=$? | |
518 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
519 | + (exit $ac_status); }; } && | |
520 | + { ac_try='test -s conftest.$ac_objext' | |
5c962666 AM |
521 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
522 | + (eval $ac_try) 2>&5 | |
523 | + ac_status=$? | |
524 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
525 | + (exit $ac_status); }; }; then | |
526 | + ac_header_compiler=yes | |
527 | +else | |
528 | + echo "$as_me: failed program was:" >&5 | |
c722a4ac | 529 | +sed 's/^/| /' conftest.$ac_ext >&5 |
530 | + | |
5c962666 AM |
531 | +ac_header_compiler=no |
532 | +fi | |
c722a4ac | 533 | +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
5c962666 AM |
534 | +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 |
535 | +echo "${ECHO_T}$ac_header_compiler" >&6 | |
536 | + | |
537 | +# Is the header present? | |
538 | +echo "$as_me:$LINENO: checking $ac_header presence" >&5 | |
539 | +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 | |
540 | +cat >conftest.$ac_ext <<_ACEOF | |
c722a4ac | 541 | +/* confdefs.h. */ |
542 | +_ACEOF | |
543 | +cat confdefs.h >>conftest.$ac_ext | |
544 | +cat >>conftest.$ac_ext <<_ACEOF | |
545 | +/* end confdefs.h. */ | |
5c962666 AM |
546 | +#include <$ac_header> |
547 | +_ACEOF | |
548 | +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
549 | + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
550 | + ac_status=$? | |
c722a4ac | 551 | + grep -v '^ *+' conftest.er1 >conftest.err |
5c962666 AM |
552 | + rm -f conftest.er1 |
553 | + cat conftest.err >&5 | |
554 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
555 | + (exit $ac_status); } >/dev/null; then | |
556 | + if test -s conftest.err; then | |
557 | + ac_cpp_err=$ac_c_preproc_warn_flag | |
c722a4ac | 558 | + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
5c962666 AM |
559 | + else |
560 | + ac_cpp_err= | |
561 | + fi | |
562 | +else | |
563 | + ac_cpp_err=yes | |
564 | +fi | |
565 | +if test -z "$ac_cpp_err"; then | |
566 | + ac_header_preproc=yes | |
567 | +else | |
568 | + echo "$as_me: failed program was:" >&5 | |
c722a4ac | 569 | +sed 's/^/| /' conftest.$ac_ext >&5 |
570 | + | |
5c962666 AM |
571 | + ac_header_preproc=no |
572 | +fi | |
573 | +rm -f conftest.err conftest.$ac_ext | |
574 | +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 | |
575 | +echo "${ECHO_T}$ac_header_preproc" >&6 | |
576 | + | |
577 | +# So? What about this header? | |
c722a4ac | 578 | +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in |
579 | + yes:no: ) | |
5c962666 AM |
580 | + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 |
581 | +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
c722a4ac | 582 | + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 |
583 | +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} | |
584 | + ac_header_preproc=yes | |
585 | + ;; | |
586 | + no:yes:* ) | |
5c962666 AM |
587 | + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 |
588 | +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} | |
c722a4ac | 589 | + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 |
590 | +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} | |
591 | + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 | |
592 | +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} | |
593 | + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 | |
594 | +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} | |
5c962666 | 595 | + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 |
c722a4ac | 596 | +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} |
597 | + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 | |
598 | +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} | |
599 | + ( | |
600 | + cat <<\_ASBOX | |
601 | +## ------------------------------------------ ## | |
602 | +## Report this to the AC_PACKAGE_NAME lists. ## | |
603 | +## ------------------------------------------ ## | |
604 | +_ASBOX | |
605 | + ) | | |
606 | + sed "s/^/$as_me: WARNING: /" >&2 | |
607 | + ;; | |
5c962666 AM |
608 | +esac |
609 | +echo "$as_me:$LINENO: checking for $ac_header" >&5 | |
610 | +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 | |
611 | +if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
612 | + echo $ECHO_N "(cached) $ECHO_C" >&6 | |
613 | +else | |
c722a4ac | 614 | + eval "$as_ac_Header=\$ac_header_preproc" |
5c962666 AM |
615 | +fi |
616 | +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 | |
617 | +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
618 | + | |
619 | +fi | |
620 | +if test `eval echo '${'$as_ac_Header'}'` = yes; then | |
621 | + cat >>confdefs.h <<_ACEOF | |
622 | +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
623 | +_ACEOF | |
624 | + | |
625 | +fi | |
626 | + | |
627 | +done | |
628 | + | |
629 | + | |
630 | +for ac_func in setlocale | |
631 | +do | |
632 | +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
633 | +echo "$as_me:$LINENO: checking for $ac_func" >&5 | |
634 | +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 | |
635 | +if eval "test \"\${$as_ac_var+set}\" = set"; then | |
636 | + echo $ECHO_N "(cached) $ECHO_C" >&6 | |
637 | +else | |
638 | + cat >conftest.$ac_ext <<_ACEOF | |
c722a4ac | 639 | +/* confdefs.h. */ |
640 | +_ACEOF | |
641 | +cat confdefs.h >>conftest.$ac_ext | |
642 | +cat >>conftest.$ac_ext <<_ACEOF | |
643 | +/* end confdefs.h. */ | |
5c962666 AM |
644 | +/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. |
645 | + For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
646 | +#define $ac_func innocuous_$ac_func | |
647 | + | |
648 | +/* System header to define __stub macros and hopefully few prototypes, | |
649 | + which can conflict with char $ac_func (); below. | |
650 | + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
651 | + <limits.h> exists even on freestanding compilers. */ | |
652 | + | |
653 | +#ifdef __STDC__ | |
654 | +# include <limits.h> | |
655 | +#else | |
656 | +# include <assert.h> | |
657 | +#endif | |
658 | + | |
659 | +#undef $ac_func | |
660 | + | |
661 | +/* Override any gcc2 internal prototype to avoid an error. */ | |
662 | +#ifdef __cplusplus | |
663 | +extern "C" | |
664 | +{ | |
665 | +#endif | |
666 | +/* We use char because int might match the return type of a gcc2 | |
667 | + builtin and then its argument prototype would still apply. */ | |
668 | +char $ac_func (); | |
669 | +/* The GNU C library defines this for functions which it implements | |
670 | + to always fail with ENOSYS. Some functions are actually named | |
671 | + something starting with __ and the normal name is an alias. */ | |
672 | +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
673 | +choke me | |
674 | +#else | |
675 | +char (*f) () = $ac_func; | |
676 | +#endif | |
677 | +#ifdef __cplusplus | |
678 | +} | |
679 | +#endif | |
680 | + | |
5c962666 AM |
681 | +int |
682 | +main () | |
683 | +{ | |
684 | +return f != $ac_func; | |
685 | + ; | |
686 | + return 0; | |
687 | +} | |
688 | +_ACEOF | |
689 | +rm -f conftest.$ac_objext conftest$ac_exeext | |
690 | +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
c722a4ac | 691 | + (eval $ac_link) 2>conftest.er1 |
5c962666 | 692 | + ac_status=$? |
c722a4ac | 693 | + grep -v '^ *+' conftest.er1 >conftest.err |
694 | + rm -f conftest.er1 | |
695 | + cat conftest.err >&5 | |
5c962666 AM |
696 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
697 | + (exit $ac_status); } && | |
c722a4ac | 698 | + { ac_try='test -z "$ac_c_werror_flag" |
699 | + || test ! -s conftest.err' | |
700 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
701 | + (eval $ac_try) 2>&5 | |
702 | + ac_status=$? | |
703 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
704 | + (exit $ac_status); }; } && | |
705 | + { ac_try='test -s conftest$ac_exeext' | |
5c962666 AM |
706 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
707 | + (eval $ac_try) 2>&5 | |
708 | + ac_status=$? | |
709 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
710 | + (exit $ac_status); }; }; then | |
711 | + eval "$as_ac_var=yes" | |
712 | +else | |
713 | + echo "$as_me: failed program was:" >&5 | |
c722a4ac | 714 | +sed 's/^/| /' conftest.$ac_ext >&5 |
715 | + | |
5c962666 AM |
716 | +eval "$as_ac_var=no" |
717 | +fi | |
c722a4ac | 718 | +rm -f conftest.err conftest.$ac_objext \ |
719 | + conftest$ac_exeext conftest.$ac_ext | |
5c962666 AM |
720 | +fi |
721 | +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 | |
722 | +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 | |
723 | +if test `eval echo '${'$as_ac_var'}'` = yes; then | |
724 | + cat >>confdefs.h <<_ACEOF | |
725 | +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
726 | +_ACEOF | |
727 | + | |
728 | +fi | |
729 | +done | |
730 | + | |
731 | + | |
732 | +# | |
733 | # Substitutions | |
734 | # | |
c722a4ac | 735 | @@ -28192,4 +28546,5 @@ |
5c962666 AM |
736 | s,@XMLDCL@,$XMLDCL,;t t |
737 | s,@DOCBOOK2MANSPEC@,$DOCBOOK2MANSPEC,;t t | |
738 | +s,@IDNLIBS@,$IDNLIBS,;t t | |
739 | s,@BIND9_TOP_BUILDDIR@,$BIND9_TOP_BUILDDIR,;t t | |
740 | s,@BIND9_ISC_BUILDINCLUDE@,$BIND9_ISC_BUILDINCLUDE,;t t | |
c722a4ac | 741 | Index: configure.in |
742 | =================================================================== | |
743 | RCS file: /proj/cvs/prod/bind9/configure.in,v | |
744 | retrieving revision 1.294.2.23.2.30 | |
745 | diff -U2 -r1.294.2.23.2.30 configure.in | |
746 | --- configure.in 1 Sep 2004 07:16:34 -0000 1.294.2.23.2.30 | |
747 | +++ configure.in 1 Sep 2004 07:49:51 -0000 | |
748 | @@ -2038,4 +2038,80 @@ | |
5c962666 AM |
749 | |
750 | # | |
751 | +# IDN support | |
752 | +# | |
753 | +AC_ARG_WITH(idn, | |
754 | + [ --with-idn[=MPREFIX] enable IDN support using idnkit [default PREFIX]], | |
755 | + use_idn="$withval", use_idn="no") | |
756 | +case "$use_idn" in | |
757 | +yes) | |
758 | + if test X$prefix = XNONE ; then | |
759 | + idn_path=/usr/local | |
760 | + else | |
761 | + idn_path=$prefix | |
762 | + fi | |
763 | + ;; | |
764 | +no) | |
765 | + ;; | |
766 | +*) | |
767 | + idn_path="$use_idn" | |
768 | + ;; | |
769 | +esac | |
770 | + | |
771 | +iconvinc= | |
772 | +iconvlib= | |
773 | +AC_ARG_WITH(libiconv, | |
774 | + [ --with-libiconv[=IPREFIX] GNU libiconv are in IPREFIX [default PREFIX]], | |
775 | + use_libiconv="$withval", use_libiconv="no") | |
776 | +case "$use_libiconv" in | |
777 | +yes) | |
778 | + if test X$prefix = XNONE ; then | |
779 | + iconvlib="-L/usr/local/lib -R/usr/local/lib -liconv" | |
780 | + else | |
781 | + iconvlib="-L$prefix/lib -R$prefix/lib -liconv" | |
782 | + fi | |
783 | + ;; | |
784 | +no) | |
785 | + iconvlib= | |
786 | + ;; | |
787 | +*) | |
788 | + iconvlib="-L$use_libiconv/lib -R$use_libiconv/lib -liconv" | |
789 | + ;; | |
790 | +esac | |
791 | + | |
c722a4ac | 792 | +AC_ARG_WITH(iconv, |
793 | + [ --with-iconv[=LIBSPEC] specify iconv library [default -liconv]], | |
794 | + iconvlib="$withval") | |
795 | +case "$iconvlib" in | |
796 | +no) | |
797 | + iconvlib= | |
798 | + ;; | |
799 | +yes) | |
800 | + iconvlib=-liconv | |
801 | + ;; | |
802 | +esac | |
803 | + | |
804 | +AC_ARG_WITH(idnlib, | |
805 | + [ --with-idnlib=ARG specify libidnkit], | |
806 | + idnlib="$withval", idnlib="no") | |
807 | +if test "$idnlib" = yes; then | |
808 | + AC_MSG_ERROR([You must specify ARG for --with-idnlib.]) | |
809 | +fi | |
810 | + | |
811 | +IDNLIBS= | |
812 | +if test "$use_idn" != no; then | |
813 | + AC_DEFINE(WITH_IDN, 1, [define if idnkit support is to be included.]) | |
814 | + STD_CINCLUDES="$STD_CINCLUDES -I$idn_path/include" | |
815 | + if test "$idnlib" != no; then | |
816 | + IDNLIBS="$idnlib $iconvlib" | |
817 | + else | |
818 | + IDNLIBS="-L$idn_path/lib -lidnkit $iconvlib" | |
819 | + fi | |
820 | +fi | |
821 | +AC_SUBST(IDNLIBS) | |
822 | + | |
823 | +AC_CHECK_HEADERS(locale.h) | |
824 | +AC_CHECK_FUNCS(setlocale) | |
825 | + | |
826 | +# | |
827 | # Substitutions | |
828 | # | |
829 | Index: bin/dig/Makefile.in | |
830 | =================================================================== | |
831 | RCS file: /proj/cvs/prod/bind9/bin/dig/Makefile.in,v | |
832 | retrieving revision 1.25.12.12 | |
833 | diff -U2 -r1.25.12.12 Makefile.in | |
834 | --- bin/dig/Makefile.in 18 Aug 2004 23:25:57 -0000 1.25.12.12 | |
835 | +++ bin/dig/Makefile.in 1 Sep 2004 07:49:52 -0000 | |
836 | @@ -46,5 +46,5 @@ | |
837 | ||
838 | LIBS = ${LWRESLIBS} ${DNSLIBS} ${BIND9LIBS} ${ISCLIBS} \ | |
839 | - ${ISCCFGLIBS} @LIBS@ | |
840 | + ${ISCCFGLIBS} @IDNLIBS@ @LIBS@ | |
841 | ||
842 | SUBDIRS = | |
843 | Index: bin/dig/dig.1 | |
844 | =================================================================== | |
845 | RCS file: /proj/cvs/prod/bind9/bin/dig/dig.1,v | |
846 | retrieving revision 1.14.2.4.2.6 | |
847 | diff -U2 -r1.14.2.4.2.6 dig.1 | |
848 | --- bin/dig/dig.1 23 Jun 2004 09:11:01 -0000 1.14.2.4.2.6 | |
849 | +++ bin/dig/dig.1 1 Sep 2004 07:49:54 -0000 | |
850 | @@ -386,4 +386,15 @@ | |
851 | will not print the initial query when it looks up the NS records for | |
852 | isc.org. | |
853 | +.SH "IDN SUPPORT" | |
854 | +.PP | |
855 | +If \fBdig\fR has been built with IDN (internationalized | |
856 | +domain name) support, it can accept and display non-ASCII domain names. | |
857 | +\fBdig\fR appropriately converts character encoding of | |
858 | +domain name before sending a request to DNS server or displaying a | |
859 | +reply from the server. | |
860 | +If you'd like to turn off the IDN support for some reason, defines | |
861 | +the \fBIDN_DISABLE\fR environment variable. | |
862 | +The IDN support is disabled if the the variable is set when | |
863 | +\fBdig\fR runs. | |
864 | .SH "FILES" | |
865 | .PP | |
866 | Index: bin/dig/dig.docbook | |
867 | =================================================================== | |
868 | RCS file: /proj/cvs/prod/bind9/bin/dig/dig.docbook,v | |
869 | retrieving revision 1.4.2.7.4.9 | |
870 | diff -U2 -r1.4.2.7.4.9 dig.docbook | |
871 | --- bin/dig/dig.docbook 23 Jun 2004 04:19:41 -0000 1.4.2.7.4.9 | |
872 | +++ bin/dig/dig.docbook 1 Sep 2004 07:49:57 -0000 | |
873 | @@ -578,4 +578,19 @@ | |
874 | ||
875 | <refsect1> | |
876 | +<title>IDN SUPPORT</title> | |
877 | +<para> | |
878 | +If <command>dig</command> has been built with IDN (internationalized | |
879 | +domain name) support, it can accept and display non-ASCII domain names. | |
880 | +<command>dig</command> appropriately converts character encoding of | |
881 | +domain name before sending a request to DNS server or displaying a | |
882 | +reply from the server. | |
883 | +If you'd like to turn off the IDN support for some reason, defines | |
884 | +the <envar>IDN_DISABLE</envar> environment variable. | |
885 | +The IDN support is disabled if the the variable is set when | |
886 | +<command>dig</command> runs. | |
887 | +</para> | |
888 | +</refsect1> | |
889 | + | |
890 | +<refsect1> | |
891 | <title>FILES</title> | |
892 | <para> | |
893 | Index: bin/dig/dighost.c | |
894 | =================================================================== | |
895 | RCS file: /proj/cvs/prod/bind9/bin/dig/dighost.c,v | |
896 | retrieving revision 1.221.2.19.2.14 | |
897 | diff -U2 -r1.221.2.19.2.14 dighost.c | |
898 | --- bin/dig/dighost.c 30 Jun 2004 23:57:52 -0000 1.221.2.19.2.14 | |
899 | +++ bin/dig/dighost.c 1 Sep 2004 07:50:24 -0000 | |
900 | @@ -33,4 +33,15 @@ | |
901 | #include <limits.h> | |
902 | ||
903 | +#ifdef HAVE_LOCALE_H | |
904 | +#include <locale.h> | |
905 | +#endif | |
906 | + | |
907 | +#ifdef WITH_IDN | |
908 | +#include <idn/result.h> | |
909 | +#include <idn/log.h> | |
910 | +#include <idn/resconf.h> | |
911 | +#include <idn/api.h> | |
912 | +#endif | |
913 | + | |
914 | #include <dns/byaddr.h> | |
915 | #ifdef DIG_SIGCHASE | |
916 | @@ -120,4 +131,16 @@ | |
917 | int lookup_counter = 0; | |
918 | ||
919 | +#ifdef WITH_IDN | |
920 | +static void initialize_idn(void); | |
921 | +static isc_result_t output_filter(isc_buffer_t *buffer, | |
922 | + unsigned int used_org, | |
923 | + isc_boolean_t absolute); | |
924 | +static idn_result_t append_textname(char *name, const char *origin, | |
925 | + size_t namesize); | |
926 | +static void idn_check_result(idn_result_t r, const char *msg); | |
927 | + | |
928 | +#define MAXDLEN 256 | |
929 | +#endif | |
930 | + | |
931 | /* | |
932 | * Exit Codes: | |
933 | @@ -956,4 +979,8 @@ | |
934 | copy_server_list(lwconf, &server_list); | |
935 | ||
936 | +#ifdef WITH_IDN | |
937 | + initialize_idn(); | |
938 | +#endif | |
939 | + | |
940 | if (keyfile[0] != 0) | |
941 | setup_file_key(); | |
942 | @@ -1568,4 +1595,12 @@ | |
943 | dns_compress_t cctx; | |
944 | char store[MXNAME]; | |
945 | +#ifdef WITH_IDN | |
946 | + idn_result_t mr; | |
947 | + char utf8_textname[MXNAME], utf8_origin[MXNAME], idn_textname[MXNAME]; | |
948 | +#endif | |
949 | + | |
950 | +#ifdef WITH_IDN | |
951 | + dns_name_settotextfilter(output_filter); | |
952 | +#endif | |
953 | ||
954 | REQUIRE(lookup != NULL); | |
955 | @@ -1596,4 +1631,15 @@ | |
956 | sizeof(lookup->onamespace)); | |
957 | ||
958 | +#ifdef WITH_IDN | |
959 | + /* | |
960 | + * We cannot convert `textname' and `origin' separately. | |
961 | + * `textname' doesn't contain TLD, but local mapping needs | |
962 | + * TLD. | |
963 | + */ | |
964 | + mr = idn_encodename(IDN_LOCALCONV | IDN_DELIMMAP, lookup->textname, | |
965 | + utf8_textname, sizeof(utf8_textname)); | |
966 | + idn_check_result(mr, "convert textname to UTF-8"); | |
967 | +#endif | |
968 | + | |
969 | /* | |
970 | * If the name has too many dots, force the origin to be NULL | |
971 | @@ -1604,4 +1650,11 @@ | |
972 | */ | |
973 | /* XXX New search here? */ | |
974 | +#ifdef WITH_IDN | |
975 | + if ((count_dots(utf8_textname) >= ndots) || !usesearch) | |
976 | + lookup->origin = NULL; /* Force abs lookup */ | |
977 | + else if (lookup->origin == NULL && lookup->new_search && usesearch) { | |
978 | + lookup->origin = ISC_LIST_HEAD(search_list); | |
979 | + } | |
980 | +#else | |
981 | if ((count_dots(lookup->textname) >= ndots) || !usesearch) | |
982 | lookup->origin = NULL; /* Force abs lookup */ | |
983 | @@ -1609,5 +1662,27 @@ | |
984 | lookup->origin = ISC_LIST_HEAD(search_list); | |
985 | } | |
986 | +#endif | |
987 | + | |
988 | +#ifdef WITH_IDN | |
989 | + if (lookup->origin != NULL) { | |
990 | + mr = idn_encodename(IDN_LOCALCONV | IDN_DELIMMAP, | |
991 | + lookup->origin->origin, utf8_origin, | |
992 | + sizeof(utf8_origin)); | |
993 | + idn_check_result(mr, "convert origin to UTF-8"); | |
994 | + mr = append_textname(utf8_textname, utf8_origin, | |
995 | + sizeof(utf8_textname)); | |
996 | + idn_check_result(mr, "append origin to textname"); | |
997 | + } | |
39931380 | 998 | + mr = idn_encodename(IDN_LOCALMAP | IDN_NAMEPREP | |
c722a4ac | 999 | + IDN_IDNCONV | IDN_LENCHECK, utf8_textname, |
1000 | + idn_textname, sizeof(idn_textname)); | |
1001 | + idn_check_result(mr, "convert UTF-8 textname to IDN encoding"); | |
1002 | +#endif | |
1003 | + | |
1004 | +#ifdef WITH_IDN | |
1005 | + if (0) { | |
1006 | +#else | |
1007 | if (lookup->origin != NULL) { | |
1008 | +#endif | |
1009 | debug("trying origin %s", lookup->origin->origin); | |
1010 | result = dns_message_gettempname(lookup->sendmsg, | |
1011 | @@ -1654,4 +1729,13 @@ | |
1012 | dns_name_clone(dns_rootname, lookup->name); | |
1013 | else { | |
1014 | +#ifdef WITH_IDN | |
1015 | + len = strlen(idn_textname); | |
1016 | + isc_buffer_init(&b, idn_textname, len); | |
1017 | + isc_buffer_add(&b, len); | |
1018 | + result = dns_name_fromtext(lookup->name, &b, | |
1019 | + dns_rootname, | |
1020 | + ISC_FALSE, | |
1021 | + &lookup->namebuf); | |
1022 | +#else | |
1023 | len = strlen(lookup->textname); | |
1024 | isc_buffer_init(&b, lookup->textname, len); | |
1025 | @@ -1661,4 +1745,5 @@ | |
1026 | ISC_FALSE, | |
1027 | &lookup->namebuf); | |
1028 | +#endif | |
1029 | } | |
1030 | if (result != ISC_R_SUCCESS) { | |
1031 | @@ -3165,4 +3250,102 @@ | |
1032 | isc_mem_destroy(&mctx); | |
1033 | } | |
1034 | + | |
1035 | +#ifdef WITH_IDN | |
1036 | +static void | |
1037 | +initialize_idn(void) { | |
1038 | + idn_result_t r; | |
1039 | + | |
1040 | +#ifdef HAVE_SETLOCALE | |
1041 | + /* Set locale */ | |
1042 | + (void)setlocale(LC_ALL, ""); | |
1043 | +#endif | |
1044 | + /* Create configuration context. */ | |
1045 | + r = idn_nameinit(1); | |
1046 | + if (r != idn_success) | |
1047 | + fatal("idn api initialization failed: %s", | |
1048 | + idn_result_tostring(r)); | |
1049 | + | |
1050 | + /* Set domain name -> text post-conversion filter. */ | |
1051 | + dns_name_settotextfilter(output_filter); | |
1052 | +} | |
1053 | + | |
1054 | +static isc_result_t | |
1055 | +output_filter(isc_buffer_t *buffer, unsigned int used_org, | |
1056 | + isc_boolean_t absolute) | |
1057 | +{ | |
1058 | + char tmp1[MAXDLEN], tmp2[MAXDLEN]; | |
1059 | + size_t fromlen, tolen; | |
1060 | + isc_boolean_t end_with_dot; | |
1061 | + | |
1062 | + /* | |
1063 | + * Copy contents of 'buffer' to 'tmp1', supply trailing dot | |
1064 | + * if 'absolute' is true, and terminate with NUL. | |
1065 | + */ | |
1066 | + fromlen = isc_buffer_usedlength(buffer) - used_org; | |
1067 | + if (fromlen >= MAXDLEN) | |
1068 | + return (ISC_R_SUCCESS); | |
1069 | + memcpy(tmp1, (char *)isc_buffer_base(buffer) + used_org, fromlen); | |
1070 | + end_with_dot = (tmp1[fromlen - 1] == '.') ? ISC_TRUE : ISC_FALSE; | |
1071 | + if (absolute && !end_with_dot) { | |
1072 | + fromlen++; | |
1073 | + if (fromlen >= MAXDLEN) | |
1074 | + return (ISC_R_SUCCESS); | |
1075 | + tmp1[fromlen - 1] = '.'; | |
1076 | + } | |
1077 | + tmp1[fromlen] = '\0'; | |
1078 | + | |
1079 | + /* | |
1080 | + * Convert contents of 'tmp1' to local encoding. | |
1081 | + */ | |
1082 | + if (idn_decodename(IDN_DECODE_APP, tmp1, tmp2, MAXDLEN) != idn_success) | |
1083 | + return (ISC_R_SUCCESS); | |
1084 | + strcpy(tmp1, tmp2); | |
1085 | + | |
1086 | + /* | |
1087 | + * Copy the converted contents in 'tmp1' back to 'buffer'. | |
1088 | + * If we have appended trailing dot, remove it. | |
1089 | + */ | |
1090 | + tolen = strlen(tmp1); | |
1091 | + if (absolute && !end_with_dot && tmp1[tolen - 1] == '.') | |
1092 | + tolen--; | |
1093 | + | |
1094 | + if (isc_buffer_length(buffer) < used_org + tolen) | |
1095 | + return (ISC_R_NOSPACE); | |
1096 | + | |
1097 | + isc_buffer_subtract(buffer, isc_buffer_usedlength(buffer) - used_org); | |
1098 | + memcpy(isc_buffer_used(buffer), tmp1, tolen); | |
1099 | + isc_buffer_add(buffer, tolen); | |
1100 | + | |
1101 | + return (ISC_R_SUCCESS); | |
1102 | +} | |
1103 | + | |
1104 | +static idn_result_t | |
1105 | +append_textname(char *name, const char *origin, size_t namesize) { | |
1106 | + size_t namelen = strlen(name); | |
1107 | + size_t originlen = strlen(origin); | |
5c962666 | 1108 | + |
c722a4ac | 1109 | + /* Already absolute? */ |
1110 | + if (namelen > 0 && name[namelen - 1] == '.') | |
1111 | + return idn_success; | |
5c962666 | 1112 | + |
c722a4ac | 1113 | + /* Append dot and origin */ |
5c962666 | 1114 | + |
c722a4ac | 1115 | + if (namelen + 1 + originlen >= namesize) |
1116 | + return idn_buffer_overflow; | |
5c962666 | 1117 | + |
c722a4ac | 1118 | + name[namelen++] = '.'; |
1119 | + (void)strcpy(name + namelen, origin); | |
1120 | + return idn_success; | |
1121 | +} | |
1122 | + | |
1123 | +static void | |
1124 | +idn_check_result(idn_result_t r, const char *msg) { | |
1125 | + if (r != idn_success) { | |
1126 | + exitcode = 1; | |
1127 | + fatal("%s: %s", msg, idn_result_tostring(r)); | |
1128 | + } | |
1129 | +} | |
5c962666 | 1130 | + |
5c962666 | 1131 | +#endif /* WITH_IDN */ |
c722a4ac | 1132 | |
1133 | ||
1134 | Index: bin/dig/host.1 | |
1135 | =================================================================== | |
1136 | RCS file: /proj/cvs/prod/bind9/bin/dig/host.1,v | |
1137 | retrieving revision 1.11.2.1.4.4 | |
1138 | diff -U2 -r1.11.2.1.4.4 host.1 | |
1139 | --- bin/dig/host.1 13 Apr 2004 04:11:03 -0000 1.11.2.1.4.4 | |
1140 | +++ bin/dig/host.1 1 Sep 2004 07:50:24 -0000 | |
1141 | @@ -128,4 +128,15 @@ | |
1142 | will be set to the number of seconds given by the hardware's maximum | |
1143 | value for an integer quantity. | |
1144 | +.SH "IDN SUPPORT" | |
1145 | +.PP | |
1146 | +If \fBhost\fR has been built with IDN (internationalized | |
1147 | +domain name) support, it can accept and display non-ASCII domain names. | |
1148 | +\fBhost\fR appropriately converts character encoding of | |
1149 | +domain name before sending a request to DNS server or displaying a | |
1150 | +reply from the server. | |
1151 | +If you'd like to turn off the IDN support for some reason, defines | |
1152 | +the \fBIDN_DISABLE\fR environment variable. | |
1153 | +The IDN support is disabled if the the variable is set when | |
1154 | +\fBhost\fR runs. | |
1155 | .SH "FILES" | |
1156 | .PP | |
1157 | Index: bin/dig/host.docbook | |
1158 | =================================================================== | |
1159 | RCS file: /proj/cvs/prod/bind9/bin/dig/host.docbook,v | |
1160 | retrieving revision 1.2.2.2.4.5 | |
1161 | diff -U2 -r1.2.2.2.4.5 host.docbook | |
1162 | --- bin/dig/host.docbook 13 Apr 2004 01:26:26 -0000 1.2.2.2.4.5 | |
1163 | +++ bin/dig/host.docbook 1 Sep 2004 07:50:27 -0000 | |
1164 | @@ -192,4 +192,19 @@ | |
1165 | ||
1166 | <refsect1> | |
1167 | +<title>IDN SUPPORT</title> | |
1168 | +<para> | |
1169 | +If <command>host</command> has been built with IDN (internationalized | |
1170 | +domain name) support, it can accept and display non-ASCII domain names. | |
1171 | +<command>host</command> appropriately converts character encoding of | |
1172 | +domain name before sending a request to DNS server or displaying a | |
1173 | +reply from the server. | |
1174 | +If you'd like to turn off the IDN support for some reason, defines | |
1175 | +the <envar>IDN_DISABLE</envar> environment variable. | |
1176 | +The IDN support is disabled if the the variable is set when | |
1177 | +<command>host</command> runs. | |
1178 | +</para> | |
1179 | +</refsect1> | |
5c962666 | 1180 | + |
c722a4ac | 1181 | +<refsect1> |
1182 | <title>FILES</title> | |
1183 | <para> | |
1184 | Index: lib/dns/name.c | |
1185 | =================================================================== | |
1186 | RCS file: /proj/cvs/prod/bind9/lib/dns/name.c,v | |
1187 | retrieving revision 1.127.2.7.2.11 | |
1188 | diff -U2 -r1.127.2.7.2.11 name.c | |
1189 | --- lib/dns/name.c 1 Sep 2004 05:19:59 -0000 1.127.2.7.2.11 | |
1190 | +++ lib/dns/name.c 1 Sep 2004 07:50:35 -0000 | |
1191 | @@ -183,4 +183,11 @@ | |
1192 | dns_fullname_hash(dns_name_t *name, isc_boolean_t case_sensitive); | |
5c962666 AM |
1193 | |
1194 | +#ifdef WITH_IDN | |
1195 | +/* | |
1196 | + * dns_name_t to text post-conversion procedure. | |
1197 | + */ | |
1198 | +static dns_name_totextfilter_t totext_filter_proc = NULL; | |
1199 | +#endif | |
1200 | + | |
1201 | static void | |
1202 | set_offsets(const dns_name_t *name, unsigned char *offsets, | |
c722a4ac | 1203 | @@ -1208,4 +1215,7 @@ |
5c962666 AM |
1204 | unsigned int labels; |
1205 | isc_boolean_t saw_root = ISC_FALSE; | |
5c962666 AM |
1206 | +#ifdef WITH_IDN |
1207 | + unsigned int oused = target->used; | |
1208 | +#endif | |
1209 | ||
1210 | /* | |
c722a4ac | 1211 | @@ -1346,4 +1356,9 @@ |
5c962666 AM |
1212 | isc_buffer_add(target, tlen - trem); |
1213 | ||
1214 | +#ifdef WITH_IDN | |
1215 | + if (totext_filter_proc != NULL) | |
1216 | + return ((*totext_filter_proc)(target, oused, saw_root)); | |
1217 | +#endif | |
c722a4ac | 1218 | + |
5c962666 AM |
1219 | return (ISC_R_SUCCESS); |
1220 | } | |
c722a4ac | 1221 | @@ -2201,2 +2216,8 @@ |
5c962666 AM |
1222 | } |
1223 | ||
1224 | +#ifdef WITH_IDN | |
1225 | +void | |
1226 | +dns_name_settotextfilter(dns_name_totextfilter_t proc) { | |
1227 | + totext_filter_proc = proc; | |
1228 | +} | |
1229 | +#endif | |
c722a4ac | 1230 | Index: lib/dns/include/dns/name.h |
1231 | =================================================================== | |
1232 | RCS file: /proj/cvs/prod/bind9/lib/dns/include/dns/name.h,v | |
1233 | retrieving revision 1.95.2.3.2.11 | |
1234 | diff -U2 -r1.95.2.3.2.11 name.h | |
1235 | --- lib/dns/include/dns/name.h 1 Sep 2004 05:19:59 -0000 1.95.2.3.2.11 | |
1236 | +++ lib/dns/include/dns/name.h 1 Sep 2004 07:50:41 -0000 | |
1237 | @@ -156,4 +156,15 @@ | |
1238 | #define DNS_NAME_MAXWIRE 255 | |
1239 | ||
1240 | +#ifdef WITH_IDN | |
1241 | +/* | |
1242 | + * Text output filter procedure. | |
1243 | + * 'target' is the buffer to be converted. The region to be converted | |
1244 | + * is from 'buffer'->base + 'used_org' to the end of the used region. | |
1245 | + */ | |
1246 | +typedef isc_result_t (*dns_name_totextfilter_t)(isc_buffer_t *target, | |
1247 | + unsigned int used_org, | |
1248 | + isc_boolean_t absolute); | |
1249 | +#endif | |
5c962666 | 1250 | + |
c722a4ac | 1251 | /*** |
1252 | *** Initialization | |
1253 | @@ -1115,4 +1126,12 @@ | |
1254 | * | |
1255 | */ | |
5c962666 | 1256 | + |
c722a4ac | 1257 | +#ifdef WITH_IDN |
1258 | +void | |
1259 | +dns_name_settotextfilter(dns_name_totextfilter_t proc); | |
1260 | +/* | |
1261 | + * Call 'proc' at the end of dns_name_totext. | |
1262 | + */ | |
1263 | +#endif /* WITH_IDN */ | |
1264 | ||
1265 | #define DNS_NAME_FORMATSIZE (DNS_NAME_MAXTEXT + 1) |