792N/A
792N/A idnkit
1356N/A Compilation and Installation
792N/A Japan Network Information Center (JPNIC)
1597N/A
792N/A
792N/AThis file explains how to compile and install the source package.
919N/AThese procedures take the following steps:
919N/A
919N/A + Prerequisite: making iconv() available
919N/A + System Configuration: running `configure' script
919N/A + Compilation: running `make'
919N/A + Test: running `make test' (optional)
919N/A + Installation: running `make install'
919N/A + Site Configuration: tailoring `idn.conf'
919N/A + Configuration Check (optional)
919N/A + Clean up (optional)
919N/A
919N/ASee also the following section if you'd like to apply patch and install
919N/ABIND9.
919N/A
919N/A + Applying patches
919N/A
919N/A0. Prerequisite
792N/A
792N/AIf you want to install generic idnkit library with code conversion
792N/Asupport, and also if your system's library does not have iconv()
792N/Afunction, which is a general codeset conversion utility, install iconv
792N/Aas an external library. You also need external library if the
792N/Asystem's implementation cannot handle UTF-8 encoding, or it doesn't
970N/Asupport some encodings which your client applications uses.
970N/A
970N/AYou can get a free version of iconv() implementation (under LGPL
1356N/Alicense, aka GNU libiconv) from:
970N/A
792N/A ftp://ftp.gnu.org/gnu/libiconv/
792N/A and mirrors of that site.
792N/A
911N/ABut if you don't want code conversion support and you want to install
911N/Aidnkitlite library without iconv support alone, you have not install
911N/Aexternal library. Instead, set `--enable-liteonly' value to "yes" at
911N/Aconfigure script execution.
792N/A
792N/A
792N/A1. Running configure script
1141N/A
1141N/ARun `configure' script in the top directory. This checks various
1425N/Acharacteristics of your system and it will create Makefiles and
1199N/Aconfig.h appropriate for your system.
792N/A
930N/A % ./configure
924N/A
1440N/A`configure' accepts many options. Here is a list of some important
1508N/Aoptions.
1508N/A
792N/A --prefix=PREFIX
1199N/A Specifies the prefix of install directories of idnkit. The
1199N/A default is /usr/local.
1199N/A
792N/A --enable-runidn
792N/A Build `runidn' command. The default is "no".
792N/A
1610N/A You cannot set this option "yes" when `--enable-liteonly' is
792N/A also set "yes".
792N/A
792N/A --with-libiconv=LIBICONV_PREFIX
792N/A If you have installed GNU libiconv and would like to link it
1199N/A to idnkit, specify this option. The argument LIBICONV_PREFIX
792N/A is install prefix of GNU libiconv. If the argument is omitted,
792N/A PREFIX (derived from --prefix=PREFIX option) is assumed.
1597N/A
792N/A --with-libiconv is shorthand option for GNU libiconv.
792N/A
792N/A --with-libiconv=/usr/local
1610N/A
1199N/A This is equivalent to:
1199N/A
1199N/A --with-iconv-include='-I/usr/local/include'
1197N/A --with-iconv='-L/usr/local/lib -R/usr/local/lib -liconv'
1197N/A
792N/A If both the shorthand option (--with-libiconv) and longhand
1196N/A options (--with-iconv-include and/or --with-iconv) are specified,
1196N/A the longhand options have priority.
1425N/A
1425N/A You cannot set this option when --enable-liteonly is set
1425N/A "yes", because libidnkitlite library doesn't need iconv
1196N/A support.
792N/A
792N/A --with-iconv-include=ICONV_INCDIR
792N/A If the header file "iconv.h" resides in a directory where your
792N/A C compiler doesn't search by default, specify the directory as
1097N/A DIR like this:
1097N/A
1097N/A --with-iconv-include=/usr/local/include
792N/A
792N/A You cannot set this option when `--enable-liteonly' is set
792N/A "yes", because libidnkitlite library doesn't need iconv
792N/A support.
792N/A
792N/A --with-iconv=ICONV_LIB
792N/A If your libc doesn't contain iconv(), specify the library
792N/A that contains iconv(). For example, if iconv() is libiconv
792N/A in /usr/local/lib, you should specify:
792N/A
792N/A --with-iconv="-L/usr/local/lib -liconv"
792N/A
792N/A Note that if the library is a shared one, you might also want
1466N/A to specify -R option, like:
1466N/A
1466N/A --with-iconv="-L/usr/local/lib -R/usr/local/lib -liconv"
1466N/A
792N/A You cannot set this option when `--enable-liteonly' is set
792N/A "yes", because libidnkitlite library doesn't need iconv
792N/A support.
1466N/A
792N/A --with-iconv-sofile=SOFILE_PATH
792N/A The runidn command in this kit needs to know the pathname of
792N/A shared library file that contains iconv(), if iconv() is not
792N/A part of libc. idnkit tries to find out the pathname from the
792N/A informaiton provided by `--with-iconv' option described above.
792N/A But when it fails, you have to specify it with this option,
792N/A like:
792N/A
792N/A --with-iconv-sofile=/usr/local/lib/libiconv.so.2.0
792N/A
1466N/A You cannot set this option when `--enable-liteonly' is set
792N/A "yes", because libidnkitlite library doesn't need iconv
792N/A support.
1466N/A
792N/A --with-utf8=UTF8_NAME
792N/A If your iconv() (precisely, iconv_open()) does not accept
1466N/A "UTF-8" as the name of UTF-8 encoding, specify the name for
792N/A it. For example if your iconv() uses "utf8" instead, you
1466N/A should specify:
792N/A
967N/A --with-utf8=utf8
1466N/A
1466N/A
1466N/A2. Other configure options
1466N/A
1466N/AThe configure script has many other options though they are not widely
1466N/Aused:
792N/A
1466N/A --exec-prefix=EXEC_PREFIX
792N/A Specifies the prefix of install directories for machine-specific
792N/A files. The default is PREFIX (derived from `--prefix=PREFIX'
792N/A and its default is /usr/local).
--bindir=BINDIR
Specifies the install directory for idnconv and runidn.
The default is EXEC_PREFIX/bin.
--libdir=LIBDIR
Specifies the install directory for the libraries (libidnkit
and libidnkitlite). The default is EXEC_PREFIX/lib.
--includedir=INCDIR
Specifies the install directory for the header files of the
libraries. The default is PREFIX/include.
--sysconfdir=SYSCONFDIR
Specifies the install directory for sample configuration files
of the libraries. The default is PREFIX/etc.
--mandir=MANDIR
Specifies the base install directory for online manuals.
The default is PREFIX/man.
--datadir=DATADIR
Specifies the base install directory for machine independent
data files. The default is PREFIX/share. Some data files for
idnkit will be put under the DATADIR/idnkit directory.
--enable-debug
Enable debugging codes. The fault is "no".
--enable-shared
Build shared library. The fault is "yes".
--enable-static
Build static library. The fault is "yes".
--enable-liteonly
Build the `libidnlkitite' library only. Do not build the
`libidnkit' library, idnconv and runidn. The fault is "no".
If you want to set "yes" to this option, you cannot specify it
together with `--enable-runidn', `--with-libiconv',
`--with-iconv-include', `--with-iconv' or `--with-iconv-sofile'.
To see the list of available options, you should run it with --help
option.
% ./configure --help
3. Compiling
Run `make' for compilation.
% make
4. Test
Optionally, type `make test' to compile and run test programs.
Note that Perl 5 is required for comipilation of the test programs.
% make test
The test programs assume that iconv() on the system recognizes the
encoding name "EUC-JP" as Japanese EUC, and "SJIS" as Japanese Shift
JIS. If iconv() on the system doesn't support the encoding name,
please edit `lib/tests/codeset.h' before `make test'.
*Note*
If you use standard iconv which is attached as default on Solaris,
converter's test "idn_converter_convfromucs4()" may fail. But it's
not the problem because the result is derived from the difference of
specification of iconv. So please ignore it if you run the test on
Solaris.
5. Installation
Run `make install' to install binaries and manuals. Don't forget to
become a super-user before the installation.
% su
# make install
*Note*
If you have installed pre-release versions of idnkit (such as 1.0pr1),
idnkit-1.0 may not work correctly because of the old configuration
file 'idn.conf'. If this is the case, you should overwrite existing
configuration files with the new ones by executing the following command
after 'make install'.
# make install-config
6. Configuration and usage
Edit the `idn.conf' configuation file if you'd like to cosutomize
conversion/normalization rules of idnkit. Please refer the manual
for `idn.conf' for details. A sample configuration (`idn.conf.sample')
is also provided for your convenience.
The sample configuration file has also been installed as `idn.conf'
if it has not exist on your system.
Also online manuals for `idnconv' and `runidn' commands are available.
Please refer them for the usage and configuration of these commands.
% man idn.conf
% man idnconv
% man runidn
7. Check your configuration
A simple shell script `idnslookup' is available in the directory
`tools/idnconv', with which you can make queries for internationalized
domain names. It may help you check your configuration.
The usage of `idnslookup' is:
% tools/idnconv/idnslookup <domain-name> <dns-server>
Suppose that <domain-name> is an internationalized domain name written
in the local codeset (see ``LOCAL CODESET'' in the `idn.conf' man page
for details), and <dns-server> is a hostname or IP address of DNS
server.
`idnslookup' inquires <idn-domain-name> from <dns-server>, using
`idnconv' and `nslookup' commands. If something is wrong, you will
see an error message output by `idnconv', `nslookup' or `idnslookup'
itself.
8. Clean up
Run `make clean' to delete files generated by `make' and `make test'
from the idnkit source directory. (Files installed by `make install'
are not removed.)
% make clean
Run `make distclean' instead to also delete files generated by
`configure'.
% make distclean
After `make distclean', you can run `configure' and compile idnkit for
another system using the source directory.
Appendix A. Applying patches
This distribution also contains patches for BIND9.
The top of these patch files describe how to apply the patch and
(re)install.
Note that on Solaris, "patch" command that comes with the system
sometimes doesn't work correctly. You may want to install the GNU
version of the command (http://www.gnu.org/software/patch/) and use
it.
; $Id: INSTALL,v 1.1 2003/06/04 00:24:59 marka Exp $