ports/net-p2p/linuxdcpp/files/patch-SConstruct
Jeremy Messenger 1db511c243 Don't need to remove check on GCC anymore, which it used to be problem. With
this changes fix the build with GCC 4.1.

Reported by:	krismail
2006-12-16 18:10:32 +00:00

53 lines
1.7 KiB
Text

--- SConstruct.orig Sat Dec 16 11:52:44 2006
+++ SConstruct Sat Dec 16 11:54:05 2006
@@ -62,7 +62,7 @@
# Initialization
# ----------------------------------------------------------------------
-env = Environment(ENV = os.environ, options = opts)
+env = Environment(ENV = os.environ, options = opts, CC = '%%CC%%', CXX = '%%CXX%%')
conf = Configure(env,
custom_tests =
@@ -97,15 +97,6 @@
print 'Compiler version check failed. g++ 3.4 or later is needed'
Exit(1)
-# Add support for compiler caches to speed-up compilation.
-if conf.TryAction(Action('distcc'))[0]:
- env.Prepend(CXX = 'distcc ')
- print 'Enabling distcc...'
-
-if conf.TryAction(Action('ccache'))[0]:
- env.Prepend(CXX = 'ccache ')
- print 'Enabling ccache...'
-
if not conf.CheckPKGConfig():
print '\tpkg-config not found.'
Exit(1)
@@ -137,11 +128,6 @@
print '\tHeader file unistd.h not found'
Exit(1)
-if not conf.CheckLibWithHeader('pthread', 'pthread.h', 'c'):
- print '\tpthread library not found'
- print '\tNote: You might have the lib but not the headers'
- Exit(1)
-
if not conf.CheckLibWithHeader('z', 'zlib.h', 'c'):
print '\tz library (gzip/z compression) not found'
print '\tNote: You might have the lib but not the headers'
@@ -168,11 +154,11 @@
env.Append(LINKFLAGS = ['-Wl,--as-needed'])
if env.has_key('debug') and env['debug']:
- env.Append(CXXFLAGS = Split('-g -ggdb -D_DEBUG -Wall'))
+ env.Append(CXXFLAGS = Split('%%CXXFLAGS%% -g -ggdb -D_DEBUG -Wall'))
env.Append(LINKFLAGS = Split('-g -ggdb -Wall'))
if env.has_key('release') and env['release']:
- env.Append(CXXFLAGS = '-O3')
+ env.Append(CXXFLAGS = '%%CXXFLAGS%%')
if env.has_key('profile') and env['profile']:
env.Append(CXXFLAGS = '-pg')