From 384738cce0bd68fec612d958cf2d592735809297 Mon Sep 17 00:00:00 2001 From: vsr Date: Mon, 22 Jan 2007 13:08:41 +0000 Subject: [PATCH] Introducing check procedure for Fortran; correct compilation/linkage rules for Fortran source files. --- adm_local/unix/make_commence.in | 9 +++++++++ adm_local/unix/make_conclude.in | 4 ++-- configure.in.base | 19 ++++++++++++++++++- src/MEFISTO2/Makefile.in | 6 +----- 4 files changed, 30 insertions(+), 8 deletions(-) diff --git a/adm_local/unix/make_commence.in b/adm_local/unix/make_commence.in index 0be66a96f..1755f6b6e 100644 --- a/adm_local/unix/make_commence.in +++ b/adm_local/unix/make_commence.in @@ -39,6 +39,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/adm_local/unix/make_conclude.in b/adm_local/unix/make_conclude.in index 554b8afb0..094bb5be8 100644 --- a/adm_local/unix/make_conclude.in +++ b/adm_local/unix/make_conclude.in @@ -308,10 +308,10 @@ distclean: clean $(LT_COMPILE) $(CFLAGS) $(CPPFLAGS) -c $< .f.o: - $(FC) $(FFLAGS) -c $< -o $@ + $(FC) $(FCFLAGS) -c $< -o $@ .f.lo: - $(LT) --mode=compile $(FC) $(FFLAGS) -c $< + $(LT) --mode=compile $(FC) $(FCFLAGS) -c $< .ui.h: $(UIC) -o $@ $< diff --git a/configure.in.base b/configure.in.base index 28f7ffb99..8f9fd19a7 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) @@ -324,7 +341,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 qwt_ok Kernel_ok Geom_ok Med_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 qwt_ok Kernel_ok Geom_ok Med_ok" for var in $variables do diff --git a/src/MEFISTO2/Makefile.in b/src/MEFISTO2/Makefile.in index aea95bcfb..093a7df40 100644 --- a/src/MEFISTO2/Makefile.in +++ b/src/MEFISTO2/Makefile.in @@ -45,11 +45,7 @@ LIB_SERVER_IDL = CPPFLAGS += $(OCC_INCLUDES) $(KERNEL_CXXFLAGS) CXXFLAGS += $(OCC_CXXFLAGS) $(KERNEL_CXXFLAGS) -ifeq ($(F77),gfortran) -LDFLAGS += -lgfortran -else -LDFLAGS += -lg2c -endif +LDFLAGS += $(FCLIBS) @CONCLUDE@ -- 2.39.2