configGenerator_build.cpp 18.2 KB
Newer Older
M
Matt Oliver 已提交
1 2 3 4 5

#include "configGenerator.h"

#include <algorithm>

6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112
bool configGenerator::buildDefaultValues( )
{
    // configurable options
    vector<string> vList;
    if( !getConfigList( "PROGRAM_LIST", vList ) )
    {
        return false;
    }
    //Enable all programs
    vector<string>::iterator vitValues = vList.begin( );
    for( vitValues; vitValues < vList.end( ); vitValues++ )
    {
        toggleConfigValue( *vitValues, true );
    }
    //Enable all libraries
    vList.resize( 0 );
    if( !getConfigList( "LIBRARY_LIST", vList ) )
    {
        return false;
    }
    vitValues = vList.begin( );
    for( vitValues; vitValues < vList.end( ); vitValues++ )
    {
        if( !m_bLibav && vitValues->compare( "avresample" ) != 0 )
        {
            toggleConfigValue( *vitValues, true );
        }
    }
    //Enable all components
    vList.resize( 0 );
    vector<string> vList2;
    if( !getConfigList( "COMPONENT_LIST", vList ) )
    {
        return false;
    }
    vitValues = vList.begin( );
    for( vitValues; vitValues < vList.end( ); vitValues++ )
    {
        toggleConfigValue( *vitValues, true );
        //Get the corresponding list and enable all member elements as well
        vitValues->resize( vitValues->length( ) - 1 ); //Need to remove the s from end
        transform( vitValues->begin( ), vitValues->end( ), vitValues->begin( ), ::toupper );
        //Get the specific list
        vList2.resize( 0 );
        getConfigList( *vitValues + "_LIST", vList2 );
        for( vector<string>::iterator vitComponent = vList2.begin( ); vitComponent < vList2.end( ); vitComponent++ )
        {
            toggleConfigValue( *vitComponent, true );
        }
    }


    fastToggleConfigValue( "runtime_cpudetect", true );
    fastToggleConfigValue( "safe_bitstream_reader", true );
    fastToggleConfigValue( "static", true );
    fastToggleConfigValue( "shared", true );
    fastToggleConfigValue( "swscale_alpha", true );

    // Enable hwaccels by default.
    fastToggleConfigValue( "dxva2", true );

    //Enable x86 hardware architectures
    fastToggleConfigValue( "x86", true );
    fastToggleConfigValue( "i686", true );
    fastToggleConfigValue( "fast_cmov", true );
    fastToggleConfigValue( "x86_32", true );
    fastToggleConfigValue( "x86_64", true );
    //Enable x86 extensions
    vList.resize( 0 );
    if( !getConfigList( "ARCH_EXT_LIST_X86", vList ) )
    {
        return false;
    }
    vitValues = vList.begin( );
    for( vitValues; vitValues < vList.end( ); vitValues++ )
    {
        fastToggleConfigValue( *vitValues, true );
        //Also enable _EXTERNAL and _INLINE
        fastToggleConfigValue( *vitValues + "_EXTERNAL", true );
        fastToggleConfigValue( *vitValues + "_INLINE", true );
    }

    //Default we enable yasm
    fastToggleConfigValue( "yasm", true );

    //msvc specific options
    fastToggleConfigValue( "w32threads", true );
    fastToggleConfigValue( "atomics_win32", true );

    //math functions
    vList.resize( 0 );
    if( !getConfigList( "MATH_FUNCS", vList ) )
    {
        return false;
    }
    vitValues = vList.begin( );
    for( vitValues; vitValues < vList.end( ); vitValues++ )
    {
        fastToggleConfigValue( *vitValues, true );
    }

    fastToggleConfigValue( "access", true );
    fastToggleConfigValue( "aligned_malloc", true );

    fastToggleConfigValue( "CL_cl_h", true );
    fastToggleConfigValue( "closesocket", true );
    fastToggleConfigValue( "CommandLineToArgvW", true );
113
    fastToggleConfigValue( "CoTaskMemFree", true );
114 115 116 117 118 119 120
    fastToggleConfigValue( "cpunop", true );
    fastToggleConfigValue( "CryptGenRandom", true );
    fastToggleConfigValue( "direct_h", true );
    fastToggleConfigValue( "dxva_h", true );
    fastToggleConfigValue( "ebp_available", true );
    fastToggleConfigValue( "ebx_available", true );
    fastToggleConfigValue( "fast_clz", true );
121
    fastToggleConfigValue( "flt_lim", true );
122
    fastToggleConfigValue( "getaddrinfo", true );
123
    fastToggleConfigValue( "getopt", false );
124 125 126 127 128 129 130 131 132 133 134 135 136
    fastToggleConfigValue( "GetProcessAffinityMask", true );
    fastToggleConfigValue( "GetProcessMemoryInfo", true );
    fastToggleConfigValue( "GetProcessTimes", true );
    fastToggleConfigValue( "GetSystemTimeAsFileTime", true );
    fastToggleConfigValue( "io_h", true );
    fastToggleConfigValue( "inline_asm_labels", true );
    //Additional options set for Intel compiler specific inline asm
    fastToggleConfigValue( "inline_asm_nonlocal_labels", false );
    fastToggleConfigValue( "inline_asm_direct_symbol_refs", false );
    fastToggleConfigValue( "inline_asm_non_intel_mnemonic", false );
    fastToggleConfigValue( "isatty", true );
    fastToggleConfigValue( "kbhit", true );
    fastToggleConfigValue( "libc_msvcrt", true );
137
    fastToggleConfigValue( "local_aligned_32", true );
138 139 140 141 142
    fastToggleConfigValue( "local_aligned_16", true );
    fastToggleConfigValue( "local_aligned_8", true );
    fastToggleConfigValue( "malloc_h", true );
    fastToggleConfigValue( "MapViewOfFile", true );
    fastToggleConfigValue( "MemoryBarrier", true );
143
    fastToggleConfigValue( "MoveFileExA", true );
144
    fastToggleConfigValue( "mm_empty", true );
145 146 147 148 149 150
    fastToggleConfigValue( "PeekNamedPipe", true );
    fastToggleConfigValue( "rdtsc", true );
    fastToggleConfigValue( "rsync_contimeout", true );
    fastToggleConfigValue( "SetConsoleTextAttribute", true );
    fastToggleConfigValue( "setmode", true );
    fastToggleConfigValue( "Sleep", true );
151
    fastToggleConfigValue( "CONDITION_VARIABLE_Ptr", true );
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166
    fastToggleConfigValue( "socklen_t", true );
    fastToggleConfigValue( "struct_addrinfo", true );
    fastToggleConfigValue( "struct_group_source_req", true );
    fastToggleConfigValue( "struct_ip_mreq_source", true );
    fastToggleConfigValue( "struct_ipv6_mreq", true );
    fastToggleConfigValue( "struct_pollfd", true );
    fastToggleConfigValue( "struct_sockaddr_in6", true );
    fastToggleConfigValue( "struct_sockaddr_storage", true );
    fastToggleConfigValue( "unistd_h", true );
    fastToggleConfigValue( "VirtualAlloc", true );
    fastToggleConfigValue( "windows_h", true );
    fastToggleConfigValue( "winsock2_h", true );
    fastToggleConfigValue( "wglgetprocaddress", true );

    fastToggleConfigValue( "dos_paths", true );
167
    fastToggleConfigValue( "dxva2api_cobj", true );
168
    fastToggleConfigValue( "dxva2_lib", true );
169 170 171 172 173 174 175

    fastToggleConfigValue( "aligned_stack", true );
    fastToggleConfigValue( "pragma_deprecated", true );
    fastToggleConfigValue( "inline_asm", true );
    fastToggleConfigValue( "frame_thread_encoder", true );
    fastToggleConfigValue( "xmm_clobbers", true );

176 177 178
    fastToggleConfigValue( "xlib", false ); //enabled by default but is linux only so we force disable
    fastToggleConfigValue( "qtkit", false );
    fastToggleConfigValue( "avfoundation", false );
179 180 181 182 183

    //Additional (must be explicitly disabled)
    fastToggleConfigValue( "dct", true );
    fastToggleConfigValue( "dwt", true );
    fastToggleConfigValue( "error-resilience", true );
184 185 186
    fastToggleConfigValue( "faan", true );
    fastToggleConfigValue( "faandct", true );
    fastToggleConfigValue( "faanidct", true );
187
    fastToggleConfigValue( "fast_unaligned", true );
188 189 190 191 192 193
    fastToggleConfigValue( "lsp", true );
    fastToggleConfigValue( "lzo", true );
    fastToggleConfigValue( "mdct", true );
    fastToggleConfigValue( "network", true );
    fastToggleConfigValue( "rdft", true );
    fastToggleConfigValue( "fft", true );
194 195 196 197 198 199 200
    fastToggleConfigValue( "pixelutils", true );

    fastToggleConfigValue( "bzlib", true );
    fastToggleConfigValue( "iconv", true );
    fastToggleConfigValue( "lzma", true );
    fastToggleConfigValue( "sdl", true );
    fastToggleConfigValue( "zlib", true );
201 202 203 204

    return true;
}

