svn commit: samba r19438 - in branches/SAMBA_4_0/source/lib: charset replace/system

tridge at samba.org tridge at samba.org
Sat Oct 21 09:15:16 GMT 2006


Author: tridge
Date: 2006-10-21 09:15:15 +0000 (Sat, 21 Oct 2006)
New Revision: 19438

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=19438

Log:

try to fix up the build breakages on BSD systems due to incorrectly
detecting iconv.h

Modified:
   branches/SAMBA_4_0/source/lib/charset/config.m4
   branches/SAMBA_4_0/source/lib/replace/system/iconv.h


Changeset:
Modified: branches/SAMBA_4_0/source/lib/charset/config.m4
===================================================================
--- branches/SAMBA_4_0/source/lib/charset/config.m4	2006-10-21 08:27:18 UTC (rev 19437)
+++ branches/SAMBA_4_0/source/lib/charset/config.m4	2006-10-21 09:15:15 UTC (rev 19438)
@@ -1,5 +1,6 @@
-dnl SMB_CHECK_ICONV(action-if-found,action-if-not-found)
+dnl SMB_CHECK_ICONV(hdr, msg, action-if-found,action-if-not-found)
 AC_DEFUN(SMB_CHECK_ICONV,[
+  AC_MSG_CHECKING($2)
   AC_TRY_RUN([#include <stdlib.h>
 #include <$1>
 
@@ -9,7 +10,7 @@
    if (cd == 0 || cd == (iconv_t)-1) return -1;
    return 0;
 } 
-   ],[$2],[$3])
+   ],[AC_MSG_RESULT(yes); $3],[AC_MSG_RESULT(no); $4])
 ])
 
 dnl SMB_CHECK_ICONV_DIR(dir,action-if-found,action-if-not-found)
@@ -22,9 +23,9 @@
 	LDFLAGS="-L$1/lib"
 	LIBS=-liconv
 
-	SMB_CHECK_ICONV(iconv.h,[ AC_DEFINE(HAVE_ICONV_H,1,[Whether iconv.h is present]) $2 ], [
+	SMB_CHECK_ICONV(iconv.h,Whether iconv.h is present,[ AC_DEFINE(HAVE_ICONV_H,1,[Whether iconv.h is present]) $2 ], [
         LIBS=-lgiconv
-        SMB_CHECK_ICONV(giconv.h,[AC_DEFINE(HAVE_GICONV_H,1,[Whether giconv.h is present]) $2],[$3])
+        SMB_CHECK_ICONV(giconv.h,Whether giconv.h is present, [AC_DEFINE(HAVE_GICONV_H,1,[Whether giconv.h is present]) $2],[$3])
 	])
 
 	CPPFLAGS="$save_CPPFLAGS"
@@ -52,7 +53,9 @@
 ])
 
 if test x$ICONV_FOUND = xno; then
-	SMB_CHECK_ICONV(iconv.h,[AC_DEFINE(HAVE_ICONV_H,1,[Whether iconv.h is present]) ICONV_FOUND=yes])
+	SMB_CHECK_ICONV(iconv.h,
+		[Whether iconv.h is present], 
+		[AC_DEFINE(HAVE_ICONV_H,1,[Whether iconv.h is present]) ICONV_FOUND=yes])
 fi
 
 for i in $LOOK_DIRS ; do

Modified: branches/SAMBA_4_0/source/lib/replace/system/iconv.h
===================================================================
--- branches/SAMBA_4_0/source/lib/replace/system/iconv.h	2006-10-21 08:27:18 UTC (rev 19437)
+++ branches/SAMBA_4_0/source/lib/replace/system/iconv.h	2006-10-21 09:15:15 UTC (rev 19438)
@@ -35,11 +35,11 @@
 #endif
 
 #ifdef HAVE_NATIVE_ICONV
-#if defined(HAVE_ICONV)
+#if defined(HAVE_ICONV_H)
 #include <iconv.h>
-#elif defined(HAVE_GICONV)
+#elif defined(HAVE_GICONV_H)
 #include <giconv.h>
-#elif defined(HAVE_BICONV)
+#elif defined(HAVE_BICONV_H)
 #include <biconv.h>
 #endif
 #endif /* HAVE_NATIVE_ICONV */



More information about the samba-cvs mailing list