From ee112fc7ad01f25e600045d6e024fe019f80b277 Mon Sep 17 00:00:00 2001 From: Scott Bambrough Date: Fri, 16 Jun 2006 10:42:20 -0400 Subject: [PATCH] configure: Test for additional ICU libraries /usr/lib/libicuuc.a and /usr/lib/libicudata.a. --- configure | 20 +++++++++++--------- configure.ac | 22 ++++++++++++---------- 2 files changed, 23 insertions(+), 19 deletions(-) diff --git a/configure b/configure index 02fa33ff20d..700baca6cd6 100755 --- a/configure +++ b/configure @@ -11280,13 +11280,14 @@ fi if test "$ac_cv_header_unicode_ubidi_h" = "yes" then saved_libs="$LIBS" - ICU_LIB_DIR="${ICU_LIB_DIR-/usr/lib}" - ICUUC_LIB="${ICUUC_LIB-$ICU_LIB_DIR/libsicuuc.a}" - ICUDATA_LIB="${ICUDATA_LIB-$ICU_LIB_DIR/libsicudata.a}" - { echo "$as_me:$LINENO: checking whether can link with ICU libraries $ICUUC_LIB and $ICUDATA_LIB" >&5 -echo $ECHO_N "checking whether can link with ICU libraries $ICUUC_LIB and $ICUDATA_LIB... $ECHO_C" >&6; } - LIBS="$LIBS $ICUUC_LIB $ICUDATA_LIB -lstdc++ -lgcc_s" - cat >conftest.$ac_ext <<_ACEOF + for i in ${ICU_LIB_DIR-/usr/lib}/libsicu ${ICU_LIB_DIR-/usr/lib}/libicu + do + TEST_ICUUC_LIB="${ICUUC_LIB-${i}uc.a}" + TEST_ICUDATA_LIB="${ICUDATA_LIB-${i}data.a}" + { echo "$as_me:$LINENO: checking whether can link with ICU libraries $TEST_ICUUC_LIB and $TEST_ICUDATA_LIB" >&5 +echo $ECHO_N "checking whether can link with ICU libraries $TEST_ICUUC_LIB and $TEST_ICUDATA_LIB... $ECHO_C" >&6; } + LIBS="$saved_libs $TEST_ICUUC_LIB $TEST_ICUDATA_LIB -lstdc++ -lgcc_s" + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -11327,9 +11328,9 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_ICU 1 _ACEOF - ICULIBS="$ICUUC_LIB $ICUDATA_LIB -lstdc++ -lgcc_s" + ICULIBS="$TEST_ICUUC_LIB $TEST_ICUDATA_LIB -lstdc++ -lgcc_s" - { echo "$as_me:$LINENO: result: yes" >&5 + { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else echo "$as_me: failed program was:" >&5 @@ -11341,6 +11342,7 @@ fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext + done LIBS="$saved_libs" fi diff --git a/configure.ac b/configure.ac index 72363d9da50..0c379c084c5 100644 --- a/configure.ac +++ b/configure.ac @@ -602,16 +602,18 @@ dnl **** Check for the ICU library **** if test "$ac_cv_header_unicode_ubidi_h" = "yes" then saved_libs="$LIBS" - ICU_LIB_DIR="${ICU_LIB_DIR-/usr/lib}" - ICUUC_LIB="${ICUUC_LIB-$ICU_LIB_DIR/libsicuuc.a}" - ICUDATA_LIB="${ICUDATA_LIB-$ICU_LIB_DIR/libsicudata.a}" - AC_MSG_CHECKING(whether can link with ICU libraries $ICUUC_LIB and $ICUDATA_LIB) - LIBS="$LIBS $ICUUC_LIB $ICUDATA_LIB -lstdc++ -lgcc_s" - AC_TRY_LINK([#include ],[ubidi_open()], - [AC_DEFINE(HAVE_ICU,1,[Define to 1 if the ICU libraries are installed]) - AC_SUBST(ICULIBS,"$ICUUC_LIB $ICUDATA_LIB -lstdc++ -lgcc_s") - AC_MSG_RESULT(yes)], - [AC_MSG_RESULT(no)]) + for i in ${ICU_LIB_DIR-/usr/lib}/libsicu ${ICU_LIB_DIR-/usr/lib}/libicu + do + TEST_ICUUC_LIB="${ICUUC_LIB-${i}uc.a}" + TEST_ICUDATA_LIB="${ICUDATA_LIB-${i}data.a}" + AC_MSG_CHECKING(whether can link with ICU libraries $TEST_ICUUC_LIB and $TEST_ICUDATA_LIB) + LIBS="$saved_libs $TEST_ICUUC_LIB $TEST_ICUDATA_LIB -lstdc++ -lgcc_s" + AC_TRY_LINK([#include ],[ubidi_open()], + [AC_DEFINE(HAVE_ICU,1,[Define to 1 if the ICU libraries are installed]) + AC_SUBST(ICULIBS,"$TEST_ICUUC_LIB $TEST_ICUDATA_LIB -lstdc++ -lgcc_s") + AC_MSG_RESULT(yes)], + [AC_MSG_RESULT(no)]) + done LIBS="$saved_libs" fi