summaryrefslogtreecommitdiffstats
path: root/source3/aclocal.m4
diff options
context:
space:
mode:
authorRichard Sharpe <sharpe@samba.org>2003-07-09 23:01:08 +0000
committerRichard Sharpe <sharpe@samba.org>2003-07-09 23:01:08 +0000
commita7ef6aac3a78e7d98956d64ea6f858b1f20d0a19 (patch)
tree97a3ba6a1599682b7d07d69d1292305f012155d7 /source3/aclocal.m4
parent2a1e3b75488081a9451363714b9e5dc0f8839582 (diff)
downloadsamba-a7ef6aac3a78e7d98956d64ea6f858b1f20d0a19.tar.gz
samba-a7ef6aac3a78e7d98956d64ea6f858b1f20d0a19.tar.xz
samba-a7ef6aac3a78e7d98956d64ea6f858b1f20d0a19.zip
Fix a small spelling mistake and push out the new version of aclocal.m4 to
properly handle iconv on FreeBSD ... It works on Linux and FreeBSD ... (This used to be commit 9302401f543bd3684657b38f046dc52a5a732035)
Diffstat (limited to 'source3/aclocal.m4')
-rw-r--r--source3/aclocal.m489
1 files changed, 59 insertions, 30 deletions
diff --git a/source3/aclocal.m4 b/source3/aclocal.m4
index 2661d5299fd..c877792f709 100644
--- a/source3/aclocal.m4
+++ b/source3/aclocal.m4
@@ -64,6 +64,7 @@ AC_DEFUN(SMB_MODULE,
else
AC_MSG_RESULT([not])
fi
+ MODULES_CLEAN="$MODULES_CLEAN $2 $3"
])
AC_DEFUN(SMB_SUBSYSTEM,
@@ -532,59 +533,83 @@ AC_DEFUN(jm_ICONV,
jm_cv_func_iconv="no"
jm_cv_lib_iconv=no
jm_cv_giconv=no
+ jm_save_LIBS="$LIBS"
+ LIBS="$LIBS -lbiconv"
AC_TRY_LINK([#include <stdlib.h>
-#include <giconv.h>],
- [iconv_t cd = iconv_open("","");
- iconv(cd,NULL,NULL,NULL,NULL);
- iconv_close(cd);],
+#include <biconv.h>],
+ [iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);],
jm_cv_func_iconv=yes
- jm_cv_giconv=yes)
+ jm_cv_biconv=yes
+ jm_cv_include="biconv.h"
+ jm_cv_lib_iconv="yes")
+ LIBS="$jm_save_LIBS"
- if test "$jm_cv_func_iconv" != yes; then
+ if test "$jm_cv_func_iconv" != yes; then
AC_TRY_LINK([#include <stdlib.h>
-#include <iconv.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_func_iconv=yes
+ jm_cv_include="giconv.h"
+ 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_include="iconv.h"
+ jm_cv_func_iconv=yes)
- if test "$jm_cv_lib_iconv" != yes; then
+ 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_include="giconv.h"
+ jm_cv_giconv=yes)
+ LIBS="$jm_save_LIBS"
+
+ if test "$jm_cv_func_iconv" != yes; then
jm_save_LIBS="$LIBS"
- LIBS="$LIBS -lgiconv"
+ LIBS="$LIBS -liconv"
AC_TRY_LINK([#include <stdlib.h>
-#include <giconv.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
- jm_cv_giconv=yes)
+ jm_cv_include="iconv.h"
+ jm_cv_func_iconv=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
-
+ 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
+ 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
+ else
+ AC_DEFINE(HAVE_ICONV, 1, [What header to include for iconv() function: iconv.h])
+ AC_MSG_RESULT(yes)
+ ICONV_FOUND=yes
+ fi
fi
else
AC_MSG_RESULT(no)
@@ -593,7 +618,11 @@ AC_DEFUN(jm_ICONV,
if test "$jm_cv_giconv" = yes; then
LIBS="$LIBS -lgiconv"
else
- LIBS="$LIBS -liconv"
+ if test "$jm_cv_biconv" = yes; then
+ LIBS="$LIBS -lbiconv"
+ else
+ LIBS="$LIBS -liconv"
+ fi
fi
fi
])