Skip to content
Snippets Groups Projects
Commit d301768c authored by Michal Malý's avatar Michal Malý
Browse files

Fix Windows compatibility

parent cb210a30
No related branches found
No related tags found
No related merge requests found
......@@ -18,6 +18,9 @@ lib_LTLIBRARIES =
if BUILD_MMDB
lib_LTLIBRARIES += mmdb/libclipper-mmdb.la
mmdb_libclipper_mmdb_la_LDFLAGS = @VERSION_INFO@
if BUILD_WIN32
mmdb_libclipper_mmdb_la_LDFLAGS += -no-undefined
endif
mmdb_libclipper_mmdb_la_LIBADD = core/libclipper-core.la -lmmdb2
mmdb_libclipper_mmdb_la_SOURCES = mmdb/clipper_mmdb.cpp
mmdb_includedir=$(pkgincludedir)/mmdb
......@@ -27,6 +30,9 @@ endif
if BUILD_MINIMOL
lib_LTLIBRARIES += minimol/libclipper-minimol.la
minimol_libclipper_minimol_la_LDFLAGS = @VERSION_INFO@
if BUILD_WIN32
minimol_libclipper_minimol_la_LDFLAGS += -no-undefined
endif
# minimol uses libmmdb directly (although <mmdb2/mmdb_manager.h> is included
# indirectly, via clipper/clipper-mmdb.h)
minimol_libclipper_minimol_la_LIBADD = core/libclipper-core.la \
......@@ -43,6 +49,9 @@ endif
if BUILD_PHS
lib_LTLIBRARIES += phs/libclipper-phs.la
phs_libclipper_phs_la_LDFLAGS = @VERSION_INFO@
if BUILD_WIN32
phs_libclipper_phs_la_LDFLAGS += -no-undefined
endif
phs_libclipper_phs_la_LIBADD = core/libclipper-core.la
phs_libclipper_phs_la_SOURCES = phs/phs_io.cpp
phs_includedir=$(pkgincludedir)/phs
......@@ -52,6 +61,9 @@ endif
if BUILD_CIF
lib_LTLIBRARIES += cif/libclipper-cif.la
cif_libclipper_cif_la_LDFLAGS = @VERSION_INFO@
if BUILD_WIN32
cif_libclipper_cif_la_LDFLAGS += -no-undefined
endif
cif_libclipper_cif_la_LIBADD = core/libclipper-core.la -lmmdb2
cif_libclipper_cif_la_SOURCES = cif/cif_data_io.cpp
cif_includedir=$(pkgincludedir)/cif
......@@ -61,6 +73,9 @@ endif
if BUILD_CCP4
lib_LTLIBRARIES += ccp4/libclipper-ccp4.la
ccp4_libclipper_ccp4_la_LDFLAGS = @VERSION_INFO@
if BUILD_WIN32
ccp4_libclipper_ccp4_la_LDFLAGS += -no-undefined
endif
ccp4_libclipper_ccp4_la_LIBADD = core/libclipper-core.la -lccp4c
ccp4_libclipper_ccp4_la_SOURCES = \
ccp4/ccp4_mtz_types.cpp ccp4/ccp4_mtz_io.cpp \
......@@ -74,6 +89,9 @@ endif
if BUILD_CCTBX
lib_LTLIBRARIES += cctbx/libclipper-cctbx.la
cctbx_libclipper_cctbx_la_LDFLAGS = @VERSION_INFO@
if BUILD_WIN32
cctbx_libclipper_cctbx_la_LDFLAGS += -no-undefined
endif
cctbx_libclipper_cctbx_la_LIBADD = core/libclipper-core.la -lsgtbx -luctbx
cctbx_libclipper_cctbx_la_SOURCES = cctbx/clipper_cctbx.cpp
cctbx_includedir=$(pkgincludedir)/cctbx
......@@ -83,6 +101,9 @@ endif
if BUILD_CNS
lib_LTLIBRARIES += cns/libclipper-cns.la
cns_libclipper_cns_la_LDFLAGS = @VERSION_INFO@
if BUILD_WIN32
cns_libclipper_cns_la_LDFLAGS += -no-undefined
endif
cns_libclipper_cns_la_LIBADD = core/libclipper-core.la
cns_libclipper_cns_la_SOURCES = cns/cns_hkl_io.cpp cns/cns_map_io.cpp
cns_includedir=$(pkgincludedir)/cns
......@@ -92,6 +113,9 @@ endif
if BUILD_FORTRAN
lib_LTLIBRARIES += fortran/libclipper-fortran.la
fortran_libclipper_fortran_la_LDFLAGS = @VERSION_INFO@
if BUILD_WIN32
fortran_libclipper_fortran_la_LDFLAGS += -no-undefined
endif
fortran_libclipper_fortran_la_LIBADD = core/libclipper-core.la \
contrib/libclipper-contrib.la
fortran_libclipper_fortran_la_SOURCES = fortran/f_interface.cpp
......
......@@ -5,6 +5,9 @@ DIST_EXTRA = clipper_contrib.dox
lib_LTLIBRARIES = libclipper-contrib.la
libclipper_contrib_la_LDFLAGS = @VERSION_INFO@
if BUILD_WIN32
libclipper_contrib_la_LDFLAGS += -no-undefined
endif
libclipper_contrib_la_LIBADD = ../core/libclipper-core.la
libclipper_contrib_la_SOURCES = \
......
......@@ -3,6 +3,9 @@
lib_LTLIBRARIES = libclipper-core.la
libclipper_core_la_LDFLAGS = @VERSION_INFO@
if BUILD_WIN32
libclipper_core_la_LDFLAGS += -no-undefined
endif
libclipper_core_la_LIBADD = $(FFTW2_LIBS) $(PTHREAD_LIBS)
libclipper_core_la_CPPFLAGS = $(PTHREAD_CFLAGS)
......
......@@ -83,8 +83,13 @@ namespace clipper {
# define CLIPPER_NAN_MASK_B_32 0x007fffffU
# define CLIPPER_NULL_MASK_32 0x7fc00000U
#if defined(__osf__) || defined(__amd64__)
# if defined(__WIN32__) || defined(_WIN32)
typedef long long itype64;
typedef unsigned long long uitype64;
# else
typedef long itype64;
typedef unsigned long uitype64;
# endif
# define CLIPPER_NAN_MASK_A_64 0x7ff0000000000000UL
# define CLIPPER_NAN_MASK_B_64 0x000fffffffffffffUL
# define CLIPPER_NULL_MASK_64 0x7ff8000000000000UL
......
......@@ -16,6 +16,9 @@ lib_LTLIBRARIES = libclipper-mtz.la
#noinst_LIBRARIES = libclipper-mtz.a
libclipper_mtz_la_LDFLAGS = -version-info 1:0
if BUILD_WIN32
libclipper_mtz_la_LDFLAGS += -no-undefined
endif
INCLUDES = $(MCCP4_CXXFLAGS)
......
......@@ -5,6 +5,7 @@ AC_CONFIG_AUX_DIR(build-aux)
AC_CONFIG_MACRO_DIR(m4)
AC_CONFIG_SRCDIR(clipper/clipper.h)
AC_CONFIG_HEADERS(config.h)
AC_CANONICAL_HOST
AM_INIT_AUTOMAKE([1.11 foreign subdir-objects silent-rules -Wall])
AC_PROG_CC
......@@ -57,14 +58,20 @@ fi
AC_SEARCH_LIBS(cos, m, , AC_MSG_ERROR([math library not found.]))
SINGLE_FFTW2
build_win32=no
build_posix=no
case $host_os in
cygwin* | mingw* | pw32* | cegcc*)
AC_CHECK_HEADER(windows.h, :, AC_MSG_ERROR(Windows headers not found))
build_win32=yes
;;
*)
AX_PTHREAD
build_posix=yes
;;
esac
AM_CONDITIONAL([BUILD_WIN32], [test "$build_win32" = "yes"])
AM_CONDITIONAL([BUILD_POSIX], [test "$build_posix" = "yes"])
CLIPPER_LIBS="-lclipper-core"
test "x$enable_contrib" != xno && CLIPPER_LIBS="-lclipper-contrib $CLIPPER_LIBS"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment