浏览代码

configure.ac: add option to disable fortran

Nathalie Furmento 10 年之前
父节点
当前提交
345da09a5c
共有 1 个文件被更改,包括 13 次插入6 次删除
  1. 13 6
      configure.ac

+ 13 - 6
configure.ac

@@ -2020,6 +2020,19 @@ AC_SUBST(GLOBAL_AM_CFLAGS)
 pkglibdir="\${libdir}/$PACKAGE"
 AC_SUBST([pkglibdir])
 
+###############################################################################
+#                                                                             #
+#                               Fortran                                       #
+#                                                                             #
+###############################################################################
+
+AC_ARG_ENABLE(fortran, [AS_HELP_STRING([--disable-fortran],
+			[disable build of fortran examples])],
+			enable_build_fortran=$enableval, enable_build_fortran=yes)
+if test "x$FC" != "x" -a "x$enable_build_fortran" = "xyes" ; then
+  AC_DEFINE(STARPU_HAVE_FC, [], [Define this if a Fortran compiler is available])
+fi
+AM_CONDITIONAL([STARPU_HAVE_FC], [test "x$FC" != "x" -a "x$enable_build_fortran" = "xyes"])
 
 ###############################################################################
 #                                                                             #
@@ -2471,12 +2484,6 @@ if test "$enable_cuda" = "yes" -a "$ICC" != ""; then
    CFLAGS="$OLD_CFLAGS"
 fi
 
-# Fortran compiler
-if test "x$FC" != "x"; then
-  AC_DEFINE(STARPU_HAVE_FC, [], [Define this if a Fortran compiler is available])
-fi
-AM_CONDITIONAL([STARPU_HAVE_FC], [test "x$FC" != "x"])
-
 # Disable ICC on windows
 if test "x$ICC" != "x" -a "$starpu_windows" = "yes" ; then
     ICC=""