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
12 2) Unpack Libidn inside the Libc directory:
15 $ tar xfz ~/libidn-0.1.12.tar.gz
16 $ mv libidn-0.1.12 libidn
18 3) Set up Libidn for building as a Libc add-on:
20 $ cp libidn/libc/Makefile libidn/libc/configure libidn/libc/Versions libidn/
21 $ cp libidn/libc/getaddrinfo.c sysdeps/posix/
22 $ cp libidn/libc/netdb.h resolv/
23 $ echo > libidn/libidn.texi
25 pi) If you are using libidn from CVS build some files at this point:
27 $ perl gen-unicode-tables.pl -decomp 3.2 UnicodeData-3.2.0.txt \
28 LineBreak-3.2.0.txt SpecialCasing-3.2.0.txt CaseFolding-3.2.0.txt \
29 CompositionExclusions-3.2.0.txt
30 $ perl gen-stringprep-tables.pl rfc3454.txt
31 $ cp stringprep.h.in stringprep.h
33 4) Configure and build Libc with the Libidn add-on:
36 $ mkdir glibc-2.3.2-obj
38 $ ../glibc-2.3.2-obj/configure --enable-add-ons=linuxthreads,libidn \
39 --prefix=/usr/local/glibc
44 $ cd ../glibc-2.3.2/libidn/libc
45 $ 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
46 $ CHARSET=iso-8859-1 ./example
47 locale charset `iso-8859-1'
48 gettaddrinfo(räksmörgås.josefsson.org):
49 address `217.13.230.178'
50 canonical name `178.230.13.217.in-addr.dgcsystems.net'
53 Internally the domain name xn--rksmrgs-5wao1o.josefsson.org is looked
56 The file libc.patch in this directory contains the modifications made
57 to getaddrinfo.c and netdb.h, should you wish to try this with another
58 GNU Libc version. With minor modifications, it has been verified to
61 ----------------------------------------------------------------------
62 Copying and distribution of this file, with or without modification,
63 are permitted in any medium without royalty provided the copyright
64 notice and this notice are preserved.