diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2006-05-13 17:13:46 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:05:57 -0500 |
commit | 089cbd4a8e8108306ba92b01746ecd261e9fdd7c (patch) | |
tree | 40dcac0af3f7f45aa0bd1857c419d115138f16dc /source4/aclocal.m4 | |
parent | 8afca7791c2e797dc6f2a491b02fbb2daa26f52c (diff) | |
download | samba-089cbd4a8e8108306ba92b01746ecd261e9fdd7c.tar.gz |
r15568: Simplify detection of iconv libraries a fair bit and fix it to
work on FreeBSD.
Based very loosely on a patch by Timur Bakevey
Fixes #3688
(This used to be commit ea7b28572b453da8eced565a49e4c10e7ebd2e28)
Diffstat (limited to 'source4/aclocal.m4')
-rw-r--r-- | source4/aclocal.m4 | 92 |
1 files changed, 0 insertions, 92 deletions
diff --git a/source4/aclocal.m4 b/source4/aclocal.m4 index 4264ddf633d..9c7b4e85c10 100644 --- a/source4/aclocal.m4 +++ b/source4/aclocal.m4 @@ -222,98 +222,6 @@ AC_DEFUN(LIB_REMOVE_USR_LIB,[ $1=[$]ac_new_flags ]) -dnl From Bruno Haible. - -AC_DEFUN(jm_ICONV, -[ - dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and - dnl those with the standalone portable libiconv installed). - AC_MSG_CHECKING(for iconv in $1) - jm_cv_func_iconv="no" - jm_cv_lib_iconv=no - jm_cv_giconv=no - 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_giconv=yes) - - if test "$jm_cv_func_iconv" != yes; then - 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_func_iconv=yes) - - if test "$jm_cv_lib_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_giconv=yes) - 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> -#include <iconv.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) - LIBS="$jm_save_LIBS" - 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 - 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 - if test "$jm_cv_lib_iconv" = yes; then - if test "$jm_cv_giconv" = yes; then - LIBS="$LIBS -lgiconv" - else - LIBS="$LIBS -liconv" - fi - fi -]) - -dnl CFLAGS_ADD_DIR(CFLAGS, $INCDIR) -dnl This function doesn't add -I/usr/include into CFLAGS -AC_DEFUN(CFLAGS_ADD_DIR,[ -if test "$2" != "/usr/include" ; then - $1="$$1 -I$2" -fi -]) - -dnl LIB_ADD_DIR(LDFLAGS, $LIBDIR) -dnl This function doesn't add -L/usr/lib into LDFLAGS -AC_DEFUN(LIB_ADD_DIR,[ -if test "$2" != "/usr/lib" ; then - $1="$$1 -L$2" -fi -]) - sinclude(build/m4/public.m4) sinclude(build/m4/core.m4) sinclude(build/m4/ax_cflags_gcc_option.m4) |