| 11 |
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A |
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A |
| 12 |
# PARTICULAR PURPOSE. |
# PARTICULAR PURPOSE. |
| 13 |
|
|
| 14 |
|
#serial AM2 |
| 15 |
|
|
| 16 |
|
dnl From Bruno Haible. |
| 17 |
|
|
| 18 |
|
AC_DEFUN([AM_ICONV], |
| 19 |
|
[ |
| 20 |
|
dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and |
| 21 |
|
dnl those with the standalone portable GNU libiconv installed). |
| 22 |
|
|
| 23 |
|
AC_ARG_WITH([libiconv-prefix], |
| 24 |
|
[ --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib], [ |
| 25 |
|
for dir in `echo "$withval" | tr : ' '`; do |
| 26 |
|
if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi |
| 27 |
|
if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi |
| 28 |
|
done |
| 29 |
|
]) |
| 30 |
|
|
| 31 |
|
AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [ |
| 32 |
|
am_cv_func_iconv="no, consider installing GNU libiconv" |
| 33 |
|
am_cv_lib_iconv=no |
| 34 |
|
AC_TRY_LINK([#include <stdlib.h> |
| 35 |
|
#include <iconv.h>], |
| 36 |
|
[iconv_t cd = iconv_open("",""); |
| 37 |
|
iconv(cd,NULL,NULL,NULL,NULL); |
| 38 |
|
iconv_close(cd);], |
| 39 |
|
am_cv_func_iconv=yes) |
| 40 |
|
if test "$am_cv_func_iconv" != yes; then |
| 41 |
|
am_save_LIBS="$LIBS" |
| 42 |
|
LIBS="$LIBS -liconv" |
| 43 |
|
AC_TRY_LINK([#include <stdlib.h> |
| 44 |
|
#include <iconv.h>], |
| 45 |
|
[iconv_t cd = iconv_open("",""); |
| 46 |
|
iconv(cd,NULL,NULL,NULL,NULL); |
| 47 |
|
iconv_close(cd);], |
| 48 |
|
am_cv_lib_iconv=yes |
| 49 |
|
am_cv_func_iconv=yes) |
| 50 |
|
LIBS="$am_save_LIBS" |
| 51 |
|
fi |
| 52 |
|
]) |
| 53 |
|
if test "$am_cv_func_iconv" = yes; then |
| 54 |
|
AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.]) |
| 55 |
|
AC_MSG_CHECKING([for iconv declaration]) |
| 56 |
|
AC_CACHE_VAL(am_cv_proto_iconv, [ |
| 57 |
|
AC_TRY_COMPILE([ |
| 58 |
|
#include <stdlib.h> |
| 59 |
|
#include <iconv.h> |
| 60 |
|
extern |
| 61 |
|
#ifdef __cplusplus |
| 62 |
|
"C" |
| 63 |
|
#endif |
| 64 |
|
#if defined(__STDC__) || defined(__cplusplus) |
| 65 |
|
size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); |
| 66 |
|
#else |
| 67 |
|
size_t iconv(); |
| 68 |
|
#endif |
| 69 |
|
], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const") |
| 70 |
|
am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) |
| 71 |
|
am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` |
| 72 |
|
AC_MSG_RESULT([$]{ac_t:- |
| 73 |
|
}[$]am_cv_proto_iconv) |
| 74 |
|
AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1, |
| 75 |
|
[Define as const if the declaration of iconv() needs const.]) |
| 76 |
|
fi |
| 77 |
|
LIBICONV= |
| 78 |
|
if test "$am_cv_lib_iconv" = yes; then |
| 79 |
|
LIBICONV="-liconv" |
| 80 |
|
fi |
| 81 |
|
AC_SUBST(LIBICONV) |
| 82 |
|
]) |
| 83 |
|
|
| 84 |
|
~ |
| 85 |
|
~ |
| 86 |
|
~ |
| 87 |
|
~ |
| 88 |
|
~ |
| 89 |
|
~ |
| 90 |
|
|
| 91 |
|
|
| 92 |
# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. |
# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. |
| 93 |
# |
# |
| 94 |
# This file is free software; the Free Software Foundation |
# This file is free software; the Free Software Foundation |
| 430 |
# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. |
# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. |
| 431 |
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) |
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) |
| 432 |
|
|
|
#serial AM2 |
|
|
|
|
|
dnl From Bruno Haible. |
|
|
|
|
|
AC_DEFUN([AM_ICONV], |
|
|
[ |
|
|
dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and |
|
|
dnl those with the standalone portable GNU libiconv installed). |
|
|
|
|
|
AC_ARG_WITH([libiconv-prefix], |
|
|
[ --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib], [ |
|
|
for dir in `echo "$withval" | tr : ' '`; do |
|
|
if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi |
|
|
if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi |
|
|
done |
|
|
]) |
|
|
|
|
|
AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [ |
|
|
am_cv_func_iconv="no, consider installing GNU libiconv" |
|
|
am_cv_lib_iconv=no |
|
|
AC_TRY_LINK([#include <stdlib.h> |
|
|
#include <iconv.h>], |
|
|
[iconv_t cd = iconv_open("",""); |
|
|
iconv(cd,NULL,NULL,NULL,NULL); |
|
|
iconv_close(cd);], |
|
|
am_cv_func_iconv=yes) |
|
|
if test "$am_cv_func_iconv" != yes; then |
|
|
am_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);], |
|
|
am_cv_lib_iconv=yes |
|
|
am_cv_func_iconv=yes) |
|
|
LIBS="$am_save_LIBS" |
|
|
fi |
|
|
]) |
|
|
if test "$am_cv_func_iconv" = yes; then |
|
|
AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.]) |
|
|
AC_MSG_CHECKING([for iconv declaration]) |
|
|
AC_CACHE_VAL(am_cv_proto_iconv, [ |
|
|
AC_TRY_COMPILE([ |
|
|
#include <stdlib.h> |
|
|
#include <iconv.h> |
|
|
extern |
|
|
#ifdef __cplusplus |
|
|
"C" |
|
|
#endif |
|
|
#if defined(__STDC__) || defined(__cplusplus) |
|
|
size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); |
|
|
#else |
|
|
size_t iconv(); |
|
|
#endif |
|
|
], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const") |
|
|
am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) |
|
|
am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` |
|
|
AC_MSG_RESULT([$]{ac_t:- |
|
|
}[$]am_cv_proto_iconv) |
|
|
AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1, |
|
|
[Define as const if the declaration of iconv() needs const.]) |
|
|
fi |
|
|
LIBICONV= |
|
|
if test "$am_cv_lib_iconv" = yes; then |
|
|
LIBICONV="-liconv" |
|
|
fi |
|
|
AC_SUBST(LIBICONV) |
|
|
]) |
|
|
|
|
| 433 |
# Do all the work for Automake. -*- Autoconf -*- |
# Do all the work for Automake. -*- Autoconf -*- |
| 434 |
|
|
| 435 |
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 |
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 |