media/libspeex_resampler/src/moz.build
author Karl Tomlinson <karlt+@karlt.net>
Wed, 02 Jul 2014 14:21:34 +1200
changeset 218406 98d22b0455f6cb8ef51d0d3288dd5c03f128da74
parent 217424 f8cd15fa98249662c4541a1fdf588a3cace2b67a
child 219260 2566329e44b954a9ac17788bef9f0d85eb38e552
permissions -rw-r--r--
b=1033122 be consistent about speex_resampler symbol visibility r=khuey When "speex/speex_resampler.h" was included, another exported header (in dist/include) would find the speex/speex_resampler.h in dist/include before dist/system_wrappers. Visibility of undefined symbols depended on the order of includes. This patch changes includes to <speex/speex_resampler.h> so that WRAP_SYSTEM_INCLUDES works as expected but removes the wrapper when not using GKMEDIAS_SHARED_LIBRARY.

# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

LIBRARY_NAME = 'speex'

EXPORTS.speex += [
    'speex_resampler.h',
]

SOURCES += [
  'sse_detect.cpp',
]

SOURCES += [
    'resample.c',
]

MSVC_ENABLE_PGO = True

FINAL_LIBRARY = 'gkmedias'

# We don't compile the full speex codec, only the resampler.
DEFINES['OUTSIDE_SPEEX'] = True

# Visibility is handled through VISIBILITY_FLAGS and
# layout/media/symbols.def.in.
DEFINES['EXPORT'] = ''
if CONFIG['GKMEDIAS_SHARED_LIBRARY']:
    NO_VISIBILITY_FLAGS = True

if CONFIG['OS_TARGET'] == 'Android':
    DEFINES['FIXED_POINT'] = True
else:
    DEFINES['FLOATING_POINT'] = True

# Only use SSE code when using floating point samples, and on x86
if CONFIG['INTEL_ARCHITECTURE'] and CONFIG['OS_TARGET'] != 'Android':
    DEFINES['_USE_SSE'] = True
    DEFINES['_USE_SSE2'] = True
    SOURCES['resample.c'].flags += CONFIG['SSE2_FLAGS']

# Suppress warnings in third-party code.
if CONFIG['GNU_CC']:
    CFLAGS += ['-Wno-sign-compare']