configure.ac 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008
  1. #
  2. # StarPU
  3. # Copyright (C) Université Bordeaux 1, CNRS 2008-2009 (see AUTHORS file)
  4. #
  5. # This program is free software; you can redistribute it and/or modify
  6. # it under the terms of the GNU Lesser General Public License as published by
  7. # the Free Software Foundation; either version 2.1 of the License, or (at
  8. # your option) any later version.
  9. #
  10. # This program is distributed in the hope that it will be useful, but
  11. # WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  13. #
  14. # See the GNU Lesser General Public License in COPYING.LGPL for more details.
  15. #
  16. AC_INIT([StarPU],0.4, [starpu-bugs@lists.gforge.inria.fr], starpu)
  17. AC_CONFIG_SRCDIR(include/starpu.h)
  18. AC_CONFIG_AUX_DIR([build-aux])
  19. AC_CANONICAL_SYSTEM
  20. AM_INIT_AUTOMAKE([-Wall -Werror foreign color-tests])
  21. m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
  22. AC_PREREQ(2.60)
  23. AC_PROG_CC
  24. AC_PROG_CPP
  25. AC_PROG_SED
  26. AC_PROG_LN_S
  27. AC_PROG_F77
  28. AC_LIBTOOL_WIN32_DLL
  29. AC_PROG_LIBTOOL([win32-dll])
  30. AC_PROG_INSTALL
  31. AC_PROG_MKDIR_P
  32. AC_PROG_LN_S
  33. AC_HEADER_STDC
  34. AC_C_RESTRICT
  35. AC_PATH_PROGS([STARPU_MS_LIB], [lib])
  36. AC_ARG_VAR([STARPU_MS_LIB], [Path to Microsoft's Visual Studio `lib' tool])
  37. AM_CONDITIONAL([STARPU_HAVE_MS_LIB], [test "x$STARPU_MS_LIB" != "x"])
  38. case "$target" in
  39. *-*-mingw*|*-*-cygwin*)
  40. starpu_windows=yes
  41. AC_DEFINE(STARPU_HAVE_WINDOWS, [], [Define this on windows.])
  42. ;;
  43. esac
  44. AM_CONDITIONAL([STARPU_HAVE_WINDOWS], [test "x$starpu_windows" = "xyes"])
  45. # on Darwin, GCC targets i386 by default, so we don't have atomic ops
  46. case "$target" in
  47. i386-*darwin*) CFLAGS+=" -march=i686 " ;;
  48. esac
  49. # This will be useful for program which use CUDA (and .cubin files) which need
  50. # some path to the CUDA code at runtime.
  51. AC_DEFINE_UNQUOTED(STARPU_BUILD_DIR, "$PWD", [location of StarPU build directory])
  52. AC_SUBST(STARPU_BUILD_DIR, $PWD)
  53. case "${srcdir}" in
  54. /*) AC_DEFINE_UNQUOTED(STARPU_SRC_DIR, "$(eval echo ${srcdir})", [location of StarPU sources])
  55. AC_SUBST(STARPU_SRC_DIR, "$(eval echo ${srcdir})") ;;
  56. *) AC_DEFINE_UNQUOTED(STARPU_SRC_DIR, "$(eval echo $PWD/${srcdir})", [location of StarPU sources])
  57. AC_SUBST(STARPU_SRC_DIR, "$(eval echo $PWD/${srcdir})") ;;
  58. esac
  59. AC_CHECK_LIB([pthread], [pthread_create])
  60. AC_COMPILE_IFELSE(
  61. AC_LANG_PROGRAM([[
  62. #include <pthread.h>
  63. ]], [[ pthread_t t; pthread_create(&t, NULL, NULL, NULL); ]]),,
  64. AC_MSG_ERROR([pthread_create unavailable]))
  65. AC_SEARCH_LIBS([sqrt],[m],,AC_MSG_ERROR([math library unavailable]))
  66. AC_HAVE_LIBRARY([wsock32])
  67. AC_CHECK_FUNCS([sysconf])
  68. AC_CHECK_FUNC([pthread_spin_lock], have_pthread_spin_lock=yes, have_pthread_spin_lock=no)
  69. if test x$have_pthread_spin_lock = xyes; then
  70. AC_DEFINE(HAVE_PTHREAD_SPIN_LOCK,[],[pthread_spin_lock is available])
  71. fi
  72. # yes, that's non portable, but it's still better than sched_setaffinity
  73. AC_CHECK_FUNCS(pthread_setaffinity_np)
  74. # There is no posix_memalign on Mac OS X, only memalign
  75. AC_CHECK_FUNCS([posix_memalign], [AC_DEFINE([STARPU_HAVE_POSIX_MEMALIGN], [1], [Define to 1 if you have the `posix_memalign' function.])])
  76. AC_CHECK_FUNCS([memalign], [AC_DEFINE([STARPU_HAVE_MEMALIGN], [1], [Define to 1 if you have the `memalign' function.])])
  77. # Some systems don't have drand48
  78. AC_CHECK_FUNCS([drand48],
  79. AC_DEFINE([starpu_srand48(seed)],[srand48(seed)],[srand48 equivalent function])
  80. AC_DEFINE([starpu_drand48()],[drand48()],[drand48 equivalent function])
  81. AC_DEFINE([starpu_erand48(xsubi)],[erand48(xsubi)],[erand48 equivalent function]),
  82. AC_DEFINE([starpu_srand48(seed)],[srand(seed)],[srand48 equivalent function])
  83. AC_DEFINE([starpu_drand48()],[((double)(rand()) / RAND_MAX)],[drand48 equivalent function])
  84. AC_DEFINE([starpu_erand48(xsubi)],[starpu_drand48()],[erand48 equivalent function])
  85. )
  86. AC_CHECK_HEADERS([malloc.h], [AC_DEFINE([STARPU_HAVE_MALLOC_H], [1], [Define to 1 if you have the <malloc.h> header file.])])
  87. # This defines HAVE_SYNC_VAL_COMPARE_AND_SWAP
  88. STARPU_CHECK_SYNC_VAL_COMPARE_AND_SWAP
  89. # This defines HAVE_SYNC_BOOL_COMPARE_AND_SWAP
  90. STARPU_CHECK_SYNC_BOOL_COMPARE_AND_SWAP
  91. # This defines HAVE_SYNC_FETCH_AND_ADD
  92. STARPU_CHECK_SYNC_FETCH_AND_ADD
  93. # This defines HAVE_SYNC_FETCH_AND_OR
  94. STARPU_CHECK_SYNC_FETCH_AND_OR
  95. # This defines HAVE_SYNC_LOCK_TEST_AND_SET
  96. STARPU_CHECK_SYNC_LOCK_TEST_AND_SET
  97. # This defines HAVE_SYNC_SYNCHRONIZE
  98. STARPU_CHECK_SYNC_SYNCHRONIZE
  99. CPPFLAGS="${CPPFLAGS} -D_GNU_SOURCE "
  100. AC_SEARCH_LIBS([set_mempolicy],[numa],[enable_libnuma=yes],[enable_libnuma=no])
  101. AC_MSG_CHECKING(whether libnuma is available)
  102. AC_MSG_RESULT($enable_libnuma)
  103. if test x$enable_libnuma = xyes; then
  104. AC_DEFINE(STARPU_HAVE_LIBNUMA,[],[libnuma is available])
  105. fi
  106. ###############################################################################
  107. # #
  108. # CPUs settings #
  109. # #
  110. ###############################################################################
  111. AC_MSG_CHECKING(maximum number of CPUs)
  112. AC_ARG_ENABLE(nmaxcpus, [AS_HELP_STRING([--enable-nmaxcpus=<number>],
  113. [maximum number of CPUs])],
  114. nmaxcpus=$enableval, nmaxcpus=16)
  115. AC_MSG_RESULT($nmaxcpus)
  116. AC_DEFINE_UNQUOTED(STARPU_NMAXCPUS, [$nmaxcpus], [Maximum number of CPUs supported])
  117. AC_MSG_CHECKING(whether CPUs should be used)
  118. AC_ARG_ENABLE(cpu, [AS_HELP_STRING([--disable-cpu],
  119. [do not use the CPU(s)])],
  120. enable_cpu=$enableval, enable_cpu=yes)
  121. AC_MSG_RESULT($enable_cpu)
  122. AC_SUBST(STARPU_USE_CPU, $enable_cpu)
  123. AM_CONDITIONAL(STARPU_USE_CPU, test x$enable_cpu = xyes)
  124. if test x$enable_cpu = xyes; then
  125. AC_DEFINE(STARPU_USE_CPU, [1], [CPU driver is activated])
  126. fi
  127. # How many parallel worker can we support ?
  128. nmaxcombinedworkers=`expr 2 \* $nmaxcpus`
  129. AC_DEFINE_UNQUOTED(STARPU_NMAX_COMBINEDWORKERS,
  130. [$nmaxcombinedworkers], [Maximum number of worker combinations])
  131. ###############################################################################
  132. # #
  133. # CUDA settings #
  134. # #
  135. ###############################################################################
  136. AC_MSG_CHECKING(maximum number of CUDA devices)
  137. AC_ARG_ENABLE(maxcudadev, [AS_HELP_STRING([--enable-maxcudadev=<number>],
  138. [maximum number of CUDA devices])],
  139. nmaxcudadev=$enableval, nmaxcudadev=4)
  140. AC_MSG_RESULT($nmaxcudadev)
  141. AC_DEFINE_UNQUOTED(STARPU_MAXCUDADEVS, [$nmaxcudadev],
  142. [maximum number of CUDA devices])
  143. AC_ARG_ENABLE(cuda, [AS_HELP_STRING([--disable-cuda],
  144. [do not use CUDA device(s)])],, [enable_cuda=maybe])
  145. #AC_MSG_CHECKING(whether CUDA is available)
  146. AC_ARG_WITH(cuda-dir,
  147. [AS_HELP_STRING([--with-cuda-dir=<path>],
  148. [specify CUDA installation directory (default is /usr/local/cuda/)])],
  149. [
  150. cuda_dir=$withval
  151. # in case this was not explicit yet
  152. enable_cuda=yes
  153. ], cuda_dir=/usr/local/cuda/)
  154. AC_ARG_WITH(cuda-include-dir,
  155. [AS_HELP_STRING([--with-cuda-include-dir=<path>],
  156. [specify where CUDA headers are installed])],
  157. [
  158. cuda_include_dir=$withval
  159. # in case this was not explicit yet
  160. enable_cuda=yes
  161. ], [cuda_include_dir=no])
  162. AC_ARG_WITH(cuda-lib-dir,
  163. [AS_HELP_STRING([--with-cuda-lib-dir=<path>],
  164. [specify where CUDA libraries are installed])],
  165. [
  166. cuda_lib_dir=$withval
  167. # in case this was not explicit yet
  168. enable_cuda=yes
  169. ], [cuda_lib_dir=no])
  170. if test x$enable_cuda = xyes -o x$enable_cuda = xmaybe; then
  171. ! test -d "$cuda_dir" && test -d "/c/cuda" && cuda_dir=/c/cuda
  172. ! test -d "$cuda_dir" && test -d "/cygdrive/c/cuda" && cuda_dir=/cygdrive/c/cuda
  173. if test x$cuda_include_dir = xno; then
  174. cuda_include_dir="$cuda_dir/include/"
  175. fi
  176. if test -d "$cuda_include_dir"; then
  177. CPPFLAGS="${CPPFLAGS} -I$cuda_include_dir "
  178. STARPU_CUDA_CPPFLAGS="-I$cuda_include_dir"
  179. NVCCFLAGS="${NVCCFLAGS} -I$cuda_include_dir "
  180. fi
  181. # do we have a valid CUDA setup ?
  182. have_valid_cuda=yes
  183. AC_CHECK_HEADER([cuda.h],,[have_valid_cuda=no])
  184. # we are looking for the proper option in LDFLAGS, so we save the
  185. # current value of LDFLAGS so that we can add new things in it and
  186. # restore it in case it's not working.
  187. SAVED_LDFLAGS="${LDFLAGS}"
  188. if test x$cuda_lib_dir = xno; then
  189. found_cudalib=no
  190. if test -d "$cuda_dir/lib/"; then
  191. LDFLAGS="${SAVED_LDFLAGS} -L$cuda_dir/lib/ "
  192. STARPU_CUDA_LDFLAGS="-L$cuda_dir/lib/"
  193. AC_HAVE_LIBRARY([cuda],[found_cudalib=yes],[found_cudalib=no])
  194. fi
  195. if test x$found_cudalib=xno -a -d "$cuda_dir/lib64/"; then
  196. LDFLAGS="${SAVED_LDFLAGS} -L$cuda_dir/lib64/ "
  197. STARPU_CUDA_LDFLAGS="-L$cuda_dir/lib64/"
  198. fi
  199. else
  200. if test -d "$cuda_lib_dir"; then
  201. LDFLAGS="${LDFLAGS} -L$cuda_lib_dir "
  202. STARPU_CUDA_LDFLAGS="-L$cuda_lib_dir "
  203. fi
  204. fi
  205. AC_HAVE_LIBRARY([cuda],[],[have_valid_cuda=no])
  206. # To detect if we have a recent enough CUDA lib
  207. AC_HAVE_LIBRARY([cudart],[],[have_valid_cuda=no])
  208. # we also check that CUBLAS is available
  209. AC_HAVE_LIBRARY([cublas],,[have_valid_cuda=no])
  210. # in case CUDA was explicitely required, but is not available, this is an error
  211. if test x$enable_cuda = xyes -a x$have_valid_cuda = no; then
  212. AC_MSG_ERROR([cannot find CUDA])
  213. fi
  214. # now we enable CUDA if and only if a proper setup is available
  215. enable_cuda=$have_valid_cuda
  216. fi
  217. AC_MSG_CHECKING(whether CUDA should be used)
  218. AC_MSG_RESULT($enable_cuda)
  219. AC_SUBST(STARPU_USE_CUDA, $enable_cuda)
  220. AM_CONDITIONAL(STARPU_USE_CUDA, test x$enable_cuda = xyes)
  221. if test x$enable_cuda = xyes; then
  222. AC_DEFINE(STARPU_USE_CUDA, [1], [CUDA support is activated])
  223. # On Darwin, the libstdc++ dependency is not automatically added by nvcc
  224. case "$target" in
  225. *-*darwin*) AC_HAVE_LIBRARY([stdc++], [STARPU_CUDA_LDFLAGS="$STARPU_CUDA_LDFLAGS -lstdc++"]) ;;
  226. esac
  227. STARPU_CUDA_LDFLAGS="$STARPU_CUDA_LDFLAGS -lcuda"
  228. AC_SUBST(STARPU_CUDA_LDFLAGS)
  229. AC_SUBST(STARPU_CUDA_CPPFLAGS)
  230. #in case this is a 64bit setup, we tell nvcc to use a -m64 flag
  231. AC_CHECK_SIZEOF([void *])
  232. if test x$SIZEOF_VOID_P = x8; then
  233. NVCCFLAGS="${NVCCFLAGS} -m64"
  234. AC_SUBST(NVCCFLAGS)
  235. fi
  236. AC_PATH_PROG([NVCC], [nvcc], [nvcc], [$cuda_dir/bin:$PATH:/usr/local/bin:/usr/bin:/bin], [AC_MSG_WARN(Cannot find nvcc.)])
  237. fi
  238. enable_magma=no
  239. if test x$enable_cuda = xyes; then
  240. # Should we use the MAGMA library (instead or in addition to CUBLAS)
  241. magma_dir=/usr/local # default
  242. enable_magma=maybe
  243. AC_ARG_WITH(magma, [AS_HELP_STRING([--with-magma=<path>],
  244. [specify that MAGMA should be used and its installation directory])],
  245. [
  246. if test x$withval = xyes; then
  247. # No path was specified but MAGMA is explicitely enabled
  248. enable_magma=yes
  249. else
  250. if test x$withval = xno; then
  251. # MAGMA is explicitely disabled
  252. enable_magma=no
  253. else
  254. # MAGMA is enabled and the PATH is given in $withval
  255. enable_magma=yes
  256. magma_dir=$withval
  257. fi
  258. fi
  259. ], [])
  260. # Do we have a valid MAGMA setup ?
  261. if test x$enable_magma = xyes -o x$enable_magma = xmaybe; then
  262. SAVED_LDFLAGS="${LDFLAGS}"
  263. SAVED_CPPFLAGS="${CPPFLAGS}"
  264. if test -d "$magma_dir/lib/"; then
  265. LDFLAGS="${SAVED_LDFLAGS} -L$magma_dir/lib/ "
  266. have_valid_magma=yes
  267. AC_CHECK_LIB(magmablas, main,,[have_valid_magma=no])
  268. AC_CHECK_LIB(magma, magmablas_sgemm,,[have_valid_magma=no])
  269. fi
  270. if test -d "$magma_dir/include/"; then
  271. CPPFLAGS="${SAVED_CPPFLAGS} -I$magma_dir/include/ "
  272. AC_CHECK_HEADER([magmablas.h],,[have_valid_magma=no])
  273. #AC_CHECK_HEADER([magma.h],,[have_valid_magma=no])
  274. fi
  275. if test x$have_valid_magma = xno; then
  276. # If MAGMA was explicitely required, this is an error
  277. if test x$enable_magma = xyes; then
  278. AC_MSG_ERROR([cannot find MAGMA])
  279. fi
  280. # Restore old flags and don't use MAGMA
  281. LDFLAGS="${SAVED_LDFLAGS}"
  282. CPPFLAGS="${SAVED_CPPFLAGS}"
  283. enable_magma=no
  284. else
  285. enable_magma=yes
  286. fi
  287. else
  288. have_valid_magma=no
  289. enable_magma=no
  290. fi
  291. fi
  292. AC_MSG_CHECKING(whether MAGMA should be used)
  293. AC_MSG_RESULT($enable_magma)
  294. if test x$enable_magma = xyes; then
  295. AC_DEFINE(STARPU_HAVE_MAGMA, [1], [use MAGMA library])
  296. fi
  297. # cufftDoubleComplex may not be available on an old CUDA setup
  298. AC_CHECK_TYPE(cufftDoubleComplex,
  299. [have_cufftdoublecomplex=yes],
  300. [have_cufftdoublecomplex=no], [#include <cufft.h>])
  301. AM_CONDITIONAL(STARPU_HAVE_CUFFTDOUBLECOMPLEX, test x$have_cufftdoublecomplex = xyes)
  302. if test x$have_cufftdoublecomplex = xyes; then
  303. AC_DEFINE(STARPU_HAVE_CUFFTDOUBLECOMPLEX, [1], [cufftDoubleComplex is available])
  304. fi
  305. # The CURAND library is only available since CUDA 3.2
  306. have_curand=$enable_cuda
  307. if test x$enable_cuda = xyes; then
  308. AC_HAVE_LIBRARY([curand],[],[have_curand=no])
  309. fi
  310. AC_MSG_CHECKING(whether CURAND is available)
  311. AC_MSG_RESULT($have_curand)
  312. if test x$have_curand = xyes; then
  313. AC_DEFINE(STARPU_HAVE_CURAND,[1], [CURAND is available])
  314. fi
  315. ###############################################################################
  316. # #
  317. # OpenCL settings #
  318. # #
  319. ###############################################################################
  320. AC_MSG_CHECKING(maximum number of OpenCL devices)
  321. AC_ARG_ENABLE(maxopencldev, [AS_HELP_STRING([--enable-maxopencldev=<number>],
  322. [maximum number of OPENCL devices])],
  323. nmaxopencldev=$enableval, nmaxopencldev=8)
  324. AC_MSG_RESULT($nmaxopencldev)
  325. AC_DEFINE_UNQUOTED(STARPU_MAXOPENCLDEVS, [$nmaxopencldev],
  326. [maximum number of OPENCL devices])
  327. AC_ARG_ENABLE(opencl, [AS_HELP_STRING([--disable-opencl],
  328. [do not use OpenCL device(s)])],, [enable_opencl=maybe])
  329. #AC_MSG_CHECKING(whether OpenCL is available)
  330. AC_ARG_WITH(opencl-dir,
  331. [AS_HELP_STRING([--with-opencl-dir=<path>],
  332. [specify OpenCL installation directory (default is /usr)])],
  333. [
  334. opencl_dir=$withval
  335. # in case this was not explicit yet
  336. enable_opencl=yes
  337. ], opencl_dir=/usr)
  338. AC_ARG_WITH(opencl-include-dir,
  339. [AS_HELP_STRING([--with-opencl-include-dir=<path>],
  340. [specify where OpenCL headers are installed])],
  341. [
  342. opencl_include_dir=$withval
  343. # in case this was not explicit yet
  344. enable_opencl=yes
  345. ], [opencl_include_dir=no])
  346. AC_ARG_WITH(opencl-lib-dir,
  347. [AS_HELP_STRING([--with-opencl-lib-dir=<path>],
  348. [specify where OpenCL libraries are installed])],
  349. [
  350. opencl_lib_dir=$withval
  351. # in case this was not explicit yet
  352. enable_opencl=yes
  353. ], [opencl_lib_dir=no])
  354. if test x$enable_opencl = xyes -o x$enable_opencl = xmaybe; then
  355. if test x$opencl_include_dir = xno; then
  356. opencl_include_dir="$opencl_dir/include"
  357. fi
  358. if test -d "$opencl_include_dir" && test "$opencl_include_dir" != "/usr/include" ; then
  359. CPPFLAGS="${CPPFLAGS} -I$opencl_include_dir "
  360. fi
  361. # do we have a valid OpenCL setup ?
  362. have_valid_opencl=yes
  363. AC_CHECK_HEADER([CL/cl.h],,[have_valid_opencl=no])
  364. # we are looking for the proper option in LDFLAGS, so we save the
  365. # current value of LDFLAGS so that we can add new things in it and
  366. # restore it in case it's not working.
  367. SAVED_LDFLAGS="${LDFLAGS}"
  368. if test x$opencl_lib_dir = xno; then
  369. # Default location
  370. opencl_lib_dir="$opencl_dir/lib/"
  371. fi
  372. if test -d "$opencl_lib_dir"; then
  373. LDFLAGS="${SAVED_LDFLAGS} -L$opencl_lib_dir "
  374. fi
  375. AC_HAVE_LIBRARY([OpenCL],[],[have_valid_opencl=no])
  376. # in case OpenCL was explicitely required, but is not available, this is an error
  377. if test x$enable_opencl = xyes -a x$have_valid_opencl = no; then
  378. AC_MSG_ERROR([cannot find OpenCL])
  379. fi
  380. # now we enable OpenCL if and only if a proper setup is available
  381. enable_opencl=$have_valid_opencl
  382. fi
  383. AC_MSG_CHECKING(whether OpenCL should be used)
  384. AC_MSG_RESULT($enable_opencl)
  385. AC_SUBST(STARPU_USE_OPENCL, $enable_opencl)
  386. AM_CONDITIONAL(STARPU_USE_OPENCL, test x$enable_opencl = xyes)
  387. if test x$enable_opencl = xyes; then
  388. AC_DEFINE(STARPU_USE_OPENCL, [1], [OpenCL support is activated])
  389. CPPFLAGS="${CPPFLAGS} -DSTARPU_OPENCL_DATADIR=${datarootdir}/starpu/opencl"
  390. AC_SUBST(STARPU_OPENCL_DATAdir, "$(eval echo ${datarootdir}/starpu/opencl/examples)")
  391. fi
  392. ###############################################################################
  393. # #
  394. # Cell settings #
  395. # #
  396. ###############################################################################
  397. #TODO fix the default dir
  398. AC_ARG_ENABLE(gordon, [AS_HELP_STRING([--enable-gordon],
  399. [use Cell's SPUs])],, enable_gordon=maybe)
  400. if test x$enable_gordon = xyes -o x$enable_gordon = xmaybe; then
  401. AC_ARG_WITH(gordon-dir, [AS_HELP_STRING([--with-gordon-dir=<path>],
  402. [specify Gordon installation directory (default is /usr/local/)])],
  403. [
  404. gordon_dir=$withval
  405. enable_gordon=yes
  406. ], gordon_dir=/usr/local/)
  407. # do we have a valid Gordon setup ?
  408. have_valid_gordon=yes
  409. # can we use dynamic code loading facilities ?
  410. AC_CHECK_LIB(elf, elf_memory,, [have_valid_gordon=no])
  411. AC_CHECK_LIB(spe2, spe_context_create,,[have_valid_gordon=no])
  412. AC_CHECK_FUNC(spe_in_mbox_write, [], [have_valid_gordon=no])
  413. PKG_PROG_PKG_CONFIG
  414. if test -d "$gordon_dir"; then
  415. PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:$gordon_dir"
  416. fi
  417. AC_SUBST(PKG_CONFIG_PATH)
  418. PKG_CHECK_MODULES([GORDON], [libgordon], [], have_valid_gordon=no)
  419. CPPFLAGS="${CPPFLAGS} ${GORDON_CFLAGS}"
  420. LIBS="${LIBS} ${GORDON_LIBS}"
  421. # AC_CHECK_FUNC(gordon_init, [gordon], [have_valid_gordon=no])
  422. # in case Gordon was explicitely required, but is not available, this is an error
  423. if test x$enable_gordon = xyes -a x$have_valid_gordon = no; then
  424. AC_MSG_ERROR([cannot find Gordon])
  425. fi
  426. # now we enable Gordon if and only if a proper setup is available
  427. enable_gordon=$have_valid_gordon
  428. fi
  429. AC_MSG_CHECKING(whether GORDON should be used)
  430. AC_MSG_RESULT($enable_gordon)
  431. AC_SUBST(STARPU_USE_GORDON, $enable_gordon)
  432. AM_CONDITIONAL(STARPU_USE_GORDON, test x$enable_gordon = xyes)
  433. if test x$enable_gordon = xyes; then
  434. AC_DEFINE(STARPU_USE_GORDON, [1], [Cell support is enabled])
  435. GORDON_REQUIRES=gordon
  436. fi
  437. AC_SUBST(GORDON_REQUIRES)
  438. AC_MSG_CHECKING(whether blocking drivers should be disabled)
  439. AC_ARG_ENABLE(blocking-drivers, [AS_HELP_STRING([--disable-blocking-drivers], [disable blocking drivers])],
  440. enable_blocking=$enableval, enable_blocking=$enable_gordon)
  441. AC_MSG_RESULT($enable_blocking)
  442. if test x$enable_blocking = xno; then
  443. AC_DEFINE(STARPU_NON_BLOCKING_DRIVERS, [1], [drivers must progress])
  444. fi
  445. ###############################################################################
  446. # #
  447. # Debug and Performance analysis tools #
  448. # #
  449. ###############################################################################
  450. AC_MSG_CHECKING(whether debug mode should be enabled)
  451. AC_ARG_ENABLE(debug, [AS_HELP_STRING([--enable-debug], [enable debug mode])],
  452. enable_debug=$enableval, enable_debug=no)
  453. AC_MSG_RESULT($enable_debug)
  454. if test x$enable_debug = xyes; then
  455. CFLAGS=" -O0 "
  456. else
  457. CFLAGS=" -O3 "
  458. fi
  459. CFLAGS+=" -gdwarf-2 -g3 "
  460. AC_MSG_CHECKING(whether extra checks should be performed)
  461. AC_ARG_ENABLE(fast, [AS_HELP_STRING([--enable-fast],
  462. [do not enforce assertions])],
  463. enable_fast=$enableval, enable_fast=no)
  464. AC_MSG_RESULT($enable_fast)
  465. if test x$enable_fast = xyes; then
  466. AC_DEFINE(STARPU_NO_ASSERT, [1], [disable assertions])
  467. fi
  468. AC_MSG_CHECKING(whether debug messages should be displayed)
  469. AC_ARG_ENABLE(verbose, [AS_HELP_STRING([--enable-verbose],
  470. [display verbose debug messages])],
  471. enable_verbose=$enableval, enable_verbose=no)
  472. AC_MSG_RESULT($enable_verbose)
  473. if test x$enable_verbose = xyes; then
  474. AC_DEFINE(STARPU_VERBOSE, [1], [display verbose debug messages])
  475. fi
  476. AC_MSG_CHECKING(whether coverage testing should be enabled)
  477. AC_ARG_ENABLE(coverage, [AS_HELP_STRING([--enable-coverage],
  478. [enable coverage checking])],
  479. enable_coverage=$enableval, enable_coverage=no)
  480. AC_MSG_RESULT($enable_coverage)
  481. AC_SUBST(COVERAGE, $enable_coverage)
  482. AM_CONDITIONAL(STARPU_COVERAGE_ENABLED, [test "x$enable_coverage" = "xyes"])
  483. if test x$enable_coverage = xyes; then
  484. CPPFLAGS="${CPPFLAGS} --coverage"
  485. LDFLAGS="${LDFLAGS} --coverage"
  486. fi
  487. # shall we use FxT to generate trace of the execution ?
  488. AC_MSG_CHECKING(whether fxt traces should be generated)
  489. AC_ARG_WITH(fxt, [AS_HELP_STRING([--with-fxt[=<dir>]], [generate fxt traces])],
  490. [
  491. if test x$withval != xno; then
  492. use_fxt=yes
  493. if test x$withval = xyes; then
  494. AC_MSG_RESULT(yes)
  495. use_fxt_from_system=yes
  496. else
  497. # use specified path
  498. # TODO check if the dir is actually containing FxT
  499. use_fxt_from_system=no
  500. fxtdir=$withval
  501. AC_MSG_RESULT(yes using $fxtdir)
  502. AC_SUBST(FXTDIR, $fxtdir)
  503. fi
  504. else
  505. use_fxt=no
  506. AC_MSG_RESULT(no)
  507. fi
  508. ],
  509. [
  510. use_fxt=no
  511. AC_MSG_RESULT(no)
  512. ])
  513. AC_SUBST(STARPU_USE_FXT, $use_fxt)
  514. AM_CONDITIONAL(STARPU_USE_FXT, test x$use_fxt = xyes)
  515. if test x$use_fxt = xyes; then
  516. AC_DEFINE(STARPU_USE_FXT, [1], [enable FxT traces])
  517. AC_DEFINE(CONFIG_FUT, [1], [enable FUT traces])
  518. AC_SUBST(USE_FXTDIR_FROM_USER,$use_fxt_from_system)
  519. if test x$use_fxt_from_system = xno; then
  520. CPPFLAGS="${CPPFLAGS} -I$fxtdir/include/ "
  521. LDFLAGS="${LDFLAGS} -L$fxtdir/lib/ "
  522. fi
  523. # if we use monotonic clocks, FxT uses -lrt
  524. AC_CHECK_LIB(rt, clock_gettime,,AC_MSG_ERROR([cannot find clock_gettime]))
  525. AC_CHECK_LIB(fxt, fut_setup,,AC_MSG_ERROR([cannot find fxt lib]))
  526. AC_CHECK_HEADER([fxt/fxt.h],,AC_MSG_ERROR([cannot find headers for fxt]))
  527. AC_CHECK_HEADER([fxt/fut.h],,AC_MSG_ERROR([cannot find headers for fxt]))
  528. fi
  529. AC_MSG_CHECKING(whether performance debugging should be enabled)
  530. AC_ARG_ENABLE(perf-debug, [AS_HELP_STRING([--enable-perf-debug],
  531. [enable performance debugging])],
  532. enable_perf_debug=$enableval, enable_perf_debug=no)
  533. AC_MSG_RESULT($enable_perf_debug)
  534. AC_SUBST(STARPU_PERF_DEBUG, $enable_perf_debug)
  535. if test x$enable_perf_debuf = xyes; then
  536. AC_DEFINE(STARPU_PERF_DEBUG, [1], [enable performance debug])
  537. CPPFLAGS="${CPPFLAGS} -pg "
  538. LDFLAGS="${LDFLAGS} -pg "
  539. fi
  540. AC_MSG_CHECKING(whether performance model debugging should be enabled)
  541. AC_ARG_ENABLE(model-debug, [AS_HELP_STRING([--enable-model-debug],
  542. [enable performance model debugging])],
  543. enable_model_debug=$enableval, enable_model_debug=no)
  544. AC_MSG_RESULT($enable_model_debug)
  545. if test x$enable_model_debug = xyes; then
  546. AC_DEFINE(STARPU_MODEL_DEBUG, [1], [enable performance model debug])
  547. fi
  548. AC_MSG_CHECKING(whether statistics should be generated)
  549. AC_ARG_ENABLE(stats, [AS_HELP_STRING([--enable-stats],
  550. [enable statistics])],
  551. enable_stats=$enableval, enable_stats=no)
  552. AC_MSG_RESULT($enable_stats)
  553. AC_SUBST(STATS, $enable_stats)
  554. AC_SUBST(STARPU_DATA_STATS, $enable_stats)
  555. if test x$enable_stats = xyes; then
  556. AC_DEFINE(STARPU_DATA_STATS, [1], [enable statistics])
  557. fi
  558. AC_CHECK_HEADERS([glpk.h])
  559. AC_HAVE_LIBRARY([glpk])
  560. ###############################################################################
  561. # #
  562. # Miscellaneous options for StarPU #
  563. # #
  564. ###############################################################################
  565. AC_MSG_CHECKING(how many buffers can be manipulated per task)
  566. AC_ARG_ENABLE(maxbuffers, [AS_HELP_STRING([--enable-maxbuffers=<nbuffers>],
  567. [maximum number of buffers per task])],
  568. nmaxbuffers=$enableval, nmaxbuffers=8)
  569. AC_MSG_RESULT($nmaxbuffers)
  570. AC_DEFINE_UNQUOTED(STARPU_NMAXBUFS, [$nmaxbuffers],
  571. [how many buffers can be manipulated per task])
  572. # We have one memory node shared by all CPU workers, one node per GPU, and
  573. # currently the Cell driver is using the same memory node as the CPU.
  574. maxnodes=1
  575. if test x$enable_cuda = xyes ; then
  576. # we could have used nmaxcudadev + 1, but this would certainly give an
  577. # odd number.
  578. maxnodes=`expr $maxnodes + $nmaxcudadev`
  579. fi
  580. if test x$enable_opencl = xyes ; then
  581. # we could have used nmaxcudadev + 1, but this would certainly give an
  582. # odd number.
  583. maxnodes=`expr $maxnodes + $nmaxopencldev`
  584. fi
  585. # todo: set maxnodes to the next power of 2 greater than maxnodes
  586. AC_MSG_CHECKING(maximum number of memory nodes)
  587. AC_MSG_RESULT($maxnodes)
  588. AC_DEFINE_UNQUOTED(STARPU_MAXNODES, [$maxnodes],
  589. [maximum number of memory nodes])
  590. AC_MSG_CHECKING(whether allocation cache should be used)
  591. AC_ARG_ENABLE(allocation-cache, [AS_HELP_STRING([--enable-allocation-cache],
  592. [enable data allocation cache])],
  593. enable_allocation_cache=$enableval, enable_allocation_cache=no)
  594. AC_MSG_RESULT($enable_allocation_cache)
  595. if test x$enable_allocation_cache = xyes; then
  596. AC_DEFINE(STARPU_USE_ALLOCATION_CACHE, [1], [enable data allocation cache])
  597. fi
  598. AC_ARG_WITH(perf-model-dir, [AS_HELP_STRING([--with-perf-model-dir=<dir>], [specify where performance models shoulds be stored])],
  599. [
  600. if test x$withval = xno; then
  601. AC_MSG_ERROR(--without-perf-model-dir is not a valid option)
  602. fi
  603. perf_model_dir=$withval
  604. have_explicit_perf_model_dir=yes
  605. AC_DEFINE_UNQUOTED(STARPU_PERF_MODEL_DIR, ["$perf_model_dir"], [performance models location])
  606. ], [
  607. # by default, we put the performance models in
  608. # $HOME/.starpu/sampling/
  609. have_explicit_perf_model_dir=no
  610. perf_model_dir="\$HOME/.starpu/sampling/"
  611. ]
  612. )
  613. AC_MSG_CHECKING(using explicit performance model location)
  614. AC_MSG_RESULT($have_explicit_perf_model_dir)
  615. AC_MSG_CHECKING(performance models location)
  616. AC_MSG_RESULT($perf_model_dir)
  617. # On many multicore CPUs, clock cycles are not synchronized
  618. AC_CHECK_LIB([rt], [clock_gettime])
  619. AC_CHECK_FUNCS([clock_gettime])
  620. # Compute the maximum number of workers (we round it to 16 for alignment
  621. # purposes).
  622. nmaxworkers=`expr 16 \* \( \( $nmaxcpus + $nmaxcudadev + $nmaxopencldev + 15 \) / 16 \) `
  623. AC_MSG_CHECKING(Maximum number of workers)
  624. AC_MSG_RESULT($nmaxworkers)
  625. AC_DEFINE_UNQUOTED(STARPU_NMAXWORKERS, [$nmaxworkers], [Maximum number of workers])
  626. ###############################################################################
  627. # #
  628. # MPI #
  629. # #
  630. ###############################################################################
  631. AC_ARG_WITH(mpicc, [AS_HELP_STRING([--with-mpicc[=<path to mpicc>]],
  632. [Path of the mpicc compiler])],
  633. [
  634. if test x$withval = xyes; then
  635. AC_MSG_ERROR(--with-mpicc must be given a pathname)
  636. else
  637. mpicc_path=$withval
  638. fi
  639. ],
  640. [
  641. # nothing was specified: default value is used
  642. AC_PATH_PROG(mpicc_path, mpicc, [no], [])
  643. ])
  644. # We test if the MPICC compiler exists
  645. if test ! -x $mpicc_path; then
  646. #MPICC does not exists or is not executable
  647. AC_MSG_RESULT(The mpicc compiler is not valid)
  648. use_mpi=no
  649. else
  650. use_mpi=yes
  651. fi
  652. AC_MSG_CHECKING(mpicc path)
  653. AC_MSG_RESULT($mpicc_path)
  654. AC_SUBST(MPICC, $mpicc_path)
  655. if test x$use_mpi = xyes; then
  656. cc_or_mpicc=$mpicc_path
  657. else
  658. cc_or_mpicc=$CC
  659. fi
  660. AC_SUBST(CC_OR_MPICC, $cc_or_mpicc)
  661. AC_MSG_CHECKING(whether the StarPU MPI library should be generated)
  662. AC_MSG_RESULT($use_mpi)
  663. AC_SUBST(USE_MPI, $use_mpi)
  664. AM_CONDITIONAL(USE_MPI, test x$use_mpi = xyes)
  665. if test x$use_mpi = xyes; then
  666. AC_DEFINE(STARPU_USE_MPI,[],[whether the StarPU MPI library is available])
  667. fi
  668. ###############################################################################
  669. # #
  670. # Examples #
  671. # #
  672. ###############################################################################
  673. AC_ARG_ENABLE(opengl-render, [AS_HELP_STRING([--enable-opengl-render],
  674. [enable OpenGL rendering of some examples])],
  675. enable_opengl_render=$enableval, enable_opengl_render=no)
  676. if test x$enable_opengl_render = xyes; then
  677. AC_CHECK_LIB(glut, glutInit,,AC_MSG_ERROR([cannot find glut]))
  678. AC_CHECK_LIB(GL, glXCreateContext,,AC_MSG_ERROR([cannot find GL]))
  679. AC_CHECK_LIB(GLU, gluLookAt,,AC_MSG_ERROR([cannot find GLU]))
  680. AC_DEFINE(STARPU_OPENGL_RENDER, [1], [enable OpenGL rendering of some examples])
  681. fi
  682. AC_MSG_CHECKING(whether OpenGL rendering is enabled)
  683. AC_SUBST(STARPU_OPENGL_RENDER, $enable_opengl_render)
  684. AC_MSG_RESULT($enable_opengl_render)
  685. have_x11=yes
  686. AC_CHECK_LIB(X11, XOpenDisplay,,[have_x11=no])
  687. if test x$have_x11 = xyes; then
  688. AC_DEFINE(STARPU_HAVE_X11, [1], [enable X11])
  689. fi
  690. # In case there are BLAS kernels that are used by the example applications
  691. # we may specify which library to use. Note that this is not used for StarPU
  692. # itself.
  693. blas_lib=maybe
  694. AC_ARG_ENABLE(blas-lib,
  695. [ --enable-blas-lib[=blaslibname]:
  696. none [default]: no BLAS lib is used
  697. atlas: use ATLAS library
  698. goto: use GotoBLAS library],
  699. [
  700. if test "x$enableval" = "xatlas" ; then
  701. blas_lib=atlas
  702. elif test "x$enableval" = "xgoto" ; then
  703. blas_lib=goto
  704. elif test "x$enableval" = "xnone" ; then
  705. blas_lib=none
  706. elif test x$enableval = xno; then
  707. blas_lib=none
  708. else
  709. echo
  710. echo "Error!"
  711. echo "Unknown BLAS library"
  712. exit -1
  713. fi
  714. ])
  715. if test x$blas_lib = xmaybe -o x$blas_lib = xgoto; then
  716. AC_ARG_WITH(goto-dir, [AS_HELP_STRING([--with-goto-dir=<dir>], [specify GotoBLAS lib location])],
  717. [
  718. blas_lib=goto
  719. gotodir=$withval
  720. AC_SUBST(GOTODIR, $gotodir)
  721. CPPFLAGS="${CPPFLAGS} -I$gotodir/ "
  722. LDFLAGS="${LDFLAGS} -L$gotodir/ "
  723. ]
  724. )
  725. if test x$blas_lib = xgoto; then
  726. AC_CHECK_LIB(gfortran, main,,)
  727. # Perhaps that GotoBLAS2 is available instead (so that we have libgotoblas2.{so,a})
  728. AC_CHECK_LIB(goto2, sgemm_,, [havegoto2=no])
  729. if test x$havegoto2 = xno; then
  730. AC_CHECK_LIB(goto, sgemm_,,AC_MSG_ERROR([cannot find goto lib]))
  731. fi
  732. AC_DEFINE(STARPU_GOTO, [1], [use STARPU_GOTO library])
  733. fi
  734. fi
  735. if test x$blas_lib = xmaybe -o x$blas_lib = xatlas; then
  736. AC_ARG_WITH(atlas-dir, [AS_HELP_STRING([--with-atlas-dir=<dir>], [specify ATLAS lib location])],
  737. [
  738. AC_MSG_CHECKING(STARPU_ATLAS location)
  739. blas_lib=atlas
  740. atlasdir=$withval
  741. AC_MSG_RESULT($atlasdir)
  742. AC_SUBST(ATLASDIR, $atlasdir)
  743. CPPFLAGS="${CPPFLAGS} -I$atlasdir/include/ "
  744. LDFLAGS="${LDFLAGS} -L$atlasdir/lib/ "
  745. ]
  746. )
  747. if test x$blas_lib = xatlas; then
  748. # test whether STARPU_ATLAS is actually available
  749. AC_CHECK_HEADER([cblas.h],,AC_MSG_ERROR([cannot find atlas headers]))
  750. AC_CHECK_LIB(atlas, ATL_sgemm,,AC_MSG_ERROR([cannot find atlas lib]),)
  751. AC_CHECK_LIB(cblas, cblas_sgemm,,AC_MSG_ERROR([cannot find atlas lib]),[-latlas])
  752. AC_DEFINE(STARPU_ATLAS, [1], [use STARPU_ATLAS library])
  753. fi
  754. fi
  755. if test x$blas_lib = xmaybe; then
  756. # Should we use MKL ?
  757. AC_ARG_WITH(mkl-cflags, [AS_HELP_STRING([--with-mkl-cflags], [specify MKL compilation flags])],
  758. [
  759. CPPFLAGS="${CPPFLAGS} $withval"
  760. blas_lib=mkl
  761. ])
  762. AC_ARG_WITH(mkl-ldflags, [AS_HELP_STRING([--with-mkl-ldflags], [specify MKL linking flags])],
  763. [
  764. LDFLAGS="${LDFLAGS} $withval"
  765. blas_lib=mkl
  766. ])
  767. if test x$blas_lib=xmkl; then
  768. AC_DEFINE(STARPU_MKL, [1], [use MKL library])
  769. fi
  770. fi
  771. if test x$blas_lib = xmaybe; then
  772. #perhaps it is possible to use some BLAS lib from the system
  773. use_system_blas=no
  774. AC_SEARCH_LIBS([sgemm_],[blas],use_system_blas=yes,,)
  775. if test x$use_system_blas = xyes; then
  776. AC_DEFINE(STARPU_SYSTEM_BLAS, [1], [use refblas library])
  777. blas_lib=system
  778. else
  779. blas_lib=none
  780. fi
  781. fi
  782. AM_CONDITIONAL(ATLAS_BLAS_LIB, test x$blas_lib = xatlas)
  783. AM_CONDITIONAL(GOTO_BLAS_LIB, test x$blas_lib = xgoto)
  784. AM_CONDITIONAL(MKL_BLAS_LIB, test x$blas_lib = xmkl)
  785. AM_CONDITIONAL(SYSTEM_BLAS_LIB, test x$blas_lib = xsystem)
  786. AM_CONDITIONAL(NO_BLAS_LIB, test x$blas_lib = xnone)
  787. AC_MSG_CHECKING(which BLAS lib should be used)
  788. AC_MSG_RESULT($blas_lib)
  789. AC_SUBST(BLAS_LIB,$blas_lib)
  790. have_fftw=no
  791. have_fftwf=no
  792. have_fftwl=no
  793. PKG_CHECK_MODULES([FFTW], [fftw3], [
  794. AC_DEFINE([STARPU_HAVE_FFTW], [1], [Define to 1 if you have the libfftw3 library.])
  795. AC_SUBST([STARPU_HAVE_FFTW], [1])
  796. have_fftw=yes
  797. ], [:])
  798. AM_CONDITIONAL(STARPU_HAVE_FFTW, [test x$have_fftw = xyes])
  799. PKG_CHECK_MODULES([FFTWF], [fftw3f], [
  800. AC_DEFINE([STARPU_HAVE_FFTWF], [1], [Define to 1 if you have the libfftw3f library.])
  801. AC_SUBST([STARPU_HAVE_FFTWF], [1])
  802. have_fftwf=yes
  803. ], [:])
  804. AM_CONDITIONAL(STARPU_HAVE_FFTWF, [test x$have_fftwf = xyes])
  805. PKG_CHECK_MODULES([FFTWL], [fftw3l], [
  806. AC_DEFINE([STARPU_HAVE_FFTWL], [1], [Define to 1 if you have the libfftw3l library.])
  807. AC_SUBST([HAVE_FFTWFL], [1])
  808. have_fftwl=yes
  809. ], [:])
  810. AM_CONDITIONAL(STARPU_HAVE_FFTWL, [test x$have_fftwl = xyes])
  811. PKG_CHECK_MODULES([HWLOC], [hwloc], [
  812. AC_DEFINE([STARPU_HAVE_HWLOC], [1], [Define to 1 if you have the hwloc library.])
  813. HWLOC_REQUIRES=hwloc
  814. AC_SUBST([STARPU_HAVE_HWLOC], [1])
  815. ], [:])
  816. AC_SUBST(HWLOC_REQUIRES)
  817. # is the header file f77.h available ?
  818. have_f77_h=yes
  819. AC_CHECK_HEADER([f77.h],,[have_f77_h=no])
  820. AC_MSG_CHECKING(whether header file f77.h is available)
  821. AC_MSG_RESULT($have_f77_h)
  822. AC_SUBST(STARPU_HAVE_F77_H, $have_f77_h)
  823. AM_CONDITIONAL(STARPU_HAVE_F77_H, test x$have_f77_h = xyes)
  824. if test x$have_f77_h = xyes; then
  825. AC_DEFINE([STARPU_HAVE_F77_H], [1], [Define to 1 if you have the <f77.h> header file.])
  826. fi
  827. AC_CONFIG_COMMANDS([executable-scripts], [chmod +x ]tests/regression/regression.sh)
  828. AC_CONFIG_FILES(tests/regression/regression.sh tests/regression/profiles tests/regression/profiles.build.only)
  829. AC_CONFIG_HEADER(src/common/config.h include/starpu_config.h)
  830. AC_OUTPUT([
  831. Makefile
  832. src/Makefile
  833. tools/Makefile
  834. libstarpu.pc
  835. examples/Makefile
  836. examples/starpufft/Makefile
  837. examples/stencil/Makefile
  838. tests/Makefile
  839. doc/Makefile
  840. mpi/Makefile
  841. ])