I try to build LAPack 3.3.1 unter LInux for using with ATLAS. I use cmake for creating the Makefile and I can build the static or shared library without any problem, but the ATLAS configure need a static LAPack build with the flag -fPIC. So run cmake and build the static ones, select the "Release" build type (CMAKE_BUILD_TYPE) and add to the CMAKE_Fortran_FLAGS_RELEASE the -fPIC, build and install process runs without problems, but the ATLAS configure script shows the error that the liblapack.a isn't build with the -fPIC flag.
On which step is my mistake? How can I add the -fPIC to the build process?