ICU-1861 icu-config man page
X-SVN-Rev: 8685
This commit is contained in:
parent
0b7bb230be
commit
61c4a9e89b
@ -2,7 +2,7 @@
|
||||
#******************************************************************************
|
||||
# Copyright (C) 1999-2002, International Business Machines
|
||||
# Corporation and others. All Rights Reserved.
|
||||
# $Revision: 1.27 $
|
||||
# $Revision: 1.28 $
|
||||
#******************************************************************************
|
||||
# This Makefile.inc is designed to be included into projects which make use
|
||||
# of the ICU.
|
||||
@ -50,11 +50,31 @@ ICULIBSUFFIX = @ICULIBSUFFIX@
|
||||
# libicuuc21.so for example.
|
||||
|
||||
# rpath links a library search path right into the binaries.
|
||||
## mh-files MUST NOT override RPATHLDFLAGS unless they provide
|
||||
## equivalent '#SH#' lines for icu-config fixup
|
||||
ENABLE_RPATH = @ENABLE_RPATH@
|
||||
ifeq ($(ENABLE_RPATH),YES)
|
||||
RPATHLDFLAGS = $(LD_RPATH)$(LD_RPATH_PRE)$(libdir)
|
||||
endif
|
||||
|
||||
#SH## icu-config version of above 'if':
|
||||
#SH#case "$ENABLE_RPATH" in
|
||||
#SH# [yY]*)
|
||||
#SH# ENABLE_RPATH=YES
|
||||
#SH# RPATHLDFLAGS="${LD_RPATH}${LD_RPATH_PRE}${libdir}"
|
||||
#SH# ;;
|
||||
#SH#
|
||||
#SH# [nN]*)
|
||||
#SH# ENABLE_RPATH=NO
|
||||
#SH# RPATHLDFLAGS=""
|
||||
#SH# ;;
|
||||
#SH#
|
||||
#SH# *)
|
||||
#SH# echo $0: Unknown --enable-rpath value ${ENABLE_RPATH} 1>&2
|
||||
#SH# exit 3
|
||||
#SH# ;;
|
||||
#SH#esac
|
||||
|
||||
|
||||
### To link your application with ICU:
|
||||
# 1. use LDFLAGS, CFLAGS, etc from above
|
||||
|
@ -1,25 +1,9 @@
|
||||
## -*-sh-*-
|
||||
## BEGIN of icu-config-bottom. $Revision: 1.2 $
|
||||
## BEGIN of icu-config-bottom. $Revision: 1.3 $
|
||||
## Copyright (c) 2002, International Business Machines Corporation and
|
||||
## others. All Rights Reserved.
|
||||
|
||||
ICUUC_FILE=${libdir}/${ICULIBS_COMMON_LIB_NAME}
|
||||
# case "$ENABLE_RPATH" in
|
||||
# [yY]*)
|
||||
# ENABLE_RPATH=YES
|
||||
# RPATH_LDFLAGS="${LD_RPATH}${LD_RPATH_PRE}${libdir}"
|
||||
# ;;
|
||||
|
||||
# [nN]*)
|
||||
# ENABLE_RPATH=NO
|
||||
# RPATH_LDFLAGS=""
|
||||
# ;;
|
||||
|
||||
# *)
|
||||
# echo $0: Unknown --enable-rpath value ${ENABLE_RPATH} 1>&2
|
||||
# exit 3
|
||||
# ;;
|
||||
# esac
|
||||
|
||||
# echo ENABLE RPATH $ENABLE_RPATH and RPATHLDFLAGS=${RPATH_LDFLAGS}
|
||||
if [ "x$PKGDATA_MODE" = "x" ]; then
|
||||
@ -46,7 +30,7 @@ allflags()
|
||||
echo " --exists Return with 0 status if ICU exists else fail"
|
||||
echo " --help, -?, --usage Print this message"
|
||||
echo " --icudata Print shortname of ICU data file (icudt21l)"
|
||||
echo " --icudata-installdir Print path to install data to - use as --install option ot pkgdata(1)"
|
||||
echo " --icudata-install-dir Print path to install data to - use as --install option to pkgdata(1)"
|
||||
echo " --icudata-mode Print default ICU pkgdata mode (dll) - use as --mode option to pkgdata(1)."
|
||||
echo " --icudatadir Print path to packaged archive data. Can set as [ICU_DATA]"
|
||||
echo " --invoke Print commands to invoke an ICU program"
|
||||
|
288
icu4c/source/config/icu-config.1.in
Normal file
288
icu4c/source/config/icu-config.1.in
Normal file
@ -0,0 +1,288 @@
|
||||
.\" Hey, Emacs! This is -*-nroff-*- you know...
|
||||
.\"
|
||||
.\" icu-config.1: manual page for the icu-config utility
|
||||
.\"
|
||||
.\" Copyright (C) 2002 IBM, Inc. and others.
|
||||
.\"
|
||||
.\" Based on Yves Arrouye's pkgdata page <yves@arrouye.net>
|
||||
.\" Modified by Steven R. Loomis <srl@jtcsv.com>.
|
||||
.\" With help from http://www.igpm.rwth-aachen.de/~albrecht/manpage.html
|
||||
|
||||
.TH ICU-CONFIG 1 "17 May 2002" "ICU MANPAGE" "ICU @VERSION@ Manual"
|
||||
.\".Dd "17 May 2002"
|
||||
.\".Dt ICU-CONFIG 1
|
||||
.\".Os
|
||||
|
||||
.SH NAME
|
||||
.B icu-config
|
||||
\- output ICU build options
|
||||
.SH SYNOPSIS
|
||||
.B icu-config
|
||||
[
|
||||
.BI "\-\-bindir"
|
||||
]
|
||||
[
|
||||
.BI "\-\-cc"
|
||||
]
|
||||
[
|
||||
.BI "\-\-cflags"
|
||||
]
|
||||
[
|
||||
.BI "\-\-cppflags"
|
||||
]
|
||||
[
|
||||
.BI "\-\-cppflags\-searchpath"
|
||||
]
|
||||
[
|
||||
.BI "\-\-cxx"
|
||||
]
|
||||
[
|
||||
.BI "\-\-cxxflags"
|
||||
]
|
||||
[
|
||||
.BI "\-\-detect\-prefix"
|
||||
]
|
||||
[
|
||||
.BI "\-\-exec\-prefix"
|
||||
]
|
||||
[
|
||||
.BI "\-\-exists"
|
||||
]
|
||||
[
|
||||
.BI "\-\-help\fP, \fB\-?\fP,\fB"
|
||||
.BI "\-\-usage"
|
||||
]
|
||||
[
|
||||
.BI "\-\-icudata"
|
||||
]
|
||||
[
|
||||
.BI "\-\-icudata\-installdir"
|
||||
]
|
||||
[
|
||||
.BI "\-\-icudata\-mode"
|
||||
]
|
||||
[
|
||||
.BI "\-\-icudatadir"
|
||||
]
|
||||
[
|
||||
.BI "\-\-invoke"
|
||||
]
|
||||
[
|
||||
.BI "\-\-invoke=" "prog"
|
||||
]
|
||||
[
|
||||
.BI "\-\-ldflags"
|
||||
]
|
||||
[
|
||||
.BI "\-\-ldflags\-layout"
|
||||
]
|
||||
[
|
||||
.BI "\-\-ldflags\-libsonly"
|
||||
]
|
||||
[
|
||||
.BI "\-\-ldflags\-searchpath"
|
||||
]
|
||||
[
|
||||
.BI "\-\-ldflags\-system"
|
||||
]
|
||||
[
|
||||
.BI "\-\-ldflags\-ustdio"
|
||||
]
|
||||
[
|
||||
.BI "\-\-mandir"
|
||||
]
|
||||
[
|
||||
.BI "\-\-prefix"
|
||||
]
|
||||
[
|
||||
.BI "\-\-prefix=" "prefix"
|
||||
]
|
||||
[
|
||||
.BI "\-\-sbindir"
|
||||
]
|
||||
[
|
||||
.BI "\-\-shared\-datadir"
|
||||
]
|
||||
[
|
||||
.BI "\-\-sysconfdir"
|
||||
]
|
||||
[
|
||||
.BI "\-\-unicode\-version"
|
||||
]
|
||||
[
|
||||
.BI "\-\-version"
|
||||
]
|
||||
[
|
||||
.BI "\-\-incfile"
|
||||
]
|
||||
|
||||
|
||||
|
||||
.SH DESCRIPTION
|
||||
.B icu-config
|
||||
simplifies the task of building and linking against ICU as compared to
|
||||
manually configuring user makefiles or equivalent. Because
|
||||
.B icu-config
|
||||
is an executable script, it also solves the problem of locating the ICU
|
||||
libraries and headers, by allowing the system PATH to locate it.
|
||||
.SH EXAMPLES
|
||||
.B icu-config
|
||||
can be used without a makefile. The command line below is sufficient for
|
||||
building a single-file c++ program against ICU. (For example, \fBicu/source/samples/props/props.cpp\fR)
|
||||
.PP
|
||||
.RS
|
||||
`icu-config --cxx --cxxflags --cppflags --ldflags` -o props props.cpp
|
||||
.RE
|
||||
.PP
|
||||
More commonly,
|
||||
.B icu-config
|
||||
will be called from within a makefile, and used to set up variables. The
|
||||
following example also builds the \fIprops\fR example.
|
||||
.PP
|
||||
.RS
|
||||
CC=$(shell icu-config --cc)
|
||||
|
||||
CXX=$(shell icu-config --cxx)
|
||||
|
||||
CPPFLAGS=$(shell icu-config --cppflags)
|
||||
|
||||
CXXFLAGS=$(shell icu-config --cxxflags)
|
||||
|
||||
LDFLAGS =$(shell icu-config --ldflags)
|
||||
|
||||
all: props
|
||||
|
||||
props.o: props.cpp
|
||||
.RE
|
||||
.PP
|
||||
make(1) will automatically use the above variables.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
.BI "\-\-bindir"
|
||||
Prints the binary (executable) directory path. Normally equivalent to 'bin'.
|
||||
ICU user-executable applications and scripts are found here.
|
||||
.TP
|
||||
.BI "\-\-cc"
|
||||
Print the C compiler used. Equivalent to the $(CC) Makefile variable.
|
||||
.TP
|
||||
.BI "\-\-cflags"
|
||||
Print the C compiler flags. Equivalent to the $(CFLAGS) Makefile variable.
|
||||
Does NOT include preprocessor directives such as include path or defined symbols. Examples include debugging (\-g) and optimization flags
|
||||
.TP
|
||||
.BI "\-\-cppflags"
|
||||
Print the C preprocessor flags. Equivalent to the $(CPPFLAGS) Makefile variable. Examples are \-I include paths and \-D define directives.
|
||||
.TP
|
||||
.BI "\-\-cppflags\-searchpath"
|
||||
Print the C preprocessor flags, as above but only \-I search paths.
|
||||
.TP
|
||||
.BI "\-\-cxx"
|
||||
Print the C++ compiler. Equivalent to the $(CXX) Makefile variable.
|
||||
.TP
|
||||
.BI "\-\-cxxflags"
|
||||
Print the C++ compiler flags. Equivalent to the $(CXXFLAGS) Makefile variable.
|
||||
.TP
|
||||
.BI "\-\-detect\-prefix"
|
||||
If ICU has been moved from its installed location, prepending this flag to
|
||||
other
|
||||
.B icu-config
|
||||
calls will attempt to locate ICU relative to where the
|
||||
.B icu-config
|
||||
script has been located. Can be used as a last-chance effort if the ICU
|
||||
install has been damaged.
|
||||
.TP
|
||||
.BI "\-\-exec\-prefix"
|
||||
Print the prefix used for executable program directories (such as bin, sbin, etc). Normally the same as the prefix.
|
||||
.TP
|
||||
.BI "\-\-exists"
|
||||
Script will return with a successful (0) status if ICU seems to be installed
|
||||
and located correctly, otherwise an error message and nonzero status will
|
||||
be displayed.
|
||||
.TP
|
||||
.BI "\-\-help\fP, \fB\-?\fP,\fB\-\-usage"
|
||||
Print a help and usage message.
|
||||
.TP
|
||||
.BI "\-\-icudata"
|
||||
Print the \fIshortname\fP of the ICU data file. This does not include any suffix such as .dat, .dll, .so, .lib, .a, etc nor does it include prefixes such as 'lib'. It may be in the form \fBlibicudt21b\fP
|
||||
.TP
|
||||
.BI "\-\-icudata\-installdir"
|
||||
Print the directory where ICU packaged data should
|
||||
be installed. Can use as pkgdata(1)'s --install option.
|
||||
.TP
|
||||
.BI "\-\-icudata\-mode"
|
||||
Print the default ICU pkgdata mode, such as dll or common. Can use as pkgdata(1)'s --mode option.
|
||||
.TP
|
||||
.BI "\-\-icudatadir"
|
||||
Print the path to packaged archive data. (should be where $ICU_DATA
|
||||
or equivalent default path points.) Will NOT point to the libdir.
|
||||
.TP
|
||||
.BI "\-\-invoke"
|
||||
If ICU is not installed in a location where the operating system will locate
|
||||
its shared libraries, this option will print out commands so as to set the
|
||||
appropriate environment variables to load ICU's shared libraries. For example,
|
||||
on many systems a variable named LD_LIBRARY_PATH or equivalent must be set.
|
||||
.TP
|
||||
.BI "\-\-invoke=" "prog"
|
||||
Same as the \fB\-\-invoke\fP option, except includes options for invoking
|
||||
a program named \fIprog\fP. If \fIprog\fP is the name of an ICU tool,
|
||||
such as genrb(1), then \fBicu-config\fP will also include the full path
|
||||
to that tool.
|
||||
.TP
|
||||
.BI "\-\-ldflags"
|
||||
Print any flags which should be passed to the linker. These may include
|
||||
-L for library search paths, and -l for including ICU libraries. By default,
|
||||
this option will attempt to link in the "common" (libicuuc) and "i18n"
|
||||
(libicui18n) libraries, as well as the data library. If additional libraries
|
||||
are required, any of the following two flags may be added in conjunction with this one,
|
||||
for example "\-\-ldflags \-\-ldflags-ustdio" if the ustdio library is required
|
||||
in addition to the standard ICU libraries.
|
||||
Equivalent to the $(LDFLAGS) Makefile variable.
|
||||
.TP
|
||||
.BI "\-\-ldflags\-layout"
|
||||
Prints the link option for the ICU layout library.
|
||||
.TP
|
||||
.BI "\-\-ldflags\-ustdio"
|
||||
Prints the link option to add the UStdio package
|
||||
.TP
|
||||
.BI "\-\-ldflags\-libsonly"
|
||||
Similar to \fI\-\-ldflags\fP but only includes the \-l options.
|
||||
.TP
|
||||
.BI "\-\-ldflags\-searchpath"
|
||||
Similar to \fI\-\-ldflags\fP but only includes the \-L search path options.
|
||||
.TP
|
||||
.BI "\-\-ldflags\-system"
|
||||
Similar to \fI\-\-ldflags\fP but only includes system libraries (such as pthreads)
|
||||
.BI "\-\-mandir"
|
||||
Prints the location of the installed ICU man pages. Normally (man)
|
||||
.TP
|
||||
.BI "\-\-prefix"
|
||||
Prints the prefix (base directory) under which the installed ICU resides.
|
||||
.TP
|
||||
.BI "\-\-prefix=" "prefix"
|
||||
Sets the ICU prefix to \fIprefix\fP for the remainder of this command line.
|
||||
Does test whether the new prefix is valid.
|
||||
.TP
|
||||
.BI "\-\-sbindir"
|
||||
Prints the location of ICU system binaries, normally (sbin)
|
||||
.TP
|
||||
.BI "\-\-shared\-datadir"
|
||||
Prints the location of ICU shared data, normally (share)
|
||||
.TP
|
||||
.BI "\-\-sysconfdir"
|
||||
Prints the location of ICU system configuration data, normally (etc)
|
||||
.TP
|
||||
.BI "\-\-unicode\-version"
|
||||
Prints the Version of the Unicode Standard which the current ICU uses.
|
||||
.TP
|
||||
.BI "\-\-version"
|
||||
Prints the current version of ICU.
|
||||
.TP
|
||||
.BI "\-\-incfile"
|
||||
Prints the 'Makefile.inc' path, suitable for use with pkgdata(1)'s \-O option.
|
||||
.PP
|
||||
.SH AUTHORS
|
||||
Steven Loomis
|
||||
.SH VERSION
|
||||
@VERSION@
|
||||
.SH COPYRIGHT
|
||||
Copyright (C) 2002 IBM, Inc. and others.
|
||||
|
49
icu4c/source/config/test-icu-config.sh
Executable file
49
icu4c/source/config/test-icu-config.sh
Executable file
@ -0,0 +1,49 @@
|
||||
#!/bin/sh
|
||||
## -*-sh-*-
|
||||
## Copyright (c) 2002, International Business Machines Corporation and
|
||||
## others. All Rights Reserved.
|
||||
#
|
||||
# Just a script to test out icu-config.
|
||||
#
|
||||
|
||||
set -x
|
||||
which icu-config
|
||||
icu-config
|
||||
icu-config -?
|
||||
icu-config --BAD ARGUMENT
|
||||
icu-config --bindir
|
||||
icu-config --cflags
|
||||
icu-config --cxx
|
||||
icu-config --cc
|
||||
icu-config --cxxflags
|
||||
icu-config --cppflags
|
||||
icu-config --cppflags-searchpath
|
||||
icu-config --incpath
|
||||
icu-config --invoke
|
||||
icu-config --invoke=genrb
|
||||
icu-config --invoke=./myapp
|
||||
icu-config --invoke=/path/to/myapp
|
||||
icu-config --ldflags
|
||||
icu-config --ldflags-layout
|
||||
icu-config --ldflags-searchpath
|
||||
icu-config --ldflags-libsonly
|
||||
icu-config --ldflags-system
|
||||
icu-config --ldflags-ustdio
|
||||
icu-config --exec-prefix
|
||||
icu-config --prefix
|
||||
icu-config --sbindir
|
||||
icu-config --sysconfdir
|
||||
icu-config --mandir
|
||||
icu-config --icudata
|
||||
icu-config --icudatadir
|
||||
icu-config --icudata-mode
|
||||
icu-config --icudata-install-dir
|
||||
icu-config --shared-datadir
|
||||
icu-config --unicode-version
|
||||
icu-config --version
|
||||
# should fail
|
||||
icu-config --prefix=/tmp --bindir
|
||||
# following needs to point to an alternate path that will work
|
||||
icu-config --prefix=/Users/srl/II --cflags
|
||||
icu-config --detect-prefix --ldflags --ldflags-layout
|
||||
|
Loading…
Reference in New Issue
Block a user