summaryrefslogtreecommitdiffstats
path: root/m4/icu.m4
diff options
context:
space:
mode:
authorroot <root@buildsamba01.idm.lab.bos.redhat.com>2010-03-19 19:25:48 -0500
committerRich Megginson <rmeggins@redhat.com>2010-03-23 10:19:32 -0600
commit682529e7f8391744615b40a14852efd317936109 (patch)
tree906ac28baf86f97655acf29d988101b56c15758b /m4/icu.m4
parent04a0bd9ada0b3dd8efae67b63421dfa31e15b051 (diff)
downloadds-682529e7f8391744615b40a14852efd317936109.tar.gz
ds-682529e7f8391744615b40a14852efd317936109.tar.xz
ds-682529e7f8391744615b40a14852efd317936109.zip
Bug 480787 - Autoconf parameter --with and --without
https://bugzilla.redhat.com/show_bug.cgi?id=480787 Resolves: bug 480787 Bug Description: Autoconf parameter --with and --without Fix Description: The configure script has been modified such that the --with-XXX and --without-XXX switches will work as --with-XXX=yes and --with-XXX=no, respectively. If the package is required and none of the switches are specified, it will default to "yes". The code that detects LDAPSDK and OpenLDAP conflicts has been updated. The help messages have been cleaned up. Reviewed by: rmeggins (and pushed by)
Diffstat (limited to 'm4/icu.m4')
-rw-r--r--m4/icu.m425
1 files changed, 16 insertions, 9 deletions
diff --git a/m4/icu.m4 b/m4/icu.m4
index f36ef932..a9012938 100644
--- a/m4/icu.m4
+++ b/m4/icu.m4
@@ -22,25 +22,32 @@ AC_CHECKING(for LIBICU)
# check for --with-icu
AC_MSG_CHECKING(for --with-icu)
-AC_ARG_WITH(icu, [ --with-icu=PATH ICU directory],
+AC_ARG_WITH(icu, AS_HELP_STRING([--with-icu@<:@=PATH@:>@],[ICU directory]),
[
- if test -d "$withval"/lib
+ if test "$withval" = "yes"
+ then
+ AC_MSG_RESULT(yes)
+ elif test "$withval" = "no"
+ then
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR([ICU is required.])
+ elif test -d "$withval"/lib
then
AC_MSG_RESULT([using $withval])
ICUDIR=$withval
icu_lib="-L$ICUDIR/lib"
+ icu_inc="-I$withval/include"
+ icu_bin="$withval/bin"
else
echo
AC_MSG_ERROR([$withval not found])
fi
- icu_inc="-I$withval/include"
- icu_bin="$withval/bin"
],
-AC_MSG_RESULT(no))
+AC_MSG_RESULT(yes))
# check for --with-icu-inc
AC_MSG_CHECKING(for --with-icu-inc)
-AC_ARG_WITH(icu-inc, [ --with-icu-inc=PATH ICU include directory],
+AC_ARG_WITH(icu-inc, AS_HELP_STRING([--with-icu-inc=PATH],[ICU include directory]),
[
if test -d "$withval"
then
@@ -55,7 +62,7 @@ AC_MSG_RESULT(no))
# check for --with-icu-lib
AC_MSG_CHECKING(for --with-icu-lib)
-AC_ARG_WITH(icu-lib, [ --with-icu-lib=PATH ICU library directory],
+AC_ARG_WITH(icu-lib, AS_HELP_STRING([--with-icu-lib=PATH],[ICU library directory]),
[
if test -d "$withval"
then
@@ -70,7 +77,7 @@ AC_MSG_RESULT(no))
# check for --with-icu-bin
AC_MSG_CHECKING(for --with-icu-bin)
-AC_ARG_WITH(icu-bin, [ --with-icu-bin=PATH ICU binary directory],
+AC_ARG_WITH(icu-bin, AS_HELP_STRING([--with-icu-bin=PATH],[ICU binary directory]),
[
if test -d "$withval"
then
@@ -86,8 +93,8 @@ AC_MSG_RESULT(no))
# last resort
if test -z "$icu_lib"; then
- AC_MSG_CHECKING(for icu with icu-config)
AC_PATH_PROG(ICU_CONFIG, icu-config)
+ AC_MSG_CHECKING(for icu with icu-config)
if test -n "$ICU_CONFIG"; then
icu_lib=`$ICU_CONFIG --ldflags-searchpath`
icu_inc=`$ICU_CONFIG --cppflags-searchpath`