2424#include < regex>
2525
2626ConfigGenerator::ConfigGenerator ()
27- :
28- #ifdef _MSC_VER
29- m_toolchain (" msvc" )
30- #elif defined(_WIN32)
31- m_toolchain (" mingw" )
32- #else
33- m_toolchain (" gcc" )
34- #endif
35- , m_projectName(" FFMPEG" )
27+ : m_projectName(" FFMPEG" )
3628{}
3729
3830bool ConfigGenerator::passConfig (const int argc, char ** argv)
@@ -345,7 +337,7 @@ bool ConfigGenerator::changeConfig(const string& option)
345337 outputLine (helpOptions);
346338 // Add in custom standard string
347339 outputLine (" Standard options:" );
348- outputLine (" --prefix=PREFIX install in PREFIX [../../../msvc/]" );
340+ // outputLine(" --prefix=PREFIX install in PREFIX [../../../msvc/]");
349341 // outputLine(" --bindir=DIR install binaries in DIR [PREFIX/bin]");
350342 // outputLine(" --libdir=DIR install libs in DIR [PREFIX/lib]");
351343 // outputLine(" --incdir=DIR install includes in DIR [PREFIX/include]");
@@ -355,7 +347,6 @@ bool ConfigGenerator::changeConfig(const string& option)
355347 " --use-existing-config use an existing config.h file found in rootdir, ignoring any other passed parameters affecting config" );
356348 // Add in custom toolchain string
357349 outputLine (" Toolchain options:" );
358- outputLine (" --toolchain=NAME set tool defaults according to NAME" );
359350 outputLine (" --dce-only do not output a project and only generate missing DCE files" );
360351 outputLine (
361352 " --use-yasm use YASM instead of the default NASM (this is not advised as it does not support newer instructions)" );
@@ -368,63 +359,7 @@ bool ConfigGenerator::changeConfig(const string& option)
368359 }
369360 return false ;
370361 }
371- if (option.find (" --toolchain" ) == 0 ) {
372- // Check for correct command syntax
373- if (option.at (11 ) != ' =' ) {
374- outputError (" Incorrect toolchain syntax (" + option + " )" );
375- outputError (" Excepted syntax (--toolchain=NAME)" , false );
376- return false ;
377- }
378- // A tool chain has been specified
379- string toolChain = option.substr (12 );
380- if (toolChain == " msvc" ) {
381- // Don't disable inline as the configure header will auto header guard it out anyway. This allows for
382- // changing on the fly afterwards
383- } else if (toolChain == " icl" ) {
384- // Inline asm by default is turned on if icl is detected
385- } else {
386- #ifdef _MSC_VER
387- // Only support msvc when built with msvc
388- outputError (" Unknown toolchain option (" + toolChain + " )" );
389- outputError (" Excepted toolchains (msvc, icl)" , false );
390- return false ;
391- #else
392- // Only support other toolchains if DCE only
393- if (!m_onlyDCE) {
394- outputError (" Unknown toolchain option (" + sToolChain + " )" );
395- outputError (" Other toolchains are only supported if --dce-only has already been specified." , false );
396- return false ;
397- } else {
398- if ((toolChain.find (" mingw" ) == string::npos) && (toolChain.find (" gcc" ) == string::npos)) {
399- outputError (" Unknown toolchain option (" + toolChain + " )" );
400- outputError (" Excepted toolchains (mingw*, gcc*)" , false );
401- return false ;
402- }
403- }
404- #endif
405- }
406- m_toolchain = toolChain;
407- } else if (option.find (" --prefix" ) == 0 ) {
408- // Check for correct command syntax
409- if (option.at (8 ) != ' =' ) {
410- outputError (" Incorrect prefix syntax (" + option + " )" );
411- outputError (" Excepted syntax (--prefix=PREFIX)" , false );
412- return false ;
413- }
414- // A output dir has been specified
415- string value = option.substr (9 );
416- m_outDirectory = value;
417- // Convert '\' to '/'
418- replace (m_outDirectory.begin (), m_outDirectory.end (), ' \\ ' , ' /' );
419- // Check if a directory has been passed
420- if (m_outDirectory.length () == 0 ) {
421- m_outDirectory = " ./" ;
422- }
423- // Check if directory has trailing '/'
424- if (m_outDirectory.back () != ' /' ) {
425- m_outDirectory += ' /' ;
426- }
427- } else if (option.find (" --rootdir" ) == 0 ) {
362+ if (option.find (" --rootdir" ) == 0 ) {
428363 // Check for correct command syntax
429364 if (option.at (9 ) != ' =' ) {
430365 outputError (" Incorrect rootdir syntax (" + option + " )" );
@@ -516,7 +451,7 @@ bool ConfigGenerator::changeConfig(const string& option)
516451 // Find remainder of option
517452 option2 = option.substr (10 );
518453 } else {
519- outputError (" Unknown command line option (" + option2 + " )" );
454+ outputError (" Unknown command line option (" + option + " )" );
520455 outputError (" Use --help to get available options" , false );
521456 return false ;
522457 }
0 commit comments