M
Matt Oliver 已提交
205 206 207 208 209 210 211 212
void configGenerator::buildFixedValues( DefaultValuesList & mFixedValues )
{
    mFixedValues.clear( );
    mFixedValues["$(c_escape $FFMPEG_CONFIGURATION)"] = "";
    mFixedValues["$(c_escape $LIBAV_CONFIGURATION)"] = "";
    mFixedValues["$(c_escape $license)"] = "lgpl";
    mFixedValues["$(eval c_escape $datadir)"] = ".";
    mFixedValues["$(c_escape ${cc_ident:-Unknown compiler})"] = "msvc";
213
    mFixedValues["$_restrict"] = "__restrict";
M
Matt Oliver 已提交
214 215 216
    mFixedValues["${extern_prefix}"] = "";
    mFixedValues["$build_suffix"] = "";
    mFixedValues["$SLIBSUF"] = "";
217
    mFixedValues["$sws_max_filter_size"] = "256";
M
Matt Oliver 已提交
218 219 220 221 222 223 224 225 226 227 228
}

void configGenerator::buildReplaceValues( DefaultValuesList & mReplaceValues, DefaultValuesList & mASMReplaceValues )
{
    mReplaceValues.clear( );
    //Add to config.h only list
    mReplaceValues["CC_IDENT"] = "#if defined(__INTEL_COMPILER)\n\
#   define CC_IDENT \"icl\"\n\
#else\n\
#   define CC_IDENT \"msvc\"\n\
#endif";
229
    mReplaceValues["EXTERN_PREFIX"] = "#if defined(__x86_64) || defined(_M_X64)\n\
M
Matt Oliver 已提交
230 231 232 233
#   define EXTERN_PREFIX \"\"\n\
#else\n\
#   define EXTERN_PREFIX \"_\"\n\
#endif";
234
    mReplaceValues["EXTERN_ASM"] = "#if defined(__x86_64) || defined(_M_X64)\n\
M
Matt Oliver 已提交
235 236 237 238
#   define EXTERN_ASM\n\
#else\n\
#   define EXTERN_ASM _\n\
#endif";
239
    mReplaceValues["SLIBSUF"] = "#if defined(_USRDLL) || defined(_WINDLL)\n\
M
Matt Oliver 已提交
240 241 242 243 244
#   define SLIBSUF \".dll\"\n\
#else\n\
#   define SLIBSUF \".lib\"\n\
#endif";

245
    mReplaceValues["ARCH_X86_32"] = "#if defined(__x86_64) || defined(_M_X64)\n\
M
Matt Oliver 已提交
246 247 248 249
#   define ARCH_X86_32 0\n\
#else\n\
#   define ARCH_X86_32 1\n\
#endif";
250
    mReplaceValues["ARCH_X86_64"] = "#if defined(__x86_64) || defined(_M_X64)\n\
M
Matt Oliver 已提交
251 252 253 254
#   define ARCH_X86_64 1\n\
#else\n\
#   define ARCH_X86_64 0\n\
#endif";
255
    mReplaceValues["CONFIG_SHARED"] = "#if defined(_USRDLL) || defined(_WINDLL)\n\
M
Matt Oliver 已提交
256 257 258 259
#   define CONFIG_SHARED 1\n\
#else\n\
#   define CONFIG_SHARED 0\n\
#endif";
260
    mReplaceValues["CONFIG_STATIC"] = "#if defined(_USRDLL) || defined(_WINDLL)\n\
M
Matt Oliver 已提交
261 262 263 264
#   define CONFIG_STATIC 0\n\
#else\n\
#   define CONFIG_STATIC 1\n\
#endif";
265
    mReplaceValues["HAVE_ALIGNED_STACK"] = "#if defined(__x86_64) || defined(_M_X64)\n\
M
Matt Oliver 已提交
266 267 268 269
#   define HAVE_ALIGNED_STACK 1\n\
#else\n\
#   define HAVE_ALIGNED_STACK 0\n\
#endif";
270
    mReplaceValues["HAVE_FAST_64BIT"] = "#if defined(__x86_64) || defined(_M_X64)\n\
M
Matt Oliver 已提交
271 272 273 274
#   define HAVE_FAST_64BIT 1\n\
#else\n\
#   define HAVE_FAST_64BIT 0\n\
#endif";
275
    mReplaceValues["HAVE_INLINE_ASM"] = "#if defined(__INTEL_COMPILER)\n\
M
Matt Oliver 已提交
276 277 278 279 280 281 282 283 284 285 286
#   define HAVE_INLINE_ASM 1\n\
#else\n\
#   define HAVE_INLINE_ASM 0\n\
#endif";
    //Build replace values for all inline asm
    vector<string> vInlineList;
    getConfigList( "ARCH_EXT_LIST", vInlineList );
    for( vector<string>::iterator vitIt=vInlineList.begin(); vitIt<vInlineList.end(); vitIt++ )
    {
        transform( vitIt->begin(), vitIt->end(), vitIt->begin(), ::toupper);
        string sName = "HAVE_" + *vitIt + "_INLINE";
287
        mReplaceValues[sName] = "#define " + sName + " HAVE_INLINE_ASM";
M
Matt Oliver 已提交
288
    }
289

290
    //Sanity checks for inline asm (Needed as some code only checks availability and not inline_asm)
291
    mReplaceValues["HAVE_EBP_AVAILABLE"] = "#if HAVE_INLINE_ASM && !defined(_DEBUG)\n\
292 293 294 295
#   define HAVE_EBP_AVAILABLE 1\n\
#else\n\
#   define HAVE_EBP_AVAILABLE 0\n\
#endif";
296
    mReplaceValues["HAVE_EBX_AVAILABLE"] = "#if HAVE_INLINE_ASM && !defined(_DEBUG)\n\
297 298 299 300
#   define HAVE_EBX_AVAILABLE 1\n\
#else\n\
#   define HAVE_EBX_AVAILABLE 0\n\
#endif";
M
Matt Oliver 已提交
301 302 303 304

    //Add to config.asm only list
    mASMReplaceValues["ARCH_X86_32"] = "%ifidn __OUTPUT_FORMAT__,x64\n\
%define ARCH_X86_32 0\n\
305 306
%elifidn __OUTPUT_FORMAT__,win64\n\
%define ARCH_X86_32 0\n\
M
Matt Oliver 已提交
307 308 309 310 311 312
%elifidn __OUTPUT_FORMAT__,win32\n\
%define ARCH_X86_32 1\n\
%define PREFIX\n\
%endif";
    mASMReplaceValues["ARCH_X86_64"] = "%ifidn __OUTPUT_FORMAT__,x64\n\
%define ARCH_X86_64 1\n\
313 314
%elifidn __OUTPUT_FORMAT__,win64\n\
%define ARCH_X86_64 1\n\
M
Matt Oliver 已提交
315 316 317 318 319
%elifidn __OUTPUT_FORMAT__,win32\n\
%define ARCH_X86_64 0\n\
%endif";
    mASMReplaceValues["HAVE_ALIGNED_STACK"] = "%ifidn __OUTPUT_FORMAT__,x64\n\
%define HAVE_ALIGNED_STACK 1\n\
320 321
%elifidn __OUTPUT_FORMAT__,win64\n\
%define HAVE_ALIGNED_STACK 1\n\
M
Matt Oliver 已提交
322 323 324 325 326
%elifidn __OUTPUT_FORMAT__,win32\n\
%define HAVE_ALIGNED_STACK 0\n\
%endif";
    mASMReplaceValues["HAVE_FAST_64BIT"] = "%ifidn __OUTPUT_FORMAT__,x64\n\
%define HAVE_FAST_64BIT 1\n\
327 328
%elifidn __OUTPUT_FORMAT__,win64\n\
%define HAVE_FAST_64BIT 1\n\
M
Matt Oliver 已提交
329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390
%elifidn __OUTPUT_FORMAT__,win32\n\
%define HAVE_FAST_64BIT 0\n\
%endif";
}

