$NetBSD: patch-ac,v 1.5 2002/03/05 21:05:53 dmcmahill Exp $ check for the fortran libs. We need to check this way to keep compatibility with both f2c and f77 rather than hard coding something like "-lg2c". also honor {C,F,LD}FLAGS --- configure.in.orig Mon Mar 26 07:08:33 2001 +++ configure.in Sun Mar 3 13:19:35 2002 @@ -112,4 +112,12 @@ fi +################################################## +## Fortran libraries required for creating fortran +## shared libraries. In particular this is needed +## for the lapack examples when using f2c. This +## will set the FLIBS variable. +################################################## +AC_F77_LIBRARY_LDFLAGS + ############################################# ## Compilers and options according to machine @@ -847,7 +855,7 @@ # C Compiler # - CC=cc - CC_OPTIONS='-O2 -Dnetbsd' - CC_LDFLAGS="-Wl,-R${X11BASE}/lib" + CC="${CC}" + CC_OPTIONS="${CFLAGS} -Dnetbsd" + CC_LDFLAGS="${LDFLAGS} -Wl,-R${X11BASE}/lib" CC_PICFLAGS='-fPIC' # check for --export-dynamic @@ -875,7 +883,7 @@ fi FC="$F77" - FC_OPTIONS='-O2' + FC_OPTIONS="${FFLAGS}" FC_OPTIONS_O0= - FC_LDFLAGS="-Wl,-R${X11BASE}/lib" + FC_LDFLAGS="${LDFLAGS} -Wl,-R${X11BASE}/lib" FC_PICFLAGS='-fPIC' # check for --export-dynamic @@ -1339,4 +1347,5 @@ AC_SUBST(LDFLAGS) AC_SUBST(LIBS) +AC_SUBST(FLIBS) #AC_SUBST(CC) AC_SUBST(CFLAGS)