From 59ab1d8e2bc42b43a69b29af3ba43a3c037e1914 Mon Sep 17 00:00:00 2001 From: vsr Date: Mon, 22 Jan 2007 13:13:02 +0000 Subject: [PATCH] Introducing check procedure for Fortran; correct compilation/linkage rules for Fortran source files. --- adm_local/unix/make_commence.in | 9 +++++++++ configure.in.base | 19 ++++++++++++++++++- src/NETGEN/Makefile.in | 8 +------- 3 files changed, 28 insertions(+), 8 deletions(-) diff --git a/adm_local/unix/make_commence.in b/adm_local/unix/make_commence.in index 91a90d9..51d300d 100644 --- a/adm_local/unix/make_commence.in +++ b/adm_local/unix/make_commence.in @@ -36,6 +36,15 @@ CXX = @CXX@ CXXFLAGS = @CXXFLAGS@ CXX_DEPEND_FLAG = @CXX_DEPEND_FLAG@ +# FORTRAN + +F77 = @F77@ +FC = @FC@ +FFLAGS = @FFLAGS@ +FCFLAGS = @FCFLAGS@ +FLIBS = @FLIBS@ +FCLIBS = @FCLIBS@ + # BOOST Library BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ diff --git a/configure.in.base b/configure.in.base index 09a38fc..59b4e84 100644 --- a/configure.in.base +++ b/configure.in.base @@ -106,6 +106,23 @@ AC_DEPEND_FLAG # AC_CC_WARNINGS([ansi]) cc_ok=yes +echo +echo --------------------------------------------- +echo testing Fortran +echo --------------------------------------------- +echo + +fortran_ok=no +AC_PROG_F77 +AC_F77_LIBRARY_LDFLAGS +AC_PROG_FC +AC_FC_LIBRARY_LDFLAGS +if test "X$FC" != "X" ; then + fortran_ok=yes +fi + +echo + dnl Library libdl : AC_CHECK_LIB(dl,dlopen) @@ -330,7 +347,7 @@ echo --------------------------------------------- echo echo Configure -variables="cc_ok boost_ok lex_yacc_ok python_ok swig_ok threads_ok OpenGL_ok qt_ok vtk_ok hdf5_ok omniORB_ok occ_ok doxygen_ok graphviz_ok Kernel_ok Geom_ok SMesh_ok Netgen_ok" +variables="cc_ok fortran_ok boost_ok lex_yacc_ok python_ok swig_ok threads_ok OpenGL_ok qt_ok vtk_ok hdf5_ok omniORB_ok occ_ok doxygen_ok graphviz_ok Kernel_ok Geom_ok SMesh_ok Netgen_ok" for var in $variables do diff --git a/src/NETGEN/Makefile.in b/src/NETGEN/Makefile.in index 4ca3df1..79b3c79 100644 --- a/src/NETGEN/Makefile.in +++ b/src/NETGEN/Makefile.in @@ -77,12 +77,6 @@ LIB_OBJ_LO = $(LIB_OBJ_O:%.o=%.lo) $(LIB): $(LIB_OBJ_O) $(LIB_OBJ_LO) LIB_OBJ = $(LIB_OBJ_LO) -ifeq ($(F77),gfortran) -LDFLAGS += -lgfortran -else -LDFLAGS += -lg2c -endif - -LDFLAGS += $(OCC_LDPATH) -lTKBRep -lTKShHealing -lTKSTEP -lTKXSBase -lTKIGES +LDFLAGS += $(OCC_LDPATH) $(FCLIBS) -lTKBRep -lTKShHealing -lTKSTEP -lTKXSBase -lTKIGES MOSTLYCLEAN += $(LIB_OBJ_O) -- 2.39.2