void configGenerator::buildReservedValues( vector<string> & vReservedItems )
{
    vReservedItems.resize(0);
    //The following are reserved values that are automatically handled and can not be set explicitly
    vReservedItems.push_back( "x86_32" );
    vReservedItems.push_back( "x86_64" );
    vReservedItems.push_back( "xmm_clobbers" );
    vReservedItems.push_back( "shared" );
    vReservedItems.push_back( "static" );
    vReservedItems.push_back( "aligned_stack" );
}

void configGenerator::buildAdditionalDependencies( DependencyList & mAdditionalDependencies )
{
    mAdditionalDependencies.clear( );
    mAdditionalDependencies["capCreateCaptureWindow"] = true;
    mAdditionalDependencies["CreateDIBSection"] = false;
    mAdditionalDependencies["dv1394"] = false;
    mAdditionalDependencies["dxva2api_h"] = true;
    mAdditionalDependencies["jack_jack_h"] = false;
    mAdditionalDependencies["IBaseFilter"] = true;
    mAdditionalDependencies["libcrystalhd_libcrystalhd_if_h"] = false;
    mAdditionalDependencies["linux_fb_h"] = false;
    mAdditionalDependencies["linux_videodev_h"] = false;
    mAdditionalDependencies["linux_videodev2_h"] = false;
    mAdditionalDependencies["snd_pcm_htimestamp"] = false;
    mAdditionalDependencies["va_va_h"] = false;
    mAdditionalDependencies["vdpau_vdpau_h"] = false;
    mAdditionalDependencies["vdpau_vdpau_x11_h"] = false;
    mAdditionalDependencies["vfwcap_defines"] = true;
    mAdditionalDependencies["VideoDecodeAcceleration_VDADecoder_h"] = false;
    mAdditionalDependencies["X11_extensions_Xvlib_h"] = false;
    mAdditionalDependencies["X11_extensions_XvMClib_h"] = false;
}

