There are several special files in the Apple Class Suites (ACS) library that control how the library is built. First there is the file "AutoSwitches_AC.h". A switch is a compiler flag, such as qDebug. During compiling, the AutoSwitches_AC.h file is one of the first files to be examined. It is included before any ACS compiler flag is set to its default value.
Think of the AutoSwitches_AC.h file as a way to override the default compiler flag settings for the ACS library. Any values loaded from this file at the beginning of the compile cycle override default values defined later. The AutoSwitches_AC.h file ships as an empty file, so by default it does nothing, but you can modify the file to specify the value for any compiler flag you are interested in.
For example, if you are building a debug version of the ACS, qCoreDebug is defined as 1 by default, which causes qTidyHeap to also be defined as 1. (TidyHeap is a debugging tool that keeps track of blocks of memory allocated by new or deleted by delete.) If you want to specifically set the value for qTidyHeap, you can insert a line like the following into AutoSwitches_AC.h:
#define qTidyHeap 0 // don't build with TidyHeap, even if it's a debug build
AutoSwitches_AC.h provides a single place to override the default setting for any ACS compile-time switch.
You can also specify the value for MacApp switches in the AutoSwitches_AC.h file, as described in the previous section. For example, you can disable MacApp's drag and drop feature by adding a line like the following:
#define qDrag 0
Every ACS suite follows a standard convention for header files. First of all, there is a suite header file, titled "Suitename_AC.h". For example, "Core_AC.h" is the header file for the Core suite, "Patterns_AC.h" for the Patterns suite, and "Threads_AC.h" for the Threads suite. Each header file in each suite (except for the suite header file itself) includes the suite header file as its first included file. For example, each header file in the Patterns suite includes "Patterns_AC.h" as its first included file.
A second header file created for each suite is the the suite switches file. This file is titled 'SuiteSwitches_AC.h'. For example, 'ThreadSwitches_AC.h" is the switches file for the Threads suite. The suite switches file is always included by the suite header file and is home to compiler directives specific to the suite. For example, in "ThreadSwitches_AC.h" you'll find the switch qWantsMP, which causes the threads suite to be compiled with support for multiprocessor threads.
Although you should always define suite-specific switches in AutoSwitches_AC.h, you can specify the value for suite-specific switches in the suite switches file. For example, to set the default value of qWantsMP to false, you could insert a line like the following into the ThreadSwitches_AC.h file.
#define qWantsMP 0
Note that changes to a suite's switches file apply to each file in the suite.