From fee5916b60c605ff5086d8fdc2a85c5ea21351f6 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sat, 31 Jan 2009 19:03:12 +0000 Subject: Merge revisions 37108:37199 from trunk. svn path=/branches/kill-bonobo/; revision=37200 --- configure.in | 88 +++++++++++++++++++++++++++++++++++------------------------- 1 file changed, 52 insertions(+), 36 deletions(-) (limited to 'configure.in') diff --git a/configure.in b/configure.in index 8018da60f8..69bab47bf7 100644 --- a/configure.in +++ b/configure.in @@ -3,7 +3,7 @@ AC_PREREQ(2.52) m4_define([evo_major_version], [2]) m4_define([evo_minor_version], [25]) -m4_define([evo_micro_version], [5]) +m4_define([evo_micro_version], [90]) m4_define([evo_version], [evo_major_version.evo_minor_version.evo_micro_version]) m4_define([evo_stable_version], @@ -215,29 +215,26 @@ have_iconv=no AC_ARG_WITH([libiconv], AC_HELP_STRING([--with-libiconv=PATH], [Prefix where libiconv is installed])) -case $withval in -/*) +if test -d $withval; then ICONV_CFLAGS="-I$withval/include" ICONV_LIBS="-L$withval/lib" - ;; -esac +fi 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_RUN([ + AC_TRY_LINK([ #include -#include - +#include ],[ int main (int argc, char **argv) { iconv_t cd; cd = iconv_open ("UTF-8", "ISO-8859-1"); exit (0); } -], [ac_cv_libiconv=yes], [ac_cv_libiconv=no], [ac_cv_libiconv=no])) +], [ac_cv_libiconv=yes], [ac_cv_libiconv=no])) if test $ac_cv_libiconv = yes; then ICONV_LIBS="$ICONV_LIBS -liconv" @@ -290,34 +287,48 @@ int main (int argc, char **argv) exit (1); exit (0); -}], ac_cv_libiconv_utf8=yes, [ac_cv_libiconv_utf8=no; have_iconv=no], [ac_cv -_libiconv_utf8=no; have_iconv=no])) +}], ac_cv_libiconv_utf8=yes, [ac_cv_libiconv_utf8=no; have_iconv=no], [ac_cv_libiconv_utf8=hopefully])) fi if test "$have_iconv" = no; then - AC_MSG_ERROR([You need to install a working iconv implementation, su -ch as ftp://ftp.gnu.org/pub/gnu/libiconv]) + AC_MSG_ERROR([You need to install a working iconv implementation, such as ftp://ftp.gnu.org/pub/gnu/libiconv]) fi AC_SUBST(ICONV_CFLAGS) AC_SUBST(ICONV_LIBS) CFLAGS="$CFLAGS -I$srcdir" -AC_MSG_CHECKING(preferred charset formats for system iconv) +AC_MSG_CHECKING(preferred charset name formats for system iconv) AC_TRY_RUN([ #define CONFIGURE_IN #include "iconv-detect.c" ],[ AC_MSG_RESULT(found) ],[ - AC_MSG_RESULT(not found) - AC_WARN([ - *** The iconv-detect program was unable to determine the - *** preferred charset formats recognized by your system - *** iconv library. It is suggested that you install a - *** working iconv library such as the one found at - *** ftp://ftp.gnu.org/pub/gnu/libiconv - ]) + AC_MSG_RESULT(not found) + AC_WARN([ + *** The iconv-detect program was unable to determine the + *** preferred charset name formats recognized by your + *** iconv library. It is suggested that you install a + *** working iconv library such as the one found at + *** ftp://ftp.gnu.org/pub/gnu/libiconv +])],[ + if test x$os_win32 = xyes; then + AC_MSG_RESULT([using known win32 result]) + echo '/* This is an auto-generated header, DO NOT EDIT! */' > iconv-detect.h + echo >>iconv-detect.h + echo '#define ICONV_ISO_D_FORMAT "iso-%d-%d"' >>iconv-detect.h + echo '#define ICONV_ISO_S_FORMAT "iso-%d-%s"' >>iconv-detect.h + echo '#define ICONV_10646 "UCS-4BE"' >>iconv-detect.h + else + AC_MSG_RESULT(unknown) + AC_WARN([ + *** We can't determine the preferred charset name formats + *** recognized by your iconv library. You are + *** cross-compiling and supposed to know what you are doing. + *** Please construct the iconv-detect.h file manually. + ]) + fi ]) CFLAGS="$save_CFLAGS" @@ -326,20 +337,25 @@ LIBS="$save_LIBS" dnl alloca() AC_CHECK_HEADERS(alloca.h) -dnl check for socklen_t (in Unix98) -AC_MSG_CHECKING(for socklen_t) -AC_TRY_COMPILE([#include -#include -socklen_t x; -],[],[AC_MSG_RESULT(yes)],[ -AC_TRY_COMPILE([#include -#include -int accept (int, struct sockaddr *, size_t *); -],[],[ -AC_MSG_RESULT(size_t) -AC_DEFINE(socklen_t,size_t,[Define to appropriate type if socklen_t is not defined])], [ -AC_MSG_RESULT(int) -AC_DEFINE(socklen_t,int)])]) +dnl waitpid() etc +AC_CHECK_HEADERS(sys/wait.h) + +if test x$os_win32 != xyes; then + dnl check for socklen_t (in Unix98) + AC_MSG_CHECKING(for socklen_t) + AC_TRY_COMPILE([#include + #include + socklen_t x; + ],[],[AC_MSG_RESULT(yes)],[ + AC_TRY_COMPILE([#include + #include + int accept (int, struct sockaddr *, size_t *); + ],[],[ + AC_MSG_RESULT(size_t) + AC_DEFINE(socklen_t,size_t,[Define to appropriate type if socklen_t is not defined])], [ + AC_MSG_RESULT(int) + AC_DEFINE(socklen_t,int)])]) +fi dnl dnl Purify support -- cgit v1.2.3