diff options
Diffstat (limited to 'serfmake')
-rwxr-xr-x | serfmake | 27 |
1 files changed, 24 insertions, 3 deletions
@@ -36,6 +36,7 @@ LIB_FILES = [ ('buckets', 'mmap_buckets'), ('buckets', 'socket_buckets'), ('buckets', 'response_buckets'), + ('buckets', 'response_body_buckets'), ('buckets', 'headers_buckets'), ('buckets', 'allocator'), ('buckets', 'dechunk_buckets'), @@ -59,6 +60,7 @@ TEST_DEPS = [ ('test', 'test_buckets'), ('test', 'test_ssl'), ('test/server', 'test_server'), + ('test/server', 'test_sslserver'), ] TEST_HDR_FILES = [ @@ -124,9 +126,12 @@ def usage(): print('\tinstall\tInstalls serf into PREFIX') print('\tclean\tCleans') print('Options:') - print('\t--with-apr=PATH\tprefix for installed APR and APR-util') - print('\t\t\t(needs apr-1-config and apu-1-config; will look in PATH)') - print('\t--prefix=PATH\tinstall serf into PATH (default: /usr/local)') + print('\t--with-apr=PATH\t\tprefix for installed APR and APR-util') + print('\t\t\t\t(needs apr-1-config and apu-1-config; will look in PATH)') + print('\t--with-gssapi=PATH\tbuild serf with GSSAPI support') + print('\t\t\t\t(needs krb5-config; will look in PATH/bin)') + + print('\t--prefix=PATH\t\tinstall serf into PATH (default: /usr/local)') print('Quick guide:') print('\tserfmake --prefix=/usr/local/serf --with-apr=/usr/local/apr install') sys.exit(1) @@ -140,6 +145,7 @@ def cmd_build(param): def cmd_install(param): builder = Builder(param) + builder.build_target(File('.', PCFILE, 'pc'), False) ### should be called .install_all() builder.install_target(File('.', LIBNAME, 'la'), False) @@ -186,6 +192,7 @@ def cmd_clean(param): class Builder(object): def __init__(self, params): + # use apr option if set if 'apr' in params: self.apr = APRConfig(params['apr']) self.apu = APUConfig(params['apr']) @@ -193,6 +200,12 @@ class Builder(object): self.apr = APRConfig(None) self.apu = APUConfig(None) + # build with gssapi if option is set + if 'gssapi' in params: + self.gssapi = GSSAPIConfig(params['gssapi']) + else: + self.gssapi = None + try: self.prefix = params['prefix'] except: @@ -228,6 +241,10 @@ class Builder(object): + ' ' + self.apr.get_value(None, '--libs') \ + ' -lz' self.SSL_LIBS = '-lssl -lcrypto' + if self.gssapi: + self.LIBS += ' ' + self.gssapi.get_value(None, '--libs gssapi') + self.CFLAGS += ' ' + self.gssapi.get_value('CFLAGS', '--cflags gssapi')\ + + ' -DSERF_HAVE_GSSAPI -g' self.MODE = 644 @@ -420,6 +437,10 @@ class APUConfig(ConfigScript): script_name = 'apu-1-config' +class GSSAPIConfig(ConfigScript): + script_name = 'krb5-config' + + class CommandLine(object): """Simple helper to invoke a system command when called.""" |