--- configure.in.orig Sat Nov 4 00:06:57 2006 +++ configure.in Tue Jan 16 17:37:44 2007 @@ -119,7 +119,7 @@ fi AC_CHECK_PROG(WITH_G77,g77,yes,no) if test "$WITH_G77" = no; then - AC_CHECK_PROG(WITH_GFORTRAN,gfortran,yes,no) + AC_CHECK_PROGS(WITH_GFORTRAN,[gfortran gfortran41 gfortran42 gfortran43],no) if test "$WITH_GFORTRAN" = no; then AC_MSG_ERROR([Unable to configure: g77 or gfortran compiler not found]) fi @@ -151,7 +151,7 @@ fi elif test "$with_gfortran" = yes; then # GNU g95 (gfortran) required - AC_CHECK_PROG(WITH_GFORTRAN,gfortran,yes,no) + AC_CHECK_PROGS(WITH_GFORTRAN,[gfortran gfortran41 gfortran42 gfortran43],no) if test "$WITH_GFORTRAN" = no; then AC_MSG_ERROR([Unable to configure: gfortran compiler not found]) fi @@ -1297,14 +1297,29 @@ FC_PICFLAGS='-fPIC' LD=ld LD_LDFLAGS=-lm - + if test "$WITH_G77" = yes; then + FC_PICFLAGS=-fPIC + if test "$enable_debug" = yes; then + FC_OPTIONS="-g" + FC_OPTIONS_O0="" + else + FC_OPTIONS="-O" + FC_OPTIONS_O0="" + fi + elif test "$WITH_GFORTRAN" != no;then + if test "$enable_debug" = yes; then + FC_OPTIONS="-g" + FC_OPTIONS_O0="" + else + FC_OPTIONS="-O" + FC_OPTIONS_O0="" + fi + FC_PICFLAGS=-fPIC + AC_DEFINE(G95_FORTRAN) + fi if test "$enable_debug" = yes; then CC_OPTIONS='-g -Dfreebsd' FC_OPTIONS=-g - fi - if test "$WITH_G77" = yes; then - # On FreeBSD the gnu fortran compiler is named f77 - FC=f77 fi DLDLIB='${SCIDIR}/libs/libdld.a' DLD_SUBDIR=dld @@ -1904,6 +1919,9 @@ GETLIBTK=libtk$TK_MAJOR_VERSION.$TK_MINOR_VERSION.$SONAME case "$host" in + *-*-freebsd*) + GETLIBTK=libtk$TK_MAJOR_VERSION$TK_MINOR_VERSION.$SONAME + ;; *-*-darwin*) GETLIBTK=/sw/lib/libtk$TK_MAJOR_VERSION.$TK_MINOR_VERSION.dylib ;;