Confining CPPFLAGS=-P to only happen for GCC. (#3404)
This commit is contained in:
parent
22d7f9da40
commit
6066526492
1 changed files with 8 additions and 4 deletions
|
@ -46,9 +46,6 @@ class Ncurses(AutotoolsPackage):
|
|||
|
||||
def configure_args(self):
|
||||
opts = [
|
||||
# The CPPFLAGS setting works around this bug:
|
||||
# <http://stackoverflow.com/questions/37475222/ncurses-6-0-compilation-error-error-expected-before-int>
|
||||
'CPPFLAGS=-P',
|
||||
'CFLAGS={0}'.format(self.compiler.pic_flag),
|
||||
'CXXFLAGS={0}'.format(self.compiler.pic_flag),
|
||||
'--with-shared',
|
||||
|
@ -60,6 +57,13 @@ def configure_args(self):
|
|||
'--enable-pc-files',
|
||||
'--with-pkg-config-libdir={0}/lib/pkgconfig'.format(self.prefix)
|
||||
]
|
||||
|
||||
if '+symlinks' in self.spec:
|
||||
opts += ["--enable-symlinks"]
|
||||
opts.append('--enable-symlinks')
|
||||
|
||||
# The CPPFLAGS setting works around this bug:
|
||||
# <http://stackoverflow.com/questions/37475222/ncurses-6-0-compilation-error-error-expected-before-int>
|
||||
if self.spec.satisfies('%gcc'):
|
||||
opts.append('CPPFLAGS=-P')
|
||||
|
||||
return opts
|
||||
|
|
Loading…
Reference in a new issue