Lines Matching refs:env
27 def __init__(self, env):
28 self.env = env
35 if 'LIBS' in self.env:
36 #print("Backup LIBS: " + repr(self.env['LIBS']))
38 self.backup_libs = copy(self.env['LIBS'])
48 if 'LIBS' in self.env:
49 del self.env['LIBS']
51 #print("Restoring LIBS, now: " + repr(self.env['LIBS']))
52 self.env['LIBS'] = self.backup_libs
53 #print("Restoring LIBS, to: " + repr(self.env['LIBS']))
55 def __init__(self, env):
56 self.conf = Configure(env, custom_tests = {
63 return self.conf.env.Append(*args, **kw)
69 def env(self):
70 return self.conf.env
73 return Autoconf.RestoreEnvLibs(self.conf.env)
102 self.conf.env.Append(CPPFLAGS = [ '-DHAVE_' + underscorify(target) ])
112 self.env.Append(LIBS = libs)
120 self.conf.env.Append(CPPFLAGS = [ '-DHAVE_' + underscorify(func) ])
126 self.conf.env.Append(CPPFLAGS = [ '-DHAVE_' + underscorify(func) ])
137 self.conf.env.Append(CPPFLAGS = [ '-DHAVE_' + underscorify(type) ])
141 self.conf.env.ParseConfig(*args, **kw)
151 self.env['LIBS'] = []
154 self.env.Append(**{lib: self.env['LIBS']})
210 if self.env[withname] != 1:
211 binpath = self.env[withname]
213 prog = self.env.Detect(progname)
215 binpath = self.env.WhereIs(prog)
278 env = Environment(
284 env.Help(vars.GenerateHelpText(env))
286 if env.subst('${CC}') != '':
287 env['CC'] = env.subst('${CC}')
289 env['package'] = package
290 env['version'] = version
291 if env['CC'] == 'gcc':
293 env.Append(CCFLAGS = Split('-pipe -Wall -O2 -g -W -pedantic -Wunused -Wshadow -std=gnu99'))
295 env.Append(CPPFLAGS = [
304 if env['with_all']:
311 env[feature] = True
315 autoconf = Autoconf(env)
318 autoconf.env.Append(CCFLAGS = os.environ['CFLAGS'])
322 autoconf.env.Append(LINKFLAGS = os.environ['LDFLAGS'])
326 autoconf.env.Append(APPEND_LIBS = os.environ['LIBS'])
329 autoconf.env.Append(APPEND_LIBS = '')
331 autoconf.env.Append(
451 if re.compile("sunos|solaris").search(env['PLATFORM']):
466 autoconf.env.Append(
470 autoconf.env['LIBS'] = ['crypt']
476 autoconf.env.Append(CPPFLAGS = [ '-DHAVE_SOCKLEN_T' ])
479 autoconf.env.Append(CPPFLAGS = [ '-DHAVE_STRUCT_SOCKADDR_STORAGE' ])
482 autoconf.env.Append(
488 autoconf.env.Append(
494 autoconf.env.Append(CPPFLAGS = [ '-DHAVE_IPV6' ])
497 autoconf.env.Append(CPPFLAGS = [ '-DHAVE_WEAK_SYMBOLS' ])
500 autoconf.env.Append(CPPFLAGS = [ '-DHAVE_STRUCT_TM_GMTOFF' ])
503 autoconf.env.Append(LIBDL = 'dl')
505 if env['with_bzip2']:
508 autoconf.env.Append(
513 if env['with_brotli']:
516 autoconf.env.Append(
520 if env['with_dbi']:
523 autoconf.env.Append(
528 if env['with_fam'] and not autoconf.CheckCHeader('sys/inotify.h'):
531 autoconf.env.Append(
537 if env['with_libdeflate']:
540 autoconf.env.Append(
545 if env['with_maxminddb']:
548 autoconf.env.Append(
553 if env['with_krb5']:
558 autoconf.env.Append(
564 if env['with_ldap']:
569 autoconf.env.Append(
578 if env['with_lua']:
583 autoconf.env.Append(CPPFLAGS = [ '-DHAVE_LUA_H' ])
589 if env['with_mysql']:
593 autoconf.env.Append(CPPFLAGS = [ '-DHAVE_MYSQL' ])
595 if env['with_nss']:
599 autoconf.env.Append(CPPFLAGS = [ '-DHAVE_NSS3_NSS_H' ])
601 if env['with_openssl']:
604 autoconf.env.Append(
611 if env['with_wolfssl']:
612 if type(env['with_wolfssl']) is str:
613 autoconf.env.AppendUnique(
614 CPPPATH = [ env['with_wolfssl'] + '/include',
615 env['with_wolfssl'] + '/include/wolfssl' ],
616 LIBPATH = [ env['with_wolfssl'] + '/lib' ],
620 autoconf.env.Append(
626 if env['with_mbedtls']:
629 autoconf.env.Append(
637 if env['with_nettle']:
640 autoconf.env.Append(
645 if env['with_gnutls']:
648 autoconf.env.Append(
652 if not autoconf.env.exists('LIBCRYPTO'):
653 autoconf.env.Append(
657 if env['with_pam']:
660 autoconf.env.Append(
665 if env['with_pcre2'] and not env['with_pcre']:
669 autoconf.env.Append(CPPFLAGS = [ '-DHAVE_PCRE2_H', '-DHAVE_PCRE' ])
670 elif env['with_pcre']:
674 autoconf.env.Append(CPPFLAGS = [ '-DHAVE_PCRE_H', '-DHAVE_PCRE' ])
676 if env['with_pgsql']:
679 autoconf.env.Append(CPPFLAGS = [ '-DHAVE_PGSQL' ])
681 if env['with_sasl']:
684 autoconf.env.Append(
689 if env['with_sqlite3']:
692 autoconf.env.Append(
697 if env['with_uuid']:
700 autoconf.env.Append(
705 if env['with_xml']:
709 autoconf.env.Append(CPPFLAGS = [ '-DHAVE_LIBXML_H', '-DHAVE_LIBXML2' ])
711 if env['with_xxhash']:
714 autoconf.env.Append(
719 if env['with_zlib']:
722 autoconf.env.Append(
727 if env['with_zstd']:
730 autoconf.env.Append(
735 env = autoconf.Finish()
737 if re.compile("cygwin|mingw|midipix").search(env['PLATFORM']):
738 env.Append(COMMON_LIB = 'bin')
739 elif re.compile("darwin|aix").search(env['PLATFORM']):
740 env.Append(COMMON_LIB = 'lib')
742 env.Append(COMMON_LIB = False)
746 env.Append(CPPFLAGS = [
753 SConscript('src/SConscript', exports = 'env', variant_dir = 'sconsbuild/build', duplicate = 0)
754 SConscript('tests/SConscript', exports = 'env', variant_dir = 'sconsbuild/tests')