aboutsummaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorTor Lillqvist <tml@novell.com>2009-01-30 23:08:31 +0800
committerTor Lillqvist <tml@src.gnome.org>2009-01-30 23:08:31 +0800
commit3462659b0a40d099630be394094788746f470f44 (patch)
treee20f08975bbee1569765a8a21188ae3d50149761 /configure.in
parentdfdaafa8816cf75e3a9a482c1bcbf4b54c331935 (diff)
downloadgsoc2013-evolution-3462659b0a40d099630be394094788746f470f44.tar
gsoc2013-evolution-3462659b0a40d099630be394094788746f470f44.tar.gz
gsoc2013-evolution-3462659b0a40d099630be394094788746f470f44.tar.bz2
gsoc2013-evolution-3462659b0a40d099630be394094788746f470f44.tar.lz
gsoc2013-evolution-3462659b0a40d099630be394094788746f470f44.tar.xz
gsoc2013-evolution-3462659b0a40d099630be394094788746f470f44.tar.zst
gsoc2013-evolution-3462659b0a40d099630be394094788746f470f44.zip
Cross-compilation from Linux to Windows support by Fridrich Strba.
2009-01-29 Tor Lillqvist <tml@novell.com> Cross-compilation from Linux to Windows support by Fridrich Strba. * configure.in: Check for <sys/wait.h>. Don't look for socklen_t on Windows. If cross-compiling, we obviously can't run the test to find out the preferred formats for charset names of iconv(). We know them a priori for Windows, though. For cross-compilation to other platforms more change is needed. * win32/Makefile.am: Use $(DLLTOOL) instead of hardcoding name. svn path=/trunk/; revision=37193
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in86
1 files changed, 51 insertions, 35 deletions
diff --git a/configure.in b/configure.in
index 8015aceffa..fea18b55b1 100644
--- a/configure.in
+++ b/configure.in
@@ -213,29 +213,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 <iconv.h>
-#include <stdlib.h>
-
+#include <stdlib.h>],[
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"
@@ -288,34 +285,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"
@@ -324,20 +335,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 <sys/types.h>
-#include <sys/socket.h>
-socklen_t x;
-],[],[AC_MSG_RESULT(yes)],[
-AC_TRY_COMPILE([#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 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 <sys/types.h>
+ #include <sys/socket.h>
+ socklen_t x;
+ ],[],[AC_MSG_RESULT(yes)],[
+ AC_TRY_COMPILE([#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 appropriate type if socklen_t is not defined])], [
+ AC_MSG_RESULT(int)
+ AC_DEFINE(socklen_t,int)])])
+fi
dnl
dnl Purify support