dnl Process this file with autoconf to produce a configure script.
dnl $Id$
-AC_INIT([WebCit], [7.24], [http://www.citadel.org/])
+AC_INIT([WebCit], [7.31], [http://www.citadel.org/])
AC_SUBST(PROG_SUBDIRS)
AC_DEFINE(PROG_SUBDIRS, [], [Program dirs])
AC_CHECK_HEADER(libcitadel.h,
[AC_CHECK_LIB(citadel, libcitadel_version_string,
[
- AC_MSG_RESULT(OK)
LIBS="-lcitadel $LIBS"
],
[
)
fi
-if test "$ok_iconv" = "no"; then
- LD_FLAGS_BEFORE=$LDFLAGS
- LDFLAGS="$LDFLAGS -liconv"
- AC_TRY_RUN([
- #include <iconv.h>
- main() {
- iconv_t ic = (iconv_t)(-1) ;
- ic = iconv_open("UTF-8", "us-ascii");
- iconv_close(ic);
- exit(0);
- }
- ],
- ok_iconv=yes,
- ok_iconv=no
+dnl Check for iconv in external libiconv
+if test "$ok_nls" != "no"; then
+ if test "$ok_nls" == "no" ; then
+ AC_MSG_RESULT(Checking for an external libiconv...)
+ AC_CHECK_HEADER(iconv.h,
+ [
+ AC_CHECK_LIB(iconv, iconv_open,
+ [
+ LIBS="-liconv $LIBS"
+ ok_iconv=yes
+ ]
+ )
+ ]
)
- if test "$ok_iconv" != "no"; then
- LDFLAGS=$LD_FLAGS_BEFORE
- fi
+ fi
fi
if test "$ok_iconv" != "no"; then
dnl Here is the check for libintl etc.
+AC_CHECK_FUNCS(strftime_l uselocale gettext)
AC_ARG_ENABLE(nls,
[ --disable-nls do not use Native Language Support],
ok_nls=no, ok_nls=yes)
-if test "$ok_nls" != "no"; then
- AC_MSG_RESULT(Checking for per-thread NLS support...)
- AC_TRY_RUN([
- #define _GNU_SOURCE
- #include <libintl.h>
- #include <locale.h>
- #include <time.h>
- main() {
- char *foo = NULL;
- char baz[32];
- struct tm *tm;
- uselocale(LC_GLOBAL_LOCALE);
- foo = gettext("bar");
- if (0) {
- strftime_l(baz, sizeof baz, "%c", tm, LC_GLOBAL_LOCALE);
- }
- exit(0);
- }
- ],
- ok_uselocale=yes,
- ok_uselocale=no
- )
- ok_nls=$ok_uselocale
-fi
+dnl if test "$ok_nls" != "no"; then
+dnl AC_MSG_RESULT(Checking for per-thread NLS support...)
+dnl AC_TRY_RUN([
+dnl #define _GNU_SOURCE
+dnl #include <libintl.h>
+dnl #include <locale.h>
+dnl #include <time.h>
+dnl main() {
+dnl char *foo = NULL;
+dnl char baz[32];
+dnl struct tm *tm;
+dnl uselocale(LC_GLOBAL_LOCALE);
+dnl foo = gettext("bar");
+dnl if (0) {
+dnl strftime_l(baz, sizeof baz, "%c", tm, LC_GLOBAL_LOCALE);
+dnl }
+dnl exit(0);
+dnl }
+dnl ],
+dnl ok_uselocale=yes,
+dnl ok_uselocale=no
+dnl )
+dnl ok_nls=$ok_uselocale
+dnl fi
if test "$ok_nls" != "no"; then
AC_CHECK_PROG(ok_xgettext, xgettext, yes, no)