--- MITgcm/tools/build_options/linux_ia32_g77 2005/01/27 14:20:06 1.13 +++ MITgcm/tools/build_options/linux_ia32_g77 2005/08/31 19:42:38 1.18 @@ -1,6 +1,6 @@ #!/bin/bash # -# $Header: /home/ubuntu/mnt/e9_copy/MITgcm/tools/build_options/linux_ia32_g77,v 1.13 2005/01/27 14:20:06 jmc Exp $ +# $Header: /home/ubuntu/mnt/e9_copy/MITgcm/tools/build_options/linux_ia32_g77,v 1.18 2005/08/31 19:42:38 dimitri Exp $ # $Name: $ # @@ -17,7 +17,18 @@ FOPTIM='-O3 -malign-double -funroll-loops' else # Try to follow IEEE-754 - FFLAGS='-Wimplicit -Wunused -ffloat-store -mfpmath=sse -msse -msse2' + has_sse2=f + grep flags /proc/cpuinfo | grep sse2 > /dev/null 2>&1 && has_sse2=t + + # older OS on sea.mit.edu does not support sse + if [ `uname -n` = "sea" ]; then has_sse2=f; fi + + if test "x$has_sse2" = xt ; then + FFLAGS='-Wimplicit -Wunused -mfpmath=sse -msse -msse2' + else + FFLAGS='-Wimplicit -Wunused -ffloat-store' + fi + # echo 'FFLAGS="'$FFLAGS'"' FOPTIM='-O0 -malign-double' fi @@ -26,5 +37,8 @@ LIBS='-L/usr/lib/netcdf-3' elif test -d /usr/include/netcdf ; then INCLUDES='-I/usr/include/netcdf' +elif test -d /usr/local/netcdf ; then + INCLUDES='-I/usr/local/netcdf/include' + LIBS='-L/usr/local/netcdf/lib' fi