summaryrefslogtreecommitdiff
path: root/source3/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'source3/configure.in')
-rw-r--r--source3/configure.in14
1 files changed, 11 insertions, 3 deletions
diff --git a/source3/configure.in b/source3/configure.in
index 9dcc53364b..16efcdec17 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -1550,9 +1550,7 @@ for i in $LOOK_DIRS ; do
dnl Try to find iconv(3)
jm_ICONV($i)
- CPPFLAGS=$save_CPPFLAGS
if test "$ICONV_FOUND" = yes; then
- LDFLAGS=$save_LDFLAGS
LIB_ADD_DIR(LDFLAGS, "$i/lib")
CFLAGS_ADD_DIR(CPPFLAGS, "$i/include")
LIBS="$save_LIBS $LIBS"
@@ -1570,7 +1568,15 @@ dnl there might be a working iconv further down the list of LOOK_DIRS
#include <$jm_cv_include>
main(){
iconv_t cd = iconv_open("ASCII", "UCS-2LE");
- if (cd == 0 || cd == (iconv_t)-1) return -1;
+ if (cd == 0 || cd == (iconv_t)-1) {
+ cd = iconv_open("ISO-8859-1", "UCS-2LE");
+ if (cd == 0 || cd == (iconv_t)-1) {
+ cd = iconv_open("IBM850", "UCS-2LE"); /* Solaris has this */
+ if (cd == 0 || cd == (iconv_t)-1) {
+ return -1;
+ }
+ }
+ }
return 0;
}
],
@@ -1582,6 +1588,8 @@ main(){
fi
dnl We didn't find a working iconv, so keep going
fi
+dnl We only need to clean these up here for the next pass through the loop
+ CPPFLAGS=$save_CPPFLAGS
LDFLAGS=$save_LDFLAGS
LIBS=$save_LIBS
export LDFLAGS LIBS CPPFLAGS