evolution r37193 - in trunk: . win32



Author: tml
Date: Fri Jan 30 15:08:31 2009
New Revision: 37193
URL: http://svn.gnome.org/viewvc/evolution?rev=37193&view=rev

Log:
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.



Modified:
   trunk/ChangeLog
   trunk/configure.in
   trunk/win32/Makefile.am

Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in	(original)
+++ trunk/configure.in	Fri Jan 30 15:08:31 2009
@@ -213,29 +213,26 @@
 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 @@
                 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 @@
 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

Modified: trunk/win32/Makefile.am
==============================================================================
--- trunk/win32/Makefile.am	(original)
+++ trunk/win32/Makefile.am	Fri Jan 30 15:08:31 2009
@@ -29,36 +29,36 @@
 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)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]