Index: mesa/src/mesa/utils/makefile_header
===================================================================
--- mesa.orig/src/mesa/utils/makefile_header	2012-02-20 16:58:30.000000000 +0100
+++ mesa/src/mesa/utils/makefile_header	2012-02-20 17:20:03.000000000 +0100
@@ -271,7 +271,7 @@
 #FCopt = -O3
 FCopt = -O2
 FCdebug = -g
-FCopenmp = -openmp -threads
+FCopenmp = $(OPENMP_FCFLAGS) -threads
 #FCopenmp = 
 FC_fixed_preprocess = -fpp
 FC_free_preprocess = -fpp
@@ -292,8 +292,8 @@
 FCopt = -O2
 FCdebug = -g
 FCstatic =
-
-FCopenmp = -fopenmp
+OPENMP_FCFLAGS ?= -fopenmp
+FCopenmp = $(OPENMP_FCFLAGS)
 #FCopenmp = 
 FC_fixed_preprocess = -x f77-cpp-input
 FC_free_preprocess = -x f95-cpp-input
@@ -308,7 +308,7 @@
 FCfree =
 FCopt = 
 FCdebug = 
-FCopenmp = 
+FCopenmp = $(OPENMP_FCFLAGS)
 
 endif
 endif
