aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog14
-rw-r--r--configure.in86
-rw-r--r--win32/Makefile.am14
3 files changed, 72 insertions, 42 deletions
diff --git a/ChangeLog b/ChangeLog
index ce44485af5..ef69d990d7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+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.
+
2009-01-29 Srinivasa Ragavan <sragavan@novell.com>
* tools/killev.c: Added another pattern to killev.
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
diff --git a/win32/Makefile.am b/win32/Makefile.am
index c8e5297334..8d4f0859e2 100644
--- a/win32/Makefile.am
+++ b/win32/Makefile.am
@@ -29,36 +29,36 @@ noinst_DATA = $(BOOTSTRAP_LIBS)
libemiscwidgets.la: dummy.la libemiscwidgets.def
sed -e s!%DLL%!libemiscwidgets-0! -e s!%LIB%!libemiscwidgets! -e s!%PFX%!$(prefix)! <dummy.la >$@
mkdir -p .libs
- dlltool --output-lib=.libs/libemiscwidgets.dll.a --dllname=libemiscwidgets-0.dll --input-def=libemiscwidgets.def
+ $(DLLTOOL) --output-lib=.libs/libemiscwidgets.dll.a --dllname=libemiscwidgets-0.dll --input-def=libemiscwidgets.def
libetable.la: dummy.la libetable.def
sed -e s!%DLL%!libetable-0! -e s!%LIB%!libetable! -e s!%PFX%!$(prefix)! <dummy.la >$@
mkdir -p .libs
- dlltool --output-lib=.libs/libetable.dll.a --dllname=libetable-0.dll --input-def=libetable.def
+ $(DLLTOOL) --output-lib=.libs/libetable.dll.a --dllname=libetable-0.dll --input-def=libetable.def
libetext.la: dummy.la libetext.def
sed -e s!%DLL%!libetext-0! -e s!%LIB%!libetext! -e s!%PFX%!$(prefix)! <dummy.la >$@
mkdir -p .libs
- dlltool --output-lib=.libs/libetext.dll.a --dllname=libetext-0.dll --input-def=libetext.def
+ $(DLLTOOL) --output-lib=.libs/libetext.dll.a --dllname=libetext-0.dll --input-def=libetext.def
libevolution-addressbook.la: dummy.la libevolution-addressbook.def
sed -e s!%DLL%!libevolution-addressbook! -e s!%LIB%!libevolution-addressbook! -e s!%PFX%!$(prefix)! <dummy.la >$@
mkdir -p .libs
- dlltool --output-lib=.libs/libevolution-addressbook.dll.a --dllname=libevolution-addressbook.dll --input-def=libevolution-addressbook.def
+ $(DLLTOOL) --output-lib=.libs/libevolution-addressbook.dll.a --dllname=libevolution-addressbook.dll --input-def=libevolution-addressbook.def
libevolution-calendar.la: dummy.la libevolution-calendar.def
sed -e s!%DLL%!libevolution-calendar! -e s!%LIB%!libevolution-calendar! -e s!%PFX%!$(prefix)! <dummy.la >$@
mkdir -p .libs
- dlltool --output-lib=.libs/libevolution-calendar.dll.a --dllname=libevolution-calendar.dll --input-def=libevolution-calendar.def
+ $(DLLTOOL) --output-lib=.libs/libevolution-calendar.dll.a --dllname=libevolution-calendar.dll --input-def=libevolution-calendar.def
libevolution-mail.la: dummy.la libevolution-mail.def
sed -e s!%DLL%!libevolution-mail! -e s!%LIB%!libevolution-mail! -e s!%PFX%!$(prefix)! <dummy.la >$@
mkdir -p .libs
- dlltool --output-lib=.libs/libevolution-mail.dll.a --dllname=libevolution-mail.dll --input-def=libevolution-mail.def
+ $(DLLTOOL) --output-lib=.libs/libevolution-mail.dll.a --dllname=libevolution-mail.dll --input-def=libevolution-mail.def
libfilter.la: dummy.la libfilter.def
sed -e s!%DLL%!libfilter-0! -e s!%LIB%!libfilter! -e s!%PFX%!$(prefix)! <dummy.la >$@
mkdir -p .libs
- dlltool --output-lib=.libs/libfilter.dll.a --dllname=libfilter-0.dll --input-def=libfilter.def
+ $(DLLTOOL) --output-lib=.libs/libfilter.dll.a --dllname=libfilter-0.dll --input-def=libfilter.def
CLEANFILES = $(BOOTSTRAP_LIBS)