void configGenerator::buildOptimisedDisables( OptimisedConfigList & mOptimisedDisables )
{
    //This used is to return prioritised version of different config options
    //  For instance If enabling the decoder from an passed in library that is better than the inbuilt one 
    //  then simply disable the inbuilt so as to avoid unnecessary compilation
    //This may have issues should a user not want to disable these but currently there are static compilation errors 
    //  that will occur as several of these overlapping decoder/encoders have similar named methods that cause link errors.

    mOptimisedDisables.clear( );
    //From trac.ffmpeg.org/wiki/GuidelinesHighQualityAudio
    //Dolby Digital: ac3
    //Dolby Digital Plus: eac3
    //MP2: libtwolame, mp2
    //Windows Media Audio 1: wmav1
    //Windows Media Audio 2: wmav2
    //LC-AAC: libfdk_aac, libfaac, aac, libvo_aacenc
    //HE-AAC: libfdk_aac, libaacplus
    //Vorbis: libvorbis, vorbis
    //MP3: libmp3lame, libshine
    //Opus: libopus
    //libopus >= libvorbis >= libfdk_aac > libmp3lame > libfaac >= eac3/ac3 > aac > libtwolame > vorbis > mp2 > wmav2/wmav1 > libvo_aacenc
    
391
    //*****Encoder optimization is currently ignored as people may want to compare encoders. The commandline should be used to disable unwanted encoders*****//
M
Matt Oliver 已提交
392 393 394 395 396 397 398 399 400 401 402
    
    //mOptimisedDisables["LIBTWOLAME_ENCODER"].push_back( "MP2_ENCODER" );
    //mOptimisedDisables["LIBFDK_AAC_ENCODER"].push_back( "LIBFAAC_ENCODER" );
    //mOptimisedDisables["LIBFDK_AAC_ENCODER"].push_back( "AAC_ENCODER" );
    //mOptimisedDisables["LIBFDK_AAC_ENCODER"].push_back( "LIBVO_AACENC_ENCODER" );
    //mOptimisedDisables["LIBFDK_AAC_ENCODER"].push_back( "LIBAACPLUS_ENCODER" );
    //mOptimisedDisables["LIBFAAC_ENCODER"].push_back( "AAC_ENCODER" );
    //mOptimisedDisables["LIBFAAC_ENCODER"].push_back( "LIBVO_AACENC_ENCODER" );
    //mOptimisedDisables["AAC_ENCODER"].push_back( "LIBVO_AACENC_ENCODER" );
    //mOptimisedDisables["LIBVORBIS_ENCODER"].push_back( "VORBIS_ENCODER" );
    //mOptimisedDisables["LIBMP3LAME_ENCODER"].push_back( "LIBSHINE_ENCODER" );
403 404 405
    //mOptimisedDisables["LIBOPENJPEG_ENCODER"].push_back( "JPEG2000_ENCODER" );//???
    //mOptimisedDisables["LIBUTVIDEO_ENCODER"].push_back( "UTVIDEO_ENCODER" );//???
    //mOptimisedDisables["LIBWAVPACK_ENCODER"].push_back( "WAVPACK_ENCODER" );//???
M
Matt Oliver 已提交
406 407 408 409 410 411 412 413 414 415 416

    mOptimisedDisables["LIBGSM_DECODER"].push_back( "GSM_DECODER" );//???
    mOptimisedDisables["LIBGSM_MS_DECODER"].push_back( "GSM_MS_DECODER" );//???
    mOptimisedDisables["LIBNUT_MUXER"].push_back( "NUT_MUXER" );
    mOptimisedDisables["LIBNUT_DEMUXER"].push_back( "NUT_DEMUXER" );
    mOptimisedDisables["LIBOPENCORE_AMRNB_DECODER"].push_back( "AMRNB_DECODER" );//???
    mOptimisedDisables["LIBOPENCORE_AMRWB_DECODER"].push_back( "AMRWB_DECODER" );//???
    mOptimisedDisables["LIBOPENJPEG_DECODER"].push_back( "JPEG2000_DECODER" );//???
    mOptimisedDisables["LIBSCHROEDINGER_DECODER"].push_back( "DIRAC_DECODER" );
    mOptimisedDisables["LIBSTAGEFRIGHT_H264_DECODER"].push_back( "H264_DECODER" );
    mOptimisedDisables["LIBUTVIDEO_DECODER"].push_back( "UTVIDEO_DECODER" );//???
417
    mOptimisedDisables["VP8_DECODER"].push_back( "LIBVPX_VP8_DECODER" );//Inbuilt native decoder is apparently faster
M
Matt Oliver 已提交
418
    mOptimisedDisables["VP9_DECODER"].push_back( "LIBVPX_VP9_DECODER" );
419
    mOptimisedDisables["OPUS_DECODER"].push_back( "LIBOPUS_DECODER" );//??? Not sure which is better
420 421 422 423 424 425 426 427 428 429 430 431
}

