5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews Compilation and Installation
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews Japan Network Information Center (JPNIC)
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsThis file explains how to compile and install the source package.
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsThese procedures take the following steps:
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews + Prerequisite: making iconv() available
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews + System Configuration: running `configure' script
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews + Compilation: running `make'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews + Test: running `make test' (optional)
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews + Installation: running `make install'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews + Site Configuration: tailoring `idn.conf'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews + Configuration Check (optional)
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews + Clean up (optional)
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsSee also the following section if you'd like to apply patch and install
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews + Applying patches
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews0. Prerequisite
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsIf you want to install generic idnkit library with code conversion
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewssupport, and also if your system's library does not have iconv()
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsfunction, which is a general codeset conversion utility, install iconv
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsas an external library. You also need external library if the
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewssystem's implementation cannot handle UTF-8 encoding, or it doesn't
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewssupport some encodings which your client applications uses.
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsYou can get a free version of iconv() implementation (under LGPL
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewslicense, aka GNU libiconv) from:
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews and mirrors of that site.
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsBut if you don't want code conversion support and you want to install
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsidnkitlite library without iconv support alone, you have not install
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsexternal library. Instead, set `--enable-liteonly' value to "yes" at
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsconfigure script execution.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews1. Running configure script
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsRun `configure' script in the top directory. This checks various
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewscharacteristics of your system and it will create Makefiles and
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsconfig.h appropriate for your system.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews % ./configure
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews`configure' accepts many options. Here is a list of some important
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews --prefix=PREFIX
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews Specifies the prefix of install directories of idnkit. The
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews --enable-runidn
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews Build `runidn' command. The default is "no".
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews You cannot set this option "yes" when `--enable-liteonly' is
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews also set "yes".
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews --with-libiconv=LIBICONV_PREFIX
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews If you have installed GNU libiconv and would like to link it
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews to idnkit, specify this option. The argument LIBICONV_PREFIX
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews is install prefix of GNU libiconv. If the argument is omitted,
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews PREFIX (derived from --prefix=PREFIX option) is assumed.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews --with-libiconv is shorthand option for GNU libiconv.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews --with-libiconv=/usr/local
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews This is equivalent to:
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews --with-iconv-include='-I/usr/local/include'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews --with-iconv='-L/usr/local/lib -R/usr/local/lib -liconv'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews If both the shorthand option (--with-libiconv) and longhand
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews options (--with-iconv-include and/or --with-iconv) are specified,
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews the longhand options have priority.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews You cannot set this option when --enable-liteonly is set
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews "yes", because libidnkitlite library doesn't need iconv
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews --with-iconv-include=ICONV_INCDIR
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews If the header file "iconv.h" resides in a directory where your
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews C compiler doesn't search by default, specify the directory as
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews DIR like this:
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews --with-iconv-include=/usr/local/include
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews You cannot set this option when `--enable-liteonly' is set
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews "yes", because libidnkitlite library doesn't need iconv
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews --with-iconv=ICONV_LIB
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews If your libc doesn't contain iconv(), specify the library
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews that contains iconv(). For example, if iconv() is libiconv
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews in /usr/local/lib, you should specify:
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews --with-iconv="-L/usr/local/lib -liconv"
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews Note that if the library is a shared one, you might also want
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews to specify -R option, like:
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews --with-iconv="-L/usr/local/lib -R/usr/local/lib -liconv"
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews You cannot set this option when `--enable-liteonly' is set
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews "yes", because libidnkitlite library doesn't need iconv
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews --with-iconv-sofile=SOFILE_PATH
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews The runidn command in this kit needs to know the pathname of
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews shared library file that contains iconv(), if iconv() is not
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews part of libc. idnkit tries to find out the pathname from the
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews informaiton provided by `--with-iconv' option described above.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews But when it fails, you have to specify it with this option,
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews --with-iconv-sofile=/usr/local/lib/libiconv.so.2.0
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews You cannot set this option when `--enable-liteonly' is set
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews "yes", because libidnkitlite library doesn't need iconv
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews --with-utf8=UTF8_NAME
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews If your iconv() (precisely, iconv_open()) does not accept
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews "UTF-8" as the name of UTF-8 encoding, specify the name for
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews it. For example if your iconv() uses "utf8" instead, you
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews should specify:
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews --with-utf8=utf8
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews2. Other configure options
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsThe configure script has many other options though they are not widely
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews --exec-prefix=EXEC_PREFIX
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews Specifies the prefix of install directories for machine-specific
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews files. The default is PREFIX (derived from `--prefix=PREFIX'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews and its default is /usr/local).
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews --bindir=BINDIR
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews Specifies the install directory for idnconv and runidn.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews The default is EXEC_PREFIX/bin.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews --libdir=LIBDIR
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews Specifies the install directory for the libraries (libidnkit
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews and libidnkitlite). The default is EXEC_PREFIX/lib.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews --includedir=INCDIR
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews Specifies the install directory for the header files of the
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews libraries. The default is PREFIX/include.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews --sysconfdir=SYSCONFDIR
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews Specifies the install directory for sample configuration files
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews of the libraries. The default is PREFIX/etc.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews --mandir=MANDIR
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews Specifies the base install directory for online manuals.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews The default is PREFIX/man.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews --datadir=DATADIR
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews Specifies the base install directory for machine independent
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews data files. The default is PREFIX/share. Some data files for
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews idnkit will be put under the DATADIR/idnkit directory.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews --enable-debug
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews Enable debugging codes. The fault is "no".
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews --enable-shared
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews Build shared library. The fault is "yes".
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews --enable-static
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews Build static library. The fault is "yes".
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews --enable-liteonly
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews Build the `libidnlkitite' library only. Do not build the
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews `libidnkit' library, idnconv and runidn. The fault is "no".
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews If you want to set "yes" to this option, you cannot specify it
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews together with `--enable-runidn', `--with-libiconv',
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews `--with-iconv-include', `--with-iconv' or `--with-iconv-sofile'.
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsTo see the list of available options, you should run it with --help
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews % ./configure --help
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsRun `make' for compilation.
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsOptionally, type `make test' to compile and run test programs.
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsNote that Perl 5 is required for comipilation of the test programs.
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsThe test programs assume that iconv() on the system recognizes the
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsencoding name "EUC-JP" as Japanese EUC, and "SJIS" as Japanese Shift
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsJIS. If iconv() on the system doesn't support the encoding name,
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsplease edit `lib/tests/codeset.h' before `make test'.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews If you use standard iconv which is attached as default on Solaris,
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews converter's test "idn_converter_convfromucs4()" may fail. But it's
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews not the problem because the result is derived from the difference of
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews specification of iconv. So please ignore it if you run the test on
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews5. Installation
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsRun `make install' to install binaries and manuals. Don't forget to
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsbecome a super-user before the installation.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # make install
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews If you have installed pre-release versions of idnkit (such as 1.0pr1),
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews idnkit-1.0 may not work correctly because of the old configuration
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews file 'idn.conf'. If this is the case, you should overwrite existing
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews configuration files with the new ones by executing the following command
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews after 'make install'.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews # make install-config
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews6. Configuration and usage
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsEdit the `idn.conf' configuation file if you'd like to cosutomize
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsconversion/normalization rules of idnkit. Please refer the manual
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsfor `idn.conf' for details. A sample configuration (`idn.conf.sample')
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsis also provided for your convenience.
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsThe sample configuration file has also been installed as `idn.conf'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsif it has not exist on your system.
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsAlso online manuals for `idnconv' and `runidn' commands are available.
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsPlease refer them for the usage and configuration of these commands.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews % man idnconv
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews % man runidn
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews7. Check your configuration
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsA simple shell script `idnslookup' is available in the directory
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews`tools/idnconv', with which you can make queries for internationalized
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsdomain names. It may help you check your configuration.
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsThe usage of `idnslookup' is:
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews % tools/idnconv/idnslookup <domain-name> <dns-server>
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsSuppose that <domain-name> is an internationalized domain name written
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsin the local codeset (see ``LOCAL CODESET'' in the `idn.conf' man page
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsfor details), and <dns-server> is a hostname or IP address of DNS
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews`idnslookup' inquires <idn-domain-name> from <dns-server>, using
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews`idnconv' and `nslookup' commands. If something is wrong, you will
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewssee an error message output by `idnconv', `nslookup' or `idnslookup'
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsRun `make clean' to delete files generated by `make' and `make test'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsfrom the idnkit source directory. (Files installed by `make install'
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsare not removed.)
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews % make clean
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsRun `make distclean' instead to also delete files generated by
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews % make distclean
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsAfter `make distclean', you can run `configure' and compile idnkit for
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsanother system using the source directory.
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsAppendix A. Applying patches
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsThis distribution also contains patches for BIND9.
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsThe top of these patch files describe how to apply the patch and
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsNote that on Solaris, "patch" command that comes with the system
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewssometimes doesn't work correctly. You may want to install the GNU
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsversion of the command (http://www.gnu.org/software/patch/) and use
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews; $Id: INSTALL,v 1.1 2003/06/04 00:24:59 marka Exp $