diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2016-10-25 18:59:16 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2016-10-26 17:40:48 +0530 |
commit | 642d7f887b65f1aa8db8cf2afcc06b1797c8f95d (patch) | |
tree | a68581e667f9f0cbc698927120e61671a1a59bcf | |
parent | 4eea94bbdd772491d2a918de0806ab6b742fbf4c (diff) |
config/darwin,ios: Set includes in CPPFLAGS as well
This allows checks like AC_CHECK_HEADER and others to use the correct
headers.
-rw-r--r-- | config/darwin.config | 4 | ||||
-rw-r--r-- | config/ios.config | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/config/darwin.config b/config/darwin.config index df98fe13..710b3a62 100644 --- a/config/darwin.config +++ b/config/darwin.config @@ -43,7 +43,7 @@ elif not os.path.exists(sdk_root): min_osx_sdk_version = min_osx_sdk_version or '10.8' sdk='-mmacosx-version-min=%s -isysroot %s' % (min_osx_sdk_version, sdk_root) -for f in ['CFLAGS', 'CCASFLAGS', 'CXXFLAGS', 'OBJCFLAGS', 'LDFLAGS']: +for f in ['CPPFLAGS', 'CFLAGS', 'CCASFLAGS', 'CXXFLAGS', 'OBJCFLAGS', 'LDFLAGS']: os.environ[f] = os.environ.get(f, '') arch_cflags = '-Wall -g -O2' @@ -64,7 +64,7 @@ incl_dir = os.path.join(prefix, 'include') if not os.path.exists(incl_dir): os.makedirs(incl_dir) -for f in ['CFLAGS', 'CCASFLAGS', 'CXXFLAGS', 'OBJCFLAGS']: +for f in ['CPPFLAGS', 'CFLAGS', 'CCASFLAGS', 'CXXFLAGS', 'OBJCFLAGS']: os.environ[f] += ' %s -I%s %s ' % (arch_cflags, incl_dir, sdk) os.environ['LDFLAGS'] += ' %s %s ' % (arch_ldflags, sdk) diff --git a/config/ios.config b/config/ios.config index b24519f2..a8a66b38 100644 --- a/config/ios.config +++ b/config/ios.config @@ -102,6 +102,7 @@ os.environ['AR']= 'ar' os.environ['NM']= 'nm' os.environ['NMEDIT']= 'nmedit' os.environ['RANLIB']= 'ranlib' +os.environ['CPPFLAGS'] = '{} -isysroot {} '.format(arch_cflags, sysroot) if ios_platform == 'iPhoneOS': os.environ['CFLAGS'] = '%s -isysroot %s -miphoneos-version-min=%s %s' %(arch_cflags, sysroot, min_version, extra_cflags) os.environ['LDFLAGS'] = '%s -isysroot %s -miphoneos-version-min=%s -Wl,-iphoneos_version_min,%s -Wl,-undefined,error -Wl,-headerpad_max_install_names %s' %(arch_cflags, sysroot, min_version, min_version, extra_ldflags) |