From 5a4b133d1ce7ec5043a092396072be5374b3cf24 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 21 Oct 2006 09:15:15 +0000 Subject: r19438: try to fix up the build breakages on BSD systems due to incorrectly detecting iconv.h (This used to be commit e6baa13e1f9c35f95021512b713cebba680b2a72) --- source4/lib/charset/config.m4 | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'source4/lib/charset/config.m4') diff --git a/source4/lib/charset/config.m4 b/source4/lib/charset/config.m4 index ce278a6e4c..fb845aa67c 100644 --- a/source4/lib/charset/config.m4 +++ b/source4/lib/charset/config.m4 @@ -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 #include <$1> @@ -9,7 +10,7 @@ int main() 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 @@ AC_DEFUN(SMB_CHECK_ICONV_DIR, 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 @@ AC_ARG_WITH(libiconv, ]) 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 -- cgit