[gmime/gmime-2-2] simplified cross-compilation support
- From: Jeffrey Stedfast <fejj src gnome org>
- To: svn-commits-list gnome org
- Subject: [gmime/gmime-2-2] simplified cross-compilation support
- Date: Thu, 2 Jul 2009 13:09:11 +0000 (UTC)
commit 0d417ae86735f6ffe5812b092e02bbe46df3712e
Author: Jeffrey Stedfast <fejj gnome org>
Date: Thu Jul 2 09:08:25 2009 -0400
simplified cross-compilation support
2009-07-02 Stanislav Brabec <sbrabec sue cz>
* configure.in: Simplified configuring of gmime in a
cross-compilation environment. Make it possible to work-around
AC_TRY_RUN limitations by copying of target system iconv-detect.h
and setting ac_cv_have_iconv_detect_h=yes.
ChangeLog | 7 +++++++
configure.in | 23 +++++++++++++++--------
2 files changed, 22 insertions(+), 8 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 00c7565..efab043 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-07-02 Stanislav Brabec <sbrabec sue cz>
+
+ * configure.in: Simplified configuring of gmime in a
+ cross-compilation environment. Make it possible to work-around
+ AC_TRY_RUN limitations by copying of target system iconv-detect.h
+ and setting ac_cv_have_iconv_detect_h=yes.
+
2008-09-14 Jeffrey Stedfast <fejj novell com>
* README: Bumped version
diff --git a/configure.in b/configure.in
index 168ddb2..7607f08 100644
--- a/configure.in
+++ b/configure.in
@@ -169,14 +169,21 @@ CFLAGS="$CFLAGS -I$srcdir"
LIBS_save="$LIBS"
LIBS="$LIBS $LIBICONV"
-AC_MSG_CHECKING(preferred charset formats for system iconv)
-AC_TRY_RUN([
-#define CONFIGURE_IN
-#include "iconv-detect.c"
-],[
- AC_MSG_RESULT(found)
+AC_CACHE_CHECK([preferred charset formats for system iconv], [ac_cv_have_iconv_detect_h], [
+ AC_RUN_IFELSE([AC_LANG_SOURCE([
+ #define CONFIGURE_IN
+ #include "iconv-detect.c"
+ ])],
+ [ac_cv_have_iconv_detect_h=yes], [ac_cv_have_iconv_detect_h=no],
+ [
+ AC_MSG_RESULT([cannot run test program while cross compiling])
+ AC_MSG_ERROR([Please set ac_cv_have_iconv_detect_h to yes iconv-detect.h file.])
+ ])
+])
+if test "x$ac_cv_have_iconv_detect_h" = xyes; then
+ AC_MSG_RESULT([found])
AC_DEFINE(HAVE_ICONV_DETECT_H, 1, [Define to 1 to use auto-detected iconv-friendly charset names.])
-],[
+else
AC_MSG_RESULT([not found
*** The iconv-detect program was unable to determine the
*** preferred charset formats recognized by your system
@@ -186,7 +193,7 @@ AC_TRY_RUN([
***
*** Default charset formats will be used.
])
-])
+fi
CFLAGS="$CFLAGS_save"
LIBS="$LIBS_save"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]