Commit 00137969 authored by José Fonseca's avatar José Fonseca

gallium: Conditionally use posix libraries/includes.

parent c4e0d725
...@@ -9,3 +9,4 @@ lib ...@@ -9,3 +9,4 @@ lib
lib64 lib64
.sconsign* .sconsign*
config.py config.py
build
...@@ -95,19 +95,8 @@ if gcc: ...@@ -95,19 +95,8 @@ if gcc:
env.Append(CFLAGS = '-fmessage-length=0') env.Append(CFLAGS = '-fmessage-length=0')
env.Append(CXXFLAGS = '-fmessage-length=0') env.Append(CXXFLAGS = '-fmessage-length=0')
# Defines
env.Append(CPPDEFINES = [
'_POSIX_SOURCE',
('_POSIX_C_SOURCE', '199309L'),
'_SVID_SOURCE',
'_BSD_SOURCE',
'_GNU_SOURCE',
'PTHREADS',
'HAVE_ALIAS',
'HAVE_POSIX_MEMALIGN',
])
# Defines
if debug: if debug:
env.Append(CPPDEFINES = ['DEBUG']) env.Append(CPPDEFINES = ['DEBUG'])
else: else:
...@@ -120,8 +109,6 @@ env.Append(CPPPATH = [ ...@@ -120,8 +109,6 @@ env.Append(CPPPATH = [
'#/src/mesa', '#/src/mesa',
'#/src/mesa/main', '#/src/mesa/main',
'#/src/mesa/pipe', '#/src/mesa/pipe',
'/usr/X11R6/include',
]) ])
...@@ -137,14 +124,28 @@ if x86: ...@@ -137,14 +124,28 @@ if x86:
env.Append(CFLAGS = '-m32') env.Append(CFLAGS = '-m32')
env.Append(CXXFLAGS = '-m32') env.Append(CXXFLAGS = '-m32')
env.Append(LIBPATH = ['/usr/X11R6/lib'])
env.Append(LIBS = [ # Posix
'm', if platform in ('posix', 'linux', 'freebsd', 'darwin'):
'pthread', env.Append(CPPDEFINES = [
'expat', '_POSIX_SOURCE',
'dl', ('_POSIX_C_SOURCE', '199309L'),
]) '_SVID_SOURCE',
'_BSD_SOURCE',
'_GNU_SOURCE',
'PTHREADS',
'HAVE_POSIX_MEMALIGN',
])
env.Append(CPPPATH = ['/usr/X11R6/include'])
env.Append(LIBPATH = ['/usr/X11R6/lib'])
env.Append(LIBS = [
'm',
'pthread',
'expat',
'dl',
])
# DRI # DRI
if dri: if dri:
......
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