intl/icu/source/config/icu-config-bottom

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/intl/icu/source/config/icu-config-bottom	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,411 @@
     1.4 +## -*-sh-*-
     1.5 +## BEGIN of icu-config-bottom.
     1.6 +## Copyright (c) 2002-2013, International Business Machines Corporation and
     1.7 +## others. All Rights Reserved.
     1.8 +
     1.9 +ICUUC_FILE="${libdir}/${ICULIBS_COMMON_LIB_NAME}"
    1.10 +ICUUC_FILE_A="${libdir}/${ICULIBS_COMMON_LIB_NAME_A}"
    1.11 +
    1.12 +#  echo ENABLE RPATH $ENABLE_RPATH and RPATHLDFLAGS=${RPATH_LDFLAGS}
    1.13 +if [ "x$PKGDATA_MODE" = "x" ]; then
    1.14 +    PKGDATA_MODE=dll
    1.15 +fi
    1.16 +
    1.17 +}
    1.18 +
    1.19 +## The actual code of icu-config goes here.
    1.20 +
    1.21 +ME=`basename "$0"`
    1.22 +
    1.23 +allflags()
    1.24 +{
    1.25 +    echo "  --noverify             Don't verify that ICU is actually installed."
    1.26 +    echo "  --bindir               Print binary directory path (bin)"
    1.27 +    echo "  --cc                   Print C compiler used [CC]"
    1.28 +    echo "  --cflags               Print C compiler flags [CFLAGS]"
    1.29 +    echo "  --cflags-dynamic       Print additional C flags for"
    1.30 +    echo "                             building shared libraries."
    1.31 +    echo "  --cppflags             Print C Preprocessor flags [CPPFLAGS]"
    1.32 +    echo "  --cppflags-dynamic     Print additional C Preprocessor flags for"
    1.33 +    echo "                             building shared libraries."
    1.34 +    echo "  --cppflags-searchpath  Print only -I include directives  (-Iinclude)"
    1.35 +    echo "  --cxx                  Print C++ compiler used [CXX]"
    1.36 +    echo "  --cxxflags             Print C++ compiler flags [CXXFLAGS]"
    1.37 +    echo "  --cxxflags-dynamic     Print additional C++ flags for"
    1.38 +    echo "                             building shared libraries."
    1.39 +    echo "  --detect-prefix        Attempt to detect prefix based on PATH"
    1.40 +    echo "  --exec-prefix          Print prefix for executables (/bin)"
    1.41 +    echo "  --exists               Return with 0 status if ICU exists else fail"
    1.42 +    echo "  --help, -?, --usage    Print this message"
    1.43 +    echo "  --icudata              Print shortname of ICU data file (icudt21l)"
    1.44 +    echo "  --icudata-install-dir  Print path to install data to - use as --install option to pkgdata(1)"
    1.45 +    echo "  --icudata-mode         Print default ICU pkgdata mode (dll) - use as --mode option to pkgdata(1)."
    1.46 +    echo "  --icudatadir           Print path to packaged archive data. Can set as [ICU_DATA]"
    1.47 +    echo "  --invoke               Print commands to invoke an ICU program"
    1.48 +    echo "  --invoke=<prog>        Print commands to invoke an ICU program named <prog> (ex: genrb)"
    1.49 +    echo "  --ldflags              Print -L search path and -l libraries to link with ICU [LDFLAGS].  This is for the data, uc (common), and i18n libraries only.  "
    1.50 +    echo "  --ldflags-layout       Print ICU layout engine link directive. Use in addition to --ldflags"
    1.51 +    echo "  --ldflags-libsonly     Same as --ldflags, but only the -l directives"
    1.52 +    echo "  --ldflags-searchpath   Print only -L (search path) directive"
    1.53 +    echo "  --ldflags-system       Print only system libs ICU links with (-lpthread, -lm)"
    1.54 +    echo "  --ldflags-icuio        Print ICU icuio link directive. Use in addition to --ldflags "
    1.55 +    echo "  --ldflags-obsolete     Print ICU obsolete link directive. Use in addition to --ldflags. (requires icuapps/obsolete to be built and installed.) "
    1.56 +    echo "  --mandir               Print manpage (man) path"
    1.57 +    echo "  --prefix               Print PREFIX to icu install (/usr/local)"
    1.58 +    echo "  --prefix=XXX           Set prefix to XXX for remainder of command"
    1.59 +    echo "  --sbindir              Print system binary path (sbin) "
    1.60 +    echo "  --shared-datadir       Print shared data (share) path. This is NOT the ICU data dir."
    1.61 +    echo "  --shlib-c              Print the command to compile and build C shared libraries with ICU"
    1.62 +    echo "  --shlib-cc             Print the command to compile and build C++ shared libraries with ICU"
    1.63 +    echo "  --sysconfdir           Print system config (etc) path"
    1.64 +    echo "  --unicode-version      Print version of Unicode data used in ICU ($UNICODE_VERSION)"
    1.65 +    echo "  --version              Print ICU version ($VERSION)"
    1.66 +    echo "  --incfile              Print path to Makefile.inc"
    1.67 +    echo "  --incpkgdatafile       Print path to pkgdata.inc (for -O option of pkgdata)"
    1.68 +    echo "  --install              Print path to install-sh"
    1.69 +    echo "  --mkinstalldirs        Print path to mkinstalldirs"
    1.70 +}
    1.71 +
    1.72 +## Print the normal usage message
    1.73 +shortusage()
    1.74 +{
    1.75 +    echo "usage: ${ME} " `allflags | cut -c-25 | sed -e 's%.*%[ & ]%'`
    1.76 +}
    1.77 +
    1.78 +
    1.79 +usage()
    1.80 +{
    1.81 +    echo "${ME}: icu-config: ICU configuration helper script"
    1.82 +    echo
    1.83 +    echo "The most commonly used options will be --cflags, --cxxflags, --cppflags, and --ldflags."
    1.84 +    echo 'Example (in make):   CPFLAGS=$(shell icu-config --cppflags)'
    1.85 +    echo '                     LDFLAGS=$(shell icu-config --ldflags)'
    1.86 +    echo "                     (etc).."
    1.87 +    echo
    1.88 +    echo "Usage:"
    1.89 +    allflags
    1.90 +
    1.91 +    echo
    1.92 +    echo " [Brackets] show MAKE variable equivalents,  (parenthesis) show example output"
    1.93 +    echo
    1.94 +    echo "Copyright (c) 2002-2013, International Business Machines Corporation and others. All Rights Reserved."
    1.95 +    echo
    1.96 +    echo "NOTE: Please consider using the pkg-config (.pc) files instead of icu-config."
    1.97 +    echo " See: <http://userguide.icu-project.org/howtouseicu#TOC-pkg-config> "
    1.98 +}
    1.99 +
   1.100 +## Check the sanity of current variables
   1.101 +sanity()
   1.102 +{
   1.103 +    if [ ! -f "${ICUUC_FILE}" -a ! -f "${ICUUC_FILE_A}" ] && [ ${IGNORE_ICUUC_FILE_CHECK} = "no" ] && [ ${SANITY} = "sane" ];
   1.104 +    then
   1.105 +	echo "### $ME: Can't find ${ICUUC_FILE} - ICU prefix is wrong."  1>&2
   1.106 +	echo "###      Try the --prefix= option " 1>&2
   1.107 +	echo "###      or --detect-prefix" 1>&2
   1.108 +        echo "###      (If you want to disable this check, use  the --noverify option)" 1>&2
   1.109 +	echo "### $ME: Exitting." 1>&2
   1.110 +	exit 2
   1.111 +    fi
   1.112 +}
   1.113 +
   1.114 +## Main starts here.
   1.115 +
   1.116 +if [ $# -lt 1 ]; then
   1.117 +    shortusage
   1.118 +    exit 1
   1.119 +fi
   1.120 +
   1.121 +# For certain options (e.g. --detect-prefix) don't check for icuuc library file.
   1.122 +
   1.123 +IGNORE_ICUUC_FILE_CHECK="no";
   1.124 +
   1.125 +SANITY="sane"
   1.126 +
   1.127 +case "$1" in
   1.128 +--noverify)
   1.129 +    SANITY="nosanity"
   1.130 +    shift
   1.131 +    ;;
   1.132 +esac
   1.133 +
   1.134 +case "$1" in
   1.135 +*prefix*)
   1.136 +    IGNORE_ICUUC_FILE_CHECK="yes"
   1.137 +    ;;
   1.138 +esac
   1.139 +
   1.140 +# Load our variables from autoconf
   1.141 +# ALWAYS load twice because of dependencies
   1.142 +loaddefs
   1.143 +loaddefs
   1.144 +
   1.145 +if [ $# -gt 0 -a $1 = "--selfcheck" ];
   1.146 +then
   1.147 +	echo "passed"
   1.148 +	exit
   1.149 +	# EXIT for self check
   1.150 +fi
   1.151 +
   1.152 +sanity
   1.153 +
   1.154 +while [ $# -gt 0 ];
   1.155 +do
   1.156 +    arg="$1"
   1.157 +    var=`echo $arg | sed -e 's/^[^=]*=//'`
   1.158 +#    echo "### processing $arg" 1>&2
   1.159 +    case "$arg" in
   1.160 +
   1.161 +        # undocumented.
   1.162 +        --debug)
   1.163 +	    set -x
   1.164 +	    ;;
   1.165 +
   1.166 +        --noverify)
   1.167 +            echo "### $ME: Error: --noverify must be the first argument." 1>&2
   1.168 +            exit 1
   1.169 +            ;;
   1.170 +
   1.171 +    --so)
   1.172 +        echo $SO
   1.173 +        ;;
   1.174 +
   1.175 +	--bindir)
   1.176 +	    echo $bindir
   1.177 +	    ;;
   1.178 +
   1.179 +	--libdir)
   1.180 +	    echo $libdir
   1.181 +	    ;;
   1.182 +
   1.183 +	--exists)
   1.184 +	    sanity
   1.185 +	    ;;
   1.186 +
   1.187 +	--sbindir)
   1.188 +	    echo $sbindir
   1.189 +	    ;;
   1.190 +
   1.191 +	--mkinstalldirs)
   1.192 +	    echo ${MKINSTALLDIRS}
   1.193 +	    ;;
   1.194 +
   1.195 +	--install)
   1.196 +	    echo ${INSTALL}
   1.197 +	    ;;
   1.198 +
   1.199 +	--invoke=*)
   1.200 +	    QUOT="\""
   1.201 +            CMD="${var}"
   1.202 +
   1.203 +            # If it's not a locally executable command (1st choice) then
   1.204 +            # search for it in the ICU directories.
   1.205 +            if [ ! -x ${CMD} ]; then
   1.206 +                if [ -x ${bindir}/${var} ]; then
   1.207 +                    CMD="${bindir}/${var}"
   1.208 +                fi
   1.209 +                if [ -x ${sbindir}/${var} ]; then
   1.210 +                    CMD="${sbindir}/${var}"
   1.211 +                fi
   1.212 +            fi
   1.213 +
   1.214 +	    echo "env ${QUOT}${LDLIBRARYPATH_ENVVAR}=${libdir}:"'${'"${LDLIBRARYPATH_ENVVAR}"'}'${QUOT} ${CMD}
   1.215 +	    ;;
   1.216 +
   1.217 +	--invoke)
   1.218 +	    QUOT="\""
   1.219 +	    echo "env ${QUOT}${LDLIBRARYPATH_ENVVAR}=${libdir}:"'${'"${LDLIBRARYPATH_ENVVAR}"'}'${QUOT}
   1.220 +	    ;;
   1.221 +
   1.222 +	--cflags)
   1.223 +	    echo $ECHO_N "${CFLAGS} ${ECHO_C}"
   1.224 +	    ;;
   1.225 +
   1.226 +	--cc)
   1.227 +	    echo $ECHO_N "${CC} ${ECHO_C}"
   1.228 +	    ;;
   1.229 +
   1.230 +	--cxx)
   1.231 +	    echo $ECHO_N "${CXX} ${ECHO_C}"
   1.232 +	    ;;
   1.233 +
   1.234 +	--cxxflags)
   1.235 +	    echo $ECHO_N "${CXXFLAGS} ${ECHO_C}"
   1.236 +	    ;;
   1.237 +
   1.238 +	--cppflags)
   1.239 +	    # Don't echo the -I. - it's unneeded.
   1.240 +	    echo $ECHO_N "${CPPFLAGS} ${ECHO_C}" | sed -e 's/-I. //'
   1.241 +	    ;;
   1.242 +
   1.243 +	--cppflags-searchpath)
   1.244 +	    echo $ECHO_N "-I${prefix}/include ${ECHO_C}"
   1.245 +	    ;;
   1.246 +
   1.247 +	--cppflags-dynamic)
   1.248 +	    echo $ECHO_N "${SHAREDLIBCPPFLAGS} ${ECHO_C}"
   1.249 +	    ;;
   1.250 +
   1.251 +	--cxxflags-dynamic)
   1.252 +	    echo $ECHO_N "${SHAREDLIBCXXFLAGS} ${ECHO_C}"
   1.253 +	    ;;
   1.254 +
   1.255 +	--cflags-dynamic)
   1.256 +	    echo $ECHO_N "${SHAREDLIBCFLAGS} ${ECHO_C}"
   1.257 +	    ;;
   1.258 +
   1.259 +	--ldflags-system)
   1.260 +	    echo $ECHO_N "${LIBS} ${ECHO_C}"
   1.261 +	    ;;
   1.262 +
   1.263 +	--ldflags)
   1.264 +	    echo $ECHO_N "${LDFLAGS} ${ICULIBS} ${LIBS} ${ECHO_C}"
   1.265 +# $RPATH_LDFLAGS
   1.266 +	    ;;
   1.267 +
   1.268 +	--ldflags-libsonly)
   1.269 +	    echo $ECHO_N "${ICULIBS_I18N} ${ICULIBS_COMMON} ${ICULIBS_DATA} ${ECHO_C}"
   1.270 +	    ;;
   1.271 +
   1.272 +	--ldflags-icuio)
   1.273 +	    echo $ECHO_N " ${ICULIBS_ICUIO} ${ECHO_C}"
   1.274 +	    ;;
   1.275 +
   1.276 +	--ldflags-obsolete)
   1.277 +	    echo $ECHO_N "${ICULIBS_OBSOLETE} ${ECHO_C}"
   1.278 +	    ;;
   1.279 +
   1.280 +	--ldflags-toolutil)
   1.281 +	    echo $ECHO_N " ${ICULIBS_TOOLUTIL} ${ECHO_C}"
   1.282 +	    ;;
   1.283 +
   1.284 +	--ldflags-layout)
   1.285 +	    echo $ECHO_N "${ICULIBS_LAYOUT} ${ICULIBS_LAYOUTEX} ${ECHO_C}"
   1.286 +	    ;;
   1.287 +
   1.288 +	--ldflags-searchpath)
   1.289 +	    echo $ECHO_N "-L${libdir} ${ECHO_C}"
   1.290 +	    ;;
   1.291 +
   1.292 +	--detect-prefix)
   1.293 +	    HERE=`echo $0 | sed -e "s/$ME//g"`
   1.294 +	    if [ -f "${HERE}/../lib/${ICULIBS_COMMON_LIB_NAME}" -o -f  "${HERE}/../lib/${ICULIBS_COMMON_LIB_NAME_A}"  ]; then
   1.295 +		prefix="${HERE}/.."
   1.296 +		echo "## Using --prefix=${prefix}" 1>&2
   1.297 +	    fi
   1.298 +	    loaddefs
   1.299 +	    loaddefs
   1.300 +	    ;;
   1.301 +
   1.302 +	--exec-prefix)
   1.303 +	    echo $exec_prefix
   1.304 +	    ;;
   1.305 +
   1.306 +	--prefix)
   1.307 +	    echo $prefix
   1.308 +	    ;;
   1.309 +
   1.310 +	--prefix=*)
   1.311 +	    prefix=$var
   1.312 +	    loaddefs
   1.313 +	    loaddefs
   1.314 +	    ;;
   1.315 +
   1.316 +	--sysconfdir)
   1.317 +	    echo $sysconfdir
   1.318 +	    ;;
   1.319 +
   1.320 +	--mandir)
   1.321 +	    echo $mandir
   1.322 +	    ;;
   1.323 +
   1.324 +	--shared-datadir)
   1.325 +	    echo $ECHO_N "${datadir} ${ECHO_C}"
   1.326 +	    ;;
   1.327 +
   1.328 +        --incfile)
   1.329 +	    echo $ECHO_N "${pkglibdir}/Makefile.inc ${ECHO_C}"
   1.330 +	    ;;
   1.331 +
   1.332 +	--incpkgdatafile)
   1.333 +	    echo $ECHO_N "${pkglibdir}/pkgdata.inc ${ECHO_C}"
   1.334 +	    ;;
   1.335 +
   1.336 +	--icudata)
   1.337 +	    echo $ECHO_N "${ICUDATA_NAME} ${ECHO_C}"
   1.338 +	    ;;
   1.339 +
   1.340 +	--icudata-mode)
   1.341 +	    echo $ECHO_N "${PKGDATA_MODE} ${ECHO_C}"
   1.342 +	    ;;
   1.343 +
   1.344 +	--icudata-install-dir)
   1.345 +        echo $ECHO_N "${ICUPKGDATA_DIR} ${ECHO_C}"
   1.346 +	    ;;
   1.347 +
   1.348 +	--icudatadir)
   1.349 +	    echo $ECHO_N "${ICUDATA_DIR} ${ECHO_C}"
   1.350 +	    ;;
   1.351 +
   1.352 +	--shlib-c)
   1.353 +	    echo $ECHO_N "${SHLIB_c} ${ECHO_C}"
   1.354 +	    ;;
   1.355 +
   1.356 +	--shlib-cc)
   1.357 +	    echo $ECHO_N "${SHLIB_cc} ${ECHO_C}"
   1.358 +	    ;;
   1.359 +
   1.360 +	--version)
   1.361 +	    echo $ECHO_N $VERSION
   1.362 +	    ;;
   1.363 +
   1.364 +	--unicode-version)
   1.365 +	    echo $ECHO_N $UNICODE_VERSION
   1.366 +	    ;;
   1.367 +
   1.368 +	--host)
   1.369 +	    echo $host
   1.370 +	    exit 0
   1.371 +	    ;;
   1.372 +
   1.373 +	--help)
   1.374 +	    usage
   1.375 +	    exit 0
   1.376 +	    ;;
   1.377 +
   1.378 +	--usage)
   1.379 +	    usage
   1.380 +	    exit 0
   1.381 +	    ;;
   1.382 +
   1.383 +#	--enable-rpath=*)
   1.384 +#	    ENABLE_RPATH=$var
   1.385 +#	    loaddefs
   1.386 +#	    ;;
   1.387 +
   1.388 +	-?)
   1.389 +	    usage
   1.390 +	    exit 0
   1.391 +	    ;;
   1.392 +
   1.393 +        *)
   1.394 +	    echo ${ME}: ERROR Unknown Option $arg 1>&2
   1.395 +            echo 1>&2
   1.396 +            shortusage 1>&2
   1.397 +	    echo "### $ME: Exitting." 1>&2
   1.398 +            exit 1;
   1.399 +            ;;
   1.400 +    esac
   1.401 +    shift
   1.402 +
   1.403 +    # Reset the ignore icuuc file check flag
   1.404 +    if [ $IGNORE_ICUUC_FILE_CHECK = "yes" ]; then
   1.405 +        IGNORE_ICUUC_FILE_CHECK="no"
   1.406 +        sanity
   1.407 +    fi
   1.408 +done
   1.409 +echo
   1.410 +# Check once before we quit (will check last used prefix)
   1.411 +sanity
   1.412 +## END of icu-config-bottom
   1.413 +
   1.414 +exit 0

mercurial