[PATCH] [FreeBSD 17] remove checks for giconv from aclocal.m4
Timur I. Bakeyev
timur at com.bat.ru
Sun Jun 7 16:19:17 GMT 2009
This patch re-introduces removal of the checks for giconv as iconv
implementation. This have been removed while ago from 3.0.x branch,
but somehow reappeared in 3.[234] source.
This library, libgiconv, is FreeBSD specific and, moreover, doesn't
provide enough codepage coverage necessary for Samba. In particular, it
doesn't have UCS2-LE encoding. FreeBSD for a long time uses libiconv for
all charsets manipulations, so it doesn't need it either. So, please,
please, remove this check(AGAIN!).
With regards,
Timur Bakeyev.
-------------- next part --------------
--- ./source3/m4/aclocal.m4.orig 2009-04-30 07:53:01.000000000 +0000
+++ ./source3/m4/aclocal.m4 2009-06-01 11:49:40.000000000 +0000
@@ -428,101 +428,79 @@
dnl those with the standalone portable libiconv installed).
AC_MSG_CHECKING(for iconv in $1)
jm_cv_func_iconv="no"
+ jm_cv_include=""
jm_cv_lib_iconv=""
- jm_cv_giconv=no
+ jm_cv_giconv="no"
jm_save_LIBS="$LIBS"
dnl Check for include in funny place but no lib needed
if test "$jm_cv_func_iconv" != yes; then
AC_TRY_LINK([#include <stdlib.h>
#include <giconv.h>],
- [iconv_t cd = iconv_open("","");
- iconv(cd,NULL,NULL,NULL,NULL);
- iconv_close(cd);],
- jm_cv_func_iconv=yes
- jm_cv_include="giconv.h"
- jm_cv_giconv="yes"
- jm_cv_lib_iconv="")
+ [iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);],
+ jm_cv_func_iconv=yes
+ jm_cv_include="giconv.h"
+ jm_cv_lib_iconv=""
+ jm_cv_giconv="yes")
dnl Standard iconv.h include, lib in glibc or libc ...
if test "$jm_cv_func_iconv" != yes; then
- AC_TRY_LINK([#include <stdlib.h>
+ AC_TRY_LINK([#include <stdlib.h>
#include <iconv.h>],
- [iconv_t cd = iconv_open("","");
- iconv(cd,NULL,NULL,NULL,NULL);
- iconv_close(cd);],
- jm_cv_include="iconv.h"
- jm_cv_func_iconv=yes
- jm_cv_lib_iconv="")
+ [iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);],
+ jm_cv_func_iconv=yes
+ jm_cv_include="iconv.h"
+ jm_cv_lib_iconv="")
- if test "$jm_cv_lib_iconv" != yes; then
- jm_save_LIBS="$LIBS"
- LIBS="$LIBS -lgiconv"
- AC_TRY_LINK([#include <stdlib.h>
+ if test "$jm_cv_func_iconv" != yes; then
+ jm_save_LIBS="$LIBS"
+ LIBS="$LIBS -lgiconv"
+ AC_TRY_LINK([#include <stdlib.h>
#include <giconv.h>],
- [iconv_t cd = iconv_open("","");
- iconv(cd,NULL,NULL,NULL,NULL);
- iconv_close(cd);],
- jm_cv_lib_iconv=yes
- jm_cv_func_iconv=yes
- jm_cv_include="giconv.h"
- jm_cv_giconv=yes
- jm_cv_lib_iconv="giconv")
+ [iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);],
+ jm_cv_func_iconv=yes
+ jm_cv_include="giconv.h"
+ jm_cv_lib_iconv="giconv"
+ jm_cv_giconv=yes)
- LIBS="$jm_save_LIBS"
+ LIBS="$jm_save_LIBS"
- if test "$jm_cv_func_iconv" != yes; then
- jm_save_LIBS="$LIBS"
- LIBS="$LIBS -liconv"
- AC_TRY_LINK([#include <stdlib.h>
+ if test "$jm_cv_func_iconv" != yes; then
+ jm_save_LIBS="$LIBS"
+ LIBS="$LIBS -liconv"
+ AC_TRY_LINK([#include <stdlib.h>
#include <iconv.h>],
- [iconv_t cd = iconv_open("","");
- iconv(cd,NULL,NULL,NULL,NULL);
- iconv_close(cd);],
- jm_cv_include="iconv.h"
- jm_cv_func_iconv=yes
- jm_cv_lib_iconv="iconv")
- LIBS="$jm_save_LIBS"
-
- if test "$jm_cv_lib_iconv" != yes; then
- jm_save_LIBS="$LIBS"
- LIBS="$LIBS -lbiconv"
- AC_TRY_LINK([#include <stdlib.h>
-#include <biconv.h>],
- [iconv_t cd = iconv_open("","");
- iconv(cd,NULL,NULL,NULL,NULL);
- iconv_close(cd);],
- jm_cv_lib_iconv=yes
- jm_cv_func_iconv=yes
- jm_cv_include="biconv.h"
- jm_cv_biconv=yes
- jm_cv_lib_iconv="biconv")
+ [iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);],
+ jm_cv_func_iconv=yes
+ jm_cv_include="iconv.h"
+ jm_cv_lib_iconv="iconv")
- LIBS="$jm_save_LIBS"
+ LIBS="$jm_save_LIBS"
fi
- fi
+ fi
fi
fi
- fi
- if test "$jm_cv_func_iconv" = yes; then
- if test "$jm_cv_giconv" = yes; then
- AC_DEFINE(HAVE_GICONV, 1, [What header to include for iconv() function: giconv.h])
- AC_MSG_RESULT(yes)
- ICONV_FOUND=yes
- else
- if test "$jm_cv_biconv" = yes; then
- AC_DEFINE(HAVE_BICONV, 1, [What header to include for iconv() function: biconv.h])
- AC_MSG_RESULT(yes)
- ICONV_FOUND=yes
+ if test "$jm_cv_func_iconv" = yes; then
+ if test "$jm_cv_giconv" = yes; then
+ AC_DEFINE(HAVE_GICONV, 1, [What header to include for iconv() function: giconv.h])
+ AC_MSG_RESULT(yes)
+ ICONV_FOUND=yes
else
AC_DEFINE(HAVE_ICONV, 1, [What header to include for iconv() function: iconv.h])
AC_MSG_RESULT(yes)
ICONV_FOUND=yes
fi
+ else
+ AC_MSG_RESULT(no)
fi
- else
- AC_MSG_RESULT(no)
- fi
])
AC_DEFUN(rjs_CHARSET,[
More information about the samba-technical
mailing list