void configGenerator::buildForcedEnables( string sOptionLower, vector<string> & vForceEnable )
{
    if( sOptionLower.compare( "fontconfig" ) == 0 )
    {
        vForceEnable.push_back( "libfontconfig" );
    }
    else if( sOptionLower.compare( "dxva2" ) == 0 )
    {
        vForceEnable.push_back( "dxva2_lib" );
    }
432 433 434 435
    else if( sOptionLower.compare( "libcdio" ) == 0 )
    {
        vForceEnable.push_back( "cdio_paranoia_paranoia_h" );
    }
436 437 438 439 440 441 442 443 444 445 446 447
}

void configGenerator::buildForcedDisables( string sOptionLower, vector<string> & vForceDisable )
{
    if( sOptionLower.compare( "fontconfig" ) == 0 )
    {
        vForceDisable.push_back( "libfontconfig" );
    }
    else if( sOptionLower.compare( "dxva2" ) == 0 )
    {
        vForceDisable.push_back( "dxva2_lib" );
    }
448 449 450 451
    else if( sOptionLower.compare( "libcdio" ) == 0 )
    {
        vForceDisable.push_back( "cdio_paranoia_paranoia_h" );
    }
452 453 454 455 456 457 458 459 460 461
}

void configGenerator::buildObjects( const string & sTag, vector<string> & vObjects )
{
    if( sTag.compare( "COMPAT_OBJS" ) == 0 )
    {
        vObjects.push_back( "msvcrt/snprintf" ); //msvc only provides _snprintf which does not conform to snprintf standard
        vObjects.push_back( "strtod" ); //msvc contains a strtod but it does not handle NaN's correctly
        vObjects.push_back( "getopt" );
    }
M
Matt Oliver 已提交
462
}