X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/b75a7d8f3b4adbae880cab104ce2c6a50eee4db2..4388f060552cc537e71e957d32f35e9d75a61233:/icuSources/config/icu-config-bottom diff --git a/icuSources/config/icu-config-bottom b/icuSources/config/icu-config-bottom index 3c8f1fa9..0f0319a4 100644 --- a/icuSources/config/icu-config-bottom +++ b/icuSources/config/icu-config-bottom @@ -1,9 +1,10 @@ ## -*-sh-*- -## BEGIN of icu-config-bottom. $Revision: 1.1.1.2 $ -## Copyright (c) 2002-2003, International Business Machines Corporation and +## BEGIN of icu-config-bottom. +## Copyright (c) 2002-2011, International Business Machines Corporation and ## others. All Rights Reserved. -ICUUC_FILE=${libdir}/${ICULIBS_COMMON_LIB_NAME} +ICUUC_FILE="${libdir}/${ICULIBS_COMMON_LIB_NAME}" +ICUUC_FILE_A="${libdir}/${ICULIBS_COMMON_LIB_NAME_A}" # echo ENABLE RPATH $ENABLE_RPATH and RPATHLDFLAGS=${RPATH_LDFLAGS} if [ "x$PKGDATA_MODE" = "x" ]; then @@ -14,10 +15,11 @@ fi ## The actual code of icu-config goes here. -ME=`basename $0` +ME=`basename "$0"` allflags() { + echo " --noverify Don't verify that ICU is actually installed." echo " --bindir Print binary directory path (bin)" echo " --cc Print C compiler used [CC]" echo " --cflags Print C compiler flags [CFLAGS]" @@ -46,7 +48,7 @@ allflags() echo " --ldflags-libsonly Same as --ldflags, but only the -l directives" echo " --ldflags-searchpath Print only -L (search path) directive" echo " --ldflags-system Print only system libs ICU links with (-lpthread, -lm)" - echo " --ldflags-ustdio Print ICU ustdio link directive. Use in addition to --ldflags " + echo " --ldflags-icuio Print ICU icuio link directive. Use in addition to --ldflags " echo " --ldflags-obsolete Print ICU obsolete link directive. Use in addition to --ldflags. (requires icuapps/obsolete to be built and installed.) " echo " --mandir Print manpage (man) path" echo " --prefix Print PREFIX to icu install (/usr/local)" @@ -58,7 +60,10 @@ allflags() echo " --sysconfdir Print system config (etc) path" echo " --unicode-version Print version of Unicode data used in ICU ($UNICODE_VERSION)" echo " --version Print ICU version ($VERSION)" - echo " --incfile Print path to Makefile.inc (for -O option of pkgdata)" + echo " --incfile Print path to Makefile.inc" + echo " --incpkgdatafile Print path to pkgdata.inc (for -O option of pkgdata)" + echo " --install Print path to install-sh" + echo " --mkinstalldirs Print path to mkinstalldirs" } ## Print the normal usage message @@ -89,11 +94,12 @@ usage() ## Check the sanity of current variables sanity() { - if [ ! -f ${ICUUC_FILE} ]; + if [ ! -f "${ICUUC_FILE}" -a ! -f "${ICUUC_FILE_A}" ] && [ ${IGNORE_ICUUC_FILE_CHECK} = "no" ] && [ ${SANITY} = "sane" ]; then echo "### $ME: Can't find ${ICUUC_FILE} - ICU prefix is wrong." 1>&2 - echo "### Try the --prefix= or --exec-prefix= options " 1>&2 - echo "### or --detect-prefix" + echo "### Try the --prefix= option " 1>&2 + echo "### or --detect-prefix" 1>&2 + echo "### (If you want to disable this check, use the --noverify option)" 1>&2 echo "### $ME: Exitting." 1>&2 exit 2 fi @@ -106,11 +112,37 @@ if [ $# -lt 1 ]; then exit 1 fi +# For certain options (e.g. --detect-prefix) don't check for icuuc library file. + +IGNORE_ICUUC_FILE_CHECK="no"; + +SANITY="sane" + +case "$1" in +--noverify) + SANITY="nosanity" + shift + ;; +esac + +case "$1" in +*prefix*) + IGNORE_ICUUC_FILE_CHECK="yes" + ;; +esac # Load our variables from autoconf # ALWAYS load twice because of dependencies loaddefs loaddefs + +if [ $# -gt 0 -a $1 = "--selfcheck" ]; +then + echo "passed" + exit + # EXIT for self check +fi + sanity while [ $# -gt 0 ]; @@ -121,13 +153,18 @@ do case "$arg" in # undocumented. - --debug) + --debug) set -x ;; - - --so) - echo $SO + + --noverify) + echo "### $ME: Error: --noverify must be the first argument." 1>&2 + exit 1 ;; + + --so) + echo $SO + ;; --bindir) echo $bindir @@ -145,8 +182,16 @@ do echo $sbindir ;; + --mkinstalldirs) + echo ${MKINSTALLDIRS} + ;; + + --install) + echo ${INSTALL} + ;; + --invoke=*) - QUOT="'" + QUOT="\"" CMD="${var}" # If it's not a locally executable command (1st choice) then @@ -164,89 +209,88 @@ do ;; --invoke) - QUOT="'" + QUOT="\"" echo "env ${QUOT}${LDLIBRARYPATH_ENVVAR}=${libdir}:"'${'"${LDLIBRARYPATH_ENVVAR}"'}'${QUOT} ;; --cflags) - echo $CFLAGS + echo $ECHO_N "${CFLAGS} ${ECHO_C}" ;; --cc) - echo $CC + echo $ECHO_N "${CC} ${ECHO_C}" ;; --cxx) - echo $CXX + echo $ECHO_N "${CXX} ${ECHO_C}" ;; --cxxflags) - echo $CXXFLAGS + echo $ECHO_N "${CXXFLAGS} ${ECHO_C}" ;; --cppflags) # Don't echo the -I. - it's unneeded. - echo $CPPFLAGS | sed -e 's/-I. //' + echo $ECHO_N "${CPPFLAGS} ${ECHO_C}" | sed -e 's/-I. //' ;; --cppflags-searchpath) - echo -I${prefix}/include + echo $ECHO_N "-I${prefix}/include ${ECHO_C}" ;; --cppflags-dynamic) - echo $SHAREDLIBCPPFLAGS + echo $ECHO_N "${SHAREDLIBCPPFLAGS} ${ECHO_C}" ;; --cxxflags-dynamic) - echo $SHAREDLIBCXXFLAGS + echo $ECHO_N "${SHAREDLIBCXXFLAGS} ${ECHO_C}" ;; --cflags-dynamic) - echo $SHAREDLIBCFLAGS + echo $ECHO_N "${SHAREDLIBCFLAGS} ${ECHO_C}" ;; --ldflags-system) - echo $LIBS + echo $ECHO_N "${LIBS} ${ECHO_C}" ;; --ldflags) - echo $LDFLAGS $ICULIBS $LIBS + echo $ECHO_N "${LDFLAGS} ${ICULIBS} ${LIBS} ${ECHO_C}" # $RPATH_LDFLAGS ;; --ldflags-libsonly) - echo $ICULIBS_I18N $ICULIBS_COMMON $ICULIBS_DATA + echo $ECHO_N "${ICULIBS_I18N} ${ICULIBS_COMMON} ${ICULIBS_DATA} ${ECHO_C}" ;; - --ldflags-ustdio) - echo $ICULIBS_USTDIO + --ldflags-icuio) + echo $ECHO_N " ${ICULIBS_ICUIO} ${ECHO_C}" ;; --ldflags-obsolete) - echo $ICULIBS_OBSOLETE + echo $ECHO_N "${ICULIBS_OBSOLETE} ${ECHO_C}" ;; --ldflags-toolutil) - echo $ICULIBS_TOOLUTIL + echo $ECHO_N " ${ICULIBS_TOOLUTIL} ${ECHO_C}" ;; --ldflags-layout) - echo $ICULIBS_LAYOUT $ICULIBS_LAYOUTEX + echo $ECHO_N "${ICULIBS_LAYOUT} ${ICULIBS_LAYOUTEX} ${ECHO_C}" ;; --ldflags-searchpath) - echo -L${libdir} + echo $ECHO_N "-L${libdir} ${ECHO_C}" ;; --detect-prefix) HERE=`echo $0 | sed -e "s/$ME//g"` - if [ -f $HERE/../lib/${ICULIBS_COMMON_LIB_NAME} ]; then - prefix=$HERE/.. + if [ -f "${HERE}/../lib/${ICULIBS_COMMON_LIB_NAME}" -o -f "${HERE}/../lib/${ICULIBS_COMMON_LIB_NAME_A}" ]; then + prefix="${HERE}/.." echo "## Using --prefix=${prefix}" 1>&2 fi loaddefs loaddefs - sanity ;; --exec-prefix) @@ -261,7 +305,6 @@ do prefix=$var loaddefs loaddefs - sanity ;; --sysconfdir) @@ -273,58 +316,53 @@ do ;; --shared-datadir) - echo $datadir + echo $ECHO_N "${datadir} ${ECHO_C}" ;; --incfile) - echo $pkglibdir/Makefile.inc + echo $ECHO_N "${pkglibdir}/Makefile.inc ${ECHO_C}" + ;; + + --incpkgdatafile) + echo $ECHO_N "${pkglibdir}/pkgdata.inc ${ECHO_C}" ;; --icudata) - echo $ICUDATA_NAME + echo $ECHO_N "${ICUDATA_NAME} ${ECHO_C}" ;; --icudata-mode) - echo $PKGDATA_MODE + echo $ECHO_N "${PKGDATA_MODE} ${ECHO_C}" ;; --icudata-install-dir) - case "$PKGDATA_MODE" in - - common) - echo "$pkgdatadir" - ;; - - dll) - echo "$libdir" - ;; - - *) - echo "## ${ME} Unknown pkgdata mode $PKGDATA_MODE" 1>&2 - exit 4 - ;; - esac + echo $ECHO_N "${ICUPKGDATA_DIR} ${ECHO_C}" ;; --icudatadir) - echo $pkgdatadir + echo $ECHO_N "${ICUDATA_DIR} ${ECHO_C}" ;; --shlib-c) - echo $SHLIB_c + echo $ECHO_N "${SHLIB_c} ${ECHO_C}" ;; --shlib-cc) - echo $SHLIB_cc + echo $ECHO_N "${SHLIB_cc} ${ECHO_C}" ;; --version) - echo $VERSION - ;; + echo $ECHO_N $VERSION + ;; - --unicode-version) - echo $UNICODE_VERSION - ;; + --unicode-version) + echo $ECHO_N $UNICODE_VERSION + ;; + + --host) + echo $host + exit 0 + ;; --help) usage @@ -355,8 +393,14 @@ do ;; esac shift + + # Reset the ignore icuuc file check flag + if [ $IGNORE_ICUUC_FILE_CHECK = "yes" ]; then + IGNORE_ICUUC_FILE_CHECK="no" + sanity + fi done - +echo # Check once before we quit (will check last used prefix) sanity ## END of icu-config-bottom