aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2007-04-05 02:54:31 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2007-04-05 02:54:31 +0800
commit70e1faf61748fcfc7230c23c58c77c47a05a4214 (patch)
tree173a4d1992f57cb6e2d50c5d4509805951c91aab
parentf25bc6134575acc930b64d779cf8e47ffa84e5c8 (diff)
downloadgsoc2013-evolution-70e1faf61748fcfc7230c23c58c77c47a05a4214.tar.gz
gsoc2013-evolution-70e1faf61748fcfc7230c23c58c77c47a05a4214.tar.zst
gsoc2013-evolution-70e1faf61748fcfc7230c23c58c77c47a05a4214.zip
Use AC_TRY_RUN instead of AC_TRY_LINK when checking for iconv() in -liconv
2007-04-04 Matthew Barnes <mbarnes@redhat.com> * configure.in: Use AC_TRY_RUN instead of AC_TRY_LINK when checking for iconv() in -liconv (#388789). Patch from Elijah Newren. * iconv-detect.c: Fix an implicit function declaration. svn path=/branches/gnome-2-18/; revision=33383
-rw-r--r--ChangeLog7
-rw-r--r--configure.in9
-rw-r--r--iconv-detect.c1
3 files changed, 14 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index a1eed7db7d..23cbdbb124 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2007-04-04 Matthew Barnes <mbarnes@redhat.com>
+ * configure.in: Use AC_TRY_RUN instead of AC_TRY_LINK when checking
+ for iconv() in -liconv (#388789). Patch from Elijah Newren.
+
+ * iconv-detect.c: Fix an implicit function declaration.
+
+2007-04-04 Matthew Barnes <mbarnes@redhat.com>
+
* evolution-plugin.pc.in: Require libxml-2.0.
2007-03-27 Harish Krishnaswamy <harish.krishnaswamy@gmail.com>
diff --git a/configure.in b/configure.in
index 03cc1e6206..85e864a8a6 100644
--- a/configure.in
+++ b/configure.in
@@ -144,12 +144,15 @@ save_CFLAGS="$CFLAGS"
save_LIBS="$LIBS"
CFLAGS="$CFLAGS $ICONV_CFLAGS"
LIBS="$LIBS $ICONV_LIBS -liconv"
-AC_CACHE_CHECK(for iconv in -liconv, ac_cv_libiconv, AC_TRY_LINK([
+AC_CACHE_CHECK(for iconv in -liconv, ac_cv_libiconv, AC_TRY_RUN([
#include <iconv.h>
-], [
+
+int main (int argc, char **argv)
+{
iconv_t cd;
cd = iconv_open ("UTF-8", "ISO-8859-1");
-], ac_cv_libiconv=yes, ac_cv_libiconv=no))
+}
+], ac_cv_libiconv=yes, ac_cv_libiconv=no, ac_cv_libiconv=no))
if test $ac_cv_libiconv = yes; then
ICONV_LIBS="$ICONV_LIBS -liconv"
have_iconv=yes
diff --git a/iconv-detect.c b/iconv-detect.c
index 899d07f239..67dbd8e6bf 100644
--- a/iconv-detect.c
+++ b/iconv-detect.c
@@ -22,6 +22,7 @@
#include <stdio.h>
+#include <stdlib.n>
#include <iconv.h>
enum {