Commit bf6b9de1 authored by Nicolas Dufresne's avatar Nicolas Dufresne Committed by Arun Raghavan
Browse files

build: Properly select the right system wrappers

This is needed for windows build to be usable.

https://bugs.freedesktop.org/show_bug.cgi?id=96754
parent 12ac8441
...@@ -53,11 +53,13 @@ AS_CASE(["${host}"], ...@@ -53,11 +53,13 @@ AS_CASE(["${host}"],
[ [
OS_CFLAGS="-DWEBRTC_ANDROID -DWEBRTC_LINUX" OS_CFLAGS="-DWEBRTC_ANDROID -DWEBRTC_LINUX"
PLATFORM_CFLAGS="-DWEBRTC_POSIX" PLATFORM_CFLAGS="-DWEBRTC_POSIX"
HAVE_POSIX=1
], ],
[*-*linux*], [*-*linux*],
[ [
OS_CFLAGS="-DWEBRTC_LINUX" OS_CFLAGS="-DWEBRTC_LINUX"
PLATFORM_CFLAGS="-DWEBRTC_POSIX" PLATFORM_CFLAGS="-DWEBRTC_POSIX"
HAVE_POSIX=1
], ],
[*-*darwin*], [*-*darwin*],
[ [
...@@ -65,13 +67,17 @@ AS_CASE(["${host}"], ...@@ -65,13 +67,17 @@ AS_CASE(["${host}"],
[OS_FLAGS="-DWEBRTC_MAC -DWEBRTC_IOS"], [OS_FLAGS="-DWEBRTC_MAC -DWEBRTC_IOS"],
[OS_FLAGS="-DWEBRTC_MAC"]) [OS_FLAGS="-DWEBRTC_MAC"])
PLATFORM_CFLAGS="-DWEBRTC_POSIX" PLATFORM_CFLAGS="-DWEBRTC_POSIX"
HAVE_POSIX=1
], ],
[*-mingw32*], [*-mingw32*],
[ [
PLATFORM_CFLAGS="-DWEBRTC_WIN -U__STRICT_ANSI__" PLATFORM_CFLAGS="-DWEBRTC_WIN -U__STRICT_ANSI__"
HAVE_WIN=1
] ]
) )
AC_SUBST(PLATFORM_CFLAGS) AC_SUBST(PLATFORM_CFLAGS)
AM_CONDITIONAL(HAVE_POSIX, [test "x${HAVE_POSIX}" = "x1"])
AM_CONDITIONAL(HAVE_WIN, [test "x${HAVE_WIN}" = "x1"])
AS_CASE(["${host_cpu}"], AS_CASE(["${host_cpu}"],
[i?86|x86_64], [i?86|x86_64],
......
...@@ -42,13 +42,21 @@ libsystem_wrappers_la_SOURCES = include/aligned_malloc.h \ ...@@ -42,13 +42,21 @@ libsystem_wrappers_la_SOURCES = include/aligned_malloc.h \
source/trace_impl.h \ source/trace_impl.h \
source/trace_posix.h \ source/trace_posix.h \
source/trace_win.h source/trace_win.h
# This assumes that we want the POSIX implementation -- should eventually be if HAVE_POSIX
# converted to a conditional to include Windows support
libsystem_wrappers_la_SOURCES += source/critical_section_posix.cc \ libsystem_wrappers_la_SOURCES += source/critical_section_posix.cc \
source/event_timer_posix.cc \ source/event_timer_posix.cc \
source/rw_lock_posix.cc \ source/rw_lock_posix.cc \
source/thread_posix.cc \ source/thread_posix.cc \
source/trace_posix.cc source/trace_posix.cc
endif
if HAVE_WIN
libsystem_wrappers_la_SOURCES += source/critical_section_win.cc \
source/event_timer_win.cc \
source/rw_lock_win.cc \
source/rw_lock_generic.cc \
source/thread_win.cc \
source/trace_win.cc
endif
libsystem_wrappers_la_CXXFLAGS = $(AM_CXXFLAGS) $(COMMON_CXXFLAGS) libsystem_wrappers_la_CXXFLAGS = $(AM_CXXFLAGS) $(COMMON_CXXFLAGS)
EXTRA_DIST = BUILD.gn \ EXTRA_DIST = BUILD.gn \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment