diff options
-rw-r--r-- | configure.ac | 11 | ||||
-rw-r--r-- | odb/Makefile.am | 15 | ||||
-rw-r--r-- | odb/libodb-vc10.vcxproj | 2 | ||||
-rw-r--r-- | odb/libodb-vc10.vcxproj.filters | 2 | ||||
-rw-r--r-- | odb/libodb-vc11.vcxproj | 2 | ||||
-rw-r--r-- | odb/libodb-vc11.vcxproj.filters | 2 | ||||
-rw-r--r-- | odb/libodb-vc9.vcproj | 2 | ||||
-rw-r--r-- | odb/makefile | 27 |
8 files changed, 42 insertions, 21 deletions
diff --git a/configure.ac b/configure.ac index a2daa10..2a71588 100644 --- a/configure.ac +++ b/configure.ac @@ -24,6 +24,17 @@ AC_LANG(C++) # LT_OUTPUT +# Check for Windows. +# +win32=no +case $host_os in + windows* | mingw*) + win32=yes + ;; +esac + +AM_CONDITIONAL([ODB_WIN32], [test x$win32 = xyes]) + # Check for threads. # THREADS diff --git a/odb/Makefile.am b/odb/Makefile.am index 1650e41..6f64ff0 100644 --- a/odb/Makefile.am +++ b/odb/Makefile.am @@ -11,14 +11,21 @@ nobase_nodist_odbinclude_HEADERS = details/config.h EXTRA_DIST = __file__(extra_dist) +# At the moment, DllMain() is only necessary if we are using Win32 +# threads. So keep win32_dll_sources in ODB_THREADS_WIN32. +# +if ODB_WIN32 +nobase_odbinclude_HEADERS += __path__(win32_headers) +endif + if ODB_THREADS_POSIX -libodb_la_SOURCES += __path__(posix_sources) -nobase_odbinclude_HEADERS += __path__(posix_headers) +libodb_la_SOURCES += __path__(posix_threads_sources) +nobase_odbinclude_HEADERS += __path__(posix_threads_headers) endif if ODB_THREADS_WIN32 -libodb_la_SOURCES += __path__(win32_sources) __path__(win32_dll_sources) -nobase_odbinclude_HEADERS += __path__(win32_headers) +libodb_la_SOURCES += __path__(win32_threads_sources) __path__(win32_dll_sources) +nobase_odbinclude_HEADERS += __path__(win32_threads_headers) endif AM_CPPFLAGS= -I'$(top_builddir)' -I'$(top_srcdir)' -DLIBODB_DYNAMIC_LIB diff --git a/odb/libodb-vc10.vcxproj b/odb/libodb-vc10.vcxproj index 18e5415..d3e2889 100644 --- a/odb/libodb-vc10.vcxproj +++ b/odb/libodb-vc10.vcxproj @@ -164,7 +164,7 @@ __header_entry__(details\config-vc.h) </ItemGroup> <ItemGroup> __source_entries__(sources) -__source_entries__(win32_sources) +__source_entries__(win32_threads_sources) __source_entries__(win32_dll_sources) </ItemGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> diff --git a/odb/libodb-vc10.vcxproj.filters b/odb/libodb-vc10.vcxproj.filters index 1663f9d..da1d6b2 100644 --- a/odb/libodb-vc10.vcxproj.filters +++ b/odb/libodb-vc10.vcxproj.filters @@ -16,6 +16,6 @@ __header_filter_entry__(details\config-vc.h) </ItemGroup> <ItemGroup> __source_filter_entries__(sources) -__source_filter_entries__(win32_sources) +__source_filter_entries__(win32_threads_sources) </ItemGroup> </Project> diff --git a/odb/libodb-vc11.vcxproj b/odb/libodb-vc11.vcxproj index 52e6439..7da5af7 100644 --- a/odb/libodb-vc11.vcxproj +++ b/odb/libodb-vc11.vcxproj @@ -168,7 +168,7 @@ __header_entry__(details\config-vc.h) </ItemGroup> <ItemGroup> __source_entries__(sources) -__source_entries__(win32_sources) +__source_entries__(win32_threads_sources) __source_entries__(win32_dll_sources) </ItemGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> diff --git a/odb/libodb-vc11.vcxproj.filters b/odb/libodb-vc11.vcxproj.filters index 1663f9d..da1d6b2 100644 --- a/odb/libodb-vc11.vcxproj.filters +++ b/odb/libodb-vc11.vcxproj.filters @@ -16,6 +16,6 @@ __header_filter_entry__(details\config-vc.h) </ItemGroup> <ItemGroup> __source_filter_entries__(sources) -__source_filter_entries__(win32_sources) +__source_filter_entries__(win32_threads_sources) </ItemGroup> </Project> diff --git a/odb/libodb-vc9.vcproj b/odb/libodb-vc9.vcproj index 73ead32..011e4f0 100644 --- a/odb/libodb-vc9.vcproj +++ b/odb/libodb-vc9.vcproj @@ -341,7 +341,7 @@ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" > __source_entries__(sources) -__source_entries__(win32_sources) +__source_entries__(win32_threads_sources) __source_entries__(win32_dll_sources) </Filter> <Filter diff --git a/odb/makefile b/odb/makefile index dabbe73..70128cb 100644 --- a/odb/makefile +++ b/odb/makefile @@ -31,13 +31,13 @@ details/shared-ptr/base.cxx # POSIX-based implementation details. # -posix_cxx := \ +posix_thr_cxx := \ details/posix/exceptions.cxx \ details/posix/thread.cxx # Win32-based implementation details. # -win32_cxx := \ +win32_thr_cxx := \ details/win32/init.cxx \ details/win32/once.cxx \ details/win32/tls.cxx \ @@ -50,11 +50,11 @@ win32_dll_cxx := details/win32/dll.cxx cxx_tun := $(cxx) ifeq ($(libodb_threads),posix) -cxx_tun += $(posix_cxx) +cxx_tun += $(posix_thr_cxx) endif ifeq ($(libodb_threads),win32) -cxx_tun += $(win32_cxx) +cxx_tun += $(win32_thr_cxx) $(call include,$(bld_root)/ld/configuration-lib.make) # ld_lib_type @@ -115,18 +115,20 @@ $(out_base)/: $(odb.l) # Dist. # $(dist): export sources := $(cxx) -$(dist): export posix_sources := $(posix_cxx) -$(dist): export win32_sources := $(win32_cxx) +$(dist): export posix_threads_sources := $(posix_thr_cxx) +$(dist): export win32_threads_sources := $(win32_thr_cxx) $(dist): export win32_dll_sources := $(win32_dll_cxx) -$(dist): export headers = $(subst $(src_base)/,,$(shell find $(src_base) \ +$(dist): export headers := $(subst $(src_base)/,,$(shell find $(src_base) \ -path $(src_base)/details/posix -a -prune -a -false -o \ -path $(src_base)/details/win32 -a -prune -a -false -o \ -name '*.hxx' -o -name '*.ixx' -o -name '*.txx')) -$(dist): export posix_headers = $(subst $(src_base)/,,$(shell find \ +$(dist): export posix_threads_headers := $(subst $(src_base)/,,$(shell find \ $(src_base)/details/posix -name '*.hxx' -o -name '*.ixx' -o -name '*.txx')) -$(dist): export win32_headers = $(subst $(src_base)/,,$(shell find \ -$(src_base)/details/win32 -name '*.hxx' -o -name '*.ixx' -o -name '*.txx')) +$(dist): export win32_headers := details/win32/windows.hxx +$(dist): export win32_threads_headers := $(foreach \ +h,$(win32_headers),$(filter-out $h,$(subst $(src_base)/,,$(shell find \ +$(src_base)/details/win32 -name '*.hxx' -o -name '*.ixx' -o -name '*.txx')))) $(dist): data_dist := details/config-vc.h $(dist): export extra_dist := $(data_dist) libodb-vc9.vcproj \ @@ -136,8 +138,9 @@ $(dist): export interface_version = $(shell sed -e \ 's/^\([0-9]*\.[0-9]*\).*/\1/' $(src_root)/version) $(dist): - $(call dist-data,$(sources) $(posix_sources) $(win32_sources) \ -$(win32_dll_sources) $(headers) $(posix_headers) $(win32_headers) \ + $(call dist-data,$(sources) $(posix_threads_sources) \ +$(win32_threads_sources) $(win32_dll_sources) $(headers) \ +$(posix_threads_headers) $(win32_headers) $(win32_threads_headers) \ $(data_dist) details/config.h.in) $(call meta-vc9proj,$(src_base)/libodb-vc9.vcproj) $(call meta-vc10proj,$(src_base)/libodb-vc10.vcxproj) |