How to set a define statement at runtime via input pins?

I'm working on a project to drive Sure 3216 Displays, and need to be able to, if possible, define the number of displays used at run time. Currently I have the following statement in my code that helps define settings used in the code before both setup() and loop() are called.

#define Number_of_Displays 1

I want to add a 2 position SMD dip switch to the board that can be connected to two pins on an ATMEGA to help define number of displays connected at run time. The way I wanted the switches to work is as follows:

00 = 1 display 01 = 2 displays 10 = 3 displays 11 = 4 displays

Since the #define is at the beginning of the code, is there anyway to have that # dependent on the switch configuration?

I'm thinking of having the following in the setup() routine, or at the beginning of loop():

if (digitalRead(7) == LOW  && digitalRead(8) == LOW) {  
  Number_of_Displays = 1
} 

else if (digitalRead(7) == LOW  && digitalRead(8) == HIGH) {  
  Number_of_Displays = 2
} 

else if (digitalRead(7) == HIGH  && digitalRead(8) == LOW) {  
  Number_of_Displays = 3
} 

else if (digitalRead(7) == HIGH  && digitalRead(8) == HIGH) {  
  Number_of_Displays = 4
}

is this possible

Since "#define"s are tackled before the compiler even sees the code, the chances of doing anything with one at run-time are zero.
Simple binary arithmetic in your sketch would eliminate the need for the "if"s

  Number_of_Displays = 1 + ((digitalRead(7) << 1) | digitalRead(8));

A #define directive is handled before the compiler even gets invoked. So, you will not be able to modify its value at run time, since, at run time, it no longer exists.

You could replace the #define statement to

int Number_of_Displays = 1;

and then have a variable that you could change the value of at run time.

To be technically precise, #defines are processed by the compiler - by the part that runs first.

To be technically precise, #defines

are (pre)processed by the preprocessor.