Mercurial > mxe-octave
diff src/hdf5.mk @ 2997:4f9b72cf7ee7
allow native builds too
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 28 May 2013 17:31:59 -0400 |
parents | 4b72e7cf4f30 |
children | 100e618349f7 |
line wrap: on
line diff
--- a/src/hdf5.mk Sun May 26 13:32:22 2013 -0400 +++ b/src/hdf5.mk Tue May 28 17:31:59 2013 -0400 @@ -8,6 +8,30 @@ $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.bz2 $(PKG)_URL := http://www.hdfgroup.org/ftp/HDF5/current/src/$($(PKG)_FILE) $(PKG)_DEPS := gcc +ifeq ($(MXE_SYSTEM),mingw) + ifneq ($(MXE_NATIVE_BUILD),yes) + $(PKG)_CROSS_CONFIG_OPTIONS := \ + --disable-largefile \ + LIBS=-lws2_32 \ + hdf5_cv_gettimeofday_tz=no \ + hdf5_cv_vsnprintf_works=yes \ + hdf5_cv_printf_ll=l \ + hdf5_cv_system_scope_threads=yes \ + hdf5_cv_ldouble_to_integer_works=yes \ + hdf5_cv_ulong_to_float_accurate=yes \ + hdf5_cv_ulong_to_fp_bottom_bit_accurate=no \ + hdf5_cv_fp_to_ullong_accurate=yes \ + hdf5_cv_fp_to_ullong_right_maximum=no \ + hdf5_cv_fp_to_ullong_right_maximum=no \ + hdf5_cv_ldouble_to_uint_accurate=yes \ + hdf5_cv_ullong_to_ldouble_precision=yes \ + hdf5_cv_fp_to_integer_overflow_works=yes \ + hdf5_cv_ldouble_to_long_special=no \ + hdf5_cv_long_to_ldouble_special=no \ + hdf5_cv_ldouble_to_llong_accurate=yes \ + hdf5_cv_llong_to_ldouble_correct=yes + endif +endif define $(PKG)_UPDATE echo 'Warning: Updates are temporarily disabled for package hdf5.' >&2; @@ -19,34 +43,21 @@ cd '$(1)' && autoreconf mkdir '$(1)/.build' cd '$(1)/.build' && '$(1)/configure' \ + $(CONFIGURE_CPPFLAGS) $(CONFIGURE_LDFLAGS) \ --host='$(TARGET)' \ --build="`config.guess`" \ $(ENABLE_SHARED_OR_STATIC) \ --prefix='$(PREFIX)/$(TARGET)' \ --disable-direct-vfd \ - --disable-largefile \ - LIBS=-lws2_32 \ - hdf5_cv_gettimeofday_tz=no \ - hdf5_cv_vsnprintf_works=yes \ - hdf5_cv_printf_ll=l \ - hdf5_cv_system_scope_threads=yes \ - hdf5_cv_ldouble_to_integer_works=yes \ - hdf5_cv_ulong_to_float_accurate=yes \ - hdf5_cv_ulong_to_fp_bottom_bit_accurate=no \ - hdf5_cv_fp_to_ullong_accurate=yes \ - hdf5_cv_fp_to_ullong_right_maximum=no \ - hdf5_cv_fp_to_ullong_right_maximum=no \ - hdf5_cv_ldouble_to_uint_accurate=yes \ - hdf5_cv_ullong_to_ldouble_precision=yes \ - hdf5_cv_fp_to_integer_overflow_works=yes \ - hdf5_cv_ldouble_to_long_special=no \ - hdf5_cv_long_to_ldouble_special=no \ - hdf5_cv_ldouble_to_llong_accurate=yes \ - hdf5_cv_llong_to_ldouble_correct=yes + $($(PKG)_CROSS_CONFIG_OPTIONS) - echo "#define H5_HAVE_WIN32_API 1" >> $(1)/.build/src/H5pubconf.h - echo "#define H5_HAVE_MINGW 1" >> $(1)/.build/src/H5pubconf.h - echo "#define HAVE_WINDOWS_PATH 1" >> $(1)/.build/src/H5pubconf.h + case '$(MXE_SYSTEM)' in \ + *mingw*) \ + echo "#define H5_HAVE_WIN32_API 1" >> $(1)/.build/src/H5pubconf.h; \ + echo "#define H5_HAVE_MINGW 1" >> $(1)/.build/src/H5pubconf.h; \ + echo "#define HAVE_WINDOWS_PATH 1" >> $(1)/.build/src/H5pubconf.h; \ + ;; \ + esac $(MAKE) -C '$(1)/.build' -j '$(JOBS)' install endef