1 Libidn libc/README -- Instructions for building as a GNU Libc add-on.
2 Copyright (C) 2003, 2004 Simon Josefsson
3 See the end for copying conditions.
5 GNU Libidn can be built into GNU Libc if you follow these
6 instructions. Note that you should not run configure in Libidn.
10 $ tar xfz glibc-2.3.2.tar.gz # and glibc-linuxthreads if you need it
14 $ tar xfz ~/libidn-0.4.1.tar.gz
16 3) Set up the Libidn add-on inside the Libc directory:
18 $ perl -pi -e 's/idn-int.h/stdint.h/' libidn-0.4.1/lib/{idna,stringprep,punycode}.h
19 $ cp -r libidn-0.4.1/lib glibc-2.3.2/libidn
20 $ cp libidn-0.4.1/libc/* glibc-2.3.2/libidn/
21 $ cp libidn-0.4.1/libc/getaddrinfo.c glibc-2.3.2/sysdeps/posix/
22 $ cp libidn-0.4.1/libc/netdb.h glibc-2.3.2/resolv/
24 4) Configure and build Libc with the Libidn add-on:
26 $ mkdir glibc-2.3.2-obj
28 $ ../glibc-2.3.2/configure --enable-add-ons=linuxthreads,libidn \
29 --prefix=/usr/local/glibc
34 $ cd ../glibc-2.3.2/libidn/libc
35 $ gcc -o example example.c -L/usr/local/glibc/lib -Wl,-rpath,/usr/local/glibc/lib -nostdinc -I/usr/local/glibc/include -I/usr/include -I/usr/lib/gcc-lib/i386-linux/2.95.4/include
36 $ CHARSET=iso-8859-1 ./example
37 locale charset `iso-8859-1'
38 gettaddrinfo(räksmörgås.josefsson.org):
39 address `217.13.230.178'
40 canonical name `178.230.13.217.in-addr.dgcsystems.net'
43 Internally the domain name xn--rksmrgs-5wao1o.josefsson.org is looked
46 The file libc.patch in this directory contains the modifications made
47 to getaddrinfo.c and netdb.h, should you wish to try this with another
48 GNU Libc version. With minor modifications, it has been verified to
51 ----------------------------------------------------------------------
52 Copying and distribution of this file, with or without modification,
53 are permitted in any medium without royalty provided the copyright
54 notice and this notice are preserved.