[PATCH] search IRIX ABI paths for libiconv

James Peach jpeach at sgi.com
Wed Apr 14 00:17:39 GMT 2004


Hi all,

The attached diff changes the configure.in search for libiconv to check
in lib32/ (the IRIX n32 ABI path) after checking in lib/. It also adds
/opt to the list of site-specific locations that are searched.

This was diff was based on one from Jason Mader.

cheers,

-- 
James Peach | jpeach at sgi.com | SGI Australian Software Group
I don't speak for SGI.
-------------- next part --------------
Index: samba/source/configure.in
===================================================================
RCS file: /cvsroot/samba/source/configure.in,v
retrieving revision 1.300.2.219
diff -u -r1.300.2.219 configure.in
--- samba/source/configure.in	26 Mar 2004 22:26:33 -0000	1.300.2.219
+++ samba/source/configure.in	13 Apr 2004 00:40:33 -0000
@@ -1653,7 +1653,7 @@
 
 
 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) ],
 [
@@ -1668,6 +1668,7 @@
 ])
 
 ICONV_FOUND="no"
+libext=""
 for i in $LOOK_DIRS ; do
     save_LIBS=$LIBS
     save_LDFLAGS=$LDFLAGS
@@ -1675,15 +1676,24 @@
     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
@@ -1759,7 +1769,7 @@
            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])
@@ -1775,6 +1785,7 @@
     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


More information about the samba-technical mailing list