|
@@ -127,12 +127,12 @@ AC_MSG_CHECKING(maximum number of Fpga devices)
|
|
|
AC_ARG_ENABLE(maxfpgadev, [AS_HELP_STRING([--enable-maxfpgadev=<number>],
|
|
|
[maximum number of FPGA devices])],
|
|
|
nmaxfpgadev=$enableval, nmaxfpgadev=12)
|
|
|
-AC_MSG_RESULT($nmaxfpga)
|
|
|
+AC_MSG_RESULT($nmaxfpgadev)
|
|
|
|
|
|
#nmaxfpgadev=60
|
|
|
AC_DEFINE_UNQUOTED(STARPU_MAXFPGADEVS, [$nmaxfpgadev],
|
|
|
[maximum number of Fpga devices])
|
|
|
-
|
|
|
+
|
|
|
AC_ARG_WITH([fpga],
|
|
|
[AS_HELP_STRING([--with-fpga=<path>],[specify where Fpga lib is installed])],
|
|
|
[fpga_dir="$withval"
|
|
@@ -145,15 +145,6 @@ AC_ARG_ENABLE(link-with-riffa, [AS_HELP_STRING([--disable-link-with-riffa],
|
|
|
AC_ARG_ENABLE(link-with-maxeler, [AS_HELP_STRING([--disable-link-with-maxeler],
|
|
|
[link with MAXELER])], [link_with_maxeler=$enableval], [link_with_maxeler=yes])
|
|
|
|
|
|
-
|
|
|
-AC_MSG_CHECKING(whether Fpga should be used)
|
|
|
-AC_MSG_RESULT($enable_fpga)
|
|
|
-AC_SUBST(STARPU_USE_FPGA,$enable_fpga)
|
|
|
-AM_CONDITIONAL(STARPU_USE_FPGA,test x$enable_fpga = xyes)
|
|
|
-if test x$enable_fpga = xyes; then
|
|
|
- AC_DEFINE(STARPU_USE_FPGA,[1],[Trying to set STARPU_USE_FPGA])
|
|
|
-fi
|
|
|
-
|
|
|
if test x$enable_fpga = xyes; then
|
|
|
|
|
|
fpga_include_dir="${fpga_dir}/include"
|
|
@@ -169,36 +160,54 @@ if test x$enable_fpga = xyes; then
|
|
|
STARPU_FPGA_CPPFLAGS="`slic-config --cflags | sed s/\'//g | sed "s/-I /-I/"` $STARPU_FPGA_CPPFLAGS"
|
|
|
STARPU_FPGA_LDFLAGS="`slic-config --libs | sed s/\'//g | sed "s/-L /-L/" | sed "s/-L /-L/"`"
|
|
|
else
|
|
|
- STARPU_FPGA_LDFLAGS="-L$fpga_lib_dir -lfpga -lrt -lm"
|
|
|
+ STARPU_FPGA_LDFLAGS="-L$fpga_lib_dir -lfpga -lrt -lm"
|
|
|
fi
|
|
|
|
|
|
- CPPFLAGS="${CPPFLAGS} ${STARPU_FPGA_CPPFLAGS} "
|
|
|
- LDFLAGS="${LDFLAGS} ${STARPU_FPGA_LDFLAGS}"
|
|
|
-
|
|
|
- AC_CHECK_HEADER([fpga.h],[have_valid_fpga=yes],[have_valid_fpga=no])
|
|
|
- AC_HAVE_LIBRARY([fpga],[have_valid_fpga=yes],[have_valid_fpga=no])
|
|
|
-
|
|
|
- if test x$have_valid_fpga = xyes; then
|
|
|
- AC_COMPILE_IFELSE(
|
|
|
- [AC_LANG_PROGRAM([[#include<fpga.h>]],[[hello()]])]
|
|
|
- [have_valid_fpga="yes"],
|
|
|
- [have_valid_fpga="no"]
|
|
|
- )
|
|
|
- AC_MSG_CHECKING(whether Fpga is working)
|
|
|
- if test x$have_valid_fpga = xyes; then
|
|
|
- AC_MSG_RESULT([:-)])
|
|
|
- else
|
|
|
- AC_MSG_RESULT([;(])
|
|
|
- fi
|
|
|
+# CPPFLAGS="${CPPFLAGS} ${STARPU_FPGA_CPPFLAGS} "
|
|
|
+# LDFLAGS="${LDFLAGS} ${STARPU_FPGA_LDFLAGS}"
|
|
|
+#
|
|
|
+# AC_CHECK_HEADER([fpga.h],[have_valid_fpga=yes],[have_valid_fpga=no])
|
|
|
+# AC_HAVE_LIBRARY([fpga],[have_valid_fpga=yes],[have_valid_fpga=no])
|
|
|
+#
|
|
|
+# if test x$have_valid_fpga = xyes; then
|
|
|
+# AC_COMPILE_IFELSE(
|
|
|
+# [AC_LANG_PROGRAM([[#include<fpga.h>]],[[hello()]])]
|
|
|
+# [have_valid_fpga="yes"],
|
|
|
+# [have_valid_fpga="no"]
|
|
|
+# )
|
|
|
+# AC_MSG_CHECKING(whether Fpga is working)
|
|
|
+# if test x$have_valid_fpga = xyes; then
|
|
|
+# AC_MSG_RESULT([:-)])
|
|
|
+# else
|
|
|
+# AC_MSG_RESULT([;(])
|
|
|
+# fi
|
|
|
+#
|
|
|
+# LDFLAGS="${SAVED_LDFLAGS}"
|
|
|
+# CPPFLAGS="${SAVED_CPPFLAGS}"
|
|
|
+#
|
|
|
+# AC_SUBST(STARPU_FPGA_CPPFLAGS)
|
|
|
+# AC_SUBST(STARPU_FPGA_LDFLAGS)
|
|
|
+# fi
|
|
|
+#
|
|
|
+# CPPFLAGS="${CPPFLAGS_SAVED}"
|
|
|
+# LDFLAGS="${LDFLAGS_SAVED}"
|
|
|
|
|
|
- LDFLAGS="${SAVED_LDFLAGS}"
|
|
|
- CPPFLAGS="${SAVED_CPPFLAGS}"
|
|
|
+# # in case FPGA was explicitely required, but is not available, this is an error
|
|
|
+# if test x$enable_fpga = xyes -a x$have_valid_fpga = xno; then
|
|
|
+# AC_MSG_ERROR([cannot find FPGA])
|
|
|
+# fi
|
|
|
+# # now we enable FPGA if and only if a proper setup is available
|
|
|
+# enable_fpga=$have_valid_fpga
|
|
|
|
|
|
- AC_SUBST(STARPU_FPGA_CPPFLAGS)
|
|
|
- AC_SUBST(STARPU_FPGA_LDFLAGS)
|
|
|
- fi
|
|
|
fi
|
|
|
|
|
|
+AC_MSG_CHECKING(whether Fpga should be used)
|
|
|
+AC_MSG_RESULT($enable_fpga)
|
|
|
+AC_SUBST(STARPU_USE_FPGA,$enable_fpga)
|
|
|
+AM_CONDITIONAL(STARPU_USE_FPGA,test x$enable_fpga = xyes)
|
|
|
+if test x$enable_fpga = xyes; then
|
|
|
+ AC_DEFINE(STARPU_USE_FPGA,[1],[FPGA Support is activated])
|
|
|
+fi
|
|
|
|
|
|
###############################################################################
|
|
|
# #
|