The static flag should go into LDFLAGS or LIBS, not CFLAGS.
Also, for libtool to interpret it correctly, it'll need to be "--static", not "-static" (double dash instead of single dash).
-- Pavan
No , but after I did make and make install I checked whether it was statically built using the following command :
file bin/mpiexec
mpiexec: symbolic link to `mpiexec.hydra'
Then I typed
file bin/mpiexec.hydrampiexec.hydra: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=0xb4510fb70ac8047d9028dbafe2d43848140fe894, not stripped
I don't understand why it is dynamically linked and not statically linked