Re: [Evolution-hackers] e-d-s/libdb Win32 portability patch



I am not sure if eds would work against any current binary distribution
of libdb, in Win32 or even Linux. A specific (unchanged) version of
db is part of the e-d-s module, for this very reason.

Moreover,  we are also exploring how to get rid of it.
(http://go-evolution.org/TwoFourTaskList - kill off db for get changes
stuff). Can you help me understand your work/plans on this, pl ?	

--Harish

On Thu, 2005-05-19 at 17:37 +0300, Tor Lillqvist wrote:
> Would it be OK to apply this? Yes, I know that it's silly to change
> libdb/dist/configure.ac *and* add corresponding changes "manually" to
> libdb/dist/configure. Would just patching libdb/dist/configure.ac and
> re-running autoconf etc, and committing the freshly generated files in
> libdb be a better idea? But we don't even have any Makefile.ams for
> libdb?
> 
> Note that this is just to get libdb to build on Win32 as part of e-d-s
> for now; it might well be that after all it turns out to be a better
> idea to not build libdb as part of e-d-s (on Win32) and instead use an
> official binary distribution.
> 
> --tml
> 
> Index: libdb/dist/Makefile.in
> ===================================================================
> RCS file: /cvs/gnome/evolution-data-server/libdb/dist/Makefile.in,v
> retrieving revision 1.4
> diff -p -u -2 -r1.4 Makefile.in
> --- libdb/dist/Makefile.in	24 Feb 2004 21:05:39 -0000	1.4
> +++ libdb/dist/Makefile.in	19 May 2005 12:42:24 -0000
> @@ -365,6 +365,7 @@ RPC_JAVASRV_SRCS=\
>  UTIL_PROGS=\
>  	@ADDITIONAL_PROGS@ \
> -	db_archive db_checkpoint db_deadlock \
> -	db_dump db_load db_printlog db_recover db_stat db_upgrade db_verify
> +	db_archive EXEEXT@ db_checkpoint EXEEXT@ db_deadlock EXEEXT@ \
> +	db_dump EXEEXT@ db_load EXEEXT@ db_printlog EXEEXT@ \
> +	db_recover EXEEXT@ db_stat EXEEXT@ db_upgrade EXEEXT@ db_verify EXEEXT@
>  
>  ##################################################
> @@ -483,51 +484,51 @@ berkeley_db_javasvc: $(rpc_jarfile)
>  	chmod +x $@
>  
> -db_archive: db_archive o@ util_sig o@ $(DEF_LIB)
> +db_archive EXEEXT@: db_archive o@ util_sig o@ $(DEF_LIB)
>  	$(CCLINK) -o $@ $(LDFLAGS) \
>  	    db_archive o@ util_sig o@ $(DEF_LIB) $(LIBS)
>  	$(POSTLINK) $@
>  
> -db_checkpoint: db_checkpoint o@ util_log o@ util_sig o@ $(DEF_LIB)
> +db_checkpoint EXEEXT@: db_checkpoint o@ util_log o@ util_sig o@ $(DEF_LIB)
>  	$(CCLINK) -o $@ $(LDFLAGS) \
>  	    db_checkpoint o@ util_log o@ util_sig o@ $(DEF_LIB) $(LIBS)
>  	$(POSTLINK) $@
>  
> -db_deadlock: db_deadlock o@ util_log o@ util_sig o@ $(DEF_LIB)
> +db_deadlock EXEEXT@: db_deadlock o@ util_log o@ util_sig o@ $(DEF_LIB)
>  	$(CCLINK) -o $@ $(LDFLAGS) \
>  	    db_deadlock o@ util_log o@ util_sig o@ $(DEF_LIB) $(LIBS)
>  	$(POSTLINK) $@
>  
> -db_dump: db_dump o@ util_cache o@ util_sig o@ $(DEF_LIB)
> +db_dump EXEEXT@: db_dump o@ util_cache o@ util_sig o@ $(DEF_LIB)
>  	$(CCLINK) -o $@ $(LDFLAGS) db_dump o@ util_cache o@ util_sig o@ $(DEF_LIB) $(LIBS)
>  	$(POSTLINK) $@
>  
> -db_dump185: db_dump185 o@ @LTLIBOBJS@
> +db_dump185 EXEEXT@: db_dump185 o@ @LTLIBOBJS@
>  	$(CCLINK) -o $@ $(LDFLAGS) db_dump185 o@ @LTLIBOBJS@ $(DB185LIB)
>  	$(POSTLINK) $@
>  
> -db_load: db_load o@ util_cache o@ util_sig o@ $(DEF_LIB)
> +db_load EXEEXT@: db_load o@ util_cache o@ util_sig o@ $(DEF_LIB)
>  	$(CCLINK) -o $@ $(LDFLAGS) db_load o@ util_cache o@ util_sig o@ $(DEF_LIB) $(LIBS)
>  	$(POSTLINK) $@
>  
> -db_printlog: db_printlog o@ util_sig o@ $(DEF_LIB)
> +db_printlog EXEEXT@: db_printlog o@ util_sig o@ $(DEF_LIB)
>  	$(CCLINK) -o $@ $(LDFLAGS) \
>  	    db_printlog o@ util_sig o@ $(DEF_LIB) $(LIBS)
>  	$(POSTLINK) $@
>  
> -db_recover: db_recover o@ util_sig o@ $(DEF_LIB)
> +db_recover EXEEXT@: db_recover o@ util_sig o@ $(DEF_LIB)
>  	$(CCLINK) -o $@ $(LDFLAGS) \
>  	    db_recover o@ util_sig o@ $(DEF_LIB) $(LIBS)
>  	$(POSTLINK) $@
>  
> -db_stat: db_stat o@ util_cache o@ util_sig o@ $(DEF_LIB)
> +db_stat EXEEXT@: db_stat o@ util_cache o@ util_sig o@ $(DEF_LIB)
>  	$(CCLINK) -o $@ $(LDFLAGS) db_stat o@ util_cache o@ util_sig o@ $(DEF_LIB) $(LIBS)
>  	$(POSTLINK) $@
>  
> -db_upgrade: db_upgrade o@ util_sig o@ $(DEF_LIB)
> +db_upgrade EXEEXT@: db_upgrade o@ util_sig o@ $(DEF_LIB)
>  	$(CCLINK) -o $@ $(LDFLAGS) \
>  	    db_upgrade o@ util_sig o@ $(DEF_LIB) $(LIBS)
>  	$(POSTLINK) $@
>  
> -db_verify: db_verify o@ util_cache o@ util_sig o@ $(DEF_LIB)
> +db_verify EXEEXT@: db_verify o@ util_cache o@ util_sig o@ $(DEF_LIB)
>  	$(CCLINK) -o $@ $(LDFLAGS) \
>  	    db_verify o@ util_cache o@ util_sig o@ $(DEF_LIB) $(LIBS)
> @@ -1120,25 +1121,25 @@ mut_tas o@: $(srcdir)/mutex/mut_tas.c
>  mutex o@: $(srcdir)/mutex/mutex.c
>  	 $(CC) $(CFLAGS) $?
> -os_abs o@: $(srcdir)/os/os_abs.c
> +os_abs o@: $(srcdir)/os MAKEFILE_MAYBE_WIN32@/os_abs.c
>  	 $(CC) $(CFLAGS) $?
>  os_alloc o@: $(srcdir)/os/os_alloc.c
>  	 $(CC) $(CFLAGS) $?
> -os_clock o@: $(srcdir)/os/os_clock.c
> +os_clock o@: $(srcdir)/os MAKEFILE_MAYBE_WIN32@/os_clock.c
>  	 $(CC) $(CFLAGS) $?
> -os_config o@: $(srcdir)/os/os_config.c
> +os_config o@: $(srcdir)/os MAKEFILE_MAYBE_WIN32@/os_config.c
>  	 $(CC) $(CFLAGS) $?
> -os_dir o@: $(srcdir)/os/os_dir.c
> +os_dir o@: $(srcdir)/os MAKEFILE_MAYBE_WIN32@/os_dir.c
>  	 $(CC) $(CFLAGS) $?
> -os_errno o@: $(srcdir)/os/os_errno.c
> +os_errno o@: $(srcdir)/os MAKEFILE_MAYBE_WIN32@/os_errno.c
>  	 $(CC) $(CFLAGS) $?
> -os_fid o@: $(srcdir)/os/os_fid.c
> +os_fid o@: $(srcdir)/os MAKEFILE_MAYBE_WIN32@/os_fid.c
>  	 $(CC) $(CFLAGS) $?
> -os_fsync o@: $(srcdir)/os/os_fsync.c
> +os_fsync o@: $(srcdir)/os MAKEFILE_MAYBE_WIN32@/os_fsync.c
>  	 $(CC) $(CFLAGS) $?
>  os_id o@: $(srcdir)/os/os_id.c
>  	 $(CC) $(CFLAGS) $?
> -os_handle o@: $(srcdir)/os/os_handle.c
> +os_handle o@: $(srcdir)/os MAKEFILE_MAYBE_WIN32@/os_handle.c
>  	 $(CC) $(CFLAGS) $?
> -os_map o@: $(srcdir)/os/os_map.c
> +os_map o@: $(srcdir)/os MAKEFILE_MAYBE_WIN32@/os_map.c
>  	 $(CC) $(CFLAGS) $?
>  os_method o@: $(srcdir)/os/os_method.c
> @@ -1146,9 +1147,9 @@ os_method o@: $(srcdir)/os/os_method.c
>  os_oflags o@: $(srcdir)/os/os_oflags.c
>  	 $(CC) $(CFLAGS) $?
> -os_open o@: $(srcdir)/os/os_open.c
> +os_open o@: $(srcdir)/os MAKEFILE_MAYBE_WIN32@/os_open.c
>  	 $(CC) $(CFLAGS) $?
>  os_region o@: $(srcdir)/os/os_region.c
>  	 $(CC) $(CFLAGS) $?
> -os_rename o@: $(srcdir)/os/os_rename.c
> +os_rename o@: $(srcdir)/os MAKEFILE_MAYBE_WIN32@/os_rename.c
>  	 $(CC) $(CFLAGS) $?
>  os_root o@: $(srcdir)/os/os_root.c
> @@ -1156,15 +1157,17 @@ os_root o@: $(srcdir)/os/os_root.c
>  os_rpath o@: $(srcdir)/os/os_rpath.c
>  	 $(CC) $(CFLAGS) $?
> -os_rw o@: $(srcdir)/os/os_rw.c
> +os_rw o@: $(srcdir)/os MAKEFILE_MAYBE_WIN32@/os_rw.c
>  	 $(CC) $(CFLAGS) $?
> -os_seek o@: $(srcdir)/os/os_seek.c
> +os_seek o@: $(srcdir)/os MAKEFILE_MAYBE_WIN32@/os_seek.c
>  	 $(CC) $(CFLAGS) $?
> -os_sleep o@: $(srcdir)/os/os_sleep.c
> +os_sleep o@: $(srcdir)/os MAKEFILE_MAYBE_WIN32@/os_sleep.c
>  	 $(CC) $(CFLAGS) $?
> -os_spin o@: $(srcdir)/os/os_spin.c
> +os_spin o@: $(srcdir)/os MAKEFILE_MAYBE_WIN32@/os_spin.c
>  	 $(CC) $(CFLAGS) $?
> -os_stat o@: $(srcdir)/os/os_stat.c
> +os_stat o@: $(srcdir)/os MAKEFILE_MAYBE_WIN32@/os_stat.c
>  	 $(CC) $(CFLAGS) $?
>  os_tmpdir o@: $(srcdir)/os/os_tmpdir.c
> +	 $(CC) $(CFLAGS) $?
> +os_type o@: $(srcdir)/os MAKEFILE_MAYBE_WIN32@/os_type.c
>  	 $(CC) $(CFLAGS) $?
>  os_unlink o@: $(srcdir)/os/os_unlink.c
> Index: libdb/dist/config.hin
> ===================================================================
> RCS file: /cvs/gnome/evolution-data-server/libdb/dist/config.hin,v
> retrieving revision 1.2
> diff -p -u -2 -r1.2 config.hin
> --- libdb/dist/config.hin	11 Oct 2004 18:47:23 -0000	1.2
> +++ libdb/dist/config.hin	19 May 2005 12:42:25 -0000
> @@ -354,4 +354,7 @@
>  #undef UMRW
>  
> +/* Define to 1 to if building for Win32. */
> +#undef DB_WIN32
> +
>  /* Number of bits in a file offset, on hosts where this is settable. */
>  #undef _FILE_OFFSET_BITS
> @@ -404,2 +407,51 @@
>  #define	vsnprintf	__db_Cvsnprintf
>  #endif
> +
> +#ifdef DB_WIN32
> +
> +/*
> + * XXX
> + * The following is not part of the automatic configuration setup, but
> + * provides the information necessary to build Berkeley DB on Windows.
> + */
> +#include <sys/types.h>
> +#include <sys/stat.h>
> +
> +#include <direct.h>
> +#include <fcntl.h>
> +#include <io.h>
> +#include <limits.h>
> +#include <memory.h>
> +#include <process.h>
> +#include <signal.h>
> +#include <stdio.h>
> +#include <stdlib.h>
> +#include <time.h>
> +#include <errno.h>
> +
> +/*
> + * To build Tcl interface libraries, the include path must be configured to
> + * use the directory containing <tcl.h>, usually the include directory in
> + * the Tcl distribution.
> + */
> +#ifdef DB_TCL_SUPPORT
> +#include <tcl.h>
> +#endif
> +
> +#define	WIN32_LEAN_AND_MEAN
> +#include <windows.h>
> +
> +/*
> + * All of the necessary includes have been included, ignore the #includes
> + * in the Berkeley DB source files.
> + */
> +#define	NO_SYSTEM_INCLUDES
> +
> +/*
> + * Win32 has getcwd, snprintf and vsnprintf, but under different names.
> + */
> +#define	getcwd(buf, size)	_getcwd(buf, size)
> +#define	snprintf		_snprintf
> +#define	vsnprintf		_vsnprintf
> +
> +#endif /* DB_WIN32 */
> Index: libdb/dist/configure
> ===================================================================
> RCS file: /cvs/gnome/evolution-data-server/libdb/dist/configure,v
> retrieving revision 1.7
> diff -p -u -2 -r1.7 configure
> --- libdb/dist/configure	11 Oct 2004 18:47:23 -0000	1.7
> +++ libdb/dist/configure	19 May 2005 12:42:34 -0000
> @@ -471,5 +471,5 @@ ac_includes_default="\
>  #endif"
>  
> -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os ADDITIONAL_INCS ADDITIONAL_LANG ADDITIONAL_OBJS ADDITIONAL_PROGS BUILD_TARGET CFLAGS CONFIGURATION_ARGS CONFIGURATION_PATH CPPFLAGS CXX CXXFLAGS DEFAULT_LIB DEFAULT_LIB_CXX EMBEDIX_ECD_CXX EMBEDIX_ECD_RPC EMBEDIX_ROOT INSTALLER INSTALL_LIBS INSTALL_TARGET JAR JAVACFLAGS LDFLAGS LIBJSO_LIBS LIBSO_LIBS LIBTOOL LIBTSO_LIBS LIBXSO_LIBS LOAD_LIBS MAKEFILE_CC MAKEFILE_CCLINK MAKEFILE_CXX MAKEFILE_CXXLINK MAKEFILE_SOLINK MAKEFILE_XSOLINK POSTLINK RPC_CLIENT_OBJS RPM_POST_INSTALL RPM_POST_UNINSTALL SOFLAGS db_cv_path_embedix_install db_cv_path_rpm_archive db_int_def o DB_VERSION_MAJOR DB_VERSION_MINOR DB_VERSION_PATCH DB_VERSION_UNIQUE_NAME DB_VERSION_STRING db_cv_path_ar ac_ct_db_cv_path_ar db_cv_path_chmod ac_ct_db_cv_path_chmod db_cv_path_cp ac_ct_db_cv_path_cp path_ldconfig ac_ct_path_ldconfig db_cv_path_ldconfig db_cv_path_ln ac_ct_db_cv_path_ln db_cv_path_mkdir ac_ct_db_cv_path_mkdir path_ranlib ac_ct_path_ranlib db_cv_path_ranlib db_cv_path_rm ac_ct_db_cv_path_rm db_cv_path_rpm ac_ct_db_cv_path_rpm path_sh ac_ct_path_sh db_cv_path_sh path_strip ac_ct_path_strip db_cv_path_strip db_cv_path_kill ac_ct_db_cv_path_kill INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CC ac_ct_CC EXEEXT OBJEXT CCC ac_ct_CCC ac_ct_CXX cxx_have_stdheaders LN_S ECHO RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP CPP EGREP SOSUFFIX MODSUFFIX JMODSUFFIX JAVAC _ACJNI_JAVAC TCFLAGS TCL_BIN_DIR TCL_SRC_DIR TCL_LIB_FILE TCL_TCLSH u_char_decl u_short_decl u_int_decl u_long_decl u_int8_decl u_int16_decl int16_decl u_int32_decl int32_decl ssize_t_decl db_align_t_decl db_alignp_t_decl LIBOBJS LTLIBOBJS'
> +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os ADDITIONAL_INCS ADDITIONAL_LANG ADDITIONAL_OBJS ADDITIONAL_PROGS BUILD_TARGET CFLAGS CONFIGURATION_ARGS CONFIGURATION_PATH CPPFLAGS CXX CXXFLAGS DEFAULT_LIB DEFAULT_LIB_CXX EMBEDIX_ECD_CXX EMBEDIX_ECD_RPC EMBEDIX_ROOT INSTALLER INSTALL_LIBS INSTALL_TARGET JAR JAVACFLAGS LDFLAGS LIBJSO_LIBS LIBSO_LIBS LIBTOOL LIBTSO_LIBS LIBXSO_LIBS LOAD_LIBS MAKEFILE_CC MAKEFILE_CCLINK MAKEFILE_CXX MAKEFILE_CXXLINK MAKEFILE_MAYBE_WIN32 MAKEFILE_SOLINK MAKEFILE_XSOLINK POSTLINK RPC_CLIENT_OBJS RPM_POST_INSTALL RPM_POST_UNINSTALL SOFLAGS db_cv_path_embedix_install db_cv_path_rpm_archive db_int_def o DB_VERSION_MAJOR DB_VERSION_MINOR DB_VERSION_PATCH DB_VERSION_UNIQUE_NAME DB_VERSION_STRING db_cv_path_ar ac_ct_db_cv_path_ar db_cv_path_chmod ac_ct_db_cv_path_chmod db_cv_path_cp ac_ct_db_cv_path_cp path_ldconfig ac_ct_path_ldconfig db_cv_path_ldconfig db_cv_path_ln ac_ct_db_cv_path_ln db_cv_path_mkdir ac_ct_db_cv_path_mkdir path_ranlib ac_ct_path_ranlib db_cv_path_ranlib db_cv_path_rm ac_ct_db_cv_path_rm db_cv_path_rpm ac_ct_db_cv_path_rpm path_sh ac_ct_path_sh db_cv_path_sh path_strip ac_ct_path_strip db_cv_path_strip db_cv_path_kill ac_ct_db_cv_path_kill INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CC ac_ct_CC EXEEXT OBJEXT CCC ac_ct_CCC ac_ct_CXX cxx_have_stdheaders LN_S ECHO RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP CPP EGREP SOSUFFIX MODSUFFIX JMODSUFFIX JAVAC _ACJNI_JAVAC TCFLAGS TCL_BIN_DIR TCL_SRC_DIR TCL_LIB_FILE TCL_TCLSH u_char_decl u_short_decl u_int_decl u_long_decl u_int8_decl u_int16_decl int16_decl u_int32_decl int32_decl ssize_t_decl db_align_t_decl db_alignp_t_decl LIBOBJS LTLIBOBJS'
>  ac_subst_files=''
>  
> @@ -3342,4 +3342,6 @@ fi
>  # Don't override anything if it's already set from the environment.
>  optimize_def="-O"
> +MAKEFILE_MAYBE_WIN32=""
> +SOFLAGS=""
>  case "$host_os" in
>  aix4.3.*|aix5*)
> @@ -3361,4 +3363,14 @@ irix*)	optimize_def="-O2"
>  linux*)	optimize_def="-O2"
>  	CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE -D_REENTRANT";;
> +mingw*) optimize_def="-O2"
> +	SOFLAGS="-no-undefined"
> +	ADDITIONAL_OBJS="os_type.lo $ADDITIONAL_OBJS"
> +	MAKEFILE_MAYBE_WIN32="_win32"
> +	cat >>confdefs.h <<\_ACEOF
> +#define DB_WIN32 1
> +_ACEOF
> +
> +
> +;;
>  mpeix*)	CPPFLAGS="$CPPFLAGS -D_POSIX_SOURCE -D_SOCKET_SOURCE"
>  	LIBS="$LIBS -lsocket -lsvipc";;
> @@ -9776,5 +9788,4 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtoo
>  
>  LIBTOOL="\$(SHELL) ./libtool"
> -SOFLAGS=""
>  
>  # Set SOSUFFIX and friends
> @@ -10656,4 +10667,11 @@ echo "${ECHO_T}file not found" >&6
>  	fi
>  
> +	case "$host" in
> +	*-mingw*)
> +		# To include tcl.h when compiling tcl_*.o
> +		TCFLAGS="$TCFLAGS -DDB_TCL_SUPPORT"
> +		;;
> +	esac
> +
>  	INSTALL_LIBS="${INSTALL_LIBS} \$(libtso_target)"
>  fi
> @@ -20733,4 +20751,5 @@ s,@MAKEFILE_CCLINK@,$MAKEFILE_CCLINK,;t 
>  s,@MAKEFILE_CXX@,$MAKEFILE_CXX,;t t
>  s,@MAKEFILE_CXXLINK@,$MAKEFILE_CXXLINK,;t t
> +s,@MAKEFILE_MAYBE_WIN32@,$MAKEFILE_MAYBE_WIN32,;t t
>  s,@MAKEFILE_SOLINK@,$MAKEFILE_SOLINK,;t t
>  s,@MAKEFILE_XSOLINK@,$MAKEFILE_XSOLINK,;t t
> Index: libdb/dist/configure.ac
> ===================================================================
> RCS file: /cvs/gnome/evolution-data-server/libdb/dist/configure.ac,v
> retrieving revision 1.4
> diff -p -u -2 -r1.4 configure.ac
> --- libdb/dist/configure.ac	13 Feb 2004 20:09:05 -0000	1.4
> +++ libdb/dist/configure.ac	19 May 2005 12:42:34 -0000
> @@ -35,4 +35,5 @@ AC_SUBST(EMBEDIX_ECD_CXX)
>  AC_SUBST(EMBEDIX_ECD_RPC)
>  AC_SUBST(EMBEDIX_ROOT)
> +AC_SUBST(EXEEXT)
>  AC_SUBST(INSTALLER)
>  AC_SUBST(INSTALL_LIBS)
> @@ -52,4 +53,5 @@ AC_SUBST(MAKEFILE_CCLINK)
>  AC_SUBST(MAKEFILE_CXX)
>  AC_SUBST(MAKEFILE_CXXLINK)
> +AC_SUBST(MAKEFILE_MAYBE_WIN32)
>  AC_SUBST(MAKEFILE_SOLINK)
>  AC_SUBST(MAKEFILE_XSOLINK)
> @@ -146,4 +148,7 @@ fi
>  # Don't override anything if it's already set from the environment.
>  optimize_def="-O"
> +MAKEFILE_MAYBE_WIN32=""
> +EXEEXT=""
> +SOFLAGS=""
>  case "$host_os" in
>  aix4.3.*|aix5*)
> @@ -165,4 +170,12 @@ irix*)	optimize_def="-O2"
>  linux*)	optimize_def="-O2"
>  	CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE -D_REENTRANT";;
> +mingw*)	optimize_def="-O2"
> +	EXEEXT=".exe"
> +	SOFLAGS="-no-undefined"
> +	ADDITIONAL_OBJS="os_type.lo $ADDITIONAL_OBJS"
> +	MAKEFILE_MAYBE_WIN32="_win32"
> +	AC_DEFINE(DB_WIN32)
> +	AH_TEMPLATE(DB_WIN32,
> +	    [Define to 1 to if building for Win32.]);;
>  mpeix*)	CPPFLAGS="$CPPFLAGS -D_POSIX_SOURCE -D_SOCKET_SOURCE"
>  	LIBS="$LIBS -lsocket -lsvipc";;
> @@ -258,5 +271,4 @@ AC_PROG_LIBTOOL
>  
>  LIBTOOL="\$(SHELL) ./libtool"
> -SOFLAGS=""
>  
>  # Set SOSUFFIX and friends
> Index: libdb/dist/aclocal/tcl.ac
> ===================================================================
> RCS file: /cvs/gnome/evolution-data-server/libdb/dist/aclocal/tcl.ac,v
> retrieving revision 1.1.1.1
> diff -p -u -2 -r1.1.1.1 tcl.ac
> --- libdb/dist/aclocal/tcl.ac	20 Nov 2003 22:13:27 -0000	1.1.1.1
> +++ libdb/dist/aclocal/tcl.ac	19 May 2005 12:42:37 -0000
> @@ -133,4 +133,11 @@ if test "$db_cv_tcl" = "yes"; then
>  	fi
>  
> +	case "$host" in
> +	*-mingw*)
> +		# To include tcl.h when compiling tcl_*.o
> +		TCFLAGS="$TCFLAGS -DDB_TCL_SUPPORT"
> +		;;
> +	esac
> +
>  	INSTALL_LIBS="${INSTALL_LIBS} \$(libtso_target)"
>  fi])
> Index: libdb/os_win32/os_type.c
> ===================================================================
> RCS file: /cvs/gnome/evolution-data-server/libdb/os_win32/os_type.c,v
> retrieving revision 1.1.1.1
> diff -p -u -2 -r1.1.1.1 os_type.c
> --- libdb/os_win32/os_type.c	20 Nov 2003 22:13:39 -0000	1.1.1.1
> +++ libdb/os_win32/os_type.c	19 May 2005 12:42:41 -0000
> @@ -7,4 +7,5 @@
>  
>  #include "db_config.h"
> +#include "db_int_def.h"
>  
>  #ifndef lint
> _______________________________________________ evolution-hackers maillist - evolution-hackers lists ximian com http://lists.ximian.com/mailman/listinfo/evolution-hackers




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