dnl
AC_DEFUN([WGET_STRUCT_UTIMBUF], [
- AC_MSG_CHECKING([for struct utimbuf])
- if test x"$ac_cv_header_utime_h" = xyes; then
- AC_EGREP_CPP([struct[ ]+utimbuf],
- [#include <utime.h>
- ], [
- AC_DEFINE([HAVE_STRUCT_UTIMBUF], 1,
- [Define if you have struct utimbuf.])
- AC_MSG_RESULT(yes)
- ],
- [AC_MSG_RESULT(no)])
- else
- AC_MSG_RESULT(no)
- fi
+ AC_CHECK_TYPES([struct utimbuf], [], [], [
+#include <stdio.h>
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_UTIME_H
+# include <utime.h>
+#endif
+ ])
])
AC_DEFUN([WGET_SOCKLEN_T], [
AC_MSG_CHECKING(for socklen_t)
- AC_TRY_COMPILE([
+ AC_COMPILE_IFELSE([
#include <sys/types.h>
#include <sys/socket.h>
socklen_t x;
-],
- [], [AC_MSG_RESULT(socklen_t)], [
- AC_TRY_COMPILE([
+ ], [AC_MSG_RESULT(socklen_t)], [
+ AC_COMPILE_IFELSE([
#include <sys/types.h>
#include <sys/socket.h>
int accept (int, struct sockaddr *, size_t *);
-],
- [], [
+ ], [
AC_MSG_RESULT(size_t)
AC_DEFINE([socklen_t], [size_t],
[Define to int or size_t on systems without socklen_t.])
\f
# This code originates from Ulrich Drepper's AM_WITH_NLS.
-AC_DEFUN(WGET_WITH_NLS,
+AC_DEFUN([WGET_WITH_NLS],
[AC_MSG_CHECKING([whether NLS is requested])
dnl Default is enabled NLS
AC_ARG_ENABLE(nls,
dnl last moment.
if test x"$HAVE_NLS" = xyes; then
- AC_MSG_RESULT([language catalogs: $ALL_LINGUAS])
+ dnl If LINGUAS is specified, use only those languages. In fact,
+ dnl compute an intersection of languages in LINGUAS and
+ dnl ALL_LINGUAS, and use that.
+ if test x"$LINGUAS" != x; then
+ new_linguas=
+ for lang1 in $ALL_LINGUAS; do
+ for lang2 in $LINGUAS; do
+ if test "$lang1" = "$lang2"; then
+ new_linguas="$new_linguas $lang1"
+ fi
+ done
+ done
+ ALL_LINGUAS=$new_linguas
+ fi
+ AC_MSG_NOTICE([language catalogs: $ALL_LINGUAS])
AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt)
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
])
])
- dnl These rules are solely for the distribution goal. While doing this
- dnl we only have to keep exactly one list of the available catalogs
- dnl in configure.in.
for lang in $ALL_LINGUAS; do
GMOFILES="$GMOFILES $lang.gmo"
POFILES="$POFILES $lang.po"