summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2004-04-14 23:31:03 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:51:14 -0500
commitf480e29a683f25f4c05addd367f116a7854b4678 (patch)
tree598a51e8d2f45f23420cb32ae0180772da206685
parent5573a9ed661b5b07f52e90516edb3fbe210c9c87 (diff)
downloadsamba-f480e29a683f25f4c05addd367f116a7854b4678.tar.gz
samba-f480e29a683f25f4c05addd367f116a7854b4678.tar.bz2
samba-f480e29a683f25f4c05addd367f116a7854b4678.zip
r227: Patch from James Peach <jpeach@sgi.com> to search RIX ABI paths for libiconv.
Based on inital fix from Jason Mader. Jeremy. (This used to be commit 2719d0ee7cb8bbaad79a4b73e10453a825de1309)
-rw-r--r--source3/configure.in25
1 files changed, 18 insertions, 7 deletions
diff --git a/source3/configure.in b/source3/configure.in
index 0367b5f8d0..c19a9361b2 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -1656,7 +1656,7 @@ fi
ICONV_LOCATION=standard
-LOOK_DIRS="/usr /usr/local /sw"
+LOOK_DIRS="/usr /usr/local /sw /opt"
AC_ARG_WITH(libiconv,
[ --with-libiconv=BASEDIR Use libiconv in BASEDIR/lib and BASEDIR/include (default=auto) ],
[
@@ -1671,6 +1671,7 @@ AC_ARG_WITH(libiconv,
])
ICONV_FOUND="no"
+libext=""
for i in $LOOK_DIRS ; do
save_LIBS=$LIBS
save_LDFLAGS=$LDFLAGS
@@ -1678,15 +1679,24 @@ for i in $LOOK_DIRS ; do
CPPFLAGS="$CPPFLAGS -I$i/include"
dnl This is here to handle -withval stuff for --with-libiconv
dnl Perhaps we should always add a -L
- LDFLAGS="$LDFLAGS -L$i/lib"
- LIBS=
- export LDFLAGS LIBS CPPFLAGS
+
+dnl Check lib and lib32 library variants to cater for IRIX ABI-specific
+dnl installation paths.
+ for l in "lib" "lib32" ; do
+ LDFLAGS="$LDFLAGS -L$i/$l"
+ LIBS=
+ export LDFLAGS LIBS CPPFLAGS
dnl Try to find iconv(3)
- jm_ICONV($i)
+ jm_ICONV($i)
+ if test "$ICONV_FOUND" = yes; then
+ libext="$l"
+ break;
+ fi
+ done
if test "$ICONV_FOUND" = yes; then
LDFLAGS=$save_LDFLAGS
- LIB_ADD_DIR(LDFLAGS, "$i/lib")
+ LIB_ADD_DIR(LDFLAGS, "$i/$libext")
CFLAGS_ADD_DIR(CPPFLAGS, "$i/include")
LIBS="$save_LIBS"
ICONV_LOCATION=$i
@@ -1762,7 +1772,7 @@ dnl ])
fi
dnl Add the flags we need to CPPFLAGS and LDFLAGS
CFLAGS_ADD_DIR(CPPFLAGS, "$i/include")
- LIB_ADD_DIR(LDFLAGS, "$i/lib")
+ LIB_ADD_DIR(LDFLAGS, "$i/$libext")
export CPPFLAGS
AC_DEFINE(HAVE_NATIVE_ICONV,1,[Whether to use native iconv])
AC_DEFINE_UNQUOTED(DEFAULT_DOS_CHARSET,$default_dos_charset,[Default dos charset name])
@@ -1778,6 +1788,7 @@ dnl We only need to clean these up here for the next pass through the loop
LIBS=$save_LIBS
export LDFLAGS LIBS CPPFLAGS
done
+unset libext
if test x"$ICONV_FOUND" = x"no" -o x"$samba_cv_HAVE_NATIVE_ICONV" != x"yes" ; then