 
*** Steps to compiling CSOUND5 with Intel's Optimized icc/icpc C/C++ compilers ***
***                         on Linux                                           ***

1) Add to "custom.py"

if sys.platform[:5] == 'linux':
    platform = 'linux'
    customCCFLAGS.append('-I/opt/intel/cc/9.0/include')
    customCPPPATH.append('/opt/intel/cc/9.0/include')
    customCXXFLAGS.append('-L/opt/intel/cc/9.0/lib')
    customCXXFLAGS.append('-I/opt/intel/cc/9.0/include/c++')
    customCXXFLAGS.append('-I/opt/intel/cc/9.0/include')

2) In SConstruct, do "Find and Replace..." for

Find:          'm'
Replace with:  'svml'
    (should be 13 replacements)

Then add 'svml' to the TclCsound options 
    (line 1814, 01/03/07)
    (line 1854  01/23/07)

    elif getPlatform() == 'linux':
        csTclEnvironment.Append(CPPPATH = tclIncludePath)
        csTclEnvironment.Append(LIBS = ['tcl8.4', 'tk8.4', 'dl', 'pthread', 'svml'])

3) Using these configuration options

commandOptions.Add('useDouble',
    'Set to 1 to use double-precision floating point for audio samples.',
    '0')
commandOptions.Add('usePortAudio',
    'Set to 1 to use PortAudio for real-time audio input and output.',
    '0')
commandOptions.Add('usePortMIDI',
    'Build PortMidi plugin for real time MIDI input and output.',
    '1')
commandOptions.Add('useALSA',
    'Set to 1 to use ALSA for real-time audio and MIDI input and output.',
    '1')
commandOptions.Add('useJack',
    'Set to 1 if you compiled PortAudio to use Jack; also builds Jack plugin.',
    '1')
commandOptions.Add('useFLTK',
    'Set to 1 to use FLTK for graphs and widget opcodes.',
    '0')
commandOptions.Add('noFLTKThreads',
    'Set to 1 to disable use of a separate thread for FLTK widgets.',
    '0')
commandOptions.Add('pythonVersion',
    'Set to the Python version to be used.',
    '2.3')
commandOptions.Add('buildCsoundVST',
    'Set to 1 to build CsoundVST (needs FLTK, boost, Python, SWIG).',
    '0')
commandOptions.Add('buildCsound5GUI',
    'Build FLTK GUI frontend (requires FLTK 1.1.7 or later).',
    '0')
commandOptions.Add('generateTags',
    'Set to 1 to generate TAGS',
    '0')
commandOptions.Add('generatePdf',
    'Set to 1 to generate PDF documentation',
    '0')
commandOptions.Add('generateXmg',
    'Set to 1 to generate string database',
    '1')
commandOptions.Add('generateZip',
    'Set to 1 to generate zip archive',
    '0')
commandOptions.Add('buildLoris',
    'Set to 1 to build the Loris Python extension and opcodes',
    '0')
commandOptions.Add('useOSC',
    'Set to 1 if you want OSC support',
    '1')
if getPlatform() != 'win32':
    commandOptions.Add('useUDP',
        'Set to 0 if you do not want UDP support',
        '1')
else:
    commandOptions.Add('useUDP',
        'Set to 1 if you want UDP support',
        '0')
commandOptions.Add('buildPythonOpcodes',
    'Set to 1 to build Python opcodes',
    '1')
commandOptions.Add('prefix',
    'Base directory for installs. Defaults to /usr/local.',
    '/usr/local')
commandOptions.Add('buildRelease',
    'Set to 1 to build for release (implies noDebug).',
    '0')
commandOptions.Add('noDebug',
    'Build without debugging information.',
    '1')
commandOptions.Add('gcc3opt',
    'Enable gcc 3.3.x or later optimizations for the specified CPU architecture (e.g. pentium3); implies noDebug.',
    'pentium4')
commandOptions.Add('gcc4opt',
    'Enable gcc 4.0 or later optimizations for the specified CPU architecture (e.g. pentium3); implies noDebug.',
    'pentium4')
commandOptions.Add('useLrint',
    'Use lrint() and lrintf() for converting floating point values to integers.',
    '0')
commandOptions.Add('useGprof',
    'Build with profiling information (-pg).',
    '0')
commandOptions.Add('Word64',
    'Build for 64bit computer',
    '0')
if getPlatform() == 'win32':
    commandOptions.Add('dynamicCsoundLibrary',
        'Set to 0 to build static Csound library instead of csound.dll',
        '1')
else:
    commandOptions.Add('dynamicCsoundLibrary',
        'Build dynamic Csound library instead of libcsound.a',
        '0')
commandOptions.Add('buildStkOpcodes',
    "Build opcodes encapsulating Perry Cook's Synthesis Toolkit in C++ instruments and effects",
    '0')
commandOptions.Add('install',
    'Enables the Install targets',
    '0')
commandOptions.Add('buildPDClass',
    "build csoundapi~ PD class (needs m_pd.h in the standard places)",
    '1')
commandOptions.Add('useCoreAudio',
    "Set to 1 to use CoreAudio for real-time audio input and output.",
    '0')
commandOptions.Add('useAltivec',
    "On OSX use the gcc AltiVec optmisation flags",
    '0')
commandOptions.Add('buildDSSI',
    "Build DSSI/LADSPA host opcodes",
    '0')
commandOptions.Add('buildUtilities',
    "Build stand-alone executables for utilities that can also be used with -U",
    '1')
commandOptions.Add('buildTclcsound',
    "Build Tclcsound frontend (cstclsh, cswish and tclcsound dynamic module). Requires Tcl/Tk headers and libs",
    '1')
commandOptions.Add('buildWinsound',
    "Build Winsound frontend. Requires FLTK headers and libs",
    '0')
commandOptions.Add('buildVirtual',
    "Build Virtual MIDI keyboard. Requires FLTK 1.1.7 headers and libs",
    '0')
commandOptions.Add('buildInterfaces',
    "Build interface library for Python, JAVA, Lua, C++, and other languages.",
    '0')
commandOptions.Add('buildJavaWrapper',
    'Set to 1 to build Java wrapper for the interface library.',
    '0')
commandOptions.Add('buildOSXGUI',
    'On OSX, set to 1 to build the basic GUI frontend',
    '0')
commandOptions.Add('buildCSEditor',
    'Set to 1 to build the Csound syntax highlighting text editor. Requires FLTK headers and libs',
    '0')
commandOptions.Add('withMSVC',
    'On Windows, set to 1 to build with Microsoft Visual C++, or set to 0 to build with MinGW',
    '0')

4) Getting these errors still

WARNING: could not open library '/home/daveakbari/Desktop/csound5/libmixer.so' (/home/daveakbari/Desktop/csound5/libmixer.so: undefined symbol: _ZNKSt12_String_base5_XranEv)

WARNING: could not open library '/home/daveakbari/Desktop/csound5/libwidgets.so' (/home/daveakbari/Desktop/csound5/libwidgets.so: undefined symbol: _ZSt7_BADOFF)

WARNING: could not open library '/home/daveakbari/Desktop/csound5/libvirtual.so' (/home/daveakbari/Desktop/csound5/libvirtual.so: undefined symbol: _ZNSt6_WinitD1Ev)


5) Comment out the mixer opcodes

#makePlugin(pluginEnvironment, 'mixer', ['Opcodes/mixer.cpp'])
    (line 1115 - 01/03/07)
    (line 1148 - 01/23/07)

6) When invoking SConstruct, use the following if gcc-version returns an unsupported number

$ scons CC="icc -gcc-version=400" CXX="icpc -gcc-version=400"
