1 Libidn libc/README -- Instructions for building as a GNU Libc add-on.
2 Copyright (C) 2003 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.3.0.tar.gz
16 3) Set up the Libidn add-on inside the Libc directory:
18 $ cp -r libidn-0.3.0/libc glibc-2.3.2/libidn
19 $ cp libidn-0.3.0/libc/{Makefile,configure,Banner,Versions} glibc-2.3.2/libidn/
20 $ cp libidn-0.3.0/lib/*.{c,h} glibc-2.3.2/libidn/
21 $ cp libidn-0.3.0/libc/getaddrinfo.c glibc-2.3.2/sysdeps/posix/
22 $ perl -pi -e 's/idn-int.h/stdint.h/' < libidn-0.3.0/lib/idna.h > glibc-2.3.2/include/idna.h
23 $ cp libidn-0.3.0/libc/netdb.h glibc-2.3.2/resolv/
24 $ touch glibc-2.3.2/libidn/libidn.texi
26 4) Configure and build Libc with the Libidn add-on:
28 $ mkdir glibc-2.3.2-obj
30 $ ../glibc-2.3.2/configure --enable-add-ons=linuxthreads,libidn \
31 --prefix=/usr/local/glibc
36 $ cd ../glibc-2.3.2/libidn/libc
37 $ 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
38 $ CHARSET=iso-8859-1 ./example
39 locale charset `iso-8859-1'
40 gettaddrinfo(räksmörgås.josefsson.org):
41 address `217.13.230.178'
42 canonical name `178.230.13.217.in-addr.dgcsystems.net'
45 Internally the domain name xn--rksmrgs-5wao1o.josefsson.org is looked
48 The file libc.patch in this directory contains the modifications made
49 to getaddrinfo.c and netdb.h, should you wish to try this with another
50 GNU Libc version. With minor modifications, it has been verified to
53 ----------------------------------------------------------------------
54 Copying and distribution of this file, with or without modification,
55 are permitted in any medium without royalty provided the copyright
56 notice and this notice are preserved.