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@
$(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 $@ $<
# 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)
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
CPPFLAGS += $(OCC_INCLUDES) $(KERNEL_CXXFLAGS)
CXXFLAGS += $(OCC_CXXFLAGS) $(KERNEL_CXXFLAGS)
-ifeq ($(F77),gfortran)
-LDFLAGS += -lgfortran
-else
-LDFLAGS += -lg2c
-endif
+LDFLAGS += $(FCLIBS)
@CONCLUDE@