Deleted Added
sdiff udiff text old ( 9420:965d857ac791 ) new ( 9477:d0aacc54cee9 )
full compact
1# -*- mode:python -*-
2
3# Copyright (c) 2011 Advanced Micro Devices, Inc.
4# Copyright (c) 2009 The Hewlett-Packard Development Company
5# Copyright (c) 2004-2005 The Regents of The University of Michigan
6# All rights reserved.
7#
8# Redistribution and use in source and binary forms, with or without

--- 623 unchanged lines hidden (view full) ---

632# First two words should be "libprotoc x.y.z"
633if len(protoc_version) < 2 or protoc_version[0] != 'libprotoc':
634 print termcap.Yellow + termcap.Bold + \
635 'Warning: Protocol buffer compiler (protoc) not found.\n' + \
636 ' Please install protobuf-compiler for tracing support.' + \
637 termcap.Normal
638 main['PROTOC'] = False
639else:
640 # Determine the appropriate include path and library path using
641 # pkg-config, that means we also need to check for pkg-config
642 if not readCommand(['pkg-config', '--version'], exception=''):
643 print 'Error: pkg-config not found. Please install and retry.'
644 Exit(1)
645
646 main.ParseConfig('pkg-config --cflags --libs-only-L protobuf')
647
648 # Based on the availability of the compress stream wrappers,
649 # require 2.1.0
650 min_protoc_version = '2.1.0'
651 if compareVersions(protoc_version[1], min_protoc_version) < 0:
652 print 'Error: protoc version', min_protoc_version, 'or newer required.'
653 print ' Installed version:', protoc_version[1]
654 Exit(1)
655
656# Check for SWIG
657if not main.has_key('SWIG'):
658 print 'Error: SWIG utility not found.'
659 print ' Please install (see http://www.swig.org) and retry.'
660 Exit(1)
661
662# Check for appropriate SWIG version

--- 178 unchanged lines hidden (view full) ---

841# development libraries. If the check passes, libprotobuf will be
842# automatically added to the LIBS environment variable. After
843# this, we can use the HAVE_PROTOBUF flag to determine if we have
844# got both protoc and libprotobuf available.
845main['HAVE_PROTOBUF'] = main['PROTOC'] and \
846 conf.CheckLibWithHeader('protobuf', 'google/protobuf/message.h',
847 'C++', 'GOOGLE_PROTOBUF_VERIFY_VERSION;')
848
849# If we have the compiler but not the library, treat it as an error.
850if main['PROTOC'] and not main['HAVE_PROTOBUF']:
851 print 'Error: did not find protocol buffer library and/or headers.'
852 print ' Please install libprotobuf-dev and try again.'
853 Exit(1)
854
855# Check for librt.
856have_posix_clock = \
857 conf.CheckLibWithHeader(None, 'time.h', 'C',
858 'clock_nanosleep(0,0,NULL,NULL);') or \
859 conf.CheckLibWithHeader('rt', 'time.h', 'C',
860 'clock_nanosleep(0,0,NULL,NULL);')
861

--- 308 unchanged lines hidden ---